@onyxsecurity/mcp-gateway 2.1.39 → 2.1.40

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.
Files changed (41) hide show
  1. package/dist/bin/mcp-gateway.js +2 -2
  2. package/dist/{cli-CmbQVMhl.js → cli-CAJkf_BE.js} +2 -2
  3. package/dist/cli-CAJkf_BE.js.map +1 -0
  4. package/dist/env-DW7bNp9e.js +2 -0
  5. package/dist/env-DW7bNp9e.js.map +1 -0
  6. package/dist/env-HJmBKke9.js +1 -0
  7. package/dist/{helpers-BrpBfS5F.js → helpers-BLNSu673.js} +4 -4
  8. package/dist/{helpers-BrpBfS5F.js.map → helpers-BLNSu673.js.map} +1 -1
  9. package/dist/index.d.ts +4 -9
  10. package/dist/index.js +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/logger-AanoN79Y.js +5 -0
  13. package/dist/{logger-BKIQpGtw.js.map → logger-AanoN79Y.js.map} +1 -1
  14. package/dist/main-C1Tyuk4v.js +6 -0
  15. package/dist/main-C1Tyuk4v.js.map +1 -0
  16. package/dist/normalizeUrl-DoppHGlo.js +64 -0
  17. package/dist/normalizeUrl-DoppHGlo.js.map +1 -0
  18. package/dist/oauthProvidersClient-BSKOBEK-.js +1 -0
  19. package/dist/{oauthProvidersClient-CSfC0nnU.js → oauthProvidersClient-DHglUqos.js} +2 -2
  20. package/dist/{oauthProvidersClient-CSfC0nnU.js.map → oauthProvidersClient-DHglUqos.js.map} +1 -1
  21. package/dist/{providers-BDjtjNUA.js → providers-DqYBslU6.js} +2 -2
  22. package/dist/{providers-BDjtjNUA.js.map → providers-DqYBslU6.js.map} +1 -1
  23. package/dist/transportDetection-UvCkhuUq.js +136 -0
  24. package/dist/transportDetection-UvCkhuUq.js.map +1 -0
  25. package/dist/upstreamNegotiation-CKlqaA_j.js +15 -0
  26. package/dist/upstreamNegotiation-CKlqaA_j.js.map +1 -0
  27. package/package.json +5 -2
  28. package/dist/cli-CmbQVMhl.js.map +0 -1
  29. package/dist/env-Bq3tPJX9.js +0 -2
  30. package/dist/env-Bq3tPJX9.js.map +0 -1
  31. package/dist/env-Bto2CEy8.js +0 -1
  32. package/dist/logger-BKIQpGtw.js +0 -5
  33. package/dist/main-DURKDydM.js +0 -6
  34. package/dist/main-DURKDydM.js.map +0 -1
  35. package/dist/normalizeUrl-BrUSzVK4.js +0 -31
  36. package/dist/normalizeUrl-BrUSzVK4.js.map +0 -1
  37. package/dist/oauthProvidersClient-DTav_fHE.js +0 -1
  38. package/dist/stdio-D3je2hIR.js +0 -31
  39. package/dist/stdio-D3je2hIR.js.map +0 -1
  40. package/dist/transportDetection-BW8OoLyM.js +0 -136
  41. package/dist/transportDetection-BW8OoLyM.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeUrl-DoppHGlo.js","names":["array","object","isPlainObject","_a","config","_a","_zodDesc","own","proto","util.jsonStringifyReplacer","initializer","flattenError","issue","error","node","core.$ZodAsyncError","util.finalizeIssue","core.config","parse","errors.$ZodRealError","parseAsync","errors.$ZodError","safeParse","safeParseAsync","encode","decode","encodeAsync","decodeAsync","safeEncode","safeDecode","safeEncodeAsync","safeDecodeAsync","version","email","_emoji","date","datetime","string","number","boolean","_null","_a","util.nullish","inst","util.floatSafeRemainder","util.NUMBER_FORMAT_RANGES","regexes.integer","util.codePointLength","util.getLengthableOrigin","regexes.lowercase","regexes.uppercase","util.escapeRegex","_a","util.aborted","checks","util.explicitlyAborted","core.$ZodAsyncError","checkResult","canary","result","util.hide","safeParse","safeParseAsync","regexes.string","_","regexes.guid","regexes.uuid","regexes.email","url","regexes.emoji","regexes.nanoid","regexes.nanoidOfLength","regexes.cuid","regexes.cuid2","regexes.ulid","regexes.xid","regexes.ksuid","regexes.datetime","regexes.date","regexes.time","regexes.duration","regexes.ipv4","regexes.ipv6","regexes.cidrv4","regexes.cidrv6","regexes.base64","base64","regexes.base64url","regexes.e164","regexes.number","regexes.boolean","regexes.null","util.prefixIssues","memo","util.optionalKeys","r","util.cached","isObject","util.isObject","util.esc","allowsEval","util.allowsEval","util.finalizeIssue","core.config","util.cleanRegex","results","left","right","util.isPlainObject","util.getEnumValues","util.escapeRegex","core.$ZodEncodeError","util.issue","cached","memo","_a","issue","util.parsedType","util.stringifyPrimitive","util.joinValues","meta","util.normalizeParams","_url","_null","checks.$ZodCheckLessThan","checks.$ZodCheckGreaterThan","checks.$ZodCheckMultipleOf","checks.$ZodCheckMaxLength","checks.$ZodCheckMinLength","checks.$ZodCheckLengthEquals","checks.$ZodCheckRegex","checks.$ZodCheckLowerCase","checks.$ZodCheckUpperCase","checks.$ZodCheckIncludes","checks.$ZodCheckStartsWith","checks.$ZodCheckEndsWith","checks.$ZodCheckOverwrite","util.slugify","issue","util.issue","checks.$ZodCheck","describe","meta","_a","meta","id","schema","members","required","object","union","regexes.number","regexes.integer","record","registry","ctx","core.formatError","core.flattenError","issue","util.jsonStringifyReplacer","issues","en","core.memoizer","util.mergeDefs","core.clone","meta","checks.overwrite","util.hide","core.standardProps","_parse","parse.parse","_parseAsync","parse.parseAsync","parse.safeParse","parse.safeParseAsync","_encode","parse.encode","_decode","parse.decode","_encodeAsync","parse.encodeAsync","_decodeAsync","parse.decodeAsync","parse.safeEncode","parse.safeDecode","parse.safeEncodeAsync","parse.safeDecodeAsync","processors.stringProcessor","checks.regex","checks.includes","checks.startsWith","checks.endsWith","checks.minLength","checks.maxLength","checks.length","checks.lowercase","checks.uppercase","checks.trim","checks.normalize","checks.toLowerCase","checks.toUpperCase","checks.slugify","core._email","core._url","core._jwt","core._emoji","core._guid","core._uuid","core._uuidv4","core._uuidv6","core._uuidv7","core._nanoid","core._cuid","core._cuid2","core._ulid","core._base64","core._base64url","core._xid","core._ksuid","core._ipv4","core._ipv6","core._cidrv4","core._cidrv6","core._e164","core._isoDateTime","core._isoDate","core._isoTime","core._isoDuration","core._string","processors.numberProcessor","checks.gt","checks.gte","checks.lt","checks.lte","checks.multipleOf","number","core._number","core._int","processors.booleanProcessor","core._boolean","processors.nullProcessor","core._null","processors.anyProcessor","core._any","processors.unknownProcessor","core._unknown","processors.neverProcessor","core._never","processors.arrayProcessor","core._array","processors.objectProcessor","util.extend","util.safeExtend","util.merge","util.pick","util.omit","util.partial","util.required","util.normalizeParams","processors.unionProcessor","processors.intersectionProcessor","processors.recordProcessor","processors.enumProcessor","processors.literalProcessor","processors.transformProcessor","core.$ZodEncodeError","issue","util.issue","output","processors.optionalProcessor","processors.nullableProcessor","processors.defaultProcessor","util.shallowClone","processors.prefaultProcessor","processors.nonoptionalProcessor","processors.catchProcessor","core.util.constantCatch","processors.pipeProcessor","processors.readonlyProcessor","processors.lazyProcessor","processors.customProcessor","core._refine","core._superRefine","core.describe","core.meta","core._isoDateTime","core._isoDate","core._coercedNumber","schemas.ZodNumber","z.lazy","z.union","z.string","z.number","z.boolean","z.null","z.record","z.array","z.object","z.looseObject","z.literal","z.unknown","z.enum","z.intersection","z.preprocess","z.optional","z.iso.datetime","z.discriminatedUnion","z.url","z.NEVER","url","z.coerce.number","z.any","OAuthError","url","version","z.lazy","z.union","z.string","z.number","z.boolean","z.null","z.record","z.array","z.object","z.looseObject","z.literal","z.enum","FormElicitationCapabilitySchema","z.intersection","ElicitationCapabilitySchema","z.preprocess","z.optional","z.unknown","Base64Schema","z.iso.datetime","z.discriminatedUnion","node","ProtocolError","meta","issue","z.safeParse","z.toJSONSchema","members","z.email","z.url","z.iso.date","error","config","parse","string","_a","error","If","node","mergeValues","_a$1","anchor","ipv6","esc","parse","Ajv","meta","required","date","time","addFormats","_a","open","url","error","union","error","url","own","version","ProbeWindow","DefaultJsonSchemaValidator","config","error$1","url"],"sources":["../node_modules/zod/v4/core/util.js","../node_modules/zod/v4/core/core.js","../node_modules/zod/v4/core/errors.js","../node_modules/zod/v4/core/parse.js","../node_modules/zod/v4/core/regexes.js","../node_modules/zod/v4/core/checks.js","../node_modules/zod/v4/core/doc.js","../node_modules/zod/v4/core/versions.js","../node_modules/zod/v4/core/schemas.js","../node_modules/zod/v4/core/memoizer.js","../node_modules/zod/v4/locales/en.js","../node_modules/zod/v4/core/registries.js","../node_modules/zod/v4/core/api.js","../node_modules/zod/v4/core/to-json-schema.js","../node_modules/zod/v4/core/json-schema-processors.js","../node_modules/zod/v4/classic/errors.js","../node_modules/zod/v4/classic/parse.js","../node_modules/zod/v4/classic/schemas.js","../node_modules/zod/v4/classic/compat.js","../node_modules/zod/v4/classic/iso.js","../node_modules/zod/v4/classic/coerce.js","../node_modules/@modelcontextprotocol/core/dist/auth-CUe6YdwF.mjs","../node_modules/@modelcontextprotocol/client/dist/chunk-Br0eD_fh.mjs","../node_modules/@modelcontextprotocol/client/dist/dialects-BOhdv1Fc.mjs","../node_modules/@modelcontextprotocol/client/dist/src-D_zzAWoS.mjs","../node_modules/@modelcontextprotocol/client/dist/ajvProvider-97rDpkRx.mjs","../node_modules/@modelcontextprotocol/client/dist/shimsNode.mjs","../node_modules/pkce-challenge/dist/index.node.js","../node_modules/eventsource-parser/dist/index.js","../node_modules/@modelcontextprotocol/client/node_modules/eventsource/dist/index.js","../node_modules/eventsource-parser/dist/stream.js","../node_modules/@modelcontextprotocol/client/dist/index.mjs","../src/utils/normalizeUrl.ts"],"sourcesContent":["import { globalConfig } from \"./core.js\";\n// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function toZod() {\n return (schema) => schema;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const ratio = val / step;\n const roundedRatio = Math.round(ratio);\n // `val` and `step` each round to a double before the division rounds again, so a true decimal multiple's quotient can sit up to 1.5 of these scaled epsilons from the integer. A 1x tolerance therefore rejected 2.03 as a multiple of 0.07; 4x covers the worst case with margin.\n const tolerance = 4 * Number.EPSILON * Math.max(Math.abs(ratio), 1);\n if (Math.abs(ratio - roundedRatio) < tolerance)\n return 0;\n return ratio - roundedRatio;\n}\nconst EVALUATING = /* @__PURE__*/ Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = /* @__PURE__*/ cached(() => {\n // Skip the probe under `jitless`: strict CSPs report the caught `new Function` as a `securitypolicyviolation` even though the throw is swallowed.\n if (globalConfig.jitless) {\n return false;\n }\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n if (o instanceof Map)\n return new Map(o);\n if (o instanceof Set)\n return new Set(o);\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = /* @__PURE__*/ new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = /* @__PURE__*/ new Set([\n \"string\",\n \"number\",\n \"bigint\",\n \"boolean\",\n \"symbol\",\n \"undefined\",\n]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin !== undefined && shape[k]._zod.optout === \"optional\";\n });\n}\n// Wrapped in a `@__PURE__` IIFE: esbuild never tree-shakes a top-level initializer that contains a member access on `Number`, so the bare object literal survived into every bundle.\nexport const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n}))();\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n // `for...in` skips symbols, so a symbol in the mask would select nothing\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (!mask[key])\n continue;\n assignProp(newShape, key, currDef.shape[key]);\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape. Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key of Reflect.ownKeys(shape)) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n if (!b?._zod?.def) {\n throw new Error(\"Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.\");\n }\n if (a._zod.def.checks?.length) {\n throw new Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");\n }\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: b._zod.def.checks ?? [],\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask, name = \"partial\") {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(`.${name}() cannot be used on object schemas containing refinements`);\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.prototype.hasOwnProperty.call(oldShape, key)) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n // the spread copies symbol keys; `for...in` would not reach them\n for (const key of Reflect.ownKeys(oldShape)) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key of Reflect.ownKeys(mask)) {\n if (!Object.prototype.hasOwnProperty.call(shape, key)) {\n throw new Error(`Unrecognized key: \"${String(key)}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key of Reflect.ownKeys(oldShape)) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\n// Checks for explicit abort (continue === false), as opposed to implicit abort (continue === undefined). Used to respect `abort: true` in .refine() even for checks that have a `when` function.\nexport function explicitlyAborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue === false) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\n/* A check holds no link back to the schema it is attached to — the same check instance is shared by every clone of that schema — so the owner is stamped onto the issues a check just raised, at the only point where both are in scope. Runs on the failure path only; `start` is the issue count from before the check ran. */\nexport function attachSchema(issues, start, inst) {\n var _a;\n for (let i = start; i < issues.length; i++) {\n (_a = issues[i]).schema ?? (_a.schema = inst);\n }\n}\nexport function finalizeIssue(iss, ctx, config) {\n var _a;\n // A schema that raised an issue itself owns it outright, and outranks any stamp an enclosing check left in `attachSchema`. String formats and z.custom() are schema and check at once, so when they act as a check they defer to that stamp instead.\n const traits = iss.inst?._zod?.traits;\n if (traits?.has(\"$ZodType\")) {\n if (traits.has(\"$ZodCheck\"))\n (_a = iss).schema ?? (_a.schema = iss.inst);\n else\n iss.schema = iss.inst;\n }\n // Decreasing specificity, first map to return a message wins. `inst` is whatever raised the issue, so a check's own map outranks the owning schema's.\n const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : undefined;\n const message = iss.message\n ? iss.message\n : (unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(schemaError?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\");\n const { inst: _inst, schema: _schema, continue: _continue, input: _input, ...rest } = iss;\n rest.path ?? (rest.path = []);\n rest.message = message;\n if (ctx?.reportInput) {\n rest.input = _input;\n }\n return rest;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nconst highSurrogate = /[\\uD800-\\uDBFF]/;\n// Code points in `str`: a surrogate pair counts once, a lone surrogate as itself. Hand-rolled because the string iterator allocates and runs ~250x slower on this path; the regex probe exits ~50x quicker for a string with no astral characters.\nexport function codePointLength(str) {\n const units = str.length;\n if (!highSurrogate.test(str))\n return units;\n let count = units;\n for (let i = 0; i < units - 1; i++) {\n if ((str.charCodeAt(i) & 0xfc00) === 0xd800 && (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n count--;\n i++;\n }\n }\n return count;\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n////////// PROTOTYPE INSTALLERS //////////\n//\n// Members live on the prototype and materialize per instance on first read, which keeps own-property count under the step where V8 stops using inline slots. Changing anything here means re-measuring runtime, memory and bundle size together — see \"The three axes\" in AGENTS.md.\n/**\n * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working.\n *\n * Call this from a `proto` initializer, which runs once per prototype — never per instance.\n */\nexport function members(proto, table) {\n for (const key in table) {\n const desc = Object.getOwnPropertyDescriptor(table, key);\n // a getter installs as written, so it stays live: `description` reads through to the registry on every access. not enumerable: an object literal's is, and a prototype member never was\n if (desc.get)\n Object.defineProperty(proto, key, { ...desc, enumerable: false });\n // a method materializes bound on first read, which is what keeps a detached member working: `const opt = schema.optional; opt()`\n else\n defineBound(proto, key, desc.value);\n }\n}\n/** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */\nexport function own(inst, key, value, enumerable = true) {\n Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });\n return value;\n}\n/** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */\nexport function hide(inst, key, value) {\n return own(inst, key, value, false);\n}\nfunction defineBound(proto, key, fn) {\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // vitest's spyOn calls a prototype getter bare to find the function it wraps, so a nullish receiver answers the raw method\n return this == null ? fn : own(this, key, fn.bind(this));\n },\n set(value) {\n own(this, key, value);\n },\n });\n}\n/** Returns the prototype to install on, or `undefined` if this group is already installed on it. */\nfunction claim(inst, sentinel) {\n const proto = Object.getPrototypeOf(inst);\n // Runs on every construction, so `in` rather than the costlier `hasOwnProperty.call`. Sentinels are keys the group itself defines.\n return sentinel in proto ? undefined : proto;\n}\n// The internals whose init chain is installing. A second call for the same one is a derived constructor overriding its base, so it must not construct another schema in between or the override is dropped.\nlet installing;\n// Set while a getter is running, so a value that resolved through a recursion break is not memoized. One shared descriptor shadows the key for the duration, which costs no per-key allocation.\nlet broke = false;\nconst breaker = {\n configurable: true,\n get() {\n broke = true;\n return undefined;\n },\n};\n/**\n * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s\n * constructor, computed from the internals object itself and cached there on\n * first read. One accessor per constructor rather than one per instance.\n */\nexport function defineLazyInternal(inst, key, compute) {\n const proto = Object.getPrototypeOf(inst._zod);\n if (key in proto && installing !== inst._zod) {\n // A repeat construction: everything is installed already. Cleared here so the reference is not held past the first construction of every type.\n installing = undefined;\n return;\n }\n installing = inst._zod;\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // Shadowed before computing so a re-entrant read from a recursive schema resolves to undefined instead of running the getter again.\n Object.defineProperty(this, key, breaker);\n const outer = broke;\n broke = false;\n try {\n const value = compute(this);\n // A result that resolved through a recursion break is recomputed once the graph is complete; everything else memoizes, undefined included.\n if (broke)\n delete this[key];\n else\n Object.defineProperty(this, key, { configurable: true, writable: true, value });\n broke = broke || outer;\n return value;\n }\n catch (err) {\n // A compute that threw memoizes nothing, so a later read runs it again and fails the same way. The shadow goes with it, since leaving it installed would answer undefined for every later read.\n delete this[key];\n broke = broke || outer;\n throw err;\n }\n },\n set(value) {\n Object.defineProperty(this, key, { configurable: true, writable: true, value });\n },\n });\n}\n/**\n * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own\n * data property. One accessor per constructor rather than one per instance, because an own accessor\n * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel.\n */\nexport function installLazyProp(inst, key, make, enumerable) {\n const proto = claim(inst, key);\n if (!proto)\n return;\n Object.defineProperty(proto, key, {\n configurable: true,\n get() {\n // Shadowed before computing, so a re-entrant read from a self-referential shape resolves to undefined instead of running the getter again. A data property rather than an accessor: an own accessor is the dictionary-mode transition this exists to avoid.\n const desc = { configurable: true, writable: true, enumerable, value: undefined };\n Object.defineProperty(this, key, desc);\n // a compute that throws leaves the shadow behind, so later reads answer undefined instead of re-throwing; `defineLazy` did the same, and `defineLazyInternal`'s delete-on-catch would cost bytes in every bundle for a case only a throwing user getter reaches\n desc.value = make(this);\n Object.defineProperty(this, key, desc);\n return desc.value;\n },\n set(value) {\n Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value });\n },\n });\n}\n/** Marks the thunk `_catch` synthesises for a constant catch value. `Function.length` cannot tell that thunk from a user callback — rest and defaulted parameters both report arity 0 — and a user callback reads `ctx.error`, whose issues only finalize correctly against the caller's per-parse error map. Provenance can say what arity cannot. A plain string key rather than `Symbol.for`, whose call at module scope no bundler can prove pure — the same shape that anchored `urlCanParse` into every build. */\nexport const CONSTANT_CATCH = \"~constantCatch\";\n/** Wraps a constant catch value in a thunk tagged with {@link CONSTANT_CATCH}. */\nexport function constantCatch(value) {\n const fn = () => value;\n fn[CONSTANT_CATCH] = true;\n return fn;\n}\n","var _a;\nimport { members as installMembers } from \"./util.js\";\n/** A special constant with type `never` */\nexport const NEVER = /*@__PURE__*/ Object.freeze({\n status: \"aborted\",\n});\n/* Shared descriptor for installing `_zod`; defineProperty reads it\n * synchronously, so reusing one object avoids a per-instance allocation. */\nconst _zodDesc = { value: undefined, enumerable: false };\n// null where suppressing the capture would be unrecoverable: `parse()` puts the frames back with `captureStackTrace`, so without it the throw would lose its stack. also latched to null once `stackTraceLimit` proves unassignable, which a realm can do at any point by hardening Error\nlet _E = \"captureStackTrace\" in Error ? Error : null;\n// v8 captures a stack trace inside the Error constructor, which dominates a failed parse; costs only the frames, and parse() restores those. the constructor must RUN: Object.create is cheaper and passes instanceof, but Error.isError and util.types.isNativeError check an internal slot\nfunction newError(Definition) {\n const E = _E;\n if (E) {\n const saved = E.stackTraceLimit;\n if (typeof saved === \"number\") {\n try {\n E.stackTraceLimit = 0;\n }\n catch {\n _E = null;\n return new Definition();\n }\n try {\n return new Definition();\n }\n finally {\n E.stackTraceLimit = saved;\n }\n }\n }\n return new Definition();\n}\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, \n/** This trait's members, installed once on every prototype that composes it. They cannot be declared in the initializer above: that runs per instance, and the prototype is shared. */\nproto, params) {\n // Prototype for this constructor's `_zod` internals. Lazily-derived fields (`values`, `pattern`, `optin`, …) install here once rather than as an accessor on every instance.\n const zodProto = {};\n // Assigning the fields in the constructor body is what gives instances in-object slots; building the object literally and reparenting it costs a second allocation and a generic property copy.\n function Internals(def) {\n this.def = def;\n this.constr = _;\n this.traits = new Set();\n }\n Internals.prototype = zodProto;\n const protoMembers = proto;\n // One trait's members land on every prototype whose chain composes it, so the answer is per prototype rather than per trait.\n const initialized = protoMembers && new WeakSet();\n function init(inst, def) {\n if (!inst._zod) {\n _zodDesc.value = new Internals(def);\n try {\n Object.defineProperty(inst, \"_zod\", _zodDesc);\n }\n finally {\n // Cleared even on throw, so the shared descriptor never leaks one instance's internals into the next.\n _zodDesc.value = undefined;\n }\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n if (initialized) {\n // `super(def)` from a user subclass gives `this` a prototype the subclass owns, and installing there would overwrite whatever the subclass declared. `constr` built the instance, so its prototype is the one below the subclass's that should carry the members. A receiver whose chain never reaches that prototype installs on its own, which for a plain object handed straight to `init` means `Object.prototype` — unchanged from before.\n const own = Object.getPrototypeOf(inst);\n const ctorProto = inst._zod.constr.prototype;\n let up = own;\n while (up && up !== ctorProto)\n up = Object.getPrototypeOf(up);\n const target = up ?? own;\n if (!initialized.has(target)) {\n initialized.add(target);\n installMembers(target, protoMembers);\n }\n }\n // support prototype modifications; for-in avoids the array allocation of Object.keys on the (usually empty) prototype\n const proto = _.prototype;\n for (const k in proto) {\n if (!Object.prototype.hasOwnProperty.call(proto, k))\n continue;\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n const inst = params?.Parent ? newError(Definition) : this;\n init(inst, def);\n const deferred = inst._zod.deferred;\n if (deferred) {\n for (const fn of deferred) {\n fn();\n }\n // Released: initializers run once, and the list would otherwise be retained for the schema's lifetime.\n inst._zod.deferred = undefined;\n }\n // Global post-processor hook. Internal: installed by `import \"zod/compile\"` to enable AOT compilation for every constructed schema. Runs last, once the instance is fully built, because it hands the instance to compile(). The post-processor is expected to be reentrancy-guarded by its own implementation.\n const pp = globalThis.__zod_globalConfig?.postProcessor;\n if (pp)\n pp(inst);\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = /*@__PURE__*/ Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\n(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});\nexport const globalConfig = globalThis.__zod_globalConfig;\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n","import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\n/* Computing the message eagerly is expensive (pretty-printed JSON of all\n * issues), so defer it until first read. The accessor functions and\n * descriptors are shared across instances to keep error construction\n * cheap; the computed message is cached on the internals object. The\n * setter preserves plain assignment semantics for consumers that\n * overwrite `message`. */\nfunction _getMessage() {\n const internals = this._zod;\n internals.message ?? (internals.message = JSON.stringify(internals.def, util.jsonStringifyReplacer, 2));\n return internals.message;\n}\nfunction _setMessage(value) {\n this._zod.message = value;\n}\nconst _messageDesc = {\n get: _getMessage,\n set: _setMessage,\n enumerable: true,\n configurable: true,\n};\nconst _zodDesc = { value: undefined, enumerable: false };\nconst _issuesDesc = { value: undefined, enumerable: false };\n/* Prototypes that already carry the lazy `toString`. Seeded with the\n * intrinsics so that `init` on a foreign object — it accepts any object —\n * can never install an accessor onto a prototype we do not own. */\nconst _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n _zodDesc.value = inst._zod;\n Object.defineProperty(inst, \"_zod\", _zodDesc);\n _issuesDesc.value = def;\n Object.defineProperty(inst, \"issues\", _issuesDesc);\n // Clear the shared slots; a retained `value` pins the last error's issues.\n _zodDesc.value = undefined;\n _issuesDesc.value = undefined;\n Object.defineProperty(inst, \"message\", _messageDesc);\n /* `toString` lives as a non-enumerable lazy getter on the shared\n * prototype; on first access it caches a per-instance closure so\n * detached usage still works. */\n const proto = Object.getPrototypeOf(inst);\n if (!_installedToString.has(proto)) {\n _installedToString.add(proto);\n Object.defineProperty(proto, \"toString\", {\n configurable: true,\n enumerable: false,\n get() {\n const value = () => this.message;\n Object.defineProperty(this, \"toString\", { value, configurable: true, writable: true });\n return value;\n },\n set(value) {\n Object.defineProperty(this, \"toString\", { value, configurable: true, writable: true });\n },\n });\n }\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, undefined, {\n Parent: Error,\n});\n/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member\n * (\"toString\", \"constructor\") would otherwise read through to the prototype, and assigning\n * \"__proto__\" would hit the setter instead of creating a key. */\nfunction node(obj, key, make) {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n if (key === \"__proto__\") {\n Object.defineProperty(obj, key, { value: make(), writable: true, enumerable: true, configurable: true });\n }\n else {\n obj[key] = make();\n }\n }\n return obj[key];\n}\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n node(fieldErrors, sub.path[0], () => []).push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error, path = []) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n // `_errors` is reserved by this legacy format, so merge a matching path segment into the current node instead of treating its array as a child.\n if (el === \"_errors\") {\n if (terminal)\n curr._errors.push(mapper(issue));\n i++;\n continue;\n }\n // A path element may collide with an inherited property name such as\n // \"__proto__\" or \"constructor\". Truthiness checks read the prototype\n // (so no node is created, then ._errors.push throws), and bracket\n // assignment of \"__proto__\" hits the setter instead of creating an\n // own key. Guard the read with hasOwnProperty and create the node\n // with defineProperty so any path element becomes a real own key.\n if (!Object.prototype.hasOwnProperty.call(curr, el)) {\n Object.defineProperty(curr, el, {\n value: { _errors: [] },\n enumerable: true,\n writable: true,\n configurable: true,\n });\n }\n const node = curr[el];\n if (terminal) {\n node._errors.push(mapper(issue));\n }\n curr = node;\n i++;\n }\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n // el may collide with an inherited property name (\"__proto__\",\n // \"constructor\", ...); ??= reads the prototype so the node is never\n // created and curr.errors.push throws. Guard with hasOwnProperty and\n // create the node with defineProperty so \"__proto__\" becomes a real\n // own key rather than invoking the prototype setter.\n if (!Object.prototype.hasOwnProperty.call(curr.properties, el)) {\n Object.defineProperty(curr.properties, el, {\n value: { errors: [] },\n enumerable: true,\n writable: true,\n configurable: true,\n });\n }\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_a = curr.items)[el] ?? (_a[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n","import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\n// Always both keys, so the `_params` read site in `_parse` sees one object shape rather than two.\nfunction finalizeParams(callee, params) {\n return { callee: params?.callee ?? callee, Err: params?.Err };\n}\nexport const _parse = (_Err) => {\n const fn = (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee ?? fn);\n throw e;\n }\n return result.value;\n };\n return fn;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => {\n const fn = async (schema, value, _ctx, params) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee ?? fn);\n throw e;\n }\n return result.value;\n };\n return fn;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\n// registry mirrors of the compiler's sentinels, so this module never imports the compiler\nconst COMPILE_INVALID = /* @__PURE__ */ Symbol.for(\"zod.compile.invalid\");\nconst COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for(\"zod.compile.fallback\");\n// Deliberately tiny, because v8 will not inline a body carrying the fallback's object literals and throw. Everything that is not the compiled happy path lives in validateFallback, and that split is worth ~35% on a compiled schema.\nexport const validate = ((schema, value, _ctx) => {\n const validator = schema._zod.bag.validator;\n if (validator !== undefined && validator(value) !== COMPILE_INVALID)\n return true;\n return validateFallback(schema, value, _ctx);\n});\nfunction validateFallback(schema, value, _ctx) {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const fallbackRun = schema._zod.bag.fallbackRun;\n let result;\n if (fallbackRun) {\n // skip nested fast paths on the fallback, so user callbacks keep the at-most-twice bound\n ctx[COMPILE_FALLBACK] = true;\n result = fallbackRun({ value, issues: [] }, ctx);\n }\n else {\n result = schema._zod.run({ value, issues: [] }, ctx);\n }\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length === 0;\n}\n// no fast path: the compiler keeps async parses on the runtime, because a promise-returning callback that is not declared async compiles to a throw\nexport const validateAsync = async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length === 0;\n};\nexport const _encode = (_Err) => {\n const parse = _parse(_Err);\n const fn = (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return parse(schema, value, ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => {\n const parse = _parse(_Err);\n const fn = (schema, value, _ctx, _params) => {\n return parse(schema, value, _ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => {\n const parseAsync = _parseAsync(_Err);\n const fn = async (schema, value, _ctx, _params) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return (await parseAsync(schema, value, ctx, finalizeParams(fn, _params)));\n };\n return fn;\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => {\n const parseAsync = _parseAsync(_Err);\n const fn = async (schema, value, _ctx, _params) => {\n return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));\n };\n return fn;\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n","import * as util from \"./util.js\";\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const cuid = /^[cC][0-9a-z]{6,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\nexport function nanoidOfLength(length) {\n return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);\n}\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([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})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n 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)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\n// Single character class, not an alternation: the two properties overlap (U+1F9B0-U+1F9B3), so `(A|B)+` backtracks exponentially on a failed match.\nconst _emoji = `^[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?: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])$/;\nexport const ipv6 = /^(([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}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((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])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}$/;\nexport const httpProtocol = /^https?$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces) E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// Credit card shape: 12–19 digits, optionally separated by single spaces or single hyphens. ISO/IEC 7812 caps the PAN at 19 digits; 12 is the shortest issued length (Maestro).\nexport const creditCard = /^\\d(?:[ -]?\\d){11,18}$/;\nconst dateSource = `(?:(?:\\\\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])))`;\n/** Anchors a pattern source. The interpolation lives here rather than at the call site because\n * esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it\n * will drop `anchor(dateSource)`. Keeping it inline pinned `date` into every bundle. */\nfunction anchor(source) {\n return new RegExp(`^${source}$`);\n}\nexport const date = /*@__PURE__*/ anchor(dateSource);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : args.seconds\n ? `${hhmm}:[0-5]\\\\d(?:\\\\.\\\\d+)?`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const opts = [\"Z\"];\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n // RFC 3339 mandates seconds wherever the time carries a `Z` or an offset, so only the unqualified form `local` adds may omit them\n const qualified = `${timeSource({ precision: args.precision, seconds: true })}(?:${opts.join(\"|\")})`;\n const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n","// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\n/** Default `when` for size-based checks: run only on non-nullish values with a `size`. */\nconst _whenHasSize = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n};\n/** Default `when` for length-based checks: run only on non-nullish values with a `length`. */\nconst _whenHasLength = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n};\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin: numericOriginMap[typeof payload.value] ?? origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin: numericOriginMap[typeof payload.value] ?? origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? // `value % 0n` throws, and nothing is a multiple of zero — the number branch already fails this way via NaN\n def.value !== BigInt(0) && payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // Strings are measured in Unicode code points, not UTF-16 units. A code point is at most two units, so a string that already fits in units fits in code points; only an overflow has to be counted.\n const length = typeof input === \"string\" && units > def.maximum ? util.codePointLength(input) : units;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // A code point is one or two UTF-16 units, so fewer units than the floor can never reach it and twice the floor always clears it. Only in between is the exact count in doubt.\n const length = typeof input === \"string\" && units >= def.minimum && units < def.minimum * 2\n ? util.codePointLength(input)\n : units;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const units = input.length;\n // A code point is one or two UTF-16 units, so outside `[length, length * 2]` units the target is missed either way — and missed in the same direction in both measures.\n const length = typeof input === \"string\" && units >= def.length && units <= def.length * 2\n ? util.codePointLength(input)\n : units;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n // `String.prototype.includes(sub, position)` matches `sub` at `position`\n // OR LATER, so the pattern must allow at least `position` leading chars\n // (`{N,}`), not exactly `position` chars (`{N}`).\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n","export class Doc {\n constructor(args = [], closed = {}) {\n this.content = [];\n this.indent = 0;\n this.args = args;\n this.closed = closed;\n }\n indented(fn) {\n this.indent += 1;\n fn(this);\n this.indent -= 1;\n }\n write(arg) {\n if (typeof arg === \"function\") {\n arg(this, { execution: \"sync\" });\n arg(this, { execution: \"async\" });\n return;\n }\n const content = arg;\n const lines = content.split(\"\\n\").filter((x) => x);\n const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n for (const line of dedented) {\n this.content.push(line);\n }\n }\n compile() {\n const F = Function;\n const content = this?.content ?? [``];\n const factory = new F(...Object.keys(this.closed), `return function (${this.args.join(\", \")}) {\\n${content.join(\"\\n\")}\\n};`);\n return factory(...Object.values(this.closed));\n }\n}\n","export const version = {\n major: 4,\n minor: 5,\n patch: 4,\n};\n","import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const defChecks = inst._zod.def.checks;\n // if inst is itself a checks.$ZodCheck, run it as a check\n const checks = inst._zod.traits.has(\"$ZodCheck\")\n ? [inst, ...(defChecks ?? [])]\n : defChecks?.length\n ? [...defChecks]\n : [];\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n if (payload.memo)\n return payload;\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n if (util.explicitlyAborted(payload))\n continue;\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n util.attachSchema(payload.issues, currLen, inst);\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n util.attachSchema(payload.issues, currLen, inst);\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n}, {\n // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.\n get \"~standard\"() {\n return util.hide(this, \"~standard\", standardProps(this));\n },\n set \"~standard\"(value) {\n util.own(this, \"~standard\", value);\n },\n});\n/** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */\nconst toStandardResult = (r) => r.success ? { value: r.data } : { issues: r.error?.issues };\nexport function standardProps(inst) {\n return {\n validate: (value) => {\n try {\n return toStandardResult(safeParse(inst, value));\n }\n catch (_) {\n return safeParseAsync(inst, value).then(toStandardResult);\n }\n },\n vendor: \"zod\",\n version: 1,\n };\n}\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\n/** The `://` guard rejected the input before the URL constructor saw it. */\nexport const URL_BAD_FORMAT = 1;\n/** The URL constructor rejected the input. */\nexport const URL_UNPARSEABLE = 2;\n/** Parses a URL for `$ZodURL`, applying the one guard the URL constructor cannot express. Returns the parsed URL, or a code naming the stage that rejected it — the runtime needs that distinction to pick an issue note, and compiled code only needs to know it is not a URL. */\nexport function parseURLObject(trimmed, def) {\n // When normalize is off, require :// for http/https URLs. This prevents strings like \"http:example.com\" or \"https:/path\" from being silently accepted\n if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source && !/^https?:\\/\\//i.test(trimmed)) {\n return URL_BAD_FORMAT;\n }\n try {\n // @ts-ignore\n return new URL(trimmed);\n }\n catch {\n return URL_UNPARSEABLE;\n }\n}\nconst asciiTabOrNewline = /[\\t\\n\\r]/g;\n/** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL(\"https://exa\\nmple.com\")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */\nexport function stripTabAndNewline(value) {\n return value.replace(asciiTabOrNewline, \"\");\n}\nexport function urlHostnameOk(url, hostname) {\n hostname.lastIndex = 0;\n return hostname.test(url.hostname);\n}\nexport function urlProtocolOk(url, protocol) {\n protocol.lastIndex = 0;\n return protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol);\n}\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n const url = parseURLObject(trimmed, def);\n if (url === URL_BAD_FORMAT) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid URL format\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n return;\n }\n if (url === URL_UNPARSEABLE) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n return;\n }\n if (def.hostname && !urlHostnameOk(url, def.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n if (def.protocol && !urlProtocolOk(url, def.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n // Set the output value based on normalize flag\n payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n if (def.length !== undefined && (!Number.isInteger(def.length) || def.length < 1))\n throw new Error(`Invalid nanoid length: ${def.length}`);\n def.pattern ?? (def.pattern = def.length === undefined ? regexes.nanoid : regexes.nanoidOfLength(def.length));\n $ZodStringFormat.init(inst, def);\n});\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n // these two drop the offset or seconds `date-time` requires — on the bag not the def, since `z.string().check(...)` lands the format on a different schema\n if (def.local || def.precision === -1) {\n inst._zod.bag.laxFormat = true;\n inst._zod.onattach.push((s) => {\n s._zod.bag.laxFormat = true;\n });\n }\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\n/** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL(\"http://[...]\")` parses an authority, not an address, so `@` and `\\` re-delimit it and `\"::@1\\\\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `\"::1\\n\"` validated as `::1`. */\nconst ipv6Alphabet = /^[0-9a-fA-F:.]+$/;\nexport function isValidIPv6(value) {\n if (!ipv6Alphabet.test(value))\n return false;\n try {\n // @ts-ignore\n new URL(`http://[${value}]`);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n if (!isValidIPv6(payload.value)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport function isValidCIDRv6(value) {\n const parts = value.split(\"/\");\n if (parts.length !== 2)\n return false;\n const [address, prefix] = parts;\n if (!prefix)\n return false;\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n return false;\n if (prefixNum < 0 || prefixNum > 128)\n return false;\n return isValidIPv6(address);\n}\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (!isValidCIDRv6(payload.value)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n // atob ignores whitespace, so reject it up front.\n if (/\\s/.test(data))\n return false;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodCreditCard //////////////////////////////\nconst CC_SANITIZE = /[- ]/g;\n/** Luhn checksum on a digit-only string. Adapted from valibot (MIT). */\nfunction isLuhnAlgo(digits) {\n let length = digits.length;\n let bit = 1;\n let sum = 0;\n while (length) {\n const value = +digits[--length];\n bit ^= 1;\n sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;\n }\n return sum % 10 === 0;\n}\nexport function isValidCreditCard(input) {\n if (!regexes.creditCard.test(input))\n return false;\n return isLuhnAlgo(input.replace(CC_SANITIZE, \"\"));\n}\nexport const $ZodCreditCard = /*@__PURE__*/ core.$constructor(\"$ZodCreditCard\", (inst, def) => {\n // Shape only — the Luhn check below is not expressible as a pattern, so consumers of `pattern` (JSON Schema, template literals) get the length and separator rules alone.\n def.pattern ?? (def.pattern = regexes.creditCard);\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidCreditCard(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"credit_card\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? String(input)\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, optin, optout) {\n const isPresent = key in input;\n const isOptionalOut = optout === \"optional\";\n // The middle rung means \"absence permitted, nothing supplied in its place\", so an absent key contributes nothing — whatever the schema made of `undefined` is invented, not substituted. Only `optional` reaches this with a value: `defaulted` substitutes, and a schema that isn't optional-out has to keep the key.\n if (!isPresent && isOptionalOut && optin === \"optional\") {\n return;\n }\n if (result.issues.length) {\n // For optional-in/out schemas, ignore errors on absent keys.\n if (optin !== undefined && isOptionalOut && !isPresent) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (!isPresent && optin === undefined) {\n if (!result.issues.length) {\n final.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [key],\n });\n }\n return;\n }\n if (result.value === undefined) {\n if (isPresent) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\n// one shared instance; a fresh [] per schema cost 56 bytes retained\nconst NO_SYMBOL_KEYS = [];\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n const ownSymbols = Object.getOwnPropertySymbols(def.shape);\n const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS;\n // aliases `keys` when there are no symbols, so a string-only shape keeps one array\n const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys;\n for (const k of allKeys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${String(k)}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n allKeys,\n symbolKeys,\n // string-only: handleCatchall matches it against `for...in`, which never yields a symbol\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const optin = _catchall.optin;\n const optout = _catchall.optout;\n for (const key in input) {\n // Must precede the __proto__ branch: a declared key is not unrecognized, even though the shape loop deliberately strips __proto__ from the parsed output.\n if (keySet.has(key))\n continue;\n // Don't copy an undeclared __proto__ into the result; assignment to a plain {} would replace the result prototype. But in strict mode it is still an unknown key, so report it before skipping.\n if (key === \"__proto__\") {\n if (t === \"never\")\n unrecognized.push(key);\n continue;\n }\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));\n }\n else {\n handlePropertyResult(r, payload, key, input, optin, optout);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.\n continue: true,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\n// Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it. Keyed by def, so a def rebuilt by a builder is simply absent rather than inheriting the source's. Read its keys with `Object.keys`, which does not invoke them — that is what lets a discriminated union check its discriminator without resolving an option whose getters reference the union being constructed.\nconst propShapes = new WeakMap();\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n propShapes.set(def, sh);\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n propShapes.set(def, newSh);\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazyInternal(inst, \"propValues\", (zod) => {\n const shape = zod.def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n if (!Object.prototype.hasOwnProperty.call(propValues, key)) {\n util.assignProp(propValues, key, new Set());\n }\n for (const v of field.values)\n propValues[key].add(v);\n // An omittable slot reads back as undefined at a discriminator lookup, so it has to claim undefined: two options that can both omit the key are not discriminable on it.\n if (field.optin !== undefined)\n propValues[key].add(undefined);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.allKeys) {\n if (key === \"__proto__\")\n continue;\n const el = shape[key];\n const optin = el._zod.optin;\n const optout = el._zod.optout;\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));\n }\n else {\n handlePropertyResult(r, payload, key, input, optin, optout);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const memo = core.globalConfig.memoizer;\n const generateFastpass = (shape) => {\n const normalized = _normalized.value;\n const syms = normalized.symbolKeys;\n // a symbol has no source literal, so it is read as `syms[i]` off the closed-over scope\n const doc = new Doc([\"payload\", \"ctx\"], { shape, inst, memo, syms });\n const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n // Prefixes in place, like util.prefixIssues does for every interpreted path.\n const prefixStr = (id, k) => `\n for (let i = 0; i < ${id}.issues.length; i++) {\n const iss = ${id}.issues[i];\n iss.path = iss.path ? [${k}, ...iss.path] : [${k}];\n payload.issues.push(iss);\n }`;\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.allKeys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);\n for (const key of normalized.allKeys) {\n if (key === \"__proto__\")\n continue;\n const id = ids[key];\n const k = typeof key === \"symbol\" ? `syms[${syms.indexOf(key)}]` : util.esc(key);\n const isPresent = `${k} in input`;\n const schema = shape[key];\n const optin = schema?._zod?.optin;\n const isOptionalIn = optin !== undefined;\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(k)};`);\n if (isOptionalIn && isOptionalOut) {\n // For optional-in/out schemas, ignore errors on absent keys — and, like the interpreted path, drop the value produced alongside them. The middle rung goes further: it permits absence without supplying anything in its place, so an absent key contributes nothing at all.\n const assign = optin === \"optional\" ? `${id}_present` : `${id}.value !== undefined || ${id}_present`;\n doc.write(`\n const ${id}_present = ${isPresent};\n if (!${id}.issues.length || ${id}_present) {\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n\n if (${assign}) {\n newResult[${k}] = ${id}.value;\n }\n }\n\n `);\n }\n else if (!isOptionalIn) {\n doc.write(`\n const ${id}_present = ${isPresent};\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n if (!${id}_present && !${id}.issues.length) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: undefined,\n path: [${k}]\n });\n }\n\n if (${id}_present) {\n newResult[${k}] = ${id}.value;\n }\n\n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {${prefixStr(id, k)}\n }\n \n if (${id}.value === undefined) {\n if (${isPresent}) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n\n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n // closing `shape` in is what pays: turbofan specializes the parser against that one shape object, so every `shape[k]._zod.run` folds to a known callee. as a parameter it stays a generic load and measures 13% slower even with the forwarding frame gone\n return doc.compile();\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.options.some((o) => o._zod.optin === \"defaulted\")\n ? \"defaulted\"\n : zod.def.options.some((o) => o._zod.optin !== undefined)\n ? \"optional\"\n : undefined);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazyInternal(inst, \"values\", (zod) => {\n if (zod.def.options.every((o) => o._zod.values)) {\n return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n if (zod.def.options.every((o) => o._zod.pattern)) {\n const patterns = zod.def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n inst._zod.parse = (payload, ctx) => {\n if (first) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const matches = [];\n for (let i = 0; i < results.length; i++) {\n if (results[i].issues.length === 0)\n matches.push(i);\n }\n if (matches.length === 1) {\n final.value = results[matches[0]].value;\n return final;\n }\n if (matches.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n matches,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n inst._zod.parse = (payload, ctx) => {\n if (first) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\n/** Returns the option of `union` whose discriminator claims `value`. */\nexport function getDiscriminatedOption(union, value) {\n const internals = union._zod;\n let map = internals.bag.optionsMap;\n if (!map) {\n map = new Map();\n const { options, discriminator } = internals.def;\n for (const option of options) {\n // First declaration wins, matching the order the parse path resolves a duplicate in.\n for (const v of option._zod.propValues?.[discriminator] ?? [])\n if (!map.has(v))\n map.set(v, option);\n }\n internals.bag.optionsMap = map;\n }\n return map.get(value);\n}\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazyInternal(inst, \"propValues\", (zod) => {\n const propValues = {};\n for (const option of zod.def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${zod.def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!Object.prototype.hasOwnProperty.call(propValues, k)) {\n util.assignProp(propValues, k, new Set());\n }\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n // Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes, lazies, and objects rebuilt by a builder such as `.extend()` — are left to the map.\n def.options.forEach((option, i) => {\n const propShape = propShapes.get(option._zod.def);\n if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {\n throw new Error(`Invalid discriminated union option at index \"${i}\"`);\n }\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n // Fall back to union matching when the fast discriminator path fails:\n // - explicitly enabled via unionFallback, or\n // - during backward direction (encode), since codec-based discriminators have different values in forward vs backward directions\n if (def.unionFallback || ctx.direction === \"backward\") {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n options: Array.from(disc.value.keys()),\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nexport function mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n if (Object.prototype.hasOwnProperty.call(newObj, \"__proto__\"))\n delete newObj.__proto__;\n for (const key of sharedKeys) {\n if (key === \"__proto__\")\n continue;\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) reject each key. A key rejection is reported only when BOTH sides reject it, so a key owned by one branch survives the other's key schema. strictObject reports these as unrecognized_keys; a record with an open key schema reports one invalid_key per key.\n const unrecKeys = new Map();\n let unrecIssue;\n const keyIssues = new Map();\n const collect = (iss, side) => {\n let keys;\n if (iss.code === \"unrecognized_keys\" && !iss.path?.length) {\n unrecIssue ?? (unrecIssue = iss);\n keys = iss.keys;\n }\n else if (iss.code === \"invalid_key\" && iss.origin === \"record\" && iss.path?.length === 1) {\n const k = String(iss.path[0]);\n if (!keyIssues.has(k))\n keyIssues.set(k, iss);\n keys = [k];\n }\n else {\n return false;\n }\n for (const k of keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k)[side] = true;\n }\n return true;\n };\n for (const iss of left.issues) {\n if (!collect(iss, \"l\"))\n result.issues.push(iss);\n }\n for (const iss of right.issues) {\n if (!collect(iss, \"r\"))\n result.issues.push(iss);\n }\n // Report only keys rejected by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length) {\n const aggregated = unrecIssue ? bothKeys.filter((k) => unrecIssue.keys.includes(k)) : [];\n if (aggregated.length)\n result.issues.push({ ...unrecIssue, keys: aggregated });\n for (const k of bothKeys) {\n if (!aggregated.includes(k) && keyIssues.has(k))\n result.issues.push(keyIssues.get(k));\n }\n }\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n if (util.aborted(result))\n return result;\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];\n const proms = [];\n const optinStart = getTupleOptStart(items, \"optin\");\n const optoutStart = getTupleOptStart(items, \"optout\");\n if (!def.rest) {\n if (input.length < optinStart) {\n payload.issues.push({\n code: \"too_small\",\n minimum: optinStart,\n inclusive: true,\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n if (input.length > items.length) {\n payload.issues.push({\n code: \"too_big\",\n maximum: items.length,\n inclusive: true,\n input,\n inst,\n origin: \"array\",\n });\n }\n }\n // Run every item in parallel, collecting results into an indexed array. The post-processing in `handleTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.\n const itemResults = new Array(items.length);\n for (let i = 0; i < items.length; i++) {\n const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((rr) => {\n itemResults[i] = rr;\n }));\n }\n else {\n itemResults[i] = r;\n }\n }\n if (def.rest) {\n let i = items.length - 1;\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({ value: el, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((r) => handleTupleResult(r, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));\n }\n return handleTupleResults(itemResults, payload, items, input, optoutStart);\n };\n});\nfunction getTupleOptStart(items, key) {\n for (let i = items.length - 1; i >= 0; i--) {\n // optin is a three-rung ladder so any rung above `undefined` permits an absent slot; optout stays two-valued.\n const omittable = key === \"optin\" ? items[i]._zod.optin !== undefined : items[i]._zod.optout === \"optional\";\n if (!omittable)\n return i + 1;\n }\n return 0;\n}\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nfunction handleTupleResults(itemResults, final, items, input, optoutStart) {\n // Walk results in order. Mirror $ZodObject's swallow-on-absent-optional rule, but only after `optoutStart`: the first index where the output tuple tail can be absent.\n for (let i = 0; i < items.length; i++) {\n const r = itemResults[i];\n const isPresent = i < input.length;\n // The array analog of `handlePropertyResult`'s absent-key early return: the middle rung permits absence without supplying anything in its place, so the tail truncates here instead of materializing whatever the item made of `undefined`.\n if (!isPresent && i >= optoutStart && items[i]._zod.optin === \"optional\") {\n final.value.length = i;\n break;\n }\n if (r.issues.length) {\n if (!isPresent && i >= optoutStart) {\n final.value.length = i;\n break;\n }\n final.issues.push(...util.prefixIssues(i, r.issues));\n }\n final.value[i] = r.value;\n }\n // Drop trailing slots that produced `undefined` for absent input\n // (the array analog of an absent optional key on an object). The\n // `i >= input.length` floor is critical: an explicit `undefined`\n // *inside* the input must be preserved even when the schema is\n // optional-out (e.g. `z.string().or(z.undefined())` accepting an\n // explicit undefined value).\n for (let i = final.value.length - 1; i >= input.length; i--) {\n if (items[i]._zod.optout === \"optional\" && final.value[i] === undefined) {\n final.value.length = i;\n }\n else {\n break;\n }\n }\n return final;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values && !def.partial) {\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n // A declared __proto__ is stripped but is not an unrecognized key.\n if (key === \"__proto__\")\n continue;\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (keyResult.issues.length) {\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n continue;\n }\n const outKey = keyResult.value;\n if (outKey === \"__proto__\")\n continue;\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n if (def.mode === \"loose\") {\n // skip __proto__ so it can't replace the result prototype via the assignment setter on the plain {} we build into\n if (key === \"__proto__\")\n continue;\n payload.value[key] = input[key];\n }\n else {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n continue: true,\n });\n }\n }\n else {\n payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n // An enumerable key schema declares which keys the record owns, so a key outside the set is unrecognized. A non-enumerable one (regex, refine) is a constraint every key must satisfy, so a failing key is invalid. Only the former is reconcilable against the other side of an intersection.\n let unrecognized;\n // Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n if (!Object.prototype.propertyIsEnumerable.call(input, key))\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key). This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else if (values) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n // the guard above tests the raw input key, but the key schema can normalize an ordinary key into __proto__; re-check the key we actually write under\n const outKey = keyResult.value;\n if (outKey === \"__proto__\")\n continue;\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[outKey] = result.value;\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n continue: true,\n });\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = memo ? memo.alloc(inst, payload, new Map(), ctx) : new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n const memo = core.globalConfig.memoizer;\n memo?.attach(inst);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = memo ? memo.alloc(inst, payload, new Set(), ctx) : new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n const patternValues = values.filter((k) => util.propertyKeyTypes.has(typeof k));\n // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches \"\"\n inst._zod.pattern = new RegExp(patternValues.length ? `^(${patternValues.map((o) => util.escapeRegex(o.toString())).join(\"|\")})$` : \"^[^\\\\s\\\\S]$\");\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = new Set(def.values);\n inst._zod.values = values;\n // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches \"\"\n inst._zod.pattern = new RegExp(def.values.length\n ? `^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`\n : \"^[^\\\\s\\\\S]$\");\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n core.globalConfig.memoizer?.guard(inst);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(payload, result) {\n // A substituting schema that still failed has no usable answer; yield undefined. Its issues are simply dropped: it ran on a payload of its own, so there is no shared array to truncate and nothing of the caller's to lose with it.\n payload.value = result.issues.length ? undefined : result.value;\n return payload;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n // .optional() propagates absence rather than substituting for it, so a defaulted inner keeps its rung.\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin === \"defaulted\" ? \"defaulted\" : \"optional\");\n inst._zod.optout = \"optional\";\n util.defineLazyInternal(inst, \"values\", (zod) => {\n const values = zod.def.innerType._zod.values;\n return values ? new Set([...values, undefined]) : undefined;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n const pattern = zod.def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (payload.value === undefined) {\n // Only the top rung substitutes a value for absence; everything else leaves it intact, which is what .optional() means.\n if (def.innerType._zod.optin !== \"defaulted\")\n return payload;\n // Its own payload, for the same reason $ZodCatch gets one: a pipe forwards an unrecognized key through the caller's issues array, and this must not read that as the substituting schema failing and drop it.\n const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);\n if (result instanceof Promise)\n return result.then((result) => handleOptionalResult(payload, result));\n return handleOptionalResult(payload, result);\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n util.defineLazyInternal(inst, \"pattern\", (zod) => zod.def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType._zod.optout);\n util.defineLazyInternal(inst, \"pattern\", (zod) => {\n const pattern = zod.def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazyInternal(inst, \"values\", (zod) => {\n return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"defaulted\";\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"defaulted\";\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => {\n const v = zod.def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nfunction handleCatchResult(payload, result, def, ctx) {\n if (!result.issues.length) {\n payload.value = result.value;\n // The value carries up, so the flag describing it has to carry with it: a back-edge into a node still being parsed must not be frozen by an enclosing readonly, and its checks belong to the node itself. Guarded so the ordinary case adds no own property.\n if (result.memo)\n payload.memo = true;\n return payload;\n }\n // Spread the inner's own payload, not ours: `value` has to stay the input the catch was handed, and the inner ran on a payload of its own so its issues are already private to this call.\n payload.value = def.catchValue({\n ...result,\n value: payload.value,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n return payload;\n}\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin === \"defaulted\" ? \"defaulted\" : \"optional\");\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType._zod.optout);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleCatchResult(payload, result, def, ctx));\n }\n return handleCatchResult(payload, result, def, ctx);\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.in._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.in._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.out._zod.optout);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n // Any issue stops the pipe, so a failing refinement never feeds its transform. An unrecognized key is the exception: it describes the input's extra properties, not the value being piped, and an enclosing intersection may yet reconcile it.\n if (left.issues.some((iss) => iss.code !== \"unrecognized_keys\")) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.in._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.in._zod.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.out._zod.optout);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodPreprocess = /*@__PURE__*/ core.$constructor(\"$ZodPreprocess\", (inst, def) => {\n $ZodPipe.init(inst, def);\n});\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.innerType._zod.propValues);\n util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType?._zod?.optin);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n // A repeat visit hands back a node that is still being built; freezing it here would make the rest of its keys fail to assign.\n if (!payload.memo)\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n // Defined, not assigned: the classic prototype exposes `_def` as a getter with no setter.\n Object.defineProperty(inst, \"_def\", { value: def });\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n // Defined inline so the closure stays anonymous: binding it to a `const` first names it, which costs 256 bytes per implemented function.\n return Object.defineProperty(function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n }, \"_zod\", { value: inst._zod, enumerable: false });\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return Object.defineProperty(async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n }, \"_zod\", { value: inst._zod, enumerable: false });\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // Cache the resolved inner type on the shared `def` so all clones of this lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance, preserving identity for cycle detection on recursive schemas.\n util.defineLazy(inst._zod, \"innerType\", () => {\n const d = def;\n if (!d._cachedInner)\n d._cachedInner = def.getter();\n return d._cachedInner;\n });\n util.defineLazyInternal(inst, \"pattern\", (zod) => zod.innerType?._zod?.pattern);\n util.defineLazyInternal(inst, \"propValues\", (zod) => zod.innerType?._zod?.propValues);\n util.defineLazyInternal(inst, \"optin\", (zod) => zod.innerType?._zod?.optin ?? undefined);\n util.defineLazyInternal(inst, \"optout\", (zod) => zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n","export class $ZodCyclicError extends Error {\n constructor() {\n super(`Cannot parse a reference cycle that closes through a transform`);\n this.name = \"ZodCyclicError\";\n }\n}\n/** Keyed off the context object every schema in one parse call already shares. */\nconst STATE = \"~memo\";\nconst NO_ISSUES = [];\n// Receivers prefix paths in place, so the cache and every hand-out need their own copies.\nfunction cloneIssues(issues) {\n return issues.map((iss) => (iss.path ? { ...iss, path: iss.path.slice() } : { ...iss }));\n}\nconst recursive = /*@__PURE__*/ new WeakMap();\n/** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */\nfunction isRecursive(inst, stack) {\n const cached = recursive.get(inst);\n if (cached !== undefined)\n return cached;\n // Relative to the walk in progress, so not cached.\n if (stack.has(inst))\n return true;\n stack.add(inst);\n let result = false;\n const check = (child) => {\n if (!result && child?._zod && isRecursive(child, stack))\n result = true;\n };\n const def = inst._zod.def;\n const kind = def.type;\n switch (kind) {\n case \"object\": {\n // `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen\n for (const key of Reflect.ownKeys(def.shape))\n check(def.shape[key]);\n check(def.catchall);\n break;\n }\n case \"array\":\n check(def.element);\n break;\n case \"tuple\":\n for (const el of def.items)\n check(el);\n check(def.rest);\n break;\n case \"record\":\n case \"map\":\n check(def.keyType);\n check(def.valueType);\n break;\n case \"set\":\n check(def.valueType);\n break;\n case \"union\":\n for (const el of def.options)\n check(el);\n break;\n case \"intersection\":\n check(def.left);\n check(def.right);\n break;\n case \"optional\":\n case \"nullable\":\n case \"default\":\n case \"prefault\":\n case \"catch\":\n case \"readonly\":\n case \"nonoptional\":\n case \"promise\":\n case \"success\":\n check(def.innerType);\n break;\n case \"pipe\":\n check(def.in);\n check(def.out);\n break;\n case \"function\":\n check(def.input);\n check(def.output);\n break;\n // reading `_zod.innerType` resolves the getter once and caches it\n case \"lazy\":\n check(inst._zod.innerType);\n break;\n // a leaf by choice: `parts` are regex fragments, not data positions\n case \"template_literal\":\n // leaves\n case \"string\":\n case \"number\":\n case \"int\":\n case \"boolean\":\n case \"bigint\":\n case \"symbol\":\n case \"undefined\":\n case \"null\":\n case \"void\":\n case \"never\":\n case \"any\":\n case \"unknown\":\n case \"date\":\n case \"nan\":\n case \"enum\":\n case \"literal\":\n case \"file\":\n case \"transform\":\n case \"custom\":\n break;\n default: {\n // a new built-in kind becomes a compile error here\n kind;\n // a user-defined kind can still hold children, and only its author knows where, so fall back to scanning the def — skipping accessors, since reading one can run user code\n for (const key in def) {\n const desc = Object.getOwnPropertyDescriptor(def, key);\n if (!desc || desc.get)\n continue;\n const value = desc.value;\n if (!value || typeof value !== \"object\")\n continue;\n if (value._zod)\n check(value);\n else if (Array.isArray(value))\n for (const el of value)\n check(el);\n }\n }\n }\n stack.delete(inst);\n recursive.set(inst, result);\n return result;\n}\n/**\n * Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.\n * Exported for `z.compile`, which refuses to compile such a schema: cycle\n * breaking is driven from here off state keyed on the parse context, and a\n * generated fast path has no context to key on.\n */\nexport function isRecursiveSchema(inst) {\n return isRecursive(inst, new Set());\n}\nfunction bucketFor(state, inst) {\n let bucket = state.buckets.get(inst);\n if (!bucket) {\n bucket = new Map();\n state.buckets.set(inst, bucket);\n }\n return bucket;\n}\n// Set immediately before delegating to core and cleared immediately after, so `alloc` registers only for a visit this module is driving.\nlet handoff;\n// Allocated but unfinished entries. `alloc` and the matching pop both happen in the synchronous part of a parse, so they nest even when children are async, and one stack serves every schema.\nconst open = [];\nconst memo = {\n alloc(_inst, payload, empty) {\n const bucket = handoff;\n if (!bucket)\n return empty;\n handoff = undefined;\n const entry = { value: empty, issues: null };\n bucket.set(payload.value, entry);\n open.push(entry);\n return empty;\n },\n guard(inst) {\n var _a;\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred.push(() => {\n const base = inst._zod.parse;\n const wrapped = (payload, ctx) => {\n // The value is a placeholder a back-edge is still waiting on, so the cycle closes through this transform. Its output can't exist in time to bind.\n if (ctx.direction !== \"backward\" && isBackEdge(ctx, payload.value))\n throw new $ZodCyclicError();\n return base(payload, ctx);\n };\n inst._zod.parse = wrapped;\n if (inst._zod.run === base)\n inst._zod.run = wrapped;\n });\n },\n attach(inst) {\n var _a;\n let isRecursiveInst;\n // `bucket` memoized for one parse; a recursive schema is re-entered many times and its bucket never changes\n let lastCtx;\n let lastBucket;\n // Wraps `parse` in a deferred so it sees the container's final parse. Core's own deferred copies `parse` into `run` when there are no checks, and it ran first, so `run` is patched to match; with checks, `run` reads `parse` dynamically.\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred.push(() => {\n const base = inst._zod.parse;\n const wrapped = (payload, ctx) => {\n if (isRecursiveInst === undefined) {\n isRecursiveInst = isRecursive(inst, new Set());\n if (!isRecursiveInst) {\n // Nothing here can ever fire, so take it back out.\n inst._zod.parse = base;\n if (inst._zod.run === wrapped)\n inst._zod.run = base;\n return base(payload, ctx);\n }\n }\n const input = payload.value;\n if (input === null || typeof input !== \"object\")\n return base(payload, ctx);\n let state = ctx[STATE];\n if (!state) {\n state = { buckets: new Map(), backEdges: undefined };\n ctx[STATE] = state;\n }\n let bucket;\n if (lastCtx === ctx) {\n bucket = lastBucket;\n }\n else {\n bucket = bucketFor(state, inst);\n lastCtx = ctx;\n lastBucket = bucket;\n }\n const hit = bucket.get(input);\n if (hit) {\n payload.value = hit.value;\n if (hit.issues) {\n if (hit.issues.length)\n payload.issues.push(...cloneIssues(hit.issues));\n }\n else {\n // Still being parsed: its own checks cover it, so skip them here.\n payload.memo = true;\n state.backEdges ?? (state.backEdges = new Set());\n state.backEdges.add(hit.value);\n }\n return payload;\n }\n handoff = bucket;\n const depth = open.length;\n const result = base(payload, ctx);\n handoff = undefined;\n // A container that rejected its input outright allocated nothing.\n const entry = open.length > depth ? open.pop() : undefined;\n // Both paths written out so the sync one allocates no closure. It runs once per node, and capturing here cost more than everything else combined.\n if (result instanceof Promise) {\n return result.then((r) => {\n if (entry)\n entry.issues = r.issues.length ? cloneIssues(r.issues) : NO_ISSUES;\n return r;\n });\n }\n if (entry)\n entry.issues = result.issues.length ? cloneIssues(result.issues) : NO_ISSUES;\n return result;\n };\n inst._zod.parse = wrapped;\n if (inst._zod.run === base)\n inst._zod.run = wrapped;\n });\n },\n};\n/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */\nexport function memoizer() {\n return memo;\n}\n/** Whether this value is a node a back-edge resolved to before it finished. */\nexport function isBackEdge(ctx, value) {\n const backEdges = ctx[STATE]?.backEdges;\n return backEdges !== undefined && value !== null && typeof value === \"object\" && backEdges.has(value);\n}\n","import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"characters\", verb: \"to have\" },\n file: { unit: \"bytes\", verb: \"to have\" },\n array: { unit: \"items\", verb: \"to have\" },\n set: { unit: \"items\", verb: \"to have\" },\n map: { unit: \"entries\", verb: \"to have\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"input\",\n email: \"email address\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO datetime\",\n date: \"ISO date\",\n time: \"ISO time\",\n duration: \"ISO duration\",\n ipv4: \"IPv4 address\",\n ipv6: \"IPv6 address\",\n mac: \"MAC address\",\n cidrv4: \"IPv4 range\",\n cidrv6: \"IPv6 range\",\n base64: \"base64-encoded string\",\n base64url: \"base64url-encoded string\",\n json_string: \"JSON string\",\n e164: \"E.164 number\",\n credit_card: \"credit card number\",\n jwt: \"JWT\",\n template_literal: \"input\",\n };\n // type names: missing keys = do not translate (use raw value via ?? fallback)\n const TypeDictionary = {\n // Compatibility: \"nan\" -> \"NaN\" for display\n nan: \"NaN\",\n // All other type names omitted - they fall back to raw values via ?? operator\n };\n function getTypeName(type, input) {\n if (type === \"number\" && typeof input === \"number\" && !Number.isFinite(input)) {\n return String(input);\n }\n return TypeDictionary[type] ?? type;\n }\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = getTypeName(issue.expected);\n const receivedType = util.parsedType(issue.input);\n const received = getTypeName(receivedType, issue.input);\n return `Invalid input: expected ${expected}, received ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.exact ? \"exactly \" : issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.exact ? \"exactly \" : issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Invalid string: must start with \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Invalid string: must end with \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Invalid string: must include \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Invalid string: must match pattern ${_issue.pattern}`;\n return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Invalid number: must be a multiple of ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Invalid key in ${issue.origin}`;\n case \"invalid_union\":\n if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {\n const opts = issue.options.map((o) => `'${o}'`).join(\" | \");\n return `Invalid discriminator value. Expected ${opts}`;\n }\n if (issue.inclusive === false) {\n return \"Invalid input: more than one option matched\";\n }\n return \"Invalid input\";\n case \"invalid_element\":\n return `Invalid value in ${issue.origin}`;\n default:\n return `Invalid input`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n","var _a;\nexport const $output = /*@__PURE__*/ Symbol(\"ZodOutput\");\nexport const $input = /*@__PURE__*/ Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n constructor() {\n this._map = new WeakMap();\n this._idmap = new Map();\n }\n add(schema, ..._meta) {\n const meta = _meta[0];\n this._map.set(schema, meta);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.set(meta.id, schema);\n }\n return this;\n }\n clear() {\n this._map = new WeakMap();\n this._idmap = new Map();\n return this;\n }\n remove(schema) {\n const meta = this._map.get(schema);\n if (meta && typeof meta === \"object\" && \"id\" in meta) {\n this._idmap.delete(meta.id);\n }\n this._map.delete(schema);\n return this;\n }\n get(schema) {\n // return this._map.get(schema) as any;\n // inherit metadata\n const p = schema._zod.parent;\n if (p) {\n const pm = { ...(this.get(p) ?? {}) };\n delete pm.id; // do not inherit id\n const f = { ...pm, ...this._map.get(schema) };\n return Object.keys(f).length ? f : undefined;\n }\n return this._map.get(schema);\n }\n has(schema) {\n return this._map.has(schema);\n }\n}\n// registries\nexport function registry() {\n return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n","import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link _cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _creditCard(Class, params) {\n return new Class({\n type: \"string\",\n format: \"credit_card\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _properties(shape) {\n return Object.entries(shape).map(([property, schema]) => new checks.$ZodCheckProperty({ check: \"property\", property, schema }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options: options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass<schemas.$ZodTuple>,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : util.constantCatch(catchValue)),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn, params) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n if (!(\"input\" in _issue))\n _issue.input = payload.value;\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n }, params);\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n codec._zod.bag.truthy = truthyArray;\n codec._zod.bag.falsy = falsyArray;\n codec._zod.bag.case = params.case ?? \"insensitive\";\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n","import { globalRegistry } from \"./registries.js\";\nimport { assignProp } from \"./util.js\";\nfunction assignProps(target, ...sources) {\n for (const source of sources) {\n for (const key of Reflect.ownKeys(source)) {\n if (Object.prototype.propertyIsEnumerable.call(source, key)) {\n assignProp(target, key, source[key]);\n }\n }\n }\n return target;\n}\n// function initializeContext<T extends schemas.$ZodType>(inputs: JSONSchemaGeneratorParams<T>): ToJSONSchemaContext<T> {\n// return {\n// processor: inputs.processor,\n// metadataRegistry: inputs.metadata ?? globalRegistry,\n// target: inputs.target ?? \"draft-2020-12\",\n// unrepresentable: inputs.unrepresentable ?? \"throw\",\n// };\n// }\nexport function initializeContext(params) {\n // Normalize target: convert old non-hyphenated versions to hyphenated versions\n let target = params?.target ?? \"draft-2020-12\";\n if (target === \"draft-4\")\n target = \"draft-04\";\n if (target === \"draft-7\")\n target = \"draft-07\";\n return {\n processors: params.processors ?? {},\n metadataRegistry: params?.metadata ?? globalRegistry,\n target,\n unrepresentable: params?.unrepresentable ?? \"throw\",\n override: params?.override ?? (() => { }),\n io: params?.io ?? \"output\",\n counter: 0,\n seen: new Map(),\n sharedDefsExtractedFor: undefined,\n sharedEmitDoneFor: undefined,\n cycles: params?.cycles ?? \"ref\",\n reused: params?.reused ?? \"inline\",\n intersections: [],\n deferred: [],\n external: params?.external ?? undefined,\n };\n}\n/**\n * Applies the `unrepresentable` setting at a site that has no JSON Schema equivalent. Throws\n * `message` unless the setting (or the handler's return value) says otherwise. Returns `true` if a\n * custom JSON Schema was written into `json`, in which case the caller must not write its own.\n */\nexport function handleUnrepresentable(schema, ctx, json, params, message) {\n const result = typeof ctx.unrepresentable === \"function\"\n ? ctx.unrepresentable({ zodSchema: schema, path: params.path, message })\n : ctx.unrepresentable;\n if (result === \"any\")\n return false;\n if (result === undefined || result === \"throw\")\n throw new Error(message);\n Object.assign(json, result);\n return true;\n}\nexport function process(schema, ctx, _params = { path: [], schemaPath: [] }) {\n var _a;\n const def = schema._zod.def;\n // check for schema in seens\n const seen = ctx.seen.get(schema);\n if (seen) {\n seen.count++;\n // check if cycle\n const isCycle = _params.schemaPath.includes(schema);\n if (isCycle) {\n seen.cycle = _params.path;\n }\n return seen.schema;\n }\n // initialize\n const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n ctx.seen.set(schema, result);\n ctx.sharedDefsExtractedFor = undefined;\n ctx.sharedEmitDoneFor = undefined;\n // custom method overrides default behavior\n const overrideSchema = schema._zod.toJSONSchema?.();\n if (overrideSchema) {\n result.schema = overrideSchema;\n }\n else {\n const params = {\n ..._params,\n schemaPath: [..._params.schemaPath, schema],\n path: _params.path,\n };\n if (schema._zod.processJSONSchema) {\n schema._zod.processJSONSchema(ctx, result.schema, params);\n }\n else {\n const _json = result.schema;\n const processor = ctx.processors[def.type];\n if (!processor) {\n throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n }\n processor(schema, ctx, _json, params);\n }\n const parent = schema._zod.parent;\n if (parent) {\n // Also set ref if processor didn't (for inheritance)\n if (!result.ref)\n result.ref = parent;\n process(parent, ctx, params);\n ctx.seen.get(parent).isParent = true;\n }\n }\n // metadata\n const meta = ctx.metadataRegistry.get(schema);\n if (meta)\n assignProps(result.schema, meta);\n if (ctx.io === \"input\" && isTransforming(schema)) {\n // examples/defaults only apply to output type of pipe\n delete result.schema.examples;\n delete result.schema.default;\n }\n // set prefault as default\n if (ctx.io === \"input\" && \"_prefault\" in result.schema)\n (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n delete result.schema._prefault;\n // pulling fresh from ctx.seen in case it was overwritten\n const _result = ctx.seen.get(schema);\n return _result.schema;\n}\n// Escape a reference token for use in a JSON Pointer fragment (RFC 6901): `~` becomes `~0` and `/` becomes `~1`. The `~` replacement must run first.\nfunction encodeJSONPointerSegment(segment) {\n return segment.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n // iterate over seen map;\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // With `external` set, every registered schema resolves through the external branch of `makeURI`, so the root branch below produces the same ref the external branch would — this pass is identical whichever schema it is called with, and only needs to run once.\n if (ctx.external && ctx.sharedDefsExtractedFor === ctx.external)\n return;\n // Track ids to detect duplicates across different schemas\n const idToSchema = new Map();\n for (const entry of ctx.seen.entries()) {\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n const existing = idToSchema.get(id);\n if (existing && existing !== entry[0]) {\n throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n }\n idToSchema.set(id, entry[0]);\n }\n }\n // returns a ref to the schema defId will be empty if the ref points to an external schema (or #)\n const makeURI = (entry) => {\n // comparing the seen objects because sometimes multiple schemas map to the same seen object. e.g. lazy\n // external is configured\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n if (ctx.external) {\n const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n // check if schema is in the external registry\n const uriGenerator = ctx.external.uri ?? ((id) => id);\n if (externalId) {\n return { ref: uriGenerator(externalId) };\n }\n // otherwise, add to __shared\n const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n entry[1].defId = id; // set defId so it will be reused if needed\n return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${encodeJSONPointerSegment(id)}` };\n }\n const uriPrefix = `#`;\n const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n // an id-less root has nowhere to be extracted to, so it stays inline and self-references as `#`\n if (entry[1] === root && !entry[1].schema.id) {\n return { ref: uriPrefix };\n }\n // self-contained schema\n const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n return { defId, ref: defUriPrefix + encodeJSONPointerSegment(defId) };\n };\n // stored cached version in `def` property remove all properties, set $ref\n const extractToDef = (entry) => {\n // if the schema is already a reference, do not extract it\n if (entry[1].schema.$ref) {\n return;\n }\n const seen = entry[1];\n const { ref, defId } = makeURI(entry);\n seen.def = { ...seen.schema };\n // defId won't be set if the schema is a reference to an external schema or if the schema is the root schema\n if (defId)\n seen.defId = defId;\n // wipe away all properties except $ref\n const schema = seen.schema;\n for (const key in schema) {\n delete schema[key];\n }\n schema.$ref = ref;\n };\n // throw on cycles\n // break cycles\n if (ctx.cycles === \"throw\") {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.cycle) {\n throw new Error(\"Cycle detected: \" +\n `#/${seen.cycle?.join(\"/\")}/<root>` +\n '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n }\n }\n }\n // extract schemas into $defs\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n // convert root schema to # $ref\n if (schema === entry[0]) {\n extractToDef(entry); // this has special handling for the root schema\n continue;\n }\n // extract schemas that are in the external registry\n if (ctx.external) {\n const ext = ctx.external.registry.get(entry[0])?.id;\n if (schema !== entry[0] && ext) {\n extractToDef(entry);\n continue;\n }\n }\n // extract schemas with `id` meta\n const id = ctx.metadataRegistry.get(entry[0])?.id;\n if (id) {\n extractToDef(entry);\n continue;\n }\n // break cycles\n if (seen.cycle) {\n // any\n extractToDef(entry);\n continue;\n }\n // extract reused schemas\n if (seen.count > 1) {\n if (ctx.reused === \"ref\") {\n extractToDef(entry);\n // biome-ignore lint:\n continue;\n }\n }\n }\n if (ctx.external)\n ctx.sharedDefsExtractedFor = ctx.external;\n}\n/** Rewrites `anyOf: [{type: \"a\"}, {type: \"b\"}]` to `type: [\"a\", \"b\"]`, which every JSON Schema draft treats as equivalent and most consumers render far better for the nullable case. Only branches that are a bare type assertion qualify — anything carrying a constraint, `$ref`, `const` or metadata is left alone. Runs after `flattenRef`, so a branch an override decorated or `$defs` extraction turned into a `$ref` is no longer bare and correctly stays in `anyOf`. `oneOf` is excluded: `integer` and `number` overlap, so \"exactly one\" and \"at least one\" are not the same there. OpenAPI 3.0 is excluded: its `type` must be a single string. */\nfunction compactTypeUnion(schema) {\n const options = schema.anyOf;\n if (!Array.isArray(options) || options.length === 0 || schema.type !== undefined)\n return;\n const types = [];\n for (const option of options) {\n if (!option || typeof option !== \"object\")\n return;\n // A branch that is itself a compactible union folds into this one — nested `anyOf` and a flat `type` array say the same thing. Compacting it first also makes the result independent of the order this pass walks the seen map in.\n compactTypeUnion(option);\n const keys = Object.keys(option);\n if (keys.length !== 1 || keys[0] !== \"type\")\n return;\n const type = option.type;\n for (const member of Array.isArray(type) ? type : [type]) {\n if (typeof member !== \"string\")\n return;\n if (!types.includes(member))\n types.push(member);\n }\n }\n delete schema.anyOf;\n // A `type` array must be non-empty and unique (metaschema); a single member is spelled as a bare string.\n schema.type = types.length === 1 ? types[0] : types;\n}\n/** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,\n * an annotation like `description` — makes a member unfoldable, so a constraint this does not\n * understand leaves the `allOf` alone instead of being silently dropped or misattributed. */\nconst FOLDABLE_KEYS = new Set([\"type\", \"properties\", \"required\", \"additionalProperties\"]);\nconst UNION_KEYS = [\"oneOf\", \"anyOf\"];\n/** A member's constraint on a key it does not declare itself. A `catchall` states one; `false`, an absent `additionalProperties`, and the empty schema a loose object emits state nothing. */\nfunction undeclaredConstraint(member) {\n const extra = member.additionalProperties;\n if (extra === undefined || extra === false || typeof extra !== \"object\" || extra === null)\n return null;\n return Object.keys(extra).length ? extra : null;\n}\n/** Combines object members into the single object they describe together, or returns `null` if any of them carries a keyword outside {@link FOLDABLE_KEYS}. */\nfunction foldObjects(members) {\n const objects = [];\n for (const member of members) {\n // A boolean subschema is legal JSON Schema and carries no keywords to fold.\n if (typeof member !== \"object\" || member.type !== \"object\")\n return null;\n for (const key in member) {\n if (!FOLDABLE_KEYS.has(key))\n return null;\n }\n objects.push(member);\n }\n const properties = {};\n const required = new Set();\n for (const object of objects) {\n for (const key in object.properties) {\n // `in` would report a `__proto__` key as already present via the prototype chain and skip it.\n if (Object.prototype.hasOwnProperty.call(properties, key))\n continue;\n // Every member constrains this key: the ones that declare it say how, and a `catchall` member constrains it too even though it does not name it. The key has to satisfy all of them, which is the same intersection one level down.\n const parts = [];\n for (const other of objects) {\n const part = other.properties?.[key] ?? undeclaredConstraint(other);\n if (part === null || part === undefined)\n continue;\n if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part)))\n parts.push(part);\n }\n const merged = parts.length === 1\n ? parts[0]\n : (foldObjects(parts) ?? { allOf: parts });\n assignProp(properties, key, merged);\n }\n for (const key of object.required ?? [])\n required.add(key);\n }\n const folded = { type: \"object\", properties };\n if (required.size)\n folded.required = [...required];\n // A key no member declares is rejected only when every member rejects it, so the fold is closed only when every member is. Otherwise it carries whatever the `catchall` members demand of such a key.\n if (objects.every((object) => object.additionalProperties === false)) {\n folded.additionalProperties = false;\n }\n else {\n const constraints = [];\n for (const object of objects) {\n const constraint = undeclaredConstraint(object);\n if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint)))\n constraints.push(constraint);\n }\n if (constraints.length === 1)\n folded.additionalProperties = constraints[0];\n else if (constraints.length > 1)\n folded.additionalProperties = { allOf: constraints };\n }\n return folded;\n}\n/** `additionalProperties` in an `allOf` member sees only that member's own `properties`, so two\n * closed object members reject each other's keys and the schema validates nothing. Zod's parser\n * pools the key sets instead — `handleIntersectionResults` reports a key as unrecognized only when\n * *every* side rejects it — so the emitted schema has to pool them too, and folding the members\n * into one object is the encoding that says so on every target.\n *\n * This runs from `finalize`, after `extractDefs`, which is what keeps it clear of the `$ref`\n * machinery: a member extracted into `$defs` is already a `$ref` by now and declines to fold, so it\n * keeps its reference and its own closedness rather than being inlined as a stale copy. */\nfunction foldIntersection(json) {\n const allOf = json.allOf;\n if (!Array.isArray(allOf) || allOf.length < 2)\n return;\n // An `override` runs before this pass and may have written object keywords onto the intersection itself. Those are deliberate, so decline rather than overwrite them.\n for (const key of FOLDABLE_KEYS)\n if (key in json)\n return;\n // An intersection distributes over a union: `A & (X | Y)` is `(A & X) | (A & Y)`. Only the first union is distributed over; a second one stays among the members every branch folds against, where it fails the object check and declines the whole intersection rather than multiplying out.\n const unions = allOf.filter((m) => UNION_KEYS.some((k) => Array.isArray(m[k])));\n let folded = null;\n if (!unions.length) {\n folded = foldObjects(allOf);\n }\n else {\n const union = unions[0];\n const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));\n if (Object.keys(union).length !== 1)\n return;\n const rest = allOf.filter((m) => m !== union);\n const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));\n if (branches.some((b) => !b))\n return;\n folded = { [keyword]: branches };\n }\n if (!folded)\n return;\n delete json.allOf;\n assignProps(json, folded);\n}\nexport function finalize(ctx, schema) {\n const root = ctx.seen.get(schema);\n if (!root)\n throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n // flatten refs - inherit properties from parent schemas\n const flattenRef = (zodSchema) => {\n const seen = ctx.seen.get(zodSchema);\n // already processed\n if (seen.ref === null)\n return;\n const schema = seen.def ?? seen.schema;\n const _cached = { ...schema };\n const ref = seen.ref;\n seen.ref = null; // prevent infinite recursion\n if (ref) {\n flattenRef(ref);\n const refSeen = ctx.seen.get(ref);\n const refSchema = refSeen.schema;\n // merge referenced schema into current\n if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n // older drafts can't combine $ref with other properties\n schema.allOf = schema.allOf ?? [];\n schema.allOf.push(refSchema);\n }\n else {\n assignProps(schema, refSchema);\n }\n // restore child's own properties (child wins)\n assignProps(schema, _cached);\n const isParentRef = zodSchema._zod.parent === ref;\n // For parent chain, child is a refinement - remove parent-only properties\n if (isParentRef) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (!(key in _cached)) {\n delete schema[key];\n }\n }\n }\n // When ref was extracted to $defs, remove properties that match the definition\n if (refSchema.$ref && refSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n // If parent was extracted (has $ref), propagate $ref to this schema. This handles cases like: readonly().meta({id}).describe() where processor sets ref to innerType but parent should be referenced\n const parent = zodSchema._zod.parent;\n if (parent && parent !== ref) {\n // Ensure parent is processed first so its def has inherited properties\n flattenRef(parent);\n const parentSeen = ctx.seen.get(parent);\n if (parentSeen?.schema.$ref) {\n schema.$ref = parentSeen.schema.$ref;\n // De-duplicate with parent's definition\n if (parentSeen.def) {\n for (const key in schema) {\n if (key === \"$ref\" || key === \"allOf\")\n continue;\n if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n delete schema[key];\n }\n }\n }\n }\n }\n // execute overrides\n ctx.override({\n zodSchema: zodSchema,\n jsonSchema: schema,\n path: seen.path ?? [],\n });\n };\n // Flattening walks the whole map and clears each `ref` as it goes, so a second call over the same map is a no-op scan. Skip it outright once it has run for a registry conversion.\n if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n for (const entry of [...ctx.seen.entries()].reverse()) {\n flattenRef(entry[0]);\n }\n if (ctx.target !== \"openapi-3.0\") {\n for (const entry of ctx.seen.entries()) {\n compactTypeUnion(entry[1].def ?? entry[1].schema);\n }\n }\n for (const rewrite of ctx.deferred)\n rewrite();\n // After flattening, every member that was extracted is a `$ref`, so the fold sees the final shape. A schema that inherits an intersection — through `z.lazy`, or any `ref` chain — holds the same `allOf` array, so fold by array identity to catch every copy.\n if (ctx.intersections.length) {\n const carriers = new Map();\n for (const seen of ctx.seen.values()) {\n for (const json of [seen.schema, seen.def]) {\n const allOf = json?.allOf;\n if (!Array.isArray(allOf))\n continue;\n const existing = carriers.get(allOf);\n if (existing)\n existing.push(json);\n else\n carriers.set(allOf, [json]);\n }\n }\n for (const allOf of ctx.intersections) {\n for (const json of carriers.get(allOf) ?? [])\n foldIntersection(json);\n }\n }\n }\n const result = {};\n if (ctx.target === \"draft-2020-12\") {\n result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n }\n else if (ctx.target === \"draft-07\") {\n result.$schema = \"http://json-schema.org/draft-07/schema#\";\n }\n else if (ctx.target === \"draft-04\") {\n result.$schema = \"http://json-schema.org/draft-04/schema#\";\n }\n else if (ctx.target === \"openapi-3.0\") {\n // OpenAPI 3.0 schema objects should not include a $schema property\n }\n else {\n // Arbitrary string values are allowed but won't have a $schema property set\n }\n if (ctx.external?.uri) {\n const id = ctx.external.registry.get(schema)?.id;\n if (!id)\n throw new Error(\"Schema is missing an `id` property\");\n result.$id = ctx.external.uri(id);\n }\n // when the root was extracted into $defs, `root.schema` is the `$ref` wrapper and `root.def` is the body that now lives under $defs\n assignProps(result, root.defId ? root.schema : (root.def ?? root.schema));\n // The `id` in `.meta()` is a Zod-specific registration tag used to extract schemas into $defs — it is not user-facing JSON Schema metadata. Strip it from the output body where it would otherwise leak. The id is preserved implicitly via the $defs key (and via $ref paths).\n const rootMetaId = ctx.metadataRegistry.get(schema)?.id;\n if (rootMetaId !== undefined && result.id === rootMetaId)\n delete result.id;\n // build defs object. With `external`, `defs` is the shared object every schema writes into, so the same entries are reassigned on every call. Without it, `defs` is fresh per call and must be rebuilt.\n const defs = ctx.external?.defs ?? {};\n if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n for (const entry of ctx.seen.entries()) {\n const seen = entry[1];\n if (seen.def && seen.defId) {\n if (seen.def.id === seen.defId)\n delete seen.def.id;\n assignProp(defs, seen.defId, seen.def);\n }\n }\n }\n if (ctx.external)\n ctx.sharedEmitDoneFor = ctx.external;\n // set definitions in result\n if (ctx.external) {\n }\n else {\n if (Object.keys(defs).length > 0) {\n if (ctx.target === \"draft-2020-12\") {\n result.$defs = defs;\n }\n else {\n result.definitions = defs;\n }\n }\n }\n try {\n // this \"finalizes\" this schema and ensures all cycles are removed each call to finalize() is functionally independent though the seen map is shared\n const finalized = JSON.parse(JSON.stringify(result));\n Object.defineProperty(finalized, \"~standard\", {\n value: {\n ...schema[\"~standard\"],\n jsonSchema: {\n input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n },\n },\n enumerable: false,\n writable: false,\n });\n return finalized;\n }\n catch (_err) {\n throw new Error(\"Error converting schema to JSON.\");\n }\n}\nfunction isTransforming(_schema, _ctx) {\n const ctx = _ctx ?? { seen: new Set() };\n if (ctx.seen.has(_schema))\n return false;\n ctx.seen.add(_schema);\n const def = _schema._zod.def;\n if (def.type === \"transform\")\n return true;\n if (def.type === \"array\")\n return isTransforming(def.element, ctx);\n if (def.type === \"set\")\n return isTransforming(def.valueType, ctx);\n if (def.type === \"lazy\")\n return isTransforming(def.getter(), ctx);\n if (def.type === \"promise\" ||\n def.type === \"optional\" ||\n def.type === \"nonoptional\" ||\n def.type === \"nullable\" ||\n def.type === \"readonly\" ||\n def.type === \"default\" ||\n def.type === \"prefault\" ||\n def.type === \"catch\") {\n return isTransforming(def.innerType, ctx);\n }\n if (def.type === \"intersection\") {\n return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n }\n if (def.type === \"record\" || def.type === \"map\") {\n return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n }\n if (def.type === \"pipe\") {\n if (_schema._zod.traits.has(\"$ZodCodec\"))\n return true;\n return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n }\n if (def.type === \"object\") {\n for (const key in def.shape) {\n if (isTransforming(def.shape[key], ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"union\") {\n for (const option of def.options) {\n if (isTransforming(option, ctx))\n return true;\n }\n return false;\n }\n if (def.type === \"tuple\") {\n for (const item of def.items) {\n if (isTransforming(item, ctx))\n return true;\n }\n if (def.rest && isTransforming(def.rest, ctx))\n return true;\n return false;\n }\n return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n const ctx = initializeContext({ ...params, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n const { libraryOptions, target } = params ?? {};\n const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n process(schema, ctx);\n extractDefs(ctx, schema);\n return finalize(ctx, schema);\n};\n","import * as regexes from \"./regexes.js\";\nimport { extractDefs, finalize, handleUnrepresentable, initializeContext, process, } from \"./to-json-schema.js\";\nimport { assignProp, getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // `z.iso.time()` is never full-time, and `laxFormat` carries the datetime shapes that also accept what their keyword forbids\n if (format === \"time\" || laxFormat) {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const patternList = [...patterns];\n if (patternList.length === 1)\n json.pattern = patternList[0].source;\n else if (patternList.length > 1) {\n json.allOf = [\n ...patternList.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n // when both minimum and exclusiveMinimum exist, pick the more restrictive one\n const exMin = typeof exclusiveMinimum === \"number\" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);\n const exMax = typeof exclusiveMaximum === \"number\" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);\n const legacy = ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\";\n if (exMin) {\n if (legacy) {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n else if (typeof minimum === \"number\") {\n json.minimum = minimum;\n }\n if (exMax) {\n if (legacy) {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n else if (typeof maximum === \"number\") {\n json.maximum = maximum;\n }\n if (typeof multipleOf === \"number\") {\n // JSON Schema requires a divisor strictly greater than zero, and a non-finite one does not survive JSON at all. A negative divisor accepts exactly what its absolute value accepts, so it still maps; zero, NaN and Infinity have no keyword form.\n if (Number.isFinite(multipleOf) && multipleOf !== 0)\n json.multipleOf = Math.abs(multipleOf);\n else\n handleUnrepresentable(schema, ctx, json, params, `A multipleOf divisor of ${multipleOf} cannot be represented in JSON Schema`);\n }\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"BigInt cannot be represented in JSON Schema\");\n};\nexport const symbolProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Symbols cannot be represented in JSON Schema\");\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Undefined cannot be represented in JSON Schema\");\n};\nexport const voidProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Void cannot be represented in JSON Schema\");\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Date cannot be represented in JSON Schema\");\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // an empty enum accepts nothing, same as z.never()\n if (values.length === 0) {\n json.not = {};\n return;\n }\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // a literal with no values accepts nothing, same as z.never()\n if (def.values.length === 0) {\n json.not = {};\n return;\n }\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n // a custom schema replaces the whole literal, so there is nothing left to accumulate\n if (handleUnrepresentable(schema, ctx, json, params, \"Literal `undefined` cannot be represented in JSON Schema\"))\n return;\n // otherwise do not add to vals\n }\n else if (typeof val === \"bigint\") {\n if (handleUnrepresentable(schema, ctx, json, params, \"BigInt literals cannot be represented in JSON Schema\"))\n return;\n vals.push(Number(val));\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"NaN cannot be represented in JSON Schema\");\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Custom types cannot be represented in JSON Schema\");\n};\nexport const functionProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Function types cannot be represented in JSON Schema\");\n};\nexport const transformProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Transforms cannot be represented in JSON Schema\");\n};\nexport const mapProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Map cannot be represented in JSON Schema\");\n};\nexport const setProcessor = (schema, ctx, json, params) => {\n handleUnrepresentable(schema, ctx, json, params, \"Set cannot be represented in JSON Schema\");\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, {\n ...params,\n path: [...params.path, \"items\"],\n });\n};\n// Transform and catch set `optin = \"optional\"` at runtime so the parser lets them observe an\n// absent key, but their declared input type stays required. An input JSON Schema describes the\n// declared type, so resolve past them to the schema that actually carries the optionality.\n// Used by both `objectProcessor` (for `required`) and `tupleProcessor` (for `minItems`); see\n// wiki/optionality.md, \"The JSON Schema emitter reads the *static* value\".\nfunction inputOptin(schema) {\n const def = schema._zod.def;\n if (def.type === \"pipe\" && def.in._zod.traits.has(\"$ZodTransform\")) {\n return inputOptin(def.out);\n }\n if (def.type === \"catch\") {\n return inputOptin(def.innerType);\n }\n return schema._zod.optin;\n}\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const shape = def.shape;\n // dropping it while still emitting `additionalProperties: false` would emit a schema that rejects data this one requires\n const symbolKeys = Object.getOwnPropertySymbols(shape);\n if (symbolKeys.length &&\n handleUnrepresentable(schema, ctx, json, params, \"Symbol keys cannot be represented in JSON Schema\")) {\n return;\n }\n json.type = \"object\";\n json.properties = {};\n for (const key in shape) {\n // assignProp so a __proto__ key becomes an own property instead of hitting the inherited setter on the plain {} we build into\n assignProp(json.properties, key, process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n }));\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const field = def.shape[key];\n if (ctx.io === \"input\") {\n return inputOptin(field) === undefined;\n }\n else {\n return field._zod.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches). This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n // Recorded innermost first, so a nested intersection has already folded by the time this one is considered. The array is the handle rather than the schema, because a wrapper that inherits this schema shares the same array; `finalize` folds every object holding it. See `foldIntersection`.\n ctx.intersections.push(allOf);\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n let minItems = def.items.length;\n while (minItems > 0) {\n const item = def.items[minItems - 1];\n const optional = ctx.io === \"input\" ? inputOptin(item) !== undefined : item._zod.optout === \"optional\";\n if (!optional)\n break;\n minItems--;\n }\n const maxItems = def.items.length;\n const isClosed = !def.rest;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (isClosed) {\n json.items = false;\n }\n else if (rest) {\n json.items = rest;\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n else {\n json.items = prefixItems;\n if (isClosed) {\n json.additionalItems = false;\n }\n else if (rest) {\n json.additionalItems = rest;\n }\n if (minItems > 0)\n json.minItems = minItems;\n if (isClosed)\n json.maxItems = maxItems;\n }\n // explicit user-defined length checks take precedence\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\n/** JSON object keys are always strings, so a numeric record key schema is re-expressed over the\n * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key\n * behind a wrapper only carries its own `type` before then, and a union key only has its branches.\n *\n * A numeric bound cannot apply to a property name, so `minimum` and its siblings are dropped rather\n * than carried over: keeping them beside `type: \"string\"` reproduces the match-nothing schema this\n * exists to fix. A key that carries one therefore emits wider than the record parses — `z.record(z.number().min(5), V)`\n * accepts `\"3\"` — which is the deliberate trade, since throwing on it would reject an ordinary schema\n * outright. */\nfunction stringifyKeyNames(bySchema, json, visited) {\n // an extracted key that rewrites cannot go on sharing its definition — the string form a key position needs is not the number form every other reference wants — so it inlines. One that does not rewrite keeps the `$ref`.\n if (json.$ref) {\n // a recursive key holds its own reference inside its definition, so a node already on the path is left alone rather than resolved again\n if (visited.has(json))\n return json;\n visited.add(json);\n const def = bySchema.get(json)?.def;\n if (!def)\n return json;\n const inlined = stringifyKeyNames(bySchema, def, visited);\n return inlined === def ? json : inlined;\n }\n for (const keyword of [\"anyOf\", \"oneOf\"]) {\n const branches = json[keyword];\n if (!Array.isArray(branches))\n continue;\n const mapped = branches.map((branch) => stringifyKeyNames(bySchema, branch, visited));\n // rebuilding regardless would detach a key that had nothing to re-express, dropping its `$ref` and leaking the internal `id`\n if (mapped.some((branch, i) => branch !== branches[i]))\n json = { ...json, [keyword]: mapped };\n }\n // a member that already admits a string leaves the key unconstrained, so the node's own type re-expresses only when every member is numeric\n const types = Array.isArray(json.type) ? json.type : [json.type];\n const numericType = !types.includes(\"string\") && types.some((t) => t === \"number\" || t === \"integer\");\n // a heterogeneous key carries no type at all, so its numeric members are caught here instead\n const values = json.enum ?? (json.const !== undefined ? [json.const] : undefined);\n if (!numericType && !values?.some((v) => typeof v === \"number\"))\n return json;\n const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;\n if (rest.enum)\n rest.enum = rest.enum.map((v) => (typeof v === \"number\" ? String(v) : v));\n else if (typeof rest.const === \"number\")\n rest.const = String(rest.const);\n // a heterogeneous key keeps its absent type: the stringified members already say what a key may be\n if (!numericType)\n return rest;\n rest.type = \"string\";\n if (!values)\n rest.pattern = (types.includes(\"number\") ? regexes.number : regexes.integer).source;\n return rest;\n}\n/** Every record of one conversion, so the carriers are found in a single pass rather than once per record. */\nconst pendingRecords = new WeakMap();\nfunction rewriteKeyNames(ctx) {\n // an extracted key is resolved by the object `extractToDef` left in its place, so the map is built once rather than searched per reference. `_zod.toJSONSchema` can hand the same object to two schemas, so the first entry carrying a body wins, as a search would have found it.\n const bySchema = new Map();\n for (const entry of ctx.seen.values()) {\n if (entry.def && !bySchema.has(entry.schema))\n bySchema.set(entry.schema, entry);\n }\n const rewrites = new Map();\n for (const record of pendingRecords.get(ctx) ?? []) {\n const seen = ctx.seen.get(record);\n const names = (seen?.def ?? seen?.schema)?.propertyNames;\n if (!names || names === true || rewrites.has(names))\n continue;\n const rewritten = stringifyKeyNames(bySchema, names, new Set());\n if (rewritten !== names)\n rewrites.set(names, rewritten);\n }\n if (!rewrites.size)\n return;\n // the flatten has already copied each record's own properties onto every wrapper by reference, and an extracted body is another such copy, so every carrier holding a rewritten key is updated together\n for (const entry of ctx.seen.values()) {\n for (const carrier of [entry.schema, entry.def]) {\n const rewritten = carrier && rewrites.get(carrier.propertyNames);\n if (rewritten)\n carrier.propertyNames = rewritten;\n }\n }\n}\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties. This correctly represents \"only validate keys matching the pattern\" semantics and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n assignProp(json.patternProperties, pattern.source, valueSchema);\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n let pending = pendingRecords.get(ctx);\n if (!pending) {\n pending = [];\n pendingRecords.set(ctx, pending);\n ctx.deferred.push(() => rewriteKeyNames(ctx));\n }\n pending.push(schema);\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n // Every key shares one value schema, so an optional-in value makes the whole key set omittable on input. Output keeps them: the exhaustive branch assigns every key, even one whose value came back undefined.\n const omittableOnInput = ctx.io === \"input\" && inputOptin(def.valueType) !== undefined;\n if (keyValues && !def.partial && !omittableOnInput) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues.map(String);\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\n/** Round-trips a default value through JSON so the emitted schema is guaranteed to be valid JSON.\n * A BigInt has no reliable encoding, so it goes through `unrepresentable` like any other\n * unrepresentable value. Returns a sentinel when the caller must not write a default of its own. */\nconst UNREPRESENTABLE_DEFAULT = Symbol();\nfunction serializeDefaultValue(value, schema, ctx, json, params) {\n let unrepresentable = false;\n const serialized = JSON.stringify(value, (_, val) => {\n if (typeof val !== \"bigint\")\n return val;\n unrepresentable = true;\n return null;\n });\n if (!unrepresentable)\n return JSON.parse(serialized);\n handleUnrepresentable(schema, ctx, json, params, \"BigInt defaults cannot be represented in JSON Schema\");\n return UNREPRESENTABLE_DEFAULT;\n}\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n if (value !== UNREPRESENTABLE_DEFAULT)\n json.default = value;\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io !== \"input\")\n return;\n const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n if (value !== UNREPRESENTABLE_DEFAULT)\n json._prefault = value;\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n handleUnrepresentable(schema, ctx, json, params, \"Dynamic catch values are not supported in JSON Schema\");\n return;\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const inIsTransform = def.in._zod.traits.has(\"$ZodTransform\");\n const innerType = ctx.io === \"input\" ? (inIsTransform ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n assignProp(schemas, key, finalize(ctx, schema));\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n","import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\n/* Prototypes that already carry the lazy helper methods. Seeded with the\n * intrinsics so that `init` on a foreign object — it accepts any object —\n * can never install an accessor onto a prototype we do not own. */\nconst _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);\n/* Helper methods live as non-enumerable lazy getters on the shared\n * prototype instead of own properties on every instance. On first\n * access the getter allocates the per-instance closure and caches it\n * as a non-enumerable own property, so detached usage still works and\n * the allocation only happens for methods actually touched. */\nfunction _lazyMethod(proto, key, make) {\n Object.defineProperty(proto, key, {\n configurable: true,\n enumerable: false,\n get() {\n const value = make(this);\n Object.defineProperty(this, key, { value, configurable: true, writable: true });\n return value;\n },\n set(value) {\n Object.defineProperty(this, key, { value, configurable: true, writable: true });\n },\n });\n}\nconst initializer = (inst, issues) => {\n $ZodError.init(inst, issues);\n inst.name = \"ZodError\";\n const proto = Object.getPrototypeOf(inst);\n if (_installedErrorProtos.has(proto))\n return;\n _installedErrorProtos.add(proto);\n _lazyMethod(proto, \"format\", (self) => (mapper) => core.formatError(self, mapper));\n _lazyMethod(proto, \"flatten\", (self) => (mapper) => core.flattenError(self, mapper));\n _lazyMethod(proto, \"addIssue\", (self) => (issue) => {\n self.issues.push(issue);\n self.message = JSON.stringify(self.issues, util.jsonStringifyReplacer, 2);\n });\n _lazyMethod(proto, \"addIssues\", (self) => (issues) => {\n self.issues.push(...issues);\n self.message = JSON.stringify(self.issues, util.jsonStringifyReplacer, 2);\n });\n Object.defineProperty(proto, \"isEmpty\", {\n configurable: true,\n enumerable: false,\n get() {\n return this.issues.length === 0;\n },\n });\n};\nexport const ZodError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer, undefined, {\n Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n","import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\nexport { validate, validateAsync } from \"../core/index.js\";\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n","import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport en from \"../locales/en.js\";\nimport * as checks from \"./checks.js\";\nimport * as parse from \"./parse.js\";\n// Register English as the default locale on first ZodType construction. Hooked into the `ZodType` `$constructor` (rather than a top-level `config(en())` in `external.ts`) so bundlers honoring `sideEffects: false` can't tree-shake it out — see #5953, #5725. An explicit `z.config(z.locales.xx())` call wins regardless of order, since this only sets the default when none is present.\nfunction _ensureDefaultLocale() {\n if (!core.globalConfig.localeError)\n core.config(en());\n}\n// the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first\nfunction _ensureDefaultMemoizer() {\n if (!core.globalConfig.memoizer)\n core.config({ memoizer: core.memoizer() });\n}\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n _ensureDefaultLocale();\n core.$ZodType.init(inst, def);\n inst.def = def;\n inst.type = def.type;\n return inst;\n}, {\n check(...chks) {\n const def = this.def;\n return this.clone(util.mergeDefs(def, {\n checks: [\n ...(def.checks ?? []),\n ...chks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }), { parent: true });\n },\n with(...chks) {\n return this.check(...chks);\n },\n clone(def, params) {\n return core.clone(this, def, params);\n },\n brand() {\n return this;\n },\n register(reg, meta) {\n reg.add(this, meta);\n return this;\n },\n refine(check, params) {\n return this.check(refine(check, params));\n },\n superRefine(refinement, params) {\n return this.check(superRefine(refinement, params));\n },\n overwrite(fn) {\n return this.check(checks.overwrite(fn));\n },\n optional() {\n return optional(this);\n },\n exactOptional() {\n return exactOptional(this);\n },\n nullable() {\n return nullable(this);\n },\n nullish() {\n return optional(nullable(this));\n },\n nonoptional(params) {\n return nonoptional(this, params);\n },\n array() {\n return array(this);\n },\n or(arg) {\n return union([this, arg]);\n },\n and(arg) {\n return intersection(this, arg);\n },\n transform(tx) {\n return pipe(this, transform(tx));\n },\n default(d) {\n return _default(this, d);\n },\n prefault(d) {\n return prefault(this, d);\n },\n catch(params) {\n return _catch(this, params);\n },\n pipe(target) {\n return pipe(this, target);\n },\n readonly() {\n return readonly(this);\n },\n describe(description) {\n const cl = this.clone();\n core.globalRegistry.add(cl, { description });\n return cl;\n },\n meta(...args) {\n // overloaded: meta() returns the registered metadata, meta(data) returns a clone with `data` registered. The mapped type picks up the second overload, so we accept variadic any-args and return `any` to satisfy both at runtime.\n if (args.length === 0)\n return core.globalRegistry.get(this);\n const cl = this.clone();\n core.globalRegistry.add(cl, args[0]);\n return cl;\n },\n isOptional() {\n return this.safeParse(undefined).success;\n },\n isNullable() {\n return this.safeParse(null).success;\n },\n apply(fn, ...args) {\n return args.length === 0 ? fn(this) : fn(this, ...args);\n },\n // Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.\n get \"~standard\"() {\n return util.hide(this, \"~standard\", {\n ...core.standardProps(this),\n jsonSchema: {\n input: createStandardJSONSchemaMethod(this, \"input\"),\n output: createStandardJSONSchemaMethod(this, \"output\"),\n },\n });\n },\n set \"~standard\"(value) {\n util.own(this, \"~standard\", value);\n },\n parse: function _parse(data, params) {\n return parse.parse(this, data, params, { callee: _parse });\n },\n parseAsync: async function _parseAsync(data, params) {\n return await parse.parseAsync(this, data, params, { callee: _parseAsync });\n },\n safeParse(data, params) {\n return parse.safeParse(this, data, params);\n },\n async safeParseAsync(data, params) {\n return parse.safeParseAsync(this, data, params);\n },\n // `spa` is an alias: same function object as `safeParseAsync`, as before.\n get spa() {\n return this?.safeParseAsync;\n },\n set spa(value) {\n util.own(this, \"spa\", value);\n },\n encode: function _encode(data, params) {\n return parse.encode(this, data, params, { callee: _encode });\n },\n decode: function _decode(data, params) {\n return parse.decode(this, data, params, { callee: _decode });\n },\n encodeAsync: async function _encodeAsync(data, params) {\n return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });\n },\n decodeAsync: async function _decodeAsync(data, params) {\n return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });\n },\n safeEncode(data, params) {\n return parse.safeEncode(this, data, params);\n },\n safeDecode(data, params) {\n return parse.safeDecode(this, data, params);\n },\n async safeEncodeAsync(data, params) {\n return parse.safeEncodeAsync(this, data, params);\n },\n async safeDecodeAsync(data, params) {\n return parse.safeDecodeAsync(this, data, params);\n },\n toJSONSchema(params) {\n return createToJSONSchemaMethod(this, {})(params);\n },\n // Reads through to the registry on every access, so it must not cache.\n get description() {\n return core.globalRegistry.get(this)?.description;\n },\n // No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.\n get _def() {\n return this._zod.def;\n },\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.format = bag.format ?? null;\n inst.minLength = bag.minimum ?? null;\n inst.maxLength = bag.maximum ?? null;\n}, {\n regex(...args) {\n return this.check(checks.regex(...args));\n },\n includes(...args) {\n return this.check(checks.includes(...args));\n },\n startsWith(...args) {\n return this.check(checks.startsWith(...args));\n },\n endsWith(...args) {\n return this.check(checks.endsWith(...args));\n },\n min(...args) {\n return this.check(checks.minLength(...args));\n },\n max(...args) {\n return this.check(checks.maxLength(...args));\n },\n length(...args) {\n return this.check(checks.length(...args));\n },\n nonempty(...args) {\n return this.check(checks.minLength(1, ...args));\n },\n lowercase(params) {\n return this.check(checks.lowercase(params));\n },\n uppercase(params) {\n return this.check(checks.uppercase(params));\n },\n trim() {\n return this.check(checks.trim());\n },\n normalize(...args) {\n return this.check(checks.normalize(...args));\n },\n toLowerCase() {\n return this.check(checks.toLowerCase());\n },\n toUpperCase() {\n return this.check(checks.toUpperCase());\n },\n slugify() {\n return this.check(checks.slugify());\n },\n});\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n _ZodString.init(inst, def);\n}, {\n email(params) {\n return this.check(core._email(ZodEmail, params));\n },\n url(params) {\n return this.check(core._url(ZodURL, params));\n },\n jwt(params) {\n return this.check(core._jwt(ZodJWT, params));\n },\n emoji(params) {\n return this.check(core._emoji(ZodEmoji, params));\n },\n guid(params) {\n return this.check(core._guid(ZodGUID, params));\n },\n uuid(params) {\n return this.check(core._uuid(ZodUUID, params));\n },\n uuidv4(params) {\n return this.check(core._uuidv4(ZodUUID, params));\n },\n uuidv6(params) {\n return this.check(core._uuidv6(ZodUUID, params));\n },\n uuidv7(params) {\n return this.check(core._uuidv7(ZodUUID, params));\n },\n nanoid(params) {\n return this.check(core._nanoid(ZodNanoID, params));\n },\n cuid(params) {\n return this.check(core._cuid(ZodCUID, params));\n },\n cuid2(params) {\n return this.check(core._cuid2(ZodCUID2, params));\n },\n ulid(params) {\n return this.check(core._ulid(ZodULID, params));\n },\n base64(params) {\n return this.check(core._base64(ZodBase64, params));\n },\n base64url(params) {\n return this.check(core._base64url(ZodBase64URL, params));\n },\n xid(params) {\n return this.check(core._xid(ZodXID, params));\n },\n ksuid(params) {\n return this.check(core._ksuid(ZodKSUID, params));\n },\n ipv4(params) {\n return this.check(core._ipv4(ZodIPv4, params));\n },\n ipv6(params) {\n return this.check(core._ipv6(ZodIPv6, params));\n },\n cidrv4(params) {\n return this.check(core._cidrv4(ZodCIDRv4, params));\n },\n cidrv6(params) {\n return this.check(core._cidrv6(ZodCIDRv6, params));\n },\n e164(params) {\n return this.check(core._e164(ZodE164, params));\n },\n datetime(params) {\n return this.check(core._isoDateTime(ZodISODateTime, params));\n },\n date(params) {\n return this.check(core._isoDate(ZodISODate, params));\n },\n time(params) {\n return this.check(core._isoTime(ZodISOTime, params));\n },\n duration(params) {\n return this.check(core._isoDuration(ZodISODuration, params));\n },\n});\nexport function string(params) {\n return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n _ZodString.init(inst, def);\n});\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n core.$ZodISODateTime.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n core.$ZodISODate.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n core.$ZodISOTime.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n core.$ZodISODuration.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmail.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodGUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodUUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodURL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n return core._url(ZodURL, {\n protocol: core.regexes.httpProtocol,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodEmoji.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodNanoID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n return core._nanoid(ZodNanoID, params);\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\n/**\n * Validates a CUID v1 string.\n *\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport function cuid(params) {\n return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCUID2.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodULID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodXID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodKSUID.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodMAC.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodIPv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodBase64URL.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodE164.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n return core._e164(ZodE164, params);\n}\nexport const ZodCreditCard = /*@__PURE__*/ core.$constructor(\"ZodCreditCard\", (inst, def) => {\n core.$ZodCreditCard.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function creditCard(params) {\n return core._creditCard(ZodCreditCard, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodJWT.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n // ZodStringFormat.init(inst, def);\n core.$ZodCustomStringFormat.init(inst, def);\n ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\nexport function hex(_params) {\n return core._stringFormat(ZodCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.minValue =\n Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;\n inst.maxValue =\n Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;\n inst.isInt = (bag.format ?? \"\").includes(\"int\") || Number.isSafeInteger(bag.multipleOf ?? 0.5);\n inst.isFinite = true;\n inst.format = bag.format ?? null;\n}, {\n gt(value, params) {\n return this.check(checks.gt(value, params));\n },\n gte(value, params) {\n return this.check(checks.gte(value, params));\n },\n min(value, params) {\n return this.check(checks.gte(value, params));\n },\n lt(value, params) {\n return this.check(checks.lt(value, params));\n },\n lte(value, params) {\n return this.check(checks.lte(value, params));\n },\n max(value, params) {\n return this.check(checks.lte(value, params));\n },\n int(params) {\n return this.check(int(params));\n },\n safe(params) {\n return this.check(int(params));\n },\n positive(params) {\n return this.check(checks.gt(0, params));\n },\n nonnegative(params) {\n return this.check(checks.gte(0, params));\n },\n negative(params) {\n return this.check(checks.lt(0, params));\n },\n nonpositive(params) {\n return this.check(checks.lte(0, params));\n },\n multipleOf(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n step(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n finite() {\n return this;\n },\n});\nexport function number(params) {\n return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodNumber.init(inst, def);\n});\nexport function int(params) {\n return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n const bag = inst._zod.bag;\n inst.minValue = bag.minimum ?? null;\n inst.maxValue = bag.maximum ?? null;\n inst.format = bag.format ?? null;\n}, {\n gte(value, params) {\n return this.check(checks.gte(value, params));\n },\n min(value, params) {\n return this.check(checks.gte(value, params));\n },\n gt(value, params) {\n return this.check(checks.gt(value, params));\n },\n lt(value, params) {\n return this.check(checks.lt(value, params));\n },\n lte(value, params) {\n return this.check(checks.lte(value, params));\n },\n max(value, params) {\n return this.check(checks.lte(value, params));\n },\n positive(params) {\n return this.check(checks.gt(BigInt(0), params));\n },\n negative(params) {\n return this.check(checks.lt(BigInt(0), params));\n },\n nonpositive(params) {\n return this.check(checks.lte(BigInt(0), params));\n },\n nonnegative(params) {\n return this.check(checks.gte(BigInt(0), params));\n },\n multipleOf(value, params) {\n return this.check(checks.multipleOf(value, params));\n },\n});\nexport function bigint(params) {\n return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodBigInt.init(inst, def);\n});\nexport function int64(params) {\n return core._int64(ZodBigIntFormat, params);\n}\nexport function uint64(params) {\n return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n inst.min = (value, params) => inst.check(checks.gte(value, params));\n inst.max = (value, params) => inst.check(checks.lte(value, params));\n const c = inst._zod.bag;\n inst.minDate = c.minimum ? new Date(c.minimum) : null;\n inst.maxDate = c.maximum ? new Date(c.maximum) : null;\n});\nexport function date(params) {\n return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodArray.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n inst.element = def.element;\n}, {\n min(n, params) {\n return this.check(checks.minLength(n, params));\n },\n nonempty(params) {\n return this.check(checks.minLength(1, params));\n },\n max(n, params) {\n return this.check(checks.maxLength(n, params));\n },\n length(n, params) {\n return this.check(checks.length(n, params));\n },\n unwrap() {\n return this.element;\n },\n});\nexport function array(element, params) {\n return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodObjectJIT.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n util.installLazyProp(inst, \"shape\", (self) => self._zod.def.shape, false);\n}, {\n keyof() {\n return _enum(Object.keys(this._zod.def.shape));\n },\n catchall(catchall) {\n return this.clone({ ...this._zod.def, catchall: catchall });\n },\n passthrough() {\n return this.clone({ ...this._zod.def, catchall: unknown() });\n },\n loose() {\n return this.clone({ ...this._zod.def, catchall: unknown() });\n },\n strict() {\n return this.clone({ ...this._zod.def, catchall: never() });\n },\n strip() {\n return this.clone({ ...this._zod.def, catchall: undefined });\n },\n extend(incoming) {\n return util.extend(this, incoming);\n },\n safeExtend(incoming) {\n return util.safeExtend(this, incoming);\n },\n merge(other) {\n return util.merge(this, other);\n },\n pick(mask) {\n return util.pick(this, mask);\n },\n omit(mask) {\n return util.omit(this, mask);\n },\n partial(...args) {\n return util.partial(ZodOptional, this, args[0]);\n },\n exactPartial(...args) {\n return util.partial(ZodExactOptional, this, args[0], \"exactPartial\");\n },\n required(...args) {\n return util.required(ZodNonOptional, this, args[0]);\n },\n});\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\nexport function looseObject(shape, params) {\n return new ZodObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\nexport function union(options, params) {\n return new ZodUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n ZodUnion.init(inst, def);\n core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n // const [options, params] = args;\n return new ZodDiscriminatedUnion({\n type: \"union\",\n options: options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n return new ZodIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodTuple.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n}, {\n rest(rest) {\n return this.clone({\n ...this._zod.def,\n rest: rest,\n });\n },\n partial() {\n const def = this._zod.def;\n // a refinement was authored against the full arity; partialing would run it on a shorter array\n if (def.checks?.length)\n throw new Error(\".partial() cannot be used on tuple schemas containing refinements\");\n return this.clone({\n ...def,\n items: def.items.map((item) => new ZodOptional({ type: \"optional\", innerType: item })),\n });\n },\n});\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodRecord.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n // v3-compat: z.record(valueType, params?) — defaults keyType to z.string()\n if (!valueType || !valueType._zod) {\n return new ZodRecord({\n type: \"record\",\n keyType: string(),\n valueType: keyType,\n ...util.normalizeParams(valueType),\n });\n }\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// type alksjf = core.output<core.$ZodRecordKey>;\nexport function partialRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n partial: true,\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodMap.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n inst.keyType = def.keyType;\n inst.valueType = def.valueType;\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n return new ZodMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodSet.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n inst.min = (...args) => inst.check(core._minSize(...args));\n inst.nonempty = (params) => inst.check(core._minSize(1, params));\n inst.max = (...args) => inst.check(core._maxSize(...args));\n inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n return new ZodSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n inst.enum = def.entries;\n inst.options = Object.values(def.entries);\n const keys = new Set(Object.keys(def.entries));\n inst.extract = (values, params) => {\n const newEntries = {};\n for (const value of values) {\n if (keys.has(value)) {\n newEntries[value] = def.entries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n inst.exclude = (values, params) => {\n const newEntries = { ...def.entries };\n for (const value of values) {\n if (keys.has(value)) {\n delete newEntries[value];\n }\n else\n throw new Error(`Key ${value} not found in enum`);\n }\n return new ZodEnum({\n ...def,\n checks: [],\n ...util.normalizeParams(params),\n entries: newEntries,\n });\n };\n});\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n inst.values = new Set(def.values);\n Object.defineProperty(inst, \"value\", {\n get() {\n if (def.values.length > 1) {\n throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n }\n return def.values[0];\n },\n });\n});\nexport function literal(value, params) {\n return new ZodLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n inst.min = (size, params) => inst.check(core._minSize(size, params));\n inst.max = (size, params) => inst.check(core._maxSize(size, params));\n inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n _ensureDefaultMemoizer();\n core.$ZodTransform.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n inst._zod.parse = (payload, _ctx) => {\n if (_ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n if (!(\"input\" in _issue))\n _issue.input = payload.value;\n _issue.inst ?? (_issue.inst = inst);\n // _issue.continue ??= true;\n payload.issues.push(util.issue(_issue));\n }\n };\n const output = def.transform(payload.value, payload);\n if (output instanceof Promise) {\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n payload.value = output;\n return payload;\n };\n});\nexport function transform(fn) {\n return new ZodTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n return new ZodOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n return new ZodExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n return new ZodNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n return new ZodDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n return new ZodPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n return new ZodNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n return new ZodSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n return new ZodCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : core.util.constantCatch(catchValue)),\n });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n inst.in = def.in;\n inst.out = def.out;\n});\nexport function pipe(in_, out) {\n return new ZodPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n // ...util.normalizeParams(params),\n });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n return new ZodCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport function invertCodec(codec) {\n const def = codec._zod.def;\n return new ZodCodec({\n type: \"pipe\",\n in: def.out,\n out: def.in,\n transform: def.reverseTransform,\n reverseTransform: def.transform,\n });\n}\nexport const ZodPreprocess = /*@__PURE__*/ core.$constructor(\"ZodPreprocess\", (inst, def) => {\n ZodPipe.init(inst, def);\n core.$ZodPreprocess.init(inst, def);\n});\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n return new ZodReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n return new ZodTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n return new ZodLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n return new ZodPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n return new ZodFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodType.init(inst, def);\n inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n // ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\nexport function custom(fn, _params) {\n return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn, params) {\n return core._superRefine(fn, params);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nfunction _instanceof(cls, params = {}) {\n const inst = new ZodCustom({\n type: \"custom\",\n check: \"custom\",\n fn: (data) => data instanceof cls,\n abort: true,\n ...util.normalizeParams(params),\n });\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodCodec,\n Boolean: ZodBoolean,\n String: ZodString,\n}, ...args);\nexport function json(params) {\n const jsonSchema = lazy(() => {\n return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\n// preprocess\nexport function preprocess(fn, schema) {\n return new ZodPreprocess({\n type: \"pipe\",\n in: transform(fn),\n out: schema,\n });\n}\n","// Zod 3 compat layer\nimport * as core from \"../core/index.js\";\n/** @deprecated Use the raw string literal codes instead, e.g. \"invalid_type\". */\nexport const ZodIssueCode = {\n invalid_type: \"invalid_type\",\n too_big: \"too_big\",\n too_small: \"too_small\",\n invalid_format: \"invalid_format\",\n not_multiple_of: \"not_multiple_of\",\n unrecognized_keys: \"unrecognized_keys\",\n invalid_union: \"invalid_union\",\n invalid_key: \"invalid_key\",\n invalid_element: \"invalid_element\",\n invalid_value: \"invalid_value\",\n custom: \"custom\",\n};\nexport { $brand, config } from \"../core/index.js\";\n/** @deprecated Use `z.config(params)` instead. */\nexport function setErrorMap(map) {\n core.config({\n customError: map,\n });\n}\n/** @deprecated Use `z.config()` instead. */\nexport function getErrorMap() {\n return core.config().customError;\n}\n/** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n","import * as core from \"../core/index.js\";\nimport { ZodISODate, ZodISODateTime, ZodISODuration, ZodISOTime } from \"./schemas.js\";\nexport { ZodISODate, ZodISODateTime, ZodISODuration, ZodISOTime } from \"./schemas.js\";\nexport function datetime(params) {\n return core._isoDateTime(ZodISODateTime, params);\n}\nexport function date(params) {\n return core._isoDate(ZodISODate, params);\n}\nexport function time(params) {\n return core._isoTime(ZodISOTime, params);\n}\nexport function duration(params) {\n return core._isoDuration(ZodISODuration, params);\n}\n","import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport function string(params) {\n return core._coercedString(schemas.ZodString, params);\n}\nexport function number(params) {\n return core._coercedNumber(schemas.ZodNumber, params);\n}\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodBoolean, params);\n}\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodBigInt, params);\n}\nexport function date(params) {\n return core._coercedDate(schemas.ZodDate, params);\n}\n","import * as z from \"zod/v4\";\n\n//#region src/constants.ts\nconst LATEST_PROTOCOL_VERSION = \"2025-11-25\";\nconst DEFAULT_NEGOTIATED_PROTOCOL_VERSION = \"2025-03-26\";\nconst SUPPORTED_PROTOCOL_VERSIONS = [\n\tLATEST_PROTOCOL_VERSION,\n\t\"2025-06-18\",\n\t\"2025-03-26\",\n\t\"2024-11-05\",\n\t\"2024-10-07\"\n];\n/**\n* `_meta` key associating a message with a 2025-11-25 task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst RELATED_TASK_META_KEY = \"io.modelcontextprotocol/related-task\";\n/**\n* `_meta` key carrying the MCP protocol version governing a request.\n*\n* For the HTTP transport, the value must match the `MCP-Protocol-Version` header.\n*/\nconst PROTOCOL_VERSION_META_KEY = \"io.modelcontextprotocol/protocolVersion\";\n/**\n* `_meta` key identifying the client software making a request.\n*\n* Clients SHOULD include it on every request; the value is self-reported and\n* intended for display, logging, and debugging — servers should not rely on\n* it for behavior or security decisions.\n*/\nconst CLIENT_INFO_META_KEY = \"io.modelcontextprotocol/clientInfo\";\n/**\n* `_meta` key identifying the server software producing a response.\n*\n* Servers SHOULD include it on every response; the value is self-reported and\n* intended for display, logging, and debugging — clients should not rely on\n* it for behavior or security decisions.\n*/\nconst SERVER_INFO_META_KEY = \"io.modelcontextprotocol/serverInfo\";\n/**\n* `_meta` key carrying the client's capabilities for a request.\n*\n* Capabilities are declared per request rather than once at initialization;\n* servers must not infer capabilities from prior requests.\n*/\nconst CLIENT_CAPABILITIES_META_KEY = \"io.modelcontextprotocol/clientCapabilities\";\n/**\n* `_meta` key carrying the JSON-RPC ID of the `subscriptions/listen` request\n* that opened the stream a notification was delivered on.\n*\n* Stamped by the server on every notification delivered via a\n* `subscriptions/listen` stream (including the leading\n* `notifications/subscriptions/acknowledged`); on stdio, where all messages\n* share one channel, clients use it to correlate notifications with their\n* originating subscription. The value is the listen request's JSON-RPC ID\n* verbatim.\n*/\nconst SUBSCRIPTION_ID_META_KEY = \"io.modelcontextprotocol/subscriptionId\";\n/**\n* `_meta` key carrying the desired log level for a request.\n*\n* When absent, the server must not send `notifications/message` notifications\n* for the request.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months.\n*/\nconst LOG_LEVEL_META_KEY = \"io.modelcontextprotocol/logLevel\";\n/**\n* `_meta` key carrying W3C Trace Context for distributed tracing (SEP-414).\n*\n* When present, the value MUST follow the W3C `traceparent` header format,\n* e.g. `00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01`.\n*\n* @see https://www.w3.org/TR/trace-context/#traceparent-header\n*/\nconst TRACEPARENT_META_KEY = \"traceparent\";\n/**\n* `_meta` key carrying vendor-specific trace state for distributed tracing (SEP-414).\n*\n* When present, the value MUST follow the W3C `tracestate` header format,\n* e.g. `vendor1=value1,vendor2=value2`.\n*\n* @see https://www.w3.org/TR/trace-context/#tracestate-header\n*/\nconst TRACESTATE_META_KEY = \"tracestate\";\n/**\n* `_meta` key carrying cross-cutting propagation values for distributed tracing (SEP-414).\n*\n* When present, the value MUST follow the W3C Baggage header format,\n* e.g. `userId=alice,serverRegion=us-east-1`.\n*\n* @see https://www.w3.org/TR/baggage/\n*/\nconst BAGGAGE_META_KEY = \"baggage\";\nconst JSONRPC_VERSION = \"2.0\";\nconst PARSE_ERROR = -32700;\nconst INVALID_REQUEST = -32600;\nconst METHOD_NOT_FOUND = -32601;\nconst INVALID_PARAMS = -32602;\nconst INTERNAL_ERROR = -32603;\n\n//#endregion\n//#region src/schemas.ts\nconst JSONValueSchema = z.lazy(() => z.union([\n\tz.string(),\n\tz.number(),\n\tz.boolean(),\n\tz.null(),\n\tz.record(z.string(), JSONValueSchema),\n\tz.array(JSONValueSchema)\n]));\nconst JSONObjectSchema = z.record(z.string(), JSONValueSchema);\nconst JSONArraySchema = z.array(JSONValueSchema);\n/**\n* A progress token, used to associate progress notifications with the original request.\n*/\nconst ProgressTokenSchema = z.union([z.string(), z.number().int()]);\n/**\n* An opaque token used to represent a cursor for pagination.\n*/\nconst CursorSchema = z.string();\n/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\nconst TaskMetadataSchema = z.object({ ttl: z.number().optional() });\n/**\n* Metadata for associating messages with a task.\n* Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst RelatedTaskMetadataSchema = z.object({ taskId: z.string() });\nconst RequestMetaSchema = z.looseObject({\n\tprogressToken: ProgressTokenSchema.optional(),\n\t[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()\n});\n/**\n* Common params for any request.\n*/\nconst BaseRequestParamsSchema = z.object({ _meta: RequestMetaSchema.optional() });\n/**\n* Common params for any task-augmented request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({ task: TaskMetadataSchema.optional() });\nconst RequestSchema = z.object({\n\tmethod: z.string(),\n\tparams: BaseRequestParamsSchema.loose().optional()\n});\nconst NotificationsParamsSchema = z.object({ _meta: RequestMetaSchema.optional() });\nconst NotificationSchema = z.object({\n\tmethod: z.string(),\n\tparams: NotificationsParamsSchema.loose().optional()\n});\n/**\n* The contents of a result's `_meta` field (the 2026-07-28 `ResultMetaObject`).\n* Loose — implementation-specific keys pass through.\n*\n* The serverInfo key identifies the server software producing the response\n* (servers SHOULD include it on every response; the value is self-reported\n* and intended for display, logging, and debugging). The getter defers the\n* `ImplementationSchema` reference, which is declared later in this file.\n*/\nconst ResultMetaObjectSchema = z.looseObject({ get [SERVER_INFO_META_KEY]() {\n\treturn ImplementationSchema.optional().catch(void 0);\n} });\nconst ResultSchema = z.looseObject({ _meta: ResultMetaObjectSchema.optional() });\n/**\n* A uniquely identifying ID for a request in JSON-RPC.\n*/\nconst RequestIdSchema = z.union([z.string(), z.number().int()]);\n/**\n* A request that expects a response.\n*/\nconst JSONRPCRequestSchema = z.object({\n\tjsonrpc: z.literal(JSONRPC_VERSION),\n\tid: RequestIdSchema,\n\t...RequestSchema.shape\n}).strict();\n/**\n* A notification which does not expect a response.\n*/\nconst JSONRPCNotificationSchema = z.object({\n\tjsonrpc: z.literal(JSONRPC_VERSION),\n\t...NotificationSchema.shape\n}).strict();\n/**\n* A successful (non-error) response to a request.\n*/\nconst JSONRPCResultResponseSchema = z.object({\n\tjsonrpc: z.literal(JSONRPC_VERSION),\n\tid: RequestIdSchema,\n\tresult: ResultSchema\n}).strict();\n/**\n* A response to a request that indicates an error occurred.\n*/\nconst JSONRPCErrorResponseSchema = z.object({\n\tjsonrpc: z.literal(JSONRPC_VERSION),\n\tid: RequestIdSchema.optional(),\n\terror: z.object({\n\t\tcode: z.number().int(),\n\t\tmessage: z.string(),\n\t\tdata: z.unknown().optional()\n\t})\n}).strict();\nconst JSONRPCMessageSchema = z.union([\n\tJSONRPCRequestSchema,\n\tJSONRPCNotificationSchema,\n\tJSONRPCResultResponseSchema,\n\tJSONRPCErrorResponseSchema\n]);\nconst JSONRPCResponseSchema = z.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);\n/**\n* A response that indicates success but carries no data.\n*/\nconst EmptyResultSchema = ResultSchema.strict();\nconst CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({\n\trequestId: RequestIdSchema.optional(),\n\treason: z.string().optional()\n});\n/**\n* This notification can be sent by either side to indicate that it is cancelling a previously-issued request.\n*\n* The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.\n*\n* This notification indicates that the result will be unused, so any associated processing SHOULD cease.\n*\n* A client MUST NOT attempt to cancel its {@linkcode InitializeRequest | initialize} request.\n*/\nconst CancelledNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/cancelled\"),\n\tparams: CancelledNotificationParamsSchema\n});\n/**\n* Icon schema for use in {@link Tool | tools}, {@link Prompt | prompts}, {@link Resource | resources}, and {@link Implementation | implementations}.\n*/\nconst IconSchema = z.object({\n\tsrc: z.string(),\n\tmimeType: z.string().optional(),\n\tsizes: z.array(z.string()).optional(),\n\ttheme: z.enum([\"light\", \"dark\"]).optional()\n});\n/**\n* Base schema to add `icons` property.\n*\n*/\nconst IconsSchema = z.object({ icons: z.array(IconSchema).optional() });\n/**\n* Base metadata interface for common properties across {@link Resource | resources}, {@link Tool | tools}, {@link Prompt | prompts}, and {@link Implementation | implementations}.\n*/\nconst BaseMetadataSchema = z.object({\n\tname: z.string(),\n\ttitle: z.string().optional()\n});\n/**\n* Describes the name and version of an MCP implementation.\n*/\nconst ImplementationSchema = BaseMetadataSchema.extend({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\tversion: z.string(),\n\twebsiteUrl: z.string().optional(),\n\tdescription: z.string().optional()\n});\nconst FormElicitationCapabilitySchema = z.intersection(z.object({ applyDefaults: z.boolean().optional() }), JSONObjectSchema);\nconst ElicitationCapabilitySchema = z.preprocess((value) => {\n\tif (value && typeof value === \"object\" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };\n\treturn value;\n}, z.intersection(z.object({\n\tform: FormElicitationCapabilitySchema.optional(),\n\turl: JSONObjectSchema.optional()\n}), JSONObjectSchema.optional()));\n/**\n* Task capabilities for clients, indicating which request types support task creation.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst ClientTasksCapabilitySchema = z.looseObject({\n\tlist: JSONObjectSchema.optional(),\n\tcancel: JSONObjectSchema.optional(),\n\trequests: z.looseObject({\n\t\tsampling: z.looseObject({ createMessage: JSONObjectSchema.optional() }).optional(),\n\t\telicitation: z.looseObject({ create: JSONObjectSchema.optional() }).optional()\n\t}).optional()\n});\n/**\n* Task capabilities for servers, indicating which request types support task creation.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst ServerTasksCapabilitySchema = z.looseObject({\n\tlist: JSONObjectSchema.optional(),\n\tcancel: JSONObjectSchema.optional(),\n\trequests: z.looseObject({ tools: z.looseObject({ call: JSONObjectSchema.optional() }).optional() }).optional()\n});\n/**\n* Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.\n*/\nconst ClientCapabilitiesSchema = z.object({\n\texperimental: z.record(z.string(), JSONObjectSchema).optional(),\n\tsampling: z.object({\n\t\tcontext: JSONObjectSchema.optional(),\n\t\ttools: JSONObjectSchema.optional()\n\t}).optional(),\n\telicitation: ElicitationCapabilitySchema.optional(),\n\troots: z.object({ listChanged: z.boolean().optional() }).optional(),\n\ttasks: ClientTasksCapabilitySchema.optional(),\n\textensions: z.record(z.string(), JSONObjectSchema).optional()\n});\nconst InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({\n\tprotocolVersion: z.string(),\n\tcapabilities: ClientCapabilitiesSchema,\n\tclientInfo: ImplementationSchema\n});\n/**\n* This request is sent from the client to the server when it first connects, asking it to begin initialization.\n*/\nconst InitializeRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"initialize\"),\n\tparams: InitializeRequestParamsSchema\n});\n/**\n* Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.\n*/\nconst ServerCapabilitiesSchema = z.object({\n\texperimental: z.record(z.string(), JSONObjectSchema).optional(),\n\tlogging: JSONObjectSchema.optional(),\n\tcompletions: JSONObjectSchema.optional(),\n\tprompts: z.object({ listChanged: z.boolean().optional() }).optional(),\n\tresources: z.object({\n\t\tsubscribe: z.boolean().optional(),\n\t\tlistChanged: z.boolean().optional()\n\t}).optional(),\n\ttools: z.object({ listChanged: z.boolean().optional() }).optional(),\n\ttasks: ServerTasksCapabilitySchema.optional(),\n\textensions: z.record(z.string(), JSONObjectSchema).optional()\n});\n/**\n* After receiving an initialize request from the client, the server sends this response.\n*/\nconst InitializeResultSchema = ResultSchema.extend({\n\tprotocolVersion: z.string(),\n\tcapabilities: ServerCapabilitiesSchema,\n\tserverInfo: ImplementationSchema,\n\tinstructions: z.string().optional()\n});\n/**\n* This notification is sent from the client to the server after initialization has finished.\n*/\nconst InitializedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/initialized\"),\n\tparams: NotificationsParamsSchema.optional()\n});\n/**\n* A request from the client asking the server to advertise its supported protocol\n* versions, capabilities, and other metadata (protocol revision 2026-07-28). Servers\n* MUST implement `server/discover`. Clients MAY call it but are not required to —\n* version negotiation can also happen inline via the per-request `_meta` envelope.\n*/\nconst DiscoverRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"server/discover\"),\n\tparams: BaseRequestParamsSchema.optional()\n});\n/**\n* The result returned by the server for a `server/discover` request.\n*/\nconst DiscoverResultSchema = ResultSchema.extend({\n\tsupportedVersions: z.array(z.string()),\n\tcapabilities: ServerCapabilitiesSchema,\n\tinstructions: z.string().optional()\n});\n/**\n* A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.\n*/\nconst PingRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"ping\"),\n\tparams: BaseRequestParamsSchema.optional()\n});\nconst ProgressSchema = z.object({\n\tprogress: z.number(),\n\ttotal: z.optional(z.number()),\n\tmessage: z.optional(z.string())\n});\nconst ProgressNotificationParamsSchema = z.object({\n\t...NotificationsParamsSchema.shape,\n\t...ProgressSchema.shape,\n\tprogressToken: ProgressTokenSchema\n});\n/**\n* An out-of-band notification used to inform the receiver of a progress update for a long-running request.\n*\n* @category notifications/progress\n*/\nconst ProgressNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/progress\"),\n\tparams: ProgressNotificationParamsSchema\n});\nconst PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({ cursor: CursorSchema.optional() });\nconst PaginatedRequestSchema = RequestSchema.extend({ params: PaginatedRequestParamsSchema.optional() });\nconst PaginatedResultSchema = ResultSchema.extend({ nextCursor: CursorSchema.optional() });\n/**\n* The contents of a specific resource or sub-resource.\n*/\nconst ResourceContentsSchema = z.object({\n\turi: z.string(),\n\tmimeType: z.optional(z.string()),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\nconst TextResourceContentsSchema = ResourceContentsSchema.extend({ text: z.string() });\n/**\n* A Zod schema for validating Base64 strings that is more performant and\n* robust for very large inputs than the default regex-based check. It avoids\n* stack overflows by using the native `atob` function for validation.\n*/\nconst Base64Schema = z.string().refine((val) => {\n\ttry {\n\t\tatob(val);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}, { message: \"Invalid Base64 string\" });\nconst BlobResourceContentsSchema = ResourceContentsSchema.extend({ blob: Base64Schema });\n/**\n* The sender or recipient of messages and data in a conversation.\n*/\nconst RoleSchema = z.enum([\"user\", \"assistant\"]);\n/**\n* Optional annotations providing clients additional context about a resource.\n*/\nconst AnnotationsSchema = z.object({\n\taudience: z.array(RoleSchema).optional(),\n\tpriority: z.number().min(0).max(1).optional(),\n\tlastModified: z.iso.datetime({ offset: true }).optional()\n});\n/**\n* A known resource that the server is capable of reading.\n*/\nconst ResourceSchema = z.object({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\turi: z.string(),\n\tdescription: z.optional(z.string()),\n\tmimeType: z.optional(z.string()),\n\tsize: z.optional(z.number()),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.optional(z.looseObject({}))\n});\n/**\n* A template description for resources available on the server.\n*/\nconst ResourceTemplateSchema = z.object({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\turiTemplate: z.string(),\n\tdescription: z.optional(z.string()),\n\tmimeType: z.optional(z.string()),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.optional(z.looseObject({}))\n});\n/**\n* Sent from the client to request a list of resources the server has.\n*/\nconst ListResourcesRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"resources/list\") });\n/**\n* The server's response to a {@linkcode ListResourcesRequest | resources/list} request from the client.\n*/\nconst ListResourcesResultSchema = PaginatedResultSchema.extend({ resources: z.array(ResourceSchema) });\n/**\n* Sent from the client to request a list of resource templates the server has.\n*/\nconst ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"resources/templates/list\") });\n/**\n* The server's response to a {@linkcode ListResourceTemplatesRequest | resources/templates/list} request from the client.\n*/\nconst ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({ resourceTemplates: z.array(ResourceTemplateSchema) });\nconst ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({ uri: z.string() });\n/**\n* Parameters for a {@linkcode ReadResourceRequest | resources/read} request.\n*/\nconst ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n* Sent from the client to the server, to read a specific resource URI.\n*/\nconst ReadResourceRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"resources/read\"),\n\tparams: ReadResourceRequestParamsSchema\n});\n/**\n* The server's response to a {@linkcode ReadResourceRequest | resources/read} request from the client.\n*/\nconst ReadResourceResultSchema = ResultSchema.extend({ contents: z.array(z.union([TextResourceContentsSchema, BlobResourceContentsSchema])) });\n/**\n* An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.\n*/\nconst ResourceListChangedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/resources/list_changed\"),\n\tparams: NotificationsParamsSchema.optional()\n});\nconst SubscribeRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n* Sent from the client to request `resources/updated` notifications from the server whenever a particular resource changes.\n*/\nconst SubscribeRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"resources/subscribe\"),\n\tparams: SubscribeRequestParamsSchema\n});\nconst UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;\n/**\n* Sent from the client to request cancellation of {@linkcode ResourceUpdatedNotification | resources/updated} notifications from the server. This should follow a previous {@linkcode SubscribeRequest | resources/subscribe} request.\n*/\nconst UnsubscribeRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"resources/unsubscribe\"),\n\tparams: UnsubscribeRequestParamsSchema\n});\n/**\n* The set of notification types a client opts in to on a `subscriptions/listen`\n* request. Each type is opt-in; the server MUST NOT send a notification type\n* the client has not explicitly requested here.\n*/\nconst SubscriptionFilterSchema = z.object({\n\ttoolsListChanged: z.boolean().optional(),\n\tpromptsListChanged: z.boolean().optional(),\n\tresourcesListChanged: z.boolean().optional(),\n\tresourceSubscriptions: z.array(z.string()).optional()\n});\nconst SubscriptionsListenRequestParamsSchema = BaseRequestParamsSchema.extend({ notifications: SubscriptionFilterSchema });\n/**\n* Sent from the client to open a long-lived channel for receiving notifications\n* outside the context of a specific request (protocol revision 2026-07-28).\n* Replaces the previous HTTP GET endpoint and `resources/subscribe`.\n*/\nconst SubscriptionsListenRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"subscriptions/listen\"),\n\tparams: SubscriptionsListenRequestParamsSchema\n});\nconst SubscriptionsAcknowledgedNotificationParamsSchema = NotificationsParamsSchema.extend({ notifications: SubscriptionFilterSchema });\n/**\n* Sent by the server as the first message on a `subscriptions/listen` stream\n* to acknowledge that the subscription has been established and report which\n* notification types it agreed to honor (protocol revision 2026-07-28).\n*/\nconst SubscriptionsAcknowledgedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/subscriptions/acknowledged\"),\n\tparams: SubscriptionsAcknowledgedNotificationParamsSchema\n});\n/**\n* `_meta` for a {@linkcode SubscriptionsListenResult}: the listen request's\n* JSON-RPC ID under the canonical subscription-id key (mirroring the same key\n* on every notification delivered on the stream). Extends\n* {@linkcode ResultMetaObjectSchema}, so the optional serverInfo key is typed\n* here too.\n*/\nconst SubscriptionsListenResultMetaSchema = ResultMetaObjectSchema.extend({ [SUBSCRIPTION_ID_META_KEY]: RequestIdSchema });\n/**\n* The response to a `subscriptions/listen` request, signalling that the\n* subscription has ended gracefully (for example, during server shutdown).\n* Because the listen stream is long-lived, this result is sent only when the\n* server tears the subscription down; an abrupt transport close carries no\n* response. The result body is otherwise empty.\n*/\nconst SubscriptionsListenResultSchema = ResultSchema.extend({ _meta: SubscriptionsListenResultMetaSchema });\n/**\n* Parameters for a {@linkcode ResourceUpdatedNotification | notifications/resources/updated} notification.\n*/\nconst ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({ uri: z.string() });\n/**\n* A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a {@linkcode SubscribeRequest | resources/subscribe} request.\n*/\nconst ResourceUpdatedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/resources/updated\"),\n\tparams: ResourceUpdatedNotificationParamsSchema\n});\n/**\n* Describes an argument that a prompt can accept.\n*/\nconst PromptArgumentSchema = z.object({\n\tname: z.string(),\n\tdescription: z.optional(z.string()),\n\trequired: z.optional(z.boolean())\n});\n/**\n* A prompt or prompt template that the server offers.\n*/\nconst PromptSchema = z.object({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\tdescription: z.optional(z.string()),\n\targuments: z.optional(z.array(PromptArgumentSchema)),\n\t_meta: z.optional(z.looseObject({}))\n});\n/**\n* Sent from the client to request a list of prompts and prompt templates the server has.\n*/\nconst ListPromptsRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"prompts/list\") });\n/**\n* The server's response to a {@linkcode ListPromptsRequest | prompts/list} request from the client.\n*/\nconst ListPromptsResultSchema = PaginatedResultSchema.extend({ prompts: z.array(PromptSchema) });\n/**\n* Parameters for a {@linkcode GetPromptRequest | prompts/get} request.\n*/\nconst GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({\n\tname: z.string(),\n\targuments: z.record(z.string(), z.string()).optional()\n});\n/**\n* Used by the client to get a prompt provided by the server.\n*/\nconst GetPromptRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"prompts/get\"),\n\tparams: GetPromptRequestParamsSchema\n});\n/**\n* Text provided to or from an LLM.\n*/\nconst TextContentSchema = z.object({\n\ttype: z.literal(\"text\"),\n\ttext: z.string(),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* An image provided to or from an LLM.\n*/\nconst ImageContentSchema = z.object({\n\ttype: z.literal(\"image\"),\n\tdata: Base64Schema,\n\tmimeType: z.string(),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Audio content provided to or from an LLM.\n*/\nconst AudioContentSchema = z.object({\n\ttype: z.literal(\"audio\"),\n\tdata: Base64Schema,\n\tmimeType: z.string(),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* A tool call request from an assistant (LLM).\n* Represents the assistant's request to use a tool.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ToolUseContentSchema = z.object({\n\ttype: z.literal(\"tool_use\"),\n\tname: z.string(),\n\tid: z.string(),\n\tinput: z.record(z.string(), z.unknown()),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* The contents of a resource, embedded into a prompt or tool call result.\n*/\nconst EmbeddedResourceSchema = z.object({\n\ttype: z.literal(\"resource\"),\n\tresource: z.union([TextResourceContentsSchema, BlobResourceContentsSchema]),\n\tannotations: AnnotationsSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* A resource that the server is capable of reading, included in a prompt or tool call result.\n*\n* Note: resource links returned by tools are not guaranteed to appear in the results of {@linkcode ListResourcesRequest | resources/list} requests.\n*/\nconst ResourceLinkSchema = ResourceSchema.extend({ type: z.literal(\"resource_link\") });\n/**\n* A content block that can be used in prompts and tool results.\n*/\nconst ContentBlockSchema = z.union([\n\tTextContentSchema,\n\tImageContentSchema,\n\tAudioContentSchema,\n\tResourceLinkSchema,\n\tEmbeddedResourceSchema\n]);\n/**\n* Describes a message returned as part of a prompt.\n*/\nconst PromptMessageSchema = z.object({\n\trole: RoleSchema,\n\tcontent: ContentBlockSchema\n});\n/**\n* The server's response to a {@linkcode GetPromptRequest | prompts/get} request from the client.\n*/\nconst GetPromptResultSchema = ResultSchema.extend({\n\tdescription: z.string().optional(),\n\tmessages: z.array(PromptMessageSchema)\n});\n/**\n* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.\n*/\nconst PromptListChangedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/prompts/list_changed\"),\n\tparams: NotificationsParamsSchema.optional()\n});\n/**\n* Additional properties describing a `Tool` to clients.\n*\n* NOTE: all properties in {@linkcode ToolAnnotations} are **hints**.\n* They are not guaranteed to provide a faithful description of\n* tool behavior (including descriptive properties like `title`).\n*\n* Clients should never make tool use decisions based on `ToolAnnotations`\n* received from untrusted servers.\n*/\nconst ToolAnnotationsSchema = z.object({\n\ttitle: z.string().optional(),\n\treadOnlyHint: z.boolean().optional(),\n\tdestructiveHint: z.boolean().optional(),\n\tidempotentHint: z.boolean().optional(),\n\topenWorldHint: z.boolean().optional()\n});\n/**\n* Execution-related properties for a tool.\n*/\nconst ToolExecutionSchema = z.object({ taskSupport: z.enum([\n\t\"required\",\n\t\"optional\",\n\t\"forbidden\"\n]).optional() });\n/**\n* Definition for a tool the client can call.\n*/\nconst ToolSchema = z.object({\n\t...BaseMetadataSchema.shape,\n\t...IconsSchema.shape,\n\tdescription: z.string().optional(),\n\tinputSchema: z.object({\n\t\ttype: z.literal(\"object\"),\n\t\tproperties: z.record(z.string(), JSONValueSchema).optional(),\n\t\trequired: z.array(z.string()).optional()\n\t}).catchall(z.unknown()),\n\toutputSchema: z.looseObject({ $schema: z.string().optional() }).optional(),\n\tannotations: ToolAnnotationsSchema.optional(),\n\texecution: ToolExecutionSchema.optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Sent from the client to request a list of tools the server has.\n*/\nconst ListToolsRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"tools/list\") });\n/**\n* The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.\n*/\nconst ListToolsResultSchema = PaginatedResultSchema.extend({ tools: z.array(ToolSchema) });\n/**\n* The server's response to a tool call.\n*/\nconst CallToolResultSchema = ResultSchema.extend({\n\tcontent: z.array(ContentBlockSchema).default([]),\n\tstructuredContent: z.unknown().optional(),\n\tisError: z.boolean().optional()\n});\n/**\n* {@linkcode CallToolResultSchema} extended with backwards compatibility to protocol version 2024-10-07.\n*/\nconst CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({ toolResult: z.unknown() }));\n/**\n* Parameters for a `tools/call` request.\n*/\nconst CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n\tname: z.string(),\n\targuments: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Used by the client to invoke a tool provided by the server.\n*/\nconst CallToolRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"tools/call\"),\n\tparams: CallToolRequestParamsSchema\n});\n/**\n* An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.\n*/\nconst ToolListChangedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/tools/list_changed\"),\n\tparams: NotificationsParamsSchema.optional()\n});\n/**\n* Base schema for list changed subscription options (without callback).\n* Used internally for Zod validation of `autoRefresh` and `debounceMs`.\n*/\nconst ListChangedOptionsBaseSchema = z.object({\n\tautoRefresh: z.boolean().default(true),\n\tdebounceMs: z.number().int().nonnegative().default(300)\n});\n/**\n* The severity of a log message.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst LoggingLevelSchema = z.enum([\n\t\"debug\",\n\t\"info\",\n\t\"notice\",\n\t\"warning\",\n\t\"error\",\n\t\"critical\",\n\t\"alert\",\n\t\"emergency\"\n]);\n/**\n* Parameters for a `logging/setLevel` request.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({ level: LoggingLevelSchema });\n/**\n* A request from the client to the server, to enable or adjust logging.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst SetLevelRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"logging/setLevel\"),\n\tparams: SetLevelRequestParamsSchema\n});\n/**\n* Parameters for a `notifications/message` notification.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({\n\tlevel: LoggingLevelSchema,\n\tlogger: z.string().optional(),\n\tdata: z.unknown()\n});\n/**\n* Notification of a log message passed from server to client. If no `logging/setLevel` request has been sent from the client, the server MAY decide which messages to send automatically.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to stderr logging\n* (STDIO servers) or OpenTelemetry.\n*/\nconst LoggingMessageNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/message\"),\n\tparams: LoggingMessageNotificationParamsSchema\n});\n/**\n* Hints to use for model selection.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ModelHintSchema = z.object({ name: z.string().optional() });\n/**\n* The server's preferences for model selection, requested of the client during sampling.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ModelPreferencesSchema = z.object({\n\thints: z.array(ModelHintSchema).optional(),\n\tcostPriority: z.number().min(0).max(1).optional(),\n\tspeedPriority: z.number().min(0).max(1).optional(),\n\tintelligencePriority: z.number().min(0).max(1).optional()\n});\n/**\n* Controls tool usage behavior in sampling requests.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ToolChoiceSchema = z.object({ mode: z.enum([\n\t\"auto\",\n\t\"required\",\n\t\"none\"\n]).optional() });\n/**\n* The result of a tool execution, provided by the user (server).\n* Represents the outcome of invoking a tool requested via `ToolUseContent`.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst ToolResultContentSchema = z.object({\n\ttype: z.literal(\"tool_result\"),\n\ttoolUseId: z.string().describe(\"The unique identifier for the corresponding tool call.\"),\n\tcontent: z.array(ContentBlockSchema),\n\tstructuredContent: z.unknown().optional(),\n\tisError: z.boolean().optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Basic content types for sampling responses (without tool use).\n* Used for backwards-compatible {@linkcode CreateMessageResult} when tools are not used.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst SamplingContentSchema = z.discriminatedUnion(\"type\", [\n\tTextContentSchema,\n\tImageContentSchema,\n\tAudioContentSchema\n]);\n/**\n* Content block types allowed in sampling messages.\n* This includes text, image, audio, tool use requests, and tool results.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst SamplingMessageContentBlockSchema = z.discriminatedUnion(\"type\", [\n\tTextContentSchema,\n\tImageContentSchema,\n\tAudioContentSchema,\n\tToolUseContentSchema,\n\tToolResultContentSchema\n]);\n/**\n* Describes a message issued to or received from an LLM API.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst SamplingMessageSchema = z.object({\n\trole: RoleSchema,\n\tcontent: z.union([SamplingMessageContentBlockSchema, z.array(SamplingMessageContentBlockSchema)]),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Parameters for a `sampling/createMessage` request.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n\tmessages: z.array(SamplingMessageSchema),\n\tmodelPreferences: ModelPreferencesSchema.optional(),\n\tsystemPrompt: z.string().optional(),\n\tincludeContext: z.enum([\n\t\t\"none\",\n\t\t\"thisServer\",\n\t\t\"allServers\"\n\t]).optional(),\n\ttemperature: z.number().optional(),\n\tmaxTokens: z.number().int(),\n\tstopSequences: z.array(z.string()).optional(),\n\tmetadata: JSONObjectSchema.optional(),\n\ttools: z.array(ToolSchema).optional(),\n\ttoolChoice: ToolChoiceSchema.optional()\n});\n/**\n* A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst CreateMessageRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"sampling/createMessage\"),\n\tparams: CreateMessageRequestParamsSchema\n});\n/**\n* The client's response to a `sampling/create_message` request from the server.\n* This is the backwards-compatible version that returns single content (no arrays).\n* Used when the request does not include tools.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst CreateMessageResultSchema = ResultSchema.extend({\n\tmodel: z.string(),\n\tstopReason: z.optional(z.enum([\n\t\t\"endTurn\",\n\t\t\"stopSequence\",\n\t\t\"maxTokens\"\n\t]).or(z.string())),\n\trole: RoleSchema,\n\tcontent: SamplingContentSchema\n});\n/**\n* The client's response to a `sampling/create_message` request when tools were provided.\n* This version supports array content for tool use flows.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to calling LLM\n* provider APIs directly.\n*/\nconst CreateMessageResultWithToolsSchema = ResultSchema.extend({\n\tmodel: z.string(),\n\tstopReason: z.optional(z.enum([\n\t\t\"endTurn\",\n\t\t\"stopSequence\",\n\t\t\"maxTokens\",\n\t\t\"toolUse\"\n\t]).or(z.string())),\n\trole: RoleSchema,\n\tcontent: z.union([SamplingMessageContentBlockSchema, z.array(SamplingMessageContentBlockSchema)])\n});\n/**\n* Primitive schema definition for boolean fields.\n*/\nconst BooleanSchemaSchema = z.object({\n\ttype: z.literal(\"boolean\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tdefault: z.boolean().optional()\n});\n/**\n* Primitive schema definition for string fields.\n*/\nconst StringSchemaSchema = z.object({\n\ttype: z.literal(\"string\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tminLength: z.number().optional(),\n\tmaxLength: z.number().optional(),\n\tformat: z.enum([\n\t\t\"email\",\n\t\t\"uri\",\n\t\t\"date\",\n\t\t\"date-time\"\n\t]).optional(),\n\tdefault: z.string().optional()\n});\n/**\n* Primitive schema definition for number fields.\n*/\nconst NumberSchemaSchema = z.object({\n\ttype: z.enum([\"number\", \"integer\"]),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tminimum: z.number().optional(),\n\tmaximum: z.number().optional(),\n\tdefault: z.number().optional()\n});\n/**\n* Schema for single-selection enumeration without display titles for options.\n*/\nconst UntitledSingleSelectEnumSchemaSchema = z.object({\n\ttype: z.literal(\"string\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tenum: z.array(z.string()),\n\tdefault: z.string().optional()\n});\n/**\n* Schema for single-selection enumeration with display titles for each option.\n*/\nconst TitledSingleSelectEnumSchemaSchema = z.object({\n\ttype: z.literal(\"string\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\toneOf: z.array(z.object({\n\t\tconst: z.string(),\n\t\ttitle: z.string()\n\t})),\n\tdefault: z.string().optional()\n});\n/**\n* Use {@linkcode TitledSingleSelectEnumSchema} instead.\n* This interface will be removed in a future version.\n*/\nconst LegacyTitledEnumSchemaSchema = z.object({\n\ttype: z.literal(\"string\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tenum: z.array(z.string()),\n\tenumNames: z.array(z.string()).optional(),\n\tdefault: z.string().optional()\n});\nconst SingleSelectEnumSchemaSchema = z.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);\n/**\n* Schema for multiple-selection enumeration without display titles for options.\n*/\nconst UntitledMultiSelectEnumSchemaSchema = z.object({\n\ttype: z.literal(\"array\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tminItems: z.number().optional(),\n\tmaxItems: z.number().optional(),\n\titems: z.object({\n\t\ttype: z.literal(\"string\"),\n\t\tenum: z.array(z.string())\n\t}),\n\tdefault: z.array(z.string()).optional()\n});\n/**\n* Schema for multiple-selection enumeration with display titles for each option.\n*/\nconst TitledMultiSelectEnumSchemaSchema = z.object({\n\ttype: z.literal(\"array\"),\n\ttitle: z.string().optional(),\n\tdescription: z.string().optional(),\n\tminItems: z.number().optional(),\n\tmaxItems: z.number().optional(),\n\titems: z.object({ anyOf: z.array(z.object({\n\t\tconst: z.string(),\n\t\ttitle: z.string()\n\t})) }),\n\tdefault: z.array(z.string()).optional()\n});\n/**\n* Combined schema for multiple-selection enumeration\n*/\nconst MultiSelectEnumSchemaSchema = z.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);\n/**\n* Primitive schema definition for enum fields.\n*/\nconst EnumSchemaSchema = z.union([\n\tLegacyTitledEnumSchemaSchema,\n\tSingleSelectEnumSchemaSchema,\n\tMultiSelectEnumSchemaSchema\n]);\n/**\n* Union of all primitive schema definitions.\n*/\nconst PrimitiveSchemaDefinitionSchema = z.union([\n\tEnumSchemaSchema,\n\tBooleanSchemaSchema,\n\tStringSchemaSchema,\n\tNumberSchemaSchema\n]);\n/**\n* Parameters for an `elicitation/create` request for form-based elicitation.\n*/\nconst ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n\tmode: z.literal(\"form\").optional(),\n\tmessage: z.string(),\n\trequestedSchema: z.object({\n\t\ttype: z.literal(\"object\"),\n\t\tproperties: z.record(z.string(), PrimitiveSchemaDefinitionSchema),\n\t\trequired: z.array(z.string()).optional()\n\t}).catchall(z.unknown())\n});\n/**\n* Parameters for an {@linkcode ElicitRequest | elicitation/create} request for URL-based elicitation.\n*/\nconst ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({\n\tmode: z.literal(\"url\"),\n\tmessage: z.string(),\n\telicitationId: z.string(),\n\turl: z.string().url()\n});\n/**\n* The parameters for a request to elicit additional information from the user via the client.\n*/\nconst ElicitRequestParamsSchema = z.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);\n/**\n* A request from the server to elicit user input via the client.\n* The client should present the message and form fields to the user (form mode)\n* or navigate to a URL (URL mode).\n*/\nconst ElicitRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"elicitation/create\"),\n\tparams: ElicitRequestParamsSchema\n});\n/**\n* Parameters for a {@linkcode ElicitationCompleteNotification | notifications/elicitation/complete} notification.\n*\n* @deprecated Removed from the spec by #2891 (2026-07-28). The client learns the outcome\n* of an out-of-band interaction by retrying the original request; no server-initiated\n* completion signal exists in the 2026-07-28 revision. Kept here for the 2025-era flow\n* only. The 2026-07-28 wire codec excludes this notification.\n* @category notifications/elicitation/complete\n*/\nconst ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({ elicitationId: z.string() });\n/**\n* A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.\n*\n* @deprecated Removed from the spec by #2891 (2026-07-28). The client learns the outcome\n* of an out-of-band interaction by retrying the original request; no server-initiated\n* completion signal exists in the 2026-07-28 revision. Kept here for the 2025-era flow\n* only. The 2026-07-28 wire codec excludes this notification.\n* @category notifications/elicitation/complete\n*/\nconst ElicitationCompleteNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/elicitation/complete\"),\n\tparams: ElicitationCompleteNotificationParamsSchema\n});\n/**\n* The client's response to an {@linkcode ElicitRequest | elicitation/create} request from the server.\n*/\nconst ElicitResultSchema = ResultSchema.extend({\n\taction: z.enum([\n\t\t\"accept\",\n\t\t\"decline\",\n\t\t\"cancel\"\n\t]),\n\tcontent: z.preprocess((val) => val === null ? void 0 : val, z.record(z.string(), z.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean(),\n\t\tz.array(z.string())\n\t])).optional())\n});\n/**\n* A reference to a resource or resource template definition.\n*/\nconst ResourceTemplateReferenceSchema = z.object({\n\ttype: z.literal(\"ref/resource\"),\n\turi: z.string()\n});\n/**\n* Identifies a prompt.\n*/\nconst PromptReferenceSchema = z.object({\n\ttype: z.literal(\"ref/prompt\"),\n\tname: z.string()\n});\n/**\n* Parameters for a {@linkcode CompleteRequest | completion/complete} request.\n*/\nconst CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({\n\tref: z.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),\n\targument: z.object({\n\t\tname: z.string(),\n\t\tvalue: z.string()\n\t}),\n\tcontext: z.object({ arguments: z.record(z.string(), z.string()).optional() }).optional()\n});\n/**\n* A request from the client to the server, to ask for completion options.\n*/\nconst CompleteRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"completion/complete\"),\n\tparams: CompleteRequestParamsSchema\n});\n/**\n* The server's response to a {@linkcode CompleteRequest | completion/complete} request\n*/\nconst CompleteResultSchema = ResultSchema.extend({ completion: z.looseObject({\n\tvalues: z.array(z.string()).max(100),\n\ttotal: z.optional(z.number().int()),\n\thasMore: z.optional(z.boolean())\n}) });\n/**\n* Represents a root directory or file that the server can operate on.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to passing paths via\n* tool parameters, resource URIs, or configuration.\n*/\nconst RootSchema = z.object({\n\turi: z.string().startsWith(\"file://\"),\n\tname: z.string().optional(),\n\t_meta: z.record(z.string(), z.unknown()).optional()\n});\n/**\n* Sent from the server to request a list of root URIs from the client.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to passing paths via\n* tool parameters, resource URIs, or configuration.\n*/\nconst ListRootsRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"roots/list\"),\n\tparams: BaseRequestParamsSchema.optional()\n});\n/**\n* The client's response to a `roots/list` request from the server.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to passing paths via\n* tool parameters, resource URIs, or configuration.\n*/\nconst ListRootsResultSchema = ResultSchema.extend({ roots: z.array(RootSchema) });\n/**\n* A notification from the client to the server, informing it that the list of roots has changed.\n*\n* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n* in the specification for at least twelve months. Migrate to passing paths via\n* tool parameters, resource URIs, or configuration.\n*/\nconst RootsListChangedNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/roots/list_changed\"),\n\tparams: NotificationsParamsSchema.optional()\n});\n/**\n* Task creation parameters, used to ask that the server create a task to represent a request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskCreationParamsSchema = z.looseObject({\n\tttl: z.number().optional(),\n\tpollInterval: z.number().optional()\n});\n/**\n* The status of a task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskStatusSchema = z.enum([\n\t\"working\",\n\t\"input_required\",\n\t\"completed\",\n\t\"failed\",\n\t\"cancelled\"\n]);\n/**\n* A pollable state object associated with a request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskSchema = z.object({\n\ttaskId: z.string(),\n\tstatus: TaskStatusSchema,\n\tttl: z.union([z.number(), z.null()]),\n\tcreatedAt: z.string(),\n\tlastUpdatedAt: z.string(),\n\tpollInterval: z.optional(z.number()),\n\tstatusMessage: z.optional(z.string())\n});\n/**\n* Result returned when a task is created, containing the task data wrapped in a `task` field.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst CreateTaskResultSchema = ResultSchema.extend({ task: TaskSchema });\n/**\n* Parameters for task status notification.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema);\n/**\n* A notification sent when a task's status changes.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst TaskStatusNotificationSchema = NotificationSchema.extend({\n\tmethod: z.literal(\"notifications/tasks/status\"),\n\tparams: TaskStatusNotificationParamsSchema\n});\n/**\n* A request to get the state of a specific task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst GetTaskRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"tasks/get\"),\n\tparams: BaseRequestParamsSchema.extend({ taskId: z.string() })\n});\n/**\n* The response to a {@linkcode GetTaskRequest | tasks/get} request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst GetTaskResultSchema = ResultSchema.merge(TaskSchema);\n/**\n* A request to get the result of a specific task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst GetTaskPayloadRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"tasks/result\"),\n\tparams: BaseRequestParamsSchema.extend({ taskId: z.string() })\n});\n/**\n* The response to a `tasks/result` request.\n* The structure matches the result type of the original request.\n* For example, a {@linkcode CallToolRequest | tools/call} task would return the `CallToolResult` structure.\n*\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst GetTaskPayloadResultSchema = ResultSchema.loose();\n/**\n* A request to list tasks.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst ListTasksRequestSchema = PaginatedRequestSchema.extend({ method: z.literal(\"tasks/list\") });\n/**\n* The response to a {@linkcode ListTasksRequest | tasks/list} request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst ListTasksResultSchema = PaginatedResultSchema.extend({ tasks: z.array(TaskSchema) });\n/**\n* A request to cancel a specific task.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst CancelTaskRequestSchema = RequestSchema.extend({\n\tmethod: z.literal(\"tasks/cancel\"),\n\tparams: BaseRequestParamsSchema.extend({ taskId: z.string() })\n});\n/**\n* The response to a {@linkcode CancelTaskRequest | tasks/cancel} request.\n*\n* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n*/\nconst CancelTaskResultSchema = ResultSchema.merge(TaskSchema);\nconst ClientRequestSchema = z.union([\n\tPingRequestSchema,\n\tInitializeRequestSchema,\n\tDiscoverRequestSchema,\n\tCompleteRequestSchema,\n\tSetLevelRequestSchema,\n\tGetPromptRequestSchema,\n\tListPromptsRequestSchema,\n\tListResourcesRequestSchema,\n\tListResourceTemplatesRequestSchema,\n\tReadResourceRequestSchema,\n\tSubscribeRequestSchema,\n\tUnsubscribeRequestSchema,\n\tSubscriptionsListenRequestSchema,\n\tCallToolRequestSchema,\n\tListToolsRequestSchema\n]);\nconst ClientNotificationSchema = z.union([\n\tCancelledNotificationSchema,\n\tProgressNotificationSchema,\n\tInitializedNotificationSchema,\n\tRootsListChangedNotificationSchema\n]);\nconst ClientResultSchema = z.union([\n\tEmptyResultSchema,\n\tCreateMessageResultSchema,\n\tCreateMessageResultWithToolsSchema,\n\tElicitResultSchema,\n\tListRootsResultSchema\n]);\nconst ServerRequestSchema = z.union([\n\tPingRequestSchema,\n\tCreateMessageRequestSchema,\n\tElicitRequestSchema,\n\tListRootsRequestSchema\n]);\nconst ServerNotificationSchema = z.union([\n\tCancelledNotificationSchema,\n\tProgressNotificationSchema,\n\tLoggingMessageNotificationSchema,\n\tResourceUpdatedNotificationSchema,\n\tResourceListChangedNotificationSchema,\n\tToolListChangedNotificationSchema,\n\tPromptListChangedNotificationSchema,\n\tSubscriptionsAcknowledgedNotificationSchema,\n\tElicitationCompleteNotificationSchema\n]);\nconst ServerResultSchema = z.union([\n\tEmptyResultSchema,\n\tInitializeResultSchema,\n\tDiscoverResultSchema,\n\tCompleteResultSchema,\n\tGetPromptResultSchema,\n\tListPromptsResultSchema,\n\tListResourcesResultSchema,\n\tListResourceTemplatesResultSchema,\n\tReadResourceResultSchema,\n\tCallToolResultSchema,\n\tListToolsResultSchema,\n\tSubscriptionsListenResultSchema\n]);\n\n//#endregion\n//#region src/auth.ts\n/**\n* Reusable URL validation that disallows `javascript:` scheme\n*/\nconst SafeUrlSchema = z.url().superRefine((val, ctx) => {\n\tif (!URL.canParse(val)) {\n\t\tctx.addIssue({\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: \"URL must be parseable\",\n\t\t\tfatal: true\n\t\t});\n\t\treturn z.NEVER;\n\t}\n}).refine((url) => {\n\tconst u = new URL(url);\n\treturn u.protocol !== \"javascript:\" && u.protocol !== \"data:\" && u.protocol !== \"vbscript:\";\n}, { message: \"URL cannot use javascript:, data:, or vbscript: scheme\" });\n/**\n* RFC 9728 OAuth Protected Resource Metadata\n*/\nconst OAuthProtectedResourceMetadataSchema = z.looseObject({\n\tresource: z.string().url(),\n\tauthorization_servers: z.array(SafeUrlSchema).optional(),\n\tjwks_uri: z.string().url().optional(),\n\tscopes_supported: z.array(z.string()).optional(),\n\tbearer_methods_supported: z.array(z.string()).optional(),\n\tresource_signing_alg_values_supported: z.array(z.string()).optional(),\n\tresource_name: z.string().optional(),\n\tresource_documentation: z.string().optional(),\n\tresource_policy_uri: z.string().url().optional(),\n\tresource_tos_uri: z.string().url().optional(),\n\ttls_client_certificate_bound_access_tokens: z.boolean().optional(),\n\tauthorization_details_types_supported: z.array(z.string()).optional(),\n\tdpop_signing_alg_values_supported: z.array(z.string()).optional(),\n\tdpop_bound_access_tokens_required: z.boolean().optional()\n});\n/**\n* RFC 8414 OAuth 2.0 Authorization Server Metadata\n*/\nconst OAuthMetadataSchema = z.looseObject({\n\tissuer: z.string(),\n\tauthorization_endpoint: SafeUrlSchema,\n\ttoken_endpoint: SafeUrlSchema,\n\tregistration_endpoint: SafeUrlSchema.optional(),\n\tscopes_supported: z.array(z.string()).optional(),\n\tresponse_types_supported: z.array(z.string()),\n\tresponse_modes_supported: z.array(z.string()).optional(),\n\tgrant_types_supported: z.array(z.string()).optional(),\n\ttoken_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n\ttoken_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n\tservice_documentation: SafeUrlSchema.optional(),\n\trevocation_endpoint: SafeUrlSchema.optional(),\n\trevocation_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n\trevocation_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n\tintrospection_endpoint: z.string().optional(),\n\tintrospection_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n\tintrospection_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n\tcode_challenge_methods_supported: z.array(z.string()).optional(),\n\tclient_id_metadata_document_supported: z.boolean().optional(),\n\tauthorization_response_iss_parameter_supported: z.boolean().optional().catch(void 0)\n});\n/**\n* OpenID Connect Discovery 1.0 Provider Metadata\n*\n* @see https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata\n*/\nconst OpenIdProviderMetadataSchema = z.looseObject({\n\tissuer: z.string(),\n\tauthorization_endpoint: SafeUrlSchema,\n\ttoken_endpoint: SafeUrlSchema,\n\tuserinfo_endpoint: SafeUrlSchema.optional(),\n\tjwks_uri: SafeUrlSchema,\n\tregistration_endpoint: SafeUrlSchema.optional(),\n\tscopes_supported: z.array(z.string()).optional(),\n\tresponse_types_supported: z.array(z.string()),\n\tresponse_modes_supported: z.array(z.string()).optional(),\n\tgrant_types_supported: z.array(z.string()).optional(),\n\tacr_values_supported: z.array(z.string()).optional(),\n\tsubject_types_supported: z.array(z.string()),\n\tid_token_signing_alg_values_supported: z.array(z.string()),\n\tid_token_encryption_alg_values_supported: z.array(z.string()).optional(),\n\tid_token_encryption_enc_values_supported: z.array(z.string()).optional(),\n\tuserinfo_signing_alg_values_supported: z.array(z.string()).optional(),\n\tuserinfo_encryption_alg_values_supported: z.array(z.string()).optional(),\n\tuserinfo_encryption_enc_values_supported: z.array(z.string()).optional(),\n\trequest_object_signing_alg_values_supported: z.array(z.string()).optional(),\n\trequest_object_encryption_alg_values_supported: z.array(z.string()).optional(),\n\trequest_object_encryption_enc_values_supported: z.array(z.string()).optional(),\n\ttoken_endpoint_auth_methods_supported: z.array(z.string()).optional(),\n\ttoken_endpoint_auth_signing_alg_values_supported: z.array(z.string()).optional(),\n\tdisplay_values_supported: z.array(z.string()).optional(),\n\tclaim_types_supported: z.array(z.string()).optional(),\n\tclaims_supported: z.array(z.string()).optional(),\n\tservice_documentation: z.string().optional(),\n\tclaims_locales_supported: z.array(z.string()).optional(),\n\tui_locales_supported: z.array(z.string()).optional(),\n\tclaims_parameter_supported: z.boolean().optional(),\n\trequest_parameter_supported: z.boolean().optional(),\n\trequest_uri_parameter_supported: z.boolean().optional(),\n\trequire_request_uri_registration: z.boolean().optional(),\n\top_policy_uri: SafeUrlSchema.optional(),\n\top_tos_uri: SafeUrlSchema.optional(),\n\tclient_id_metadata_document_supported: z.boolean().optional(),\n\tauthorization_response_iss_parameter_supported: z.boolean().optional().catch(void 0)\n});\n/**\n* OpenID Connect Discovery metadata that may include OAuth 2.0 fields\n* This schema represents the real-world scenario where OIDC providers\n* return a mix of OpenID Connect and OAuth 2.0 metadata fields\n*/\nconst OpenIdProviderDiscoveryMetadataSchema = z.object({\n\t...OpenIdProviderMetadataSchema.shape,\n\t...OAuthMetadataSchema.pick({ code_challenge_methods_supported: true }).shape\n});\n/**\n* OAuth 2.1 token response\n*/\nconst OAuthTokensSchema = z.object({\n\taccess_token: z.string(),\n\tid_token: z.string().optional(),\n\ttoken_type: z.string(),\n\texpires_in: z.coerce.number().optional(),\n\tscope: z.string().optional(),\n\trefresh_token: z.string().optional()\n}).strip();\n/**\n* RFC 8693 §2.2.1 Token Exchange response for ID-JAG tokens.\n*\n* `token_type` is intentionally optional: per RFC 8693 §2.2.1 it is informational when\n* the issued token is not an access token, and per RFC 6749 §5.1 it is case-insensitive,\n* so strict checking rejects conformant IdPs.\n*/\nconst IdJagTokenExchangeResponseSchema = z.object({\n\tissued_token_type: z.literal(\"urn:ietf:params:oauth:token-type:id-jag\"),\n\taccess_token: z.string(),\n\ttoken_type: z.string().optional(),\n\texpires_in: z.number().optional(),\n\tscope: z.string().optional()\n}).strip();\n/**\n* OAuth 2.1 error response\n*/\nconst OAuthErrorResponseSchema = z.object({\n\terror: z.string(),\n\terror_description: z.string().optional(),\n\terror_uri: z.string().optional()\n});\n/**\n* Optional version of {@linkcode SafeUrlSchema} that allows empty string for backward compatibility on `tos_uri` and `logo_uri`\n*/\nconst OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z.literal(\"\").transform(() => void 0));\n/**\n* RFC 7591 OAuth 2.0 Dynamic Client Registration metadata\n*/\nconst OAuthClientMetadataSchema = z.object({\n\tredirect_uris: z.array(SafeUrlSchema),\n\ttoken_endpoint_auth_method: z.string().optional(),\n\tgrant_types: z.array(z.string()).optional(),\n\tresponse_types: z.array(z.string()).optional(),\n\tapplication_type: z.string().optional(),\n\tclient_name: z.string().optional(),\n\tclient_uri: SafeUrlSchema.optional(),\n\tlogo_uri: OptionalSafeUrlSchema,\n\tscope: z.string().optional(),\n\tcontacts: z.array(z.string()).optional(),\n\ttos_uri: OptionalSafeUrlSchema,\n\tpolicy_uri: z.string().optional(),\n\tjwks_uri: SafeUrlSchema.optional(),\n\tjwks: z.any().optional(),\n\tsoftware_id: z.string().optional(),\n\tsoftware_version: z.string().optional(),\n\tsoftware_statement: z.string().optional()\n}).strip();\n/**\n* RFC 7591 OAuth 2.0 Dynamic Client Registration client information\n*/\nconst OAuthClientInformationSchema = z.object({\n\tclient_id: z.string(),\n\tclient_secret: z.string().optional(),\n\tclient_id_issued_at: z.number().optional(),\n\tclient_secret_expires_at: z.number().optional()\n}).strip();\n/**\n* RFC 7591 OAuth 2.0 Dynamic Client Registration full response (client information plus metadata)\n*/\nconst OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);\n/**\n* RFC 7591 OAuth 2.0 Dynamic Client Registration error response\n*/\nconst OAuthClientRegistrationErrorSchema = z.object({\n\terror: z.string(),\n\terror_description: z.string().optional()\n}).strip();\n/**\n* RFC 7009 OAuth 2.0 Token Revocation request\n*/\nconst OAuthTokenRevocationRequestSchema = z.object({\n\ttoken: z.string(),\n\ttoken_type_hint: z.string().optional()\n}).strip();\n\n//#endregion\nexport { EmbeddedResourceSchema as $, TaskMetadataSchema as $n, PrimitiveSchemaDefinitionSchema as $t, ClientRequestSchema as A, SamplingContentSchema as An, PARSE_ERROR as Ar, ListResourceTemplatesRequestSchema as At, CreateMessageResultSchema as B, SingleSelectEnumSchemaSchema as Bn, LoggingLevelSchema as Bt, CallToolResultSchema as C, ResourceUpdatedNotificationParamsSchema as Cn, INTERNAL_ERROR as Cr, JSONRPCResponseSchema as Ct, CancelledNotificationSchema as D, RoleSchema as Dn, LATEST_PROTOCOL_VERSION as Dr, ListChangedOptionsBaseSchema as Dt, CancelledNotificationParamsSchema as E, ResultSchema as En, JSONRPC_VERSION as Er, LegacyTitledEnumSchemaSchema as Et, CompleteRequestSchema as F, ServerRequestSchema as Fn, SUPPORTED_PROTOCOL_VERSIONS as Fr, ListRootsResultSchema as Ft, DiscoverResultSchema as G, SubscriptionsAcknowledgedNotificationParamsSchema as Gn, MultiSelectEnumSchemaSchema as Gt, CreateTaskResultSchema as H, SubscribeRequestParamsSchema as Hn, LoggingMessageNotificationSchema as Ht, CompleteResultSchema as I, ServerResultSchema as In, TRACEPARENT_META_KEY as Ir, ListTasksRequestSchema as It, ElicitRequestSchema as J, SubscriptionsListenRequestSchema as Jn, NumberSchemaSchema as Jt, ElicitRequestFormParamsSchema as K, SubscriptionsAcknowledgedNotificationSchema as Kn, NotificationSchema as Kt, ContentBlockSchema as L, ServerTasksCapabilitySchema as Ln, TRACESTATE_META_KEY as Lr, ListTasksResultSchema as Lt, ClientTasksCapabilitySchema as M, SamplingMessageSchema as Mn, RELATED_TASK_META_KEY as Mr, ListResourcesRequestSchema as Mt, CompatibilityCallToolResultSchema as N, ServerCapabilitiesSchema as Nn, SERVER_INFO_META_KEY as Nr, ListResourcesResultSchema as Nt, ClientCapabilitiesSchema as O, RootSchema as On, LOG_LEVEL_META_KEY as Or, ListPromptsRequestSchema as Ot, CompleteRequestParamsSchema as P, ServerNotificationSchema as Pn, SUBSCRIPTION_ID_META_KEY as Pr, ListRootsRequestSchema as Pt, ElicitationCompleteNotificationSchema as Q, TaskCreationParamsSchema as Qn, PingRequestSchema as Qt, CreateMessageRequestParamsSchema as R, SetLevelRequestParamsSchema as Rn, ListToolsRequestSchema as Rt, CallToolRequestSchema as S, ResourceTemplateSchema as Sn, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as Sr, JSONRPCRequestSchema as St, CancelTaskResultSchema as T, ResultMetaObjectSchema as Tn, INVALID_REQUEST as Tr, JSONValueSchema as Tt, CursorSchema as U, SubscribeRequestSchema as Un, ModelHintSchema as Ut, CreateMessageResultWithToolsSchema as V, StringSchemaSchema as Vn, LoggingMessageNotificationParamsSchema as Vt, DiscoverRequestSchema as W, SubscriptionFilterSchema as Wn, ModelPreferencesSchema as Wt, ElicitResultSchema as X, SubscriptionsListenResultSchema as Xn, PaginatedRequestSchema as Xt, ElicitRequestURLParamsSchema as Y, SubscriptionsListenResultMetaSchema as Yn, PaginatedRequestParamsSchema as Yt, ElicitationCompleteNotificationParamsSchema as Z, TaskAugmentedRequestParamsSchema as Zn, PaginatedResultSchema as Zt, BaseMetadataSchema as _, ResourceLinkSchema as _n, UntitledMultiSelectEnumSchemaSchema as _r, JSONArraySchema as _t, OAuthClientRegistrationErrorSchema as a, PromptListChangedNotificationSchema as an, TextResourceContentsSchema as ar, GetTaskPayloadRequestSchema as at, BooleanSchemaSchema as b, ResourceSchema as bn, CLIENT_CAPABILITIES_META_KEY as br, JSONRPCMessageSchema as bt, OAuthProtectedResourceMetadataSchema as c, PromptSchema as cn, ToolAnnotationsSchema as cr, GetTaskResultSchema as ct, OpenIdProviderDiscoveryMetadataSchema as d, ReadResourceResultSchema as dn, ToolListChangedNotificationSchema as dr, ImageContentSchema as dt, ProgressNotificationParamsSchema as en, TaskSchema as er, EmptyResultSchema as et, OpenIdProviderMetadataSchema as f, RelatedTaskMetadataSchema as fn, ToolResultContentSchema as fr, ImplementationSchema as ft, AudioContentSchema as g, ResourceContentsSchema as gn, UnsubscribeRequestSchema as gr, InitializedNotificationSchema as gt, AnnotationsSchema as h, RequestSchema as hn, UnsubscribeRequestParamsSchema as hr, InitializeResultSchema as ht, OAuthClientMetadataSchema as i, PromptArgumentSchema as in, TextContentSchema as ir, GetPromptResultSchema as it, ClientResultSchema as j, SamplingMessageContentBlockSchema as jn, PROTOCOL_VERSION_META_KEY as jr, ListResourceTemplatesResultSchema as jt, ClientNotificationSchema as k, RootsListChangedNotificationSchema as kn, METHOD_NOT_FOUND as kr, ListPromptsResultSchema as kt, OAuthTokenRevocationRequestSchema as l, ReadResourceRequestParamsSchema as ln, ToolChoiceSchema as lr, IconSchema as lt, SafeUrlSchema as m, RequestMetaSchema as mn, ToolUseContentSchema as mr, InitializeRequestSchema as mt, OAuthClientInformationFullSchema as n, ProgressSchema as nn, TaskStatusNotificationSchema as nr, GetPromptRequestParamsSchema as nt, OAuthErrorResponseSchema as o, PromptMessageSchema as on, TitledMultiSelectEnumSchemaSchema as or, GetTaskPayloadResultSchema as ot, OptionalSafeUrlSchema as p, RequestIdSchema as pn, ToolSchema as pr, InitializeRequestParamsSchema as pt, ElicitRequestParamsSchema as q, SubscriptionsListenRequestParamsSchema as qn, NotificationsParamsSchema as qt, OAuthClientInformationSchema as r, ProgressTokenSchema as rn, TaskStatusSchema as rr, GetPromptRequestSchema as rt, OAuthMetadataSchema as s, PromptReferenceSchema as sn, TitledSingleSelectEnumSchemaSchema as sr, GetTaskRequestSchema as st, IdJagTokenExchangeResponseSchema as t, ProgressNotificationSchema as tn, TaskStatusNotificationParamsSchema as tr, EnumSchemaSchema as tt, OAuthTokensSchema as u, ReadResourceRequestSchema as un, ToolExecutionSchema as ur, IconsSchema as ut, BaseRequestParamsSchema as v, ResourceListChangedNotificationSchema as vn, UntitledSingleSelectEnumSchemaSchema as vr, JSONObjectSchema as vt, CancelTaskRequestSchema as w, ResourceUpdatedNotificationSchema as wn, INVALID_PARAMS as wr, JSONRPCResultResponseSchema as wt, CallToolRequestParamsSchema as x, ResourceTemplateReferenceSchema as xn, CLIENT_INFO_META_KEY as xr, JSONRPCNotificationSchema as xt, BlobResourceContentsSchema as y, ResourceRequestParamsSchema as yn, BAGGAGE_META_KEY as yr, JSONRPCErrorResponseSchema as yt, CreateMessageRequestSchema as z, SetLevelRequestSchema as zn, ListToolsResultSchema as zt };\n//# sourceMappingURL=auth-CUe6YdwF.mjs.map","//#region rolldown:runtime\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __exportAll = (all, symbols) => {\n\tlet target = {};\n\tfor (var name in all) {\n\t\t__defProp(target, name, {\n\t\t\tget: all[name],\n\t\t\tenumerable: true\n\t\t});\n\t}\n\tif (symbols) {\n\t\t__defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\t}\n\treturn target;\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\t\tkey = keys[i];\n\t\t\tif (!__hasOwnProp.call(to, key) && key !== except) {\n\t\t\t\t__defProp(to, key, {\n\t\t\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n\n//#endregion\nexport { __exportAll as n, __toESM as r, __commonJSMin as t };","//#region ../core-internal/src/validators/dialects.ts\n/**\n* Canonical `$schema` URIs per supported dialect (http + https variants, trailing-`#` stripped).\n*/\nconst DRAFT_2020_12_URIS = new Set([\"https://json-schema.org/draft/2020-12/schema\", \"http://json-schema.org/draft/2020-12/schema\"]);\nconst DRAFT_2019_09_URIS = new Set([\"https://json-schema.org/draft/2019-09/schema\", \"http://json-schema.org/draft/2019-09/schema\"]);\nconst DRAFT_07_URIS = new Set([\"https://json-schema.org/draft-07/schema\", \"http://json-schema.org/draft-07/schema\"]);\nconst DRAFT_06_URIS = new Set([\"https://json-schema.org/draft-06/schema\", \"http://json-schema.org/draft-06/schema\"]);\n/**\n* Whether a `$schema` value declares the 2019-09 dialect — the only supported dialect with\n* `$recursiveRef`/`$recursiveAnchor`. Non-throwing (unlike {@linkcode declaredDialect}) so\n* wire-layer callers can consult it for documents whose dialect may be unsupported.\n*/\nfunction declares2019Dialect($schema) {\n\treturn typeof $schema === \"string\" && DRAFT_2019_09_URIS.has($schema.replace(/#$/, \"\"));\n}\n/**\n* Classify a schema's declared `$schema` dialect. No `$schema` (or a non-string one) means\n* 2020-12. Any other dialect throws a plain `Error` with a clear message rather than letting the\n* engine crash on an opaque internal error or silently mis-validate; `remedy` names the calling\n* provider's escape hatch in that message.\n*/\nfunction declaredDialect(schema, remedy) {\n\tif (!(\"$schema\" in schema) || typeof schema.$schema !== \"string\") return \"2020-12\";\n\tconst declared = schema.$schema.replace(/#$/, \"\");\n\tif (DRAFT_2020_12_URIS.has(declared)) return \"2020-12\";\n\tif (DRAFT_2019_09_URIS.has(declared)) return \"2019-09\";\n\tif (DRAFT_07_URIS.has(declared) || DRAFT_06_URIS.has(declared)) return \"draft-7\";\n\tthrow new Error(`JSON Schema declares an unsupported dialect (\"$schema\": \"${schema.$schema.slice(0, 200)}\"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${remedy}`);\n}\n\n//#endregion\nexport { declares2019Dialect as n, declaredDialect as t };\n//# sourceMappingURL=dialects-BOhdv1Fc.mjs.map","import { n as __exportAll, r as __toESM, t as __commonJSMin } from \"./chunk-Br0eD_fh.mjs\";\nimport { n as declares2019Dialect } from \"./dialects-BOhdv1Fc.mjs\";\nimport { AnnotationsSchema, AudioContentSchema, BAGGAGE_META_KEY, BaseMetadataSchema, BaseRequestParamsSchema, BlobResourceContentsSchema, BooleanSchemaSchema, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, CallToolRequestParamsSchema, CallToolRequestSchema, CallToolResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, ClientCapabilitiesSchema, ClientNotificationSchema, ClientRequestSchema, ClientResultSchema, ClientTasksCapabilitySchema, CompatibilityCallToolResultSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, ContentBlockSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, CreateTaskResultSchema, CursorSchema, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DiscoverRequestSchema, DiscoverResultSchema, ElicitRequestFormParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitRequestURLParamsSchema, ElicitResultSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, EmbeddedResourceSchema, EmptyResultSchema, EnumSchemaSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, GetPromptResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, GetTaskRequestSchema, GetTaskResultSchema, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, IconSchema, IconsSchema, IdJagTokenExchangeResponseSchema, ImageContentSchema, ImplementationSchema, InitializeRequestParamsSchema, InitializeRequestSchema, InitializeResultSchema, InitializedNotificationSchema, JSONArraySchema, JSONObjectSchema, JSONRPCErrorResponseSchema, JSONRPCMessageSchema, JSONRPCNotificationSchema, JSONRPCRequestSchema, JSONRPCResponseSchema, JSONRPCResultResponseSchema, JSONRPC_VERSION, JSONValueSchema, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, LegacyTitledEnumSchemaSchema, ListChangedOptionsBaseSchema, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListRootsRequestSchema, ListRootsResultSchema, ListTasksRequestSchema, ListTasksResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, METHOD_NOT_FOUND, ModelHintSchema, ModelPreferencesSchema, MultiSelectEnumSchemaSchema, NotificationSchema, NotificationsParamsSchema, NumberSchemaSchema, OAuthClientInformationFullSchema, OAuthClientInformationSchema, OAuthClientMetadataSchema, OAuthClientRegistrationErrorSchema, OAuthErrorResponseSchema, OAuthMetadataSchema, OAuthProtectedResourceMetadataSchema, OAuthTokenRevocationRequestSchema, OAuthTokensSchema, OpenIdProviderDiscoveryMetadataSchema, OpenIdProviderMetadataSchema, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, PingRequestSchema, PrimitiveSchemaDefinitionSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, ProgressSchema, ProgressTokenSchema, PromptArgumentSchema, PromptListChangedNotificationSchema, PromptMessageSchema, PromptReferenceSchema, PromptSchema, RELATED_TASK_META_KEY, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, RelatedTaskMetadataSchema, RequestIdSchema, RequestMetaSchema, RequestSchema, ResourceContentsSchema, ResourceLinkSchema, ResourceListChangedNotificationSchema, ResourceRequestParamsSchema, ResourceSchema, ResourceTemplateReferenceSchema, ResourceTemplateSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, ResultMetaObjectSchema, ResultSchema, RoleSchema, RootSchema, RootsListChangedNotificationSchema, SERVER_INFO_META_KEY, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, ServerCapabilitiesSchema, ServerNotificationSchema, ServerRequestSchema, ServerResultSchema, ServerTasksCapabilitySchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, SingleSelectEnumSchemaSchema, StringSchemaSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, SubscriptionFilterSchema, SubscriptionsAcknowledgedNotificationParamsSchema, SubscriptionsAcknowledgedNotificationSchema, SubscriptionsListenRequestParamsSchema, SubscriptionsListenRequestSchema, SubscriptionsListenResultMetaSchema, SubscriptionsListenResultSchema, TRACEPARENT_META_KEY, TRACESTATE_META_KEY, TaskAugmentedRequestParamsSchema, TaskCreationParamsSchema, TaskMetadataSchema, TaskSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, TaskStatusSchema, TextContentSchema, TextResourceContentsSchema, TitledMultiSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, ToolAnnotationsSchema, ToolChoiceSchema, ToolExecutionSchema, ToolListChangedNotificationSchema, ToolResultContentSchema, ToolSchema, ToolUseContentSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, UntitledMultiSelectEnumSchemaSchema, UntitledSingleSelectEnumSchemaSchema } from \"@modelcontextprotocol/core/internal\";\nimport * as z from \"zod/v4\";\n\n//#region ../core-internal/src/errors/crossBundleBrand.ts\n/**\n* Cross-bundle `instanceof` support for the SDK error classes.\n*\n* `@modelcontextprotocol/client` and `@modelcontextprotocol/server` each bundle their\n* own copy of `core-internal`, so an error constructed by one package fails a\n* prototype-identity `instanceof` against the same class re-exported by the other —\n* exactly the check a dual-role process (gateway, host, in-process test) writes.\n*\n* Instead of prototype identity, branded classes stamp every instance with the brand\n* strings of its class chain under a registry symbol (`Symbol.for`, shared across\n* bundles and realms), and resolve `instanceof` via `Symbol.hasInstance` against the\n* brand set. Ordinary prototype-based `instanceof` is kept as a fallback so behavior\n* is unchanged for anything unbranded.\n*\n* A class participates by defining an **own** `mcpBrand` static (via a `static {}`\n* block, so nothing reaches the declaration files — a declared `protected static`\n* field would make the constructor types nominally incompatible across the bundled\n* copies) and (for hierarchy roots) installing {@linkcode brandedHasInstance} as\n* `Symbol.hasInstance`. User-defined subclasses that do not declare their own brand\n* keep plain prototype semantics — a foreign base-class instance never satisfies\n* `instanceof UserSubclass`.\n*\n* Prior art — the same stamp-and-hook shape ships at scale elsewhere: Node core\n* (stream.Writable since 2017, Console via a marker symbol, diagnostics_channel),\n* undici's whole error hierarchy (vendored into Node as fetch), googleapis/gaxios\n* (GaxiosError, Symbol.for marker), AWS SDK v3's ServiceException (which pairs a\n* Symbol.hasInstance override with a static isInstance guard, as we do), and zod v4\n* (Symbol.hasInstance on every schema class for cross-version interop).\n*\n* Contract notes:\n* - Participation criterion: **every error class exported from a public package that\n* callers are documented to `instanceof` must be branded.** The per-package\n* errorBrandConformance tests walk the export surfaces and fail naming any\n* exported Error subclass that has not opted in.\n* - Brands assert **identity, not shape**: brand strings are version-less, so an\n* instance from one SDK version matches the class of another. Members added to a\n* branded class in a later version may be absent on a matched instance — read\n* fields defensively, and treat branded classes as additive-only. The escape\n* hatch when a release must break a branded class's read contract: change that\n* class's brand string in the same release, which cleanly severs cross-version\n* matching for that class. The per-package brand pins make the rename\n* deliberate: errorSurfacePins.test.ts owns the core-internal brands, and each\n* package's errorBrandConformance test pins its package-local ones.\n* - Cross-bundle matching requires **both** copies to be at or after the release\n* that introduced branding; against an older copy, behavior degrades to plain\n* prototype `instanceof` in both directions.\n* - A consumer re-bundling the SDK with property mangling (`mangle.props`) would\n* break the brand statics; default esbuild/webpack/terser settings do not.\n*/\n/** Registry symbol — identical across bundled copies and realms. */\nconst BRANDS = Symbol.for(\"mcp.sdk.errorBrands\");\n/**\n* Stamp `instance` with the brand of every class in `ctor`'s chain that declares an\n* own `mcpBrand`. Call once from the hierarchy root's constructor with `new.target` —\n* subclasses inherit the stamping without touching their constructors.\n*\n* Constructor-time only: never stamp arbitrary objects. A stamped non-instance would\n* satisfy `instanceof` while lacking the prototype members (getters like `.status`)\n* that callers reach for after the check.\n*/\nfunction stampErrorBrands(instance, ctor) {\n\tconst brands = /* @__PURE__ */ new Set();\n\tlet current = ctor;\n\twhile (typeof current === \"function\") {\n\t\tconst brand = current.mcpBrand;\n\t\tif (Object.prototype.hasOwnProperty.call(current, \"mcpBrand\") && typeof brand === \"string\") brands.add(brand);\n\t\tcurrent = Object.getPrototypeOf(current);\n\t}\n\tif (brands.size === 0) return;\n\tObject.defineProperty(instance, BRANDS, {\n\t\tvalue: brands,\n\t\tenumerable: false,\n\t\tconfigurable: true\n\t});\n}\n/**\n* `Symbol.hasInstance` implementation for branded hierarchy roots. Matches when the\n* value carries the **own** brand of the class being tested against (cross-bundle\n* path), falling back to ordinary prototype-based `instanceof` otherwise.\n*/\nfunction brandedHasInstance(cls, value) {\n\ttry {\n\t\tif (typeof value === \"object\" && value !== null && Object.prototype.hasOwnProperty.call(cls, \"mcpBrand\") && typeof cls.mcpBrand === \"string\" && Object.prototype.hasOwnProperty.call(value, BRANDS)) {\n\t\t\tconst carried = value[BRANDS];\n\t\t\tif (carried && typeof carried.has === \"function\" && carried.has(cls.mcpBrand)) return true;\n\t\t}\n\t} catch {}\n\treturn Function.prototype[Symbol.hasInstance].call(cls, value);\n}\n\n//#endregion\n//#region ../core-internal/src/auth/errors.ts\n/**\n* OAuth error codes as defined by {@link https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 | RFC 6749}\n* and extensions.\n*/\nlet OAuthErrorCode = /* @__PURE__ */ function(OAuthErrorCode$1) {\n\t/**\n\t* The request is missing a required parameter, includes an invalid parameter value,\n\t* includes a parameter more than once, or is otherwise malformed.\n\t*/\n\tOAuthErrorCode$1[\"InvalidRequest\"] = \"invalid_request\";\n\t/**\n\t* Client authentication failed (e.g., unknown client, no client authentication included,\n\t* or unsupported authentication method).\n\t*/\n\tOAuthErrorCode$1[\"InvalidClient\"] = \"invalid_client\";\n\t/**\n\t* The provided authorization grant or refresh token is invalid, expired, revoked,\n\t* does not match the redirection URI used in the authorization request, or was issued to another client.\n\t*/\n\tOAuthErrorCode$1[\"InvalidGrant\"] = \"invalid_grant\";\n\t/**\n\t* The authenticated client is not authorized to use this authorization grant type.\n\t*/\n\tOAuthErrorCode$1[\"UnauthorizedClient\"] = \"unauthorized_client\";\n\t/**\n\t* The authorization grant type is not supported by the authorization server.\n\t*/\n\tOAuthErrorCode$1[\"UnsupportedGrantType\"] = \"unsupported_grant_type\";\n\t/**\n\t* The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.\n\t*/\n\tOAuthErrorCode$1[\"InvalidScope\"] = \"invalid_scope\";\n\t/**\n\t* The resource owner or authorization server denied the request.\n\t*/\n\tOAuthErrorCode$1[\"AccessDenied\"] = \"access_denied\";\n\t/**\n\t* The authorization server encountered an unexpected condition that prevented it from fulfilling the request.\n\t*/\n\tOAuthErrorCode$1[\"ServerError\"] = \"server_error\";\n\t/**\n\t* The authorization server is currently unable to handle the request due to temporary overloading or maintenance.\n\t*/\n\tOAuthErrorCode$1[\"TemporarilyUnavailable\"] = \"temporarily_unavailable\";\n\t/**\n\t* The authorization server does not support obtaining an authorization code using this method.\n\t*/\n\tOAuthErrorCode$1[\"UnsupportedResponseType\"] = \"unsupported_response_type\";\n\t/**\n\t* The authorization server does not support the requested token type.\n\t*/\n\tOAuthErrorCode$1[\"UnsupportedTokenType\"] = \"unsupported_token_type\";\n\t/**\n\t* The access token provided is expired, revoked, malformed, or invalid for other reasons.\n\t*/\n\tOAuthErrorCode$1[\"InvalidToken\"] = \"invalid_token\";\n\t/**\n\t* The HTTP method used is not allowed for this endpoint. (Custom, non-standard error)\n\t*/\n\tOAuthErrorCode$1[\"MethodNotAllowed\"] = \"method_not_allowed\";\n\t/**\n\t* Rate limit exceeded. (Custom, non-standard error based on RFC 6585)\n\t*/\n\tOAuthErrorCode$1[\"TooManyRequests\"] = \"too_many_requests\";\n\t/**\n\t* The client metadata is invalid. (Custom error for dynamic client registration - RFC 7591)\n\t*/\n\tOAuthErrorCode$1[\"InvalidClientMetadata\"] = \"invalid_client_metadata\";\n\t/**\n\t* The value of one or more redirection URIs is invalid. (Dynamic client registration - RFC 7591 §3.2.2)\n\t*/\n\tOAuthErrorCode$1[\"InvalidRedirectUri\"] = \"invalid_redirect_uri\";\n\t/**\n\t* The request requires higher privileges than provided by the access token.\n\t*/\n\tOAuthErrorCode$1[\"InsufficientScope\"] = \"insufficient_scope\";\n\t/**\n\t* The requested resource is invalid, missing, unknown, or malformed. (Custom error for resource indicators - RFC 8707)\n\t*/\n\tOAuthErrorCode$1[\"InvalidTarget\"] = \"invalid_target\";\n\treturn OAuthErrorCode$1;\n}({});\n/**\n* OAuth error class for all OAuth-related errors.\n*/\nvar OAuthError = class OAuthError extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.OAuthError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(code, message, errorUri) {\n\t\tsuper(message);\n\t\tthis.code = code;\n\t\tthis.errorUri = errorUri;\n\t\tthis.name = \"OAuthError\";\n\t\tstampErrorBrands(this, new.target);\n\t}\n\t/**\n\t* Converts the error to a standard OAuth error response object.\n\t*/\n\ttoResponseObject() {\n\t\tconst response = {\n\t\t\terror: this.code,\n\t\t\terror_description: this.message\n\t\t};\n\t\tif (this.errorUri) response.error_uri = this.errorUri;\n\t\treturn response;\n\t}\n\t/**\n\t* Creates an {@linkcode OAuthError} from an OAuth error response.\n\t*/\n\tstatic fromResponse(response) {\n\t\treturn new OAuthError(response.error, response.error_description ?? response.error, response.error_uri);\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/errors/sdkErrors.ts\n/**\n* Error codes for SDK errors (local errors that never cross the wire).\n* Unlike {@linkcode ProtocolErrorCode} which uses numeric JSON-RPC codes, `SdkErrorCode` uses\n* descriptive string values for better developer experience.\n*\n* These errors are thrown locally by the SDK and are never serialized as\n* JSON-RPC error responses.\n*/\nlet SdkErrorCode = /* @__PURE__ */ function(SdkErrorCode$1) {\n\t/** Transport is not connected */\n\tSdkErrorCode$1[\"NotConnected\"] = \"NOT_CONNECTED\";\n\t/** Transport is already connected */\n\tSdkErrorCode$1[\"AlreadyConnected\"] = \"ALREADY_CONNECTED\";\n\t/** Protocol is not initialized */\n\tSdkErrorCode$1[\"NotInitialized\"] = \"NOT_INITIALIZED\";\n\t/** Required capability is not supported by the remote side */\n\tSdkErrorCode$1[\"CapabilityNotSupported\"] = \"CAPABILITY_NOT_SUPPORTED\";\n\t/** Request timed out waiting for response */\n\tSdkErrorCode$1[\"RequestTimeout\"] = \"REQUEST_TIMEOUT\";\n\t/** Connection was closed */\n\tSdkErrorCode$1[\"ConnectionClosed\"] = \"CONNECTION_CLOSED\";\n\t/** Failed to send message */\n\tSdkErrorCode$1[\"SendFailed\"] = \"SEND_FAILED\";\n\t/** Response result failed local schema validation */\n\tSdkErrorCode$1[\"InvalidResult\"] = \"INVALID_RESULT\";\n\t/**\n\t* The response carried a `resultType` discriminator (protocol revision\n\t* 2026-07-28) naming a result kind this client cannot consume yet, e.g.\n\t* `input_required`. The kind is carried in `data.resultType`.\n\t*/\n\tSdkErrorCode$1[\"UnsupportedResultType\"] = \"UNSUPPORTED_RESULT_TYPE\";\n\t/**\n\t* The multi-round-trip auto-fulfilment driver exhausted its round cap\n\t* (`inputRequired.maxRounds`) without the server returning a complete\n\t* result. `data.rounds` carries the cap that was hit and\n\t* `data.lastResult` carries the last `input_required` payload received\n\t* (`{ inputRequests, requestState? }`), so callers can inspect or resume\n\t* the flow manually.\n\t*/\n\tSdkErrorCode$1[\"InputRequiredRoundsExceeded\"] = \"INPUT_REQUIRED_ROUNDS_EXCEEDED\";\n\t/**\n\t* The auto-aggregating no-`cursor` `listTools()` / `listPrompts()` /\n\t* `listResources()` / `listResourceTemplates()` walk hit the\n\t* `ClientOptions.listMaxPages` cap without the server's pagination\n\t* converging. `data.method` carries the list verb and\n\t* `data.listMaxPages` the cap that was hit; raise the cap or fall back to\n\t* explicit per-page `{ cursor }` calls.\n\t*/\n\tSdkErrorCode$1[\"ListPaginationExceeded\"] = \"LIST_PAGINATION_EXCEEDED\";\n\t/**\n\t* The spec method being sent does not exist on the negotiated protocol\n\t* version's wire era (e.g. `tasks/get` toward a 2026-07-28 peer, or\n\t* `server/discover` toward a 2025-era peer). Raised locally, before\n\t* anything reaches the transport. The method and era are carried in\n\t* `data.method` / `data.era`.\n\t*/\n\tSdkErrorCode$1[\"MethodNotSupportedByProtocolVersion\"] = \"METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION\";\n\t/**\n\t* Protocol-era negotiation at connect time failed without producing either a\n\t* usable modern (2026-07-28+) era or a definitive legacy fallback signal —\n\t* e.g. the negotiation mode forbids falling back (`pin`), the probe hit a\n\t* network failure, or the server answered the probe with a 5xx (a typed\n\t* connect error, never an era verdict).\n\t*\n\t* Negotiation-phase only: this code is never used once an era is\n\t* established. Auth walls never carry it: a 401/403 rejecting the probe\n\t* uses {@linkcode ClientHttpAuthentication} / {@linkcode ClientHttpForbidden}\n\t* instead, so era-recovery flows keyed on this code (e.g. cached-verdict\n\t* gateways) can never persist a verdict for an unauthorized exchange.\n\t*/\n\tSdkErrorCode$1[\"EraNegotiationFailed\"] = \"ERA_NEGOTIATION_FAILED\";\n\tSdkErrorCode$1[\"ClientHttpNotImplemented\"] = \"CLIENT_HTTP_NOT_IMPLEMENTED\";\n\t/**\n\t* HTTP 401 authentication failure: the transport's re-auth retry still got\n\t* 401 (`Server returned 401 after re-authentication`), or the version\n\t* negotiation probe was rejected 401 with no `authProvider` configured\n\t* (`Version negotiation failed: the server requires authorization (HTTP 401)`).\n\t* Carried on an {@linkcode SdkHttpError} with `status: 401`.\n\t*/\n\tSdkErrorCode$1[\"ClientHttpAuthentication\"] = \"CLIENT_HTTP_AUTHENTICATION\";\n\t/**\n\t* HTTP 403 denial: the step-up re-authorization retry limit was reached,\n\t* or the version negotiation probe was rejected 403\n\t* (`Version negotiation failed: the server denied access (HTTP 403)`).\n\t* Carried on an {@linkcode SdkHttpError} with `status: 403`.\n\t*/\n\tSdkErrorCode$1[\"ClientHttpForbidden\"] = \"CLIENT_HTTP_FORBIDDEN\";\n\tSdkErrorCode$1[\"ClientHttpUnexpectedContent\"] = \"CLIENT_HTTP_UNEXPECTED_CONTENT\";\n\tSdkErrorCode$1[\"ClientHttpFailedToOpenStream\"] = \"CLIENT_HTTP_FAILED_TO_OPEN_STREAM\";\n\tSdkErrorCode$1[\"ClientHttpFailedToTerminateSession\"] = \"CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION\";\n\treturn SdkErrorCode$1;\n}({});\n/**\n* SDK errors are local errors that never cross the wire.\n* They are distinct from {@linkcode ProtocolError} which represents JSON-RPC protocol errors\n* that are serialized and sent as error responses.\n*\n* @example\n* ```ts source=\"./sdkErrors.examples.ts#SdkError_basicUsage\"\n* try {\n* // Throwing an SDK error\n* throw new SdkError(SdkErrorCode.NotConnected, 'Transport is not connected');\n* } catch (error) {\n* // Checking error type by code\n* if (error instanceof SdkError && error.code === SdkErrorCode.RequestTimeout) {\n* // Handle timeout\n* }\n* }\n* ```\n*/\nvar SdkError = class extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.SdkError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(code, message, data) {\n\t\tsuper(message);\n\t\tthis.code = code;\n\t\tthis.data = data;\n\t\tthis.name = \"SdkError\";\n\t\tstampErrorBrands(this, new.target);\n\t}\n};\n/**\n* An {@linkcode SdkError} subclass for HTTP transport failures.\n*\n* Thrown by the streamable HTTP transport when the server responds with a\n* non-OK status code. Narrows {@linkcode SdkError.data | data} to\n* {@linkcode SdkHttpErrorData} so consumers can inspect the HTTP status\n* without unsafe casting.\n*\n* @example\n* ```ts source=\"./sdkErrors.examples.ts#SdkHttpError_basicUsage\"\n* if (error instanceof SdkHttpError) {\n* console.log(error.status); // number\n* console.log(error.statusText); // string | undefined\n* }\n* ```\n*/\nvar SdkHttpError = class extends SdkError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.SdkHttpError\" });\n\t}\n\tconstructor(code, message, data) {\n\t\tsuper(code, message, data);\n\t\tthis.name = \"SdkHttpError\";\n\t}\n\tget status() {\n\t\treturn this.data.status;\n\t}\n\tget statusText() {\n\t\treturn this.data.statusText;\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/shared/authUtils.ts\n/**\n* Utilities for handling OAuth resource URIs.\n*/\n/**\n* Converts a server URL to a resource URL by removing the fragment.\n* {@link https://datatracker.ietf.org/doc/html/rfc8707#section-2 | RFC 8707 section 2}\n* states that resource URIs \"MUST NOT include a fragment component\".\n* Keeps everything else unchanged (scheme, domain, port, path, query).\n*/\nfunction resourceUrlFromServerUrl(url) {\n\tconst resourceURL = typeof url === \"string\" ? new URL(url) : new URL(url.href);\n\tresourceURL.hash = \"\";\n\treturn resourceURL;\n}\n/**\n* Checks if a requested resource URL matches a configured resource URL.\n* A requested resource matches if it has the same scheme, domain, port,\n* and its path starts with the configured resource's path.\n*\n* @param options - The options object\n* @param options.requestedResource - The resource URL being requested\n* @param options.configuredResource - The resource URL that has been configured\n* @returns true if the requested resource matches the configured resource, false otherwise\n*/\nfunction checkResourceAllowed({ requestedResource, configuredResource }) {\n\tconst requested = typeof requestedResource === \"string\" ? new URL(requestedResource) : new URL(requestedResource.href);\n\tconst configured = typeof configuredResource === \"string\" ? new URL(configuredResource) : new URL(configuredResource.href);\n\tif (requested.origin !== configured.origin) return false;\n\tif (requested.pathname.length < configured.pathname.length) return false;\n\tconst requestedPath = requested.pathname.endsWith(\"/\") ? requested.pathname : requested.pathname + \"/\";\n\tconst configuredPath = configured.pathname.endsWith(\"/\") ? configured.pathname : configured.pathname + \"/\";\n\treturn requestedPath.startsWith(configuredPath);\n}\n\n//#endregion\n//#region ../core-internal/src/shared/protocolEras.ts\n/**\n* The first protocol revision of the modern (2026-07-28) era. Revision identifiers\n* are ISO dates, so lexicographic comparison orders them chronologically.\n*/\nconst FIRST_MODERN_PROTOCOL_VERSION = \"2026-07-28\";\n/**\n* Modern-era protocol revisions this SDK can negotiate via `server/discover`.\n* Deliberately separate from {@linkcode SUPPORTED_PROTOCOL_VERSIONS} (the legacy\n* `initialize` list), so adding a revision here can never leak a modern version\n* string into a 2025-era handshake. Internal — not part of the public API surface.\n*/\nconst SUPPORTED_MODERN_PROTOCOL_VERSIONS = [FIRST_MODERN_PROTOCOL_VERSION];\n/** Whether the given protocol revision belongs to the modern (2026-07-28+) era. */\nfunction isModernProtocolVersion(version) {\n\treturn version >= FIRST_MODERN_PROTOCOL_VERSION;\n}\n/** The legacy-era (pre-2026-07-28) subset of a supported-versions list, in the list's own preference order. */\nfunction legacyProtocolVersions(versions) {\n\treturn versions.filter((version) => !isModernProtocolVersion(version));\n}\n/** The modern-era (2026-07-28+) subset of a supported-versions list, in the list's own preference order. */\nfunction modernProtocolVersions(versions) {\n\treturn versions.filter((version) => isModernProtocolVersion(version));\n}\n\n//#endregion\n//#region ../core-internal/src/wire/textFallback.ts\n/**\n* SEP-2106 §4.3 TextContent auto-append, era-agnostic, called from BOTH\n* codecs' {@link WireCodec.projectCallToolResult}: when `structuredContent`\n* is a non-object value (array/primitive/`null`) and the handler authored no\n* `type:'text'` block, append `{type:'text', text: JSON.stringify(value)}`.\n* Object-shaped (or absent) `structuredContent` returns the same reference.\n*\n* Leaf module: imported by both era codec modules, so it must NOT import from\n* `./codec.js` (which value-imports the rev codecs at top level — that would\n* make a runtime cycle and a TDZ hazard for entries that evaluate a rev codec\n* module first).\n*/\nfunction appendTextFallbackForNonObject(result) {\n\tconst sc = result.structuredContent;\n\tif (sc === void 0) return result;\n\tif (!(typeof sc !== \"object\" || sc === null || Array.isArray(sc))) return result;\n\tif (result.content?.some((c) => c.type === \"text\") ?? false) return result;\n\treturn {\n\t\t...result,\n\t\tcontent: [...result.content ?? [], {\n\t\t\ttype: \"text\",\n\t\t\ttext: JSON.stringify(sc)\n\t\t}]\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/wire/resultFamilies.ts\n/**\n* Result-family keys that must never default into a `{content: []}` tools/call\n* success. Shared by the 2025 wire-seam schema and server normalization.\n* Leaf module (like `textFallback.ts`): imported by registry/server paths, so\n* it must NOT import from `./codec.js` — that would close a runtime cycle.\n*/\nconst TOOL_RESULT_FOREIGN_FAMILY_KEYS = [\n\t\"task\",\n\t\"inputRequests\",\n\t\"requestState\"\n];\n/**\n* Single owner of the v1-parity ruling: a plain-object tool result without `content` (and\n* without foreign-family keys) gains `content: []`. Shared by the 2025 wire seam and server-side handler normalization.\n*/\nfunction normalizeContentlessToolResult(value) {\n\tif (value === null || typeof value !== \"object\" || Array.isArray(value) || value.content !== void 0 || TOOL_RESULT_FOREIGN_FAMILY_KEYS.some((key) => key in value)) return value;\n\treturn {\n\t\t...value,\n\t\tcontent: []\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2025-11-25/buildSchemas.ts\n/**\n* Complete frozen 2025-11-25 wire schemas. Self-contained — no imports from\n* the public/neutral types/schemas.ts. The neutral layer is the public-API\n* superset and is free to evolve (e.g., SEP-2106 widening); this file is the\n* 2025 wire-parse contract (Q10-L2 byte-identity) and is BEHAVIOR-FROZEN.\n*\n* This is the era's complete frozen wire-parse contract — both the 2025-only\n* delta (the deprecated task family, the era role unions) AND frozen copies of\n* every era-shared shape (Tool, CallToolResult, Initialize*, ContentBlock,\n* prompts/resources/completion/elicitation, …). The 2026-era codec\n* (`wire/rev2026-07-28/`) is symmetrically self-contained in the same way.\n*\n* The 2025-only delta (the task message surface, restored types-only by #2248\n* for interop with task-capable 2025 peers) is parsed ONLY through this era's\n* registry; the deprecated Task* schemas also live (marked `@deprecated`) in\n* the neutral schema layer so the public types stay nameable without a\n* cross-layer import — nameability is constant, runtime availability is\n* version-keyed — but appear in no API signature. Q1 increment 2 — deletions\n* are physical: the\n* 2026-era REGISTRY has no Task* methods (its frozen building-block copies do\n* carry the deprecated Task* sub-schemas by composition — soft contamination,\n* tracked for anchor-exactness adjudication).\n*\n* The only cross-layer dependency is `import type { JSONObject, JSONValue }`\n* from the neutral types barrel — pure structural type aliases with no parse\n* behavior. No runtime schema is shared with the neutral layer.\n*/\nfunction build$1() {\n\tconst JSONValueSchema$1 = z.lazy(() => z.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean(),\n\t\tz.null(),\n\t\tz.record(z.string(), JSONValueSchema$1),\n\t\tz.array(JSONValueSchema$1)\n\t]));\n\tconst JSONObjectSchema$1 = z.record(z.string(), JSONValueSchema$1);\n\t/**\n\t* A progress token, used to associate progress notifications with the original request.\n\t*/\n\tconst ProgressTokenSchema$1 = z.union([z.string(), z.number().int()]);\n\t/**\n\t* An opaque token used to represent a cursor for pagination.\n\t*/\n\tconst CursorSchema$1 = z.string();\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst TaskMetadataSchema$1 = z.object({ ttl: z.number().optional() });\n\t/**\n\t* Metadata for associating messages with a task.\n\t* Include this in the `_meta` field under the key `io.modelcontextprotocol/related-task`.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst RelatedTaskMetadataSchema$1 = z.object({ taskId: z.string() });\n\tconst RequestMetaSchema$1 = z.looseObject({\n\t\tprogressToken: ProgressTokenSchema$1.optional(),\n\t\t\"io.modelcontextprotocol/related-task\": RelatedTaskMetadataSchema$1.optional()\n\t});\n\t/**\n\t* Common params for any request.\n\t*/\n\tconst BaseRequestParamsSchema$1 = z.object({ _meta: RequestMetaSchema$1.optional() });\n\t/**\n\t* Common params for any task-augmented request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskAugmentedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ task: TaskMetadataSchema$1.optional() });\n\tconst RequestSchema$1 = z.object({\n\t\tmethod: z.string(),\n\t\tparams: BaseRequestParamsSchema$1.loose().optional()\n\t});\n\tconst NotificationsParamsSchema$1 = z.object({ _meta: RequestMetaSchema$1.optional() });\n\tconst NotificationSchema$1 = z.object({\n\t\tmethod: z.string(),\n\t\tparams: NotificationsParamsSchema$1.loose().optional()\n\t});\n\tconst ResultSchema$1 = z.looseObject({ _meta: RequestMetaSchema$1.optional() });\n\t/**\n\t* A uniquely identifying ID for a request in JSON-RPC.\n\t*/\n\tconst RequestIdSchema$1 = z.union([z.string(), z.number().int()]);\n\t/**\n\t* A response that indicates success but carries no data.\n\t*/\n\tconst EmptyResultSchema$1 = ResultSchema$1.strict();\n\tconst CancelledNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({\n\t\trequestId: RequestIdSchema$1.optional(),\n\t\treason: z.string().optional()\n\t});\n\t/**\n\t* This notification can be sent by either side to indicate that it is cancelling a previously-issued request.\n\t*\n\t* The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.\n\t*\n\t* This notification indicates that the result will be unused, so any associated processing SHOULD cease.\n\t*\n\t* A client MUST NOT attempt to cancel its {@linkcode InitializeRequest | initialize} request.\n\t*/\n\tconst CancelledNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/cancelled\"),\n\t\tparams: CancelledNotificationParamsSchema$1\n\t});\n\t/**\n\t* Icon schema for use in {@link Tool | tools}, {@link Prompt | prompts}, {@link Resource | resources}, and {@link Implementation | implementations}.\n\t*/\n\tconst IconSchema$1 = z.object({\n\t\tsrc: z.string(),\n\t\tmimeType: z.string().optional(),\n\t\tsizes: z.array(z.string()).optional(),\n\t\ttheme: z.enum([\"light\", \"dark\"]).optional()\n\t});\n\t/**\n\t* Base schema to add `icons` property.\n\t*\n\t*/\n\tconst IconsSchema$1 = z.object({ icons: z.array(IconSchema$1).optional() });\n\t/**\n\t* Base metadata interface for common properties across {@link Resource | resources}, {@link Tool | tools}, {@link Prompt | prompts}, and {@link Implementation | implementations}.\n\t*/\n\tconst BaseMetadataSchema$1 = z.object({\n\t\tname: z.string(),\n\t\ttitle: z.string().optional()\n\t});\n\t/**\n\t* Describes the name and version of an MCP implementation.\n\t*/\n\tconst ImplementationSchema$1 = BaseMetadataSchema$1.extend({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tversion: z.string(),\n\t\twebsiteUrl: z.string().optional(),\n\t\tdescription: z.string().optional()\n\t});\n\tconst FormElicitationCapabilitySchema = z.intersection(z.object({ applyDefaults: z.boolean().optional() }), JSONObjectSchema$1);\n\tconst ElicitationCapabilitySchema = z.preprocess((value) => {\n\t\tif (value && typeof value === \"object\" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };\n\t\treturn value;\n\t}, z.intersection(z.object({\n\t\tform: FormElicitationCapabilitySchema.optional(),\n\t\turl: JSONObjectSchema$1.optional()\n\t}), JSONObjectSchema$1.optional()));\n\t/**\n\t* Task capabilities for clients, indicating which request types support task creation.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst ClientTasksCapabilitySchema$1 = z.looseObject({\n\t\tlist: JSONObjectSchema$1.optional(),\n\t\tcancel: JSONObjectSchema$1.optional(),\n\t\trequests: z.looseObject({\n\t\t\tsampling: z.looseObject({ createMessage: JSONObjectSchema$1.optional() }).optional(),\n\t\t\telicitation: z.looseObject({ create: JSONObjectSchema$1.optional() }).optional()\n\t\t}).optional()\n\t});\n\t/**\n\t* Task capabilities for servers, indicating which request types support task creation.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst ServerTasksCapabilitySchema$1 = z.looseObject({\n\t\tlist: JSONObjectSchema$1.optional(),\n\t\tcancel: JSONObjectSchema$1.optional(),\n\t\trequests: z.looseObject({ tools: z.looseObject({ call: JSONObjectSchema$1.optional() }).optional() }).optional()\n\t});\n\t/**\n\t* Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.\n\t*/\n\tconst ClientCapabilitiesSchema$1 = z.object({\n\t\texperimental: z.record(z.string(), JSONObjectSchema$1).optional(),\n\t\tsampling: z.object({\n\t\t\tcontext: JSONObjectSchema$1.optional(),\n\t\t\ttools: JSONObjectSchema$1.optional()\n\t\t}).optional(),\n\t\telicitation: ElicitationCapabilitySchema.optional(),\n\t\troots: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\ttasks: ClientTasksCapabilitySchema$1.optional(),\n\t\textensions: z.record(z.string(), JSONObjectSchema$1).optional()\n\t});\n\tconst InitializeRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({\n\t\tprotocolVersion: z.string(),\n\t\tcapabilities: ClientCapabilitiesSchema$1,\n\t\tclientInfo: ImplementationSchema$1\n\t});\n\t/**\n\t* This request is sent from the client to the server when it first connects, asking it to begin initialization.\n\t*/\n\tconst InitializeRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"initialize\"),\n\t\tparams: InitializeRequestParamsSchema$1\n\t});\n\t/**\n\t* Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.\n\t*/\n\tconst ServerCapabilitiesSchema$1 = z.object({\n\t\texperimental: z.record(z.string(), JSONObjectSchema$1).optional(),\n\t\tlogging: JSONObjectSchema$1.optional(),\n\t\tcompletions: JSONObjectSchema$1.optional(),\n\t\tprompts: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\tresources: z.object({\n\t\t\tsubscribe: z.boolean().optional(),\n\t\t\tlistChanged: z.boolean().optional()\n\t\t}).optional(),\n\t\ttools: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\ttasks: ServerTasksCapabilitySchema$1.optional(),\n\t\textensions: z.record(z.string(), JSONObjectSchema$1).optional()\n\t});\n\t/**\n\t* After receiving an initialize request from the client, the server sends this response.\n\t*/\n\tconst InitializeResultSchema$1 = ResultSchema$1.extend({\n\t\tprotocolVersion: z.string(),\n\t\tcapabilities: ServerCapabilitiesSchema$1,\n\t\tserverInfo: ImplementationSchema$1,\n\t\tinstructions: z.string().optional()\n\t});\n\t/**\n\t* This notification is sent from the client to the server after initialization has finished.\n\t*/\n\tconst InitializedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/initialized\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\t/**\n\t* A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.\n\t*/\n\tconst PingRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"ping\"),\n\t\tparams: BaseRequestParamsSchema$1.optional()\n\t});\n\tconst ProgressSchema$1 = z.object({\n\t\tprogress: z.number(),\n\t\ttotal: z.optional(z.number()),\n\t\tmessage: z.optional(z.string())\n\t});\n\tconst ProgressNotificationParamsSchema$1 = z.object({\n\t\t...NotificationsParamsSchema$1.shape,\n\t\t...ProgressSchema$1.shape,\n\t\tprogressToken: ProgressTokenSchema$1\n\t});\n\t/**\n\t* An out-of-band notification used to inform the receiver of a progress update for a long-running request.\n\t*\n\t* @category notifications/progress\n\t*/\n\tconst ProgressNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/progress\"),\n\t\tparams: ProgressNotificationParamsSchema$1\n\t});\n\tconst PaginatedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ cursor: CursorSchema$1.optional() });\n\tconst PaginatedRequestSchema$1 = RequestSchema$1.extend({ params: PaginatedRequestParamsSchema$1.optional() });\n\tconst PaginatedResultSchema$1 = ResultSchema$1.extend({ nextCursor: CursorSchema$1.optional() });\n\t/**\n\t* The contents of a specific resource or sub-resource.\n\t*/\n\tconst ResourceContentsSchema$1 = z.object({\n\t\turi: z.string(),\n\t\tmimeType: z.optional(z.string()),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst TextResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ text: z.string() });\n\t/**\n\t* A Zod schema for validating Base64 strings that is more performant and\n\t* robust for very large inputs than the default regex-based check. It avoids\n\t* stack overflows by using the native `atob` function for validation.\n\t*/\n\tconst Base64Schema = z.string().refine((val) => {\n\t\ttry {\n\t\t\tatob(val);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, { message: \"Invalid Base64 string\" });\n\tconst BlobResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ blob: Base64Schema });\n\t/**\n\t* The sender or recipient of messages and data in a conversation.\n\t*/\n\tconst RoleSchema$1 = z.enum([\"user\", \"assistant\"]);\n\t/**\n\t* Optional annotations providing clients additional context about a resource.\n\t*/\n\tconst AnnotationsSchema$1 = z.object({\n\t\taudience: z.array(RoleSchema$1).optional(),\n\t\tpriority: z.number().min(0).max(1).optional(),\n\t\tlastModified: z.iso.datetime({ offset: true }).optional()\n\t});\n\t/**\n\t* A known resource that the server is capable of reading.\n\t*/\n\tconst ResourceSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\turi: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\tmimeType: z.optional(z.string()),\n\t\tsize: z.optional(z.number()),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\t/**\n\t* A template description for resources available on the server.\n\t*/\n\tconst ResourceTemplateSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\turiTemplate: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\tmimeType: z.optional(z.string()),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\t/**\n\t* Sent from the client to request a list of resources the server has.\n\t*/\n\tconst ListResourcesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"resources/list\") });\n\t/**\n\t* The server's response to a {@linkcode ListResourcesRequest | resources/list} request from the client.\n\t*/\n\tconst ListResourcesResultSchema$1 = PaginatedResultSchema$1.extend({ resources: z.array(ResourceSchema$1) });\n\t/**\n\t* Sent from the client to request a list of resource templates the server has.\n\t*/\n\tconst ListResourceTemplatesRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"resources/templates/list\") });\n\t/**\n\t* The server's response to a {@linkcode ListResourceTemplatesRequest | resources/templates/list} request from the client.\n\t*/\n\tconst ListResourceTemplatesResultSchema$1 = PaginatedResultSchema$1.extend({ resourceTemplates: z.array(ResourceTemplateSchema$1) });\n\tconst ResourceRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ uri: z.string() });\n\t/**\n\t* Parameters for a {@linkcode ReadResourceRequest | resources/read} request.\n\t*/\n\tconst ReadResourceRequestParamsSchema$1 = ResourceRequestParamsSchema$1;\n\t/**\n\t* Sent from the client to the server, to read a specific resource URI.\n\t*/\n\tconst ReadResourceRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"resources/read\"),\n\t\tparams: ReadResourceRequestParamsSchema$1\n\t});\n\t/**\n\t* The server's response to a {@linkcode ReadResourceRequest | resources/read} request from the client.\n\t*/\n\tconst ReadResourceResultSchema$1 = ResultSchema$1.extend({ contents: z.array(z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1])) });\n\t/**\n\t* An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.\n\t*/\n\tconst ResourceListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/resources/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\tconst SubscribeRequestParamsSchema$1 = ResourceRequestParamsSchema$1;\n\t/**\n\t* Sent from the client to request `resources/updated` notifications from the server whenever a particular resource changes.\n\t*/\n\tconst SubscribeRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"resources/subscribe\"),\n\t\tparams: SubscribeRequestParamsSchema$1\n\t});\n\tconst UnsubscribeRequestParamsSchema$1 = ResourceRequestParamsSchema$1;\n\t/**\n\t* Sent from the client to request cancellation of {@linkcode ResourceUpdatedNotification | resources/updated} notifications from the server. This should follow a previous {@linkcode SubscribeRequest | resources/subscribe} request.\n\t*/\n\tconst UnsubscribeRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"resources/unsubscribe\"),\n\t\tparams: UnsubscribeRequestParamsSchema$1\n\t});\n\t/**\n\t* Parameters for a {@linkcode ResourceUpdatedNotification | notifications/resources/updated} notification.\n\t*/\n\tconst ResourceUpdatedNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({ uri: z.string() });\n\t/**\n\t* A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a {@linkcode SubscribeRequest | resources/subscribe} request.\n\t*/\n\tconst ResourceUpdatedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/resources/updated\"),\n\t\tparams: ResourceUpdatedNotificationParamsSchema$1\n\t});\n\t/**\n\t* Describes an argument that a prompt can accept.\n\t*/\n\tconst PromptArgumentSchema$1 = z.object({\n\t\tname: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\trequired: z.optional(z.boolean())\n\t});\n\t/**\n\t* A prompt or prompt template that the server offers.\n\t*/\n\tconst PromptSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tdescription: z.optional(z.string()),\n\t\targuments: z.optional(z.array(PromptArgumentSchema$1)),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\t/**\n\t* Sent from the client to request a list of prompts and prompt templates the server has.\n\t*/\n\tconst ListPromptsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"prompts/list\") });\n\t/**\n\t* The server's response to a {@linkcode ListPromptsRequest | prompts/list} request from the client.\n\t*/\n\tconst ListPromptsResultSchema$1 = PaginatedResultSchema$1.extend({ prompts: z.array(PromptSchema$1) });\n\t/**\n\t* Parameters for a {@linkcode GetPromptRequest | prompts/get} request.\n\t*/\n\tconst GetPromptRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({\n\t\tname: z.string(),\n\t\targuments: z.record(z.string(), z.string()).optional()\n\t});\n\t/**\n\t* Used by the client to get a prompt provided by the server.\n\t*/\n\tconst GetPromptRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"prompts/get\"),\n\t\tparams: GetPromptRequestParamsSchema$1\n\t});\n\t/**\n\t* Text provided to or from an LLM.\n\t*/\n\tconst TextContentSchema$1 = z.object({\n\t\ttype: z.literal(\"text\"),\n\t\ttext: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* An image provided to or from an LLM.\n\t*/\n\tconst ImageContentSchema$1 = z.object({\n\t\ttype: z.literal(\"image\"),\n\t\tdata: Base64Schema,\n\t\tmimeType: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Audio content provided to or from an LLM.\n\t*/\n\tconst AudioContentSchema$1 = z.object({\n\t\ttype: z.literal(\"audio\"),\n\t\tdata: Base64Schema,\n\t\tmimeType: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* A tool call request from an assistant (LLM).\n\t* Represents the assistant's request to use a tool.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ToolUseContentSchema$1 = z.object({\n\t\ttype: z.literal(\"tool_use\"),\n\t\tname: z.string(),\n\t\tid: z.string(),\n\t\tinput: z.record(z.string(), z.unknown()),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* The contents of a resource, embedded into a prompt or tool call result.\n\t*/\n\tconst EmbeddedResourceSchema$1 = z.object({\n\t\ttype: z.literal(\"resource\"),\n\t\tresource: z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* A resource that the server is capable of reading, included in a prompt or tool call result.\n\t*\n\t* Note: resource links returned by tools are not guaranteed to appear in the results of {@linkcode ListResourcesRequest | resources/list} requests.\n\t*/\n\tconst ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: z.literal(\"resource_link\") });\n\t/**\n\t* A content block that can be used in prompts and tool results.\n\t*/\n\tconst ContentBlockSchema$1 = z.union([\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1,\n\t\tResourceLinkSchema$1,\n\t\tEmbeddedResourceSchema$1\n\t]);\n\t/**\n\t* Describes a message returned as part of a prompt.\n\t*/\n\tconst PromptMessageSchema$1 = z.object({\n\t\trole: RoleSchema$1,\n\t\tcontent: ContentBlockSchema$1\n\t});\n\t/**\n\t* The server's response to a {@linkcode GetPromptRequest | prompts/get} request from the client.\n\t*/\n\tconst GetPromptResultSchema$1 = ResultSchema$1.extend({\n\t\tdescription: z.string().optional(),\n\t\tmessages: z.array(PromptMessageSchema$1)\n\t});\n\t/**\n\t* An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.\n\t*/\n\tconst PromptListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/prompts/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\t/**\n\t* Additional properties describing a `Tool` to clients.\n\t*\n\t* NOTE: all properties in {@linkcode ToolAnnotations} are **hints**.\n\t* They are not guaranteed to provide a faithful description of\n\t* tool behavior (including descriptive properties like `title`).\n\t*\n\t* Clients should never make tool use decisions based on `ToolAnnotations`\n\t* received from untrusted servers.\n\t*/\n\tconst ToolAnnotationsSchema$1 = z.object({\n\t\ttitle: z.string().optional(),\n\t\treadOnlyHint: z.boolean().optional(),\n\t\tdestructiveHint: z.boolean().optional(),\n\t\tidempotentHint: z.boolean().optional(),\n\t\topenWorldHint: z.boolean().optional()\n\t});\n\t/**\n\t* Execution-related properties for a tool.\n\t*/\n\tconst ToolExecutionSchema$1 = z.object({ taskSupport: z.enum([\n\t\t\"required\",\n\t\t\"optional\",\n\t\t\"forbidden\"\n\t]).optional() });\n\t/**\n\t* Definition for a tool the client can call.\n\t*/\n\tconst ToolSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tdescription: z.string().optional(),\n\t\tinputSchema: z.object({\n\t\t\ttype: z.literal(\"object\"),\n\t\t\tproperties: z.record(z.string(), JSONValueSchema$1).optional(),\n\t\t\trequired: z.array(z.string()).optional()\n\t\t}).catchall(z.unknown()),\n\t\toutputSchema: z.object({\n\t\t\ttype: z.literal(\"object\"),\n\t\t\tproperties: z.record(z.string(), JSONValueSchema$1).optional(),\n\t\t\trequired: z.array(z.string()).optional()\n\t\t}).catchall(z.unknown()).optional(),\n\t\tannotations: ToolAnnotationsSchema$1.optional(),\n\t\texecution: ToolExecutionSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Sent from the client to request a list of tools the server has.\n\t*/\n\tconst ListToolsRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"tools/list\") });\n\t/**\n\t* The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.\n\t*/\n\tconst ListToolsResultSchema$1 = PaginatedResultSchema$1.extend({ tools: z.array(ToolSchema$1) });\n\t/**\n\t* The server's response to a tool call.\n\t*/\n\tconst CallToolResultSchema$1 = ResultSchema$1.extend({\n\t\tcontent: z.array(ContentBlockSchema$1),\n\t\tstructuredContent: z.record(z.string(), z.unknown()).optional(),\n\t\tisError: z.boolean().optional()\n\t});\n\t/**\n\t* Parameters for a `tools/call` request.\n\t*/\n\tconst CallToolRequestParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tname: z.string(),\n\t\targuments: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Used by the client to invoke a tool provided by the server.\n\t*/\n\tconst CallToolRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"tools/call\"),\n\t\tparams: CallToolRequestParamsSchema$1\n\t});\n\t/**\n\t* An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.\n\t*/\n\tconst ToolListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/tools/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\t/**\n\t* The severity of a log message.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst LoggingLevelSchema$1 = z.enum([\n\t\t\"debug\",\n\t\t\"info\",\n\t\t\"notice\",\n\t\t\"warning\",\n\t\t\"error\",\n\t\t\"critical\",\n\t\t\"alert\",\n\t\t\"emergency\"\n\t]);\n\t/**\n\t* Parameters for a `logging/setLevel` request.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst SetLevelRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ level: LoggingLevelSchema$1 });\n\t/**\n\t* A request from the client to the server, to enable or adjust logging.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst SetLevelRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"logging/setLevel\"),\n\t\tparams: SetLevelRequestParamsSchema$1\n\t});\n\t/**\n\t* Parameters for a `notifications/message` notification.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst LoggingMessageNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({\n\t\tlevel: LoggingLevelSchema$1,\n\t\tlogger: z.string().optional(),\n\t\tdata: z.unknown()\n\t});\n\t/**\n\t* Notification of a log message passed from server to client. If no `logging/setLevel` request has been sent from the client, the server MAY decide which messages to send automatically.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to stderr logging\n\t* (STDIO servers) or OpenTelemetry.\n\t*/\n\tconst LoggingMessageNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/message\"),\n\t\tparams: LoggingMessageNotificationParamsSchema$1\n\t});\n\t/**\n\t* Hints to use for model selection.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ModelHintSchema$1 = z.object({ name: z.string().optional() });\n\t/**\n\t* The server's preferences for model selection, requested of the client during sampling.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ModelPreferencesSchema$1 = z.object({\n\t\thints: z.array(ModelHintSchema$1).optional(),\n\t\tcostPriority: z.number().min(0).max(1).optional(),\n\t\tspeedPriority: z.number().min(0).max(1).optional(),\n\t\tintelligencePriority: z.number().min(0).max(1).optional()\n\t});\n\t/**\n\t* Controls tool usage behavior in sampling requests.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ToolChoiceSchema$1 = z.object({ mode: z.enum([\n\t\t\"auto\",\n\t\t\"required\",\n\t\t\"none\"\n\t]).optional() });\n\t/**\n\t* The result of a tool execution, provided by the user (server).\n\t* Represents the outcome of invoking a tool requested via `ToolUseContent`.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst ToolResultContentSchema$1 = z.object({\n\t\ttype: z.literal(\"tool_result\"),\n\t\ttoolUseId: z.string().describe(\"The unique identifier for the corresponding tool call.\"),\n\t\tcontent: z.array(ContentBlockSchema$1),\n\t\tstructuredContent: z.object({}).loose().optional(),\n\t\tisError: z.boolean().optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Basic content types for sampling responses (without tool use).\n\t* Used for backwards-compatible {@linkcode CreateMessageResult} when tools are not used.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst SamplingContentSchema$1 = z.discriminatedUnion(\"type\", [\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1\n\t]);\n\t/**\n\t* Content block types allowed in sampling messages.\n\t* This includes text, image, audio, tool use requests, and tool results.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst SamplingMessageContentBlockSchema$1 = z.discriminatedUnion(\"type\", [\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1,\n\t\tToolUseContentSchema$1,\n\t\tToolResultContentSchema$1\n\t]);\n\t/**\n\t* Describes a message issued to or received from an LLM API.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst SamplingMessageSchema$1 = z.object({\n\t\trole: RoleSchema$1,\n\t\tcontent: z.union([SamplingMessageContentBlockSchema$1, z.array(SamplingMessageContentBlockSchema$1)]),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Parameters for a `sampling/createMessage` request.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst CreateMessageRequestParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tmessages: z.array(SamplingMessageSchema$1),\n\t\tmodelPreferences: ModelPreferencesSchema$1.optional(),\n\t\tsystemPrompt: z.string().optional(),\n\t\tincludeContext: z.enum([\n\t\t\t\"none\",\n\t\t\t\"thisServer\",\n\t\t\t\"allServers\"\n\t\t]).optional(),\n\t\ttemperature: z.number().optional(),\n\t\tmaxTokens: z.number().int(),\n\t\tstopSequences: z.array(z.string()).optional(),\n\t\tmetadata: JSONObjectSchema$1.optional(),\n\t\ttools: z.array(ToolSchema$1).optional(),\n\t\ttoolChoice: ToolChoiceSchema$1.optional()\n\t});\n\t/**\n\t* A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst CreateMessageRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"sampling/createMessage\"),\n\t\tparams: CreateMessageRequestParamsSchema$1\n\t});\n\t/**\n\t* The client's response to a `sampling/create_message` request from the server.\n\t* This is the backwards-compatible version that returns single content (no arrays).\n\t* Used when the request does not include tools.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst CreateMessageResultSchema$1 = ResultSchema$1.extend({\n\t\tmodel: z.string(),\n\t\tstopReason: z.optional(z.enum([\n\t\t\t\"endTurn\",\n\t\t\t\"stopSequence\",\n\t\t\t\"maxTokens\"\n\t\t]).or(z.string())),\n\t\trole: RoleSchema$1,\n\t\tcontent: SamplingContentSchema$1\n\t});\n\t/**\n\t* The client's response to a `sampling/create_message` request when tools were provided.\n\t* This version supports array content for tool use flows.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to calling LLM\n\t* provider APIs directly.\n\t*/\n\tconst CreateMessageResultWithToolsSchema$1 = ResultSchema$1.extend({\n\t\tmodel: z.string(),\n\t\tstopReason: z.optional(z.enum([\n\t\t\t\"endTurn\",\n\t\t\t\"stopSequence\",\n\t\t\t\"maxTokens\",\n\t\t\t\"toolUse\"\n\t\t]).or(z.string())),\n\t\trole: RoleSchema$1,\n\t\tcontent: z.union([SamplingMessageContentBlockSchema$1, z.array(SamplingMessageContentBlockSchema$1)])\n\t});\n\t/**\n\t* Primitive schema definition for boolean fields.\n\t*/\n\tconst BooleanSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"boolean\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tdefault: z.boolean().optional()\n\t});\n\t/**\n\t* Primitive schema definition for string fields.\n\t*/\n\tconst StringSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminLength: z.number().optional(),\n\t\tmaxLength: z.number().optional(),\n\t\tformat: z.enum([\n\t\t\t\"email\",\n\t\t\t\"uri\",\n\t\t\t\"date\",\n\t\t\t\"date-time\"\n\t\t]).optional(),\n\t\tdefault: z.string().optional()\n\t});\n\t/**\n\t* Primitive schema definition for number fields.\n\t*/\n\tconst NumberSchemaSchema$1 = z.object({\n\t\ttype: z.enum([\"number\", \"integer\"]),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminimum: z.number().optional(),\n\t\tmaximum: z.number().optional(),\n\t\tdefault: z.number().optional()\n\t});\n\t/**\n\t* Schema for single-selection enumeration without display titles for options.\n\t*/\n\tconst UntitledSingleSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tenum: z.array(z.string()),\n\t\tdefault: z.string().optional()\n\t});\n\t/**\n\t* Schema for single-selection enumeration with display titles for each option.\n\t*/\n\tconst TitledSingleSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\toneOf: z.array(z.object({\n\t\t\tconst: z.string(),\n\t\t\ttitle: z.string()\n\t\t})),\n\t\tdefault: z.string().optional()\n\t});\n\t/**\n\t* Use {@linkcode TitledSingleSelectEnumSchema} instead.\n\t* This interface will be removed in a future version.\n\t*/\n\tconst LegacyTitledEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tenum: z.array(z.string()),\n\t\tenumNames: z.array(z.string()).optional(),\n\t\tdefault: z.string().optional()\n\t});\n\tconst SingleSelectEnumSchemaSchema$1 = z.union([UntitledSingleSelectEnumSchemaSchema$1, TitledSingleSelectEnumSchemaSchema$1]);\n\t/**\n\t* Schema for multiple-selection enumeration without display titles for options.\n\t*/\n\tconst UntitledMultiSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"array\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminItems: z.number().optional(),\n\t\tmaxItems: z.number().optional(),\n\t\titems: z.object({\n\t\t\ttype: z.literal(\"string\"),\n\t\t\tenum: z.array(z.string())\n\t\t}),\n\t\tdefault: z.array(z.string()).optional()\n\t});\n\t/**\n\t* Schema for multiple-selection enumeration with display titles for each option.\n\t*/\n\tconst TitledMultiSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"array\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminItems: z.number().optional(),\n\t\tmaxItems: z.number().optional(),\n\t\titems: z.object({ anyOf: z.array(z.object({\n\t\t\tconst: z.string(),\n\t\t\ttitle: z.string()\n\t\t})) }),\n\t\tdefault: z.array(z.string()).optional()\n\t});\n\t/**\n\t* Combined schema for multiple-selection enumeration\n\t*/\n\tconst MultiSelectEnumSchemaSchema$1 = z.union([UntitledMultiSelectEnumSchemaSchema$1, TitledMultiSelectEnumSchemaSchema$1]);\n\t/**\n\t* Primitive schema definition for enum fields.\n\t*/\n\tconst EnumSchemaSchema$1 = z.union([\n\t\tLegacyTitledEnumSchemaSchema$1,\n\t\tSingleSelectEnumSchemaSchema$1,\n\t\tMultiSelectEnumSchemaSchema$1\n\t]);\n\t/**\n\t* Union of all primitive schema definitions.\n\t*/\n\tconst PrimitiveSchemaDefinitionSchema$1 = z.union([\n\t\tEnumSchemaSchema$1,\n\t\tBooleanSchemaSchema$1,\n\t\tStringSchemaSchema$1,\n\t\tNumberSchemaSchema$1\n\t]);\n\t/**\n\t* Parameters for an `elicitation/create` request for form-based elicitation.\n\t*/\n\tconst ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tmode: z.literal(\"form\").optional(),\n\t\tmessage: z.string(),\n\t\trequestedSchema: z.object({\n\t\t\ttype: z.literal(\"object\"),\n\t\t\tproperties: z.record(z.string(), PrimitiveSchemaDefinitionSchema$1),\n\t\t\trequired: z.array(z.string()).optional()\n\t\t}).catchall(z.unknown())\n\t});\n\t/**\n\t* Parameters for an {@linkcode ElicitRequest | elicitation/create} request for URL-based elicitation.\n\t*/\n\tconst ElicitRequestURLParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tmode: z.literal(\"url\"),\n\t\tmessage: z.string(),\n\t\telicitationId: z.string(),\n\t\turl: z.string().url()\n\t});\n\t/**\n\t* The parameters for a request to elicit additional information from the user via the client.\n\t*/\n\tconst ElicitRequestParamsSchema$1 = z.union([ElicitRequestFormParamsSchema$1, ElicitRequestURLParamsSchema$1]);\n\t/**\n\t* A request from the server to elicit user input via the client.\n\t* The client should present the message and form fields to the user (form mode)\n\t* or navigate to a URL (URL mode).\n\t*/\n\tconst ElicitRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"elicitation/create\"),\n\t\tparams: ElicitRequestParamsSchema$1\n\t});\n\t/**\n\t* Parameters for a {@linkcode ElicitationCompleteNotification | notifications/elicitation/complete} notification.\n\t*\n\t* @category notifications/elicitation/complete\n\t*/\n\tconst ElicitationCompleteNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({ elicitationId: z.string() });\n\t/**\n\t* A notification from the server to the client, informing it of a completion of an out-of-band elicitation request.\n\t*\n\t* @category notifications/elicitation/complete\n\t*/\n\tconst ElicitationCompleteNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/elicitation/complete\"),\n\t\tparams: ElicitationCompleteNotificationParamsSchema$1\n\t});\n\t/**\n\t* The client's response to an {@linkcode ElicitRequest | elicitation/create} request from the server.\n\t*/\n\tconst ElicitResultSchema$1 = ResultSchema$1.extend({\n\t\taction: z.enum([\n\t\t\t\"accept\",\n\t\t\t\"decline\",\n\t\t\t\"cancel\"\n\t\t]),\n\t\tcontent: z.preprocess((val) => val === null ? void 0 : val, z.record(z.string(), z.union([\n\t\t\tz.string(),\n\t\t\tz.number(),\n\t\t\tz.boolean(),\n\t\t\tz.array(z.string())\n\t\t])).optional())\n\t});\n\t/**\n\t* A reference to a resource or resource template definition.\n\t*/\n\tconst ResourceTemplateReferenceSchema$1 = z.object({\n\t\ttype: z.literal(\"ref/resource\"),\n\t\turi: z.string()\n\t});\n\t/**\n\t* Identifies a prompt.\n\t*/\n\tconst PromptReferenceSchema$1 = z.object({\n\t\ttype: z.literal(\"ref/prompt\"),\n\t\tname: z.string()\n\t});\n\t/**\n\t* Parameters for a {@linkcode CompleteRequest | completion/complete} request.\n\t*/\n\tconst CompleteRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({\n\t\tref: z.union([PromptReferenceSchema$1, ResourceTemplateReferenceSchema$1]),\n\t\targument: z.object({\n\t\t\tname: z.string(),\n\t\t\tvalue: z.string()\n\t\t}),\n\t\tcontext: z.object({ arguments: z.record(z.string(), z.string()).optional() }).optional()\n\t});\n\t/**\n\t* A request from the client to the server, to ask for completion options.\n\t*/\n\tconst CompleteRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"completion/complete\"),\n\t\tparams: CompleteRequestParamsSchema$1\n\t});\n\t/**\n\t* The server's response to a {@linkcode CompleteRequest | completion/complete} request\n\t*/\n\tconst CompleteResultSchema$1 = ResultSchema$1.extend({ completion: z.looseObject({\n\t\tvalues: z.array(z.string()).max(100),\n\t\ttotal: z.optional(z.number().int()),\n\t\thasMore: z.optional(z.boolean())\n\t}) });\n\t/**\n\t* Represents a root directory or file that the server can operate on.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to passing paths via\n\t* tool parameters, resource URIs, or configuration.\n\t*/\n\tconst RootSchema$1 = z.object({\n\t\turi: z.string().startsWith(\"file://\"),\n\t\tname: z.string().optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/**\n\t* Sent from the server to request a list of root URIs from the client.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to passing paths via\n\t* tool parameters, resource URIs, or configuration.\n\t*/\n\tconst ListRootsRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"roots/list\"),\n\t\tparams: BaseRequestParamsSchema$1.optional()\n\t});\n\t/**\n\t* The client's response to a `roots/list` request from the server.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to passing paths via\n\t* tool parameters, resource URIs, or configuration.\n\t*/\n\tconst ListRootsResultSchema$1 = ResultSchema$1.extend({ roots: z.array(RootSchema$1) });\n\t/**\n\t* A notification from the client to the server, informing it that the list of roots has changed.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577); remains\n\t* in the specification for at least twelve months. Migrate to passing paths via\n\t* tool parameters, resource URIs, or configuration.\n\t*/\n\tconst RootsListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/roots/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\t/**\n\t* Task creation parameters, used to ask that the server create a task to represent a request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskCreationParamsSchema$1 = z.looseObject({\n\t\tttl: z.number().optional(),\n\t\tpollInterval: z.number().optional()\n\t});\n\t/**\n\t* The status of a task.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskStatusSchema$1 = z.enum([\n\t\t\"working\",\n\t\t\"input_required\",\n\t\t\"completed\",\n\t\t\"failed\",\n\t\t\"cancelled\"\n\t]);\n\t/**\n\t* A pollable state object associated with a request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskSchema$1 = z.object({\n\t\ttaskId: z.string(),\n\t\tstatus: TaskStatusSchema$1,\n\t\tttl: z.union([z.number(), z.null()]),\n\t\tcreatedAt: z.string(),\n\t\tlastUpdatedAt: z.string(),\n\t\tpollInterval: z.optional(z.number()),\n\t\tstatusMessage: z.optional(z.string())\n\t});\n\t/**\n\t* Result returned when a task is created, containing the task data wrapped in a `task` field.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst CreateTaskResultSchema$1 = ResultSchema$1.extend({ task: TaskSchema$1 });\n\t/**\n\t* Parameters for task status notification.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskStatusNotificationParamsSchema$1 = NotificationsParamsSchema$1.merge(TaskSchema$1);\n\t/**\n\t* A notification sent when a task's status changes.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst TaskStatusNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/tasks/status\"),\n\t\tparams: TaskStatusNotificationParamsSchema$1\n\t});\n\t/**\n\t* A request to get the state of a specific task.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst GetTaskRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"tasks/get\"),\n\t\tparams: BaseRequestParamsSchema$1.extend({ taskId: z.string() })\n\t});\n\t/**\n\t* The response to a {@linkcode GetTaskRequest | tasks/get} request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst GetTaskResultSchema$1 = ResultSchema$1.merge(TaskSchema$1);\n\t/**\n\t* A request to get the result of a specific task.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst GetTaskPayloadRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"tasks/result\"),\n\t\tparams: BaseRequestParamsSchema$1.extend({ taskId: z.string() })\n\t});\n\t/**\n\t* The response to a `tasks/result` request.\n\t* The structure matches the result type of the original request.\n\t* For example, a {@linkcode CallToolRequest | tools/call} task would return the `CallToolResult` structure.\n\t*\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst GetTaskPayloadResultSchema$1 = ResultSchema$1.loose();\n\t/**\n\t* A request to list tasks.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst ListTasksRequestSchema$1 = PaginatedRequestSchema$1.extend({ method: z.literal(\"tasks/list\") });\n\t/**\n\t* The response to a {@linkcode ListTasksRequest | tasks/list} request.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst ListTasksResultSchema$1 = PaginatedResultSchema$1.extend({ tasks: z.array(TaskSchema$1) });\n\t/**\n\t* A request to cancel a specific task.\n\t*\n\t* @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.\n\t*/\n\tconst CancelTaskRequestSchema$1 = RequestSchema$1.extend({\n\t\tmethod: z.literal(\"tasks/cancel\"),\n\t\tparams: BaseRequestParamsSchema$1.extend({ taskId: z.string() })\n\t});\n\treturn {\n\t\tJSONValueSchema: JSONValueSchema$1,\n\t\tJSONObjectSchema: JSONObjectSchema$1,\n\t\tProgressTokenSchema: ProgressTokenSchema$1,\n\t\tCursorSchema: CursorSchema$1,\n\t\tTaskMetadataSchema: TaskMetadataSchema$1,\n\t\tRelatedTaskMetadataSchema: RelatedTaskMetadataSchema$1,\n\t\tRequestMetaSchema: RequestMetaSchema$1,\n\t\tBaseRequestParamsSchema: BaseRequestParamsSchema$1,\n\t\tTaskAugmentedRequestParamsSchema: TaskAugmentedRequestParamsSchema$1,\n\t\tRequestSchema: RequestSchema$1,\n\t\tNotificationsParamsSchema: NotificationsParamsSchema$1,\n\t\tNotificationSchema: NotificationSchema$1,\n\t\tResultSchema: ResultSchema$1,\n\t\tRequestIdSchema: RequestIdSchema$1,\n\t\tEmptyResultSchema: EmptyResultSchema$1,\n\t\tCancelledNotificationParamsSchema: CancelledNotificationParamsSchema$1,\n\t\tCancelledNotificationSchema: CancelledNotificationSchema$1,\n\t\tIconSchema: IconSchema$1,\n\t\tIconsSchema: IconsSchema$1,\n\t\tBaseMetadataSchema: BaseMetadataSchema$1,\n\t\tImplementationSchema: ImplementationSchema$1,\n\t\tClientTasksCapabilitySchema: ClientTasksCapabilitySchema$1,\n\t\tServerTasksCapabilitySchema: ServerTasksCapabilitySchema$1,\n\t\tClientCapabilitiesSchema: ClientCapabilitiesSchema$1,\n\t\tInitializeRequestParamsSchema: InitializeRequestParamsSchema$1,\n\t\tInitializeRequestSchema: InitializeRequestSchema$1,\n\t\tServerCapabilitiesSchema: ServerCapabilitiesSchema$1,\n\t\tInitializeResultSchema: InitializeResultSchema$1,\n\t\tInitializedNotificationSchema: InitializedNotificationSchema$1,\n\t\tPingRequestSchema: PingRequestSchema$1,\n\t\tProgressSchema: ProgressSchema$1,\n\t\tProgressNotificationParamsSchema: ProgressNotificationParamsSchema$1,\n\t\tProgressNotificationSchema: ProgressNotificationSchema$1,\n\t\tPaginatedRequestParamsSchema: PaginatedRequestParamsSchema$1,\n\t\tPaginatedRequestSchema: PaginatedRequestSchema$1,\n\t\tPaginatedResultSchema: PaginatedResultSchema$1,\n\t\tResourceContentsSchema: ResourceContentsSchema$1,\n\t\tTextResourceContentsSchema: TextResourceContentsSchema$1,\n\t\tBlobResourceContentsSchema: BlobResourceContentsSchema$1,\n\t\tRoleSchema: RoleSchema$1,\n\t\tAnnotationsSchema: AnnotationsSchema$1,\n\t\tResourceSchema: ResourceSchema$1,\n\t\tResourceTemplateSchema: ResourceTemplateSchema$1,\n\t\tListResourcesRequestSchema: ListResourcesRequestSchema$1,\n\t\tListResourcesResultSchema: ListResourcesResultSchema$1,\n\t\tListResourceTemplatesRequestSchema: ListResourceTemplatesRequestSchema$1,\n\t\tListResourceTemplatesResultSchema: ListResourceTemplatesResultSchema$1,\n\t\tResourceRequestParamsSchema: ResourceRequestParamsSchema$1,\n\t\tReadResourceRequestParamsSchema: ReadResourceRequestParamsSchema$1,\n\t\tReadResourceRequestSchema: ReadResourceRequestSchema$1,\n\t\tReadResourceResultSchema: ReadResourceResultSchema$1,\n\t\tResourceListChangedNotificationSchema: ResourceListChangedNotificationSchema$1,\n\t\tSubscribeRequestParamsSchema: SubscribeRequestParamsSchema$1,\n\t\tSubscribeRequestSchema: SubscribeRequestSchema$1,\n\t\tUnsubscribeRequestParamsSchema: UnsubscribeRequestParamsSchema$1,\n\t\tUnsubscribeRequestSchema: UnsubscribeRequestSchema$1,\n\t\tResourceUpdatedNotificationParamsSchema: ResourceUpdatedNotificationParamsSchema$1,\n\t\tResourceUpdatedNotificationSchema: ResourceUpdatedNotificationSchema$1,\n\t\tPromptArgumentSchema: PromptArgumentSchema$1,\n\t\tPromptSchema: PromptSchema$1,\n\t\tListPromptsRequestSchema: ListPromptsRequestSchema$1,\n\t\tListPromptsResultSchema: ListPromptsResultSchema$1,\n\t\tGetPromptRequestParamsSchema: GetPromptRequestParamsSchema$1,\n\t\tGetPromptRequestSchema: GetPromptRequestSchema$1,\n\t\tTextContentSchema: TextContentSchema$1,\n\t\tImageContentSchema: ImageContentSchema$1,\n\t\tAudioContentSchema: AudioContentSchema$1,\n\t\tToolUseContentSchema: ToolUseContentSchema$1,\n\t\tEmbeddedResourceSchema: EmbeddedResourceSchema$1,\n\t\tResourceLinkSchema: ResourceLinkSchema$1,\n\t\tContentBlockSchema: ContentBlockSchema$1,\n\t\tPromptMessageSchema: PromptMessageSchema$1,\n\t\tGetPromptResultSchema: GetPromptResultSchema$1,\n\t\tPromptListChangedNotificationSchema: PromptListChangedNotificationSchema$1,\n\t\tToolAnnotationsSchema: ToolAnnotationsSchema$1,\n\t\tToolExecutionSchema: ToolExecutionSchema$1,\n\t\tToolSchema: ToolSchema$1,\n\t\tListToolsRequestSchema: ListToolsRequestSchema$1,\n\t\tListToolsResultSchema: ListToolsResultSchema$1,\n\t\tCallToolResultSchema: CallToolResultSchema$1,\n\t\tCallToolRequestParamsSchema: CallToolRequestParamsSchema$1,\n\t\tCallToolRequestSchema: CallToolRequestSchema$1,\n\t\tToolListChangedNotificationSchema: ToolListChangedNotificationSchema$1,\n\t\tLoggingLevelSchema: LoggingLevelSchema$1,\n\t\tSetLevelRequestParamsSchema: SetLevelRequestParamsSchema$1,\n\t\tSetLevelRequestSchema: SetLevelRequestSchema$1,\n\t\tLoggingMessageNotificationParamsSchema: LoggingMessageNotificationParamsSchema$1,\n\t\tLoggingMessageNotificationSchema: LoggingMessageNotificationSchema$1,\n\t\tModelHintSchema: ModelHintSchema$1,\n\t\tModelPreferencesSchema: ModelPreferencesSchema$1,\n\t\tToolChoiceSchema: ToolChoiceSchema$1,\n\t\tToolResultContentSchema: ToolResultContentSchema$1,\n\t\tSamplingContentSchema: SamplingContentSchema$1,\n\t\tSamplingMessageContentBlockSchema: SamplingMessageContentBlockSchema$1,\n\t\tSamplingMessageSchema: SamplingMessageSchema$1,\n\t\tCreateMessageRequestParamsSchema: CreateMessageRequestParamsSchema$1,\n\t\tCreateMessageRequestSchema: CreateMessageRequestSchema$1,\n\t\tCreateMessageResultSchema: CreateMessageResultSchema$1,\n\t\tCreateMessageResultWithToolsSchema: CreateMessageResultWithToolsSchema$1,\n\t\tBooleanSchemaSchema: BooleanSchemaSchema$1,\n\t\tStringSchemaSchema: StringSchemaSchema$1,\n\t\tNumberSchemaSchema: NumberSchemaSchema$1,\n\t\tUntitledSingleSelectEnumSchemaSchema: UntitledSingleSelectEnumSchemaSchema$1,\n\t\tTitledSingleSelectEnumSchemaSchema: TitledSingleSelectEnumSchemaSchema$1,\n\t\tLegacyTitledEnumSchemaSchema: LegacyTitledEnumSchemaSchema$1,\n\t\tSingleSelectEnumSchemaSchema: SingleSelectEnumSchemaSchema$1,\n\t\tUntitledMultiSelectEnumSchemaSchema: UntitledMultiSelectEnumSchemaSchema$1,\n\t\tTitledMultiSelectEnumSchemaSchema: TitledMultiSelectEnumSchemaSchema$1,\n\t\tMultiSelectEnumSchemaSchema: MultiSelectEnumSchemaSchema$1,\n\t\tEnumSchemaSchema: EnumSchemaSchema$1,\n\t\tPrimitiveSchemaDefinitionSchema: PrimitiveSchemaDefinitionSchema$1,\n\t\tElicitRequestFormParamsSchema: ElicitRequestFormParamsSchema$1,\n\t\tElicitRequestURLParamsSchema: ElicitRequestURLParamsSchema$1,\n\t\tElicitRequestParamsSchema: ElicitRequestParamsSchema$1,\n\t\tElicitRequestSchema: ElicitRequestSchema$1,\n\t\tElicitationCompleteNotificationParamsSchema: ElicitationCompleteNotificationParamsSchema$1,\n\t\tElicitationCompleteNotificationSchema: ElicitationCompleteNotificationSchema$1,\n\t\tElicitResultSchema: ElicitResultSchema$1,\n\t\tResourceTemplateReferenceSchema: ResourceTemplateReferenceSchema$1,\n\t\tPromptReferenceSchema: PromptReferenceSchema$1,\n\t\tCompleteRequestParamsSchema: CompleteRequestParamsSchema$1,\n\t\tCompleteRequestSchema: CompleteRequestSchema$1,\n\t\tCompleteResultSchema: CompleteResultSchema$1,\n\t\tRootSchema: RootSchema$1,\n\t\tListRootsRequestSchema: ListRootsRequestSchema$1,\n\t\tListRootsResultSchema: ListRootsResultSchema$1,\n\t\tRootsListChangedNotificationSchema: RootsListChangedNotificationSchema$1,\n\t\tTaskCreationParamsSchema: TaskCreationParamsSchema$1,\n\t\tTaskStatusSchema: TaskStatusSchema$1,\n\t\tTaskSchema: TaskSchema$1,\n\t\tCreateTaskResultSchema: CreateTaskResultSchema$1,\n\t\tTaskStatusNotificationParamsSchema: TaskStatusNotificationParamsSchema$1,\n\t\tTaskStatusNotificationSchema: TaskStatusNotificationSchema$1,\n\t\tGetTaskRequestSchema: GetTaskRequestSchema$1,\n\t\tGetTaskResultSchema: GetTaskResultSchema$1,\n\t\tGetTaskPayloadRequestSchema: GetTaskPayloadRequestSchema$1,\n\t\tGetTaskPayloadResultSchema: GetTaskPayloadResultSchema$1,\n\t\tListTasksRequestSchema: ListTasksRequestSchema$1,\n\t\tListTasksResultSchema: ListTasksResultSchema$1,\n\t\tCancelTaskRequestSchema: CancelTaskRequestSchema$1,\n\t\tCancelTaskResultSchema: ResultSchema$1.merge(TaskSchema$1),\n\t\tClientRequestSchema: z.union([\n\t\t\tPingRequestSchema$1,\n\t\t\tInitializeRequestSchema$1,\n\t\t\tCompleteRequestSchema$1,\n\t\t\tSetLevelRequestSchema$1,\n\t\t\tGetPromptRequestSchema$1,\n\t\t\tListPromptsRequestSchema$1,\n\t\t\tListResourcesRequestSchema$1,\n\t\t\tListResourceTemplatesRequestSchema$1,\n\t\t\tReadResourceRequestSchema$1,\n\t\t\tSubscribeRequestSchema$1,\n\t\t\tUnsubscribeRequestSchema$1,\n\t\t\tCallToolRequestSchema$1,\n\t\t\tListToolsRequestSchema$1,\n\t\t\tGetTaskRequestSchema$1,\n\t\t\tGetTaskPayloadRequestSchema$1,\n\t\t\tListTasksRequestSchema$1,\n\t\t\tCancelTaskRequestSchema$1\n\t\t]),\n\t\tClientNotificationSchema: z.union([\n\t\t\tCancelledNotificationSchema$1,\n\t\t\tProgressNotificationSchema$1,\n\t\t\tInitializedNotificationSchema$1,\n\t\t\tRootsListChangedNotificationSchema$1,\n\t\t\tTaskStatusNotificationSchema$1\n\t\t]),\n\t\tClientResultSchema: z.union([\n\t\t\tEmptyResultSchema$1,\n\t\t\tCreateMessageResultSchema$1,\n\t\t\tCreateMessageResultWithToolsSchema$1,\n\t\t\tElicitResultSchema$1,\n\t\t\tListRootsResultSchema$1,\n\t\t\tGetTaskResultSchema$1,\n\t\t\tListTasksResultSchema$1,\n\t\t\tCreateTaskResultSchema$1\n\t\t]),\n\t\tServerRequestSchema: z.union([\n\t\t\tPingRequestSchema$1,\n\t\t\tCreateMessageRequestSchema$1,\n\t\t\tElicitRequestSchema$1,\n\t\t\tListRootsRequestSchema$1,\n\t\t\tGetTaskRequestSchema$1,\n\t\t\tGetTaskPayloadRequestSchema$1,\n\t\t\tListTasksRequestSchema$1,\n\t\t\tCancelTaskRequestSchema$1\n\t\t]),\n\t\tServerNotificationSchema: z.union([\n\t\t\tCancelledNotificationSchema$1,\n\t\t\tProgressNotificationSchema$1,\n\t\t\tLoggingMessageNotificationSchema$1,\n\t\t\tResourceUpdatedNotificationSchema$1,\n\t\t\tResourceListChangedNotificationSchema$1,\n\t\t\tToolListChangedNotificationSchema$1,\n\t\t\tPromptListChangedNotificationSchema$1,\n\t\t\tTaskStatusNotificationSchema$1,\n\t\t\tElicitationCompleteNotificationSchema$1\n\t\t]),\n\t\tServerResultSchema: z.union([\n\t\t\tEmptyResultSchema$1,\n\t\t\tInitializeResultSchema$1,\n\t\t\tCompleteResultSchema$1,\n\t\t\tGetPromptResultSchema$1,\n\t\t\tListPromptsResultSchema$1,\n\t\t\tListResourcesResultSchema$1,\n\t\t\tListResourceTemplatesResultSchema$1,\n\t\t\tReadResourceResultSchema$1,\n\t\t\tCallToolResultSchema$1,\n\t\t\tListToolsResultSchema$1,\n\t\t\tGetTaskResultSchema$1,\n\t\t\tListTasksResultSchema$1,\n\t\t\tCreateTaskResultSchema$1\n\t\t]),\n\t\tCallToolResultWireSchema: z.unknown().superRefine((value, ctx) => {\n\t\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value) || value.content !== void 0) return;\n\t\t\tfor (const key of TOOL_RESULT_FOREIGN_FAMILY_KEYS) if (key in value) {\n\t\t\t\tctx.addIssue({\n\t\t\t\t\tcode: \"custom\",\n\t\t\t\t\tmessage: `content is required when the body carries '${key}' — another result family cannot default into an empty tools/call success`\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}).transform(normalizeContentlessToolResult).pipe(CallToolResultSchema$1)\n\t};\n}\nlet memo$1;\n/**\n* Builds the era wire-schema set on first call and returns the same object\n* thereafter. Module evaluation stays construction-free so importing the\n* era codec/registry costs nothing until the first validation actually\n* needs a schema; the registry, the codec, and the eager `schemas.ts`\n* shim all pull through this memo, so reference identity holds across\n* every consumer.\n*/\nfunction buildSchemas2025() {\n\treturn memo$1 ??= build$1();\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2025-11-25/legacyWrap.ts\n/**\n* SEP-2106 legacy `outputSchema` wrap helpers (2025-era projection only).\n*\n* The neutral / 2026-07-28 model lets a tool's `outputSchema` carry any JSON\n* Schema root. The 2025-11-25 wire shape requires `type:'object'` at the root,\n* so when an era-blind handler advertises a non-object root, the 2025 codec's\n* `encodeResult('tools/list', …)` projects it down to\n* `{type:'object', properties:{result:<natural>}, required:['result']}`, and\n* `projectCallToolResult` wraps the matching `structuredContent` as\n* `{result:<value>}`. The 2026 codec's projections are the identity.\n*\n* These helpers are wire-layer property — they exist so the projection can\n* live behind {@link WireCodec.encodeResult} / {@link WireCodec.projectCallToolResult}\n* and never be re-derived in shared/ or server-side code.\n*/\n/**\n* Whether a JSON Schema's root is non-object: either an explicit non-object\n* `type`, or a typeless root such as `{anyOf:[…]}`. Object-shaped typeless\n* roots that the schema-conversion layer can prove are objects are stamped\n* `type:'object'` upstream, so they reach this predicate as object roots.\n*/\nfunction isNonObjectJsonSchemaRoot(json) {\n\treturn json[\"type\"] !== \"object\";\n}\n/**\n* Keyword-position keys whose values are instance data (not subschemas). A\n* `{$ref:…}` appearing inside one is a literal value, not a JSON Pointer to\n* rewrite. Only consulted when the current object is in keyword position —\n* a PROPERTY named `default`/`const` (under `properties`/`$defs`/…) is a name\n* position whose value IS a subschema and is recursed into.\n*/\nconst REF_REWRITE_DATA_POSITION_KEYS = new Set([\n\t\"const\",\n\t\"enum\",\n\t\"default\",\n\t\"examples\"\n]);\n/**\n* Keyword-position keys whose value is a name→subschema map. Entries inside\n* such a map are in NAME position: their keys are author-chosen property\n* names (which may collide with JSON Schema keywords), their values are\n* subschemas to recurse into.\n*/\nconst REF_REWRITE_NAME_MAP_KEYS = new Set([\n\t\"properties\",\n\t\"patternProperties\",\n\t\"$defs\",\n\t\"definitions\",\n\t\"dependentSchemas\",\n\t\"dependencies\"\n]);\n/**\n* Whether a subtree's `$id` establishes a new resolution base. A fragment-only\n* `$id` (`\"#item\"`, the draft-07/06 spelling of 2020-12's `$anchor`) does not\n* change the RFC 3986 base URI — same-document pointers inside still resolve\n* against the document root and must be rewritten.\n*/\nfunction establishesNewBase(id) {\n\treturn id !== void 0 && !(typeof id === \"string\" && id.startsWith(\"#\"));\n}\n/**\n* Wrap a non-object output schema in the 2025-era envelope:\n* `{type:'object', properties:{result:<natural>}, required:['result']}`.\n*\n* Same-document `$ref` / `$dynamicRef` JSON Pointers inside the natural schema\n* (e.g. `#/properties/foo` produced by zod for de-duplicated/recursive types)\n* are rewritten to account for the new `#/properties/result` root: bare `#` →\n* `#/properties/result`, `#/…` → `#/properties/result/…`. Cross-document refs\n* (anything not starting with `#`) are left untouched.\n*\n* The rewrite is position-aware: data-valued keywords\n* (`const`/`enum`/`default`/`examples`) in keyword position are NOT descended\n* into; the same names appearing as property names under\n* `properties`/`patternProperties`/`$defs`/`definitions`/`dependentSchemas`/\n* `dependencies` ARE descended into (they're subschemas). The rewrite is also\n* `$id`-scoped: if the natural root carries a base-establishing `$id` no\n* pointer is rewritten (same-document refs inside resolve against the embedded\n* `$id` base, not the wrapper root), and any subtree that establishes its own\n* `$id` is left untouched for the same reason. Fragment-only `$id` (`\"#item\"`,\n* draft-07's anchor spelling) does not establish a base and IS descended into.\n*/\nfunction wrapOutputSchemaForLegacy(natural) {\n\tconst $schema = typeof natural[\"$schema\"] === \"string\" ? natural[\"$schema\"] : void 0;\n\tif (establishesNewBase(natural[\"$id\"])) return {\n\t\t...$schema !== void 0 && { $schema },\n\t\ttype: \"object\",\n\t\tproperties: { result: natural },\n\t\trequired: [\"result\"]\n\t};\n\tconst convertRecursiveRefs = declares2019Dialect(natural[\"$schema\"]) && natural[\"$recursiveAnchor\"] !== true;\n\tconst rewriteRefs = (node, parentIsNameMap) => {\n\t\tif (Array.isArray(node)) return node.map((item) => rewriteRefs(item, false));\n\t\tif (node === null || typeof node !== \"object\") return node;\n\t\tif (!parentIsNameMap && establishesNewBase(node[\"$id\"])) return node;\n\t\tconst out = {};\n\t\tlet convertedRecursion = false;\n\t\tfor (const [k, v] of Object.entries(node)) if (parentIsNameMap) out[k] = rewriteRefs(v, false);\n\t\telse if ((k === \"$ref\" || k === \"$dynamicRef\") && typeof v === \"string\") out[k] = v === \"#\" ? \"#/properties/result\" : v.startsWith(\"#/\") ? `#/properties/result${v.slice(1)}` : v;\n\t\telse if (k === \"$recursiveRef\" && v === \"#\" && convertRecursiveRefs) convertedRecursion = true;\n\t\telse if (REF_REWRITE_DATA_POSITION_KEYS.has(k)) out[k] = v;\n\t\telse if (REF_REWRITE_NAME_MAP_KEYS.has(k)) out[k] = rewriteRefs(v, true);\n\t\telse out[k] = rewriteRefs(v, false);\n\t\tif (convertedRecursion) if (\"$ref\" in out) out[\"allOf\"] = [...Array.isArray(out[\"allOf\"]) ? out[\"allOf\"] : [], { $ref: \"#/properties/result\" }];\n\t\telse out[\"$ref\"] = \"#/properties/result\";\n\t\treturn out;\n\t};\n\treturn {\n\t\t...$schema !== void 0 && { $schema },\n\t\ttype: \"object\",\n\t\tproperties: { result: rewriteRefs(natural, false) },\n\t\trequired: [\"result\"]\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2025-11-25/registry.ts\nconst requestMethodKeys$1 = {\n\tping: null,\n\tinitialize: null,\n\t\"completion/complete\": null,\n\t\"logging/setLevel\": null,\n\t\"prompts/get\": null,\n\t\"prompts/list\": null,\n\t\"resources/list\": null,\n\t\"resources/templates/list\": null,\n\t\"resources/read\": null,\n\t\"resources/subscribe\": null,\n\t\"resources/unsubscribe\": null,\n\t\"tools/call\": null,\n\t\"tools/list\": null,\n\t\"tasks/get\": null,\n\t\"tasks/result\": null,\n\t\"tasks/list\": null,\n\t\"tasks/cancel\": null,\n\t\"sampling/createMessage\": null,\n\t\"elicitation/create\": null,\n\t\"roots/list\": null\n};\nconst notificationMethodKeys$1 = {\n\t\"notifications/cancelled\": null,\n\t\"notifications/progress\": null,\n\t\"notifications/initialized\": null,\n\t\"notifications/roots/list_changed\": null,\n\t\"notifications/tasks/status\": null,\n\t\"notifications/message\": null,\n\t\"notifications/resources/updated\": null,\n\t\"notifications/resources/list_changed\": null,\n\t\"notifications/tools/list_changed\": null,\n\t\"notifications/prompts/list_changed\": null,\n\t\"notifications/elicitation/complete\": null\n};\nconst resultMethodKeys = {\n\tping: null,\n\tinitialize: null,\n\t\"completion/complete\": null,\n\t\"logging/setLevel\": null,\n\t\"prompts/get\": null,\n\t\"prompts/list\": null,\n\t\"resources/list\": null,\n\t\"resources/templates/list\": null,\n\t\"resources/read\": null,\n\t\"resources/subscribe\": null,\n\t\"resources/unsubscribe\": null,\n\t\"tools/call\": null,\n\t\"tools/list\": null,\n\t\"sampling/createMessage\": null,\n\t\"elicitation/create\": null,\n\t\"roots/list\": null\n};\nlet maps$1;\nfunction registryMaps() {\n\tif (maps$1) return maps$1;\n\tconst s = buildSchemas2025();\n\tmaps$1 = {\n\t\trequestSchemas: {\n\t\t\tping: s.PingRequestSchema,\n\t\t\tinitialize: s.InitializeRequestSchema,\n\t\t\t\"completion/complete\": s.CompleteRequestSchema,\n\t\t\t\"logging/setLevel\": s.SetLevelRequestSchema,\n\t\t\t\"prompts/get\": s.GetPromptRequestSchema,\n\t\t\t\"prompts/list\": s.ListPromptsRequestSchema,\n\t\t\t\"resources/list\": s.ListResourcesRequestSchema,\n\t\t\t\"resources/templates/list\": s.ListResourceTemplatesRequestSchema,\n\t\t\t\"resources/read\": s.ReadResourceRequestSchema,\n\t\t\t\"resources/subscribe\": s.SubscribeRequestSchema,\n\t\t\t\"resources/unsubscribe\": s.UnsubscribeRequestSchema,\n\t\t\t\"tools/call\": s.CallToolRequestSchema,\n\t\t\t\"tools/list\": s.ListToolsRequestSchema,\n\t\t\t\"tasks/get\": s.GetTaskRequestSchema,\n\t\t\t\"tasks/result\": s.GetTaskPayloadRequestSchema,\n\t\t\t\"tasks/list\": s.ListTasksRequestSchema,\n\t\t\t\"tasks/cancel\": s.CancelTaskRequestSchema,\n\t\t\t\"sampling/createMessage\": s.CreateMessageRequestSchema,\n\t\t\t\"elicitation/create\": s.ElicitRequestSchema,\n\t\t\t\"roots/list\": s.ListRootsRequestSchema\n\t\t},\n\t\tnotificationSchemas: {\n\t\t\t\"notifications/cancelled\": s.CancelledNotificationSchema,\n\t\t\t\"notifications/progress\": s.ProgressNotificationSchema,\n\t\t\t\"notifications/initialized\": s.InitializedNotificationSchema,\n\t\t\t\"notifications/roots/list_changed\": s.RootsListChangedNotificationSchema,\n\t\t\t\"notifications/tasks/status\": s.TaskStatusNotificationSchema,\n\t\t\t\"notifications/message\": s.LoggingMessageNotificationSchema,\n\t\t\t\"notifications/resources/updated\": s.ResourceUpdatedNotificationSchema,\n\t\t\t\"notifications/resources/list_changed\": s.ResourceListChangedNotificationSchema,\n\t\t\t\"notifications/tools/list_changed\": s.ToolListChangedNotificationSchema,\n\t\t\t\"notifications/prompts/list_changed\": s.PromptListChangedNotificationSchema,\n\t\t\t\"notifications/elicitation/complete\": s.ElicitationCompleteNotificationSchema\n\t\t},\n\t\tresultSchemas: {\n\t\t\tping: s.EmptyResultSchema,\n\t\t\tinitialize: s.InitializeResultSchema,\n\t\t\t\"completion/complete\": s.CompleteResultSchema,\n\t\t\t\"logging/setLevel\": s.EmptyResultSchema,\n\t\t\t\"prompts/get\": s.GetPromptResultSchema,\n\t\t\t\"prompts/list\": s.ListPromptsResultSchema,\n\t\t\t\"resources/list\": s.ListResourcesResultSchema,\n\t\t\t\"resources/templates/list\": s.ListResourceTemplatesResultSchema,\n\t\t\t\"resources/read\": s.ReadResourceResultSchema,\n\t\t\t\"resources/subscribe\": s.EmptyResultSchema,\n\t\t\t\"resources/unsubscribe\": s.EmptyResultSchema,\n\t\t\t\"tools/call\": s.CallToolResultWireSchema,\n\t\t\t\"tools/list\": s.ListToolsResultSchema,\n\t\t\t\"sampling/createMessage\": s.CreateMessageResultWithToolsSchema,\n\t\t\t\"elicitation/create\": s.ElicitResultSchema,\n\t\t\t\"roots/list\": s.ListRootsResultSchema\n\t\t}\n\t};\n\treturn maps$1;\n}\n/**\n* Forces the lazy registry maps (and, through them, the era's schema memo).\n* Warm-up hook for `preloadSchemas()` — no-op once the maps exist.\n*/\nfunction warmRegistryMaps2025() {\n\tregistryMaps();\n}\n/** The 2025-era request-method set (registry membership = the deletion story). */\nfunction hasRequestMethod2025(method) {\n\treturn Object.prototype.hasOwnProperty.call(requestMethodKeys$1, method);\n}\n/** The 2025-era notification-method set. */\nfunction hasNotificationMethod2025(method) {\n\treturn Object.prototype.hasOwnProperty.call(notificationMethodKeys$1, method);\n}\n/** Result-map membership: exactly the era's typed-method subset (no task entries, no 2026-only methods). */\nfunction hasResultMethod(method) {\n\treturn Object.prototype.hasOwnProperty.call(resultMethodKeys, method);\n}\nfunction getResultSchema(method) {\n\treturn hasResultMethod(method) ? registryMaps().resultSchemas[method] : void 0;\n}\nfunction getRequestSchema(method) {\n\treturn hasRequestMethod2025(method) ? registryMaps().requestSchemas[method] : void 0;\n}\nfunction getNotificationSchema(method) {\n\treturn hasNotificationMethod2025(method) ? registryMaps().notificationSchemas[method] : void 0;\n}\n/** Registry method lists (for the spec-method universe and the CI registry-diff oracle). */\nconst rev2025RequestMethods = Object.keys(requestMethodKeys$1);\nconst rev2025NotificationMethods = Object.keys(notificationMethodKeys$1);\n\n//#endregion\n//#region ../core-internal/src/wire/rev2025-11-25/codec.ts\nfunction isPlainObject$4(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/** Tri-state wrap of an optional Zod schema lookup (the function-only contract). */\nfunction triState$1(schema, raw) {\n\tif (schema === void 0) return {\n\t\tok: false,\n\t\treason: \"not-in-era\"\n\t};\n\tconst parsed = schema.safeParse(raw);\n\treturn parsed.success ? {\n\t\tok: true,\n\t\tvalue: parsed.data\n\t} : {\n\t\tok: false,\n\t\treason: \"invalid\",\n\t\tmessage: String(parsed.error)\n\t};\n}\nconst NOT_IN_ERA$1 = {\n\tok: false,\n\treason: \"not-in-era\"\n};\n/** Whether a `tools/list` entry advertises a non-object `outputSchema` root that needs the SEP-2106 legacy wrap. */\nfunction toolNeedsLegacyWrap(t) {\n\treturn isPlainObject$4(t) && isPlainObject$4(t[\"outputSchema\"]) && isNonObjectJsonSchemaRoot(t[\"outputSchema\"]);\n}\n/** The wire→neutral trust boundary: a decoded 2025-era wire result is adopted as the neutral `Result` here (the module's single deliberate assertion). */\nfunction toNeutralResult(value) {\n\treturn value;\n}\nconst rev2025Codec = {\n\tera: \"2025-11-25\",\n\thasRequestMethod: hasRequestMethod2025,\n\thasNotificationMethod: hasNotificationMethod2025,\n\tvalidateRequest: (method, raw) => triState$1(getRequestSchema(method), raw),\n\tvalidateResult: (method, raw) => triState$1(getResultSchema(method), raw),\n\tvalidateNotification: (method, raw) => triState$1(getNotificationSchema(method), raw),\n\thasInputRequestMethod: () => false,\n\tvalidateInputRequest: () => NOT_IN_ERA$1,\n\tvalidateInputResponse: () => NOT_IN_ERA$1,\n\tsamplingResultVariant: ((hasTools, raw) => {\n\t\tconst s = buildSchemas2025();\n\t\treturn triState$1(hasTools ? s.CreateMessageResultWithToolsSchema : s.CreateMessageResultSchema, raw);\n\t}),\n\toutboundEnvelope: (_material) => void 0,\n\tvalidateEnvelopeMeta: (_meta) => [],\n\tprojectCallToolResult(result, advertisedOutputSchema) {\n\t\tconst withText = appendTextFallbackForNonObject(result);\n\t\tconst sc = withText.structuredContent;\n\t\tif (sc === void 0) return withText;\n\t\tconst valueIsNonObject = typeof sc !== \"object\" || sc === null || Array.isArray(sc);\n\t\tconst schemaWrapped = advertisedOutputSchema !== void 0 && isNonObjectJsonSchemaRoot(advertisedOutputSchema);\n\t\tif (!valueIsNonObject && !schemaWrapped) return withText;\n\t\treturn {\n\t\t\t...withText,\n\t\t\tstructuredContent: { result: sc }\n\t\t};\n\t},\n\tdecodeResult(_method, raw) {\n\t\tif (isPlainObject$4(raw) && \"resultType\" in raw) {\n\t\t\tconst stripped = { ...raw };\n\t\t\tdelete stripped[\"resultType\"];\n\t\t\treturn {\n\t\t\t\tkind: \"complete\",\n\t\t\t\tresult: toNeutralResult(stripped)\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tkind: \"complete\",\n\t\t\tresult: toNeutralResult(raw)\n\t\t};\n\t},\n\tencodeResult(method, result) {\n\t\tif (method !== \"tools/list\") return result;\n\t\tconst tools = result.tools;\n\t\tif (!Array.isArray(tools) || !tools.some((t) => toolNeedsLegacyWrap(t))) return result;\n\t\treturn {\n\t\t\t...result,\n\t\t\ttools: tools.map((t) => toolNeedsLegacyWrap(t) ? {\n\t\t\t\t...t,\n\t\t\t\toutputSchema: wrapOutputSchemaForLegacy(t.outputSchema)\n\t\t\t} : t)\n\t\t};\n\t},\n\tencodeErrorCode: (code) => code === -32002 ? -32602 : code,\n\tcheckInboundEnvelope: (_material) => void 0\n};\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/buildSchemas.ts\n/**\n* 2026-era wire schemas (protocol revision 2026-07-28).\n*\n* Fully self-contained — no runtime imports from types/schemas.ts. The\n* neutral types/schemas.ts layer is the public-API superset and is free to\n* evolve; this file is the 2026 wire-parse contract and is BEHAVIOR-FROZEN\n* against the 2026-07-28 anchor. Every era-shared building block (content\n* blocks, resources, prompts, capabilities, notifications, …) that the wire\n* shapes compose is a frozen LOCAL copy — verbatim from the neutral layer at\n* the point this revision was sealed, dependencies first. The only cross-layer\n* dependency is `import type { JSONObject, JSONValue }` from the neutral types\n* barrel — pure structural type aliases with no parse behavior.\n*\n* This module is the only place the per-request `_meta` envelope is modeled.\n* The envelope is wire-only vocabulary: the protocol layer lifts it off\n* inbound requests before any handler runs and surfaces it at\n* `ctx.mcpReq.envelope`; the 2026-era codec enforces its requiredness at\n* dispatch time (`checkInboundEnvelope`) - the former neutral-schema JSDoc\n* deferral (\"enforced per request at dispatch time, not here\") is now\n* discharged by that codec step.\n*\n* No 2025-era traffic ever touches this module, so requiredness here is\n* bare and spec-exact (the shared-schema `.catch` hazards do not apply).\n*\n* SPEC-CURRENCY RE-SEAL (2026-07-17): the 2026-07-28 revision was re-sealed\n* upstream by spec PR #3002 (commit 71e30695, merged 2026-07-15 — after the\n* previous anchor pin f68d864a): the envelope's `clientInfo` demoted from\n* required to SHOULD, and `DiscoverResult.serverInfo` moved from the result\n* body to the new `ResultMetaObject` key\n* `_meta['io.modelcontextprotocol/serverInfo']` (optional on every result).\n* The shapes below are the re-sealed anchor, exactly — no pre-#3002 shape is\n* modeled anywhere (per ruling: the final revision is the only 2026-07-28).\n*/\nfunction build() {\n\tconst JSONValueSchema$1 = z.lazy(() => z.union([\n\t\tz.string(),\n\t\tz.number(),\n\t\tz.boolean(),\n\t\tz.null(),\n\t\tz.record(z.string(), JSONValueSchema$1),\n\t\tz.array(JSONValueSchema$1)\n\t]));\n\tconst JSONObjectSchema$1 = z.record(z.string(), JSONValueSchema$1);\n\t/**\n\t* A progress token, used to associate progress notifications with the original request.\n\t*/\n\tconst ProgressTokenSchema$1 = z.union([z.string(), z.number().int()]);\n\t/**\n\t* An opaque token used to represent a cursor for pagination.\n\t*/\n\tconst CursorSchema$1 = z.string();\n\t/**\n\t* A uniquely identifying ID for a request in JSON-RPC.\n\t*/\n\tconst RequestIdSchema$1 = z.union([z.string(), z.number().int()]);\n\t/**\n\t* The sender or recipient of messages and data in a conversation.\n\t*/\n\tconst RoleSchema$1 = z.enum([\"user\", \"assistant\"]);\n\t/**\n\t* The severity of a log message.\n\t*/\n\tconst LoggingLevelSchema$1 = z.enum([\n\t\t\"debug\",\n\t\t\"info\",\n\t\t\"notice\",\n\t\t\"warning\",\n\t\t\"error\",\n\t\t\"critical\",\n\t\t\"alert\",\n\t\t\"emergency\"\n\t]);\n\t/**\n\t* A Zod schema for validating Base64 strings that is more performant and\n\t* robust for very large inputs than the default regex-based check. It avoids\n\t* stack overflows by using the native `atob` function for validation.\n\t*/\n\tconst Base64Schema = z.string().refine((val) => {\n\t\ttry {\n\t\t\tatob(val);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, { message: \"Invalid Base64 string\" });\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst TaskMetadataSchema$1 = z.object({ ttl: z.number().optional() });\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst RelatedTaskMetadataSchema$1 = z.object({ taskId: z.string() });\n\tconst RequestMetaSchema$1 = z.looseObject({\n\t\tprogressToken: ProgressTokenSchema$1.optional(),\n\t\t\"io.modelcontextprotocol/related-task\": RelatedTaskMetadataSchema$1.optional()\n\t});\n\tconst BaseRequestParamsSchema$1 = z.object({ _meta: RequestMetaSchema$1.optional() });\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst TaskAugmentedRequestParamsSchema$1 = BaseRequestParamsSchema$1.extend({ task: TaskMetadataSchema$1.optional() });\n\tconst NotificationsParamsSchema$1 = z.object({ _meta: RequestMetaSchema$1.optional() });\n\tconst NotificationSchema$1 = z.object({\n\t\tmethod: z.string(),\n\t\tparams: NotificationsParamsSchema$1.loose().optional()\n\t});\n\tconst IconSchema$1 = z.object({\n\t\tsrc: z.string(),\n\t\tmimeType: z.string().optional(),\n\t\tsizes: z.array(z.string()).optional(),\n\t\ttheme: z.enum([\"light\", \"dark\"]).optional()\n\t});\n\tconst IconsSchema$1 = z.object({ icons: z.array(IconSchema$1).optional() });\n\tconst BaseMetadataSchema$1 = z.object({\n\t\tname: z.string(),\n\t\ttitle: z.string().optional()\n\t});\n\tconst ImplementationSchema$1 = BaseMetadataSchema$1.extend({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tversion: z.string(),\n\t\twebsiteUrl: z.string().optional(),\n\t\tdescription: z.string().optional()\n\t});\n\tconst FormElicitationCapabilitySchema = z.intersection(z.object({ applyDefaults: z.boolean().optional() }), JSONObjectSchema$1);\n\tconst ElicitationCapabilitySchema = z.preprocess((value) => {\n\t\tif (value && typeof value === \"object\" && !Array.isArray(value) && Object.keys(value).length === 0) return { form: {} };\n\t\treturn value;\n\t}, z.intersection(z.object({\n\t\tform: FormElicitationCapabilitySchema.optional(),\n\t\turl: JSONObjectSchema$1.optional()\n\t}), JSONObjectSchema$1.optional()));\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst ClientTasksCapabilitySchema$1 = z.looseObject({\n\t\tlist: JSONObjectSchema$1.optional(),\n\t\tcancel: JSONObjectSchema$1.optional(),\n\t\trequests: z.looseObject({\n\t\t\tsampling: z.looseObject({ createMessage: JSONObjectSchema$1.optional() }).optional(),\n\t\t\telicitation: z.looseObject({ create: JSONObjectSchema$1.optional() }).optional()\n\t\t}).optional()\n\t});\n\t/** @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only. */\n\tconst ServerTasksCapabilitySchema$1 = z.looseObject({\n\t\tlist: JSONObjectSchema$1.optional(),\n\t\tcancel: JSONObjectSchema$1.optional(),\n\t\trequests: z.looseObject({ tools: z.looseObject({ call: JSONObjectSchema$1.optional() }).optional() }).optional()\n\t});\n\tconst ClientCapabilitiesSchema$1 = z.object({\n\t\texperimental: z.record(z.string(), JSONObjectSchema$1).optional(),\n\t\tsampling: z.object({\n\t\t\tcontext: JSONObjectSchema$1.optional(),\n\t\t\ttools: JSONObjectSchema$1.optional()\n\t\t}).optional(),\n\t\telicitation: ElicitationCapabilitySchema.optional(),\n\t\troots: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\ttasks: ClientTasksCapabilitySchema$1.optional(),\n\t\textensions: z.record(z.string(), JSONObjectSchema$1).optional()\n\t});\n\tconst ServerCapabilitiesSchema$1 = z.object({\n\t\texperimental: z.record(z.string(), JSONObjectSchema$1).optional(),\n\t\tlogging: JSONObjectSchema$1.optional(),\n\t\tcompletions: JSONObjectSchema$1.optional(),\n\t\tprompts: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\tresources: z.object({\n\t\t\tsubscribe: z.boolean().optional(),\n\t\t\tlistChanged: z.boolean().optional()\n\t\t}).optional(),\n\t\ttools: z.object({ listChanged: z.boolean().optional() }).optional(),\n\t\ttasks: ServerTasksCapabilitySchema$1.optional(),\n\t\textensions: z.record(z.string(), JSONObjectSchema$1).optional()\n\t});\n\tconst ProgressSchema$1 = z.object({\n\t\tprogress: z.number(),\n\t\ttotal: z.optional(z.number()),\n\t\tmessage: z.optional(z.string())\n\t});\n\tconst ProgressNotificationParamsSchema$1 = z.object({\n\t\t...NotificationsParamsSchema$1.shape,\n\t\t...ProgressSchema$1.shape,\n\t\tprogressToken: ProgressTokenSchema$1\n\t});\n\tconst ProgressNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/progress\"),\n\t\tparams: ProgressNotificationParamsSchema$1\n\t});\n\tconst LoggingMessageNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({\n\t\tlevel: LoggingLevelSchema$1,\n\t\tlogger: z.string().optional(),\n\t\tdata: z.unknown()\n\t});\n\tconst LoggingMessageNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/message\"),\n\t\tparams: LoggingMessageNotificationParamsSchema$1\n\t});\n\tconst ResourceContentsSchema$1 = z.object({\n\t\turi: z.string(),\n\t\tmimeType: z.optional(z.string()),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst TextResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ text: z.string() });\n\tconst BlobResourceContentsSchema$1 = ResourceContentsSchema$1.extend({ blob: Base64Schema });\n\tconst AnnotationsSchema$1 = z.object({\n\t\taudience: z.array(RoleSchema$1).optional(),\n\t\tpriority: z.number().min(0).max(1).optional(),\n\t\tlastModified: z.iso.datetime({ offset: true }).optional()\n\t});\n\tconst ResourceSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\turi: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\tmimeType: z.optional(z.string()),\n\t\tsize: z.optional(z.number()),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\tconst ResourceTemplateSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\turiTemplate: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\tmimeType: z.optional(z.string()),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\tconst ResourceListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/resources/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\tconst ResourceUpdatedNotificationParamsSchema$1 = NotificationsParamsSchema$1.extend({ uri: z.string() });\n\tconst ResourceUpdatedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/resources/updated\"),\n\t\tparams: ResourceUpdatedNotificationParamsSchema$1\n\t});\n\tconst PromptArgumentSchema$1 = z.object({\n\t\tname: z.string(),\n\t\tdescription: z.optional(z.string()),\n\t\trequired: z.optional(z.boolean())\n\t});\n\tconst PromptSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tdescription: z.optional(z.string()),\n\t\targuments: z.optional(z.array(PromptArgumentSchema$1)),\n\t\t_meta: z.optional(z.looseObject({}))\n\t});\n\tconst PromptListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/prompts/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\tconst TextContentSchema$1 = z.object({\n\t\ttype: z.literal(\"text\"),\n\t\ttext: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst ImageContentSchema$1 = z.object({\n\t\ttype: z.literal(\"image\"),\n\t\tdata: Base64Schema,\n\t\tmimeType: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst AudioContentSchema$1 = z.object({\n\t\ttype: z.literal(\"audio\"),\n\t\tdata: Base64Schema,\n\t\tmimeType: z.string(),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst ToolUseContentSchema$1 = z.object({\n\t\ttype: z.literal(\"tool_use\"),\n\t\tname: z.string(),\n\t\tid: z.string(),\n\t\tinput: z.record(z.string(), z.unknown()),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst EmbeddedResourceSchema$1 = z.object({\n\t\ttype: z.literal(\"resource\"),\n\t\tresource: z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]),\n\t\tannotations: AnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst ResourceLinkSchema$1 = ResourceSchema$1.extend({ type: z.literal(\"resource_link\") });\n\tconst ContentBlockSchema$1 = z.union([\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1,\n\t\tResourceLinkSchema$1,\n\t\tEmbeddedResourceSchema$1\n\t]);\n\tconst PromptMessageSchema$1 = z.object({\n\t\trole: RoleSchema$1,\n\t\tcontent: ContentBlockSchema$1\n\t});\n\tconst ToolAnnotationsSchema$1 = z.object({\n\t\ttitle: z.string().optional(),\n\t\treadOnlyHint: z.boolean().optional(),\n\t\tdestructiveHint: z.boolean().optional(),\n\t\tidempotentHint: z.boolean().optional(),\n\t\topenWorldHint: z.boolean().optional()\n\t});\n\tconst ToolListChangedNotificationSchema$1 = NotificationSchema$1.extend({\n\t\tmethod: z.literal(\"notifications/tools/list_changed\"),\n\t\tparams: NotificationsParamsSchema$1.optional()\n\t});\n\tconst ModelHintSchema$1 = z.object({ name: z.string().optional() });\n\tconst ModelPreferencesSchema$1 = z.object({\n\t\thints: z.array(ModelHintSchema$1).optional(),\n\t\tcostPriority: z.number().min(0).max(1).optional(),\n\t\tspeedPriority: z.number().min(0).max(1).optional(),\n\t\tintelligencePriority: z.number().min(0).max(1).optional()\n\t});\n\tconst ToolChoiceSchema$1 = z.object({ mode: z.enum([\n\t\t\"auto\",\n\t\t\"required\",\n\t\t\"none\"\n\t]).optional() });\n\tconst BooleanSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"boolean\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tdefault: z.boolean().optional()\n\t});\n\tconst StringSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminLength: z.number().optional(),\n\t\tmaxLength: z.number().optional(),\n\t\tformat: z.enum([\n\t\t\t\"email\",\n\t\t\t\"uri\",\n\t\t\t\"date\",\n\t\t\t\"date-time\"\n\t\t]).optional(),\n\t\tdefault: z.string().optional()\n\t});\n\tconst NumberSchemaSchema$1 = z.object({\n\t\ttype: z.enum([\"number\", \"integer\"]),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminimum: z.number().optional(),\n\t\tmaximum: z.number().optional(),\n\t\tdefault: z.number().optional()\n\t});\n\tconst UntitledSingleSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tenum: z.array(z.string()),\n\t\tdefault: z.string().optional()\n\t});\n\tconst TitledSingleSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\toneOf: z.array(z.object({\n\t\t\tconst: z.string(),\n\t\t\ttitle: z.string()\n\t\t})),\n\t\tdefault: z.string().optional()\n\t});\n\tconst LegacyTitledEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"string\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tenum: z.array(z.string()),\n\t\tenumNames: z.array(z.string()).optional(),\n\t\tdefault: z.string().optional()\n\t});\n\tconst SingleSelectEnumSchemaSchema$1 = z.union([UntitledSingleSelectEnumSchemaSchema$1, TitledSingleSelectEnumSchemaSchema$1]);\n\tconst UntitledMultiSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"array\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminItems: z.number().optional(),\n\t\tmaxItems: z.number().optional(),\n\t\titems: z.object({\n\t\t\ttype: z.literal(\"string\"),\n\t\t\tenum: z.array(z.string())\n\t\t}),\n\t\tdefault: z.array(z.string()).optional()\n\t});\n\tconst TitledMultiSelectEnumSchemaSchema$1 = z.object({\n\t\ttype: z.literal(\"array\"),\n\t\ttitle: z.string().optional(),\n\t\tdescription: z.string().optional(),\n\t\tminItems: z.number().optional(),\n\t\tmaxItems: z.number().optional(),\n\t\titems: z.object({ anyOf: z.array(z.object({\n\t\t\tconst: z.string(),\n\t\t\ttitle: z.string()\n\t\t})) }),\n\t\tdefault: z.array(z.string()).optional()\n\t});\n\tconst MultiSelectEnumSchemaSchema$1 = z.union([UntitledMultiSelectEnumSchemaSchema$1, TitledMultiSelectEnumSchemaSchema$1]);\n\tconst EnumSchemaSchema$1 = z.union([\n\t\tLegacyTitledEnumSchemaSchema$1,\n\t\tSingleSelectEnumSchemaSchema$1,\n\t\tMultiSelectEnumSchemaSchema$1\n\t]);\n\tconst PrimitiveSchemaDefinitionSchema$1 = z.union([\n\t\tEnumSchemaSchema$1,\n\t\tBooleanSchemaSchema$1,\n\t\tStringSchemaSchema$1,\n\t\tNumberSchemaSchema$1\n\t]);\n\tconst ElicitRequestFormParamsSchema$1 = TaskAugmentedRequestParamsSchema$1.extend({\n\t\tmode: z.literal(\"form\").optional(),\n\t\tmessage: z.string(),\n\t\trequestedSchema: z.object({\n\t\t\ttype: z.literal(\"object\"),\n\t\t\tproperties: z.record(z.string(), PrimitiveSchemaDefinitionSchema$1),\n\t\t\trequired: z.array(z.string()).optional()\n\t\t}).catchall(z.unknown())\n\t});\n\tconst ResourceTemplateReferenceSchema$1 = z.object({\n\t\ttype: z.literal(\"ref/resource\"),\n\t\turi: z.string()\n\t});\n\tconst PromptReferenceSchema$1 = z.object({\n\t\ttype: z.literal(\"ref/prompt\"),\n\t\tname: z.string()\n\t});\n\tconst RootSchema$1 = z.object({\n\t\turi: z.string().startsWith(\"file://\"),\n\t\tname: z.string().optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\tconst sharedClientCapabilityShape = ClientCapabilitiesSchema$1.shape;\n\tconst ClientCapabilities2026Schema = z.object({\n\t\texperimental: sharedClientCapabilityShape.experimental,\n\t\tsampling: sharedClientCapabilityShape.sampling,\n\t\telicitation: sharedClientCapabilityShape.elicitation,\n\t\troots: sharedClientCapabilityShape.roots,\n\t\textensions: sharedClientCapabilityShape.extensions\n\t});\n\tconst sharedServerCapabilityShape = ServerCapabilitiesSchema$1.shape;\n\tconst ServerCapabilities2026Schema = z.object({\n\t\texperimental: sharedServerCapabilityShape.experimental,\n\t\tlogging: sharedServerCapabilityShape.logging,\n\t\tcompletions: sharedServerCapabilityShape.completions,\n\t\tprompts: sharedServerCapabilityShape.prompts,\n\t\tresources: sharedServerCapabilityShape.resources,\n\t\ttools: sharedServerCapabilityShape.tools,\n\t\textensions: sharedServerCapabilityShape.extensions\n\t});\n\t/**\n\t* The per-request `_meta` envelope carried by every request under protocol revision\n\t* 2026-07-28: the protocol version governing the request, the client implementation\n\t* info, and the client's capabilities — declared per request rather than once at\n\t* initialization — plus the optional log-level opt-in.\n\t*\n\t* This schema models the complete envelope on its own (loose: foreign keys\n\t* pass through - the lift extracts exactly the reserved keys, so enforcement\n\t* never sees extension material). Requiredness is enforced per request at\n\t* dispatch time by the 2026-era codec's `checkInboundEnvelope` step.\n\t*/\n\tconst RequestMetaEnvelopeSchema = z.looseObject({\n\t\tprogressToken: ProgressTokenSchema$1.optional(),\n\t\t[PROTOCOL_VERSION_META_KEY]: z.string(),\n\t\t[CLIENT_INFO_META_KEY]: ImplementationSchema$1.optional(),\n\t\t[CLIENT_CAPABILITIES_META_KEY]: ClientCapabilities2026Schema,\n\t\t[LOG_LEVEL_META_KEY]: LoggingLevelSchema$1.optional()\n\t});\n\t/** 2026-era Tool: anchor-exact — no `execution` (deleted vocabulary). */\n\tconst ToolSchema$1 = z.object({\n\t\t...BaseMetadataSchema$1.shape,\n\t\t...IconsSchema$1.shape,\n\t\tdescription: z.string().optional(),\n\t\tinputSchema: z.looseObject({\n\t\t\t$schema: z.string().optional(),\n\t\t\ttype: z.literal(\"object\")\n\t\t}),\n\t\toutputSchema: z.looseObject({ $schema: z.string().optional() }).optional(),\n\t\tannotations: ToolAnnotationsSchema$1.optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/** 2026-era ToolResultContent (anchor-exact: `structuredContent?: unknown`). */\n\tconst ToolResultContentSchema$1 = z.object({\n\t\ttype: z.literal(\"tool_result\"),\n\t\ttoolUseId: z.string(),\n\t\tcontent: z.array(ContentBlockSchema$1),\n\t\tstructuredContent: z.unknown().optional(),\n\t\tisError: z.boolean().optional(),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/** 2026-era sampling content union (composes the forked tool-result shape). */\n\tconst SamplingMessageContentBlockSchema$1 = z.union([\n\t\tTextContentSchema$1,\n\t\tImageContentSchema$1,\n\t\tAudioContentSchema$1,\n\t\tToolUseContentSchema$1,\n\t\tToolResultContentSchema$1\n\t]);\n\t/** 2026-era SamplingMessage (anchor-exact: single block or array). */\n\tconst SamplingMessageSchema$1 = z.object({\n\t\trole: RoleSchema$1,\n\t\tcontent: z.union([SamplingMessageContentBlockSchema$1, z.array(SamplingMessageContentBlockSchema$1)]),\n\t\t_meta: z.record(z.string(), z.unknown()).optional()\n\t});\n\t/** Open union per the anchor: 'complete' | 'input_required' | string. */\n\tconst ResultTypeSchema = z.string();\n\t/**\n\t* Result `_meta` (anchor `ResultMetaObject`, added by spec PR #3002):\n\t* loose, with the serverInfo key typed when present; the outbound stamp\n\t* is the encode contract's `stampServerInfoMeta` step.\n\t*/\n\tconst ResultMetaSchema = z.looseObject({ [SERVER_INFO_META_KEY]: ImplementationSchema$1.optional().catch(void 0) });\n\tconst wireMeta = ResultMetaSchema.optional();\n\tfunction wireResult(shape) {\n\t\treturn z.looseObject({\n\t\t\t_meta: wireMeta,\n\t\t\tresultType: ResultTypeSchema.default(\"complete\"),\n\t\t\t...shape\n\t\t});\n\t}\n\tconst ResultSchema$1 = wireResult({});\n\tconst PaginatedResultSchema$1 = wireResult({ nextCursor: CursorSchema$1.optional() });\n\tconst CallToolResultSchema$1 = wireResult({\n\t\tcontent: z.array(ContentBlockSchema$1),\n\t\tstructuredContent: z.unknown().optional(),\n\t\tisError: z.boolean().optional()\n\t});\n\tconst ListToolsResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\ttools: z.array(ToolSchema$1),\n\t\tnextCursor: CursorSchema$1.optional()\n\t});\n\tconst ListPromptsResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\tprompts: z.array(PromptSchema$1),\n\t\tnextCursor: CursorSchema$1.optional()\n\t});\n\tconst GetPromptResultSchema$1 = wireResult({\n\t\tdescription: z.string().optional(),\n\t\tmessages: z.array(PromptMessageSchema$1)\n\t});\n\tconst ListResourcesResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\tresources: z.array(ResourceSchema$1),\n\t\tnextCursor: CursorSchema$1.optional()\n\t});\n\tconst ListResourceTemplatesResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\tresourceTemplates: z.array(ResourceTemplateSchema$1),\n\t\tnextCursor: CursorSchema$1.optional()\n\t});\n\tconst ReadResourceResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\tcontents: z.array(z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]))\n\t});\n\tconst CompleteResultSchema$1 = wireResult({ completion: z.object({\n\t\tvalues: z.array(z.string()).max(100),\n\t\ttotal: z.number().int().optional(),\n\t\thasMore: z.boolean().optional()\n\t}).loose() });\n\t/** CacheableResult (SEP-2549): ttlMs and cacheScope REQUIRED per the anchor. */\n\tconst CacheableResultSchema = wireResult({\n\t\tttlMs: z.number().int().min(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"])\n\t});\n\tconst DiscoverResultSchema$1 = wireResult({\n\t\tttlMs: z.number().int().min(0).catch(0),\n\t\tcacheScope: z.enum([\"public\", \"private\"]).catch(\"private\"),\n\t\tsupportedVersions: z.array(z.string()),\n\t\tcapabilities: ServerCapabilities2026Schema,\n\t\tinstructions: z.string().optional()\n\t});\n\t/** 2026-era CreateMessageRequestParams (anchor-exact: forked SamplingMessage/Tool, no task augmentation). */\n\tconst CreateMessageRequestParamsSchema$1 = z.object({\n\t\tmessages: z.array(SamplingMessageSchema$1),\n\t\tmodelPreferences: ModelPreferencesSchema$1.optional(),\n\t\tsystemPrompt: z.string().optional(),\n\t\tincludeContext: z.enum([\n\t\t\t\"none\",\n\t\t\t\"thisServer\",\n\t\t\t\"allServers\"\n\t\t]).optional(),\n\t\ttemperature: z.number().optional(),\n\t\tmaxTokens: z.number().int(),\n\t\tstopSequences: z.array(z.string()).optional(),\n\t\tmetadata: JSONObjectSchema$1.optional(),\n\t\ttools: z.array(ToolSchema$1).optional(),\n\t\ttoolChoice: ToolChoiceSchema$1.optional()\n\t});\n\t/** 2026-era embedded sampling request (de-JSON-RPC'd). */\n\tconst CreateMessageRequestSchema$1 = z.object({\n\t\tmethod: z.literal(\"sampling/createMessage\"),\n\t\tparams: CreateMessageRequestParamsSchema$1\n\t});\n\t/**\n\t* 2026-era embedded roots listing request (de-JSON-RPC'd). Embedded input\n\t* requests do NOT carry the per-request `_meta` envelope on this revision —\n\t* the anchor declares a bare optional `_meta` on `params`.\n\t*/\n\tconst ListRootsRequestSchema$1 = z.object({\n\t\tmethod: z.literal(\"roots/list\"),\n\t\tparams: z.object({ _meta: z.record(z.string(), z.unknown()).optional() }).optional()\n\t});\n\t/** 2026-era embedded sampling response (anchor-exact: extends the forked SamplingMessage). */\n\tconst CreateMessageResultSchema$1 = z.object({\n\t\t...SamplingMessageSchema$1.shape,\n\t\tmodel: z.string(),\n\t\tstopReason: z.string().optional()\n\t});\n\t/** 2026-era embedded roots listing response (anchor-exact: bare `roots` array). */\n\tconst ListRootsResultSchema$1 = z.object({ roots: z.array(RootSchema$1) });\n\t/** 2026-era embedded elicitation response (anchor-exact: bare result, restricted content value types). */\n\tconst ElicitResultSchema$1 = z.object({\n\t\taction: z.enum([\n\t\t\t\"accept\",\n\t\t\t\"decline\",\n\t\t\t\"cancel\"\n\t\t]),\n\t\tcontent: z.record(z.string(), z.union([\n\t\t\tz.string(),\n\t\t\tz.number(),\n\t\t\tz.boolean(),\n\t\t\tz.array(z.string())\n\t\t])).optional()\n\t});\n\t/**\n\t* 2026-era URL-mode elicitation params (anchor-exact fork): the draft removed\n\t* `elicitationId` (and the `notifications/elicitation/complete` channel it\n\t* keyed) — the shared schema keeps the field because it is required on the\n\t* frozen 2025-11-25 revision.\n\t*/\n\tconst ElicitRequestURLParamsSchema$1 = z.object({\n\t\tmode: z.literal(\"url\"),\n\t\tmessage: z.string(),\n\t\turl: z.string().url()\n\t});\n\t/** 2026-era elicitation params (form mode is revision-identical; URL mode is the fork above). */\n\tconst ElicitRequestParamsSchema$1 = z.union([ElicitRequestFormParamsSchema$1, ElicitRequestURLParamsSchema$1]);\n\t/** 2026-era embedded elicitation request (de-JSON-RPC'd; see the URL-mode fork above). */\n\tconst ElicitRequestSchema$1 = z.object({\n\t\tmethod: z.literal(\"elicitation/create\"),\n\t\tparams: ElicitRequestParamsSchema$1\n\t});\n\t/** A single embedded input request (one of the three demoted server→client requests). */\n\tconst InputRequestSchema = z.union([\n\t\tCreateMessageRequestSchema$1,\n\t\tListRootsRequestSchema$1,\n\t\tElicitRequestSchema$1\n\t]);\n\t/** A single embedded input response — the BARE result union (never a `{method, result}` wrapper). */\n\tconst InputResponseSchema = z.union([\n\t\tCreateMessageResultSchema$1,\n\t\tListRootsResultSchema$1,\n\t\tElicitResultSchema$1\n\t]);\n\t/** Map of embedded input requests, keyed by server-assigned identifiers. */\n\tconst InputRequestsSchema = z.record(z.string(), InputRequestSchema);\n\t/** Map of embedded input responses, keyed by the corresponding request identifiers. */\n\tconst InputResponsesSchema = z.record(z.string(), InputResponseSchema);\n\t/**\n\t* The wire InputRequiredResult: `resultType: 'input_required'` plus at least\n\t* one of `inputRequests` / `requestState` (the at-least-one rule is enforced\n\t* at the server seam, not by this parse shape).\n\t*/\n\tconst InputRequiredResultSchema = wireResult({\n\t\tinputRequests: InputRequestsSchema.optional(),\n\t\trequestState: z.string().optional()\n\t});\n\t/** The retry-channel members carried by client-initiated requests on this revision. */\n\tconst retryParamsShape = {\n\t\tinputResponses: InputResponsesSchema.optional(),\n\t\trequestState: z.string().optional()\n\t};\n\t/** Anchor InputResponseRequestParams: the retry channel on top of the required request `_meta` envelope. */\n\tconst InputResponseRequestParamsSchema = z.object({\n\t\t_meta: RequestMetaEnvelopeSchema,\n\t\t...retryParamsShape\n\t});\n\t/** Post-lift request `_meta` (progressToken + extension keys; loose). */\n\tconst DispatchRequestMetaSchema = z.looseObject({ progressToken: ProgressTokenSchema$1.optional() });\n\tfunction wireRequest(method, paramsShape) {\n\t\treturn z.object({\n\t\t\tmethod: z.literal(method),\n\t\t\tparams: z.object({\n\t\t\t\t_meta: RequestMetaEnvelopeSchema,\n\t\t\t\t...paramsShape\n\t\t\t})\n\t\t});\n\t}\n\tfunction dispatchRequest(method, paramsShape) {\n\t\treturn z.object({\n\t\t\tmethod: z.literal(method),\n\t\t\tparams: z.object({\n\t\t\t\t_meta: DispatchRequestMetaSchema.optional(),\n\t\t\t\t...paramsShape\n\t\t\t}).optional()\n\t\t});\n\t}\n\tconst callToolParamsShape = {\n\t\tname: z.string(),\n\t\targuments: z.record(z.string(), z.unknown()).optional(),\n\t\t...retryParamsShape\n\t};\n\tconst paginatedParamsShape = { cursor: CursorSchema$1.optional() };\n\tconst CallToolRequestSchema$1 = wireRequest(\"tools/call\", callToolParamsShape);\n\tconst ListToolsRequestSchema$1 = wireRequest(\"tools/list\", paginatedParamsShape);\n\tconst ListPromptsRequestSchema$1 = wireRequest(\"prompts/list\", paginatedParamsShape);\n\tconst GetPromptRequestSchema$1 = wireRequest(\"prompts/get\", {\n\t\tname: z.string(),\n\t\targuments: z.record(z.string(), z.string()).optional(),\n\t\t...retryParamsShape\n\t});\n\tconst ListResourcesRequestSchema$1 = wireRequest(\"resources/list\", paginatedParamsShape);\n\tconst ListResourceTemplatesRequestSchema$1 = wireRequest(\"resources/templates/list\", paginatedParamsShape);\n\tconst ReadResourceRequestSchema$1 = wireRequest(\"resources/read\", {\n\t\turi: z.string(),\n\t\t...retryParamsShape\n\t});\n\tconst completeParamsShape = {\n\t\tref: z.union([PromptReferenceSchema$1, ResourceTemplateReferenceSchema$1]),\n\t\targument: z.object({\n\t\t\tname: z.string(),\n\t\t\tvalue: z.string()\n\t\t}),\n\t\tcontext: z.object({ arguments: z.record(z.string(), z.string()).optional() }).optional()\n\t};\n\tconst CompleteRequestSchema$1 = wireRequest(\"completion/complete\", completeParamsShape);\n\tconst DiscoverRequestSchema$1 = wireRequest(\"server/discover\", {});\n\t/** Anchor SubscriptionFilter (2026-only). */\n\tconst SubscriptionFilterSchema$1 = z.object({\n\t\ttoolsListChanged: z.boolean().optional(),\n\t\tpromptsListChanged: z.boolean().optional(),\n\t\tresourcesListChanged: z.boolean().optional(),\n\t\tresourceSubscriptions: z.array(z.string()).optional()\n\t});\n\tconst subscriptionsListenParamsShape = { notifications: SubscriptionFilterSchema$1 };\n\tconst SubscriptionsListenRequestSchema$1 = wireRequest(\"subscriptions/listen\", subscriptionsListenParamsShape);\n\t/**\n\t* Anchor SubscriptionsListenResultMeta — required subscriptionId stamp on\n\t* the graceful-close result. Extends `ResultMetaObject` since spec PR\n\t* #3002 (composed, so the serverInfo key and its leniency stay single-sourced).\n\t*/\n\tconst SubscriptionsListenResultMetaSchema$1 = ResultMetaSchema.extend({ \"io.modelcontextprotocol/subscriptionId\": RequestIdSchema$1 });\n\t/**\n\t* Anchor SubscriptionsListenResult (2026-only). The empty `subscriptions/listen`\n\t* response signalling that the subscription has ended gracefully (server\n\t* shutdown). An abrupt transport close carries no response — the client treats\n\t* stream-close-without-result as a disconnect.\n\t*/\n\tconst SubscriptionsListenResultSchema$1 = z.looseObject({\n\t\t_meta: SubscriptionsListenResultMetaSchema$1,\n\t\tresultType: ResultTypeSchema.default(\"complete\")\n\t});\n\t/** Dispatch (post-lift) request schemas, keyed by method — registry-internal. */\n\tconst dispatchRequestSchemas = {\n\t\t\"tools/call\": dispatchRequest(\"tools/call\", callToolParamsShape),\n\t\t\"tools/list\": dispatchRequest(\"tools/list\", paginatedParamsShape),\n\t\t\"prompts/get\": dispatchRequest(\"prompts/get\", {\n\t\t\tname: z.string(),\n\t\t\targuments: z.record(z.string(), z.string()).optional()\n\t\t}),\n\t\t\"prompts/list\": dispatchRequest(\"prompts/list\", paginatedParamsShape),\n\t\t\"resources/list\": dispatchRequest(\"resources/list\", paginatedParamsShape),\n\t\t\"resources/templates/list\": dispatchRequest(\"resources/templates/list\", paginatedParamsShape),\n\t\t\"resources/read\": dispatchRequest(\"resources/read\", { uri: z.string() }),\n\t\t\"completion/complete\": dispatchRequest(\"completion/complete\", completeParamsShape),\n\t\t\"server/discover\": dispatchRequest(\"server/discover\", {}),\n\t\t\"subscriptions/listen\": dispatchRequest(\"subscriptions/listen\", subscriptionsListenParamsShape)\n\t};\n\t/** Dispatch (post-lift) result schemas, keyed by method — what the funnel\n\t* validates AFTER `decodeResult` consumed `resultType`. */\n\tfunction liftedResult(shape) {\n\t\treturn z.looseObject({\n\t\t\t_meta: wireMeta,\n\t\t\t...shape\n\t\t});\n\t}\n\tconst dispatchResultSchemas = {\n\t\t\"tools/call\": liftedResult({\n\t\t\tcontent: z.array(ContentBlockSchema$1),\n\t\t\tstructuredContent: z.unknown().optional(),\n\t\t\tisError: z.boolean().optional()\n\t\t}),\n\t\t\"tools/list\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\ttools: z.array(ToolSchema$1),\n\t\t\tnextCursor: CursorSchema$1.optional()\n\t\t}),\n\t\t\"prompts/get\": liftedResult({\n\t\t\tdescription: z.string().optional(),\n\t\t\tmessages: z.array(PromptMessageSchema$1)\n\t\t}),\n\t\t\"prompts/list\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\tprompts: z.array(PromptSchema$1),\n\t\t\tnextCursor: CursorSchema$1.optional()\n\t\t}),\n\t\t\"resources/list\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\tresources: z.array(ResourceSchema$1),\n\t\t\tnextCursor: CursorSchema$1.optional()\n\t\t}),\n\t\t\"resources/templates/list\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\tresourceTemplates: z.array(ResourceTemplateSchema$1),\n\t\t\tnextCursor: CursorSchema$1.optional()\n\t\t}),\n\t\t\"resources/read\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]),\n\t\t\tcontents: z.array(z.union([TextResourceContentsSchema$1, BlobResourceContentsSchema$1]))\n\t\t}),\n\t\t\"completion/complete\": liftedResult({ completion: z.object({\n\t\t\tvalues: z.array(z.string()).max(100),\n\t\t\ttotal: z.number().int().optional(),\n\t\t\thasMore: z.boolean().optional()\n\t\t}).loose() }),\n\t\t\"server/discover\": liftedResult({\n\t\t\tttlMs: z.number().int().min(0).catch(0),\n\t\t\tcacheScope: z.enum([\"public\", \"private\"]).catch(\"private\"),\n\t\t\tsupportedVersions: z.array(z.string()),\n\t\t\tcapabilities: ServerCapabilities2026Schema,\n\t\t\tinstructions: z.string().optional()\n\t\t}),\n\t\t\"subscriptions/listen\": liftedResult({})\n\t};\n\t/**\n\t* Notification `_meta` (anchor `NotificationMetaObject`): loose, with the\n\t* subscriptions/listen demux key typed when present. Only the anchor-exact\n\t* SHAPE is modeled here — listen delivery itself (filter gating, demux,\n\t* teardown) is #14 scope and not implemented by this module.\n\t*/\n\tconst NotificationMetaSchema = z.looseObject({ \"io.modelcontextprotocol/subscriptionId\": RequestIdSchema$1.optional() });\n\t/** Anchor SubscriptionsAcknowledgedNotification (2026-only). */\n\tconst SubscriptionsAcknowledgedNotificationSchema$1 = z.object({\n\t\tmethod: z.literal(\"notifications/subscriptions/acknowledged\"),\n\t\tparams: z.object({\n\t\t\t_meta: NotificationMetaSchema.optional(),\n\t\t\tnotifications: SubscriptionFilterSchema$1\n\t\t})\n\t});\n\t/**\n\t* 2026-era `notifications/cancelled` params (anchor-exact fork): `requestId`\n\t* is REQUIRED on this revision — the shared schema keeps it optional because\n\t* the frozen 2025-11-25 shape declares it optional (task cancellation goes\n\t* through `tasks/cancel` there). Requiredness is bare because no 2025-era\n\t* traffic touches this module.\n\t*/\n\tconst CancelledNotificationParamsSchema$1 = z.object({\n\t\t_meta: NotificationMetaSchema.optional(),\n\t\trequestId: RequestIdSchema$1,\n\t\treason: z.string().optional()\n\t});\n\t/** 2026-era `notifications/cancelled` (see the params fork above). */\n\tconst CancelledNotificationSchema$1 = z.object({\n\t\tmethod: z.literal(\"notifications/cancelled\"),\n\t\tparams: CancelledNotificationParamsSchema$1\n\t});\n\tconst notificationSchemas2026 = {\n\t\t\"notifications/cancelled\": CancelledNotificationSchema$1,\n\t\t\"notifications/progress\": ProgressNotificationSchema$1,\n\t\t\"notifications/message\": LoggingMessageNotificationSchema$1,\n\t\t\"notifications/resources/updated\": ResourceUpdatedNotificationSchema$1,\n\t\t\"notifications/resources/list_changed\": ResourceListChangedNotificationSchema$1,\n\t\t\"notifications/tools/list_changed\": ToolListChangedNotificationSchema$1,\n\t\t\"notifications/prompts/list_changed\": PromptListChangedNotificationSchema$1,\n\t\t\"notifications/subscriptions/acknowledged\": SubscriptionsAcknowledgedNotificationSchema$1\n\t};\n\tconst wireResultResponse = (result) => z.object({\n\t\tjsonrpc: z.literal(\"2.0\"),\n\t\tid: z.union([z.string(), z.number().int()]),\n\t\tresult\n\t}).strict();\n\treturn {\n\t\tJSONValueSchema: JSONValueSchema$1,\n\t\tJSONObjectSchema: JSONObjectSchema$1,\n\t\tProgressTokenSchema: ProgressTokenSchema$1,\n\t\tCursorSchema: CursorSchema$1,\n\t\tRequestIdSchema: RequestIdSchema$1,\n\t\tRoleSchema: RoleSchema$1,\n\t\tLoggingLevelSchema: LoggingLevelSchema$1,\n\t\tTaskMetadataSchema: TaskMetadataSchema$1,\n\t\tRelatedTaskMetadataSchema: RelatedTaskMetadataSchema$1,\n\t\tRequestMetaSchema: RequestMetaSchema$1,\n\t\tBaseRequestParamsSchema: BaseRequestParamsSchema$1,\n\t\tTaskAugmentedRequestParamsSchema: TaskAugmentedRequestParamsSchema$1,\n\t\tNotificationsParamsSchema: NotificationsParamsSchema$1,\n\t\tNotificationSchema: NotificationSchema$1,\n\t\tIconSchema: IconSchema$1,\n\t\tIconsSchema: IconsSchema$1,\n\t\tBaseMetadataSchema: BaseMetadataSchema$1,\n\t\tImplementationSchema: ImplementationSchema$1,\n\t\tClientTasksCapabilitySchema: ClientTasksCapabilitySchema$1,\n\t\tServerTasksCapabilitySchema: ServerTasksCapabilitySchema$1,\n\t\tClientCapabilitiesSchema: ClientCapabilitiesSchema$1,\n\t\tServerCapabilitiesSchema: ServerCapabilitiesSchema$1,\n\t\tProgressSchema: ProgressSchema$1,\n\t\tProgressNotificationParamsSchema: ProgressNotificationParamsSchema$1,\n\t\tProgressNotificationSchema: ProgressNotificationSchema$1,\n\t\tLoggingMessageNotificationParamsSchema: LoggingMessageNotificationParamsSchema$1,\n\t\tLoggingMessageNotificationSchema: LoggingMessageNotificationSchema$1,\n\t\tResourceContentsSchema: ResourceContentsSchema$1,\n\t\tTextResourceContentsSchema: TextResourceContentsSchema$1,\n\t\tBlobResourceContentsSchema: BlobResourceContentsSchema$1,\n\t\tAnnotationsSchema: AnnotationsSchema$1,\n\t\tResourceSchema: ResourceSchema$1,\n\t\tResourceTemplateSchema: ResourceTemplateSchema$1,\n\t\tResourceListChangedNotificationSchema: ResourceListChangedNotificationSchema$1,\n\t\tResourceUpdatedNotificationParamsSchema: ResourceUpdatedNotificationParamsSchema$1,\n\t\tResourceUpdatedNotificationSchema: ResourceUpdatedNotificationSchema$1,\n\t\tPromptArgumentSchema: PromptArgumentSchema$1,\n\t\tPromptSchema: PromptSchema$1,\n\t\tPromptListChangedNotificationSchema: PromptListChangedNotificationSchema$1,\n\t\tTextContentSchema: TextContentSchema$1,\n\t\tImageContentSchema: ImageContentSchema$1,\n\t\tAudioContentSchema: AudioContentSchema$1,\n\t\tToolUseContentSchema: ToolUseContentSchema$1,\n\t\tEmbeddedResourceSchema: EmbeddedResourceSchema$1,\n\t\tResourceLinkSchema: ResourceLinkSchema$1,\n\t\tContentBlockSchema: ContentBlockSchema$1,\n\t\tPromptMessageSchema: PromptMessageSchema$1,\n\t\tToolAnnotationsSchema: ToolAnnotationsSchema$1,\n\t\tToolListChangedNotificationSchema: ToolListChangedNotificationSchema$1,\n\t\tModelHintSchema: ModelHintSchema$1,\n\t\tModelPreferencesSchema: ModelPreferencesSchema$1,\n\t\tToolChoiceSchema: ToolChoiceSchema$1,\n\t\tBooleanSchemaSchema: BooleanSchemaSchema$1,\n\t\tStringSchemaSchema: StringSchemaSchema$1,\n\t\tNumberSchemaSchema: NumberSchemaSchema$1,\n\t\tUntitledSingleSelectEnumSchemaSchema: UntitledSingleSelectEnumSchemaSchema$1,\n\t\tTitledSingleSelectEnumSchemaSchema: TitledSingleSelectEnumSchemaSchema$1,\n\t\tLegacyTitledEnumSchemaSchema: LegacyTitledEnumSchemaSchema$1,\n\t\tSingleSelectEnumSchemaSchema: SingleSelectEnumSchemaSchema$1,\n\t\tUntitledMultiSelectEnumSchemaSchema: UntitledMultiSelectEnumSchemaSchema$1,\n\t\tTitledMultiSelectEnumSchemaSchema: TitledMultiSelectEnumSchemaSchema$1,\n\t\tMultiSelectEnumSchemaSchema: MultiSelectEnumSchemaSchema$1,\n\t\tEnumSchemaSchema: EnumSchemaSchema$1,\n\t\tPrimitiveSchemaDefinitionSchema: PrimitiveSchemaDefinitionSchema$1,\n\t\tElicitRequestFormParamsSchema: ElicitRequestFormParamsSchema$1,\n\t\tResourceTemplateReferenceSchema: ResourceTemplateReferenceSchema$1,\n\t\tPromptReferenceSchema: PromptReferenceSchema$1,\n\t\tRootSchema: RootSchema$1,\n\t\tClientCapabilities2026Schema,\n\t\tServerCapabilities2026Schema,\n\t\tRequestMetaEnvelopeSchema,\n\t\tToolSchema: ToolSchema$1,\n\t\tToolResultContentSchema: ToolResultContentSchema$1,\n\t\tSamplingMessageContentBlockSchema: SamplingMessageContentBlockSchema$1,\n\t\tSamplingMessageSchema: SamplingMessageSchema$1,\n\t\tResultTypeSchema,\n\t\tResultMetaSchema,\n\t\tResultSchema: ResultSchema$1,\n\t\tPaginatedResultSchema: PaginatedResultSchema$1,\n\t\tCallToolResultSchema: CallToolResultSchema$1,\n\t\tListToolsResultSchema: ListToolsResultSchema$1,\n\t\tListPromptsResultSchema: ListPromptsResultSchema$1,\n\t\tGetPromptResultSchema: GetPromptResultSchema$1,\n\t\tListResourcesResultSchema: ListResourcesResultSchema$1,\n\t\tListResourceTemplatesResultSchema: ListResourceTemplatesResultSchema$1,\n\t\tReadResourceResultSchema: ReadResourceResultSchema$1,\n\t\tCompleteResultSchema: CompleteResultSchema$1,\n\t\tCacheableResultSchema,\n\t\tDiscoverResultSchema: DiscoverResultSchema$1,\n\t\tCreateMessageRequestParamsSchema: CreateMessageRequestParamsSchema$1,\n\t\tCreateMessageRequestSchema: CreateMessageRequestSchema$1,\n\t\tListRootsRequestSchema: ListRootsRequestSchema$1,\n\t\tCreateMessageResultSchema: CreateMessageResultSchema$1,\n\t\tListRootsResultSchema: ListRootsResultSchema$1,\n\t\tElicitResultSchema: ElicitResultSchema$1,\n\t\tElicitRequestURLParamsSchema: ElicitRequestURLParamsSchema$1,\n\t\tElicitRequestParamsSchema: ElicitRequestParamsSchema$1,\n\t\tElicitRequestSchema: ElicitRequestSchema$1,\n\t\tInputRequestSchema,\n\t\tInputResponseSchema,\n\t\tInputRequestsSchema,\n\t\tInputResponsesSchema,\n\t\tInputRequiredResultSchema,\n\t\tInputResponseRequestParamsSchema,\n\t\tCallToolRequestSchema: CallToolRequestSchema$1,\n\t\tListToolsRequestSchema: ListToolsRequestSchema$1,\n\t\tListPromptsRequestSchema: ListPromptsRequestSchema$1,\n\t\tGetPromptRequestSchema: GetPromptRequestSchema$1,\n\t\tListResourcesRequestSchema: ListResourcesRequestSchema$1,\n\t\tListResourceTemplatesRequestSchema: ListResourceTemplatesRequestSchema$1,\n\t\tReadResourceRequestSchema: ReadResourceRequestSchema$1,\n\t\tCompleteRequestSchema: CompleteRequestSchema$1,\n\t\tDiscoverRequestSchema: DiscoverRequestSchema$1,\n\t\tSubscriptionFilterSchema: SubscriptionFilterSchema$1,\n\t\tSubscriptionsListenRequestSchema: SubscriptionsListenRequestSchema$1,\n\t\tSubscriptionsListenResultMetaSchema: SubscriptionsListenResultMetaSchema$1,\n\t\tSubscriptionsListenResultSchema: SubscriptionsListenResultSchema$1,\n\t\tdispatchRequestSchemas,\n\t\tdispatchResultSchemas,\n\t\tNotificationMetaSchema,\n\t\tSubscriptionsAcknowledgedNotificationSchema: SubscriptionsAcknowledgedNotificationSchema$1,\n\t\tCancelledNotificationParamsSchema: CancelledNotificationParamsSchema$1,\n\t\tCancelledNotificationSchema: CancelledNotificationSchema$1,\n\t\tnotificationSchemas2026,\n\t\tJSONRPCResultResponseSchema: wireResultResponse(ResultSchema$1),\n\t\tCallToolResultResponseSchema: wireResultResponse(z.union([CallToolResultSchema$1, InputRequiredResultSchema])),\n\t\tListToolsResultResponseSchema: wireResultResponse(ListToolsResultSchema$1),\n\t\tListPromptsResultResponseSchema: wireResultResponse(ListPromptsResultSchema$1),\n\t\tGetPromptResultResponseSchema: wireResultResponse(z.union([GetPromptResultSchema$1, InputRequiredResultSchema])),\n\t\tListResourcesResultResponseSchema: wireResultResponse(ListResourcesResultSchema$1),\n\t\tListResourceTemplatesResultResponseSchema: wireResultResponse(ListResourceTemplatesResultSchema$1),\n\t\tReadResourceResultResponseSchema: wireResultResponse(z.union([ReadResourceResultSchema$1, InputRequiredResultSchema])),\n\t\tCompleteResultResponseSchema: wireResultResponse(CompleteResultSchema$1),\n\t\tDiscoverResultResponseSchema: wireResultResponse(DiscoverResultSchema$1)\n\t};\n}\nlet memo;\n/**\n* Builds the era wire-schema set on first call and returns the same object\n* thereafter. Module evaluation stays construction-free so importing the\n* era codec/registry costs nothing until the first validation actually\n* needs a schema; the registry, the codec, and the eager `schemas.ts`\n* shim all pull through this memo, so reference identity holds across\n* every consumer.\n*/\nfunction buildSchemas2026() {\n\treturn memo ??= build();\n}\n\n//#endregion\n//#region ../core-internal/src/shared/resultCacheHints.ts\n/**\n* The operations whose results are cacheable on the 2026-07-28 revision (the\n* `CacheableResult` extenders). This list is closed: no other operation's\n* result ever receives cache fields from the SDK.\n*/\nconst CACHEABLE_RESULT_METHODS = [\n\t\"tools/list\",\n\t\"prompts/list\",\n\t\"resources/list\",\n\t\"resources/templates/list\",\n\t\"resources/read\",\n\t\"server/discover\"\n];\n/** Whether the given method's result is cacheable on the 2026-07-28 revision. */\nfunction isCacheableResultMethod(method) {\n\treturn CACHEABLE_RESULT_METHODS.includes(method);\n}\n/**\n* The symbol-keyed carrier for a configured cache hint on a result object.\n* Symbol properties are invisible to JSON serialization, so the carrier can be\n* attached era-blind: only the 2026-era encode seam consumes it.\n*/\nconst RESULT_CACHE_HINT_FALLBACK = Symbol(\"modelcontextprotocol.resultCacheHintFallback\");\n/** Reads the configured cache-hint fallback attached to a result, if any. */\nfunction cacheHintFallbackOf(result) {\n\treturn result[RESULT_CACHE_HINT_FALLBACK];\n}\n/**\n* Whether a value is a valid `ttlMs`: a non-negative safe integer. Safe\n* integers are required because the wire schemas validate `ttlMs` as an\n* integer within `Number.MIN_SAFE_INTEGER`/`Number.MAX_SAFE_INTEGER`; a value\n* outside that range is treated as invalid here so it falls through to the\n* next author instead of being emitted and rejected downstream.\n*/\nfunction isValidCacheTtlMs(value) {\n\treturn typeof value === \"number\" && Number.isSafeInteger(value) && value >= 0;\n}\n/** Whether a value is a valid `cacheScope`. */\nfunction isValidCacheScope(value) {\n\treturn value === \"public\" || value === \"private\";\n}\n\n//#endregion\n//#region ../core-internal/src/types/enums.ts\n/**\n* Error codes for protocol errors that cross the wire as JSON-RPC error responses.\n* These follow the JSON-RPC specification and MCP-specific extensions.\n*/\nlet ProtocolErrorCode = /* @__PURE__ */ function(ProtocolErrorCode$1) {\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"ParseError\"] = -32700] = \"ParseError\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"InvalidRequest\"] = -32600] = \"InvalidRequest\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"MethodNotFound\"] = -32601] = \"MethodNotFound\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"InvalidParams\"] = -32602] = \"InvalidParams\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"InternalError\"] = -32603] = \"InternalError\";\n\t/**\n\t* Resource not found.\n\t*\n\t* Receive-tolerated only: the SDK never EMITS `-32002` — `resources/read`\n\t* misses answer `-32602` (Invalid Params) on every protocol revision per\n\t* the 2026-07-28 spec MUST, and a handler-thrown `-32002` is mapped to\n\t* `-32602` at the era encode seam. The member stays importable so clients\n\t* can recognise `-32002` from peers built on earlier SDK releases (the\n\t* spec's \"clients SHOULD also accept `-32002`\" backwards-compatibility\n\t* clause). Throw `ResourceNotFoundError` instead.\n\t*/\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"ResourceNotFound\"] = -32002] = \"ResourceNotFound\";\n\t/**\n\t* Processing the request requires a capability the client did not declare\n\t* in the request's `clientCapabilities` (protocol revision 2026-07-28).\n\t*/\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"MissingRequiredClientCapability\"] = -32021] = \"MissingRequiredClientCapability\";\n\t/**\n\t* The request's protocol version is unknown to the server or unsupported\n\t* by it (protocol revision 2026-07-28).\n\t*/\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"UnsupportedProtocolVersion\"] = -32022] = \"UnsupportedProtocolVersion\";\n\tProtocolErrorCode$1[ProtocolErrorCode$1[\"UrlElicitationRequired\"] = -32042] = \"UrlElicitationRequired\";\n\treturn ProtocolErrorCode$1;\n}({});\n\n//#endregion\n//#region ../core-internal/src/types/errors.ts\n/**\n* Protocol errors are JSON-RPC errors that cross the wire as error responses.\n* They use numeric error codes from the {@linkcode ProtocolErrorCode} enum.\n*\n* `instanceof` on this class (and its subclasses) is brand-matched, so it works\n* across separately bundled copies of the SDK — e.g. an error constructed by\n* `@modelcontextprotocol/client` matches the class re-exported by\n* `@modelcontextprotocol/server` in the same process.\n*/\nvar ProtocolError = class ProtocolError extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.ProtocolError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(code, message, data) {\n\t\tsuper(message);\n\t\tthis.code = code;\n\t\tthis.data = data;\n\t\tthis.name = \"ProtocolError\";\n\t\tstampErrorBrands(this, new.target);\n\t}\n\t/**\n\t* Factory method to create the appropriate error type based on the error code and data\n\t*/\n\tstatic fromError(code, message, data) {\n\t\tif (code === ProtocolErrorCode.UrlElicitationRequired && data) {\n\t\t\tconst errorData = data;\n\t\t\tif (errorData.elicitations) return new UrlElicitationRequiredError(errorData.elicitations, message);\n\t\t}\n\t\tif (code === ProtocolErrorCode.UnsupportedProtocolVersion && data) {\n\t\t\tconst errorData = data;\n\t\t\tif (Array.isArray(errorData.supported) && typeof errorData.requested === \"string\") return new UnsupportedProtocolVersionError({\n\t\t\t\tsupported: errorData.supported,\n\t\t\t\trequested: errorData.requested\n\t\t\t}, message);\n\t\t}\n\t\tif (code === ProtocolErrorCode.InvalidParams || code === ProtocolErrorCode.ResourceNotFound) {\n\t\t\tconst errorData = data;\n\t\t\tif (typeof errorData?.uri === \"string\" && (code === ProtocolErrorCode.ResourceNotFound || Object.keys(errorData).length === 1)) return new ResourceNotFoundError(errorData.uri, message);\n\t\t}\n\t\tif (code === ProtocolErrorCode.MissingRequiredClientCapability && data) {\n\t\t\tconst errorData = data;\n\t\t\tif (errorData.requiredCapabilities !== null && typeof errorData.requiredCapabilities === \"object\" && !Array.isArray(errorData.requiredCapabilities)) return new MissingRequiredClientCapabilityError({ requiredCapabilities: errorData.requiredCapabilities }, message);\n\t\t}\n\t\treturn new ProtocolError(code, message, data);\n\t}\n};\n/**\n* Error type for a `resources/read` miss: the requested resource does not\n* exist. The wire code is `-32602` (Invalid Params) on every protocol\n* revision — the spec MUST for revision 2026-07-28, and the value the v1.x\n* SDK has always emitted on earlier revisions. The error data echoes the\n* requested URI.\n*\n* Recognise this error by checking `error.data` is exactly `{ uri: string }`\n* (a `-32602` whose data carries `uri` and nothing else is resource-not-found;\n* any other `-32602` is an ordinary Invalid Params). For backwards compatibility, clients should also\n* accept `-32002` as resource not found — earlier SDK builds emitted that\n* code, and {@linkcode ProtocolError.fromError} reconstructs this class for\n* either code **when `error.data` carries `uri`** (a bare `-32002` without\n* `data.uri` stays a generic {@linkcode ProtocolError}). `instanceof` checks\n* are brand-matched and work across separately bundled copies of the SDK.\n*/\nvar ResourceNotFoundError = class extends ProtocolError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.ResourceNotFoundError\" });\n\t}\n\tconstructor(uri, message = `Resource not found: ${uri}`) {\n\t\tsuper(ProtocolErrorCode.InvalidParams, message, { uri });\n\t}\n\t/** The URI that was requested and not found. */\n\tget uri() {\n\t\treturn this.data.uri;\n\t}\n};\n/**\n* Specialized error type when a tool requires a URL mode elicitation.\n* This makes it nicer for the client to handle since there is specific data to work with instead of just a code to check against.\n*/\nvar UrlElicitationRequiredError = class extends ProtocolError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.UrlElicitationRequiredError\" });\n\t}\n\tconstructor(elicitations, message = `URL elicitation${elicitations.length > 1 ? \"s\" : \"\"} required`) {\n\t\tsuper(ProtocolErrorCode.UrlElicitationRequired, message, { elicitations });\n\t}\n\tget elicitations() {\n\t\treturn this.data?.elicitations ?? [];\n\t}\n};\n/**\n* Error type for the `-32022` UnsupportedProtocolVersion protocol error (protocol\n* revision 2026-07-28): the request's protocol version is unknown to the server or\n* unsupported by it.\n*\n* The error data lists the protocol versions the receiver supports (`supported`),\n* so the sender can choose a mutually supported version and retry, and echoes the\n* version that was requested (`requested`).\n*/\nvar UnsupportedProtocolVersionError = class extends ProtocolError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.UnsupportedProtocolVersionError\" });\n\t}\n\tconstructor(data, message = `Unsupported protocol version: ${data.requested}`) {\n\t\tsuper(ProtocolErrorCode.UnsupportedProtocolVersion, message, data);\n\t}\n\t/**\n\t* Protocol versions the receiver supports.\n\t*/\n\tget supported() {\n\t\treturn this.data.supported;\n\t}\n\t/**\n\t* The protocol version that was requested.\n\t*/\n\tget requested() {\n\t\treturn this.data.requested;\n\t}\n};\n/**\n* Error type for the `-32021` MissingRequiredClientCapability protocol error\n* (protocol revision 2026-07-28): processing the request requires a capability\n* the client did not declare in the request's `clientCapabilities`.\n*\n* The error data lists the missing capabilities (`requiredCapabilities`) in\n* the `ClientCapabilities` shape, so the client can see exactly what it would\n* have to declare for the request to be served. On HTTP, the response status\n* is `400 Bad Request`.\n*\n* Recognize this error by its code and `data.requiredCapabilities`, or by\n* `instanceof` — checks are brand-matched and work across separately bundled\n* copies of the SDK.\n*/\nvar MissingRequiredClientCapabilityError = class extends ProtocolError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.MissingRequiredClientCapabilityError\" });\n\t}\n\tconstructor(data, message = `Missing required client capabilities: ${Object.keys(data.requiredCapabilities).join(\", \")}`) {\n\t\tsuper(ProtocolErrorCode.MissingRequiredClientCapability, message, data);\n\t}\n\t/**\n\t* The capabilities the server requires from the client to process the\n\t* request (only the missing capabilities are listed).\n\t*/\n\tget requiredCapabilities() {\n\t\treturn this.data.requiredCapabilities;\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/encodeContract.ts\n/** The default cache policy when neither the handler nor configuration provides one. */\nconst DEFAULT_CACHE_TTL_MS = 0;\nconst DEFAULT_CACHE_SCOPE = \"private\";\n/**\n* Request methods whose spec result vocabulary goes beyond `'complete'` on the\n* 2026-07-28 revision: their results may be `input_required` (multi\n* round-trip requests), so a handler-provided `resultType` passes through the\n* stamp untouched. `subscriptions/listen` is NOT in this set: it never emits\n* a JSON-RPC result — termination is stream close (HTTP) or\n* `notifications/cancelled` (stdio) per the spec.\n*/\nconst EXTENDED_RESULT_TYPE_METHODS = [\n\t\"tools/call\",\n\t\"prompts/get\",\n\t\"resources/read\"\n];\n/**\n* Step 1 of the encode contract: ensure the outbound result carries the\n* required `resultType` discriminator.\n*\n* - No handler-provided value → stamp `'complete'`.\n* - Handler-provided `'complete'` → kept as-is.\n* - Handler-provided non-`'complete'` value on a method whose vocabulary\n* allows it ({@linkcode EXTENDED_RESULT_TYPE_METHODS}) → passes through.\n* The value is forwarded verbatim — the wire vocabulary is an open union and\n* the SDK does not validate the string, so emitting a `resultType` the\n* negotiated revision does not define is the handler author's\n* responsibility.\n* - Handler-provided non-`'complete'` value on any other method → internal\n* error (loud): the value would be mis-typed on the wire, and silently\n* rewriting it would hide a server bug.\n*/\nfunction stampResultType(method, result) {\n\tconst provided = result[\"resultType\"];\n\tif (provided === void 0) return {\n\t\t...result,\n\t\tresultType: \"complete\"\n\t};\n\tif (provided === \"complete\") return result;\n\tif (EXTENDED_RESULT_TYPE_METHODS.includes(method)) return result;\n\tthrow new ProtocolError(ProtocolErrorCode.InternalError, `Handler for ${method} returned resultType '${String(provided)}', but results of ${method} only support 'complete' on protocol revision 2026-07-28`);\n}\n/**\n* Step 2 of the encode contract: fill the required `ttlMs`/`cacheScope` fields\n* on cacheable results.\n*\n* Applies only when the (post-stamp) `resultType` is `'complete'` and the\n* method is one of the cacheable operations; everything else is returned\n* untouched apart from removing the configured-hint carrier. Field resolution\n* is per field, most specific author first: a valid handler-returned value,\n* then the configured cache hint attached by the server layer, then the\n* defaults. Handler-returned values are validated at encode time (`ttlMs`\n* must be a non-negative integer, `cacheScope` must be `'public'` or\n* `'private'`); invalid values are ignored rather than emitted.\n*/\nfunction fillCacheFields(method, result) {\n\tconst fallback = cacheHintFallbackOf(result);\n\tif (result[\"resultType\"] !== \"complete\" || !isCacheableResultMethod(method)) return fallback === void 0 ? result : stripCacheHintFallback(result);\n\tconst provided = result;\n\tconst ttlMs = isValidCacheTtlMs(provided[\"ttlMs\"]) ? provided[\"ttlMs\"] : resolveTtlMs(fallback);\n\tconst cacheScope = isValidCacheScope(provided[\"cacheScope\"]) ? provided[\"cacheScope\"] : resolveCacheScope(fallback);\n\tconst filled = {\n\t\t...provided,\n\t\tttlMs,\n\t\tcacheScope\n\t};\n\tdelete filled[RESULT_CACHE_HINT_FALLBACK];\n\treturn filled;\n}\nfunction isPlainObject$3(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/**\n* Step 3 of the encode contract: stamp the server's identity into the\n* result's `_meta` under `io.modelcontextprotocol/serverInfo` (spec PR #3002:\n* servers SHOULD include it on every response).\n*\n* - No `serverInfo` supplied (a client instance, or a hand-constructed\n* protocol object) → identity function.\n* - The result's `_meta` already carries the key → kept as-is (the handler\n* is the more specific author; mirrors the cache-fill resolution order).\n* - A present-but-non-object `_meta` (a dynamic-caller bug) → kept as-is:\n* the stamp never rewrites handler material, and the malformed value fails\n* loudly at the peer instead of being silently replaced here.\n* - Otherwise → the key is added, preserving any other `_meta` entries.\n*\n* Runs for every result regardless of `resultType`: the anchor types\n* `Result._meta` as `ResultMetaObject` on all results, `input_required`\n* included.\n*/\nfunction stampServerInfoMeta(result, serverInfo) {\n\tif (serverInfo === void 0) return result;\n\tconst meta = result[\"_meta\"];\n\tif (meta === void 0) return {\n\t\t...result,\n\t\t_meta: { [SERVER_INFO_META_KEY]: serverInfo }\n\t};\n\tif (!isPlainObject$3(meta)) return result;\n\tif (meta[SERVER_INFO_META_KEY] !== void 0) return result;\n\treturn {\n\t\t...result,\n\t\t_meta: {\n\t\t\t...meta,\n\t\t\t[SERVER_INFO_META_KEY]: serverInfo\n\t\t}\n\t};\n}\nfunction resolveTtlMs(fallback) {\n\treturn fallback !== void 0 && isValidCacheTtlMs(fallback.ttlMs) ? fallback.ttlMs : DEFAULT_CACHE_TTL_MS;\n}\nfunction resolveCacheScope(fallback) {\n\treturn fallback !== void 0 && isValidCacheScope(fallback.cacheScope) ? fallback.cacheScope : DEFAULT_CACHE_SCOPE;\n}\nfunction stripCacheHintFallback(result) {\n\tconst copy = { ...result };\n\tdelete copy[RESULT_CACHE_HINT_FALLBACK];\n\treturn copy;\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/inputRequired.ts\n/**\n* In-band input-request vocabulary of the 2026-07-28 revision (SEP-2322\n* multi round-trip requests), dispatch view.\n*\n* The three former server→client wire requests (`elicitation/create`,\n* `sampling/createMessage`, `roots/list`) are NOT wire request methods on\n* this revision — they are demoted to de-JSON-RPC'd payloads embedded in an\n* `input_required` result. The multi-round-trip driver dispatches those\n* embedded payloads to the client's registered handlers through the normal\n* handler machinery, and these are the schemas that dispatch parses them\n* with: lenient where the anchor's wire-true artifacts are strict (an\n* embedded request never carries the per-request `_meta` envelope), exact\n* where the vocabulary forks (the sampling shapes compose the forked\n* SamplingMessage/Tool payloads).\n*\n* Registry membership is intentionally NOT granted here — these methods stay\n* absent from the 2026-era request registry (a peer sending one as a wire\n* request still gets −32601 by absence). Only the codec's\n* `inputRequestSchema`/`inputResponseSchema` accessors expose them.\n*/\n/** The embedded input-request methods of the 2026-07-28 revision. */\nconst INPUT_REQUEST_METHODS_2026 = [\n\t\"elicitation/create\",\n\t\"sampling/createMessage\",\n\t\"roots/list\"\n];\nlet maps;\nfunction inputSchemaMaps() {\n\tif (maps) return maps;\n\tconst s = buildSchemas2026();\n\tmaps = {\n\t\trequest: {\n\t\t\t\"elicitation/create\": z.object({\n\t\t\t\tmethod: z.literal(\"elicitation/create\"),\n\t\t\t\tparams: s.ElicitRequestParamsSchema\n\t\t\t}),\n\t\t\t\"sampling/createMessage\": z.object({\n\t\t\t\tmethod: z.literal(\"sampling/createMessage\"),\n\t\t\t\tparams: s.CreateMessageRequestParamsSchema\n\t\t\t}),\n\t\t\t\"roots/list\": z.object({\n\t\t\t\tmethod: z.literal(\"roots/list\"),\n\t\t\t\tparams: z.looseObject({}).optional()\n\t\t\t})\n\t\t},\n\t\tresponse: {\n\t\t\t\"elicitation/create\": s.ElicitResultSchema,\n\t\t\t\"sampling/createMessage\": s.CreateMessageResultSchema,\n\t\t\t\"roots/list\": s.ListRootsResultSchema\n\t\t}\n\t};\n\treturn maps;\n}\n/**\n* Forces the lazy embedded-request maps (and, through them, the era's schema\n* memo). Warm-up hook for `preloadSchemas()` — no-op once the maps exist.\n*/\nfunction warmInputSchemaMaps2026() {\n\tinputSchemaMaps();\n}\nfunction isInputRequestMethod2026(method) {\n\treturn INPUT_REQUEST_METHODS_2026.includes(method);\n}\nfunction getInputRequestSchema2026(method) {\n\treturn isInputRequestMethod2026(method) ? inputSchemaMaps().request[method] : void 0;\n}\nfunction getInputResponseSchema2026(method) {\n\treturn isInputRequestMethod2026(method) ? inputSchemaMaps().response[method] : void 0;\n}\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/registry.ts\nconst requestMethodKeys = {\n\t\"tools/call\": null,\n\t\"tools/list\": null,\n\t\"prompts/get\": null,\n\t\"prompts/list\": null,\n\t\"resources/list\": null,\n\t\"resources/templates/list\": null,\n\t\"resources/read\": null,\n\t\"completion/complete\": null,\n\t\"server/discover\": null,\n\t\"subscriptions/listen\": null\n};\nconst notificationMethodKeys = {\n\t\"notifications/cancelled\": null,\n\t\"notifications/progress\": null,\n\t\"notifications/message\": null,\n\t\"notifications/resources/updated\": null,\n\t\"notifications/resources/list_changed\": null,\n\t\"notifications/tools/list_changed\": null,\n\t\"notifications/prompts/list_changed\": null,\n\t\"notifications/subscriptions/acknowledged\": null\n};\n/** The 2026-era request-method set (registry membership = the deletion story). */\nfunction hasRequestMethod2026(method) {\n\treturn Object.prototype.hasOwnProperty.call(requestMethodKeys, method);\n}\n/** The 2026-era notification-method set. */\nfunction hasNotificationMethod2026(method) {\n\treturn Object.prototype.hasOwnProperty.call(notificationMethodKeys, method);\n}\n/** Result-map membership (same key set as the request map on this era). */\nfunction hasResultMethod2026(method) {\n\treturn Object.prototype.hasOwnProperty.call(requestMethodKeys, method);\n}\nfunction getRequestSchema2026(method) {\n\treturn hasRequestMethod2026(method) ? buildSchemas2026().dispatchRequestSchemas[method] : void 0;\n}\nfunction getResultSchema2026(method) {\n\treturn hasResultMethod2026(method) ? buildSchemas2026().dispatchResultSchemas[method] : void 0;\n}\nfunction getNotificationSchema2026(method) {\n\treturn hasNotificationMethod2026(method) ? buildSchemas2026().notificationSchemas2026[method] : void 0;\n}\n/** Registry method lists (for the spec-method universe and the CI registry-diff oracle). */\nconst rev2026RequestMethods = Object.keys(requestMethodKeys);\nconst rev2026NotificationMethods = Object.keys(notificationMethodKeys);\n\n//#endregion\n//#region ../core-internal/src/wire/rev2026-07-28/codec.ts\nfunction isPlainObject$2(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/** Tri-state wrap of an optional Zod schema lookup (the function-only contract). */\nfunction triState(schema, raw) {\n\tif (schema === void 0) return {\n\t\tok: false,\n\t\treason: \"not-in-era\"\n\t};\n\tconst parsed = schema.safeParse(raw);\n\treturn parsed.success ? {\n\t\tok: true,\n\t\tvalue: parsed.data\n\t} : {\n\t\tok: false,\n\t\treason: \"invalid\",\n\t\tmessage: String(parsed.error)\n\t};\n}\nconst NOT_IN_ERA = {\n\tok: false,\n\treason: \"not-in-era\"\n};\n/**\n* The reserved `_meta` keys an envelope must carry on this era (in reporting\n* order). `clientInfo` is NOT here: spec PR #3002 demoted it to SHOULD, so a\n* request without it is accepted (a present-but-malformed value still fails\n* the envelope schema parse below).\n*/\nconst REQUIRED_ENVELOPE_KEYS = [PROTOCOL_VERSION_META_KEY, CLIENT_CAPABILITIES_META_KEY];\n/** Strip the known deleted-field set from an outbound result (Q1-SD3 iii). */\nfunction enforceDeletedFields(method, result) {\n\tlet next = result;\n\tlet copied = false;\n\tconst copy = () => {\n\t\tif (!copied) {\n\t\t\tnext = { ...next };\n\t\t\tcopied = true;\n\t\t}\n\t\treturn next;\n\t};\n\tconst tools = result.tools;\n\tif (method === \"tools/list\" && Array.isArray(tools) && tools.some((tool) => isPlainObject$2(tool) && \"execution\" in tool)) copy().tools = tools.map((tool) => {\n\t\tif (!isPlainObject$2(tool) || !(\"execution\" in tool)) return tool;\n\t\tconst rest = { ...tool };\n\t\tdelete rest[\"execution\"];\n\t\treturn rest;\n\t});\n\tconst capabilities = result.capabilities;\n\tif (isPlainObject$2(capabilities) && \"tasks\" in capabilities) {\n\t\tconst rest = { ...capabilities };\n\t\tdelete rest[\"tasks\"];\n\t\tcopy().capabilities = rest;\n\t}\n\treturn next;\n}\nconst rev2026Codec = {\n\tera: \"2026-07-28\",\n\thasRequestMethod: hasRequestMethod2026,\n\thasNotificationMethod: hasNotificationMethod2026,\n\thasInputRequestMethod: (method) => getInputRequestSchema2026(method) !== void 0,\n\tvalidateRequest: (method, raw) => triState(getRequestSchema2026(method), raw),\n\tvalidateResult: (method, raw) => triState(getResultSchema2026(method), raw),\n\tvalidateNotification: (method, raw) => triState(getNotificationSchema2026(method), raw),\n\tvalidateInputRequest: (method, raw) => triState(getInputRequestSchema2026(method), raw),\n\tvalidateInputResponse: (method, raw) => triState(getInputResponseSchema2026(method), raw),\n\tsamplingResultVariant: () => NOT_IN_ERA,\n\toutboundEnvelope(material) {\n\t\treturn {\n\t\t\t[PROTOCOL_VERSION_META_KEY]: material.protocolVersion,\n\t\t\t[CLIENT_INFO_META_KEY]: material.clientInfo,\n\t\t\t[CLIENT_CAPABILITIES_META_KEY]: material.clientCapabilities,\n\t\t\t...material.logLevel !== void 0 && { [LOG_LEVEL_META_KEY]: material.logLevel }\n\t\t};\n\t},\n\tvalidateEnvelopeMeta(meta) {\n\t\tconst issues = [];\n\t\tfor (const key of REQUIRED_ENVELOPE_KEYS) if (!(key in meta)) issues.push({\n\t\t\tkey,\n\t\t\tproblem: \"missing\"\n\t\t});\n\t\tconst parsed = buildSchemas2026().RequestMetaEnvelopeSchema.safeParse(meta);\n\t\tif (!parsed.success) for (const issue of parsed.error.issues) {\n\t\t\tconst path = issue.path.map(String);\n\t\t\tconst key = path.length > 0 ? path.join(\".\") : \"_meta\";\n\t\t\tif (path.length === 1 && issues.some((existing) => existing.key === key && existing.problem === \"missing\")) continue;\n\t\t\tissues.push({\n\t\t\t\tkey,\n\t\t\t\tproblem: issue.message\n\t\t\t});\n\t\t}\n\t\treturn issues;\n\t},\n\tprojectCallToolResult: (result) => appendTextFallbackForNonObject(result),\n\tinputRequestSchema: getInputRequestSchema2026,\n\tdecodeResult(method, raw) {\n\t\tif (!isPlainObject$2(raw)) return {\n\t\t\tkind: \"invalid\",\n\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: not an object`, { method })\n\t\t};\n\t\tconst rawResultType = raw[\"resultType\"];\n\t\tif (rawResultType === void 0) return {\n\t\t\tkind: \"invalid\",\n\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`, {\n\t\t\t\tmethod,\n\t\t\t\tviolation: \"missing-resultType\"\n\t\t\t})\n\t\t};\n\t\tif (typeof rawResultType !== \"string\") return {\n\t\t\tkind: \"invalid\",\n\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: non-string resultType`, {\n\t\t\t\tmethod,\n\t\t\t\tresultType: rawResultType\n\t\t\t})\n\t\t};\n\t\tif (rawResultType === \"input_required\") {\n\t\t\tconst rawInputRequests = raw[\"inputRequests\"];\n\t\t\tconst inputRequests = isPlainObject$2(rawInputRequests) ? rawInputRequests : {};\n\t\t\tconst requestState = raw[\"requestState\"];\n\t\t\tif (Object.keys(inputRequests).length === 0 && typeof requestState !== \"string\") return {\n\t\t\t\tkind: \"invalid\",\n\t\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`, {\n\t\t\t\t\tmethod,\n\t\t\t\t\tviolation: \"input-required-missing-both\"\n\t\t\t\t})\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tkind: \"input_required\",\n\t\t\t\tinputRequests,\n\t\t\t\t...typeof requestState === \"string\" && { requestState }\n\t\t\t};\n\t\t}\n\t\tif (rawResultType !== \"complete\") return {\n\t\t\tkind: \"invalid\",\n\t\t\terror: new SdkError(SdkErrorCode.UnsupportedResultType, `Unsupported result type '${rawResultType}' for ${method}`, {\n\t\t\t\tresultType: rawResultType,\n\t\t\t\tmethod\n\t\t\t})\n\t\t};\n\t\tconst wireResultSchemas = getWireResultSchemas();\n\t\tconst wireSchema = Object.hasOwn(wireResultSchemas, method) ? wireResultSchemas[method] : void 0;\n\t\tif (wireSchema !== void 0) {\n\t\t\tconst parsed = wireSchema.safeParse(raw);\n\t\t\tif (!parsed.success) return {\n\t\t\t\tkind: \"invalid\",\n\t\t\t\terror: new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${method}: ${parsed.error}`, { method })\n\t\t\t};\n\t\t}\n\t\tconst lifted = { ...raw };\n\t\tdelete lifted[\"resultType\"];\n\t\treturn {\n\t\t\tkind: \"complete\",\n\t\t\tresult: lifted\n\t\t};\n\t},\n\tencodeResult(method, result, serverInfo) {\n\t\treturn stampServerInfoMeta(fillCacheFields(method, stampResultType(method, enforceDeletedFields(method, result))), serverInfo);\n\t},\n\tencodeErrorCode: (code) => code === -32002 ? -32602 : code,\n\tcheckInboundEnvelope(material) {\n\t\tif (material.envelope === void 0) return \"Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)\";\n\t\tconst parsed = buildSchemas2026().RequestMetaEnvelopeSchema.safeParse(material.envelope);\n\t\tif (!parsed.success) return `Invalid _meta envelope for protocol revision 2026-07-28: ${parsed.error.issues.map((issue) => issue.message).join(\"; \")}`;\n\t}\n};\n/** Wire-true result wrappers consulted by decode step 2, keyed by method —\n* built once through the era's schema memo on the first decode. */\nlet wireResultSchemasMemo;\nfunction getWireResultSchemas() {\n\tif (wireResultSchemasMemo) return wireResultSchemasMemo;\n\tconst s = buildSchemas2026();\n\twireResultSchemasMemo = {\n\t\t\"tools/call\": s.CallToolResultSchema,\n\t\t\"tools/list\": s.ListToolsResultSchema,\n\t\t\"prompts/get\": s.GetPromptResultSchema,\n\t\t\"prompts/list\": s.ListPromptsResultSchema,\n\t\t\"resources/list\": s.ListResourcesResultSchema,\n\t\t\"resources/templates/list\": s.ListResourceTemplatesResultSchema,\n\t\t\"resources/read\": s.ReadResourceResultSchema,\n\t\t\"completion/complete\": s.CompleteResultSchema,\n\t\t\"server/discover\": s.DiscoverResultSchema\n\t};\n\treturn wireResultSchemasMemo;\n}\n/**\n* Forces the lazy wire-result wrapper map (and, through it, the era's schema\n* memo). Warm-up hook for `preloadSchemas()` — no-op once the map exists.\n*/\nfunction warmWireResultSchemas2026() {\n\tgetWireResultSchemas();\n}\n\n//#endregion\n//#region ../core-internal/src/wire/codec.ts\n/**\n* The modern wire revision literal. Internal only — deliberately NOT a public\n* constant (G-D2-4: no public modern-version constant ships before era-aware\n* list semantics exist).\n*/\nconst MODERN_WIRE_REVISION = \"2026-07-28\";\n/**\n* Era resolution, many-to-one (Q1-SD1): every modern-era revision\n* (`>= 2026-07-28`) → the 2026-era codec; every legacy revision (the five\n* `SUPPORTED_PROTOCOL_VERSIONS`) and `undefined`/unknown → the 2025-era\n* codec (the DV-13 default posture — hand-constructed instances and\n* unclassified traffic are legacy-era). This is the same era predicate the\n* rest of the SDK uses ({@link isModernProtocolVersion}); a pinned modern\n* revision other than the literal '2026-07-28' must still resolve modern.\n*/\nfunction codecForVersion(version) {\n\treturn version !== void 0 && isModernProtocolVersion(version) ? rev2026Codec : rev2025Codec;\n}\n/**\n* The wire era an edge classification names (Q2 — produced at the\n* transport/entry edge; this layer only CONSUMES it). The dispatch funnel no\n* longer resolves a codec FROM the classification: era is instance state, and\n* a classified inbound message is VALIDATED against the instance era — a\n* mismatch is an entry/routing error, never a per-message era switch. The\n* exact `revision` wins over the coarse era flag when both are present.\n*/\nfunction classifiedWireEra(classification) {\n\tif (classification.revision !== void 0) return codecForVersion(classification.revision).era;\n\treturn classification.era === \"modern\" ? rev2026Codec.era : rev2025Codec.era;\n}\n/**\n* The derived spec-method universe: the union of every codec registry. A\n* method in this set is era-gated at dispatch and send time; a method outside\n* it is a consumer-owned extension method (era-blind, schema-explicit).\n* Derived from the registries — never hand-curated (the LEGACY_ONLY_METHODS\n* table class is exactly what registry membership replaces).\n*/\nfunction isSpecRequestMethod(method) {\n\treturn ALL_CODECS.some((codec) => codec.hasRequestMethod(method));\n}\nfunction isSpecNotificationMethod(method) {\n\treturn ALL_CODECS.some((codec) => codec.hasNotificationMethod(method));\n}\nconst ALL_CODECS = [rev2025Codec, rev2026Codec];\n\n//#endregion\n//#region ../core-internal/src/types/schemas.ts\nvar schemas_exports = /* @__PURE__ */ __exportAll({\n\tAnnotationsSchema: () => AnnotationsSchema,\n\tAudioContentSchema: () => AudioContentSchema,\n\tBaseMetadataSchema: () => BaseMetadataSchema,\n\tBaseRequestParamsSchema: () => BaseRequestParamsSchema,\n\tBlobResourceContentsSchema: () => BlobResourceContentsSchema,\n\tBooleanSchemaSchema: () => BooleanSchemaSchema,\n\tCallToolRequestParamsSchema: () => CallToolRequestParamsSchema,\n\tCallToolRequestSchema: () => CallToolRequestSchema,\n\tCallToolResultSchema: () => CallToolResultSchema,\n\tCancelTaskRequestSchema: () => CancelTaskRequestSchema,\n\tCancelTaskResultSchema: () => CancelTaskResultSchema,\n\tCancelledNotificationParamsSchema: () => CancelledNotificationParamsSchema,\n\tCancelledNotificationSchema: () => CancelledNotificationSchema,\n\tClientCapabilitiesSchema: () => ClientCapabilitiesSchema,\n\tClientNotificationSchema: () => ClientNotificationSchema,\n\tClientRequestSchema: () => ClientRequestSchema,\n\tClientResultSchema: () => ClientResultSchema,\n\tClientTasksCapabilitySchema: () => ClientTasksCapabilitySchema,\n\tCompatibilityCallToolResultSchema: () => CompatibilityCallToolResultSchema,\n\tCompleteRequestParamsSchema: () => CompleteRequestParamsSchema,\n\tCompleteRequestSchema: () => CompleteRequestSchema,\n\tCompleteResultSchema: () => CompleteResultSchema,\n\tContentBlockSchema: () => ContentBlockSchema,\n\tCreateMessageRequestParamsSchema: () => CreateMessageRequestParamsSchema,\n\tCreateMessageRequestSchema: () => CreateMessageRequestSchema,\n\tCreateMessageResultSchema: () => CreateMessageResultSchema,\n\tCreateMessageResultWithToolsSchema: () => CreateMessageResultWithToolsSchema,\n\tCreateTaskResultSchema: () => CreateTaskResultSchema,\n\tCursorSchema: () => CursorSchema,\n\tDiscoverRequestSchema: () => DiscoverRequestSchema,\n\tDiscoverResultSchema: () => DiscoverResultSchema,\n\tElicitRequestFormParamsSchema: () => ElicitRequestFormParamsSchema,\n\tElicitRequestParamsSchema: () => ElicitRequestParamsSchema,\n\tElicitRequestSchema: () => ElicitRequestSchema,\n\tElicitRequestURLParamsSchema: () => ElicitRequestURLParamsSchema,\n\tElicitResultSchema: () => ElicitResultSchema,\n\tElicitationCompleteNotificationParamsSchema: () => ElicitationCompleteNotificationParamsSchema,\n\tElicitationCompleteNotificationSchema: () => ElicitationCompleteNotificationSchema,\n\tEmbeddedResourceSchema: () => EmbeddedResourceSchema,\n\tEmptyResultSchema: () => EmptyResultSchema,\n\tEnumSchemaSchema: () => EnumSchemaSchema,\n\tGetPromptRequestParamsSchema: () => GetPromptRequestParamsSchema,\n\tGetPromptRequestSchema: () => GetPromptRequestSchema,\n\tGetPromptResultSchema: () => GetPromptResultSchema,\n\tGetTaskPayloadRequestSchema: () => GetTaskPayloadRequestSchema,\n\tGetTaskPayloadResultSchema: () => GetTaskPayloadResultSchema,\n\tGetTaskRequestSchema: () => GetTaskRequestSchema,\n\tGetTaskResultSchema: () => GetTaskResultSchema,\n\tIconSchema: () => IconSchema,\n\tIconsSchema: () => IconsSchema,\n\tImageContentSchema: () => ImageContentSchema,\n\tImplementationSchema: () => ImplementationSchema,\n\tInitializeRequestParamsSchema: () => InitializeRequestParamsSchema,\n\tInitializeRequestSchema: () => InitializeRequestSchema,\n\tInitializeResultSchema: () => InitializeResultSchema,\n\tInitializedNotificationSchema: () => InitializedNotificationSchema,\n\tJSONArraySchema: () => JSONArraySchema,\n\tJSONObjectSchema: () => JSONObjectSchema,\n\tJSONRPCErrorResponseSchema: () => JSONRPCErrorResponseSchema,\n\tJSONRPCMessageSchema: () => JSONRPCMessageSchema,\n\tJSONRPCNotificationSchema: () => JSONRPCNotificationSchema,\n\tJSONRPCRequestSchema: () => JSONRPCRequestSchema,\n\tJSONRPCResponseSchema: () => JSONRPCResponseSchema,\n\tJSONRPCResultResponseSchema: () => JSONRPCResultResponseSchema,\n\tJSONValueSchema: () => JSONValueSchema,\n\tLegacyTitledEnumSchemaSchema: () => LegacyTitledEnumSchemaSchema,\n\tListChangedOptionsBaseSchema: () => ListChangedOptionsBaseSchema,\n\tListPromptsRequestSchema: () => ListPromptsRequestSchema,\n\tListPromptsResultSchema: () => ListPromptsResultSchema,\n\tListResourceTemplatesRequestSchema: () => ListResourceTemplatesRequestSchema,\n\tListResourceTemplatesResultSchema: () => ListResourceTemplatesResultSchema,\n\tListResourcesRequestSchema: () => ListResourcesRequestSchema,\n\tListResourcesResultSchema: () => ListResourcesResultSchema,\n\tListRootsRequestSchema: () => ListRootsRequestSchema,\n\tListRootsResultSchema: () => ListRootsResultSchema,\n\tListTasksRequestSchema: () => ListTasksRequestSchema,\n\tListTasksResultSchema: () => ListTasksResultSchema,\n\tListToolsRequestSchema: () => ListToolsRequestSchema,\n\tListToolsResultSchema: () => ListToolsResultSchema,\n\tLoggingLevelSchema: () => LoggingLevelSchema,\n\tLoggingMessageNotificationParamsSchema: () => LoggingMessageNotificationParamsSchema,\n\tLoggingMessageNotificationSchema: () => LoggingMessageNotificationSchema,\n\tModelHintSchema: () => ModelHintSchema,\n\tModelPreferencesSchema: () => ModelPreferencesSchema,\n\tMultiSelectEnumSchemaSchema: () => MultiSelectEnumSchemaSchema,\n\tNotificationSchema: () => NotificationSchema,\n\tNotificationsParamsSchema: () => NotificationsParamsSchema,\n\tNumberSchemaSchema: () => NumberSchemaSchema,\n\tPaginatedRequestParamsSchema: () => PaginatedRequestParamsSchema,\n\tPaginatedRequestSchema: () => PaginatedRequestSchema,\n\tPaginatedResultSchema: () => PaginatedResultSchema,\n\tPingRequestSchema: () => PingRequestSchema,\n\tPrimitiveSchemaDefinitionSchema: () => PrimitiveSchemaDefinitionSchema,\n\tProgressNotificationParamsSchema: () => ProgressNotificationParamsSchema,\n\tProgressNotificationSchema: () => ProgressNotificationSchema,\n\tProgressSchema: () => ProgressSchema,\n\tProgressTokenSchema: () => ProgressTokenSchema,\n\tPromptArgumentSchema: () => PromptArgumentSchema,\n\tPromptListChangedNotificationSchema: () => PromptListChangedNotificationSchema,\n\tPromptMessageSchema: () => PromptMessageSchema,\n\tPromptReferenceSchema: () => PromptReferenceSchema,\n\tPromptSchema: () => PromptSchema,\n\tReadResourceRequestParamsSchema: () => ReadResourceRequestParamsSchema,\n\tReadResourceRequestSchema: () => ReadResourceRequestSchema,\n\tReadResourceResultSchema: () => ReadResourceResultSchema,\n\tRelatedTaskMetadataSchema: () => RelatedTaskMetadataSchema,\n\tRequestIdSchema: () => RequestIdSchema,\n\tRequestMetaSchema: () => RequestMetaSchema,\n\tRequestSchema: () => RequestSchema,\n\tResourceContentsSchema: () => ResourceContentsSchema,\n\tResourceLinkSchema: () => ResourceLinkSchema,\n\tResourceListChangedNotificationSchema: () => ResourceListChangedNotificationSchema,\n\tResourceRequestParamsSchema: () => ResourceRequestParamsSchema,\n\tResourceSchema: () => ResourceSchema,\n\tResourceTemplateReferenceSchema: () => ResourceTemplateReferenceSchema,\n\tResourceTemplateSchema: () => ResourceTemplateSchema,\n\tResourceUpdatedNotificationParamsSchema: () => ResourceUpdatedNotificationParamsSchema,\n\tResourceUpdatedNotificationSchema: () => ResourceUpdatedNotificationSchema,\n\tResultMetaObjectSchema: () => ResultMetaObjectSchema,\n\tResultSchema: () => ResultSchema,\n\tRoleSchema: () => RoleSchema,\n\tRootSchema: () => RootSchema,\n\tRootsListChangedNotificationSchema: () => RootsListChangedNotificationSchema,\n\tSamplingContentSchema: () => SamplingContentSchema,\n\tSamplingMessageContentBlockSchema: () => SamplingMessageContentBlockSchema,\n\tSamplingMessageSchema: () => SamplingMessageSchema,\n\tServerCapabilitiesSchema: () => ServerCapabilitiesSchema,\n\tServerNotificationSchema: () => ServerNotificationSchema,\n\tServerRequestSchema: () => ServerRequestSchema,\n\tServerResultSchema: () => ServerResultSchema,\n\tServerTasksCapabilitySchema: () => ServerTasksCapabilitySchema,\n\tSetLevelRequestParamsSchema: () => SetLevelRequestParamsSchema,\n\tSetLevelRequestSchema: () => SetLevelRequestSchema,\n\tSingleSelectEnumSchemaSchema: () => SingleSelectEnumSchemaSchema,\n\tStringSchemaSchema: () => StringSchemaSchema,\n\tSubscribeRequestParamsSchema: () => SubscribeRequestParamsSchema,\n\tSubscribeRequestSchema: () => SubscribeRequestSchema,\n\tSubscriptionFilterSchema: () => SubscriptionFilterSchema,\n\tSubscriptionsAcknowledgedNotificationParamsSchema: () => SubscriptionsAcknowledgedNotificationParamsSchema,\n\tSubscriptionsAcknowledgedNotificationSchema: () => SubscriptionsAcknowledgedNotificationSchema,\n\tSubscriptionsListenRequestParamsSchema: () => SubscriptionsListenRequestParamsSchema,\n\tSubscriptionsListenRequestSchema: () => SubscriptionsListenRequestSchema,\n\tSubscriptionsListenResultMetaSchema: () => SubscriptionsListenResultMetaSchema,\n\tSubscriptionsListenResultSchema: () => SubscriptionsListenResultSchema,\n\tTaskAugmentedRequestParamsSchema: () => TaskAugmentedRequestParamsSchema,\n\tTaskCreationParamsSchema: () => TaskCreationParamsSchema,\n\tTaskMetadataSchema: () => TaskMetadataSchema,\n\tTaskSchema: () => TaskSchema,\n\tTaskStatusNotificationParamsSchema: () => TaskStatusNotificationParamsSchema,\n\tTaskStatusNotificationSchema: () => TaskStatusNotificationSchema,\n\tTaskStatusSchema: () => TaskStatusSchema,\n\tTextContentSchema: () => TextContentSchema,\n\tTextResourceContentsSchema: () => TextResourceContentsSchema,\n\tTitledMultiSelectEnumSchemaSchema: () => TitledMultiSelectEnumSchemaSchema,\n\tTitledSingleSelectEnumSchemaSchema: () => TitledSingleSelectEnumSchemaSchema,\n\tToolAnnotationsSchema: () => ToolAnnotationsSchema,\n\tToolChoiceSchema: () => ToolChoiceSchema,\n\tToolExecutionSchema: () => ToolExecutionSchema,\n\tToolListChangedNotificationSchema: () => ToolListChangedNotificationSchema,\n\tToolResultContentSchema: () => ToolResultContentSchema,\n\tToolSchema: () => ToolSchema,\n\tToolUseContentSchema: () => ToolUseContentSchema,\n\tUnsubscribeRequestParamsSchema: () => UnsubscribeRequestParamsSchema,\n\tUnsubscribeRequestSchema: () => UnsubscribeRequestSchema,\n\tUntitledMultiSelectEnumSchemaSchema: () => UntitledMultiSelectEnumSchemaSchema,\n\tUntitledSingleSelectEnumSchemaSchema: () => UntitledSingleSelectEnumSchemaSchema\n});\n\n//#endregion\n//#region ../core-internal/src/types/guards.ts\n/**\n* Validates and parses an unknown value as a JSON-RPC message.\n*\n* Use this to validate incoming messages in custom transport implementations.\n* Throws if the value does not conform to the JSON-RPC message schema.\n*\n* @param value - The value to validate (typically a parsed JSON object).\n* @returns The validated {@linkcode JSONRPCMessage}.\n* @throws If validation fails.\n*/\nfunction parseJSONRPCMessage(value) {\n\treturn JSONRPCMessageSchema.parse(value);\n}\nconst isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;\nconst isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;\n/**\n* Checks if a value is a valid {@linkcode JSONRPCResultResponse}.\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode JSONRPCResultResponse}, false otherwise.\n*/\nconst isJSONRPCResultResponse = (value) => JSONRPCResultResponseSchema.safeParse(value).success;\n/**\n* Checks if a value is a valid {@linkcode JSONRPCErrorResponse}.\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode JSONRPCErrorResponse}, false otherwise.\n*/\nconst isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;\n/**\n* Checks if a value is a valid {@linkcode JSONRPCResponse} (either a result or error response).\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode JSONRPCResponse}, false otherwise.\n*/\nconst isJSONRPCResponse = (value) => JSONRPCResponseSchema.safeParse(value).success;\n/**\n* Checks if a value is a valid {@linkcode CallToolResult}.\n*\n* This is a consumer-side VALUE check against the neutral model, not a wire\n* validator: a raw wire object that additionally carries wire-only members\n* (e.g. `resultType`) still passes through the loose index signature. Use a\n* transport-level parse to validate raw wire traffic.\n*\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode CallToolResult}, false otherwise.\n*/\nconst isCallToolResult = (value) => {\n\tif (typeof value !== \"object\" || value === null || value.content === void 0) return false;\n\treturn CallToolResultSchema.safeParse(value).success;\n};\n/**\n* Checks whether a value is an input-required result (protocol revision\n* 2026-07-28): the multi-round-trip return shape discriminated by\n* `resultType: 'input_required'`.\n*\n* This is a discriminator check, not a full validator — the at-least-one rule\n* (`inputRequests` or `requestState`) is enforced by the `inputRequired()`\n* builder and re-checked by the server seam for hand-built values.\n*\n* @param value - The value to check.\n* @returns True if the value carries the `input_required` discriminator.\n*/\nconst isInputRequiredResult = (value) => typeof value === \"object\" && value !== null && !Array.isArray(value) && value.resultType === \"input_required\";\n/**\n* Checks if a value is a valid {@linkcode TaskAugmentedRequestParams}.\n* @param value - The value to check.\n*\n* @returns True if the value is a valid {@linkcode TaskAugmentedRequestParams}, false otherwise.\n*\n* @deprecated Recognizes 2025-11-25 task wire vocabulary, which has no SDK\n* runtime; kept importable for interoperability only.\n*/\nconst isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;\nconst isInitializeRequest = (value) => InitializeRequestSchema.safeParse(value).success;\nconst isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;\nfunction assertCompleteRequestPrompt(request) {\n\tif (request.params.ref.type !== \"ref/prompt\") throw new TypeError(`Expected CompleteRequestPrompt, but got ${request.params.ref.type}`);\n}\nfunction assertCompleteRequestResourceTemplate(request) {\n\tif (request.params.ref.type !== \"ref/resource\") throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${request.params.ref.type}`);\n}\n\n//#endregion\n//#region ../core-internal/src/shared/mcpParamHeaders.ts\n/** The fixed prefix every custom-parameter header carries. */\nconst MCP_PARAM_HEADER_PREFIX = \"Mcp-Param-\";\n/** The schema-extension property name a tool's `inputSchema` carries. */\nconst X_MCP_HEADER_KEY = \"x-mcp-header\";\n/**\n* RFC 9110 §5.1 `token` syntax (`1*tchar`). Rejects empty, space, control\n* characters (including CR/LF), and the listed delimiters.\n*/\nconst RFC9110_TOKEN = /^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$/;\n/**\n* JSON Schema `type` values the spec admits on an `x-mcp-header` property.\n*\n* The spec text names `integer`, `string`, `boolean` and explicitly excludes\n* `number`. The published conformance referee at the pinned release ships its\n* `http-custom-headers` scenario with two `type: \"number\"` `x-mcp-header`\n* parameters and expects the client to mirror them, so `number` is accepted\n* here so that the conformance gate passes; the discrepancy is tracked\n* upstream. Everything else (`object`, `array`, `null`, absent) is rejected.\n*/\nconst PERMITTED_X_MCP_HEADER_TYPES = new Set([\n\t\"string\",\n\t\"integer\",\n\t\"boolean\",\n\t\"number\"\n]);\n/**\n* Scan a tool's JSON-serialized `inputSchema` for `x-mcp-header` declarations\n* and validate every constraint the spec places on them. Returns either the\n* collected declarations (possibly empty) or the first violated constraint.\n*\n* The walk descends through `properties` at any depth (the spec's \"any nesting\n* depth\" clause). The static-reachability MUST is enforced as a structural\n* sweep: every position the chain MUST NOT pass through (`items`/\n* `additionalProperties`, `oneOf`/`anyOf`/`allOf`/`not`, `if`/`then`/`else`,\n* `$defs`, `$ref` targets within `$defs`) is visited too, and an\n* `x-mcp-header` found anywhere on that path invalidates the schema — \"an\n* annotation anywhere else makes the tool definition invalid\".\n*/\nfunction scanXMcpHeaderDeclarations(inputSchema) {\n\tconst declarations = [];\n\tconst seenLower = /* @__PURE__ */ new Map();\n\tconst visit = (node, path, reachable) => {\n\t\tif (node === null || typeof node !== \"object\") return void 0;\n\t\tconst schema = node;\n\t\tif (X_MCP_HEADER_KEY in schema) {\n\t\t\tif (!reachable || path.length === 0) return `${pathName(path)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;\n\t\t\tconst raw = schema[X_MCP_HEADER_KEY];\n\t\t\tif (typeof raw !== \"string\" || raw.length === 0) return `${pathName(path)}: x-mcp-header MUST be a non-empty string`;\n\t\t\tif (!RFC9110_TOKEN.test(raw)) return `${pathName(path)}: x-mcp-header '${raw}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;\n\t\t\tconst type = typeof schema.type === \"string\" ? schema.type : void 0;\n\t\t\tif (type === void 0 || !PERMITTED_X_MCP_HEADER_TYPES.has(type)) return `${pathName(path)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${type ?? \"<none>\"}`;\n\t\t\tconst lower = raw.toLowerCase();\n\t\t\tconst prior = seenLower.get(lower);\n\t\t\tif (prior !== void 0) return `x-mcp-header '${raw}' is not case-insensitively unique (also declared as '${prior}')`;\n\t\t\tseenLower.set(lower, raw);\n\t\t\tdeclarations.push({\n\t\t\t\tpath,\n\t\t\t\theaderName: raw,\n\t\t\t\ttype\n\t\t\t});\n\t\t}\n\t\tconst properties = schema.properties;\n\t\tif (properties !== null && typeof properties === \"object\") for (const [key, child] of Object.entries(properties)) {\n\t\t\tconst fault$1 = visit(child, [...path, key], reachable);\n\t\t\tif (fault$1 !== void 0) return fault$1;\n\t\t}\n\t\tfor (const k of NON_REACHABLE_SUBSCHEMA_KEYWORDS) {\n\t\t\tconst sub = schema[k];\n\t\t\tif (sub === void 0) continue;\n\t\t\tconst branches = Array.isArray(sub) ? sub : sub !== null && typeof sub === \"object\" && OBJECT_VALUED_SUBSCHEMA_KEYWORDS.has(k) ? Object.values(sub) : [sub];\n\t\t\tfor (const branch of branches) {\n\t\t\t\tconst fault$1 = visit(branch, [...path, `<${k}>`], false);\n\t\t\t\tif (fault$1 !== void 0) return fault$1;\n\t\t\t}\n\t\t}\n\t};\n\tconst fault = visit(inputSchema, [], true);\n\treturn fault === void 0 ? {\n\t\tvalid: true,\n\t\tdeclarations\n\t} : {\n\t\tvalid: false,\n\t\treason: fault\n\t};\n}\n/**\n* JSON Schema keywords whose subschemas the SEP-2243 static-reachability\n* constraint excludes from the `properties`-only chain. An `x-mcp-header`\n* found under any of these invalidates the tool definition.\n*/\nconst NON_REACHABLE_SUBSCHEMA_KEYWORDS = [\n\t\"items\",\n\t\"prefixItems\",\n\t\"contains\",\n\t\"additionalProperties\",\n\t\"unevaluatedProperties\",\n\t\"unevaluatedItems\",\n\t\"propertyNames\",\n\t\"patternProperties\",\n\t\"dependentSchemas\",\n\t\"oneOf\",\n\t\"anyOf\",\n\t\"allOf\",\n\t\"not\",\n\t\"if\",\n\t\"then\",\n\t\"else\",\n\t\"$defs\",\n\t\"definitions\"\n];\n/**\n* Subschema-carrying keywords whose value is a `name → subschema` object\n* (not a single subschema or array of subschemas). The visit branches over\n* `Object.values()` for these.\n*/\nconst OBJECT_VALUED_SUBSCHEMA_KEYWORDS = new Set([\n\t\"patternProperties\",\n\t\"dependentSchemas\",\n\t\"$defs\",\n\t\"definitions\"\n]);\nfunction pathName(path) {\n\treturn path.length === 0 ? \"<root>\" : path.join(\".\");\n}\nconst BASE64_SENTINEL_PREFIX = \"=?base64?\";\nconst BASE64_SENTINEL_SUFFIX = \"?=\";\n/**\n* Convert a primitive argument value to its string representation per the\n* spec's type-conversion rules: strings pass through, integers and numbers\n* become their decimal string, booleans become lowercase `'true'` / `'false'`.\n* Non-finite numbers and integers outside the safe range are refused (the\n* caller treats `undefined` as \"do not emit a header for this value\").\n*/\nfunction mcpParamPrimitiveToString(value) {\n\tif (typeof value === \"string\") return value;\n\tif (typeof value === \"boolean\") return value ? \"true\" : \"false\";\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isFinite(value)) return void 0;\n\t\tif (Number.isInteger(value) && !Number.isSafeInteger(value)) return void 0;\n\t\treturn String(value);\n\t}\n}\n/**\n* `true` when `s` cannot be safely represented as a plain ASCII HTTP field\n* value per RFC 9110 §5.5: it contains a byte outside `0x20–0x7E` / `0x09`, it\n* has leading or trailing whitespace (which field parsing strips), or it\n* already matches the Base64 sentinel pattern (the spec's \"to avoid ambiguity\"\n* rule).\n*/\nfunction needsBase64(s) {\n\tif (s.length === 0) return true;\n\tif (s.startsWith(BASE64_SENTINEL_PREFIX) && s.endsWith(BASE64_SENTINEL_SUFFIX)) return true;\n\tif (s !== s.trim()) return true;\n\tfor (let i = 0; i < s.length; i++) {\n\t\tconst c = s.codePointAt(i);\n\t\tif (c === 9 || c >= 32 && c <= 126) continue;\n\t\treturn true;\n\t}\n\treturn false;\n}\nfunction utf8ToBase64(s) {\n\tconst bytes = new TextEncoder().encode(s);\n\tlet bin = \"\";\n\tfor (const b of bytes) bin += String.fromCodePoint(b);\n\treturn btoa(bin);\n}\n/**\n* Encode a string value as an HTTP field value per the spec's value-encoding\n* rules: a value that is already a safe plain-ASCII field value is passed\n* through unchanged; anything else is wrapped as `=?base64?{b64-of-utf8}?=`.\n*/\nfunction encodeMcpParamValue(value) {\n\treturn needsBase64(value) ? `${BASE64_SENTINEL_PREFIX}${utf8ToBase64(value)}${BASE64_SENTINEL_SUFFIX}` : value;\n}\nfunction valueAtPath(root, path) {\n\tlet node = root;\n\tfor (const key of path) {\n\t\tif (node === null || typeof node !== \"object\") return void 0;\n\t\tnode = node[key];\n\t}\n\treturn node;\n}\n/**\n* Build the `Mcp-Param-{Name}` headers for one `tools/call` from a scan of the\n* tool's `inputSchema` and the call's `arguments`. A declaration whose value is\n* `null` or absent in `arguments` is omitted (the spec's \"client MUST omit the\n* header\" rows); a value that is not a primitive of the declared kind is\n* omitted rather than emitted malformed.\n*/\nfunction buildMcpParamHeaders(declarations, args) {\n\tconst out = {};\n\tfor (const decl of declarations) {\n\t\tconst raw = valueAtPath(args, decl.path);\n\t\tif (raw === void 0 || raw === null) continue;\n\t\tconst stringValue = mcpParamPrimitiveToString(raw);\n\t\tif (stringValue === void 0) continue;\n\t\tout[`${MCP_PARAM_HEADER_PREFIX}${decl.headerName}`] = encodeMcpParamValue(stringValue);\n\t}\n\treturn out;\n}\n\n//#endregion\n//#region ../core-internal/src/shared/inboundClassification.ts\n/**\n* The error code emitted for header/body cross-check mismatches: the\n* `MCP-Protocol-Version` header disagreeing with the body's envelope claim (or\n* with the body's classification), and the `Mcp-Method` header disagreeing\n* with the body method.\n*\n* `-32020` is the draft schema's `HEADER_MISMATCH` constant (the SEP-2243\n* `HeaderMismatch` code; the spec requires HTTP 400 for it), as also asserted\n* by the published conformance suite for header-validation failures. It has no\n* {@linkcode ProtocolErrorCode} member because it is not part of the 2025-era\n* wire vocabulary; the validation ladder is its only emitter.\n*/\nconst HEADER_MISMATCH_ERROR_CODE = -32020;\n/**\n* The inbound validation ladder, expressed as data rather than control flow.\n*\n* The edge rungs are evaluated by {@linkcode classifyInboundRequest}; the\n* dispatch rungs are evaluated by the protocol layer once the classified\n* message is injected into a per-request server instance (the era registry\n* gate, the envelope requiredness check, and per-method params validation).\n* The client-capability rung is evaluated by the HTTP entry itself,\n* pre-dispatch, on the validated envelope the classifier produced — see that\n* rung's rationale for the ordering caveat. The order is the precedence: a\n* request that fails several rungs is answered by the earliest one.\n*/\nconst INBOUND_VALIDATION_LADDER = [\n\t{\n\t\trung: \"http-method\",\n\t\torder: 1,\n\t\tevaluatedAt: \"edge\",\n\t\tcodes: [-32e3],\n\t\tconformance: [],\n\t\trationale: \"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read.\"\n\t},\n\t{\n\t\trung: \"jsonrpc-shape\",\n\t\torder: 2,\n\t\tevaluatedAt: \"edge\",\n\t\tcodes: [ProtocolErrorCode.InvalidRequest],\n\t\tconformance: [\"server-stateless\"],\n\t\trationale: \"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic.\"\n\t},\n\t{\n\t\trung: \"era-classification\",\n\t\torder: 3,\n\t\tevaluatedAt: \"edge\",\n\t\tcodes: [HEADER_MISMATCH_ERROR_CODE, ProtocolErrorCode.UnsupportedProtocolVersion],\n\t\tconformance: [\n\t\t\t\"server-stateless\",\n\t\t\t\"http-header-validation\",\n\t\t\t\"http-custom-header-server-validation\"\n\t\t],\n\t\trationale: \"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions.\"\n\t},\n\t{\n\t\trung: \"envelope\",\n\t\torder: 4,\n\t\tevaluatedAt: \"edge\",\n\t\tcodes: [ProtocolErrorCode.InvalidParams],\n\t\tconformance: [\"server-stateless\"],\n\t\trationale: \"A present envelope claim with a malformed envelope — and a missing envelope on a request whose protocol-version header names a modern revision — is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400.\"\n\t},\n\t{\n\t\trung: \"method-registry\",\n\t\torder: 5,\n\t\tevaluatedAt: \"dispatch\",\n\t\tcodes: [ProtocolErrorCode.MethodNotFound],\n\t\tconformance: [\"server-stateless\"],\n\t\trationale: \"Method existence outranks parameter validity: a method absent from the negotiated revision’s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at.\"\n\t},\n\t{\n\t\trung: \"request-params\",\n\t\torder: 6,\n\t\tevaluatedAt: \"dispatch\",\n\t\tcodes: [ProtocolErrorCode.InvalidParams],\n\t\tconformance: [],\n\t\trationale: \"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table.\"\n\t},\n\t{\n\t\trung: \"standard-header-validation\",\n\t\torder: 7,\n\t\tevaluatedAt: \"pre-dispatch\",\n\t\tcodes: [HEADER_MISMATCH_ERROR_CODE],\n\t\tconformance: [\"http-header-validation\"],\n\t\trationale: \"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers — presence, sentinel decoding, and `Mcp-Name` ↔ body cross-check — are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier’s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5–6) are consulted.\"\n\t},\n\t{\n\t\trung: \"client-capabilities\",\n\t\torder: 8,\n\t\tevaluatedAt: \"pre-dispatch\",\n\t\tcodes: [ProtocolErrorCode.MissingRequiredClientCapability],\n\t\tconformance: [\"server-stateless\"],\n\t\trationale: \"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced — pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable.\"\n\t},\n\t{\n\t\trung: \"param-header-validation\",\n\t\torder: 9,\n\t\tevaluatedAt: \"pre-dispatch\",\n\t\tcodes: [HEADER_MISMATCH_ERROR_CODE],\n\t\tconformance: [\"http-custom-header-server-validation\"],\n\t\trationale: \"SEP-2243 `Mcp-Param-*` headers are validated against the named tool’s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung.\"\n\t}\n];\n/**\n* HTTP status for ladder-originated JSON-RPC error codes.\n*\n* Keyed on origin, not on the bare code: this table only applies to errors\n* the ladder (or a pre-handler protocol gate) produced. Errors produced by\n* request handlers — whatever their code — stay in-band on HTTP 200, and are\n* never mapped to an HTTP status by this table; in particular `-32603` and\n* domain-specific codes never become a blanket 500. The single exception is\n* `MissingRequiredClientCapability` (-32021) — see\n* {@linkcode httpStatusForErrorCode}.\n*\n* `-32602` (invalid params) deliberately has NO entry: the only invalid-params\n* rejection that maps to HTTP 400 is the classifier's own envelope rung\n* short-circuit, which carries its HTTP status directly. A dispatch- or\n* handler-produced invalid-params error is always in-band.\n*/\nconst LADDER_ERROR_HTTP_STATUS = {\n\t[ProtocolErrorCode.ParseError]: 400,\n\t[ProtocolErrorCode.InvalidRequest]: 400,\n\t[ProtocolErrorCode.MethodNotFound]: 404,\n\t[ProtocolErrorCode.UnsupportedProtocolVersion]: 400,\n\t[ProtocolErrorCode.MissingRequiredClientCapability]: 400,\n\t[HEADER_MISMATCH_ERROR_CODE]: 400\n};\n\n//#endregion\n//#region ../core-internal/src/util/schema.ts\n/**\n* Internal Zod schema utilities for protocol handling.\n* These are used internally by the SDK for protocol message validation.\n*/\n/**\n* Parses data against a Zod schema (synchronous).\n* Returns a discriminated union with success/error.\n*/\nfunction parseSchema(schema, data) {\n\treturn z.safeParse(schema, data);\n}\n/**\n* Union of the declared shape keys across several Zod object schemas.\n*/\nfunction shapeKeys(schemas) {\n\treturn new Set(schemas.flatMap((schema) => Object.keys(schema.shape)));\n}\n\n//#endregion\n//#region ../core-internal/src/util/standardSchema.ts\n/**\n* Standard Schema utilities for user-provided schemas.\n* Supports Zod v4, Valibot, ArkType, and other Standard Schema implementations.\n* @see https://standardschema.dev\n*/\nfunction isStandardSchema(schema) {\n\tif (schema == null) return false;\n\tconst schemaType = typeof schema;\n\tif (schemaType !== \"object\" && schemaType !== \"function\") return false;\n\tif (!(\"~standard\" in schema)) return false;\n\treturn typeof schema[\"~standard\"]?.validate === \"function\";\n}\nlet warnedZodFallback = false;\n/** JSON Schema draft targeted by every conversion; shared so pattern references above stay in lockstep. */\nconst JSON_SCHEMA_CONVERSION_TARGET = \"draft-2020-12\";\n/**\n* Converts a StandardSchema to JSON Schema for use as an MCP tool/prompt schema.\n*\n* MCP requires `type: \"object\"` at the root of tool `inputSchema` and prompt\n* argument schemas; `outputSchema` may have any JSON Schema root (SEP-2106).\n* Zod's discriminated unions emit `{oneOf: [...]}` without a top-level `type`,\n* so for `io: 'input'` this function defaults `type` to `\"object\"` when absent\n* and throws on an explicit non-object `type` (e.g. `z.string()`). For\n* `io: 'output'` a non-object root is returned as-is; the `\"object\"` default is\n* applied only when the root is provably object-shaped.\n*/\nfunction standardSchemaToJsonSchema(schema, io = \"input\") {\n\tconst std = schema[\"~standard\"];\n\tlet result;\n\tif (std.jsonSchema) result = std.jsonSchema[io]({ target: JSON_SCHEMA_CONVERSION_TARGET });\n\telse if (std.vendor === \"zod\") {\n\t\tif (!(\"_zod\" in schema)) throw new Error(\"Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().\");\n\t\tif (!warnedZodFallback) {\n\t\t\twarnedZodFallback = true;\n\t\t\tconsole.warn(\"[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.\");\n\t\t}\n\t\tresult = z.toJSONSchema(schema, {\n\t\t\ttarget: JSON_SCHEMA_CONVERSION_TARGET,\n\t\t\tio\n\t\t});\n\t} else throw new Error(`Schema library \"${std.vendor}\" does not implement StandardJSONSchemaV1 (\\`~standard.jsonSchema\\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);\n\tif (io === \"output\") {\n\t\tif (result.type !== void 0) return result;\n\t\treturn isProvablyObjectShapedRoot(result) ? {\n\t\t\ttype: \"object\",\n\t\t\t...result\n\t\t} : result;\n\t}\n\tif (result.type !== void 0 && result.type !== \"object\") throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(result.type)}). Wrap your schema in z.object({...}) or equivalent.`);\n\treturn {\n\t\ttype: \"object\",\n\t\t...result\n\t};\n}\n/**\n* A typeless JSON Schema root is \"provably object-shaped\" when either it carries object keywords\n* directly (`properties`/`patternProperties`/`additionalProperties`/`required`), or it is a\n* composition (`oneOf`/`anyOf`/`allOf`) whose every member is itself `type:'object'` or recursively\n* provably object-shaped (e.g. a nested `discriminatedUnion`). `$ref` is not followed. Used to\n* decide whether stamping `type:'object'` is safe (redundant-but-valid) versus self-contradictory.\n*/\nfunction isProvablyObjectShapedRoot(schema) {\n\tif (\"properties\" in schema || \"patternProperties\" in schema || \"additionalProperties\" in schema || \"required\" in schema) return true;\n\tfor (const key of [\n\t\t\"oneOf\",\n\t\t\"anyOf\",\n\t\t\"allOf\"\n\t]) {\n\t\tconst members = schema[key];\n\t\tif (Array.isArray(members) && members.length > 0) return members.every((m) => m !== null && typeof m === \"object\" && (m.type === \"object\" || isProvablyObjectShapedRoot(m)));\n\t}\n\treturn false;\n}\nfunction formatIssue(issue) {\n\tif (!issue.path?.length) return issue.message;\n\treturn `${issue.path.map((p) => String(typeof p === \"object\" ? p.key : p)).join(\".\")}: ${issue.message}`;\n}\nasync function validateStandardSchema(schema, data) {\n\tconst result = await schema[\"~standard\"].validate(data);\n\tif (result.issues && result.issues.length > 0) return {\n\t\tsuccess: false,\n\t\terror: result.issues.map((i) => formatIssue(i)).join(\", \")\n\t};\n\treturn {\n\t\tsuccess: true,\n\t\tdata: result.value\n\t};\n}\nfunction zodEmittedPattern(schema) {\n\tconst jsonSchema = z.toJSONSchema(schema, {\n\t\ttarget: JSON_SCHEMA_CONVERSION_TARGET,\n\t\tio: \"input\"\n\t});\n\treturn typeof jsonSchema.pattern === \"string\" ? jsonSchema.pattern : void 0;\n}\nconst DATETIME_FRACTION_DIGITS = /\\\\\\.\\\\d\\{(\\d+)\\}/;\nfunction datetimeReferenceSchemas(pattern) {\n\tconst fractionDigits = DATETIME_FRACTION_DIGITS.exec(pattern);\n\tconst precisions = [\n\t\tvoid 0,\n\t\t-1,\n\t\t0\n\t];\n\tif (fractionDigits) precisions.push(Number(fractionDigits[1]));\n\treturn [false, true].flatMap((local) => [false, true].flatMap((offset) => precisions.map((precision) => z.iso.datetime({\n\t\tlocal,\n\t\toffset,\n\t\tprecision\n\t}))));\n}\nfunction referencePatternsForFormat(format, pattern) {\n\tlet referenceSchemas;\n\tswitch (format) {\n\t\tcase \"email\":\n\t\t\treferenceSchemas = [z.email()];\n\t\t\tbreak;\n\t\tcase \"uri\":\n\t\t\treferenceSchemas = [z.url()];\n\t\t\tbreak;\n\t\tcase \"date\":\n\t\t\treferenceSchemas = [z.iso.date()];\n\t\t\tbreak;\n\t\tcase \"date-time\":\n\t\t\treferenceSchemas = datetimeReferenceSchemas(pattern);\n\t\t\tbreak;\n\t}\n\treturn new Set(referenceSchemas.map((schema) => zodEmittedPattern(schema)).filter((emitted) => emitted !== void 0));\n}\n/** Whether `pattern` is the library's own realization of `format` (droppable) rather than a user customization. */\nfunction isLibraryFormatPattern(format, pattern, vendor) {\n\tif (vendor !== \"zod\") return true;\n\treturn referencePatternsForFormat(format, pattern).has(pattern);\n}\n\n//#endregion\n//#region ../core-internal/src/shared/elicitation.ts\nfunction isJsonObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction convertStandardElicitationSchema(schema) {\n\ttry {\n\t\treturn standardSchemaToJsonSchema(schema, \"input\");\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tthrow new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema must describe an object with flat primitive properties: ${detail}`);\n\t}\n}\nconst ANNOTATION_ONLY_JSON_SCHEMA_KEYWORDS = new Set([\n\t\"$comment\",\n\t\"deprecated\",\n\t\"description\",\n\t\"examples\",\n\t\"readOnly\",\n\t\"title\",\n\t\"writeOnly\"\n]);\nfunction isAnnotationOnlyJsonSchemaKeyword(key) {\n\treturn ANNOTATION_ONLY_JSON_SCHEMA_KEYWORDS.has(key) || key.startsWith(\"x-\");\n}\nconst ROOT_KEYS = new Set([\"$schema\", ...Object.keys(ElicitRequestFormParamsSchema.shape.requestedSchema.shape)]);\nconst PROPERTY_KEYS_BY_TYPE = {\n\tstring: shapeKeys([\n\t\tStringSchemaSchema,\n\t\tUntitledSingleSelectEnumSchemaSchema,\n\t\tTitledSingleSelectEnumSchemaSchema,\n\t\tLegacyTitledEnumSchemaSchema\n\t]),\n\tnumber: shapeKeys([NumberSchemaSchema]),\n\tinteger: shapeKeys([NumberSchemaSchema]),\n\tboolean: shapeKeys([BooleanSchemaSchema]),\n\tarray: shapeKeys([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema])\n};\nconst SUPPORTED_STRING_FORMATS = new Set(StringSchemaSchema.shape.format.unwrap().options);\n/** Walks one property node: keeps grammar keys, drops the library format pattern, rejects unknown constraints. */\nfunction walkProperty(node, path, vendor, unsupported) {\n\tif (!isJsonObject(node)) return node;\n\tconst allowedKeys = typeof node.type === \"string\" && Object.hasOwn(PROPERTY_KEYS_BY_TYPE, node.type) ? PROPERTY_KEYS_BY_TYPE[node.type] : void 0;\n\tif (allowedKeys === void 0) return node;\n\tconst pruned = {};\n\tfor (const [key, value] of Object.entries(node)) if (allowedKeys.has(key) || isAnnotationOnlyJsonSchemaKeyword(key)) pruned[key] = value;\n\telse if (key === \"pattern\" && node.type === \"string\" && typeof node.format === \"string\") {\n\t\tif (!SUPPORTED_STRING_FORMATS.has(node.format)) pruned[key] = value;\n\t\telse if (typeof value !== \"string\" || !isLibraryFormatPattern(node.format, value, vendor)) unsupported.push(`${path}.${key}`);\n\t} else unsupported.push(`${path}.${key}`);\n\treturn pruned;\n}\n/** Walks the schema root: keeps the spec root keys, drops annotations, rejects the rest. */\nfunction walkRequestedSchema(converted, vendor) {\n\tconst pruned = {};\n\tconst unsupported = [];\n\tfor (const [key, value] of Object.entries(converted)) if (key === \"properties\" && isJsonObject(value)) pruned[key] = Object.fromEntries(Object.entries(value).map(([name, node]) => [name, walkProperty(node, `properties.${name}`, vendor, unsupported)]));\n\telse if (ROOT_KEYS.has(key)) pruned[key] = value;\n\telse if (!isAnnotationOnlyJsonSchemaKeyword(key)) unsupported.push(key);\n\tif (unsupported.length > 0) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${unsupported.join(\", \")}`);\n\treturn pruned;\n}\n/** Names the properties that fail value validation, instead of surfacing a raw union dump. */\nfunction describeUnsupportedProperties(pruned, fallback) {\n\tif (!isJsonObject(pruned.properties)) return fallback;\n\tconst offenders = Object.entries(pruned.properties).filter(([, node]) => !parseSchema(PrimitiveSchemaDefinitionSchema, node).success).map(([name]) => `properties.${name}`);\n\treturn offenders.length > 0 ? offenders.join(\", \") : fallback;\n}\nfunction findDroppedConstraintPaths(original, parsed, path = \"\") {\n\tif (Array.isArray(original) && Array.isArray(parsed)) return original.flatMap((item, index) => findDroppedConstraintPaths(item, parsed[index], `${path}[${index}]`));\n\tif (!isJsonObject(original) || !isJsonObject(parsed)) return [];\n\treturn Object.entries(original).flatMap(([key, value]) => {\n\t\tconst childPath = path ? `${path}.${key}` : key;\n\t\tif (!Object.prototype.hasOwnProperty.call(parsed, key)) return isAnnotationOnlyJsonSchemaKeyword(key) ? [] : [childPath];\n\t\treturn findDroppedConstraintPaths(value, parsed[key], childPath);\n\t});\n}\n/** Converts an authoring-friendly elicitation input into its wire-ready form. */\nfunction normalizeElicitInputParams(input) {\n\tif (!isStandardSchema(input.requestedSchema)) return {\n\t\t...input,\n\t\tmode: \"form\",\n\t\trequestedSchema: input.requestedSchema\n\t};\n\tconst vendor = input.requestedSchema[\"~standard\"].vendor;\n\tconst pruned = walkRequestedSchema(convertStandardElicitationSchema(input.requestedSchema), vendor);\n\tconst parsed = parseSchema(ElicitRequestFormParamsSchema.shape.requestedSchema, pruned);\n\tif (!parsed.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${describeUnsupportedProperties(pruned, parsed.error.message)}`);\n\tconst droppedConstraints = findDroppedConstraintPaths(pruned, parsed.data);\n\tif (droppedConstraints.length > 0) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${droppedConstraints.join(\", \")}`);\n\tconst danglingRequired = (parsed.data.required ?? []).filter((key) => !Object.prototype.hasOwnProperty.call(parsed.data.properties, key));\n\tif (danglingRequired.length > 0) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Elicitation requestedSchema lists required properties that are not defined in properties: ${danglingRequired.join(\", \")}`);\n\treturn {\n\t\t...input,\n\t\tmode: \"form\",\n\t\trequestedSchema: parsed.data\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/shared/inputRequired.ts\n/**\n* Authoring helpers for multi-round-trip requests (protocol revision\n* 2026-07-28).\n*\n* A handler for one of the multi-round-trip methods (`tools/call`,\n* `prompts/get`, `resources/read`) requests additional client input by\n* returning an {@linkcode InputRequiredResult} instead of a final result. The\n* helpers here build that return value and its embedded requests as NEUTRAL\n* values; only the 2026-07-28 wire codec maps them to/from the wire. The\n* 2025-era codec has no input-required vocabulary — on a 2025-era request the\n* server's legacy shim (on by default) fulfils the embedded requests as real\n* server→client requests and re-enters the handler, so the same return shape\n* serves both eras; `ServerOptions.inputRequired.legacyShim: false` restores\n* the pre-shim loud failure.\n*\n* There is no nominal brand: `resultType: 'input_required'` is the\n* discriminator, and hand-built result literals are equally legal — the\n* server seam re-checks the at-least-one rule for them.\n*/\nfunction buildInputRequired(spec) {\n\tconst hasInputRequests = spec.inputRequests !== void 0 && Object.keys(spec.inputRequests).length > 0;\n\tconst hasRequestState = typeof spec.requestState === \"string\";\n\tif (!hasInputRequests && !hasRequestState) throw new TypeError(\"inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)\");\n\treturn {\n\t\tresultType: \"input_required\",\n\t\t...spec.inputRequests !== void 0 && { inputRequests: spec.inputRequests },\n\t\t...spec.requestState !== void 0 && { requestState: spec.requestState }\n\t};\n}\n/**\n* Builder for the input-required return value of multi-round-trip handlers,\n* with per-kind constructors for the embedded requests\n* (`inputRequired.elicit`, `inputRequired.elicitUrl`,\n* `inputRequired.createMessage`, `inputRequired.listRoots`).\n*\n* @example Write-once tool requesting confirmation\n* ```ts\n* server.registerTool('deploy', { inputSchema: z.object({ env: z.string() }) }, async ({ env }, ctx) => {\n* const confirmed = acceptedContent<{ confirm: boolean }>(ctx.mcpReq.inputResponses, 'confirm');\n* if (!confirmed) {\n* return inputRequired({\n* inputRequests: {\n* confirm: inputRequired.elicit({\n* message: `Deploy to ${env}?`,\n* requestedSchema: { type: 'object', properties: { confirm: { type: 'boolean' } }, required: ['confirm'] }\n* })\n* }\n* });\n* }\n* return { content: [{ type: 'text', text: `deployed to ${env}` }] };\n* });\n* ```\n*/\nconst inputRequired = Object.assign(buildInputRequired, {\n\telicit(params) {\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tmethod: \"elicitation/create\",\n\t\t\t\tparams: normalizeElicitInputParams(params)\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tthrow error instanceof ProtocolError ? new TypeError(error.message, { cause: error }) : error;\n\t\t}\n\t},\n\telicitUrl(params) {\n\t\treturn {\n\t\t\tmethod: \"elicitation/create\",\n\t\t\tparams: {\n\t\t\t\t...params,\n\t\t\t\tmode: \"url\"\n\t\t\t}\n\t\t};\n\t},\n\tcreateMessage(params) {\n\t\treturn {\n\t\t\tmethod: \"sampling/createMessage\",\n\t\t\tparams\n\t\t};\n\t},\n\tlistRoots() {\n\t\treturn { method: \"roots/list\" };\n\t}\n});\n/**\n* Wraps a result schema so a request issued through `client.request()` /\n* `ctx.mcpReq.send()` with `allowInputRequired: true` is typed as either the\n* schema's result or an {@linkcode InputRequiredResult}.\n*\n* The manual multi-round-trip path: pass `{ allowInputRequired: true }` in the\n* request options so an `input_required` response is handed back to the\n* caller instead of being auto-fulfilled (or rejected), and wrap the result\n* schema with `withInputRequired()` so the returned value is typed and\n* validated correctly for both outcomes — `input_required` values pass\n* through as-is, complete results validate against the wrapped schema.\n*/\nfunction withInputRequired(schema) {\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"modelcontextprotocol\",\n\t\tvalidate: (value, options) => {\n\t\t\tif (isInputRequiredResult(value)) return { value };\n\t\t\treturn schema[\"~standard\"].validate(value, options);\n\t\t}\n\t} };\n}\n\n//#endregion\n//#region ../core-internal/src/shared/inputRequiredDriver.ts\n/**\n* The multi-round-trip auto-fulfilment driver (protocol revision 2026-07-28).\n*\n* When a request to one of the multi-round-trip methods comes back as\n* `input_required`, the driver fulfils the embedded input requests by\n* dispatching them to the client's already-registered handlers (elicitation,\n* sampling, roots — one generic engine, no per-feature API), then retries the\n* original request with the collected `inputResponses` and a byte-exact echo\n* of `requestState`, on a fresh request id, until the server returns a\n* complete result or the round cap is exhausted.\n*\n* The driver is a LAYER OVER THE MANUAL PATH: each retry is issued with the\n* same primitive a manual caller uses (`allowInputRequired` semantics — the\n* retry hands back the next `input_required` payload instead of recursing),\n* so the loop, the cap, and the pacing live in one place and disabling\n* auto-fulfilment (`inputRequired.autoFulfill: false`) simply skips this\n* module. Timeouts ride the EXISTING knobs: the per-leg `timeout` applies to\n* every wire leg unchanged, and `maxTotalTimeout` bounds the whole flow by\n* shrinking the budget passed to each leg — no new timer system.\n*/\n/**\n* Whether the multi-round-trip driver fulfils `input_required` results\n* automatically when the consumer has not configured\n* `inputRequired.autoFulfill`. The single switch for the default posture.\n*/\nconst DEFAULT_INPUT_REQUIRED_AUTO_FULFILL = true;\n/**\n* Default round cap for the auto-fulfilment driver (both request legs and\n* requestState-only legs count). Aligned with the other SDK client engines.\n*/\nconst DEFAULT_INPUT_REQUIRED_MAX_ROUNDS = 10;\n/**\n* Fixed pacing applied before retrying a requestState-only (load-shedding)\n* leg — a leg that carries no embedded input requests, so nothing slows the\n* loop down naturally. Counted in the same round cap.\n*/\nconst REQUEST_STATE_ONLY_LEG_PACING_MS = 250;\nfunction resolveInputRequiredDriverConfig(options) {\n\treturn {\n\t\tautoFulfill: options?.autoFulfill ?? DEFAULT_INPUT_REQUIRED_AUTO_FULFILL,\n\t\tmaxRounds: options?.maxRounds ?? DEFAULT_INPUT_REQUIRED_MAX_ROUNDS\n\t};\n}\n/** Builds the retry params: original params + this round's responses + byte-exact requestState echo. */\nfunction buildInputRequiredRetryParams(originalParams, responses, requestState) {\n\tconst hasResponses = responses !== void 0 && Object.keys(responses).length > 0;\n\tif (!hasResponses && requestState === void 0) return originalParams;\n\treturn {\n\t\t...originalParams,\n\t\t...hasResponses && { inputResponses: responses },\n\t\t...requestState !== void 0 && { requestState }\n\t};\n}\n/**\n* The message both multi-round-trip loops emit when the round cap is\n* exhausted — the client driver as a typed error, the server-side legacy\n* shim as its per-family failure. One formatter so the texts cannot drift\n* (hosts and models read the tool-result copy verbatim).\n*/\nfunction inputRequiredRoundsExceededMessage(method, maxRounds) {\n\treturn `Multi-round-trip request '${method}' still required input after ${maxRounds} rounds (inputRequired.maxRounds)`;\n}\n/**\n* Abortable delay: resolves after `ms`, or rejects with the signal's reason\n* (wrapped in an `SdkError` when it isn't already one) if the signal aborts\n* first. Aborting after resolution is a no-op. Shared with the server-side\n* legacy shim (the pacing semantics must match per era).\n*/\nfunction sleep(ms, signal) {\n\treturn new Promise((resolve, reject) => {\n\t\tif (signal?.aborted) {\n\t\t\treject(signal.reason instanceof SdkError ? signal.reason : new SdkError(SdkErrorCode.RequestTimeout, String(signal.reason)));\n\t\t\treturn;\n\t\t}\n\t\tconst timer = setTimeout(() => {\n\t\t\tsignal?.removeEventListener(\"abort\", onAbort);\n\t\t\tresolve();\n\t\t}, ms);\n\t\tconst onAbort = () => {\n\t\t\tclearTimeout(timer);\n\t\t\treject(signal?.reason instanceof SdkError ? signal.reason : new SdkError(SdkErrorCode.RequestTimeout, String(signal?.reason)));\n\t\t};\n\t\tsignal?.addEventListener(\"abort\", onAbort, { once: true });\n\t});\n}\n/**\n* A per-round abort linked to the caller's signal: the embedded sibling\n* dispatches share it, so the first failure (or a caller abort) cancels the\n* others instead of leaving them running. Shared with the server-side legacy\n* shim (the abort-linkage semantics must match per era).\n*/\nfunction linkedRoundAbort(outer) {\n\tconst controller = new AbortController();\n\tconst onOuterAbort = () => controller.abort(outer?.reason);\n\touter?.addEventListener(\"abort\", onOuterAbort, { once: true });\n\tif (outer?.aborted) controller.abort(outer.reason);\n\treturn {\n\t\tsignal: controller.signal,\n\t\tabort: (reason) => controller.abort(reason),\n\t\tdispose: () => outer?.removeEventListener(\"abort\", onOuterAbort)\n\t};\n}\n/**\n* Runs the auto-fulfilment loop for one originating request. Resolves with\n* the final complete result (already validated by the retry leg) or rejects\n* with a typed error.\n*\n* `flowStartedAt` is the timestamp the ORIGINAL request was issued at (not\n* when the driver started): `maxTotalTimeout` bounds the whole flow, so the\n* first wire leg counts against the budget too. When omitted, accounting\n* starts when the driver starts.\n*/\nasync function runInputRequiredDriver(args) {\n\tconst { config, method, originalParams, requestOptions, hooks, signal } = args;\n\tconst startedAt = args.flowStartedAt ?? Date.now();\n\tlet payload = args.firstPayload;\n\tlet round = 0;\n\twhile (true) {\n\t\tround += 1;\n\t\tif (round > config.maxRounds) throw new SdkError(SdkErrorCode.InputRequiredRoundsExceeded, inputRequiredRoundsExceededMessage(method, config.maxRounds), {\n\t\t\trounds: config.maxRounds,\n\t\t\tlastResult: {\n\t\t\t\tinputRequests: payload.inputRequests,\n\t\t\t\t...payload.requestState !== void 0 && { requestState: payload.requestState }\n\t\t\t}\n\t\t});\n\t\trequestOptions.onprogress?.({\n\t\t\tprogress: round,\n\t\t\tmessage: `Fulfilling input required by '${method}' (round ${round})`\n\t\t});\n\t\tconst entries = Object.entries(payload.inputRequests ?? {});\n\t\tlet responses;\n\t\tif (entries.length > 0) {\n\t\t\tconst round$1 = linkedRoundAbort(signal);\n\t\t\ttry {\n\t\t\t\tconst fulfilled = await Promise.all(entries.map(async ([key, entry]) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn [key, await hooks.dispatchInputRequest(key, entry, round$1.signal)];\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tround$1.abort(error);\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t}));\n\t\t\t\tresponses = Object.fromEntries(fulfilled);\n\t\t\t} finally {\n\t\t\t\tround$1.dispose();\n\t\t\t}\n\t\t} else await sleep(REQUEST_STATE_ONLY_LEG_PACING_MS, signal);\n\t\tconst legOptions = { ...requestOptions.timeout !== void 0 && { timeout: requestOptions.timeout } };\n\t\tif (requestOptions.maxTotalTimeout !== void 0) {\n\t\t\tconst totalElapsed = Date.now() - startedAt;\n\t\t\tconst remaining = requestOptions.maxTotalTimeout - totalElapsed;\n\t\t\tif (remaining <= 0) throw new SdkError(SdkErrorCode.RequestTimeout, \"Maximum total timeout exceeded\", {\n\t\t\t\tmaxTotalTimeout: requestOptions.maxTotalTimeout,\n\t\t\t\ttotalElapsed\n\t\t\t});\n\t\t\tlegOptions.maxTotalTimeout = remaining;\n\t\t}\n\t\tconst result = await hooks.retry(buildInputRequiredRetryParams(originalParams, responses, payload.requestState), legOptions);\n\t\tif (isInputRequiredResult(result)) {\n\t\t\tpayload = {\n\t\t\t\tinputRequests: result.inputRequests ?? {},\n\t\t\t\t...result.requestState !== void 0 && { requestState: result.requestState }\n\t\t\t};\n\t\t\tcontinue;\n\t\t}\n\t\treturn result;\n\t}\n}\n\n//#endregion\n//#region ../core-internal/src/types/specTypeSchema.ts\n/**\n* Explicit allowlist of protocol Zod schemas that correspond to a public spec type in `types.ts`.\n*\n* This intentionally excludes internal helper schemas exported from `schemas.ts` that have no\n* matching public type (e.g. `ListChangedOptionsBaseSchema`, `BaseRequestParamsSchema`,\n* `NotificationsParamsSchema`, `ClientTasksCapabilitySchema`, `ServerTasksCapabilitySchema`).\n* Keeping the list explicit means new public spec types must be added here deliberately, and\n* internals never leak into `SpecTypeName`.\n*\n* `ResourceTemplateSchema` is included; its public type is exported as `ResourceTemplateType`\n* (the bare name collides with the server package's `ResourceTemplate` class), so\n* `SpecTypes['ResourceTemplate']` is structurally equal to `ResourceTemplateType` rather than to\n* a type literally named `ResourceTemplate`.\n*/\nconst SPEC_SCHEMA_KEYS = [\n\t\"AnnotationsSchema\",\n\t\"AudioContentSchema\",\n\t\"BaseMetadataSchema\",\n\t\"BlobResourceContentsSchema\",\n\t\"BooleanSchemaSchema\",\n\t\"CallToolRequestSchema\",\n\t\"CallToolRequestParamsSchema\",\n\t\"CallToolResultSchema\",\n\t\"CancelledNotificationSchema\",\n\t\"CancelledNotificationParamsSchema\",\n\t\"CancelTaskRequestSchema\",\n\t\"CancelTaskResultSchema\",\n\t\"ClientCapabilitiesSchema\",\n\t\"ClientNotificationSchema\",\n\t\"ClientRequestSchema\",\n\t\"ClientResultSchema\",\n\t\"CompatibilityCallToolResultSchema\",\n\t\"CompleteRequestSchema\",\n\t\"CompleteRequestParamsSchema\",\n\t\"CompleteResultSchema\",\n\t\"ContentBlockSchema\",\n\t\"CreateMessageRequestSchema\",\n\t\"CreateMessageRequestParamsSchema\",\n\t\"CreateMessageResultSchema\",\n\t\"CreateMessageResultWithToolsSchema\",\n\t\"CreateTaskResultSchema\",\n\t\"CursorSchema\",\n\t\"DiscoverRequestSchema\",\n\t\"DiscoverResultSchema\",\n\t\"ElicitationCompleteNotificationSchema\",\n\t\"ElicitationCompleteNotificationParamsSchema\",\n\t\"ElicitRequestSchema\",\n\t\"ElicitRequestFormParamsSchema\",\n\t\"ElicitRequestParamsSchema\",\n\t\"ElicitRequestURLParamsSchema\",\n\t\"ElicitResultSchema\",\n\t\"EmbeddedResourceSchema\",\n\t\"EmptyResultSchema\",\n\t\"EnumSchemaSchema\",\n\t\"GetPromptRequestSchema\",\n\t\"GetPromptRequestParamsSchema\",\n\t\"GetPromptResultSchema\",\n\t\"GetTaskPayloadRequestSchema\",\n\t\"GetTaskPayloadResultSchema\",\n\t\"GetTaskRequestSchema\",\n\t\"GetTaskResultSchema\",\n\t\"IconSchema\",\n\t\"IconsSchema\",\n\t\"ImageContentSchema\",\n\t\"ImplementationSchema\",\n\t\"InitializedNotificationSchema\",\n\t\"InitializeRequestSchema\",\n\t\"InitializeRequestParamsSchema\",\n\t\"InitializeResultSchema\",\n\t\"JSONArraySchema\",\n\t\"JSONObjectSchema\",\n\t\"JSONRPCErrorResponseSchema\",\n\t\"JSONRPCMessageSchema\",\n\t\"JSONRPCNotificationSchema\",\n\t\"JSONRPCRequestSchema\",\n\t\"JSONRPCResponseSchema\",\n\t\"JSONRPCResultResponseSchema\",\n\t\"JSONValueSchema\",\n\t\"LegacyTitledEnumSchemaSchema\",\n\t\"ListPromptsRequestSchema\",\n\t\"ListPromptsResultSchema\",\n\t\"ListResourcesRequestSchema\",\n\t\"ListResourcesResultSchema\",\n\t\"ListResourceTemplatesRequestSchema\",\n\t\"ListResourceTemplatesResultSchema\",\n\t\"ListRootsRequestSchema\",\n\t\"ListRootsResultSchema\",\n\t\"ListTasksRequestSchema\",\n\t\"ListTasksResultSchema\",\n\t\"ListToolsRequestSchema\",\n\t\"ListToolsResultSchema\",\n\t\"LoggingLevelSchema\",\n\t\"LoggingMessageNotificationSchema\",\n\t\"LoggingMessageNotificationParamsSchema\",\n\t\"ModelHintSchema\",\n\t\"ModelPreferencesSchema\",\n\t\"MultiSelectEnumSchemaSchema\",\n\t\"NotificationSchema\",\n\t\"NumberSchemaSchema\",\n\t\"PaginatedRequestSchema\",\n\t\"PaginatedRequestParamsSchema\",\n\t\"PaginatedResultSchema\",\n\t\"PingRequestSchema\",\n\t\"PrimitiveSchemaDefinitionSchema\",\n\t\"ProgressSchema\",\n\t\"ProgressNotificationSchema\",\n\t\"ProgressNotificationParamsSchema\",\n\t\"ProgressTokenSchema\",\n\t\"PromptSchema\",\n\t\"PromptArgumentSchema\",\n\t\"PromptListChangedNotificationSchema\",\n\t\"PromptMessageSchema\",\n\t\"PromptReferenceSchema\",\n\t\"ReadResourceRequestSchema\",\n\t\"ReadResourceRequestParamsSchema\",\n\t\"ReadResourceResultSchema\",\n\t\"RelatedTaskMetadataSchema\",\n\t\"RequestSchema\",\n\t\"RequestIdSchema\",\n\t\"RequestMetaSchema\",\n\t\"ResourceSchema\",\n\t\"ResourceContentsSchema\",\n\t\"ResourceLinkSchema\",\n\t\"ResourceListChangedNotificationSchema\",\n\t\"ResourceRequestParamsSchema\",\n\t\"ResourceTemplateSchema\",\n\t\"ResourceTemplateReferenceSchema\",\n\t\"ResourceUpdatedNotificationSchema\",\n\t\"ResourceUpdatedNotificationParamsSchema\",\n\t\"ResultMetaObjectSchema\",\n\t\"ResultSchema\",\n\t\"RoleSchema\",\n\t\"RootSchema\",\n\t\"RootsListChangedNotificationSchema\",\n\t\"SamplingContentSchema\",\n\t\"SamplingMessageSchema\",\n\t\"SamplingMessageContentBlockSchema\",\n\t\"ServerCapabilitiesSchema\",\n\t\"ServerNotificationSchema\",\n\t\"ServerRequestSchema\",\n\t\"ServerResultSchema\",\n\t\"SetLevelRequestSchema\",\n\t\"SetLevelRequestParamsSchema\",\n\t\"SingleSelectEnumSchemaSchema\",\n\t\"StringSchemaSchema\",\n\t\"SubscribeRequestSchema\",\n\t\"SubscribeRequestParamsSchema\",\n\t\"SubscriptionFilterSchema\",\n\t\"SubscriptionsAcknowledgedNotificationSchema\",\n\t\"SubscriptionsAcknowledgedNotificationParamsSchema\",\n\t\"SubscriptionsListenRequestSchema\",\n\t\"SubscriptionsListenRequestParamsSchema\",\n\t\"SubscriptionsListenResultSchema\",\n\t\"SubscriptionsListenResultMetaSchema\",\n\t\"TaskAugmentedRequestParamsSchema\",\n\t\"TaskCreationParamsSchema\",\n\t\"TaskMetadataSchema\",\n\t\"TaskSchema\",\n\t\"TaskStatusSchema\",\n\t\"TaskStatusNotificationSchema\",\n\t\"TaskStatusNotificationParamsSchema\",\n\t\"TextContentSchema\",\n\t\"TextResourceContentsSchema\",\n\t\"TitledMultiSelectEnumSchemaSchema\",\n\t\"TitledSingleSelectEnumSchemaSchema\",\n\t\"ToolSchema\",\n\t\"ToolAnnotationsSchema\",\n\t\"ToolChoiceSchema\",\n\t\"ToolExecutionSchema\",\n\t\"ToolListChangedNotificationSchema\",\n\t\"ToolResultContentSchema\",\n\t\"ToolUseContentSchema\",\n\t\"UnsubscribeRequestSchema\",\n\t\"UnsubscribeRequestParamsSchema\",\n\t\"UntitledMultiSelectEnumSchemaSchema\",\n\t\"UntitledSingleSelectEnumSchemaSchema\"\n];\nconst authSchemas = {\n\tIdJagTokenExchangeResponseSchema,\n\tOAuthClientInformationFullSchema,\n\tOAuthClientInformationSchema,\n\tOAuthClientMetadataSchema,\n\tOAuthClientRegistrationErrorSchema,\n\tOAuthErrorResponseSchema,\n\tOAuthMetadataSchema,\n\tOAuthProtectedResourceMetadataSchema,\n\tOAuthTokenRevocationRequestSchema,\n\tOAuthTokensSchema,\n\tOpenIdProviderDiscoveryMetadataSchema,\n\tOpenIdProviderMetadataSchema\n};\nconst _specTypeSchemas = {};\nconst _isSpecType = {};\nfunction register(key, schema) {\n\tconst name = key.slice(0, -6);\n\t_specTypeSchemas[name] = schema;\n\t_isSpecType[name] = (v) => schema.safeParse(v).success;\n}\nfor (const key of SPEC_SCHEMA_KEYS) register(key, schemas_exports[key]);\nfor (const [key, schema] of Object.entries(authSchemas)) register(key, schema);\n/**\n* Runtime validators for every MCP spec type, keyed by type name.\n*\n* Use this when you need to validate a spec-defined shape at a boundary the SDK does not own, for\n* example an extension's custom-method payload that embeds a `CallToolResult`, or a value read from\n* storage that should be a `Tool`.\n*\n* Each entry implements the Standard Schema interface, so it composes with any\n* Standard-Schema-aware library. For a simple boolean check, use {@linkcode isSpecType} instead.\n*\n* @example\n* ```ts source=\"./specTypeSchema.examples.ts#specTypeSchemas_basicUsage\"\n* const result = specTypeSchemas.CallToolResult['~standard'].validate(untrusted);\n* if (result.issues === undefined) {\n* // result.value is CallToolResult\n* }\n* ```\n*/\nconst specTypeSchemas = Object.freeze(_specTypeSchemas);\n/**\n* Type predicates for every MCP spec type, keyed by type name.\n*\n* Returns `true` if the value satisfies the schema's input type (`z.input<>`, before defaults and\n* transforms are applied), and narrows to that input type. For schemas with `.default()` or\n* `.preprocess()`, this may accept values that do not structurally match the named output type;\n* for example `isSpecType.CallToolResult({})` is `true` because `content` has a default. Use\n* `specTypeSchemas.X['~standard'].validate(value)` when you need the validated output value.\n*\n* Each guard is a standalone function, so it can be passed directly as a callback.\n*\n* @example\n* ```ts source=\"./specTypeSchema.examples.ts#isSpecType_basicUsage\"\n* if (isSpecType.ContentBlock(value)) {\n* // value is ContentBlock\n* }\n*\n* const blocks = mixed.filter(isSpecType.ContentBlock);\n* ```\n*/\nconst isSpecType = Object.freeze(_isSpecType);\n\n//#endregion\n//#region ../core-internal/src/wire/bootstrap.ts\nfunction bootstrapOutboundCodec(method) {\n\tswitch (method) {\n\t\tcase \"initialize\":\n\t\tcase \"notifications/initialized\": return codecForVersion(void 0);\n\t\tcase \"server/discover\": return codecForVersion(MODERN_WIRE_REVISION);\n\t\tdefault: return;\n\t}\n}\n\n//#endregion\n//#region ../core-internal/src/shared/protocol.ts\n/**\n* The default request timeout, in milliseconds.\n*/\nconst DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;\n/**\n* The reserved per-request `_meta` envelope keys (protocol revision\n* 2026-07-28). The protocol layer lifts these out of inbound `_meta` before\n* handlers run and surfaces them at `ctx.mcpReq.envelope` — they are\n* wire-level bookkeeping, not handler material.\n*/\nconst RESERVED_ENVELOPE_META_KEYS = [\n\tPROTOCOL_VERSION_META_KEY,\n\tCLIENT_INFO_META_KEY,\n\tCLIENT_CAPABILITIES_META_KEY,\n\tLOG_LEVEL_META_KEY\n];\n/**\n* Top-level params members carrying multi-round-trip driver material\n* (protocol revision 2026-07-28). The spec reserves these names on\n* client-initiated REQUESTS only — notification params keep them untouched\n* (a vendor notification may legitimately use the same names).\n*/\nconst RETRY_PARAMS_KEYS = [\"inputResponses\", \"requestState\"];\n/**\n* Lift wire-only material out of an inbound message so handlers see exactly\n* the 2025-era shape, and surface it for the protocol layer (requests: via\n* `ctx.mcpReq`). What counts as wire-only depends on the message kind: the\n* reserved envelope `_meta` keys are reserved on every message, while the\n* multi-round-trip retry fields (`inputResponses`/`requestState`) are\n* reserved on client-initiated requests only — so notifications get only the\n* envelope lift, and their top-level params stay untouched. Messages without\n* wire-only material are returned unchanged (same reference).\n*/\nfunction liftWireOnlyMaterial(message, kind) {\n\tconst params = message.params;\n\tif (!isPlainObject$1(params)) return {\n\t\tmessage,\n\t\tlifted: {}\n\t};\n\tconst meta = params._meta;\n\tconst envelopeKeys = isPlainObject$1(meta) ? RESERVED_ENVELOPE_META_KEYS.filter((key) => key in meta) : [];\n\tconst retryKeys = kind === \"request\" ? RETRY_PARAMS_KEYS.filter((key) => key in params) : [];\n\tif (envelopeKeys.length === 0 && retryKeys.length === 0) return {\n\t\tmessage,\n\t\tlifted: {}\n\t};\n\tconst lifted = {};\n\tconst nextParams = { ...params };\n\tif (envelopeKeys.length > 0 && isPlainObject$1(meta)) {\n\t\tconst envelope = {};\n\t\tconst nextMeta = { ...meta };\n\t\tfor (const key of envelopeKeys) {\n\t\t\tenvelope[key] = meta[key];\n\t\t\tdelete nextMeta[key];\n\t\t}\n\t\tlifted.envelope = envelope;\n\t\tif (Object.keys(nextMeta).length > 0) nextParams._meta = nextMeta;\n\t\telse delete nextParams._meta;\n\t}\n\tfor (const key of retryKeys) {\n\t\tif (key === \"inputResponses\") lifted.inputResponses = nextParams[key];\n\t\tif (key === \"requestState\") lifted.requestState = nextParams[key];\n\t\tdelete nextParams[key];\n\t}\n\treturn {\n\t\tmessage: {\n\t\t\t...message,\n\t\t\tparams: nextParams\n\t\t},\n\t\tlifted\n\t};\n}\n/**\n* Standard Schema adapter over the era codec's `validateResult` function (the\n* function-only WireCodec contract exposes no schema objects). Used by the\n* spec-method `request()` overload so the request funnel keeps a single\n* `StandardSchemaV1`-shaped validation seam for both spec and explicit-schema\n* paths.\n*\n* Returns `undefined` when the method has no result entry on this era's\n* registry — the caller maps that to the synchronous \"pass a result schema\"\n* TypeError, exactly matching the pre-function-only behavior the\n* typedMapAlignment suite pins (the result map deliberately excludes the\n* `tasks/*` methods, so the spec-method overload refuses them up front).\n*/\nfunction codecResultValidator(codec, method) {\n\tconst probe = codec.validateResult(method, void 0);\n\tif (!probe.ok && probe.reason === \"not-in-era\") return void 0;\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"mcp-wire-codec\",\n\t\tvalidate(value) {\n\t\t\tconst outcome = codec.validateResult(method, value);\n\t\t\tif (outcome.ok) return { value: outcome.value };\n\t\t\treturn { issues: [{ message: outcome.reason === \"invalid\" ? outcome.message : `not-in-era: ${method}` }] };\n\t\t}\n\t} };\n}\n/**\n* Builds the `ctx.mcpReq.requestState` accessor for a resolved value. The\n* `as T` below is the one place {@linkcode RequestStateAccessor}'s\n* caller-asserted typing is implemented — no implementation can produce an\n* arbitrary `T` from a runtime value honestly.\n*/\nfunction requestStateAccessor(value) {\n\treturn () => value;\n}\n/** Shared no-state accessor: the common case allocates nothing per request. */\nconst NO_REQUEST_STATE = requestStateAccessor(void 0);\nlet writeNegotiatedProtocolVersion;\n/**\n* Implements MCP protocol framing on top of a pluggable transport, including\n* features like request/response linking, notifications, and progress.\n*\n* `Protocol` is abstract; `Client` and `Server` are the concrete role-specific\n* implementations most code should use.\n*/\nvar Protocol = class {\n\t_transport;\n\t_requestMessageId = 0;\n\t_requestHandlers = /* @__PURE__ */ new Map();\n\t_requestHandlerAbortControllers = /* @__PURE__ */ new Map();\n\t_notificationHandlers = /* @__PURE__ */ new Map();\n\t_responseHandlers = /* @__PURE__ */ new Map();\n\t_progressHandlers = /* @__PURE__ */ new Map();\n\t_timeoutInfo = /* @__PURE__ */ new Map();\n\t_pendingDebouncedNotifications = /* @__PURE__ */ new Set();\n\t/**\n\t* The protocol version negotiated for the current connection (`undefined`\n\t* before negotiation completes), which determines the wire era this\n\t* instance speaks. Set by the SDK's negotiation and initialize paths\n\t* (`Client.connect`, `Server._oninitialize`).\n\t*/\n\t_negotiatedProtocolVersion;\n\tstatic {\n\t\twriteNegotiatedProtocolVersion = (instance, version) => {\n\t\t\tinstance._negotiatedProtocolVersion = version;\n\t\t};\n\t}\n\t_supportedProtocolVersions;\n\t/**\n\t* Callback for when the connection is closed for any reason.\n\t*\n\t* This is invoked when {@linkcode Protocol.close | close()} is called as well.\n\t*/\n\tonclose;\n\t/**\n\t* Callback for when an error occurs.\n\t*\n\t* Note that errors are not necessarily fatal; they are used for reporting any kind of exceptional condition out of band.\n\t*/\n\tonerror;\n\t/**\n\t* A handler to invoke for any request types that do not have their own handler installed.\n\t*/\n\tfallbackRequestHandler;\n\t/**\n\t* A handler to invoke for any notification types that do not have their own handler installed.\n\t*/\n\tfallbackNotificationHandler;\n\tconstructor(_options) {\n\t\tthis._options = _options;\n\t\tthis._supportedProtocolVersions = _options?.supportedProtocolVersions ?? SUPPORTED_PROTOCOL_VERSIONS;\n\t\tthis.setNotificationHandler(\"notifications/cancelled\", (notification) => {\n\t\t\tthis._oncancel(notification);\n\t\t});\n\t\tthis.setNotificationHandler(\"notifications/progress\", (notification) => {\n\t\t\tthis._onprogress(notification);\n\t\t});\n\t\tthis.setRequestHandler(\"ping\", (_request) => ({}));\n\t}\n\t/**\n\t* Drop consult for inbound messages whose transport did not classify them\n\t* at the edge — long-lived channels such as stdio, where a role class may\n\t* need to decline traffic the negotiated era has no answer for (the\n\t* client-side inbound-request drop on modern-era connections: the\n\t* 2026-07-28 era has no server→client request channel, and on stdio the\n\t* client must never write JSON-RPC responses).\n\t*\n\t* Consulted ONLY when the transport supplied no\n\t* {@linkcode MessageExtraInfo.classification}: edge-classified traffic\n\t* never reaches the hook. Returning `'drop'` discards the message without\n\t* writing any response (requests are surfaced via `onerror`). The base\n\t* implementation returns `undefined`: unclassified traffic keeps today's\n\t* dispatch path unchanged. Era selection never happens here — era is\n\t* instance state, owned by the serving entry that constructed and\n\t* connected the instance.\n\t*/\n\t_shouldDropInbound(_message) {}\n\t/**\n\t* The per-request `_meta` envelope this instance attaches to every outgoing\n\t* request and notification, when one applies. The base implementation\n\t* returns `undefined` (no envelope — the 2025-era posture, so legacy-era\n\t* outbound traffic is byte-identical to a build without this seam).\n\t* `Client` overrides it on a connection that negotiated a modern (2026-07-28+)\n\t* era to return the reserved protocol-version / client-info /\n\t* client-capabilities keys. User-supplied `_meta` keys take precedence over\n\t* the auto-attached ones.\n\t*/\n\t_outboundMetaEnvelope() {}\n\t/**\n\t* Attach this instance's outbound `_meta` envelope (when one is configured)\n\t* to a request or notification. A no-op when the seam returns `undefined`\n\t* — the message returns by reference, so the legacy-era wire stays\n\t* byte-identical. User-supplied `_meta` keys are spread last so they win\n\t* over the auto-attached envelope keys.\n\t*/\n\t_envelopeOutbound(message) {\n\t\tconst envelope = this._outboundMetaEnvelope();\n\t\tif (envelope === void 0) return message;\n\t\tconst params = message.params ?? {};\n\t\treturn {\n\t\t\t...message,\n\t\t\tparams: {\n\t\t\t\t...params,\n\t\t\t\t_meta: {\n\t\t\t\t\t...envelope,\n\t\t\t\t\t...params._meta\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Extension point for non-`complete` decoded results in the response\n\t* funnel: a result the wire codec discriminated into a kind other than\n\t* `'complete'` or `'invalid'` is handed here for the role class to\n\t* resolve. The base default surfaces it as a typed\n\t* {@linkcode SdkErrorCode.UnsupportedResultType} error (no retry).\n\t*\n\t* Intended consumers (named so the seam stays accountable):\n\t* - the `Client`'s multi-round-trip auto-fulfilment engine, which fulfils\n\t* `'input_required'` results through the registered\n\t* elicitation/sampling/roots handlers and retries via `flow.retry`;\n\t* - a future client-side terminal-result handler for\n\t* `subscriptions/listen`, when the spec defines one.\n\t*\n\t* `Server` instances never receive `input_required` responses on their\n\t* outbound legs and leave the base behavior in place.\n\t*/\n\t_resolveNonCompleteResult(decoded, flow) {\n\t\treturn Promise.reject(new SdkError(SdkErrorCode.UnsupportedResultType, `Unsupported result type '${decoded.kind}' for ${flow.request.method}`, {\n\t\t\tresultType: decoded.kind,\n\t\t\tmethod: flow.request.method\n\t\t}));\n\t}\n\t/**\n\t* Protected accessor for a registered request handler. Used by role\n\t* classes that dispatch synthesized requests through the same stored\n\t* handler chain (e.g. the `Client` fulfilling an embedded multi-round-trip\n\t* input request).\n\t*/\n\t_getRequestHandler(method) {\n\t\treturn this._requestHandlers.get(method);\n\t}\n\tasync _oncancel(notification) {\n\t\tif (!notification.params.requestId) return;\n\t\tthis._requestHandlerAbortControllers.get(notification.params.requestId)?.abort(notification.params.reason);\n\t}\n\t_setupTimeout(messageId, timeout, maxTotalTimeout, onTimeout, resetTimeoutOnProgress = false) {\n\t\tthis._timeoutInfo.set(messageId, {\n\t\t\ttimeoutId: setTimeout(onTimeout, timeout),\n\t\t\tstartTime: Date.now(),\n\t\t\ttimeout,\n\t\t\tmaxTotalTimeout,\n\t\t\tresetTimeoutOnProgress,\n\t\t\tonTimeout\n\t\t});\n\t}\n\t_resetTimeout(messageId) {\n\t\tconst info = this._timeoutInfo.get(messageId);\n\t\tif (!info) return false;\n\t\tconst totalElapsed = Date.now() - info.startTime;\n\t\tif (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) {\n\t\t\tthis._timeoutInfo.delete(messageId);\n\t\t\tthrow new SdkError(SdkErrorCode.RequestTimeout, \"Maximum total timeout exceeded\", {\n\t\t\t\tmaxTotalTimeout: info.maxTotalTimeout,\n\t\t\t\ttotalElapsed\n\t\t\t});\n\t\t}\n\t\tclearTimeout(info.timeoutId);\n\t\tinfo.timeoutId = setTimeout(info.onTimeout, info.timeout);\n\t\treturn true;\n\t}\n\t_cleanupTimeout(messageId) {\n\t\tconst info = this._timeoutInfo.get(messageId);\n\t\tif (info) {\n\t\t\tclearTimeout(info.timeoutId);\n\t\t\tthis._timeoutInfo.delete(messageId);\n\t\t}\n\t}\n\t/**\n\t* Attaches to the given transport, starts it, and starts listening for messages.\n\t*\n\t* The caller assumes ownership of the {@linkcode Transport}, replacing any callbacks that have already been set, and expects that it is the only user of the {@linkcode Transport} instance going forward.\n\t*/\n\tasync connect(transport) {\n\t\tthis._transport = transport;\n\t\tconst _onclose = this.transport?.onclose;\n\t\tthis._transport.onclose = () => {\n\t\t\ttry {\n\t\t\t\t_onclose?.();\n\t\t\t} finally {\n\t\t\t\tthis._onclose();\n\t\t\t}\n\t\t};\n\t\tconst _onerror = this.transport?.onerror;\n\t\tthis._transport.onerror = (error) => {\n\t\t\t_onerror?.(error);\n\t\t\tthis._onerror(error);\n\t\t};\n\t\tconst _onmessage = this._transport?.onmessage;\n\t\tthis._transport.onmessage = (message, extra) => {\n\t\t\t_onmessage?.(message, extra);\n\t\t\tif (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) this._onresponse(message);\n\t\t\telse if (isJSONRPCRequest(message)) this._onrequest(message, extra);\n\t\t\telse if (isJSONRPCNotification(message)) this._onnotification(message, extra);\n\t\t\telse this._onerror(/* @__PURE__ */ new Error(`Unknown message type: ${JSON.stringify(message)}`));\n\t\t};\n\t\ttransport.setSupportedProtocolVersions?.(this._supportedProtocolVersions);\n\t\tawait this._transport.start();\n\t}\n\t/**\n\t* Transport-close hook. Subclass overrides MUST call `super._onclose()`\n\t* after their own cleanup — base teardown (response-handler settlement,\n\t* timeout clearing, in-flight request abort) does not run otherwise.\n\t*/\n\t_onclose() {\n\t\tconst responseHandlers = this._responseHandlers;\n\t\tthis._responseHandlers = /* @__PURE__ */ new Map();\n\t\tthis._progressHandlers.clear();\n\t\tthis._pendingDebouncedNotifications.clear();\n\t\tfor (const info of this._timeoutInfo.values()) clearTimeout(info.timeoutId);\n\t\tthis._timeoutInfo.clear();\n\t\tconst requestHandlerAbortControllers = this._requestHandlerAbortControllers;\n\t\tthis._requestHandlerAbortControllers = /* @__PURE__ */ new Map();\n\t\tconst error = new SdkError(SdkErrorCode.ConnectionClosed, \"Connection closed\");\n\t\tthis._transport = void 0;\n\t\ttry {\n\t\t\tthis.onclose?.();\n\t\t} finally {\n\t\t\tfor (const handler of responseHandlers.values()) handler(error);\n\t\t\tfor (const controller of requestHandlerAbortControllers.values()) controller.abort(error);\n\t\t}\n\t}\n\t_onerror(error) {\n\t\tthis.onerror?.(error);\n\t}\n\t/**\n\t* Inbound-notification dispatch. Subclass overrides MUST delegate\n\t* unmatched traffic to `super._onnotification(rawNotification, extra)` —\n\t* an override that consumes only what it owns and falls through to base\n\t* dispatch for everything else.\n\t*/\n\t_onnotification(rawNotification, extra) {\n\t\tconst { message: notification } = liftWireOnlyMaterial(rawNotification, \"notification\");\n\t\tconst codec = this._negotiatedWireCodec();\n\t\tif (extra?.classification === void 0 && this._shouldDropInbound(rawNotification) === \"drop\") return;\n\t\tif (extra?.classification !== void 0) {\n\t\t\tconst classified = classifiedWireEra(extra.classification);\n\t\t\tif (classified !== codec.era) {\n\t\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Era mismatch on inbound notification '${notification.method}': classified as ${classified} but this instance serves ${codec.era}`));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (isSpecNotificationMethod(notification.method) && !codec.hasNotificationMethod(notification.method)) return;\n\t\tconst handler = this._notificationHandlers.get(notification.method);\n\t\tconst fallback = this.fallbackNotificationHandler;\n\t\tif (handler === void 0 && fallback === void 0) return;\n\t\tPromise.resolve().then(() => handler === void 0 ? fallback(notification) : handler(notification, codec)).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Uncaught error in notification handler: ${error}`)));\n\t}\n\t_onrequest(rawRequest, extra) {\n\t\tconst { message: request, lifted } = liftWireOnlyMaterial(rawRequest, \"request\");\n\t\tconst codec = this._negotiatedWireCodec();\n\t\tif (extra?.classification === void 0 && this._shouldDropInbound(rawRequest) === \"drop\") {\n\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Dropped inbound request '${rawRequest.method}': not servable on this connection's protocol era`));\n\t\t\treturn;\n\t\t}\n\t\tconst capturedTransport = this._transport;\n\t\tconst sendErrorResponse = (code, message, data) => {\n\t\t\tconst errorResponse = {\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: request.id,\n\t\t\t\terror: {\n\t\t\t\t\tcode,\n\t\t\t\t\tmessage,\n\t\t\t\t\t...data !== void 0 && { data }\n\t\t\t\t}\n\t\t\t};\n\t\t\tcapturedTransport?.send(errorResponse).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Failed to send an error response: ${error}`)));\n\t\t};\n\t\tif (extra?.classification !== void 0) {\n\t\t\tconst classified = classifiedWireEra(extra.classification);\n\t\t\tif (classified !== codec.era) {\n\t\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Era mismatch on inbound request '${request.method}': classified as ${classified} but this instance serves ${codec.era}`));\n\t\t\t\tconst requested = extra.classification.revision ?? classified;\n\t\t\t\tsendErrorResponse(ProtocolErrorCode.UnsupportedProtocolVersion, `Unsupported protocol version: ${requested}`, {\n\t\t\t\t\tsupported: this._supportedProtocolVersions,\n\t\t\t\t\trequested\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (isSpecRequestMethod(request.method) && !codec.hasRequestMethod(request.method)) {\n\t\t\tsendErrorResponse(ProtocolErrorCode.MethodNotFound, \"Method not found\");\n\t\t\treturn;\n\t\t}\n\t\tconst handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;\n\t\tif (handler === void 0) {\n\t\t\tsendErrorResponse(ProtocolErrorCode.MethodNotFound, \"Method not found\");\n\t\t\treturn;\n\t\t}\n\t\tconst envelopeError = codec.checkInboundEnvelope(lifted);\n\t\tif (envelopeError !== void 0) {\n\t\t\tsendErrorResponse(ProtocolErrorCode.InvalidParams, envelopeError);\n\t\t\treturn;\n\t\t}\n\t\tconst sendNotification = (notification, options) => this._notificationViaCodec(this._resolveOutboundCodec(notification.method), notification, {\n\t\t\t...options,\n\t\t\trelatedRequestId: request.id\n\t\t});\n\t\tconst sendRequest = (r, resultSchema, options) => this._requestWithSchemaViaCodec(this._resolveOutboundCodec(r.method), r, resultSchema, {\n\t\t\t...options,\n\t\t\trelatedRequestId: request.id\n\t\t});\n\t\tconst abortController = new AbortController();\n\t\tthis._requestHandlerAbortControllers.set(request.id, abortController);\n\t\tconst partitionedInputResponses = lifted.inputResponses === void 0 ? void 0 : partitionInputResponses(lifted.inputResponses);\n\t\tconst baseCtx = {\n\t\t\tsessionId: capturedTransport?.sessionId,\n\t\t\tmcpReq: {\n\t\t\t\tid: request.id,\n\t\t\t\tmethod: request.method,\n\t\t\t\t_meta: request.params?._meta,\n\t\t\t\t...lifted.envelope !== void 0 && { envelope: lifted.envelope },\n\t\t\t\t...partitionedInputResponses !== void 0 && { inputResponses: partitionedInputResponses.accepted },\n\t\t\t\t...partitionedInputResponses !== void 0 && partitionedInputResponses.droppedKeys.length > 0 && { droppedInputResponseKeys: partitionedInputResponses.droppedKeys },\n\t\t\t\trequestState: lifted.requestState === void 0 ? NO_REQUEST_STATE : requestStateAccessor(lifted.requestState),\n\t\t\t\tsignal: abortController.signal,\n\t\t\t\tsend: ((r, schemaOrOptions, maybeOptions) => {\n\t\t\t\t\tconst sendCodec = this._resolveOutboundCodec(r.method);\n\t\t\t\t\tthis._assertOutboundRequestInEra(sendCodec, r.method);\n\t\t\t\t\tif (isStandardSchema(schemaOrOptions)) return sendRequest(r, schemaOrOptions, maybeOptions);\n\t\t\t\t\tconst validate = codecResultValidator(sendCodec, r.method);\n\t\t\t\t\tif (validate === void 0) throw new TypeError(`'${r.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);\n\t\t\t\t\treturn sendRequest(r, validate, schemaOrOptions);\n\t\t\t\t}),\n\t\t\t\tnotify: sendNotification\n\t\t\t},\n\t\t\thttp: extra?.authInfo ? { authInfo: extra.authInfo } : void 0\n\t\t};\n\t\tconst ctx = this.buildContext(baseCtx, extra);\n\t\tPromise.resolve().then(() => handler(request, ctx)).then(async (result) => {\n\t\t\tif (abortController.signal.aborted) return;\n\t\t\tlet encoded;\n\t\t\ttry {\n\t\t\t\tencoded = codec.encodeResult(request.method, result, this._outboundServerInfo());\n\t\t\t} catch (error) {\n\t\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Failed to encode result for ${request.method}: ${error}`));\n\t\t\t\tsendErrorResponse(ProtocolErrorCode.InternalError, \"Internal error\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst response = {\n\t\t\t\tresult: encoded,\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: request.id\n\t\t\t};\n\t\t\tawait capturedTransport?.send(response);\n\t\t}, async (error) => {\n\t\t\tif (abortController.signal.aborted) return;\n\t\t\tconst thrownCode = Number.isSafeInteger(error[\"code\"]) ? error[\"code\"] : ProtocolErrorCode.InternalError;\n\t\t\tconst errorResponse = {\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: request.id,\n\t\t\t\terror: {\n\t\t\t\t\tcode: codec.encodeErrorCode(thrownCode),\n\t\t\t\t\tmessage: error.message ?? \"Internal error\",\n\t\t\t\t\t...error[\"data\"] !== void 0 && { data: error[\"data\"] }\n\t\t\t\t}\n\t\t\t};\n\t\t\tawait capturedTransport?.send(errorResponse);\n\t\t}).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Failed to send response: ${error}`))).finally(() => {\n\t\t\tif (this._requestHandlerAbortControllers.get(request.id) === abortController) this._requestHandlerAbortControllers.delete(request.id);\n\t\t});\n\t}\n\t_onprogress(notification) {\n\t\tconst { progressToken, ...params } = notification.params;\n\t\tconst messageId = Number(progressToken);\n\t\tconst handler = this._progressHandlers.get(messageId);\n\t\tif (!handler) {\n\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));\n\t\t\treturn;\n\t\t}\n\t\tconst responseHandler = this._responseHandlers.get(messageId);\n\t\tconst timeoutInfo = this._timeoutInfo.get(messageId);\n\t\tif (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) try {\n\t\t\tthis._resetTimeout(messageId);\n\t\t} catch (error) {\n\t\t\tthis._responseHandlers.delete(messageId);\n\t\t\tthis._progressHandlers.delete(messageId);\n\t\t\tthis._cleanupTimeout(messageId);\n\t\t\tresponseHandler(error);\n\t\t\treturn;\n\t\t}\n\t\thandler(params);\n\t}\n\t/**\n\t* Inbound-response dispatch. Subclass overrides MUST delegate unmatched\n\t* traffic to `super._onresponse(response)` — an override that consumes\n\t* only what it owns and falls through to base dispatch for everything\n\t* else.\n\t*/\n\t_onresponse(response) {\n\t\tconst messageId = Number(response.id);\n\t\tconst handler = this._responseHandlers.get(messageId);\n\t\tif (handler === void 0) {\n\t\t\tthis._onerror(/* @__PURE__ */ new Error(`Received a response for an unknown message ID: ${JSON.stringify(response)}`));\n\t\t\treturn;\n\t\t}\n\t\tthis._responseHandlers.delete(messageId);\n\t\tthis._cleanupTimeout(messageId);\n\t\tthis._progressHandlers.delete(messageId);\n\t\tif (isJSONRPCResultResponse(response)) handler(response);\n\t\telse handler(ProtocolError.fromError(response.error.code, response.error.message, response.error.data));\n\t}\n\tget transport() {\n\t\treturn this._transport;\n\t}\n\t/**\n\t* Closes the connection.\n\t*/\n\tasync close() {\n\t\tawait this._transport?.close();\n\t}\n\trequest(request, schemaOrOptions, maybeOptions) {\n\t\tconst codec = this._resolveOutboundCodec(request.method);\n\t\tthis._assertOutboundRequestInEra(codec, request.method);\n\t\tif (isStandardSchema(schemaOrOptions)) return this._requestWithSchemaViaCodec(codec, request, schemaOrOptions, maybeOptions);\n\t\tconst validate = codecResultValidator(codec, request.method);\n\t\tif (validate === void 0) throw new TypeError(`'${request.method}' is not a spec method; pass a result schema as the second argument to request().`);\n\t\treturn this._requestWithSchemaViaCodec(codec, request, validate, schemaOrOptions);\n\t}\n\t/**\n\t* The wire codec for this instance's negotiated era — the phase-2 truth:\n\t* everything an established connection sends and receives resolves\n\t* through it. Legacy until a version has been negotiated.\n\t*/\n\t_negotiatedWireCodec() {\n\t\treturn codecForVersion(this._negotiatedProtocolVersion);\n\t}\n\t/**\n\t* Protected accessor for the instance's negotiated wire codec, for role\n\t* classes (Client/Server/McpServer) routing era-dependent behavior\n\t* through the codec's function-only surface — `samplingResultVariant`,\n\t* `outboundEnvelope`, `projectCallToolResult` — instead of branching on\n\t* the protocol version themselves.\n\t*/\n\t_wireCodec() {\n\t\treturn this._negotiatedWireCodec();\n\t}\n\t/**\n\t* Outbound codec resolution: while the negotiated version is still unset\n\t* (the negotiation window), lifecycle messages are bootstrap-pinned BY\n\t* METHOD — they self-identify their era (`initialize` IS the legacy\n\t* handshake, `server/discover` IS the modern probe). Once a version has\n\t* been negotiated, the instance era is authoritative for everything — a\n\t* negotiated session never re-routes a method onto the other era.\n\t*/\n\t_resolveOutboundCodec(method) {\n\t\tif (this._negotiatedProtocolVersion === void 0) {\n\t\t\tconst pinned = bootstrapOutboundCodec(method);\n\t\t\tif (pinned) return pinned;\n\t\t}\n\t\treturn this._negotiatedWireCodec();\n\t}\n\t/**\n\t* Era gate for outbound requests — deletions are physical in BOTH\n\t* directions: sending a spec method that the resolved era does not define\n\t* dies locally with a typed error before anything reaches the transport.\n\t* Methods outside the spec universe are consumer-owned extension methods\n\t* and stay era-blind.\n\t*/\n\t_assertOutboundRequestInEra(codec, method) {\n\t\tif (isSpecRequestMethod(method) && !codec.hasRequestMethod(method)) throw new SdkError(SdkErrorCode.MethodNotSupportedByProtocolVersion, `Method '${method}' is not supported by the negotiated protocol version (wire era ${codec.era})`, {\n\t\t\tmethod,\n\t\t\tera: codec.era\n\t\t});\n\t}\n\t/**\n\t* Sends a request and waits for a response, using the provided schema for\n\t* validation instead of the era registry's method-keyed entry.\n\t*\n\t* This is the internal implementation used by SDK methods whose result\n\t* schema cannot be expressed as a method-keyed registry entry — the one\n\t* surviving case is `server.createMessage`, whose result schema depends\n\t* on the REQUEST params (tools vs no tools) — and by callers passing\n\t* explicit compatibility schemas. Spec methods are still era-gated here:\n\t* an explicit schema never smuggles a deleted method onto the wire.\n\t*/\n\t_requestWithSchema(request, resultSchema, options) {\n\t\tconst codec = this._resolveOutboundCodec(request.method);\n\t\tthis._assertOutboundRequestInEra(codec, request.method);\n\t\treturn this._requestWithSchemaViaCodec(codec, request, resultSchema, options);\n\t}\n\t/**\n\t* The request funnel proper, keyed by the resolved era codec: the codec\n\t* owns result decoding (raw-first `resultType` discrimination — V-1 —\n\t* and the era's lift posture) before the schema validation step.\n\t*/\n\t_requestWithSchemaViaCodec(codec, request, resultSchema, options) {\n\t\tconst { relatedRequestId, resumptionToken, onresumptiontoken, headers } = options ?? {};\n\t\tconst flowStartedAt = Date.now();\n\t\tlet onAbort;\n\t\tlet cleanupMessageId;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst earlyReject = (error) => {\n\t\t\t\treject(error);\n\t\t\t};\n\t\t\tif (!this._transport) {\n\t\t\t\tearlyReject(/* @__PURE__ */ new Error(\"Not connected\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this._options?.enforceStrictCapabilities === true) try {\n\t\t\t\tthis.assertCapabilityForMethod(request.method);\n\t\t\t} catch (error) {\n\t\t\t\tearlyReject(error);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (options?.signal?.aborted) {\n\t\t\t\tconst reason = options.signal.reason;\n\t\t\t\tthrow reason instanceof SdkError ? reason : new SdkError(SdkErrorCode.RequestTimeout, String(reason));\n\t\t\t}\n\t\t\tconst requestAbort = codec.era === MODERN_WIRE_REVISION && this._transport.hasPerRequestStream === true ? new AbortController() : void 0;\n\t\t\tconst messageId = this._requestMessageId++;\n\t\t\tcleanupMessageId = messageId;\n\t\t\tconst jsonrpcRequest = {\n\t\t\t\t...request,\n\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\tid: messageId\n\t\t\t};\n\t\t\tif (options?.onprogress) {\n\t\t\t\tthis._progressHandlers.set(messageId, options.onprogress);\n\t\t\t\tjsonrpcRequest.params = {\n\t\t\t\t\t...request.params,\n\t\t\t\t\t_meta: {\n\t\t\t\t\t\t...request.params?._meta,\n\t\t\t\t\t\tprogressToken: messageId\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst outbound = this._envelopeOutbound(jsonrpcRequest);\n\t\t\tlet responseReceived = false;\n\t\t\tconst cancel = (reason) => {\n\t\t\t\tif (responseReceived) return;\n\t\t\t\tthis._progressHandlers.delete(messageId);\n\t\t\t\tif (requestAbort === void 0) this._transport?.send(this._envelopeOutbound({\n\t\t\t\t\tjsonrpc: \"2.0\",\n\t\t\t\t\tmethod: \"notifications/cancelled\",\n\t\t\t\t\tparams: {\n\t\t\t\t\t\trequestId: messageId,\n\t\t\t\t\t\treason: String(reason)\n\t\t\t\t\t}\n\t\t\t\t}), {\n\t\t\t\t\trelatedRequestId,\n\t\t\t\t\tresumptionToken,\n\t\t\t\t\tonresumptiontoken\n\t\t\t\t}).catch((error) => this._onerror(/* @__PURE__ */ new Error(`Failed to send cancellation: ${error}`)));\n\t\t\t\telse requestAbort.abort();\n\t\t\t\treject(reason instanceof SdkError ? reason : new SdkError(SdkErrorCode.RequestTimeout, String(reason)));\n\t\t\t};\n\t\t\tthis._responseHandlers.set(messageId, (response) => {\n\t\t\t\tif (options?.signal?.aborted) return;\n\t\t\t\tresponseReceived = true;\n\t\t\t\tif (response instanceof Error) return reject(response);\n\t\t\t\tlet decoded;\n\t\t\t\ttry {\n\t\t\t\t\tdecoded = codec.decodeResult(request.method, response.result);\n\t\t\t\t} catch (error) {\n\t\t\t\t\treturn reject(error instanceof Error ? error : new Error(String(error)));\n\t\t\t\t}\n\t\t\t\tif (decoded.kind === \"invalid\") return reject(decoded.error);\n\t\t\t\tif (decoded.kind === \"input_required\") {\n\t\t\t\t\tif (options?.allowInputRequired === true) return resolve(manualInputRequiredValue(decoded));\n\t\t\t\t\tconst flow = {\n\t\t\t\t\t\tcodec,\n\t\t\t\t\t\trequest,\n\t\t\t\t\t\tresultSchema,\n\t\t\t\t\t\toptions,\n\t\t\t\t\t\tflowStartedAt,\n\t\t\t\t\t\tretry: (params, legOptions) => this._requestWithSchemaViaCodec(codec, params === void 0 ? { method: request.method } : {\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tparams\n\t\t\t\t\t\t}, resultSchema, legOptions)\n\t\t\t\t\t};\n\t\t\t\t\treturn resolve(this._resolveNonCompleteResult(decoded, flow));\n\t\t\t\t}\n\t\t\t\tconst result = decoded.result;\n\t\t\t\tvalidateStandardSchema(resultSchema, result).then((parseResult) => {\n\t\t\t\t\tif (parseResult.success) resolve(parseResult.data);\n\t\t\t\t\telse reject(new SdkError(SdkErrorCode.InvalidResult, `Invalid result for ${request.method}: ${parseResult.error}`));\n\t\t\t\t}, reject);\n\t\t\t});\n\t\t\tonAbort = () => cancel(options?.signal?.reason);\n\t\t\toptions?.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\tconst timeout = options?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC;\n\t\t\tconst timeoutHandler = () => cancel(new SdkError(SdkErrorCode.RequestTimeout, \"Request timed out\", { timeout }));\n\t\t\tthis._setupTimeout(messageId, timeout, options?.maxTotalTimeout, timeoutHandler, options?.resetTimeoutOnProgress ?? false);\n\t\t\tthis._transport.send(outbound, {\n\t\t\t\trelatedRequestId,\n\t\t\t\tresumptionToken,\n\t\t\t\tonresumptiontoken,\n\t\t\t\theaders,\n\t\t\t\trequestSignal: requestAbort?.signal\n\t\t\t}).catch((error) => {\n\t\t\t\tthis._progressHandlers.delete(messageId);\n\t\t\t\treject(error);\n\t\t\t});\n\t\t}).finally(() => {\n\t\t\tif (onAbort) options?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\tif (cleanupMessageId !== void 0) {\n\t\t\t\tthis._responseHandlers.delete(cleanupMessageId);\n\t\t\t\tthis._cleanupTimeout(cleanupMessageId);\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Emits a notification, which is a one-way message that does not expect a response.\n\t*/\n\tasync notification(notification, options) {\n\t\treturn this._notificationViaCodec(this._resolveOutboundCodec(notification.method), notification, options);\n\t}\n\t/**\n\t* The notification funnel proper, keyed by the resolved era codec —\n\t* direct sends and related notifications (`ctx.mcpReq.notify`) alike\n\t* resolve through the instance's negotiated era at send time.\n\t*/\n\tasync _notificationViaCodec(codec, notification, options) {\n\t\tif (!this._transport) throw new SdkError(SdkErrorCode.NotConnected, \"Not connected\");\n\t\tif (isSpecNotificationMethod(notification.method) && !codec.hasNotificationMethod(notification.method)) throw new SdkError(SdkErrorCode.MethodNotSupportedByProtocolVersion, `Notification '${notification.method}' is not supported by the negotiated protocol version (wire era ${codec.era})`, {\n\t\t\tmethod: notification.method,\n\t\t\tera: codec.era\n\t\t});\n\t\tthis.assertNotificationCapability(notification.method);\n\t\tconst jsonrpcNotification = this._envelopeOutbound({\n\t\t\tjsonrpc: \"2.0\",\n\t\t\t...notification\n\t\t});\n\t\tif ((this._options?.debouncedNotificationMethods ?? []).includes(notification.method) && !notification.params && !options?.relatedRequestId) {\n\t\t\tif (this._pendingDebouncedNotifications.has(notification.method)) return;\n\t\t\tthis._pendingDebouncedNotifications.add(notification.method);\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tthis._pendingDebouncedNotifications.delete(notification.method);\n\t\t\t\tif (!this._transport) return;\n\t\t\t\tthis._transport?.send(jsonrpcNotification, options).catch((error) => this._onerror(error));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tawait this._transport.send(jsonrpcNotification, options);\n\t}\n\tsetRequestHandler(method, schemasOrHandler, maybeHandler) {\n\t\tthis.assertRequestHandlerCapability(method);\n\t\tlet stored;\n\t\tif (typeof schemasOrHandler === \"function\") {\n\t\t\tif (!isSpecRequestMethod(method)) throw new TypeError(`'${method}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);\n\t\t\tstored = (request, ctx) => {\n\t\t\t\tconst dispatchCodec = this._negotiatedWireCodec();\n\t\t\t\tlet outcome = dispatchCodec.validateRequest(method, request);\n\t\t\t\tif (!outcome.ok && outcome.reason === \"not-in-era\") outcome = dispatchCodec.validateInputRequest(method, request);\n\t\t\t\tif (!outcome.ok) {\n\t\t\t\t\tif (outcome.reason === \"not-in-era\") throw new ProtocolError(ProtocolErrorCode.InternalError, `No wire schema for ${method} in the resolved era`);\n\t\t\t\t\tthrow new Error(outcome.message);\n\t\t\t\t}\n\t\t\t\treturn Promise.resolve(schemasOrHandler(outcome.value, ctx));\n\t\t\t};\n\t\t} else if (maybeHandler) stored = async (request, ctx) => {\n\t\t\tconst parsed = await validateStandardSchema(schemasOrHandler.params, { ...request.params });\n\t\t\tif (!parsed.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid params for ${method}: ${parsed.error}`);\n\t\t\treturn maybeHandler(parsed.data, ctx);\n\t\t};\n\t\telse throw new TypeError(\"setRequestHandler: handler is required\");\n\t\tthis._requestHandlers.set(method, this._wrapHandler(method, stored));\n\t}\n\t/**\n\t* Hook for subclasses to wrap a registered request handler with role-specific\n\t* validation or behavior (e.g. `Server` validates `tools/call` results, `Client`\n\t* validates `elicitation/create` mode and result). Runs for both the 2-arg and\n\t* 3-arg registration paths. The default implementation is identity.\n\t*\n\t* Subclasses overriding this hook avoid redeclaring `setRequestHandler`'s overload set.\n\t*/\n\t_wrapHandler(_method, handler) {\n\t\treturn handler;\n\t}\n\t/**\n\t* Hook for subclasses to supply the implementation identity the 2026-era\n\t* encode seam stamps into outbound result `_meta` under\n\t* `io.modelcontextprotocol/serverInfo` (spec PR #3002: servers SHOULD\n\t* identify themselves on every response). The default is `undefined` — no\n\t* stamp. Only `Server` overrides this: the key identifies the software\n\t* producing a response, and the 2025-era codec never stamps anything\n\t* regardless (the never-stamp guarantee).\n\t*/\n\t_outboundServerInfo() {}\n\t/**\n\t* Removes the request handler for the given method.\n\t*/\n\tremoveRequestHandler(method) {\n\t\tthis._requestHandlers.delete(method);\n\t}\n\t/**\n\t* Asserts that a request handler has not already been set for the given method, in preparation for a new one being automatically installed.\n\t*/\n\tassertCanSetRequestHandler(method) {\n\t\tif (this._requestHandlers.has(method)) throw new Error(`A request handler for ${method} already exists, which would be overridden`);\n\t}\n\tsetNotificationHandler(method, schemasOrHandler, maybeHandler) {\n\t\tif (typeof schemasOrHandler === \"function\") {\n\t\t\tif (!isSpecNotificationMethod(method)) throw new TypeError(`'${method}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);\n\t\t\tthis._notificationHandlers.set(method, (notification, codec) => {\n\t\t\t\tconst outcome = codec.validateNotification(method, notification);\n\t\t\t\tif (!outcome.ok) {\n\t\t\t\t\tif (outcome.reason === \"not-in-era\") throw new ProtocolError(ProtocolErrorCode.InternalError, `No wire schema for ${method} in the resolved era`);\n\t\t\t\t\tthrow new Error(outcome.message);\n\t\t\t\t}\n\t\t\t\treturn Promise.resolve(schemasOrHandler(outcome.value));\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (!maybeHandler) throw new TypeError(\"setNotificationHandler: handler is required\");\n\t\tthis._notificationHandlers.set(method, async (notification) => {\n\t\t\tconst parsed = await validateStandardSchema(schemasOrHandler.params, { ...notification.params });\n\t\t\tif (!parsed.success) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Invalid params for notification ${method}: ${parsed.error}`);\n\t\t\tawait maybeHandler(parsed.data, notification);\n\t\t});\n\t}\n\t/**\n\t* Removes the notification handler for the given method.\n\t*/\n\tremoveNotificationHandler(method) {\n\t\tthis._notificationHandlers.delete(method);\n\t}\n};\nfunction isPlainObject$1(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\nfunction mergeCapabilities(base, additional) {\n\tconst result = { ...base };\n\tfor (const key in additional) {\n\t\tconst k = key;\n\t\tconst addValue = additional[k];\n\t\tif (addValue === void 0) continue;\n\t\tconst baseValue = result[k];\n\t\tresult[k] = isPlainObject$1(baseValue) && isPlainObject$1(addValue) ? {\n\t\t\t...baseValue,\n\t\t\t...addValue\n\t\t} : addValue;\n\t}\n\treturn result;\n}\n\n//#endregion\n//#region ../core-internal/src/shared/inputRequiredEngine.ts\n/**\n* The multi-round-trip auto-fulfilment ENGINE (protocol revision 2026-07-28):\n* the wiring between the protocol layer's response funnel, the\n* already-registered input handlers, and the pure {@link runInputRequiredDriver}\n* loop. The engine is what the `Client` plugs into the funnel's\n* `_resolveNonCompleteResult` extension point — `Protocol` itself only knows\n* the input-required branch exists.\n*\n* Relocated here so the shared `Protocol` base stays generic: the only\n* MRTR-specific code that remains in `protocol.ts` is the irreducible\n* input-required branch in the response path, the type surface (the\n* `allowInputRequired` request option and the `inputResponses`/`requestState`/\n* `droppedInputResponseKeys` context fields), and the named extension point.\n*/\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/**\n* Splits a retried request's `inputResponses` map into the BARE response\n* entries the spec defines and everything else. The spec's embedded responses\n* are the bare result objects (an `ElicitResult`, `CreateMessageResult`, or\n* `ListRootsResult`); a wrapped `{method, result}` envelope (a shape some\n* peers emit) is never accepted as a response — its key is recorded so the\n* handler can re-issue the corresponding input request.\n*/\nfunction partitionInputResponses(inputResponses) {\n\tconst accepted = {};\n\tconst droppedKeys = [];\n\tif (!isPlainObject(inputResponses)) return {\n\t\taccepted,\n\t\tdroppedKeys\n\t};\n\tfor (const [key, entry] of Object.entries(inputResponses)) {\n\t\tif (!isPlainObject(entry) || \"method\" in entry || \"result\" in entry) {\n\t\t\tdroppedKeys.push(key);\n\t\t\tcontinue;\n\t\t}\n\t\taccepted[key] = entry;\n\t}\n\treturn {\n\t\taccepted,\n\t\tdroppedKeys\n\t};\n}\n/**\n* Related send/notify are unavailable inside an embedded input-request\n* handler: the request is fulfilled locally by the multi-round-trip driver,\n* so there is no live peer request to relate messages to.\n*/\nfunction relatedMessagingUnavailable(member) {\n\tthrow new SdkError(SdkErrorCode.SendFailed, `ctx.mcpReq.${member} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`);\n}\n/**\n* The synthesized {@linkcode BaseContext} for an embedded input request: the\n* id is the `inputRequests` key (correlation only — it is not a JSON-RPC\n* message id), the supplied abort signal chains the originating call's signal\n* through, and related `send`/`notify` are unavailable because there is no\n* live peer request to relate them to.\n*/\nfunction synthesizeInputRequestContext(key, method, params, signal, sessionId) {\n\treturn {\n\t\tsessionId,\n\t\tmcpReq: {\n\t\t\tid: key,\n\t\t\tmethod,\n\t\t\t_meta: params?.[\"_meta\"],\n\t\t\trequestState: requestStateAccessor(void 0),\n\t\t\tsignal,\n\t\t\tsend: (() => relatedMessagingUnavailable(\"send\")),\n\t\t\tnotify: () => relatedMessagingUnavailable(\"notify\")\n\t\t}\n\t};\n}\n/**\n* Dispatches one embedded (de-JSON-RPC'd) input request to the locally\n* registered handler for its method and resolves with the bare response.\n*\n* The handler runs through the same stored handler chain as a wire request\n* (including role-specific validation installed by `_wrapHandler`), with a\n* synthesized context (see {@link synthesizeInputRequestContext}).\n*/\nasync function dispatchInputRequest(host, codec, key, entry, signal) {\n\tif (!isPlainObject(entry) || typeof entry[\"method\"] !== \"string\") throw new SdkError(SdkErrorCode.InvalidResult, `Invalid input request '${key}': each inputRequests entry must be an embedded request object with a method`, { key });\n\tconst method = entry[\"method\"];\n\tif (!codec.hasInputRequestMethod(method)) throw new SdkError(SdkErrorCode.InvalidResult, `Invalid input request '${key}': '${method}' is not an embedded request the ${codec.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`, {\n\t\tkey,\n\t\tmethod\n\t});\n\tconst handler = host.getRequestHandler(method);\n\tif (handler === void 0) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Cannot fulfil input request '${key}': no handler is registered for '${method}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`, {\n\t\tkey,\n\t\tmethod\n\t});\n\tconst params = isPlainObject(entry[\"params\"]) ? entry[\"params\"] : void 0;\n\treturn await handler({\n\t\tjsonrpc: \"2.0\",\n\t\tid: key,\n\t\tmethod,\n\t\t...params !== void 0 && { params }\n\t}, host.buildContext(synthesizeInputRequestContext(key, method, params, signal, host.sessionId)));\n}\n/**\n* Builds the per-retry-leg {@linkcode RequestOptions} from the originating\n* call's options.\n*\n* Only the fields that are correct to apply to every leg carry over (a\n* deliberate whitelist): the per-leg `timeout`, the (shrinking) total budget\n* `maxTotalTimeout`, the caller's `onprogress`/`resetTimeoutOnProgress`, and\n* the caller's abort `signal`. Everything else — in particular\n* `relatedRequestId`, `resumptionToken`, and `onresumptiontoken` — is scoped\n* to the originating wire leg and is NOT inherited by retries.\n*/\nfunction buildRetryLegRequestOptions(options, legOptions) {\n\treturn {\n\t\t...options?.signal !== void 0 && { signal: options.signal },\n\t\t...options?.onprogress !== void 0 && { onprogress: options.onprogress },\n\t\t...options?.resetTimeoutOnProgress !== void 0 && { resetTimeoutOnProgress: options.resetTimeoutOnProgress },\n\t\t...options?.headers !== void 0 && { headers: options.headers },\n\t\t...legOptions.timeout !== void 0 && { timeout: legOptions.timeout },\n\t\t...legOptions.maxTotalTimeout !== void 0 && { maxTotalTimeout: legOptions.maxTotalTimeout },\n\t\tallowInputRequired: true\n\t};\n}\n/**\n* Runs the auto-fulfilment flow for one originating request whose response\n* came back as `input_required`: builds the driver hooks (embedded-request\n* dispatch + retry through the funnel) and hands them to\n* {@link runInputRequiredDriver}. Resolves with the final complete result\n* (already validated by the retry leg) or rejects with a typed error.\n*/\nfunction runInputRequiredFlow(host, config, decoded, flow) {\n\tconst { codec, request, options, flowStartedAt } = flow;\n\tconst firstPayload = {\n\t\tinputRequests: decoded.inputRequests,\n\t\t...decoded.requestState !== void 0 && { requestState: decoded.requestState }\n\t};\n\tconst hooks = {\n\t\tdispatchInputRequest: (key, entry, signal) => dispatchInputRequest(host, codec, key, entry, signal),\n\t\tretry: (params, legOptions) => flow.retry(params, buildRetryLegRequestOptions(options, legOptions))\n\t};\n\treturn runInputRequiredDriver({\n\t\tconfig,\n\t\tmethod: request.method,\n\t\toriginalParams: request.params,\n\t\tfirstPayload,\n\t\tflowStartedAt,\n\t\tsignal: options?.signal,\n\t\trequestOptions: {\n\t\t\t...options?.timeout !== void 0 && { timeout: options.timeout },\n\t\t\t...options?.maxTotalTimeout !== void 0 && { maxTotalTimeout: options.maxTotalTimeout },\n\t\t\t...options?.onprogress !== void 0 && { onprogress: options.onprogress }\n\t\t},\n\t\thooks\n\t});\n}\n/**\n* Builds the manual-mode {@linkcode InputRequiredResult} value from the\n* codec's decoded payload — what an `allowInputRequired: true` caller\n* receives instead of the auto-fulfilled complete result.\n*/\nfunction manualInputRequiredValue(decoded) {\n\treturn {\n\t\tresultType: \"input_required\",\n\t\tinputRequests: decoded.inputRequests,\n\t\t...decoded.requestState !== void 0 && { requestState: decoded.requestState }\n\t};\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/content-type@1.0.5/node_modules/content-type/index.js\n/*!\n* content-type\n* Copyright(c) 2015 Douglas Christopher Wilson\n* MIT Licensed\n*/\nvar require_content_type = /* @__PURE__ */ __commonJSMin(((exports) => {\n\t/**\n\t* RegExp to match *( \";\" parameter ) in RFC 7231 sec 3.1.1.1\n\t*\n\t* parameter = token \"=\" ( token / quoted-string )\n\t* token = 1*tchar\n\t* tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" / \"*\"\n\t* / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\n\t* / DIGIT / ALPHA\n\t* ; any VCHAR, except delimiters\n\t* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE\n\t* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text\n\t* obs-text = %x80-FF\n\t* quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n\t*/\n\tvar PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *(\"(?:[\\u000b\\u0020\\u0021\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u000b\\u0020-\\u00ff])*\"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g;\n\t/**\n\t* RegExp to match quoted-pair in RFC 7230 sec 3.2.6\n\t*\n\t* quoted-pair = \"\\\" ( HTAB / SP / VCHAR / obs-text )\n\t* obs-text = %x80-FF\n\t*/\n\tvar QESC_REGEXP = /\\\\([\\u000b\\u0020-\\u00ff])/g;\n\t/**\n\t* RegExp to match type in RFC 7231 sec 3.1.1.1\n\t*\n\t* media-type = type \"/\" subtype\n\t* type = token\n\t* subtype = token\n\t*/\n\tvar TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;\n\texports.parse = parse;\n\t/**\n\t* Parse media type to object.\n\t*\n\t* @param {string|object} string\n\t* @return {Object}\n\t* @public\n\t*/\n\tfunction parse(string) {\n\t\tif (!string) throw new TypeError(\"argument string is required\");\n\t\tvar header = typeof string === \"object\" ? getcontenttype(string) : string;\n\t\tif (typeof header !== \"string\") throw new TypeError(\"argument string is required to be a string\");\n\t\tvar index = header.indexOf(\";\");\n\t\tvar type = index !== -1 ? header.slice(0, index).trim() : header.trim();\n\t\tif (!TYPE_REGEXP.test(type)) throw new TypeError(\"invalid media type\");\n\t\tvar obj = new ContentType(type.toLowerCase());\n\t\tif (index !== -1) {\n\t\t\tvar key;\n\t\t\tvar match;\n\t\t\tvar value;\n\t\t\tPARAM_REGEXP.lastIndex = index;\n\t\t\twhile (match = PARAM_REGEXP.exec(header)) {\n\t\t\t\tif (match.index !== index) throw new TypeError(\"invalid parameter format\");\n\t\t\t\tindex += match[0].length;\n\t\t\t\tkey = match[1].toLowerCase();\n\t\t\t\tvalue = match[2];\n\t\t\t\tif (value.charCodeAt(0) === 34) {\n\t\t\t\t\tvalue = value.slice(1, -1);\n\t\t\t\t\tif (value.indexOf(\"\\\\\") !== -1) value = value.replace(QESC_REGEXP, \"$1\");\n\t\t\t\t}\n\t\t\t\tobj.parameters[key] = value;\n\t\t\t}\n\t\t\tif (index !== header.length) throw new TypeError(\"invalid parameter format\");\n\t\t}\n\t\treturn obj;\n\t}\n\t/**\n\t* Get content-type from req/res objects.\n\t*\n\t* @param {object}\n\t* @return {Object}\n\t* @private\n\t*/\n\tfunction getcontenttype(obj) {\n\t\tvar header;\n\t\tif (typeof obj.getHeader === \"function\") header = obj.getHeader(\"content-type\");\n\t\telse if (typeof obj.headers === \"object\") header = obj.headers && obj.headers[\"content-type\"];\n\t\tif (typeof header !== \"string\") throw new TypeError(\"content-type header is missing from object\");\n\t\treturn header;\n\t}\n\t/**\n\t* Class to represent a content type.\n\t* @private\n\t*/\n\tfunction ContentType(type) {\n\t\tthis.parameters = Object.create(null);\n\t\tthis.type = type;\n\t}\n}));\n\n//#endregion\n//#region ../core-internal/src/shared/mediaType.ts\nvar import_content_type = /* @__PURE__ */ __toESM(require_content_type(), 1);\n/**\n* Extracts the media type (the lowercased `type/subtype` pair, without\n* parameters) from a raw `Content-Type` header value, or `undefined` when the\n* header is missing or empty.\n*\n* Content-Type comparisons must use the parsed media type, never a substring\n* search of the raw header: a value like `text/plain; a=application/json`\n* contains the substring `application/json` but its media type is\n* `text/plain`, and case variants or parameters make naive string comparison\n* wrong in both directions.\n*\n* \"Essence\" is the WHATWG MIME Sniffing standard's term for the bare\n* `type/subtype` pair (https://mimesniff.spec.whatwg.org/#mime-type-essence);\n* the Fetch standard's request classification is defined against it\n* (https://fetch.spec.whatwg.org/#cors-safelisted-request-header).\n*\n* Parsing is RFC 9110 (`content-type` package) first. When the parameter\n* section is malformed (`application/json;`, `application/json; charset=`),\n* browsers and most HTTP stacks still derive the media type from the segment\n* before the first `;` — the fallback matches that widely-implemented\n* behavior, so a header whose media type is unambiguous is not rejected for\n* a sloppy parameter section.\n*/\nfunction mediaTypeEssence(header) {\n\tif (!header) return;\n\ttry {\n\t\treturn import_content_type.parse(header).type;\n\t} catch {\n\t\tconst essence = (header.split(\";\", 1)[0] ?? \"\").trim().toLowerCase();\n\t\tif (essence === \"\" || header.slice(essence.length).includes(\",\")) return;\n\t\treturn essence;\n\t}\n}\n/**\n* Whether a raw `Content-Type` header value denotes `application/json`.\n* Parameters (for example `charset=utf-8`) are allowed and ignored; malformed\n* parameter sections do not reject a header whose media type is unambiguously\n* `application/json` (see `mediaTypeEssence` for the exact grammar).\n*/\nfunction isJsonContentType(header) {\n\tif (header === \"application/json\") return true;\n\treturn mediaTypeEssence(header) === \"application/json\";\n}\n\n//#endregion\n//#region ../core-internal/src/shared/metadataUtils.ts\n/**\n* Utilities for working with {@linkcode BaseMetadata} objects.\n*/\n/**\n* Gets the display name for an object with {@linkcode BaseMetadata}.\n* For tools, the precedence is: `title` → {@linkcode index.ToolAnnotations | annotations}.`title` → `name`\n* For other objects: `title` → `name`\n* This implements the spec requirement: \"if no title is provided, name should be used for display purposes\"\n*/\nfunction getDisplayName(metadata) {\n\tif (metadata.title !== void 0 && metadata.title !== \"\") return metadata.title;\n\tif (\"annotations\" in metadata && metadata.annotations?.title) return metadata.annotations.title;\n\treturn metadata.name;\n}\n\n//#endregion\n//#region ../core-internal/src/shared/stdio.ts\nconst STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;\n/**\n* Buffers a continuous stdio stream into discrete JSON-RPC messages.\n*/\nvar ReadBuffer = class {\n\t_buffer;\n\t_maxBufferSize;\n\tconstructor(options) {\n\t\tthis._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;\n\t}\n\tappend(chunk) {\n\t\tif ((this._buffer?.length ?? 0) + chunk.length > this._maxBufferSize) {\n\t\t\tthis.clear();\n\t\t\tthrow new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);\n\t\t}\n\t\tthis._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;\n\t}\n\treadMessage() {\n\t\twhile (this._buffer) {\n\t\t\tconst index = this._buffer.indexOf(\"\\n\");\n\t\t\tif (index === -1) return null;\n\t\t\tconst line = this._buffer.toString(\"utf8\", 0, index).replace(/\\r$/, \"\");\n\t\t\tthis._buffer = this._buffer.subarray(index + 1);\n\t\t\ttry {\n\t\t\t\treturn deserializeMessage(line);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof SyntaxError) continue;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\tclear() {\n\t\tthis._buffer = void 0;\n\t}\n};\nfunction deserializeMessage(line) {\n\treturn JSONRPCMessageSchema.parse(JSON.parse(line));\n}\nfunction serializeMessage(message) {\n\treturn JSON.stringify(message) + \"\\n\";\n}\n\n//#endregion\n//#region ../core-internal/src/shared/transport.ts\n/**\n* Normalizes `HeadersInit` to a plain `Record<string, string>` for manipulation.\n* Handles `Headers` objects, arrays of tuples, and plain objects.\n*/\nfunction normalizeHeaders(headers) {\n\tif (!headers) return {};\n\tif (headers instanceof Headers) return Object.fromEntries(headers.entries());\n\tif (Array.isArray(headers)) return Object.fromEntries(headers);\n\treturn { ...headers };\n}\n/**\n* Creates a fetch function that includes base `RequestInit` options.\n* This ensures requests inherit settings like credentials, mode, headers, etc. from the base init.\n*\n* @param baseFetch - The base fetch function to wrap (defaults to global `fetch`)\n* @param baseInit - The base `RequestInit` to merge with each request\n* @returns A wrapped fetch function that merges base options with call-specific options\n*/\nfunction createFetchWithInit(baseFetch = fetch, baseInit) {\n\tif (!baseInit) return baseFetch;\n\treturn async (url, init) => {\n\t\treturn baseFetch(url, {\n\t\t\t...baseInit,\n\t\t\t...init,\n\t\t\theaders: init?.headers ? {\n\t\t\t\t...normalizeHeaders(baseInit.headers),\n\t\t\t\t...normalizeHeaders(init.headers)\n\t\t\t} : baseInit.headers\n\t\t});\n\t};\n}\n\n//#endregion\n//#region ../core-internal/src/shared/uriTemplate.ts\nconst MAX_TEMPLATE_LENGTH = 1e6;\nconst MAX_VARIABLE_LENGTH = 1e6;\nconst MAX_TEMPLATE_EXPRESSIONS = 1e4;\nconst MAX_REGEX_LENGTH = 1e6;\nvar UriTemplate = class UriTemplate {\n\t/**\n\t* Returns true if the given string contains any URI template expressions.\n\t* A template expression is a sequence of characters enclosed in curly braces,\n\t* like `{foo}` or `{?bar}`.\n\t*/\n\tstatic isTemplate(str) {\n\t\treturn /\\{[^}\\s]+\\}/.test(str);\n\t}\n\tstatic validateLength(str, max, context) {\n\t\tif (str.length > max) throw new Error(`${context} exceeds maximum length of ${max} characters (got ${str.length})`);\n\t}\n\ttemplate;\n\tparts;\n\tget variableNames() {\n\t\treturn this.parts.flatMap((part) => typeof part === \"string\" ? [] : part.names);\n\t}\n\tconstructor(template) {\n\t\tUriTemplate.validateLength(template, MAX_TEMPLATE_LENGTH, \"Template\");\n\t\tthis.template = template;\n\t\tthis.parts = this.parse(template);\n\t}\n\ttoString() {\n\t\treturn this.template;\n\t}\n\tparse(template) {\n\t\tconst parts = [];\n\t\tlet currentText = \"\";\n\t\tlet i = 0;\n\t\tlet expressionCount = 0;\n\t\twhile (i < template.length) if (template[i] === \"{\") {\n\t\t\tif (currentText) {\n\t\t\t\tparts.push(currentText);\n\t\t\t\tcurrentText = \"\";\n\t\t\t}\n\t\t\tconst end = template.indexOf(\"}\", i);\n\t\t\tif (end === -1) throw new Error(\"Unclosed template expression\");\n\t\t\texpressionCount++;\n\t\t\tif (expressionCount > MAX_TEMPLATE_EXPRESSIONS) throw new Error(`Template contains too many expressions (max ${MAX_TEMPLATE_EXPRESSIONS})`);\n\t\t\tconst expr = template.slice(i + 1, end);\n\t\t\tconst operator = this.getOperator(expr);\n\t\t\tconst exploded = expr.includes(\"*\");\n\t\t\tconst names = this.getNames(expr);\n\t\t\tconst name = names[0];\n\t\t\tfor (const name$1 of names) UriTemplate.validateLength(name$1, MAX_VARIABLE_LENGTH, \"Variable name\");\n\t\t\tparts.push({\n\t\t\t\tname,\n\t\t\t\toperator,\n\t\t\t\tnames,\n\t\t\t\texploded\n\t\t\t});\n\t\t\ti = end + 1;\n\t\t} else {\n\t\t\tcurrentText += template[i];\n\t\t\ti++;\n\t\t}\n\t\tif (currentText) parts.push(currentText);\n\t\treturn parts;\n\t}\n\tgetOperator(expr) {\n\t\treturn [\n\t\t\t\"+\",\n\t\t\t\"#\",\n\t\t\t\".\",\n\t\t\t\"/\",\n\t\t\t\"?\",\n\t\t\t\"&\"\n\t\t].find((op) => expr.startsWith(op)) || \"\";\n\t}\n\tgetNames(expr) {\n\t\tconst operator = this.getOperator(expr);\n\t\treturn expr.slice(operator.length).split(\",\").map((name) => name.replace(\"*\", \"\").trim()).filter((name) => name.length > 0);\n\t}\n\tencodeValue(value, operator) {\n\t\tUriTemplate.validateLength(value, MAX_VARIABLE_LENGTH, \"Variable value\");\n\t\tif (operator === \"+\" || operator === \"#\") return encodeURI(value);\n\t\treturn encodeURIComponent(value);\n\t}\n\texpandPart(part, variables) {\n\t\tif (part.operator === \"?\" || part.operator === \"&\") {\n\t\t\tconst pairs = part.names.map((name) => {\n\t\t\t\tconst value$1 = variables[name];\n\t\t\t\tif (value$1 === void 0) return \"\";\n\t\t\t\treturn `${name}=${Array.isArray(value$1) ? value$1.map((v) => this.encodeValue(v, part.operator)).join(\",\") : this.encodeValue(value$1.toString(), part.operator)}`;\n\t\t\t}).filter((pair) => pair.length > 0);\n\t\t\tif (pairs.length === 0) return \"\";\n\t\t\treturn (part.operator === \"?\" ? \"?\" : \"&\") + pairs.join(\"&\");\n\t\t}\n\t\tif (part.names.length > 1) {\n\t\t\tconst values = part.names.map((name) => variables[name]).filter((v) => v !== void 0);\n\t\t\tif (values.length === 0) return \"\";\n\t\t\treturn values.map((v) => Array.isArray(v) ? v[0] : v).join(\",\");\n\t\t}\n\t\tconst value = variables[part.name];\n\t\tif (value === void 0) return \"\";\n\t\tconst encoded = (Array.isArray(value) ? value : [value]).map((v) => this.encodeValue(v, part.operator));\n\t\tswitch (part.operator) {\n\t\t\tcase \"\": return encoded.join(\",\");\n\t\t\tcase \"+\": return encoded.join(\",\");\n\t\t\tcase \"#\": return \"#\" + encoded.join(\",\");\n\t\t\tcase \".\": return \".\" + encoded.join(\".\");\n\t\t\tcase \"/\": return \"/\" + encoded.join(\"/\");\n\t\t\tdefault: return encoded.join(\",\");\n\t\t}\n\t}\n\texpand(variables) {\n\t\tlet result = \"\";\n\t\tlet hasQueryParam = false;\n\t\tfor (const part of this.parts) {\n\t\t\tif (typeof part === \"string\") {\n\t\t\t\tresult += part;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst expanded = this.expandPart(part, variables);\n\t\t\tif (!expanded) continue;\n\t\t\tresult += (part.operator === \"?\" || part.operator === \"&\") && hasQueryParam ? expanded.replace(\"?\", \"&\") : expanded;\n\t\t\tif (part.operator === \"?\" || part.operator === \"&\") hasQueryParam = true;\n\t\t}\n\t\treturn result;\n\t}\n\tescapeRegExp(str) {\n\t\treturn str.replaceAll(/[.*+?^${}()|[\\]\\\\]/g, String.raw`\\$&`);\n\t}\n\tpartToRegExp(part) {\n\t\tconst patterns = [];\n\t\tfor (const name$1 of part.names) UriTemplate.validateLength(name$1, MAX_VARIABLE_LENGTH, \"Variable name\");\n\t\tif (part.operator === \"?\" || part.operator === \"&\") {\n\t\t\tfor (let i = 0; i < part.names.length; i++) {\n\t\t\t\tconst name$1 = part.names[i];\n\t\t\t\tconst prefix = i === 0 ? \"\\\\\" + part.operator : \"&\";\n\t\t\t\tpatterns.push({\n\t\t\t\t\tpattern: prefix + this.escapeRegExp(name$1) + \"=([^&]+)\",\n\t\t\t\t\tname: name$1\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn patterns;\n\t\t}\n\t\tlet pattern;\n\t\tconst name = part.name;\n\t\tswitch (part.operator) {\n\t\t\tcase \"\":\n\t\t\t\tpattern = part.exploded ? \"([^/,]+(?:,[^/,]+)*)\" : \"([^/,]+)\";\n\t\t\t\tbreak;\n\t\t\tcase \"+\":\n\t\t\tcase \"#\":\n\t\t\t\tpattern = \"(.+)\";\n\t\t\t\tbreak;\n\t\t\tcase \".\":\n\t\t\t\tpattern = String.raw`\\.([^/,]+)`;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tpattern = \"/\" + (part.exploded ? \"([^/,]+(?:,[^/,]+)*)\" : \"([^/,]+)\");\n\t\t\t\tbreak;\n\t\t\tdefault: pattern = \"([^/]+)\";\n\t\t}\n\t\tpatterns.push({\n\t\t\tpattern,\n\t\t\tname\n\t\t});\n\t\treturn patterns;\n\t}\n\tmatch(uri) {\n\t\tUriTemplate.validateLength(uri, MAX_TEMPLATE_LENGTH, \"URI\");\n\t\tlet pattern = \"^\";\n\t\tconst names = [];\n\t\tfor (const part of this.parts) if (typeof part === \"string\") pattern += this.escapeRegExp(part);\n\t\telse {\n\t\t\tconst patterns = this.partToRegExp(part);\n\t\t\tfor (const { pattern: partPattern, name } of patterns) {\n\t\t\t\tpattern += partPattern;\n\t\t\t\tnames.push({\n\t\t\t\t\tname,\n\t\t\t\t\texploded: part.exploded\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tpattern += \"$\";\n\t\tUriTemplate.validateLength(pattern, MAX_REGEX_LENGTH, \"Generated regex pattern\");\n\t\tconst regex = new RegExp(pattern);\n\t\tconst match = uri.match(regex);\n\t\tif (!match) return null;\n\t\tconst result = {};\n\t\tfor (const [i, name_] of names.entries()) {\n\t\t\tconst { name, exploded } = name_;\n\t\t\tconst value = match[i + 1];\n\t\t\tconst cleanName = name.replace(\"*\", \"\");\n\t\t\tresult[cleanName] = exploded && value.includes(\",\") ? value.split(\",\") : value;\n\t\t}\n\t\treturn result;\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/util/inMemory.ts\n/**\n* In-memory transport for creating clients and servers that talk to each other within the same process.\n*\n* Intended for testing and development. For production in-process connections, use\n* `StreamableHTTPClientTransport` against a local server URL.\n*/\nvar InMemoryTransport = class InMemoryTransport {\n\t_otherTransport;\n\t_messageQueue = [];\n\t_closed = false;\n\tonclose;\n\tonerror;\n\tonmessage;\n\tsessionId;\n\t/**\n\t* Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a {@linkcode @modelcontextprotocol/client!client/client.Client | Client} and one to a {@linkcode @modelcontextprotocol/server!server/server.Server | Server}.\n\t*/\n\tstatic createLinkedPair() {\n\t\tconst clientTransport = new InMemoryTransport();\n\t\tconst serverTransport = new InMemoryTransport();\n\t\tclientTransport._otherTransport = serverTransport;\n\t\tserverTransport._otherTransport = clientTransport;\n\t\treturn [clientTransport, serverTransport];\n\t}\n\tasync start() {\n\t\twhile (this._messageQueue.length > 0) {\n\t\t\tconst queuedMessage = this._messageQueue.shift();\n\t\t\tthis.onmessage?.(queuedMessage.message, queuedMessage.extra);\n\t\t}\n\t}\n\tasync close() {\n\t\tif (this._closed) return;\n\t\tthis._closed = true;\n\t\tconst other = this._otherTransport;\n\t\tthis._otherTransport = void 0;\n\t\ttry {\n\t\t\tawait other?.close();\n\t\t} finally {\n\t\t\tthis.onclose?.();\n\t\t}\n\t}\n\t/**\n\t* Sends a message with optional auth info.\n\t* This is useful for testing authentication scenarios.\n\t*/\n\tasync send(message, options) {\n\t\tif (!this._otherTransport) throw new SdkError(SdkErrorCode.NotConnected, \"Not connected\");\n\t\tif (this._otherTransport.onmessage) this._otherTransport.onmessage(message, { authInfo: options?.authInfo });\n\t\telse this._otherTransport._messageQueue.push({\n\t\t\tmessage,\n\t\t\textra: { authInfo: options?.authInfo }\n\t\t});\n\t}\n};\n\n//#endregion\n//#region ../core-internal/src/wire/preload.ts\n/**\n* Explicit warm-up entry for the lazy wire-schema layers.\n*\n* The per-revision wire schemas are built lazily: each era's schema set sits\n* behind a memoized factory (`buildSchemas2025`/`buildSchemas2026`), and the\n* registry/codec lookup maps above those factories are memoized the same way.\n* That laziness is the right default on process-per-invocation runtimes (CLI\n* tools, dev servers), where module evaluation IS startup latency and most\n* short-lived processes never validate a message on both eras.\n*\n* On platforms that bill request CPU but not module evaluation — isolate-based\n* edge/serverless runtimes such as Cloudflare Workers — the trade inverts:\n* module-scope work runs during isolate warm-up outside any request, while\n* lazy construction lands inside the first request's billed (and latency\n* budgeted) CPU. `preloadSchemas()` lets deployments on such platforms move\n* the one-time construction cost back to module scope by calling it at module\n* scope themselves. The packages' own workerd shims already do this, so\n* Workers deployments get eager construction automatically.\n*/\n/**\n* Eagerly builds every lazily-constructed wire-schema layer, so that no later\n* validation pays schema-construction cost.\n*\n* Synchronous and idempotent: every layer is a memo, so the first call does\n* all the work and subsequent calls return immediately. Reference identity is\n* unaffected — this forces the same memos every lazy consumer pulls through.\n*\n* Call it at module scope on platforms that bill per-request CPU but not\n* module evaluation (isolate-based edge/serverless runtimes), where deferring\n* construction would move it into the first request of every fresh isolate:\n*\n* ```ts\n* // from '@modelcontextprotocol/server' or '@modelcontextprotocol/client' —\n* // each package bundles its own schema copy, so warm the one(s) you import.\n* preloadSchemas(); // module scope — runs during isolate warm-up\n* ```\n*\n* On Node CLIs and other process-per-invocation runtimes, prefer the lazy\n* default — there, module-scope construction is pure added boot latency.\n*/\nfunction preloadSchemas() {\n\tbuildSchemas2025();\n\tbuildSchemas2026();\n\twarmRegistryMaps2025();\n\twarmInputSchemaMaps2026();\n\twarmWireResultSchemas2026();\n}\n\n//#endregion\n//#region ../core-internal/src/validators/fromJsonSchema.ts\n/**\n* Wrap a raw JSON Schema object as a {@linkcode StandardSchemaWithJSON} so it can be\n* passed to `registerTool` / `registerPrompt`. Use this when you already have JSON\n* Schema (e.g. from TypeBox, or hand-written) and want to register it without going\n* through a Standard Schema library.\n*\n* The callback arguments will be typed `unknown` (raw JSON Schema has no TypeScript\n* types attached). Cast at the call site, or use the generic `fromJsonSchema<MyType>(...)`.\n*\n* @param schema - A JSON Schema object describing the expected shape\n* @param validator - A validator provider. When importing `fromJsonSchema` from\n* `@modelcontextprotocol/server` or `@modelcontextprotocol/client`, a runtime-appropriate\n* default is provided automatically (AJV on Node.js, CfWorker on edge runtimes).\n*\n* @example\n* ```ts source=\"./fromJsonSchema.examples.ts#fromJsonSchema_basicUsage\"\n* const inputSchema = fromJsonSchema<{ name: string }>(\n* { type: 'object', properties: { name: { type: 'string' } }, required: ['name'] },\n* validator\n* );\n* // Use with server.registerTool('greet', { inputSchema }, handler)\n* ```\n*/\nfunction fromJsonSchema(schema, validator) {\n\tconst check = validator.getValidator(schema);\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"mcp\",\n\t\tjsonSchema: {\n\t\t\tinput: () => schema,\n\t\t\toutput: () => schema\n\t\t},\n\t\tvalidate: (data) => {\n\t\t\tconst result = check(data);\n\t\t\treturn result.valid ? { value: result.data } : { issues: [{ message: result.errorMessage }] };\n\t\t}\n\t} };\n}\n\n//#endregion\nexport { legacyProtocolVersions as $, isInitializeRequest as A, SdkErrorCode as At, DiscoverResultSchema as B, HEADER_MISMATCH_ERROR_CODE as C, OAuthClientInformationFullSchema as Ct, assertCompleteRequestPrompt as D, OAuthTokensSchema as Dt, scanXMcpHeaderDeclarations as E, OAuthProtectedResourceMetadataSchema as Et, isJSONRPCRequest as F, stampErrorBrands as Ft, MissingRequiredClientCapabilityError as G, ListChangedOptionsBaseSchema as H, isJSONRPCResponse as I, UnsupportedProtocolVersionError as J, ProtocolError as K, isJSONRPCResultResponse as L, isInputRequiredResult as M, OAuthError as Mt, isJSONRPCErrorResponse as N, OAuthErrorCode as Nt, assertCompleteRequestResourceTemplate as O, OpenIdProviderDiscoveryMetadataSchema as Ot, isJSONRPCNotification as P, brandedHasInstance as Pt, isModernProtocolVersion as Q, isTaskAugmentedRequestParams as R, parseSchema as S, IdJagTokenExchangeResponseSchema as St, encodeMcpParamValue as T, OAuthMetadataSchema as Tt, MODERN_WIRE_REVISION as U, JSONRPCMessageSchema as V, codecForVersion as W, ProtocolErrorCode as X, UrlElicitationRequiredError as Y, SUPPORTED_MODERN_PROTOCOL_VERSIONS as Z, mergeCapabilities as _, SUPPORTED_PROTOCOL_VERSIONS as _t, createFetchWithInit as a, INTERNAL_ERROR as at, resolveInputRequiredDriverConfig as b, checkResourceAllowed as bt, STDIO_DEFAULT_MAX_BUFFER_SIZE as c, JSONRPC_VERSION as ct, getDisplayName as d, METHOD_NOT_FOUND as dt, modernProtocolVersions as et, isJsonContentType as f, PARSE_ERROR as ft, Protocol as g, SUBSCRIPTION_ID_META_KEY as gt, DEFAULT_REQUEST_TIMEOUT_MSEC as h, SERVER_INFO_META_KEY as ht, UriTemplate as i, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as it, isInitializedNotification as j, SdkHttpError as jt, isCallToolResult as k, SdkError as kt, deserializeMessage as l, LATEST_PROTOCOL_VERSION as lt, runInputRequiredFlow as m, RELATED_TASK_META_KEY as mt, preloadSchemas as n, CLIENT_CAPABILITIES_META_KEY as nt, normalizeHeaders as o, INVALID_PARAMS as ot, mediaTypeEssence as p, PROTOCOL_VERSION_META_KEY as pt, ResourceNotFoundError as q, InMemoryTransport as r, CLIENT_INFO_META_KEY as rt, ReadBuffer as s, INVALID_REQUEST as st, fromJsonSchema as t, BAGGAGE_META_KEY as tt, serializeMessage as u, LOG_LEVEL_META_KEY as ut, isSpecType as v, TRACEPARENT_META_KEY as vt, buildMcpParamHeaders as w, OAuthErrorResponseSchema as wt, withInputRequired as x, resourceUrlFromServerUrl as xt, specTypeSchemas as y, TRACESTATE_META_KEY as yt, parseJSONRPCMessage as z };\n//# sourceMappingURL=src-D_zzAWoS.mjs.map","import { r as __toESM, t as __commonJSMin } from \"./chunk-Br0eD_fh.mjs\";\nimport { t as declaredDialect } from \"./dialects-BOhdv1Fc.mjs\";\n\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js\nvar require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;\n\tvar _CodeOrName = class {};\n\texports._CodeOrName = _CodeOrName;\n\texports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\n\tvar Name = class extends _CodeOrName {\n\t\tconstructor(s) {\n\t\t\tsuper();\n\t\t\tif (!exports.IDENTIFIER.test(s)) throw new Error(\"CodeGen: name must be a valid identifier\");\n\t\t\tthis.str = s;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t\temptyStr() {\n\t\t\treturn false;\n\t\t}\n\t\tget names() {\n\t\t\treturn { [this.str]: 1 };\n\t\t}\n\t};\n\texports.Name = Name;\n\tvar _Code = class extends _CodeOrName {\n\t\tconstructor(code) {\n\t\t\tsuper();\n\t\t\tthis._items = typeof code === \"string\" ? [code] : code;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t\temptyStr() {\n\t\t\tif (this._items.length > 1) return false;\n\t\t\tconst item = this._items[0];\n\t\t\treturn item === \"\" || item === \"\\\"\\\"\";\n\t\t}\n\t\tget str() {\n\t\t\tvar _a;\n\t\t\treturn (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, \"\");\n\t\t}\n\t\tget names() {\n\t\t\tvar _a;\n\t\t\treturn (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {\n\t\t\t\tif (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1;\n\t\t\t\treturn names;\n\t\t\t}, {});\n\t\t}\n\t};\n\texports._Code = _Code;\n\texports.nil = new _Code(\"\");\n\tfunction _(strs, ...args) {\n\t\tconst code = [strs[0]];\n\t\tlet i = 0;\n\t\twhile (i < args.length) {\n\t\t\taddCodeArg(code, args[i]);\n\t\t\tcode.push(strs[++i]);\n\t\t}\n\t\treturn new _Code(code);\n\t}\n\texports._ = _;\n\tconst plus = new _Code(\"+\");\n\tfunction str(strs, ...args) {\n\t\tconst expr = [safeStringify(strs[0])];\n\t\tlet i = 0;\n\t\twhile (i < args.length) {\n\t\t\texpr.push(plus);\n\t\t\taddCodeArg(expr, args[i]);\n\t\t\texpr.push(plus, safeStringify(strs[++i]));\n\t\t}\n\t\toptimize(expr);\n\t\treturn new _Code(expr);\n\t}\n\texports.str = str;\n\tfunction addCodeArg(code, arg) {\n\t\tif (arg instanceof _Code) code.push(...arg._items);\n\t\telse if (arg instanceof Name) code.push(arg);\n\t\telse code.push(interpolate(arg));\n\t}\n\texports.addCodeArg = addCodeArg;\n\tfunction optimize(expr) {\n\t\tlet i = 1;\n\t\twhile (i < expr.length - 1) {\n\t\t\tif (expr[i] === plus) {\n\t\t\t\tconst res = mergeExprItems(expr[i - 1], expr[i + 1]);\n\t\t\t\tif (res !== void 0) {\n\t\t\t\t\texpr.splice(i - 1, 3, res);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\texpr[i++] = \"+\";\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n\tfunction mergeExprItems(a, b) {\n\t\tif (b === \"\\\"\\\"\") return a;\n\t\tif (a === \"\\\"\\\"\") return b;\n\t\tif (typeof a == \"string\") {\n\t\t\tif (b instanceof Name || a[a.length - 1] !== \"\\\"\") return;\n\t\t\tif (typeof b != \"string\") return `${a.slice(0, -1)}${b}\"`;\n\t\t\tif (b[0] === \"\\\"\") return a.slice(0, -1) + b.slice(1);\n\t\t\treturn;\n\t\t}\n\t\tif (typeof b == \"string\" && b[0] === \"\\\"\" && !(a instanceof Name)) return `\"${a}${b.slice(1)}`;\n\t}\n\tfunction strConcat(c1, c2) {\n\t\treturn c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;\n\t}\n\texports.strConcat = strConcat;\n\tfunction interpolate(x) {\n\t\treturn typeof x == \"number\" || typeof x == \"boolean\" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(\",\") : x);\n\t}\n\tfunction stringify(x) {\n\t\treturn new _Code(safeStringify(x));\n\t}\n\texports.stringify = stringify;\n\tfunction safeStringify(x) {\n\t\treturn JSON.stringify(x).replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\");\n\t}\n\texports.safeStringify = safeStringify;\n\tfunction getProperty(key) {\n\t\treturn typeof key == \"string\" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;\n\t}\n\texports.getProperty = getProperty;\n\tfunction getEsmExportName(key) {\n\t\tif (typeof key == \"string\" && exports.IDENTIFIER.test(key)) return new _Code(`${key}`);\n\t\tthrow new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n\t}\n\texports.getEsmExportName = getEsmExportName;\n\tfunction regexpCode(rx) {\n\t\treturn new _Code(rx.toString());\n\t}\n\texports.regexpCode = regexpCode;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js\nvar require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;\n\tconst code_1 = require_code$1();\n\tvar ValueError = class extends Error {\n\t\tconstructor(name) {\n\t\t\tsuper(`CodeGen: \"code\" for ${name} not defined`);\n\t\t\tthis.value = name.value;\n\t\t}\n\t};\n\tvar UsedValueState;\n\t(function(UsedValueState) {\n\t\tUsedValueState[UsedValueState[\"Started\"] = 0] = \"Started\";\n\t\tUsedValueState[UsedValueState[\"Completed\"] = 1] = \"Completed\";\n\t})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));\n\texports.varKinds = {\n\t\tconst: new code_1.Name(\"const\"),\n\t\tlet: new code_1.Name(\"let\"),\n\t\tvar: new code_1.Name(\"var\")\n\t};\n\tvar Scope = class {\n\t\tconstructor({ prefixes, parent } = {}) {\n\t\t\tthis._names = {};\n\t\t\tthis._prefixes = prefixes;\n\t\t\tthis._parent = parent;\n\t\t}\n\t\ttoName(nameOrPrefix) {\n\t\t\treturn nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn new code_1.Name(this._newName(prefix));\n\t\t}\n\t\t_newName(prefix) {\n\t\t\tconst ng = this._names[prefix] || this._nameGroup(prefix);\n\t\t\treturn `${prefix}${ng.index++}`;\n\t\t}\n\t\t_nameGroup(prefix) {\n\t\t\tvar _a, _b;\n\t\t\tif (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`);\n\t\t\treturn this._names[prefix] = {\n\t\t\t\tprefix,\n\t\t\t\tindex: 0\n\t\t\t};\n\t\t}\n\t};\n\texports.Scope = Scope;\n\tvar ValueScopeName = class extends code_1.Name {\n\t\tconstructor(prefix, nameStr) {\n\t\t\tsuper(nameStr);\n\t\t\tthis.prefix = prefix;\n\t\t}\n\t\tsetValue(value, { property, itemIndex }) {\n\t\t\tthis.value = value;\n\t\t\tthis.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;\n\t\t}\n\t};\n\texports.ValueScopeName = ValueScopeName;\n\tconst line = (0, code_1._)`\\n`;\n\tvar ValueScope = class extends Scope {\n\t\tconstructor(opts) {\n\t\t\tsuper(opts);\n\t\t\tthis._values = {};\n\t\t\tthis._scope = opts.scope;\n\t\t\tthis.opts = {\n\t\t\t\t...opts,\n\t\t\t\t_n: opts.lines ? line : code_1.nil\n\t\t\t};\n\t\t}\n\t\tget() {\n\t\t\treturn this._scope;\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn new ValueScopeName(prefix, this._newName(prefix));\n\t\t}\n\t\tvalue(nameOrPrefix, value) {\n\t\t\tvar _a;\n\t\t\tif (value.ref === void 0) throw new Error(\"CodeGen: ref must be passed in value\");\n\t\t\tconst name = this.toName(nameOrPrefix);\n\t\t\tconst { prefix } = name;\n\t\t\tconst valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;\n\t\t\tlet vs = this._values[prefix];\n\t\t\tif (vs) {\n\t\t\t\tconst _name = vs.get(valueKey);\n\t\t\t\tif (_name) return _name;\n\t\t\t} else vs = this._values[prefix] = /* @__PURE__ */ new Map();\n\t\t\tvs.set(valueKey, name);\n\t\t\tconst s = this._scope[prefix] || (this._scope[prefix] = []);\n\t\t\tconst itemIndex = s.length;\n\t\t\ts[itemIndex] = value.ref;\n\t\t\tname.setValue(value, {\n\t\t\t\tproperty: prefix,\n\t\t\t\titemIndex\n\t\t\t});\n\t\t\treturn name;\n\t\t}\n\t\tgetValue(prefix, keyOrRef) {\n\t\t\tconst vs = this._values[prefix];\n\t\t\tif (!vs) return;\n\t\t\treturn vs.get(keyOrRef);\n\t\t}\n\t\tscopeRefs(scopeName, values = this._values) {\n\t\t\treturn this._reduceValues(values, (name) => {\n\t\t\t\tif (name.scopePath === void 0) throw new Error(`CodeGen: name \"${name}\" has no value`);\n\t\t\t\treturn (0, code_1._)`${scopeName}${name.scopePath}`;\n\t\t\t});\n\t\t}\n\t\tscopeCode(values = this._values, usedValues, getCode) {\n\t\t\treturn this._reduceValues(values, (name) => {\n\t\t\t\tif (name.value === void 0) throw new Error(`CodeGen: name \"${name}\" has no value`);\n\t\t\t\treturn name.value.code;\n\t\t\t}, usedValues, getCode);\n\t\t}\n\t\t_reduceValues(values, valueCode, usedValues = {}, getCode) {\n\t\t\tlet code = code_1.nil;\n\t\t\tfor (const prefix in values) {\n\t\t\t\tconst vs = values[prefix];\n\t\t\t\tif (!vs) continue;\n\t\t\t\tconst nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();\n\t\t\t\tvs.forEach((name) => {\n\t\t\t\t\tif (nameSet.has(name)) return;\n\t\t\t\t\tnameSet.set(name, UsedValueState.Started);\n\t\t\t\t\tlet c = valueCode(name);\n\t\t\t\t\tif (c) {\n\t\t\t\t\t\tconst def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;\n\t\t\t\t\t\tcode = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`;\n\t\t\t\t\t} else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) code = (0, code_1._)`${code}${c}${this.opts._n}`;\n\t\t\t\t\telse throw new ValueError(name);\n\t\t\t\t\tnameSet.set(name, UsedValueState.Completed);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn code;\n\t\t}\n\t};\n\texports.ValueScope = ValueScope;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js\nvar require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;\n\tconst code_1 = require_code$1();\n\tconst scope_1 = require_scope();\n\tvar code_2 = require_code$1();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"strConcat\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.strConcat;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"getProperty\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.getProperty;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"regexpCode\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.regexpCode;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.Name;\n\t\t}\n\t});\n\tvar scope_2 = require_scope();\n\tObject.defineProperty(exports, \"Scope\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.Scope;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"ValueScope\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.ValueScope;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"ValueScopeName\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.ValueScopeName;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"varKinds\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.varKinds;\n\t\t}\n\t});\n\texports.operators = {\n\t\tGT: new code_1._Code(\">\"),\n\t\tGTE: new code_1._Code(\">=\"),\n\t\tLT: new code_1._Code(\"<\"),\n\t\tLTE: new code_1._Code(\"<=\"),\n\t\tEQ: new code_1._Code(\"===\"),\n\t\tNEQ: new code_1._Code(\"!==\"),\n\t\tNOT: new code_1._Code(\"!\"),\n\t\tOR: new code_1._Code(\"||\"),\n\t\tAND: new code_1._Code(\"&&\"),\n\t\tADD: new code_1._Code(\"+\")\n\t};\n\tvar Node = class {\n\t\toptimizeNodes() {\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(_names, _constants) {\n\t\t\treturn this;\n\t\t}\n\t};\n\tvar Def = class extends Node {\n\t\tconstructor(varKind, name, rhs) {\n\t\t\tsuper();\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.rhs = rhs;\n\t\t}\n\t\trender({ es5, _n }) {\n\t\t\tconst varKind = es5 ? scope_1.varKinds.var : this.varKind;\n\t\t\tconst rhs = this.rhs === void 0 ? \"\" : ` = ${this.rhs}`;\n\t\t\treturn `${varKind} ${this.name}${rhs};` + _n;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!names[this.name.str]) return;\n\t\t\tif (this.rhs) this.rhs = optimizeExpr(this.rhs, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};\n\t\t}\n\t};\n\tvar Assign = class extends Node {\n\t\tconstructor(lhs, rhs, sideEffects) {\n\t\t\tsuper();\n\t\t\tthis.lhs = lhs;\n\t\t\tthis.rhs = rhs;\n\t\t\tthis.sideEffects = sideEffects;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.lhs} = ${this.rhs};` + _n;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) return;\n\t\t\tthis.rhs = optimizeExpr(this.rhs, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addExprNames(this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }, this.rhs);\n\t\t}\n\t};\n\tvar AssignOp = class extends Assign {\n\t\tconstructor(lhs, op, rhs, sideEffects) {\n\t\t\tsuper(lhs, rhs, sideEffects);\n\t\t\tthis.op = op;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.lhs} ${this.op}= ${this.rhs};` + _n;\n\t\t}\n\t};\n\tvar Label = class extends Node {\n\t\tconstructor(label) {\n\t\t\tsuper();\n\t\t\tthis.label = label;\n\t\t\tthis.names = {};\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.label}:` + _n;\n\t\t}\n\t};\n\tvar Break = class extends Node {\n\t\tconstructor(label) {\n\t\t\tsuper();\n\t\t\tthis.label = label;\n\t\t\tthis.names = {};\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `break${this.label ? ` ${this.label}` : \"\"};` + _n;\n\t\t}\n\t};\n\tvar Throw = class extends Node {\n\t\tconstructor(error) {\n\t\t\tsuper();\n\t\t\tthis.error = error;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `throw ${this.error};` + _n;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.error.names;\n\t\t}\n\t};\n\tvar AnyCode = class extends Node {\n\t\tconstructor(code) {\n\t\t\tsuper();\n\t\t\tthis.code = code;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.code};` + _n;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\treturn `${this.code}` ? this : void 0;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tthis.code = optimizeExpr(this.code, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.code instanceof code_1._CodeOrName ? this.code.names : {};\n\t\t}\n\t};\n\tvar ParentNode = class extends Node {\n\t\tconstructor(nodes = []) {\n\t\t\tsuper();\n\t\t\tthis.nodes = nodes;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn this.nodes.reduce((code, n) => code + n.render(opts), \"\");\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tconst { nodes } = this;\n\t\t\tlet i = nodes.length;\n\t\t\twhile (i--) {\n\t\t\t\tconst n = nodes[i].optimizeNodes();\n\t\t\t\tif (Array.isArray(n)) nodes.splice(i, 1, ...n);\n\t\t\t\telse if (n) nodes[i] = n;\n\t\t\t\telse nodes.splice(i, 1);\n\t\t\t}\n\t\t\treturn nodes.length > 0 ? this : void 0;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tconst { nodes } = this;\n\t\t\tlet i = nodes.length;\n\t\t\twhile (i--) {\n\t\t\t\tconst n = nodes[i];\n\t\t\t\tif (n.optimizeNames(names, constants)) continue;\n\t\t\t\tsubtractNames(names, n.names);\n\t\t\t\tnodes.splice(i, 1);\n\t\t\t}\n\t\t\treturn nodes.length > 0 ? this : void 0;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.nodes.reduce((names, n) => addNames(names, n.names), {});\n\t\t}\n\t};\n\tvar BlockNode = class extends ParentNode {\n\t\trender(opts) {\n\t\t\treturn \"{\" + opts._n + super.render(opts) + \"}\" + opts._n;\n\t\t}\n\t};\n\tvar Root = class extends ParentNode {};\n\tvar Else = class extends BlockNode {};\n\tElse.kind = \"else\";\n\tvar If = class If extends BlockNode {\n\t\tconstructor(condition, nodes) {\n\t\t\tsuper(nodes);\n\t\t\tthis.condition = condition;\n\t\t}\n\t\trender(opts) {\n\t\t\tlet code = `if(${this.condition})` + super.render(opts);\n\t\t\tif (this.else) code += \"else \" + this.else.render(opts);\n\t\t\treturn code;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tsuper.optimizeNodes();\n\t\t\tconst cond = this.condition;\n\t\t\tif (cond === true) return this.nodes;\n\t\t\tlet e = this.else;\n\t\t\tif (e) {\n\t\t\t\tconst ns = e.optimizeNodes();\n\t\t\t\te = this.else = Array.isArray(ns) ? new Else(ns) : ns;\n\t\t\t}\n\t\t\tif (e) {\n\t\t\t\tif (cond === false) return e instanceof If ? e : e.nodes;\n\t\t\t\tif (this.nodes.length) return this;\n\t\t\t\treturn new If(not(cond), e instanceof If ? [e] : e.nodes);\n\t\t\t}\n\t\t\tif (cond === false || !this.nodes.length) return void 0;\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tvar _a;\n\t\t\tthis.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n\t\t\tif (!(super.optimizeNames(names, constants) || this.else)) return;\n\t\t\tthis.condition = optimizeExpr(this.condition, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\tconst names = super.names;\n\t\t\taddExprNames(names, this.condition);\n\t\t\tif (this.else) addNames(names, this.else.names);\n\t\t\treturn names;\n\t\t}\n\t};\n\tIf.kind = \"if\";\n\tvar For = class extends BlockNode {};\n\tFor.kind = \"for\";\n\tvar ForLoop = class extends For {\n\t\tconstructor(iteration) {\n\t\t\tsuper();\n\t\t\tthis.iteration = iteration;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `for(${this.iteration})` + super.render(opts);\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!super.optimizeNames(names, constants)) return;\n\t\t\tthis.iteration = optimizeExpr(this.iteration, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addNames(super.names, this.iteration.names);\n\t\t}\n\t};\n\tvar ForRange = class extends For {\n\t\tconstructor(varKind, name, from, to) {\n\t\t\tsuper();\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.from = from;\n\t\t\tthis.to = to;\n\t\t}\n\t\trender(opts) {\n\t\t\tconst varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;\n\t\t\tconst { name, from, to } = this;\n\t\t\treturn `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);\n\t\t}\n\t\tget names() {\n\t\t\treturn addExprNames(addExprNames(super.names, this.from), this.to);\n\t\t}\n\t};\n\tvar ForIter = class extends For {\n\t\tconstructor(loop, varKind, name, iterable) {\n\t\t\tsuper();\n\t\t\tthis.loop = loop;\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.iterable = iterable;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!super.optimizeNames(names, constants)) return;\n\t\t\tthis.iterable = optimizeExpr(this.iterable, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addNames(super.names, this.iterable.names);\n\t\t}\n\t};\n\tvar Func = class extends BlockNode {\n\t\tconstructor(name, args, async) {\n\t\t\tsuper();\n\t\t\tthis.name = name;\n\t\t\tthis.args = args;\n\t\t\tthis.async = async;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `${this.async ? \"async \" : \"\"}function ${this.name}(${this.args})` + super.render(opts);\n\t\t}\n\t};\n\tFunc.kind = \"func\";\n\tvar Return = class extends ParentNode {\n\t\trender(opts) {\n\t\t\treturn \"return \" + super.render(opts);\n\t\t}\n\t};\n\tReturn.kind = \"return\";\n\tvar Try = class extends BlockNode {\n\t\trender(opts) {\n\t\t\tlet code = \"try\" + super.render(opts);\n\t\t\tif (this.catch) code += this.catch.render(opts);\n\t\t\tif (this.finally) code += this.finally.render(opts);\n\t\t\treturn code;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tvar _a, _b;\n\t\t\tsuper.optimizeNodes();\n\t\t\t(_a = this.catch) === null || _a === void 0 || _a.optimizeNodes();\n\t\t\t(_b = this.finally) === null || _b === void 0 || _b.optimizeNodes();\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tvar _a, _b;\n\t\t\tsuper.optimizeNames(names, constants);\n\t\t\t(_a = this.catch) === null || _a === void 0 || _a.optimizeNames(names, constants);\n\t\t\t(_b = this.finally) === null || _b === void 0 || _b.optimizeNames(names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\tconst names = super.names;\n\t\t\tif (this.catch) addNames(names, this.catch.names);\n\t\t\tif (this.finally) addNames(names, this.finally.names);\n\t\t\treturn names;\n\t\t}\n\t};\n\tvar Catch = class extends BlockNode {\n\t\tconstructor(error) {\n\t\t\tsuper();\n\t\t\tthis.error = error;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `catch(${this.error})` + super.render(opts);\n\t\t}\n\t};\n\tCatch.kind = \"catch\";\n\tvar Finally = class extends BlockNode {\n\t\trender(opts) {\n\t\t\treturn \"finally\" + super.render(opts);\n\t\t}\n\t};\n\tFinally.kind = \"finally\";\n\tvar CodeGen = class {\n\t\tconstructor(extScope, opts = {}) {\n\t\t\tthis._values = {};\n\t\t\tthis._blockStarts = [];\n\t\t\tthis._constants = {};\n\t\t\tthis.opts = {\n\t\t\t\t...opts,\n\t\t\t\t_n: opts.lines ? \"\\n\" : \"\"\n\t\t\t};\n\t\t\tthis._extScope = extScope;\n\t\t\tthis._scope = new scope_1.Scope({ parent: extScope });\n\t\t\tthis._nodes = [new Root()];\n\t\t}\n\t\ttoString() {\n\t\t\treturn this._root.render(this.opts);\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn this._scope.name(prefix);\n\t\t}\n\t\tscopeName(prefix) {\n\t\t\treturn this._extScope.name(prefix);\n\t\t}\n\t\tscopeValue(prefixOrName, value) {\n\t\t\tconst name = this._extScope.value(prefixOrName, value);\n\t\t\t(this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set())).add(name);\n\t\t\treturn name;\n\t\t}\n\t\tgetScopeValue(prefix, keyOrRef) {\n\t\t\treturn this._extScope.getValue(prefix, keyOrRef);\n\t\t}\n\t\tscopeRefs(scopeName) {\n\t\t\treturn this._extScope.scopeRefs(scopeName, this._values);\n\t\t}\n\t\tscopeCode() {\n\t\t\treturn this._extScope.scopeCode(this._values);\n\t\t}\n\t\t_def(varKind, nameOrPrefix, rhs, constant) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\tif (rhs !== void 0 && constant) this._constants[name.str] = rhs;\n\t\t\tthis._leafNode(new Def(varKind, name, rhs));\n\t\t\treturn name;\n\t\t}\n\t\tconst(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tlet(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tvar(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tassign(lhs, rhs, sideEffects) {\n\t\t\treturn this._leafNode(new Assign(lhs, rhs, sideEffects));\n\t\t}\n\t\tadd(lhs, rhs) {\n\t\t\treturn this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));\n\t\t}\n\t\tcode(c) {\n\t\t\tif (typeof c == \"function\") c();\n\t\t\telse if (c !== code_1.nil) this._leafNode(new AnyCode(c));\n\t\t\treturn this;\n\t\t}\n\t\tobject(...keyValues) {\n\t\t\tconst code = [\"{\"];\n\t\t\tfor (const [key, value] of keyValues) {\n\t\t\t\tif (code.length > 1) code.push(\",\");\n\t\t\t\tcode.push(key);\n\t\t\t\tif (key !== value || this.opts.es5) {\n\t\t\t\t\tcode.push(\":\");\n\t\t\t\t\t(0, code_1.addCodeArg)(code, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcode.push(\"}\");\n\t\t\treturn new code_1._Code(code);\n\t\t}\n\t\tif(condition, thenBody, elseBody) {\n\t\t\tthis._blockNode(new If(condition));\n\t\t\tif (thenBody && elseBody) this.code(thenBody).else().code(elseBody).endIf();\n\t\t\telse if (thenBody) this.code(thenBody).endIf();\n\t\t\telse if (elseBody) throw new Error(\"CodeGen: \\\"else\\\" body without \\\"then\\\" body\");\n\t\t\treturn this;\n\t\t}\n\t\telseIf(condition) {\n\t\t\treturn this._elseNode(new If(condition));\n\t\t}\n\t\telse() {\n\t\t\treturn this._elseNode(new Else());\n\t\t}\n\t\tendIf() {\n\t\t\treturn this._endBlockNode(If, Else);\n\t\t}\n\t\t_for(node, forBody) {\n\t\t\tthis._blockNode(node);\n\t\t\tif (forBody) this.code(forBody).endFor();\n\t\t\treturn this;\n\t\t}\n\t\tfor(iteration, forBody) {\n\t\t\treturn this._for(new ForLoop(iteration), forBody);\n\t\t}\n\t\tforRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\treturn this._for(new ForRange(varKind, name, from, to), () => forBody(name));\n\t\t}\n\t\tforOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\tif (this.opts.es5) {\n\t\t\t\tconst arr = iterable instanceof code_1.Name ? iterable : this.var(\"_arr\", iterable);\n\t\t\t\treturn this.forRange(\"_i\", 0, (0, code_1._)`${arr}.length`, (i) => {\n\t\t\t\t\tthis.var(name, (0, code_1._)`${arr}[${i}]`);\n\t\t\t\t\tforBody(name);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name));\n\t\t}\n\t\tforIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n\t\t\tif (this.opts.ownProperties) return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\treturn this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n\t\t}\n\t\tendFor() {\n\t\t\treturn this._endBlockNode(For);\n\t\t}\n\t\tlabel(label) {\n\t\t\treturn this._leafNode(new Label(label));\n\t\t}\n\t\tbreak(label) {\n\t\t\treturn this._leafNode(new Break(label));\n\t\t}\n\t\treturn(value) {\n\t\t\tconst node = new Return();\n\t\t\tthis._blockNode(node);\n\t\t\tthis.code(value);\n\t\t\tif (node.nodes.length !== 1) throw new Error(\"CodeGen: \\\"return\\\" should have one node\");\n\t\t\treturn this._endBlockNode(Return);\n\t\t}\n\t\ttry(tryBody, catchCode, finallyCode) {\n\t\t\tif (!catchCode && !finallyCode) throw new Error(\"CodeGen: \\\"try\\\" without \\\"catch\\\" and \\\"finally\\\"\");\n\t\t\tconst node = new Try();\n\t\t\tthis._blockNode(node);\n\t\t\tthis.code(tryBody);\n\t\t\tif (catchCode) {\n\t\t\t\tconst error = this.name(\"e\");\n\t\t\t\tthis._currNode = node.catch = new Catch(error);\n\t\t\t\tcatchCode(error);\n\t\t\t}\n\t\t\tif (finallyCode) {\n\t\t\t\tthis._currNode = node.finally = new Finally();\n\t\t\t\tthis.code(finallyCode);\n\t\t\t}\n\t\t\treturn this._endBlockNode(Catch, Finally);\n\t\t}\n\t\tthrow(error) {\n\t\t\treturn this._leafNode(new Throw(error));\n\t\t}\n\t\tblock(body, nodeCount) {\n\t\t\tthis._blockStarts.push(this._nodes.length);\n\t\t\tif (body) this.code(body).endBlock(nodeCount);\n\t\t\treturn this;\n\t\t}\n\t\tendBlock(nodeCount) {\n\t\t\tconst len = this._blockStarts.pop();\n\t\t\tif (len === void 0) throw new Error(\"CodeGen: not in self-balancing block\");\n\t\t\tconst toClose = this._nodes.length - len;\n\t\t\tif (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);\n\t\t\tthis._nodes.length = len;\n\t\t\treturn this;\n\t\t}\n\t\tfunc(name, args = code_1.nil, async, funcBody) {\n\t\t\tthis._blockNode(new Func(name, args, async));\n\t\t\tif (funcBody) this.code(funcBody).endFunc();\n\t\t\treturn this;\n\t\t}\n\t\tendFunc() {\n\t\t\treturn this._endBlockNode(Func);\n\t\t}\n\t\toptimize(n = 1) {\n\t\t\twhile (n-- > 0) {\n\t\t\t\tthis._root.optimizeNodes();\n\t\t\t\tthis._root.optimizeNames(this._root.names, this._constants);\n\t\t\t}\n\t\t}\n\t\t_leafNode(node) {\n\t\t\tthis._currNode.nodes.push(node);\n\t\t\treturn this;\n\t\t}\n\t\t_blockNode(node) {\n\t\t\tthis._currNode.nodes.push(node);\n\t\t\tthis._nodes.push(node);\n\t\t}\n\t\t_endBlockNode(N1, N2) {\n\t\t\tconst n = this._currNode;\n\t\t\tif (n instanceof N1 || N2 && n instanceof N2) {\n\t\t\t\tthis._nodes.pop();\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthrow new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`);\n\t\t}\n\t\t_elseNode(node) {\n\t\t\tconst n = this._currNode;\n\t\t\tif (!(n instanceof If)) throw new Error(\"CodeGen: \\\"else\\\" without \\\"if\\\"\");\n\t\t\tthis._currNode = n.else = node;\n\t\t\treturn this;\n\t\t}\n\t\tget _root() {\n\t\t\treturn this._nodes[0];\n\t\t}\n\t\tget _currNode() {\n\t\t\tconst ns = this._nodes;\n\t\t\treturn ns[ns.length - 1];\n\t\t}\n\t\tset _currNode(node) {\n\t\t\tconst ns = this._nodes;\n\t\t\tns[ns.length - 1] = node;\n\t\t}\n\t};\n\texports.CodeGen = CodeGen;\n\tfunction addNames(names, from) {\n\t\tfor (const n in from) names[n] = (names[n] || 0) + (from[n] || 0);\n\t\treturn names;\n\t}\n\tfunction addExprNames(names, from) {\n\t\treturn from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;\n\t}\n\tfunction optimizeExpr(expr, names, constants) {\n\t\tif (expr instanceof code_1.Name) return replaceName(expr);\n\t\tif (!canOptimize(expr)) return expr;\n\t\treturn new code_1._Code(expr._items.reduce((items, c) => {\n\t\t\tif (c instanceof code_1.Name) c = replaceName(c);\n\t\t\tif (c instanceof code_1._Code) items.push(...c._items);\n\t\t\telse items.push(c);\n\t\t\treturn items;\n\t\t}, []));\n\t\tfunction replaceName(n) {\n\t\t\tconst c = constants[n.str];\n\t\t\tif (c === void 0 || names[n.str] !== 1) return n;\n\t\t\tdelete names[n.str];\n\t\t\treturn c;\n\t\t}\n\t\tfunction canOptimize(e) {\n\t\t\treturn e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);\n\t\t}\n\t}\n\tfunction subtractNames(names, from) {\n\t\tfor (const n in from) names[n] = (names[n] || 0) - (from[n] || 0);\n\t}\n\tfunction not(x) {\n\t\treturn typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : (0, code_1._)`!${par(x)}`;\n\t}\n\texports.not = not;\n\tconst andCode = mappend(exports.operators.AND);\n\tfunction and(...args) {\n\t\treturn args.reduce(andCode);\n\t}\n\texports.and = and;\n\tconst orCode = mappend(exports.operators.OR);\n\tfunction or(...args) {\n\t\treturn args.reduce(orCode);\n\t}\n\texports.or = or;\n\tfunction mappend(op) {\n\t\treturn (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;\n\t}\n\tfunction par(x) {\n\t\treturn x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js\nvar require_util = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst code_1 = require_code$1();\n\tfunction toHash(arr) {\n\t\tconst hash = {};\n\t\tfor (const item of arr) hash[item] = true;\n\t\treturn hash;\n\t}\n\texports.toHash = toHash;\n\tfunction alwaysValidSchema(it, schema) {\n\t\tif (typeof schema == \"boolean\") return schema;\n\t\tif (Object.keys(schema).length === 0) return true;\n\t\tcheckUnknownRules(it, schema);\n\t\treturn !schemaHasRules(schema, it.self.RULES.all);\n\t}\n\texports.alwaysValidSchema = alwaysValidSchema;\n\tfunction checkUnknownRules(it, schema = it.schema) {\n\t\tconst { opts, self } = it;\n\t\tif (!opts.strictSchema) return;\n\t\tif (typeof schema === \"boolean\") return;\n\t\tconst rules = self.RULES.keywords;\n\t\tfor (const key in schema) if (!rules[key]) checkStrictMode(it, `unknown keyword: \"${key}\"`);\n\t}\n\texports.checkUnknownRules = checkUnknownRules;\n\tfunction schemaHasRules(schema, rules) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (rules[key]) return true;\n\t\treturn false;\n\t}\n\texports.schemaHasRules = schemaHasRules;\n\tfunction schemaHasRulesButRef(schema, RULES) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (key !== \"$ref\" && RULES.all[key]) return true;\n\t\treturn false;\n\t}\n\texports.schemaHasRulesButRef = schemaHasRulesButRef;\n\tfunction schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {\n\t\tif (!$data) {\n\t\t\tif (typeof schema == \"number\" || typeof schema == \"boolean\") return schema;\n\t\t\tif (typeof schema == \"string\") return (0, codegen_1._)`${schema}`;\n\t\t}\n\t\treturn (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;\n\t}\n\texports.schemaRefOrVal = schemaRefOrVal;\n\tfunction unescapeFragment(str) {\n\t\treturn unescapeJsonPointer(decodeURIComponent(str));\n\t}\n\texports.unescapeFragment = unescapeFragment;\n\tfunction escapeFragment(str) {\n\t\treturn encodeURIComponent(escapeJsonPointer(str));\n\t}\n\texports.escapeFragment = escapeFragment;\n\tfunction escapeJsonPointer(str) {\n\t\tif (typeof str == \"number\") return `${str}`;\n\t\treturn str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n\t}\n\texports.escapeJsonPointer = escapeJsonPointer;\n\tfunction unescapeJsonPointer(str) {\n\t\treturn str.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n\t}\n\texports.unescapeJsonPointer = unescapeJsonPointer;\n\tfunction eachItem(xs, f) {\n\t\tif (Array.isArray(xs)) for (const x of xs) f(x);\n\t\telse f(xs);\n\t}\n\texports.eachItem = eachItem;\n\tfunction makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {\n\t\treturn (gen, from, to, toName) => {\n\t\t\tconst res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);\n\t\t\treturn toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;\n\t\t};\n\t}\n\texports.mergeEvaluated = {\n\t\tprops: makeMergeEvaluated({\n\t\t\tmergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {\n\t\t\t\tgen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));\n\t\t\t}),\n\t\t\tmergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {\n\t\t\t\tif (from === true) gen.assign(to, true);\n\t\t\t\telse {\n\t\t\t\t\tgen.assign(to, (0, codegen_1._)`${to} || {}`);\n\t\t\t\t\tsetEvaluated(gen, to, from);\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmergeValues: (from, to) => from === true ? true : {\n\t\t\t\t...from,\n\t\t\t\t...to\n\t\t\t},\n\t\t\tresultToName: evaluatedPropsToName\n\t\t}),\n\t\titems: makeMergeEvaluated({\n\t\t\tmergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),\n\t\t\tmergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),\n\t\t\tmergeValues: (from, to) => from === true ? true : Math.max(from, to),\n\t\t\tresultToName: (gen, items) => gen.var(\"items\", items)\n\t\t})\n\t};\n\tfunction evaluatedPropsToName(gen, ps) {\n\t\tif (ps === true) return gen.var(\"props\", true);\n\t\tconst props = gen.var(\"props\", (0, codegen_1._)`{}`);\n\t\tif (ps !== void 0) setEvaluated(gen, props, ps);\n\t\treturn props;\n\t}\n\texports.evaluatedPropsToName = evaluatedPropsToName;\n\tfunction setEvaluated(gen, props, ps) {\n\t\tObject.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));\n\t}\n\texports.setEvaluated = setEvaluated;\n\tconst snippets = {};\n\tfunction useFunc(gen, f) {\n\t\treturn gen.scopeValue(\"func\", {\n\t\t\tref: f,\n\t\t\tcode: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))\n\t\t});\n\t}\n\texports.useFunc = useFunc;\n\tvar Type;\n\t(function(Type) {\n\t\tType[Type[\"Num\"] = 0] = \"Num\";\n\t\tType[Type[\"Str\"] = 1] = \"Str\";\n\t})(Type || (exports.Type = Type = {}));\n\tfunction getErrorPath(dataProp, dataPropType, jsPropertySyntax) {\n\t\tif (dataProp instanceof codegen_1.Name) {\n\t\t\tconst isNumber = dataPropType === Type.Num;\n\t\t\treturn jsPropertySyntax ? isNumber ? (0, codegen_1._)`\"[\" + ${dataProp} + \"]\"` : (0, codegen_1._)`\"['\" + ${dataProp} + \"']\"` : isNumber ? (0, codegen_1._)`\"/\" + ${dataProp}` : (0, codegen_1._)`\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")`;\n\t\t}\n\t\treturn jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp);\n\t}\n\texports.getErrorPath = getErrorPath;\n\tfunction checkStrictMode(it, msg, mode = it.opts.strictSchema) {\n\t\tif (!mode) return;\n\t\tmsg = `strict mode: ${msg}`;\n\t\tif (mode === true) throw new Error(msg);\n\t\tit.self.logger.warn(msg);\n\t}\n\texports.checkStrictMode = checkStrictMode;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js\nvar require_names = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst names = {\n\t\tdata: new codegen_1.Name(\"data\"),\n\t\tvalCxt: new codegen_1.Name(\"valCxt\"),\n\t\tinstancePath: new codegen_1.Name(\"instancePath\"),\n\t\tparentData: new codegen_1.Name(\"parentData\"),\n\t\tparentDataProperty: new codegen_1.Name(\"parentDataProperty\"),\n\t\trootData: new codegen_1.Name(\"rootData\"),\n\t\tdynamicAnchors: new codegen_1.Name(\"dynamicAnchors\"),\n\t\tvErrors: new codegen_1.Name(\"vErrors\"),\n\t\terrors: new codegen_1.Name(\"errors\"),\n\t\tthis: new codegen_1.Name(\"this\"),\n\t\tself: new codegen_1.Name(\"self\"),\n\t\tscope: new codegen_1.Name(\"scope\"),\n\t\tjson: new codegen_1.Name(\"json\"),\n\t\tjsonPos: new codegen_1.Name(\"jsonPos\"),\n\t\tjsonLen: new codegen_1.Name(\"jsonLen\"),\n\t\tjsonPart: new codegen_1.Name(\"jsonPart\")\n\t};\n\texports.default = names;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js\nvar require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\texports.keywordError = { message: ({ keyword }) => (0, codegen_1.str)`must pass \"${keyword}\" keyword validation` };\n\texports.keyword$DataError = { message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`\"${keyword}\" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`\"${keyword}\" keyword is invalid ($data)` };\n\tfunction reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {\n\t\tconst { it } = cxt;\n\t\tconst { gen, compositeRule, allErrors } = it;\n\t\tconst errObj = errorObjectCode(cxt, error, errorPaths);\n\t\tif (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) addError(gen, errObj);\n\t\telse returnErrors(it, (0, codegen_1._)`[${errObj}]`);\n\t}\n\texports.reportError = reportError;\n\tfunction reportExtraError(cxt, error = exports.keywordError, errorPaths) {\n\t\tconst { it } = cxt;\n\t\tconst { gen, compositeRule, allErrors } = it;\n\t\taddError(gen, errorObjectCode(cxt, error, errorPaths));\n\t\tif (!(compositeRule || allErrors)) returnErrors(it, names_1.default.vErrors);\n\t}\n\texports.reportExtraError = reportExtraError;\n\tfunction resetErrorsCount(gen, errsCount) {\n\t\tgen.assign(names_1.default.errors, errsCount);\n\t\tgen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));\n\t}\n\texports.resetErrorsCount = resetErrorsCount;\n\tfunction extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {\n\t\t/* istanbul ignore if */\n\t\tif (errsCount === void 0) throw new Error(\"ajv implementation error\");\n\t\tconst err = gen.name(\"err\");\n\t\tgen.forRange(\"i\", errsCount, names_1.default.errors, (i) => {\n\t\t\tgen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);\n\t\t\tgen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));\n\t\t\tgen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`);\n\t\t\tif (it.opts.verbose) {\n\t\t\t\tgen.assign((0, codegen_1._)`${err}.schema`, schemaValue);\n\t\t\t\tgen.assign((0, codegen_1._)`${err}.data`, data);\n\t\t\t}\n\t\t});\n\t}\n\texports.extendErrors = extendErrors;\n\tfunction addError(gen, errObj) {\n\t\tconst err = gen.const(\"err\", errObj);\n\t\tgen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);\n\t\tgen.code((0, codegen_1._)`${names_1.default.errors}++`);\n\t}\n\tfunction returnErrors(it, errs) {\n\t\tconst { gen, validateName, schemaEnv } = it;\n\t\tif (schemaEnv.$async) gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, errs);\n\t\t\tgen.return(false);\n\t\t}\n\t}\n\tconst E = {\n\t\tkeyword: new codegen_1.Name(\"keyword\"),\n\t\tschemaPath: new codegen_1.Name(\"schemaPath\"),\n\t\tparams: new codegen_1.Name(\"params\"),\n\t\tpropertyName: new codegen_1.Name(\"propertyName\"),\n\t\tmessage: new codegen_1.Name(\"message\"),\n\t\tschema: new codegen_1.Name(\"schema\"),\n\t\tparentSchema: new codegen_1.Name(\"parentSchema\")\n\t};\n\tfunction errorObjectCode(cxt, error, errorPaths) {\n\t\tconst { createErrors } = cxt.it;\n\t\tif (createErrors === false) return (0, codegen_1._)`{}`;\n\t\treturn errorObject(cxt, error, errorPaths);\n\t}\n\tfunction errorObject(cxt, error, errorPaths = {}) {\n\t\tconst { gen, it } = cxt;\n\t\tconst keyValues = [errorInstancePath(it, errorPaths), errorSchemaPath(cxt, errorPaths)];\n\t\textraErrorProps(cxt, error, keyValues);\n\t\treturn gen.object(...keyValues);\n\t}\n\tfunction errorInstancePath({ errorPath }, { instancePath }) {\n\t\tconst instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;\n\t\treturn [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];\n\t}\n\tfunction errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {\n\t\tlet schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`;\n\t\tif (schemaPath) schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;\n\t\treturn [E.schemaPath, schPath];\n\t}\n\tfunction extraErrorProps(cxt, { params, message }, keyValues) {\n\t\tconst { keyword, data, schemaValue, it } = cxt;\n\t\tconst { opts, propertyName, topSchemaRef, schemaPath } = it;\n\t\tkeyValues.push([E.keyword, keyword], [E.params, typeof params == \"function\" ? params(cxt) : params || (0, codegen_1._)`{}`]);\n\t\tif (opts.messages) keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message]);\n\t\tif (opts.verbose) keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);\n\t\tif (propertyName) keyValues.push([E.propertyName, propertyName]);\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js\nvar require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;\n\tconst errors_1 = require_errors();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst boolError = { message: \"boolean schema is false\" };\n\tfunction topBoolOrEmptySchema(it) {\n\t\tconst { gen, schema, validateName } = it;\n\t\tif (schema === false) falseSchemaError(it, false);\n\t\telse if (typeof schema == \"object\" && schema.$async === true) gen.return(names_1.default.data);\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, null);\n\t\t\tgen.return(true);\n\t\t}\n\t}\n\texports.topBoolOrEmptySchema = topBoolOrEmptySchema;\n\tfunction boolOrEmptySchema(it, valid) {\n\t\tconst { gen, schema } = it;\n\t\tif (schema === false) {\n\t\t\tgen.var(valid, false);\n\t\t\tfalseSchemaError(it);\n\t\t} else gen.var(valid, true);\n\t}\n\texports.boolOrEmptySchema = boolOrEmptySchema;\n\tfunction falseSchemaError(it, overrideAllErrors) {\n\t\tconst { gen, data } = it;\n\t\tconst cxt = {\n\t\t\tgen,\n\t\t\tkeyword: \"false schema\",\n\t\t\tdata,\n\t\t\tschema: false,\n\t\t\tschemaCode: false,\n\t\t\tschemaValue: false,\n\t\t\tparams: {},\n\t\t\tit\n\t\t};\n\t\t(0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js\nvar require_rules = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getRules = exports.isJSONType = void 0;\n\tconst jsonTypes = new Set([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"integer\",\n\t\t\"boolean\",\n\t\t\"null\",\n\t\t\"object\",\n\t\t\"array\"\n\t]);\n\tfunction isJSONType(x) {\n\t\treturn typeof x == \"string\" && jsonTypes.has(x);\n\t}\n\texports.isJSONType = isJSONType;\n\tfunction getRules() {\n\t\tconst groups = {\n\t\t\tnumber: {\n\t\t\t\ttype: \"number\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tstring: {\n\t\t\t\ttype: \"string\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tarray: {\n\t\t\t\ttype: \"array\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tobject: {\n\t\t\t\ttype: \"object\",\n\t\t\t\trules: []\n\t\t\t}\n\t\t};\n\t\treturn {\n\t\t\ttypes: {\n\t\t\t\t...groups,\n\t\t\t\tinteger: true,\n\t\t\t\tboolean: true,\n\t\t\t\tnull: true\n\t\t\t},\n\t\t\trules: [\n\t\t\t\t{ rules: [] },\n\t\t\t\tgroups.number,\n\t\t\t\tgroups.string,\n\t\t\t\tgroups.array,\n\t\t\t\tgroups.object\n\t\t\t],\n\t\t\tpost: { rules: [] },\n\t\t\tall: {},\n\t\t\tkeywords: {}\n\t\t};\n\t}\n\texports.getRules = getRules;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js\nvar require_applicability = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;\n\tfunction schemaHasRulesForType({ schema, self }, type) {\n\t\tconst group = self.RULES.types[type];\n\t\treturn group && group !== true && shouldUseGroup(schema, group);\n\t}\n\texports.schemaHasRulesForType = schemaHasRulesForType;\n\tfunction shouldUseGroup(schema, group) {\n\t\treturn group.rules.some((rule) => shouldUseRule(schema, rule));\n\t}\n\texports.shouldUseGroup = shouldUseGroup;\n\tfunction shouldUseRule(schema, rule) {\n\t\tvar _a;\n\t\treturn schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));\n\t}\n\texports.shouldUseRule = shouldUseRule;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js\nvar require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;\n\tconst rules_1 = require_rules();\n\tconst applicability_1 = require_applicability();\n\tconst errors_1 = require_errors();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tvar DataType;\n\t(function(DataType) {\n\t\tDataType[DataType[\"Correct\"] = 0] = \"Correct\";\n\t\tDataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n\t})(DataType || (exports.DataType = DataType = {}));\n\tfunction getSchemaTypes(schema) {\n\t\tconst types = getJSONTypes(schema.type);\n\t\tif (types.includes(\"null\")) {\n\t\t\tif (schema.nullable === false) throw new Error(\"type: null contradicts nullable: false\");\n\t\t} else {\n\t\t\tif (!types.length && schema.nullable !== void 0) throw new Error(\"\\\"nullable\\\" cannot be used without \\\"type\\\"\");\n\t\t\tif (schema.nullable === true) types.push(\"null\");\n\t\t}\n\t\treturn types;\n\t}\n\texports.getSchemaTypes = getSchemaTypes;\n\tfunction getJSONTypes(ts) {\n\t\tconst types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n\t\tif (types.every(rules_1.isJSONType)) return types;\n\t\tthrow new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n\t}\n\texports.getJSONTypes = getJSONTypes;\n\tfunction coerceAndCheckDataType(it, types) {\n\t\tconst { gen, data, opts } = it;\n\t\tconst coerceTo = coerceToTypes(types, opts.coerceTypes);\n\t\tconst checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n\t\tif (checkTypes) {\n\t\t\tconst wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n\t\t\tgen.if(wrongType, () => {\n\t\t\t\tif (coerceTo.length) coerceData(it, types, coerceTo);\n\t\t\t\telse reportTypeError(it);\n\t\t\t});\n\t\t}\n\t\treturn checkTypes;\n\t}\n\texports.coerceAndCheckDataType = coerceAndCheckDataType;\n\tconst COERCIBLE = new Set([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"integer\",\n\t\t\"boolean\",\n\t\t\"null\"\n\t]);\n\tfunction coerceToTypes(types, coerceTypes) {\n\t\treturn coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === \"array\" && t === \"array\") : [];\n\t}\n\tfunction coerceData(it, types, coerceTo) {\n\t\tconst { gen, data, opts } = it;\n\t\tconst dataType = gen.let(\"dataType\", (0, codegen_1._)`typeof ${data}`);\n\t\tconst coerced = gen.let(\"coerced\", (0, codegen_1._)`undefined`);\n\t\tif (opts.coerceTypes === \"array\") gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n\t\tgen.if((0, codegen_1._)`${coerced} !== undefined`);\n\t\tfor (const t of coerceTo) if (COERCIBLE.has(t) || t === \"array\" && opts.coerceTypes === \"array\") coerceSpecificType(t);\n\t\tgen.else();\n\t\treportTypeError(it);\n\t\tgen.endIf();\n\t\tgen.if((0, codegen_1._)`${coerced} !== undefined`, () => {\n\t\t\tgen.assign(data, coerced);\n\t\t\tassignParentData(it, coerced);\n\t\t});\n\t\tfunction coerceSpecificType(t) {\n\t\t\tswitch (t) {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} == \"number\" || ${dataType} == \"boolean\"`).assign(coerced, (0, codegen_1._)`\"\" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`\"\"`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"number\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"integer\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"boolean\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${data} === \"false\" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === \"true\" || ${data} === 1`).assign(coerced, true);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"null\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${data} === \"\" || ${data} === 0 || ${data} === false`);\n\t\t\t\t\tgen.assign(coerced, null);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"array\": gen.elseIf((0, codegen_1._)`${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`);\n\t\t\t}\n\t\t}\n\t}\n\tfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n\t\tgen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));\n\t}\n\tfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n\t\tconst EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n\t\tlet cond;\n\t\tswitch (dataType) {\n\t\t\tcase \"null\": return (0, codegen_1._)`${data} ${EQ} null`;\n\t\t\tcase \"array\":\n\t\t\t\tcond = (0, codegen_1._)`Array.isArray(${data})`;\n\t\t\t\tbreak;\n\t\t\tcase \"object\":\n\t\t\t\tcond = (0, codegen_1._)`${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n\t\t\t\tbreak;\n\t\t\tcase \"integer\":\n\t\t\t\tcond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`);\n\t\t\t\tbreak;\n\t\t\tcase \"number\":\n\t\t\t\tcond = numCond();\n\t\t\t\tbreak;\n\t\t\tdefault: return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`;\n\t\t}\n\t\treturn correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n\t\tfunction numCond(_cond = codegen_1.nil) {\n\t\t\treturn (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);\n\t\t}\n\t}\n\texports.checkDataType = checkDataType;\n\tfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n\t\tif (dataTypes.length === 1) return checkDataType(dataTypes[0], data, strictNums, correct);\n\t\tlet cond;\n\t\tconst types = (0, util_1.toHash)(dataTypes);\n\t\tif (types.array && types.object) {\n\t\t\tconst notObj = (0, codegen_1._)`typeof ${data} != \"object\"`;\n\t\t\tcond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;\n\t\t\tdelete types.null;\n\t\t\tdelete types.array;\n\t\t\tdelete types.object;\n\t\t} else cond = codegen_1.nil;\n\t\tif (types.number) delete types.integer;\n\t\tfor (const t in types) cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n\t\treturn cond;\n\t}\n\texports.checkDataTypes = checkDataTypes;\n\tconst typeError = {\n\t\tmessage: ({ schema }) => `must be ${schema}`,\n\t\tparams: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`\n\t};\n\tfunction reportTypeError(it) {\n\t\tconst cxt = getTypeErrorContext(it);\n\t\t(0, errors_1.reportError)(cxt, typeError);\n\t}\n\texports.reportTypeError = reportTypeError;\n\tfunction getTypeErrorContext(it) {\n\t\tconst { gen, data, schema } = it;\n\t\tconst schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n\t\treturn {\n\t\t\tgen,\n\t\t\tkeyword: \"type\",\n\t\t\tdata,\n\t\t\tschema: schema.type,\n\t\t\tschemaCode,\n\t\t\tschemaValue: schemaCode,\n\t\t\tparentSchema: schema,\n\t\t\tparams: {},\n\t\t\tit\n\t\t};\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js\nvar require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.assignDefaults = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tfunction assignDefaults(it, ty) {\n\t\tconst { properties, items } = it.schema;\n\t\tif (ty === \"object\" && properties) for (const key in properties) assignDefault(it, key, properties[key].default);\n\t\telse if (ty === \"array\" && Array.isArray(items)) items.forEach((sch, i) => assignDefault(it, i, sch.default));\n\t}\n\texports.assignDefaults = assignDefaults;\n\tfunction assignDefault(it, prop, defaultValue) {\n\t\tconst { gen, compositeRule, data, opts } = it;\n\t\tif (defaultValue === void 0) return;\n\t\tconst childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`;\n\t\tif (compositeRule) {\n\t\t\t(0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n\t\t\treturn;\n\t\t}\n\t\tlet condition = (0, codegen_1._)`${childData} === undefined`;\n\t\tif (opts.useDefaults === \"empty\") condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === \"\"`;\n\t\tgen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js\nvar require_code = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\tconst util_2 = require_util();\n\tfunction checkReportMissingProp(cxt, prop) {\n\t\tconst { gen, data, it } = cxt;\n\t\tgen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n\t\t\tcxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true);\n\t\t\tcxt.error();\n\t\t});\n\t}\n\texports.checkReportMissingProp = checkReportMissingProp;\n\tfunction checkMissingProp({ gen, data, it: { opts } }, properties, missing) {\n\t\treturn (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));\n\t}\n\texports.checkMissingProp = checkMissingProp;\n\tfunction reportMissingProp(cxt, missing) {\n\t\tcxt.setParams({ missingProperty: missing }, true);\n\t\tcxt.error();\n\t}\n\texports.reportMissingProp = reportMissingProp;\n\tfunction hasPropFunc(gen) {\n\t\treturn gen.scopeValue(\"func\", {\n\t\t\tref: Object.prototype.hasOwnProperty,\n\t\t\tcode: (0, codegen_1._)`Object.prototype.hasOwnProperty`\n\t\t});\n\t}\n\texports.hasPropFunc = hasPropFunc;\n\tfunction isOwnProperty(gen, data, property) {\n\t\treturn (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`;\n\t}\n\texports.isOwnProperty = isOwnProperty;\n\tfunction propertyInData(gen, data, property, ownProperties) {\n\t\tconst cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;\n\t\treturn ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond;\n\t}\n\texports.propertyInData = propertyInData;\n\tfunction noPropertyInData(gen, data, property, ownProperties) {\n\t\tconst cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;\n\t\treturn ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;\n\t}\n\texports.noPropertyInData = noPropertyInData;\n\tfunction allSchemaProperties(schemaMap) {\n\t\treturn schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : [];\n\t}\n\texports.allSchemaProperties = allSchemaProperties;\n\tfunction schemaProperties(it, schemaMap) {\n\t\treturn allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));\n\t}\n\texports.schemaProperties = schemaProperties;\n\tfunction callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {\n\t\tconst dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;\n\t\tconst valCxt = [\n\t\t\t[names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],\n\t\t\t[names_1.default.parentData, it.parentData],\n\t\t\t[names_1.default.parentDataProperty, it.parentDataProperty],\n\t\t\t[names_1.default.rootData, names_1.default.rootData]\n\t\t];\n\t\tif (it.opts.dynamicRef) valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);\n\t\tconst args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;\n\t\treturn context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`;\n\t}\n\texports.callValidateCode = callValidateCode;\n\tconst newRegExp = (0, codegen_1._)`new RegExp`;\n\tfunction usePattern({ gen, it: { opts } }, pattern) {\n\t\tconst u = opts.unicodeRegExp ? \"u\" : \"\";\n\t\tconst { regExp } = opts.code;\n\t\tconst rx = regExp(pattern, u);\n\t\treturn gen.scopeValue(\"pattern\", {\n\t\t\tkey: rx.toString(),\n\t\t\tref: rx,\n\t\t\tcode: (0, codegen_1._)`${regExp.code === \"new RegExp\" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`\n\t\t});\n\t}\n\texports.usePattern = usePattern;\n\tfunction validateArray(cxt) {\n\t\tconst { gen, data, keyword, it } = cxt;\n\t\tconst valid = gen.name(\"valid\");\n\t\tif (it.allErrors) {\n\t\t\tconst validArr = gen.let(\"valid\", true);\n\t\t\tvalidateItems(() => gen.assign(validArr, false));\n\t\t\treturn validArr;\n\t\t}\n\t\tgen.var(valid, true);\n\t\tvalidateItems(() => gen.break());\n\t\treturn valid;\n\t\tfunction validateItems(notValid) {\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tgen.forRange(\"i\", 0, len, (i) => {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tdataProp: i,\n\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t}, valid);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), notValid);\n\t\t\t});\n\t\t}\n\t}\n\texports.validateArray = validateArray;\n\tfunction validateUnion(cxt) {\n\t\tconst { gen, schema, keyword, it } = cxt;\n\t\t/* istanbul ignore if */\n\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\tif (schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)) && !it.opts.unevaluated) return;\n\t\tconst valid = gen.let(\"valid\", false);\n\t\tconst schValid = gen.name(\"_valid\");\n\t\tgen.block(() => schema.forEach((_sch, i) => {\n\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\tkeyword,\n\t\t\t\tschemaProp: i,\n\t\t\t\tcompositeRule: true\n\t\t\t}, schValid);\n\t\t\tgen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);\n\t\t\tif (!cxt.mergeValidEvaluated(schCxt, schValid)) gen.if((0, codegen_1.not)(valid));\n\t\t}));\n\t\tcxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n\t}\n\texports.validateUnion = validateUnion;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js\nvar require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst code_1 = require_code();\n\tconst errors_1 = require_errors();\n\tfunction macroKeywordCode(cxt, def) {\n\t\tconst { gen, keyword, schema, parentSchema, it } = cxt;\n\t\tconst macroSchema = def.macro.call(it.self, schema, parentSchema, it);\n\t\tconst schemaRef = useKeyword(gen, keyword, macroSchema);\n\t\tif (it.opts.validateSchema !== false) it.self.validateSchema(macroSchema, true);\n\t\tconst valid = gen.name(\"valid\");\n\t\tcxt.subschema({\n\t\t\tschema: macroSchema,\n\t\t\tschemaPath: codegen_1.nil,\n\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}`,\n\t\t\ttopSchemaRef: schemaRef,\n\t\t\tcompositeRule: true\n\t\t}, valid);\n\t\tcxt.pass(valid, () => cxt.error(true));\n\t}\n\texports.macroKeywordCode = macroKeywordCode;\n\tfunction funcKeywordCode(cxt, def) {\n\t\tvar _a;\n\t\tconst { gen, keyword, schema, parentSchema, $data, it } = cxt;\n\t\tcheckAsyncKeyword(it, def);\n\t\tconst validateRef = useKeyword(gen, keyword, !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate);\n\t\tconst valid = gen.let(\"valid\");\n\t\tcxt.block$data(valid, validateKeyword);\n\t\tcxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);\n\t\tfunction validateKeyword() {\n\t\t\tif (def.errors === false) {\n\t\t\t\tassignValid();\n\t\t\t\tif (def.modifying) modifyData(cxt);\n\t\t\t\treportErrs(() => cxt.error());\n\t\t\t} else {\n\t\t\t\tconst ruleErrs = def.async ? validateAsync() : validateSync();\n\t\t\t\tif (def.modifying) modifyData(cxt);\n\t\t\t\treportErrs(() => addErrs(cxt, ruleErrs));\n\t\t\t}\n\t\t}\n\t\tfunction validateAsync() {\n\t\t\tconst ruleErrs = gen.let(\"ruleErrs\", null);\n\t\t\tgen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));\n\t\t\treturn ruleErrs;\n\t\t}\n\t\tfunction validateSync() {\n\t\t\tconst validateErrs = (0, codegen_1._)`${validateRef}.errors`;\n\t\t\tgen.assign(validateErrs, null);\n\t\t\tassignValid(codegen_1.nil);\n\t\t\treturn validateErrs;\n\t\t}\n\t\tfunction assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {\n\t\t\tconst passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;\n\t\t\tconst passSchema = !(\"compile\" in def && !$data || def.schema === false);\n\t\t\tgen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);\n\t\t}\n\t\tfunction reportErrs(errors) {\n\t\t\tvar _a$1;\n\t\t\tgen.if((0, codegen_1.not)((_a$1 = def.valid) !== null && _a$1 !== void 0 ? _a$1 : valid), errors);\n\t\t}\n\t}\n\texports.funcKeywordCode = funcKeywordCode;\n\tfunction modifyData(cxt) {\n\t\tconst { gen, data, it } = cxt;\n\t\tgen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));\n\t}\n\tfunction addErrs(cxt, errs) {\n\t\tconst { gen } = cxt;\n\t\tgen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {\n\t\t\tgen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);\n\t\t\t(0, errors_1.extendErrors)(cxt);\n\t\t}, () => cxt.error());\n\t}\n\tfunction checkAsyncKeyword({ schemaEnv }, def) {\n\t\tif (def.async && !schemaEnv.$async) throw new Error(\"async keyword in sync schema\");\n\t}\n\tfunction useKeyword(gen, keyword, result) {\n\t\tif (result === void 0) throw new Error(`keyword \"${keyword}\" failed to compile`);\n\t\treturn gen.scopeValue(\"keyword\", typeof result == \"function\" ? { ref: result } : {\n\t\t\tref: result,\n\t\t\tcode: (0, codegen_1.stringify)(result)\n\t\t});\n\t}\n\tfunction validSchemaType(schema, schemaType, allowUndefined = false) {\n\t\treturn !schemaType.length || schemaType.some((st) => st === \"array\" ? Array.isArray(schema) : st === \"object\" ? schema && typeof schema == \"object\" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == \"undefined\");\n\t}\n\texports.validSchemaType = validSchemaType;\n\tfunction validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {\n\t\t/* istanbul ignore if */\n\t\tif (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) throw new Error(\"ajv implementation error\");\n\t\tconst deps = def.dependencies;\n\t\tif (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`);\n\t\tif (def.validateSchema) {\n\t\t\tif (!def.validateSchema(schema[keyword])) {\n\t\t\t\tconst msg = `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` + self.errorsText(def.validateSchema.errors);\n\t\t\t\tif (opts.validateSchema === \"log\") self.logger.error(msg);\n\t\t\t\telse throw new Error(msg);\n\t\t\t}\n\t\t}\n\t}\n\texports.validateKeywordUsage = validateKeywordUsage;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js\nvar require_subschema = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tfunction getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {\n\t\tif (keyword !== void 0 && schema !== void 0) throw new Error(\"both \\\"keyword\\\" and \\\"schema\\\" passed, only one allowed\");\n\t\tif (keyword !== void 0) {\n\t\t\tconst sch = it.schema[keyword];\n\t\t\treturn schemaProp === void 0 ? {\n\t\t\t\tschema: sch,\n\t\t\t\tschemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,\n\t\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}`\n\t\t\t} : {\n\t\t\t\tschema: sch[schemaProp],\n\t\t\t\tschemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,\n\t\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`\n\t\t\t};\n\t\t}\n\t\tif (schema !== void 0) {\n\t\t\tif (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) throw new Error(\"\\\"schemaPath\\\", \\\"errSchemaPath\\\" and \\\"topSchemaRef\\\" are required with \\\"schema\\\"\");\n\t\t\treturn {\n\t\t\t\tschema,\n\t\t\t\tschemaPath,\n\t\t\t\ttopSchemaRef,\n\t\t\t\terrSchemaPath\n\t\t\t};\n\t\t}\n\t\tthrow new Error(\"either \\\"keyword\\\" or \\\"schema\\\" must be passed\");\n\t}\n\texports.getSubschema = getSubschema;\n\tfunction extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {\n\t\tif (data !== void 0 && dataProp !== void 0) throw new Error(\"both \\\"data\\\" and \\\"dataProp\\\" passed, only one allowed\");\n\t\tconst { gen } = it;\n\t\tif (dataProp !== void 0) {\n\t\t\tconst { errorPath, dataPathArr, opts } = it;\n\t\t\tdataContextProps(gen.let(\"data\", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true));\n\t\t\tsubschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;\n\t\t\tsubschema.parentDataProperty = (0, codegen_1._)`${dataProp}`;\n\t\t\tsubschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];\n\t\t}\n\t\tif (data !== void 0) {\n\t\t\tdataContextProps(data instanceof codegen_1.Name ? data : gen.let(\"data\", data, true));\n\t\t\tif (propertyName !== void 0) subschema.propertyName = propertyName;\n\t\t}\n\t\tif (dataTypes) subschema.dataTypes = dataTypes;\n\t\tfunction dataContextProps(_nextData) {\n\t\t\tsubschema.data = _nextData;\n\t\t\tsubschema.dataLevel = it.dataLevel + 1;\n\t\t\tsubschema.dataTypes = [];\n\t\t\tit.definedProperties = /* @__PURE__ */ new Set();\n\t\t\tsubschema.parentData = it.data;\n\t\t\tsubschema.dataNames = [...it.dataNames, _nextData];\n\t\t}\n\t}\n\texports.extendSubschemaData = extendSubschemaData;\n\tfunction extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {\n\t\tif (compositeRule !== void 0) subschema.compositeRule = compositeRule;\n\t\tif (createErrors !== void 0) subschema.createErrors = createErrors;\n\t\tif (allErrors !== void 0) subschema.allErrors = allErrors;\n\t\tsubschema.jtdDiscriminator = jtdDiscriminator;\n\t\tsubschema.jtdMetadata = jtdMetadata;\n\t}\n\texports.extendSubschemaMode = extendSubschemaMode;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js\nvar require_fast_deep_equal = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = function equal(a, b) {\n\t\tif (a === b) return true;\n\t\tif (a && b && typeof a == \"object\" && typeof b == \"object\") {\n\t\t\tif (a.constructor !== b.constructor) return false;\n\t\t\tvar length, i, keys;\n\t\t\tif (Array.isArray(a)) {\n\t\t\t\tlength = a.length;\n\t\t\t\tif (length != b.length) return false;\n\t\t\t\tfor (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n\t\t\tif (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n\t\t\tif (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\t\t\tkeys = Object.keys(a);\n\t\t\tlength = keys.length;\n\t\t\tif (length !== Object.keys(b).length) return false;\n\t\t\tfor (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\t\t\tfor (i = length; i-- !== 0;) {\n\t\t\t\tvar key = keys[i];\n\t\t\t\tif (!equal(a[key], b[key])) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn a !== a && b !== b;\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js\nvar require_json_schema_traverse = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar traverse = module.exports = function(schema, opts, cb) {\n\t\tif (typeof opts == \"function\") {\n\t\t\tcb = opts;\n\t\t\topts = {};\n\t\t}\n\t\tcb = opts.cb || cb;\n\t\tvar pre = typeof cb == \"function\" ? cb : cb.pre || function() {};\n\t\tvar post = cb.post || function() {};\n\t\t_traverse(opts, pre, post, schema, \"\", schema);\n\t};\n\ttraverse.keywords = {\n\t\tadditionalItems: true,\n\t\titems: true,\n\t\tcontains: true,\n\t\tadditionalProperties: true,\n\t\tpropertyNames: true,\n\t\tnot: true,\n\t\tif: true,\n\t\tthen: true,\n\t\telse: true\n\t};\n\ttraverse.arrayKeywords = {\n\t\titems: true,\n\t\tallOf: true,\n\t\tanyOf: true,\n\t\toneOf: true\n\t};\n\ttraverse.propsKeywords = {\n\t\t$defs: true,\n\t\tdefinitions: true,\n\t\tproperties: true,\n\t\tpatternProperties: true,\n\t\tdependencies: true\n\t};\n\ttraverse.skipKeywords = {\n\t\tdefault: true,\n\t\tenum: true,\n\t\tconst: true,\n\t\trequired: true,\n\t\tmaximum: true,\n\t\tminimum: true,\n\t\texclusiveMaximum: true,\n\t\texclusiveMinimum: true,\n\t\tmultipleOf: true,\n\t\tmaxLength: true,\n\t\tminLength: true,\n\t\tpattern: true,\n\t\tformat: true,\n\t\tmaxItems: true,\n\t\tminItems: true,\n\t\tuniqueItems: true,\n\t\tmaxProperties: true,\n\t\tminProperties: true\n\t};\n\tfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n\t\tif (schema && typeof schema == \"object\" && !Array.isArray(schema)) {\n\t\t\tpre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n\t\t\tfor (var key in schema) {\n\t\t\t\tvar sch = schema[key];\n\t\t\t\tif (Array.isArray(sch)) {\n\t\t\t\t\tif (key in traverse.arrayKeywords) for (var i = 0; i < sch.length; i++) _traverse(opts, pre, post, sch[i], jsonPtr + \"/\" + key + \"/\" + i, rootSchema, jsonPtr, key, schema, i);\n\t\t\t\t} else if (key in traverse.propsKeywords) {\n\t\t\t\t\tif (sch && typeof sch == \"object\") for (var prop in sch) _traverse(opts, pre, post, sch[prop], jsonPtr + \"/\" + key + \"/\" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);\n\t\t\t\t} else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) _traverse(opts, pre, post, sch, jsonPtr + \"/\" + key, rootSchema, jsonPtr, key, schema);\n\t\t\t}\n\t\t\tpost(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n\t\t}\n\t}\n\tfunction escapeJsonPtr(str) {\n\t\treturn str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js\nvar require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;\n\tconst util_1 = require_util();\n\tconst equal = require_fast_deep_equal();\n\tconst traverse = require_json_schema_traverse();\n\tconst SIMPLE_INLINED = new Set([\n\t\t\"type\",\n\t\t\"format\",\n\t\t\"pattern\",\n\t\t\"maxLength\",\n\t\t\"minLength\",\n\t\t\"maxProperties\",\n\t\t\"minProperties\",\n\t\t\"maxItems\",\n\t\t\"minItems\",\n\t\t\"maximum\",\n\t\t\"minimum\",\n\t\t\"uniqueItems\",\n\t\t\"multipleOf\",\n\t\t\"required\",\n\t\t\"enum\",\n\t\t\"const\"\n\t]);\n\tfunction inlineRef(schema, limit = true) {\n\t\tif (typeof schema == \"boolean\") return true;\n\t\tif (limit === true) return !hasRef(schema);\n\t\tif (!limit) return false;\n\t\treturn countKeys(schema) <= limit;\n\t}\n\texports.inlineRef = inlineRef;\n\tconst REF_KEYWORDS = new Set([\n\t\t\"$ref\",\n\t\t\"$recursiveRef\",\n\t\t\"$recursiveAnchor\",\n\t\t\"$dynamicRef\",\n\t\t\"$dynamicAnchor\"\n\t]);\n\tfunction hasRef(schema) {\n\t\tfor (const key in schema) {\n\t\t\tif (REF_KEYWORDS.has(key)) return true;\n\t\t\tconst sch = schema[key];\n\t\t\tif (Array.isArray(sch) && sch.some(hasRef)) return true;\n\t\t\tif (typeof sch == \"object\" && hasRef(sch)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\tfunction countKeys(schema) {\n\t\tlet count = 0;\n\t\tfor (const key in schema) {\n\t\t\tif (key === \"$ref\") return Infinity;\n\t\t\tcount++;\n\t\t\tif (SIMPLE_INLINED.has(key)) continue;\n\t\t\tif (typeof schema[key] == \"object\") (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));\n\t\t\tif (count === Infinity) return Infinity;\n\t\t}\n\t\treturn count;\n\t}\n\tfunction getFullPath(resolver, id = \"\", normalize) {\n\t\tif (normalize !== false) id = normalizeId(id);\n\t\treturn _getFullPath(resolver, resolver.parse(id));\n\t}\n\texports.getFullPath = getFullPath;\n\tfunction _getFullPath(resolver, p) {\n\t\treturn resolver.serialize(p).split(\"#\")[0] + \"#\";\n\t}\n\texports._getFullPath = _getFullPath;\n\tconst TRAILING_SLASH_HASH = /#\\/?$/;\n\tfunction normalizeId(id) {\n\t\treturn id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\";\n\t}\n\texports.normalizeId = normalizeId;\n\tfunction resolveUrl(resolver, baseId, id) {\n\t\tid = normalizeId(id);\n\t\treturn resolver.resolve(baseId, id);\n\t}\n\texports.resolveUrl = resolveUrl;\n\tconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i;\n\tfunction getSchemaRefs(schema, baseId) {\n\t\tif (typeof schema == \"boolean\") return {};\n\t\tconst { schemaId, uriResolver } = this.opts;\n\t\tconst schId = normalizeId(schema[schemaId] || baseId);\n\t\tconst baseIds = { \"\": schId };\n\t\tconst pathPrefix = getFullPath(uriResolver, schId, false);\n\t\tconst localRefs = {};\n\t\tconst schemaRefs = /* @__PURE__ */ new Set();\n\t\ttraverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {\n\t\t\tif (parentJsonPtr === void 0) return;\n\t\t\tconst fullPath = pathPrefix + jsonPtr;\n\t\t\tlet innerBaseId = baseIds[parentJsonPtr];\n\t\t\tif (typeof sch[schemaId] == \"string\") innerBaseId = addRef.call(this, sch[schemaId]);\n\t\t\taddAnchor.call(this, sch.$anchor);\n\t\t\taddAnchor.call(this, sch.$dynamicAnchor);\n\t\t\tbaseIds[jsonPtr] = innerBaseId;\n\t\t\tfunction addRef(ref) {\n\t\t\t\tconst _resolve = this.opts.uriResolver.resolve;\n\t\t\t\tref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);\n\t\t\t\tif (schemaRefs.has(ref)) throw ambiguos(ref);\n\t\t\t\tschemaRefs.add(ref);\n\t\t\t\tlet schOrRef = this.refs[ref];\n\t\t\t\tif (typeof schOrRef == \"string\") schOrRef = this.refs[schOrRef];\n\t\t\t\tif (typeof schOrRef == \"object\") checkAmbiguosRef(sch, schOrRef.schema, ref);\n\t\t\t\telse if (ref !== normalizeId(fullPath)) if (ref[0] === \"#\") {\n\t\t\t\t\tcheckAmbiguosRef(sch, localRefs[ref], ref);\n\t\t\t\t\tlocalRefs[ref] = sch;\n\t\t\t\t} else this.refs[ref] = fullPath;\n\t\t\t\treturn ref;\n\t\t\t}\n\t\t\tfunction addAnchor(anchor) {\n\t\t\t\tif (typeof anchor == \"string\") {\n\t\t\t\t\tif (!ANCHOR.test(anchor)) throw new Error(`invalid anchor \"${anchor}\"`);\n\t\t\t\t\taddRef.call(this, `#${anchor}`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn localRefs;\n\t\tfunction checkAmbiguosRef(sch1, sch2, ref) {\n\t\t\tif (sch2 !== void 0 && !equal(sch1, sch2)) throw ambiguos(ref);\n\t\t}\n\t\tfunction ambiguos(ref) {\n\t\t\treturn /* @__PURE__ */ new Error(`reference \"${ref}\" resolves to more than one schema`);\n\t\t}\n\t}\n\texports.getSchemaRefs = getSchemaRefs;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js\nvar require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;\n\tconst boolSchema_1 = require_boolSchema();\n\tconst dataType_1 = require_dataType();\n\tconst applicability_1 = require_applicability();\n\tconst dataType_2 = require_dataType();\n\tconst defaults_1 = require_defaults();\n\tconst keyword_1 = require_keyword();\n\tconst subschema_1 = require_subschema();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst resolve_1 = require_resolve();\n\tconst util_1 = require_util();\n\tconst errors_1 = require_errors();\n\tfunction validateFunctionCode(it) {\n\t\tif (isSchemaObj(it)) {\n\t\t\tcheckKeywords(it);\n\t\t\tif (schemaCxtHasRules(it)) {\n\t\t\t\ttopSchemaObjCode(it);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tvalidateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n\t}\n\texports.validateFunctionCode = validateFunctionCode;\n\tfunction validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {\n\t\tif (opts.code.es5) gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {\n\t\t\tgen.code((0, codegen_1._)`\"use strict\"; ${funcSourceUrl(schema, opts)}`);\n\t\t\tdestructureValCxtES5(gen, opts);\n\t\t\tgen.code(body);\n\t\t});\n\t\telse gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));\n\t}\n\tfunction destructureValCxt(opts) {\n\t\treturn (0, codegen_1._)`{${names_1.default.instancePath}=\"\", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;\n\t}\n\tfunction destructureValCxtES5(gen, opts) {\n\t\tgen.if(names_1.default.valCxt, () => {\n\t\t\tgen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);\n\t\t\tgen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);\n\t\t\tgen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);\n\t\t\tgen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);\n\t\t\tif (opts.dynamicRef) gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);\n\t\t}, () => {\n\t\t\tgen.var(names_1.default.instancePath, (0, codegen_1._)`\"\"`);\n\t\t\tgen.var(names_1.default.parentData, (0, codegen_1._)`undefined`);\n\t\t\tgen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);\n\t\t\tgen.var(names_1.default.rootData, names_1.default.data);\n\t\t\tif (opts.dynamicRef) gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);\n\t\t});\n\t}\n\tfunction topSchemaObjCode(it) {\n\t\tconst { schema, opts, gen } = it;\n\t\tvalidateFunction(it, () => {\n\t\t\tif (opts.$comment && schema.$comment) commentKeyword(it);\n\t\t\tcheckNoDefault(it);\n\t\t\tgen.let(names_1.default.vErrors, null);\n\t\t\tgen.let(names_1.default.errors, 0);\n\t\t\tif (opts.unevaluated) resetEvaluated(it);\n\t\t\ttypeAndKeywords(it);\n\t\t\treturnResults(it);\n\t\t});\n\t}\n\tfunction resetEvaluated(it) {\n\t\tconst { gen, validateName } = it;\n\t\tit.evaluated = gen.const(\"evaluated\", (0, codegen_1._)`${validateName}.evaluated`);\n\t\tgen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));\n\t\tgen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));\n\t}\n\tfunction funcSourceUrl(schema, opts) {\n\t\tconst schId = typeof schema == \"object\" && schema[opts.schemaId];\n\t\treturn schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;\n\t}\n\tfunction subschemaCode(it, valid) {\n\t\tif (isSchemaObj(it)) {\n\t\t\tcheckKeywords(it);\n\t\t\tif (schemaCxtHasRules(it)) {\n\t\t\t\tsubSchemaObjCode(it, valid);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t(0, boolSchema_1.boolOrEmptySchema)(it, valid);\n\t}\n\tfunction schemaCxtHasRules({ schema, self }) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (self.RULES.all[key]) return true;\n\t\treturn false;\n\t}\n\tfunction isSchemaObj(it) {\n\t\treturn typeof it.schema != \"boolean\";\n\t}\n\tfunction subSchemaObjCode(it, valid) {\n\t\tconst { schema, gen, opts } = it;\n\t\tif (opts.$comment && schema.$comment) commentKeyword(it);\n\t\tupdateContext(it);\n\t\tcheckAsyncSchema(it);\n\t\tconst errsCount = gen.const(\"_errs\", names_1.default.errors);\n\t\ttypeAndKeywords(it, errsCount);\n\t\tgen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t}\n\tfunction checkKeywords(it) {\n\t\t(0, util_1.checkUnknownRules)(it);\n\t\tcheckRefsAndKeywords(it);\n\t}\n\tfunction typeAndKeywords(it, errsCount) {\n\t\tif (it.opts.jtd) return schemaKeywords(it, [], false, errsCount);\n\t\tconst types = (0, dataType_1.getSchemaTypes)(it.schema);\n\t\tschemaKeywords(it, types, !(0, dataType_1.coerceAndCheckDataType)(it, types), errsCount);\n\t}\n\tfunction checkRefsAndKeywords(it) {\n\t\tconst { schema, errSchemaPath, opts, self } = it;\n\t\tif (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`);\n\t}\n\tfunction checkNoDefault(it) {\n\t\tconst { schema, opts } = it;\n\t\tif (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) (0, util_1.checkStrictMode)(it, \"default is ignored in the schema root\");\n\t}\n\tfunction updateContext(it) {\n\t\tconst schId = it.schema[it.opts.schemaId];\n\t\tif (schId) it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);\n\t}\n\tfunction checkAsyncSchema(it) {\n\t\tif (it.schema.$async && !it.schemaEnv.$async) throw new Error(\"async schema in sync schema\");\n\t}\n\tfunction commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {\n\t\tconst msg = schema.$comment;\n\t\tif (opts.$comment === true) gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);\n\t\telse if (typeof opts.$comment == \"function\") {\n\t\t\tconst schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;\n\t\t\tconst rootName = gen.scopeValue(\"root\", { ref: schemaEnv.root });\n\t\t\tgen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);\n\t\t}\n\t}\n\tfunction returnResults(it) {\n\t\tconst { gen, schemaEnv, validateName, ValidationError, opts } = it;\n\t\tif (schemaEnv.$async) gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);\n\t\t\tif (opts.unevaluated) assignEvaluated(it);\n\t\t\tgen.return((0, codegen_1._)`${names_1.default.errors} === 0`);\n\t\t}\n\t}\n\tfunction assignEvaluated({ gen, evaluated, props, items }) {\n\t\tif (props instanceof codegen_1.Name) gen.assign((0, codegen_1._)`${evaluated}.props`, props);\n\t\tif (items instanceof codegen_1.Name) gen.assign((0, codegen_1._)`${evaluated}.items`, items);\n\t}\n\tfunction schemaKeywords(it, types, typeErrors, errsCount) {\n\t\tconst { gen, schema, data, allErrors, opts, self } = it;\n\t\tconst { RULES } = self;\n\t\tif (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {\n\t\t\tgen.block(() => keywordCode(it, \"$ref\", RULES.all.$ref.definition));\n\t\t\treturn;\n\t\t}\n\t\tif (!opts.jtd) checkStrictTypes(it, types);\n\t\tgen.block(() => {\n\t\t\tfor (const group of RULES.rules) groupKeywords(group);\n\t\t\tgroupKeywords(RULES.post);\n\t\t});\n\t\tfunction groupKeywords(group) {\n\t\t\tif (!(0, applicability_1.shouldUseGroup)(schema, group)) return;\n\t\t\tif (group.type) {\n\t\t\t\tgen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));\n\t\t\t\titerateKeywords(it, group);\n\t\t\t\tif (types.length === 1 && types[0] === group.type && typeErrors) {\n\t\t\t\t\tgen.else();\n\t\t\t\t\t(0, dataType_2.reportTypeError)(it);\n\t\t\t\t}\n\t\t\t\tgen.endIf();\n\t\t\t} else iterateKeywords(it, group);\n\t\t\tif (!allErrors) gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);\n\t\t}\n\t}\n\tfunction iterateKeywords(it, group) {\n\t\tconst { gen, schema, opts: { useDefaults } } = it;\n\t\tif (useDefaults) (0, defaults_1.assignDefaults)(it, group.type);\n\t\tgen.block(() => {\n\t\t\tfor (const rule of group.rules) if ((0, applicability_1.shouldUseRule)(schema, rule)) keywordCode(it, rule.keyword, rule.definition, group.type);\n\t\t});\n\t}\n\tfunction checkStrictTypes(it, types) {\n\t\tif (it.schemaEnv.meta || !it.opts.strictTypes) return;\n\t\tcheckContextTypes(it, types);\n\t\tif (!it.opts.allowUnionTypes) checkMultipleTypes(it, types);\n\t\tcheckKeywordTypes(it, it.dataTypes);\n\t}\n\tfunction checkContextTypes(it, types) {\n\t\tif (!types.length) return;\n\t\tif (!it.dataTypes.length) {\n\t\t\tit.dataTypes = types;\n\t\t\treturn;\n\t\t}\n\t\ttypes.forEach((t) => {\n\t\t\tif (!includesType(it.dataTypes, t)) strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`);\n\t\t});\n\t\tnarrowSchemaTypes(it, types);\n\t}\n\tfunction checkMultipleTypes(it, ts) {\n\t\tif (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) strictTypesError(it, \"use allowUnionTypes to allow union type keyword\");\n\t}\n\tfunction checkKeywordTypes(it, ts) {\n\t\tconst rules = it.self.RULES.all;\n\t\tfor (const keyword in rules) {\n\t\t\tconst rule = rules[keyword];\n\t\t\tif (typeof rule == \"object\" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {\n\t\t\t\tconst { type } = rule.definition;\n\t\t\t\tif (type.length && !type.some((t) => hasApplicableType(ts, t))) strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`);\n\t\t\t}\n\t\t}\n\t}\n\tfunction hasApplicableType(schTs, kwdT) {\n\t\treturn schTs.includes(kwdT) || kwdT === \"number\" && schTs.includes(\"integer\");\n\t}\n\tfunction includesType(ts, t) {\n\t\treturn ts.includes(t) || t === \"integer\" && ts.includes(\"number\");\n\t}\n\tfunction narrowSchemaTypes(it, withTypes) {\n\t\tconst ts = [];\n\t\tfor (const t of it.dataTypes) if (includesType(withTypes, t)) ts.push(t);\n\t\telse if (withTypes.includes(\"integer\") && t === \"number\") ts.push(\"integer\");\n\t\tit.dataTypes = ts;\n\t}\n\tfunction strictTypesError(it, msg) {\n\t\tconst schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n\t\tmsg += ` at \"${schemaPath}\" (strictTypes)`;\n\t\t(0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);\n\t}\n\tvar KeywordCxt = class {\n\t\tconstructor(it, def, keyword) {\n\t\t\t(0, keyword_1.validateKeywordUsage)(it, def, keyword);\n\t\t\tthis.gen = it.gen;\n\t\t\tthis.allErrors = it.allErrors;\n\t\t\tthis.keyword = keyword;\n\t\t\tthis.data = it.data;\n\t\t\tthis.schema = it.schema[keyword];\n\t\t\tthis.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;\n\t\t\tthis.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);\n\t\t\tthis.schemaType = def.schemaType;\n\t\t\tthis.parentSchema = it.schema;\n\t\t\tthis.params = {};\n\t\t\tthis.it = it;\n\t\t\tthis.def = def;\n\t\t\tif (this.$data) this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it));\n\t\t\telse {\n\t\t\t\tthis.schemaCode = this.schemaValue;\n\t\t\t\tif (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);\n\t\t\t}\n\t\t\tif (\"code\" in def ? def.trackErrors : def.errors !== false) this.errsCount = it.gen.const(\"_errs\", names_1.default.errors);\n\t\t}\n\t\tresult(condition, successAction, failAction) {\n\t\t\tthis.failResult((0, codegen_1.not)(condition), successAction, failAction);\n\t\t}\n\t\tfailResult(condition, successAction, failAction) {\n\t\t\tthis.gen.if(condition);\n\t\t\tif (failAction) failAction();\n\t\t\telse this.error();\n\t\t\tif (successAction) {\n\t\t\t\tthis.gen.else();\n\t\t\t\tsuccessAction();\n\t\t\t\tif (this.allErrors) this.gen.endIf();\n\t\t\t} else if (this.allErrors) this.gen.endIf();\n\t\t\telse this.gen.else();\n\t\t}\n\t\tpass(condition, failAction) {\n\t\t\tthis.failResult((0, codegen_1.not)(condition), void 0, failAction);\n\t\t}\n\t\tfail(condition) {\n\t\t\tif (condition === void 0) {\n\t\t\t\tthis.error();\n\t\t\t\tif (!this.allErrors) this.gen.if(false);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.gen.if(condition);\n\t\t\tthis.error();\n\t\t\tif (this.allErrors) this.gen.endIf();\n\t\t\telse this.gen.else();\n\t\t}\n\t\tfail$data(condition) {\n\t\t\tif (!this.$data) return this.fail(condition);\n\t\t\tconst { schemaCode } = this;\n\t\t\tthis.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);\n\t\t}\n\t\terror(append, errorParams, errorPaths) {\n\t\t\tif (errorParams) {\n\t\t\t\tthis.setParams(errorParams);\n\t\t\t\tthis._error(append, errorPaths);\n\t\t\t\tthis.setParams({});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._error(append, errorPaths);\n\t\t}\n\t\t_error(append, errorPaths) {\n\t\t\t(append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);\n\t\t}\n\t\t$dataError() {\n\t\t\t(0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);\n\t\t}\n\t\treset() {\n\t\t\tif (this.errsCount === void 0) throw new Error(\"add \\\"trackErrors\\\" to keyword definition\");\n\t\t\t(0, errors_1.resetErrorsCount)(this.gen, this.errsCount);\n\t\t}\n\t\tok(cond) {\n\t\t\tif (!this.allErrors) this.gen.if(cond);\n\t\t}\n\t\tsetParams(obj, assign) {\n\t\t\tif (assign) Object.assign(this.params, obj);\n\t\t\telse this.params = obj;\n\t\t}\n\t\tblock$data(valid, codeBlock, $dataValid = codegen_1.nil) {\n\t\t\tthis.gen.block(() => {\n\t\t\t\tthis.check$data(valid, $dataValid);\n\t\t\t\tcodeBlock();\n\t\t\t});\n\t\t}\n\t\tcheck$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {\n\t\t\tif (!this.$data) return;\n\t\t\tconst { gen, schemaCode, schemaType, def } = this;\n\t\t\tgen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));\n\t\t\tif (valid !== codegen_1.nil) gen.assign(valid, true);\n\t\t\tif (schemaType.length || def.validateSchema) {\n\t\t\t\tgen.elseIf(this.invalid$data());\n\t\t\t\tthis.$dataError();\n\t\t\t\tif (valid !== codegen_1.nil) gen.assign(valid, false);\n\t\t\t}\n\t\t\tgen.else();\n\t\t}\n\t\tinvalid$data() {\n\t\t\tconst { gen, schemaCode, schemaType, def, it } = this;\n\t\t\treturn (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());\n\t\t\tfunction wrong$DataType() {\n\t\t\t\tif (schemaType.length) {\n\t\t\t\t\t/* istanbul ignore if */\n\t\t\t\t\tif (!(schemaCode instanceof codegen_1.Name)) throw new Error(\"ajv implementation error\");\n\t\t\t\t\tconst st = Array.isArray(schemaType) ? schemaType : [schemaType];\n\t\t\t\t\treturn (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;\n\t\t\t\t}\n\t\t\t\treturn codegen_1.nil;\n\t\t\t}\n\t\t\tfunction invalid$DataSchema() {\n\t\t\t\tif (def.validateSchema) {\n\t\t\t\t\tconst validateSchemaRef = gen.scopeValue(\"validate$data\", { ref: def.validateSchema });\n\t\t\t\t\treturn (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`;\n\t\t\t\t}\n\t\t\t\treturn codegen_1.nil;\n\t\t\t}\n\t\t}\n\t\tsubschema(appl, valid) {\n\t\t\tconst subschema = (0, subschema_1.getSubschema)(this.it, appl);\n\t\t\t(0, subschema_1.extendSubschemaData)(subschema, this.it, appl);\n\t\t\t(0, subschema_1.extendSubschemaMode)(subschema, appl);\n\t\t\tconst nextContext = {\n\t\t\t\t...this.it,\n\t\t\t\t...subschema,\n\t\t\t\titems: void 0,\n\t\t\t\tprops: void 0\n\t\t\t};\n\t\t\tsubschemaCode(nextContext, valid);\n\t\t\treturn nextContext;\n\t\t}\n\t\tmergeEvaluated(schemaCxt, toName) {\n\t\t\tconst { it, gen } = this;\n\t\t\tif (!it.opts.unevaluated) return;\n\t\t\tif (it.props !== true && schemaCxt.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);\n\t\t\tif (it.items !== true && schemaCxt.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);\n\t\t}\n\t\tmergeValidEvaluated(schemaCxt, valid) {\n\t\t\tconst { it, gen } = this;\n\t\t\tif (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n\t\t\t\tgen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t};\n\texports.KeywordCxt = KeywordCxt;\n\tfunction keywordCode(it, keyword, def, ruleType) {\n\t\tconst cxt = new KeywordCxt(it, def, keyword);\n\t\tif (\"code\" in def) def.code(cxt, ruleType);\n\t\telse if (cxt.$data && def.validate) (0, keyword_1.funcKeywordCode)(cxt, def);\n\t\telse if (\"macro\" in def) (0, keyword_1.macroKeywordCode)(cxt, def);\n\t\telse if (def.compile || def.validate) (0, keyword_1.funcKeywordCode)(cxt, def);\n\t}\n\tconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\n\tconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\n\tfunction getData($data, { dataLevel, dataNames, dataPathArr }) {\n\t\tlet jsonPointer;\n\t\tlet data;\n\t\tif ($data === \"\") return names_1.default.rootData;\n\t\tif ($data[0] === \"/\") {\n\t\t\tif (!JSON_POINTER.test($data)) throw new Error(`Invalid JSON-pointer: ${$data}`);\n\t\t\tjsonPointer = $data;\n\t\t\tdata = names_1.default.rootData;\n\t\t} else {\n\t\t\tconst matches = RELATIVE_JSON_POINTER.exec($data);\n\t\t\tif (!matches) throw new Error(`Invalid JSON-pointer: ${$data}`);\n\t\t\tconst up = +matches[1];\n\t\t\tjsonPointer = matches[2];\n\t\t\tif (jsonPointer === \"#\") {\n\t\t\t\tif (up >= dataLevel) throw new Error(errorMsg(\"property/index\", up));\n\t\t\t\treturn dataPathArr[dataLevel - up];\n\t\t\t}\n\t\t\tif (up > dataLevel) throw new Error(errorMsg(\"data\", up));\n\t\t\tdata = dataNames[dataLevel - up];\n\t\t\tif (!jsonPointer) return data;\n\t\t}\n\t\tlet expr = data;\n\t\tconst segments = jsonPointer.split(\"/\");\n\t\tfor (const segment of segments) if (segment) {\n\t\t\tdata = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;\n\t\t\texpr = (0, codegen_1._)`${expr} && ${data}`;\n\t\t}\n\t\treturn expr;\n\t\tfunction errorMsg(pointerType, up) {\n\t\t\treturn `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;\n\t\t}\n\t}\n\texports.getData = getData;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js\nvar require_validation_error = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar ValidationError = class extends Error {\n\t\tconstructor(errors) {\n\t\t\tsuper(\"validation failed\");\n\t\t\tthis.errors = errors;\n\t\t\tthis.ajv = this.validation = true;\n\t\t}\n\t};\n\texports.default = ValidationError;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js\nvar require_ref_error = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst resolve_1 = require_resolve();\n\tvar MissingRefError = class extends Error {\n\t\tconstructor(resolver, baseId, ref, msg) {\n\t\t\tsuper(msg || `can't resolve reference ${ref} from id ${baseId}`);\n\t\t\tthis.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);\n\t\t\tthis.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));\n\t\t}\n\t};\n\texports.default = MissingRefError;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js\nvar require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst validation_error_1 = require_validation_error();\n\tconst names_1 = require_names();\n\tconst resolve_1 = require_resolve();\n\tconst util_1 = require_util();\n\tconst validate_1 = require_validate();\n\tvar SchemaEnv = class {\n\t\tconstructor(env) {\n\t\t\tvar _a;\n\t\t\tthis.refs = {};\n\t\t\tthis.dynamicAnchors = {};\n\t\t\tlet schema;\n\t\t\tif (typeof env.schema == \"object\") schema = env.schema;\n\t\t\tthis.schema = env.schema;\n\t\t\tthis.schemaId = env.schemaId;\n\t\t\tthis.root = env.root || this;\n\t\t\tthis.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n\t\t\tthis.schemaPath = env.schemaPath;\n\t\t\tthis.localRefs = env.localRefs;\n\t\t\tthis.meta = env.meta;\n\t\t\tthis.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n\t\t\tthis.refs = {};\n\t\t}\n\t};\n\texports.SchemaEnv = SchemaEnv;\n\tfunction compileSchema(sch) {\n\t\tconst _sch = getCompilingSchema.call(this, sch);\n\t\tif (_sch) return _sch;\n\t\tconst rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);\n\t\tconst { es5, lines } = this.opts.code;\n\t\tconst { ownProperties } = this.opts;\n\t\tconst gen = new codegen_1.CodeGen(this.scope, {\n\t\t\tes5,\n\t\t\tlines,\n\t\t\townProperties\n\t\t});\n\t\tlet _ValidationError;\n\t\tif (sch.$async) _ValidationError = gen.scopeValue(\"Error\", {\n\t\t\tref: validation_error_1.default,\n\t\t\tcode: (0, codegen_1._)`require(\"ajv/dist/runtime/validation_error\").default`\n\t\t});\n\t\tconst validateName = gen.scopeName(\"validate\");\n\t\tsch.validateName = validateName;\n\t\tconst schemaCxt = {\n\t\t\tgen,\n\t\t\tallErrors: this.opts.allErrors,\n\t\t\tdata: names_1.default.data,\n\t\t\tparentData: names_1.default.parentData,\n\t\t\tparentDataProperty: names_1.default.parentDataProperty,\n\t\t\tdataNames: [names_1.default.data],\n\t\t\tdataPathArr: [codegen_1.nil],\n\t\t\tdataLevel: 0,\n\t\t\tdataTypes: [],\n\t\t\tdefinedProperties: /* @__PURE__ */ new Set(),\n\t\t\ttopSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true ? {\n\t\t\t\tref: sch.schema,\n\t\t\t\tcode: (0, codegen_1.stringify)(sch.schema)\n\t\t\t} : { ref: sch.schema }),\n\t\t\tvalidateName,\n\t\t\tValidationError: _ValidationError,\n\t\t\tschema: sch.schema,\n\t\t\tschemaEnv: sch,\n\t\t\trootId,\n\t\t\tbaseId: sch.baseId || rootId,\n\t\t\tschemaPath: codegen_1.nil,\n\t\t\terrSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n\t\t\terrorPath: (0, codegen_1._)`\"\"`,\n\t\t\topts: this.opts,\n\t\t\tself: this\n\t\t};\n\t\tlet sourceCode;\n\t\ttry {\n\t\t\tthis._compilations.add(sch);\n\t\t\t(0, validate_1.validateFunctionCode)(schemaCxt);\n\t\t\tgen.optimize(this.opts.code.optimize);\n\t\t\tconst validateCode = gen.toString();\n\t\t\tsourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n\t\t\tif (this.opts.code.process) sourceCode = this.opts.code.process(sourceCode, sch);\n\t\t\tconst validate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode)(this, this.scope.get());\n\t\t\tthis.scope.value(validateName, { ref: validate });\n\t\t\tvalidate.errors = null;\n\t\t\tvalidate.schema = sch.schema;\n\t\t\tvalidate.schemaEnv = sch;\n\t\t\tif (sch.$async) validate.$async = true;\n\t\t\tif (this.opts.code.source === true) validate.source = {\n\t\t\t\tvalidateName,\n\t\t\t\tvalidateCode,\n\t\t\t\tscopeValues: gen._values\n\t\t\t};\n\t\t\tif (this.opts.unevaluated) {\n\t\t\t\tconst { props, items } = schemaCxt;\n\t\t\t\tvalidate.evaluated = {\n\t\t\t\t\tprops: props instanceof codegen_1.Name ? void 0 : props,\n\t\t\t\t\titems: items instanceof codegen_1.Name ? void 0 : items,\n\t\t\t\t\tdynamicProps: props instanceof codegen_1.Name,\n\t\t\t\t\tdynamicItems: items instanceof codegen_1.Name\n\t\t\t\t};\n\t\t\t\tif (validate.source) validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n\t\t\t}\n\t\t\tsch.validate = validate;\n\t\t\treturn sch;\n\t\t} catch (e) {\n\t\t\tdelete sch.validate;\n\t\t\tdelete sch.validateName;\n\t\t\tif (sourceCode) this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tthis._compilations.delete(sch);\n\t\t}\n\t}\n\texports.compileSchema = compileSchema;\n\tfunction resolveRef(root, baseId, ref) {\n\t\tvar _a;\n\t\tref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n\t\tconst schOrFunc = root.refs[ref];\n\t\tif (schOrFunc) return schOrFunc;\n\t\tlet _sch = resolve.call(this, root, ref);\n\t\tif (_sch === void 0) {\n\t\t\tconst schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tif (schema) _sch = new SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\troot,\n\t\t\t\tbaseId\n\t\t\t});\n\t\t}\n\t\tif (_sch === void 0) return;\n\t\treturn root.refs[ref] = inlineOrCompile.call(this, _sch);\n\t}\n\texports.resolveRef = resolveRef;\n\tfunction inlineOrCompile(sch) {\n\t\tif ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) return sch.schema;\n\t\treturn sch.validate ? sch : compileSchema.call(this, sch);\n\t}\n\tfunction getCompilingSchema(schEnv) {\n\t\tfor (const sch of this._compilations) if (sameSchemaEnv(sch, schEnv)) return sch;\n\t}\n\texports.getCompilingSchema = getCompilingSchema;\n\tfunction sameSchemaEnv(s1, s2) {\n\t\treturn s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n\t}\n\tfunction resolve(root, ref) {\n\t\tlet sch;\n\t\twhile (typeof (sch = this.refs[ref]) == \"string\") ref = sch;\n\t\treturn sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n\t}\n\tfunction resolveSchema(root, ref) {\n\t\tconst p = this.opts.uriResolver.parse(ref);\n\t\tconst refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n\t\tlet baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);\n\t\tif (Object.keys(root.schema).length > 0 && refPath === baseId) return getJsonPointer.call(this, p, root);\n\t\tconst id = (0, resolve_1.normalizeId)(refPath);\n\t\tconst schOrRef = this.refs[id] || this.schemas[id];\n\t\tif (typeof schOrRef == \"string\") {\n\t\t\tconst sch = resolveSchema.call(this, root, schOrRef);\n\t\t\tif (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\") return;\n\t\t\treturn getJsonPointer.call(this, p, sch);\n\t\t}\n\t\tif (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\") return;\n\t\tif (!schOrRef.validate) compileSchema.call(this, schOrRef);\n\t\tif (id === (0, resolve_1.normalizeId)(ref)) {\n\t\t\tconst { schema } = schOrRef;\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tconst schId = schema[schemaId];\n\t\t\tif (schId) baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n\t\t\treturn new SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\troot,\n\t\t\t\tbaseId\n\t\t\t});\n\t\t}\n\t\treturn getJsonPointer.call(this, p, schOrRef);\n\t}\n\texports.resolveSchema = resolveSchema;\n\tconst PREVENT_SCOPE_CHANGE = new Set([\n\t\t\"properties\",\n\t\t\"patternProperties\",\n\t\t\"enum\",\n\t\t\"dependencies\",\n\t\t\"definitions\"\n\t]);\n\tfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n\t\tvar _a;\n\t\tif (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\") return;\n\t\tfor (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n\t\t\tif (typeof schema === \"boolean\") return;\n\t\t\tconst partSchema = schema[(0, util_1.unescapeFragment)(part)];\n\t\t\tif (partSchema === void 0) return;\n\t\t\tschema = partSchema;\n\t\t\tconst schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n\t\t\tif (!PREVENT_SCOPE_CHANGE.has(part) && schId) baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n\t\t}\n\t\tlet env;\n\t\tif (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n\t\t\tconst $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n\t\t\tenv = resolveSchema.call(this, root, $ref);\n\t\t}\n\t\tconst { schemaId } = this.opts;\n\t\tenv = env || new SchemaEnv({\n\t\t\tschema,\n\t\t\tschemaId,\n\t\t\troot,\n\t\t\tbaseId\n\t\t});\n\t\tif (env.schema !== env.root.schema) return env;\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json\nvar require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$id\": \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n\t\t\"description\": \"Meta-schema for $data reference (JSON AnySchema extension proposal)\",\n\t\t\"type\": \"object\",\n\t\t\"required\": [\"$data\"],\n\t\t\"properties\": { \"$data\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"anyOf\": [{ \"format\": \"relative-json-pointer\" }, { \"format\": \"json-pointer\" }]\n\t\t} },\n\t\t\"additionalProperties\": false\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js\nvar require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\t/** @type {(value: string) => boolean} */\n\tconst isUUID = RegExp.prototype.test.bind(/^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$/iu);\n\t/** @type {(value: string) => boolean} */\n\tconst isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)$/u);\n\t/**\n\t* @param {Array<string>} input\n\t* @returns {string}\n\t*/\n\tfunction stringArrayToHexStripped(input) {\n\t\tlet acc = \"\";\n\t\tlet code = 0;\n\t\tlet i = 0;\n\t\tfor (i = 0; i < input.length; i++) {\n\t\t\tcode = input[i].charCodeAt(0);\n\t\t\tif (code === 48) continue;\n\t\t\tif (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return \"\";\n\t\t\tacc += input[i];\n\t\t\tbreak;\n\t\t}\n\t\tfor (i += 1; i < input.length; i++) {\n\t\t\tcode = input[i].charCodeAt(0);\n\t\t\tif (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return \"\";\n\t\t\tacc += input[i];\n\t\t}\n\t\treturn acc;\n\t}\n\t/**\n\t* @typedef {Object} GetIPV6Result\n\t* @property {boolean} error - Indicates if there was an error parsing the IPv6 address.\n\t* @property {string} address - The parsed IPv6 address.\n\t* @property {string} [zone] - The zone identifier, if present.\n\t*/\n\t/**\n\t* @param {string} value\n\t* @returns {boolean}\n\t*/\n\tconst nonSimpleDomain = RegExp.prototype.test.bind(/[^!\"$&'()*+,\\-.;=_`a-z{}~]/u);\n\t/**\n\t* @param {Array<string>} buffer\n\t* @returns {boolean}\n\t*/\n\tfunction consumeIsZone(buffer) {\n\t\tbuffer.length = 0;\n\t\treturn true;\n\t}\n\t/**\n\t* @param {Array<string>} buffer\n\t* @param {Array<string>} address\n\t* @param {GetIPV6Result} output\n\t* @returns {boolean}\n\t*/\n\tfunction consumeHextets(buffer, address, output) {\n\t\tif (buffer.length) {\n\t\t\tconst hex = stringArrayToHexStripped(buffer);\n\t\t\tif (hex !== \"\") address.push(hex);\n\t\t\telse {\n\t\t\t\toutput.error = true;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tbuffer.length = 0;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* @param {string} input\n\t* @returns {GetIPV6Result}\n\t*/\n\tfunction getIPV6(input) {\n\t\tlet tokenCount = 0;\n\t\tconst output = {\n\t\t\terror: false,\n\t\t\taddress: \"\",\n\t\t\tzone: \"\"\n\t\t};\n\t\t/** @type {Array<string>} */\n\t\tconst address = [];\n\t\t/** @type {Array<string>} */\n\t\tconst buffer = [];\n\t\tlet endipv6Encountered = false;\n\t\tlet endIpv6 = false;\n\t\tlet consume = consumeHextets;\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tconst cursor = input[i];\n\t\t\tif (cursor === \"[\" || cursor === \"]\") continue;\n\t\t\tif (cursor === \":\") {\n\t\t\t\tif (endipv6Encountered === true) endIpv6 = true;\n\t\t\t\tif (!consume(buffer, address, output)) break;\n\t\t\t\tif (++tokenCount > 7) {\n\t\t\t\t\toutput.error = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (i > 0 && input[i - 1] === \":\") endipv6Encountered = true;\n\t\t\t\taddress.push(\":\");\n\t\t\t\tcontinue;\n\t\t\t} else if (cursor === \"%\") {\n\t\t\t\tif (!consume(buffer, address, output)) break;\n\t\t\t\tconsume = consumeIsZone;\n\t\t\t} else {\n\t\t\t\tbuffer.push(cursor);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (buffer.length) if (consume === consumeIsZone) output.zone = buffer.join(\"\");\n\t\telse if (endIpv6) address.push(buffer.join(\"\"));\n\t\telse address.push(stringArrayToHexStripped(buffer));\n\t\toutput.address = address.join(\"\");\n\t\treturn output;\n\t}\n\t/**\n\t* @typedef {Object} NormalizeIPv6Result\n\t* @property {string} host - The normalized host.\n\t* @property {string} [escapedHost] - The escaped host.\n\t* @property {boolean} isIPV6 - Indicates if the host is an IPv6 address.\n\t*/\n\t/**\n\t* @param {string} host\n\t* @returns {NormalizeIPv6Result}\n\t*/\n\tfunction normalizeIPv6(host) {\n\t\tif (findToken(host, \":\") < 2) return {\n\t\t\thost,\n\t\t\tisIPV6: false\n\t\t};\n\t\tconst ipv6 = getIPV6(host);\n\t\tif (!ipv6.error) {\n\t\t\tlet newHost = ipv6.address;\n\t\t\tlet escapedHost = ipv6.address;\n\t\t\tif (ipv6.zone) {\n\t\t\t\tnewHost += \"%\" + ipv6.zone;\n\t\t\t\tescapedHost += \"%25\" + ipv6.zone;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\thost: newHost,\n\t\t\t\tisIPV6: true,\n\t\t\t\tescapedHost\n\t\t\t};\n\t\t} else return {\n\t\t\thost,\n\t\t\tisIPV6: false\n\t\t};\n\t}\n\t/**\n\t* @param {string} str\n\t* @param {string} token\n\t* @returns {number}\n\t*/\n\tfunction findToken(str, token) {\n\t\tlet ind = 0;\n\t\tfor (let i = 0; i < str.length; i++) if (str[i] === token) ind++;\n\t\treturn ind;\n\t}\n\t/**\n\t* @param {string} path\n\t* @returns {string}\n\t*\n\t* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n\t*/\n\tfunction removeDotSegments(path) {\n\t\tlet input = path;\n\t\tconst output = [];\n\t\tlet nextSlash = -1;\n\t\tlet len = 0;\n\t\twhile (len = input.length) {\n\t\t\tif (len === 1) if (input === \".\") break;\n\t\t\telse if (input === \"/\") {\n\t\t\t\toutput.push(\"/\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\toutput.push(input);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (len === 2) {\n\t\t\t\tif (input[0] === \".\") {\n\t\t\t\t\tif (input[1] === \".\") break;\n\t\t\t\t\telse if (input[1] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (input[0] === \"/\") {\n\t\t\t\t\tif (input[1] === \".\" || input[1] === \"/\") {\n\t\t\t\t\t\toutput.push(\"/\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (len === 3) {\n\t\t\t\tif (input === \"/..\") {\n\t\t\t\t\tif (output.length !== 0) output.pop();\n\t\t\t\t\toutput.push(\"/\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (input[0] === \".\") {\n\t\t\t\tif (input[1] === \".\") {\n\t\t\t\t\tif (input[2] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(3);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (input[1] === \"/\") {\n\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (input[0] === \"/\") {\n\t\t\t\tif (input[1] === \".\") {\n\t\t\t\t\tif (input[2] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (input[2] === \".\") {\n\t\t\t\t\t\tif (input[3] === \"/\") {\n\t\t\t\t\t\t\tinput = input.slice(3);\n\t\t\t\t\t\t\tif (output.length !== 0) output.pop();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((nextSlash = input.indexOf(\"/\", 1)) === -1) {\n\t\t\t\toutput.push(input);\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\toutput.push(input.slice(0, nextSlash));\n\t\t\t\tinput = input.slice(nextSlash);\n\t\t\t}\n\t\t}\n\t\treturn output.join(\"\");\n\t}\n\t/**\n\t* @param {import('../types/index').URIComponent} component\n\t* @param {boolean} esc\n\t* @returns {import('../types/index').URIComponent}\n\t*/\n\tfunction normalizeComponentEncoding(component, esc) {\n\t\tconst func = esc !== true ? escape : unescape;\n\t\tif (component.scheme !== void 0) component.scheme = func(component.scheme);\n\t\tif (component.userinfo !== void 0) component.userinfo = func(component.userinfo);\n\t\tif (component.host !== void 0) component.host = func(component.host);\n\t\tif (component.path !== void 0) component.path = func(component.path);\n\t\tif (component.query !== void 0) component.query = func(component.query);\n\t\tif (component.fragment !== void 0) component.fragment = func(component.fragment);\n\t\treturn component;\n\t}\n\t/**\n\t* @param {import('../types/index').URIComponent} component\n\t* @returns {string|undefined}\n\t*/\n\tfunction recomposeAuthority(component) {\n\t\tconst uriTokens = [];\n\t\tif (component.userinfo !== void 0) {\n\t\t\turiTokens.push(component.userinfo);\n\t\t\turiTokens.push(\"@\");\n\t\t}\n\t\tif (component.host !== void 0) {\n\t\t\tlet host = unescape(component.host);\n\t\t\tif (!isIPv4(host)) {\n\t\t\t\tconst ipV6res = normalizeIPv6(host);\n\t\t\t\tif (ipV6res.isIPV6 === true) host = `[${ipV6res.escapedHost}]`;\n\t\t\t\telse host = component.host;\n\t\t\t}\n\t\t\turiTokens.push(host);\n\t\t}\n\t\tif (typeof component.port === \"number\" || typeof component.port === \"string\") {\n\t\t\turiTokens.push(\":\");\n\t\t\turiTokens.push(String(component.port));\n\t\t}\n\t\treturn uriTokens.length ? uriTokens.join(\"\") : void 0;\n\t}\n\tmodule.exports = {\n\t\tnonSimpleDomain,\n\t\trecomposeAuthority,\n\t\tnormalizeComponentEncoding,\n\t\tremoveDotSegments,\n\t\tisIPv4,\n\t\tisUUID,\n\t\tnormalizeIPv6,\n\t\tstringArrayToHexStripped\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js\nvar require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { isUUID } = require_utils();\n\tconst URN_REG = /([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-.:;=@]|%[\\da-f]{2})+)/iu;\n\tconst supportedSchemeNames = [\n\t\t\"http\",\n\t\t\"https\",\n\t\t\"ws\",\n\t\t\"wss\",\n\t\t\"urn\",\n\t\t\"urn:uuid\"\n\t];\n\t/** @typedef {supportedSchemeNames[number]} SchemeName */\n\t/**\n\t* @param {string} name\n\t* @returns {name is SchemeName}\n\t*/\n\tfunction isValidSchemeName(name) {\n\t\treturn supportedSchemeNames.indexOf(name) !== -1;\n\t}\n\t/**\n\t* @callback SchemeFn\n\t* @param {import('../types/index').URIComponent} component\n\t* @param {import('../types/index').Options} options\n\t* @returns {import('../types/index').URIComponent}\n\t*/\n\t/**\n\t* @typedef {Object} SchemeHandler\n\t* @property {SchemeName} scheme - The scheme name.\n\t* @property {boolean} [domainHost] - Indicates if the scheme supports domain hosts.\n\t* @property {SchemeFn} parse - Function to parse the URI component for this scheme.\n\t* @property {SchemeFn} serialize - Function to serialize the URI component for this scheme.\n\t* @property {boolean} [skipNormalize] - Indicates if normalization should be skipped for this scheme.\n\t* @property {boolean} [absolutePath] - Indicates if the scheme uses absolute paths.\n\t* @property {boolean} [unicodeSupport] - Indicates if the scheme supports Unicode.\n\t*/\n\t/**\n\t* @param {import('../types/index').URIComponent} wsComponent\n\t* @returns {boolean}\n\t*/\n\tfunction wsIsSecure(wsComponent) {\n\t\tif (wsComponent.secure === true) return true;\n\t\telse if (wsComponent.secure === false) return false;\n\t\telse if (wsComponent.scheme) return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === \"w\" || wsComponent.scheme[0] === \"W\") && (wsComponent.scheme[1] === \"s\" || wsComponent.scheme[1] === \"S\") && (wsComponent.scheme[2] === \"s\" || wsComponent.scheme[2] === \"S\");\n\t\telse return false;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction httpParse(component) {\n\t\tif (!component.host) component.error = component.error || \"HTTP URIs must have a host.\";\n\t\treturn component;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction httpSerialize(component) {\n\t\tconst secure = String(component.scheme).toLowerCase() === \"https\";\n\t\tif (component.port === (secure ? 443 : 80) || component.port === \"\") component.port = void 0;\n\t\tif (!component.path) component.path = \"/\";\n\t\treturn component;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction wsParse(wsComponent) {\n\t\twsComponent.secure = wsIsSecure(wsComponent);\n\t\twsComponent.resourceName = (wsComponent.path || \"/\") + (wsComponent.query ? \"?\" + wsComponent.query : \"\");\n\t\twsComponent.path = void 0;\n\t\twsComponent.query = void 0;\n\t\treturn wsComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction wsSerialize(wsComponent) {\n\t\tif (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === \"\") wsComponent.port = void 0;\n\t\tif (typeof wsComponent.secure === \"boolean\") {\n\t\t\twsComponent.scheme = wsComponent.secure ? \"wss\" : \"ws\";\n\t\t\twsComponent.secure = void 0;\n\t\t}\n\t\tif (wsComponent.resourceName) {\n\t\t\tconst [path, query] = wsComponent.resourceName.split(\"?\");\n\t\t\twsComponent.path = path && path !== \"/\" ? path : void 0;\n\t\t\twsComponent.query = query;\n\t\t\twsComponent.resourceName = void 0;\n\t\t}\n\t\twsComponent.fragment = void 0;\n\t\treturn wsComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnParse(urnComponent, options) {\n\t\tif (!urnComponent.path) {\n\t\t\turnComponent.error = \"URN can not be parsed\";\n\t\t\treturn urnComponent;\n\t\t}\n\t\tconst matches = urnComponent.path.match(URN_REG);\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponent.scheme || \"urn\";\n\t\t\turnComponent.nid = matches[1].toLowerCase();\n\t\t\turnComponent.nss = matches[2];\n\t\t\tconst schemeHandler = getSchemeHandler(`${scheme}:${options.nid || urnComponent.nid}`);\n\t\t\turnComponent.path = void 0;\n\t\t\tif (schemeHandler) urnComponent = schemeHandler.parse(urnComponent, options);\n\t\t} else urnComponent.error = urnComponent.error || \"URN can not be parsed.\";\n\t\treturn urnComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnSerialize(urnComponent, options) {\n\t\tif (urnComponent.nid === void 0) throw new Error(\"URN without nid cannot be serialized\");\n\t\tconst scheme = options.scheme || urnComponent.scheme || \"urn\";\n\t\tconst nid = urnComponent.nid.toLowerCase();\n\t\tconst schemeHandler = getSchemeHandler(`${scheme}:${options.nid || nid}`);\n\t\tif (schemeHandler) urnComponent = schemeHandler.serialize(urnComponent, options);\n\t\tconst uriComponent = urnComponent;\n\t\tconst nss = urnComponent.nss;\n\t\turiComponent.path = `${nid || options.nid}:${nss}`;\n\t\toptions.skipEscape = true;\n\t\treturn uriComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnuuidParse(urnComponent, options) {\n\t\tconst uuidComponent = urnComponent;\n\t\tuuidComponent.uuid = uuidComponent.nss;\n\t\tuuidComponent.nss = void 0;\n\t\tif (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) uuidComponent.error = uuidComponent.error || \"UUID is not valid.\";\n\t\treturn uuidComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnuuidSerialize(uuidComponent) {\n\t\tconst urnComponent = uuidComponent;\n\t\turnComponent.nss = (uuidComponent.uuid || \"\").toLowerCase();\n\t\treturn urnComponent;\n\t}\n\tconst http = {\n\t\tscheme: \"http\",\n\t\tdomainHost: true,\n\t\tparse: httpParse,\n\t\tserialize: httpSerialize\n\t};\n\tconst https = {\n\t\tscheme: \"https\",\n\t\tdomainHost: http.domainHost,\n\t\tparse: httpParse,\n\t\tserialize: httpSerialize\n\t};\n\tconst ws = {\n\t\tscheme: \"ws\",\n\t\tdomainHost: true,\n\t\tparse: wsParse,\n\t\tserialize: wsSerialize\n\t};\n\tconst wss = {\n\t\tscheme: \"wss\",\n\t\tdomainHost: ws.domainHost,\n\t\tparse: ws.parse,\n\t\tserialize: ws.serialize\n\t};\n\tconst urn = {\n\t\tscheme: \"urn\",\n\t\tparse: urnParse,\n\t\tserialize: urnSerialize,\n\t\tskipNormalize: true\n\t};\n\tconst urnuuid = {\n\t\tscheme: \"urn:uuid\",\n\t\tparse: urnuuidParse,\n\t\tserialize: urnuuidSerialize,\n\t\tskipNormalize: true\n\t};\n\tconst SCHEMES = {\n\t\thttp,\n\t\thttps,\n\t\tws,\n\t\twss,\n\t\turn,\n\t\t\"urn:uuid\": urnuuid\n\t};\n\tObject.setPrototypeOf(SCHEMES, null);\n\t/**\n\t* @param {string|undefined} scheme\n\t* @returns {SchemeHandler|undefined}\n\t*/\n\tfunction getSchemeHandler(scheme) {\n\t\treturn scheme && (SCHEMES[scheme] || SCHEMES[scheme.toLowerCase()]) || void 0;\n\t}\n\tmodule.exports = {\n\t\twsIsSecure,\n\t\tSCHEMES,\n\t\tisValidSchemeName,\n\t\tgetSchemeHandler\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js\nvar require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();\n\tconst { SCHEMES, getSchemeHandler } = require_schemes();\n\t/**\n\t* @template {import('./types/index').URIComponent|string} T\n\t* @param {T} uri\n\t* @param {import('./types/index').Options} [options]\n\t* @returns {T}\n\t*/\n\tfunction normalize(uri, options) {\n\t\tif (typeof uri === \"string\") uri = serialize(parse(uri, options), options);\n\t\telse if (typeof uri === \"object\") uri = parse(serialize(uri, options), options);\n\t\treturn uri;\n\t}\n\t/**\n\t* @param {string} baseURI\n\t* @param {string} relativeURI\n\t* @param {import('./types/index').Options} [options]\n\t* @returns {string}\n\t*/\n\tfunction resolve(baseURI, relativeURI, options) {\n\t\tconst schemelessOptions = options ? Object.assign({ scheme: \"null\" }, options) : { scheme: \"null\" };\n\t\tconst resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);\n\t\tschemelessOptions.skipEscape = true;\n\t\treturn serialize(resolved, schemelessOptions);\n\t}\n\t/**\n\t* @param {import ('./types/index').URIComponent} base\n\t* @param {import ('./types/index').URIComponent} relative\n\t* @param {import('./types/index').Options} [options]\n\t* @param {boolean} [skipNormalization=false]\n\t* @returns {import ('./types/index').URIComponent}\n\t*/\n\tfunction resolveComponent(base, relative, options, skipNormalization) {\n\t\t/** @type {import('./types/index').URIComponent} */\n\t\tconst target = {};\n\t\tif (!skipNormalization) {\n\t\t\tbase = parse(serialize(base, options), options);\n\t\t\trelative = parse(serialize(relative, options), options);\n\t\t}\n\t\toptions = options || {};\n\t\tif (!options.tolerant && relative.scheme) {\n\t\t\ttarget.scheme = relative.scheme;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {\n\t\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\t\ttarget.host = relative.host;\n\t\t\t\ttarget.port = relative.port;\n\t\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\t\ttarget.query = relative.query;\n\t\t\t} else {\n\t\t\t\tif (!relative.path) {\n\t\t\t\t\ttarget.path = base.path;\n\t\t\t\t\tif (relative.query !== void 0) target.query = relative.query;\n\t\t\t\t\telse target.query = base.query;\n\t\t\t\t} else {\n\t\t\t\t\tif (relative.path[0] === \"/\") target.path = removeDotSegments(relative.path);\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = \"/\" + relative.path;\n\t\t\t\t\t\telse if (!base.path) target.path = relative.path;\n\t\t\t\t\t\telse target.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t\t}\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t}\n\t\t\t\ttarget.userinfo = base.userinfo;\n\t\t\t\ttarget.host = base.host;\n\t\t\t\ttarget.port = base.port;\n\t\t\t}\n\t\t\ttarget.scheme = base.scheme;\n\t\t}\n\t\ttarget.fragment = relative.fragment;\n\t\treturn target;\n\t}\n\t/**\n\t* @param {import ('./types/index').URIComponent|string} uriA\n\t* @param {import ('./types/index').URIComponent|string} uriB\n\t* @param {import ('./types/index').Options} options\n\t* @returns {boolean}\n\t*/\n\tfunction equal(uriA, uriB, options) {\n\t\tif (typeof uriA === \"string\") {\n\t\t\turiA = unescape(uriA);\n\t\t\turiA = serialize(normalizeComponentEncoding(parse(uriA, options), true), {\n\t\t\t\t...options,\n\t\t\t\tskipEscape: true\n\t\t\t});\n\t\t} else if (typeof uriA === \"object\") uriA = serialize(normalizeComponentEncoding(uriA, true), {\n\t\t\t...options,\n\t\t\tskipEscape: true\n\t\t});\n\t\tif (typeof uriB === \"string\") {\n\t\t\turiB = unescape(uriB);\n\t\t\turiB = serialize(normalizeComponentEncoding(parse(uriB, options), true), {\n\t\t\t\t...options,\n\t\t\t\tskipEscape: true\n\t\t\t});\n\t\t} else if (typeof uriB === \"object\") uriB = serialize(normalizeComponentEncoding(uriB, true), {\n\t\t\t...options,\n\t\t\tskipEscape: true\n\t\t});\n\t\treturn uriA.toLowerCase() === uriB.toLowerCase();\n\t}\n\t/**\n\t* @param {Readonly<import('./types/index').URIComponent>} cmpts\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns {string}\n\t*/\n\tfunction serialize(cmpts, opts) {\n\t\tconst component = {\n\t\t\thost: cmpts.host,\n\t\t\tscheme: cmpts.scheme,\n\t\t\tuserinfo: cmpts.userinfo,\n\t\t\tport: cmpts.port,\n\t\t\tpath: cmpts.path,\n\t\t\tquery: cmpts.query,\n\t\t\tnid: cmpts.nid,\n\t\t\tnss: cmpts.nss,\n\t\t\tuuid: cmpts.uuid,\n\t\t\tfragment: cmpts.fragment,\n\t\t\treference: cmpts.reference,\n\t\t\tresourceName: cmpts.resourceName,\n\t\t\tsecure: cmpts.secure,\n\t\t\terror: \"\"\n\t\t};\n\t\tconst options = Object.assign({}, opts);\n\t\tconst uriTokens = [];\n\t\tconst schemeHandler = getSchemeHandler(options.scheme || component.scheme);\n\t\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);\n\t\tif (component.path !== void 0) if (!options.skipEscape) {\n\t\t\tcomponent.path = escape(component.path);\n\t\t\tif (component.scheme !== void 0) component.path = component.path.split(\"%3A\").join(\":\");\n\t\t} else component.path = unescape(component.path);\n\t\tif (options.reference !== \"suffix\" && component.scheme) uriTokens.push(component.scheme, \":\");\n\t\tconst authority = recomposeAuthority(component);\n\t\tif (authority !== void 0) {\n\t\t\tif (options.reference !== \"suffix\") uriTokens.push(\"//\");\n\t\t\turiTokens.push(authority);\n\t\t\tif (component.path && component.path[0] !== \"/\") uriTokens.push(\"/\");\n\t\t}\n\t\tif (component.path !== void 0) {\n\t\t\tlet s = component.path;\n\t\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s);\n\t\t\tif (authority === void 0 && s[0] === \"/\" && s[1] === \"/\") s = \"/%2F\" + s.slice(2);\n\t\t\turiTokens.push(s);\n\t\t}\n\t\tif (component.query !== void 0) uriTokens.push(\"?\", component.query);\n\t\tif (component.fragment !== void 0) uriTokens.push(\"#\", component.fragment);\n\t\treturn uriTokens.join(\"\");\n\t}\n\tconst URI_PARSE = /^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?/u;\n\t/**\n\t* @param {string} uri\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns\n\t*/\n\tfunction parse(uri, opts) {\n\t\tconst options = Object.assign({}, opts);\n\t\t/** @type {import('./types/index').URIComponent} */\n\t\tconst parsed = {\n\t\t\tscheme: void 0,\n\t\t\tuserinfo: void 0,\n\t\t\thost: \"\",\n\t\t\tport: void 0,\n\t\t\tpath: \"\",\n\t\t\tquery: void 0,\n\t\t\tfragment: void 0\n\t\t};\n\t\tlet isIP = false;\n\t\tif (options.reference === \"suffix\") if (options.scheme) uri = options.scheme + \":\" + uri;\n\t\telse uri = \"//\" + uri;\n\t\tconst matches = uri.match(URI_PARSE);\n\t\tif (matches) {\n\t\t\tparsed.scheme = matches[1];\n\t\t\tparsed.userinfo = matches[3];\n\t\t\tparsed.host = matches[4];\n\t\t\tparsed.port = parseInt(matches[5], 10);\n\t\t\tparsed.path = matches[6] || \"\";\n\t\t\tparsed.query = matches[7];\n\t\t\tparsed.fragment = matches[8];\n\t\t\tif (isNaN(parsed.port)) parsed.port = matches[5];\n\t\t\tif (parsed.host) if (isIPv4(parsed.host) === false) {\n\t\t\t\tconst ipv6result = normalizeIPv6(parsed.host);\n\t\t\t\tparsed.host = ipv6result.host.toLowerCase();\n\t\t\t\tisIP = ipv6result.isIPV6;\n\t\t\t} else isIP = true;\n\t\t\tif (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) parsed.reference = \"same-document\";\n\t\t\telse if (parsed.scheme === void 0) parsed.reference = \"relative\";\n\t\t\telse if (parsed.fragment === void 0) parsed.reference = \"absolute\";\n\t\t\telse parsed.reference = \"uri\";\n\t\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== parsed.reference) parsed.error = parsed.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t\tconst schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);\n\t\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t\tif (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) try {\n\t\t\t\t\tparsed.host = URL.domainToASCII(parsed.host.toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tparsed.error = parsed.error || \"Host's domain name can not be converted to ASCII: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {\n\t\t\t\tif (uri.indexOf(\"%\") !== -1) {\n\t\t\t\t\tif (parsed.scheme !== void 0) parsed.scheme = unescape(parsed.scheme);\n\t\t\t\t\tif (parsed.host !== void 0) parsed.host = unescape(parsed.host);\n\t\t\t\t}\n\t\t\t\tif (parsed.path) parsed.path = escape(unescape(parsed.path));\n\t\t\t\tif (parsed.fragment) parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));\n\t\t\t}\n\t\t\tif (schemeHandler && schemeHandler.parse) schemeHandler.parse(parsed, options);\n\t\t} else parsed.error = parsed.error || \"URI can not be parsed.\";\n\t\treturn parsed;\n\t}\n\tconst fastUri = {\n\t\tSCHEMES,\n\t\tnormalize,\n\t\tresolve,\n\t\tresolveComponent,\n\t\tequal,\n\t\tserialize,\n\t\tparse\n\t};\n\tmodule.exports = fastUri;\n\tmodule.exports.default = fastUri;\n\tmodule.exports.fastUri = fastUri;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js\nvar require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst uri = require_fast_uri();\n\turi.code = \"require(\\\"ajv/dist/runtime/uri\\\").default\";\n\texports.default = uri;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js\nvar require_core$3 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tconst validation_error_1 = require_validation_error();\n\tconst ref_error_1 = require_ref_error();\n\tconst rules_1 = require_rules();\n\tconst compile_1 = require_compile();\n\tconst codegen_2 = require_codegen();\n\tconst resolve_1 = require_resolve();\n\tconst dataType_1 = require_dataType();\n\tconst util_1 = require_util();\n\tconst $dataRefSchema = require_data();\n\tconst uri_1 = require_uri();\n\tconst defaultRegExp = (str, flags) => new RegExp(str, flags);\n\tdefaultRegExp.code = \"new RegExp\";\n\tconst META_IGNORE_OPTIONS = [\n\t\t\"removeAdditional\",\n\t\t\"useDefaults\",\n\t\t\"coerceTypes\"\n\t];\n\tconst EXT_SCOPE_NAMES = new Set([\n\t\t\"validate\",\n\t\t\"serialize\",\n\t\t\"parse\",\n\t\t\"wrapper\",\n\t\t\"root\",\n\t\t\"schema\",\n\t\t\"keyword\",\n\t\t\"pattern\",\n\t\t\"formats\",\n\t\t\"validate$data\",\n\t\t\"func\",\n\t\t\"obj\",\n\t\t\"Error\"\n\t]);\n\tconst removedOptions = {\n\t\terrorDataPath: \"\",\n\t\tformat: \"`validateFormats: false` can be used instead.\",\n\t\tnullable: \"\\\"nullable\\\" keyword is supported by default.\",\n\t\tjsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n\t\textendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n\t\tmissingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n\t\tprocessCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n\t\tsourceCode: \"Use option `code: {source: true}`\",\n\t\tstrictDefaults: \"It is default now, see option `strict`.\",\n\t\tstrictKeywords: \"It is default now, see option `strict`.\",\n\t\tuniqueItems: \"\\\"uniqueItems\\\" keyword is always validated.\",\n\t\tunknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n\t\tcache: \"Map is used as cache, schema object as key.\",\n\t\tserialize: \"Map is used as cache, schema object as key.\",\n\t\tajvErrors: \"It is default now.\"\n\t};\n\tconst deprecatedOptions = {\n\t\tignoreKeywordsWithRef: \"\",\n\t\tjsPropertySyntax: \"\",\n\t\tunicode: \"\\\"minLength\\\"/\\\"maxLength\\\" account for unicode characters by default.\"\n\t};\n\tconst MAX_EXPRESSION = 200;\n\tfunction requiredOptions(o) {\n\t\tvar _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;\n\t\tconst s = o.strict;\n\t\tconst _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;\n\t\tconst optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;\n\t\tconst regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;\n\t\tconst uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;\n\t\treturn {\n\t\t\tstrictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,\n\t\t\tstrictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,\n\t\t\tstrictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : \"log\",\n\t\t\tstrictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : \"log\",\n\t\t\tstrictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,\n\t\t\tcode: o.code ? {\n\t\t\t\t...o.code,\n\t\t\t\toptimize,\n\t\t\t\tregExp\n\t\t\t} : {\n\t\t\t\toptimize,\n\t\t\t\tregExp\n\t\t\t},\n\t\t\tloopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,\n\t\t\tloopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,\n\t\t\tmeta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,\n\t\t\tmessages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,\n\t\t\tinlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,\n\t\t\tschemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : \"$id\",\n\t\t\taddUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,\n\t\t\tvalidateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,\n\t\t\tvalidateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,\n\t\t\tunicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,\n\t\t\tint32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,\n\t\t\turiResolver\n\t\t};\n\t}\n\tvar Ajv = class {\n\t\tconstructor(opts = {}) {\n\t\t\tthis.schemas = {};\n\t\t\tthis.refs = {};\n\t\t\tthis.formats = {};\n\t\t\tthis._compilations = /* @__PURE__ */ new Set();\n\t\t\tthis._loading = {};\n\t\t\tthis._cache = /* @__PURE__ */ new Map();\n\t\t\topts = this.opts = {\n\t\t\t\t...opts,\n\t\t\t\t...requiredOptions(opts)\n\t\t\t};\n\t\t\tconst { es5, lines } = this.opts.code;\n\t\t\tthis.scope = new codegen_2.ValueScope({\n\t\t\t\tscope: {},\n\t\t\t\tprefixes: EXT_SCOPE_NAMES,\n\t\t\t\tes5,\n\t\t\t\tlines\n\t\t\t});\n\t\t\tthis.logger = getLogger(opts.logger);\n\t\t\tconst formatOpt = opts.validateFormats;\n\t\t\topts.validateFormats = false;\n\t\t\tthis.RULES = (0, rules_1.getRules)();\n\t\t\tcheckOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\");\n\t\t\tcheckOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\");\n\t\t\tthis._metaOpts = getMetaSchemaOptions.call(this);\n\t\t\tif (opts.formats) addInitialFormats.call(this);\n\t\t\tthis._addVocabularies();\n\t\t\tthis._addDefaultMetaSchema();\n\t\t\tif (opts.keywords) addInitialKeywords.call(this, opts.keywords);\n\t\t\tif (typeof opts.meta == \"object\") this.addMetaSchema(opts.meta);\n\t\t\taddInitialSchemas.call(this);\n\t\t\topts.validateFormats = formatOpt;\n\t\t}\n\t\t_addVocabularies() {\n\t\t\tthis.addKeyword(\"$async\");\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tconst { $data, meta, schemaId } = this.opts;\n\t\t\tlet _dataRefSchema = $dataRefSchema;\n\t\t\tif (schemaId === \"id\") {\n\t\t\t\t_dataRefSchema = { ...$dataRefSchema };\n\t\t\t\t_dataRefSchema.id = _dataRefSchema.$id;\n\t\t\t\tdelete _dataRefSchema.$id;\n\t\t\t}\n\t\t\tif (meta && $data) this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);\n\t\t}\n\t\tdefaultMeta() {\n\t\t\tconst { meta, schemaId } = this.opts;\n\t\t\treturn this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : void 0;\n\t\t}\n\t\tvalidate(schemaKeyRef, data) {\n\t\t\tlet v;\n\t\t\tif (typeof schemaKeyRef == \"string\") {\n\t\t\t\tv = this.getSchema(schemaKeyRef);\n\t\t\t\tif (!v) throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`);\n\t\t\t} else v = this.compile(schemaKeyRef);\n\t\t\tconst valid = v(data);\n\t\t\tif (!(\"$async\" in v)) this.errors = v.errors;\n\t\t\treturn valid;\n\t\t}\n\t\tcompile(schema, _meta) {\n\t\t\tconst sch = this._addSchema(schema, _meta);\n\t\t\treturn sch.validate || this._compileSchemaEnv(sch);\n\t\t}\n\t\tcompileAsync(schema, meta) {\n\t\t\tif (typeof this.opts.loadSchema != \"function\") throw new Error(\"options.loadSchema should be a function\");\n\t\t\tconst { loadSchema } = this.opts;\n\t\t\treturn runCompileAsync.call(this, schema, meta);\n\t\t\tasync function runCompileAsync(_schema, _meta) {\n\t\t\t\tawait loadMetaSchema.call(this, _schema.$schema);\n\t\t\t\tconst sch = this._addSchema(_schema, _meta);\n\t\t\t\treturn sch.validate || _compileAsync.call(this, sch);\n\t\t\t}\n\t\t\tasync function loadMetaSchema($ref) {\n\t\t\t\tif ($ref && !this.getSchema($ref)) await runCompileAsync.call(this, { $ref }, true);\n\t\t\t}\n\t\t\tasync function _compileAsync(sch) {\n\t\t\t\ttry {\n\t\t\t\t\treturn this._compileSchemaEnv(sch);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (!(e instanceof ref_error_1.default)) throw e;\n\t\t\t\t\tcheckLoaded.call(this, e);\n\t\t\t\t\tawait loadMissingSchema.call(this, e.missingSchema);\n\t\t\t\t\treturn _compileAsync.call(this, sch);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction checkLoaded({ missingSchema: ref, missingRef }) {\n\t\t\t\tif (this.refs[ref]) throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);\n\t\t\t}\n\t\t\tasync function loadMissingSchema(ref) {\n\t\t\t\tconst _schema = await _loadSchema.call(this, ref);\n\t\t\t\tif (!this.refs[ref]) await loadMetaSchema.call(this, _schema.$schema);\n\t\t\t\tif (!this.refs[ref]) this.addSchema(_schema, ref, meta);\n\t\t\t}\n\t\t\tasync function _loadSchema(ref) {\n\t\t\t\tconst p = this._loading[ref];\n\t\t\t\tif (p) return p;\n\t\t\t\ttry {\n\t\t\t\t\treturn await (this._loading[ref] = loadSchema(ref));\n\t\t\t\t} finally {\n\t\t\t\t\tdelete this._loading[ref];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\taddSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {\n\t\t\tif (Array.isArray(schema)) {\n\t\t\t\tfor (const sch of schema) this.addSchema(sch, void 0, _meta, _validateSchema);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tlet id;\n\t\t\tif (typeof schema === \"object\") {\n\t\t\t\tconst { schemaId } = this.opts;\n\t\t\t\tid = schema[schemaId];\n\t\t\t\tif (id !== void 0 && typeof id != \"string\") throw new Error(`schema ${schemaId} must be string`);\n\t\t\t}\n\t\t\tkey = (0, resolve_1.normalizeId)(key || id);\n\t\t\tthis._checkUnique(key);\n\t\t\tthis.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);\n\t\t\treturn this;\n\t\t}\n\t\taddMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {\n\t\t\tthis.addSchema(schema, key, true, _validateSchema);\n\t\t\treturn this;\n\t\t}\n\t\tvalidateSchema(schema, throwOrLogError) {\n\t\t\tif (typeof schema == \"boolean\") return true;\n\t\t\tlet $schema;\n\t\t\t$schema = schema.$schema;\n\t\t\tif ($schema !== void 0 && typeof $schema != \"string\") throw new Error(\"$schema must be a string\");\n\t\t\t$schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n\t\t\tif (!$schema) {\n\t\t\t\tthis.logger.warn(\"meta-schema not available\");\n\t\t\t\tthis.errors = null;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst valid = this.validate($schema, schema);\n\t\t\tif (!valid && throwOrLogError) {\n\t\t\t\tconst message = \"schema is invalid: \" + this.errorsText();\n\t\t\t\tif (this.opts.validateSchema === \"log\") this.logger.error(message);\n\t\t\t\telse throw new Error(message);\n\t\t\t}\n\t\t\treturn valid;\n\t\t}\n\t\tgetSchema(keyRef) {\n\t\t\tlet sch;\n\t\t\twhile (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\") keyRef = sch;\n\t\t\tif (sch === void 0) {\n\t\t\t\tconst { schemaId } = this.opts;\n\t\t\t\tconst root = new compile_1.SchemaEnv({\n\t\t\t\t\tschema: {},\n\t\t\t\t\tschemaId\n\t\t\t\t});\n\t\t\t\tsch = compile_1.resolveSchema.call(this, root, keyRef);\n\t\t\t\tif (!sch) return;\n\t\t\t\tthis.refs[keyRef] = sch;\n\t\t\t}\n\t\t\treturn sch.validate || this._compileSchemaEnv(sch);\n\t\t}\n\t\tremoveSchema(schemaKeyRef) {\n\t\t\tif (schemaKeyRef instanceof RegExp) {\n\t\t\t\tthis._removeAllSchemas(this.schemas, schemaKeyRef);\n\t\t\t\tthis._removeAllSchemas(this.refs, schemaKeyRef);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tswitch (typeof schemaKeyRef) {\n\t\t\t\tcase \"undefined\":\n\t\t\t\t\tthis._removeAllSchemas(this.schemas);\n\t\t\t\t\tthis._removeAllSchemas(this.refs);\n\t\t\t\t\tthis._cache.clear();\n\t\t\t\t\treturn this;\n\t\t\t\tcase \"string\": {\n\t\t\t\t\tconst sch = getSchEnv.call(this, schemaKeyRef);\n\t\t\t\t\tif (typeof sch == \"object\") this._cache.delete(sch.schema);\n\t\t\t\t\tdelete this.schemas[schemaKeyRef];\n\t\t\t\t\tdelete this.refs[schemaKeyRef];\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tcase \"object\": {\n\t\t\t\t\tconst cacheKey = schemaKeyRef;\n\t\t\t\t\tthis._cache.delete(cacheKey);\n\t\t\t\t\tlet id = schemaKeyRef[this.opts.schemaId];\n\t\t\t\t\tif (id) {\n\t\t\t\t\t\tid = (0, resolve_1.normalizeId)(id);\n\t\t\t\t\t\tdelete this.schemas[id];\n\t\t\t\t\t\tdelete this.refs[id];\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tdefault: throw new Error(\"ajv.removeSchema: invalid parameter\");\n\t\t\t}\n\t\t}\n\t\taddVocabulary(definitions) {\n\t\t\tfor (const def of definitions) this.addKeyword(def);\n\t\t\treturn this;\n\t\t}\n\t\taddKeyword(kwdOrDef, def) {\n\t\t\tlet keyword;\n\t\t\tif (typeof kwdOrDef == \"string\") {\n\t\t\t\tkeyword = kwdOrDef;\n\t\t\t\tif (typeof def == \"object\") {\n\t\t\t\t\tthis.logger.warn(\"these parameters are deprecated, see docs for addKeyword\");\n\t\t\t\t\tdef.keyword = keyword;\n\t\t\t\t}\n\t\t\t} else if (typeof kwdOrDef == \"object\" && def === void 0) {\n\t\t\t\tdef = kwdOrDef;\n\t\t\t\tkeyword = def.keyword;\n\t\t\t\tif (Array.isArray(keyword) && !keyword.length) throw new Error(\"addKeywords: keyword must be string or non-empty array\");\n\t\t\t} else throw new Error(\"invalid addKeywords parameters\");\n\t\t\tcheckKeyword.call(this, keyword, def);\n\t\t\tif (!def) {\n\t\t\t\t(0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tkeywordMetaschema.call(this, def);\n\t\t\tconst definition = {\n\t\t\t\t...def,\n\t\t\t\ttype: (0, dataType_1.getJSONTypes)(def.type),\n\t\t\t\tschemaType: (0, dataType_1.getJSONTypes)(def.schemaType)\n\t\t\t};\n\t\t\t(0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));\n\t\t\treturn this;\n\t\t}\n\t\tgetKeyword(keyword) {\n\t\t\tconst rule = this.RULES.all[keyword];\n\t\t\treturn typeof rule == \"object\" ? rule.definition : !!rule;\n\t\t}\n\t\tremoveKeyword(keyword) {\n\t\t\tconst { RULES } = this;\n\t\t\tdelete RULES.keywords[keyword];\n\t\t\tdelete RULES.all[keyword];\n\t\t\tfor (const group of RULES.rules) {\n\t\t\t\tconst i = group.rules.findIndex((rule) => rule.keyword === keyword);\n\t\t\t\tif (i >= 0) group.rules.splice(i, 1);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\taddFormat(name, format) {\n\t\t\tif (typeof format == \"string\") format = new RegExp(format);\n\t\t\tthis.formats[name] = format;\n\t\t\treturn this;\n\t\t}\n\t\terrorsText(errors = this.errors, { separator = \", \", dataVar = \"data\" } = {}) {\n\t\t\tif (!errors || errors.length === 0) return \"No errors\";\n\t\t\treturn errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);\n\t\t}\n\t\t$dataMetaSchema(metaSchema, keywordsJsonPointers) {\n\t\t\tconst rules = this.RULES.all;\n\t\t\tmetaSchema = JSON.parse(JSON.stringify(metaSchema));\n\t\t\tfor (const jsonPointer of keywordsJsonPointers) {\n\t\t\t\tconst segments = jsonPointer.split(\"/\").slice(1);\n\t\t\t\tlet keywords = metaSchema;\n\t\t\t\tfor (const seg of segments) keywords = keywords[seg];\n\t\t\t\tfor (const key in rules) {\n\t\t\t\t\tconst rule = rules[key];\n\t\t\t\t\tif (typeof rule != \"object\") continue;\n\t\t\t\t\tconst { $data } = rule.definition;\n\t\t\t\t\tconst schema = keywords[key];\n\t\t\t\t\tif ($data && schema) keywords[key] = schemaOrData(schema);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn metaSchema;\n\t\t}\n\t\t_removeAllSchemas(schemas, regex) {\n\t\t\tfor (const keyRef in schemas) {\n\t\t\t\tconst sch = schemas[keyRef];\n\t\t\t\tif (!regex || regex.test(keyRef)) {\n\t\t\t\t\tif (typeof sch == \"string\") delete schemas[keyRef];\n\t\t\t\t\telse if (sch && !sch.meta) {\n\t\t\t\t\t\tthis._cache.delete(sch.schema);\n\t\t\t\t\t\tdelete schemas[keyRef];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {\n\t\t\tlet id;\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tif (typeof schema == \"object\") id = schema[schemaId];\n\t\t\telse if (this.opts.jtd) throw new Error(\"schema must be object\");\n\t\t\telse if (typeof schema != \"boolean\") throw new Error(\"schema must be object or boolean\");\n\t\t\tlet sch = this._cache.get(schema);\n\t\t\tif (sch !== void 0) return sch;\n\t\t\tbaseId = (0, resolve_1.normalizeId)(id || baseId);\n\t\t\tconst localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);\n\t\t\tsch = new compile_1.SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\tmeta,\n\t\t\t\tbaseId,\n\t\t\t\tlocalRefs\n\t\t\t});\n\t\t\tthis._cache.set(sch.schema, sch);\n\t\t\tif (addSchema && !baseId.startsWith(\"#\")) {\n\t\t\t\tif (baseId) this._checkUnique(baseId);\n\t\t\t\tthis.refs[baseId] = sch;\n\t\t\t}\n\t\t\tif (validateSchema) this.validateSchema(schema, true);\n\t\t\treturn sch;\n\t\t}\n\t\t_checkUnique(id) {\n\t\t\tif (this.schemas[id] || this.refs[id]) throw new Error(`schema with key or id \"${id}\" already exists`);\n\t\t}\n\t\t_compileSchemaEnv(sch) {\n\t\t\tif (sch.meta) this._compileMetaSchema(sch);\n\t\t\telse compile_1.compileSchema.call(this, sch);\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!sch.validate) throw new Error(\"ajv implementation error\");\n\t\t\treturn sch.validate;\n\t\t}\n\t\t_compileMetaSchema(sch) {\n\t\t\tconst currentOpts = this.opts;\n\t\t\tthis.opts = this._metaOpts;\n\t\t\ttry {\n\t\t\t\tcompile_1.compileSchema.call(this, sch);\n\t\t\t} finally {\n\t\t\t\tthis.opts = currentOpts;\n\t\t\t}\n\t\t}\n\t};\n\tAjv.ValidationError = validation_error_1.default;\n\tAjv.MissingRefError = ref_error_1.default;\n\texports.default = Ajv;\n\tfunction checkOptions(checkOpts, options, msg, log = \"error\") {\n\t\tfor (const key in checkOpts) {\n\t\t\tconst opt = key;\n\t\t\tif (opt in options) this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);\n\t\t}\n\t}\n\tfunction getSchEnv(keyRef) {\n\t\tkeyRef = (0, resolve_1.normalizeId)(keyRef);\n\t\treturn this.schemas[keyRef] || this.refs[keyRef];\n\t}\n\tfunction addInitialSchemas() {\n\t\tconst optsSchemas = this.opts.schemas;\n\t\tif (!optsSchemas) return;\n\t\tif (Array.isArray(optsSchemas)) this.addSchema(optsSchemas);\n\t\telse for (const key in optsSchemas) this.addSchema(optsSchemas[key], key);\n\t}\n\tfunction addInitialFormats() {\n\t\tfor (const name in this.opts.formats) {\n\t\t\tconst format = this.opts.formats[name];\n\t\t\tif (format) this.addFormat(name, format);\n\t\t}\n\t}\n\tfunction addInitialKeywords(defs) {\n\t\tif (Array.isArray(defs)) {\n\t\t\tthis.addVocabulary(defs);\n\t\t\treturn;\n\t\t}\n\t\tthis.logger.warn(\"keywords option as map is deprecated, pass array\");\n\t\tfor (const keyword in defs) {\n\t\t\tconst def = defs[keyword];\n\t\t\tif (!def.keyword) def.keyword = keyword;\n\t\t\tthis.addKeyword(def);\n\t\t}\n\t}\n\tfunction getMetaSchemaOptions() {\n\t\tconst metaOpts = { ...this.opts };\n\t\tfor (const opt of META_IGNORE_OPTIONS) delete metaOpts[opt];\n\t\treturn metaOpts;\n\t}\n\tconst noLogs = {\n\t\tlog() {},\n\t\twarn() {},\n\t\terror() {}\n\t};\n\tfunction getLogger(logger) {\n\t\tif (logger === false) return noLogs;\n\t\tif (logger === void 0) return console;\n\t\tif (logger.log && logger.warn && logger.error) return logger;\n\t\tthrow new Error(\"logger must implement log, warn and error methods\");\n\t}\n\tconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;\n\tfunction checkKeyword(keyword, def) {\n\t\tconst { RULES } = this;\n\t\t(0, util_1.eachItem)(keyword, (kwd) => {\n\t\t\tif (RULES.keywords[kwd]) throw new Error(`Keyword ${kwd} is already defined`);\n\t\t\tif (!KEYWORD_NAME.test(kwd)) throw new Error(`Keyword ${kwd} has invalid name`);\n\t\t});\n\t\tif (!def) return;\n\t\tif (def.$data && !(\"code\" in def || \"validate\" in def)) throw new Error(\"$data keyword must have \\\"code\\\" or \\\"validate\\\" function\");\n\t}\n\tfunction addRule(keyword, definition, dataType) {\n\t\tvar _a;\n\t\tconst post = definition === null || definition === void 0 ? void 0 : definition.post;\n\t\tif (dataType && post) throw new Error(\"keyword with \\\"post\\\" flag cannot have \\\"type\\\"\");\n\t\tconst { RULES } = this;\n\t\tlet ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);\n\t\tif (!ruleGroup) {\n\t\t\truleGroup = {\n\t\t\t\ttype: dataType,\n\t\t\t\trules: []\n\t\t\t};\n\t\t\tRULES.rules.push(ruleGroup);\n\t\t}\n\t\tRULES.keywords[keyword] = true;\n\t\tif (!definition) return;\n\t\tconst rule = {\n\t\t\tkeyword,\n\t\t\tdefinition: {\n\t\t\t\t...definition,\n\t\t\t\ttype: (0, dataType_1.getJSONTypes)(definition.type),\n\t\t\t\tschemaType: (0, dataType_1.getJSONTypes)(definition.schemaType)\n\t\t\t}\n\t\t};\n\t\tif (definition.before) addBeforeRule.call(this, ruleGroup, rule, definition.before);\n\t\telse ruleGroup.rules.push(rule);\n\t\tRULES.all[keyword] = rule;\n\t\t(_a = definition.implements) === null || _a === void 0 || _a.forEach((kwd) => this.addKeyword(kwd));\n\t}\n\tfunction addBeforeRule(ruleGroup, rule, before) {\n\t\tconst i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);\n\t\tif (i >= 0) ruleGroup.rules.splice(i, 0, rule);\n\t\telse {\n\t\t\truleGroup.rules.push(rule);\n\t\t\tthis.logger.warn(`rule ${before} is not defined`);\n\t\t}\n\t}\n\tfunction keywordMetaschema(def) {\n\t\tlet { metaSchema } = def;\n\t\tif (metaSchema === void 0) return;\n\t\tif (def.$data && this.opts.$data) metaSchema = schemaOrData(metaSchema);\n\t\tdef.validateSchema = this.compile(metaSchema, true);\n\t}\n\tconst $dataRef = { $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\" };\n\tfunction schemaOrData(schema) {\n\t\treturn { anyOf: [schema, $dataRef] };\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js\nvar require_id = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst def = {\n\t\tkeyword: \"id\",\n\t\tcode() {\n\t\t\tthrow new Error(\"NOT SUPPORTED: keyword \\\"id\\\", use \\\"$id\\\" for schema ID\");\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js\nvar require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.callRef = exports.getValidate = void 0;\n\tconst ref_error_1 = require_ref_error();\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst compile_1 = require_compile();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"$ref\",\n\t\tschemaType: \"string\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema: $ref, it } = cxt;\n\t\t\tconst { baseId, schemaEnv: env, validateName, opts, self } = it;\n\t\t\tconst { root } = env;\n\t\t\tif (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId) return callRootRef();\n\t\t\tconst schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n\t\t\tif (schOrEnv === void 0) throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n\t\t\tif (schOrEnv instanceof compile_1.SchemaEnv) return callValidate(schOrEnv);\n\t\t\treturn inlineRefSchema(schOrEnv);\n\t\t\tfunction callRootRef() {\n\t\t\t\tif (env === root) return callRef(cxt, validateName, env, env.$async);\n\t\t\t\tconst rootName = gen.scopeValue(\"root\", { ref: root });\n\t\t\t\treturn callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);\n\t\t\t}\n\t\t\tfunction callValidate(sch) {\n\t\t\t\tcallRef(cxt, getValidate(cxt, sch), sch, sch.$async);\n\t\t\t}\n\t\t\tfunction inlineRefSchema(sch) {\n\t\t\t\tconst schName = gen.scopeValue(\"schema\", opts.code.source === true ? {\n\t\t\t\t\tref: sch,\n\t\t\t\t\tcode: (0, codegen_1.stringify)(sch)\n\t\t\t\t} : { ref: sch });\n\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tschema: sch,\n\t\t\t\t\tdataTypes: [],\n\t\t\t\t\tschemaPath: codegen_1.nil,\n\t\t\t\t\ttopSchemaRef: schName,\n\t\t\t\t\terrSchemaPath: $ref\n\t\t\t\t}, valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t}\n\t};\n\tfunction getValidate(cxt, sch) {\n\t\tconst { gen } = cxt;\n\t\treturn sch.validate ? gen.scopeValue(\"validate\", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n\t}\n\texports.getValidate = getValidate;\n\tfunction callRef(cxt, v, sch, $async) {\n\t\tconst { gen, it } = cxt;\n\t\tconst { allErrors, schemaEnv: env, opts } = it;\n\t\tconst passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n\t\tif ($async) callAsyncRef();\n\t\telse callSyncRef();\n\t\tfunction callAsyncRef() {\n\t\t\tif (!env.$async) throw new Error(\"async schema referenced by sync schema\");\n\t\t\tconst valid = gen.let(\"valid\");\n\t\t\tgen.try(() => {\n\t\t\t\tgen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n\t\t\t\taddEvaluatedFrom(v);\n\t\t\t\tif (!allErrors) gen.assign(valid, true);\n\t\t\t}, (e) => {\n\t\t\t\tgen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n\t\t\t\taddErrorsFrom(e);\n\t\t\t\tif (!allErrors) gen.assign(valid, false);\n\t\t\t});\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction callSyncRef() {\n\t\t\tcxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n\t\t}\n\t\tfunction addErrorsFrom(source) {\n\t\t\tconst errs = (0, codegen_1._)`${source}.errors`;\n\t\t\tgen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);\n\t\t\tgen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);\n\t\t}\n\t\tfunction addEvaluatedFrom(source) {\n\t\t\tvar _a;\n\t\t\tif (!it.opts.unevaluated) return;\n\t\t\tconst schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n\t\t\tif (it.props !== true) if (schEvaluated && !schEvaluated.dynamicProps) {\n\t\t\t\tif (schEvaluated.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n\t\t\t} else {\n\t\t\t\tconst props = gen.var(\"props\", (0, codegen_1._)`${source}.evaluated.props`);\n\t\t\t\tit.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n\t\t\t}\n\t\t\tif (it.items !== true) if (schEvaluated && !schEvaluated.dynamicItems) {\n\t\t\t\tif (schEvaluated.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n\t\t\t} else {\n\t\t\t\tconst items = gen.var(\"items\", (0, codegen_1._)`${source}.evaluated.items`);\n\t\t\t\tit.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n\t\t\t}\n\t\t}\n\t}\n\texports.callRef = callRef;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js\nvar require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst id_1 = require_id();\n\tconst ref_1 = require_ref();\n\tconst core = [\n\t\t\"$schema\",\n\t\t\"$id\",\n\t\t\"$defs\",\n\t\t\"$vocabulary\",\n\t\t{ keyword: \"$comment\" },\n\t\t\"definitions\",\n\t\tid_1.default,\n\t\tref_1.default\n\t];\n\texports.default = core;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js\nvar require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst ops = codegen_1.operators;\n\tconst KWDs = {\n\t\tmaximum: {\n\t\t\tokStr: \"<=\",\n\t\t\tok: ops.LTE,\n\t\t\tfail: ops.GT\n\t\t},\n\t\tminimum: {\n\t\t\tokStr: \">=\",\n\t\t\tok: ops.GTE,\n\t\t\tfail: ops.LT\n\t\t},\n\t\texclusiveMaximum: {\n\t\t\tokStr: \"<\",\n\t\t\tok: ops.LT,\n\t\t\tfail: ops.GTE\n\t\t},\n\t\texclusiveMinimum: {\n\t\t\tokStr: \">\",\n\t\t\tok: ops.GT,\n\t\t\tfail: ops.LTE\n\t\t}\n\t};\n\tconst def = {\n\t\tkeyword: Object.keys(KWDs),\n\t\ttype: \"number\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,\n\t\t\tparams: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tcxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js\nvar require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: \"multipleOf\",\n\t\ttype: \"number\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, schemaCode, it } = cxt;\n\t\t\tconst prec = it.opts.multipleOfPrecision;\n\t\t\tconst res = gen.let(\"res\");\n\t\t\tconst invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;\n\t\t\tcxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js\nvar require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tfunction ucs2length(str) {\n\t\tconst len = str.length;\n\t\tlet length = 0;\n\t\tlet pos = 0;\n\t\tlet value;\n\t\twhile (pos < len) {\n\t\t\tlength++;\n\t\t\tvalue = str.charCodeAt(pos++);\n\t\t\tif (value >= 55296 && value <= 56319 && pos < len) {\n\t\t\t\tvalue = str.charCodeAt(pos);\n\t\t\t\tif ((value & 64512) === 56320) pos++;\n\t\t\t}\n\t\t}\n\t\treturn length;\n\t}\n\texports.default = ucs2length;\n\tucs2length.code = \"require(\\\"ajv/dist/runtime/ucs2length\\\").default\";\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js\nvar require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst ucs2length_1 = require_ucs2length();\n\tconst def = {\n\t\tkeyword: [\"maxLength\", \"minLength\"],\n\t\ttype: \"string\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxLength\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode, it } = cxt;\n\t\t\tconst op = keyword === \"maxLength\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tconst len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;\n\t\t\tcxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js\nvar require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst util_1 = require_util();\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: \"pattern\",\n\t\ttype: \"string\",\n\t\tschemaType: \"string\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must match pattern \"${schemaCode}\"`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tconst u = it.opts.unicodeRegExp ? \"u\" : \"\";\n\t\t\tif ($data) {\n\t\t\t\tconst { regExp } = it.opts.code;\n\t\t\t\tconst regExpCode = regExp.code === \"new RegExp\" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);\n\t\t\t\tconst valid = gen.let(\"valid\");\n\t\t\t\tgen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));\n\t\t\t\tcxt.fail$data((0, codegen_1._)`!${valid}`);\n\t\t\t} else {\n\t\t\t\tconst regExp = (0, code_1.usePattern)(cxt, schema);\n\t\t\t\tcxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js\nvar require_limitProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: [\"maxProperties\", \"minProperties\"],\n\t\ttype: \"object\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tconst op = keyword === \"maxProperties\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tcxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js\nvar require_required = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"required\",\n\t\ttype: \"object\",\n\t\tschemaType: \"array\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,\n\t\t\tparams: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, schemaCode, data, $data, it } = cxt;\n\t\t\tconst { opts } = it;\n\t\t\tif (!$data && schema.length === 0) return;\n\t\t\tconst useLoop = schema.length >= opts.loopRequired;\n\t\t\tif (it.allErrors) allErrorsMode();\n\t\t\telse exitOnErrorMode();\n\t\t\tif (opts.strictRequired) {\n\t\t\t\tconst props = cxt.parentSchema.properties;\n\t\t\t\tconst { definedProperties } = cxt.it;\n\t\t\t\tfor (const requiredKey of schema) if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {\n\t\t\t\t\tconst msg = `required property \"${requiredKey}\" is not defined at \"${it.schemaEnv.baseId + it.errSchemaPath}\" (strictRequired)`;\n\t\t\t\t\t(0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction allErrorsMode() {\n\t\t\t\tif (useLoop || $data) cxt.block$data(codegen_1.nil, loopAllRequired);\n\t\t\t\telse for (const prop of schema) (0, code_1.checkReportMissingProp)(cxt, prop);\n\t\t\t}\n\t\t\tfunction exitOnErrorMode() {\n\t\t\t\tconst missing = gen.let(\"missing\");\n\t\t\t\tif (useLoop || $data) {\n\t\t\t\t\tconst valid = gen.let(\"valid\", true);\n\t\t\t\t\tcxt.block$data(valid, () => loopUntilMissing(missing, valid));\n\t\t\t\t\tcxt.ok(valid);\n\t\t\t\t} else {\n\t\t\t\t\tgen.if((0, code_1.checkMissingProp)(cxt, schema, missing));\n\t\t\t\t\t(0, code_1.reportMissingProp)(cxt, missing);\n\t\t\t\t\tgen.else();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction loopAllRequired() {\n\t\t\t\tgen.forOf(\"prop\", schemaCode, (prop) => {\n\t\t\t\t\tcxt.setParams({ missingProperty: prop });\n\t\t\t\t\tgen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction loopUntilMissing(missing, valid) {\n\t\t\t\tcxt.setParams({ missingProperty: missing });\n\t\t\t\tgen.forOf(missing, schemaCode, () => {\n\t\t\t\t\tgen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));\n\t\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\t\tcxt.error();\n\t\t\t\t\t\tgen.break();\n\t\t\t\t\t});\n\t\t\t\t}, codegen_1.nil);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js\nvar require_limitItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: [\"maxItems\", \"minItems\"],\n\t\ttype: \"array\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxItems\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tconst op = keyword === \"maxItems\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tcxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js\nvar require_equal = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst equal = require_fast_deep_equal();\n\tequal.code = \"require(\\\"ajv/dist/runtime/equal\\\").default\";\n\texports.default = equal;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js\nvar require_uniqueItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dataType_1 = require_dataType();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\tconst def = {\n\t\tkeyword: \"uniqueItems\",\n\t\ttype: \"array\",\n\t\tschemaType: \"boolean\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n\t\t\tparams: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;\n\t\t\tif (!$data && !schema) return;\n\t\t\tconst valid = gen.let(\"valid\");\n\t\t\tconst itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];\n\t\t\tcxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);\n\t\t\tcxt.ok(valid);\n\t\t\tfunction validateUniqueItems() {\n\t\t\t\tconst i = gen.let(\"i\", (0, codegen_1._)`${data}.length`);\n\t\t\t\tconst j = gen.let(\"j\");\n\t\t\t\tcxt.setParams({\n\t\t\t\t\ti,\n\t\t\t\t\tj\n\t\t\t\t});\n\t\t\t\tgen.assign(valid, true);\n\t\t\t\tgen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));\n\t\t\t}\n\t\t\tfunction canOptimize() {\n\t\t\t\treturn itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\");\n\t\t\t}\n\t\t\tfunction loopN(i, j) {\n\t\t\t\tconst item = gen.name(\"item\");\n\t\t\t\tconst wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);\n\t\t\t\tconst indices = gen.const(\"indices\", (0, codegen_1._)`{}`);\n\t\t\t\tgen.for((0, codegen_1._)`;${i}--;`, () => {\n\t\t\t\t\tgen.let(item, (0, codegen_1._)`${data}[${i}]`);\n\t\t\t\t\tgen.if(wrongType, (0, codegen_1._)`continue`);\n\t\t\t\t\tif (itemTypes.length > 1) gen.if((0, codegen_1._)`typeof ${item} == \"string\"`, (0, codegen_1._)`${item} += \"_\"`);\n\t\t\t\t\tgen.if((0, codegen_1._)`typeof ${indices}[${item}] == \"number\"`, () => {\n\t\t\t\t\t\tgen.assign(j, (0, codegen_1._)`${indices}[${item}]`);\n\t\t\t\t\t\tcxt.error();\n\t\t\t\t\t\tgen.assign(valid, false).break();\n\t\t\t\t\t}).code((0, codegen_1._)`${indices}[${item}] = ${i}`);\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction loopN2(i, j) {\n\t\t\t\tconst eql = (0, util_1.useFunc)(gen, equal_1.default);\n\t\t\t\tconst outer = gen.name(\"outer\");\n\t\t\t\tgen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => {\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tgen.assign(valid, false).break(outer);\n\t\t\t\t})));\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js\nvar require_const = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\tconst def = {\n\t\tkeyword: \"const\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: \"must be equal to constant\",\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schemaCode, schema } = cxt;\n\t\t\tif ($data || schema && typeof schema == \"object\") cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);\n\t\t\telse cxt.fail((0, codegen_1._)`${schema} !== ${data}`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js\nvar require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\tconst def = {\n\t\tkeyword: \"enum\",\n\t\tschemaType: \"array\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: \"must be equal to one of the allowed values\",\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tif (!$data && schema.length === 0) throw new Error(\"enum must have non-empty array\");\n\t\t\tconst useLoop = schema.length >= it.opts.loopEnum;\n\t\t\tlet eql;\n\t\t\tconst getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);\n\t\t\tlet valid;\n\t\t\tif (useLoop || $data) {\n\t\t\t\tvalid = gen.let(\"valid\");\n\t\t\t\tcxt.block$data(valid, loopEnum);\n\t\t\t} else {\n\t\t\t\t/* istanbul ignore if */\n\t\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\t\tconst vSchema = gen.const(\"vSchema\", schemaCode);\n\t\t\t\tvalid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));\n\t\t\t}\n\t\t\tcxt.pass(valid);\n\t\t\tfunction loopEnum() {\n\t\t\t\tgen.assign(valid, false);\n\t\t\t\tgen.forOf(\"v\", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));\n\t\t\t}\n\t\t\tfunction equalCode(vSchema, i) {\n\t\t\t\tconst sch = schema[i];\n\t\t\t\treturn typeof sch === \"object\" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js\nvar require_validation$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst limitNumber_1 = require_limitNumber();\n\tconst multipleOf_1 = require_multipleOf();\n\tconst limitLength_1 = require_limitLength();\n\tconst pattern_1 = require_pattern();\n\tconst limitProperties_1 = require_limitProperties();\n\tconst required_1 = require_required();\n\tconst limitItems_1 = require_limitItems();\n\tconst uniqueItems_1 = require_uniqueItems();\n\tconst const_1 = require_const();\n\tconst enum_1 = require_enum();\n\tconst validation = [\n\t\tlimitNumber_1.default,\n\t\tmultipleOf_1.default,\n\t\tlimitLength_1.default,\n\t\tpattern_1.default,\n\t\tlimitProperties_1.default,\n\t\trequired_1.default,\n\t\tlimitItems_1.default,\n\t\tuniqueItems_1.default,\n\t\t{\n\t\t\tkeyword: \"type\",\n\t\t\tschemaType: [\"string\", \"array\"]\n\t\t},\n\t\t{\n\t\t\tkeyword: \"nullable\",\n\t\t\tschemaType: \"boolean\"\n\t\t},\n\t\tconst_1.default,\n\t\tenum_1.default\n\t];\n\texports.default = validation;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js\nvar require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateAdditionalItems = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"additionalItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\tbefore: \"uniqueItems\",\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { parentSchema, it } = cxt;\n\t\t\tconst { items } = parentSchema;\n\t\t\tif (!Array.isArray(items)) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, \"\\\"additionalItems\\\" is ignored when \\\"items\\\" is not an array of schemas\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvalidateAdditionalItems(cxt, items);\n\t\t}\n\t};\n\tfunction validateAdditionalItems(cxt, items) {\n\t\tconst { gen, schema, data, keyword, it } = cxt;\n\t\tit.items = true;\n\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\tif (schema === false) {\n\t\t\tcxt.setParams({ len: items.length });\n\t\t\tcxt.pass((0, codegen_1._)`${len} <= ${items.length}`);\n\t\t} else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\tconst valid = gen.var(\"valid\", (0, codegen_1._)`${len} <= ${items.length}`);\n\t\t\tgen.if((0, codegen_1.not)(valid), () => validateItems(valid));\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction validateItems(valid) {\n\t\t\tgen.forRange(\"i\", items.length, len, (i) => {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tdataProp: i,\n\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t}, valid);\n\t\t\t\tif (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t});\n\t\t}\n\t}\n\texports.validateAdditionalItems = validateAdditionalItems;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js\nvar require_items = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateTuple = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\tconst def = {\n\t\tkeyword: \"items\",\n\t\ttype: \"array\",\n\t\tschemaType: [\n\t\t\t\"object\",\n\t\t\t\"array\",\n\t\t\t\"boolean\"\n\t\t],\n\t\tbefore: \"uniqueItems\",\n\t\tcode(cxt) {\n\t\t\tconst { schema, it } = cxt;\n\t\t\tif (Array.isArray(schema)) return validateTuple(cxt, \"additionalItems\", schema);\n\t\t\tit.items = true;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tcxt.ok((0, code_1.validateArray)(cxt));\n\t\t}\n\t};\n\tfunction validateTuple(cxt, extraItems, schArr = cxt.schema) {\n\t\tconst { gen, parentSchema, data, keyword, it } = cxt;\n\t\tcheckStrictTuple(parentSchema);\n\t\tif (it.opts.unevaluated && schArr.length && it.items !== true) it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);\n\t\tconst valid = gen.name(\"valid\");\n\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\tschArr.forEach((sch, i) => {\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) return;\n\t\t\tgen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({\n\t\t\t\tkeyword,\n\t\t\t\tschemaProp: i,\n\t\t\t\tdataProp: i\n\t\t\t}, valid));\n\t\t\tcxt.ok(valid);\n\t\t});\n\t\tfunction checkStrictTuple(sch) {\n\t\t\tconst { opts, errSchemaPath } = it;\n\t\t\tconst l = schArr.length;\n\t\t\tconst fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);\n\t\t\tif (opts.strictTuples && !fullTuple) {\n\t\t\t\tconst msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`;\n\t\t\t\t(0, util_1.checkStrictMode)(it, msg, opts.strictTuples);\n\t\t\t}\n\t\t}\n\t}\n\texports.validateTuple = validateTuple;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js\nvar require_prefixItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst items_1 = require_items();\n\tconst def = {\n\t\tkeyword: \"prefixItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"array\"],\n\t\tbefore: \"uniqueItems\",\n\t\tcode: (cxt) => (0, items_1.validateTuple)(cxt, \"items\")\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js\nvar require_items2020 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\tconst additionalItems_1 = require_additionalItems();\n\tconst def = {\n\t\tkeyword: \"items\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tbefore: \"uniqueItems\",\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { schema, parentSchema, it } = cxt;\n\t\t\tconst { prefixItems } = parentSchema;\n\t\t\tit.items = true;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tif (prefixItems) (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);\n\t\t\telse cxt.ok((0, code_1.validateArray)(cxt));\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js\nvar require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"contains\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tbefore: \"uniqueItems\",\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,\n\t\t\tparams: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, it } = cxt;\n\t\t\tlet min;\n\t\t\tlet max;\n\t\t\tconst { minContains, maxContains } = parentSchema;\n\t\t\tif (it.opts.next) {\n\t\t\t\tmin = minContains === void 0 ? 1 : minContains;\n\t\t\t\tmax = maxContains;\n\t\t\t} else min = 1;\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tcxt.setParams({\n\t\t\t\tmin,\n\t\t\t\tmax\n\t\t\t});\n\t\t\tif (max === void 0 && min === 0) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (max !== void 0 && min > max) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, `\"minContains\" > \"maxContains\" is always invalid`);\n\t\t\t\tcxt.fail();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tlet cond = (0, codegen_1._)`${len} >= ${min}`;\n\t\t\t\tif (max !== void 0) cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;\n\t\t\t\tcxt.pass(cond);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tit.items = true;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tif (max === void 0 && min === 1) validateItems(valid, () => gen.if(valid, () => gen.break()));\n\t\t\telse if (min === 0) {\n\t\t\t\tgen.let(valid, true);\n\t\t\t\tif (max !== void 0) gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);\n\t\t\t} else {\n\t\t\t\tgen.let(valid, false);\n\t\t\t\tvalidateItemsWithCount();\n\t\t\t}\n\t\t\tcxt.result(valid, () => cxt.reset());\n\t\t\tfunction validateItemsWithCount() {\n\t\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\t\tconst count = gen.let(\"count\", 0);\n\t\t\t\tvalidateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));\n\t\t\t}\n\t\t\tfunction validateItems(_valid, block) {\n\t\t\t\tgen.forRange(\"i\", 0, len, (i) => {\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"contains\",\n\t\t\t\t\t\tdataProp: i,\n\t\t\t\t\t\tdataPropType: util_1.Type.Num,\n\t\t\t\t\t\tcompositeRule: true\n\t\t\t\t\t}, _valid);\n\t\t\t\t\tblock();\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction checkLimits(count) {\n\t\t\t\tgen.code((0, codegen_1._)`${count}++`);\n\t\t\t\tif (max === void 0) gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());\n\t\t\t\telse {\n\t\t\t\t\tgen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());\n\t\t\t\t\tif (min === 1) gen.assign(valid, true);\n\t\t\t\t\telse gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js\nvar require_dependencies = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\texports.error = {\n\t\tmessage: ({ params: { property, depsCount, deps } }) => {\n\t\t\tconst property_ies = depsCount === 1 ? \"property\" : \"properties\";\n\t\t\treturn (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;\n\t\t},\n\t\tparams: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},\n missingProperty: ${missingProperty},\n depsCount: ${depsCount},\n deps: ${deps}}`\n\t};\n\tconst def = {\n\t\tkeyword: \"dependencies\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: exports.error,\n\t\tcode(cxt) {\n\t\t\tconst [propDeps, schDeps] = splitDependencies(cxt);\n\t\t\tvalidatePropertyDeps(cxt, propDeps);\n\t\t\tvalidateSchemaDeps(cxt, schDeps);\n\t\t}\n\t};\n\tfunction splitDependencies({ schema }) {\n\t\tconst propertyDeps = {};\n\t\tconst schemaDeps = {};\n\t\tfor (const key in schema) {\n\t\t\tif (key === \"__proto__\") continue;\n\t\t\tconst deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;\n\t\t\tdeps[key] = schema[key];\n\t\t}\n\t\treturn [propertyDeps, schemaDeps];\n\t}\n\tfunction validatePropertyDeps(cxt, propertyDeps = cxt.schema) {\n\t\tconst { gen, data, it } = cxt;\n\t\tif (Object.keys(propertyDeps).length === 0) return;\n\t\tconst missing = gen.let(\"missing\");\n\t\tfor (const prop in propertyDeps) {\n\t\t\tconst deps = propertyDeps[prop];\n\t\t\tif (deps.length === 0) continue;\n\t\t\tconst hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);\n\t\t\tcxt.setParams({\n\t\t\t\tproperty: prop,\n\t\t\t\tdepsCount: deps.length,\n\t\t\t\tdeps: deps.join(\", \")\n\t\t\t});\n\t\t\tif (it.allErrors) gen.if(hasProperty, () => {\n\t\t\t\tfor (const depProp of deps) (0, code_1.checkReportMissingProp)(cxt, depProp);\n\t\t\t});\n\t\t\telse {\n\t\t\t\tgen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);\n\t\t\t\t(0, code_1.reportMissingProp)(cxt, missing);\n\t\t\t\tgen.else();\n\t\t\t}\n\t\t}\n\t}\n\texports.validatePropertyDeps = validatePropertyDeps;\n\tfunction validateSchemaDeps(cxt, schemaDeps = cxt.schema) {\n\t\tconst { gen, data, keyword, it } = cxt;\n\t\tconst valid = gen.name(\"valid\");\n\t\tfor (const prop in schemaDeps) {\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) continue;\n\t\t\tgen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => {\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tschemaProp: prop\n\t\t\t\t}, valid);\n\t\t\t\tcxt.mergeValidEvaluated(schCxt, valid);\n\t\t\t}, () => gen.var(valid, true));\n\t\t\tcxt.ok(valid);\n\t\t}\n\t}\n\texports.validateSchemaDeps = validateSchemaDeps;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js\nvar require_propertyNames = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"propertyNames\",\n\t\ttype: \"object\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\terror: {\n\t\t\tmessage: \"property name must be valid\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, it } = cxt;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\tcxt.setParams({ propertyName: key });\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword: \"propertyNames\",\n\t\t\t\t\tdata: key,\n\t\t\t\t\tdataTypes: [\"string\"],\n\t\t\t\t\tpropertyName: key,\n\t\t\t\t\tcompositeRule: true\n\t\t\t\t}, valid);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\tcxt.error(true);\n\t\t\t\t\tif (!it.allErrors) gen.break();\n\t\t\t\t});\n\t\t\t});\n\t\t\tcxt.ok(valid);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js\nvar require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"additionalProperties\",\n\t\ttype: [\"object\"],\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\tallowUndefined: true,\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must NOT have additional properties\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, errsCount, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!errsCount) throw new Error(\"ajv implementation error\");\n\t\t\tconst { allErrors, opts } = it;\n\t\t\tit.props = true;\n\t\t\tif (opts.removeAdditional !== \"all\" && (0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tconst props = (0, code_1.allSchemaProperties)(parentSchema.properties);\n\t\t\tconst patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);\n\t\t\tcheckAdditionalProperties();\n\t\t\tcxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t\t\tfunction checkAdditionalProperties() {\n\t\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\t\tif (!props.length && !patProps.length) additionalPropertyCode(key);\n\t\t\t\t\telse gen.if(isAdditional(key), () => additionalPropertyCode(key));\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction isAdditional(key) {\n\t\t\t\tlet definedProp;\n\t\t\t\tif (props.length > 8) {\n\t\t\t\t\tconst propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, \"properties\");\n\t\t\t\t\tdefinedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);\n\t\t\t\t} else if (props.length) definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));\n\t\t\t\telse definedProp = codegen_1.nil;\n\t\t\t\tif (patProps.length) definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));\n\t\t\t\treturn (0, codegen_1.not)(definedProp);\n\t\t\t}\n\t\t\tfunction deleteAdditional(key) {\n\t\t\t\tgen.code((0, codegen_1._)`delete ${data}[${key}]`);\n\t\t\t}\n\t\t\tfunction additionalPropertyCode(key) {\n\t\t\t\tif (opts.removeAdditional === \"all\" || opts.removeAdditional && schema === false) {\n\t\t\t\t\tdeleteAdditional(key);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (schema === false) {\n\t\t\t\t\tcxt.setParams({ additionalProperty: key });\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tif (!allErrors) gen.break();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\t\tif (opts.removeAdditional === \"failing\") {\n\t\t\t\t\t\tapplyAdditionalSchema(key, valid, false);\n\t\t\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\t\t\tcxt.reset();\n\t\t\t\t\t\t\tdeleteAdditional(key);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyAdditionalSchema(key, valid);\n\t\t\t\t\t\tif (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction applyAdditionalSchema(key, valid, errors) {\n\t\t\t\tconst subschema = {\n\t\t\t\t\tkeyword: \"additionalProperties\",\n\t\t\t\t\tdataProp: key,\n\t\t\t\t\tdataPropType: util_1.Type.Str\n\t\t\t\t};\n\t\t\t\tif (errors === false) Object.assign(subschema, {\n\t\t\t\t\tcompositeRule: true,\n\t\t\t\t\tcreateErrors: false,\n\t\t\t\t\tallErrors: false\n\t\t\t\t});\n\t\t\t\tcxt.subschema(subschema, valid);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js\nvar require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst validate_1 = require_validate();\n\tconst code_1 = require_code();\n\tconst util_1 = require_util();\n\tconst additionalProperties_1 = require_additionalProperties();\n\tconst def = {\n\t\tkeyword: \"properties\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, it } = cxt;\n\t\t\tif (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === void 0) additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, \"additionalProperties\"));\n\t\t\tconst allProps = (0, code_1.allSchemaProperties)(schema);\n\t\t\tfor (const prop of allProps) it.definedProperties.add(prop);\n\t\t\tif (it.opts.unevaluated && allProps.length && it.props !== true) it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);\n\t\t\tconst properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));\n\t\t\tif (properties.length === 0) return;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tfor (const prop of properties) {\n\t\t\t\tif (hasDefault(prop)) applyPropertySchema(prop);\n\t\t\t\telse {\n\t\t\t\t\tgen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));\n\t\t\t\t\tapplyPropertySchema(prop);\n\t\t\t\t\tif (!it.allErrors) gen.else().var(valid, true);\n\t\t\t\t\tgen.endIf();\n\t\t\t\t}\n\t\t\t\tcxt.it.definedProperties.add(prop);\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t\tfunction hasDefault(prop) {\n\t\t\t\treturn it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;\n\t\t\t}\n\t\t\tfunction applyPropertySchema(prop) {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword: \"properties\",\n\t\t\t\t\tschemaProp: prop,\n\t\t\t\t\tdataProp: prop\n\t\t\t\t}, valid);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js\nvar require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst util_2 = require_util();\n\tconst def = {\n\t\tkeyword: \"patternProperties\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, parentSchema, it } = cxt;\n\t\t\tconst { opts } = it;\n\t\t\tconst patterns = (0, code_1.allSchemaProperties)(schema);\n\t\t\tconst alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));\n\t\t\tif (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) return;\n\t\t\tconst checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tif (it.props !== true && !(it.props instanceof codegen_1.Name)) it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);\n\t\t\tconst { props } = it;\n\t\t\tvalidatePatternProperties();\n\t\t\tfunction validatePatternProperties() {\n\t\t\t\tfor (const pat of patterns) {\n\t\t\t\t\tif (checkProperties) checkMatchingProperties(pat);\n\t\t\t\t\tif (it.allErrors) validateProperties(pat);\n\t\t\t\t\telse {\n\t\t\t\t\t\tgen.var(valid, true);\n\t\t\t\t\t\tvalidateProperties(pat);\n\t\t\t\t\t\tgen.if(valid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction checkMatchingProperties(pat) {\n\t\t\t\tfor (const prop in checkProperties) if (new RegExp(pat).test(prop)) (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);\n\t\t\t}\n\t\t\tfunction validateProperties(pat) {\n\t\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\t\tgen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {\n\t\t\t\t\t\tconst alwaysValid = alwaysValidPatterns.includes(pat);\n\t\t\t\t\t\tif (!alwaysValid) cxt.subschema({\n\t\t\t\t\t\t\tkeyword: \"patternProperties\",\n\t\t\t\t\t\t\tschemaProp: pat,\n\t\t\t\t\t\t\tdataProp: key,\n\t\t\t\t\t\t\tdataPropType: util_2.Type.Str\n\t\t\t\t\t\t}, valid);\n\t\t\t\t\t\tif (it.opts.unevaluated && props !== true) gen.assign((0, codegen_1._)`${props}[${key}]`, true);\n\t\t\t\t\t\telse if (!alwaysValid && !it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js\nvar require_not = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"not\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\ttrackErrors: true,\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, it } = cxt;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tcxt.fail();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tcxt.subschema({\n\t\t\t\tkeyword: \"not\",\n\t\t\t\tcompositeRule: true,\n\t\t\t\tcreateErrors: false,\n\t\t\t\tallErrors: false\n\t\t\t}, valid);\n\t\t\tcxt.failResult(valid, () => cxt.reset(), () => cxt.error());\n\t\t},\n\t\terror: { message: \"must NOT be valid\" }\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js\nvar require_anyOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst def = {\n\t\tkeyword: \"anyOf\",\n\t\tschemaType: \"array\",\n\t\ttrackErrors: true,\n\t\tcode: require_code().validateUnion,\n\t\terror: { message: \"must match a schema in anyOf\" }\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js\nvar require_oneOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"oneOf\",\n\t\tschemaType: \"array\",\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must match exactly one schema in oneOf\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\tif (it.opts.discriminator && parentSchema.discriminator) return;\n\t\t\tconst schArr = schema;\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\tconst passing = gen.let(\"passing\", null);\n\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\tcxt.setParams({ passing });\n\t\t\tgen.block(validateOneOf);\n\t\t\tcxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n\t\t\tfunction validateOneOf() {\n\t\t\t\tschArr.forEach((sch, i) => {\n\t\t\t\t\tlet schCxt;\n\t\t\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) gen.var(schValid, true);\n\t\t\t\t\telse schCxt = cxt.subschema({\n\t\t\t\t\t\tkeyword: \"oneOf\",\n\t\t\t\t\t\tschemaProp: i,\n\t\t\t\t\t\tcompositeRule: true\n\t\t\t\t\t}, schValid);\n\t\t\t\t\tif (i > 0) gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();\n\t\t\t\t\tgen.if(schValid, () => {\n\t\t\t\t\t\tgen.assign(valid, true);\n\t\t\t\t\t\tgen.assign(passing, i);\n\t\t\t\t\t\tif (schCxt) cxt.mergeEvaluated(schCxt, codegen_1.Name);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js\nvar require_allOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"allOf\",\n\t\tschemaType: \"array\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tschema.forEach((sch, i) => {\n\t\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) return;\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"allOf\",\n\t\t\t\t\tschemaProp: i\n\t\t\t\t}, valid);\n\t\t\t\tcxt.ok(valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t});\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js\nvar require_if = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"if\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: ({ params }) => (0, codegen_1.str)`must match \"${params.ifClause}\" schema`,\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, parentSchema, it } = cxt;\n\t\t\tif (parentSchema.then === void 0 && parentSchema.else === void 0) (0, util_1.checkStrictMode)(it, \"\\\"if\\\" without \\\"then\\\" and \\\"else\\\" is ignored\");\n\t\t\tconst hasThen = hasSchema(it, \"then\");\n\t\t\tconst hasElse = hasSchema(it, \"else\");\n\t\t\tif (!hasThen && !hasElse) return;\n\t\t\tconst valid = gen.let(\"valid\", true);\n\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\tvalidateIf();\n\t\t\tcxt.reset();\n\t\t\tif (hasThen && hasElse) {\n\t\t\t\tconst ifClause = gen.let(\"ifClause\");\n\t\t\t\tcxt.setParams({ ifClause });\n\t\t\t\tgen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause));\n\t\t\t} else if (hasThen) gen.if(schValid, validateClause(\"then\"));\n\t\t\telse gen.if((0, codegen_1.not)(schValid), validateClause(\"else\"));\n\t\t\tcxt.pass(valid, () => cxt.error(true));\n\t\t\tfunction validateIf() {\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"if\",\n\t\t\t\t\tcompositeRule: true,\n\t\t\t\t\tcreateErrors: false,\n\t\t\t\t\tallErrors: false\n\t\t\t\t}, schValid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t}\n\t\t\tfunction validateClause(keyword, ifClause) {\n\t\t\t\treturn () => {\n\t\t\t\t\tconst schCxt = cxt.subschema({ keyword }, schValid);\n\t\t\t\t\tgen.assign(valid, schValid);\n\t\t\t\t\tcxt.mergeValidEvaluated(schCxt, valid);\n\t\t\t\t\tif (ifClause) gen.assign(ifClause, (0, codegen_1._)`${keyword}`);\n\t\t\t\t\telse cxt.setParams({ ifClause: keyword });\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t};\n\tfunction hasSchema(it, keyword) {\n\t\tconst schema = it.schema[keyword];\n\t\treturn schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);\n\t}\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js\nvar require_thenElse = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: [\"then\", \"else\"],\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tcode({ keyword, parentSchema, it }) {\n\t\t\tif (parentSchema.if === void 0) (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"if\" is ignored`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js\nvar require_applicator$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst additionalItems_1 = require_additionalItems();\n\tconst prefixItems_1 = require_prefixItems();\n\tconst items_1 = require_items();\n\tconst items2020_1 = require_items2020();\n\tconst contains_1 = require_contains();\n\tconst dependencies_1 = require_dependencies();\n\tconst propertyNames_1 = require_propertyNames();\n\tconst additionalProperties_1 = require_additionalProperties();\n\tconst properties_1 = require_properties();\n\tconst patternProperties_1 = require_patternProperties();\n\tconst not_1 = require_not();\n\tconst anyOf_1 = require_anyOf();\n\tconst oneOf_1 = require_oneOf();\n\tconst allOf_1 = require_allOf();\n\tconst if_1 = require_if();\n\tconst thenElse_1 = require_thenElse();\n\tfunction getApplicator(draft2020 = false) {\n\t\tconst applicator = [\n\t\t\tnot_1.default,\n\t\t\tanyOf_1.default,\n\t\t\toneOf_1.default,\n\t\t\tallOf_1.default,\n\t\t\tif_1.default,\n\t\t\tthenElse_1.default,\n\t\t\tpropertyNames_1.default,\n\t\t\tadditionalProperties_1.default,\n\t\t\tdependencies_1.default,\n\t\t\tproperties_1.default,\n\t\t\tpatternProperties_1.default\n\t\t];\n\t\tif (draft2020) applicator.push(prefixItems_1.default, items2020_1.default);\n\t\telse applicator.push(additionalItems_1.default, items_1.default);\n\t\tapplicator.push(contains_1.default);\n\t\treturn applicator;\n\t}\n\texports.default = getApplicator;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js\nvar require_format$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst def = {\n\t\tkeyword: \"format\",\n\t\ttype: [\"number\", \"string\"],\n\t\tschemaType: \"string\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must match format \"${schemaCode}\"`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt, ruleType) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tconst { opts, errSchemaPath, schemaEnv, self } = it;\n\t\t\tif (!opts.validateFormats) return;\n\t\t\tif ($data) validate$DataFormat();\n\t\t\telse validateFormat();\n\t\t\tfunction validate$DataFormat() {\n\t\t\t\tconst fmts = gen.scopeValue(\"formats\", {\n\t\t\t\t\tref: self.formats,\n\t\t\t\t\tcode: opts.code.formats\n\t\t\t\t});\n\t\t\t\tconst fDef = gen.const(\"fDef\", (0, codegen_1._)`${fmts}[${schemaCode}]`);\n\t\t\t\tconst fType = gen.let(\"fType\");\n\t\t\t\tconst format = gen.let(\"format\");\n\t\t\t\tgen.if((0, codegen_1._)`typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || \"string\"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`\"string\"`).assign(format, fDef));\n\t\t\t\tcxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));\n\t\t\t\tfunction unknownFmt() {\n\t\t\t\t\tif (opts.strictSchema === false) return codegen_1.nil;\n\t\t\t\t\treturn (0, codegen_1._)`${schemaCode} && !${format}`;\n\t\t\t\t}\n\t\t\t\tfunction invalidFmt() {\n\t\t\t\t\tconst callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;\n\t\t\t\t\tconst validData = (0, codegen_1._)`(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`;\n\t\t\t\t\treturn (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction validateFormat() {\n\t\t\t\tconst formatDef = self.formats[schema];\n\t\t\t\tif (!formatDef) {\n\t\t\t\t\tunknownFormat();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (formatDef === true) return;\n\t\t\t\tconst [fmtType, format, fmtRef] = getFormat(formatDef);\n\t\t\t\tif (fmtType === ruleType) cxt.pass(validCondition());\n\t\t\t\tfunction unknownFormat() {\n\t\t\t\t\tif (opts.strictSchema === false) {\n\t\t\t\t\t\tself.logger.warn(unknownMsg());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Error(unknownMsg());\n\t\t\t\t\tfunction unknownMsg() {\n\t\t\t\t\t\treturn `unknown format \"${schema}\" ignored in schema at path \"${errSchemaPath}\"`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction getFormat(fmtDef) {\n\t\t\t\t\tconst code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;\n\t\t\t\t\tconst fmt = gen.scopeValue(\"formats\", {\n\t\t\t\t\t\tkey: schema,\n\t\t\t\t\t\tref: fmtDef,\n\t\t\t\t\t\tcode\n\t\t\t\t\t});\n\t\t\t\t\tif (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) return [\n\t\t\t\t\t\tfmtDef.type || \"string\",\n\t\t\t\t\t\tfmtDef.validate,\n\t\t\t\t\t\t(0, codegen_1._)`${fmt}.validate`\n\t\t\t\t\t];\n\t\t\t\t\treturn [\n\t\t\t\t\t\t\"string\",\n\t\t\t\t\t\tfmtDef,\n\t\t\t\t\t\tfmt\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tfunction validCondition() {\n\t\t\t\t\tif (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n\t\t\t\t\t\tif (!schemaEnv.$async) throw new Error(\"async format in sync schema\");\n\t\t\t\t\t\treturn (0, codegen_1._)`await ${fmtRef}(${data})`;\n\t\t\t\t\t}\n\t\t\t\t\treturn typeof format == \"function\" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js\nvar require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst format = [require_format$2().default];\n\texports.default = format;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js\nvar require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.contentVocabulary = exports.metadataVocabulary = void 0;\n\texports.metadataVocabulary = [\n\t\t\"title\",\n\t\t\"description\",\n\t\t\"default\",\n\t\t\"deprecated\",\n\t\t\"readOnly\",\n\t\t\"writeOnly\",\n\t\t\"examples\"\n\t];\n\texports.contentVocabulary = [\n\t\t\"contentMediaType\",\n\t\t\"contentEncoding\",\n\t\t\"contentSchema\"\n\t];\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js\nvar require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst core_1 = require_core$2();\n\tconst validation_1 = require_validation$2();\n\tconst applicator_1 = require_applicator$2();\n\tconst format_1 = require_format$1();\n\tconst metadata_1 = require_metadata();\n\tconst draft7Vocabularies = [\n\t\tcore_1.default,\n\t\tvalidation_1.default,\n\t\t(0, applicator_1.default)(),\n\t\tformat_1.default,\n\t\tmetadata_1.metadataVocabulary,\n\t\tmetadata_1.contentVocabulary\n\t];\n\texports.default = draft7Vocabularies;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js\nvar require_types = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.DiscrError = void 0;\n\tvar DiscrError;\n\t(function(DiscrError) {\n\t\tDiscrError[\"Tag\"] = \"tag\";\n\t\tDiscrError[\"Mapping\"] = \"mapping\";\n\t})(DiscrError || (exports.DiscrError = DiscrError = {}));\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js\nvar require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst types_1 = require_types();\n\tconst compile_1 = require_compile();\n\tconst ref_error_1 = require_ref_error();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"discriminator\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: {\n\t\t\tmessage: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag \"${tagName}\" must be string` : `value of tag \"${tagName}\" must be in oneOf`,\n\t\t\tparams: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, schema, parentSchema, it } = cxt;\n\t\t\tconst { oneOf } = parentSchema;\n\t\t\tif (!it.opts.discriminator) throw new Error(\"discriminator: requires discriminator option\");\n\t\t\tconst tagName = schema.propertyName;\n\t\t\tif (typeof tagName != \"string\") throw new Error(\"discriminator: requires propertyName\");\n\t\t\tif (schema.mapping) throw new Error(\"discriminator: mapping is not supported\");\n\t\t\tif (!oneOf) throw new Error(\"discriminator: requires oneOf keyword\");\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\tconst tag = gen.const(\"tag\", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);\n\t\t\tgen.if((0, codegen_1._)`typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, {\n\t\t\t\tdiscrError: types_1.DiscrError.Tag,\n\t\t\t\ttag,\n\t\t\t\ttagName\n\t\t\t}));\n\t\t\tcxt.ok(valid);\n\t\t\tfunction validateMapping() {\n\t\t\t\tconst mapping = getMapping();\n\t\t\t\tgen.if(false);\n\t\t\t\tfor (const tagValue in mapping) {\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);\n\t\t\t\t\tgen.assign(valid, applyTagSchema(mapping[tagValue]));\n\t\t\t\t}\n\t\t\t\tgen.else();\n\t\t\t\tcxt.error(false, {\n\t\t\t\t\tdiscrError: types_1.DiscrError.Mapping,\n\t\t\t\t\ttag,\n\t\t\t\t\ttagName\n\t\t\t\t});\n\t\t\t\tgen.endIf();\n\t\t\t}\n\t\t\tfunction applyTagSchema(schemaProp) {\n\t\t\t\tconst _valid = gen.name(\"valid\");\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"oneOf\",\n\t\t\t\t\tschemaProp\n\t\t\t\t}, _valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt, codegen_1.Name);\n\t\t\t\treturn _valid;\n\t\t\t}\n\t\t\tfunction getMapping() {\n\t\t\t\tvar _a;\n\t\t\t\tconst oneOfMapping = {};\n\t\t\t\tconst topRequired = hasRequired(parentSchema);\n\t\t\t\tlet tagRequired = true;\n\t\t\t\tfor (let i = 0; i < oneOf.length; i++) {\n\t\t\t\t\tlet sch = oneOf[i];\n\t\t\t\t\tif ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n\t\t\t\t\t\tconst ref = sch.$ref;\n\t\t\t\t\t\tsch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);\n\t\t\t\t\t\tif (sch instanceof compile_1.SchemaEnv) sch = sch.schema;\n\t\t\t\t\t\tif (sch === void 0) throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);\n\t\t\t\t\t}\n\t\t\t\t\tconst propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n\t\t\t\t\tif (typeof propSch != \"object\") throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n\t\t\t\t\ttagRequired = tagRequired && (topRequired || hasRequired(sch));\n\t\t\t\t\taddMappings(propSch, i);\n\t\t\t\t}\n\t\t\t\tif (!tagRequired) throw new Error(`discriminator: \"${tagName}\" must be required`);\n\t\t\t\treturn oneOfMapping;\n\t\t\t\tfunction hasRequired({ required }) {\n\t\t\t\t\treturn Array.isArray(required) && required.includes(tagName);\n\t\t\t\t}\n\t\t\t\tfunction addMappings(sch, i) {\n\t\t\t\t\tif (sch.const) addMapping(sch.const, i);\n\t\t\t\t\telse if (sch.enum) for (const tagValue of sch.enum) addMapping(tagValue, i);\n\t\t\t\t\telse throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n\t\t\t\t}\n\t\t\t\tfunction addMapping(tagValue, i) {\n\t\t\t\t\tif (typeof tagValue != \"string\" || tagValue in oneOfMapping) throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n\t\t\t\t\toneOfMapping[tagValue] = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json\nvar require_json_schema_draft_07 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"http://json-schema.org/draft-07/schema#\",\n\t\t\"$id\": \"http://json-schema.org/draft-07/schema#\",\n\t\t\"title\": \"Core schema meta-schema\",\n\t\t\"definitions\": {\n\t\t\t\"schemaArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"items\": { \"$ref\": \"#\" }\n\t\t\t},\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": { \"allOf\": [{ \"$ref\": \"#/definitions/nonNegativeInteger\" }, { \"default\": 0 }] },\n\t\t\t\"simpleTypes\": { \"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t] },\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t},\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$schema\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"$ref\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$comment\": { \"type\": \"string\" },\n\t\t\t\"title\": { \"type\": \"string\" },\n\t\t\t\"description\": { \"type\": \"string\" },\n\t\t\t\"default\": true,\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMaximum\": { \"type\": \"number\" },\n\t\t\t\"minimum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMinimum\": { \"type\": \"number\" },\n\t\t\t\"maxLength\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"additionalItems\": { \"$ref\": \"#\" },\n\t\t\t\"items\": {\n\t\t\t\t\"anyOf\": [{ \"$ref\": \"#\" }, { \"$ref\": \"#/definitions/schemaArray\" }],\n\t\t\t\t\"default\": true\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"contains\": { \"$ref\": \"#\" },\n\t\t\t\"maxProperties\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/definitions/stringArray\" },\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"definitions\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependencies\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"anyOf\": [{ \"$ref\": \"#\" }, { \"$ref\": \"#/definitions/stringArray\" }] }\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$ref\": \"#\" },\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true,\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t},\n\t\t\t\"type\": { \"anyOf\": [{ \"$ref\": \"#/definitions/simpleTypes\" }, {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t}] },\n\t\t\t\"format\": { \"type\": \"string\" },\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"if\": { \"$ref\": \"#\" },\n\t\t\t\"then\": { \"$ref\": \"#\" },\n\t\t\t\"else\": { \"$ref\": \"#\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"not\": { \"$ref\": \"#\" }\n\t\t},\n\t\t\"default\": true\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js\nvar require_ajv = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;\n\tconst core_1 = require_core$3();\n\tconst draft7_1 = require_draft7();\n\tconst discriminator_1 = require_discriminator();\n\tconst draft7MetaSchema = require_json_schema_draft_07();\n\tconst META_SUPPORT_DATA = [\"/properties\"];\n\tconst META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\";\n\tvar Ajv = class extends core_1.default {\n\t\t_addVocabularies() {\n\t\t\tsuper._addVocabularies();\n\t\t\tdraft7_1.default.forEach((v) => this.addVocabulary(v));\n\t\t\tif (this.opts.discriminator) this.addKeyword(discriminator_1.default);\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tsuper._addDefaultMetaSchema();\n\t\t\tif (!this.opts.meta) return;\n\t\t\tconst metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;\n\t\t\tthis.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n\t\t\tthis.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n\t\t}\n\t\tdefaultMeta() {\n\t\t\treturn this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n\t\t}\n\t};\n\texports.Ajv = Ajv;\n\tmodule.exports = exports = Ajv;\n\tmodule.exports.Ajv = Ajv;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = Ajv;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tvar validation_error_1 = require_validation_error();\n\tObject.defineProperty(exports, \"ValidationError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validation_error_1.default;\n\t\t}\n\t});\n\tvar ref_error_1 = require_ref_error();\n\tObject.defineProperty(exports, \"MissingRefError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn ref_error_1.default;\n\t\t}\n\t});\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js\nvar require_dynamicAnchor = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.dynamicAnchor = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst compile_1 = require_compile();\n\tconst ref_1 = require_ref();\n\tconst def = {\n\t\tkeyword: \"$dynamicAnchor\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => dynamicAnchor(cxt, cxt.schema)\n\t};\n\tfunction dynamicAnchor(cxt, anchor) {\n\t\tconst { gen, it } = cxt;\n\t\tit.schemaEnv.root.dynamicAnchors[anchor] = true;\n\t\tconst v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;\n\t\tconst validate = it.errSchemaPath === \"#\" ? it.validateName : _getValidate(cxt);\n\t\tgen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));\n\t}\n\texports.dynamicAnchor = dynamicAnchor;\n\tfunction _getValidate(cxt) {\n\t\tconst { schemaEnv, schema, self } = cxt.it;\n\t\tconst { root, baseId, localRefs, meta } = schemaEnv.root;\n\t\tconst { schemaId } = self.opts;\n\t\tconst sch = new compile_1.SchemaEnv({\n\t\t\tschema,\n\t\t\tschemaId,\n\t\t\troot,\n\t\t\tbaseId,\n\t\t\tlocalRefs,\n\t\t\tmeta\n\t\t});\n\t\tcompile_1.compileSchema.call(self, sch);\n\t\treturn (0, ref_1.getValidate)(cxt, sch);\n\t}\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js\nvar require_dynamicRef = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.dynamicRef = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst ref_1 = require_ref();\n\tconst def = {\n\t\tkeyword: \"$dynamicRef\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => dynamicRef(cxt, cxt.schema)\n\t};\n\tfunction dynamicRef(cxt, ref) {\n\t\tconst { gen, keyword, it } = cxt;\n\t\tif (ref[0] !== \"#\") throw new Error(`\"${keyword}\" only supports hash fragment reference`);\n\t\tconst anchor = ref.slice(1);\n\t\tif (it.allErrors) _dynamicRef();\n\t\telse {\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\t_dynamicRef(valid);\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction _dynamicRef(valid) {\n\t\t\tif (it.schemaEnv.root.dynamicAnchors[anchor]) {\n\t\t\t\tconst v = gen.let(\"_v\", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);\n\t\t\t\tgen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));\n\t\t\t} else _callRef(it.validateName, valid)();\n\t\t}\n\t\tfunction _callRef(validate, valid) {\n\t\t\treturn valid ? () => gen.block(() => {\n\t\t\t\t(0, ref_1.callRef)(cxt, validate);\n\t\t\t\tgen.let(valid, true);\n\t\t\t}) : () => (0, ref_1.callRef)(cxt, validate);\n\t\t}\n\t}\n\texports.dynamicRef = dynamicRef;\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js\nvar require_recursiveAnchor = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicAnchor_1 = require_dynamicAnchor();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"$recursiveAnchor\",\n\t\tschemaType: \"boolean\",\n\t\tcode(cxt) {\n\t\t\tif (cxt.schema) (0, dynamicAnchor_1.dynamicAnchor)(cxt, \"\");\n\t\t\telse (0, util_1.checkStrictMode)(cxt.it, \"$recursiveAnchor: false is ignored\");\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js\nvar require_recursiveRef = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicRef_1 = require_dynamicRef();\n\tconst def = {\n\t\tkeyword: \"$recursiveRef\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/dynamic/index.js\nvar require_dynamic = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicAnchor_1 = require_dynamicAnchor();\n\tconst dynamicRef_1 = require_dynamicRef();\n\tconst recursiveAnchor_1 = require_recursiveAnchor();\n\tconst recursiveRef_1 = require_recursiveRef();\n\tconst dynamic = [\n\t\tdynamicAnchor_1.default,\n\t\tdynamicRef_1.default,\n\t\trecursiveAnchor_1.default,\n\t\trecursiveRef_1.default\n\t];\n\texports.default = dynamic;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js\nvar require_dependentRequired = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependencies_1 = require_dependencies();\n\tconst def = {\n\t\tkeyword: \"dependentRequired\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: dependencies_1.error,\n\t\tcode: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js\nvar require_dependentSchemas = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependencies_1 = require_dependencies();\n\tconst def = {\n\t\tkeyword: \"dependentSchemas\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js\nvar require_limitContains = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: [\"maxContains\", \"minContains\"],\n\t\ttype: \"array\",\n\t\tschemaType: \"number\",\n\t\tcode({ keyword, parentSchema, it }) {\n\t\t\tif (parentSchema.contains === void 0) (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"contains\" is ignored`);\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/next.js\nvar require_next = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependentRequired_1 = require_dependentRequired();\n\tconst dependentSchemas_1 = require_dependentSchemas();\n\tconst limitContains_1 = require_limitContains();\n\tconst next = [\n\t\tdependentRequired_1.default,\n\t\tdependentSchemas_1.default,\n\t\tlimitContains_1.default\n\t];\n\texports.default = next;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js\nvar require_unevaluatedProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\tconst def = {\n\t\tkeyword: \"unevaluatedProperties\",\n\t\ttype: \"object\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must NOT have unevaluated properties\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, errsCount, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!errsCount) throw new Error(\"ajv implementation error\");\n\t\t\tconst { allErrors, props } = it;\n\t\t\tif (props instanceof codegen_1.Name) gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn(\"key\", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));\n\t\t\telse if (props !== true) gen.forIn(\"key\", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));\n\t\t\tit.props = true;\n\t\t\tcxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t\t\tfunction unevaluatedPropCode(key) {\n\t\t\t\tif (schema === false) {\n\t\t\t\t\tcxt.setParams({ unevaluatedProperty: key });\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tif (!allErrors) gen.break();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"unevaluatedProperties\",\n\t\t\t\t\t\tdataProp: key,\n\t\t\t\t\t\tdataPropType: util_1.Type.Str\n\t\t\t\t\t}, valid);\n\t\t\t\t\tif (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction unevaluatedDynamic(evaluatedProps, key) {\n\t\t\t\treturn (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;\n\t\t\t}\n\t\t\tfunction unevaluatedStatic(evaluatedProps, key) {\n\t\t\t\tconst ps = [];\n\t\t\t\tfor (const p in evaluatedProps) if (evaluatedProps[p] === true) ps.push((0, codegen_1._)`${key} !== ${p}`);\n\t\t\t\treturn (0, codegen_1.and)(...ps);\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js\nvar require_unevaluatedItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"unevaluatedItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, it } = cxt;\n\t\t\tconst items = it.items || 0;\n\t\t\tif (items === true) return;\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tif (schema === false) {\n\t\t\t\tcxt.setParams({ len: items });\n\t\t\t\tcxt.fail((0, codegen_1._)`${len} > ${items}`);\n\t\t\t} else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tconst valid = gen.var(\"valid\", (0, codegen_1._)`${len} <= ${items}`);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t\tit.items = true;\n\t\t\tfunction validateItems(valid, from) {\n\t\t\t\tgen.forRange(\"i\", from, len, (i) => {\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"unevaluatedItems\",\n\t\t\t\t\t\tdataProp: i,\n\t\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t\t}, valid);\n\t\t\t\t\tif (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\texports.default = def;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js\nvar require_unevaluated$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst unevaluatedProperties_1 = require_unevaluatedProperties();\n\tconst unevaluatedItems_1 = require_unevaluatedItems();\n\tconst unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];\n\texports.default = unevaluated;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json\nvar require_schema$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/core\": true,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/applicator\": true,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/validation\": true,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/meta-data\": true,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/format\": false,\n\t\t\t\"https://json-schema.org/draft/2019-09/vocab/content\": true\n\t\t},\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Core and Validation specifications meta-schema\",\n\t\t\"allOf\": [\n\t\t\t{ \"$ref\": \"meta/core\" },\n\t\t\t{ \"$ref\": \"meta/applicator\" },\n\t\t\t{ \"$ref\": \"meta/validation\" },\n\t\t\t{ \"$ref\": \"meta/meta-data\" },\n\t\t\t{ \"$ref\": \"meta/format\" },\n\t\t\t{ \"$ref\": \"meta/content\" }\n\t\t],\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"definitions\": {\n\t\t\t\t\"$comment\": \"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependencies\": {\n\t\t\t\t\"$comment\": \"\\\"dependencies\\\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \\\"dependentSchemas\\\" and \\\"dependentRequired\\\"\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"anyOf\": [{ \"$recursiveRef\": \"#\" }, { \"$ref\": \"meta/validation#/$defs/stringArray\" }] }\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json\nvar require_applicator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/applicator\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/applicator\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"additionalItems\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"unevaluatedItems\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"items\": { \"anyOf\": [{ \"$recursiveRef\": \"#\" }, { \"$ref\": \"#/$defs/schemaArray\" }] },\n\t\t\t\"contains\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"unevaluatedProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependentSchemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" }\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"if\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"then\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"else\": { \"$recursiveRef\": \"#\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"not\": { \"$recursiveRef\": \"#\" }\n\t\t},\n\t\t\"$defs\": { \"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$recursiveRef\": \"#\" }\n\t\t} }\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json\nvar require_content$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/content\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/content\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Content vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"contentSchema\": { \"$recursiveRef\": \"#\" }\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json\nvar require_core$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/core\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/core\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Core vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\",\n\t\t\t\t\"$comment\": \"Non-empty fragments not allowed.\",\n\t\t\t\t\"pattern\": \"^[^#]*#?$\"\n\t\t\t},\n\t\t\t\"$schema\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"$anchor\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"pattern\": \"^[A-Za-z][-A-Za-z0-9.:_]*$\"\n\t\t\t},\n\t\t\t\"$ref\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$recursiveRef\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$recursiveAnchor\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"$vocabulary\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"propertyNames\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"format\": \"uri\"\n\t\t\t\t},\n\t\t\t\t\"additionalProperties\": { \"type\": \"boolean\" }\n\t\t\t},\n\t\t\t\"$comment\": { \"type\": \"string\" },\n\t\t\t\"$defs\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$recursiveRef\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json\nvar require_format = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/format\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/format\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Format vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": { \"format\": { \"type\": \"string\" } }\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json\nvar require_meta_data$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/meta-data\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/meta-data\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Meta-data vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"title\": { \"type\": \"string\" },\n\t\t\t\"description\": { \"type\": \"string\" },\n\t\t\t\"default\": true,\n\t\t\t\"deprecated\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"writeOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json\nvar require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2019-09/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2019-09/meta/validation\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2019-09/vocab/validation\": true },\n\t\t\"$recursiveAnchor\": true,\n\t\t\"title\": \"Validation vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMaximum\": { \"type\": \"number\" },\n\t\t\t\"minimum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMinimum\": { \"type\": \"number\" },\n\t\t\t\"maxLength\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"maxContains\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minContains\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 1\n\t\t\t},\n\t\t\t\"maxProperties\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/$defs/stringArray\" },\n\t\t\t\"dependentRequired\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#/$defs/stringArray\" }\n\t\t\t},\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"type\": { \"anyOf\": [{ \"$ref\": \"#/$defs/simpleTypes\" }, {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t}] }\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 0\n\t\t\t},\n\t\t\t\"simpleTypes\": { \"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t] },\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2019-09/index.js\nvar require_json_schema_2019_09 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst metaSchema = require_schema$1();\n\tconst applicator = require_applicator$1();\n\tconst content = require_content$1();\n\tconst core = require_core$1();\n\tconst format = require_format();\n\tconst metadata = require_meta_data$1();\n\tconst validation = require_validation$1();\n\tconst META_SUPPORT_DATA = [\"/properties\"];\n\tfunction addMetaSchema2019($data) {\n\t\t[\n\t\t\tmetaSchema,\n\t\t\tapplicator,\n\t\t\tcontent,\n\t\t\tcore,\n\t\t\twith$data(this, format),\n\t\t\tmetadata,\n\t\t\twith$data(this, validation)\n\t\t].forEach((sch) => this.addMetaSchema(sch, void 0, false));\n\t\treturn this;\n\t\tfunction with$data(ajv, sch) {\n\t\t\treturn $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;\n\t\t}\n\t}\n\texports.default = addMetaSchema2019;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2019.js\nvar require__2019 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;\n\tconst core_1 = require_core$3();\n\tconst draft7_1 = require_draft7();\n\tconst dynamic_1 = require_dynamic();\n\tconst next_1 = require_next();\n\tconst unevaluated_1 = require_unevaluated$1();\n\tconst discriminator_1 = require_discriminator();\n\tconst json_schema_2019_09_1 = require_json_schema_2019_09();\n\tconst META_SCHEMA_ID = \"https://json-schema.org/draft/2019-09/schema\";\n\tvar Ajv2019 = class extends core_1.default {\n\t\tconstructor(opts = {}) {\n\t\t\tsuper({\n\t\t\t\t...opts,\n\t\t\t\tdynamicRef: true,\n\t\t\t\tnext: true,\n\t\t\t\tunevaluated: true\n\t\t\t});\n\t\t}\n\t\t_addVocabularies() {\n\t\t\tsuper._addVocabularies();\n\t\t\tthis.addVocabulary(dynamic_1.default);\n\t\t\tdraft7_1.default.forEach((v) => this.addVocabulary(v));\n\t\t\tthis.addVocabulary(next_1.default);\n\t\t\tthis.addVocabulary(unevaluated_1.default);\n\t\t\tif (this.opts.discriminator) this.addKeyword(discriminator_1.default);\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tsuper._addDefaultMetaSchema();\n\t\t\tconst { $data, meta } = this.opts;\n\t\t\tif (!meta) return;\n\t\t\tjson_schema_2019_09_1.default.call(this, $data);\n\t\t\tthis.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n\t\t}\n\t\tdefaultMeta() {\n\t\t\treturn this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n\t\t}\n\t};\n\texports.Ajv2019 = Ajv2019;\n\tmodule.exports = exports = Ajv2019;\n\tmodule.exports.Ajv2019 = Ajv2019;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = Ajv2019;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tvar validation_error_1 = require_validation_error();\n\tObject.defineProperty(exports, \"ValidationError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validation_error_1.default;\n\t\t}\n\t});\n\tvar ref_error_1 = require_ref_error();\n\tObject.defineProperty(exports, \"MissingRefError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn ref_error_1.default;\n\t\t}\n\t});\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft2020.js\nvar require_draft2020 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst core_1 = require_core$2();\n\tconst validation_1 = require_validation$2();\n\tconst applicator_1 = require_applicator$2();\n\tconst dynamic_1 = require_dynamic();\n\tconst next_1 = require_next();\n\tconst unevaluated_1 = require_unevaluated$1();\n\tconst format_1 = require_format$1();\n\tconst metadata_1 = require_metadata();\n\tconst draft2020Vocabularies = [\n\t\tdynamic_1.default,\n\t\tcore_1.default,\n\t\tvalidation_1.default,\n\t\t(0, applicator_1.default)(true),\n\t\tformat_1.default,\n\t\tmetadata_1.metadataVocabulary,\n\t\tmetadata_1.contentVocabulary,\n\t\tnext_1.default,\n\t\tunevaluated_1.default\n\t];\n\texports.default = draft2020Vocabularies;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json\nvar require_schema = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/core\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/applicator\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/validation\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/meta-data\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/content\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Core and Validation specifications meta-schema\",\n\t\t\"allOf\": [\n\t\t\t{ \"$ref\": \"meta/core\" },\n\t\t\t{ \"$ref\": \"meta/applicator\" },\n\t\t\t{ \"$ref\": \"meta/unevaluated\" },\n\t\t\t{ \"$ref\": \"meta/validation\" },\n\t\t\t{ \"$ref\": \"meta/meta-data\" },\n\t\t\t{ \"$ref\": \"meta/format-annotation\" },\n\t\t\t{ \"$ref\": \"meta/content\" }\n\t\t],\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"$comment\": \"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.\",\n\t\t\"properties\": {\n\t\t\t\"definitions\": {\n\t\t\t\t\"$comment\": \"\\\"definitions\\\" has been replaced by \\\"$defs\\\".\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"deprecated\": true,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependencies\": {\n\t\t\t\t\"$comment\": \"\\\"dependencies\\\" has been split and replaced by \\\"dependentSchemas\\\" and \\\"dependentRequired\\\" in order to serve their differing semantics.\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"anyOf\": [{ \"$dynamicRef\": \"#meta\" }, { \"$ref\": \"meta/validation#/$defs/stringArray\" }] },\n\t\t\t\t\"deprecated\": true,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"$recursiveAnchor\": {\n\t\t\t\t\"$comment\": \"\\\"$recursiveAnchor\\\" has been replaced by \\\"$dynamicAnchor\\\".\",\n\t\t\t\t\"$ref\": \"meta/core#/$defs/anchorString\",\n\t\t\t\t\"deprecated\": true\n\t\t\t},\n\t\t\t\"$recursiveRef\": {\n\t\t\t\t\"$comment\": \"\\\"$recursiveRef\\\" has been replaced by \\\"$dynamicRef\\\".\",\n\t\t\t\t\"$ref\": \"meta/core#/$defs/uriReferenceString\",\n\t\t\t\t\"deprecated\": true\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json\nvar require_applicator = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/applicator\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/applicator\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"prefixItems\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"items\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"contains\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependentSchemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"if\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"then\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"else\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"not\": { \"$dynamicRef\": \"#meta\" }\n\t\t},\n\t\t\"$defs\": { \"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$dynamicRef\": \"#meta\" }\n\t\t} }\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json\nvar require_unevaluated = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/unevaluated\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Unevaluated applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"unevaluatedItems\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"unevaluatedProperties\": { \"$dynamicRef\": \"#meta\" }\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json\nvar require_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/content\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/content\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Content vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentSchema\": { \"$dynamicRef\": \"#meta\" }\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json\nvar require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/core\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/core\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Core vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"$ref\": \"#/$defs/uriReferenceString\",\n\t\t\t\t\"$comment\": \"Non-empty fragments not allowed.\",\n\t\t\t\t\"pattern\": \"^[^#]*#?$\"\n\t\t\t},\n\t\t\t\"$schema\": { \"$ref\": \"#/$defs/uriString\" },\n\t\t\t\"$ref\": { \"$ref\": \"#/$defs/uriReferenceString\" },\n\t\t\t\"$anchor\": { \"$ref\": \"#/$defs/anchorString\" },\n\t\t\t\"$dynamicRef\": { \"$ref\": \"#/$defs/uriReferenceString\" },\n\t\t\t\"$dynamicAnchor\": { \"$ref\": \"#/$defs/anchorString\" },\n\t\t\t\"$vocabulary\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"propertyNames\": { \"$ref\": \"#/$defs/uriString\" },\n\t\t\t\t\"additionalProperties\": { \"type\": \"boolean\" }\n\t\t\t},\n\t\t\t\"$comment\": { \"type\": \"string\" },\n\t\t\t\"$defs\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" }\n\t\t\t}\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"anchorString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"pattern\": \"^[A-Za-z_][-A-Za-z0-9._]*$\"\n\t\t\t},\n\t\t\t\"uriString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"uriReferenceString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json\nvar require_format_annotation = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/format-annotation\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Format vocabulary meta-schema for annotation results\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": { \"format\": { \"type\": \"string\" } }\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json\nvar require_meta_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/meta-data\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/meta-data\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Meta-data vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"title\": { \"type\": \"string\" },\n\t\t\t\"description\": { \"type\": \"string\" },\n\t\t\t\"default\": true,\n\t\t\t\"deprecated\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"writeOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json\nvar require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/validation\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/validation\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Validation vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"type\": { \"anyOf\": [{ \"$ref\": \"#/$defs/simpleTypes\" }, {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t}] },\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMaximum\": { \"type\": \"number\" },\n\t\t\t\"minimum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMinimum\": { \"type\": \"number\" },\n\t\t\t\"maxLength\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"maxContains\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minContains\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 1\n\t\t\t},\n\t\t\t\"maxProperties\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/$defs/stringArray\" },\n\t\t\t\"dependentRequired\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#/$defs/stringArray\" }\n\t\t\t}\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 0\n\t\t\t},\n\t\t\t\"simpleTypes\": { \"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t] },\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t}\n\t};\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js\nvar require_json_schema_2020_12 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst metaSchema = require_schema();\n\tconst applicator = require_applicator();\n\tconst unevaluated = require_unevaluated();\n\tconst content = require_content();\n\tconst core = require_core();\n\tconst format = require_format_annotation();\n\tconst metadata = require_meta_data();\n\tconst validation = require_validation();\n\tconst META_SUPPORT_DATA = [\"/properties\"];\n\tfunction addMetaSchema2020($data) {\n\t\t[\n\t\t\tmetaSchema,\n\t\t\tapplicator,\n\t\t\tunevaluated,\n\t\t\tcontent,\n\t\t\tcore,\n\t\t\twith$data(this, format),\n\t\t\tmetadata,\n\t\t\twith$data(this, validation)\n\t\t].forEach((sch) => this.addMetaSchema(sch, void 0, false));\n\t\treturn this;\n\t\tfunction with$data(ajv, sch) {\n\t\t\treturn $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;\n\t\t}\n\t}\n\texports.default = addMetaSchema2020;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/2020.js\nvar require__2020 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;\n\tconst core_1 = require_core$3();\n\tconst draft2020_1 = require_draft2020();\n\tconst discriminator_1 = require_discriminator();\n\tconst json_schema_2020_12_1 = require_json_schema_2020_12();\n\tconst META_SCHEMA_ID = \"https://json-schema.org/draft/2020-12/schema\";\n\tvar Ajv2020 = class extends core_1.default {\n\t\tconstructor(opts = {}) {\n\t\t\tsuper({\n\t\t\t\t...opts,\n\t\t\t\tdynamicRef: true,\n\t\t\t\tnext: true,\n\t\t\t\tunevaluated: true\n\t\t\t});\n\t\t}\n\t\t_addVocabularies() {\n\t\t\tsuper._addVocabularies();\n\t\t\tdraft2020_1.default.forEach((v) => this.addVocabulary(v));\n\t\t\tif (this.opts.discriminator) this.addKeyword(discriminator_1.default);\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tsuper._addDefaultMetaSchema();\n\t\t\tconst { $data, meta } = this.opts;\n\t\t\tif (!meta) return;\n\t\t\tjson_schema_2020_12_1.default.call(this, $data);\n\t\t\tthis.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n\t\t}\n\t\tdefaultMeta() {\n\t\t\treturn this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n\t\t}\n\t};\n\texports.Ajv2020 = Ajv2020;\n\tmodule.exports = exports = Ajv2020;\n\tmodule.exports.Ajv2020 = Ajv2020;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = Ajv2020;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tvar validation_error_1 = require_validation_error();\n\tObject.defineProperty(exports, \"ValidationError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validation_error_1.default;\n\t\t}\n\t});\n\tvar ref_error_1 = require_ref_error();\n\tObject.defineProperty(exports, \"MissingRefError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn ref_error_1.default;\n\t\t}\n\t});\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js\nvar require_formats = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.formatNames = exports.fastFormats = exports.fullFormats = void 0;\n\tfunction fmtDef(validate, compare) {\n\t\treturn {\n\t\t\tvalidate,\n\t\t\tcompare\n\t\t};\n\t}\n\texports.fullFormats = {\n\t\tdate: fmtDef(date, compareDate),\n\t\ttime: fmtDef(getTime(true), compareTime),\n\t\t\"date-time\": fmtDef(getDateTime(true), compareDateTime),\n\t\t\"iso-time\": fmtDef(getTime(), compareIsoTime),\n\t\t\"iso-date-time\": fmtDef(getDateTime(), compareIsoDateT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|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))$/i,\n\t\tregex,\n\t\tuuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,\n\t\t\"json-pointer\": /^(?:\\/(?:[^~/]|~0|~1)*)*$/,\n\t\t\"json-pointer-uri-fragment\": /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,\n\t\t\"relative-json-pointer\": /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,\n\t\tbyte,\n\t\tint32: {\n\t\t\ttype: \"number\",\n\t\t\tvalidate: validateInt32\n\t\t},\n\t\tint64: {\n\t\t\ttype: \"number\",\n\t\t\tvalidate: validateInt64\n\t\t},\n\t\tfloat: {\n\t\t\ttype: \"number\",\n\t\t\tvalidate: validateNumber\n\t\t},\n\t\tdouble: {\n\t\t\ttype: \"number\",\n\t\t\tvalidate: validateNumber\n\t\t},\n\t\tpassword: true,\n\t\tbinary: true\n\t};\n\texports.fastFormats = {\n\t\t...exports.fullFormats,\n\t\tdate: fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/, compareDate),\n\t\ttime: fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareTime),\n\t\t\"date-time\": fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\dt(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i, compareDateTime),\n\t\t\"iso-time\": fmtDef(/^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoTime),\n\t\t\"iso-date-time\": fmtDef(/^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i, compareIsoDateTime),\n\t\turi: /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n\t\t\"uri-reference\": /^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n\t\temail: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i\n\t};\n\texports.formatNames = Object.keys(exports.fullFormats);\n\tfunction isLeapYear(year) {\n\t\treturn year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n\t}\n\tconst DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/;\n\tconst DAYS = [\n\t\t0,\n\t\t31,\n\t\t28,\n\t\t31,\n\t\t30,\n\t\t31,\n\t\t30,\n\t\t31,\n\t\t31,\n\t\t30,\n\t\t31,\n\t\t30,\n\t\t31\n\t];\n\tfunction date(str) {\n\t\tconst matches = DATE.exec(str);\n\t\tif (!matches) return false;\n\t\tconst year = +matches[1];\n\t\tconst month = +matches[2];\n\t\tconst day = +matches[3];\n\t\treturn month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && isLeapYear(year) ? 29 : DAYS[month]);\n\t}\n\tfunction compareDate(d1, d2) {\n\t\tif (!(d1 && d2)) return void 0;\n\t\tif (d1 > d2) return 1;\n\t\tif (d1 < d2) return -1;\n\t\treturn 0;\n\t}\n\tconst TIME = /^(\\d\\d):(\\d\\d):(\\d\\d(?:\\.\\d+)?)(z|([+-])(\\d\\d)(?::?(\\d\\d))?)?$/i;\n\tfunction getTime(strictTimeZone) {\n\t\treturn function time(str) {\n\t\t\tconst matches = TIME.exec(str);\n\t\t\tif (!matches) return false;\n\t\t\tconst hr = +matches[1];\n\t\t\tconst min = +matches[2];\n\t\t\tconst sec = +matches[3];\n\t\t\tconst tz = matches[4];\n\t\t\tconst tzSign = matches[5] === \"-\" ? -1 : 1;\n\t\t\tconst tzH = +(matches[6] || 0);\n\t\t\tconst tzM = +(matches[7] || 0);\n\t\t\tif (tzH > 23 || tzM > 59 || strictTimeZone && !tz) return false;\n\t\t\tif (hr <= 23 && min <= 59 && sec < 60) return true;\n\t\t\tconst utcMin = min - tzM * tzSign;\n\t\t\tconst utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);\n\t\t\treturn (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;\n\t\t};\n\t}\n\tfunction compareTime(s1, s2) {\n\t\tif (!(s1 && s2)) return void 0;\n\t\tconst t1 = (/* @__PURE__ */ new Date(\"2020-01-01T\" + s1)).valueOf();\n\t\tconst t2 = (/* @__PURE__ */ new Date(\"2020-01-01T\" + s2)).valueOf();\n\t\tif (!(t1 && t2)) return void 0;\n\t\treturn t1 - t2;\n\t}\n\tfunction compareIsoTime(t1, t2) {\n\t\tif (!(t1 && t2)) return void 0;\n\t\tconst a1 = TIME.exec(t1);\n\t\tconst a2 = TIME.exec(t2);\n\t\tif (!(a1 && a2)) return void 0;\n\t\tt1 = a1[1] + a1[2] + a1[3];\n\t\tt2 = a2[1] + a2[2] + a2[3];\n\t\tif (t1 > t2) return 1;\n\t\tif (t1 < t2) return -1;\n\t\treturn 0;\n\t}\n\tconst DATE_TIME_SEPARATOR = /t|\\s/i;\n\tfunction getDateTime(strictTimeZone) {\n\t\tconst time = getTime(strictTimeZone);\n\t\treturn function date_time(str) {\n\t\t\tconst dateTime = str.split(DATE_TIME_SEPARATOR);\n\t\t\treturn dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);\n\t\t};\n\t}\n\tfunction compareDateTime(dt1, dt2) {\n\t\tif (!(dt1 && dt2)) return void 0;\n\t\tconst d1 = new Date(dt1).valueOf();\n\t\tconst d2 = new Date(dt2).valueOf();\n\t\tif (!(d1 && d2)) return void 0;\n\t\treturn d1 - d2;\n\t}\n\tfunction compareIsoDateTime(dt1, dt2) {\n\t\tif (!(dt1 && dt2)) return void 0;\n\t\tconst [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);\n\t\tconst [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);\n\t\tconst res = compareDate(d1, d2);\n\t\tif (res === void 0) return void 0;\n\t\treturn res || compareTime(t1, t2);\n\t}\n\tconst NOT_URI_FRAGMENT = /\\/|:/;\n\tconst URI = /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\\.[a-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\\?(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n\tfunction uri(str) {\n\t\treturn NOT_URI_FRAGMENT.test(str) && URI.test(str);\n\t}\n\tconst BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;\n\tfunction byte(str) {\n\t\tBYTE.lastIndex = 0;\n\t\treturn BYTE.test(str);\n\t}\n\tconst MIN_INT32 = -(2 ** 31);\n\tconst MAX_INT32 = 2 ** 31 - 1;\n\tfunction validateInt32(value) {\n\t\treturn Number.isInteger(value) && value <= MAX_INT32 && value >= MIN_INT32;\n\t}\n\tfunction validateInt64(value) {\n\t\treturn Number.isInteger(value);\n\t}\n\tfunction validateNumber() {\n\t\treturn true;\n\t}\n\tconst Z_ANCHOR = /[^\\\\]\\\\Z/;\n\tfunction regex(str) {\n\t\tif (Z_ANCHOR.test(str)) return false;\n\t\ttry {\n\t\t\tnew RegExp(str);\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t}\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js\nvar require_limit = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.formatLimitDefinition = void 0;\n\tconst ajv_1 = require_ajv();\n\tconst codegen_1 = require_codegen();\n\tconst ops = codegen_1.operators;\n\tconst KWDs = {\n\t\tformatMaximum: {\n\t\t\tokStr: \"<=\",\n\t\t\tok: ops.LTE,\n\t\t\tfail: ops.GT\n\t\t},\n\t\tformatMinimum: {\n\t\t\tokStr: \">=\",\n\t\t\tok: ops.GTE,\n\t\t\tfail: ops.LT\n\t\t},\n\t\tformatExclusiveMaximum: {\n\t\t\tokStr: \"<\",\n\t\t\tok: ops.LT,\n\t\t\tfail: ops.GTE\n\t\t},\n\t\tformatExclusiveMinimum: {\n\t\t\tokStr: \">\",\n\t\t\tok: ops.GT,\n\t\t\tfail: ops.LTE\n\t\t}\n\t};\n\tconst error = {\n\t\tmessage: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,\n\t\tparams: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`\n\t};\n\texports.formatLimitDefinition = {\n\t\tkeyword: Object.keys(KWDs),\n\t\ttype: \"string\",\n\t\tschemaType: \"string\",\n\t\t$data: true,\n\t\terror,\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, schemaCode, keyword, it } = cxt;\n\t\t\tconst { opts, self } = it;\n\t\t\tif (!opts.validateFormats) return;\n\t\t\tconst fCxt = new ajv_1.KeywordCxt(it, self.RULES.all.format.definition, \"format\");\n\t\t\tif (fCxt.$data) validate$DataFormat();\n\t\t\telse validateFormat();\n\t\t\tfunction validate$DataFormat() {\n\t\t\t\tconst fmts = gen.scopeValue(\"formats\", {\n\t\t\t\t\tref: self.formats,\n\t\t\t\t\tcode: opts.code.formats\n\t\t\t\t});\n\t\t\t\tconst fmt = gen.const(\"fmt\", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);\n\t\t\t\tcxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != \"object\"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != \"function\"`, compareCode(fmt)));\n\t\t\t}\n\t\t\tfunction validateFormat() {\n\t\t\t\tconst format = fCxt.schema;\n\t\t\t\tconst fmtDef = self.formats[format];\n\t\t\t\tif (!fmtDef || fmtDef === true) return;\n\t\t\t\tif (typeof fmtDef != \"object\" || fmtDef instanceof RegExp || typeof fmtDef.compare != \"function\") throw new Error(`\"${keyword}\": format \"${format}\" does not define \"compare\" function`);\n\t\t\t\tconst fmt = gen.scopeValue(\"formats\", {\n\t\t\t\t\tkey: format,\n\t\t\t\t\tref: fmtDef,\n\t\t\t\t\tcode: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0\n\t\t\t\t});\n\t\t\t\tcxt.fail$data(compareCode(fmt));\n\t\t\t}\n\t\t\tfunction compareCode(fmt) {\n\t\t\t\treturn (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;\n\t\t\t}\n\t\t},\n\t\tdependencies: [\"format\"]\n\t};\n\tconst formatLimitPlugin = (ajv) => {\n\t\tajv.addKeyword(exports.formatLimitDefinition);\n\t\treturn ajv;\n\t};\n\texports.default = formatLimitPlugin;\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js\nvar require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst formats_1 = require_formats();\n\tconst limit_1 = require_limit();\n\tconst codegen_1 = require_codegen();\n\tconst fullName = new codegen_1.Name(\"fullFormats\");\n\tconst fastName = new codegen_1.Name(\"fastFormats\");\n\tconst formatsPlugin = (ajv, opts = { keywords: true }) => {\n\t\tif (Array.isArray(opts)) {\n\t\t\taddFormats(ajv, opts, formats_1.fullFormats, fullName);\n\t\t\treturn ajv;\n\t\t}\n\t\tconst [formats, exportName] = opts.mode === \"fast\" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName];\n\t\taddFormats(ajv, opts.formats || formats_1.formatNames, formats, exportName);\n\t\tif (opts.keywords) (0, limit_1.default)(ajv);\n\t\treturn ajv;\n\t};\n\tformatsPlugin.get = (name, mode = \"full\") => {\n\t\tconst f = (mode === \"fast\" ? formats_1.fastFormats : formats_1.fullFormats)[name];\n\t\tif (!f) throw new Error(`Unknown format \"${name}\"`);\n\t\treturn f;\n\t};\n\tfunction addFormats(ajv, list, fs, exportName) {\n\t\tvar _a;\n\t\tvar _b;\n\t\t(_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 || (_b.formats = (0, codegen_1._)`require(\"ajv-formats/dist/formats\").${exportName}`);\n\t\tfor (const f of list) ajv.addFormat(f, fs[f]);\n\t}\n\tmodule.exports = exports = formatsPlugin;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = formatsPlugin;\n}));\n\n//#endregion\n//#region ../core-internal/src/validators/ajvProvider.ts\nvar import_ajv = require_ajv();\nvar import__2019 = require__2019();\nvar import__2020 = require__2020();\nvar import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);\n/** `ajv-formats` default export, normalised through the CJS/ESM interop wrapper. */\nconst addFormats = import_dist.default;\nfunction createDefaultAjvInstance(engineClass) {\n\tconst ajv = new engineClass({\n\t\tstrict: false,\n\t\tvalidateFormats: true,\n\t\tvalidateSchema: false,\n\t\tallErrors: true\n\t});\n\taddFormats(ajv);\n\treturn ajv;\n}\n/**\n* AJV-backed JSON Schema validator. See `@modelcontextprotocol/{client,server}/validators/ajv`\n* for the customisation entry point (re-exports `Ajv` and `addFormats` from the bundled copy).\n*\n* Default dispatches on the schema's declared dialect: no `$schema` or 2020-12 → `Ajv2020`\n* (SEP-1613); 2019-09 → `Ajv2019`; draft-07 or draft-06 → the classic draft-07 `Ajv` class\n* (draft-07's changes over draft-06 are additive, so one engine covers both). Known draft-07 deviation: classic Ajv\n* evaluates keywords adjacent to `$ref` (stricter than draft-07's ignore-siblings rule, matching\n* v1's default engine), while the cfworker provider ignores them per spec.\n* Schemas declaring any other `$schema` are\n* rejected with a plain `Error`; pass a pre-configured Ajv instance to validate\n* other dialects. The SDK bundles ajv internally but does not re-export `Ajv2020` (its type\n* graph tips downstream declaration bundling — see #2339). To construct a custom 2020-12\n* instance, add `ajv` to your own dependencies (matching the SDK's pinned version) and\n* `import { Ajv2020 } from 'ajv/dist/2020.js'` — `new Ajv(...)` is the draft-07 class and would\n* silently downgrade dialect.\n*\n* @example Use with default configuration\n* ```ts source=\"./ajvProvider.examples.ts#AjvJsonSchemaValidator_default\"\n* const validator = new AjvJsonSchemaValidator();\n* ```\n*\n* @example Use with a custom AJV instance\n* ```ts source=\"./ajvProvider.examples.ts#AjvJsonSchemaValidator_customInstance\"\n* // import { Ajv2020 } from 'ajv/dist/2020.js';\n* const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true });\n* const validator = new AjvJsonSchemaValidator(ajv);\n* ```\n*\n* @example Register ajv-formats\n* ```ts source=\"./ajvProvider.examples.ts#AjvJsonSchemaValidator_withFormats\"\n* // import { Ajv2020 } from 'ajv/dist/2020.js';\n* const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true });\n* addFormats(ajv);\n* const validator = new AjvJsonSchemaValidator(ajv);\n* ```\n*/\nvar AjvJsonSchemaValidator = class {\n\t_ajv;\n\t/** Lazy classic (draft-07) engine, built on the first draft-07/draft-06-declared schema. */\n\t_ajvDraft7;\n\t/** Lazy 2019-09 engine, built on the first 2019-09-declared schema. */\n\t_ajv2019;\n\t/** True iff the constructor received a caller-supplied engine; the `$schema` dispatch is skipped. */\n\t_userAjv;\n\t/**\n\t* @param ajv - Optional pre-configured AJV-compatible instance. When supplied, this instance is\n\t* used for **every** schema regardless of its declared `$schema` (the caller owns dialect\n\t* choice). When omitted, the provider constructs per-dialect engines (`Ajv2020`, `Ajv2019`,\n\t* and the classic draft-07 `Ajv` for draft-07/06-declared schemas) with\n\t* `strict: false`, `validateFormats: true`, `validateSchema: false`, `allErrors: true`, and\n\t* `ajv-formats` registered — **lazily, on the first {@linkcode getValidator} call needing each**, so\n\t* constructing the provider (e.g. as the default validator of a `Client`/`Server` that never\n\t* validates a JSON Schema) does not pay the ajv + ajv-formats instantiation cost. The parameter\n\t* is typed structurally so consumers who don't pass an instance need not have `ajv` installed.\n\t*/\n\tconstructor(ajv) {\n\t\tthis._userAjv = ajv !== void 0;\n\t\tthis._ajv = ajv;\n\t}\n\t/** The underlying 2020-12 engine — the default instance is created on first use. */\n\tget ajv() {\n\t\treturn this._ajv ??= createDefaultAjvInstance(import__2020.Ajv2020);\n\t}\n\t/**\n\t* Pick the engine for a schema's declared dialect. A caller-supplied engine is used for\n\t* every schema — do not second-guess by `$schema` (bring-your-own-validator means\n\t* bring-your-own-dialect). Otherwise: no `$schema` or 2020-12 → `Ajv2020`; 2019-09 →\n\t* `Ajv2019`; draft-07 or draft-06 → classic `Ajv`; anything else → `Error`.\n\t*/\n\t_engineFor(schema) {\n\t\tif (this._userAjv) return this.ajv;\n\t\tconst dialect = declaredDialect(schema, \"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.\");\n\t\tif (dialect === \"2020-12\") return this.ajv;\n\t\tif (dialect === \"2019-09\") return this._ajv2019 ??= createDefaultAjvInstance(import__2019.Ajv2019);\n\t\treturn this._ajvDraft7 ??= createDefaultAjvInstance(import_ajv.Ajv);\n\t}\n\tgetValidator(schema) {\n\t\tconst engine = this._engineFor(schema);\n\t\tconst ajvValidator = \"$id\" in schema && typeof schema.$id === \"string\" ? engine.getSchema(schema.$id) ?? engine.compile(schema) : engine.compile(schema);\n\t\treturn (input) => {\n\t\t\treturn ajvValidator(input) ? {\n\t\t\t\tvalid: true,\n\t\t\t\tdata: input,\n\t\t\t\terrorMessage: void 0\n\t\t\t} : {\n\t\t\t\tvalid: false,\n\t\t\t\tdata: void 0,\n\t\t\t\terrorMessage: engine.errorsText(ajvValidator.errors)\n\t\t\t};\n\t\t};\n\t}\n};\n/**\n* Draft-07 AJV class, re-exported for consumers who need to opt back to the pre-SEP-1613 default.\n* The full v1-equivalent construction is:\n*\n* ```ts\n* const ajv = new Ajv({ strict: false, validateFormats: true, validateSchema: false, allErrors: true });\n* addFormats(ajv);\n* new AjvJsonSchemaValidator(ajv);\n* ```\n*\n* (omitting `validateSchema: false` makes a 2020-12-stamped `$schema` fail with an opaque\n* \"no schema with key or ref …\" engine error; omitting `addFormats` silently drops `format`\n* validation that the v1 default had).\n*\n* The SDK bundles ajv internally but does not re-export `Ajv2020` (its type graph tips downstream\n* declaration bundling — see #2339). To construct a custom 2020-12 instance, add `ajv` to your own\n* dependencies (matching the SDK's pinned version) and `import { Ajv2020 } from 'ajv/dist/2020.js'`.\n*/\nconst Ajv = import_ajv.Ajv;\n\n//#endregion\nexport { AjvJsonSchemaValidator as n, addFormats as r, Ajv as t };\n//# sourceMappingURL=ajvProvider-97rDpkRx.mjs.map","import { n as AjvJsonSchemaValidator } from \"./ajvProvider-97rDpkRx.mjs\";\n\n//#region src/shimsNode.ts\n/**\n* Whether `fetch()` may throw `TypeError` due to CORS. CORS is a browser-only concept —\n* in Node.js, a `TypeError` from `fetch` is always a real network/configuration error\n* (DNS resolution, connection refused, invalid URL), never a CORS error.\n*/\nconst CORS_IS_POSSIBLE = false;\n\n//#endregion\nexport { CORS_IS_POSSIBLE, AjvJsonSchemaValidator as DefaultJsonSchemaValidator };\n//# sourceMappingURL=shimsNode.mjs.map","let crypto;\ncrypto =\n globalThis.crypto?.webcrypto ?? // Node.js [18-16] REPL\n globalThis.crypto ?? // Node.js >18\n import(\"node:crypto\").then(m => m.webcrypto); // Node.js <18 Non-REPL\n/**\n * Creates an array of length `size` of random bytes\n * @param size\n * @returns Array of random ints (0 to 255)\n */\nasync function getRandomValues(size) {\n return (await crypto).getRandomValues(new Uint8Array(size));\n}\n/** Generate cryptographically strong random string\n * @param size The desired length of the string\n * @returns The random string\n */\nasync function random(size) {\n const mask = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~\";\n let result = \"\";\n const randomUints = await getRandomValues(size);\n for (let i = 0; i < size; i++) {\n // cap the value of the randomIndex to mask.length - 1\n const randomIndex = randomUints[i] % mask.length;\n result += mask[randomIndex];\n }\n return result;\n}\n/** Generate a PKCE challenge verifier\n * @param length Length of the verifier\n * @returns A random verifier `length` characters long\n */\nasync function generateVerifier(length) {\n return await random(length);\n}\n/** Generate a PKCE code challenge from a code verifier\n * @param code_verifier\n * @returns The base64 url encoded code challenge\n */\nexport async function generateChallenge(code_verifier) {\n const buffer = await (await crypto).subtle.digest(\"SHA-256\", new TextEncoder().encode(code_verifier));\n // Generate base64url string\n // btoa is deprecated in Node.js but is used here for web browser compatibility\n // (which has no good replacement yet, see also https://github.com/whatwg/html/issues/6811)\n return btoa(String.fromCharCode(...new Uint8Array(buffer)))\n .replace(/\\//g, '_')\n .replace(/\\+/g, '-')\n .replace(/=/g, '');\n}\n/** Generate a PKCE challenge pair\n * @param length Length of the verifer (between 43-128). Defaults to 43.\n * @returns PKCE challenge pair\n */\nexport default async function pkceChallenge(length) {\n if (!length)\n length = 43;\n if (length < 43 || length > 128) {\n throw `Expected a length between 43 and 128. Received ${length}.`;\n }\n const verifier = await generateVerifier(length);\n const challenge = await generateChallenge(verifier);\n return {\n code_verifier: verifier,\n code_challenge: challenge,\n };\n}\n/** Verify that a code_verifier produces the expected code challenge\n * @param code_verifier\n * @param expectedChallenge The code challenge to verify\n * @returns True if challenges are equal. False otherwise.\n */\nexport async function verifyChallenge(code_verifier, expectedChallenge) {\n const actualChallenge = await generateChallenge(code_verifier);\n return actualChallenge === expectedChallenge;\n}\n","class ParseError extends Error {\n constructor(message, options) {\n super(message), this.name = \"ParseError\", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;\n }\n}\nfunction noop(_arg) {\n}\nfunction createParser(callbacks) {\n if (typeof callbacks == \"function\")\n throw new TypeError(\n \"`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?\"\n );\n const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks;\n let incompleteLine = \"\", isFirstChunk = !0, id, data = \"\", eventType = \"\";\n function feed(newChunk) {\n const chunk = isFirstChunk ? newChunk.replace(/^\\xEF\\xBB\\xBF/, \"\") : newChunk, [complete, incomplete] = splitLines(`${incompleteLine}${chunk}`);\n for (const line of complete)\n parseLine(line);\n incompleteLine = incomplete, isFirstChunk = !1;\n }\n function parseLine(line) {\n if (line === \"\") {\n dispatchEvent();\n return;\n }\n if (line.startsWith(\":\")) {\n onComment && onComment(line.slice(line.startsWith(\": \") ? 2 : 1));\n return;\n }\n const fieldSeparatorIndex = line.indexOf(\":\");\n if (fieldSeparatorIndex !== -1) {\n const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === \" \" ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);\n processField(field, value, line);\n return;\n }\n processField(line, \"\", line);\n }\n function processField(field, value, line) {\n switch (field) {\n case \"event\":\n eventType = value;\n break;\n case \"data\":\n data = `${data}${value}\n`;\n break;\n case \"id\":\n id = value.includes(\"\\0\") ? void 0 : value;\n break;\n case \"retry\":\n /^\\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(\n new ParseError(`Invalid \\`retry\\` value: \"${value}\"`, {\n type: \"invalid-retry\",\n value,\n line\n })\n );\n break;\n default:\n onError(\n new ParseError(\n `Unknown field \"${field.length > 20 ? `${field.slice(0, 20)}\\u2026` : field}\"`,\n { type: \"unknown-field\", field, value, line }\n )\n );\n break;\n }\n }\n function dispatchEvent() {\n data.length > 0 && onEvent({\n id,\n event: eventType || void 0,\n // If the data buffer's last character is a U+000A LINE FEED (LF) character,\n // then remove the last character from the data buffer.\n data: data.endsWith(`\n`) ? data.slice(0, -1) : data\n }), id = void 0, data = \"\", eventType = \"\";\n }\n function reset(options = {}) {\n incompleteLine && options.consume && parseLine(incompleteLine), isFirstChunk = !0, id = void 0, data = \"\", eventType = \"\", incompleteLine = \"\";\n }\n return { feed, reset };\n}\nfunction splitLines(chunk) {\n const lines = [];\n let incompleteLine = \"\", searchIndex = 0;\n for (; searchIndex < chunk.length; ) {\n const crIndex = chunk.indexOf(\"\\r\", searchIndex), lfIndex = chunk.indexOf(`\n`, searchIndex);\n let lineEnd = -1;\n if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {\n incompleteLine = chunk.slice(searchIndex);\n break;\n } else {\n const line = chunk.slice(searchIndex, lineEnd);\n lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === \"\\r\" && chunk[searchIndex] === `\n` && searchIndex++;\n }\n }\n return [lines, incompleteLine];\n}\nexport {\n ParseError,\n createParser\n};\n//# sourceMappingURL=index.js.map\n","import { createParser } from \"eventsource-parser\";\nclass ErrorEvent extends Event {\n /**\n * Constructs a new `ErrorEvent` instance. This is typically not called directly,\n * but rather emitted by the `EventSource` object when an error occurs.\n *\n * @param type - The type of the event (should be \"error\")\n * @param errorEventInitDict - Optional properties to include in the error event\n */\n constructor(type, errorEventInitDict) {\n var _a, _b;\n super(type), this.code = (_a = errorEventInitDict == null ? void 0 : errorEventInitDict.code) != null ? _a : void 0, this.message = (_b = errorEventInitDict == null ? void 0 : errorEventInitDict.message) != null ? _b : void 0;\n }\n /**\n * Node.js \"hides\" the `message` and `code` properties of the `ErrorEvent` instance,\n * when it is `console.log`'ed. This makes it harder to debug errors. To ease debugging,\n * we explicitly include the properties in the `inspect` method.\n *\n * This is automatically called by Node.js when you `console.log` an instance of this class.\n *\n * @param _depth - The current depth\n * @param options - The options passed to `util.inspect`\n * @param inspect - The inspect function to use (prevents having to import it from `util`)\n * @returns A string representation of the error\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")](_depth, options, inspect) {\n return inspect(inspectableError(this), options);\n }\n /**\n * Deno \"hides\" the `message` and `code` properties of the `ErrorEvent` instance,\n * when it is `console.log`'ed. This makes it harder to debug errors. To ease debugging,\n * we explicitly include the properties in the `inspect` method.\n *\n * This is automatically called by Deno when you `console.log` an instance of this class.\n *\n * @param inspect - The inspect function to use (prevents having to import it from `util`)\n * @param options - The options passed to `Deno.inspect`\n * @returns A string representation of the error\n */\n [Symbol.for(\"Deno.customInspect\")](inspect, options) {\n return inspect(inspectableError(this), options);\n }\n}\nfunction syntaxError(message) {\n const DomException = globalThis.DOMException;\n return typeof DomException == \"function\" ? new DomException(message, \"SyntaxError\") : new SyntaxError(message);\n}\nfunction flattenError(err) {\n return err instanceof Error ? \"errors\" in err && Array.isArray(err.errors) ? err.errors.map(flattenError).join(\", \") : \"cause\" in err && err.cause instanceof Error ? `${err}: ${flattenError(err.cause)}` : err.message : `${err}`;\n}\nfunction inspectableError(err) {\n return {\n type: err.type,\n message: err.message,\n code: err.code,\n defaultPrevented: err.defaultPrevented,\n cancelable: err.cancelable,\n timeStamp: err.timeStamp\n };\n}\nvar __typeError = (msg) => {\n throw TypeError(msg);\n}, __accessCheck = (obj, member, msg) => member.has(obj) || __typeError(\"Cannot \" + msg), __privateGet = (obj, member, getter) => (__accessCheck(obj, member, \"read from private field\"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError(\"Cannot add the same private member more than once\") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, \"write to private field\"), member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, \"access private method\"), method), _readyState, _url, _redirectUrl, _withCredentials, _fetch, _reconnectInterval, _reconnectTimer, _lastEventId, _controller, _parser, _onError, _onMessage, _onOpen, _EventSource_instances, connect_fn, _onFetchResponse, _onFetchError, getRequestOptions_fn, _onEvent, _onRetryChange, failConnection_fn, scheduleReconnect_fn, _reconnect;\nclass EventSource extends EventTarget {\n constructor(url, eventSourceInitDict) {\n var _a, _b;\n super(), __privateAdd(this, _EventSource_instances), this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, __privateAdd(this, _readyState), __privateAdd(this, _url), __privateAdd(this, _redirectUrl), __privateAdd(this, _withCredentials), __privateAdd(this, _fetch), __privateAdd(this, _reconnectInterval), __privateAdd(this, _reconnectTimer), __privateAdd(this, _lastEventId, null), __privateAdd(this, _controller), __privateAdd(this, _parser), __privateAdd(this, _onError, null), __privateAdd(this, _onMessage, null), __privateAdd(this, _onOpen, null), __privateAdd(this, _onFetchResponse, async (response) => {\n var _a2;\n __privateGet(this, _parser).reset();\n const { body, redirected, status, headers } = response;\n if (status === 204) {\n __privateMethod(this, _EventSource_instances, failConnection_fn).call(this, \"Server sent HTTP 204, not reconnecting\", 204), this.close();\n return;\n }\n if (redirected ? __privateSet(this, _redirectUrl, new URL(response.url)) : __privateSet(this, _redirectUrl, void 0), status !== 200) {\n __privateMethod(this, _EventSource_instances, failConnection_fn).call(this, `Non-200 status code (${status})`, status);\n return;\n }\n if (!(headers.get(\"content-type\") || \"\").startsWith(\"text/event-stream\")) {\n __privateMethod(this, _EventSource_instances, failConnection_fn).call(this, 'Invalid content type, expected \"text/event-stream\"', status);\n return;\n }\n if (__privateGet(this, _readyState) === this.CLOSED)\n return;\n __privateSet(this, _readyState, this.OPEN);\n const openEvent = new Event(\"open\");\n if ((_a2 = __privateGet(this, _onOpen)) == null || _a2.call(this, openEvent), this.dispatchEvent(openEvent), typeof body != \"object\" || !body || !(\"getReader\" in body)) {\n __privateMethod(this, _EventSource_instances, failConnection_fn).call(this, \"Invalid response body, expected a web ReadableStream\", status), this.close();\n return;\n }\n const decoder = new TextDecoder(), reader = body.getReader();\n let open = !0;\n do {\n const { done, value } = await reader.read();\n value && __privateGet(this, _parser).feed(decoder.decode(value, { stream: !done })), done && (open = !1, __privateGet(this, _parser).reset(), __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this));\n } while (open);\n }), __privateAdd(this, _onFetchError, (err) => {\n __privateSet(this, _controller, void 0), !(err.name === \"AbortError\" || err.type === \"aborted\") && __privateMethod(this, _EventSource_instances, scheduleReconnect_fn).call(this, flattenError(err));\n }), __privateAdd(this, _onEvent, (event) => {\n typeof event.id == \"string\" && __privateSet(this, _lastEventId, event.id);\n const messageEvent = new MessageEvent(event.event || \"message\", {\n data: event.data,\n origin: __privateGet(this, _redirectUrl) ? __privateGet(this, _redirectUrl).origin : __privateGet(this, _url).origin,\n lastEventId: event.id || \"\"\n });\n __privateGet(this, _onMessage) && (!event.event || event.event === \"message\") && __privateGet(this, _onMessage).call(this, messageEvent), this.dispatchEvent(messageEvent);\n }), __privateAdd(this, _onRetryChange, (value) => {\n __privateSet(this, _reconnectInterval, value);\n }), __privateAdd(this, _reconnect, () => {\n __privateSet(this, _reconnectTimer, void 0), __privateGet(this, _readyState) === this.CONNECTING && __privateMethod(this, _EventSource_instances, connect_fn).call(this);\n });\n try {\n if (url instanceof URL)\n __privateSet(this, _url, url);\n else if (typeof url == \"string\")\n __privateSet(this, _url, new URL(url, getBaseURL()));\n else\n throw new Error(\"Invalid URL\");\n } catch {\n throw syntaxError(\"An invalid or illegal string was specified\");\n }\n __privateSet(this, _parser, createParser({\n onEvent: __privateGet(this, _onEvent),\n onRetry: __privateGet(this, _onRetryChange)\n })), __privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _reconnectInterval, 3e3), __privateSet(this, _fetch, (_a = eventSourceInitDict == null ? void 0 : eventSourceInitDict.fetch) != null ? _a : globalThis.fetch), __privateSet(this, _withCredentials, (_b = eventSourceInitDict == null ? void 0 : eventSourceInitDict.withCredentials) != null ? _b : !1), __privateMethod(this, _EventSource_instances, connect_fn).call(this);\n }\n /**\n * Returns the state of this EventSource object's connection. It can have the values described below.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)\n *\n * Note: typed as `number` instead of `0 | 1 | 2` for compatibility with the `EventSource` interface,\n * defined in the TypeScript `dom` library.\n *\n * @public\n */\n get readyState() {\n return __privateGet(this, _readyState);\n }\n /**\n * Returns the URL providing the event stream.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)\n *\n * @public\n */\n get url() {\n return __privateGet(this, _url).href;\n }\n /**\n * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to \"include\", and false otherwise.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)\n */\n get withCredentials() {\n return __privateGet(this, _withCredentials);\n }\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */\n get onerror() {\n return __privateGet(this, _onError);\n }\n set onerror(value) {\n __privateSet(this, _onError, value);\n }\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */\n get onmessage() {\n return __privateGet(this, _onMessage);\n }\n set onmessage(value) {\n __privateSet(this, _onMessage, value);\n }\n /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */\n get onopen() {\n return __privateGet(this, _onOpen);\n }\n set onopen(value) {\n __privateSet(this, _onOpen, value);\n }\n addEventListener(type, listener, options) {\n const listen = listener;\n super.addEventListener(type, listen, options);\n }\n removeEventListener(type, listener, options) {\n const listen = listener;\n super.removeEventListener(type, listen, options);\n }\n /**\n * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)\n *\n * @public\n */\n close() {\n __privateGet(this, _reconnectTimer) && clearTimeout(__privateGet(this, _reconnectTimer)), __privateGet(this, _readyState) !== this.CLOSED && (__privateGet(this, _controller) && __privateGet(this, _controller).abort(), __privateSet(this, _readyState, this.CLOSED), __privateSet(this, _controller, void 0));\n }\n}\n_readyState = /* @__PURE__ */ new WeakMap(), _url = /* @__PURE__ */ new WeakMap(), _redirectUrl = /* @__PURE__ */ new WeakMap(), _withCredentials = /* @__PURE__ */ new WeakMap(), _fetch = /* @__PURE__ */ new WeakMap(), _reconnectInterval = /* @__PURE__ */ new WeakMap(), _reconnectTimer = /* @__PURE__ */ new WeakMap(), _lastEventId = /* @__PURE__ */ new WeakMap(), _controller = /* @__PURE__ */ new WeakMap(), _parser = /* @__PURE__ */ new WeakMap(), _onError = /* @__PURE__ */ new WeakMap(), _onMessage = /* @__PURE__ */ new WeakMap(), _onOpen = /* @__PURE__ */ new WeakMap(), _EventSource_instances = /* @__PURE__ */ new WeakSet(), /**\n* Connect to the given URL and start receiving events\n*\n* @internal\n*/\nconnect_fn = function() {\n __privateSet(this, _readyState, this.CONNECTING), __privateSet(this, _controller, new AbortController()), __privateGet(this, _fetch)(__privateGet(this, _url), __privateMethod(this, _EventSource_instances, getRequestOptions_fn).call(this)).then(__privateGet(this, _onFetchResponse)).catch(__privateGet(this, _onFetchError));\n}, _onFetchResponse = /* @__PURE__ */ new WeakMap(), _onFetchError = /* @__PURE__ */ new WeakMap(), /**\n* Get request options for the `fetch()` request\n*\n* @returns The request options\n* @internal\n*/\ngetRequestOptions_fn = function() {\n var _a;\n const init = {\n // [spec] Let `corsAttributeState` be `Anonymous`…\n // [spec] …will have their mode set to \"cors\"…\n mode: \"cors\",\n redirect: \"follow\",\n headers: { Accept: \"text/event-stream\", ...__privateGet(this, _lastEventId) ? { \"Last-Event-ID\": __privateGet(this, _lastEventId) } : void 0 },\n cache: \"no-store\",\n signal: (_a = __privateGet(this, _controller)) == null ? void 0 : _a.signal\n };\n return \"window\" in globalThis && (init.credentials = this.withCredentials ? \"include\" : \"same-origin\"), init;\n}, _onEvent = /* @__PURE__ */ new WeakMap(), _onRetryChange = /* @__PURE__ */ new WeakMap(), /**\n* Handles the process referred to in the EventSource specification as \"failing a connection\".\n*\n* @param error - The error causing the connection to fail\n* @param code - The HTTP status code, if available\n* @internal\n*/\nfailConnection_fn = function(message, code) {\n var _a;\n __privateGet(this, _readyState) !== this.CLOSED && __privateSet(this, _readyState, this.CLOSED);\n const errorEvent = new ErrorEvent(\"error\", { code, message });\n (_a = __privateGet(this, _onError)) == null || _a.call(this, errorEvent), this.dispatchEvent(errorEvent);\n}, /**\n* Schedules a reconnection attempt against the EventSource endpoint.\n*\n* @param message - The error causing the connection to fail\n* @param code - The HTTP status code, if available\n* @internal\n*/\nscheduleReconnect_fn = function(message, code) {\n var _a;\n if (__privateGet(this, _readyState) === this.CLOSED)\n return;\n __privateSet(this, _readyState, this.CONNECTING);\n const errorEvent = new ErrorEvent(\"error\", { code, message });\n (_a = __privateGet(this, _onError)) == null || _a.call(this, errorEvent), this.dispatchEvent(errorEvent), __privateSet(this, _reconnectTimer, setTimeout(__privateGet(this, _reconnect), __privateGet(this, _reconnectInterval)));\n}, _reconnect = /* @__PURE__ */ new WeakMap(), /**\n* ReadyState representing an EventSource currently trying to connect\n*\n* @public\n*/\nEventSource.CONNECTING = 0, /**\n* ReadyState representing an EventSource connection that is open (eg connected)\n*\n* @public\n*/\nEventSource.OPEN = 1, /**\n* ReadyState representing an EventSource connection that is closed (eg disconnected)\n*\n* @public\n*/\nEventSource.CLOSED = 2;\nfunction getBaseURL() {\n const doc = \"document\" in globalThis ? globalThis.document : void 0;\n return doc && typeof doc == \"object\" && \"baseURI\" in doc && typeof doc.baseURI == \"string\" ? doc.baseURI : void 0;\n}\nexport {\n ErrorEvent,\n EventSource\n};\n//# sourceMappingURL=index.js.map\n","import { createParser } from \"./index.js\";\nimport { ParseError } from \"./index.js\";\nclass EventSourceParserStream extends TransformStream {\n constructor({ onError, onRetry, onComment } = {}) {\n let parser;\n super({\n start(controller) {\n parser = createParser({\n onEvent: (event) => {\n controller.enqueue(event);\n },\n onError(error) {\n onError === \"terminate\" ? controller.error(error) : typeof onError == \"function\" && onError(error);\n },\n onRetry,\n onComment\n });\n },\n transform(chunk) {\n parser.feed(chunk);\n }\n });\n }\n}\nexport {\n EventSourceParserStream,\n ParseError\n};\n//# sourceMappingURL=stream.js.map\n","import { $ as legacyProtocolVersions, A as isInitializeRequest, At as SdkErrorCode, B as DiscoverResultSchema, C as HEADER_MISMATCH_ERROR_CODE, Ct as OAuthClientInformationFullSchema, D as assertCompleteRequestPrompt, Dt as OAuthTokensSchema, E as scanXMcpHeaderDeclarations, Et as OAuthProtectedResourceMetadataSchema, F as isJSONRPCRequest, Ft as stampErrorBrands, G as MissingRequiredClientCapabilityError, H as ListChangedOptionsBaseSchema, I as isJSONRPCResponse, J as UnsupportedProtocolVersionError, K as ProtocolError, L as isJSONRPCResultResponse, M as isInputRequiredResult, Mt as OAuthError, N as isJSONRPCErrorResponse, Nt as OAuthErrorCode, O as assertCompleteRequestResourceTemplate, Ot as OpenIdProviderDiscoveryMetadataSchema, P as isJSONRPCNotification, Pt as brandedHasInstance, Q as isModernProtocolVersion, R as isTaskAugmentedRequestParams, S as parseSchema, St as IdJagTokenExchangeResponseSchema, T as encodeMcpParamValue, Tt as OAuthMetadataSchema, U as MODERN_WIRE_REVISION, V as JSONRPCMessageSchema, W as codecForVersion, X as ProtocolErrorCode, Y as UrlElicitationRequiredError, Z as SUPPORTED_MODERN_PROTOCOL_VERSIONS, _ as mergeCapabilities, _t as SUPPORTED_PROTOCOL_VERSIONS, a as createFetchWithInit, at as INTERNAL_ERROR, b as resolveInputRequiredDriverConfig, bt as checkResourceAllowed, c as STDIO_DEFAULT_MAX_BUFFER_SIZE, ct as JSONRPC_VERSION, d as getDisplayName, dt as METHOD_NOT_FOUND, et as modernProtocolVersions, f as isJsonContentType, ft as PARSE_ERROR, g as Protocol, gt as SUBSCRIPTION_ID_META_KEY, h as DEFAULT_REQUEST_TIMEOUT_MSEC, ht as SERVER_INFO_META_KEY, i as UriTemplate, it as DEFAULT_NEGOTIATED_PROTOCOL_VERSION, j as isInitializedNotification, jt as SdkHttpError, k as isCallToolResult, kt as SdkError, l as deserializeMessage, lt as LATEST_PROTOCOL_VERSION, m as runInputRequiredFlow, mt as RELATED_TASK_META_KEY, n as preloadSchemas, nt as CLIENT_CAPABILITIES_META_KEY, o as normalizeHeaders, ot as INVALID_PARAMS, p as mediaTypeEssence, pt as PROTOCOL_VERSION_META_KEY, q as ResourceNotFoundError, r as InMemoryTransport, rt as CLIENT_INFO_META_KEY, s as ReadBuffer, st as INVALID_REQUEST, t as fromJsonSchema$1, tt as BAGGAGE_META_KEY, u as serializeMessage, ut as LOG_LEVEL_META_KEY, v as isSpecType, vt as TRACEPARENT_META_KEY, w as buildMcpParamHeaders, wt as OAuthErrorResponseSchema, x as withInputRequired, xt as resourceUrlFromServerUrl, y as specTypeSchemas, yt as TRACESTATE_META_KEY, z as parseJSONRPCMessage } from \"./src-D_zzAWoS.mjs\";\nimport { CORS_IS_POSSIBLE, DefaultJsonSchemaValidator } from \"@modelcontextprotocol/client/_shims\";\nimport pkceChallenge from \"pkce-challenge\";\nimport { EventSource } from \"eventsource\";\nimport { EventSourceParserStream } from \"eventsource-parser/stream\";\n\n//#region src/client/authErrors.ts\n/**\n* Base class for the OAuth-client-flow error family. Concrete subclasses are\n* added to this module alongside the SEP-2468/837/2207/2350/2352 behavior\n* changes that throw them, so callers can catch the whole family with a single\n* `instanceof OAuthClientFlowError` guard once those land.\n*\n* @remarks Nothing in the SDK throws this base class directly. In the release\n* that introduces it no subclass exists yet — the guard is a forward-compat\n* hook and will not match anything until the first behavior change ships.\n*/\nvar OAuthClientFlowError = class extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.OAuthClientFlowError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = new.target.name;\n\t\tstampErrorBrands(this, new.target);\n\t}\n};\n/**\n* Thrown when an authorization-server issuer identifier fails validation.\n*\n* Two checks raise this error, distinguished by {@linkcode IssuerMismatchError.kind | kind}:\n* - `'metadata'` — the `issuer` in fetched authorization-server metadata does\n* not match the issuer identifier the well-known URL was constructed from\n* (RFC 8414 §3.3 / OpenID Connect Discovery §4.3).\n* - `'authorization_response'` — the `iss` parameter on the authorization\n* callback failed RFC 9207 §2.4 validation against the recorded issuer.\n*\n* Intentionally does **not** extend `OAuthError`: the `auth()`\n* orchestrator's `OAuthError` retry block must not swallow this — a mix-up\n* indication is fatal for the flow, not a retryable credential problem.\n*\n* On the `'authorization_response'` path the {@linkcode IssuerMismatchError.received | received}\n* value is attacker-controllable in a mix-up attack; callers **MUST NOT** display\n* it (or any `error`/`error_description`/`error_uri` from the same callback) to\n* end users. The values are JSON-encoded in the message to neutralize log-injection.\n*/\nvar IssuerMismatchError = class extends OAuthClientFlowError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.IssuerMismatchError\" });\n\t}\n\t/** Which check failed — metadata echo (RFC 8414 §3.3) or authorization-response `iss` (RFC 9207). */\n\tkind;\n\t/** The issuer the client expected (from validated metadata / discovery input). */\n\texpected;\n\t/** The issuer value that was received. Attacker-controllable on the `'authorization_response'` path. */\n\treceived;\n\tconstructor(kind, expected, received) {\n\t\tsuper(`Issuer mismatch in ${kind === \"metadata\" ? \"authorization server metadata (RFC 8414 §3.3)\" : \"authorization response (RFC 9207)\"}: expected ${JSON.stringify(expected)}, received ${JSON.stringify(received)}`);\n\t\tthis.kind = kind;\n\t\tthis.expected = expected;\n\t\tthis.received = received;\n\t}\n};\n/**\n* Thrown by `registerClient()` when the authorization server rejects a\n* Dynamic Client Registration request. Carries the HTTP status, the raw\n* response body, and the metadata that was submitted, so callers can inspect\n* the AS's `error` / `error_description` and retry with adjusted metadata\n* (for example a different `application_type`) per SEP-837.\n*\n* The `body` is the raw RFC 7591 error JSON; compare `JSON.parse(body).error`\n* against `OAuthErrorCode` (e.g. `OAuthErrorCode.InvalidRedirectUri`,\n* `OAuthErrorCode.InvalidClientMetadata`).\n*\n* Intentionally does **not** extend `OAuthError`: registration rejection is\n* not a recoverable-by-credential-invalidation condition, and staying outside\n* that hierarchy keeps it from being caught by `auth()`'s `OAuthError` retry\n* path.\n*/\nvar RegistrationRejectedError = class extends OAuthClientFlowError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.RegistrationRejectedError\" });\n\t}\n\t/** HTTP status code returned by the registration endpoint. */\n\tstatus;\n\t/** Raw response body text (typically an RFC 7591 error JSON document). */\n\tbody;\n\t/** The exact client metadata that was POSTed (after SDK defaults were applied). */\n\tsubmittedMetadata;\n\tconstructor(args) {\n\t\tsuper(`Dynamic Client Registration rejected (HTTP ${args.status}): ${args.body}`);\n\t\tthis.status = args.status;\n\t\tthis.body = args.body;\n\t\tthis.submittedMetadata = args.submittedMetadata;\n\t}\n};\n/**\n* Thrown by the token-exchange and refresh paths when the resolved token\n* endpoint is not `https:` and is not a loopback host (SEP-2207). This is a\n* configuration error — re-authorizing cannot fix it — so it intentionally does\n* **not** extend `OAuthError` and `auth()`'s refresh branch rethrows it instead\n* of falling through to a fresh `/authorize` redirect.\n*/\nvar InsecureTokenEndpointError = class extends OAuthClientFlowError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.InsecureTokenEndpointError\" });\n\t}\n\t/** The token endpoint URL that was rejected. */\n\ttokenEndpoint;\n\tconstructor(tokenEndpoint) {\n\t\tsuper(`Refusing to send credentials to non-https token endpoint '${tokenEndpoint}'. OAuth token requests MUST use TLS (localhost / 127.0.0.1 / ::1 are exempt).`);\n\t\tthis.tokenEndpoint = tokenEndpoint;\n\t}\n};\n/**\n* Thrown by the HTTP client transport when the server responds with\n* `403 Forbidden` and `WWW-Authenticate: Bearer error=\"insufficient_scope\"`,\n* and either (a) the transport's `onInsufficientScope` option is `'throw'`, or\n* (b) `onInsufficientScope` is the default `'reauthorize'` but the transport\n* has no {@linkcode index.OAuthClientProvider | OAuthClientProvider} to drive\n* step-up (e.g. a minimal `AuthProvider`, `requestInit`-only headers, or no\n* `authProvider`).\n*\n* Carries the challenge parameters so the host can decide whether to initiate\n* step-up authorization itself (e.g., behind a UX gate) or surface the error.\n*\n* Does **not** extend `OAuthError`: that class represents OAuth protocol errors\n* from the authorization server; this is a resource-server challenge surfaced\n* at the transport layer.\n*\n* All fields originate from the resource server's `WWW-Authenticate` header;\n* treat them as untrusted input when displaying or logging (this includes\n* `requiredScope`, which appears in the error message).\n*/\n/**\n* Thrown by `auth()` on the authorization-code callback leg when the\n* authorization server resolved by discovery differs from the one recorded in\n* `discoveryState()` at redirect time. The `authorization_code` and PKCE\n* `code_verifier` are bound to the AS that minted the code (RFC 7636); sending\n* them to a different AS's token endpoint is a credential-exfiltration vector.\n*\n* This is the only runtime check left in the SEP-2352 model — stored tokens and\n* client credentials are protected structurally by the `issuer` stamp instead.\n*/\nvar AuthorizationServerMismatchError = class extends OAuthClientFlowError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.AuthorizationServerMismatchError\" });\n\t}\n\tconstructor(recordedIssuer, currentIssuer) {\n\t\tsuper(`Authorization server changed between redirect and callback (redirected to ${JSON.stringify(recordedIssuer)}, callback resolved ${JSON.stringify(currentIssuer)}); refusing to send authorization_code/code_verifier to a different token endpoint`);\n\t\tthis.recordedIssuer = recordedIssuer;\n\t\tthis.currentIssuer = currentIssuer;\n\t}\n};\nvar InsufficientScopeError = class extends OAuthClientFlowError {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.InsufficientScopeError\" });\n\t}\n\t/** The `scope` value from the `WWW-Authenticate` challenge — the scopes the resource server says are required. */\n\trequiredScope;\n\t/** The `resource_metadata` URL from the `WWW-Authenticate` challenge, if present. */\n\tresourceMetadataUrl;\n\t/** The `error_description` from the `WWW-Authenticate` challenge, if present. */\n\terrorDescription;\n\tconstructor(init) {\n\t\tsuper(`Insufficient scope${init.requiredScope ? `: required \"${init.requiredScope}\"` : \"\"}`);\n\t\tthis.requiredScope = init.requiredScope;\n\t\tthis.resourceMetadataUrl = init.resourceMetadataUrl;\n\t\tthis.errorDescription = init.errorDescription;\n\t}\n};\n\n//#endregion\n//#region src/client/auth.ts\n/**\n* SEP-2352 stamp check: returns `stored` only when its `issuer` stamp matches the\n* resolved authorization server. A stamp that names a *different* issuer reads back\n* as `undefined`, so a credential issued by one authorization server is never reused\n* at another — the flow falls through to re-registration / re-authorization exactly\n* as if nothing were stored. An unstamped value (legacy provider or pre-SEP-2352\n* storage) is returned as-is with a `console.warn`; {@linkcode auth} writes the\n* stamp back on first use so the window closes after one call.\n*\n* {@linkcode auth} stamps every value it writes via `saveTokens` / `saveClientInformation`,\n* so a provider that round-trips the stored object verbatim is protected with no extra\n* code. Providers that hold credentials for multiple authorization servers key their\n* storage on `ctx.issuer` instead.\n*\n* @param opts.canPersistStamp - When `false`, suppresses the unstamped-credential\n* warning: the caller cannot back-stamp (no `saveClientInformation`), so the\n* \"binding on first use\" claim would be false and would fire on every call.\n*/\nfunction discardIfIssuerMismatch(stored, issuer, opts) {\n\tif (stored === void 0) return void 0;\n\tif (stored.issuer === void 0) {\n\t\tif (opts?.canPersistStamp !== false) console.warn(\"[mcp-sdk] SEP-2352: stored OAuth credential has no 'issuer' stamp (pre-upgrade storage or provider not round-tripping the value). SEP-2352 isolation is inactive for this read; ensure your provider round-trips the issuer field.\");\n\t\treturn stored;\n\t}\n\treturn issuersMatch(stored.issuer, issuer) ? stored : void 0;\n}\n/**\n* SEP-2352 issuer-identity comparison. Tolerates a single trailing `/` difference,\n* mirroring the RFC 8414 §3.3 \"one narrow tolerance\" applied at metadata-echo\n* validation in {@linkcode discoverAuthorizationServerMetadata}: when the SDK\n* derives an issuer from `String(new URL(...))` (always slash-suffixed) and the AS\n* publishes a slash-free `metadata.issuer`, the two name the same authorization\n* server.\n*/\nfunction issuersMatch(a, b) {\n\treturn a === b || a.endsWith(\"/\") && a.slice(0, -1) === b || b.endsWith(\"/\") && b.slice(0, -1) === a;\n}\n/**\n* Type guard distinguishing `OAuthClientProvider` from a minimal `AuthProvider`.\n* Transports use this at construction time to classify the `authProvider` option.\n*\n* Checks for `tokens()` + `clientInformation()` — two required `OAuthClientProvider`\n* methods that a minimal `AuthProvider` `{ token: ... }` would never have.\n*/\nfunction isOAuthClientProvider(provider) {\n\tif (provider == null) return false;\n\tconst p = provider;\n\treturn typeof p.tokens === \"function\" && typeof p.clientInformation === \"function\";\n}\n/**\n* Standard `onUnauthorized` behavior for OAuth providers: extracts\n* `WWW-Authenticate` parameters from the 401 response and runs {@linkcode auth}.\n* Used by {@linkcode adaptOAuthProvider} to bridge `OAuthClientProvider` to `AuthProvider`.\n*/\nasync function handleOAuthUnauthorized(provider, ctx, extraAuthOptions) {\n\tconst { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(ctx.response);\n\tif (await auth(provider, {\n\t\tserverUrl: ctx.serverUrl,\n\t\tresourceMetadataUrl,\n\t\tscope,\n\t\tfetchFn: ctx.fetchFn,\n\t\t...extraAuthOptions\n\t}) !== \"AUTHORIZED\") throw new UnauthorizedError();\n}\n/**\n* Adapts an `OAuthClientProvider` to the minimal `AuthProvider` interface that\n* transports consume. Called once at transport construction — the transport stores\n* the adapted provider for `_commonHeaders()` and 401 handling, while keeping the\n* original `OAuthClientProvider` for OAuth-specific paths (`finishAuth()`, 403 `insufficient_scope` step-up).\n*\n* SEP-2352 note: `token()` here is the per-request `Authorization: Bearer …` read for\n* the *resource server* (the MCP transport URL), not an authorization server. No OAuth\n* discovery has run at this layer, so there is no `issuer` to pass as `ctx` and no\n* {@linkcode discardIfIssuerMismatch} check to apply — the access token is sent only to\n* the resource server, never to an AS, so the SEP-2352 cross-AS isolation invariant is\n* not in scope. Providers that key storage on `ctx.issuer` MUST treat `ctx === undefined`\n* as \"return the most-recently-saved token set\" (the only consumer is the resource server\n* the token was minted for); providers that round-trip a single blob need no change.\n*/\nfunction adaptOAuthProvider(provider, extraAuthOptions) {\n\treturn {\n\t\ttoken: async () => {\n\t\t\treturn (await provider.tokens())?.access_token;\n\t\t},\n\t\tonUnauthorized: async (ctx) => handleOAuthUnauthorized(provider, ctx, extraAuthOptions)\n\t};\n}\nvar UnauthorizedError = class extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.UnauthorizedError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(message) {\n\t\tsuper(message ?? \"Unauthorized\");\n\t\tthis.name = \"UnauthorizedError\";\n\t\tstampErrorBrands(this, new.target);\n\t}\n};\n/**\n* Validates the `iss` parameter from an authorization response against the\n* issuer recorded from the authorization server's validated metadata, per\n* RFC 9207 §2.4 and the MCP specification's four-row decision table.\n*\n* | `issParameterSupported` | `iss` | Action |\n* | ----------------------- | ------- | ------------------------------------------------ |\n* | `true` | present | compare; throw {@linkcode IssuerMismatchError} on mismatch |\n* | `true` | absent | throw {@linkcode IssuerMismatchError} |\n* | `false` | present | compare; throw {@linkcode IssuerMismatchError} on mismatch |\n* | `false` | absent | proceed (no-op) |\n*\n* Comparison is **simple string equality** (RFC 3986 §6.2.1). Scheme/host case\n* folding, default-port elision, trailing-slash, and percent-encoding\n* normalization are explicitly **not** applied — any difference is a mismatch.\n*\n* When `expectedIssuer` is `undefined` (no validated metadata document exists),\n* the check has no authentic baseline and degenerates to a no-op.\n*\n* @throws {IssuerMismatchError} with `kind: 'authorization_response'`\n*/\n/**\n* Reads RFC 9207's `authorization_response_iss_parameter_supported` from\n* authorization-server metadata. Only a literal `true` counts as advertised;\n* absent, `false`, or a non-boolean wire value (coerced to `undefined` by the\n* schema) means not advertised.\n*/\nfunction isIssParameterSupported(metadata) {\n\treturn metadata?.authorization_response_iss_parameter_supported === true;\n}\nfunction validateAuthorizationResponseIssuer({ iss, expectedIssuer, issParameterSupported }) {\n\tif (expectedIssuer === void 0) return;\n\tif (iss === void 0) {\n\t\tif (issParameterSupported) throw new IssuerMismatchError(\"authorization_response\", expectedIssuer, void 0);\n\t\treturn;\n\t}\n\tif (iss !== expectedIssuer) throw new IssuerMismatchError(\"authorization_response\", expectedIssuer, iss);\n}\n/**\n* Computes the union of one or more OAuth `scope` strings.\n*\n* Each argument is a space-delimited scope string per RFC 6749 §3.3, or\n* `undefined`. The result is a single space-delimited string containing each\n* distinct scope token exactly once, in first-seen order, or `undefined` if\n* every input is empty/undefined.\n*\n* No hierarchical deduplication is performed: a union may contain semantically\n* redundant entries (e.g., a broad scope alongside a narrower one it implies).\n* Authorization servers normalize such redundancy during token issuance; the\n* spec's step-up flow does not require clients to.\n*\n* Used by the transport's `403 insufficient_scope` step-up path to accumulate\n* previously-requested scopes with newly-challenged scopes so re-authorization\n* does not lose previously-granted permissions.\n*/\nfunction computeScopeUnion(...scopes) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const scope of scopes) {\n\t\tif (!scope) continue;\n\t\tfor (const token of scope.split(/\\s+/)) if (token) seen.add(token);\n\t}\n\treturn seen.size > 0 ? [...seen].join(\" \") : void 0;\n}\n/**\n* Whether `union` contains at least one scope token not present in `current`.\n* Both arguments are space-delimited scope strings per RFC 6749 §3.3.\n*\n* Used to gate the step-up refresh bypass: when the union of previously-requested\n* and newly-challenged scopes is a strict superset of the current token's\n* granted scope, refreshing cannot widen the grant (RFC 6749 §6), so the\n* transport must force a fresh authorization request instead. When the current\n* token already covers the union, refresh remains valid.\n*\n* An undefined or empty `current` is treated as the empty set, so any non-empty\n* `union` is a strict superset. Note that per RFC 6749 §3.3 an authorization\n* server MAY omit the token's `scope` field when it equals the requested scope;\n* this helper is conservative and treats an absent token `scope` as empty, so\n* step-up always forces a fresh authorization request in that case rather than\n* risking a refresh that silently drops the widened scope.\n*/\nfunction isStrictScopeSuperset(union, current) {\n\tif (!union) return false;\n\tconst currentSet = new Set((current ?? \"\").split(/\\s+/).filter(Boolean));\n\tfor (const token of union.split(/\\s+/)) if (token && !currentSet.has(token)) return true;\n\treturn false;\n}\n/**\n* Shared `finishAuth` resolver for the `(code, iss?)` and `(URLSearchParams)` overloads.\n*\n* For the `URLSearchParams` form, only `iss` and `code` are read up front. When a `code` is\n* present the returned values flow into {@linkcode auth}, which runs\n* {@linkcode validateAuthorizationResponseIssuer} against freshly-discovered metadata before\n* the code is redeemed — so on mismatch the thrown {@linkcode IssuerMismatchError} carries no\n* `error`/`error_description`/`error_uri` text from the callback (those are attacker-controlled\n* in a mix-up). When no `code` is present (an error-shaped callback), `iss` is validated here\n* against the provider's recorded discovery state — or, when the provider does not implement\n* `discoveryState`, against freshly-discovered metadata mirroring what {@linkcode auth} does on\n* the code-present path — **before** the callback's error parameters are read; only after that\n* passes are they surfaced as an {@linkcode OAuthError}. When no issuer baseline can be\n* obtained either way, a generic {@linkcode UnauthorizedError} is thrown without surfacing the\n* callback's `error`/`error_description`/`error_uri`.\n*\n* @internal Exported for the transport `finishAuth` overloads; not part of the public barrel.\n*/\nasync function resolveAuthorizationCallbackParams(codeOrParams, iss, provider, serverUrl, opts) {\n\tif (typeof codeOrParams === \"string\") return {\n\t\tauthorizationCode: codeOrParams,\n\t\tiss\n\t};\n\tconst issParam = codeOrParams.get(\"iss\") ?? void 0;\n\tconst code = codeOrParams.get(\"code\");\n\tif (code) return {\n\t\tauthorizationCode: code,\n\t\tiss: issParam\n\t};\n\tlet metadata = (await provider.discoveryState?.())?.authorizationServerMetadata;\n\tif (!metadata) try {\n\t\tmetadata = (await discoverOAuthServerInfo(serverUrl, opts)).authorizationServerMetadata;\n\t} catch {\n\t\tmetadata = void 0;\n\t}\n\tif (!metadata) throw new UnauthorizedError(\"Authorization callback failed and the issuer could not be verified\");\n\tvalidateAuthorizationResponseIssuer({\n\t\tiss: issParam,\n\t\texpectedIssuer: metadata.issuer,\n\t\tissParameterSupported: isIssParameterSupported(metadata)\n\t});\n\tconst error = codeOrParams.get(\"error\");\n\tif (error) throw new OAuthError(error, codeOrParams.get(\"error_description\") ?? error, codeOrParams.get(\"error_uri\") ?? void 0);\n\tthrow new UnauthorizedError(\"Authorization callback contained neither `code` nor `error`\");\n}\nfunction isClientAuthMethod(method) {\n\treturn [\n\t\t\"client_secret_basic\",\n\t\t\"client_secret_post\",\n\t\t\"none\"\n\t].includes(method);\n}\nconst AUTHORIZATION_CODE_RESPONSE_TYPE = \"code\";\nconst AUTHORIZATION_CODE_CHALLENGE_METHOD = \"S256\";\n/**\n* Determines the best client authentication method to use based on server support and client configuration.\n*\n* Priority order (highest to lowest):\n* 1. `client_secret_basic` (if client secret is available)\n* 2. `client_secret_post` (if client secret is available)\n* 3. `none` (for public clients)\n*\n* @param clientInformation - OAuth client information containing credentials\n* @param supportedMethods - Authentication methods supported by the authorization server\n* @returns The selected authentication method\n*/\nfunction selectClientAuthMethod(clientInformation, supportedMethods) {\n\tconst hasClientSecret = clientInformation.client_secret !== void 0;\n\tif (\"token_endpoint_auth_method\" in clientInformation && clientInformation.token_endpoint_auth_method && isClientAuthMethod(clientInformation.token_endpoint_auth_method) && (supportedMethods.length === 0 || supportedMethods.includes(clientInformation.token_endpoint_auth_method))) return clientInformation.token_endpoint_auth_method;\n\tif (supportedMethods.length === 0) return hasClientSecret ? \"client_secret_basic\" : \"none\";\n\tif (hasClientSecret && supportedMethods.includes(\"client_secret_basic\")) return \"client_secret_basic\";\n\tif (hasClientSecret && supportedMethods.includes(\"client_secret_post\")) return \"client_secret_post\";\n\tif (supportedMethods.includes(\"none\")) return \"none\";\n\treturn hasClientSecret ? \"client_secret_post\" : \"none\";\n}\n/**\n* Applies client authentication to the request based on the specified method.\n*\n* Implements OAuth 2.1 client authentication methods:\n* - `client_secret_basic`: HTTP Basic authentication (RFC 6749 Section 2.3.1)\n* - `client_secret_post`: Credentials in request body (RFC 6749 Section 2.3.1)\n* - `none`: Public client authentication (RFC 6749 Section 2.1)\n*\n* @param method - The authentication method to use\n* @param clientInformation - OAuth client information containing credentials\n* @param headers - HTTP headers object to modify\n* @param params - URL search parameters to modify\n* @throws {Error} When required credentials are missing\n*/\nfunction applyClientAuthentication(method, clientInformation, headers, params) {\n\tconst { client_id, client_secret } = clientInformation;\n\tswitch (method) {\n\t\tcase \"client_secret_basic\":\n\t\t\tapplyBasicAuth(client_id, client_secret, headers);\n\t\t\treturn;\n\t\tcase \"client_secret_post\":\n\t\t\tapplyPostAuth(client_id, client_secret, params);\n\t\t\treturn;\n\t\tcase \"none\":\n\t\t\tapplyPublicAuth(client_id, params);\n\t\t\treturn;\n\t\tdefault: throw new Error(`Unsupported client authentication method: ${method}`);\n\t}\n}\n/**\n* Applies HTTP Basic authentication (RFC 6749 Section 2.3.1)\n*/\nfunction applyBasicAuth(clientId, clientSecret, headers) {\n\tif (!clientSecret) throw new Error(\"client_secret_basic authentication requires a client_secret\");\n\tconst credentials = btoa(`${clientId}:${clientSecret}`);\n\theaders.set(\"Authorization\", `Basic ${credentials}`);\n}\n/**\n* Applies POST body authentication (RFC 6749 Section 2.3.1)\n*/\nfunction applyPostAuth(clientId, clientSecret, params) {\n\tparams.set(\"client_id\", clientId);\n\tif (clientSecret) params.set(\"client_secret\", clientSecret);\n}\n/**\n* Applies public client authentication (RFC 6749 Section 2.1)\n*/\nfunction applyPublicAuth(clientId, params) {\n\tparams.set(\"client_id\", clientId);\n}\n/** Loopback hosts exempt from the in-transit `https:` requirement (RFC 8252 §7.3). */\nfunction isLoopbackHost(hostname) {\n\treturn hostname === \"localhost\" || hostname === \"127.0.0.1\" || hostname === \"[::1]\" || hostname === \"::1\";\n}\n/**\n* SEP-2207: refuse to send credentials to a non-TLS, non-loopback token endpoint.\n* Throws {@linkcode InsecureTokenEndpointError}. Loopback hosts are exempt.\n*/\nfunction assertSecureTokenEndpoint(tokenEndpoint) {\n\tconst url = new URL(String(tokenEndpoint));\n\tif (url.protocol !== \"https:\" && !isLoopbackHost(url.hostname)) throw new InsecureTokenEndpointError(url.href);\n\treturn url;\n}\n/**\n* Derives an OIDC `application_type` from a client's registered redirect URIs\n* when the consumer has not set one explicitly (SEP-837). Loopback hosts and\n* non-`http(s)` custom URI schemes indicate a native application (RFC 8252);\n* everything else is treated as a web application. The result is a heuristic\n* default — callers that know better should set `clientMetadata.application_type`\n* themselves, which {@linkcode resolveClientMetadata} never overwrites.\n*\n* A mixed redirect set (for example a public `https:` URI alongside a loopback\n* URI) is inherently ambiguous under OIDC DCR §2 — neither value satisfies the\n* AS for both URIs — so consumers with mixed sets should set `application_type`\n* explicitly rather than relying on this heuristic.\n*/\nfunction deriveApplicationType(redirectUris) {\n\tfor (const raw of redirectUris ?? []) {\n\t\tlet url;\n\t\ttry {\n\t\t\turl = new URL(raw);\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\t\tif (url.protocol !== \"http:\" && url.protocol !== \"https:\") return \"native\";\n\t\tif (isLoopbackHost(url.hostname)) return \"native\";\n\t}\n\treturn \"web\";\n}\n/**\n* Reads {@linkcode OAuthClientProvider.clientMetadata | clientMetadata} from the\n* provider and fills the SEP-837 / SEP-2207 defaults the SDK relies on, so\n* {@linkcode registerClient} sees a consistent, fully-populated document.\n*\n* - `grant_types` defaults to `['authorization_code', 'refresh_token']` for\n* interactive providers (those with a {@linkcode OAuthClientProvider.redirectUrl | redirectUrl})\n* so authorization servers that gate refresh-token issuance on the registered\n* grant types issue one (SEP-2207). Non-interactive providers (no\n* `redirectUrl`) get no `grant_types` default. This default applies to the\n* Dynamic Client Registration body only — it does **not** drive\n* {@linkcode determineScope}'s `offline_access` augmentation.\n* - `application_type` defaults from `redirect_uris`: loopback redirect hosts\n* and custom URI schemes → `'native'`, otherwise `'web'` (SEP-837 / RFC 8252).\n*\n* A field the consumer set explicitly is **never** overwritten. {@linkcode auth}\n* calls this once at the top of the flow; direct callers of\n* {@linkcode registerClient} that want the same defaults should pass the result\n* of this function as `clientMetadata`.\n*/\nfunction resolveClientMetadata(provider) {\n\tconst clientMetadata = provider.clientMetadata;\n\treturn {\n\t\t...clientMetadata,\n\t\tgrant_types: clientMetadata.grant_types ?? (provider.redirectUrl === void 0 ? void 0 : [\"authorization_code\", \"refresh_token\"]),\n\t\tapplication_type: clientMetadata.application_type ?? deriveApplicationType(clientMetadata.redirect_uris)\n\t};\n}\n/**\n* Parses an OAuth error response from a string or Response object.\n*\n* If the input is a standard OAuth2.0 error response, it will be parsed according to the spec\n* and an {@linkcode OAuthError} will be returned with the appropriate error code.\n* If parsing fails, it falls back to a generic {@linkcode OAuthErrorCode.ServerError | ServerError} that includes\n* the response status (if available) and original content.\n*\n* @param input - A Response object or string containing the error response\n* @returns A Promise that resolves to an {@linkcode OAuthError} instance\n*/\nasync function parseErrorResponse(input) {\n\tconst statusCode = input instanceof Response ? input.status : void 0;\n\tconst body = input instanceof Response ? await input.text() : input;\n\ttry {\n\t\tconst result = OAuthErrorResponseSchema.parse(JSON.parse(body));\n\t\treturn OAuthError.fromResponse(result);\n\t} catch (error) {\n\t\tconst errorMessage = `${statusCode ? `HTTP ${statusCode}: ` : \"\"}Invalid OAuth error response: ${error}. Raw body: ${body}`;\n\t\treturn new OAuthError(OAuthErrorCode.ServerError, errorMessage);\n\t}\n}\n/**\n* Orchestrates the full auth flow with a server.\n*\n* This can be used as a single entry point for all authorization functionality,\n* instead of linking together the other lower-level functions in this module.\n*/\nasync function auth(provider, options) {\n\ttry {\n\t\treturn await authInternal(provider, options);\n\t} catch (error) {\n\t\tif (error instanceof OAuthError) {\n\t\t\tif (error.code === OAuthErrorCode.InvalidClient || error.code === OAuthErrorCode.UnauthorizedClient) {\n\t\t\t\tawait provider.invalidateCredentials?.(\"client\");\n\t\t\t\tawait provider.invalidateCredentials?.(\"tokens\");\n\t\t\t\treturn await authInternal(provider, options);\n\t\t\t} else if (error.code === OAuthErrorCode.InvalidGrant) {\n\t\t\t\tawait provider.invalidateCredentials?.(\"tokens\");\n\t\t\t\treturn await authInternal(provider, options);\n\t\t\t}\n\t\t}\n\t\tthrow error;\n\t}\n}\n/**\n* Selects scopes per the MCP spec and augment for refresh token support.\n*/\nfunction determineScope(options) {\n\tconst { requestedScope, resourceMetadata, authServerMetadata, clientMetadata } = options;\n\tlet effectiveScope = requestedScope || resourceMetadata?.scopes_supported?.join(\" \") || clientMetadata.scope;\n\tif (effectiveScope && authServerMetadata?.scopes_supported?.includes(\"offline_access\") && !effectiveScope.split(\" \").includes(\"offline_access\") && clientMetadata.grant_types?.includes(\"refresh_token\")) effectiveScope = `${effectiveScope} offline_access`;\n\treturn effectiveScope;\n}\nasync function authInternal(provider, { serverUrl, authorizationCode, iss, scope, resourceMetadataUrl, fetchFn, skipIssuerMetadataValidation, forceReauthorization }) {\n\tconst clientMetadata = resolveClientMetadata(provider);\n\tconst cachedState = await provider.discoveryState?.();\n\tlet resourceMetadata;\n\tlet authorizationServerUrl;\n\tlet metadata;\n\tlet freshDiscoveryState;\n\tlet effectiveResourceMetadataUrl = resourceMetadataUrl;\n\tif (!effectiveResourceMetadataUrl && cachedState?.resourceMetadataUrl) effectiveResourceMetadataUrl = new URL(cachedState.resourceMetadataUrl);\n\tif (cachedState?.authorizationServerUrl) {\n\t\tauthorizationServerUrl = cachedState.authorizationServerUrl;\n\t\tresourceMetadata = cachedState.resourceMetadata;\n\t\tmetadata = cachedState.authorizationServerMetadata ?? await discoverAuthorizationServerMetadata(authorizationServerUrl, {\n\t\t\tfetchFn,\n\t\t\tskipIssuerValidation: skipIssuerMetadataValidation\n\t\t});\n\t\tif (!resourceMetadata) try {\n\t\t\tresourceMetadata = await discoverOAuthProtectedResourceMetadata(serverUrl, { resourceMetadataUrl: effectiveResourceMetadataUrl }, fetchFn);\n\t\t} catch (error) {\n\t\t\tif (error instanceof TypeError) throw error;\n\t\t}\n\t\tif (metadata !== cachedState.authorizationServerMetadata || resourceMetadata !== cachedState.resourceMetadata) await provider.saveDiscoveryState?.({\n\t\t\tauthorizationServerUrl: String(authorizationServerUrl),\n\t\t\tresourceMetadataUrl: effectiveResourceMetadataUrl?.toString(),\n\t\t\tresourceMetadata,\n\t\t\tauthorizationServerMetadata: metadata\n\t\t});\n\t} else {\n\t\tconst serverInfo = await discoverOAuthServerInfo(serverUrl, {\n\t\t\tresourceMetadataUrl: effectiveResourceMetadataUrl,\n\t\t\tfetchFn,\n\t\t\tskipIssuerMetadataValidation\n\t\t});\n\t\tauthorizationServerUrl = serverInfo.authorizationServerUrl;\n\t\tmetadata = serverInfo.authorizationServerMetadata;\n\t\tresourceMetadata = serverInfo.resourceMetadata;\n\t\tfreshDiscoveryState = {\n\t\t\tauthorizationServerUrl: String(authorizationServerUrl),\n\t\t\tresourceMetadataUrl: effectiveResourceMetadataUrl?.toString(),\n\t\t\tresourceMetadata,\n\t\t\tauthorizationServerMetadata: metadata\n\t\t};\n\t}\n\tconst issuer = metadata?.issuer ?? String(authorizationServerUrl);\n\tconst infoCtx = { issuer };\n\tawait provider.saveAuthorizationServerUrl?.(issuer);\n\tif (authorizationCode !== void 0) {\n\t\tconst recordedIssuer = cachedState?.authorizationServerMetadata?.issuer ?? cachedState?.authorizationServerUrl;\n\t\tif (recordedIssuer === void 0) {\n\t\t\tif (provider.saveDiscoveryState !== void 0) throw new AuthorizationServerMismatchError(\"discoveryState was not available on the callback leg; ensure your provider persists discoveryState alongside codeVerifier\", issuer);\n\t\t\tconsole.warn(\"[mcp-sdk] OAuthClientProvider does not implement saveDiscoveryState()/discoveryState(); the SEP-2352 callback-leg authorization-server binding cannot be checked. Implement discoveryState (persist alongside codeVerifier) — see docs/migration/upgrade-to-v2.md §SEP-2352.\");\n\t\t} else if (!issuersMatch(recordedIssuer, issuer)) throw new AuthorizationServerMismatchError(recordedIssuer, issuer);\n\t}\n\tif (freshDiscoveryState) await provider.saveDiscoveryState?.(freshDiscoveryState);\n\tconst resource = await selectResourceURL(serverUrl, provider, resourceMetadata);\n\tif (resource) await provider.saveResourceUrl?.(String(resource));\n\tconst resolvedScope = determineScope({\n\t\trequestedScope: scope,\n\t\tresourceMetadata,\n\t\tauthServerMetadata: metadata,\n\t\tclientMetadata: provider.clientMetadata\n\t});\n\tconst rawClientInfo = await Promise.resolve(provider.clientInformation(infoCtx));\n\tlet clientInformation = discardIfIssuerMismatch(rawClientInfo, issuer, { canPersistStamp: provider.saveClientInformation !== void 0 });\n\tif (clientInformation === void 0 && rawClientInfo?.issuer && provider.saveClientInformation === void 0) throw new AuthorizationServerMismatchError(rawClientInfo.issuer, issuer);\n\tif (clientInformation && clientInformation.issuer === void 0) {\n\t\tclientInformation = {\n\t\t\t...clientInformation,\n\t\t\tissuer\n\t\t};\n\t\tawait provider.saveClientInformation?.(clientInformation, infoCtx);\n\t}\n\tif (!clientInformation) {\n\t\tif (authorizationCode !== void 0) throw new Error(\"Existing OAuth client information is required when exchanging an authorization code\");\n\t\tconst supportsUrlBasedClientId = metadata?.client_id_metadata_document_supported === true;\n\t\tconst clientMetadataUrl = provider.clientMetadataUrl;\n\t\tif (clientMetadataUrl && !isHttpsUrl(clientMetadataUrl)) throw new OAuthError(OAuthErrorCode.InvalidClientMetadata, `clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${clientMetadataUrl}`);\n\t\tif (supportsUrlBasedClientId && clientMetadataUrl) {\n\t\t\tclientInformation = {\n\t\t\t\tclient_id: clientMetadataUrl,\n\t\t\t\tissuer\n\t\t\t};\n\t\t\tawait provider.saveClientInformation?.(clientInformation, infoCtx);\n\t\t} else {\n\t\t\tif (!provider.saveClientInformation) throw new Error(\"OAuth client information must be saveable for dynamic registration\");\n\t\t\tclientInformation = {\n\t\t\t\t...await registerClient(authorizationServerUrl, {\n\t\t\t\t\tmetadata,\n\t\t\t\t\tclientMetadata,\n\t\t\t\t\tscope: resolvedScope,\n\t\t\t\t\tfetchFn\n\t\t\t\t}),\n\t\t\t\tissuer\n\t\t\t};\n\t\t\tawait provider.saveClientInformation(clientInformation, infoCtx);\n\t\t}\n\t}\n\tconst nonInteractiveFlow = !provider.redirectUrl;\n\tif (authorizationCode !== void 0 || nonInteractiveFlow) {\n\t\tif (authorizationCode !== void 0) validateAuthorizationResponseIssuer({\n\t\t\tiss,\n\t\t\texpectedIssuer: metadata?.issuer,\n\t\t\tissParameterSupported: isIssParameterSupported(metadata)\n\t\t});\n\t\tconst tokens$1 = await fetchToken(provider, authorizationServerUrl, {\n\t\t\tmetadata,\n\t\t\tresource,\n\t\t\tauthorizationCode,\n\t\t\tiss,\n\t\t\tscope: resolvedScope,\n\t\t\tfetchFn\n\t\t});\n\t\tawait provider.saveTokens({\n\t\t\t...tokens$1,\n\t\t\tissuer\n\t\t}, infoCtx);\n\t\treturn \"AUTHORIZED\";\n\t}\n\tlet tokens = discardIfIssuerMismatch(await provider.tokens(infoCtx), issuer);\n\tif (tokens && tokens.issuer === void 0) {\n\t\ttokens = {\n\t\t\t...tokens,\n\t\t\tissuer\n\t\t};\n\t\tawait provider.saveTokens(tokens, infoCtx);\n\t}\n\tif (tokens?.refresh_token && !forceReauthorization) try {\n\t\tconst newTokens = await refreshAuthorization(authorizationServerUrl, {\n\t\t\tmetadata,\n\t\t\tclientInformation,\n\t\t\trefreshToken: tokens.refresh_token,\n\t\t\tresource,\n\t\t\taddClientAuthentication: provider.addClientAuthentication,\n\t\t\tfetchFn\n\t\t});\n\t\tawait provider.saveTokens({\n\t\t\t...newTokens,\n\t\t\tissuer\n\t\t}, infoCtx);\n\t\treturn \"AUTHORIZED\";\n\t} catch (error) {\n\t\tif (error instanceof InsecureTokenEndpointError) throw error;\n\t\tif (!(error instanceof OAuthError) || error.code === OAuthErrorCode.ServerError) {} else throw error;\n\t}\n\tconst state = provider.state ? await provider.state() : void 0;\n\tconst { authorizationUrl, codeVerifier } = await startAuthorization(authorizationServerUrl, {\n\t\tmetadata,\n\t\tclientInformation,\n\t\tstate,\n\t\tredirectUrl: provider.redirectUrl,\n\t\tscope: resolvedScope,\n\t\tresource\n\t});\n\tawait provider.saveCodeVerifier(codeVerifier);\n\tawait provider.redirectToAuthorization(authorizationUrl);\n\treturn \"REDIRECT\";\n}\n/**\n* Validates that the given `clientMetadataUrl` is a valid HTTPS URL with a non-root pathname.\n*\n* No-op when `url` is `undefined` or empty (providers that do not use URL-based client IDs\n* are unaffected). When the value is defined but invalid, throws an {@linkcode OAuthError}\n* with code {@linkcode OAuthErrorCode.InvalidClientMetadata}.\n*\n* {@linkcode OAuthClientProvider} implementations that accept a `clientMetadataUrl` should\n* call this in their constructors for early validation.\n*\n* @param url - The `clientMetadataUrl` value to validate (from `OAuthClientProvider.clientMetadataUrl`)\n* @throws {OAuthError} When `url` is defined but is not a valid HTTPS URL with a non-root pathname\n*/\nfunction validateClientMetadataUrl(url) {\n\tif (url && !isHttpsUrl(url)) throw new OAuthError(OAuthErrorCode.InvalidClientMetadata, `clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${url}`);\n}\n/**\n* SEP-991: URL-based Client IDs\n* Validate that the `client_id` is a valid URL with `https` scheme\n*/\nfunction isHttpsUrl(value) {\n\tif (!value) return false;\n\ttry {\n\t\tconst url = new URL(value);\n\t\treturn url.protocol === \"https:\" && url.pathname !== \"/\";\n\t} catch {\n\t\treturn false;\n\t}\n}\nasync function selectResourceURL(serverUrl, provider, resourceMetadata) {\n\tconst defaultResource = resourceUrlFromServerUrl(serverUrl);\n\tif (provider.validateResourceURL) return await provider.validateResourceURL(defaultResource, resourceMetadata?.resource);\n\tif (!resourceMetadata) return;\n\tif (!checkResourceAllowed({\n\t\trequestedResource: defaultResource,\n\t\tconfiguredResource: resourceMetadata.resource\n\t})) throw new Error(`Protected resource ${resourceMetadata.resource} does not match expected ${defaultResource} (or origin)`);\n\treturn new URL(resourceMetadata.resource);\n}\n/**\n* Extract `resource_metadata`, `scope`, `error`, and `error_description` from a\n* `WWW-Authenticate` header.\n*/\nfunction extractWWWAuthenticateParams(res) {\n\tconst authenticateHeader = res.headers.get(\"WWW-Authenticate\");\n\tif (!authenticateHeader) return {};\n\tconst [type, scheme] = authenticateHeader.split(\" \");\n\tif (type?.toLowerCase() !== \"bearer\" || !scheme) return {};\n\tconst resourceMetadataMatch = extractFieldFromWwwAuth(res, \"resource_metadata\") || void 0;\n\tlet resourceMetadataUrl;\n\tif (resourceMetadataMatch) try {\n\t\tresourceMetadataUrl = new URL(resourceMetadataMatch);\n\t} catch {}\n\tconst scope = extractFieldFromWwwAuth(res, \"scope\") || void 0;\n\tconst error = extractFieldFromWwwAuth(res, \"error\") || void 0;\n\tconst errorDescription = extractFieldFromWwwAuth(res, \"error_description\") || void 0;\n\treturn {\n\t\tresourceMetadataUrl,\n\t\tscope,\n\t\terror,\n\t\terrorDescription\n\t};\n}\n/**\n* Extracts a specific field's value from the `WWW-Authenticate` header string.\n*\n* @param response The HTTP response object containing the headers.\n* @param fieldName The name of the field to extract (e.g., `\"realm\"`, `\"nonce\"`).\n* @returns The field value\n*/\nfunction extractFieldFromWwwAuth(response, fieldName) {\n\tconst wwwAuthHeader = response.headers.get(\"WWW-Authenticate\");\n\tif (!wwwAuthHeader) return null;\n\tconst pattern = new RegExp(String.raw`${fieldName}=(?:\"([^\"]+)\"|([^\\s,]+))`);\n\tconst match = wwwAuthHeader.match(pattern);\n\tif (match) {\n\t\tconst result = match[1] || match[2];\n\t\tif (result) return result;\n\t}\n\treturn null;\n}\n/**\n* Extract `resource_metadata` from response header.\n* @deprecated Use {@linkcode extractWWWAuthenticateParams} instead.\n*/\nfunction extractResourceMetadataUrl(res) {\n\tconst authenticateHeader = res.headers.get(\"WWW-Authenticate\");\n\tif (!authenticateHeader) return;\n\tconst [type, scheme] = authenticateHeader.split(\" \");\n\tif (type?.toLowerCase() !== \"bearer\" || !scheme) return;\n\tconst match = /resource_metadata=\"([^\"]*)\"/.exec(authenticateHeader);\n\tif (!match || !match[1]) return;\n\ttry {\n\t\treturn new URL(match[1]);\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* Looks up {@link https://datatracker.ietf.org/doc/html/rfc9728 | RFC 9728}\n* OAuth 2.0 Protected Resource Metadata.\n*\n* If the server returns a 404 for the well-known endpoint, this function will\n* return `undefined`. Any other errors will be thrown as exceptions.\n*/\nasync function discoverOAuthProtectedResourceMetadata(serverUrl, opts, fetchFn = fetch) {\n\tconst response = await discoverMetadataWithFallback(serverUrl, \"oauth-protected-resource\", fetchFn, {\n\t\tprotocolVersion: opts?.protocolVersion,\n\t\tmetadataUrl: opts?.resourceMetadataUrl\n\t});\n\tif (!response || response.status === 404) {\n\t\tawait response?.text?.().catch(() => {});\n\t\tthrow new Error(`Resource server does not implement OAuth 2.0 Protected Resource Metadata.`);\n\t}\n\tif (!response.ok) {\n\t\tawait response.text?.().catch(() => {});\n\t\tthrow new Error(`HTTP ${response.status} trying to load well-known OAuth protected resource metadata.`);\n\t}\n\treturn OAuthProtectedResourceMetadataSchema.parse(await response.json());\n}\n/**\n* Fetch with a retry heuristic for CORS errors caused by custom headers.\n*\n* In browsers, adding a custom header (e.g. `MCP-Protocol-Version`) triggers a CORS preflight.\n* If the server doesn't allow that header, the browser throws a `TypeError` before any response\n* is received. Retrying without custom headers often succeeds because the request becomes\n* \"simple\" (no preflight). If the server sends no CORS headers at all, the retry also fails\n* with `TypeError` and we return `undefined` so callers can fall through to an alternate URL.\n*\n* However, `fetch()` also throws `TypeError` for non-CORS failures (DNS resolution, connection\n* refused, invalid URL). Swallowing those and returning `undefined` masks real errors and can\n* cause callers to silently fall through to a different discovery URL. CORS is a browser-only\n* concept, so in non-browser runtimes (Node.js, Workers) a `TypeError` from `fetch` is never a\n* CORS error — there we propagate the error instead of swallowing it.\n*\n* In browsers, we cannot reliably distinguish CORS `TypeError` from network `TypeError` from the\n* error object alone, so the swallow-and-fallthrough heuristic is preserved there.\n*/\nasync function fetchWithCorsRetry(url, headers, fetchFn = fetch) {\n\ttry {\n\t\treturn await fetchFn(url, { headers });\n\t} catch (error) {\n\t\tif (!(error instanceof TypeError) || !CORS_IS_POSSIBLE) throw error;\n\t\tif (headers) try {\n\t\t\treturn await fetchFn(url, {});\n\t\t} catch (retryError) {\n\t\t\tif (!(retryError instanceof TypeError)) throw retryError;\n\t\t\treturn;\n\t\t}\n\t\treturn;\n\t}\n}\n/**\n* Constructs the well-known path for auth-related metadata discovery\n*/\nfunction buildWellKnownPath(wellKnownPrefix, pathname = \"\", options = {}) {\n\tif (pathname.endsWith(\"/\")) pathname = pathname.slice(0, -1);\n\treturn options.prependPathname ? `${pathname}/.well-known/${wellKnownPrefix}` : `/.well-known/${wellKnownPrefix}${pathname}`;\n}\n/**\n* Tries to discover OAuth metadata at a specific URL\n*/\nasync function tryMetadataDiscovery(url, protocolVersion, fetchFn = fetch) {\n\treturn await fetchWithCorsRetry(url, { \"MCP-Protocol-Version\": protocolVersion }, fetchFn);\n}\n/**\n* Determines if fallback to root discovery should be attempted\n*/\nfunction shouldAttemptFallback(response, pathname) {\n\tif (!response) return true;\n\tif (pathname === \"/\") return false;\n\treturn response.status >= 400 && response.status < 500 || response.status === 502;\n}\n/**\n* Generic function for discovering OAuth metadata with fallback support\n*/\nasync function discoverMetadataWithFallback(serverUrl, wellKnownType, fetchFn, opts) {\n\tconst issuer = new URL(serverUrl);\n\tconst protocolVersion = opts?.protocolVersion ?? LATEST_PROTOCOL_VERSION;\n\tlet url;\n\tif (opts?.metadataUrl) url = new URL(opts.metadataUrl);\n\telse {\n\t\tconst wellKnownPath = buildWellKnownPath(wellKnownType, issuer.pathname);\n\t\turl = new URL(wellKnownPath, opts?.metadataServerUrl ?? issuer);\n\t\turl.search = issuer.search;\n\t}\n\tlet response = await tryMetadataDiscovery(url, protocolVersion, fetchFn);\n\tif (!opts?.metadataUrl && shouldAttemptFallback(response, issuer.pathname)) response = await tryMetadataDiscovery(new URL(`/.well-known/${wellKnownType}`, issuer), protocolVersion, fetchFn);\n\treturn response;\n}\n/**\n* Looks up RFC 8414 OAuth 2.0 Authorization Server Metadata.\n*\n* If the server returns a 404 for the well-known endpoint, this function will\n* return `undefined`. Any other errors will be thrown as exceptions.\n*\n* @deprecated This function is deprecated in favor of {@linkcode discoverAuthorizationServerMetadata}.\n*/\nasync function discoverOAuthMetadata(issuer, { authorizationServerUrl, protocolVersion } = {}, fetchFn = fetch) {\n\tif (typeof issuer === \"string\") issuer = new URL(issuer);\n\tif (!authorizationServerUrl) authorizationServerUrl = issuer;\n\tif (typeof authorizationServerUrl === \"string\") authorizationServerUrl = new URL(authorizationServerUrl);\n\tprotocolVersion ??= LATEST_PROTOCOL_VERSION;\n\tconst response = await discoverMetadataWithFallback(authorizationServerUrl, \"oauth-authorization-server\", fetchFn, {\n\t\tprotocolVersion,\n\t\tmetadataServerUrl: authorizationServerUrl\n\t});\n\tif (!response || response.status === 404) {\n\t\tawait response?.text?.().catch(() => {});\n\t\treturn;\n\t}\n\tif (!response.ok) {\n\t\tawait response.text?.().catch(() => {});\n\t\tthrow new Error(`HTTP ${response.status} trying to load well-known OAuth metadata`);\n\t}\n\treturn OAuthMetadataSchema.parse(await response.json());\n}\n/**\n* Builds a list of discovery URLs to try for authorization server metadata.\n* URLs are returned in priority order:\n* 1. OAuth metadata at the given URL\n* 2. OIDC metadata endpoints at the given URL\n*/\nfunction buildDiscoveryUrls(authorizationServerUrl) {\n\tconst url = typeof authorizationServerUrl === \"string\" ? new URL(authorizationServerUrl) : authorizationServerUrl;\n\tconst hasPath = url.pathname !== \"/\";\n\tconst urlsToTry = [];\n\tif (!hasPath) {\n\t\turlsToTry.push({\n\t\t\turl: new URL(\"/.well-known/oauth-authorization-server\", url.origin),\n\t\t\ttype: \"oauth\"\n\t\t}, {\n\t\t\turl: new URL(`/.well-known/openid-configuration`, url.origin),\n\t\t\ttype: \"oidc\"\n\t\t});\n\t\treturn urlsToTry;\n\t}\n\tlet pathname = url.pathname;\n\tif (pathname.endsWith(\"/\")) pathname = pathname.slice(0, -1);\n\turlsToTry.push({\n\t\turl: new URL(`/.well-known/oauth-authorization-server${pathname}`, url.origin),\n\t\ttype: \"oauth\"\n\t}, {\n\t\turl: new URL(`/.well-known/openid-configuration${pathname}`, url.origin),\n\t\ttype: \"oidc\"\n\t}, {\n\t\turl: new URL(`${pathname}/.well-known/openid-configuration`, url.origin),\n\t\ttype: \"oidc\"\n\t});\n\treturn urlsToTry;\n}\n/**\n* Discovers authorization server metadata with support for\n* {@link https://datatracker.ietf.org/doc/html/rfc8414 | RFC 8414} OAuth 2.0\n* Authorization Server Metadata and\n* {@link https://openid.net/specs/openid-connect-discovery-1_0.html | OpenID Connect Discovery 1.0}\n* specifications.\n*\n* This function implements a fallback strategy for authorization server discovery:\n* 1. Attempts RFC 8414 OAuth metadata discovery first\n* 2. If OAuth discovery fails, falls back to OpenID Connect Discovery\n*\n* @param authorizationServerUrl - The authorization server URL obtained from the MCP Server's\n* protected resource metadata, or the MCP server's URL if the\n* metadata was not found.\n* The returned metadata's `issuer` is validated against `authorizationServerUrl`\n* per RFC 8414 §3.3 (and OIDC Discovery §4.3): if they differ the metadata is\n* **rejected** with {@linkcode IssuerMismatchError} and not returned. Set\n* `skipIssuerValidation: true` to suppress this check — **security-weakening**,\n* intended only for known-misconfigured authorization servers.\n*\n* @param options - Configuration options\n* @param options.fetchFn - Optional fetch function for making HTTP requests, defaults to global fetch\n* @param options.protocolVersion - MCP protocol version to use, defaults to {@linkcode LATEST_PROTOCOL_VERSION}\n* @param options.skipIssuerValidation - Skip the RFC 8414 §3.3 `issuer` echo check. **Security-weakening.**\n* @returns Promise resolving to authorization server metadata, or undefined if discovery fails\n* @throws {IssuerMismatchError} when the metadata's `issuer` does not match `authorizationServerUrl`\n*/\nasync function discoverAuthorizationServerMetadata(authorizationServerUrl, { fetchFn = fetch, protocolVersion = LATEST_PROTOCOL_VERSION, skipIssuerValidation = false } = {}) {\n\tconst headers = {\n\t\t\"MCP-Protocol-Version\": protocolVersion,\n\t\tAccept: \"application/json\"\n\t};\n\tconst urlsToTry = buildDiscoveryUrls(authorizationServerUrl);\n\tfor (const { url: endpointUrl, type } of urlsToTry) {\n\t\tconst response = await fetchWithCorsRetry(endpointUrl, headers, fetchFn);\n\t\tif (!response)\n /**\n\t\t* CORS error occurred - don't throw as the endpoint may not allow CORS,\n\t\t* continue trying other possible endpoints\n\t\t*/\n\t\tcontinue;\n\t\tif (!response.ok) {\n\t\t\tawait response.text?.().catch(() => {});\n\t\t\tif (response.status >= 400 && response.status < 500 || response.status === 502) continue;\n\t\t\tthrow new Error(`HTTP ${response.status} trying to load ${type === \"oauth\" ? \"OAuth\" : \"OpenID provider\"} metadata from ${endpointUrl}`);\n\t\t}\n\t\tconst parsed = type === \"oauth\" ? OAuthMetadataSchema.parse(await response.json()) : OpenIdProviderDiscoveryMetadataSchema.parse(await response.json());\n\t\tif (!skipIssuerValidation) {\n\t\t\tconst expectedIssuer = typeof authorizationServerUrl === \"string\" ? authorizationServerUrl : authorizationServerUrl.href;\n\t\t\tif (!(parsed.issuer === expectedIssuer || expectedIssuer.endsWith(\"/\") && parsed.issuer === expectedIssuer.slice(0, -1))) throw new IssuerMismatchError(\"metadata\", expectedIssuer, parsed.issuer);\n\t\t}\n\t\treturn parsed;\n\t}\n}\n/**\n* Discovers the authorization server for an MCP server following\n* {@link https://datatracker.ietf.org/doc/html/rfc9728 | RFC 9728} (OAuth 2.0 Protected\n* Resource Metadata), with fallback to treating the server URL as the\n* authorization server.\n*\n* This function combines two discovery steps into one call:\n* 1. Probes `/.well-known/oauth-protected-resource` on the MCP server to find the\n* authorization server URL (RFC 9728).\n* 2. Fetches authorization server metadata from that URL (RFC 8414 / OpenID Connect Discovery).\n*\n* Use this when you need the authorization server metadata for operations outside the\n* {@linkcode auth} orchestrator, such as token refresh or token revocation.\n*\n* @param serverUrl - The MCP resource server URL\n* @param opts - Optional configuration\n* @param opts.resourceMetadataUrl - Override URL for the protected resource metadata endpoint\n* @param opts.fetchFn - Custom fetch function for HTTP requests\n* @returns Authorization server URL, metadata, and resource metadata (if available)\n*/\nasync function discoverOAuthServerInfo(serverUrl, opts) {\n\tlet resourceMetadata;\n\tlet authorizationServerUrl;\n\ttry {\n\t\tresourceMetadata = await discoverOAuthProtectedResourceMetadata(serverUrl, { resourceMetadataUrl: opts?.resourceMetadataUrl }, opts?.fetchFn);\n\t\tif (resourceMetadata.authorization_servers && resourceMetadata.authorization_servers.length > 0) authorizationServerUrl = resourceMetadata.authorization_servers[0];\n\t} catch (error) {\n\t\tif (error instanceof TypeError) throw error;\n\t}\n\tif (!authorizationServerUrl) authorizationServerUrl = String(new URL(\"/\", serverUrl));\n\tconst authorizationServerMetadata = await discoverAuthorizationServerMetadata(authorizationServerUrl, {\n\t\tfetchFn: opts?.fetchFn,\n\t\tskipIssuerValidation: opts?.skipIssuerMetadataValidation\n\t});\n\treturn {\n\t\tauthorizationServerUrl,\n\t\tauthorizationServerMetadata,\n\t\tresourceMetadata\n\t};\n}\n/**\n* Begins the authorization flow with the given server, by generating a PKCE challenge and constructing the authorization URL.\n*/\nasync function startAuthorization(authorizationServerUrl, { metadata, clientInformation, redirectUrl, scope, state, resource }) {\n\tlet authorizationUrl;\n\tif (metadata) {\n\t\tauthorizationUrl = new URL(metadata.authorization_endpoint);\n\t\tif (!metadata.response_types_supported.includes(AUTHORIZATION_CODE_RESPONSE_TYPE)) throw new Error(`Incompatible auth server: does not support response type ${AUTHORIZATION_CODE_RESPONSE_TYPE}`);\n\t\tif (metadata.code_challenge_methods_supported && !metadata.code_challenge_methods_supported.includes(AUTHORIZATION_CODE_CHALLENGE_METHOD)) throw new Error(`Incompatible auth server: does not support code challenge method ${AUTHORIZATION_CODE_CHALLENGE_METHOD}`);\n\t} else authorizationUrl = new URL(\"/authorize\", authorizationServerUrl);\n\tconst challenge = await pkceChallenge();\n\tconst codeVerifier = challenge.code_verifier;\n\tconst codeChallenge = challenge.code_challenge;\n\tauthorizationUrl.searchParams.set(\"response_type\", AUTHORIZATION_CODE_RESPONSE_TYPE);\n\tauthorizationUrl.searchParams.set(\"client_id\", clientInformation.client_id);\n\tauthorizationUrl.searchParams.set(\"code_challenge\", codeChallenge);\n\tauthorizationUrl.searchParams.set(\"code_challenge_method\", AUTHORIZATION_CODE_CHALLENGE_METHOD);\n\tauthorizationUrl.searchParams.set(\"redirect_uri\", String(redirectUrl));\n\tif (state) authorizationUrl.searchParams.set(\"state\", state);\n\tif (scope) authorizationUrl.searchParams.set(\"scope\", scope);\n\tif (scope?.split(\" \").includes(\"offline_access\")) authorizationUrl.searchParams.append(\"prompt\", \"consent\");\n\tif (resource) authorizationUrl.searchParams.set(\"resource\", resource.href);\n\treturn {\n\t\tauthorizationUrl,\n\t\tcodeVerifier\n\t};\n}\n/**\n* Prepares token request parameters for an authorization code exchange.\n*\n* This is the default implementation used by {@linkcode fetchToken} when the provider\n* doesn't implement {@linkcode OAuthClientProvider.prepareTokenRequest | prepareTokenRequest}.\n*\n* @param authorizationCode - The authorization code received from the authorization endpoint\n* @param codeVerifier - The PKCE code verifier\n* @param redirectUri - The redirect URI used in the authorization request\n* @returns URLSearchParams for the `authorization_code` grant\n*/\nfunction prepareAuthorizationCodeRequest(authorizationCode, codeVerifier, redirectUri) {\n\treturn new URLSearchParams({\n\t\tgrant_type: \"authorization_code\",\n\t\tcode: authorizationCode,\n\t\tcode_verifier: codeVerifier,\n\t\tredirect_uri: String(redirectUri)\n\t});\n}\n/**\n* Internal helper to execute a token request with the given parameters.\n* Used by {@linkcode exchangeAuthorization}, {@linkcode refreshAuthorization}, and {@linkcode fetchToken}.\n*/\nasync function executeTokenRequest(authorizationServerUrl, { metadata, tokenRequestParams, clientInformation, addClientAuthentication, resource, fetchFn }) {\n\tconst tokenUrl = assertSecureTokenEndpoint(metadata?.token_endpoint ?? new URL(\"/token\", authorizationServerUrl));\n\tconst headers = new Headers({\n\t\t\"Content-Type\": \"application/x-www-form-urlencoded\",\n\t\tAccept: \"application/json\"\n\t});\n\tif (resource) tokenRequestParams.set(\"resource\", resource.href);\n\tif (addClientAuthentication) await addClientAuthentication(headers, tokenRequestParams, tokenUrl, metadata);\n\telse if (clientInformation) applyClientAuthentication(selectClientAuthMethod(clientInformation, metadata?.token_endpoint_auth_methods_supported ?? []), clientInformation, headers, tokenRequestParams);\n\tconst response = await (fetchFn ?? fetch)(tokenUrl, {\n\t\tmethod: \"POST\",\n\t\theaders,\n\t\tbody: tokenRequestParams\n\t});\n\tif (!response.ok) throw await parseErrorResponse(response);\n\tconst json = await response.json();\n\ttry {\n\t\treturn OAuthTokensSchema.parse(json);\n\t} catch (parseError) {\n\t\tif (typeof json === \"object\" && json !== null && \"error\" in json) throw await parseErrorResponse(JSON.stringify(json));\n\t\tthrow parseError;\n\t}\n}\n/**\n* Exchanges an authorization code for an access token with the given server.\n*\n* Supports multiple client authentication methods as specified in OAuth 2.1:\n* - Automatically selects the best authentication method based on server support\n* - Falls back to appropriate defaults when server metadata is unavailable\n*\n* @param authorizationServerUrl - The authorization server's base URL\n* @param options - Configuration object containing client info, auth code, etc.\n* @returns Promise resolving to OAuth tokens\n* @throws {Error} When token exchange fails or authentication is invalid\n*/\nasync function exchangeAuthorization(authorizationServerUrl, { metadata, clientInformation, authorizationCode, iss, codeVerifier, redirectUri, resource, addClientAuthentication, fetchFn }) {\n\tvalidateAuthorizationResponseIssuer({\n\t\tiss,\n\t\texpectedIssuer: metadata?.issuer,\n\t\tissParameterSupported: isIssParameterSupported(metadata)\n\t});\n\treturn executeTokenRequest(authorizationServerUrl, {\n\t\tmetadata,\n\t\ttokenRequestParams: prepareAuthorizationCodeRequest(authorizationCode, codeVerifier, redirectUri),\n\t\tclientInformation,\n\t\taddClientAuthentication,\n\t\tresource,\n\t\tfetchFn\n\t});\n}\n/**\n* Exchange a refresh token for an updated access token.\n*\n* Supports multiple client authentication methods as specified in OAuth 2.1:\n* - Automatically selects the best authentication method based on server support\n* - Preserves the original refresh token if a new one is not returned\n*\n* @param authorizationServerUrl - The authorization server's base URL\n* @param options - Configuration object containing client info, refresh token, etc.\n* @returns Promise resolving to OAuth tokens (preserves original `refresh_token` if not replaced)\n* @throws {Error} When token refresh fails or authentication is invalid\n*/\nasync function refreshAuthorization(authorizationServerUrl, { metadata, clientInformation, refreshToken, resource, addClientAuthentication, fetchFn }) {\n\treturn {\n\t\trefresh_token: refreshToken,\n\t\t...await executeTokenRequest(authorizationServerUrl, {\n\t\t\tmetadata,\n\t\t\ttokenRequestParams: new URLSearchParams({\n\t\t\t\tgrant_type: \"refresh_token\",\n\t\t\t\trefresh_token: refreshToken\n\t\t\t}),\n\t\t\tclientInformation,\n\t\t\taddClientAuthentication,\n\t\t\tresource,\n\t\t\tfetchFn\n\t\t})\n\t};\n}\n/**\n* Unified token fetching that works with any grant type via {@linkcode OAuthClientProvider.prepareTokenRequest | prepareTokenRequest()}.\n*\n* This function provides a single entry point for obtaining tokens regardless of the\n* OAuth grant type. The provider's `prepareTokenRequest()` method determines which grant\n* to use and supplies the grant-specific parameters.\n*\n* @param provider - OAuth client provider that implements `prepareTokenRequest()`\n* @param authorizationServerUrl - The authorization server's base URL\n* @param options - Configuration for the token request\n* @returns Promise resolving to OAuth tokens\n* @throws {Error} When provider doesn't implement `prepareTokenRequest` or token fetch fails\n*\n* @example\n* ```ts source=\"./auth.examples.ts#fetchToken_clientCredentials\"\n* // Provider for client_credentials:\n* class MyProvider extends MyProviderBase implements OAuthClientProvider {\n* prepareTokenRequest(scope?: string) {\n* const params = new URLSearchParams({ grant_type: 'client_credentials' });\n* if (scope) params.set('scope', scope);\n* return params;\n* }\n* }\n*\n* const tokens = await fetchToken(new MyProvider(), authServerUrl, { metadata });\n* ```\n*/\nasync function fetchToken(provider, authorizationServerUrl, { metadata, resource, authorizationCode, iss, scope, fetchFn } = {}) {\n\tif (authorizationCode !== void 0) validateAuthorizationResponseIssuer({\n\t\tiss,\n\t\texpectedIssuer: metadata?.issuer,\n\t\tissParameterSupported: isIssParameterSupported(metadata)\n\t});\n\tconst effectiveScope = scope ?? provider.clientMetadata.scope;\n\tlet tokenRequestParams;\n\tif (provider.prepareTokenRequest) tokenRequestParams = await provider.prepareTokenRequest(effectiveScope);\n\tif (!tokenRequestParams) {\n\t\tif (!authorizationCode) throw new Error(\"Either provider.prepareTokenRequest() or authorizationCode is required\");\n\t\tif (!provider.redirectUrl) throw new Error(\"redirectUrl is required for authorization_code flow\");\n\t\ttokenRequestParams = prepareAuthorizationCodeRequest(authorizationCode, await provider.codeVerifier(), provider.redirectUrl);\n\t}\n\tconst clientInformation = await provider.clientInformation({ issuer: metadata?.issuer ?? String(authorizationServerUrl) });\n\treturn executeTokenRequest(authorizationServerUrl, {\n\t\tmetadata,\n\t\ttokenRequestParams,\n\t\tclientInformation: clientInformation ?? void 0,\n\t\taddClientAuthentication: provider.addClientAuthentication,\n\t\tresource,\n\t\tfetchFn\n\t});\n}\n/**\n* Performs OAuth 2.0 Dynamic Client Registration according to\n* {@link https://datatracker.ietf.org/doc/html/rfc7591 | RFC 7591}.\n*\n* If `scope` is provided, it overrides `clientMetadata.scope` in the registration\n* request body. This allows callers to apply the Scope Selection Strategy (SEP-835)\n* consistently across both DCR and the subsequent authorization request.\n*\n* @deprecated Dynamic Client Registration is deprecated as of protocol version\n* 2026-07-28 (SEP-2577) in favor of Client ID Metadata Documents (SEP-991).\n* Remains functional during the deprecation window (at least twelve months).\n* Prefer a CIMD URL `client_id` when the authorization server advertises\n* `client_id_metadata_document_supported`; the SDK already gates on this for you.\n*/\nasync function registerClient(authorizationServerUrl, { metadata, clientMetadata, scope, fetchFn }) {\n\tlet registrationUrl;\n\tif (metadata) {\n\t\tif (!metadata.registration_endpoint) throw new Error(\"Incompatible auth server: does not support dynamic client registration\");\n\t\tregistrationUrl = new URL(metadata.registration_endpoint);\n\t} else registrationUrl = new URL(\"/register\", authorizationServerUrl);\n\tconst submittedMetadata = {\n\t\t...clientMetadata,\n\t\t...scope === void 0 ? {} : { scope }\n\t};\n\tconst response = await (fetchFn ?? fetch)(registrationUrl, {\n\t\tmethod: \"POST\",\n\t\theaders: { \"Content-Type\": \"application/json\" },\n\t\tbody: JSON.stringify(submittedMetadata)\n\t});\n\tif (!response.ok) throw new RegistrationRejectedError({\n\t\tstatus: response.status,\n\t\tbody: await response.text(),\n\t\tsubmittedMetadata\n\t});\n\treturn OAuthClientInformationFullSchema.parse(await response.json());\n}\n\n//#endregion\n//#region src/client/authExtensions.ts\n/**\n* Helper to produce a `private_key_jwt` client authentication function.\n*\n* @example\n* ```ts source=\"./authExtensions.examples.ts#createPrivateKeyJwtAuth_basicUsage\"\n* const addClientAuth = createPrivateKeyJwtAuth({\n* issuer: 'my-client',\n* subject: 'my-client',\n* privateKey: pemEncodedPrivateKey,\n* alg: 'RS256'\n* });\n* // pass addClientAuth as provider.addClientAuthentication implementation\n* ```\n*/\nfunction createPrivateKeyJwtAuth(options) {\n\treturn async (_headers, params, url, metadata) => {\n\t\tif (globalThis.crypto === void 0) throw new TypeError(\"crypto is not available, please ensure you have Web Crypto API support for older Node.js versions (see https://github.com/modelcontextprotocol/typescript-sdk#nodejs-web-crypto-globalthiscrypto-compatibility)\");\n\t\tconst jose = await import(\"jose\");\n\t\tconst audience = String(options.audience ?? metadata?.issuer ?? url);\n\t\tconst lifetimeSeconds = options.lifetimeSeconds ?? 300;\n\t\tconst now = Math.floor(Date.now() / 1e3);\n\t\tconst jti = `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n\t\tconst baseClaims = {\n\t\t\tiss: options.issuer,\n\t\t\tsub: options.subject,\n\t\t\taud: audience,\n\t\t\texp: now + lifetimeSeconds,\n\t\t\tiat: now,\n\t\t\tjti\n\t\t};\n\t\tconst claims = options.claims ? {\n\t\t\t...baseClaims,\n\t\t\t...options.claims\n\t\t} : baseClaims;\n\t\tconst alg = options.alg;\n\t\tlet key;\n\t\tif (typeof options.privateKey === \"string\") if (alg.startsWith(\"RS\") || alg.startsWith(\"ES\") || alg.startsWith(\"PS\")) key = await jose.importPKCS8(options.privateKey, alg);\n\t\telse if (alg.startsWith(\"HS\")) key = new TextEncoder().encode(options.privateKey);\n\t\telse throw new Error(`Unsupported algorithm ${alg}`);\n\t\telse if (options.privateKey instanceof Uint8Array) key = alg.startsWith(\"HS\") ? options.privateKey : await jose.importPKCS8(new TextDecoder().decode(options.privateKey), alg);\n\t\telse key = await jose.importJWK(options.privateKey, alg);\n\t\tconst assertion = await new jose.SignJWT(claims).setProtectedHeader({\n\t\t\talg,\n\t\t\ttyp: \"JWT\"\n\t\t}).setIssuer(options.issuer).setSubject(options.subject).setAudience(audience).setIssuedAt(now).setExpirationTime(now + lifetimeSeconds).setJti(jti).sign(key);\n\t\tparams.set(\"client_assertion\", assertion);\n\t\tparams.set(\"client_assertion_type\", \"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\");\n\t};\n}\n/**\n* OAuth provider for `client_credentials` grant with `client_secret_basic` authentication.\n*\n* This provider is designed for machine-to-machine authentication where\n* the client authenticates using a `client_id` and `client_secret`.\n*\n* @example\n* ```ts source=\"./authExtensions.examples.ts#ClientCredentialsProvider_basicUsage\"\n* const provider = new ClientCredentialsProvider({\n* clientId: 'my-client',\n* clientSecret: 'my-secret'\n* });\n*\n* const transport = new StreamableHTTPClientTransport(serverUrl, {\n* authProvider: provider\n* });\n* ```\n*/\nvar ClientCredentialsProvider = class {\n\t_tokens;\n\t_clientInfo;\n\t_clientMetadata;\n\tconstructor(options) {\n\t\tthis._clientInfo = {\n\t\t\tclient_id: options.clientId,\n\t\t\tclient_secret: options.clientSecret,\n\t\t\tissuer: options.expectedIssuer\n\t\t};\n\t\tthis._clientMetadata = {\n\t\t\tclient_name: options.clientName ?? \"client-credentials-client\",\n\t\t\tredirect_uris: [],\n\t\t\tgrant_types: [\"client_credentials\"],\n\t\t\ttoken_endpoint_auth_method: \"client_secret_basic\",\n\t\t\tscope: options.scope\n\t\t};\n\t}\n\tget redirectUrl() {}\n\tget clientMetadata() {\n\t\treturn this._clientMetadata;\n\t}\n\tclientInformation() {\n\t\treturn this._clientInfo;\n\t}\n\ttokens() {\n\t\treturn this._tokens;\n\t}\n\tsaveTokens(tokens) {\n\t\tthis._tokens = tokens;\n\t}\n\tredirectToAuthorization() {\n\t\tthrow new Error(\"redirectToAuthorization is not used for client_credentials flow\");\n\t}\n\tsaveCodeVerifier() {}\n\tcodeVerifier() {\n\t\tthrow new Error(\"codeVerifier is not used for client_credentials flow\");\n\t}\n\tprepareTokenRequest(scope) {\n\t\tconst params = new URLSearchParams({ grant_type: \"client_credentials\" });\n\t\tif (scope) params.set(\"scope\", scope);\n\t\treturn params;\n\t}\n};\n/**\n* OAuth provider for `client_credentials` grant with `private_key_jwt` authentication.\n*\n* This provider is designed for machine-to-machine authentication where\n* the client authenticates using a signed JWT assertion\n* ({@link https://datatracker.ietf.org/doc/html/rfc7523#section-2.2 | RFC 7523 Section 2.2}).\n*\n* @example\n* ```ts source=\"./authExtensions.examples.ts#PrivateKeyJwtProvider_basicUsage\"\n* const provider = new PrivateKeyJwtProvider({\n* clientId: 'my-client',\n* privateKey: pemEncodedPrivateKey,\n* algorithm: 'RS256'\n* });\n*\n* const transport = new StreamableHTTPClientTransport(serverUrl, {\n* authProvider: provider\n* });\n* ```\n*/\nvar PrivateKeyJwtProvider = class {\n\t_tokens;\n\t_clientInfo;\n\t_clientMetadata;\n\taddClientAuthentication;\n\tconstructor(options) {\n\t\tthis._clientInfo = {\n\t\t\tclient_id: options.clientId,\n\t\t\tissuer: options.expectedIssuer\n\t\t};\n\t\tthis._clientMetadata = {\n\t\t\tclient_name: options.clientName ?? \"private-key-jwt-client\",\n\t\t\tredirect_uris: [],\n\t\t\tgrant_types: [\"client_credentials\"],\n\t\t\ttoken_endpoint_auth_method: \"private_key_jwt\",\n\t\t\tscope: options.scope\n\t\t};\n\t\tthis.addClientAuthentication = createPrivateKeyJwtAuth({\n\t\t\tissuer: options.clientId,\n\t\t\tsubject: options.clientId,\n\t\t\tprivateKey: options.privateKey,\n\t\t\talg: options.algorithm,\n\t\t\tlifetimeSeconds: options.jwtLifetimeSeconds,\n\t\t\tclaims: options.claims\n\t\t});\n\t}\n\tget redirectUrl() {}\n\tget clientMetadata() {\n\t\treturn this._clientMetadata;\n\t}\n\tclientInformation() {\n\t\treturn this._clientInfo;\n\t}\n\ttokens() {\n\t\treturn this._tokens;\n\t}\n\tsaveTokens(tokens) {\n\t\tthis._tokens = tokens;\n\t}\n\tredirectToAuthorization() {\n\t\tthrow new Error(\"redirectToAuthorization is not used for client_credentials flow\");\n\t}\n\tsaveCodeVerifier() {}\n\tcodeVerifier() {\n\t\tthrow new Error(\"codeVerifier is not used for client_credentials flow\");\n\t}\n\tprepareTokenRequest(scope) {\n\t\tconst params = new URLSearchParams({ grant_type: \"client_credentials\" });\n\t\tif (scope) params.set(\"scope\", scope);\n\t\treturn params;\n\t}\n};\n/**\n* OAuth provider for `client_credentials` grant with a static `private_key_jwt` assertion.\n*\n* This provider mirrors {@linkcode PrivateKeyJwtProvider} but instead of constructing and\n* signing a JWT on each request, it accepts a pre-built JWT assertion string and\n* uses it directly for authentication.\n*/\nvar StaticPrivateKeyJwtProvider = class {\n\t_tokens;\n\t_clientInfo;\n\t_clientMetadata;\n\taddClientAuthentication;\n\tconstructor(options) {\n\t\tthis._clientInfo = {\n\t\t\tclient_id: options.clientId,\n\t\t\tissuer: options.expectedIssuer\n\t\t};\n\t\tthis._clientMetadata = {\n\t\t\tclient_name: options.clientName ?? \"static-private-key-jwt-client\",\n\t\t\tredirect_uris: [],\n\t\t\tgrant_types: [\"client_credentials\"],\n\t\t\ttoken_endpoint_auth_method: \"private_key_jwt\",\n\t\t\tscope: options.scope\n\t\t};\n\t\tconst assertion = options.jwtBearerAssertion;\n\t\tthis.addClientAuthentication = async (_headers, params) => {\n\t\t\tparams.set(\"client_assertion\", assertion);\n\t\t\tparams.set(\"client_assertion_type\", \"urn:ietf:params:oauth:client-assertion-type:jwt-bearer\");\n\t\t};\n\t}\n\tget redirectUrl() {}\n\tget clientMetadata() {\n\t\treturn this._clientMetadata;\n\t}\n\tclientInformation() {\n\t\treturn this._clientInfo;\n\t}\n\ttokens() {\n\t\treturn this._tokens;\n\t}\n\tsaveTokens(tokens) {\n\t\tthis._tokens = tokens;\n\t}\n\tredirectToAuthorization() {\n\t\tthrow new Error(\"redirectToAuthorization is not used for client_credentials flow\");\n\t}\n\tsaveCodeVerifier() {}\n\tcodeVerifier() {\n\t\tthrow new Error(\"codeVerifier is not used for client_credentials flow\");\n\t}\n\tprepareTokenRequest(scope) {\n\t\tconst params = new URLSearchParams({ grant_type: \"client_credentials\" });\n\t\tif (scope) params.set(\"scope\", scope);\n\t\treturn params;\n\t}\n};\n/**\n* OAuth provider for Cross-App Access (Enterprise Managed Authorization) using JWT Authorization Grant.\n*\n* This provider implements the Enterprise Managed Authorization flow (SEP-990) where:\n* 1. User authenticates with an enterprise IdP and the client obtains an ID Token\n* 2. Client exchanges the ID Token for a JWT Authorization Grant (ID-JAG) via RFC 8693 token exchange\n* 3. Client uses the JAG to obtain an access token from the MCP server via RFC 7523 JWT bearer grant\n*\n* The provider handles steps 2-3 automatically, with the JAG acquisition delegated to\n* a callback function that you provide. This allows flexibility in how you obtain and\n* cache ID Tokens from the IdP.\n*\n* @see https://github.com/modelcontextprotocol/ext-auth/blob/main/specification/stable/enterprise-managed-authorization.mdx\n*\n* @example\n* ```ts\n* const provider = new CrossAppAccessProvider({\n* assertion: async (ctx) => {\n* const result = await discoverAndRequestJwtAuthGrant({\n* idpUrl: 'https://idp.example.com',\n* audience: ctx.authorizationServerUrl,\n* resource: ctx.resourceUrl,\n* idToken: await getIdToken(), // Your function to get ID token\n* clientId: 'my-idp-client',\n* clientSecret: 'my-idp-secret',\n* scope: ctx.scope,\n* fetchFn: ctx.fetchFn\n* });\n* return result.jwtAuthGrant;\n* },\n* clientId: 'my-mcp-client',\n* clientSecret: 'my-mcp-secret'\n* });\n*\n* const transport = new StreamableHTTPClientTransport(serverUrl, {\n* authProvider: provider\n* });\n* ```\n*/\nvar CrossAppAccessProvider = class {\n\t_tokens;\n\t_clientInfo;\n\t_clientMetadata;\n\t_assertionCallback;\n\t_fetchFn;\n\t_authorizationServerUrl;\n\t_resourceUrl;\n\t_scope;\n\tconstructor(options) {\n\t\tthis._clientInfo = {\n\t\t\tclient_id: options.clientId,\n\t\t\tclient_secret: options.clientSecret,\n\t\t\tissuer: options.expectedIssuer\n\t\t};\n\t\tthis._clientMetadata = {\n\t\t\tclient_name: options.clientName ?? \"cross-app-access-client\",\n\t\t\tredirect_uris: [],\n\t\t\tgrant_types: [\"urn:ietf:params:oauth:grant-type:jwt-bearer\"],\n\t\t\ttoken_endpoint_auth_method: \"client_secret_basic\"\n\t\t};\n\t\tthis._assertionCallback = options.assertion;\n\t\tthis._fetchFn = options.fetchFn ?? fetch;\n\t}\n\tget redirectUrl() {}\n\tget clientMetadata() {\n\t\treturn this._clientMetadata;\n\t}\n\tclientInformation() {\n\t\treturn this._clientInfo;\n\t}\n\ttokens() {\n\t\treturn this._tokens;\n\t}\n\tsaveTokens(tokens) {\n\t\tthis._tokens = tokens;\n\t}\n\tredirectToAuthorization() {\n\t\tthrow new Error(\"redirectToAuthorization is not used for jwt-bearer flow\");\n\t}\n\tsaveCodeVerifier() {}\n\tcodeVerifier() {\n\t\tthrow new Error(\"codeVerifier is not used for jwt-bearer flow\");\n\t}\n\t/**\n\t* Saves the authorization server URL discovered during OAuth flow.\n\t* This is called by the auth() function after RFC 9728 discovery.\n\t*/\n\tsaveAuthorizationServerUrl(authorizationServerUrl) {\n\t\tthis._authorizationServerUrl = authorizationServerUrl;\n\t}\n\t/**\n\t* Returns the cached authorization server URL if available.\n\t*/\n\tauthorizationServerUrl() {\n\t\treturn this._authorizationServerUrl;\n\t}\n\t/**\n\t* Saves the resource URL discovered during OAuth flow.\n\t* This is called by the auth() function after RFC 9728 discovery.\n\t*/\n\tsaveResourceUrl(resourceUrl) {\n\t\tthis._resourceUrl = resourceUrl;\n\t}\n\t/**\n\t* Returns the cached resource URL if available.\n\t*/\n\tresourceUrl() {\n\t\treturn this._resourceUrl;\n\t}\n\tasync prepareTokenRequest(scope) {\n\t\tconst authServerUrl = this._authorizationServerUrl;\n\t\tconst resourceUrl = this._resourceUrl;\n\t\tif (!authServerUrl) throw new Error(\"Authorization server URL not available. Ensure auth() has been called first.\");\n\t\tif (!resourceUrl) throw new Error(\"Resource URL not available — server may not implement RFC 9728 Protected Resource Metadata (required for Cross-App Access), or auth() has not been called\");\n\t\tthis._scope = scope;\n\t\tconst jwtAuthGrant = await this._assertionCallback({\n\t\t\tauthorizationServerUrl: authServerUrl,\n\t\t\tresourceUrl,\n\t\t\tscope: this._scope,\n\t\t\tfetchFn: this._fetchFn\n\t\t});\n\t\tconst params = new URLSearchParams({\n\t\t\tgrant_type: \"urn:ietf:params:oauth:grant-type:jwt-bearer\",\n\t\t\tassertion: jwtAuthGrant\n\t\t});\n\t\tif (scope) params.set(\"scope\", scope);\n\t\treturn params;\n\t}\n};\n\n//#endregion\n//#region src/client/responseCache.ts\n/**\n* Methods whose entries are exempt from the\n* {@linkcode InMemoryResponseCacheStoreOptions.maxEntries} cap. Each holds at\n* most one entry per partition (a small bounded set) and the\n* `tools/list`-derived index depends on its entry surviving regardless of the\n* `resources/read` working-set size. Only `resources/read` keys count toward\n* the cap and are eligible for FIFO eviction.\n*/\nconst CAP_EXEMPT_METHODS = new Set([\n\t\"tools/list\",\n\t\"prompts/list\",\n\t\"resources/list\",\n\t\"resources/templates/list\",\n\t\"server/discover\"\n]);\n/**\n* In-memory default. Bounded by an insertion-ordered size cap (default `512`;\n* see {@linkcode InMemoryResponseCacheStoreOptions.maxEntries}) on the\n* `resources/read` keyspace so an unbounded stream of distinct URIs cannot\n* grow it without limit; the list-singleton methods are exempt and never\n* evicted by the cap. `Map` preserves insertion order, so the oldest live\n* capped key is the first matching iteration entry.\n*/\nvar InMemoryResponseCacheStore = class {\n\t_entries = /* @__PURE__ */ new Map();\n\t_maxEntries;\n\t_stamp = 0;\n\t/** Count of held entries that are subject to the cap (i.e. not in {@linkcode CAP_EXEMPT_METHODS}). */\n\t_cappedSize = 0;\n\tconstructor(options) {\n\t\tthis._maxEntries = options?.maxEntries ?? 512;\n\t}\n\t/** Number of held entries (for diagnostics / bounding tests). */\n\tget size() {\n\t\treturn this._entries.size;\n\t}\n\tget(key) {\n\t\treturn this._entries.get(keyOf(key));\n\t}\n\tset(key, entry) {\n\t\tconst k = keyOf(key);\n\t\tconst exempt = CAP_EXEMPT_METHODS.has(key.method);\n\t\tconst isNew = !this._entries.has(k);\n\t\tif (!exempt && isNew && this._maxEntries > 0 && this._cappedSize >= this._maxEntries) {\n\t\t\tfor (const oldKey of this._entries.keys()) if (!CAP_EXEMPT_METHODS.has(oldKey.slice(0, oldKey.indexOf(\"\\0\")))) {\n\t\t\t\tthis._entries.delete(oldKey);\n\t\t\t\tthis._cappedSize--;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tconst stamp = ++this._stamp;\n\t\tthis._entries.set(k, {\n\t\t\t...entry,\n\t\t\tstamp\n\t\t});\n\t\tif (isNew && !exempt) this._cappedSize++;\n\t\treturn stamp;\n\t}\n\tdelete(key) {\n\t\tif (this._entries.delete(keyOf(key)) && !CAP_EXEMPT_METHODS.has(key.method)) this._cappedSize--;\n\t}\n\tevict(method) {\n\t\tconst prefix = `${method}\\0`;\n\t\tconst exempt = CAP_EXEMPT_METHODS.has(method);\n\t\tfor (const k of this._entries.keys()) if (k.startsWith(prefix)) {\n\t\t\tthis._entries.delete(k);\n\t\t\tif (!exempt) this._cappedSize--;\n\t\t}\n\t}\n\tclear() {\n\t\tthis._entries.clear();\n\t\tthis._cappedSize = 0;\n\t}\n};\n/**\n* Serialize a {@linkcode CacheKey} for the in-memory map. `method` is always\n* an SDK-set MCP method string (never contains a NUL), so the `\\0` prefix\n* delimiter is safe and lets {@linkcode InMemoryResponseCacheStore.evict} do a\n* cheap prefix scan. `partition` (already a JSON-encoded\n* `[serverIdentity, principal]` pair) and `params` (a resource URI on the\n* `resources/read` path — caller-controlled) are JSON-array-encoded together,\n* which is collision-free regardless of any NUL or delimiter characters they\n* carry.\n*/\nfunction keyOf(key) {\n\treturn `${key.method}\\0${JSON.stringify([key.partition ?? \"\", key.params ?? \"\"])}`;\n}\n/**\n* Serialize a `{method, params}` pair for the eviction-generation map. The\n* list singletons key on `method` alone (their {@linkcode ClientResponseCache.evict}\n* is whole-method); `resources/read` keys on `` `${method}\\0${uri}` `` so\n* {@linkcode ClientResponseCache.evictKey} bumps a per-URI counter.\n*/\nfunction genKey(method, params) {\n\treturn params === void 0 ? method : `${method}\\0${params}`;\n}\n/**\n* Upper bound on the server-supplied `ttlMs` honoured by\n* {@linkcode ClientResponseCache} (24h). A server cannot pin an entry\n* indefinitely.\n*/\nconst MAX_CACHE_TTL_MS = 864e5;\n/**\n* The `Client`'s cache-coordination collaborator.\n*\n* Owns the per-connection cache state that used to live as five private\n* fields on `Client` — the backing {@linkcode ResponseCacheStore}, the\n* per-method eviction-generation counter, the user-supplied/default flag, and\n* the stamp-memoized derived indices over the `tools/list` entry. `Client`\n* holds exactly one instance and never reaches past it to the store.\n*\n* Not exported from the package index — internal to the client package.\n*\n* @internal\n*/\nvar ClientResponseCache = class {\n\t/**\n\t* Per-logical-key eviction-generation counter. {@linkcode evict} (whole\n\t* method) and {@linkcode evictKey} (single `{method, params}`) bump it\n\t* before touching the store; {@linkcode captureGeneration} reads it before\n\t* the request; {@linkcode write} skips when it moved — so a `list_changed`\n\t* arriving mid-walk, or a `resources/updated` arriving while a\n\t* `readResource()` for the same URI is in flight, is not overwritten by\n\t* the in-flight request's stale write. The map key is `method` for the\n\t* list singletons and `` `${method}\\0${params}` `` for per-URI keys.\n\t*\n\t* Growth is bounded by keys the CLIENT has issued a `captureGeneration`\n\t* for: {@linkcode captureGeneration} records the key (so an interleaved\n\t* {@linkcode evictKey} sees there is an in-flight write to suppress);\n\t* {@linkcode evictKey} only bumps a key that is already recorded — a\n\t* server streaming `notifications/resources/updated` for URIs the client\n\t* has never read therefore cannot grow this map.\n\t*/\n\t_evictionGeneration = /* @__PURE__ */ new Map();\n\t/**\n\t* `name → Tool` index derived from the cached `tools/list` entry, memoized\n\t* against the entry's `stamp` so it re-derives only when the backing entry\n\t* changes (mcp.d's `cachedTool` pattern).\n\t*/\n\t_toolIndex;\n\t/**\n\t* `name → compiled output-schema validator` derived from the cached\n\t* `tools/list` entry; same stamp-keyed memoization as `_toolIndex`. Typed\n\t* `unknown` so this class stays free of any validator-provider dependency\n\t* — the compile callback supplied to {@linkcode outputValidator} owns the\n\t* concrete type.\n\t*/\n\t_toolOutputValidatorIndex;\n\t/**\n\t* The connected server's identity (`serverInfo.name@version`, the\n\t* transport's `sessionId`, or a client-generated per-connection\n\t* surrogate). Set by the `Client` immediately after a successful connect;\n\t* `''` is the pre-connect sentinel. Every storage partition is derived\n\t* from this (see `_partitionFor`), so two clients sharing one store but\n\t* connected to different servers never collide on `tools/list` and a\n\t* server cannot read another server's `'public'` entries.\n\t*/\n\t_serverIdentity = \"\";\n\tconstructor(_store, _isUserSupplied, _reportError = () => {}, _cachePartition = \"\", _now = Date.now) {\n\t\tthis._store = _store;\n\t\tthis._isUserSupplied = _isUserSupplied;\n\t\tthis._reportError = _reportError;\n\t\tthis._cachePartition = _cachePartition;\n\t\tthis._now = _now;\n\t}\n\t/** The clock used for every freshness computation and check. */\n\tnow() {\n\t\treturn this._now();\n\t}\n\t/**\n\t* Record the connected server's identity. Called by `Client` immediately\n\t* after a successful connect: `serverInfo.name@version` when the server\n\t* identified itself, else the transport's `sessionId`, else a\n\t* client-generated per-connection surrogate (`serverInfo` is a spec\n\t* SHOULD on 2026-07-28, so anonymous servers exist). Surrogate-keyed\n\t* partitions are NOT stable across reconnects — no identity means no\n\t* cross-connection cache reuse, and a shared long-lived store should\n\t* bound its own size accordingly. Every partition derived after this\n\t* call is scoped to this identity; entries written under the pre-connect\n\t* `''` sentinel are no longer reachable.\n\t*/\n\tsetServerIdentity(identity) {\n\t\tthis._serverIdentity = identity;\n\t}\n\t/**\n\t* Derive the storage partition for `scope`. The encoding is\n\t* `JSON.stringify([serverIdentity, principal])` — JSON escaping makes it\n\t* collision-free by construction: a malicious server cannot craft a\n\t* `serverInfo.name`/`version` whose concatenated form bleeds into another\n\t* server's namespace or another principal's slot, regardless of `@` / `|`\n\t* / `\"` / NUL in the server-controlled strings. `'public'` →\n\t* `[serverIdentity, '']` (shared within this server); `'private'` →\n\t* `[serverIdentity, cachePartition]`. When `cachePartition` is `''` the\n\t* two coincide.\n\t*/\n\t_partitionFor(scope) {\n\t\treturn JSON.stringify([this._serverIdentity, scope === \"public\" ? \"\" : this._cachePartition]);\n\t}\n\t/**\n\t* Two-probe lookup: this client's own (private) partition first, then the\n\t* connected server's shared (public) partition. The shared probe is gated\n\t* on `entry.scope === 'public'` — a co-tenant client that omits\n\t* `cachePartition` writes its `'private'`-scoped entries at the public\n\t* partition, and serving those to a correctly-partitioned client would\n\t* leak private bodies (mcp.d's `cachedEntry` two-probe order; the scope\n\t* gate is defence-in-depth on top of the partition split). When\n\t* `cachePartition` is `''` the two partitions are identical and only one\n\t* probe is issued.\n\t*/\n\tasync _probe(method, params) {\n\t\tconst key = {\n\t\t\tmethod,\n\t\t\tparams: params ?? \"\"\n\t\t};\n\t\tconst ownPartition = this._partitionFor(\"private\");\n\t\tconst own = await this._store.get({\n\t\t\t...key,\n\t\t\tpartition: ownPartition\n\t\t});\n\t\tif (own !== void 0) return own;\n\t\tconst sharedPartition = this._partitionFor(\"public\");\n\t\tif (sharedPartition === ownPartition) return void 0;\n\t\tconst shared = await this._store.get({\n\t\t\t...key,\n\t\t\tpartition: sharedPartition\n\t\t});\n\t\treturn shared?.scope === \"public\" ? shared : void 0;\n\t}\n\t/**\n\t* Bump the per-method generation (so an in-flight {@linkcode write} for the\n\t* same method becomes a no-op) and drop the connected server's two list\n\t* singletons (own + shared partition; `params: ''`). The generation bump\n\t* is unconditional and FIRST — the {@linkcode write} race guard relies on\n\t* the bump, not on the store's deletes completing.\n\t*\n\t* Eviction is scoped to this client's `[serverIdentity, principal]`\n\t* partitions (mirroring {@linkcode evictKey}) — the method-wide\n\t* `store.evict()` is NOT called, so on a shared store one server's\n\t* `list_changed` cannot wipe a co-tenant's entry. A custom store's\n\t* `delete()` may throw or reject; each partition is guarded\n\t* independently so a failure on one does not skip the other, the failure\n\t* is reported via the constructor's sink, and the call resolves so\n\t* dispatch proceeds.\n\t*/\n\tasync evict(method) {\n\t\tthis._evictionGeneration.set(method, (this._evictionGeneration.get(method) ?? 0) + 1);\n\t\tawait this._deleteBoth(method, \"\");\n\t}\n\t/**\n\t* Guarded two-partition delete of `{method, params}`: each partition's\n\t* `delete` is independently wrapped so a custom store's failure on one is\n\t* reported and does not skip the other, and the call always resolves.\n\t*/\n\tasync _deleteBoth(method, params) {\n\t\tconst ownPartition = this._partitionFor(\"private\");\n\t\tconst sharedPartition = this._partitionFor(\"public\");\n\t\ttry {\n\t\t\tawait this._store.delete({\n\t\t\t\tmethod,\n\t\t\t\tparams,\n\t\t\t\tpartition: ownPartition\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthis._reportError(error);\n\t\t}\n\t\tif (sharedPartition !== ownPartition) try {\n\t\t\tawait this._store.delete({\n\t\t\t\tmethod,\n\t\t\t\tparams,\n\t\t\t\tpartition: sharedPartition\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthis._reportError(error);\n\t\t}\n\t}\n\t/**\n\t* Drop the single logical entry `{method, params}` from BOTH the private\n\t* and public partitions for this client's connected server (mcp.d's\n\t* `invalidateLogical`). Used for `notifications/resources/updated`'s\n\t* per-URI eviction. The per-key generation is bumped FIRST (so an\n\t* in-flight {@linkcode write} for the same `{method, params}` becomes a\n\t* no-op and cannot re-cache the now-stale body) but only when the key was\n\t* already recorded by {@linkcode captureGeneration} — bounding the map to\n\t* keys the client has actually read. A custom store's `delete()` may\n\t* throw or reject; each partition's delete is guarded independently so a\n\t* failure on one does not skip the other, and the call resolves so\n\t* dispatch proceeds.\n\t*/\n\tasync evictKey(method, params) {\n\t\tconst gk = genKey(method, params);\n\t\tconst current = this._evictionGeneration.get(gk);\n\t\tif (current !== void 0) this._evictionGeneration.set(gk, current + 1);\n\t\tawait this._deleteBoth(method, params);\n\t}\n\t/**\n\t* Snapshot the eviction generation for `{method, params}` before issuing\n\t* the request (a list walk's page 1, or a `resources/read` for `params`).\n\t* Records the key so an interleaved {@linkcode evictKey} for the same\n\t* `{method, params}` knows there is an in-flight write to suppress and\n\t* bumps; without the record, `evictKey`'s recorded-only bump would skip\n\t* and the stale body would be cached.\n\t*/\n\tcaptureGeneration(method, params) {\n\t\tconst gk = genKey(method, params);\n\t\tconst current = this._evictionGeneration.get(gk) ?? 0;\n\t\tthis._evictionGeneration.set(gk, current);\n\t\treturn current;\n\t}\n\t/**\n\t* Write `value` under `{method}` unless the per-method generation moved\n\t* since `capturedGen` was taken — a `list_changed` that landed mid-walk has\n\t* already invalidated the result the caller is about to write, and\n\t* overwriting the eviction with the stale aggregate would lose the\n\t* invalidation.\n\t*\n\t* The value is stored as its JSON-serialized document; serialization\n\t* doubles as the mutation barrier, so a caller mutating the returned\n\t* aggregate cannot reach the cache or its derived indices. A value that\n\t* is not JSON-serializable (reachable only via in-process transports)\n\t* fails the write loudly into the `reportError` sink. A custom store\n\t* whose `set()` throws or rejects is routed to the same sink and the\n\t* write resolves — cache bookkeeping never costs the caller a result it\n\t* already fetched.\n\t*\n\t* `freshness` carries the client-computed `expiresAt` (absolute ms epoch,\n\t* `now + ttlMs`) and the server-reported `cacheScope`. The storage\n\t* `partition` is derived from the scope via `_partitionFor`:\n\t* `'public'` → `[serverIdentity, '']` (shared within this server);\n\t* `'private'` → `[serverIdentity, cachePartition]` (so a shared store\n\t* never serves a private entry to another identity). Absent `freshness`\n\t* preserves the substrate write (no `expiresAt`, private partition) — the\n\t* `tools/list` retain-for-schema posture: never served by\n\t* {@linkcode read}'s freshness gate, always readable by\n\t* {@linkcode toolDefinition}.\n\t*\n\t* After storing under the derived partition, the same `{method, params}`\n\t* is deleted from the OPPOSITE partition (mirroring {@linkcode evictKey}'s\n\t* two-partition posture). A server that flips a result's `cacheScope` for\n\t* the same key would otherwise leave the previous entry in the other slot\n\t* — and since `_probe` checks own-partition first, a stale private entry\n\t* would shadow the fresh public one (or a stale public entry would keep\n\t* serving co-tenants). Both store calls are independently guarded so a\n\t* custom store's failure on one does not skip the other.\n\t*/\n\tasync write(method, value, capturedGen, freshness) {\n\t\tif ((this._evictionGeneration.get(genKey(method, freshness?.params)) ?? 0) !== capturedGen) return;\n\t\tconst params = freshness?.params ?? \"\";\n\t\tconst ownPartition = this._partitionFor(\"private\");\n\t\tconst sharedPartition = this._partitionFor(\"public\");\n\t\tconst partition = (freshness?.scope ?? \"private\") === \"public\" ? sharedPartition : ownPartition;\n\t\ttry {\n\t\t\tawait this._store.set({\n\t\t\t\tmethod,\n\t\t\t\tparams,\n\t\t\t\tpartition\n\t\t\t}, {\n\t\t\t\tvalue: encodeCacheValue(value),\n\t\t\t\texpiresAt: freshness?.expiresAt,\n\t\t\t\tscope: freshness?.scope\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthis._reportError(error);\n\t\t}\n\t\tif (sharedPartition !== ownPartition) try {\n\t\t\tawait this._store.delete({\n\t\t\t\tmethod,\n\t\t\t\tparams,\n\t\t\t\tpartition: partition === ownPartition ? sharedPartition : ownPartition\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthis._reportError(error);\n\t\t}\n\t}\n\t/**\n\t* Serve the fresh cached result for `{method, params}`, or `undefined`.\n\t* Lookup is the two-probe order (own-partition then this server's shared\n\t* partition, gated on `scope === 'public'`); freshness is\n\t* `entry.expiresAt > now()` (a missing `expiresAt` is never fresh),\n\t* checked BEFORE decoding so stale entries cost no parse. Every hit is\n\t* freshly parsed, so the caller owns the value outright. An entry whose\n\t* document does not parse or is not an object (corrupted external\n\t* store) is reported,\n\t* deleted, and treated as a miss — deleted because a fresh-but-corrupt\n\t* entry would otherwise re-parse and re-report on every read until its\n\t* `expiresAt` passes.\n\t*/\n\tasync read(method, params) {\n\t\tconst entry = await this._probe(method, params);\n\t\tif (entry?.expiresAt === void 0 || !(entry.expiresAt > this.now())) return void 0;\n\t\ttry {\n\t\t\tconst parsed = JSON.parse(entry.value);\n\t\t\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) throw new TypeError(\"cached document is not an object\");\n\t\t\treturn { value: parsed };\n\t\t} catch (error) {\n\t\t\tthis._reportError(error);\n\t\t\tawait this._deleteBoth(method, params ?? \"\");\n\t\t\treturn;\n\t\t}\n\t}\n\t/**\n\t* Connection reset. The per-instance default store IS cleared\n\t* (connection-scoped); a user-supplied store is NOT — that would defeat\n\t* the only reason to supply one. The generation map and every derived\n\t* index are dropped regardless: they are connection-scoped even when the\n\t* backing store survives, so the next read re-derives from whatever the\n\t* store still holds. The server identity returns to the pre-connect\n\t* sentinel. The default impl is synchronous, so the `MaybePromise<void>`\n\t* return is a plain void here and the caller need not await.\n\t*/\n\tresetForReconnect() {\n\t\tif (!this._isUserSupplied) this._store.clear();\n\t\tthis._evictionGeneration.clear();\n\t\tthis._toolIndex = void 0;\n\t\tthis._toolOutputValidatorIndex = void 0;\n\t\tthis._serverIdentity = \"\";\n\t}\n\t/**\n\t* The descriptor for tool `name` taken from the cached `tools/list` entry.\n\t* The `name → Tool` index is memoized against the entry's `stamp` and\n\t* re-derived only when the backing entry changes (mcp.d's `cachedTool`).\n\t* Returns `undefined` only when no `tools/list` response is held at all,\n\t* or the held list does not contain `name`.\n\t*\n\t* Consumed by `callTool()`'s SEP-2243 `_resolveXMcpHeaderScan` (mirroring)\n\t* and, via {@linkcode outputValidator}, its output-schema validation.\n\t*/\n\tasync toolDefinition(name) {\n\t\tconst entry = await this._probe(\"tools/list\");\n\t\tif (entry === void 0) {\n\t\t\tthis._toolIndex = void 0;\n\t\t\treturn;\n\t\t}\n\t\tif (this._toolIndex?.stamp !== entry.stamp) {\n\t\t\tconst list = this._decodeListTools(entry);\n\t\t\tconst byName = /* @__PURE__ */ new Map();\n\t\t\tif (list !== void 0) for (const tool of list.tools) byName.set(tool.name, tool);\n\t\t\tthis._toolIndex = {\n\t\t\t\tstamp: entry.stamp,\n\t\t\t\tbyName\n\t\t\t};\n\t\t}\n\t\treturn this._toolIndex.byName.get(name);\n\t}\n\t/**\n\t* The compiled output-schema validator for tool `name`, derived from the\n\t* cached `tools/list` entry — same source and same stamp-keyed\n\t* memoization as {@linkcode toolDefinition}. The `name → validator` index\n\t* re-derives only when the backing entry's stamp changes (a refetched\n\t* `tools/list` recompiles; a `list_changed` eviction drops it). Returns\n\t* `undefined` when no `tools/list` is held, the tool is absent, or it has\n\t* no `outputSchema`.\n\t*\n\t* `compile` is the caller-supplied validator-compile callback (the\n\t* `Client` passes its `_jsonSchemaValidator` wrapper) so this\n\t* class carries no validator-provider dependency. One tool's uncompilable\n\t* `outputSchema` (e.g. an invalid `pattern` regex or unresolvable `$ref`)\n\t* must not poison every other tool's `callTool` — the callback isolates\n\t* that compile error per tool by returning a per-tool error variant which\n\t* the index stores alongside the good ones, and `callTool` surfaces it as\n\t* a typed `InvalidParams` only for that name. Because the error is held on\n\t* this stamp-keyed substrate (not a parallel map), it inherits the\n\t* substrate's invalidation lifecycle: a `list_changed` eviction drops it,\n\t* a refetched `tools/list` re-derives it, and `resetForReconnect` clears\n\t* the lot.\n\t*/\n\tasync outputValidator(name, compile) {\n\t\tconst entry = await this._probe(\"tools/list\");\n\t\tif (entry === void 0) {\n\t\t\tthis._toolOutputValidatorIndex = void 0;\n\t\t\treturn;\n\t\t}\n\t\tif (this._toolOutputValidatorIndex?.stamp !== entry.stamp) {\n\t\t\tconst list = this._decodeListTools(entry) ?? { tools: [] };\n\t\t\tconst byName = /* @__PURE__ */ new Map();\n\t\t\tfor (const tool of list.tools) {\n\t\t\t\tconst compiled = compile(tool);\n\t\t\t\tif (compiled !== void 0) byName.set(tool.name, compiled);\n\t\t\t}\n\t\t\tthis._toolOutputValidatorIndex = {\n\t\t\t\tstamp: entry.stamp,\n\t\t\t\tbyName\n\t\t\t};\n\t\t}\n\t\treturn this._toolOutputValidatorIndex.byName.get(name);\n\t}\n\t/** Parse a held `tools/list` document for the index builders; a document\n\t* that does not parse OR whose `tools` is not an array of objects\n\t* (both mean a corrupted external store) is reported and treated as if\n\t* nothing were held. Callers memoize the outcome against the entry's\n\t* stamp, so a corrupt document costs one parse + report per stamp, not\n\t* per lookup. */\n\t_decodeListTools(entry) {\n\t\ttry {\n\t\t\tconst parsed = JSON.parse(entry.value);\n\t\t\tif (!Array.isArray(parsed?.tools) || !parsed.tools.every((t) => t !== null && typeof t === \"object\")) throw new TypeError(\"cached tools/list document has a malformed tools array\");\n\t\t\treturn parsed;\n\t\t} catch (error) {\n\t\t\tthis._reportError(error);\n\t\t\treturn;\n\t\t}\n\t}\n};\n/**\n* Serialize a result for storage; throws TypeError for anything without a\n* JSON representation (legal wire results always have one). Two failure\n* modes need folding into that one throw: `JSON.stringify` throws on cycles\n* and BigInt, but silently returns `undefined` (not a string) for a\n* top-level function, symbol, or `undefined`.\n*/\nfunction encodeCacheValue(value) {\n\tlet json;\n\ttry {\n\t\tjson = JSON.stringify(value);\n\t} catch (error) {\n\t\tthrow new TypeError(`cache value is not JSON-serializable: ${error instanceof Error ? error.message : String(error)}`);\n\t}\n\tif (typeof json !== \"string\") throw new TypeError(\"cache value is not JSON-serializable: it has no JSON representation\");\n\treturn json;\n}\n\n//#endregion\n//#region src/client/authSeam.ts\n/**\n* Auth-seam provenance stamp (internal — not part of the public API).\n*\n* Errors escaping a transport auth seam — the `authProvider.token()` read,\n* an `onUnauthorized` invocation (SDK adapter or custom user callback), the\n* 403 step-up flow, the transport's own auth-failure constructions — are\n* stamped at the throw boundary. The version-negotiation probe routes stamped\n* errors as auth outcomes; provenance is recorded where it is known, never\n* reconstructed from error types downstream.\n*\n* `Symbol.for` uses the global symbol registry, so the stamp survives a\n* duplicated SDK copy in one process (bundler double-install, version skew)\n* by design: both copies resolve the same symbol.\n*/\nconst AUTH_SEAM = Symbol.for(\"mcp.authSeamEscape\");\n/**\n* Stamp `error` as an auth-seam escape and return it — identity-preserving\n* (the same object flows on, `instanceof` and `.cause` chains intact). A\n* frozen/sealed object is returned unstamped rather than replaced: identity\n* outranks provenance. Primitive throws cannot carry the stamp.\n*/\nfunction markAuthSeamEscape(error) {\n\tif (typeof error === \"object\" && error !== null || typeof error === \"function\") try {\n\t\tObject.defineProperty(error, AUTH_SEAM, {\n\t\t\tvalue: true,\n\t\t\tconfigurable: true\n\t\t});\n\t} catch {}\n\treturn error;\n}\n/** Whether `error` escaped through a transport auth seam. */\nfunction isAuthSeamEscape(error) {\n\treturn (typeof error === \"object\" && error !== null || typeof error === \"function\") && error[AUTH_SEAM] === true;\n}\n\n//#endregion\n//#region src/client/probeClassifier.ts\n/** The `-32022` UnsupportedProtocolVersion protocol error code (negotiation-phase recognition). */\nconst UNSUPPORTED_PROTOCOL_VERSION = -32022;\n/**\n* Deliberately not probe-recognized in either direction: deployed servers\n* overload `-32001` (the SDK-conventional `Session not found` body on a 2025\n* stateful server), and the spec-assigned `-32020` (`HeaderMismatch`) /\n* `-32021` (`MissingRequiredClientCapability`) are not era evidence — all\n* fall into the conservative legacy default.\n*/\nconst NOT_PROBE_RECOGNIZED = new Set([\n\t-32001,\n\t-32020,\n\t-32021\n]);\n/**\n* Classify a single probe outcome. Pure: no I/O, no state — loop-guard and\n* retry state live in the caller.\n*/\nfunction classifyProbeOutcome(outcome, context) {\n\tswitch (outcome.kind) {\n\t\tcase \"result\": return classifyResult(outcome.result, context);\n\t\tcase \"rpc-error\": return classifyRpcError(outcome, context);\n\t\tcase \"http-error\": return classifyHttpError(outcome, context);\n\t\tcase \"network-error\": return classifyNetworkError(outcome.error, context);\n\t\tcase \"auth-required\": return {\n\t\t\tkind: \"error\",\n\t\t\terror: outcome.error\n\t\t};\n\t\tcase \"closed\":\n\t\t\tif (context.transportKind === \"stdio\") return { kind: \"legacy\" };\n\t\t\treturn classifyNetworkError(/* @__PURE__ */ new Error(\"Connection closed during the version negotiation probe\"), context);\n\t\tcase \"timeout\":\n\t\t\tif (context.transportKind === \"stdio\") return { kind: \"legacy\" };\n\t\t\treturn {\n\t\t\t\tkind: \"error\",\n\t\t\t\terror: new SdkError(SdkErrorCode.RequestTimeout, `Version negotiation probe timed out after ${outcome.timeoutMs}ms`, { timeout: outcome.timeoutMs })\n\t\t\t};\n\t}\n}\nfunction classifyResult(result, context) {\n\tconst parsed = codecForVersion(MODERN_WIRE_REVISION).validateResult(\"server/discover\", result);\n\tif (!parsed.ok) return { kind: \"legacy\" };\n\tconst supportedVersions = parsed.value.supportedVersions;\n\tconst overlap = context.clientModernVersions.find((version) => supportedVersions.includes(version));\n\tif (overlap !== void 0) return {\n\t\tkind: \"modern\",\n\t\tversion: overlap,\n\t\tdiscover: parsed.value\n\t};\n\tif (context.fallbackAvailable) return { kind: \"legacy\" };\n\treturn {\n\t\tkind: \"error\",\n\t\terror: new UnsupportedProtocolVersionError({\n\t\t\tsupported: [...supportedVersions],\n\t\t\trequested: context.requestedVersion\n\t\t})\n\t};\n}\nfunction classifyRpcError(outcome, context) {\n\tconst { code, message, data } = outcome;\n\tif (code === UNSUPPORTED_PROTOCOL_VERSION) {\n\t\tconst supported = parseSupportedList(data);\n\t\tif (supported === void 0) return { kind: \"legacy\" };\n\t\tconst error = new UnsupportedProtocolVersionError({\n\t\t\tsupported,\n\t\t\trequested: parseRequested(data) ?? context.requestedVersion\n\t\t}, message);\n\t\tconst supportedModern = modernProtocolVersions(supported);\n\t\tconst mutual = context.clientModernVersions.find((version) => supportedModern.includes(version));\n\t\tif (mutual !== void 0) return {\n\t\t\tkind: \"corrective\",\n\t\t\tversion: mutual,\n\t\t\terror\n\t\t};\n\t\tif (supportedModern.length > 0) return {\n\t\t\tkind: \"error\",\n\t\t\terror\n\t\t};\n\t\treturn context.fallbackAvailable ? { kind: \"legacy\" } : {\n\t\t\tkind: \"error\",\n\t\t\terror\n\t\t};\n\t}\n\tif (NOT_PROBE_RECOGNIZED.has(code)) return { kind: \"legacy\" };\n\treturn { kind: \"legacy\" };\n}\nfunction classifyHttpError(outcome, context) {\n\tif (outcome.status === 401 || outcome.status === 403) {\n\t\tconst isDenial = outcome.status === 403;\n\t\treturn {\n\t\t\tkind: \"error\",\n\t\t\terror: new SdkHttpError(isDenial ? SdkErrorCode.ClientHttpForbidden : SdkErrorCode.ClientHttpAuthentication, `Version negotiation failed: ${isDenial ? \"the server denied access (HTTP 403)\" : \"the server requires authorization (HTTP 401)\"}`, {\n\t\t\t\tstatus: outcome.status,\n\t\t\t\tstatusText: outcome.statusText,\n\t\t\t\ttext: outcome.body\n\t\t\t})\n\t\t};\n\t}\n\tif (outcome.status >= 500) return {\n\t\tkind: \"error\",\n\t\terror: new SdkHttpError(SdkErrorCode.EraNegotiationFailed, `Version negotiation failed: the server answered the probe with HTTP ${outcome.status}`, {\n\t\t\tstatus: outcome.status,\n\t\t\tstatusText: outcome.statusText,\n\t\t\ttext: outcome.body\n\t\t})\n\t};\n\tconst rpcError = parseJsonRpcErrorBody(outcome.body);\n\tif (rpcError !== void 0) return classifyRpcError(rpcError, context);\n\treturn { kind: \"legacy\" };\n}\nfunction classifyNetworkError(error, context) {\n\tif (context.environment === \"browser\" && isOpaqueFetchTypeError(error)) return { kind: \"legacy\" };\n\treturn {\n\t\tkind: \"error\",\n\t\terror: new SdkError(SdkErrorCode.EraNegotiationFailed, `Version negotiation probe failed: ${describeError(error)}`, { cause: error })\n\t};\n}\nfunction isOpaqueFetchTypeError(error) {\n\treturn error instanceof TypeError || error instanceof Error && error.name === \"TypeError\";\n}\nfunction describeError(error) {\n\treturn error instanceof Error ? error.message : String(error);\n}\nfunction parseSupportedList(data) {\n\tif (typeof data !== \"object\" || data === null) return void 0;\n\tconst supported = data.supported;\n\tif (!Array.isArray(supported) || supported.length === 0 || !supported.every((v) => typeof v === \"string\")) return;\n\treturn supported;\n}\nfunction parseRequested(data) {\n\tif (typeof data !== \"object\" || data === null) return void 0;\n\tconst requested = data.requested;\n\treturn typeof requested === \"string\" ? requested : void 0;\n}\nfunction parseJsonRpcErrorBody(body) {\n\tif (body === void 0 || body === \"\") return void 0;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(body);\n\t} catch {\n\t\treturn;\n\t}\n\tif (typeof parsed !== \"object\" || parsed === null) return void 0;\n\tconst error = parsed.error;\n\tif (typeof error !== \"object\" || error === null) return void 0;\n\tconst { code, message, data } = error;\n\tif (typeof code !== \"number\") return void 0;\n\treturn {\n\t\tcode,\n\t\tmessage: typeof message === \"string\" ? message : \"\",\n\t\tdata\n\t};\n}\n\n//#endregion\n//#region src/client/versionNegotiation.ts\n/**\n* The default mode when `versionNegotiation` (or its `mode`) is absent;\n* changing the default later is a flip of this single line.\n*/\nconst DEFAULT_VERSION_NEGOTIATION_MODE = \"legacy\";\n/**\n* Resolve the negotiation options into a per-connect plan. The raw (not\n* defaulted) `supportedProtocolVersions` option supplies the modern offer list;\n* a list without any legacy version makes this a modern-only client (no fallback).\n*/\nfunction resolveVersionNegotiation(options, supportedProtocolVersionsOption) {\n\tconst mode = options?.mode ?? DEFAULT_VERSION_NEGOTIATION_MODE;\n\tif (mode === \"legacy\") return { kind: \"legacy\" };\n\tconst probe = options?.probe ?? {};\n\tif (typeof mode === \"object\") {\n\t\tif (!isModernProtocolVersion(mode.pin)) throw new TypeError(`versionNegotiation: { pin: '${mode.pin}' } is not a modern protocol revision — pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: 'legacy') for 2025-era servers.`);\n\t\treturn {\n\t\t\tkind: \"pin\",\n\t\t\tversion: mode.pin,\n\t\t\tprobe\n\t\t};\n\t}\n\tconst explicitModern = supportedProtocolVersionsOption ? modernProtocolVersions(supportedProtocolVersionsOption) : [];\n\treturn {\n\t\tkind: \"auto\",\n\t\tmodernVersions: explicitModern.length > 0 ? explicitModern : [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n\t\tfallbackAvailable: supportedProtocolVersionsOption ? legacyProtocolVersions(supportedProtocolVersionsOption).length > 0 : true,\n\t\tprobe\n\t};\n}\n/** Detect the probe environment for the network-failure row — see {@linkcode ProbeEnvironment}. */\nfunction detectProbeEnvironment() {\n\tconst g = globalThis;\n\treturn g.window !== void 0 && g.document !== void 0 ? \"browser\" : \"node\";\n}\n/**\n* Detect the transport class for the transport-aware timeout and closed verdicts (see\n* {@linkcode ProbeTransportKind}). The stdio child-process transport is\n* recognized structurally (`stderr`/`pid` accessors, no `instanceof` — safe\n* across bundles); everything else is treated like HTTP.\n*/\nfunction detectProbeTransportKind(transport) {\n\treturn \"stderr\" in transport && \"pid\" in transport ? \"stdio\" : \"http\";\n}\n/**\n* Temporary ownership of a raw transport for the negotiation exchange, before\n* the Protocol machinery attaches. `open()` installs the window's handlers and\n* starts the transport; `release()` detaches them and arms a one-shot `start()`\n* pass-through so the subsequent Protocol connect (which always starts its\n* transport) takes over the already-started channel without a double-start error.\n*\n* Handlers a caller pre-set on the transport before `connect()` are saved on\n* open and restored on detach, so `Protocol.connect()` finds and chains them\n* exactly as it would on a plain (non-negotiating) connect. Error and close\n* events are forwarded to the saved handlers during the window, so negotiation\n* does not change what a pre-attached observer sees of the transport\n* lifecycle. (Inbound messages are deliberately NOT forwarded — the window's\n* drop-guard is a module invariant, and the probe reply has no plain-connect\n* counterpart; a pre-set `onmessage` is restored at detach and chained by\n* `Protocol.connect()` like the others.)\n*/\nvar ProbeWindow = class ProbeWindow {\n\t_pending;\n\t_probeCounter = 0;\n\t_savedOnMessage;\n\t_savedOnError;\n\t_savedOnClose;\n\t_closeDelivered = false;\n\tconstructor(_transport) {\n\t\tthis._transport = _transport;\n\t\tthis._savedOnMessage = _transport.onmessage;\n\t\tthis._savedOnError = _transport.onerror;\n\t\tthis._savedOnClose = _transport.onclose;\n\t}\n\tstatic async open(transport) {\n\t\tconst window = new ProbeWindow(transport);\n\t\ttransport.onmessage = (message) => {\n\t\t\tconst pending = window._pending;\n\t\t\tif (pending !== void 0 && (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) && message.id === pending.id) {\n\t\t\t\twindow._pending = void 0;\n\t\t\t\tif (isJSONRPCResultResponse(message)) pending.resolve({\n\t\t\t\t\tkind: \"response\",\n\t\t\t\t\tresult: message.result\n\t\t\t\t});\n\t\t\t\telse pending.resolve({\n\t\t\t\t\tkind: \"response\",\n\t\t\t\t\terror: message.error\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t};\n\t\ttransport.onerror = (error) => {\n\t\t\twindow._savedOnError?.(error);\n\t\t};\n\t\ttransport.onclose = () => {\n\t\t\tconst pending = window._pending;\n\t\t\tif (pending !== void 0) {\n\t\t\t\twindow._pending = void 0;\n\t\t\t\tpending.resolve({ kind: \"closed\" });\n\t\t\t}\n\t\t\twindow._closeDelivered = true;\n\t\t\twindow._savedOnClose?.();\n\t\t};\n\t\ttry {\n\t\t\tawait transport.start();\n\t\t} catch (error) {\n\t\t\twindow.detach();\n\t\t\tthrow error;\n\t\t}\n\t\treturn window;\n\t}\n\t/**\n\t* Send one probe request and await its reply. Probe ids are strings, so they\n\t* never collide with Protocol's numeric ids (e.g. on a shared stdio pipe).\n\t*/\n\tasync exchange(buildRequest, timeoutMs) {\n\t\tconst id = `server-discover-probe-${++this._probeCounter}`;\n\t\treturn new Promise((resolve) => {\n\t\t\tlet settled = false;\n\t\t\tconst settle = (reply) => {\n\t\t\t\tif (settled) return;\n\t\t\t\tsettled = true;\n\t\t\t\tclearTimeout(timer);\n\t\t\t\tif (this._pending?.id === id) this._pending = void 0;\n\t\t\t\tresolve(reply);\n\t\t\t};\n\t\t\tconst timer = setTimeout(() => settle({ kind: \"timeout\" }), timeoutMs);\n\t\t\tthis._pending = {\n\t\t\t\tid,\n\t\t\t\tresolve: settle\n\t\t\t};\n\t\t\tthis._transport.send(buildRequest(id)).catch((error) => settle({\n\t\t\t\tkind: \"send-error\",\n\t\t\t\terror\n\t\t\t}));\n\t\t});\n\t}\n\t/** Detach the window's handlers, restoring any the caller pre-set, leaving the transport's own `start` untouched. */\n\tdetach() {\n\t\tthis._pending = void 0;\n\t\tthis._transport.onmessage = this._savedOnMessage;\n\t\tthis._transport.onerror = this._savedOnError;\n\t\tif (this._closeDelivered && this._savedOnClose !== void 0) {\n\t\t\tconst saved = this._savedOnClose;\n\t\t\tconst transport = this._transport;\n\t\t\tlet spent = false;\n\t\t\tconst wrapper = () => {\n\t\t\t\tif (!spent) {\n\t\t\t\t\tspent = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsaved();\n\t\t\t};\n\t\t\ttransport.onclose = wrapper;\n\t\t\tpendingSpentCloseGuards.set(transport, () => {\n\t\t\t\tif (transport.onclose === wrapper) transport.onclose = saved;\n\t\t\t});\n\t\t} else this._transport.onclose = this._savedOnClose;\n\t}\n\t/** Detach the handlers and arm the one-shot `start()` pass-through for the `Protocol.connect()` handover. */\n\trelease() {\n\t\tthis.detach();\n\t\tconst transport = this._transport;\n\t\tconst originalStart = transport.start;\n\t\tlet armed = true;\n\t\ttransport.start = async function() {\n\t\t\tif (armed) {\n\t\t\t\tarmed = false;\n\t\t\t\ttransport.start = originalStart;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn originalStart.call(transport);\n\t\t};\n\t}\n};\n/**\n* Spent-close guards from failed negotiations, pending disarm by the cleanup\n* site (keyed weakly — an abandoned transport carries its guard to GC).\n*/\nconst pendingSpentCloseGuards = /* @__PURE__ */ new WeakMap();\n/**\n* Disarm a failed negotiation's spent-close guard once the cleanup `close()`\n* has settled. Any re-delivery of the spent mid-window close happens DURING\n* that close (HTTP transports re-fire `onclose` there; stdio transports never\n* do — their close event already fired), so after it every close is genuine\n* and must reach the caller's pre-set observer.\n*/\nfunction disarmSpentCloseGuard(transport) {\n\tconst disarm = pendingSpentCloseGuards.get(transport);\n\tpendingSpentCloseGuards.delete(transport);\n\tdisarm?.();\n}\n/** Build the probe request: `server/discover` carrying the full per-request `_meta` envelope. */\nfunction buildProbeRequest(id, protocolVersion, clientInfo, capabilities) {\n\treturn {\n\t\tjsonrpc: \"2.0\",\n\t\tid,\n\t\tmethod: \"server/discover\",\n\t\tparams: { _meta: codecForVersion(protocolVersion).outboundEnvelope({\n\t\t\tprotocolVersion,\n\t\t\tclientInfo,\n\t\t\tclientCapabilities: capabilities\n\t\t}) }\n\t};\n}\nfunction normalizeReply(reply, timeoutMs) {\n\tswitch (reply.kind) {\n\t\tcase \"response\": return reply.error === void 0 ? {\n\t\t\tkind: \"result\",\n\t\t\tresult: reply.result\n\t\t} : {\n\t\t\tkind: \"rpc-error\",\n\t\t\t...reply.error\n\t\t};\n\t\tcase \"send-error\": {\n\t\t\tconst error = reply.error;\n\t\t\tif (isAuthSeamEscape(error) || error instanceof UnauthorizedError || error instanceof Error && error.name === \"UnauthorizedError\") return {\n\t\t\t\tkind: \"auth-required\",\n\t\t\t\terror\n\t\t\t};\n\t\t\tif (error instanceof SdkHttpError) {\n\t\t\t\tconst text = error.data?.text;\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"http-error\",\n\t\t\t\t\tstatus: error.data.status,\n\t\t\t\t\tbody: typeof text === \"string\" ? text : void 0,\n\t\t\t\t\tstatusText: error.data.statusText\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tkind: \"network-error\",\n\t\t\t\terror\n\t\t\t};\n\t\t}\n\t\tcase \"closed\": return { kind: \"closed\" };\n\t\tcase \"timeout\": return {\n\t\t\tkind: \"timeout\",\n\t\t\ttimeoutMs\n\t\t};\n\t}\n}\n/**\n* Run the negotiation probe state machine on a raw (not yet Protocol-connected)\n* transport. Resolves with the negotiated era; throws typed connect errors. On\n* return the probe window has been released: the transport is started,\n* handler-free, and ready for `Protocol.connect()` handover. On throw the\n* window is detached and the transport's `start` is left untouched.\n*/\nasync function negotiateEra(negotiation, deps) {\n\tconst timeoutMs = negotiation.probe.timeoutMs ?? deps.defaultTimeoutMs;\n\tconst maxRetries = Math.max(0, negotiation.probe.maxRetries ?? 0);\n\tconst clientModernVersions = negotiation.kind === \"pin\" ? [negotiation.version] : negotiation.modernVersions;\n\tconst fallbackAvailable = negotiation.kind === \"auto\" && negotiation.fallbackAvailable;\n\tconst window = await ProbeWindow.open(deps.transport);\n\tconst probe = async () => {\n\t\tlet requestedVersion = clientModernVersions[0];\n\t\tlet correctiveUsed = false;\n\t\tlet timeoutRetriesRemaining = maxRetries;\n\t\tfor (;;) {\n\t\t\tconst reply = await window.exchange((id) => buildProbeRequest(id, requestedVersion, deps.clientInfo, deps.capabilities), timeoutMs);\n\t\t\tif (reply.kind === \"timeout\" && timeoutRetriesRemaining > 0) {\n\t\t\t\ttimeoutRetriesRemaining--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst outcome = normalizeReply(reply, timeoutMs);\n\t\t\tconst verdict = classifyProbeOutcome(outcome, {\n\t\t\t\tclientModernVersions,\n\t\t\t\trequestedVersion,\n\t\t\t\tfallbackAvailable,\n\t\t\t\tenvironment: deps.environment,\n\t\t\t\ttransportKind: deps.transportKind\n\t\t\t});\n\t\t\tswitch (verdict.kind) {\n\t\t\t\tcase \"modern\": return {\n\t\t\t\t\tera: \"modern\",\n\t\t\t\t\tversion: verdict.version,\n\t\t\t\t\tdiscover: verdict.discover\n\t\t\t\t};\n\t\t\t\tcase \"corrective\":\n\t\t\t\t\tif (correctiveUsed) throw verdict.error;\n\t\t\t\t\tcorrectiveUsed = true;\n\t\t\t\t\trequestedVersion = verdict.version;\n\t\t\t\t\tcontinue;\n\t\t\t\tcase \"legacy\": {\n\t\t\t\t\tconst closedCause = outcome.kind === \"closed\" ? \"the connection closed during the server/discover probe\" : void 0;\n\t\t\t\t\tif (negotiation.kind === \"pin\") throw new SdkError(SdkErrorCode.EraNegotiationFailed, closedCause === void 0 ? `Version negotiation failed: the server did not offer pinned protocol version ${negotiation.version} via server/discover (no fallback in pin mode)` : `Version negotiation failed: ${closedCause} before the server offered pinned protocol version ${negotiation.version} (no fallback in pin mode)`);\n\t\t\t\t\tif (!negotiation.fallbackAvailable) throw new SdkError(SdkErrorCode.EraNegotiationFailed, closedCause === void 0 ? \"Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to\" : `Version negotiation failed: ${closedCause} and this client supports no pre-2026-07-28 protocol version to fall back to`);\n\t\t\t\t\tif (closedCause !== void 0 && deps.disposableProbe !== true) throw new SdkError(SdkErrorCode.EraNegotiationFailed, `Version negotiation failed: ${closedCause} (this transport probed in place — the disposable sibling probe requires the SDK's base StdioClientTransport)`);\n\t\t\t\t\treturn { era: \"legacy\" };\n\t\t\t\t}\n\t\t\t\tcase \"error\": throw verdict.error;\n\t\t\t}\n\t\t}\n\t};\n\tlet result;\n\ttry {\n\t\tresult = await probe();\n\t} catch (error) {\n\t\twindow.detach();\n\t\tthrow error;\n\t}\n\twindow.release();\n\treturn result;\n}\n/**\n* Structural read of the SDK stdio transport's retained spawn parameters —\n* `undefined` for stdio-shaped transports that do not expose them, and for\n* SUBCLASSES of the SDK transport (those probe in place, where a mid-probe\n* close stays a typed connect error). The sibling path requires the transport\n* to be exactly the base class: a subclass cannot be faithfully cloned by\n* re-invoking its constructor with the retained params alone (extra ctor\n* arguments, transformed state, side effects). Exactness is checked without\n* importing the class (the negotiation graph must stay runtime-neutral): only\n* the base class's own prototype carries the internal `_dispose` reaper the\n* sibling flow depends on — a subclass's prototype does not own it.\n*/\nfunction readStdioServerParams(transport) {\n\tconst proto = Object.getPrototypeOf(transport);\n\tif (proto === null || !Object.prototype.hasOwnProperty.call(proto, \"_dispose\")) return;\n\tconst params = transport._serverParams;\n\treturn typeof params === \"object\" && params !== null && typeof params.command === \"string\" ? params : void 0;\n}\n/**\n* stdio era negotiation on a DISPOSABLE SIBLING: stdio servers built on SDKs\n* that terminate on any pre-`initialize` request exit when the probe arrives,\n* so the probe must not spend the caller's one process life. `server/discover`\n* runs on a short-lived sibling spawned from the same parameters; the caller's\n* transport starts exactly once, after the era is known. The sibling is\n* invisible infrastructure: its stderr is discarded, and it is reaped before\n* this resolves (signal escalation awaiting process exit — a helper holding\n* its pipes never blocks disposal). A caller `close()` on the session\n* transport during the probe aborts the connect with the typed negotiation\n* error, and the session transport is never started.\n*/\nasync function negotiateStdioViaSibling(negotiation, sessionTransport, params, deps) {\n\tconst SiblingTransport = sessionTransport.constructor;\n\tconst sibling = new SiblingTransport({\n\t\t...params,\n\t\tstderr: \"ignore\"\n\t});\n\tconst originalClose = sessionTransport.close;\n\tlet callerClosed = false;\n\tlet signalClosed;\n\tconst closedSignal = new Promise((_, reject) => {\n\t\tsignalClosed = () => reject(callerCloseAbortError());\n\t});\n\tsessionTransport.close = async function() {\n\t\tcallerClosed = true;\n\t\tsignalClosed?.();\n\t\treturn originalClose.call(sessionTransport);\n\t};\n\tlet result;\n\ttry {\n\t\tconst negotiated = negotiateEra(negotiation, {\n\t\t\t...deps,\n\t\t\ttransport: sibling,\n\t\t\ttransportKind: \"stdio\",\n\t\t\tdisposableProbe: true\n\t\t});\n\t\tnegotiated.catch(() => {});\n\t\tresult = await Promise.race([negotiated, closedSignal]);\n\t} finally {\n\t\tawait disposeSibling(sibling);\n\t\tsessionTransport.close = originalClose;\n\t}\n\tif (callerClosed) throw callerCloseAbortError();\n\treturn result;\n}\n/** The typed abort for a caller `close()` landing while the sibling probes. */\nfunction callerCloseAbortError() {\n\treturn new SdkError(SdkErrorCode.EraNegotiationFailed, \"Version negotiation failed: the transport was closed during the server/discover probe\");\n}\n/** Reap a probe sibling — best-effort; a sibling that cannot be reaped must not turn a settled verdict into an error. */\nasync function disposeSibling(sibling) {\n\ttry {\n\t\tconst dispose = sibling._dispose;\n\t\tawait (typeof dispose === \"function\" ? dispose.call(sibling) : sibling.close());\n\t} catch {}\n}\n\n//#endregion\n//#region src/client/client.ts\n/**\n* The server identity a `DiscoverResult` carries in\n* `_meta['io.modelcontextprotocol/serverInfo']` (a spec SHOULD — absent means\n* the server offered no identity). Runtime-validated with the spec-type\n* guard because `connect({ prior })` accepts caller-supplied values that\n* never saw a wire parse.\n*/\nfunction serverInfoFromDiscover(discover) {\n\tconst fromMeta = discover._meta?.[SERVER_INFO_META_KEY];\n\treturn isSpecType.Implementation(fromMeta) ? fromMeta : void 0;\n}\n/**\n* Elicitation default application helper. Applies defaults to the `data` based on the `schema`.\n*\n* @param schema - The schema to apply defaults to.\n* @param data - The data to apply defaults to.\n*/\nfunction applyElicitationDefaults(schema, data) {\n\tif (!schema || data === null || typeof data !== \"object\") return;\n\tif (schema.type === \"object\" && schema.properties && typeof schema.properties === \"object\") {\n\t\tconst obj = data;\n\t\tconst props = schema.properties;\n\t\tfor (const key of Object.keys(props)) {\n\t\t\tconst propSchema = props[key];\n\t\t\tif (obj[key] === void 0 && Object.prototype.hasOwnProperty.call(propSchema, \"default\")) obj[key] = propSchema.default;\n\t\t\tif (obj[key] !== void 0) applyElicitationDefaults(propSchema, obj[key]);\n\t\t}\n\t}\n\tif (Array.isArray(schema.anyOf)) {\n\t\tfor (const sub of schema.anyOf) if (typeof sub !== \"boolean\") applyElicitationDefaults(sub, data);\n\t}\n\tif (Array.isArray(schema.oneOf)) {\n\t\tfor (const sub of schema.oneOf) if (typeof sub !== \"boolean\") applyElicitationDefaults(sub, data);\n\t}\n}\n/**\n* Determines which elicitation modes are supported based on declared client capabilities.\n*\n* According to the spec:\n* - An empty elicitation capability object defaults to form mode support (backwards compatibility)\n* - URL mode is only supported if explicitly declared\n*\n* @param capabilities - The client's elicitation capabilities\n* @returns An object indicating which modes are supported\n*/\nfunction getSupportedElicitationModes(capabilities) {\n\tif (!capabilities) return {\n\t\tsupportsFormMode: false,\n\t\tsupportsUrlMode: false\n\t};\n\tconst hasFormCapability = capabilities.form !== void 0;\n\tconst hasUrlCapability = capabilities.url !== void 0;\n\treturn {\n\t\tsupportsFormMode: hasFormCapability || !hasFormCapability && !hasUrlCapability,\n\t\tsupportsUrlMode: hasUrlCapability\n\t};\n}\n/**\n* Rejects malformed persisted blobs with a typed `SdkError` before any state\n* change: unrecognized `kind`, a legacy verdict also carrying\n* DiscoverResult-shaped members (a corrupt blob must never era-choose), or a\n* modern `discover` payload failing the wire path's schema.\n*/\nfunction validatePrior(prior) {\n\tif (typeof prior === \"object\" && prior !== null) {\n\t\tif (prior.kind === \"legacy\" && !(\"supportedVersions\" in prior) && !(\"discover\" in prior)) return prior;\n\t\tif (prior.kind === \"modern\" && DiscoverResultSchema.safeParse(prior.discover).success) return prior;\n\t}\n\tthrow new SdkError(SdkErrorCode.EraNegotiationFailed, \"connect({ prior }): unrecognized prior — expected { kind: 'modern', discover } or { kind: 'legacy' }\");\n}\n/**\n* `list_changed` notification → response-cache method(s) to evict. `resources`\n* covers both list verbs (the spec's \"relevant notification ⇒ immediately\n* stale\").\n*/\nconst LIST_CHANGED_EVICTIONS = {\n\t\"notifications/tools/list_changed\": [\"tools/list\"],\n\t\"notifications/prompts/list_changed\": [\"prompts/list\"],\n\t\"notifications/resources/list_changed\": [\"resources/list\", \"resources/templates/list\"]\n};\nconst DEFAULT_LIST_MAX_PAGES = 64;\n/**\n* An MCP client on top of a pluggable transport.\n*\n* The client will automatically begin the initialization flow with the server when {@linkcode connect} is called.\n*\n* To handle server-initiated requests (sampling, elicitation, roots), call {@linkcode setRequestHandler}.\n* The client must declare the corresponding capability for the handler to be accepted. For\n* `sampling/createMessage` and `elicitation/create`, the handler is automatically wrapped with\n* schema validation for both the incoming request and the returned result.\n*\n* Note: the `roots/list` and `sampling/createMessage` handler surfaces (and the corresponding\n* `roots` and `sampling` capabilities) are deprecated as of protocol version 2026-07-28\n* (SEP-2577). They remain functional during the deprecation window (at least twelve months).\n* Migrate sampling to calling LLM provider APIs directly, and roots to passing paths via tool\n* parameters, resource URIs, or configuration.\n*\n* @example Handling a sampling request\n* ```ts source=\"./client.examples.ts#Client_setRequestHandler_sampling\"\n* client.setRequestHandler('sampling/createMessage', async request => {\n* const lastMessage = request.params.messages.at(-1);\n* console.log('Sampling request:', lastMessage);\n*\n* // In production, send messages to your LLM here\n* return {\n* model: 'my-model',\n* role: 'assistant' as const,\n* content: {\n* type: 'text' as const,\n* text: 'Response from the model'\n* }\n* };\n* });\n* ```\n*/\nvar Client = class extends Protocol {\n\t_serverCapabilities;\n\t_serverVersion;\n\t_capabilities;\n\t_instructions;\n\t_jsonSchemaValidator;\n\t/**\n\t* The response-cache substrate. Owns the backing store, the per-method\n\t* eviction-generation counter, the user-supplied/default flag, and the\n\t* stamp-memoized derived `name → Tool` / `name → output-validator`\n\t* indices — the cache-coordination state that used to live as separate\n\t* private fields here. The internal aggregating walk writes one entry per\n\t* list verb; `list_changed` evicts the matching method;\n\t* `_resetConnectionState` resets the lot. {@linkcode callTool}'s\n\t* output-schema validation reads the derived `outputValidator` index (the\n\t* substrate's first production caller); the stacked SEP-2243 PR wires\n\t* `Mcp-Param-*` mirroring through `toolDefinition` on top.\n\t*/\n\t_cache;\n\t_defaultCacheTtlMs;\n\t_listMaxPages;\n\t_listChangedDebounceTimers = /* @__PURE__ */ new Map();\n\t/**\n\t* The constructor `listChanged` configuration. Durable across reconnects:\n\t* read fresh on every connect (legacy or modern), never consumed.\n\t*/\n\t_listChangedConfig;\n\t_enforceStrictCapabilities;\n\t_versionNegotiation;\n\t_supportedProtocolVersionsOption;\n\t_inputRequiredDriverConfig;\n\t/**\n\t* Active subscriptions/listen state, keyed by subscription id (= the\n\t* listen request's JSON-RPC id verbatim). The id is a STRING from a\n\t* Client-owned counter (`'listen:' + N`) — JSON-RPC permits string ids,\n\t* and Protocol's numeric `_requestMessageId` counter only ever issues\n\t* numbers, so listen ids cannot collide with ordinary request ids.\n\t*/\n\t_listenState = /* @__PURE__ */ new Map();\n\t_nextListenId = 0;\n\t/** The auto-opened subscription backing ClientOptions.listChanged on a modern connection. */\n\t_autoOpenedSubscription;\n\t/** Backing store for {@linkcode getDiscoverResult}. Per-connection. */\n\t_discoverResult;\n\t/**\n\t* Clears every per-connection field in one place. Called at the start of\n\t* each fresh (non-resuming) connect and from `close()`, so a stale\n\t* negotiated era / server identity / auto-opened subscription cannot\n\t* survive a reconnect.\n\t*/\n\t_resetConnectionState() {\n\t\tthis._negotiatedProtocolVersion = void 0;\n\t\tthis._serverCapabilities = void 0;\n\t\tthis._serverVersion = void 0;\n\t\tthis._instructions = void 0;\n\t\tthis._discoverResult = void 0;\n\t\tthis._autoOpenedSubscription = void 0;\n\t\tif (this._listenState.size > 0) {\n\t\t\tconst reason = new SdkError(SdkErrorCode.ConnectionClosed, \"subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset\");\n\t\t\tfor (const entry of this._listenState.values()) entry.settle({\n\t\t\t\tcause: \"remote\",\n\t\t\t\terror: reason\n\t\t\t});\n\t\t}\n\t\tthis._listenState.clear();\n\t\tfor (const timer of this._listChangedDebounceTimers.values()) clearTimeout(timer);\n\t\tthis._listChangedDebounceTimers.clear();\n\t\tthis._cache.resetForReconnect();\n\t}\n\tasync close() {\n\t\ttry {\n\t\t\tawait super.close();\n\t\t} finally {\n\t\t\tthis._resetConnectionState();\n\t\t}\n\t}\n\t/**\n\t* Initializes this client with the given name and version information.\n\t*/\n\tconstructor(_clientInfo, options) {\n\t\tsuper(options);\n\t\tthis._clientInfo = _clientInfo;\n\t\tthis._capabilities = options?.capabilities ? { ...options.capabilities } : {};\n\t\tthis._jsonSchemaValidator = options?.jsonSchemaValidator ?? new DefaultJsonSchemaValidator();\n\t\tthis._enforceStrictCapabilities = options?.enforceStrictCapabilities ?? false;\n\t\tthis._versionNegotiation = options?.versionNegotiation;\n\t\tthis._supportedProtocolVersionsOption = options?.supportedProtocolVersions;\n\t\tthis._inputRequiredDriverConfig = resolveInputRequiredDriverConfig(options?.inputRequired);\n\t\tthis._cache = new ClientResponseCache(options?.responseCacheStore ?? new InMemoryResponseCacheStore(), options?.responseCacheStore !== void 0, (error) => this._reportStoreError(error), options?.cachePartition ?? \"\");\n\t\tthis._defaultCacheTtlMs = options?.defaultCacheTtlMs ?? 0;\n\t\tthis._listMaxPages = options?.listMaxPages ?? DEFAULT_LIST_MAX_PAGES;\n\t\tif (options?.listChanged) this._listChangedConfig = options.listChanged;\n\t}\n\tbuildContext(ctx, _transportInfo) {\n\t\treturn ctx;\n\t}\n\t/**\n\t* Era-keyed direction enforcement for inbound traffic on channels whose\n\t* transport does not classify (e.g. stdio): the 2026-07-28 era has no\n\t* server→client JSON-RPC request channel — server-to-client interactions\n\t* are carried in-band in `input_required` results — and on stdio the\n\t* client must never write JSON-RPC responses. An inbound request arriving\n\t* on a connection that negotiated a modern era is therefore dropped\n\t* (surfaced via `onerror`) rather than answered. Connections on a legacy\n\t* era — and all responses and notifications — keep today's dispatch path.\n\t*/\n\t_shouldDropInbound(message) {\n\t\tif (this._negotiatedProtocolVersion !== void 0 && isModernProtocolVersion(this._negotiatedProtocolVersion) && isJSONRPCRequest(message)) return \"drop\";\n\t}\n\t/**\n\t* Per-request `_meta` envelope auto-emission (protocol revision 2026-07-28):\n\t* on a connection that negotiated a modern era — auto-negotiated or pinned —\n\t* every outgoing request and notification automatically carries the reserved\n\t* protocol-version / client-info / client-capabilities `_meta` keys (the\n\t* same envelope the connect-time `server/discover` probe sends).\n\t* User-supplied `_meta` keys take precedence over the auto-attached ones.\n\t*\n\t* Legacy-era connections return `undefined`: the envelope seam is a no-op\n\t* and outbound traffic is byte-identical to a 2025 client (the legacy\n\t* `'auto'` fallback included).\n\t*/\n\t_outboundMetaEnvelope() {\n\t\tconst version = this._negotiatedProtocolVersion;\n\t\tif (version === void 0) return void 0;\n\t\treturn this._wireCodec().outboundEnvelope({\n\t\t\tprotocolVersion: version,\n\t\t\tclientInfo: this._clientInfo,\n\t\t\tclientCapabilities: this._capabilities\n\t\t});\n\t}\n\t/**\n\t* Wires the multi-round-trip auto-fulfilment engine (protocol revision\n\t* 2026-07-28) into the response funnel: an `input_required` answer is\n\t* fulfilled through the registered elicitation/sampling/roots handlers\n\t* and the original request retried via `flow.retry`, up to\n\t* `inputRequired.maxRounds` rounds. With auto-fulfilment disabled the\n\t* response surfaces as a typed error steering to manual mode.\n\t*/\n\t_resolveNonCompleteResult(decoded, flow) {\n\t\tif (!this._inputRequiredDriverConfig.autoFulfill) return Promise.reject(new SdkError(SdkErrorCode.UnsupportedResultType, `Unsupported result type 'input_required' for ${flow.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance — pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`, {\n\t\t\tresultType: \"input_required\",\n\t\t\tmethod: flow.request.method\n\t\t}));\n\t\treturn runInputRequiredFlow({\n\t\t\tgetRequestHandler: (method) => this._getRequestHandler(method),\n\t\t\tbuildContext: (baseCtx) => this.buildContext(baseCtx, void 0),\n\t\t\tsessionId: this.transport?.sessionId\n\t\t}, this._inputRequiredDriverConfig, decoded, flow);\n\t}\n\t/**\n\t* Set up handlers for list changed notifications based on config and server capabilities.\n\t* This should only be called after initialization when server capabilities are known.\n\t* Handlers are silently skipped if the server doesn't advertise the corresponding listChanged capability.\n\t* @internal\n\t*/\n\t_setupListChangedHandlers(config) {\n\t\tif (config.tools && this._serverCapabilities?.tools?.listChanged) this._setupListChangedHandler(\"tools\", \"notifications/tools/list_changed\", config.tools, async () => {\n\t\t\treturn (await this.listTools(void 0, { cacheMode: \"refresh\" })).tools;\n\t\t});\n\t\tif (config.prompts && this._serverCapabilities?.prompts?.listChanged) this._setupListChangedHandler(\"prompts\", \"notifications/prompts/list_changed\", config.prompts, async () => {\n\t\t\treturn (await this.listPrompts(void 0, { cacheMode: \"refresh\" })).prompts;\n\t\t});\n\t\tif (config.resources && this._serverCapabilities?.resources?.listChanged) this._setupListChangedHandler(\"resources\", \"notifications/resources/list_changed\", config.resources, async () => {\n\t\t\treturn (await this.listResources(void 0, { cacheMode: \"refresh\" })).resources;\n\t\t});\n\t}\n\t/**\n\t* Registers new capabilities. This can only be called before connecting to a transport.\n\t*\n\t* The new capabilities will be merged with any existing capabilities previously given (e.g., at initialization).\n\t*/\n\tregisterCapabilities(capabilities) {\n\t\tif (this.transport) throw new Error(\"Cannot register capabilities after connecting to transport\");\n\t\tthis._capabilities = mergeCapabilities(this._capabilities, capabilities);\n\t}\n\t/**\n\t* Configure protocol version negotiation before connecting (equivalent to\n\t* passing `versionNegotiation` at construction time). Can only be called\n\t* before connecting to a transport. Passing `undefined` clears a previously\n\t* configured negotiation, restoring the default `'legacy'` posture.\n\t*\n\t* See {@linkcode ClientOptions | ClientOptions.versionNegotiation} for the mode semantics.\n\t*/\n\tsetVersionNegotiation(options) {\n\t\tif (this.transport) throw new Error(\"Cannot configure version negotiation after connecting to transport\");\n\t\tthis._versionNegotiation = options;\n\t}\n\t/**\n\t* Enforces client-side validation for `elicitation/create` and `sampling/createMessage`\n\t* regardless of how the handler was registered.\n\t*/\n\t_wrapHandler(method, handler) {\n\t\tif (method === \"elicitation/create\") return async (request, ctx) => {\n\t\t\tconst codec = codecForVersion(this._negotiatedProtocolVersion);\n\t\t\tlet validatedRequest = codec.validateRequest(\"elicitation/create\", request);\n\t\t\tif (!validatedRequest.ok && validatedRequest.reason === \"not-in-era\") validatedRequest = codec.validateInputRequest(\"elicitation/create\", request);\n\t\t\tif (!validatedRequest.ok) throw new ProtocolError(validatedRequest.reason === \"not-in-era\" ? ProtocolErrorCode.InternalError : ProtocolErrorCode.InvalidParams, validatedRequest.reason === \"not-in-era\" ? \"No wire schema for elicitation/create in the resolved era\" : `Invalid elicitation request: ${validatedRequest.message}`);\n\t\t\tconst { params } = validatedRequest.value;\n\t\t\tparams.mode = params.mode ?? \"form\";\n\t\t\tconst { supportsFormMode, supportsUrlMode } = getSupportedElicitationModes(this._capabilities.elicitation);\n\t\t\tif (params.mode === \"form\" && !supportsFormMode) throw new ProtocolError(ProtocolErrorCode.InvalidParams, \"Client does not support form-mode elicitation requests\");\n\t\t\tif (params.mode === \"url\" && !supportsUrlMode) throw new ProtocolError(ProtocolErrorCode.InvalidParams, \"Client does not support URL-mode elicitation requests\");\n\t\t\tconst result = await handler(request, ctx);\n\t\t\tlet validationResult = codec.validateResult(\"elicitation/create\", result);\n\t\t\tif (!validationResult.ok && validationResult.reason === \"not-in-era\") validationResult = codec.validateInputResponse(\"elicitation/create\", result);\n\t\t\tif (!validationResult.ok) throw new ProtocolError(validationResult.reason === \"not-in-era\" ? ProtocolErrorCode.InternalError : ProtocolErrorCode.InvalidParams, validationResult.reason === \"not-in-era\" ? \"No wire schema for elicitation/create in the resolved era\" : `Invalid elicitation result: ${validationResult.message}`);\n\t\t\tconst validatedResult = validationResult.value;\n\t\t\tconst requestedSchema = params.mode === \"form\" ? params.requestedSchema : void 0;\n\t\t\tif (params.mode === \"form\" && validatedResult.action === \"accept\" && validatedResult.content && requestedSchema && this._capabilities.elicitation?.form?.applyDefaults) try {\n\t\t\t\tapplyElicitationDefaults(requestedSchema, validatedResult.content);\n\t\t\t} catch {}\n\t\t\treturn validatedResult;\n\t\t};\n\t\tif (method === \"sampling/createMessage\") return async (request, ctx) => {\n\t\t\tconst codec = codecForVersion(this._negotiatedProtocolVersion);\n\t\t\tlet validatedRequest = codec.validateRequest(\"sampling/createMessage\", request);\n\t\t\tif (!validatedRequest.ok && validatedRequest.reason === \"not-in-era\") validatedRequest = codec.validateInputRequest(\"sampling/createMessage\", request);\n\t\t\tif (!validatedRequest.ok) throw new ProtocolError(validatedRequest.reason === \"not-in-era\" ? ProtocolErrorCode.InternalError : ProtocolErrorCode.InvalidParams, validatedRequest.reason === \"not-in-era\" ? \"No wire schema for sampling/createMessage in the resolved era\" : `Invalid sampling request: ${validatedRequest.message}`);\n\t\t\tconst { params } = validatedRequest.value;\n\t\t\tconst result = await handler(request, ctx);\n\t\t\tconst hasTools = Boolean(params.tools || params.toolChoice);\n\t\t\tlet validatedResult = codec.samplingResultVariant(hasTools, result);\n\t\t\tif (!validatedResult.ok && validatedResult.reason === \"not-in-era\") validatedResult = codec.validateInputResponse(\"sampling/createMessage\", result);\n\t\t\tif (!validatedResult.ok) throw new ProtocolError(validatedResult.reason === \"not-in-era\" ? ProtocolErrorCode.InternalError : ProtocolErrorCode.InvalidParams, validatedResult.reason === \"not-in-era\" ? \"No result schema for sampling/createMessage in the resolved era\" : `Invalid sampling result: ${validatedResult.message}`);\n\t\t\treturn validatedResult.value;\n\t\t};\n\t\treturn handler;\n\t}\n\tassertCapability(capability, method) {\n\t\tif (!this._serverCapabilities?.[capability]) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support ${capability} (required for ${method})`);\n\t}\n\t/**\n\t* Connects to a server via the given transport and performs the MCP initialization handshake.\n\t*\n\t* @example Basic usage (stdio)\n\t* ```ts source=\"./client.examples.ts#Client_connect_stdio\"\n\t* const client = new Client({ name: 'my-client', version: '1.0.0' });\n\t* const transport = new StdioClientTransport({ command: 'my-mcp-server' });\n\t* await client.connect(transport);\n\t* ```\n\t*\n\t* @example Streamable HTTP with SSE fallback\n\t* ```ts source=\"./client.examples.ts#Client_connect_sseFallback\"\n\t* const baseUrl = new URL(url);\n\t*\n\t* try {\n\t* // Try modern Streamable HTTP transport first\n\t* const client = new Client({ name: 'my-client', version: '1.0.0' });\n\t* const transport = new StreamableHTTPClientTransport(baseUrl);\n\t* await client.connect(transport);\n\t* return { client, transport };\n\t* } catch {\n\t* // Fall back to legacy SSE transport\n\t* const client = new Client({ name: 'my-client', version: '1.0.0' });\n\t* const transport = new SSEClientTransport(baseUrl);\n\t* await client.connect(transport);\n\t* return { client, transport };\n\t* }\n\t* ```\n\t*/\n\tasync connect(transport, options) {\n\t\tif (options?.prior != null) return this._connectFromPrior(transport, validatePrior(options.prior), options);\n\t\tconst negotiation = resolveVersionNegotiation(this._versionNegotiation, this._supportedProtocolVersionsOption);\n\t\tif (negotiation.kind !== \"legacy\") return this._connectNegotiated(transport, negotiation, options);\n\t\treturn this._connectPlainLegacy(transport, options);\n\t}\n\t/**\n\t* Plain legacy connect — the pinned 2025 sequence, byte-untouched. The\n\t* `mode: 'legacy'` connect body, shared with the `prior` legacy verdict.\n\t*/\n\tasync _connectPlainLegacy(transport, options) {\n\t\tawait super.connect(transport);\n\t\tif (transport.sessionId !== void 0) {\n\t\t\tconst negotiatedProtocolVersion = this._negotiatedProtocolVersion;\n\t\t\tif (negotiatedProtocolVersion !== void 0) transport.setProtocolVersion?.(negotiatedProtocolVersion);\n\t\t\treturn;\n\t\t}\n\t\tthis._resetConnectionState();\n\t\tawait this._legacyHandshake(transport, options);\n\t}\n\t/**\n\t* The 2025 `initialize` handshake — the body of the plain legacy connect and\n\t* the `'auto'`-mode fallback path (same `initialize` body, zero 2026 headers;\n\t* on the stdio sibling path it opens the session child's fresh pipe, in the\n\t* in-place modes it rides the probed connection). Callers clear the negotiated protocol version before\n\t* the handshake; its completion sets the negotiated (legacy) version.\n\t*/\n\tasync _legacyHandshake(transport, options) {\n\t\tconst legacyVersions = legacyProtocolVersions(this._supportedProtocolVersions);\n\t\ttry {\n\t\t\tconst offeredVersion = legacyVersions[0];\n\t\t\tif (offeredVersion === void 0) throw new SdkError(SdkErrorCode.EraNegotiationFailed, \"Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version\");\n\t\t\tconst result = await this.request({\n\t\t\t\tmethod: \"initialize\",\n\t\t\t\tparams: {\n\t\t\t\t\tprotocolVersion: offeredVersion,\n\t\t\t\t\tcapabilities: this._capabilities,\n\t\t\t\t\tclientInfo: this._clientInfo\n\t\t\t\t}\n\t\t\t}, options);\n\t\t\tif (result === void 0) throw new Error(`Server sent invalid initialize result: ${result}`);\n\t\t\tif (!legacyVersions.includes(result.protocolVersion)) throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);\n\t\t\tthis._serverCapabilities = result.capabilities;\n\t\t\tthis._serverVersion = result.serverInfo;\n\t\t\tthis._cache.setServerIdentity(this._deriveServerIdentity(transport));\n\t\t\tif (transport.setProtocolVersion) transport.setProtocolVersion(result.protocolVersion);\n\t\t\tthis._instructions = result.instructions;\n\t\t\tawait this.notification({ method: \"notifications/initialized\" });\n\t\t\tthis._negotiatedProtocolVersion = result.protocolVersion;\n\t\t\tif (this._listChangedConfig) this._setupListChangedHandlers(this._listChangedConfig);\n\t\t} catch (error) {\n\t\t\tthis.close();\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* Negotiated connect (mode `'auto'` or `{ pin }`): probe with `server/discover`\n\t* before the Protocol machinery attaches — on a disposable sibling process for\n\t* the SDK's stdio transport, in place otherwise — then either establish the\n\t* modern era or perform the plain legacy handshake.\n\t*/\n\tasync _connectNegotiated(transport, negotiation, options) {\n\t\tif (transport.sessionId !== void 0) {\n\t\t\tawait super.connect(transport);\n\t\t\tconst negotiatedProtocolVersion = this._negotiatedProtocolVersion;\n\t\t\tif (negotiatedProtocolVersion !== void 0 && transport.setProtocolVersion) transport.setProtocolVersion(negotiatedProtocolVersion);\n\t\t\treturn;\n\t\t}\n\t\tthis._resetConnectionState();\n\t\tlet result;\n\t\ttry {\n\t\t\tconst transportKind = detectProbeTransportKind(transport);\n\t\t\tconst baseDeps = {\n\t\t\t\tclientInfo: this._clientInfo,\n\t\t\t\tcapabilities: this._capabilities,\n\t\t\t\tenvironment: detectProbeEnvironment(),\n\t\t\t\tdefaultTimeoutMs: options?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC\n\t\t\t};\n\t\t\tconst stdioParams = transportKind === \"stdio\" ? readStdioServerParams(transport) : void 0;\n\t\t\tresult = stdioParams === void 0 ? await negotiateEra(negotiation, {\n\t\t\t\t...baseDeps,\n\t\t\t\ttransport,\n\t\t\t\ttransportKind\n\t\t\t}) : await negotiateStdioViaSibling(negotiation, transport, stdioParams, baseDeps);\n\t\t} catch (error) {\n\t\t\tawait transport.close().catch(() => {});\n\t\t\tdisarmSpentCloseGuard(transport);\n\t\t\tthrow error;\n\t\t}\n\t\tdisarmSpentCloseGuard(transport);\n\t\tawait super.connect(transport);\n\t\tif (result.era === \"legacy\") {\n\t\t\tawait this._legacyHandshake(transport, options);\n\t\t\treturn;\n\t\t}\n\t\tthis._serverCapabilities = result.discover.capabilities;\n\t\tthis._serverVersion = serverInfoFromDiscover(result.discover);\n\t\tthis._cache.setServerIdentity(this._deriveServerIdentity(transport));\n\t\tthis._instructions = result.discover.instructions;\n\t\tthis._discoverResult = result.discover;\n\t\tthis._negotiatedProtocolVersion = result.version;\n\t\tif (transport.setProtocolVersion) transport.setProtocolVersion(result.version);\n\t\tif (this._listChangedConfig) {\n\t\t\tconst config = this._listChangedConfig;\n\t\t\tconst advertised = this._serverCapabilities;\n\t\t\tconst effective = {\n\t\t\t\t...config.tools && advertised?.tools?.listChanged && { tools: config.tools },\n\t\t\t\t...config.prompts && advertised?.prompts?.listChanged && { prompts: config.prompts },\n\t\t\t\t...config.resources && advertised?.resources?.listChanged && { resources: config.resources }\n\t\t\t};\n\t\t\tlet handlersRegistered = true;\n\t\t\ttry {\n\t\t\t\tthis._setupListChangedHandlers(effective);\n\t\t\t} catch (error) {\n\t\t\t\thandlersRegistered = false;\n\t\t\t\tthis.onerror?.(error instanceof Error ? error : new Error(String(error)));\n\t\t\t}\n\t\t\tconst filter = handlersRegistered ? {\n\t\t\t\t...effective.tools && { toolsListChanged: true },\n\t\t\t\t...effective.prompts && { promptsListChanged: true },\n\t\t\t\t...effective.resources && { resourcesListChanged: true }\n\t\t\t} : {};\n\t\t\tif (Object.keys(filter).length > 0) {\n\t\t\t\tconst ackAbort = new AbortController();\n\t\t\t\tconst onConnectAbort = () => ackAbort.abort(options?.signal?.reason);\n\t\t\t\tif (options?.signal?.aborted) onConnectAbort();\n\t\t\t\toptions?.signal?.addEventListener(\"abort\", onConnectAbort);\n\t\t\t\ttry {\n\t\t\t\t\tthis._autoOpenedSubscription = await this.listen(filter, {\n\t\t\t\t\t\ttimeout: options?.timeout,\n\t\t\t\t\t\tsignal: ackAbort.signal\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (options?.signal?.aborted) {\n\t\t\t\t\t\tawait this.close().catch(() => {});\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t\tthis.onerror?.(error instanceof Error ? error : new Error(String(error)));\n\t\t\t\t} finally {\n\t\t\t\t\toptions?.signal?.removeEventListener(\"abort\", onConnectAbort);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Connect from a validated {@linkcode PriorDiscovery}: the modern arm\n\t* adopts the `DiscoverResult` (zero round trips; `EraNegotiationFailed`\n\t* on no 2026-07-28+ overlap), the legacy arm runs the plain legacy connect.\n\t*/\n\tasync _connectFromPrior(transport, prior, options) {\n\t\tif (prior.kind === \"legacy\") return this._connectPlainLegacy(transport, options);\n\t\tconst discover = prior.discover;\n\t\tthis._resetConnectionState();\n\t\tconst explicit = this._supportedProtocolVersionsOption;\n\t\tconst version = (explicit && modernProtocolVersions(explicit).length > 0 ? modernProtocolVersions(explicit) : SUPPORTED_MODERN_PROTOCOL_VERSIONS).find((v) => discover.supportedVersions.includes(v));\n\t\tif (version === void 0) throw new SdkError(SdkErrorCode.EraNegotiationFailed, \"connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client's supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: 'legacy' } to skip the probe and initialize directly, or use versionNegotiation: { mode: 'auto' } to re-probe with legacy fallback.\");\n\t\tawait super.connect(transport);\n\t\tthis._discoverResult = discover;\n\t\tthis._serverCapabilities = discover.capabilities;\n\t\tthis._serverVersion = serverInfoFromDiscover(discover);\n\t\tthis._cache.setServerIdentity(this._deriveServerIdentity(transport));\n\t\tthis._instructions = discover.instructions;\n\t\tthis._negotiatedProtocolVersion = version;\n\t\ttransport.setProtocolVersion?.(version);\n\t\tif (this._listChangedConfig) try {\n\t\t\tthis._setupListChangedHandlers(this._listChangedConfig);\n\t\t} catch (error) {\n\t\t\tthis.onerror?.(error instanceof Error ? error : new Error(String(error)));\n\t\t}\n\t}\n\t/**\n\t* After initialization has completed, this will be populated with the server's reported capabilities.\n\t*/\n\tgetServerCapabilities() {\n\t\treturn this._serverCapabilities;\n\t}\n\t/**\n\t* The connected server's self-reported name and version, when it\n\t* identified itself: required on the legacy `initialize` result; a spec\n\t* SHOULD in the discover result's `_meta` on 2026-07-28, so a successful\n\t* modern connect against an anonymous server leaves this `undefined`.\n\t*/\n\tgetServerVersion() {\n\t\treturn this._serverVersion;\n\t}\n\t/**\n\t* The connected server's identity for response-cache partitioning. The\n\t* `serverInfo` `name@version` pair when available (required on\n\t* `initialize`; a SHOULD in the discover result's `_meta` since spec PR\n\t* #3002); falls back to the transport's `sessionId`, then to a\n\t* per-connection surrogate. The surrogate matters since #3002 made\n\t* identity optional: without it, two identity-less servers reached over\n\t* sessionId-less transports would share the cache's pre-connect `''`\n\t* partition and read each other's entries — no stable identity means no\n\t* cross-connection cache reuse. The value itself is server-controlled —\n\t* the collision-safety of the storage partition comes from\n\t* {@linkcode ClientResponseCache}'s JSON-array encoding around it, not\n\t* from any character it does or does not contain.\n\t*/\n\t_deriveServerIdentity(transport) {\n\t\tconst v = this._serverVersion;\n\t\tif (v !== void 0) return `${v.name}@${v.version}`;\n\t\treturn transport.sessionId ?? `anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`;\n\t}\n\t/**\n\t* After initialization has completed, this will be populated with the protocol version negotiated\n\t* during the initialize handshake. When manually reconstructing a transport for reconnection, pass this\n\t* value to the new transport so it continues sending the required `mcp-protocol-version` header.\n\t*/\n\tgetNegotiatedProtocolVersion() {\n\t\treturn this._negotiatedProtocolVersion;\n\t}\n\t/**\n\t* After initialization has completed, this returns the protocol era of the\n\t* connection: `'modern'` when the connection negotiated a 2026-07-28+\n\t* revision (via `server/discover`), `'legacy'` for the 2025-era\n\t* `initialize` handshake, or `undefined` before the connection is\n\t* established.\n\t*/\n\tgetProtocolEra() {\n\t\tconst version = this._negotiatedProtocolVersion;\n\t\tif (version === void 0) return void 0;\n\t\treturn isModernProtocolVersion(version) ? \"modern\" : \"legacy\";\n\t}\n\t/**\n\t* After initialization has completed, this may be populated with information about the server's instructions.\n\t*/\n\tgetInstructions() {\n\t\treturn this._instructions;\n\t}\n\t/**\n\t* The {@linkcode DiscoverResult} from the last `'auto'`/pinned probe,\n\t* {@linkcode discover} call, or `connect({ prior })` that adopted a\n\t* modern verdict (a legacy verdict leaves this `undefined` — there is no\n\t* `DiscoverResult` on that path). Persistable via `JSON.stringify`; wrap\n\t* as `{ kind: 'modern', discover }` and feed to {@linkcode ConnectOptions}\n\t* `prior`.\n\t*/\n\tgetDiscoverResult() {\n\t\treturn this._discoverResult;\n\t}\n\tassertCapabilityForMethod(method) {\n\t\tswitch (method) {\n\t\t\tcase \"logging/setLevel\":\n\t\t\t\tif (!this._serverCapabilities?.logging) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support logging (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"prompts/get\":\n\t\t\tcase \"prompts/list\":\n\t\t\t\tif (!this._serverCapabilities?.prompts) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support prompts (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"resources/list\":\n\t\t\tcase \"resources/templates/list\":\n\t\t\tcase \"resources/read\":\n\t\t\tcase \"resources/subscribe\":\n\t\t\tcase \"resources/unsubscribe\":\n\t\t\t\tif (!this._serverCapabilities?.resources) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support resources (required for ${method})`);\n\t\t\t\tif (method === \"resources/subscribe\" && !this._serverCapabilities.resources.subscribe) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support resource subscriptions (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"tools/call\":\n\t\t\tcase \"tools/list\":\n\t\t\t\tif (!this._serverCapabilities?.tools) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support tools (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"completion/complete\":\n\t\t\t\tif (!this._serverCapabilities?.completions) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Server does not support completions (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"initialize\": break;\n\t\t\tcase \"server/discover\": break;\n\t\t\tcase \"ping\": break;\n\t\t}\n\t}\n\tassertNotificationCapability(method) {\n\t\tswitch (method) {\n\t\t\tcase \"notifications/roots/list_changed\":\n\t\t\t\tif (!this._capabilities.roots?.listChanged) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support roots list changed notifications (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"notifications/initialized\": break;\n\t\t\tcase \"notifications/cancelled\": break;\n\t\t\tcase \"notifications/progress\": break;\n\t\t}\n\t}\n\tassertRequestHandlerCapability(method) {\n\t\tswitch (method) {\n\t\t\tcase \"sampling/createMessage\":\n\t\t\t\tif (!this._capabilities.sampling) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support sampling capability (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"elicitation/create\":\n\t\t\t\tif (!this._capabilities.elicitation) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support elicitation capability (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"roots/list\":\n\t\t\t\tif (!this._capabilities.roots) throw new SdkError(SdkErrorCode.CapabilityNotSupported, `Client does not support roots capability (required for ${method})`);\n\t\t\t\tbreak;\n\t\t\tcase \"ping\": break;\n\t\t}\n\t}\n\tasync ping(options) {\n\t\treturn this.request({ method: \"ping\" }, options);\n\t}\n\t/**\n\t* Send `server/discover` (2026-07-28+) and record the result for\n\t* {@linkcode getDiscoverResult}.\n\t*/\n\tasync discover(options) {\n\t\tconst result = await this._requestWithSchema({ method: \"server/discover\" }, DiscoverResultSchema, options);\n\t\tthis._discoverResult = result;\n\t\treturn result;\n\t}\n\t/** Requests argument autocompletion suggestions from the server for a prompt or resource. */\n\tasync complete(params, options) {\n\t\treturn this.request({\n\t\t\tmethod: \"completion/complete\",\n\t\t\tparams\n\t\t}, options);\n\t}\n\t/**\n\t* Sets the minimum severity level for log messages sent by the server.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n\t* Remains functional during the deprecation window (at least twelve months).\n\t* Migrate to stderr logging (STDIO servers) or OpenTelemetry.\n\t*/\n\tasync setLoggingLevel(level, options) {\n\t\treturn this.request({\n\t\t\tmethod: \"logging/setLevel\",\n\t\t\tparams: { level }\n\t\t}, options);\n\t}\n\t/** Retrieves a prompt by name from the server, passing the given arguments for template substitution. */\n\tasync getPrompt(params, options) {\n\t\treturn this.request({\n\t\t\tmethod: \"prompts/get\",\n\t\t\tparams\n\t\t}, options);\n\t}\n\t/**\n\t* Lists available prompts.\n\t*\n\t* Called without a `cursor` (the common case), this walks every page and\n\t* returns the complete aggregated list with no `nextCursor`; the\n\t* aggregate is also written to the {@linkcode ResponseCacheStore}. Pass an\n\t* explicit `{ cursor }` to fetch a single page and walk pagination\n\t* yourself — the per-page path returns the server's raw page (with\n\t* `nextCursor` for the next call) and does not write the response cache.\n\t* The auto-aggregate path is capped by\n\t* {@linkcode ClientOptions | ClientOptions.listMaxPages} (default 64); the per-page path\n\t* is not.\n\t*\n\t* Returns an empty list if the server does not advertise prompts capability\n\t* (or throws if {@linkcode ClientOptions.enforceStrictCapabilities} is enabled).\n\t*\n\t* @example\n\t* ```ts source=\"./client.examples.ts#Client_listPrompts_pagination\"\n\t* // No cursor → all pages aggregated for you.\n\t* const { prompts } = await client.listPrompts();\n\t* console.log(\n\t* 'Available prompts:',\n\t* prompts.map(p => p.name)\n\t* );\n\t* ```\n\t*/\n\tasync listPrompts(params, options) {\n\t\tif (!this._serverCapabilities?.prompts && !this._enforceStrictCapabilities) {\n\t\t\tconsole.debug(\"Client.listPrompts() called but server does not advertise prompts capability - returning empty list\");\n\t\t\treturn { prompts: [] };\n\t\t}\n\t\tif (params?.cursor !== void 0) return this.request({\n\t\t\tmethod: \"prompts/list\",\n\t\t\tparams\n\t\t}, options);\n\t\tconst hit = await this._serveFromCache(\"prompts/list\", void 0, options);\n\t\tif (hit !== void 0) return hit;\n\t\treturn this._listAllPages(\"prompts/list\", params, options, (acc, page) => acc.prompts.push(...page.prompts));\n\t}\n\t/**\n\t* Lists available resources.\n\t*\n\t* Called without a `cursor` (the common case), this walks every page and\n\t* returns the complete aggregated list with no `nextCursor`; the\n\t* aggregate is also written to the {@linkcode ResponseCacheStore}. Pass an\n\t* explicit `{ cursor }` to fetch a single page and walk pagination\n\t* yourself — the per-page path returns the server's raw page (with\n\t* `nextCursor` for the next call) and does not write the response cache.\n\t* The auto-aggregate path is capped by\n\t* {@linkcode ClientOptions | ClientOptions.listMaxPages} (default 64); the per-page path\n\t* is not.\n\t*\n\t* Returns an empty list if the server does not advertise resources capability\n\t* (or throws if {@linkcode ClientOptions.enforceStrictCapabilities} is enabled).\n\t*\n\t* @example\n\t* ```ts source=\"./client.examples.ts#Client_listResources_pagination\"\n\t* // No cursor → all pages aggregated for you.\n\t* const { resources } = await client.listResources();\n\t* console.log(\n\t* 'Available resources:',\n\t* resources.map(r => r.name)\n\t* );\n\t* ```\n\t*/\n\tasync listResources(params, options) {\n\t\tif (!this._serverCapabilities?.resources && !this._enforceStrictCapabilities) {\n\t\t\tconsole.debug(\"Client.listResources() called but server does not advertise resources capability - returning empty list\");\n\t\t\treturn { resources: [] };\n\t\t}\n\t\tif (params?.cursor !== void 0) return this.request({\n\t\t\tmethod: \"resources/list\",\n\t\t\tparams\n\t\t}, options);\n\t\tconst hit = await this._serveFromCache(\"resources/list\", void 0, options);\n\t\tif (hit !== void 0) return hit;\n\t\treturn this._listAllPages(\"resources/list\", params, options, (acc, page) => acc.resources.push(...page.resources));\n\t}\n\t/**\n\t* Lists available resource URI templates for dynamic resources.\n\t*\n\t* Called without a `cursor`, this walks every page and returns the\n\t* complete aggregated list with no `nextCursor`; the aggregate is\n\t* also written to the {@linkcode ResponseCacheStore}. Pass an explicit\n\t* `{ cursor }` to fetch a single page — see\n\t* {@linkcode listResources | listResources()} for the per-page contract.\n\t*\n\t* Returns an empty list if the server does not advertise resources capability\n\t* (or throws if {@linkcode ClientOptions.enforceStrictCapabilities} is enabled).\n\t*/\n\tasync listResourceTemplates(params, options) {\n\t\tif (!this._serverCapabilities?.resources && !this._enforceStrictCapabilities) {\n\t\t\tconsole.debug(\"Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list\");\n\t\t\treturn { resourceTemplates: [] };\n\t\t}\n\t\tif (params?.cursor !== void 0) return this.request({\n\t\t\tmethod: \"resources/templates/list\",\n\t\t\tparams\n\t\t}, options);\n\t\tconst hit = await this._serveFromCache(\"resources/templates/list\", void 0, options);\n\t\tif (hit !== void 0) return hit;\n\t\treturn this._listAllPages(\"resources/templates/list\", params, options, (acc, page) => acc.resourceTemplates.push(...page.resourceTemplates));\n\t}\n\t/**\n\t* Walk every page of a paginated list verb, aggregate, and write ONE\n\t* entry to the response cache. Internal — backs the public `list*`\n\t* methods' no-`cursor` auto-aggregate path. Page 1's result object is\n\t* mutated in place (its items array is extended; `nextCursor` is\n\t* cleared); page-1 metadata (`ttlMs`, `cacheScope`, `_meta`) is preserved.\n\t* A `nextCursor` that repeats stops the walk (defence against a\n\t* non-converging server, mcp.d's `drainList` guard);\n\t* {@linkcode ClientOptions.listMaxPages} is a hard cap — hitting it\n\t* throws, so a partial aggregate is never cached. The\n\t* captured-generation guard skips the write when a `list_changed` landed\n\t* mid-walk, so the eviction is never overwritten by a stale aggregate.\n\t* `finalize` runs on the complete aggregate before the cache write — the\n\t* SEP-2243 invalid-`x-mcp-header` exclusion hooks here so the cached\n\t* `tools/list` entry is already filtered.\n\t*\n\t* The caller's `baseParams` (everything except `cursor`) is threaded into\n\t* every page request — page 1 sends `{...baseParams}`, later pages\n\t* `{...baseParams, cursor}` — so a typed, documented `_meta` (e.g. W3C\n\t* trace context) supplied to the public `list*()` reaches every wire\n\t* request the walk issues.\n\t*/\n\tasync _listAllPages(method, baseParams, options, append, finalize) {\n\t\tconst bypass = options?.cacheMode === \"bypass\";\n\t\tconst generation = this._cache.captureGeneration(method);\n\t\tconst acc = await this.request({\n\t\t\tmethod,\n\t\t\t...baseParams && { params: { ...baseParams } }\n\t\t}, options);\n\t\tlet cursor = acc.nextCursor;\n\t\tconst seen = /* @__PURE__ */ new Set();\n\t\tlet pages = 1;\n\t\twhile (cursor !== void 0 && !seen.has(cursor)) {\n\t\t\tif (this._listMaxPages !== 0 && pages >= this._listMaxPages) throw new SdkError(SdkErrorCode.ListPaginationExceeded, `${method}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`, {\n\t\t\t\tmethod,\n\t\t\t\tlistMaxPages: this._listMaxPages\n\t\t\t});\n\t\t\tseen.add(cursor);\n\t\t\tconst page = await this.request({\n\t\t\t\tmethod,\n\t\t\t\tparams: {\n\t\t\t\t\t...baseParams,\n\t\t\t\t\tcursor\n\t\t\t\t}\n\t\t\t}, options);\n\t\t\tappend(acc, page);\n\t\t\tcursor = page.nextCursor;\n\t\t\tpages++;\n\t\t}\n\t\tdelete acc.nextCursor;\n\t\tfinalize?.(acc);\n\t\tif (bypass) return acc;\n\t\tawait this._cache.write(method, acc, generation, this._freshness(acc));\n\t\treturn acc;\n\t}\n\t/**\n\t* Compute the {@linkcode ClientResponseCache.write} freshness payload from\n\t* a cacheable result body. The single seam through which the client reads\n\t* `ttlMs`/`cacheScope` (mcp.d's `cachedFetch` engine). The fields pass\n\t* through the loose result schema, so they are read off the runtime body;\n\t* a missing `ttlMs` falls back to\n\t* {@linkcode ClientOptions | ClientOptions.defaultCacheTtlMs}; an explicit server-sent\n\t* `ttlMs` (including `0` — the spec's \"immediately stale\") is honoured\n\t* as-is. The default of `0` means `expiresAt === now()` ⇒ never served,\n\t* only stored. A missing `cacheScope` is treated as `'private'` — the\n\t* spec's `'public'` grant (\"any client … MAY serve to any user\") is too\n\t* strong to infer by default, and matches this SDK's server-side stamp\n\t* default.\n\t*/\n\t_freshness(result, params) {\n\t\tconst body = result;\n\t\tconst ttlMs = typeof body.ttlMs === \"number\" ? body.ttlMs : this._defaultCacheTtlMs;\n\t\tconst scope = body.cacheScope === \"public\" ? \"public\" : \"private\";\n\t\treturn {\n\t\t\texpiresAt: this._cache.now() + Math.min(Math.max(0, ttlMs), MAX_CACHE_TTL_MS),\n\t\t\tscope,\n\t\t\tparams\n\t\t};\n\t}\n\t/**\n\t* The cache-serving front of every cacheable verb (mcp.d's `cachedFetch`\n\t* read half): under `cacheMode: 'use'` (the default), a fresh held entry\n\t* is served and the round trip is skipped. `'refresh'` and `'bypass'`\n\t* always fetch (the caller decides whether to write). Freshness and\n\t* decoding live in {@linkcode ClientResponseCache.read}; every hit is\n\t* freshly parsed, so the caller owns it outright. A custom store\n\t* whose `get()` rejects is routed to `onerror` and treated as a miss —\n\t* cache bookkeeping never blocks a request from reaching the wire.\n\t*/\n\tasync _serveFromCache(method, params, options) {\n\t\tif (options?.cacheMode === \"bypass\" || options?.cacheMode === \"refresh\") return void 0;\n\t\tconst hit = await this._cache.read(method, params).catch((error) => void this._reportStoreError(error));\n\t\tif (hit !== void 0) {\n\t\t\tif (options?.signal?.aborted) {\n\t\t\t\tconst reason = options.signal.reason;\n\t\t\t\tthrow reason instanceof SdkError ? reason : new SdkError(SdkErrorCode.RequestTimeout, String(reason));\n\t\t\t}\n\t\t\treturn hit.value;\n\t\t}\n\t}\n\t/** Route a custom-store failure to `onerror` without aborting the surrounding dispatch. */\n\t_reportStoreError(e) {\n\t\tthis.onerror?.(e instanceof Error ? e : new Error(String(e)));\n\t}\n\t/**\n\t* Compile a single tool's `outputSchema`. Passed as the compile callback to\n\t* {@linkcode ClientResponseCache.outputValidator} so the cache class stays\n\t* free of any validator-provider dependency, and called directly for the\n\t* `options.toolDefinition` path of {@linkcode callTool} (a one-off\n\t* caller-supplied definition is compiled in isolation and never enters the\n\t* cache, so it cannot poison the listed tool of the same name).\n\t*\n\t* Returns `undefined` when the tool has no `outputSchema`, or a\n\t* discriminated `{ok}` result otherwise. SEP-2106: ANY throw from the\n\t* validator engine — unsupported `$schema` dialect, invalid `pattern`\n\t* regex, unresolvable `$ref`, or any other engine error — is captured as\n\t* `{ok: false, compileError}` so one bad schema does not poison the rest\n\t* of the listing; `callTool()` surfaces it as an `InvalidParams` error\n\t* before the request. The `{ok}` discriminator (not\n\t* `compileError !== undefined`) means a custom provider that does\n\t* `throw undefined` is still treated as a captured failure.\n\t*/\n\t_compileOutputValidator(tool) {\n\t\tif (!tool.outputSchema) return void 0;\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tok: true,\n\t\t\t\tvalidator: this._jsonSchemaValidator.getValidator(tool.outputSchema)\n\t\t\t};\n\t\t} catch (error) {\n\t\t\treturn {\n\t\t\t\tok: false,\n\t\t\t\tcompileError: error\n\t\t\t};\n\t\t}\n\t}\n\t/**\n\t* Resolve the SEP-2243 `x-mcp-header` declaration scan for a tool name.\n\t*\n\t* The caller-supplied `toolDefinition` escape hatch wins; otherwise the\n\t* cached `tools/list` entry (via the cache's `toolDefinition`) is the\n\t* source. Freshness is the response cache's lifecycle: `list_changed`\n\t* evicts, otherwise the held schema is the best information available\n\t* regardless of age, and a stale schema is recovered through the\n\t* `HEADER_MISMATCH` → evict-refetch-retry path in {@linkcode callTool}.\n\t* On a miss the call proceeds without `Mcp-Param-*` headers (the spec's\n\t* \"client SHOULD send without custom headers\" guidance) and relies on the\n\t* same recovery.\n\t*/\n\tasync _resolveXMcpHeaderScan(name, override) {\n\t\tconst tool = override ?? await this._cache.toolDefinition(name);\n\t\treturn tool === void 0 ? void 0 : scanXMcpHeaderDeclarations(tool.inputSchema);\n\t}\n\t/**\n\t* Reads the contents of a resource by URI.\n\t*\n\t* Honours the result's `ttlMs`/`cacheScope` (SEP-2549): a still-fresh\n\t* cached body for the same `uri` is returned without a round trip\n\t* (`cacheMode: 'use'`, the default). The cache key is `{method, uri}`\n\t* partitioned by the resolved scope — `'private'` (the default when the\n\t* server omits the field) is stored under this client's\n\t* {@linkcode ClientOptions | ClientOptions.cachePartition}, so a shared\n\t* store cannot serve one principal's resource body to another. Unlike the\n\t* list verbs, a result whose resolved TTL is ≤0 is **not** stored\n\t* (`resources/read` has no derived index and the URI keyspace is\n\t* unbounded).\n\t*/\n\tasync readResource(params, options) {\n\t\tconst hit = await this._serveFromCache(\"resources/read\", params.uri, options);\n\t\tif (hit !== void 0) return hit;\n\t\tconst generation = this._cache.captureGeneration(\"resources/read\", params.uri);\n\t\tconst result = await this.request({\n\t\t\tmethod: \"resources/read\",\n\t\t\tparams\n\t\t}, options);\n\t\tif (options?.cacheMode !== \"bypass\") {\n\t\t\tconst freshness = this._freshness(result, params.uri);\n\t\t\tif (freshness.expiresAt > this._cache.now()) await this._cache.write(\"resources/read\", result, generation, freshness);\n\t\t\telse if (options?.cacheMode === \"refresh\") await this._cache.evictKey(\"resources/read\", params.uri);\n\t\t}\n\t\treturn result;\n\t}\n\t/** Subscribes to change notifications for a resource. The server must support resource subscriptions. */\n\tasync subscribeResource(params, options) {\n\t\treturn this.request({\n\t\t\tmethod: \"resources/subscribe\",\n\t\t\tparams\n\t\t}, options);\n\t}\n\t/** Unsubscribes from change notifications for a resource. */\n\tasync unsubscribeResource(params, options) {\n\t\treturn this.request({\n\t\t\tmethod: \"resources/unsubscribe\",\n\t\t\tparams\n\t\t}, options);\n\t}\n\t/**\n\t* Opens a `subscriptions/listen` stream (protocol revision 2026-07-28).\n\t*\n\t* Resolves once the server's `notifications/subscriptions/acknowledged`\n\t* arrives (the standard request timeout applies to this ack phase). Change\n\t* notifications delivered on the stream are dispatched to the existing\n\t* {@linkcode setNotificationHandler} registrations — the same handlers the\n\t* 2025-era unsolicited notifications fire on a legacy connection — so\n\t* `listen()` is era-transparent for consumers that already register those.\n\t*\n\t* `close()` tears the subscription down by aborting the listen request's\n\t* `requestSignal` (closes the SSE stream where the transport honors it)\n\t* AND sending `notifications/cancelled` referencing the listen request id\n\t* — both, unconditionally, so any spec-compliant server on any transport\n\t* sees the cancel. No automatic re-listen — call `listen()` again to\n\t* re-establish.\n\t*\n\t* On a 2025-era connection this throws a typed\n\t* {@linkcode SdkErrorCode.MethodNotSupportedByProtocolVersion} steering to\n\t* `resources/subscribe` and `ClientOptions.listChanged` (the legacy\n\t* unsolicited delivery model still applies there); no transparent shim.\n\t*/\n\tasync listen(filter, options) {\n\t\tif (this.transport === void 0) throw new SdkError(SdkErrorCode.NotConnected, \"Not connected\");\n\t\tconst negotiated = this._negotiatedProtocolVersion;\n\t\tif (negotiated === void 0 || !isModernProtocolVersion(negotiated)) throw new SdkError(SdkErrorCode.MethodNotSupportedByProtocolVersion, `subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${negotiated ?? \"none\"}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`, {\n\t\t\tmethod: \"subscriptions/listen\",\n\t\t\tprotocolVersion: negotiated\n\t\t});\n\t\tif (options?.signal?.aborted) {\n\t\t\tconst reason = options.signal.reason;\n\t\t\tthrow reason instanceof SdkError ? reason : new SdkError(SdkErrorCode.RequestTimeout, String(reason));\n\t\t}\n\t\tconst requestAbort = new AbortController();\n\t\tconst listenId = `listen:${this._nextListenId++}`;\n\t\tlet state = \"opening\";\n\t\tlet ackTimer;\n\t\tlet onCallerAbort;\n\t\tlet resolveOpening;\n\t\tlet rejectOpening;\n\t\tconst opening = new Promise((resolve, reject) => {\n\t\t\tresolveOpening = resolve;\n\t\t\trejectOpening = reject;\n\t\t});\n\t\tlet resolveClosed;\n\t\tconst closed = new Promise((resolve) => {\n\t\t\tresolveClosed = resolve;\n\t\t});\n\t\tconst settle = (outcome) => {\n\t\t\tif (state === \"closed\") return;\n\t\t\tconst wasOpening = state === \"opening\";\n\t\t\tif (ackTimer !== void 0) {\n\t\t\t\tclearTimeout(ackTimer);\n\t\t\t\tackTimer = void 0;\n\t\t\t}\n\t\t\tif (\"ack\" in outcome) {\n\t\t\t\tstate = \"open\";\n\t\t\t\tresolveOpening(outcome.ack);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tstate = \"closed\";\n\t\t\tif (onCallerAbort !== void 0) options?.signal?.removeEventListener(\"abort\", onCallerAbort);\n\t\t\tthis._listenState.delete(listenId);\n\t\t\trequestAbort.abort();\n\t\t\tresolveClosed(outcome.cause);\n\t\t\tif (wasOpening) rejectOpening(outcome.error ?? new SdkError(SdkErrorCode.ConnectionClosed, \"subscriptions/listen closed before the server acknowledged\"));\n\t\t};\n\t\tconst wireTeardown = async () => {\n\t\t\trequestAbort.abort();\n\t\t\tawait this.notification({\n\t\t\t\tmethod: \"notifications/cancelled\",\n\t\t\t\tparams: { requestId: listenId }\n\t\t\t}).catch(() => {});\n\t\t};\n\t\tconst close = async () => {\n\t\t\tif (state === \"closed\") return;\n\t\t\tsettle({ cause: \"local\" });\n\t\t\tawait wireTeardown();\n\t\t};\n\t\tthis._listenState.set(listenId, { settle });\n\t\tconst ackTimeout = options?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC;\n\t\tackTimer = setTimeout(() => {\n\t\t\tsettle({\n\t\t\t\tcause: \"remote\",\n\t\t\t\terror: new SdkError(SdkErrorCode.RequestTimeout, \"subscriptions/listen ack timed out\", { timeout: ackTimeout })\n\t\t\t});\n\t\t\twireTeardown().catch(() => {});\n\t\t}, ackTimeout);\n\t\tif (options?.signal) {\n\t\t\tconst callerSignal = options.signal;\n\t\t\tonCallerAbort = () => {\n\t\t\t\tif (state === \"closed\") return;\n\t\t\t\tconst reason = callerSignal.reason;\n\t\t\t\tsettle({\n\t\t\t\t\tcause: \"local\",\n\t\t\t\t\terror: reason instanceof Error ? reason : new Error(String(reason ?? \"Aborted\"))\n\t\t\t\t});\n\t\t\t\twireTeardown().catch(() => {});\n\t\t\t};\n\t\t\tcallerSignal.addEventListener(\"abort\", onCallerAbort, { once: true });\n\t\t}\n\t\tconst jsonrpcRequest = {\n\t\t\tjsonrpc: \"2.0\",\n\t\t\tid: listenId,\n\t\t\tmethod: \"subscriptions/listen\",\n\t\t\tparams: {\n\t\t\t\t_meta: { ...this._outboundMetaEnvelope() },\n\t\t\t\tnotifications: filter\n\t\t\t}\n\t\t};\n\t\ttry {\n\t\t\tawait this.transport.send(jsonrpcRequest, {\n\t\t\t\trequestSignal: requestAbort.signal,\n\t\t\t\tonRequestStreamEnd: () => settle({\n\t\t\t\t\tcause: \"remote\",\n\t\t\t\t\terror: /* @__PURE__ */ new Error(\"subscriptions/listen: stream ended\")\n\t\t\t\t})\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tsettle({\n\t\t\t\tcause: \"remote\",\n\t\t\t\terror: error instanceof Error ? error : new Error(String(error))\n\t\t\t});\n\t\t}\n\t\treturn {\n\t\t\thonoredFilter: await opening,\n\t\t\tclose,\n\t\t\tclosed\n\t\t};\n\t}\n\t/**\n\t* The subscription auto-opened by `ClientOptions.listChanged` on a modern\n\t* connection — the listen filter is the intersection of the configured\n\t* sub-options and the server-advertised `listChanged` capabilities.\n\t* `undefined` on a legacy connection, before connect, or when that\n\t* intersection is empty (auto-open skipped). Exposed so the consumer can\n\t* `close()` it.\n\t*/\n\tget autoOpenedSubscription() {\n\t\treturn this._autoOpenedSubscription;\n\t}\n\t/**\n\t* Transport-level demux for `subscriptions/listen` notifications, before\n\t* any decoding/era-gating/handler dispatch. Consumes the leading\n\t* `notifications/subscriptions/acknowledged` referencing a live\n\t* subscription id (resolves the ack waiter) and an inbound\n\t* `notifications/cancelled` referencing a live string-typed subscription\n\t* id (server-side teardown on stdio). Change notifications carrying a\n\t* subscription id pass through to the existing registered handlers via\n\t* `super`. An unmatched ack/cancelled is NOT consumed: it reaches\n\t* `setNotificationHandler` / `fallbackNotificationHandler` instead of\n\t* being silently swallowed.\n\t*/\n\t_onnotification(raw, extra) {\n\t\tconst evicted = Object.hasOwn(LIST_CHANGED_EVICTIONS, raw.method) ? LIST_CHANGED_EVICTIONS[raw.method] : void 0;\n\t\tif (raw.method === \"notifications/resources/updated\") {\n\t\t\tconst uri = raw.params?.uri;\n\t\t\tif (typeof uri === \"string\") this._cache.evictKey(\"resources/read\", uri);\n\t\t} else if (evicted !== void 0) for (const method of evicted) this._cache.evict(method);\n\t\tif (raw.method === \"notifications/subscriptions/acknowledged\") {\n\t\t\tconst subscriptionId = raw.params?._meta?.[SUBSCRIPTION_ID_META_KEY];\n\t\t\tconst entry = typeof subscriptionId === \"string\" ? this._listenState.get(subscriptionId) : void 0;\n\t\t\tif (entry !== void 0) {\n\t\t\t\tconst honored = this._wireCodec().validateNotification(\"notifications/subscriptions/acknowledged\", raw);\n\t\t\t\tentry.settle({ ack: honored.ok ? honored.value.params.notifications : {} });\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (raw.method === \"notifications/cancelled\") {\n\t\t\tconst cancelledId = raw.params?.requestId;\n\t\t\tconst entry = typeof cancelledId === \"string\" ? this._listenState.get(cancelledId) : void 0;\n\t\t\tif (entry !== void 0) {\n\t\t\t\tentry.settle({\n\t\t\t\t\tcause: \"remote\",\n\t\t\t\t\terror: /* @__PURE__ */ new Error(\"subscriptions/listen: server cancelled the subscription\")\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tsuper._onnotification(raw, extra);\n\t}\n\t/**\n\t* Transport-level demux for `subscriptions/listen` responses. A JSON-RPC\n\t* ERROR for the listen id is the server's pre-ack capacity/params\n\t* rejection; a JSON-RPC RESULT for the listen id is the spec's\n\t* `SubscriptionsListenResult` — the server's GRACEFUL-close signal (sent\n\t* on shutdown). A string-id response that matches a live `_listenState`\n\t* entry is consumed here (Protocol's `_responseHandlers` map is keyed by\n\t* NUMBER and never holds a listen id, so passing a string-id response\n\t* through would surface as \"unknown message ID\" via `onerror`).\n\t*/\n\t_onresponse(response) {\n\t\tconst id = response.id;\n\t\tconst entry = typeof id === \"string\" ? this._listenState.get(id) : void 0;\n\t\tif (entry !== void 0) {\n\t\t\tif (isJSONRPCErrorResponse(response)) entry.settle({\n\t\t\t\tcause: \"remote\",\n\t\t\t\terror: ProtocolError.fromError(response.error.code, response.error.message, response.error.data)\n\t\t\t});\n\t\t\telse entry.settle({\n\t\t\t\tcause: \"graceful\",\n\t\t\t\terror: new SdkError(SdkErrorCode.ConnectionClosed, \"subscriptions/listen: server closed the subscription gracefully before acknowledging\")\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsuper._onresponse(response);\n\t}\n\t/**\n\t* Settle every live per-listen state machine on a transport-initiated\n\t* close (the server dropping the connection on stdio/InMemory) before\n\t* Protocol's `_onclose` tears the transport down. The base\n\t* `_responseHandlers` settlement does not reach `_listenState` (listen\n\t* ids are never registered there), so without this override a remote\n\t* close would leave an in-flight `listen()` / open `McpSubscription`\n\t* hanging.\n\t*/\n\t_onclose() {\n\t\tif (this._listenState.size > 0) {\n\t\t\tconst reason = new SdkError(SdkErrorCode.ConnectionClosed, \"Connection closed\");\n\t\t\tfor (const entry of this._listenState.values()) entry.settle({\n\t\t\t\tcause: \"remote\",\n\t\t\t\terror: reason\n\t\t\t});\n\t\t\tthis._listenState.clear();\n\t\t}\n\t\tsuper._onclose();\n\t}\n\t/**\n\t* Calls a tool on the connected server and returns the result. Automatically validates structured output\n\t* if the tool has an `outputSchema`.\n\t*\n\t* Tool results have two error surfaces: `result.isError` for tool-level failures (the tool ran but reported\n\t* a problem), and thrown {@linkcode ProtocolError} for protocol-level failures or {@linkcode SdkError} for\n\t* SDK-level issues (timeouts, missing capabilities).\n\t*\n\t* @example Basic usage\n\t* ```ts source=\"./client.examples.ts#Client_callTool_basic\"\n\t* const result = await client.callTool({\n\t* name: 'calculate-bmi',\n\t* arguments: { weightKg: 70, heightM: 1.75 }\n\t* });\n\t*\n\t* // Tool-level errors are returned in the result, not thrown\n\t* if (result.isError) {\n\t* console.error('Tool error:', result.content);\n\t* return;\n\t* }\n\t*\n\t* console.log(result.content);\n\t* ```\n\t*\n\t* @example Structured output\n\t* ```ts source=\"./client.examples.ts#Client_callTool_structuredOutput\"\n\t* const result = await client.callTool({\n\t* name: 'calculate-bmi',\n\t* arguments: { weightKg: 70, heightM: 1.75 }\n\t* });\n\t*\n\t* // Machine-readable output for the client application. SEP-2106: structuredContent is\n\t* // `unknown` (any JSON value). Check for presence with `!== undefined` and narrow before use.\n\t* if (result.structuredContent !== undefined) {\n\t* const sc: unknown = result.structuredContent; // e.g. { bmi: 22.86 }\n\t* if (typeof sc === 'object' && sc !== null && 'bmi' in sc) {\n\t* console.log(sc.bmi);\n\t* }\n\t* }\n\t* ```\n\t*/\n\tasync callTool(params, options) {\n\t\tconst mirroringActive = this.getProtocolEra() === \"modern\" && detectProbeEnvironment() !== \"browser\";\n\t\tconst buildSendOptions = async () => {\n\t\t\tif (!mirroringActive) return options;\n\t\t\tlet scan;\n\t\t\ttry {\n\t\t\t\tscan = await this._resolveXMcpHeaderScan(params.name, options?.toolDefinition);\n\t\t\t} catch (error) {\n\t\t\t\tthis._reportStoreError(error);\n\t\t\t}\n\t\t\tif (!scan?.valid || scan.declarations.length === 0) return options;\n\t\t\tconst paramHeaders = buildMcpParamHeaders(scan.declarations, params.arguments);\n\t\t\treturn Object.keys(paramHeaders).length === 0 ? options : {\n\t\t\t\t...options,\n\t\t\t\theaders: {\n\t\t\t\t\t...options?.headers,\n\t\t\t\t\t...paramHeaders\n\t\t\t\t}\n\t\t\t};\n\t\t};\n\t\tlet compiled = options?.toolDefinition === void 0 ? await this._cache.outputValidator(params.name, (tool) => this._compileOutputValidator(tool)).catch((error) => void this._reportStoreError(error)) : this._compileOutputValidator(options.toolDefinition);\n\t\tconst assertCompiled = () => {\n\t\t\tif (compiled === void 0 || compiled.ok) return;\n\t\t\tconst err = compiled.compileError;\n\t\t\tconst message = (err instanceof Error ? err.message : String(err)).slice(0, 200);\n\t\t\tthrow new ProtocolError(ProtocolErrorCode.InvalidParams, `Tool '${params.name}' has an invalid outputSchema: ${message}`);\n\t\t};\n\t\tassertCompiled();\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await this.request({\n\t\t\t\tmethod: \"tools/call\",\n\t\t\t\tparams\n\t\t\t}, await buildSendOptions());\n\t\t} catch (error) {\n\t\t\tconst isHeaderMismatch = error instanceof ProtocolError && error.code === HEADER_MISMATCH_ERROR_CODE;\n\t\t\tif (!mirroringActive || !isHeaderMismatch || options?.toolDefinition !== void 0) throw error;\n\t\t\tconst refreshOptions = {\n\t\t\t\tsignal: options?.signal,\n\t\t\t\ttimeout: options?.timeout,\n\t\t\t\tcacheMode: \"refresh\"\n\t\t\t};\n\t\t\tawait this._cache.evict(\"tools/list\");\n\t\t\tawait this.listTools(void 0, refreshOptions).catch((error_) => this._reportStoreError(error_));\n\t\t\tcompiled = await this._cache.outputValidator(params.name, (tool) => this._compileOutputValidator(tool)).catch((error_) => void this._reportStoreError(error_));\n\t\t\tassertCompiled();\n\t\t\tresult = await this.request({\n\t\t\t\tmethod: \"tools/call\",\n\t\t\t\tparams\n\t\t\t}, await buildSendOptions());\n\t\t}\n\t\tconst validator = compiled !== void 0 && compiled.ok ? compiled.validator : void 0;\n\t\tif (validator) {\n\t\t\tif (result.structuredContent === void 0 && !result.isError) throw new ProtocolError(ProtocolErrorCode.InvalidRequest, `Tool ${params.name} has an output schema but did not return structured content`);\n\t\t\tif (result.structuredContent !== void 0 && !result.isError) try {\n\t\t\t\tconst validationResult = validator(result.structuredContent);\n\t\t\t\tif (!validationResult.valid) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Structured content does not match the tool's output schema: ${validationResult.errorMessage}`);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof ProtocolError) throw error;\n\t\t\t\tthrow new ProtocolError(ProtocolErrorCode.InvalidParams, `Failed to validate structured content: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Lists available tools.\n\t*\n\t* Called without a `cursor` (the common case), this walks every page and\n\t* returns the complete aggregated list with no `nextCursor`; the\n\t* aggregate is also written to the {@linkcode ResponseCacheStore} (the\n\t* source for {@linkcode callTool | callTool()}'s output-schema validation\n\t* and SEP-2243 `Mcp-Param-*` header mirroring). Pass an explicit\n\t* `{ cursor }` to fetch a single page and walk pagination yourself — the\n\t* per-page path returns the server's raw page (with `nextCursor` for the\n\t* next call) and does not write the response cache. The auto-aggregate\n\t* path is capped by {@linkcode ClientOptions | ClientOptions.listMaxPages} (default 64);\n\t* the per-page path is not.\n\t*\n\t* Returns an empty list if the server does not advertise tools capability\n\t* (or throws if {@linkcode ClientOptions.enforceStrictCapabilities} is enabled).\n\t*\n\t* @example\n\t* ```ts source=\"./client.examples.ts#Client_listTools_pagination\"\n\t* // No cursor → all pages aggregated for you.\n\t* const { tools } = await client.listTools();\n\t* console.log(\n\t* 'Available tools:',\n\t* tools.map(t => t.name)\n\t* );\n\t* ```\n\t*/\n\tasync listTools(params, options) {\n\t\tif (!this._serverCapabilities?.tools && !this._enforceStrictCapabilities) {\n\t\t\tconsole.debug(\"Client.listTools() called but server does not advertise tools capability - returning empty list\");\n\t\t\treturn { tools: [] };\n\t\t}\n\t\tif (params?.cursor !== void 0) {\n\t\t\tconst page = await this.request({\n\t\t\t\tmethod: \"tools/list\",\n\t\t\t\tparams\n\t\t\t}, options);\n\t\t\tthis._excludeInvalidXMcpHeaderTools(page);\n\t\t\treturn page;\n\t\t}\n\t\tconst hit = await this._serveFromCache(\"tools/list\", void 0, options);\n\t\tif (hit !== void 0) return hit;\n\t\treturn this._listAllPages(\"tools/list\", params, options, (acc, page) => acc.tools.push(...page.tools), (acc) => this._excludeInvalidXMcpHeaderTools(acc));\n\t}\n\t/**\n\t* SEP-2243 (protocol revision 2026-07-28): a Streamable HTTP client MUST\n\t* exclude tool definitions whose `x-mcp-header` declarations violate the\n\t* constraints, and SHOULD log a warning naming the tool and the reason.\n\t* Applied to the CACHED aggregated `tools/list` result (so the entry\n\t* mirroring reads never holds an unmirrorable tool) AND to every public\n\t* per-page {@linkcode listTools | listTools()} return (the spec's MUST\n\t* has no carve-out for paginated reads). The gate is era-only on\n\t* non-stdio transports — `detectProbeTransportKind` cannot distinguish a\n\t* real HTTP transport from in-memory/custom transports (it only\n\t* positively recognizes stdio), and over-excluding on a non-HTTP modern\n\t* connection is harmless: those transports never carry per-request\n\t* headers, so an excluded tool would have been uncallable on a Streamable\n\t* HTTP arm of the same server. Mutates `result.tools` in place.\n\t*/\n\t_excludeInvalidXMcpHeaderTools(result) {\n\t\tif (this.getProtocolEra() !== \"modern\" || !this.transport || detectProbeTransportKind(this.transport) === \"stdio\") return;\n\t\tconst filtered = result.tools.filter((tool) => {\n\t\t\tconst scan = scanXMcpHeaderDeclarations(tool.inputSchema);\n\t\t\tif (!scan.valid) {\n\t\t\t\tconsole.warn(`[mcp-sdk] excluding tool '${tool.name}' from tools/list: invalid x-mcp-header declaration — ${scan.reason}`);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\t\tif (filtered.length !== result.tools.length) result.tools = filtered;\n\t}\n\t/**\n\t* Set up a single list changed handler.\n\t* @internal\n\t*/\n\t_setupListChangedHandler(listType, notificationMethod, options, fetcher) {\n\t\tconst parseResult = parseSchema(ListChangedOptionsBaseSchema, options);\n\t\tif (!parseResult.success) throw new Error(`Invalid ${listType} listChanged options: ${parseResult.error.message}`);\n\t\tif (typeof options.onChanged !== \"function\") throw new TypeError(`Invalid ${listType} listChanged options: onChanged must be a function`);\n\t\tconst { autoRefresh, debounceMs } = parseResult.data;\n\t\tconst { onChanged } = options;\n\t\tconst refresh = async () => {\n\t\t\tif (!autoRefresh) {\n\t\t\t\tonChanged(null, null);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tonChanged(null, await fetcher());\n\t\t\t} catch (error) {\n\t\t\t\tonChanged(error instanceof Error ? error : new Error(String(error)), null);\n\t\t\t}\n\t\t};\n\t\tconst handler = () => {\n\t\t\tif (debounceMs) {\n\t\t\t\tconst existingTimer = this._listChangedDebounceTimers.get(listType);\n\t\t\t\tif (existingTimer) clearTimeout(existingTimer);\n\t\t\t\tconst timer = setTimeout(refresh, debounceMs);\n\t\t\t\tthis._listChangedDebounceTimers.set(listType, timer);\n\t\t\t} else refresh();\n\t\t};\n\t\tthis.setNotificationHandler(notificationMethod, handler);\n\t}\n\t/**\n\t* Notifies the server that the client's root list has changed. Requires the `roots.listChanged` capability.\n\t*\n\t* @deprecated Deprecated as of protocol version 2026-07-28 (SEP-2577).\n\t* Remains functional during the deprecation window (at least twelve months).\n\t* Migrate to passing paths via tool parameters, resource URIs, or configuration.\n\t*/\n\tasync sendRootsListChanged() {\n\t\treturn this.notification({ method: \"notifications/roots/list_changed\" });\n\t}\n};\n\n//#endregion\n//#region src/client/crossAppAccess.ts\n/**\n* Requests a JWT Authorization Grant (ID-JAG) from an enterprise IdP using RFC 8693 Token Exchange.\n*\n* This function performs step 2 of the Enterprise Managed Authorization flow:\n* exchanges an ID Token for a JWT Authorization Grant that can be used with the target MCP server.\n*\n* @param options - Configuration for the token exchange request\n* @returns The JWT Authorization Grant and related metadata\n* @throws {Error} If the token exchange fails or returns an error response\n*\n* @example\n* ```ts\n* const result = await requestJwtAuthorizationGrant({\n* tokenEndpoint: 'https://idp.example.com/token',\n* audience: 'https://auth.chat.example/',\n* resource: 'https://mcp.chat.example/',\n* idToken: 'eyJhbGciOiJS...',\n* clientId: 'my-idp-client',\n* clientSecret: 'my-idp-secret',\n* scope: 'chat.read chat.history'\n* });\n*\n* // Use result.jwtAuthGrant with the MCP server's authorization server\n* ```\n*/\nasync function requestJwtAuthorizationGrant(options) {\n\tconst { tokenEndpoint, audience, resource, idToken, clientId, clientSecret, scope, fetchFn = fetch } = options;\n\tconst tokenUrl = assertSecureTokenEndpoint(tokenEndpoint);\n\tconst params = new URLSearchParams({\n\t\tgrant_type: \"urn:ietf:params:oauth:grant-type:token-exchange\",\n\t\trequested_token_type: \"urn:ietf:params:oauth:token-type:id-jag\",\n\t\taudience: String(audience),\n\t\tresource: String(resource),\n\t\tsubject_token: idToken,\n\t\tsubject_token_type: \"urn:ietf:params:oauth:token-type:id_token\",\n\t\tclient_id: clientId\n\t});\n\tif (clientSecret) params.set(\"client_secret\", clientSecret);\n\tif (scope) params.set(\"scope\", scope);\n\tconst response = await fetchFn(tokenUrl, {\n\t\tmethod: \"POST\",\n\t\theaders: { \"Content-Type\": \"application/x-www-form-urlencoded\" },\n\t\tbody: params.toString()\n\t});\n\tif (!response.ok) {\n\t\tconst errorBody = await response.json().catch(() => ({}));\n\t\tconst parseResult$1 = OAuthErrorResponseSchema.safeParse(errorBody);\n\t\tif (parseResult$1.success) {\n\t\t\tconst { error, error_description } = parseResult$1.data;\n\t\t\tthrow new Error(`Token exchange failed: ${error}${error_description ? ` - ${error_description}` : \"\"}`);\n\t\t}\n\t\tthrow new Error(`Token exchange failed with status ${response.status}: ${JSON.stringify(errorBody)}`);\n\t}\n\tconst parseResult = IdJagTokenExchangeResponseSchema.safeParse(await response.json());\n\tif (!parseResult.success) throw new Error(`Invalid token exchange response: ${parseResult.error.message}`);\n\treturn {\n\t\tjwtAuthGrant: parseResult.data.access_token,\n\t\texpiresIn: parseResult.data.expires_in,\n\t\tscope: parseResult.data.scope\n\t};\n}\n/**\n* Discovers the IdP's token endpoint and requests a JWT Authorization Grant.\n*\n* This is a convenience wrapper around {@linkcode requestJwtAuthorizationGrant} that\n* first performs OAuth metadata discovery to find the token endpoint.\n*\n* @param options - Configuration including IdP URL for discovery\n* @returns The JWT Authorization Grant and related metadata\n* @throws {Error} If discovery fails or the token exchange fails\n*\n* @example\n* ```ts\n* const result = await discoverAndRequestJwtAuthGrant({\n* idpUrl: 'https://idp.example.com',\n* audience: 'https://auth.chat.example/',\n* resource: 'https://mcp.chat.example/',\n* idToken: await getIdToken(),\n* clientId: 'my-idp-client',\n* clientSecret: 'my-idp-secret'\n* });\n* ```\n*/\nasync function discoverAndRequestJwtAuthGrant(options) {\n\tconst { idpUrl, fetchFn = fetch, ...restOptions } = options;\n\tconst metadata = await discoverAuthorizationServerMetadata(String(idpUrl), { fetchFn });\n\tif (!metadata?.token_endpoint) throw new Error(`Failed to discover token endpoint for IdP: ${idpUrl}`);\n\treturn requestJwtAuthorizationGrant({\n\t\t...restOptions,\n\t\ttokenEndpoint: metadata.token_endpoint,\n\t\tfetchFn\n\t});\n}\n/**\n* Exchanges a JWT Authorization Grant for an access token at the MCP server's authorization server.\n*\n* This function performs step 3 of the Enterprise Managed Authorization flow:\n* uses the JWT Authorization Grant to obtain an access token from the MCP server.\n*\n* @param options - Configuration for the JWT grant exchange\n* @returns OAuth tokens (access token, token type, etc.)\n* @throws {Error} If the exchange fails or returns an error response\n*\n* Defaults to `client_secret_basic` (HTTP Basic Authorization header), matching\n* `CrossAppAccessProvider`'s declared `token_endpoint_auth_method` and the\n* SEP-990 conformance test requirements. Use `authMethod: 'client_secret_post'` only\n* when the authorization server explicitly requires it.\n*\n* @example\n* ```ts\n* const tokens = await exchangeJwtAuthGrant({\n* tokenEndpoint: 'https://auth.chat.example/token',\n* jwtAuthGrant: 'eyJhbGci...',\n* clientId: 'my-mcp-client',\n* clientSecret: 'my-mcp-secret'\n* });\n*\n* // Use tokens.access_token to access the MCP server\n* ```\n*/\nasync function exchangeJwtAuthGrant(options) {\n\tconst { tokenEndpoint, jwtAuthGrant, clientId, clientSecret, authMethod = \"client_secret_basic\", fetchFn = fetch } = options;\n\tconst tokenUrl = assertSecureTokenEndpoint(tokenEndpoint);\n\tconst params = new URLSearchParams({\n\t\tgrant_type: \"urn:ietf:params:oauth:grant-type:jwt-bearer\",\n\t\tassertion: jwtAuthGrant\n\t});\n\tconst headers = new Headers({ \"Content-Type\": \"application/x-www-form-urlencoded\" });\n\tapplyClientAuthentication(authMethod, {\n\t\tclient_id: clientId,\n\t\tclient_secret: clientSecret\n\t}, headers, params);\n\tconst response = await fetchFn(tokenUrl, {\n\t\tmethod: \"POST\",\n\t\theaders,\n\t\tbody: params.toString()\n\t});\n\tif (!response.ok) {\n\t\tconst errorBody = await response.json().catch(() => ({}));\n\t\tconst parseResult$1 = OAuthErrorResponseSchema.safeParse(errorBody);\n\t\tif (parseResult$1.success) {\n\t\t\tconst { error, error_description } = parseResult$1.data;\n\t\t\tthrow new Error(`JWT grant exchange failed: ${error}${error_description ? ` - ${error_description}` : \"\"}`);\n\t\t}\n\t\tthrow new Error(`JWT grant exchange failed with status ${response.status}: ${JSON.stringify(errorBody)}`);\n\t}\n\tconst responseBody = await response.json();\n\tconst parseResult = OAuthTokensSchema.safeParse(responseBody);\n\tif (!parseResult.success) throw new Error(`Invalid token response: ${parseResult.error.message}`);\n\treturn parseResult.data;\n}\n\n//#endregion\n//#region src/client/middleware.ts\n/**\n* Creates a fetch wrapper that handles OAuth authentication automatically.\n*\n* This wrapper will:\n* - Add `Authorization` headers with access tokens\n* - Handle 401 responses by attempting re-authentication\n* - Retry the original request after successful auth\n* - Handle OAuth errors appropriately ({@linkcode index.OAuthErrorCode.InvalidClient | OAuthErrorCode.InvalidClient}, etc.)\n*\n* The `baseUrl` parameter is optional and defaults to using the domain from the request URL.\n* However, you should explicitly provide `baseUrl` when:\n* - Making requests to multiple subdomains (e.g., api.example.com, cdn.example.com)\n* - Using API paths that differ from OAuth discovery paths (e.g., requesting /api/v1/data but OAuth is at /)\n* - The OAuth server is on a different domain than your API requests\n* - You want to ensure consistent OAuth behavior regardless of request URLs\n*\n* For MCP transports, set `baseUrl` to the same URL you pass to the transport constructor.\n*\n* Note: This wrapper is designed for general-purpose fetch operations.\n* MCP transports (SSE and StreamableHTTP) already have built-in OAuth handling\n* and should not need this wrapper.\n*\n* @param provider - OAuth client provider for authentication\n* @param baseUrl - Base URL for OAuth server discovery (defaults to request URL domain)\n* @returns A fetch middleware function\n*/\nconst withOAuth = (provider, baseUrl) => (next) => {\n\treturn async (input, init) => {\n\t\tconst makeRequest = async () => {\n\t\t\tconst headers = new Headers(init?.headers);\n\t\t\tconst tokens = await provider.tokens();\n\t\t\tif (tokens) headers.set(\"Authorization\", `Bearer ${tokens.access_token}`);\n\t\t\treturn await next(input, {\n\t\t\t\t...init,\n\t\t\t\theaders\n\t\t\t});\n\t\t};\n\t\tlet response = await makeRequest();\n\t\tif (response.status === 401) try {\n\t\t\tconst { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(response);\n\t\t\tconst result = await auth(provider, {\n\t\t\t\tserverUrl: baseUrl || (typeof input === \"string\" ? new URL(input).origin : input.origin),\n\t\t\t\tresourceMetadataUrl,\n\t\t\t\tscope,\n\t\t\t\tfetchFn: next\n\t\t\t});\n\t\t\tif (result === \"REDIRECT\") throw new UnauthorizedError(\"Authentication requires user authorization - redirect initiated\");\n\t\t\tif (result !== \"AUTHORIZED\") throw new UnauthorizedError(`Authentication failed with result: ${result}`);\n\t\t\tresponse = await makeRequest();\n\t\t} catch (error) {\n\t\t\tif (error instanceof UnauthorizedError) throw error;\n\t\t\tthrow new UnauthorizedError(`Failed to re-authenticate: ${error instanceof Error ? error.message : String(error)}`);\n\t\t}\n\t\tif (response.status === 401) throw new UnauthorizedError(`Authentication failed for ${typeof input === \"string\" ? input : input.toString()}`);\n\t\treturn response;\n\t};\n};\n/**\n* Creates a fetch middleware that logs HTTP requests and responses.\n*\n* When called without arguments `withLogging()`, it uses the default logger that:\n* - Logs successful requests (2xx) to `console.log`\n* - Logs error responses (4xx/5xx) and network errors to `console.error`\n* - Logs all requests regardless of status (`statusLevel: 0`)\n* - Does not include request or response headers in logs\n* - Measures and displays request duration in milliseconds\n*\n* Important: the default logger uses both `console.log` and `console.error` so it should not be used with\n* `stdio` transports and applications.\n*\n* @param options - Logging configuration options\n* @returns A fetch middleware function\n*/\nconst withLogging = (options = {}) => {\n\tconst { logger, includeRequestHeaders = false, includeResponseHeaders = false, statusLevel = 0 } = options;\n\tconst defaultLogger = (input) => {\n\t\tconst { method, url, status, statusText, duration, requestHeaders, responseHeaders, error } = input;\n\t\tlet message = error ? `HTTP ${method} ${url} failed: ${error.message} (${duration}ms)` : `HTTP ${method} ${url} ${status} ${statusText} (${duration}ms)`;\n\t\tif (includeRequestHeaders && requestHeaders) {\n\t\t\tconst reqHeaders = [...requestHeaders.entries()].map(([key, value]) => `${key}: ${value}`).join(\", \");\n\t\t\tmessage += `\\n Request Headers: {${reqHeaders}}`;\n\t\t}\n\t\tif (includeResponseHeaders && responseHeaders) {\n\t\t\tconst resHeaders = [...responseHeaders.entries()].map(([key, value]) => `${key}: ${value}`).join(\", \");\n\t\t\tmessage += `\\n Response Headers: {${resHeaders}}`;\n\t\t}\n\t\tif (error || status >= 400) console.error(message);\n\t\telse console.log(message);\n\t};\n\tconst logFn = logger || defaultLogger;\n\treturn (next) => async (input, init) => {\n\t\tconst startTime = performance.now();\n\t\tconst method = init?.method || \"GET\";\n\t\tconst url = typeof input === \"string\" ? input : input.toString();\n\t\tconst requestHeaders = includeRequestHeaders ? new Headers(init?.headers) : void 0;\n\t\ttry {\n\t\t\tconst response = await next(input, init);\n\t\t\tconst duration = performance.now() - startTime;\n\t\t\tif (response.status >= statusLevel) logFn({\n\t\t\t\tmethod,\n\t\t\t\turl,\n\t\t\t\tstatus: response.status,\n\t\t\t\tstatusText: response.statusText,\n\t\t\t\tduration,\n\t\t\t\trequestHeaders,\n\t\t\t\tresponseHeaders: includeResponseHeaders ? response.headers : void 0\n\t\t\t});\n\t\t\treturn response;\n\t\t} catch (error) {\n\t\t\tlogFn({\n\t\t\t\tmethod,\n\t\t\t\turl,\n\t\t\t\tstatus: 0,\n\t\t\t\tstatusText: \"Network Error\",\n\t\t\t\tduration: performance.now() - startTime,\n\t\t\t\trequestHeaders,\n\t\t\t\terror\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t};\n};\n/**\n* Composes multiple fetch middleware functions into a single middleware pipeline.\n* Middleware are applied in the order they appear, creating a chain of handlers.\n*\n* @example\n* ```ts source=\"./middleware.examples.ts#applyMiddlewares_basicUsage\"\n* // Create a middleware pipeline that handles both OAuth and logging\n* const enhancedFetch = applyMiddlewares(withOAuth(oauthProvider, 'https://api.example.com'), withLogging({ statusLevel: 400 }))(fetch);\n*\n* // Use the enhanced fetch - it will handle auth and log errors\n* const response = await enhancedFetch('https://api.example.com/data');\n* ```\n*\n* @param middleware - Array of fetch middleware to compose into a pipeline\n* @returns A single composed middleware function\n*/\nconst applyMiddlewares = (...middleware) => {\n\treturn (next) => {\n\t\tlet handler = next;\n\t\tfor (const mw of middleware) handler = mw(handler);\n\t\treturn handler;\n\t};\n};\n/**\n* Helper function to create custom fetch middleware with cleaner syntax.\n* Provides the next handler and request details as separate parameters for easier access.\n*\n* @example\n* ```ts source=\"./middleware.examples.ts#createMiddleware_examples\"\n* // Create custom authentication middleware\n* const customAuthMiddleware = createMiddleware(async (next, input, init) => {\n* const headers = new Headers(init?.headers);\n* headers.set('X-Custom-Auth', 'my-token');\n*\n* const response = await next(input, { ...init, headers });\n*\n* if (response.status === 401) {\n* console.log('Authentication failed');\n* }\n*\n* return response;\n* });\n*\n* // Create conditional middleware\n* const conditionalMiddleware = createMiddleware(async (next, input, init) => {\n* const url = typeof input === 'string' ? input : input.toString();\n*\n* // Only add headers for API routes\n* if (url.includes('/api/')) {\n* const headers = new Headers(init?.headers);\n* headers.set('X-API-Version', 'v2');\n* return next(input, { ...init, headers });\n* }\n*\n* // Pass through for non-API routes\n* return next(input, init);\n* });\n*\n* // Create caching middleware\n* const cacheMiddleware = createMiddleware(async (next, input, init) => {\n* const cacheKey = typeof input === 'string' ? input : input.toString();\n*\n* // Check cache first\n* const cached = await getFromCache(cacheKey);\n* if (cached) {\n* return new Response(cached, { status: 200 });\n* }\n*\n* // Make request and cache result\n* const response = await next(input, init);\n* if (response.ok) {\n* await saveToCache(cacheKey, await response.clone().text());\n* }\n*\n* return response;\n* });\n* ```\n*\n* @param handler - Function that receives the next handler and request parameters\n* @returns A fetch middleware function\n*/\nconst createMiddleware = (handler) => {\n\treturn (next) => (input, init) => handler(next, input, init);\n};\n\n//#endregion\n//#region src/client/sse.ts\nvar SseError = class extends Error {\n\tstatic {\n\t\tObject.defineProperty(this, \"mcpBrand\", { value: \"mcp.SseError\" });\n\t}\n\tstatic [Symbol.hasInstance](value) {\n\t\treturn brandedHasInstance(this, value);\n\t}\n\t/**\n\t* Brand-based type guard: equivalent to `value instanceof this`, as an\n\t* explicit static predicate (the axios/AWS-SDK `isInstance` style). Reads\n\t* the caller's own brand via `this`, so every branded subclass gets a\n\t* correctly-scoped guard by inheritance. Must be invoked on the class —\n\t* in callback position write `v => SdkError.isInstance(v)`, not\n\t* `.filter(SdkError.isInstance)` (detached calls throw rather than\n\t* silently matching nothing).\n\t*/\n\tstatic isInstance(value) {\n\t\tif (typeof this !== \"function\") throw new TypeError(\"isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`\");\n\t\treturn brandedHasInstance(this, value);\n\t}\n\tconstructor(code, message, event) {\n\t\tsuper(`SSE error: ${message}`);\n\t\tthis.code = code;\n\t\tthis.event = event;\n\t\tstampErrorBrands(this, new.target);\n\t}\n};\n/**\n* Client transport for SSE: this will connect to a server using Server-Sent Events for receiving\n* messages and make separate `POST` requests for sending messages.\n* @deprecated SSEClientTransport is deprecated. Prefer to use {@linkcode index.StreamableHTTPClientTransport | StreamableHTTPClientTransport} where possible instead. Note that because some servers are still using SSE, clients may need to support both transports during the migration period.\n*/\nvar SSEClientTransport = class {\n\t_eventSource;\n\t_endpoint;\n\t_abortController;\n\t_url;\n\t_resourceMetadataUrl;\n\t_scope;\n\t_eventSourceInit;\n\t_requestInit;\n\t_authProvider;\n\t_oauthProvider;\n\t_skipIssuerMetadataValidation;\n\t_fetch;\n\t_fetchWithInit;\n\t_protocolVersion;\n\tonclose;\n\tonerror;\n\tonmessage;\n\tconstructor(url, opts) {\n\t\tthis._url = url;\n\t\tthis._resourceMetadataUrl = void 0;\n\t\tthis._scope = void 0;\n\t\tthis._eventSourceInit = opts?.eventSourceInit;\n\t\tthis._requestInit = opts?.requestInit;\n\t\tthis._skipIssuerMetadataValidation = opts?.skipIssuerMetadataValidation;\n\t\tif (isOAuthClientProvider(opts?.authProvider)) {\n\t\t\tthis._oauthProvider = opts.authProvider;\n\t\t\tthis._authProvider = adaptOAuthProvider(opts.authProvider, { skipIssuerMetadataValidation: opts.skipIssuerMetadataValidation });\n\t\t} else this._authProvider = opts?.authProvider;\n\t\tthis._fetch = opts?.fetch;\n\t\tthis._fetchWithInit = createFetchWithInit(opts?.fetch, opts?.requestInit);\n\t}\n\t_last401Response;\n\tasync _commonHeaders() {\n\t\tconst headers = {};\n\t\tlet token;\n\t\ttry {\n\t\t\ttoken = await this._authProvider?.token();\n\t\t} catch (error) {\n\t\t\tthrow markAuthSeamEscape(error);\n\t\t}\n\t\tif (token) headers[\"Authorization\"] = `Bearer ${token}`;\n\t\tif (this._protocolVersion) headers[\"mcp-protocol-version\"] = this._protocolVersion;\n\t\tconst extraHeaders = normalizeHeaders(this._requestInit?.headers);\n\t\treturn new Headers({\n\t\t\t...headers,\n\t\t\t...extraHeaders\n\t\t});\n\t}\n\t_startOrAuth() {\n\t\tconst fetchImpl = this?._eventSourceInit?.fetch ?? this._fetch ?? fetch;\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis._eventSource = new EventSource(this._url.href, {\n\t\t\t\t...this._eventSourceInit,\n\t\t\t\tfetch: async (url, init) => {\n\t\t\t\t\tconst headers = await this._commonHeaders();\n\t\t\t\t\theaders.set(\"Accept\", \"text/event-stream\");\n\t\t\t\t\tconst response = await fetchImpl(url, {\n\t\t\t\t\t\t...init,\n\t\t\t\t\t\theaders\n\t\t\t\t\t});\n\t\t\t\t\tif (response.status === 401) {\n\t\t\t\t\t\tthis._last401Response = response;\n\t\t\t\t\t\tif (response.headers.has(\"www-authenticate\")) {\n\t\t\t\t\t\t\tconst { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(response);\n\t\t\t\t\t\t\tthis._resourceMetadataUrl = resourceMetadataUrl;\n\t\t\t\t\t\t\tthis._scope = scope;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn response;\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis._abortController = new AbortController();\n\t\t\tthis._eventSource.onerror = (event) => {\n\t\t\t\tif (event.code === 401 && this._authProvider) {\n\t\t\t\t\tif (this._authProvider.onUnauthorized && this._last401Response) {\n\t\t\t\t\t\tconst response = this._last401Response;\n\t\t\t\t\t\tthis._last401Response = void 0;\n\t\t\t\t\t\tthis._eventSource?.close();\n\t\t\t\t\t\tthis._authProvider.onUnauthorized({\n\t\t\t\t\t\t\tresponse,\n\t\t\t\t\t\t\tserverUrl: this._url,\n\t\t\t\t\t\t\tfetchFn: this._fetchWithInit\n\t\t\t\t\t\t}).then(() => this._startOrAuth().then(resolve, reject), (error$2) => {\n\t\t\t\t\t\t\tmarkAuthSeamEscape(error$2);\n\t\t\t\t\t\t\tthis.onerror?.(error$2);\n\t\t\t\t\t\t\treject(error$2);\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst error$1 = markAuthSeamEscape(new UnauthorizedError());\n\t\t\t\t\treject(error$1);\n\t\t\t\t\tthis.onerror?.(error$1);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst error = new SseError(event.code, event.message, event);\n\t\t\t\treject(error);\n\t\t\t\tthis.onerror?.(error);\n\t\t\t};\n\t\t\tthis._eventSource.onopen = () => {};\n\t\t\tthis._eventSource.addEventListener(\"endpoint\", (event) => {\n\t\t\t\tconst messageEvent = event;\n\t\t\t\ttry {\n\t\t\t\t\tthis._endpoint = new URL(messageEvent.data, this._url);\n\t\t\t\t\tif (this._endpoint.origin !== this._url.origin) throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`);\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t\tthis.onerror?.(error);\n\t\t\t\t\tthis.close();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tresolve();\n\t\t\t});\n\t\t\tthis._eventSource.onmessage = (event) => {\n\t\t\t\tconst messageEvent = event;\n\t\t\t\tlet message;\n\t\t\t\ttry {\n\t\t\t\t\tmessage = JSONRPCMessageSchema.parse(JSON.parse(messageEvent.data));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.onerror?.(error);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.onmessage?.(message);\n\t\t\t};\n\t\t});\n\t}\n\tasync start() {\n\t\tif (this._eventSource) throw new Error(\"SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.\");\n\t\treturn await this._startOrAuth();\n\t}\n\tasync finishAuth(codeOrParams, iss) {\n\t\tif (!this._oauthProvider) throw new UnauthorizedError(\"finishAuth requires an OAuthClientProvider\");\n\t\tconst { authorizationCode, iss: issParam } = await resolveAuthorizationCallbackParams(codeOrParams, iss, this._oauthProvider, this._url, {\n\t\t\tfetchFn: this._fetchWithInit,\n\t\t\tresourceMetadataUrl: this._resourceMetadataUrl\n\t\t});\n\t\tif (await auth(this._oauthProvider, {\n\t\t\tserverUrl: this._url,\n\t\t\tauthorizationCode,\n\t\t\tiss: issParam,\n\t\t\tresourceMetadataUrl: this._resourceMetadataUrl,\n\t\t\tscope: this._scope,\n\t\t\tfetchFn: this._fetchWithInit,\n\t\t\tskipIssuerMetadataValidation: this._skipIssuerMetadataValidation\n\t\t}) !== \"AUTHORIZED\") throw new UnauthorizedError(\"Failed to authorize\");\n\t}\n\tasync close() {\n\t\tthis._abortController?.abort();\n\t\tthis._eventSource?.close();\n\t\tthis.onclose?.();\n\t}\n\tasync send(message) {\n\t\treturn this._send(message, false);\n\t}\n\tasync _send(message, isAuthRetry) {\n\t\tif (!this._endpoint) throw new SdkError(SdkErrorCode.NotConnected, \"Not connected\");\n\t\ttry {\n\t\t\tconst headers = await this._commonHeaders();\n\t\t\theaders.set(\"content-type\", \"application/json\");\n\t\t\tconst init = {\n\t\t\t\t...this._requestInit,\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders,\n\t\t\t\tbody: JSON.stringify(message),\n\t\t\t\tsignal: this._abortController?.signal\n\t\t\t};\n\t\t\tconst response = await (this._fetch ?? fetch)(this._endpoint, init);\n\t\t\tif (!response.ok) {\n\t\t\t\tif (response.status === 401 && this._authProvider) {\n\t\t\t\t\tif (response.headers.has(\"www-authenticate\")) {\n\t\t\t\t\t\tconst { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(response);\n\t\t\t\t\t\tthis._resourceMetadataUrl = resourceMetadataUrl;\n\t\t\t\t\t\tthis._scope = scope;\n\t\t\t\t\t}\n\t\t\t\t\tif (this._authProvider.onUnauthorized && !isAuthRetry) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait this._authProvider.onUnauthorized({\n\t\t\t\t\t\t\t\tresponse,\n\t\t\t\t\t\t\t\tserverUrl: this._url,\n\t\t\t\t\t\t\t\tfetchFn: this._fetchWithInit\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow markAuthSeamEscape(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\t\t\treturn this._send(message, true);\n\t\t\t\t\t}\n\t\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\t\tif (isAuthRetry) throw markAuthSeamEscape(new SdkHttpError(SdkErrorCode.ClientHttpAuthentication, \"Server returned 401 after re-authentication\", {\n\t\t\t\t\t\tstatus: 401,\n\t\t\t\t\t\tstatusText: response.statusText\n\t\t\t\t\t}));\n\t\t\t\t\tthrow markAuthSeamEscape(new UnauthorizedError());\n\t\t\t\t}\n\t\t\t\tconst text = await response.text?.().catch(() => null);\n\t\t\t\tthrow new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text}`);\n\t\t\t}\n\t\t\tawait response.text?.().catch(() => {});\n\t\t} catch (error) {\n\t\t\tthis.onerror?.(error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\tsetProtocolVersion(version) {\n\t\tthis._protocolVersion = version;\n\t}\n};\n\n//#endregion\n//#region src/client/streamableHttp.ts\n/** Default cap on step-up re-authorization retries within a single send/stream-open. */\nconst DEFAULT_MAX_STEP_UP_RETRIES = 1;\nconst DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {\n\tinitialReconnectionDelay: 1e3,\n\tmaxReconnectionDelay: 3e4,\n\treconnectionDelayGrowFactor: 1.5,\n\tmaxRetries: 2\n};\n/**\n* Standard/auth header names the transport owns. The per-request\n* `TransportSendOptions.headers` carrier MUST NOT be able to override these —\n* they are derived from connection state (`authorization`, `mcp-session-id`)\n* or from the message body itself (`mcp-protocol-version`, `mcp-method`,\n* `mcp-name`), and a per-request override would let a caller produce a\n* header/body disagreement the server's SEP-2243 cross-checks reject.\n*/\nconst RESERVED_REQUEST_HEADER_NAMES = new Set([\n\t\"authorization\",\n\t\"content-type\",\n\t\"mcp-protocol-version\",\n\t\"mcp-method\",\n\t\"mcp-name\",\n\t\"mcp-session-id\"\n]);\n/**\n* `AbortSignal.any` with a manual fallback. `AbortSignal.any` landed in\n* Node 20.3; this package's `engines` floor is `>=20`, so 20.0–20.2 must be\n* served by the fallback combinator (a controller that aborts on the first\n* of `a` or `b`). The native path is preferred because it propagates the\n* originating signal's `reason` and participates in GC the way the spec\n* defines.\n*/\nfunction anySignal(a, b) {\n\tif (typeof AbortSignal.any === \"function\") return AbortSignal.any([a, b]);\n\tconst controller = new AbortController();\n\tif (a.aborted) return controller.abort(a.reason), controller.signal;\n\tif (b.aborted) return controller.abort(b.reason), controller.signal;\n\tconst cleanup = () => {\n\t\ta.removeEventListener(\"abort\", onA);\n\t\tb.removeEventListener(\"abort\", onB);\n\t};\n\tfunction onA() {\n\t\tcleanup();\n\t\tcontroller.abort(a.reason);\n\t}\n\tfunction onB() {\n\t\tcleanup();\n\t\tcontroller.abort(b.reason);\n\t}\n\ta.addEventListener(\"abort\", onA, { once: true });\n\tb.addEventListener(\"abort\", onB, { once: true });\n\treturn controller.signal;\n}\n/**\n* Client transport for Streamable HTTP: this implements the MCP Streamable HTTP transport specification.\n* It will connect to a server using HTTP `POST` for sending messages and HTTP `GET` with Server-Sent Events\n* for receiving messages.\n*/\nvar StreamableHTTPClientTransport = class {\n\t_abortController;\n\t_url;\n\t_resourceMetadataUrl;\n\t_scope;\n\t_requestInit;\n\t_authProvider;\n\t_oauthProvider;\n\t_skipIssuerMetadataValidation;\n\t_fetch;\n\t_fetchWithInit;\n\t_sessionId;\n\t_reconnectionOptions;\n\t_protocolVersion;\n\t_onInsufficientScope;\n\t_maxStepUpRetries;\n\t_serverRetryMs;\n\t_reconnectionScheduler;\n\t_cancelReconnection;\n\tonclose;\n\tonerror;\n\tonmessage;\n\t/**\n\t* Streamable HTTP opens one POST (and SSE response stream) per outbound\n\t* request and honors `TransportSendOptions.requestSignal`. On a 2026-era\n\t* connection the protocol layer aborts that per-request stream as the\n\t* spec cancellation signal instead of POSTing `notifications/cancelled`.\n\t*/\n\thasPerRequestStream = true;\n\tconstructor(url, opts) {\n\t\tthis._url = url;\n\t\tthis._resourceMetadataUrl = void 0;\n\t\tthis._scope = void 0;\n\t\tthis._requestInit = opts?.requestInit;\n\t\tthis._skipIssuerMetadataValidation = opts?.skipIssuerMetadataValidation;\n\t\tif (isOAuthClientProvider(opts?.authProvider)) {\n\t\t\tthis._oauthProvider = opts.authProvider;\n\t\t\tthis._authProvider = adaptOAuthProvider(opts.authProvider, { skipIssuerMetadataValidation: opts.skipIssuerMetadataValidation });\n\t\t} else this._authProvider = opts?.authProvider;\n\t\tthis._fetch = opts?.fetch;\n\t\tthis._fetchWithInit = createFetchWithInit(opts?.fetch, opts?.requestInit);\n\t\tthis._sessionId = opts?.sessionId;\n\t\tthis._protocolVersion = opts?.protocolVersion;\n\t\tthis._reconnectionOptions = opts?.reconnectionOptions ?? DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS;\n\t\tthis._reconnectionScheduler = opts?.reconnectionScheduler;\n\t\tthis._onInsufficientScope = opts?.onInsufficientScope ?? \"reauthorize\";\n\t\tthis._maxStepUpRetries = Math.max(0, opts?.maxStepUpRetries ?? DEFAULT_MAX_STEP_UP_RETRIES);\n\t}\n\t/**\n\t* SEP-2350 step-up: compute the union scope, decide whether refresh must be\n\t* bypassed, and run {@linkcode auth}. Returns the auth result so the caller\n\t* can decide whether to retry. Shared by the POST `_send` path and the GET\n\t* `_startOrAuthSse` path so both apply the same `'throw'` short-circuit,\n\t* the same superset-gated refresh bypass, and the same retry cap.\n\t*/\n\tasync _stepUpAuthorize(challenge, stepUpRetries) {\n\t\ttry {\n\t\t\treturn await this._stepUpAuthorizeInner(challenge, stepUpRetries);\n\t\t} catch (error) {\n\t\t\tthrow markAuthSeamEscape(error);\n\t\t}\n\t}\n\tasync _stepUpAuthorizeInner(challenge, stepUpRetries) {\n\t\tif (this._onInsufficientScope === \"throw\") throw new InsufficientScopeError({\n\t\t\trequiredScope: challenge.scope,\n\t\t\tresourceMetadataUrl: challenge.resourceMetadataUrl,\n\t\t\terrorDescription: challenge.errorDescription\n\t\t});\n\t\tif (!this._oauthProvider) throw new InsufficientScopeError({\n\t\t\trequiredScope: challenge.scope,\n\t\t\tresourceMetadataUrl: challenge.resourceMetadataUrl,\n\t\t\terrorDescription: challenge.errorDescription\n\t\t});\n\t\tif (stepUpRetries >= this._maxStepUpRetries) throw new SdkHttpError(SdkErrorCode.ClientHttpForbidden, `Server returned 403 insufficient_scope after step-up re-authorization (retry limit ${this._maxStepUpRetries} reached)`, {\n\t\t\tstatus: 403,\n\t\t\tstatusText: challenge.statusText ?? \"Forbidden\",\n\t\t\ttext: challenge.text\n\t\t});\n\t\tif (challenge.resourceMetadataUrl) this._resourceMetadataUrl = challenge.resourceMetadataUrl;\n\t\tconst tokens = await this._oauthProvider.tokens();\n\t\tconst unionScope = computeScopeUnion(this._scope, tokens?.scope, challenge.scope);\n\t\tthis._scope = unionScope;\n\t\tconst forceReauthorization = isStrictScopeSuperset(unionScope, tokens?.scope);\n\t\treturn auth(this._oauthProvider, {\n\t\t\tserverUrl: this._url,\n\t\t\tresourceMetadataUrl: this._resourceMetadataUrl,\n\t\t\tscope: unionScope,\n\t\t\tforceReauthorization,\n\t\t\tfetchFn: this._fetchWithInit,\n\t\t\tskipIssuerMetadataValidation: this._skipIssuerMetadataValidation\n\t\t});\n\t}\n\tasync _commonHeaders() {\n\t\tconst headers = {};\n\t\tlet token;\n\t\ttry {\n\t\t\ttoken = await this._authProvider?.token();\n\t\t} catch (error) {\n\t\t\tthrow markAuthSeamEscape(error);\n\t\t}\n\t\tif (token) headers[\"Authorization\"] = `Bearer ${token}`;\n\t\tif (this._sessionId) headers[\"mcp-session-id\"] = this._sessionId;\n\t\tif (this._protocolVersion) headers[\"mcp-protocol-version\"] = this._protocolVersion;\n\t\tconst extraHeaders = normalizeHeaders(this._requestInit?.headers);\n\t\treturn new Headers({\n\t\t\t...headers,\n\t\t\t...extraHeaders\n\t\t});\n\t}\n\t/**\n\t* Body-derived per-request headers: when an outgoing request carries a\n\t* protocol-version claim in its `_meta` envelope (the version negotiation\n\t* probe is the first such sender), `MCP-Protocol-Version` and `Mcp-Method`\n\t* derive from the message itself. The connection-level version slot is\n\t* neither consulted nor mutated; messages without an envelope claim are\n\t* untouched, so no 2026 header can appear on a legacy exchange.\n\t*/\n\t_applyBodyDerivedHeaders(headers, message) {\n\t\tif (Array.isArray(message) || !isJSONRPCRequest(message)) return;\n\t\tconst envelopeVersion = (message.params?._meta)?.[PROTOCOL_VERSION_META_KEY];\n\t\tif (typeof envelopeVersion !== \"string\") return;\n\t\theaders.set(\"mcp-protocol-version\", envelopeVersion);\n\t\theaders.set(\"mcp-method\", message.method);\n\t\tconst params = message.params;\n\t\tconst nameHeader = message.method === \"resources/read\" ? typeof params?.uri === \"string\" ? params.uri : void 0 : typeof params?.name === \"string\" ? params.name : void 0;\n\t\tif (nameHeader !== void 0) headers.set(\"mcp-name\", encodeMcpParamValue(nameHeader));\n\t}\n\t/**\n\t* `true` when the outbound message is a single request carrying a\n\t* modern-era protocol-version envelope claim — the same predicate that\n\t* gates body-derived `mcp-method`/`mcp-name` emission. Used to confine the\n\t* 400-body-as-ProtocolError delivery to modern-era exchanges only.\n\t*/\n\t_isModernEnvelopedRequest(message) {\n\t\tif (Array.isArray(message) || !isJSONRPCRequest(message)) return false;\n\t\tconst v = (message.params?._meta)?.[PROTOCOL_VERSION_META_KEY];\n\t\treturn typeof v === \"string\" && isModernProtocolVersion(v);\n\t}\n\tasync _startOrAuthSse(options, isAuthRetry = false, stepUpRetries = 0) {\n\t\tconst { resumptionToken, requestSignal } = options;\n\t\tconst isIntentionalAbort = () => this._abortController?.signal.aborted === true || requestSignal?.aborted === true;\n\t\ttry {\n\t\t\tconst headers = await this._commonHeaders();\n\t\t\tconst types = [...headers.get(\"accept\")?.split(\",\").map((s) => s.trim().toLowerCase()) ?? [], \"text/event-stream\"];\n\t\t\theaders.set(\"accept\", [...new Set(types)].join(\", \"));\n\t\t\tif (resumptionToken) headers.set(\"last-event-id\", resumptionToken);\n\t\t\tconst transportSignal = this._abortController?.signal;\n\t\t\tconst signal = requestSignal !== void 0 && transportSignal !== void 0 ? anySignal(transportSignal, requestSignal) : requestSignal ?? transportSignal;\n\t\t\tconst response = await (this._fetch ?? fetch)(this._url, {\n\t\t\t\t...this._requestInit,\n\t\t\t\tmethod: \"GET\",\n\t\t\t\theaders,\n\t\t\t\tsignal\n\t\t\t});\n\t\t\tif (!response.ok) {\n\t\t\t\tif (response.status === 401 && this._authProvider) {\n\t\t\t\t\tif (response.headers.has(\"www-authenticate\")) {\n\t\t\t\t\t\tconst { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(response);\n\t\t\t\t\t\tthis._resourceMetadataUrl = resourceMetadataUrl;\n\t\t\t\t\t\tthis._scope = computeScopeUnion(this._scope, scope);\n\t\t\t\t\t}\n\t\t\t\t\tif (this._authProvider.onUnauthorized && !isAuthRetry) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait this._authProvider.onUnauthorized({\n\t\t\t\t\t\t\t\tresponse,\n\t\t\t\t\t\t\t\tserverUrl: this._url,\n\t\t\t\t\t\t\t\tfetchFn: this._fetchWithInit\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow markAuthSeamEscape(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\t\t\treturn this._startOrAuthSse(options, true, stepUpRetries);\n\t\t\t\t\t}\n\t\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\t\tif (isAuthRetry) throw markAuthSeamEscape(new SdkHttpError(SdkErrorCode.ClientHttpAuthentication, \"Server returned 401 after re-authentication\", {\n\t\t\t\t\t\tstatus: 401,\n\t\t\t\t\t\tstatusText: response.statusText\n\t\t\t\t\t}));\n\t\t\t\t\tthrow markAuthSeamEscape(new UnauthorizedError());\n\t\t\t\t}\n\t\t\t\tif (response.status === 403) {\n\t\t\t\t\tconst { resourceMetadataUrl, scope, error, errorDescription } = extractWWWAuthenticateParams(response);\n\t\t\t\t\tif (error === \"insufficient_scope\") {\n\t\t\t\t\t\tconst text = await response.text?.().catch(() => null);\n\t\t\t\t\t\tif (await this._stepUpAuthorize({\n\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\tresourceMetadataUrl,\n\t\t\t\t\t\t\terrorDescription,\n\t\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\t\ttext\n\t\t\t\t\t\t}, stepUpRetries) !== \"AUTHORIZED\") throw markAuthSeamEscape(new UnauthorizedError());\n\t\t\t\t\t\treturn this._startOrAuthSse(options, isAuthRetry, stepUpRetries + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\tif (response.status === 405) {\n\t\t\t\t\toptions.onRequestStreamEnd?.();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthrow new SdkHttpError(SdkErrorCode.ClientHttpFailedToOpenStream, `Failed to open SSE stream: ${response.statusText}`, {\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._handleSseStream(response.body, options, true);\n\t\t} catch (error) {\n\t\t\tif (!isIntentionalAbort()) this.onerror?.(error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* Calculates the next reconnection delay using a backoff algorithm\n\t*\n\t* @param attempt Current reconnection attempt count for the specific stream\n\t* @returns Time to wait in milliseconds before next reconnection attempt\n\t*/\n\t_getNextReconnectionDelay(attempt) {\n\t\tif (this._serverRetryMs !== void 0) return this._serverRetryMs;\n\t\tconst initialDelay = this._reconnectionOptions.initialReconnectionDelay;\n\t\tconst growFactor = this._reconnectionOptions.reconnectionDelayGrowFactor;\n\t\tconst maxDelay = this._reconnectionOptions.maxReconnectionDelay;\n\t\treturn Math.min(initialDelay * Math.pow(growFactor, attempt), maxDelay);\n\t}\n\t/**\n\t* Schedule a reconnection attempt using server-provided retry interval or backoff\n\t*\n\t* @param lastEventId The ID of the last received event for resumability\n\t* @param attemptCount Current reconnection attempt count for this specific stream\n\t*/\n\t_scheduleReconnection(options, attemptCount = 0) {\n\t\tconst maxRetries = this._reconnectionOptions.maxRetries;\n\t\tif (attemptCount >= maxRetries) {\n\t\t\tthis.onerror?.(/* @__PURE__ */ new Error(`Maximum reconnection attempts (${maxRetries}) exceeded.`));\n\t\t\toptions.onRequestStreamEnd?.();\n\t\t\treturn;\n\t\t}\n\t\tconst delay = this._getNextReconnectionDelay(attemptCount);\n\t\tconst reconnect = () => {\n\t\t\tthis._cancelReconnection = void 0;\n\t\t\tif (this._abortController?.signal.aborted || options.requestSignal?.aborted) return;\n\t\t\tthis._startOrAuthSse(options).catch((error) => {\n\t\t\t\tif (this._abortController?.signal.aborted || options.requestSignal?.aborted) return;\n\t\t\t\tthis.onerror?.(/* @__PURE__ */ new Error(`Failed to reconnect SSE stream: ${error instanceof Error ? error.message : String(error)}`));\n\t\t\t\ttry {\n\t\t\t\t\tthis._scheduleReconnection(options, attemptCount + 1);\n\t\t\t\t} catch (scheduleError) {\n\t\t\t\t\tthis.onerror?.(scheduleError instanceof Error ? scheduleError : new Error(String(scheduleError)));\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tif (this._reconnectionScheduler) {\n\t\t\tconst cancel = this._reconnectionScheduler(reconnect, delay, attemptCount);\n\t\t\tthis._cancelReconnection = typeof cancel === \"function\" ? cancel : void 0;\n\t\t} else {\n\t\t\tconst handle = setTimeout(reconnect, delay);\n\t\t\tthis._cancelReconnection = () => clearTimeout(handle);\n\t\t}\n\t}\n\t_handleSseStream(stream, options, isReconnectable) {\n\t\tif (!stream) {\n\t\t\toptions.onRequestStreamEnd?.();\n\t\t\treturn;\n\t\t}\n\t\tconst { onresumptiontoken, replayMessageId, requestSignal, onRequestStreamEnd } = options;\n\t\tconst isIntentionalAbort = () => this._abortController?.signal.aborted === true || requestSignal?.aborted === true;\n\t\tlet lastEventId;\n\t\tlet hasPrimingEvent = false;\n\t\tlet receivedResponse = false;\n\t\tconst processStream = async () => {\n\t\t\ttry {\n\t\t\t\tconst reader = stream.pipeThrough(new TextDecoderStream()).pipeThrough(new EventSourceParserStream({ onRetry: (retryMs) => {\n\t\t\t\t\tthis._serverRetryMs = retryMs;\n\t\t\t\t} })).getReader();\n\t\t\t\twhile (true) {\n\t\t\t\t\tconst { value: event, done } = await reader.read();\n\t\t\t\t\tif (done) break;\n\t\t\t\t\tif (event.id) {\n\t\t\t\t\t\tlastEventId = event.id;\n\t\t\t\t\t\thasPrimingEvent = true;\n\t\t\t\t\t\tonresumptiontoken?.(event.id);\n\t\t\t\t\t}\n\t\t\t\t\tif (!event.data) continue;\n\t\t\t\t\tif (!event.event || event.event === \"message\") try {\n\t\t\t\t\t\tconst message = JSONRPCMessageSchema.parse(JSON.parse(event.data));\n\t\t\t\t\t\tif (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {\n\t\t\t\t\t\t\treceivedResponse = true;\n\t\t\t\t\t\t\tif (replayMessageId !== void 0) message.id = replayMessageId;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.onmessage?.(message);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthis.onerror?.(error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((isReconnectable || hasPrimingEvent) && !receivedResponse && this._abortController && !isIntentionalAbort()) this._scheduleReconnection({\n\t\t\t\t\tresumptionToken: lastEventId,\n\t\t\t\t\tonresumptiontoken,\n\t\t\t\t\treplayMessageId,\n\t\t\t\t\trequestSignal,\n\t\t\t\t\tonRequestStreamEnd\n\t\t\t\t}, 0);\n\t\t\t\telse if (!isIntentionalAbort()) onRequestStreamEnd?.();\n\t\t\t} catch (error) {\n\t\t\t\tif (isIntentionalAbort()) return;\n\t\t\t\tthis.onerror?.(/* @__PURE__ */ new Error(`SSE stream disconnected: ${error}`));\n\t\t\t\tif ((isReconnectable || hasPrimingEvent) && !receivedResponse && this._abortController && !isIntentionalAbort()) try {\n\t\t\t\t\tthis._scheduleReconnection({\n\t\t\t\t\t\tresumptionToken: lastEventId,\n\t\t\t\t\t\tonresumptiontoken,\n\t\t\t\t\t\treplayMessageId,\n\t\t\t\t\t\trequestSignal,\n\t\t\t\t\t\tonRequestStreamEnd\n\t\t\t\t\t}, 0);\n\t\t\t\t} catch (error$1) {\n\t\t\t\t\tthis.onerror?.(/* @__PURE__ */ new Error(`Failed to reconnect: ${error$1 instanceof Error ? error$1.message : String(error$1)}`));\n\t\t\t\t\tonRequestStreamEnd?.();\n\t\t\t\t}\n\t\t\t\telse onRequestStreamEnd?.();\n\t\t\t}\n\t\t};\n\t\tprocessStream();\n\t}\n\tasync start() {\n\t\tif (this._abortController) throw new Error(\"StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.\");\n\t\tthis._abortController = new AbortController();\n\t}\n\tasync finishAuth(codeOrParams, iss) {\n\t\tif (!this._oauthProvider) throw new UnauthorizedError(\"finishAuth requires an OAuthClientProvider\");\n\t\tconst { authorizationCode, iss: issParam } = await resolveAuthorizationCallbackParams(codeOrParams, iss, this._oauthProvider, this._url, {\n\t\t\tfetchFn: this._fetchWithInit,\n\t\t\tresourceMetadataUrl: this._resourceMetadataUrl\n\t\t});\n\t\tif (await auth(this._oauthProvider, {\n\t\t\tserverUrl: this._url,\n\t\t\tauthorizationCode,\n\t\t\tiss: issParam,\n\t\t\tresourceMetadataUrl: this._resourceMetadataUrl,\n\t\t\tscope: this._scope,\n\t\t\tfetchFn: this._fetchWithInit,\n\t\t\tskipIssuerMetadataValidation: this._skipIssuerMetadataValidation\n\t\t}) !== \"AUTHORIZED\") throw new UnauthorizedError(\"Failed to authorize\");\n\t}\n\tasync close() {\n\t\ttry {\n\t\t\tthis._cancelReconnection?.();\n\t\t} finally {\n\t\t\tthis._cancelReconnection = void 0;\n\t\t\tthis._abortController?.abort();\n\t\t\tthis.onclose?.();\n\t\t}\n\t}\n\tasync send(message, options) {\n\t\treturn this._send(message, options, false);\n\t}\n\tasync _send(message, options, isAuthRetry, stepUpRetries = 0) {\n\t\ttry {\n\t\t\tconst { resumptionToken, onresumptiontoken } = options || {};\n\t\t\tif (resumptionToken) {\n\t\t\t\tthis._startOrAuthSse({\n\t\t\t\t\tresumptionToken,\n\t\t\t\t\treplayMessageId: isJSONRPCRequest(message) ? message.id : void 0,\n\t\t\t\t\trequestSignal: options?.requestSignal\n\t\t\t\t}).catch((error) => this.onerror?.(error));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst headers = await this._commonHeaders();\n\t\t\tthis._applyBodyDerivedHeaders(headers, message);\n\t\t\tconst isHandshake = Array.isArray(message) ? message.some((m) => isInitializeRequest(m)) : isInitializeRequest(message);\n\t\t\tif (isHandshake) headers.delete(\"mcp-session-id\");\n\t\t\tif (options?.headers !== void 0) for (const [name, value] of Object.entries(options.headers)) {\n\t\t\t\tif (RESERVED_REQUEST_HEADER_NAMES.has(name.toLowerCase())) continue;\n\t\t\t\theaders.set(name, value);\n\t\t\t}\n\t\t\theaders.set(\"content-type\", \"application/json\");\n\t\t\tconst types = [\n\t\t\t\t...headers.get(\"accept\")?.split(\",\").map((s) => s.trim().toLowerCase()) ?? [],\n\t\t\t\t\"application/json\",\n\t\t\t\t\"text/event-stream\"\n\t\t\t];\n\t\t\theaders.set(\"accept\", [...new Set(types)].join(\", \"));\n\t\t\tconst transportSignal = this._abortController?.signal;\n\t\t\tconst signal = options?.requestSignal !== void 0 && transportSignal !== void 0 ? anySignal(transportSignal, options.requestSignal) : options?.requestSignal ?? transportSignal;\n\t\t\tconst init = {\n\t\t\t\t...this._requestInit,\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders,\n\t\t\t\tbody: JSON.stringify(message),\n\t\t\t\tsignal\n\t\t\t};\n\t\t\tconst response = await (this._fetch ?? fetch)(this._url, init);\n\t\t\tif (isHandshake && response.ok) this._sessionId = response.headers.get(\"mcp-session-id\") || void 0;\n\t\t\tif (!response.ok) {\n\t\t\t\tif (response.status === 401 && this._authProvider) {\n\t\t\t\t\tif (response.headers.has(\"www-authenticate\")) {\n\t\t\t\t\t\tconst { resourceMetadataUrl, scope } = extractWWWAuthenticateParams(response);\n\t\t\t\t\t\tthis._resourceMetadataUrl = resourceMetadataUrl;\n\t\t\t\t\t\tthis._scope = computeScopeUnion(this._scope, scope);\n\t\t\t\t\t}\n\t\t\t\t\tif (this._authProvider.onUnauthorized && !isAuthRetry) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait this._authProvider.onUnauthorized({\n\t\t\t\t\t\t\t\tresponse,\n\t\t\t\t\t\t\t\tserverUrl: this._url,\n\t\t\t\t\t\t\t\tfetchFn: this._fetchWithInit\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\tthrow markAuthSeamEscape(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\t\t\treturn this._send(message, options, true, stepUpRetries);\n\t\t\t\t\t}\n\t\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\t\tif (isAuthRetry) throw markAuthSeamEscape(new SdkHttpError(SdkErrorCode.ClientHttpAuthentication, \"Server returned 401 after re-authentication\", {\n\t\t\t\t\t\tstatus: 401,\n\t\t\t\t\t\tstatusText: response.statusText\n\t\t\t\t\t}));\n\t\t\t\t\tthrow markAuthSeamEscape(new UnauthorizedError());\n\t\t\t\t}\n\t\t\t\tconst text = await response.text?.().catch(() => null);\n\t\t\t\tif (response.status === 403) {\n\t\t\t\t\tconst { resourceMetadataUrl, scope, error, errorDescription } = extractWWWAuthenticateParams(response);\n\t\t\t\t\tif (error === \"insufficient_scope\") {\n\t\t\t\t\t\tif (await this._stepUpAuthorize({\n\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\tresourceMetadataUrl,\n\t\t\t\t\t\t\terrorDescription,\n\t\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\t\ttext\n\t\t\t\t\t\t}, stepUpRetries) !== \"AUTHORIZED\") throw markAuthSeamEscape(new UnauthorizedError());\n\t\t\t\t\t\treturn this._send(message, options, isAuthRetry, stepUpRetries + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (response.status === 400 && typeof text === \"string\" && this._isModernEnvelopedRequest(message)) try {\n\t\t\t\t\tconst parsed = JSONRPCMessageSchema.parse(JSON.parse(text));\n\t\t\t\t\tconst requests = (Array.isArray(message) ? message : [message]).filter((m) => isJSONRPCRequest(m));\n\t\t\t\t\tif (isJSONRPCErrorResponse(parsed) && requests.some((r) => r.id === parsed.id)) {\n\t\t\t\t\t\tthis.onmessage?.(parsed);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} catch {}\n\t\t\t\tthrow new SdkHttpError(SdkErrorCode.ClientHttpNotImplemented, `Error POSTing to endpoint: ${text}`, {\n\t\t\t\t\tstatus: response.status,\n\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\ttext\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (response.status === 202) {\n\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\tif (isInitializedNotification(message)) this._startOrAuthSse({ resumptionToken: void 0 }).catch((error) => this.onerror?.(error));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst hasRequests = (Array.isArray(message) ? message : [message]).some((msg) => \"method\" in msg && \"id\" in msg && msg.id !== void 0);\n\t\t\tconst contentType = response.headers.get(\"content-type\");\n\t\t\tconst responseMediaType = mediaTypeEssence(contentType);\n\t\t\tif (hasRequests) if (responseMediaType === \"text/event-stream\") this._handleSseStream(response.body, {\n\t\t\t\tonresumptiontoken,\n\t\t\t\trequestSignal: options?.requestSignal,\n\t\t\t\tonRequestStreamEnd: options?.onRequestStreamEnd\n\t\t\t}, false);\n\t\t\telse if (responseMediaType === \"application/json\") {\n\t\t\t\tconst data = await response.json();\n\t\t\t\tconst responseMessages = Array.isArray(data) ? data.map((msg) => JSONRPCMessageSchema.parse(msg)) : [JSONRPCMessageSchema.parse(data)];\n\t\t\t\tfor (const msg of responseMessages) this.onmessage?.(msg);\n\t\t\t} else {\n\t\t\t\tawait response.text?.().catch(() => {});\n\t\t\t\tthrow new SdkError(SdkErrorCode.ClientHttpUnexpectedContent, `Unexpected content type: ${contentType}`, { contentType });\n\t\t\t}\n\t\t\telse await response.text?.().catch(() => {});\n\t\t} catch (error) {\n\t\t\tif (options?.requestSignal?.aborted !== true) this.onerror?.(error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\tget sessionId() {\n\t\treturn this._sessionId;\n\t}\n\t/**\n\t* Terminates the current session by sending a `DELETE` request to the server.\n\t*\n\t* Clients that no longer need a particular session\n\t* (e.g., because the user is leaving the client application) SHOULD send an\n\t* HTTP `DELETE` to the MCP endpoint with the `Mcp-Session-Id` header to explicitly\n\t* terminate the session.\n\t*\n\t* The server MAY respond with HTTP `405 Method Not Allowed`, indicating that\n\t* the server does not allow clients to terminate sessions.\n\t*/\n\tasync terminateSession() {\n\t\tif (!this._sessionId) return;\n\t\ttry {\n\t\t\tconst headers = await this._commonHeaders();\n\t\t\tconst init = {\n\t\t\t\t...this._requestInit,\n\t\t\t\tmethod: \"DELETE\",\n\t\t\t\theaders,\n\t\t\t\tsignal: this._abortController?.signal\n\t\t\t};\n\t\t\tconst response = await (this._fetch ?? fetch)(this._url, init);\n\t\t\tawait response.text?.().catch(() => {});\n\t\t\tif (!response.ok && response.status !== 405) throw new SdkHttpError(SdkErrorCode.ClientHttpFailedToTerminateSession, `Failed to terminate session: ${response.statusText}`, {\n\t\t\t\tstatus: response.status,\n\t\t\t\tstatusText: response.statusText\n\t\t\t});\n\t\t\tthis._sessionId = void 0;\n\t\t} catch (error) {\n\t\t\tthis.onerror?.(error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\tsetProtocolVersion(version) {\n\t\tthis._protocolVersion = version;\n\t}\n\tget protocolVersion() {\n\t\treturn this._protocolVersion;\n\t}\n\t/**\n\t* Resume an SSE stream from a previous event ID.\n\t* Opens a `GET` SSE connection with `Last-Event-ID` header to replay missed events.\n\t*\n\t* @param lastEventId The event ID to resume from\n\t* @param options Optional callback to receive new resumption tokens\n\t*/\n\tasync resumeStream(lastEventId, options) {\n\t\tawait this._startOrAuthSse({\n\t\t\tresumptionToken: lastEventId,\n\t\t\tonresumptiontoken: options?.onresumptiontoken\n\t\t});\n\t}\n};\n\n//#endregion\n//#region src/fromJsonSchema.ts\nlet _defaultValidator;\nfunction fromJsonSchema(schema, validator) {\n\treturn fromJsonSchema$1(schema, validator ?? (_defaultValidator ??= new DefaultJsonSchemaValidator()));\n}\n\n//#endregion\nexport { AuthorizationServerMismatchError, BAGGAGE_META_KEY, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, Client, ClientCredentialsProvider, CrossAppAccessProvider, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DEFAULT_REQUEST_TIMEOUT_MSEC, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, InMemoryResponseCacheStore, InMemoryTransport, InsecureTokenEndpointError, InsufficientScopeError, IssuerMismatchError, JSONRPC_VERSION, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, MAX_CACHE_TTL_MS, METHOD_NOT_FOUND, MissingRequiredClientCapabilityError, OAuthClientFlowError, OAuthError, OAuthErrorCode, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PrivateKeyJwtProvider, Protocol, ProtocolError, ProtocolErrorCode, RELATED_TASK_META_KEY, ReadBuffer, RegistrationRejectedError, ResourceNotFoundError, SERVER_INFO_META_KEY, SSEClientTransport, STDIO_DEFAULT_MAX_BUFFER_SIZE, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SdkError, SdkErrorCode, SdkHttpError, SseError, StaticPrivateKeyJwtProvider, StreamableHTTPClientTransport, TRACEPARENT_META_KEY, TRACESTATE_META_KEY, UnauthorizedError, UnsupportedProtocolVersionError, UriTemplate, UrlElicitationRequiredError, applyMiddlewares, assertCompleteRequestPrompt, assertCompleteRequestResourceTemplate, assertSecureTokenEndpoint, auth, buildDiscoveryUrls, checkResourceAllowed, computeScopeUnion, createFetchWithInit, createMiddleware, createPrivateKeyJwtAuth, deserializeMessage, discoverAndRequestJwtAuthGrant, discoverAuthorizationServerMetadata, discoverOAuthMetadata, discoverOAuthProtectedResourceMetadata, discoverOAuthServerInfo, exchangeAuthorization, exchangeJwtAuthGrant, extractResourceMetadataUrl, extractWWWAuthenticateParams, fetchToken, fromJsonSchema, getDisplayName, getSupportedElicitationModes, isCallToolResult, isHttpsUrl, isInitializeRequest, isInitializedNotification, isInputRequiredResult, isJSONRPCErrorResponse, isJSONRPCNotification, isJSONRPCRequest, isJSONRPCResponse, isJSONRPCResultResponse, isJsonContentType, isSpecType, isStrictScopeSuperset, isTaskAugmentedRequestParams, mergeCapabilities, parseErrorResponse, parseJSONRPCMessage, preloadSchemas, prepareAuthorizationCodeRequest, refreshAuthorization, registerClient, requestJwtAuthorizationGrant, resolveClientMetadata, resourceUrlFromServerUrl, selectClientAuthMethod, selectResourceURL, serializeMessage, specTypeSchemas, startAuthorization, validateAuthorizationResponseIssuer, validateClientMetadataUrl, withInputRequired, withLogging, withOAuth };\n//# sourceMappingURL=index.mjs.map","/**\n * Normalizes a URL to ensure consistent handling across platforms.\n *\n * This is particularly important for Windows, where HTTP redirects (301/302)\n * can cause POST requests to be converted to GET requests. By normalizing\n * URLs upfront, we avoid redirects that could cause this issue.\n *\n * Normalization includes:\n * - Removing trailing slashes from the path (unless the path is just \"/\")\n * - Preserving query parameters and fragments\n *\n * @param url The URL to normalize (string or URL object)\n * @returns The normalized URL as a string\n */\nexport function normalizeUrl(url: string | URL): string {\n const urlObj = typeof url === \"string\" ? new URL(url) : new URL(url.toString());\n\n // Remove trailing slash from pathname, but keep \"/\" if it's the only path\n if (urlObj.pathname.length > 1 && urlObj.pathname.endsWith(\"/\")) {\n urlObj.pathname = urlObj.pathname.slice(0, -1);\n }\n\n return urlObj.toString();\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],"mappings":"AAgBA,SAAgB,EAAc,EAAS,CACnC,IAAM,EAAgB,OAAO,OAAO,EAAQ,CAAC,OAAQ,GAAM,OAAO,GAAM,SAAS,CAIjF,OAHe,OAAO,QAAQ,EAAQ,CACjC,QAAQ,CAAC,EAAG,KAAO,EAAc,QAAQ,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