@zibby/core 0.1.31 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/base.js +319 -14
- package/dist/backend-client.js +1 -1
- package/dist/constants/tool-names.js +1 -1
- package/dist/constants/zibby-scratch.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/enrichment/base.js +1 -1
- package/dist/enrichment/enrichers/accessibility-enricher.js +1 -1
- package/dist/enrichment/enrichers/dom-enricher.js +1 -1
- package/dist/enrichment/enrichers/page-state-enricher.js +1 -1
- package/dist/enrichment/enrichers/position-enricher.js +1 -1
- package/dist/enrichment/index.js +4 -1
- package/dist/enrichment/mcp-integration.js +4 -1
- package/dist/enrichment/mcp-ref-enricher.js +1 -1
- package/dist/enrichment/pipeline.js +2 -2
- package/dist/enrichment/trace-text-enricher.js +2 -1
- package/dist/framework/agents/assistant-strategy.js +69 -5
- package/dist/framework/agents/base.js +1 -1
- package/dist/framework/agents/claude-strategy.js +107 -4
- package/dist/framework/agents/codex-strategy.js +23 -4
- package/dist/framework/agents/cursor-strategy.js +138 -20
- package/dist/framework/agents/gemini-strategy.js +34 -7
- package/dist/framework/agents/index.js +285 -6
- package/dist/framework/agents/middleware/assistant-round-pipeline.js +2 -2
- package/dist/framework/agents/providers/base.js +1 -1
- package/dist/framework/agents/providers/index.js +4 -1
- package/dist/framework/agents/providers/openai-transport.js +4 -2
- package/dist/framework/agents/providers/openai.js +1 -1
- package/dist/framework/agents/providers/transport-base.js +1 -1
- package/dist/framework/agents/utils/auth-resolver.js +1 -1
- package/dist/framework/agents/utils/cursor-output-formatter.js +25 -1
- package/dist/framework/agents/utils/openai-proxy-formatter.js +75 -5
- package/dist/framework/agents/utils/payload-budget.js +2 -2
- package/dist/framework/agents/utils/structured-output-formatter.js +8 -4
- package/dist/framework/code-generator.js +309 -10
- package/dist/framework/constants.js +1 -1
- package/dist/framework/context-loader.js +2 -2
- package/dist/framework/function-bridge.js +60 -1
- package/dist/framework/function-skill-registry.js +1 -1
- package/dist/framework/graph-compiler.js +314 -1
- package/dist/framework/graph.js +305 -4
- package/dist/framework/index.js +331 -1
- package/dist/framework/mcp-client.js +56 -2
- package/dist/framework/node-registry.js +294 -3
- package/dist/framework/node.js +297 -4
- package/dist/framework/output-parser.js +2 -2
- package/dist/framework/skill-registry.js +1 -1
- package/dist/framework/state-utils.js +5 -1
- package/dist/framework/state.js +1 -1
- package/dist/framework/tool-resolver.js +1 -1
- package/dist/index.js +512 -5
- package/dist/package.json +1 -1
- package/dist/runtime/generation/base.js +1 -1
- package/dist/runtime/generation/index.js +58 -3
- package/dist/runtime/generation/mcp-ref-strategy.js +17 -17
- package/dist/runtime/generation/stable-id-strategy.js +14 -14
- package/dist/runtime/stable-id-runtime.js +1 -1
- package/dist/runtime/verification/base.js +1 -1
- package/dist/runtime/verification/index.js +3 -3
- package/dist/runtime/verification/playwright-json-strategy.js +1 -1
- package/dist/runtime/zibby-runtime.js +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/sync/uploader.js +1 -1
- package/dist/tools/run-playwright-test.js +3 -3
- package/dist/utils/adf-converter.js +1 -1
- package/dist/utils/ast-utils.js +9 -1
- package/dist/utils/ci-setup.js +4 -4
- package/dist/utils/cursor-mcp-isolated-home.js +1 -1
- package/dist/utils/cursor-utils.js +1 -1
- package/dist/utils/live-frame-discovery.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/mcp-config-writer.js +4 -4
- package/dist/utils/mission-control-from-run-states.js +1 -1
- package/dist/utils/node-schema-parser.js +9 -1
- package/dist/utils/parallel-config.js +1 -1
- package/dist/utils/post-process-events.js +2 -1
- package/dist/utils/repo-clone.js +1 -0
- package/dist/utils/result-handler.js +1 -1
- package/dist/utils/ripple-effect.js +1 -1
- package/dist/utils/run-capacity-coordinator.js +3 -1
- package/dist/utils/run-capacity-queue.js +2 -2
- package/dist/utils/run-index-merge.js +1 -1
- package/dist/utils/run-index-post-cli.js +4 -1
- package/dist/utils/run-registry.js +3 -3
- package/dist/utils/run-state-session.js +2 -2
- package/dist/utils/selector-generator.js +4 -4
- package/dist/utils/session-state-constants.js +1 -1
- package/dist/utils/session-state-live-runs.js +1 -1
- package/dist/utils/streaming-parser.js +3 -3
- package/dist/utils/test-post-processor.js +14 -11
- package/dist/utils/timeline.js +6 -6
- package/dist/utils/trace-parser.js +2 -2
- package/dist/utils/video-organizer.js +3 -3
- package/package.json +1 -1
- package/templates/browser-test-automation/result-handler.mjs +4 -39
|
@@ -1 +1,314 @@
|
|
|
1
|
-
|
|
1
|
+
var kG=Object.create;var ib=Object.defineProperty;var SG=Object.getOwnPropertyDescriptor;var $G=Object.getOwnPropertyNames;var IG=Object.getPrototypeOf,EG=Object.prototype.hasOwnProperty;var kt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var E=(t,e)=>()=>(t&&(e=t(t=0)),e);var O=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Gi=(t,e)=>{for(var r in e)ib(t,r,{get:e[r],enumerable:!0})},PG=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of $G(e))!EG.call(t,i)&&i!==r&&ib(t,i,{get:()=>e[i],enumerable:!(n=SG(e,i))||n.enumerable});return t};var hl=(t,e,r)=>(r=t!=null?kG(IG(t)):{},PG(e||!t||!t.__esModule?ib(r,"default",{value:t,enumerable:!0}):r,t));import gl from"chalk";var Qi,ab,q,wi=E(()=>{Qi={debug:0,info:1,warn:2,error:3,silent:4},ab=class{constructor(){this._level=this._getLogLevel()}_getLogLevel(){if(process.env.ZIBBY_DEBUG==="true")return Qi.debug;if(process.env.ZIBBY_VERBOSE==="true")return Qi.info;let e=process.env.LOG_LEVEL?.toLowerCase();return e&&e in Qi?Qi[e]:Qi.info}_shouldLog(e){return Qi[e]>=this._level}_formatMessage(e,r,n={}){let i=new Date().toISOString(),a=`${this._getPrefix(e)} ${r}`;return Object.keys(n).length>0&&(a+=gl.dim(` ${JSON.stringify(n)}`)),a}_getPrefix(e){return{debug:gl.gray("[DEBUG]"),info:gl.cyan("[INFO]"),warn:gl.yellow("[WARN]"),error:gl.red("\u274C [ERROR]")}[e]||""}debug(e,r){this._shouldLog("debug")&&console.log(this._formatMessage("debug",e,r))}info(e,r){this._shouldLog("info")&&console.log(this._formatMessage("info",e,r))}warn(e,r){this._shouldLog("warn")&&console.warn(this._formatMessage("warn",e,r))}error(e,r){this._shouldLog("error")&&console.error(this._formatMessage("error",e,r))}setLevel(e){e in Qi&&(this._level=Qi[e])}getLevel(){return Object.keys(Qi).find(e=>Qi[e]===this._level)}},q=new ab});import Pr from"chalk";function W1(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function B1(t,e){return(r,n,i)=>{if(typeof r!="string")return t(r,n,i);let o=process.stdout.columns||120,a="";for(let s=0;s<r.length;s++){let c=r[s];e.lineStart&&(a+=F1,e.col=V1,e.lineStart=!1),c===`
|
|
2
|
+
`?(a+=c,e.lineStart=!0,e.col=0,e.inEsc=!1):c==="\x1B"?(e.inEsc=!0,a+=c):e.inEsc?(a+=c,(c>="A"&&c<="Z"||c>="a"&&c<="z")&&(e.inEsc=!1)):(e.col++,a+=c,e.col>=o&&(a+=`
|
|
3
|
+
${F1}`,e.col=V1))}return t(a,n,i)}}var zG,vl,OG,q1,sb,Z1,L1,cb,F1,V1,ub,Ht,Gs=E(()=>{zG="__WORKFLOW_GRAPH_LOG__",vl=Pr.gray("\u2502"),OG=Pr.gray("\u250C"),q1=Pr.gray("\u2514"),sb=Pr.green("\u25C6"),Z1=Pr.hex("#c084fc")("\u25C6"),L1=Pr.hex("#2dd4bf")("\u25C6"),cb=Pr.red("\u25C6"),F1=`${vl} `,V1=2;ub=class{constructor(){this._currentNode=null,this._origStdoutWrite=null,this._origStderrWrite=null;let e=String(process.env.ZIBBY_RUN_SOURCE||"").trim().toLowerCase(),r=String(process.env.ZIBBY_WORKFLOW_GRAPH_LOG_MARKERS||"").trim()==="1";this._emitWorkflowGraphMarkers=r||e==="studio"}get isInsideNode(){return this._currentNode!==null}_startIntercepting(){this._origStdoutWrite=process.stdout.write.bind(process.stdout),this._origStderrWrite=process.stderr.write.bind(process.stderr);let e={lineStart:!0,col:0,inEsc:!1},r={lineStart:!0,col:0,inEsc:!1};this._outState=e,this._errState=r,process.stdout.write=B1(this._origStdoutWrite,e),process.stderr.write=B1(this._origStderrWrite,r)}_stopIntercepting(){this._origStdoutWrite&&(this._outState&&!this._outState.lineStart&&this._origStdoutWrite(`
|
|
4
|
+
`),process.stdout.write=this._origStdoutWrite),this._origStderrWrite&&(this._errState&&!this._errState.lineStart&&this._origStderrWrite(`
|
|
5
|
+
`),process.stderr.write=this._origStderrWrite),this._origStdoutWrite=null,this._origStderrWrite=null}_rawWrite(e){(this._origStdoutWrite||process.stdout.write.bind(process.stdout))(`${e}
|
|
6
|
+
`)}_emitGraphLogMarker(e){if(!this._emitWorkflowGraphMarkers)return;let r=`${zG}${JSON.stringify(e)}
|
|
7
|
+
`;this._origStdoutWrite?this._origStdoutWrite(r):process.stdout.write(r)}_writeDot(e,r){this._origStdoutWrite?(this._outState&&!this._outState.lineStart&&(this._origStdoutWrite(`
|
|
8
|
+
`),this._outState.lineStart=!0,this._outState.col=0),this._origStdoutWrite(`${e} ${r}
|
|
9
|
+
`)):process.stdout.write.bind(process.stdout)(`${e} ${r}
|
|
10
|
+
`)}step(e){this._origStdoutWrite?this._writeDot(sb,e):process.stdout.write.bind(process.stdout)(`${vl} ${sb} ${e}
|
|
11
|
+
`)}stepTool(e){this._origStdoutWrite?this._writeDot(Z1,e):process.stdout.write.bind(process.stdout)(`${vl} ${Z1} ${e}
|
|
12
|
+
`)}stepMemory(e){let r=Pr.hex("#2dd4bf")(e);this._origStdoutWrite?this._writeDot(L1,r):process.stdout.write.bind(process.stdout)(`${vl} ${L1} ${r}
|
|
13
|
+
`)}stepFail(e){this._origStdoutWrite?this._writeDot(cb,Pr.red(e)):process.stdout.write.bind(process.stdout)(`${vl} ${cb} ${Pr.red(e)}
|
|
14
|
+
`)}nodeStart(e){this._currentNode=e,this._emitGraphLogMarker({phase:"node_begin",node:e}),this._rawWrite(`${OG} ${e}`),this._startIntercepting()}nodeComplete(e,r={}){this._stopIntercepting();let{duration:n,details:i}=r;if(i)for(let a of i)this._rawWrite(`${sb} ${a}`);let o=n?Pr.dim(` ${W1(n)}`):"";this._rawWrite(`${q1} ${Pr.green("done")}${o}`),this._emitGraphLogMarker({phase:"node_end",node:e}),this._rawWrite("")}nodeFailed(e,r,n={}){this._stopIntercepting();let{duration:i}=n,o=i?Pr.dim(` ${W1(i)}`):"";this._rawWrite(`${cb} ${Pr.red(r)}`),this._rawWrite(`${q1} ${Pr.red("failed")}${o}`),this._emitGraphLogMarker({phase:"node_end",node:e}),this._rawWrite("")}route(e,r){this._rawWrite(Pr.dim(` ${e} \u2192 ${r}`)),this._rawWrite("")}graphComplete(){this._rawWrite(Pr.green.bold("\u2713 Workflow completed"))}},Ht=new ub});var Qs,K1,Ko,xm,H1,wm=E(()=>{Qs=".zibby/output",K1="sessions",Ko=".session-info.json",xm=".zibby-studio-stop",H1=["CI_JOB_ID","GITHUB_RUN_ID","CIRCLE_WORKFLOW_ID","BUILD_ID"]});var gn,Da=E(()=>{gn=class{constructor(e,r,n=0){this.name=e,this.description=r,this.priority=n}async invoke(e,r={}){throw new Error("AgentStrategy.invoke() must be implemented by subclass")}canHandle(e){throw new Error("AgentStrategy.canHandle() must be implemented by subclass")}getName(){return this.name}getDescription(){return this.description}getPriority(){return this.priority}}});var Yr,lb,db,G1,km,Ma=E(()=>{Yr={ASSISTANT:"gpt-5.4-nano-2026-03-17",CLAUDE:"claude-sonnet-4-6",CURSOR:"auto",CODEX:"o4-mini",GEMINI:"gemini-2.5-pro",OPENAI_POSTPROCESSING:"gpt-4o-mini"},lb={auto:"claude-sonnet-4-6","sonnet-4.6":"claude-sonnet-4-6","sonnet-4-6":"claude-sonnet-4-6","opus-4.6":"claude-opus-4-6","opus-4-6":"claude-opus-4-6","sonnet-4.5":"claude-sonnet-4-5-20250929","sonnet-4-5":"claude-sonnet-4-5-20250929","opus-4.5":"claude-opus-4-20250514","opus-4-5":"claude-opus-4-20250514","claude-sonnet-4-6":"claude-sonnet-4-6","claude-opus-4-6":"claude-opus-4-6","claude-sonnet-4-5-20250929":"claude-sonnet-4-5-20250929","claude-opus-4-20250514":"claude-opus-4-20250514"},db={auto:"o4-mini","o4-mini":"o4-mini",o3:"o3","o3-mini":"o3-mini","codex-mini":"codex-mini-latest","gpt-4o":"gpt-4o","gpt-4o-mini":"gpt-4o-mini","gpt-5.2-codex":"gpt-5.2-codex","gpt-5.2":"gpt-5.2","gpt-5.3":"gpt-5.3","gpt-5.4":"gpt-5.4"},G1={auto:"gemini-2.5-pro","gemini-2.5-pro":"gemini-2.5-pro","gemini-2.5-flash":"gemini-2.5-flash"},km={CURSOR_AGENT_DEFAULT:1200*1e3,OPENAI_REQUEST:18e4}});var fb={};Gi(fb,{getAllSkills:()=>pb,getSkill:()=>Tr,hasSkill:()=>NG,listSkillIds:()=>CG,registerSkill:()=>jG});function jG(t){if(!t||typeof t.id!="string")throw new Error("Skill definition must include a string id");yl.set(t.id,Object.freeze({...t}))}function Tr(t){return yl.get(t)||null}function NG(t){return yl.has(t)}function pb(){return new Map(yl)}function CG(){return Array.from(yl.keys())}var yl,go=E(()=>{yl=new Map});var Ys,mb=E(()=>{Ys=class t{constructor(){this.buffer="",this.extractedResult=null,this.rawText="",this.zodSchema=null,this.lastOutputLength=0,this.onToolCall=null,this._lastToolEmit=null}processChunk(e){if(!e)return null;this.buffer+=e;let r=this.buffer.split(`
|
|
15
|
+
`);this.buffer=r.pop()||"";let n="";for(let i of r)if(i.trim())try{let o=JSON.parse(i);this._emitToolCalls(o);let a=this.extractText(o);if(a){if(this.rawText&&a.startsWith(this.rawText)){let s=a.substring(this.rawText.length);this.rawText=a,n+=s}else(!this.rawText.includes(a)||a.length<20)&&(this.rawText+=a,n+=a);this.tryExtractResult(this.rawText)}else this.isValidResult(o)&&(this.rawText+=`${i}
|
|
16
|
+
`,n+=`${i}
|
|
17
|
+
`,this.extractedResult=o)}catch{if(i.includes('"text"')||i.includes('"content"')){let a=i.match(/"text"\s*:\s*"([^"]*)/),s=i.match(/"content"\s*:\s*"([^"]*)/),c=a?a[1]:s?s[1]:null;c&&!this.rawText.includes(c)&&(n+=c,this.rawText+=c)}}return n||null}flush(){if(!this.buffer.trim())return null;let e="";try{let r=JSON.parse(this.buffer);this._emitToolCalls(r);let n=this.extractText(r);n&&(this.rawText+=n,e+=n,this.tryExtractResult(n))}catch{this.rawText+=this.buffer,e+=this.buffer,this.tryExtractResult(this.buffer)}return this.buffer="",e||null}_emitToolCalls(e){if(!this.onToolCall)return;let r=(a,s)=>{if(!a)return;let c=`${a}:${JSON.stringify(s??{})}`;this._lastToolEmit!==c&&(this._lastToolEmit=c,this.onToolCall(a,s??void 0))},n=a=>{if(a!=null){if(typeof a=="object"&&!Array.isArray(a))return a;if(typeof a=="string")try{return JSON.parse(a)}catch{return}}};if(e.type==="tool_use"||e.type==="tool_call"){if(e.name){r(e.name,n(e.input??e.arguments));return}let a=e.tool_call;if(a&&typeof a=="object"&&!Array.isArray(a)){let s=Object.keys(a);if(s.length===1){let c=s[0],u=a[c],l=u&&typeof u=="object"?u.args??u.input??u:void 0;r(c,n(l))}return}return}if(Array.isArray(e.tool_calls)){for(let a of e.tool_calls)r(a.name,n(a.input??a.arguments));return}let i=e.message??e;if(Array.isArray(i?.tool_calls)){for(let a of i.tool_calls)r(a.name,n(a.input??a.arguments));return}let o=i?.content??e.content;if(Array.isArray(o))for(let a of o)(a.type==="tool_use"||a.type==="tool_call")&&a.name&&r(a.name,n(a.input??a.arguments))}extractText(e){if(e.type==="assistant"&&e.message?.content){let r=e.message.content;if(Array.isArray(r))return r.filter(n=>n.type==="text"&&n.text).map(n=>n.text).join("")}return e.type==="thinking"&&e.text||e.text?e.text:e.content&&typeof e.content=="string"?e.content:e.delta?e.delta:null}tryExtractResult(e){if(!e||typeof e!="string")return;let r=[],n=/```json\s*\n?([\s\S]*?)\n?```/g,i;for(;(i=n.exec(e))!==null;){let d=i[1].trim();try{JSON.parse(d),r.push({text:d,source:"markdown"})}catch{}}let o=0,a=0;for(;o<e.length&&(o=e.indexOf("{",o),o!==-1);){let d=0,p=o;for(let f=o;f<e.length;f++)if(e[f]==="{")d++;else if(e[f]==="}"&&(d--,d===0)){p=f,r.push({text:e.substring(o,p+1),source:"brace"}),a++;break}o=p+1}let s=this.extractedResult,c=s?JSON.stringify(s).length:0,u=0,l=-1;for(let d=0;d<r.length;d++){let p=r[d];try{let f=p.text.replace(/,(\s*[}\]])/g,"$1"),m=JSON.parse(f);this.isValidResult(m)&&(u++,c=JSON.stringify(m).length,s=m,l=d)}catch{}}s&&(this.extractedResult=s)}isValidResult(e){if(!e||typeof e!="object"||Array.isArray(e)||e.session_id||e.timestamp_ms||e.type||e.call_id||e.tool_call||e.result&&typeof e.result=="object"&&(e.result.success&&typeof e.result.success=="object"||e.result.error&&typeof e.result.error=="object")||e.args&&typeof e.args=="object")return!1;if(this.zodSchema)try{return this.zodSchema.parse(e),!0}catch{return!1}return!0}getResult(){return this.extractedResult}getRawText(){return this.rawText}static extractResult(e,r=null){let n=new t;n.zodSchema=r,n.processChunk(e),n.flush();let i=n.getResult();return!i&&process.env.LOG_LEVEL==="debug"&&console.error("[StreamingParser] No result extracted from",e?.length||0,"chars"),i}}});var gb,RG,hb,vb,Sm=E(()=>{gb=Symbol("Let zodToJsonSchema decide on which parser to use"),RG=(t,e)=>{if(e.description)try{return{...t,...JSON.parse(e.description)}}catch{}return t},hb={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},vb=t=>typeof t=="string"?{...hb,name:t}:{...hb,...t}});var yb,_b=E(()=>{Sm();yb=t=>{let e=vb(t),r=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,i])=>[i._def,{def:i._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))}}});function $m(t,e,r,n){n?.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function dt(t,e,r,n,i){t[e]=r,$m(t,e,n,i)}var Ho=E(()=>{});var _l,Im=E(()=>{_l=(t,e)=>{let r=0;for(;r<t.length&&r<e.length&&t[r]===e[r];r++);return[(t.length-r).toString(),...e.slice(r)].join("/")}});var pt,Q1,pe,vo,bl=E(()=>{(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(pt||(pt={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Q1||(Q1={}));pe=pt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vo=t=>{switch(typeof t){case"undefined":return pe.undefined;case"string":return pe.string;case"number":return Number.isNaN(t)?pe.nan:pe.number;case"boolean":return pe.boolean;case"function":return pe.function;case"bigint":return pe.bigint;case"symbol":return pe.symbol;case"object":return Array.isArray(t)?pe.array:t===null?pe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?pe.promise:typeof Map<"u"&&t instanceof Map?pe.map:typeof Set<"u"&&t instanceof Set?pe.set:typeof Date<"u"&&t instanceof Date?pe.date:pe.object;default:return pe.unknown}}});var Y,Rn,Em=E(()=>{bl();Y=pt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Rn=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){let u=a.path[c];c===a.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(a))):s[u]=s[u]||{_errors:[]},s=s[u],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,pt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r=Object.create(null),n=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];r[o]=r[o]||[],r[o].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Rn.create=t=>new Rn(t)});var AG,Go,bb=E(()=>{Em();bl();AG=(t,e)=>{let r;switch(t.code){case Y.invalid_type:t.received===pe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,pt.jsonStringifyReplacer)}`;break;case Y.unrecognized_keys:r=`Unrecognized key(s) in object: ${pt.joinValues(t.keys,", ")}`;break;case Y.invalid_union:r="Invalid input";break;case Y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${pt.joinValues(t.options)}`;break;case Y.invalid_enum_value:r=`Invalid enum value. Expected ${pt.joinValues(t.options)}, received '${t.received}'`;break;case Y.invalid_arguments:r="Invalid function arguments";break;case Y.invalid_return_type:r="Invalid function return type";break;case Y.invalid_date:r="Invalid date";break;case Y.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:pt.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Y.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Y.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Y.custom:r="Invalid input";break;case Y.invalid_intersection_types:r="Intersection results could not be merged";break;case Y.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Y.not_finite:r="Number must be finite";break;default:r=e.defaultError,pt.assertNever(t)}return{message:r}},Go=AG});function xl(){return UG}var UG,Pm=E(()=>{bb();UG=Go});function se(t,e){let r=xl(),n=Tm({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Go?void 0:Go].filter(i=>!!i)});t.common.issues.push(n)}var Tm,Zr,je,Js,Jr,xb,wb,qa,wl,kb=E(()=>{Pm();bb();Tm=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:e,defaultError:s}).message;return{...i,path:o,message:s}};Zr=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return je;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return je;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}},je=Object.freeze({status:"aborted"}),Js=t=>({status:"dirty",value:t}),Jr=t=>({status:"valid",value:t}),xb=t=>t.status==="aborted",wb=t=>t.status==="dirty",qa=t=>t.status==="valid",wl=t=>typeof Promise<"u"&&t instanceof Promise});var Y1=E(()=>{});var _e,J1=E(()=>{(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(_e||(_e={}))});function Ve(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,s)=>{let{message:c}=t;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??n??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:i}}function tN(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function e5(t){return new RegExp(`^${tN(t)}$`)}function t5(t){let e=`${eN}T${tN(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function r5(t,e){return!!((e==="v4"||!e)&&KG.test(t)||(e==="v6"||!e)&&GG.test(t))}function n5(t,e){if(!FG.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function i5(t,e){return!!((e==="v4"||!e)&&HG.test(t)||(e==="v6"||!e)&&QG.test(t))}function o5(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}function Xs(t){if(t instanceof An){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=ki.create(Xs(n))}return new An({...t._def,shape:()=>e})}else return t instanceof Yo?new Yo({...t._def,type:Xs(t.element)}):t instanceof ki?ki.create(Xs(t.unwrap())):t instanceof bo?bo.create(Xs(t.unwrap())):t instanceof _o?_o.create(t.items.map(e=>Xs(e))):t}function Ib(t,e){let r=vo(t),n=vo(e);if(t===e)return{valid:!0,data:t};if(r===pe.object&&n===pe.object){let i=pt.objectKeys(e),o=pt.objectKeys(t).filter(s=>i.indexOf(s)!==-1),a={...t,...e};for(let s of o){let c=Ib(t[s],e[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===pe.array&&n===pe.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],s=e[o],c=Ib(a,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===pe.date&&n===pe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function rN(t,e){return new sc({values:t,typeName:ee.ZodEnum,...Ve(e)})}var Jn,X1,Xe,DG,MG,qG,ZG,LG,FG,VG,WG,BG,Sb,KG,HG,GG,QG,YG,JG,eN,XG,ec,kl,Sl,$l,Il,El,tc,rc,Pl,Qo,Yi,Tl,Yo,An,nc,yo,$b,ic,_o,Eb,zl,Ol,Pb,oc,ac,sc,cc,Za,Si,ki,bo,uc,lc,jl,zm,Om,dc,f$e,ee,m$e,h$e,g$e,v$e,y$e,_$e,b$e,x$e,w$e,k$e,S$e,$$e,I$e,E$e,a5,P$e,T$e,z$e,O$e,j$e,N$e,C$e,R$e,A$e,U$e,D$e,M$e,q$e,Z$e,L$e,F$e,V$e,W$e,B$e,nN=E(()=>{Em();Pm();J1();kb();bl();Jn=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},X1=(t,e)=>{if(qa(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Rn(t.common.issues);return this._error=r,this._error}}};Xe=class{get description(){return this._def.description}_getType(e){return vo(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:vo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Zr,ctx:{common:e.parent.common,data:e.data,parsedType:vo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(wl(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)},i=this._parseSync({data:e,path:n.path,parent:n});return X1(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return qa(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>qa(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(wl(i)?i:Promise.resolve(i));return X1(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=e(i),s=()=>o.addIssue({code:Y.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Si({schema:this,typeName:ee.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ki.create(this,this._def)}nullable(){return bo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yo.create(this)}promise(){return Za.create(this,this._def)}or(e){return nc.create([this,e],this._def)}and(e){return ic.create(this,e,this._def)}transform(e){return new Si({...Ve(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new uc({...Ve(this._def),innerType:this,defaultValue:r,typeName:ee.ZodDefault})}brand(){return new zm({typeName:ee.ZodBranded,type:this,...Ve(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new lc({...Ve(this._def),innerType:this,catchValue:r,typeName:ee.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Om.create(this,e)}readonly(){return dc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},DG=/^c[^\s-]{8,}$/i,MG=/^[0-9a-z]+$/,qG=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ZG=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,LG=/^[a-z0-9_-]{21}$/i,FG=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,VG=/^[-+]?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)?)??$/,WG=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,BG="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",KG=/^(?:(?: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])$/,HG=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,GG=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,QG=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,YG=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,JG=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,eN="((\\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])))",XG=new RegExp(`^${eN}$`);ec=class t extends Xe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==pe.string){let o=this._getOrReturnCtx(e);return se(o,{code:Y.invalid_type,expected:pe.string,received:o.parsedType}),je}let n=new Zr,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:Y.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:Y.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=e.data.length>o.value,s=e.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(e,i),a?se(i,{code:Y.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&se(i,{code:Y.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")WG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"email",code:Y.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Sb||(Sb=new RegExp(BG,"u")),Sb.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"emoji",code:Y.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")ZG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"uuid",code:Y.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")LG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"nanoid",code:Y.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")DG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cuid",code:Y.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")MG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cuid2",code:Y.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")qG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"ulid",code:Y.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),se(i,{validation:"url",code:Y.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"regex",code:Y.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?t5(o).test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?XG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?e5(o).test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?VG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"duration",code:Y.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?r5(e.data,o.version)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"ip",code:Y.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?n5(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"jwt",code:Y.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?i5(e.data,o.version)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cidr",code:Y.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?YG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"base64",code:Y.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?JG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"base64url",code:Y.invalid_string,message:o.message}),n.dirty()):pt.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:Y.invalid_string,..._e.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",..._e.errToObj(e)})}url(e){return this._addCheck({kind:"url",..._e.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",..._e.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",..._e.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",..._e.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",..._e.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",..._e.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",..._e.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",..._e.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",..._e.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",..._e.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",..._e.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",..._e.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,..._e.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,..._e.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",..._e.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,..._e.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,..._e.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,..._e.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,..._e.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,..._e.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,..._e.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,..._e.errToObj(r)})}nonempty(e){return this.min(1,_e.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ec.create=t=>new ec({checks:[],typeName:ee.ZodString,coerce:t?.coerce??!1,...Ve(t)});kl=class t extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==pe.number){let o=this._getOrReturnCtx(e);return se(o,{code:Y.invalid_type,expected:pe.number,received:o.parsedType}),je}let n,i=new Zr;for(let o of this._def.checks)o.kind==="int"?pt.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:Y.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?o5(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:Y.not_finite,message:o.message}),i.dirty()):pt.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,_e.toString(r))}gt(e,r){return this.setLimit("min",e,!1,_e.toString(r))}lte(e,r){return this.setLimit("max",e,!0,_e.toString(r))}lt(e,r){return this.setLimit("max",e,!1,_e.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:_e.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:_e.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:_e.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:_e.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&pt.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};kl.create=t=>new kl({checks:[],typeName:ee.ZodNumber,coerce:t?.coerce||!1,...Ve(t)});Sl=class t extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==pe.bigint)return this._getInvalidInput(e);let n,i=new Zr;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):pt.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return se(r,{code:Y.invalid_type,expected:pe.bigint,received:r.parsedType}),je}gte(e,r){return this.setLimit("min",e,!0,_e.toString(r))}gt(e,r){return this.setLimit("min",e,!1,_e.toString(r))}lte(e,r){return this.setLimit("max",e,!0,_e.toString(r))}lt(e,r){return this.setLimit("max",e,!1,_e.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:_e.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:_e.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Sl.create=t=>new Sl({checks:[],typeName:ee.ZodBigInt,coerce:t?.coerce??!1,...Ve(t)});$l=class extends Xe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==pe.boolean){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:pe.boolean,received:n.parsedType}),je}return Jr(e.data)}};$l.create=t=>new $l({typeName:ee.ZodBoolean,coerce:t?.coerce||!1,...Ve(t)});Il=class t extends Xe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==pe.date){let o=this._getOrReturnCtx(e);return se(o,{code:Y.invalid_type,expected:pe.date,received:o.parsedType}),je}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return se(o,{code:Y.invalid_date}),je}let n=new Zr,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:Y.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:Y.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):pt.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:_e.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:_e.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Il.create=t=>new Il({checks:[],coerce:t?.coerce||!1,typeName:ee.ZodDate,...Ve(t)});El=class extends Xe{_parse(e){if(this._getType(e)!==pe.symbol){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:pe.symbol,received:n.parsedType}),je}return Jr(e.data)}};El.create=t=>new El({typeName:ee.ZodSymbol,...Ve(t)});tc=class extends Xe{_parse(e){if(this._getType(e)!==pe.undefined){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:pe.undefined,received:n.parsedType}),je}return Jr(e.data)}};tc.create=t=>new tc({typeName:ee.ZodUndefined,...Ve(t)});rc=class extends Xe{_parse(e){if(this._getType(e)!==pe.null){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:pe.null,received:n.parsedType}),je}return Jr(e.data)}};rc.create=t=>new rc({typeName:ee.ZodNull,...Ve(t)});Pl=class extends Xe{constructor(){super(...arguments),this._any=!0}_parse(e){return Jr(e.data)}};Pl.create=t=>new Pl({typeName:ee.ZodAny,...Ve(t)});Qo=class extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Jr(e.data)}};Qo.create=t=>new Qo({typeName:ee.ZodUnknown,...Ve(t)});Yi=class extends Xe{_parse(e){let r=this._getOrReturnCtx(e);return se(r,{code:Y.invalid_type,expected:pe.never,received:r.parsedType}),je}};Yi.create=t=>new Yi({typeName:ee.ZodNever,...Ve(t)});Tl=class extends Xe{_parse(e){if(this._getType(e)!==pe.undefined){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:pe.void,received:n.parsedType}),je}return Jr(e.data)}};Tl.create=t=>new Tl({typeName:ee.ZodVoid,...Ve(t)});Yo=class t extends Xe{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==pe.array)return se(r,{code:Y.invalid_type,expected:pe.array,received:r.parsedType}),je;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(se(r,{code:a?Y.too_big:Y.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(se(r,{code:Y.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(se(r,{code:Y.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new Jn(r,a,r.path,s)))).then(a=>Zr.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new Jn(r,a,r.path,s)));return Zr.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:_e.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:_e.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:_e.toString(r)}})}nonempty(e){return this.min(1,e)}};Yo.create=(t,e)=>new Yo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...Ve(e)});An=class t extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=pt.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==pe.object){let u=this._getOrReturnCtx(e);return se(u,{code:Y.invalid_type,expected:pe.object,received:u.parsedType}),je}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Yi&&this._def.unknownKeys==="strip"))for(let u in i.data)a.includes(u)||s.push(u);let c=[];for(let u of a){let l=o[u],d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Jn(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Yi){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of s)c.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(u==="strict")s.length>0&&(se(i,{code:Y.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of s){let d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Jn(i,d,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>Zr.mergeObjectSync(n,u)):Zr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(e){return _e.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:_e.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ee.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of pt.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of pt.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Xs(this)}partial(e){let r={};for(let n of pt.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of pt.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof ki;)o=o._def.innerType;r[n]=o}return new t({...this._def,shape:()=>r})}keyof(){return rN(pt.objectKeys(this.shape))}};An.create=(t,e)=>new An({shape:()=>t,unknownKeys:"strip",catchall:Yi.create(),typeName:ee.ZodObject,...Ve(e)});An.strictCreate=(t,e)=>new An({shape:()=>t,unknownKeys:"strict",catchall:Yi.create(),typeName:ee.ZodObject,...Ve(e)});An.lazycreate=(t,e)=>new An({shape:t,unknownKeys:"strip",catchall:Yi.create(),typeName:ee.ZodObject,...Ve(e)});nc=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new Rn(s.ctx.common.issues));return se(r,{code:Y.invalid_union,unionErrors:a}),je}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(c=>new Rn(c));return se(r,{code:Y.invalid_union,unionErrors:s}),je}}get options(){return this._def.options}};nc.create=(t,e)=>new nc({options:t,typeName:ee.ZodUnion,...Ve(e)});yo=t=>t instanceof oc?yo(t.schema):t instanceof Si?yo(t.innerType()):t instanceof ac?[t.value]:t instanceof sc?t.options:t instanceof cc?pt.objectValues(t.enum):t instanceof uc?yo(t._def.innerType):t instanceof tc?[void 0]:t instanceof rc?[null]:t instanceof ki?[void 0,...yo(t.unwrap())]:t instanceof bo?[null,...yo(t.unwrap())]:t instanceof zm||t instanceof dc?yo(t.unwrap()):t instanceof lc?yo(t._def.innerType):[],$b=class t extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.object)return se(r,{code:Y.invalid_type,expected:pe.object,received:r.parsedType}),je;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(se(r,{code:Y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let a=yo(o.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,o)}}return new t({typeName:ee.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ve(n)})}};ic=class extends Xe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(xb(o)||xb(a))return je;let s=Ib(o.value,a.value);return s.valid?((wb(o)||wb(a))&&r.dirty(),{status:r.value,value:s.data}):(se(n,{code:Y.invalid_intersection_types}),je)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ic.create=(t,e,r)=>new ic({left:t,right:e,typeName:ee.ZodIntersection,...Ve(r)});_o=class t extends Xe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.array)return se(n,{code:Y.invalid_type,expected:pe.array,received:n.parsedType}),je;if(n.data.length<this._def.items.length)return se(n,{code:Y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&n.data.length>this._def.items.length&&(se(n,{code:Y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new Jn(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Zr.mergeArray(r,a)):Zr.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};_o.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _o({items:t,typeName:ee.ZodTuple,rest:null,...Ve(e)})};Eb=class t extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.object)return se(n,{code:Y.invalid_type,expected:pe.object,received:n.parsedType}),je;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new Jn(n,s,n.path,s)),value:a._parse(new Jn(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Zr.mergeObjectAsync(r,i):Zr.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof Xe?new t({keyType:e,valueType:r,typeName:ee.ZodRecord,...Ve(n)}):new t({keyType:ec.create(),valueType:e,typeName:ee.ZodRecord,...Ve(r)})}},zl=class extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.map)return se(n,{code:Y.invalid_type,expected:pe.map,received:n.parsedType}),je;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,c],u)=>({key:i._parse(new Jn(n,s,n.path,[u,"key"])),value:o._parse(new Jn(n,c,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return je;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return je;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}}}};zl.create=(t,e,r)=>new zl({valueType:e,keyType:t,typeName:ee.ZodMap,...Ve(r)});Ol=class t extends Xe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==pe.set)return se(n,{code:Y.invalid_type,expected:pe.set,received:n.parsedType}),je;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(se(n,{code:Y.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(se(n,{code:Y.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return je;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let s=[...n.data.values()].map((c,u)=>o._parse(new Jn(n,c,n.path,u)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:_e.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:_e.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Ol.create=(t,e)=>new Ol({valueType:t,minSize:null,maxSize:null,typeName:ee.ZodSet,...Ve(e)});Pb=class t extends Xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.function)return se(r,{code:Y.invalid_type,expected:pe.function,received:r.parsedType}),je;function n(s,c){return Tm({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,xl(),Go].filter(u=>!!u),issueData:{code:Y.invalid_arguments,argumentsError:c}})}function i(s,c){return Tm({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,xl(),Go].filter(u=>!!u),issueData:{code:Y.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Za){let s=this;return Jr(async function(...c){let u=new Rn([]),l=await s._def.args.parseAsync(c,o).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(a,this,l);return await s._def.returns._def.type.parseAsync(d,o).catch(f=>{throw u.addIssue(i(d,f)),u})})}else{let s=this;return Jr(function(...c){let u=s._def.args.safeParse(c,o);if(!u.success)throw new Rn([n(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(l,o);if(!d.success)throw new Rn([i(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:_o.create(e).rest(Qo.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||_o.create([]).rest(Qo.create()),returns:r||Qo.create(),typeName:ee.ZodFunction,...Ve(n)})}},oc=class extends Xe{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};oc.create=(t,e)=>new oc({getter:t,typeName:ee.ZodLazy,...Ve(e)});ac=class extends Xe{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return se(r,{received:r.data,code:Y.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:e.data}}get value(){return this._def.value}};ac.create=(t,e)=>new ac({value:t,typeName:ee.ZodLiteral,...Ve(e)});sc=class t extends Xe{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return se(r,{expected:pt.joinValues(n),received:r.parsedType,code:Y.invalid_type}),je}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return se(r,{received:r.data,code:Y.invalid_enum_value,options:n}),je}return Jr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};sc.create=rN;cc=class extends Xe{_parse(e){let r=pt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==pe.string&&n.parsedType!==pe.number){let i=pt.objectValues(r);return se(n,{expected:pt.joinValues(i),received:n.parsedType,code:Y.invalid_type}),je}if(this._cache||(this._cache=new Set(pt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=pt.objectValues(r);return se(n,{received:n.data,code:Y.invalid_enum_value,options:i}),je}return Jr(e.data)}get enum(){return this._def.values}};cc.create=(t,e)=>new cc({values:t,typeName:ee.ZodNativeEnum,...Ve(e)});Za=class extends Xe{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==pe.promise&&r.common.async===!1)return se(r,{code:Y.invalid_type,expected:pe.promise,received:r.parsedType}),je;let n=r.parsedType===pe.promise?r.data:Promise.resolve(r.data);return Jr(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Za.create=(t,e)=>new Za({type:t,typeName:ee.ZodPromise,...Ve(e)});Si=class extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ee.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{se(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return je;let c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?je:c.status==="dirty"?Js(c.value):r.value==="dirty"?Js(c.value):c});{if(r.value==="aborted")return je;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?je:s.status==="dirty"?Js(s.value):r.value==="dirty"?Js(s.value):s}}if(i.type==="refinement"){let a=s=>{let c=i.refinement(s,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?je:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?je:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!qa(a))return je;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>qa(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):je);pt.assertNever(i)}};Si.create=(t,e,r)=>new Si({schema:t,typeName:ee.ZodEffects,effect:e,...Ve(r)});Si.createWithPreprocess=(t,e,r)=>new Si({schema:e,effect:{type:"preprocess",transform:t},typeName:ee.ZodEffects,...Ve(r)});ki=class extends Xe{_parse(e){return this._getType(e)===pe.undefined?Jr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ki.create=(t,e)=>new ki({innerType:t,typeName:ee.ZodOptional,...Ve(e)});bo=class extends Xe{_parse(e){return this._getType(e)===pe.null?Jr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};bo.create=(t,e)=>new bo({innerType:t,typeName:ee.ZodNullable,...Ve(e)});uc=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===pe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};uc.create=(t,e)=>new uc({innerType:t,typeName:ee.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});lc=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return wl(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Rn(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Rn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};lc.create=(t,e)=>new lc({innerType:t,typeName:ee.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});jl=class extends Xe{_parse(e){if(this._getType(e)!==pe.nan){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:pe.nan,received:n.parsedType}),je}return{status:"valid",value:e.data}}};jl.create=t=>new jl({typeName:ee.ZodNaN,...Ve(t)});zm=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},Om=class t extends Xe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?je:o.status==="dirty"?(r.dirty(),Js(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?je:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:ee.ZodPipeline})}},dc=class extends Xe{_parse(e){let r=this._def.innerType._parse(e),n=i=>(qa(i)&&(i.value=Object.freeze(i.value)),i);return wl(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};dc.create=(t,e)=>new dc({innerType:t,typeName:ee.ZodReadonly,...Ve(e)});f$e={object:An.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ee||(ee={}));m$e=ec.create,h$e=kl.create,g$e=jl.create,v$e=Sl.create,y$e=$l.create,_$e=Il.create,b$e=El.create,x$e=tc.create,w$e=rc.create,k$e=Pl.create,S$e=Qo.create,$$e=Yi.create,I$e=Tl.create,E$e=Yo.create,a5=An.create,P$e=An.strictCreate,T$e=nc.create,z$e=$b.create,O$e=ic.create,j$e=_o.create,N$e=Eb.create,C$e=zl.create,R$e=Ol.create,A$e=Pb.create,U$e=oc.create,D$e=ac.create,M$e=sc.create,q$e=cc.create,Z$e=Za.create,L$e=Si.create,F$e=ki.create,V$e=bo.create,W$e=Si.createWithPreprocess,B$e=Om.create});var Tb=E(()=>{Pm();kb();Y1();bl();nN();Em()});var Nl=E(()=>{Tb();Tb()});function Gt(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?_l(e,t.currentPath):e.join("/")}}var Xn=E(()=>{Im()});function zb(t,e){let r={type:"array"};return t.type?._def&&t.type?._def?.typeName!==ee.ZodAny&&(r.items=Te(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&dt(r,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&dt(r,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(dt(r,"minItems",t.exactLength.value,t.exactLength.message,e),dt(r,"maxItems",t.exactLength.value,t.exactLength.message,e)),r}var Ob=E(()=>{Nl();Ho();hr()});function jb(t,e){let r={type:"integer",format:"int64"};if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?dt(r,"minimum",n.value,n.message,e):dt(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),dt(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?dt(r,"maximum",n.value,n.message,e):dt(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),dt(r,"maximum",n.value,n.message,e));break;case"multipleOf":dt(r,"multipleOf",n.value,n.message,e);break}return r}var Nb=E(()=>{Ho()});function Cb(){return{type:"boolean"}}var Rb=E(()=>{});function Cl(t,e){return Te(t.type._def,e)}var jm=E(()=>{hr()});var Ab,Ub=E(()=>{hr();Ab=(t,e)=>Te(t.innerType._def,e)});function Nm(t,e,r){let n=r??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,o)=>Nm(t,e,i))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return u5(t,e)}}var u5,Db=E(()=>{Ho();u5=(t,e)=>{let r={type:"integer",format:"unix-time"};if(e.target==="openApi3")return r;for(let n of t.checks)switch(n.kind){case"min":dt(r,"minimum",n.value,n.message,e);break;case"max":dt(r,"maximum",n.value,n.message,e);break}return r}});function Mb(t,e){return{...Te(t.innerType._def,e),default:t.defaultValue()}}var qb=E(()=>{hr()});function Zb(t,e){return e.effectStrategy==="input"?Te(t.schema._def,e):Gt(e)}var Lb=E(()=>{hr();Xn()});function Fb(t){return{type:"string",enum:Array.from(t.values)}}var Vb=E(()=>{});function Wb(t,e){let r=[Te(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),Te(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(o=>!!o),n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,i=[];return r.forEach(o=>{if(l5(o))i.push(...o.allOf),o.unevaluatedProperties===void 0&&(n=void 0);else{let a=o;if("additionalProperties"in o&&o.additionalProperties===!1){let{additionalProperties:s,...c}=o;a=c}else n=void 0;i.push(a)}}),i.length?{allOf:i,...n}:void 0}var l5,Bb=E(()=>{hr();l5=t=>"type"in t&&t.type==="string"?!1:"allOf"in t});function Kb(t,e){let r=typeof t.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[t.value]}:{type:r==="bigint"?"integer":r,const:t.value}}var Hb=E(()=>{});function Rl(t,e){let r={type:"string"};if(t.checks)for(let n of t.checks)switch(n.kind){case"min":dt(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e);break;case"max":dt(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":$i(r,"email",n.message,e);break;case"format:idn-email":$i(r,"idn-email",n.message,e);break;case"pattern:zod":Xr(r,ei.email,n.message,e);break}break;case"url":$i(r,"uri",n.message,e);break;case"uuid":$i(r,"uuid",n.message,e);break;case"regex":Xr(r,n.regex,n.message,e);break;case"cuid":Xr(r,ei.cuid,n.message,e);break;case"cuid2":Xr(r,ei.cuid2,n.message,e);break;case"startsWith":Xr(r,RegExp(`^${Qb(n.value,e)}`),n.message,e);break;case"endsWith":Xr(r,RegExp(`${Qb(n.value,e)}$`),n.message,e);break;case"datetime":$i(r,"date-time",n.message,e);break;case"date":$i(r,"date",n.message,e);break;case"time":$i(r,"time",n.message,e);break;case"duration":$i(r,"duration",n.message,e);break;case"length":dt(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,e),dt(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,e);break;case"includes":{Xr(r,RegExp(Qb(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&$i(r,"ipv4",n.message,e),n.version!=="v4"&&$i(r,"ipv6",n.message,e);break}case"base64url":Xr(r,ei.base64url,n.message,e);break;case"jwt":Xr(r,ei.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&Xr(r,ei.ipv4Cidr,n.message,e),n.version!=="v4"&&Xr(r,ei.ipv6Cidr,n.message,e);break}case"emoji":Xr(r,ei.emoji(),n.message,e);break;case"ulid":{Xr(r,ei.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{$i(r,"binary",n.message,e);break}case"contentEncoding:base64":{dt(r,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{Xr(r,ei.base64,n.message,e);break}}break}case"nanoid":Xr(r,ei.nanoid,n.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Qb(t,e){return e.patternStrategy==="escape"?p5(t):t}function p5(t){let e="";for(let r=0;r<t.length;r++)d5.has(t[r])||(e+="\\"),e+=t[r];return e}function $i(t,e,r,n){t.format||t.anyOf?.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...r&&n.errorMessages&&{errorMessage:{format:r}}})):dt(t,"format",e,r,n)}function Xr(t,e,r,n){t.pattern||t.allOf?.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:iN(e,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):dt(t,"pattern",iN(e,n),r,n)}function iN(t,e){if(!e.applyRegexFlags||!t.flags)return t.source;let r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=r.i?t.source.toLowerCase():t.source,i="",o=!1,a=!1,s=!1;for(let c=0;c<n.length;c++){if(o){i+=n[c],o=!1;continue}if(r.i){if(a){if(n[c].match(/[a-z]/)){s?(i+=n[c],i+=`${n[c-2]}-${n[c]}`.toUpperCase(),s=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(i+=n[c],s=!0):i+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){i+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){i+=`(^|(?<=[\r
|
|
18
|
+
]))`;continue}else if(n[c]==="$"){i+=`($|(?=[\r
|
|
19
|
+
]))`;continue}}if(r.s&&n[c]==="."){i+=a?`${n[c]}\r
|
|
20
|
+
`:`[${n[c]}\r
|
|
21
|
+
]`;continue}i+=n[c],n[c]==="\\"?o=!0:a&&n[c]==="]"?a=!1:!a&&n[c]==="["&&(a=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return i}var Gb,ei,d5,Cm=E(()=>{Ho();ei={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Gb===void 0&&(Gb=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Gb),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};d5=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function Al(t,e){if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&t.keyType?._def.typeName===ee.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((n,i)=>({...n,[i]:Te(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",i]})??Gt(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let r={type:"object",additionalProperties:Te(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return r;if(t.keyType?._def.typeName===ee.ZodString&&t.keyType._def.checks?.length){let{type:n,...i}=Rl(t.keyType._def,e);return{...r,propertyNames:i}}else{if(t.keyType?._def.typeName===ee.ZodEnum)return{...r,propertyNames:{enum:t.keyType._def.values}};if(t.keyType?._def.typeName===ee.ZodBranded&&t.keyType._def.type._def.typeName===ee.ZodString&&t.keyType._def.type._def.checks?.length){let{type:n,...i}=Cl(t.keyType._def,e);return{...r,propertyNames:i}}}return r}var Rm=E(()=>{Nl();hr();Cm();jm();Xn()});function Yb(t,e){if(e.mapStrategy==="record")return Al(t,e);let r=Te(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||Gt(e),n=Te(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||Gt(e);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var Jb=E(()=>{hr();Rm();Xn()});function Xb(t){let e=t.values,n=Object.keys(t.values).filter(o=>typeof e[e[o]]!="number").map(o=>e[o]),i=Array.from(new Set(n.map(o=>typeof o)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:n}}var ex=E(()=>{});function tx(t){return t.target==="openAi"?void 0:{not:Gt({...t,currentPath:[...t.currentPath,"not"]})}}var rx=E(()=>{Xn()});function nx(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var ix=E(()=>{});function ox(t,e){if(e.target==="openApi3")return oN(t,e);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(n=>n._def.typeName in pc&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((i,o)=>{let a=pc[o._def.typeName];return a&&!i.includes(a)?[...i,a]:i},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((i,o)=>{let a=typeof o._def.value;switch(a){case"string":case"number":case"boolean":return[...i,a];case"bigint":return[...i,"integer"];case"object":if(o._def.value===null)return[...i,"null"];default:return i}},[]);if(n.length===r.length){let i=n.filter((o,a,s)=>s.indexOf(o)===a);return{type:i.length>1?i:i[0],enum:r.reduce((o,a)=>o.includes(a._def.value)?o:[...o,a._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(o=>!n.includes(o))],[])};return oN(t,e)}var pc,oN,Am=E(()=>{hr();pc={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};oN=(t,e)=>{let r=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((n,i)=>Te(n._def,{...e,currentPath:[...e.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!e.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0}});function ax(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:pc[t.innerType._def.typeName],nullable:!0}:{type:[pc[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let n=Te(t.innerType._def,{...e,currentPath:[...e.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=Te(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var sx=E(()=>{hr();Am()});function cx(t,e){let r={type:"number"};if(!t.checks)return r;for(let n of t.checks)switch(n.kind){case"int":r.type="integer",$m(r,"type",n.message,e);break;case"min":e.target==="jsonSchema7"?n.inclusive?dt(r,"minimum",n.value,n.message,e):dt(r,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(r.exclusiveMinimum=!0),dt(r,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?dt(r,"maximum",n.value,n.message,e):dt(r,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(r.exclusiveMaximum=!0),dt(r,"maximum",n.value,n.message,e));break;case"multipleOf":dt(r,"multipleOf",n.value,n.message,e);break}return r}var ux=E(()=>{Ho()});function lx(t,e){let r=e.target==="openAi",n={type:"object",properties:{}},i=[],o=t.shape();for(let s in o){let c=o[s];if(c===void 0||c._def===void 0)continue;let u=m5(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=Te(c._def,{...e,currentPath:[...e.currentPath,"properties",s],propertyPath:[...e.currentPath,"properties",s]});l!==void 0&&(n.properties[s]=l,u||i.push(s))}i.length&&(n.required=i);let a=f5(t,e);return a!==void 0&&(n.additionalProperties=a),n}function f5(t,e){if(t.catchall._def.typeName!=="ZodNever")return Te(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function m5(t){try{return t.isOptional()}catch{return!0}}var dx=E(()=>{hr()});var px,fx=E(()=>{hr();Xn();px=(t,e)=>{if(e.currentPath.toString()===e.propertyPath?.toString())return Te(t.innerType._def,e);let r=Te(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Gt(e)},r]}:Gt(e)}});var mx,hx=E(()=>{hr();mx=(t,e)=>{if(e.pipeStrategy==="input")return Te(t.in._def,e);if(e.pipeStrategy==="output")return Te(t.out._def,e);let r=Te(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),n=Te(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}}});function gx(t,e){return Te(t.type._def,e)}var vx=E(()=>{hr()});function yx(t,e){let n={type:"array",uniqueItems:!0,items:Te(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&dt(n,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&dt(n,"maxItems",t.maxSize.value,t.maxSize.message,e),n}var _x=E(()=>{Ho();hr()});function bx(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((r,n)=>Te(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Te(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((r,n)=>Te(r._def,{...e,currentPath:[...e.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var xx=E(()=>{hr()});function wx(t){return{not:Gt(t)}}var kx=E(()=>{Xn()});function Sx(t){return Gt(t)}var $x=E(()=>{Xn()});var Ix,Ex=E(()=>{hr();Ix=(t,e)=>Te(t.innerType._def,e)});var Px,Tx=E(()=>{Nl();Xn();Ob();Nb();Rb();jm();Ub();Db();qb();Lb();Vb();Bb();Hb();Jb();ex();rx();ix();sx();ux();dx();fx();hx();vx();Rm();_x();Cm();xx();kx();Am();$x();Ex();Px=(t,e,r)=>{switch(e){case ee.ZodString:return Rl(t,r);case ee.ZodNumber:return cx(t,r);case ee.ZodObject:return lx(t,r);case ee.ZodBigInt:return jb(t,r);case ee.ZodBoolean:return Cb();case ee.ZodDate:return Nm(t,r);case ee.ZodUndefined:return wx(r);case ee.ZodNull:return nx(r);case ee.ZodArray:return zb(t,r);case ee.ZodUnion:case ee.ZodDiscriminatedUnion:return ox(t,r);case ee.ZodIntersection:return Wb(t,r);case ee.ZodTuple:return bx(t,r);case ee.ZodRecord:return Al(t,r);case ee.ZodLiteral:return Kb(t,r);case ee.ZodEnum:return Fb(t);case ee.ZodNativeEnum:return Xb(t);case ee.ZodNullable:return ax(t,r);case ee.ZodOptional:return px(t,r);case ee.ZodMap:return Yb(t,r);case ee.ZodSet:return yx(t,r);case ee.ZodLazy:return()=>t.getter()._def;case ee.ZodPromise:return gx(t,r);case ee.ZodNaN:case ee.ZodNever:return tx(r);case ee.ZodEffects:return Zb(t,r);case ee.ZodAny:return Gt(r);case ee.ZodUnknown:return Sx(r);case ee.ZodDefault:return Mb(t,r);case ee.ZodBranded:return Cl(t,r);case ee.ZodReadonly:return Ix(t,r);case ee.ZodCatch:return Ab(t,r);case ee.ZodPipeline:return mx(t,r);case ee.ZodFunction:case ee.ZodVoid:case ee.ZodSymbol:return;default:return(n=>{})(e)}}});function Te(t,e,r=!1){let n=e.seen.get(t);if(e.override){let s=e.override?.(t,e,n,r);if(s!==gb)return s}if(n&&!r){let s=h5(n,e);if(s!==void 0)return s}let i={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,i);let o=Px(t,t.typeName,e),a=typeof o=="function"?Te(o(),e):o;if(a&&g5(t,e,a),e.postProcess){let s=e.postProcess(a,t,e);return i.jsonSchema=a,s}return i.jsonSchema=a,a}var h5,g5,hr=E(()=>{Sm();Tx();Im();Xn();h5=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:_l(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((r,n)=>e.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),Gt(e)):e.$refStrategy==="seen"?Gt(e):void 0}},g5=(t,e,r)=>(t.description&&(r.description=t.description,e.markdownDescription&&(r.markdownDescription=t.description)),r)});var aN=E(()=>{});var en,zx=E(()=>{hr();_b();Xn();en=(t,e)=>{let r=yb(e),n=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[u,l])=>({...c,[u]:Te(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Gt(r)}),{}):void 0,i=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,o=Te(t._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??Gt(r),a=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;a!==void 0&&(o.title=a),r.flags.hasReferencedOpenAiAnyType&&(n||(n={}),n[r.openAiAnyTypeName]||(n[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let s=i===void 0?n?{...o,[r.definitionPath]:n}:o:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:o}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s}});var sN={};Gi(sN,{addErrorMessage:()=>$m,default:()=>v5,defaultOptions:()=>hb,getDefaultOptions:()=>vb,getRefs:()=>yb,getRelativePath:()=>_l,ignoreOverride:()=>gb,jsonDescription:()=>RG,parseAnyDef:()=>Gt,parseArrayDef:()=>zb,parseBigintDef:()=>jb,parseBooleanDef:()=>Cb,parseBrandedDef:()=>Cl,parseCatchDef:()=>Ab,parseDateDef:()=>Nm,parseDef:()=>Te,parseDefaultDef:()=>Mb,parseEffectsDef:()=>Zb,parseEnumDef:()=>Fb,parseIntersectionDef:()=>Wb,parseLiteralDef:()=>Kb,parseMapDef:()=>Yb,parseNativeEnumDef:()=>Xb,parseNeverDef:()=>tx,parseNullDef:()=>nx,parseNullableDef:()=>ax,parseNumberDef:()=>cx,parseObjectDef:()=>lx,parseOptionalDef:()=>px,parsePipelineDef:()=>mx,parsePromiseDef:()=>gx,parseReadonlyDef:()=>Ix,parseRecordDef:()=>Al,parseSetDef:()=>yx,parseStringDef:()=>Rl,parseTupleDef:()=>bx,parseUndefinedDef:()=>wx,parseUnionDef:()=>ox,parseUnknownDef:()=>Sx,primitiveMappings:()=>pc,selectParser:()=>Px,setResponseValueAndErrors:()=>dt,zodPatterns:()=>ei,zodToJsonSchema:()=>en});var v5,Jo=E(()=>{Sm();_b();Ho();Im();hr();aN();Xn();Ob();Nb();Rb();jm();Ub();Db();qb();Lb();Vb();Bb();Hb();Jb();ex();rx();ix();sx();ux();dx();fx();hx();vx();Ex();Rm();_x();Cm();xx();kx();Am();$x();Tx();zx();zx();v5=en});var fc,Ox=E(()=>{Jo();fc=class{static generateFileOutputInstructions(e,r){let n;typeof e?.parse=="function"?n=en(e,{target:"openApi3"}):n=e;let i=this._buildExample(n);return`
|
|
22
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
23
|
+
\u{1F6A8} MANDATORY: WRITE RESULT TO FILE \u{1F6A8}
|
|
24
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
25
|
+
You MUST write your final result as pure JSON to this EXACT file path:
|
|
26
|
+
|
|
27
|
+
${r}
|
|
28
|
+
|
|
29
|
+
Use your file writing tool (WriteFile or ApplyPatch) to create this file.
|
|
30
|
+
DO NOT just output JSON to stdout. The file MUST exist when you finish.
|
|
31
|
+
DO NOT skip this step. The workflow WILL FAIL if the file is missing.
|
|
32
|
+
|
|
33
|
+
Required JSON structure:
|
|
34
|
+
${JSON.stringify(i,null,2)}
|
|
35
|
+
|
|
36
|
+
JSON types (strict \u2014 validators reject wrong types):
|
|
37
|
+
- Use bare JSON numbers for numeric fields (e.g. 3000). Do NOT quote them as strings (wrong: "3000").
|
|
38
|
+
- Use true/false without quotes for booleans.
|
|
39
|
+
- Use unquoted null where a field may be null.
|
|
40
|
+
|
|
41
|
+
Rules: valid JSON only, no markdown wrapping, no extra text in the file.`}static _buildExample(e){if(!e)return{};let r=e.type;if(r==="object"&&e.properties){let n={};for(let[i,o]of Object.entries(e.properties))n[i]=this._buildExample(o);return n}if(r==="array"&&e.items)return[this._buildExample(e.items)];if(r==="string")return"<string>";if(r==="number"||r==="integer")return 0;if(r==="boolean")return!1;if(e.description)return`<${e.description}>`;if(e.nullable||e.oneOf||e.anyOf){let n=e.oneOf?.find(i=>i.type!=="null")||e.anyOf?.find(i=>i.type!=="null");return n?this._buildExample(n):null}return"<value>"}}});function Ul(t,e){return function(){return t.apply(e,arguments)}}var jx=E(()=>{"use strict"});function Dl(t){return t!==null&&!mc(t)&&t.constructor!==null&&!mc(t.constructor)&&vn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}function _5(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&pN(t.buffer),e}function z5(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}function ql(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),hc(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(Dl(t))return;let o=r?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length,s;for(n=0;n<a;n++)s=o[n],e.call(null,t[s],s,t)}}function mN(t,e){if(Dl(t))return null;e=e.toLowerCase();let r=Object.keys(t),n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}function Nx(){let{caseless:t,skipUndefined:e}=hN(this)&&this||{},r={},n=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;let a=t&&mN(r,o)||o;Um(r[a])&&Um(i)?r[a]=Nx(r[a],i):Um(i)?r[a]=Nx({},i):hc(i)?r[a]=i.slice():(!e||!mc(i))&&(r[a]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&ql(arguments[i],n);return r}function eQ(t){return!!(t&&vn(t.append)&&t[dN]==="FormData"&&t[Dm])}var y5,Cx,Dm,dN,Mm,Ii,qm,hc,mc,pN,b5,vn,fN,Ml,x5,Um,w5,k5,S5,$5,I5,E5,P5,T5,cN,uN,O5,j5,N5,C5,R5,A5,U5,La,hN,D5,M5,q5,Z5,L5,F5,V5,W5,B5,K5,H5,lN,G5,gN,Q5,Y5,J5,X5,tQ,rQ,nQ,vN,iQ,oQ,j,Wt=E(()=>{"use strict";jx();({toString:y5}=Object.prototype),{getPrototypeOf:Cx}=Object,{iterator:Dm,toStringTag:dN}=Symbol,Mm=(t=>e=>{let r=y5.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Ii=t=>(t=t.toLowerCase(),e=>Mm(e)===t),qm=t=>e=>typeof e===t,{isArray:hc}=Array,mc=qm("undefined");pN=Ii("ArrayBuffer");b5=qm("string"),vn=qm("function"),fN=qm("number"),Ml=t=>t!==null&&typeof t=="object",x5=t=>t===!0||t===!1,Um=t=>{if(Mm(t)!=="object")return!1;let e=Cx(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(dN in t)&&!(Dm in t)},w5=t=>{if(!Ml(t)||Dl(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},k5=Ii("Date"),S5=Ii("File"),$5=t=>!!(t&&typeof t.uri<"u"),I5=t=>t&&typeof t.getParts<"u",E5=Ii("Blob"),P5=Ii("FileList"),T5=t=>Ml(t)&&vn(t.pipe);cN=z5(),uN=typeof cN.FormData<"u"?cN.FormData:void 0,O5=t=>{let e;return t&&(uN&&t instanceof uN||vn(t.append)&&((e=Mm(t))==="formdata"||e==="object"&&vn(t.toString)&&t.toString()==="[object FormData]"))},j5=Ii("URLSearchParams"),[N5,C5,R5,A5]=["ReadableStream","Request","Response","Headers"].map(Ii),U5=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");La=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hN=t=>!mc(t)&&t!==La;D5=(t,e,r,{allOwnKeys:n}={})=>(ql(e,(i,o)=>{r&&vn(i)?Object.defineProperty(t,o,{value:Ul(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),M5=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),q5=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Z5=(t,e,r,n)=>{let i,o,a,s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],(!n||n(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=r!==!1&&Cx(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},L5=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;let n=t.indexOf(e,r);return n!==-1&&n===r},F5=t=>{if(!t)return null;if(hc(t))return t;let e=t.length;if(!fN(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},V5=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Cx(Uint8Array)),W5=(t,e)=>{let n=(t&&t[Dm]).call(t),i;for(;(i=n.next())&&!i.done;){let o=i.value;e.call(t,o[0],o[1])}},B5=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},K5=Ii("HTMLFormElement"),H5=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),lN=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),G5=Ii("RegExp"),gN=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};ql(r,(i,o)=>{let a;(a=e(i,o,t))!==!1&&(n[o]=a||i)}),Object.defineProperties(t,n)},Q5=t=>{gN(t,(e,r)=>{if(vn(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(vn(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Y5=(t,e)=>{let r={},n=i=>{i.forEach(o=>{r[o]=!0})};return hc(t)?n(t):n(String(t).split(e)),r},J5=()=>{},X5=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;tQ=t=>{let e=new Array(10),r=(n,i)=>{if(Ml(n)){if(e.indexOf(n)>=0)return;if(Dl(n))return n;if(!("toJSON"in n)){e[i]=n;let o=hc(n)?[]:{};return ql(n,(a,s)=>{let c=r(a,i+1);!mc(c)&&(o[s]=c)}),e[i]=void 0,o}}return n};return r(t,0)},rQ=Ii("AsyncFunction"),nQ=t=>t&&(Ml(t)||vn(t))&&vn(t.then)&&vn(t.catch),vN=((t,e)=>t?setImmediate:e?((r,n)=>(La.addEventListener("message",({source:i,data:o})=>{i===La&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),La.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",vn(La.postMessage)),iQ=typeof queueMicrotask<"u"?queueMicrotask.bind(La):typeof process<"u"&&process.nextTick||vN,oQ=t=>t!=null&&vn(t[Dm]),j={isArray:hc,isArrayBuffer:pN,isBuffer:Dl,isFormData:O5,isArrayBufferView:_5,isString:b5,isNumber:fN,isBoolean:x5,isObject:Ml,isPlainObject:Um,isEmptyObject:w5,isReadableStream:N5,isRequest:C5,isResponse:R5,isHeaders:A5,isUndefined:mc,isDate:k5,isFile:S5,isReactNativeBlob:$5,isReactNative:I5,isBlob:E5,isRegExp:G5,isFunction:vn,isStream:T5,isURLSearchParams:j5,isTypedArray:V5,isFileList:P5,forEach:ql,merge:Nx,extend:D5,trim:U5,stripBOM:M5,inherits:q5,toFlatObject:Z5,kindOf:Mm,kindOfTest:Ii,endsWith:L5,toArray:F5,forEachEntry:W5,matchAll:B5,isHTMLForm:K5,hasOwnProperty:lN,hasOwnProp:lN,reduceDescriptors:gN,freezeMethods:Q5,toObjectSet:Y5,toCamelCase:H5,noop:J5,toFiniteNumber:X5,findKey:mN,global:La,isContextDefined:hN,isSpecCompliantForm:eQ,toJSONObject:tQ,isAsyncFn:rQ,isThenable:nQ,setImmediate:vN,asap:iQ,isIterable:oQ}});var tn,ae,Un=E(()=>{"use strict";Wt();tn=class t extends Error{static from(e,r,n,i,o,a){let s=new t(e.message,r||e.code,n,i,o);return s.cause=e,s.name=e.name,e.status!=null&&s.status==null&&(s.status=e.status),a&&Object.assign(s,a),s}constructor(e,r,n,i,o){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.status}}};tn.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";tn.ERR_BAD_OPTION="ERR_BAD_OPTION";tn.ECONNABORTED="ECONNABORTED";tn.ETIMEDOUT="ETIMEDOUT";tn.ERR_NETWORK="ERR_NETWORK";tn.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";tn.ERR_DEPRECATED="ERR_DEPRECATED";tn.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";tn.ERR_BAD_REQUEST="ERR_BAD_REQUEST";tn.ERR_CANCELED="ERR_CANCELED";tn.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";tn.ERR_INVALID_URL="ERR_INVALID_URL";ae=tn});var bN=O((KPe,_N)=>{var yN=kt("stream").Stream,aQ=kt("util");_N.exports=Ei;function Ei(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}aQ.inherits(Ei,yN);Ei.create=function(t,e){var r=new this;e=e||{};for(var n in e)r[n]=e[n];r.source=t;var i=t.emit;return t.emit=function(){return r._handleEmit(arguments),i.apply(t,arguments)},t.on("error",function(){}),r.pauseStream&&t.pause(),r};Object.defineProperty(Ei.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Ei.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Ei.prototype.resume=function(){this._released||this.release(),this.source.resume()};Ei.prototype.pause=function(){this.source.pause()};Ei.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Ei.prototype.pipe=function(){var t=yN.prototype.pipe.apply(this,arguments);return this.resume(),t};Ei.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};Ei.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var SN=O((HPe,kN)=>{var sQ=kt("util"),wN=kt("stream").Stream,xN=bN();kN.exports=or;function or(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}sQ.inherits(or,wN);or.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};or.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};or.prototype.append=function(t){var e=or.isStreamLike(t);if(e){if(!(t instanceof xN)){var r=xN.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=r}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};or.prototype.pipe=function(t,e){return wN.prototype.pipe.call(this,t,e),this.resume(),t};or.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};or.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(r){var n=or.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};or.prototype._pipeNext=function(t){this._currentStream=t;var e=or.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var r=t;this.write(r),this._getNext()};or.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};or.prototype.write=function(t){this.emit("data",t)};or.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};or.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};or.prototype.end=function(){this._reset(),this.emit("end")};or.prototype.destroy=function(){this._reset(),this.emit("close")};or.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};or.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};or.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};or.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var $N=O((GPe,cQ)=>{cQ.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var EN=O((QPe,IN)=>{IN.exports=$N()});var zN=O(yn=>{"use strict";var Zm=EN(),uQ=kt("path").extname,PN=/^\s*([^;\s]*)(?:;|\s|$)/,lQ=/^text\//i;yn.charset=TN;yn.charsets={lookup:TN};yn.contentType=dQ;yn.extension=pQ;yn.extensions=Object.create(null);yn.lookup=fQ;yn.types=Object.create(null);mQ(yn.extensions,yn.types);function TN(t){if(!t||typeof t!="string")return!1;var e=PN.exec(t),r=e&&Zm[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&lQ.test(e[1])?"UTF-8":!1}function dQ(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?yn.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=yn.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}function pQ(t){if(!t||typeof t!="string")return!1;var e=PN.exec(t),r=e&&yn.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}function fQ(t){if(!t||typeof t!="string")return!1;var e=uQ("x."+t).toLowerCase().substr(1);return e&&yn.types[e]||!1}function mQ(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(Zm).forEach(function(i){var o=Zm[i],a=o.extensions;if(!(!a||!a.length)){t[i]=a;for(var s=0;s<a.length;s++){var c=a[s];if(e[c]){var u=r.indexOf(Zm[e[c]].source),l=r.indexOf(o.source);if(e[c]!=="application/octet-stream"&&(u>l||u===l&&e[c].substr(0,12)==="application/"))continue}e[c]=i}}})}});var jN=O((JPe,ON)=>{ON.exports=hQ;function hQ(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var Rx=O((XPe,CN)=>{var NN=jN();CN.exports=gQ;function gQ(t){var e=!1;return NN(function(){e=!0}),function(n,i){e?t(n,i):NN(function(){t(n,i)})}}});var Ax=O((eTe,RN)=>{RN.exports=vQ;function vQ(t){Object.keys(t.jobs).forEach(yQ.bind(t)),t.jobs={}}function yQ(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var Ux=O((tTe,UN)=>{var AN=Rx(),_Q=Ax();UN.exports=bQ;function bQ(t,e,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=xQ(e,i,t[i],function(o,a){i in r.jobs&&(delete r.jobs[i],o?_Q(r):r.results[i]=a,n(o,r.results))})}function xQ(t,e,r,n){var i;return t.length==2?i=t(r,AN(n)):i=t(r,e,AN(n)),i}});var Dx=O((rTe,DN)=>{DN.exports=wQ;function wQ(t,e){var r=!Array.isArray(t),n={index:0,keyedList:r||e?Object.keys(t):null,jobs:{},results:r?{}:[],size:r?Object.keys(t).length:t.length};return e&&n.keyedList.sort(r?e:function(i,o){return e(t[i],t[o])}),n}});var Mx=O((nTe,MN)=>{var kQ=Ax(),SQ=Rx();MN.exports=$Q;function $Q(t){Object.keys(this.jobs).length&&(this.index=this.size,kQ(this),SQ(t)(null,this.results))}});var ZN=O((iTe,qN)=>{var IQ=Ux(),EQ=Dx(),PQ=Mx();qN.exports=TQ;function TQ(t,e,r){for(var n=EQ(t);n.index<(n.keyedList||t).length;)IQ(t,e,n,function(i,o){if(i){r(i,o);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return PQ.bind(n,r)}});var qx=O((oTe,Lm)=>{var LN=Ux(),zQ=Dx(),OQ=Mx();Lm.exports=jQ;Lm.exports.ascending=FN;Lm.exports.descending=NQ;function jQ(t,e,r,n){var i=zQ(t,r);return LN(t,e,i,function o(a,s){if(a){n(a,s);return}if(i.index++,i.index<(i.keyedList||t).length){LN(t,e,i,o);return}n(null,i.results)}),OQ.bind(i,n)}function FN(t,e){return t<e?-1:t>e?1:0}function NQ(t,e){return-1*FN(t,e)}});var WN=O((aTe,VN)=>{var CQ=qx();VN.exports=RQ;function RQ(t,e,r){return CQ(t,e,null,r)}});var KN=O((sTe,BN)=>{BN.exports={parallel:ZN(),serial:WN(),serialOrdered:qx()}});var Zx=O((cTe,HN)=>{"use strict";HN.exports=Object});var QN=O((uTe,GN)=>{"use strict";GN.exports=Error});var JN=O((lTe,YN)=>{"use strict";YN.exports=EvalError});var eC=O((dTe,XN)=>{"use strict";XN.exports=RangeError});var rC=O((pTe,tC)=>{"use strict";tC.exports=ReferenceError});var iC=O((fTe,nC)=>{"use strict";nC.exports=SyntaxError});var Fm=O((mTe,oC)=>{"use strict";oC.exports=TypeError});var sC=O((hTe,aC)=>{"use strict";aC.exports=URIError});var uC=O((gTe,cC)=>{"use strict";cC.exports=Math.abs});var dC=O((vTe,lC)=>{"use strict";lC.exports=Math.floor});var fC=O((yTe,pC)=>{"use strict";pC.exports=Math.max});var hC=O((_Te,mC)=>{"use strict";mC.exports=Math.min});var vC=O((bTe,gC)=>{"use strict";gC.exports=Math.pow});var _C=O((xTe,yC)=>{"use strict";yC.exports=Math.round});var xC=O((wTe,bC)=>{"use strict";bC.exports=Number.isNaN||function(e){return e!==e}});var kC=O((kTe,wC)=>{"use strict";var AQ=xC();wC.exports=function(e){return AQ(e)||e===0?e:e<0?-1:1}});var $C=O((STe,SC)=>{"use strict";SC.exports=Object.getOwnPropertyDescriptor});var Lx=O(($Te,IC)=>{"use strict";var Vm=$C();if(Vm)try{Vm([],"length")}catch{Vm=null}IC.exports=Vm});var PC=O((ITe,EC)=>{"use strict";var Wm=Object.defineProperty||!1;if(Wm)try{Wm({},"a",{value:1})}catch{Wm=!1}EC.exports=Wm});var Fx=O((ETe,TC)=>{"use strict";TC.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var jC=O((PTe,OC)=>{"use strict";var zC=typeof Symbol<"u"&&Symbol,UQ=Fx();OC.exports=function(){return typeof zC!="function"||typeof Symbol!="function"||typeof zC("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:UQ()}});var Vx=O((TTe,NC)=>{"use strict";NC.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Wx=O((zTe,CC)=>{"use strict";var DQ=Zx();CC.exports=DQ.getPrototypeOf||null});var UC=O((OTe,AC)=>{"use strict";var MQ="Function.prototype.bind called on incompatible ",qQ=Object.prototype.toString,ZQ=Math.max,LQ="[object Function]",RC=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var o=0;o<r.length;o+=1)n[o+e.length]=r[o];return n},FQ=function(e,r){for(var n=[],i=r||0,o=0;i<e.length;i+=1,o+=1)n[o]=e[i];return n},VQ=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};AC.exports=function(e){var r=this;if(typeof r!="function"||qQ.apply(r)!==LQ)throw new TypeError(MQ+r);for(var n=FQ(arguments,1),i,o=function(){if(this instanceof i){var l=r.apply(this,RC(n,arguments));return Object(l)===l?l:this}return r.apply(e,RC(n,arguments))},a=ZQ(0,r.length-n.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(i=Function("binder","return function ("+VQ(s,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i}});var Zl=O((jTe,DC)=>{"use strict";var WQ=UC();DC.exports=Function.prototype.bind||WQ});var Bm=O((NTe,MC)=>{"use strict";MC.exports=Function.prototype.call});var Bx=O((CTe,qC)=>{"use strict";qC.exports=Function.prototype.apply});var LC=O((RTe,ZC)=>{"use strict";ZC.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var VC=O((ATe,FC)=>{"use strict";var BQ=Zl(),KQ=Bx(),HQ=Bm(),GQ=LC();FC.exports=GQ||BQ.call(HQ,KQ)});var BC=O((UTe,WC)=>{"use strict";var QQ=Zl(),YQ=Fm(),JQ=Bm(),XQ=VC();WC.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new YQ("a function is required");return XQ(QQ,JQ,e)}});var JC=O((DTe,YC)=>{"use strict";var e8=BC(),KC=Lx(),GC;try{GC=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Kx=!!GC&&KC&&KC(Object.prototype,"__proto__"),QC=Object,HC=QC.getPrototypeOf;YC.exports=Kx&&typeof Kx.get=="function"?e8([Kx.get]):typeof HC=="function"?function(e){return HC(e==null?e:QC(e))}:!1});var nR=O((MTe,rR)=>{"use strict";var XC=Vx(),eR=Wx(),tR=JC();rR.exports=XC?function(e){return XC(e)}:eR?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return eR(e)}:tR?function(e){return tR(e)}:null});var Km=O((qTe,iR)=>{"use strict";var t8=Function.prototype.call,r8=Object.prototype.hasOwnProperty,n8=Zl();iR.exports=n8.call(t8,r8)});var dR=O((ZTe,lR)=>{"use strict";var lt,i8=Zx(),o8=QN(),a8=JN(),s8=eC(),c8=rC(),_c=iC(),yc=Fm(),u8=sC(),l8=uC(),d8=dC(),p8=fC(),f8=hC(),m8=vC(),h8=_C(),g8=kC(),cR=Function,Hx=function(t){try{return cR('"use strict"; return ('+t+").constructor;")()}catch{}},Ll=Lx(),v8=PC(),Gx=function(){throw new yc},y8=Ll?(function(){try{return arguments.callee,Gx}catch{try{return Ll(arguments,"callee").get}catch{return Gx}}})():Gx,gc=jC()(),$r=nR(),_8=Wx(),b8=Vx(),uR=Bx(),Fl=Bm(),vc={},x8=typeof Uint8Array>"u"||!$r?lt:$r(Uint8Array),Fa={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?lt:ArrayBuffer,"%ArrayIteratorPrototype%":gc&&$r?$r([][Symbol.iterator]()):lt,"%AsyncFromSyncIteratorPrototype%":lt,"%AsyncFunction%":vc,"%AsyncGenerator%":vc,"%AsyncGeneratorFunction%":vc,"%AsyncIteratorPrototype%":vc,"%Atomics%":typeof Atomics>"u"?lt:Atomics,"%BigInt%":typeof BigInt>"u"?lt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?lt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?lt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?lt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o8,"%eval%":eval,"%EvalError%":a8,"%Float16Array%":typeof Float16Array>"u"?lt:Float16Array,"%Float32Array%":typeof Float32Array>"u"?lt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?lt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?lt:FinalizationRegistry,"%Function%":cR,"%GeneratorFunction%":vc,"%Int8Array%":typeof Int8Array>"u"?lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":gc&&$r?$r($r([][Symbol.iterator]())):lt,"%JSON%":typeof JSON=="object"?JSON:lt,"%Map%":typeof Map>"u"?lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!gc||!$r?lt:$r(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":i8,"%Object.getOwnPropertyDescriptor%":Ll,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?lt:Promise,"%Proxy%":typeof Proxy>"u"?lt:Proxy,"%RangeError%":s8,"%ReferenceError%":c8,"%Reflect%":typeof Reflect>"u"?lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!gc||!$r?lt:$r(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":gc&&$r?$r(""[Symbol.iterator]()):lt,"%Symbol%":gc?Symbol:lt,"%SyntaxError%":_c,"%ThrowTypeError%":y8,"%TypedArray%":x8,"%TypeError%":yc,"%Uint8Array%":typeof Uint8Array>"u"?lt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?lt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?lt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?lt:Uint32Array,"%URIError%":u8,"%WeakMap%":typeof WeakMap>"u"?lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?lt:WeakSet,"%Function.prototype.call%":Fl,"%Function.prototype.apply%":uR,"%Object.defineProperty%":v8,"%Object.getPrototypeOf%":_8,"%Math.abs%":l8,"%Math.floor%":d8,"%Math.max%":p8,"%Math.min%":f8,"%Math.pow%":m8,"%Math.round%":h8,"%Math.sign%":g8,"%Reflect.getPrototypeOf%":b8};if($r)try{null.error}catch(t){oR=$r($r(t)),Fa["%Error.prototype%"]=oR}var oR,w8=function t(e){var r;if(e==="%AsyncFunction%")r=Hx("async function () {}");else if(e==="%GeneratorFunction%")r=Hx("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Hx("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&$r&&(r=$r(i.prototype))}return Fa[e]=r,r},aR={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Vl=Zl(),Hm=Km(),k8=Vl.call(Fl,Array.prototype.concat),S8=Vl.call(uR,Array.prototype.splice),sR=Vl.call(Fl,String.prototype.replace),Gm=Vl.call(Fl,String.prototype.slice),$8=Vl.call(Fl,RegExp.prototype.exec),I8=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E8=/\\(\\)?/g,P8=function(e){var r=Gm(e,0,1),n=Gm(e,-1);if(r==="%"&&n!=="%")throw new _c("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new _c("invalid intrinsic syntax, expected opening `%`");var i=[];return sR(e,I8,function(o,a,s,c){i[i.length]=s?sR(c,E8,"$1"):a||o}),i},T8=function(e,r){var n=e,i;if(Hm(aR,n)&&(i=aR[n],n="%"+i[0]+"%"),Hm(Fa,n)){var o=Fa[n];if(o===vc&&(o=w8(n)),typeof o>"u"&&!r)throw new yc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new _c("intrinsic "+e+" does not exist!")};lR.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new yc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new yc('"allowMissing" argument must be a boolean');if($8(/^%?[^%]*%?$/,e)===null)throw new _c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=P8(e),i=n.length>0?n[0]:"",o=T8("%"+i+"%",r),a=o.name,s=o.value,c=!1,u=o.alias;u&&(i=u[0],S8(n,k8([0,1],u)));for(var l=1,d=!0;l<n.length;l+=1){var p=n[l],f=Gm(p,0,1),m=Gm(p,-1);if((f==='"'||f==="'"||f==="`"||m==='"'||m==="'"||m==="`")&&f!==m)throw new _c("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),i+="."+p,a="%"+i+"%",Hm(Fa,a))s=Fa[a];else if(s!=null){if(!(p in s)){if(!r)throw new yc("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ll&&l+1>=n.length){var v=Ll(s,p);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[p]}else d=Hm(s,p),s=s[p];d&&!c&&(Fa[a]=s)}}return s}});var fR=O((LTe,pR)=>{"use strict";var z8=Fx();pR.exports=function(){return z8()&&!!Symbol.toStringTag}});var gR=O((FTe,hR)=>{"use strict";var O8=dR(),mR=O8("%Object.defineProperty%",!0),j8=fR()(),N8=Km(),C8=Fm(),Qm=j8?Symbol.toStringTag:null;hR.exports=function(e,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new C8("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Qm&&(n||!N8(e,Qm))&&(mR?mR(e,Qm,{configurable:!i,enumerable:!1,value:r,writable:!1}):e[Qm]=r)}});var yR=O((VTe,vR)=>{"use strict";vR.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var bR=O((WTe,_R)=>{"use strict";var Xx=SN(),R8=kt("util"),Qx=kt("path"),A8=kt("http"),U8=kt("https"),D8=kt("url").parse,M8=kt("fs"),q8=kt("stream").Stream,Z8=kt("crypto"),Yx=zN(),L8=KN(),F8=gR(),Xo=Km(),Jx=yR();function yt(t){if(!(this instanceof yt))return new yt(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Xx.call(this),t=t||{};for(var e in t)this[e]=t[e]}R8.inherits(yt,Xx);yt.LINE_BREAK=`\r
|
|
42
|
+
`;yt.DEFAULT_CONTENT_TYPE="application/octet-stream";yt.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Xx.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,r),o=this._multiPartFooter();n(i),n(e),n(o),this._trackLength(i,e,r)};yt.prototype._trackLength=function(t,e,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(e)?n=e.length:typeof e=="string"&&(n=Buffer.byteLength(e)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(t)+yt.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Xo(e,"httpVersion"))&&!(e instanceof q8))&&(r.knownLength||this._valuesToMeasure.push(e))};yt.prototype._lengthRetriever=function(t,e){Xo(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):M8.stat(t.path,function(r,n){if(r){e(r);return}var i=n.size-(t.start?t.start:0);e(null,i)}):Xo(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Xo(t,"httpModule")?(t.on("response",function(r){t.pause(),e(null,Number(r.headers["content-length"]))}),t.resume()):e("Unknown stream")};yt.prototype._multiPartHeader=function(t,e,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(e,r),i=this._getContentType(e,r),o="",a={"Content-Disposition":["form-data",'name="'+t+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&Jx(a,r.header);var s;for(var c in a)if(Xo(a,c)){if(s=a[c],s==null)continue;Array.isArray(s)||(s=[s]),s.length&&(o+=c+": "+s.join("; ")+yt.LINE_BREAK)}return"--"+this.getBoundary()+yt.LINE_BREAK+o+yt.LINE_BREAK};yt.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=Qx.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=Qx.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Xo(t,"httpVersion")&&(r=Qx.basename(t.client._httpMessage.path||"")),r)return'filename="'+r+'"'};yt.prototype._getContentType=function(t,e){var r=e.contentType;return!r&&t&&t.name&&(r=Yx.lookup(t.name)),!r&&t&&t.path&&(r=Yx.lookup(t.path)),!r&&t&&t.readable&&Xo(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=Yx.lookup(e.filepath||e.filename)),!r&&t&&typeof t=="object"&&(r=yt.DEFAULT_CONTENT_TYPE),r};yt.prototype._multiPartFooter=function(){return function(t){var e=yt.LINE_BREAK,r=this._streams.length===0;r&&(e+=this._lastBoundary()),t(e)}.bind(this)};yt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+yt.LINE_BREAK};yt.prototype.getHeaders=function(t){var e,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Xo(t,e)&&(r[e.toLowerCase()]=t[e]);return r};yt.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};yt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};yt.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?t=Buffer.concat([t,this._streams[r]]):t=Buffer.concat([t,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(yt.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};yt.prototype._generateBoundary=function(){this._boundary="--------------------------"+Z8.randomBytes(12).toString("hex")};yt.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};yt.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};yt.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}L8.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){t(r);return}n.forEach(function(i){e+=i}),t(null,e)})};yt.prototype.submit=function(t,e){var r,n,i={method:"post"};return typeof t=="string"?(t=D8(t),n=Jx({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(n=Jx(t,i),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(t.headers),n.protocol==="https:"?r=U8.request(n):r=A8.request(n),this.getLength(function(o,a){if(o&&o!=="Unknown stream"){this._error(o);return}if(a&&r.setHeader("Content-Length",a),this.pipe(r),e){var s,c=function(u,l){return r.removeListener("error",c),r.removeListener("response",s),e.call(this,u,l)};s=c.bind(this,null),r.on("error",c),r.on("response",s)}}.bind(this)),r};yt.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};yt.prototype.toString=function(){return"[object FormData]"};F8(yt.prototype,"FormData");_R.exports=yt});var xR,Ym,ew=E(()=>{xR=hl(bR(),1),Ym=xR.default});function rw(t){return j.isPlainObject(t)||j.isArray(t)}function wR(t){return j.endsWith(t,"[]")?t.slice(0,-2):t}function tw(t,e,r){return t?t.concat(e).map(function(i,o){return i=wR(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function V8(t){return j.isArray(t)&&!t.some(rw)}function B8(t,e,r){if(!j.isObject(t))throw new TypeError("target must be an object");e=e||new(Ym||FormData),r=j.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,g){return!j.isUndefined(g[v])});let n=r.metaTokens,i=r.visitor||l,o=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(e);if(!j.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(j.isDate(m))return m.toISOString();if(j.isBoolean(m))return m.toString();if(!c&&j.isBlob(m))throw new ae("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(m)||j.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function l(m,v,g){let h=m;if(j.isReactNative(e)&&j.isReactNativeBlob(m))return e.append(tw(g,v,o),u(m)),!1;if(m&&!g&&typeof m=="object"){if(j.endsWith(v,"{}"))v=n?v:v.slice(0,-2),m=JSON.stringify(m);else if(j.isArray(m)&&V8(m)||(j.isFileList(m)||j.endsWith(v,"[]"))&&(h=j.toArray(m)))return v=wR(v),h.forEach(function(y,b){!(j.isUndefined(y)||y===null)&&e.append(a===!0?tw([v],b,o):a===null?v:v+"[]",u(y))}),!1}return rw(m)?!0:(e.append(tw(g,v,o),u(m)),!1)}let d=[],p=Object.assign(W8,{defaultVisitor:l,convertValue:u,isVisitable:rw});function f(m,v){if(!j.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(m),j.forEach(m,function(h,_){(!(j.isUndefined(h)||h===null)&&i.call(e,h,j.isString(_)?_.trim():_,v,p))===!0&&f(h,v?v.concat(_):[_])}),d.pop()}}if(!j.isObject(t))throw new TypeError("data must be an object");return f(t),e}var W8,ea,Wl=E(()=>{"use strict";Wt();Un();ew();W8=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});ea=B8});function kR(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function SR(t,e){this._pairs=[],t&&ea(t,this,e)}var $R,IR,ER=E(()=>{"use strict";Wl();$R=SR.prototype;$R.append=function(e,r){this._pairs.push([e,r])};$R.toString=function(e){let r=e?function(n){return e.call(this,n,kR)}:kR;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};IR=SR});function K8(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Va(t,e,r){if(!e)return t;let n=r&&r.encode||K8,i=j.isFunction(r)?{serialize:r}:r,o=i&&i.serialize,a;if(o?a=o(e,i):a=j.isURLSearchParams(e)?e.toString():new IR(e,i).toString(n),a){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}var Jm=E(()=>{"use strict";Wt();ER()});var nw,iw,PR=E(()=>{"use strict";Wt();nw=class{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){j.forEach(this.handlers,function(n){n!==null&&e(n)})}},iw=nw});var ta,Bl=E(()=>{"use strict";ta={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0}});import H8 from"url";var TR,zR=E(()=>{"use strict";TR=H8.URLSearchParams});import G8 from"crypto";var ow,OR,jR,Q8,NR,CR=E(()=>{zR();ew();ow="abcdefghijklmnopqrstuvwxyz",OR="0123456789",jR={DIGIT:OR,ALPHA:ow,ALPHA_DIGIT:ow+ow.toUpperCase()+OR},Q8=(t=16,e=jR.ALPHA_DIGIT)=>{let r="",{length:n}=e,i=new Uint32Array(t);G8.randomFillSync(i);for(let o=0;o<t;o++)r+=e[i[o]%n];return r},NR={isNode:!0,classes:{URLSearchParams:TR,FormData:Ym,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:jR,generateString:Q8,protocols:["http","https","file","data"]}});var cw={};Gi(cw,{hasBrowserEnv:()=>sw,hasStandardBrowserEnv:()=>Y8,hasStandardBrowserWebWorkerEnv:()=>J8,navigator:()=>aw,origin:()=>X8});var sw,aw,Y8,J8,X8,RR=E(()=>{sw=typeof window<"u"&&typeof document<"u",aw=typeof navigator=="object"&&navigator||void 0,Y8=sw&&(!aw||["ReactNative","NativeScript","NS"].indexOf(aw.product)<0),J8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",X8=sw&&window.location.href||"http://localhost"});var Pt,Pi=E(()=>{CR();RR();Pt={...cw,...NR}});function uw(t,e){return ea(t,new Pt.classes.URLSearchParams,{visitor:function(r,n,i,o){return Pt.isNode&&j.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}var AR=E(()=>{"use strict";Wt();Wl();Pi()});function e7(t){return j.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function t7(t){let e={},r=Object.keys(t),n,i=r.length,o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function r7(t){function e(r,n,i,o){let a=r[o++];if(a==="__proto__")return!0;let s=Number.isFinite(+a),c=o>=r.length;return a=!a&&j.isArray(i)?i.length:a,c?(j.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!s):((!i[a]||!j.isObject(i[a]))&&(i[a]=[]),e(r,n,i[a],o)&&j.isArray(i[a])&&(i[a]=t7(i[a])),!s)}if(j.isFormData(t)&&j.isFunction(t.entries)){let r={};return j.forEachEntry(t,(n,i)=>{e(e7(n),i,r,0)}),r}return null}var Xm,lw=E(()=>{"use strict";Wt();Xm=r7});function n7(t,e,r){if(j.isString(t))try{return(e||JSON.parse)(t),j.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var dw,bc,eh=E(()=>{"use strict";Wt();Un();Bl();Wl();AR();Pi();lw();dw={transitional:ta,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=j.isObject(e);if(o&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return i?JSON.stringify(Xm(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e)||j.isReadableStream(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return uw(e,this.formSerializer).toString();if((s=j.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return ea(s?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),n7(e)):e}],transformResponse:[function(e){let r=this.transitional||dw.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(j.isResponse(e)||j.isReadableStream(e))return e;if(e&&j.isString(e)&&(n&&!this.responseType||i)){let a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(s){if(a)throw s.name==="SyntaxError"?ae.from(s,ae.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],t=>{dw.headers[t]={}});bc=dw});var i7,UR,DR=E(()=>{"use strict";Wt();i7=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UR=t=>{let e={},r,n,i;return t&&t.split(`
|
|
43
|
+
`).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||e[r]&&i7[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e}});function qR(t,e){if(!(t===!1||t==null)){if(j.isArray(t)){t.forEach(r=>qR(r,e));return}if(!o7(String(t)))throw new Error(`Invalid character in header content ["${e}"]`)}}function Kl(t){return t&&String(t).trim().toLowerCase()}function a7(t){let e=t.length;for(;e>0;){let r=t.charCodeAt(e-1);if(r!==10&&r!==13)break;e-=1}return e===t.length?t:t.slice(0,e)}function th(t){return t===!1||t==null?t:j.isArray(t)?t.map(th):a7(String(t))}function s7(t){let e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}function pw(t,e,r,n,i){if(j.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!j.isString(e)){if(j.isString(n))return e.indexOf(n)!==-1;if(j.isRegExp(n))return n.test(e)}}function u7(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function l7(t,e){let r=j.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,a){return this[n].call(this,e,i,o,a)},configurable:!0})})}var MR,o7,c7,xc,ir,Ji=E(()=>{"use strict";Wt();DR();MR=Symbol("internals"),o7=t=>!/[\r\n]/.test(t);c7=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());xc=class{constructor(e){e&&this.set(e)}set(e,r,n){let i=this;function o(s,c,u){let l=Kl(c);if(!l)throw new Error("header name must be a non-empty string");let d=j.findKey(i,l);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(qR(s,c),i[d||c]=th(s))}let a=(s,c)=>j.forEach(s,(u,l)=>o(u,l,c));if(j.isPlainObject(e)||e instanceof this.constructor)a(e,r);else if(j.isString(e)&&(e=e.trim())&&!c7(e))a(UR(e),r);else if(j.isObject(e)&&j.isIterable(e)){let s={},c,u;for(let l of e){if(!j.isArray(l))throw TypeError("Object iterator must return a key-value pair");s[u=l[0]]=(c=s[u])?j.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}a(s,r)}else e!=null&&o(r,e,n);return this}get(e,r){if(e=Kl(e),e){let n=j.findKey(this,e);if(n){let i=this[n];if(!r)return i;if(r===!0)return s7(i);if(j.isFunction(r))return r.call(this,i,n);if(j.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Kl(e),e){let n=j.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||pw(this,this[n],n,r)))}return!1}delete(e,r){let n=this,i=!1;function o(a){if(a=Kl(a),a){let s=j.findKey(n,a);s&&(!r||pw(n,n[s],s,r))&&(delete n[s],i=!0)}}return j.isArray(e)?e.forEach(o):o(e),i}clear(e){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let o=r[n];(!e||pw(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){let r=this,n={};return j.forEach(this,(i,o)=>{let a=j.findKey(n,o);if(a){r[a]=th(i),delete r[o];return}let s=e?u7(o):String(o).trim();s!==o&&delete r[o],r[s]=th(i),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let r=Object.create(null);return j.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&j.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
44
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){let n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){let n=(this[MR]=this[MR]={accessors:{}}).accessors,i=this.prototype;function o(a){let s=Kl(a);n[s]||(l7(i,a),n[s]=!0)}return j.isArray(e)?e.forEach(o):o(e),this}};xc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);j.reduceDescriptors(xc.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});j.freezeMethods(xc);ir=xc});function Hl(t,e){let r=this||bc,n=e||r,i=ir.from(n.headers),o=n.data;return j.forEach(t,function(s){o=s.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}var ZR=E(()=>{"use strict";Wt();eh();Ji()});function Gl(t){return!!(t&&t.__CANCEL__)}var fw=E(()=>{"use strict"});var mw,Dn,Wa=E(()=>{"use strict";Un();mw=class extends ae{constructor(e,r,n){super(e??"canceled",ae.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},Dn=mw});function Xi(t,e,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new ae("Request failed with status code "+r.status,[ae.ERR_BAD_REQUEST,ae.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}var rh=E(()=>{"use strict";Un()});function hw(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}var LR=E(()=>{"use strict"});function gw(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var FR=E(()=>{"use strict"});function Ba(t,e,r){let n=!hw(e);return t&&(n||r==!1)?gw(t,e):e}var nh=E(()=>{"use strict";LR();FR()});function p7(t){try{return new URL(t)}catch{return null}}function VR(t){var e=(typeof t=="string"?p7(t):t)||{},r=e.protocol,n=e.host,i=e.port;if(typeof n!="string"||!n||typeof r!="string"||(r=r.split(":",1)[0],n=n.replace(/:\d*$/,""),i=parseInt(i)||d7[r]||0,!f7(n,i)))return"";var o=vw(r+"_proxy")||vw("all_proxy");return o&&o.indexOf("://")===-1&&(o=r+"://"+o),o}function f7(t,e){var r=vw("no_proxy").toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),o=i?i[1]:n,a=i?parseInt(i[2]):0;return a&&a!==e?!0:/^[.*]/.test(o)?(o.charAt(0)==="*"&&(o=o.slice(1)),!t.endsWith(o)):t!==o}):!0}function vw(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var d7,WR=E(()=>{"use strict";d7={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var KR=O((Kze,BR)=>{var wc=1e3,kc=wc*60,Sc=kc*60,Ka=Sc*24,m7=Ka*7,h7=Ka*365.25;BR.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return g7(t);if(r==="number"&&isFinite(t))return e.long?y7(t):v7(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function g7(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*h7;case"weeks":case"week":case"w":return r*m7;case"days":case"day":case"d":return r*Ka;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Sc;case"minutes":case"minute":case"mins":case"min":case"m":return r*kc;case"seconds":case"second":case"secs":case"sec":case"s":return r*wc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function v7(t){var e=Math.abs(t);return e>=Ka?Math.round(t/Ka)+"d":e>=Sc?Math.round(t/Sc)+"h":e>=kc?Math.round(t/kc)+"m":e>=wc?Math.round(t/wc)+"s":t+"ms"}function y7(t){var e=Math.abs(t);return e>=Ka?ih(t,e,Ka,"day"):e>=Sc?ih(t,e,Sc,"hour"):e>=kc?ih(t,e,kc,"minute"):e>=wc?ih(t,e,wc,"second"):t+" ms"}function ih(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var yw=O((Hze,HR)=>{function _7(t){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=i,r.enabled=s,r.humanize=KR(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let d=0;for(let p=0;p<l.length;p++)d=(d<<5)-d+l.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=e;function r(l){let d,p=null,f,m;function v(...g){if(!v.enabled)return;let h=v,_=Number(new Date),y=_-(d||_);h.diff=y,h.prev=d,h.curr=_,d=_,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let b=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(w,k)=>{if(w==="%%")return"%";b++;let $=r.formatters[k];if(typeof $=="function"){let T=g[b];w=$.call(h,T),g.splice(b,1),b--}return w}),r.formatArgs.call(h,g),(h.log||r.log).apply(h,g)}return v.namespace=l,v.useColors=r.useColors(),v.color=r.selectColor(l),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(f!==r.namespaces&&(f=r.namespaces,m=r.enabled(l)),m),set:g=>{p=g}}),typeof r.init=="function"&&r.init(v),v}function n(l,d){let p=r(this.namespace+(typeof d>"u"?":":d)+l);return p.log=this.log,p}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of d)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function o(l,d){let p=0,f=0,m=-1,v=0;for(;p<l.length;)if(f<d.length&&(d[f]===l[p]||d[f]==="*"))d[f]==="*"?(m=f,v=p,f++):(p++,f++);else if(m!==-1)f=m+1,v++,p=v;else return!1;for(;f<d.length&&d[f]==="*";)f++;return f===d.length}function a(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function s(l){for(let d of r.skips)if(o(l,d))return!1;for(let d of r.names)if(o(l,d))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}HR.exports=_7});var GR=O((_n,oh)=>{_n.formatArgs=x7;_n.save=w7;_n.load=k7;_n.useColors=b7;_n.storage=S7();_n.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();_n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function b7(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function x7(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+oh.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}_n.log=console.debug||console.log||(()=>{});function w7(t){try{t?_n.storage.setItem("debug",t):_n.storage.removeItem("debug")}catch{}}function k7(){let t;try{t=_n.storage.getItem("debug")||_n.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function S7(){try{return localStorage}catch{}}oh.exports=yw()(_n);var{formatters:$7}=oh.exports;$7.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var YR=O((Gze,QR)=>{"use strict";QR.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var eA=O((Qze,XR)=>{"use strict";var I7=kt("os"),JR=kt("tty"),ti=YR(),{env:Ir}=process,ra;ti("no-color")||ti("no-colors")||ti("color=false")||ti("color=never")?ra=0:(ti("color")||ti("colors")||ti("color=true")||ti("color=always"))&&(ra=1);"FORCE_COLOR"in Ir&&(Ir.FORCE_COLOR==="true"?ra=1:Ir.FORCE_COLOR==="false"?ra=0:ra=Ir.FORCE_COLOR.length===0?1:Math.min(parseInt(Ir.FORCE_COLOR,10),3));function _w(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function bw(t,e){if(ra===0)return 0;if(ti("color=16m")||ti("color=full")||ti("color=truecolor"))return 3;if(ti("color=256"))return 2;if(t&&!e&&ra===void 0)return 0;let r=ra||0;if(Ir.TERM==="dumb")return r;if(process.platform==="win32"){let n=I7.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Ir)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Ir)||Ir.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Ir)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ir.TEAMCITY_VERSION)?1:0;if(Ir.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ir){let n=parseInt((Ir.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ir.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ir.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ir.TERM)||"COLORTERM"in Ir?1:r}function E7(t){let e=bw(t,t&&t.isTTY);return _w(e)}XR.exports={supportsColor:E7,stdout:_w(bw(!0,JR.isatty(1))),stderr:_w(bw(!0,JR.isatty(2)))}});var rA=O((Er,sh)=>{var P7=kt("tty"),ah=kt("util");Er.init=R7;Er.log=j7;Er.formatArgs=z7;Er.save=N7;Er.load=C7;Er.useColors=T7;Er.destroy=ah.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Er.colors=[6,2,3,4,5,1];try{let t=eA();t&&(t.stderr||t).level>=2&&(Er.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Er.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function T7(){return"colors"in Er.inspectOpts?!!Er.inspectOpts.colors:P7.isatty(process.stderr.fd)}function z7(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
|
|
45
|
+
`).join(`
|
|
46
|
+
`+o),t.push(i+"m+"+sh.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=O7()+e+" "+t[0]}function O7(){return Er.inspectOpts.hideDate?"":new Date().toISOString()+" "}function j7(...t){return process.stderr.write(ah.formatWithOptions(Er.inspectOpts,...t)+`
|
|
47
|
+
`)}function N7(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function C7(){return process.env.DEBUG}function R7(t){t.inspectOpts={};let e=Object.keys(Er.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Er.inspectOpts[e[r]]}sh.exports=yw()(Er);var{formatters:tA}=sh.exports;tA.o=function(t){return this.inspectOpts.colors=this.useColors,ah.inspect(t,this.inspectOpts).split(`
|
|
48
|
+
`).map(e=>e.trim()).join(" ")};tA.O=function(t){return this.inspectOpts.colors=this.useColors,ah.inspect(t,this.inspectOpts)}});var nA=O((Yze,xw)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?xw.exports=GR():xw.exports=rA()});var oA=O((Jze,iA)=>{var Ql;iA.exports=function(){if(!Ql){try{Ql=nA()("follow-redirects")}catch{}typeof Ql!="function"&&(Ql=function(){})}Ql.apply(null,arguments)}});var lA=O((Xze,Nw)=>{var Jl=kt("url"),Yl=Jl.URL,A7=kt("http"),U7=kt("https"),Iw=kt("stream").Writable,Ew=kt("assert"),aA=oA();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=Ga(Error.captureStackTrace);!e&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var Pw=!1;try{Ew(new Yl(""))}catch(t){Pw=t.code==="ERR_INVALID_URL"}var D7=["Authorization","Proxy-Authorization","Cookie"],M7=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Tw=["abort","aborted","connect","error","socket","timeout"],zw=Object.create(null);Tw.forEach(function(t){zw[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var kw=Xl("ERR_INVALID_URL","Invalid URL",TypeError),Sw=Xl("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),q7=Xl("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Sw),Z7=Xl("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),L7=Xl("ERR_STREAM_WRITE_AFTER_END","write after end"),F7=Iw.prototype.destroy||cA;function bn(t,e){Iw.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof Sw?i:new Sw({cause:i}))}},this._headerFilter=new RegExp("^(?:"+D7.concat(t.sensitiveHeaders).map(G7).join("|")+")$","i"),this._performRequest()}bn.prototype=Object.create(Iw.prototype);bn.prototype.abort=function(){jw(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};bn.prototype.destroy=function(t){return jw(this._currentRequest,t),F7.call(this,t),this};bn.prototype.write=function(t,e,r){if(this._ending)throw new L7;if(!Ha(t)&&!K7(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Ga(e)&&(r=e,e=null),t.length===0){r&&r();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,r)):(this.emit("error",new Z7),this.abort())};bn.prototype.end=function(t,e,r){if(Ga(t)?(r=t,t=e=null):Ga(e)&&(r=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(t,e,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};bn.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};bn.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};bn.prototype.setTimeout=function(t,e){var r=this;function n(a){a.setTimeout(t),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function i(a){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},t),n(a)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),r.removeListener("close",o),e&&r.removeListener("timeout",e),r.socket||r._currentRequest.removeListener("socket",i)}return e&&this.on("timeout",e),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){bn.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(bn.prototype,t,{get:function(){return this._currentRequest[t]}})});bn.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),B7(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};bn.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var r=t.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=e.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of Tw)n.on(i,zw[i]);if(this._currentUrl=/^\//.test(this._options.path)?Jl.format(this._options):this._options.path,this._isRedirect){var o=0,a=this,s=this._requestBodyBuffers;(function c(u){if(n===a._currentRequest)if(u)a.emit("error",u);else if(o<s.length){var l=s[o++];n.finished||n.write(l.data,l.encoding,c)}else a._ended&&n.end()})()}};bn.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var r=t.headers.location;if(!r||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(jw(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new q7;var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var o=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],ww(/^content-/i,this._options.headers));var a=ww(/^host$/i,this._options.headers),s=Ow(this._currentUrl),c=a||s.host,u=/^\w+:/.test(r)?this._currentUrl:Jl.format(Object.assign(s,{host:c})),l=V7(r,u);if(aA("redirecting to",l.href),this._isRedirect=!0,$w(l,this._options),(l.protocol!==s.protocol&&l.protocol!=="https:"||l.host!==c&&!W7(l.host,c))&&ww(this._headerFilter,this._options.headers),Ga(i)){var d={headers:t.headers,statusCode:e},p={url:u,method:o,headers:n};i(this._options,d,p),this._sanitizeOptions(this._options)}this._performRequest()};function sA(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",o=r[i]=t[n],a=e[n]=Object.create(o);function s(u,l,d){return H7(u)?u=$w(u):Ha(u)?u=$w(Ow(u)):(d=l,l=uA(u),u={protocol:i}),Ga(l)&&(d=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},u,l),l.nativeProtocols=r,!Ha(l.host)&&!Ha(l.hostname)&&(l.hostname="::1"),Ew.equal(l.protocol,i,"protocol mismatch"),aA("options",l),new bn(l,d)}function c(u,l,d){var p=a.request(u,l,d);return p.end(),p}Object.defineProperties(a,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function cA(){}function Ow(t){var e;if(Pw)e=new Yl(t);else if(e=uA(Jl.parse(t)),!Ha(e.protocol))throw new kw({input:t});return e}function V7(t,e){return Pw?new Yl(t,e):Ow(Jl.resolve(e,t))}function uA(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new kw({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new kw({input:t.href||t});return t}function $w(t,e){var r=e||{};for(var n of M7)r[n]=t[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function ww(t,e){var r;for(var n in e)t.test(n)&&(r=e[n],delete e[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Xl(t,e,r){function n(i){Ga(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),n}function jw(t,e){for(var r of Tw)t.removeListener(r,zw[r]);t.on("error",cA),t.destroy(e)}function W7(t,e){Ew(Ha(t)&&Ha(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function B7(t){return t instanceof Array}function Ha(t){return typeof t=="string"||t instanceof String}function Ga(t){return typeof t=="function"}function K7(t){return typeof t=="object"&&"length"in t}function H7(t){return Yl&&t instanceof Yl}function G7(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}Nw.exports=sA({http:A7,https:U7});Nw.exports.wrap=sA});var Qa,ch=E(()=>{Qa="1.15.0"});function ed(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var Cw=E(()=>{"use strict"});function Rw(t,e,r){let n=r&&r.Blob||Pt.classes.Blob,i=ed(t);if(e===void 0&&n&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let o=Q7.exec(t);if(!o)throw new ae("Invalid URL",ae.ERR_INVALID_URL);let a=o[1],s=o[2],c=o[3],u=Buffer.from(decodeURIComponent(c),s?"base64":"utf8");if(e){if(!n)throw new ae("Blob is not supported",ae.ERR_NOT_SUPPORT);return new n([u],{type:a})}return u}throw new ae("Unsupported protocol "+i,ae.ERR_NOT_SUPPORT)}var Q7,dA=E(()=>{"use strict";Un();Cw();Pi();Q7=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/});import Y7 from"stream";var Aw,Uw,Dw,pA=E(()=>{"use strict";Wt();Aw=Symbol("internals"),Uw=class extends Y7.Transform{constructor(e){e=j.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,i)=>!j.isUndefined(i[n])),super({readableHighWaterMark:e.chunkSize});let r=this[Aw]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(e){let r=this[Aw];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let i=this[Aw],o=i.maxRate,a=this.readableHighWaterMark,s=i.timeWindow,c=1e3/s,u=o/c,l=i.minChunkSize!==!1?Math.max(i.minChunkSize,u*.01):0,d=(f,m)=>{let v=Buffer.byteLength(f);i.bytesSeen+=v,i.bytes+=v,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(f)?process.nextTick(m):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(m)}},p=(f,m)=>{let v=Buffer.byteLength(f),g=null,h=a,_,y=0;if(o){let b=Date.now();(!i.ts||(y=b-i.ts)>=s)&&(i.ts=b,_=u-i.bytes,i.bytes=_<0?-_:0,y=0),_=u-i.bytes}if(o){if(_<=0)return setTimeout(()=>{m(null,f)},s-y);_<h&&(h=_)}h&&v>h&&v-h>l&&(g=f.subarray(h),f=f.subarray(0,h)),d(f,g?()=>{process.nextTick(m,null,g)}:m)};p(e,function f(m,v){if(m)return n(m);v?p(v,f):n(null)})}},Dw=Uw});var fA,J7,uh,Mw=E(()=>{({asyncIterator:fA}=Symbol),J7=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[fA]?yield*t[fA]():yield t},uh=J7});import X7 from"util";import{Readable as eY}from"stream";var tY,td,Ya,rY,nY,qw,iY,mA,hA=E(()=>{Wt();Mw();Pi();tY=Pt.ALPHABET.ALPHA_DIGIT+"-_",td=typeof TextEncoder=="function"?new TextEncoder:new X7.TextEncoder,Ya=`\r
|
|
49
|
+
`,rY=td.encode(Ya),nY=2,qw=class{constructor(e,r){let{escapeName:n}=this.constructor,i=j.isString(r),o=`Content-Disposition: form-data; name="${n(e)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Ya}`;i?r=td.encode(String(r).replace(/\r?\n|\r\n?/g,Ya)):o+=`Content-Type: ${r.type||"application/octet-stream"}${Ya}`,this.headers=td.encode(o+Ya),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+nY,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;j.isTypedArray(e)?yield e:yield*uh(e),yield rY}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},iY=(t,e,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:o=n+"-"+Pt.generateString(i,tY)}=r||{};if(!j.isFormData(t))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");let a=td.encode("--"+o+Ya),s=td.encode("--"+o+"--"+Ya),c=s.byteLength,u=Array.from(t.entries()).map(([d,p])=>{let f=new qw(d,p);return c+=f.size,f});c+=a.byteLength*u.length,c=j.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(l["Content-Length"]=c),e&&e(l),eY.from((async function*(){for(let d of u)yield a,yield*d.encode();yield s})())},mA=iY});import oY from"stream";var Zw,gA,vA=E(()=>{"use strict";Zw=class extends oY.Transform{__transform(e,r,n){this.push(e),n()}_transform(e,r,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,r)}this.__transform(e,r,n)}},gA=Zw});var aY,yA,_A=E(()=>{Wt();aY=(t,e)=>j.isAsyncFn(t)?function(...r){let n=r.pop();t.apply(this,r).then(i=>{try{e?n(null,...e(i)):n(null,i)}catch(o){n(o)}},n)}:t,yA=aY});function Lw(t){let e;try{e=new URL(t)}catch{return!1}let r=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!r)return!1;if(r==="*")return!0;let n=Number.parseInt(e.port,10)||sY[e.protocol.split(":",1)[0]]||0,i=bA(e.hostname.toLowerCase());return r.split(/[\s,]+/).some(o=>{if(!o)return!1;let[a,s]=cY(o);return a=bA(a),!a||s&&s!==n?!1:(a.charAt(0)==="*"&&(a=a.slice(1)),a.charAt(0)==="."?i.endsWith(a):i===a)})}var sY,cY,bA,xA=E(()=>{sY={http:80,https:443,ws:80,wss:443,ftp:21},cY=t=>{let e=t,r=0;if(e.charAt(0)==="["){let o=e.indexOf("]");if(o!==-1){let a=e.slice(1,o),s=e.slice(o+1);return s.charAt(0)===":"&&/^\d+$/.test(s.slice(1))&&(r=Number.parseInt(s.slice(1),10)),[a,r]}}let n=e.indexOf(":"),i=e.lastIndexOf(":");return n!==-1&&n===i&&/^\d+$/.test(e.slice(i+1))&&(r=Number.parseInt(e.slice(i+1),10),e=e.slice(0,i)),[e,r]},bA=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),t.replace(/\.+$/,""))});function uY(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,o=0,a;return e=e!==void 0?e:1e3,function(c){let u=Date.now(),l=n[o];a||(a=u),r[i]=c,n[i]=u;let d=o,p=0;for(;d!==i;)p+=r[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-a<e)return;let f=l&&u-l;return f?Math.round(p*1e3/f):void 0}}var wA,kA=E(()=>{"use strict";wA=uY});function lY(t,e){let r=0,n=1e3/e,i,o,a=(u,l=Date.now())=>{r=l,i=null,o&&(clearTimeout(o),o=null),t(...u)};return[(...u)=>{let l=Date.now(),d=l-r;d>=n?a(u,l):(i=u,o||(o=setTimeout(()=>{o=null,a(i)},n-d)))},()=>i&&a(i)]}var SA,$A=E(()=>{SA=lY});var xo,$c,Ic,lh=E(()=>{kA();$A();Wt();xo=(t,e,r=3)=>{let n=0,i=wA(50,250);return SA(o=>{let a=o.loaded,s=o.lengthComputable?o.total:void 0,c=a-n,u=i(c),l=a<=s;n=a;let d={loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&l?(s-a)/u:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},r)},$c=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ic=t=>(...e)=>j.asap(()=>t(...e))});function Fw(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let r=t.slice(5,e),n=t.slice(e+1);if(/;base64/i.test(r)){let o=n.length,a=n.length;for(let p=0;p<a;p++)if(n.charCodeAt(p)===37&&p+2<a){let f=n.charCodeAt(p+1),m=n.charCodeAt(p+2);(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(o-=2,p+=2)}let s=0,c=a-1,u=p=>p>=2&&n.charCodeAt(p-2)===37&&n.charCodeAt(p-1)===51&&(n.charCodeAt(p)===68||n.charCodeAt(p)===100);c>=0&&(n.charCodeAt(c)===61?(s++,c--):u(c)&&(s++,c-=3)),s===1&&c>=0&&(n.charCodeAt(c)===61||u(c))&&s++;let d=Math.floor(o/4)*3-(s||0);return d>0?d:0}return Buffer.byteLength(n,"utf8")}var IA=E(()=>{});import dY from"http";import pY from"https";import jA from"http2";import NA from"util";import ia from"zlib";import na from"stream";import{EventEmitter as fY}from"events";function _Y(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function RA(t,e,r){let n=e;if(!n&&n!==!1){let i=VR(r);i&&(Lw(r)||(n=new URL(i)))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){if(!!(n.auth.username||n.auth.password))n.auth=(n.auth.username||"")+":"+(n.auth.password||"");else if(typeof n.auth=="object")throw new ae("Invalid proxy authorization",ae.ERR_BAD_OPTION,{proxy:n});let a=Buffer.from(n.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+a}t.headers.host=t.hostname+(t.port?":"+t.port:"");let i=n.hostname||n.host;t.hostname=i,t.host=i,t.port=n.port,t.path=r,n.protocol&&(t.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}t.beforeRedirects.proxy=function(o){RA(o,e,o.href)}}var CA,EA,mY,PA,hY,gY,vY,TA,zA,Vw,yY,bY,xY,wY,OA,kY,AA,UA=E(()=>{Wt();rh();nh();Jm();WR();CA=hl(lA(),1);ch();Bl();Un();Wa();Pi();dA();Ji();pA();hA();Mw();vA();_A();xA();lh();IA();EA={flush:ia.constants.Z_SYNC_FLUSH,finishFlush:ia.constants.Z_SYNC_FLUSH},mY={flush:ia.constants.BROTLI_OPERATION_FLUSH,finishFlush:ia.constants.BROTLI_OPERATION_FLUSH},PA=j.isFunction(ia.createBrotliDecompress),{http:hY,https:gY}=CA.default,vY=/https:?/,TA=Pt.protocols.map(t=>t+":"),zA=(t,[e,r])=>(t.on("end",r).on("error",r),e),Vw=class{constructor(){this.sessions=Object.create(null)}getSession(e,r){r=Object.assign({sessionTimeout:1e3},r);let n=this.sessions[e];if(n){let l=n.length;for(let d=0;d<l;d++){let[p,f]=n[d];if(!p.destroyed&&!p.closed&&NA.isDeepStrictEqual(f,r))return p}}let i=jA.connect(e,r),o,a=()=>{if(o)return;o=!0;let l=n,d=l.length,p=d;for(;p--;)if(l[p][0]===i){d===1?delete this.sessions[e]:l.splice(p,1),i.closed||i.close();return}},s=i.request,{sessionTimeout:c}=r;if(c!=null){let l,d=0;i.request=function(){let p=s.apply(this,arguments);return d++,l&&(clearTimeout(l),l=null),p.once("close",()=>{--d||(l=setTimeout(()=>{l=null,a()},c))}),p}}i.once("close",a);let u=[i,r];return n?n.push(u):n=this.sessions[e]=[u],i}},yY=new Vw;bY=typeof process<"u"&&j.kindOf(process)==="process",xY=t=>new Promise((e,r)=>{let n,i,o=(c,u)=>{i||(i=!0,n&&n(c,u))},a=c=>{o(c),e(c)},s=c=>{o(c,!0),r(c)};t(a,s,c=>n=c).catch(s)}),wY=({address:t,family:e})=>{if(!j.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},OA=(t,e)=>wY(j.isObject(t)?t:{address:t,family:e}),kY={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:i}=t,o=yY.getSession(r,n),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:s,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=jA.constants,l={[a]:t.protocol.replace(":",""),[s]:t.method,[c]:t.path};j.forEach(i,(p,f)=>{f.charAt(0)!==":"&&(l[f]=p)});let d=o.request(l);return d.once("response",p=>{let f=d;p=Object.assign({},p);let m=p[u];delete p[u],f.headers=p,f.statusCode=+m,e(f)}),d}},AA=bY&&function(e){return xY(async function(n,i,o){let{data:a,lookup:s,family:c,httpVersion:u=1,http2Options:l}=e,{responseType:d,responseEncoding:p}=e,f=e.method.toUpperCase(),m,v=!1,g;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);let h=u===2;if(s){let F=yA(s,I=>j.isArray(I)?I:[I]);s=(I,V,C)=>{F(I,V,(S,P,B)=>{if(S)return C(S);let ie=j.isArray(P)?P.map(me=>OA(me)):[OA(P,B)];V.all?C(S,ie):C(S,ie[0].address,ie[0].family)})}}let _=new fY;function y(F){try{_.emit("abort",!F||F.type?new Dn(null,e,g):F)}catch(I){console.warn("emit error",I)}}_.once("abort",i);let b=()=>{e.cancelToken&&e.cancelToken.unsubscribe(y),e.signal&&e.signal.removeEventListener("abort",y),_.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(y),e.signal&&(e.signal.aborted?y():e.signal.addEventListener("abort",y))),o((F,I)=>{if(m=!0,I){v=!0,b();return}let{data:V}=F;if(V instanceof na.Readable||V instanceof na.Duplex){let C=na.finished(V,()=>{C(),b()})}else b()});let x=Ba(e.baseURL,e.url,e.allowAbsoluteUrls),w=new URL(x,Pt.hasBrowserEnv?Pt.origin:void 0),k=w.protocol||TA[0];if(k==="data:"){if(e.maxContentLength>-1){let I=String(e.url||x||"");if(Fw(I)>e.maxContentLength)return i(new ae("maxContentLength size of "+e.maxContentLength+" exceeded",ae.ERR_BAD_RESPONSE,e))}let F;if(f!=="GET")return Xi(n,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{F=Rw(e.url,d==="blob",{Blob:e.env&&e.env.Blob})}catch(I){throw ae.from(I,ae.ERR_BAD_REQUEST,e)}return d==="text"?(F=F.toString(p),(!p||p==="utf8")&&(F=j.stripBOM(F))):d==="stream"&&(F=na.Readable.from(F)),Xi(n,i,{data:F,status:200,statusText:"OK",headers:new ir,config:e})}if(TA.indexOf(k)===-1)return i(new ae("Unsupported protocol "+k,ae.ERR_BAD_REQUEST,e));let $=ir.from(e.headers).normalize();$.set("User-Agent","axios/"+Qa,!1);let{onUploadProgress:T,onDownloadProgress:A}=e,z=e.maxRate,M,W;if(j.isSpecCompliantForm(a)){let F=$.getContentType(/boundary=([-_\w\d]{10,70})/i);a=mA(a,I=>{$.set(I)},{tag:`axios-${Qa}-boundary`,boundary:F&&F[1]||void 0})}else if(j.isFormData(a)&&j.isFunction(a.getHeaders)){if($.set(a.getHeaders()),!$.hasContentLength())try{let F=await NA.promisify(a.getLength).call(a);Number.isFinite(F)&&F>=0&&$.setContentLength(F)}catch{}}else if(j.isBlob(a)||j.isFile(a))a.size&&$.setContentType(a.type||"application/octet-stream"),$.setContentLength(a.size||0),a=na.Readable.from(uh(a));else if(a&&!j.isStream(a)){if(!Buffer.isBuffer(a))if(j.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(j.isString(a))a=Buffer.from(a,"utf-8");else return i(new ae("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",ae.ERR_BAD_REQUEST,e));if($.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return i(new ae("Request body larger than maxBodyLength limit",ae.ERR_BAD_REQUEST,e))}let R=j.toFiniteNumber($.getContentLength());j.isArray(z)?(M=z[0],W=z[1]):M=W=z,a&&(T||M)&&(j.isStream(a)||(a=na.Readable.from(a,{objectMode:!1})),a=na.pipeline([a,new Dw({maxRate:j.toFiniteNumber(M)})],j.noop),T&&a.on("progress",zA(a,$c(R,xo(Ic(T),!1,3)))));let te;if(e.auth){let F=e.auth.username||"",I=e.auth.password||"";te=F+":"+I}if(!te&&w.username){let F=w.username,I=w.password;te=F+":"+I}te&&$.delete("authorization");let G;try{G=Va(w.pathname+w.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(F){let I=new Error(F.message);return I.config=e,I.url=e.url,I.exists=!0,i(I)}$.set("Accept-Encoding","gzip, compress, deflate"+(PA?", br":""),!1);let ye={path:G,method:f,headers:$.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:te,protocol:k,family:c,beforeRedirect:_Y,beforeRedirects:{},http2Options:l};!j.isUndefined(s)&&(ye.lookup=s),e.socketPath?ye.socketPath=e.socketPath:(ye.hostname=w.hostname.startsWith("[")?w.hostname.slice(1,-1):w.hostname,ye.port=w.port,RA(ye,e.proxy,k+"//"+w.hostname+(w.port?":"+w.port:"")+ye.path));let De,de=vY.test(ye.protocol);if(ye.agent=de?e.httpsAgent:e.httpAgent,h?De=kY:e.transport?De=e.transport:e.maxRedirects===0?De=de?pY:dY:(e.maxRedirects&&(ye.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ye.beforeRedirects.config=e.beforeRedirect),De=de?gY:hY),e.maxBodyLength>-1?ye.maxBodyLength=e.maxBodyLength:ye.maxBodyLength=1/0,e.insecureHTTPParser&&(ye.insecureHTTPParser=e.insecureHTTPParser),g=De.request(ye,function(I){if(g.destroyed)return;let V=[I],C=j.toFiniteNumber(I.headers["content-length"]);if(A||W){let ie=new Dw({maxRate:j.toFiniteNumber(W)});A&&ie.on("progress",zA(ie,$c(C,xo(Ic(A),!0,3)))),V.push(ie)}let S=I,P=I.req||g;if(e.decompress!==!1&&I.headers["content-encoding"])switch((f==="HEAD"||I.statusCode===204)&&delete I.headers["content-encoding"],(I.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":V.push(ia.createUnzip(EA)),delete I.headers["content-encoding"];break;case"deflate":V.push(new gA),V.push(ia.createUnzip(EA)),delete I.headers["content-encoding"];break;case"br":PA&&(V.push(ia.createBrotliDecompress(mY)),delete I.headers["content-encoding"])}S=V.length>1?na.pipeline(V,j.noop):V[0];let B={status:I.statusCode,statusText:I.statusMessage,headers:new ir(I.headers),config:e,request:P};if(d==="stream")B.data=S,Xi(n,i,B);else{let ie=[],me=0;S.on("data",function(Pe){ie.push(Pe),me+=Pe.length,e.maxContentLength>-1&&me>e.maxContentLength&&(v=!0,S.destroy(),y(new ae("maxContentLength size of "+e.maxContentLength+" exceeded",ae.ERR_BAD_RESPONSE,e,P)))}),S.on("aborted",function(){if(v)return;let Pe=new ae("stream has been aborted",ae.ERR_BAD_RESPONSE,e,P);S.destroy(Pe),i(Pe)}),S.on("error",function(Pe){g.destroyed||i(ae.from(Pe,null,e,P))}),S.on("end",function(){try{let Pe=ie.length===1?ie[0]:Buffer.concat(ie);d!=="arraybuffer"&&(Pe=Pe.toString(p),(!p||p==="utf8")&&(Pe=j.stripBOM(Pe))),B.data=Pe}catch(Pe){return i(ae.from(Pe,null,e,B.request,B))}Xi(n,i,B)})}_.once("abort",ie=>{S.destroyed||(S.emit("error",ie),S.destroy())})}),_.once("abort",F=>{g.close?g.close():g.destroy(F)}),g.on("error",function(I){i(ae.from(I,null,e,g))}),g.on("socket",function(I){I.setKeepAlive(!0,1e3*60)}),e.timeout){let F=parseInt(e.timeout,10);if(Number.isNaN(F)){y(new ae("error trying to parse `config.timeout` to int",ae.ERR_BAD_OPTION_VALUE,e,g));return}g.setTimeout(F,function(){if(m)return;let V=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",C=e.transitional||ta;e.timeoutErrorMessage&&(V=e.timeoutErrorMessage),y(new ae(V,C.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,e,g))})}else g.setTimeout(0);if(j.isStream(a)){let F=!1,I=!1;a.on("end",()=>{F=!0}),a.once("error",V=>{I=!0,g.destroy(V)}),a.on("close",()=>{!F&&!I&&y(new Dn("Request stream has been aborted",e,g))}),a.pipe(g)}else a&&g.write(a),g.end()})}});var DA,MA=E(()=>{Pi();DA=Pt.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Pt.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Pt.origin),Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent)):()=>!0});var qA,ZA=E(()=>{Wt();Pi();qA=Pt.hasStandardBrowserEnv?{write(t,e,r,n,i,o,a){if(typeof document>"u")return;let s=[`${t}=${encodeURIComponent(e)}`];j.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),j.isString(n)&&s.push(`path=${n}`),j.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),j.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}}});function Ti(t,e){e=e||{};let r={};function n(u,l,d,p){return j.isPlainObject(u)&&j.isPlainObject(l)?j.merge.call({caseless:p},u,l):j.isPlainObject(l)?j.merge({},l):j.isArray(l)?l.slice():l}function i(u,l,d,p){if(j.isUndefined(l)){if(!j.isUndefined(u))return n(void 0,u,d,p)}else return n(u,l,d,p)}function o(u,l){if(!j.isUndefined(l))return n(void 0,l)}function a(u,l){if(j.isUndefined(l)){if(!j.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function s(u,l,d){if(d in e)return n(u,l);if(d in t)return n(void 0,u)}let c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,l,d)=>i(LA(u),LA(l),d,!0)};return j.forEach(Object.keys({...t,...e}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;let d=j.hasOwnProp(c,l)?c[l]:i,p=d(t[l],e[l],l);j.isUndefined(p)&&d!==s||(r[l]=p)}),r}var LA,dh=E(()=>{"use strict";Wt();Ji();LA=t=>t instanceof ir?{...t}:t});var ph,Ww=E(()=>{Pi();Wt();MA();ZA();nh();dh();Ji();Jm();ph=t=>{let e=Ti({},t),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;if(e.headers=a=ir.from(a),e.url=Va(Ba(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),j.isFormData(r)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(j.isFunction(r.getHeaders)){let c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&a.set(l,d)})}}if(Pt.hasStandardBrowserEnv&&(n&&j.isFunction(n)&&(n=n(e)),n||n!==!1&&DA(e.url))){let c=i&&o&&qA.read(o);c&&a.set(i,c)}return e}});var SY,FA,VA=E(()=>{Wt();rh();Bl();Un();Wa();Cw();Pi();Ji();lh();Ww();SY=typeof XMLHttpRequest<"u",FA=SY&&function(t){return new Promise(function(r,n){let i=ph(t),o=i.data,a=ir.from(i.headers).normalize(),{responseType:s,onUploadProgress:c,onDownloadProgress:u}=i,l,d,p,f,m;function v(){f&&f(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function h(){if(!g)return;let y=ir.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:y,config:t,request:g};Xi(function(k){r(k),v()},function(k){n(k),v()},x),g=null}"onloadend"in g?g.onloadend=h:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(h)},g.onabort=function(){g&&(n(new ae("Request aborted",ae.ECONNABORTED,t,g)),g=null)},g.onerror=function(b){let x=b&&b.message?b.message:"Network Error",w=new ae(x,ae.ERR_NETWORK,t,g);w.event=b||null,n(w),g=null},g.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",x=i.transitional||ta;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),n(new ae(b,x.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,t,g)),g=null},o===void 0&&a.setContentType(null),"setRequestHeader"in g&&j.forEach(a.toJSON(),function(b,x){g.setRequestHeader(x,b)}),j.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([p,m]=xo(u,!0),g.addEventListener("progress",p)),c&&g.upload&&([d,f]=xo(c),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(l=y=>{g&&(n(!y||y.type?new Dn(null,t,g):y),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));let _=ed(i.url);if(_&&Pt.protocols.indexOf(_)===-1){n(new ae("Unsupported protocol "+_+":",ae.ERR_BAD_REQUEST,t));return}g.send(o||null)})}});var $Y,WA,BA=E(()=>{Wa();Un();Wt();$Y=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i,o=function(u){if(!i){i=!0,s();let l=u instanceof Error?u:this.reason;n.abort(l instanceof ae?l:new Dn(l instanceof Error?l.message:l))}},a=e&&setTimeout(()=>{a=null,o(new ae(`timeout of ${e}ms exceeded`,ae.ETIMEDOUT))},e),s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));let{signal:c}=n;return c.unsubscribe=()=>j.asap(s),c}},WA=$Y});var IY,EY,PY,Bw,KA=E(()=>{IY=function*(t,e){let r=t.byteLength;if(!e||r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},EY=async function*(t,e){for await(let r of PY(t))yield*IY(r,e)},PY=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Bw=(t,e,r,n)=>{let i=EY(t,e),o=0,a,s=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{let{done:u,value:l}=await i.next();if(u){s(),c.close();return}let d=l.byteLength;if(r){let p=o+=d;r(p)}c.enqueue(new Uint8Array(l))}catch(u){throw s(u),u}},cancel(c){return s(c),i.return()}},{highWaterMark:2})}});var HA,fh,TY,GA,QA,YA,zY,OY,Kw,Vje,JA=E(()=>{Pi();Wt();Un();BA();KA();Ji();lh();Ww();rh();HA=64*1024,{isFunction:fh}=j,TY=(({Request:t,Response:e})=>({Request:t,Response:e}))(j.global),{ReadableStream:GA,TextEncoder:QA}=j.global,YA=(t,...e)=>{try{return!!t(...e)}catch{return!1}},zY=t=>{t=j.merge.call({skipUndefined:!0},TY,t);let{fetch:e,Request:r,Response:n}=t,i=e?fh(e):typeof fetch=="function",o=fh(r),a=fh(n);if(!i)return!1;let s=i&&fh(GA),c=i&&(typeof QA=="function"?(m=>v=>m.encode(v))(new QA):async m=>new Uint8Array(await new r(m).arrayBuffer())),u=o&&s&&YA(()=>{let m=!1,v=new GA,g=new r(Pt.origin,{body:v,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return v.cancel(),m&&!g}),l=a&&s&&YA(()=>j.isReadableStream(new n("").body)),d={stream:l&&(m=>m.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!d[m]&&(d[m]=(v,g)=>{let h=v&&v[m];if(h)return h.call(v);throw new ae(`Response type '${m}' is not supported`,ae.ERR_NOT_SUPPORT,g)})});let p=async m=>{if(m==null)return 0;if(j.isBlob(m))return m.size;if(j.isSpecCompliantForm(m))return(await new r(Pt.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(j.isArrayBufferView(m)||j.isArrayBuffer(m))return m.byteLength;if(j.isURLSearchParams(m)&&(m=m+""),j.isString(m))return(await c(m)).byteLength},f=async(m,v)=>{let g=j.toFiniteNumber(m.getContentLength());return g??p(v)};return async m=>{let{url:v,method:g,data:h,signal:_,cancelToken:y,timeout:b,onDownloadProgress:x,onUploadProgress:w,responseType:k,headers:$,withCredentials:T="same-origin",fetchOptions:A}=ph(m),z=e||fetch;k=k?(k+"").toLowerCase():"text";let M=WA([_,y&&y.toAbortSignal()],b),W=null,R=M&&M.unsubscribe&&(()=>{M.unsubscribe()}),te;try{if(w&&u&&g!=="get"&&g!=="head"&&(te=await f($,h))!==0){let I=new r(v,{method:"POST",body:h,duplex:"half"}),V;if(j.isFormData(h)&&(V=I.headers.get("content-type"))&&$.setContentType(V),I.body){let[C,S]=$c(te,xo(Ic(w)));h=Bw(I.body,HA,C,S)}}j.isString(T)||(T=T?"include":"omit");let G=o&&"credentials"in r.prototype,ye={...A,signal:M,method:g.toUpperCase(),headers:$.normalize().toJSON(),body:h,duplex:"half",credentials:G?T:void 0};W=o&&new r(v,ye);let De=await(o?z(W,A):z(v,ye)),de=l&&(k==="stream"||k==="response");if(l&&(x||de&&R)){let I={};["status","statusText","headers"].forEach(P=>{I[P]=De[P]});let V=j.toFiniteNumber(De.headers.get("content-length")),[C,S]=x&&$c(V,xo(Ic(x),!0))||[];De=new n(Bw(De.body,HA,C,()=>{S&&S(),R&&R()}),I)}k=k||"text";let F=await d[j.findKey(d,k)||"text"](De,m);return!de&&R&&R(),await new Promise((I,V)=>{Xi(I,V,{data:F,headers:ir.from(De.headers),status:De.status,statusText:De.statusText,config:m,request:W})})}catch(G){throw R&&R(),G&&G.name==="TypeError"&&/Load failed|fetch/i.test(G.message)?Object.assign(new ae("Network Error",ae.ERR_NETWORK,m,W,G&&G.response),{cause:G.cause||G}):ae.from(G,G&&G.code,m,W,G&&G.response)}}},OY=new Map,Kw=t=>{let e=t&&t.env||{},{fetch:r,Request:n,Response:i}=e,o=[n,i,r],a=o.length,s=a,c,u,l=OY;for(;s--;)c=o[s],u=l.get(c),u===void 0&&l.set(c,u=s?new Map:zY(e)),l=u;return u},Vje=Kw()});function CY(t,e){t=j.isArray(t)?t:[t];let{length:r}=t,n,i,o={};for(let a=0;a<r;a++){n=t[a];let s;if(i=n,!NY(n)&&(i=Hw[(s=String(n)).toLowerCase()],i===void 0))throw new ae(`Unknown adapter '${s}'`);if(i&&(j.isFunction(i)||(i=i.get(e))))break;o[s||"#"+a]=i}if(!i){let a=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build")),s=r?a.length>1?`since :
|
|
50
|
+
`+a.map(XA).join(`
|
|
51
|
+
`):" "+XA(a[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}var Hw,XA,NY,mh,Gw=E(()=>{Wt();UA();VA();JA();Un();Hw={http:AA,xhr:FA,fetch:{get:Kw}};j.forEach(Hw,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});XA=t=>`- ${t}`,NY=t=>j.isFunction(t)||t===null||t===!1;mh={getAdapter:CY,adapters:Hw}});function Qw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dn(null,t)}function hh(t){return Qw(t),t.headers=ir.from(t.headers),t.data=Hl.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),mh.getAdapter(t.adapter||bc.adapter,t)(t).then(function(n){return Qw(t),n.data=Hl.call(t,t.transformResponse,n),n.headers=ir.from(n.headers),n},function(n){return Gl(n)||(Qw(t),n&&n.response&&(n.response.data=Hl.call(t,t.transformResponse,n.response),n.response.headers=ir.from(n.response.headers))),Promise.reject(n)})}var eU=E(()=>{"use strict";ZR();fw();eh();Wa();Ji();Gw()});function RY(t,e,r){if(typeof t!="object")throw new ae("options must be an object",ae.ERR_BAD_OPTION_VALUE);let n=Object.keys(t),i=n.length;for(;i-- >0;){let o=n[i],a=e[o];if(a){let s=t[o],c=s===void 0||a(s,o,t);if(c!==!0)throw new ae("option "+o+" must be "+c,ae.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ae("Unknown option "+o,ae.ERR_BAD_OPTION)}}var gh,tU,rd,rU=E(()=>{"use strict";ch();Un();gh={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{gh[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});tU={};gh.transitional=function(e,r,n){function i(o,a){return"[Axios v"+Qa+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,s)=>{if(e===!1)throw new ae(i(a," has been removed"+(r?" in "+r:"")),ae.ERR_DEPRECATED);return r&&!tU[a]&&(tU[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,s):!0}};gh.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};rd={assertOptions:RY,validators:gh}});var ri,Ec,nd,nU=E(()=>{"use strict";Wt();Jm();PR();eU();dh();nh();rU();Ji();Bl();ri=rd.validators,Ec=class{constructor(e){this.defaults=e||{},this.interceptors={request:new iw,response:new iw}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;let o=(()=>{if(!i.stack)return"";let a=i.stack.indexOf(`
|
|
52
|
+
`);return a===-1?"":i.stack.slice(a+1)})();try{if(!n.stack)n.stack=o;else if(o){let a=o.indexOf(`
|
|
53
|
+
`),s=a===-1?-1:o.indexOf(`
|
|
54
|
+
`,a+1),c=s===-1?"":o.slice(s+1);String(n.stack).endsWith(c)||(n.stack+=`
|
|
55
|
+
`+o)}}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Ti(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&rd.assertOptions(n,{silentJSONParsing:ri.transitional(ri.boolean),forcedJSONParsing:ri.transitional(ri.boolean),clarifyTimeoutError:ri.transitional(ri.boolean),legacyInterceptorReqResOrdering:ri.transitional(ri.boolean)},!1),i!=null&&(j.isFunction(i)?r.paramsSerializer={serialize:i}:rd.assertOptions(i,{encode:ri.function,serialize:ri.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),rd.assertOptions(r,{baseUrl:ri.spelling("baseURL"),withXsrfToken:ri.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=o&&j.merge(o.common,o[r.method]);o&&j.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),r.headers=ir.concat(a,o);let s=[],c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(r)===!1)return;c=c&&v.synchronous;let g=r.transitional||ta;g&&g.legacyInterceptorReqResOrdering?s.unshift(v.fulfilled,v.rejected):s.push(v.fulfilled,v.rejected)});let u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let l,d=0,p;if(!c){let m=[hh.bind(this),void 0];for(m.unshift(...s),m.push(...u),p=m.length,l=Promise.resolve(r);d<p;)l=l.then(m[d++],m[d++]);return l}p=s.length;let f=r;for(;d<p;){let m=s[d++],v=s[d++];try{f=m(f)}catch(g){v.call(this,g);break}}try{l=hh.call(this,f)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(e){e=Ti(this.defaults,e);let r=Ba(e.baseURL,e.url,e.allowAbsoluteUrls);return Va(r,e.params,e.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(e){Ec.prototype[e]=function(r,n){return this.request(Ti(n||{},{method:e,url:r,data:(n||{}).data}))}});j.forEach(["post","put","patch"],function(e){function r(n){return function(o,a,s){return this.request(Ti(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Ec.prototype[e]=r(),Ec.prototype[e+"Form"]=r(!0)});nd=Ec});var Yw,iU,oU=E(()=>{"use strict";Wa();Yw=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});let n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o,a=new Promise(s=>{n.subscribe(s),o=s}).then(i);return a.cancel=function(){n.unsubscribe(o)},a},e(function(o,a,s){n.reason||(n.reason=new Dn(o,a,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new t(function(i){e=i}),cancel:e}}},iU=Yw});function Jw(t){return function(r){return t.apply(null,r)}}var aU=E(()=>{"use strict"});function Xw(t){return j.isObject(t)&&t.isAxiosError===!0}var sU=E(()=>{"use strict";Wt()});var e0,cU,uU=E(()=>{e0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(e0).forEach(([t,e])=>{e0[e]=t});cU=e0});function lU(t){let e=new nd(t),r=Ul(nd.prototype.request,e);return j.extend(r,nd.prototype,e,{allOwnKeys:!0}),j.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return lU(Ti(t,i))},r}var gr,vh,dU=E(()=>{"use strict";Wt();jx();nU();dh();eh();lw();Wa();oU();fw();ch();Wl();Un();aU();sU();Ji();Gw();uU();gr=lU(bc);gr.Axios=nd;gr.CanceledError=Dn;gr.CancelToken=iU;gr.isCancel=Gl;gr.VERSION=Qa;gr.toFormData=ea;gr.AxiosError=ae;gr.Cancel=gr.CanceledError;gr.all=function(e){return Promise.all(e)};gr.spread=Jw;gr.isAxiosError=Xw;gr.mergeConfig=Ti;gr.AxiosHeaders=ir;gr.formToJSON=t=>Xm(j.isHTMLForm(t)?new FormData(t):t);gr.getAdapter=mh.getAdapter;gr.HttpStatusCode=cU;gr.default=gr;vh=gr});var Z1e,L1e,F1e,V1e,W1e,B1e,K1e,H1e,G1e,Q1e,Y1e,J1e,X1e,eNe,tNe,rNe,pU=E(()=>{dU();({Axios:Z1e,AxiosError:L1e,CanceledError:F1e,isCancel:V1e,CancelToken:W1e,VERSION:B1e,all:K1e,Cancel:H1e,isAxiosError:G1e,spread:Q1e,toFormData:Y1e,AxiosHeaders:J1e,HttpStatusCode:X1e,formToJSON:eNe,getAdapter:tNe,mergeConfig:rNe}=vh)});function N(t,e,r){function n(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,c);let u=a.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let p=l[d];p in s||(s[p]=u[p].bind(s))}}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function a(s){var c;let u=r?.Parent?new o:this;n(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}function _r(t){return t&&Object.assign(yh,t),yh}var fU,eo,Ja,yh,Pc=E(()=>{fU=Object.freeze({status:"aborted"});eo=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ja=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},yh={}});var J={};Gi(J,{BIGINT_FORMAT_RANGES:()=>l0,Class:()=>r0,NUMBER_FORMAT_RANGES:()=>u0,aborted:()=>ca,allowsEval:()=>o0,assert:()=>qY,assertEqual:()=>AY,assertIs:()=>DY,assertNever:()=>MY,assertNotEqual:()=>UY,assignProp:()=>aa,base64ToUint8Array:()=>xU,base64urlToUint8Array:()=>YY,cached:()=>zc,captureStackTrace:()=>bh,cleanEnum:()=>QY,cleanRegex:()=>ad,clone:()=>rn,cloneDef:()=>LY,createTransparentProxy:()=>HY,defineLazy:()=>Ke,esc:()=>_h,escapeRegex:()=>ni,extend:()=>vU,finalizeIssue:()=>xn,floatSafeRemainder:()=>n0,getElementAtPath:()=>FY,getEnumValues:()=>od,getLengthableOrigin:()=>ud,getParsedType:()=>KY,getSizableOrigin:()=>cd,hexToUint8Array:()=>XY,isObject:()=>Xa,isPlainObject:()=>sa,issue:()=>Oc,joinValues:()=>ze,jsonStringifyReplacer:()=>Tc,merge:()=>GY,mergeDefs:()=>wo,normalizeParams:()=>ce,nullish:()=>oa,numKeys:()=>BY,objectClone:()=>ZY,omit:()=>gU,optionalKeys:()=>c0,parsedType:()=>Ne,partial:()=>_U,pick:()=>hU,prefixIssues:()=>Mn,primitiveTypes:()=>s0,promiseAllObject:()=>VY,propertyKeyTypes:()=>sd,randomString:()=>WY,required:()=>bU,safeExtend:()=>yU,shallowClone:()=>a0,slugify:()=>i0,stringifyPrimitive:()=>Oe,uint8ArrayToBase64:()=>wU,uint8ArrayToBase64url:()=>JY,uint8ArrayToHex:()=>eJ,unwrapMessage:()=>id});function AY(t){return t}function UY(t){return t}function DY(t){}function MY(t){throw new Error("Unexpected value in exhaustive check")}function qY(t){}function od(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function ze(t,e="|"){return t.map(r=>Oe(r)).join(e)}function Tc(t,e){return typeof e=="bigint"?e.toString():e}function zc(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function oa(t){return t==null}function ad(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function n0(t,e){let r=(t.toString().split(".")[1]||"").length,n=e.toString(),i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){let c=n.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}let o=r>i?r:i,a=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return a%s/10**o}function Ke(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==mU)return n===void 0&&(n=mU,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function ZY(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function aa(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function wo(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function LY(t){return wo(t._zod.def)}function FY(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function VY(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function WY(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function _h(t){return JSON.stringify(t)}function i0(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Xa(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function sa(t){if(Xa(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Xa(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function a0(t){return sa(t)?{...t}:Array.isArray(t)?[...t]:t}function BY(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function ni(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function rn(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function ce(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function HY(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function Oe(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function c0(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function hU(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=wo(t._zod.def,{get shape(){let a={};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(a[s]=r.shape[s])}return aa(this,"shape",a),a},checks:[]});return rn(t,o)}function gU(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=wo(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete a[s]}return aa(this,"shape",a),a},checks:[]});return rn(t,o)}function vU(t,e){if(!sa(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let a in e)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=wo(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return aa(this,"shape",o),o}});return rn(t,i)}function yU(t,e){if(!sa(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=wo(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return aa(this,"shape",n),n}});return rn(t,r)}function GY(t,e){let r=wo(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return aa(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:[]});return rn(t,r)}function _U(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=wo(e._zod.def,{get shape(){let s=e._zod.def.shape,c={...s};if(r)for(let u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=t?new t({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=t?new t({type:"optional",innerType:s[u]}):s[u];return aa(this,"shape",c),c},checks:[]});return rn(e,a)}function bU(t,e,r){let n=wo(e._zod.def,{get shape(){let i=e._zod.def.shape,o={...i};if(r)for(let a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new t({type:"nonoptional",innerType:i[a]}))}else for(let a in i)o[a]=new t({type:"nonoptional",innerType:i[a]});return aa(this,"shape",o),o}});return rn(e,n)}function ca(t,e=0){if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function Mn(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function id(t){return typeof t=="string"?t:t?.message}function xn(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=id(t.inst?._zod.def?.error?.(t))??id(e?.error?.(t))??id(r.customError?.(t))??id(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function cd(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function ud(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ne(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function Oc(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function QY(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function xU(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function wU(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function YY(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return xU(e+r)}function JY(t){return wU(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function XY(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function eJ(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var mU,bh,o0,KY,sd,s0,u0,l0,r0,we=E(()=>{mU=Symbol("evaluating");bh="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};o0=zc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});KY=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},sd=new Set(["string","number","symbol"]),s0=new Set(["string","number","bigint","boolean","symbol","undefined"]);u0={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},l0={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};r0=class{constructor(...e){}}});function wh(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function kh(t,e=r=>r.message){let r={_errors:[]},n=i=>{for(let o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>n({issues:a}));else if(o.code==="invalid_key")n({issues:o.issues});else if(o.code==="invalid_element")n({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let a=r,s=0;for(;s<o.path.length;){let c=o.path[s];s===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(e(o))):a[c]=a[c]||{_errors:[]},a=a[c],s++}}};return n(t),r}var kU,xh,ld,d0=E(()=>{Pc();we();kU=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Tc,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},xh=N("$ZodError",kU),ld=N("$ZodError",kU,{Parent:Error})});var dd,pd,fd,md,hd,jc,gd,vd,SU,$U,IU,EU,PU,TU,zU,OU,p0=E(()=>{Pc();d0();we();dd=t=>(e,r,n,i)=>{let o=n?Object.assign(n,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new eo;if(a.issues.length){let s=new(i?.Err??t)(a.issues.map(c=>xn(c,o,_r())));throw bh(s,i?.callee),s}return a.value},pd=dd(ld),fd=t=>async(e,r,n,i)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(i?.Err??t)(a.issues.map(c=>xn(c,o,_r())));throw bh(s,i?.callee),s}return a.value},md=fd(ld),hd=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new eo;return o.issues.length?{success:!1,error:new(t??xh)(o.issues.map(a=>xn(a,i,_r())))}:{success:!0,data:o.value}},jc=hd(ld),gd=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(a=>xn(a,i,_r())))}:{success:!0,data:o.value}},vd=gd(ld),SU=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return dd(t)(e,r,i)},$U=t=>(e,r,n)=>dd(t)(e,r,n),IU=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return fd(t)(e,r,i)},EU=t=>async(e,r,n)=>fd(t)(e,r,n),PU=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return hd(t)(e,r,i)},TU=t=>(e,r,n)=>hd(t)(e,r,n),zU=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return gd(t)(e,r,i)},OU=t=>async(e,r,n)=>gd(t)(e,r,n)});var ii={};Gi(ii,{base64:()=>P0,base64url:()=>Sh,bigint:()=>C0,boolean:()=>A0,browserEmail:()=>uJ,cidrv4:()=>I0,cidrv6:()=>E0,cuid:()=>f0,cuid2:()=>m0,date:()=>z0,datetime:()=>j0,domain:()=>pJ,duration:()=>_0,e164:()=>T0,email:()=>x0,emoji:()=>w0,extendedDuration:()=>rJ,guid:()=>b0,hex:()=>fJ,hostname:()=>dJ,html5Email:()=>aJ,idnEmail:()=>cJ,integer:()=>R0,ipv4:()=>k0,ipv6:()=>S0,ksuid:()=>v0,lowercase:()=>M0,mac:()=>$0,md5_base64:()=>hJ,md5_base64url:()=>gJ,md5_hex:()=>mJ,nanoid:()=>y0,null:()=>U0,number:()=>$h,rfc5322Email:()=>sJ,sha1_base64:()=>yJ,sha1_base64url:()=>_J,sha1_hex:()=>vJ,sha256_base64:()=>xJ,sha256_base64url:()=>wJ,sha256_hex:()=>bJ,sha384_base64:()=>SJ,sha384_base64url:()=>$J,sha384_hex:()=>kJ,sha512_base64:()=>EJ,sha512_base64url:()=>PJ,sha512_hex:()=>IJ,string:()=>N0,time:()=>O0,ulid:()=>h0,undefined:()=>D0,unicodeEmail:()=>jU,uppercase:()=>q0,uuid:()=>es,uuid4:()=>nJ,uuid6:()=>iJ,uuid7:()=>oJ,xid:()=>g0});function w0(){return new RegExp(lJ,"u")}function CU(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function O0(t){return new RegExp(`^${CU(t)}$`)}function j0(t){let e=CU({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${NU}T(?:${n})$`)}function yd(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function _d(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var f0,m0,h0,g0,v0,y0,_0,rJ,b0,es,nJ,iJ,oJ,x0,aJ,sJ,jU,cJ,uJ,lJ,k0,S0,$0,I0,E0,P0,Sh,dJ,pJ,T0,NU,z0,N0,C0,R0,$h,A0,U0,D0,M0,q0,fJ,mJ,hJ,gJ,vJ,yJ,_J,bJ,xJ,wJ,kJ,SJ,$J,IJ,EJ,PJ,Ih=E(()=>{we();f0=/^[cC][^\s-]{8,}$/,m0=/^[0-9a-z]+$/,h0=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,g0=/^[0-9a-vA-V]{20}$/,v0=/^[A-Za-z0-9]{27}$/,y0=/^[a-zA-Z0-9_-]{21}$/,_0=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rJ=/^[-+]?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)?)??$/,b0=/^([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})$/,es=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,nJ=es(4),iJ=es(6),oJ=es(7),x0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,aJ=/^[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])?)*$/,sJ=/^(([^<>()\[\]\\.,;:\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,}))$/,jU=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,cJ=jU,uJ=/^[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])?)*$/,lJ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";k0=/^(?:(?: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])$/,S0=/^(([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}|:))$/,$0=t=>{let e=ni(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},I0=/^((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])$/,E0=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,P0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Sh=/^[A-Za-z0-9_-]*$/,dJ=/^(?=.{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])?)*\.?$/,pJ=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,T0=/^\+[1-9]\d{6,14}$/,NU="(?:(?:\\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])))",z0=new RegExp(`^${NU}$`);N0=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},C0=/^-?\d+n?$/,R0=/^-?\d+$/,$h=/^-?\d+(?:\.\d+)?$/,A0=/^(?:true|false)$/i,U0=/^null$/i,D0=/^undefined$/i,M0=/^[^A-Z]*$/,q0=/^[^a-z]*$/,fJ=/^[0-9a-fA-F]*$/;mJ=/^[0-9a-fA-F]{32}$/,hJ=yd(22,"=="),gJ=_d(22),vJ=/^[0-9a-fA-F]{40}$/,yJ=yd(27,"="),_J=_d(27),bJ=/^[0-9a-fA-F]{64}$/,xJ=yd(43,"="),wJ=_d(43),kJ=/^[0-9a-fA-F]{96}$/,SJ=yd(64,""),$J=_d(64),IJ=/^[0-9a-fA-F]{128}$/,EJ=yd(86,"=="),PJ=_d(86)});function RU(t,e,r){t.issues.length&&e.issues.push(...Mn(r,t.issues))}var Ut,AU,Z0,L0,UU,DU,MU,qU,ZU,LU,FU,VU,WU,bd,BU,KU,HU,GU,QU,YU,JU,XU,e4,Eh=E(()=>{Pc();Ih();we();Ut=N("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),AU={number:"number",bigint:"bigint",object:"date"},Z0=N("$ZodCheckLessThan",(t,e)=>{Ut.init(t,e);let r=AU[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),L0=N("$ZodCheckGreaterThan",(t,e)=>{Ut.init(t,e);let r=AU[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),UU=N("$ZodCheckMultipleOf",(t,e)=>{Ut.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):n0(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),DU=N("$ZodCheckNumberFormat",(t,e)=>{Ut.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,o]=u0[e.format];t._zod.onattach.push(a=>{let s=a._zod.bag;s.format=e.format,s.minimum=i,s.maximum=o,r&&(s.pattern=R0)}),t._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),MU=N("$ZodCheckBigIntFormat",(t,e)=>{Ut.init(t,e);let[r,n]=l0[e.format];t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,o.minimum=r,o.maximum=n}),t._zod.check=i=>{let o=i.value;o<r&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>n&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}}),qU=N("$ZodCheckMaxSize",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!oa(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;i.size<=e.maximum||n.issues.push({origin:cd(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),ZU=N("$ZodCheckMinSize",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!oa(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;i.size>=e.minimum||n.issues.push({origin:cd(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),LU=N("$ZodCheckSizeEquals",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!oa(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.size,i.maximum=e.size,i.size=e.size}),t._zod.check=n=>{let i=n.value,o=i.size;if(o===e.size)return;let a=o>e.size;n.issues.push({origin:cd(i),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),FU=N("$ZodCheckMaxLength",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;if(i.length<=e.maximum)return;let a=ud(i);n.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),VU=N("$ZodCheckMinLength",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let a=ud(i);n.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),WU=N("$ZodCheckLengthEquals",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{let i=n.value,o=i.length;if(o===e.length)return;let a=ud(i),s=o>e.length;n.issues.push({origin:a,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),bd=N("$ZodCheckStringFormat",(t,e)=>{var r,n;Ut.init(t,e),t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),BU=N("$ZodCheckRegex",(t,e)=>{bd.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),KU=N("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=M0),bd.init(t,e)}),HU=N("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=q0),bd.init(t,e)}),GU=N("$ZodCheckIncludes",(t,e)=>{Ut.init(t,e);let r=ni(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),QU=N("$ZodCheckStartsWith",(t,e)=>{Ut.init(t,e);let r=new RegExp(`^${ni(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),YU=N("$ZodCheckEndsWith",(t,e)=>{Ut.init(t,e);let r=new RegExp(`.*${ni(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});JU=N("$ZodCheckProperty",(t,e)=>{Ut.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>RU(i,r,e.property));RU(n,r,e.property)}}),XU=N("$ZodCheckMimeType",(t,e)=>{Ut.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}}),e4=N("$ZodCheckOverwrite",(t,e)=>{Ut.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var Ph,F0=E(()=>{Ph=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
|
|
56
|
+
`).filter(a=>a),i=Math.min(...n.map(a=>a.length-a.trimStart().length)),o=n.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let e=Function,r=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new e(...r,i.join(`
|
|
57
|
+
`))}}});var r4,V0=E(()=>{r4={major:4,minor:3,patch:6}});function m4(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function TJ(t){if(!Sh.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return m4(r)}function zJ(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}function n4(t,e,r){t.issues.length&&e.issues.push(...Mn(r,t.issues)),e.value[r]=t.value}function Nh(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...Mn(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function h4(t){let e=Object.keys(t.shape);for(let n of e)if(!t.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=c0(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function g4(t,e,r,n,i,o){let a=[],s=i.keySet,c=i.catchall._zod,u=c.def.type,l=c.optout==="optional";for(let d in e){if(s.has(d))continue;if(u==="never"){a.push(d);continue}let p=c.run({value:e[d],issues:[]},n);p instanceof Promise?t.push(p.then(f=>Nh(f,r,d,e,l))):Nh(p,r,d,e,l)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}function i4(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let i=t.filter(o=>!ca(o));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(a=>xn(a,n,_r())))}),e)}function o4(t,e,r,n){let i=t.filter(o=>o.issues.length===0);return i.length===1?(e.value=i[0].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(a=>xn(a,n,_r())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}function W0(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(sa(t)&&sa(e)){let r=Object.keys(e),n=Object.keys(t).filter(o=>r.indexOf(o)!==-1),i={...t,...e};for(let o of n){let a=W0(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[n],a=W0(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function a4(t,e,r){let n=new Map,i;for(let s of e.issues)if(s.code==="unrecognized_keys"){i??(i=s);for(let c of s.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else t.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else t.issues.push(s);let o=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&i&&t.issues.push({...i,keys:o}),ca(t))return t;let a=W0(e.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return t.value=a.data,t}function Th(t,e,r){t.issues.length&&e.issues.push(...Mn(r,t.issues)),e.value[r]=t.value}function s4(t,e,r,n,i,o,a){t.issues.length&&(sd.has(typeof n)?r.issues.push(...Mn(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:t.issues.map(s=>xn(s,a,_r()))})),e.issues.length&&(sd.has(typeof n)?r.issues.push(...Mn(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:e.issues.map(s=>xn(s,a,_r()))})),r.value.set(t.value,e.value)}function c4(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function u4(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}function l4(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function d4(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function zh(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}function Oh(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(o=>jh(t,o,e.out,r)):jh(t,i,e.out,r)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(o=>jh(t,o,e.in,r)):jh(t,i,e.in,r)}}function jh(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}function p4(t){return t.value=Object.freeze(t.value),t}function f4(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(Oc(i))}}var Ze,ts,jt,B0,K0,H0,G0,Q0,Y0,J0,X0,ek,tk,rk,nk,ik,ok,ak,sk,ck,uk,lk,dk,pk,fk,mk,hk,gk,Ch,vk,xd,Rh,yk,_k,bk,xk,wk,kk,Sk,$k,Ik,Ek,v4,y4,wd,Pk,Tk,zk,Ah,Ok,jk,Nk,Ck,Rk,Ak,Uk,Uh,Dk,Mk,qk,Zk,Lk,Fk,Vk,Wk,Bk,kd,Kk,Hk,Gk,Qk,Yk,Jk,Xk=E(()=>{Eh();Pc();F0();p0();Ih();we();V0();we();Ze=N("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=r4;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let o of i._zod.onattach)o(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(a,s,c)=>{let u=ca(a),l;for(let d of s){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(u)continue;let p=a.issues.length,f=d._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new eo;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,a.issues.length!==p&&(u||(u=ca(a,p)))});else{if(a.issues.length===p)continue;u||(u=ca(a,p))}}return l?l.then(()=>a):a},o=(a,s,c)=>{if(ca(a))return a.aborted=!0,a;let u=i(s,n,c);if(u instanceof Promise){if(c.async===!1)throw new eo;return u.then(l=>t._zod.parse(l,c))}return t._zod.parse(u,c)};t._zod.run=(a,s)=>{if(s.skipChecks)return t._zod.parse(a,s);if(s.direction==="backward"){let u=t._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>o(l,a,s)):o(u,a,s)}let c=t._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new eo;return c.then(u=>i(u,n,s))}return i(c,n,s)}}Ke(t,"~standard",()=>({validate:i=>{try{let o=jc(t,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return vd(t,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),ts=N("$ZodString",(t,e)=>{Ze.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??N0(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),jt=N("$ZodStringFormat",(t,e)=>{bd.init(t,e),ts.init(t,e)}),B0=N("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=b0),jt.init(t,e)}),K0=N("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=es(n))}else e.pattern??(e.pattern=es());jt.init(t,e)}),H0=N("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=x0),jt.init(t,e)}),G0=N("$ZodURL",(t,e)=>{jt.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Q0=N("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=w0()),jt.init(t,e)}),Y0=N("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=y0),jt.init(t,e)}),J0=N("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=f0),jt.init(t,e)}),X0=N("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=m0),jt.init(t,e)}),ek=N("$ZodULID",(t,e)=>{e.pattern??(e.pattern=h0),jt.init(t,e)}),tk=N("$ZodXID",(t,e)=>{e.pattern??(e.pattern=g0),jt.init(t,e)}),rk=N("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=v0),jt.init(t,e)}),nk=N("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=j0(e)),jt.init(t,e)}),ik=N("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=z0),jt.init(t,e)}),ok=N("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=O0(e)),jt.init(t,e)}),ak=N("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=_0),jt.init(t,e)}),sk=N("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=k0),jt.init(t,e),t._zod.bag.format="ipv4"}),ck=N("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=S0),jt.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),uk=N("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=$0(e.delimiter)),jt.init(t,e),t._zod.bag.format="mac"}),lk=N("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=I0),jt.init(t,e)}),dk=N("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=E0),jt.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,o]=n;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});pk=N("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=P0),jt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{m4(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});fk=N("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Sh),jt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{TJ(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),mk=N("$ZodE164",(t,e)=>{e.pattern??(e.pattern=T0),jt.init(t,e)});hk=N("$ZodJWT",(t,e)=>{jt.init(t,e),t._zod.check=r=>{zJ(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),gk=N("$ZodCustomStringFormat",(t,e)=>{jt.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),Ch=N("$ZodNumber",(t,e)=>{Ze.init(t,e),t._zod.pattern=t._zod.bag.pattern??$h,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),r}}),vk=N("$ZodNumberFormat",(t,e)=>{DU.init(t,e),Ch.init(t,e)}),xd=N("$ZodBoolean",(t,e)=>{Ze.init(t,e),t._zod.pattern=A0,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),Rh=N("$ZodBigInt",(t,e)=>{Ze.init(t,e),t._zod.pattern=C0,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),yk=N("$ZodBigIntFormat",(t,e)=>{MU.init(t,e),Rh.init(t,e)}),_k=N("$ZodSymbol",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),bk=N("$ZodUndefined",(t,e)=>{Ze.init(t,e),t._zod.pattern=D0,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),xk=N("$ZodNull",(t,e)=>{Ze.init(t,e),t._zod.pattern=U0,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),wk=N("$ZodAny",(t,e)=>{Ze.init(t,e),t._zod.parse=r=>r}),kk=N("$ZodUnknown",(t,e)=>{Ze.init(t,e),t._zod.parse=r=>r}),Sk=N("$ZodNever",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),$k=N("$ZodVoid",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),Ik=N("$ZodDate",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),r}});Ek=N("$ZodArray",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let o=[];for(let a=0;a<i.length;a++){let s=i[a],c=e.element._zod.run({value:s,issues:[]},n);c instanceof Promise?o.push(c.then(u=>n4(u,r,a))):n4(c,r,a)}return o.length?Promise.all(o).then(()=>r):r}});v4=N("$ZodObject",(t,e)=>{if(Ze.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let c={...s};return Object.defineProperty(e,"shape",{value:c}),c}})}let n=zc(()=>h4(e));Ke(t._zod,"propValues",()=>{let s=e.shape,c={};for(let u in s){let l=s[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d)}}return c});let i=Xa,o=e.catchall,a;t._zod.parse=(s,c)=>{a??(a=n.value);let u=s.value;if(!i(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),s;s.value={};let l=[],d=a.shape;for(let p of a.keys){let f=d[p],m=f._zod.optout==="optional",v=f._zod.run({value:u[p],issues:[]},c);v instanceof Promise?l.push(v.then(g=>Nh(g,s,p,u,m))):Nh(v,s,p,u,m)}return o?g4(l,u,s,c,n.value,t):l.length?Promise.all(l).then(()=>s):s}}),y4=N("$ZodObjectJIT",(t,e)=>{v4.init(t,e);let r=t._zod.parse,n=zc(()=>h4(e)),i=p=>{let f=new Ph(["shape","payload","ctx"]),m=n.value,v=y=>{let b=_h(y);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};f.write("const input = payload.value;");let g=Object.create(null),h=0;for(let y of m.keys)g[y]=`key_${h++}`;f.write("const newResult = {};");for(let y of m.keys){let b=g[y],x=_h(y),k=p[y]?._zod?.optout==="optional";f.write(`const ${b} = ${v(y)};`),k?f.write(`
|
|
58
|
+
if (${b}.issues.length) {
|
|
59
|
+
if (${x} in input) {
|
|
60
|
+
payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
|
|
61
|
+
...iss,
|
|
62
|
+
path: iss.path ? [${x}, ...iss.path] : [${x}]
|
|
63
|
+
})));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (${b}.value === undefined) {
|
|
68
|
+
if (${x} in input) {
|
|
69
|
+
newResult[${x}] = undefined;
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
newResult[${x}] = ${b}.value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
`):f.write(`
|
|
76
|
+
if (${b}.issues.length) {
|
|
77
|
+
payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
|
|
78
|
+
...iss,
|
|
79
|
+
path: iss.path ? [${x}, ...iss.path] : [${x}]
|
|
80
|
+
})));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (${b}.value === undefined) {
|
|
84
|
+
if (${x} in input) {
|
|
85
|
+
newResult[${x}] = undefined;
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
newResult[${x}] = ${b}.value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");let _=f.compile();return(y,b)=>_(p,y,b)},o,a=Xa,s=!yh.jitless,u=s&&o0.value,l=e.catchall,d;t._zod.parse=(p,f)=>{d??(d=n.value);let m=p.value;return a(m)?s&&u&&f?.async===!1&&f.jitless!==!0?(o||(o=i(e.shape)),p=o(p,f),l?g4([],m,p,f,d,t):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),p)}});wd=N("$ZodUnion",(t,e)=>{Ze.init(t,e),Ke(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ke(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ke(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),Ke(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>ad(o.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,o)=>{if(r)return n(i,o);let a=!1,s=[];for(let c of e.options){let u=c._zod.run({value:i.value,issues:[]},o);if(u instanceof Promise)s.push(u),a=!0;else{if(u.issues.length===0)return u;s.push(u)}}return a?Promise.all(s).then(c=>i4(c,i,t,o)):i4(s,i,t,o)}});Pk=N("$ZodXor",(t,e)=>{wd.init(t,e),e.inclusive=!1;let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,o)=>{if(r)return n(i,o);let a=!1,s=[];for(let c of e.options){let u=c._zod.run({value:i.value,issues:[]},o);u instanceof Promise?(s.push(u),a=!0):s.push(u)}return a?Promise.all(s).then(c=>o4(c,i,t,o)):o4(s,i,t,o)}}),Tk=N("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,wd.init(t,e);let r=t._zod.parse;Ke(t._zod,"propValues",()=>{let i={};for(let o of e.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[s,c]of Object.entries(a)){i[s]||(i[s]=new Set);for(let u of c)i[s].add(u)}}return i});let n=zc(()=>{let i=e.options,o=new Map;for(let a of i){let s=a._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});t._zod.parse=(i,o)=>{let a=i.value;if(!Xa(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),i;let s=n.value.get(a?.[e.discriminator]);return s?s._zod.run(i,o):e.unionFallback?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:a,path:[e.discriminator],inst:t}),i)}}),zk=N("$ZodIntersection",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,o=e.left._zod.run({value:i,issues:[]},n),a=e.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,u])=>a4(r,c,u)):a4(r,o,a)}});Ah=N("$ZodTuple",(t,e)=>{Ze.init(t,e);let r=e.items;t._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[],s=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),c=s===-1?0:r.length-s;if(!e.rest){let l=o.length>r.length,d=o.length<c-1;if(l||d)return n.issues.push({...l?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:t,origin:"array"}),n}let u=-1;for(let l of r){if(u++,u>=o.length&&u>=c)continue;let d=l._zod.run({value:o[u],issues:[]},i);d instanceof Promise?a.push(d.then(p=>Th(p,n,u))):Th(d,n,u)}if(e.rest){let l=o.slice(r.length);for(let d of l){u++;let p=e.rest._zod.run({value:d,issues:[]},i);p instanceof Promise?a.push(p.then(f=>Th(f,n,u))):Th(p,n,u)}}return a.length?Promise.all(a).then(()=>n):n}});Ok=N("$ZodRecord",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!sa(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let o=[],a=e.keyType._zod.values;if(a){r.value={};let s=new Set;for(let u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let l=e.valueType._zod.run({value:i[u],issues:[]},n);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...Mn(u,d.issues)),r.value[u]=d.value})):(l.issues.length&&r.issues.push(...Mn(u,l.issues)),r.value[u]=l.value)}let c;for(let u in i)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(i)){if(s==="__proto__")continue;let c=e.keyType._zod.run({value:s,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&$h.test(s)&&c.issues.length){let d=e.keyType._zod.run({value:Number(s),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){e.mode==="loose"?r.value[s]=i[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>xn(d,n,_r())),input:s,path:[s],inst:t});continue}let l=e.valueType._zod.run({value:i[s],issues:[]},n);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...Mn(s,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...Mn(s,l.issues)),r.value[c.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),jk=N("$ZodMap",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let o=[];r.value=new Map;for(let[a,s]of i){let c=e.keyType._zod.run({value:a,issues:[]},n),u=e.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([l,d])=>{s4(l,d,r,a,i,t,n)})):s4(c,u,r,a,i,t,n)}return o.length?Promise.all(o).then(()=>r):r}});Nk=N("$ZodSet",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let a of i){let s=e.valueType._zod.run({value:a,issues:[]},n);s instanceof Promise?o.push(s.then(c=>c4(c,r))):c4(s,r)}return o.length?Promise.all(o).then(()=>r):r}});Ck=N("$ZodEnum",(t,e)=>{Ze.init(t,e);let r=od(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>sd.has(typeof i)).map(i=>typeof i=="string"?ni(i):i.toString()).join("|")})$`),t._zod.parse=(i,o)=>{let a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:t}),i}}),Rk=N("$ZodLiteral",(t,e)=>{if(Ze.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?ni(n):n?ni(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),n}}),Ak=N("$ZodFile",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}}),Uk=N("$ZodTransform",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ja(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r));if(i instanceof Promise)throw new eo;return r.value=i,r}});Uh=N("$ZodOptional",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Ke(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Ke(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${ad(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>u4(o,r.value)):u4(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),Dk=N("$ZodExactOptional",(t,e)=>{Uh.init(t,e),Ke(t._zod,"values",()=>e.innerType._zod.values),Ke(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),Mk=N("$ZodNullable",(t,e)=>{Ze.init(t,e),Ke(t._zod,"optin",()=>e.innerType._zod.optin),Ke(t._zod,"optout",()=>e.innerType._zod.optout),Ke(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${ad(r.source)}|null)$`):void 0}),Ke(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),qk=N("$ZodDefault",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",Ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>l4(o,e)):l4(i,e)}});Zk=N("$ZodPrefault",(t,e)=>{Ze.init(t,e),t._zod.optin="optional",Ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),Lk=N("$ZodNonOptional",(t,e)=>{Ze.init(t,e),Ke(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>d4(o,t)):d4(i,t)}});Fk=N("$ZodSuccess",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ja("ZodSuccess");let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),Vk=N("$ZodCatch",(t,e)=>{Ze.init(t,e),Ke(t._zod,"optin",()=>e.innerType._zod.optin),Ke(t._zod,"optout",()=>e.innerType._zod.optout),Ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(a=>xn(a,n,_r()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(o=>xn(o,n,_r()))},input:r.value}),r.issues=[]),r)}}),Wk=N("$ZodNaN",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),Bk=N("$ZodPipe",(t,e)=>{Ze.init(t,e),Ke(t._zod,"values",()=>e.in._zod.values),Ke(t._zod,"optin",()=>e.in._zod.optin),Ke(t._zod,"optout",()=>e.out._zod.optout),Ke(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(a=>zh(a,e.in,n)):zh(o,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(o=>zh(o,e.out,n)):zh(i,e.out,n)}});kd=N("$ZodCodec",(t,e)=>{Ze.init(t,e),Ke(t._zod,"values",()=>e.in._zod.values),Ke(t._zod,"optin",()=>e.in._zod.optin),Ke(t._zod,"optout",()=>e.out._zod.optout),Ke(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(a=>Oh(a,e,n)):Oh(o,e,n)}else{let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(a=>Oh(a,e,n)):Oh(o,e,n)}}});Kk=N("$ZodReadonly",(t,e)=>{Ze.init(t,e),Ke(t._zod,"propValues",()=>e.innerType._zod.propValues),Ke(t._zod,"values",()=>e.innerType._zod.values),Ke(t._zod,"optin",()=>e.innerType?._zod?.optin),Ke(t._zod,"optout",()=>e.innerType?._zod?.optout),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(p4):p4(i)}});Hk=N("$ZodTemplateLiteral",(t,e)=>{Ze.init(t,e);let r=[];for(let n of e.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,a))}else if(n===null||s0.has(typeof n))r.push(ni(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"string",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),n)}),Gk=N("$ZodFunction",(t,e)=>(Ze.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=t._def.input?pd(t._def.input,n):n,o=Reflect.apply(r,this,i);return t._def.output?pd(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=t._def.input?await md(t._def.input,n):n,o=await Reflect.apply(r,this,i);return t._def.output?await md(t._def.output,o):o}},t._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let n=t.constructor;return Array.isArray(r[0])?new n({type:"function",input:new Ah({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new n({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let n=t.constructor;return new n({type:"function",input:t._def.input,output:r})},t)),Qk=N("$ZodPromise",(t,e)=>{Ze.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),Yk=N("$ZodLazy",(t,e)=>{Ze.init(t,e),Ke(t._zod,"innerType",()=>e.getter()),Ke(t._zod,"pattern",()=>t._zod.innerType?._zod?.pattern),Ke(t._zod,"propValues",()=>t._zod.innerType?._zod?.propValues),Ke(t._zod,"optin",()=>t._zod.innerType?._zod?.optin??void 0),Ke(t._zod,"optout",()=>t._zod.innerType?._zod?.optout??void 0),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),Jk=N("$ZodCustom",(t,e)=>{Ut.init(t,e),Ze.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(o=>f4(o,r,n,t));f4(i,r,n,t)}})});var _4=E(()=>{we()});var b4=E(()=>{we()});var x4=E(()=>{we()});var w4=E(()=>{we()});var k4=E(()=>{we()});var S4=E(()=>{we()});var $4=E(()=>{we()});var I4=E(()=>{we()});function eS(){return{localeError:jJ()}}var jJ,tS=E(()=>{we();jJ=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(i){return t[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,a=Ne(i.input),s=n[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${Oe(i.values[0])}`:`Invalid option: expected one of ${ze(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${ze(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}}});var E4=E(()=>{we()});var P4=E(()=>{we()});var T4=E(()=>{we()});var z4=E(()=>{we()});var O4=E(()=>{we()});var j4=E(()=>{we()});var N4=E(()=>{we()});var C4=E(()=>{we()});var R4=E(()=>{we()});var A4=E(()=>{we()});var U4=E(()=>{we()});var D4=E(()=>{we()});var M4=E(()=>{we()});var q4=E(()=>{we()});var rS=E(()=>{we()});var Z4=E(()=>{rS()});var L4=E(()=>{we()});var F4=E(()=>{we()});var V4=E(()=>{we()});var W4=E(()=>{we()});var B4=E(()=>{we()});var K4=E(()=>{we()});var H4=E(()=>{we()});var G4=E(()=>{we()});var Q4=E(()=>{we()});var Y4=E(()=>{we()});var J4=E(()=>{we()});var X4=E(()=>{we()});var eD=E(()=>{we()});var tD=E(()=>{we()});var rD=E(()=>{we()});var nD=E(()=>{we()});var nS=E(()=>{we()});var iD=E(()=>{nS()});var oD=E(()=>{we()});var aD=E(()=>{we()});var sD=E(()=>{we()});var cD=E(()=>{we()});var uD=E(()=>{we()});var lD=E(()=>{we()});var Dh=E(()=>{_4();b4();x4();w4();k4();S4();$4();I4();tS();E4();P4();T4();z4();O4();j4();N4();C4();R4();A4();U4();D4();M4();q4();Z4();rS();L4();F4();V4();W4();B4();K4();H4();G4();Q4();Y4();J4();X4();eD();tD();rD();nD();iD();nS();oD();aD();sD();cD();uD();lD()});function aS(){return new oS}var dD,oS,nn,Sd=E(()=>{oS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};(dD=globalThis).__zod_globalRegistry??(dD.__zod_globalRegistry=aS());nn=globalThis.__zod_globalRegistry});function sS(t,e){return new t({type:"string",...ce(e)})}function Mh(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ce(e)})}function $d(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ce(e)})}function qh(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ce(e)})}function Zh(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ce(e)})}function Lh(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ce(e)})}function Fh(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ce(e)})}function Id(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ce(e)})}function Vh(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ce(e)})}function Wh(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ce(e)})}function Bh(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ce(e)})}function Kh(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ce(e)})}function Hh(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ce(e)})}function Gh(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ce(e)})}function Qh(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ce(e)})}function Yh(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ce(e)})}function Jh(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ce(e)})}function cS(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...ce(e)})}function Xh(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ce(e)})}function eg(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ce(e)})}function tg(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ce(e)})}function rg(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ce(e)})}function ng(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ce(e)})}function ig(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ce(e)})}function uS(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ce(e)})}function lS(t,e){return new t({type:"string",format:"date",check:"string_format",...ce(e)})}function dS(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ce(e)})}function pS(t,e){return new t({type:"string",format:"duration",check:"string_format",...ce(e)})}function fS(t,e){return new t({type:"number",checks:[],...ce(e)})}function mS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ce(e)})}function hS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...ce(e)})}function gS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...ce(e)})}function vS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...ce(e)})}function yS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...ce(e)})}function _S(t,e){return new t({type:"boolean",...ce(e)})}function bS(t,e){return new t({type:"bigint",...ce(e)})}function xS(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ce(e)})}function wS(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ce(e)})}function kS(t,e){return new t({type:"symbol",...ce(e)})}function SS(t,e){return new t({type:"undefined",...ce(e)})}function $S(t,e){return new t({type:"null",...ce(e)})}function IS(t){return new t({type:"any"})}function ES(t){return new t({type:"unknown"})}function PS(t,e){return new t({type:"never",...ce(e)})}function TS(t,e){return new t({type:"void",...ce(e)})}function zS(t,e){return new t({type:"date",...ce(e)})}function OS(t,e){return new t({type:"nan",...ce(e)})}function ko(t,e){return new Z0({check:"less_than",...ce(e),value:t,inclusive:!1})}function qn(t,e){return new Z0({check:"less_than",...ce(e),value:t,inclusive:!0})}function So(t,e){return new L0({check:"greater_than",...ce(e),value:t,inclusive:!1})}function on(t,e){return new L0({check:"greater_than",...ce(e),value:t,inclusive:!0})}function jS(t){return So(0,t)}function NS(t){return ko(0,t)}function CS(t){return qn(0,t)}function RS(t){return on(0,t)}function rs(t,e){return new UU({check:"multiple_of",...ce(e),value:t})}function ns(t,e){return new qU({check:"max_size",...ce(e),maximum:t})}function $o(t,e){return new ZU({check:"min_size",...ce(e),minimum:t})}function Nc(t,e){return new LU({check:"size_equals",...ce(e),size:t})}function Cc(t,e){return new FU({check:"max_length",...ce(e),maximum:t})}function ua(t,e){return new VU({check:"min_length",...ce(e),minimum:t})}function Rc(t,e){return new WU({check:"length_equals",...ce(e),length:t})}function Ed(t,e){return new BU({check:"string_format",format:"regex",...ce(e),pattern:t})}function Pd(t){return new KU({check:"string_format",format:"lowercase",...ce(t)})}function Td(t){return new HU({check:"string_format",format:"uppercase",...ce(t)})}function zd(t,e){return new GU({check:"string_format",format:"includes",...ce(e),includes:t})}function Od(t,e){return new QU({check:"string_format",format:"starts_with",...ce(e),prefix:t})}function jd(t,e){return new YU({check:"string_format",format:"ends_with",...ce(e),suffix:t})}function AS(t,e,r){return new JU({check:"property",property:t,schema:e,...ce(r)})}function Nd(t,e){return new XU({check:"mime_type",mime:t,...ce(e)})}function to(t){return new e4({check:"overwrite",tx:t})}function Cd(t){return to(e=>e.normalize(t))}function Rd(){return to(t=>t.trim())}function Ad(){return to(t=>t.toLowerCase())}function Ud(){return to(t=>t.toUpperCase())}function og(){return to(t=>i0(t))}function pD(t,e,r){return new t({type:"array",element:e,...ce(r)})}function US(t,e){return new t({type:"file",...ce(e)})}function DS(t,e,r){let n=ce(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function MS(t,e,r){return new t({type:"custom",check:"custom",fn:e,...ce(r)})}function qS(t){let e=AJ(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Oc(n,r.value,e._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(Oc(i))}},t(r.value,r)));return e}function AJ(t,e){let r=new Ut({check:"custom",...ce(e)});return r._zod.check=t,r}function ZS(t){let e=new Ut({check:"describe"});return e._zod.onattach=[r=>{let n=nn.get(r)??{};nn.add(r,{...n,description:t})}],e._zod.check=()=>{},e}function LS(t){let e=new Ut({check:"meta"});return e._zod.onattach=[r=>{let n=nn.get(r)??{};nn.add(r,{...n,...t})}],e._zod.check=()=>{},e}function FS(t,e){let r=ce(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(n),a=new Set(i),s=t.Codec??kd,c=t.Boolean??xd,u=t.String??ts,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),p=new s({type:"pipe",in:l,out:d,transform:((f,m)=>{let v=f;return r.case!=="sensitive"&&(v=v.toLowerCase()),o.has(v)?!0:a.has(v)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:m.value,inst:p,continue:!1}),{})}),reverseTransform:((f,m)=>f===!0?n[0]||"true":i[0]||"false"),error:r.error});return p}function Ac(t,e,r,n={}){let i=ce(n),o={...ce(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:s=>r.test(s),...i};return r instanceof RegExp&&(o.pattern=r),new t(o)}var fD=E(()=>{Eh();Sd();Xk();we()});function Uc(t){let e=t?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??nn,target:e,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function Nt(t,e,r={path:[],schemaPath:[]}){var n;let i=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,a);let s=t._zod.toJSONSchema?.();if(s)a.schema=s;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,a.schema,l);else{let p=a.schema,f=e.processors[i.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);f(t,e,p,l)}let d=t._zod.parent;d&&(a.ref||(a.ref=d),Nt(d,e,l),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(a.schema,c),e.io==="input"&&an(t)&&(delete a.schema.examples,delete a.schema.default),e.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,e.seen.get(t).schema}function Dc(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let a of t.seen.entries()){let s=t.metadataRegistry.get(a[0])?.id;if(s){let c=n.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}let i=a=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(a[0])?.id,p=t.external.uri??(m=>m);if(d)return{ref:p(d)};let f=a[1].defId??a[1].schema.id??`schema${t.counter++}`;return a[1].defId=f,{defId:f,ref:`${p("__shared")}#/${s}/${f}`}}if(a[1]===r)return{ref:"#"};let u=`#/${s}/`,l=a[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:u+l}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:u}=i(a);s.def={...s.schema},u&&(s.defId=u);let l=s.schema;for(let d in l)delete l[d];l.$ref=c};if(t.cycles==="throw")for(let a of t.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
92
|
+
|
|
93
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of t.seen.entries()){let s=a[1];if(e===a[0]){o(a);continue}if(t.external){let u=t.external.registry.get(a[0])?.id;if(e!==a[0]&&u){o(a);continue}}if(t.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&t.reused==="ref"){o(a);continue}}}function Mc(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let s=t.seen.get(a);if(s.ref===null)return;let c=s.def??s.schema,u={...c},l=s.ref;if(s.ref=null,l){n(l);let p=t.seen.get(l),f=p.schema;if(f.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,u),a._zod.parent===l)for(let v in c)v==="$ref"||v==="allOf"||v in u||delete c[v];if(f.$ref&&p.def)for(let v in c)v==="$ref"||v==="allOf"||v in p.def&&JSON.stringify(c[v])===JSON.stringify(p.def[v])&&delete c[v]}let d=a._zod.parent;if(d&&d!==l){n(d);let p=t.seen.get(d);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let f in c)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(c[f])===JSON.stringify(p.def[f])&&delete c[f]}t.override({zodSchema:a,jsonSchema:c,path:s.path??[]})};for(let a of[...t.seen.entries()].reverse())n(a[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){let a=t.external.registry.get(e)?.id;if(!a)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(a)}Object.assign(i,r.def??r.schema);let o=t.external?.defs??{};for(let a of t.seen.entries()){let s=a[1];s.def&&s.defId&&(o[s.defId]=s.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let a=JSON.parse(JSON.stringify(i));return Object.defineProperty(a,"~standard",{value:{...e["~standard"],jsonSchema:{input:Dd(e,"input",t.processors),output:Dd(e,"output",t.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function an(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return an(n.element,r);if(n.type==="set")return an(n.valueType,r);if(n.type==="lazy")return an(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return an(n.innerType,r);if(n.type==="intersection")return an(n.left,r)||an(n.right,r);if(n.type==="record"||n.type==="map")return an(n.keyType,r)||an(n.valueType,r);if(n.type==="pipe")return an(n.in,r)||an(n.out,r);if(n.type==="object"){for(let i in n.shape)if(an(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(an(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(an(i,r))return!0;return!!(n.rest&&an(n.rest,r))}return!1}var mD,Dd,Md=E(()=>{Sd();mD=(t,e={})=>r=>{let n=Uc({...r,processors:e});return Nt(t,n),Dc(n,t),Mc(n,t)},Dd=(t,e,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},a=Uc({...i??{},target:o,io:e,processors:r});return Nt(t,a),Dc(a,t),Mc(a,t)}});function qc(t,e){if("_idmap"in t){let n=t,i=Uc({...e,processors:VS}),o={};for(let c of n._idmap.entries()){let[u,l]=c;Nt(l,i)}let a={},s={registry:n,uri:e?.uri,defs:o};i.external=s;for(let c of n._idmap.entries()){let[u,l]=c;Dc(i,l),a[u]=Mc(i,l)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let r=Uc({...e,processors:VS});return Nt(t,r),Dc(r,t),Mc(r,t)}var UJ,WS,BS,KS,HS,GS,QS,YS,JS,XS,e$,t$,r$,n$,i$,o$,a$,s$,c$,u$,l$,d$,p$,f$,m$,h$,ag,g$,v$,y$,_$,b$,x$,w$,k$,S$,$$,I$,sg,E$,VS,Zc=E(()=>{Md();we();UJ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},WS=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u}=t._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof a=="number"&&(i.maxLength=a),s&&(i.format=UJ[s]??s,i.format===""&&delete i.format,s==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?i.pattern=l[0].source:l.length>1&&(i.allOf=[...l.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},BS=(t,e,r,n)=>{let i=r,{minimum:o,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=t._zod.bag;typeof s=="string"&&s.includes("int")?i.type="integer":i.type="number",typeof l=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l),typeof o=="number"&&(i.minimum=o,typeof l=="number"&&e.target!=="draft-04"&&(l>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof a=="number"&&(i.maximum=a,typeof u=="number"&&e.target!=="draft-04"&&(u<=a?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},KS=(t,e,r,n)=>{r.type="boolean"},HS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},GS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},QS=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},YS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},JS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},XS=(t,e,r,n)=>{r.not={}},e$=(t,e,r,n)=>{},t$=(t,e,r,n)=>{},r$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},n$=(t,e,r,n)=>{let i=t._zod.def,o=od(i.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},i$=(t,e,r,n)=>{let i=t._zod.def,o=[];for(let a of i.values)if(a===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];r.type=a===null?"null":typeof a,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},o$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},a$=(t,e,r,n)=>{let i=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},s$=(t,e,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=t._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,o)},c$=(t,e,r,n)=>{r.type="boolean"},u$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},l$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},d$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},p$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},f$=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},m$=(t,e,r,n)=>{let i=r,o=t._zod.def,{minimum:a,maximum:s}=t._zod.bag;typeof a=="number"&&(i.minItems=a),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=Nt(o.element,e,{...n,path:[...n.path,"items"]})},h$=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object",i.properties={};let a=o.shape;for(let u in a)i.properties[u]=Nt(a[u],e,{...n,path:[...n.path,"properties",u]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{let l=o.shape[u]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Nt(o.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},ag=(t,e,r,n)=>{let i=t._zod.def,o=i.inclusive===!1,a=i.options.map((s,c)=>Nt(s,e,{...n,path:[...n.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},g$=(t,e,r,n)=>{let i=t._zod.def,o=Nt(i.left,e,{...n,path:[...n.path,"allOf",0]}),a=Nt(i.right,e,{...n,path:[...n.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];r.allOf=c},v$=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="array";let a=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((p,f)=>Nt(p,e,{...n,path:[...n.path,a,f]})),u=o.rest?Nt(o.rest,e,{...n,path:[...n.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):e.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:l,maximum:d}=t._zod.bag;typeof l=="number"&&(i.minItems=l),typeof d=="number"&&(i.maxItems=d)},y$=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object";let a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let l=Nt(o.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of c)i.patternProperties[d.source]=l}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=Nt(o.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Nt(o.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let u=a._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(i.required=l)}},_$=(t,e,r,n)=>{let i=t._zod.def,o=Nt(i.innerType,e,n),a=e.seen.get(t);e.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},b$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},x$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},w$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},k$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},S$=(t,e,r,n)=>{let i=t._zod.def,o=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Nt(o,e,n);let a=e.seen.get(t);a.ref=o},$$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.readOnly=!0},I$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},sg=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},E$=(t,e,r,n)=>{let i=t._zod.innerType;Nt(i,e,n);let o=e.seen.get(t);o.ref=i},VS={string:WS,number:BS,boolean:KS,bigint:HS,symbol:GS,null:QS,undefined:YS,void:JS,never:XS,any:e$,unknown:t$,date:r$,enum:n$,literal:i$,nan:o$,template_literal:a$,file:s$,success:c$,custom:u$,function:l$,transform:d$,map:p$,set:f$,array:m$,object:h$,union:ag,intersection:g$,tuple:v$,record:y$,nullable:_$,nonoptional:b$,default:x$,prefault:w$,catch:k$,pipe:S$,readonly:$$,promise:I$,optional:sg,lazy:E$}});var hD=E(()=>{Zc();Md()});var gD=E(()=>{});var lr=E(()=>{Pc();p0();d0();Xk();Eh();V0();we();Ih();Dh();Sd();F0();fD();Md();Zc();hD();gD()});var cg={};Gi(cg,{endsWith:()=>jd,gt:()=>So,gte:()=>on,includes:()=>zd,length:()=>Rc,lowercase:()=>Pd,lt:()=>ko,lte:()=>qn,maxLength:()=>Cc,maxSize:()=>ns,mime:()=>Nd,minLength:()=>ua,minSize:()=>$o,multipleOf:()=>rs,negative:()=>NS,nonnegative:()=>RS,nonpositive:()=>CS,normalize:()=>Cd,overwrite:()=>to,positive:()=>jS,property:()=>AS,regex:()=>Ed,size:()=>Nc,slugify:()=>og,startsWith:()=>Od,toLowerCase:()=>Ad,toUpperCase:()=>Ud,trim:()=>Rd,uppercase:()=>Td});var ug=E(()=>{lr()});var is={};Gi(is,{ZodISODate:()=>z$,ZodISODateTime:()=>P$,ZodISODuration:()=>C$,ZodISOTime:()=>j$,date:()=>O$,datetime:()=>T$,duration:()=>R$,time:()=>N$});function T$(t){return uS(P$,t)}function O$(t){return lS(z$,t)}function N$(t){return dS(j$,t)}function R$(t){return pS(C$,t)}var P$,z$,j$,C$,qd=E(()=>{lr();Ld();P$=N("ZodISODateTime",(t,e)=>{nk.init(t,e),Dt.init(t,e)});z$=N("ZodISODate",(t,e)=>{ik.init(t,e),Dt.init(t,e)});j$=N("ZodISOTime",(t,e)=>{ok.init(t,e),Dt.init(t,e)});C$=N("ZodISODuration",(t,e)=>{ak.init(t,e),Dt.init(t,e)})});var vD,bAe,Zn,A$=E(()=>{lr();lr();we();vD=(t,e)=>{xh.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>kh(t,r)},flatten:{value:r=>wh(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,Tc,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,Tc,2)}},isEmpty:{get(){return t.issues.length===0}}})},bAe=N("ZodError",vD),Zn=N("ZodError",vD,{Parent:Error})});var yD,_D,bD,xD,wD,kD,SD,$D,ID,ED,PD,TD,U$=E(()=>{lr();A$();yD=dd(Zn),_D=fd(Zn),bD=hd(Zn),xD=gd(Zn),wD=SU(Zn),kD=$U(Zn),SD=IU(Zn),$D=EU(Zn),ID=PU(Zn),ED=TU(Zn),PD=zU(Zn),TD=OU(Zn)});var Zd={};Gi(Zd,{ZodAny:()=>CD,ZodArray:()=>DD,ZodBase64:()=>J$,ZodBase64URL:()=>X$,ZodBigInt:()=>vg,ZodBigIntFormat:()=>rI,ZodBoolean:()=>gg,ZodCIDRv4:()=>Q$,ZodCIDRv6:()=>Y$,ZodCUID:()=>F$,ZodCUID2:()=>V$,ZodCatch:()=>iM,ZodCodec:()=>uI,ZodCustom:()=>kg,ZodCustomStringFormat:()=>Vd,ZodDate:()=>iI,ZodDefault:()=>JD,ZodDiscriminatedUnion:()=>qD,ZodE164:()=>eI,ZodEmail:()=>q$,ZodEmoji:()=>Z$,ZodEnum:()=>Fd,ZodExactOptional:()=>GD,ZodFile:()=>KD,ZodFunction:()=>fM,ZodGUID:()=>lg,ZodIPv4:()=>H$,ZodIPv6:()=>G$,ZodIntersection:()=>ZD,ZodJWT:()=>tI,ZodKSUID:()=>K$,ZodLazy:()=>lM,ZodLiteral:()=>BD,ZodMAC:()=>zD,ZodMap:()=>VD,ZodNaN:()=>aM,ZodNanoID:()=>L$,ZodNever:()=>AD,ZodNonOptional:()=>sI,ZodNull:()=>ND,ZodNullable:()=>YD,ZodNumber:()=>hg,ZodNumberFormat:()=>Lc,ZodObject:()=>_g,ZodOptional:()=>aI,ZodPipe:()=>cI,ZodPrefault:()=>eM,ZodPromise:()=>pM,ZodReadonly:()=>sM,ZodRecord:()=>wg,ZodSet:()=>WD,ZodString:()=>fg,ZodStringFormat:()=>Dt,ZodSuccess:()=>nM,ZodSymbol:()=>OD,ZodTemplateLiteral:()=>uM,ZodTransform:()=>HD,ZodTuple:()=>LD,ZodType:()=>He,ZodULID:()=>W$,ZodURL:()=>mg,ZodUUID:()=>Io,ZodUndefined:()=>jD,ZodUnion:()=>bg,ZodUnknown:()=>RD,ZodVoid:()=>UD,ZodXID:()=>B$,ZodXor:()=>MD,_ZodString:()=>M$,_default:()=>XD,_function:()=>ZX,any:()=>kX,array:()=>ot,base64:()=>aX,base64url:()=>sX,bigint:()=>yX,boolean:()=>vr,catch:()=>oM,check:()=>LX,cidrv4:()=>iX,cidrv6:()=>oX,codec:()=>DX,cuid:()=>QJ,cuid2:()=>YJ,custom:()=>lI,date:()=>$X,describe:()=>FX,discriminatedUnion:()=>xg,e164:()=>cX,email:()=>qJ,emoji:()=>HJ,enum:()=>Fr,exactOptional:()=>QD,file:()=>CX,float32:()=>mX,float64:()=>hX,function:()=>ZX,guid:()=>ZJ,hash:()=>fX,hex:()=>pX,hostname:()=>dX,httpUrl:()=>KJ,instanceof:()=>WX,int:()=>D$,int32:()=>gX,int64:()=>_X,intersection:()=>Wd,ipv4:()=>tX,ipv6:()=>nX,json:()=>KX,jwt:()=>uX,keyof:()=>IX,ksuid:()=>eX,lazy:()=>dM,literal:()=>ke,looseObject:()=>Lr,looseRecord:()=>zX,mac:()=>rX,map:()=>OX,meta:()=>VX,nan:()=>UX,nanoid:()=>GJ,nativeEnum:()=>NX,never:()=>nI,nonoptional:()=>rM,null:()=>yg,nullable:()=>dg,nullish:()=>RX,number:()=>Tt,object:()=>fe,optional:()=>Bt,partialRecord:()=>TX,pipe:()=>pg,prefault:()=>tM,preprocess:()=>Sg,promise:()=>qX,readonly:()=>cM,record:()=>Ct,refine:()=>mM,set:()=>jX,strictObject:()=>EX,string:()=>K,stringFormat:()=>lX,stringbool:()=>BX,success:()=>AX,superRefine:()=>hM,symbol:()=>xX,templateLiteral:()=>MX,transform:()=>oI,tuple:()=>FD,uint32:()=>vX,uint64:()=>bX,ulid:()=>JJ,undefined:()=>wX,union:()=>qt,unknown:()=>Mt,url:()=>BJ,uuid:()=>LJ,uuidv4:()=>FJ,uuidv6:()=>VJ,uuidv7:()=>WJ,void:()=>SX,xid:()=>XJ,xor:()=>PX});function K(t){return sS(fg,t)}function qJ(t){return Mh(q$,t)}function ZJ(t){return $d(lg,t)}function LJ(t){return qh(Io,t)}function FJ(t){return Zh(Io,t)}function VJ(t){return Lh(Io,t)}function WJ(t){return Fh(Io,t)}function BJ(t){return Id(mg,t)}function KJ(t){return Id(mg,{protocol:/^https?$/,hostname:ii.domain,...J.normalizeParams(t)})}function HJ(t){return Vh(Z$,t)}function GJ(t){return Wh(L$,t)}function QJ(t){return Bh(F$,t)}function YJ(t){return Kh(V$,t)}function JJ(t){return Hh(W$,t)}function XJ(t){return Gh(B$,t)}function eX(t){return Qh(K$,t)}function tX(t){return Yh(H$,t)}function rX(t){return cS(zD,t)}function nX(t){return Jh(G$,t)}function iX(t){return Xh(Q$,t)}function oX(t){return eg(Y$,t)}function aX(t){return tg(J$,t)}function sX(t){return rg(X$,t)}function cX(t){return ng(eI,t)}function uX(t){return ig(tI,t)}function lX(t,e,r={}){return Ac(Vd,t,e,r)}function dX(t){return Ac(Vd,"hostname",ii.hostname,t)}function pX(t){return Ac(Vd,"hex",ii.hex,t)}function fX(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=ii[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ac(Vd,n,i,e)}function Tt(t){return fS(hg,t)}function D$(t){return mS(Lc,t)}function mX(t){return hS(Lc,t)}function hX(t){return gS(Lc,t)}function gX(t){return vS(Lc,t)}function vX(t){return yS(Lc,t)}function vr(t){return _S(gg,t)}function yX(t){return bS(vg,t)}function _X(t){return xS(rI,t)}function bX(t){return wS(rI,t)}function xX(t){return kS(OD,t)}function wX(t){return SS(jD,t)}function yg(t){return $S(ND,t)}function kX(){return IS(CD)}function Mt(){return ES(RD)}function nI(t){return PS(AD,t)}function SX(t){return TS(UD,t)}function $X(t){return zS(iI,t)}function ot(t,e){return pD(DD,t,e)}function IX(t){let e=t._zod.def.shape;return Fr(Object.keys(e))}function fe(t,e){let r={type:"object",shape:t??{},...J.normalizeParams(e)};return new _g(r)}function EX(t,e){return new _g({type:"object",shape:t,catchall:nI(),...J.normalizeParams(e)})}function Lr(t,e){return new _g({type:"object",shape:t,catchall:Mt(),...J.normalizeParams(e)})}function qt(t,e){return new bg({type:"union",options:t,...J.normalizeParams(e)})}function PX(t,e){return new MD({type:"union",options:t,inclusive:!1,...J.normalizeParams(e)})}function xg(t,e,r){return new qD({type:"union",options:e,discriminator:t,...J.normalizeParams(r)})}function Wd(t,e){return new ZD({type:"intersection",left:t,right:e})}function FD(t,e,r){let n=e instanceof Ze,i=n?r:e,o=n?e:null;return new LD({type:"tuple",items:t,rest:o,...J.normalizeParams(i)})}function Ct(t,e,r){return new wg({type:"record",keyType:t,valueType:e,...J.normalizeParams(r)})}function TX(t,e,r){let n=rn(t);return n._zod.values=void 0,new wg({type:"record",keyType:n,valueType:e,...J.normalizeParams(r)})}function zX(t,e,r){return new wg({type:"record",keyType:t,valueType:e,mode:"loose",...J.normalizeParams(r)})}function OX(t,e,r){return new VD({type:"map",keyType:t,valueType:e,...J.normalizeParams(r)})}function jX(t,e){return new WD({type:"set",valueType:t,...J.normalizeParams(e)})}function Fr(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Fd({type:"enum",entries:r,...J.normalizeParams(e)})}function NX(t,e){return new Fd({type:"enum",entries:t,...J.normalizeParams(e)})}function ke(t,e){return new BD({type:"literal",values:Array.isArray(t)?t:[t],...J.normalizeParams(e)})}function CX(t){return US(KD,t)}function oI(t){return new HD({type:"transform",transform:t})}function Bt(t){return new aI({type:"optional",innerType:t})}function QD(t){return new GD({type:"optional",innerType:t})}function dg(t){return new YD({type:"nullable",innerType:t})}function RX(t){return Bt(dg(t))}function XD(t,e){return new JD({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():J.shallowClone(e)}})}function tM(t,e){return new eM({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():J.shallowClone(e)}})}function rM(t,e){return new sI({type:"nonoptional",innerType:t,...J.normalizeParams(e)})}function AX(t){return new nM({type:"success",innerType:t})}function oM(t,e){return new iM({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function UX(t){return OS(aM,t)}function pg(t,e){return new cI({type:"pipe",in:t,out:e})}function DX(t,e,r){return new uI({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function cM(t){return new sM({type:"readonly",innerType:t})}function MX(t,e){return new uM({type:"template_literal",parts:t,...J.normalizeParams(e)})}function dM(t){return new lM({type:"lazy",getter:t})}function qX(t){return new pM({type:"promise",innerType:t})}function ZX(t){return new fM({type:"function",input:Array.isArray(t?.input)?FD(t?.input):t?.input??ot(Mt()),output:t?.output??Mt()})}function LX(t){let e=new Ut({check:"custom"});return e._zod.check=t,e}function lI(t,e){return DS(kg,t??(()=>!0),e)}function mM(t,e={}){return MS(kg,t,e)}function hM(t){return qS(t)}function WX(t,e={}){let r=new kg({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...J.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}function KX(t){let e=dM(()=>qt([K(t),Tt(),vr(),yg(),ot(e),Ct(K(),e)]));return e}function Sg(t,e){return pg(oI(t),e)}var He,M$,fg,Dt,q$,lg,Io,mg,Z$,L$,F$,V$,W$,B$,K$,H$,zD,G$,Q$,Y$,J$,X$,eI,tI,Vd,hg,Lc,gg,vg,rI,OD,jD,ND,CD,RD,AD,UD,iI,DD,_g,bg,MD,qD,ZD,LD,wg,VD,WD,Fd,BD,KD,HD,aI,GD,YD,JD,eM,sI,nM,iM,aM,cI,uI,sM,uM,lM,pM,fM,kg,FX,VX,BX,Ld=E(()=>{lr();lr();Zc();Md();ug();qd();U$();He=N("ZodType",(t,e)=>(Ze.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Dd(t,"input"),output:Dd(t,"output")}}),t.toJSONSchema=mD(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(J.mergeDefs(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>rn(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>yD(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>bD(t,r,n),t.parseAsync=async(r,n)=>_D(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>xD(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>wD(t,r,n),t.decode=(r,n)=>kD(t,r,n),t.encodeAsync=async(r,n)=>SD(t,r,n),t.decodeAsync=async(r,n)=>$D(t,r,n),t.safeEncode=(r,n)=>ID(t,r,n),t.safeDecode=(r,n)=>ED(t,r,n),t.safeEncodeAsync=async(r,n)=>PD(t,r,n),t.safeDecodeAsync=async(r,n)=>TD(t,r,n),t.refine=(r,n)=>t.check(mM(r,n)),t.superRefine=r=>t.check(hM(r)),t.overwrite=r=>t.check(to(r)),t.optional=()=>Bt(t),t.exactOptional=()=>QD(t),t.nullable=()=>dg(t),t.nullish=()=>Bt(dg(t)),t.nonoptional=r=>rM(t,r),t.array=()=>ot(t),t.or=r=>qt([t,r]),t.and=r=>Wd(t,r),t.transform=r=>pg(t,oI(r)),t.default=r=>XD(t,r),t.prefault=r=>tM(t,r),t.catch=r=>oM(t,r),t.pipe=r=>pg(t,r),t.readonly=()=>cM(t),t.describe=r=>{let n=t.clone();return nn.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return nn.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return nn.get(t);let n=t.clone();return nn.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),M$=N("_ZodString",(t,e)=>{ts.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,o)=>WS(t,n,i,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(Ed(...n)),t.includes=(...n)=>t.check(zd(...n)),t.startsWith=(...n)=>t.check(Od(...n)),t.endsWith=(...n)=>t.check(jd(...n)),t.min=(...n)=>t.check(ua(...n)),t.max=(...n)=>t.check(Cc(...n)),t.length=(...n)=>t.check(Rc(...n)),t.nonempty=(...n)=>t.check(ua(1,...n)),t.lowercase=n=>t.check(Pd(n)),t.uppercase=n=>t.check(Td(n)),t.trim=()=>t.check(Rd()),t.normalize=(...n)=>t.check(Cd(...n)),t.toLowerCase=()=>t.check(Ad()),t.toUpperCase=()=>t.check(Ud()),t.slugify=()=>t.check(og())}),fg=N("ZodString",(t,e)=>{ts.init(t,e),M$.init(t,e),t.email=r=>t.check(Mh(q$,r)),t.url=r=>t.check(Id(mg,r)),t.jwt=r=>t.check(ig(tI,r)),t.emoji=r=>t.check(Vh(Z$,r)),t.guid=r=>t.check($d(lg,r)),t.uuid=r=>t.check(qh(Io,r)),t.uuidv4=r=>t.check(Zh(Io,r)),t.uuidv6=r=>t.check(Lh(Io,r)),t.uuidv7=r=>t.check(Fh(Io,r)),t.nanoid=r=>t.check(Wh(L$,r)),t.guid=r=>t.check($d(lg,r)),t.cuid=r=>t.check(Bh(F$,r)),t.cuid2=r=>t.check(Kh(V$,r)),t.ulid=r=>t.check(Hh(W$,r)),t.base64=r=>t.check(tg(J$,r)),t.base64url=r=>t.check(rg(X$,r)),t.xid=r=>t.check(Gh(B$,r)),t.ksuid=r=>t.check(Qh(K$,r)),t.ipv4=r=>t.check(Yh(H$,r)),t.ipv6=r=>t.check(Jh(G$,r)),t.cidrv4=r=>t.check(Xh(Q$,r)),t.cidrv6=r=>t.check(eg(Y$,r)),t.e164=r=>t.check(ng(eI,r)),t.datetime=r=>t.check(T$(r)),t.date=r=>t.check(O$(r)),t.time=r=>t.check(N$(r)),t.duration=r=>t.check(R$(r))});Dt=N("ZodStringFormat",(t,e)=>{jt.init(t,e),M$.init(t,e)}),q$=N("ZodEmail",(t,e)=>{H0.init(t,e),Dt.init(t,e)});lg=N("ZodGUID",(t,e)=>{B0.init(t,e),Dt.init(t,e)});Io=N("ZodUUID",(t,e)=>{K0.init(t,e),Dt.init(t,e)});mg=N("ZodURL",(t,e)=>{G0.init(t,e),Dt.init(t,e)});Z$=N("ZodEmoji",(t,e)=>{Q0.init(t,e),Dt.init(t,e)});L$=N("ZodNanoID",(t,e)=>{Y0.init(t,e),Dt.init(t,e)});F$=N("ZodCUID",(t,e)=>{J0.init(t,e),Dt.init(t,e)});V$=N("ZodCUID2",(t,e)=>{X0.init(t,e),Dt.init(t,e)});W$=N("ZodULID",(t,e)=>{ek.init(t,e),Dt.init(t,e)});B$=N("ZodXID",(t,e)=>{tk.init(t,e),Dt.init(t,e)});K$=N("ZodKSUID",(t,e)=>{rk.init(t,e),Dt.init(t,e)});H$=N("ZodIPv4",(t,e)=>{sk.init(t,e),Dt.init(t,e)});zD=N("ZodMAC",(t,e)=>{uk.init(t,e),Dt.init(t,e)});G$=N("ZodIPv6",(t,e)=>{ck.init(t,e),Dt.init(t,e)});Q$=N("ZodCIDRv4",(t,e)=>{lk.init(t,e),Dt.init(t,e)});Y$=N("ZodCIDRv6",(t,e)=>{dk.init(t,e),Dt.init(t,e)});J$=N("ZodBase64",(t,e)=>{pk.init(t,e),Dt.init(t,e)});X$=N("ZodBase64URL",(t,e)=>{fk.init(t,e),Dt.init(t,e)});eI=N("ZodE164",(t,e)=>{mk.init(t,e),Dt.init(t,e)});tI=N("ZodJWT",(t,e)=>{hk.init(t,e),Dt.init(t,e)});Vd=N("ZodCustomStringFormat",(t,e)=>{gk.init(t,e),Dt.init(t,e)});hg=N("ZodNumber",(t,e)=>{Ch.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,o)=>BS(t,n,i,o),t.gt=(n,i)=>t.check(So(n,i)),t.gte=(n,i)=>t.check(on(n,i)),t.min=(n,i)=>t.check(on(n,i)),t.lt=(n,i)=>t.check(ko(n,i)),t.lte=(n,i)=>t.check(qn(n,i)),t.max=(n,i)=>t.check(qn(n,i)),t.int=n=>t.check(D$(n)),t.safe=n=>t.check(D$(n)),t.positive=n=>t.check(So(0,n)),t.nonnegative=n=>t.check(on(0,n)),t.negative=n=>t.check(ko(0,n)),t.nonpositive=n=>t.check(qn(0,n)),t.multipleOf=(n,i)=>t.check(rs(n,i)),t.step=(n,i)=>t.check(rs(n,i)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});Lc=N("ZodNumberFormat",(t,e)=>{vk.init(t,e),hg.init(t,e)});gg=N("ZodBoolean",(t,e)=>{xd.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>KS(t,r,n,i)});vg=N("ZodBigInt",(t,e)=>{Rh.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,o)=>HS(t,n,i,o),t.gte=(n,i)=>t.check(on(n,i)),t.min=(n,i)=>t.check(on(n,i)),t.gt=(n,i)=>t.check(So(n,i)),t.gte=(n,i)=>t.check(on(n,i)),t.min=(n,i)=>t.check(on(n,i)),t.lt=(n,i)=>t.check(ko(n,i)),t.lte=(n,i)=>t.check(qn(n,i)),t.max=(n,i)=>t.check(qn(n,i)),t.positive=n=>t.check(So(BigInt(0),n)),t.negative=n=>t.check(ko(BigInt(0),n)),t.nonpositive=n=>t.check(qn(BigInt(0),n)),t.nonnegative=n=>t.check(on(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(rs(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});rI=N("ZodBigIntFormat",(t,e)=>{yk.init(t,e),vg.init(t,e)});OD=N("ZodSymbol",(t,e)=>{_k.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>GS(t,r,n,i)});jD=N("ZodUndefined",(t,e)=>{bk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>YS(t,r,n,i)});ND=N("ZodNull",(t,e)=>{xk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>QS(t,r,n,i)});CD=N("ZodAny",(t,e)=>{wk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>e$(t,r,n,i)});RD=N("ZodUnknown",(t,e)=>{kk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>t$(t,r,n,i)});AD=N("ZodNever",(t,e)=>{Sk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>XS(t,r,n,i)});UD=N("ZodVoid",(t,e)=>{$k.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>JS(t,r,n,i)});iI=N("ZodDate",(t,e)=>{Ik.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,o)=>r$(t,n,i,o),t.min=(n,i)=>t.check(on(n,i)),t.max=(n,i)=>t.check(qn(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});DD=N("ZodArray",(t,e)=>{Ek.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>m$(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(ua(r,n)),t.nonempty=r=>t.check(ua(1,r)),t.max=(r,n)=>t.check(Cc(r,n)),t.length=(r,n)=>t.check(Rc(r,n)),t.unwrap=()=>t.element});_g=N("ZodObject",(t,e)=>{y4.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>h$(t,r,n,i),J.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Fr(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Mt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Mt()}),t.strict=()=>t.clone({...t._zod.def,catchall:nI()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>J.extend(t,r),t.safeExtend=r=>J.safeExtend(t,r),t.merge=r=>J.merge(t,r),t.pick=r=>J.pick(t,r),t.omit=r=>J.omit(t,r),t.partial=(...r)=>J.partial(aI,t,r[0]),t.required=(...r)=>J.required(sI,t,r[0])});bg=N("ZodUnion",(t,e)=>{wd.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>ag(t,r,n,i),t.options=e.options});MD=N("ZodXor",(t,e)=>{bg.init(t,e),Pk.init(t,e),t._zod.processJSONSchema=(r,n,i)=>ag(t,r,n,i),t.options=e.options});qD=N("ZodDiscriminatedUnion",(t,e)=>{bg.init(t,e),Tk.init(t,e)});ZD=N("ZodIntersection",(t,e)=>{zk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>g$(t,r,n,i)});LD=N("ZodTuple",(t,e)=>{Ah.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>v$(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});wg=N("ZodRecord",(t,e)=>{Ok.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>y$(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});VD=N("ZodMap",(t,e)=>{jk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>p$(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check($o(...r)),t.nonempty=r=>t.check($o(1,r)),t.max=(...r)=>t.check(ns(...r)),t.size=(...r)=>t.check(Nc(...r))});WD=N("ZodSet",(t,e)=>{Nk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>f$(t,r,n,i),t.min=(...r)=>t.check($o(...r)),t.nonempty=r=>t.check($o(1,r)),t.max=(...r)=>t.check(ns(...r)),t.size=(...r)=>t.check(Nc(...r))});Fd=N("ZodEnum",(t,e)=>{Ck.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,o)=>n$(t,n,i,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let a of n)if(r.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Fd({...e,checks:[],...J.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let a of n)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Fd({...e,checks:[],...J.normalizeParams(i),entries:o})}});BD=N("ZodLiteral",(t,e)=>{Rk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>i$(t,r,n,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});KD=N("ZodFile",(t,e)=>{Ak.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>s$(t,r,n,i),t.min=(r,n)=>t.check($o(r,n)),t.max=(r,n)=>t.check(ns(r,n)),t.mime=(r,n)=>t.check(Nd(Array.isArray(r)?r:[r],n))});HD=N("ZodTransform",(t,e)=>{Uk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>d$(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ja(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(J.issue(o,r.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),r.issues.push(J.issue(a))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});aI=N("ZodOptional",(t,e)=>{Uh.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>sg(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});GD=N("ZodExactOptional",(t,e)=>{Dk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>sg(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});YD=N("ZodNullable",(t,e)=>{Mk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>_$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});JD=N("ZodDefault",(t,e)=>{qk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>x$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});eM=N("ZodPrefault",(t,e)=>{Zk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>w$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});sI=N("ZodNonOptional",(t,e)=>{Lk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>b$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});nM=N("ZodSuccess",(t,e)=>{Fk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>c$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});iM=N("ZodCatch",(t,e)=>{Vk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>k$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});aM=N("ZodNaN",(t,e)=>{Wk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>o$(t,r,n,i)});cI=N("ZodPipe",(t,e)=>{Bk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>S$(t,r,n,i),t.in=e.in,t.out=e.out});uI=N("ZodCodec",(t,e)=>{cI.init(t,e),kd.init(t,e)});sM=N("ZodReadonly",(t,e)=>{Kk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>$$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});uM=N("ZodTemplateLiteral",(t,e)=>{Hk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>a$(t,r,n,i)});lM=N("ZodLazy",(t,e)=>{Yk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>E$(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});pM=N("ZodPromise",(t,e)=>{Qk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>I$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});fM=N("ZodFunction",(t,e)=>{Gk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>l$(t,r,n,i)});kg=N("ZodCustom",(t,e)=>{Jk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>u$(t,r,n,i)});FX=ZS,VX=LS;BX=(...t)=>FS({Codec:uI,Boolean:gg,String:fg},...t)});var gM,yM=E(()=>{lr();lr();gM||(gM={})});var PAe,_M=E(()=>{Sd();ug();qd();Ld();PAe={...Zd,...cg,iso:is}});var bM=E(()=>{lr();Ld()});var Bd=E(()=>{lr();Ld();ug();A$();U$();yM();lr();tS();lr();Zc();_M();Dh();qd();qd();bM();_r(eS())});var wM=E(()=>{Bd();Bd()});import{homedir as oee}from"os";import{join as aee}from"path";import{existsSync as see,readFileSync as cee}from"fs";function uee(){if(process.env.OPENAI_PROXY_TOKEN)return q.debug("[Auth] Using OPENAI_PROXY_TOKEN (ECS execution)"),process.env.OPENAI_PROXY_TOKEN;if(process.env.ZIBBY_USER_TOKEN)return q.debug("[Auth] Using ZIBBY_USER_TOKEN (CI/CD PAT)"),process.env.ZIBBY_USER_TOKEN;try{let t=aee(oee(),".zibby","config.json");if(see(t)){let e=JSON.parse(cee(t,"utf-8"));if(e.sessionToken)return q.debug("[Auth] Using session token from zibby login"),e.sessionToken}}catch(t){q.debug(`[Auth] Could not read zibby login session: ${t.message}`)}return null}function lee(){return process.env.OPENAI_PROXY_URL?process.env.OPENAI_PROXY_URL.replace(/\/v1\/?$/,""):"https://api-prod.zibby.app/openai-proxy"}function Fc(t){if(!(typeof t!="object"||t===null)){if(Object.keys(t).length===0){t.type="object",t.additionalProperties=!0;return}if(t.type||(t.properties?t.type="object":t.items&&(t.type="array")),t.type==="object")if(t.properties){for(let[e,r]of Object.entries(t.properties))r.type==="object"&&r.additionalProperties&&r.additionalProperties!==!1&&(!r.properties||Object.keys(r.properties).length===0)&&(t.properties[e]={type:["object","null"]});t.additionalProperties=!1,t.required=Object.keys(t.properties),Object.values(t.properties).forEach(Fc)}else"additionalProperties"in t||(t.additionalProperties=!0);t.type==="array"&&t.items&&Fc(t.items),t.anyOf&&t.anyOf.forEach(Fc),t.oneOf&&t.oneOf.forEach(Fc),t.allOf&&t.allOf.forEach(Fc)}}async function kM(t,e){q.info("\u{1F527} [OpenAI Proxy] Formatting structured output...");let r=uee();if(!r)throw new Error("Authentication required for structured output processing.\n Local development: Run `zibby login`\n CI/CD: Set ZIBBY_USER_TOKEN environment variable (Personal Access Token from UI settings)");let n=lee();q.info(`\u{1F517} Using OpenAI proxy: ${n}`);let i=qc(e),o=i;if(i.$ref&&i.definitions){let l=i.$ref.split("/").pop();o=i.definitions[l]||i,q.debug(`Extracted schema from $ref: ${l}`)}delete o.$schema,Fc(o);let a=4e5,s=t;t.length>a&&(q.warn(`\u26A0\uFE0F [OpenAI Proxy] Raw text (${t.length} chars) exceeds limit, keeping last ${a} chars`),s=`... [truncated early content] ...
|
|
94
|
+
${t.slice(-a)}`);let c=`Extract and format the following information into structured JSON matching the schema.
|
|
95
|
+
|
|
96
|
+
RAW CONTENT:
|
|
97
|
+
${s}
|
|
98
|
+
|
|
99
|
+
Extract all relevant information and format it according to the schema. If any required fields are missing, do your best to infer them from the content.`,u={model:Yr.OPENAI_POSTPROCESSING,messages:[{role:"user",content:c}],response_format:{type:"json_schema",json_schema:{name:"extract",schema:o,strict:!0}}};q.info(`\u{1F4E4} Sending to OpenAI proxy: model=${Yr.OPENAI_POSTPROCESSING}, schema keys=${Object.keys(o.properties||{}).join(", ")}`),q.debug(` Schema size: ${JSON.stringify(o).length} chars`),q.debug(` Prompt size: ${c.length} chars`);try{let l={"Content-Type":"application/json"};process.env.OPENAI_PROXY_TOKEN?(l["x-proxy-token"]=r,l["x-execution-id"]=process.env.EXECUTION_ID||""):(l.Authorization=`Bearer ${r}`,l["x-api-key"]=process.env.ZIBBY_API_KEY||"",l["x-execution-id"]=process.env.EXECUTION_ID||"");let p=(await vh.post(n,u,{headers:l,timeout:km.OPENAI_REQUEST})).data?.choices?.[0]?.message?.content;if(!p)throw new Error("OpenAI proxy returned empty response");let f=JSON.parse(p);return q.info("\u2705 Successfully formatted with OpenAI proxy"),{structured:f,raw:t}}catch(l){if(l.response){let d=l.response.status,p=l.response.data;throw q.error(`\u274C OpenAI proxy request failed: ${d}`),q.error(` Status: ${d}`),q.error(` Response: ${JSON.stringify(p,null,2)}`),d===401||d===403?new Error(`Authentication failed for OpenAI proxy.
|
|
100
|
+
Run \`zibby login\` or set ZIBBY_USER_TOKEN environment variable.
|
|
101
|
+
Response: ${JSON.stringify(p)}`,{cause:l}):new Error(`Failed to format Cursor output: ${p?.error?.message||"Unknown error"}`,{cause:l})}throw q.error(`\u274C OpenAI proxy request failed: ${l.message}`),new Error(`Failed to format output: ${l.message}`,{cause:l})}}var SM=E(()=>{pU();wM();wi();Ma()});import{copyFileSync as dee,existsSync as dI,lstatSync as pee,mkdirSync as $M,rmSync as fee,symlinkSync as mee,unlinkSync as hee}from"fs";import{join as Eo}from"path";import{homedir as gee}from"os";import{randomBytes as vee}from"crypto";function IM(t){return!(!t||typeof t!="string"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="1"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="true")}function EM(t){let e=Eo(t||process.cwd(),".zibby","tmp");$M(e,{recursive:!0});let r=`${process.pid}-${Date.now()}-${vee(4).toString("hex")}`,n=Eo(e,`cursor-agent-home-${r}`),i=Eo(n,".cursor");$M(i,{recursive:!0});let o=gee(),a=Eo(o,".cursor");if(dI(a))for(let s of yee){let c=Eo(a,s);if(dI(c))try{dee(c,Eo(i,s))}catch{}}if(process.platform==="darwin"){let s=Eo(o,"Library");if(dI(s))try{mee(s,Eo(n,"Library"))}catch{}}return n}function PM(t){if(!(!t||typeof t!="string"))try{let e=Eo(t,"Library");try{pee(e).isSymbolicLink()&&hee(e)}catch{}fee(t,{recursive:!0,force:!0})}catch{}}var yee,TM=E(()=>{yee=["cli-config.json","config.json","auth.json","argv.json"]});import{spawn as _ee,execSync as os}from"child_process";import{writeFileSync as zM,readFileSync as OM,mkdirSync as jM,existsSync as Kd,accessSync as NM,constants as CM,unlinkSync as bee}from"fs";import{join as Oi,resolve as xee}from"path";import{homedir as Hd}from"os";var Gd,RM=E(()=>{Da();wi();Ma();wm();go();mb();Ox();SM();Gs();TM();Gd=class extends gn{constructor(){super("cursor","Cursor (CLI)",100)}canHandle(e){let r=[Oi(Hd(),".local","bin","cursor-agent"),Oi(Hd(),".cursor","bin","cursor-agent"),"/usr/local/bin/cursor-agent","/usr/local/bin/agent","/Applications/Cursor.app/Contents/Resources/app/bin/cursor","agent","cursor-agent"];for(let n of r)try{if(n.startsWith("/")){NM(n,CM.X_OK);let i=os(`"${n}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(i&&i.length>0)return q.debug(`[Cursor] Found agent at: ${n} (version: ${i.trim().slice(0,50)})`),!0}else{let i=os(`which ${n}`,{encoding:"utf-8",timeout:2e3,stdio:"pipe"}).trim();if(!i)continue;let o=os(`${n} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(o&&o.length>0)return q.debug(`[Cursor] Found '${n}' in PATH at ${i} (version: ${o.trim().slice(0,50)})`),!0}}catch{continue}return q.warn("[Cursor] \u274C Cursor Agent CLI not found or not working. Run: agent --version"),!1}async invoke(e,r={}){let{workspace:n=process.cwd(),print:i=!1,schema:o=null,skills:a=null,sessionPath:s=null,nodeName:c=null,timeout:u=km.CURSOR_AGENT_DEFAULT,config:l={}}=r,d=l?.agent?.strictMode||!1,p=r.model??l?.agent?.cursor?.model??Yr.CURSOR;q.debug(`[Cursor] Invoking (model: ${p}, timeout: ${u/1e3}s, skills: ${JSON.stringify(a)})`);let m=(this._setupMcpConfig(s,n,l,a,c)||{}).isolatedMcpHome??null,v=[Oi(Hd(),".local","bin","cursor-agent"),Oi(Hd(),".cursor","bin","cursor-agent"),"/usr/local/bin/cursor-agent","/usr/local/bin/agent","/Applications/Cursor.app/Contents/Resources/app/bin/cursor","agent","cursor-agent"],g=null;for(let A of v)try{if(A.startsWith("/"))NM(A,CM.X_OK),os(`"${A}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});else{if(!os(`which ${A}`,{encoding:"utf-8",timeout:2e3}).trim())throw new Error("not in PATH");os(`${A} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"})}g=A,q.debug(`[Agent] Using binary: ${A}`);break}catch(z){q.debug(`[Agent] Binary '${A}' check failed: ${z.message}`);continue}if(!g)throw new Error(`Cursor Agent CLI not found or not working.
|
|
102
|
+
|
|
103
|
+
Checked paths:
|
|
104
|
+
${v.map(A=>` - ${A}`).join(`
|
|
105
|
+
`)}
|
|
106
|
+
|
|
107
|
+
Install cursor-agent:
|
|
108
|
+
curl https://cursor.com/install -fsS | bash
|
|
109
|
+
|
|
110
|
+
Then add to PATH:
|
|
111
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
|
|
112
|
+
|
|
113
|
+
Test with: agent --version`);let h=null;if(o){let A=`zibby-result-${Date.now()}.json`;h=Oi(n,".zibby","tmp",A);let z=Oi(n,".zibby","tmp");Kd(z)||jM(z,{recursive:!0});let M=fc.generateFileOutputInstructions(o,h);e=`${e}
|
|
114
|
+
|
|
115
|
+
${M}`}let _=process.env.CURSOR_API_KEY,y=_?` | key: ***${_.slice(-4)}`:" | key: not set";console.log(`
|
|
116
|
+
\u25C6 Model: ${p||"auto"}${y}
|
|
117
|
+
`);let b=(await import("chalk")).default;console.log(`
|
|
118
|
+
${b.bold("Prompt sent to LLM:")}`),console.log(b.dim("\u2500".repeat(60))),console.log(b.dim(e)),console.log(b.dim("\u2500".repeat(60)));let x=["--print","--force","--approve-mcps","--output-format","stream-json","--stream-partial-output","--model",p||"auto"];if(process.env.CURSOR_API_KEY&&x.push("--api-key",process.env.CURSOR_API_KEY),x.push(e),q.debug(`[Agent] Prompt: ${e.length} chars, model: ${p||"auto"}`),q.debug(`[Agent] Workspace: ${n}`),process.env.LOG_LEVEL==="debug"||process.env.ZIBBY_LOG_CURSOR_CLI==="1")try{console.log(`\u{1F527} Cursor CLI --model ${p||"auto"} (from .zibby.config.js agent.cursor.model)
|
|
119
|
+
`)}catch{}let w,k=null;try{let A=s||(process.env.ZIBBY_SESSION_PATH?String(process.env.ZIBBY_SESSION_PATH).trim():null);w=await this._spawnWithStreaming(g,x,n,u,null,A,m)}catch(A){k=A}let $=w?.stdout||"";if(o){let A=typeof o.parse=="function",z=null,M=!!(h&&Kd(h));if(h&&q.info(`[Agent] Result file: ${M?"present":"missing"} at ${h}`),M)try{let R=OM(h,"utf-8").trim();z=JSON.parse(R),q.info(`[Agent] Parsed JSON from result file OK (${R.length} chars) \u2192 object ready for validation`),k&&q.debug("[Agent] Agent exited non-zero but result file was written \u2014 recovering")}catch(R){q.warn(`\u26A0\uFE0F [Agent] Result file exists on disk but is not valid JSON: ${R.message}`)}else if(k)q.warn(`[Agent] Result file missing at ${h} (agent process error \u2014 may still recover if strictMode repairs)`);else throw q.error(`\u274C [Agent] Result file was never created at ${h}`),new Error(`Agent did not write required result file at ${h}`);if(z&&A)try{let R=o.parse(z);return q.info("\u2705 [Agent] Zod validation passed for structured result file"),d&&q.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:$,structured:R}}catch(R){q.warn(`\u26A0\uFE0F [Agent] JSON parsed but Zod rejected it (wrong types/shape): ${R.message?.slice(0,400)}`)}else{if(z)return q.info("\u2705 [Agent] File-based output extracted (no Zod parse fn) \u2014 accepting as structured"),d&&q.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:$,structured:z};M&&q.error("\u274C [Agent] Result file exists but produced no in-memory JSON (parse failed earlier)")}if(d&&!k){let R=w.parsedText,te=z?JSON.stringify(z):R;q.info(`[Agent] strictMode: calling OpenAI proxy to fix structured output (${te.length} chars in)`);try{let G=await kM(te,o);if(A){let ye=o.parse(G.structured);return q.info("\u2705 [Agent] Proxy output passed Zod validation"),{raw:$,structured:ye}}return{raw:$,...G}}catch(G){if(q.warn(`\u26A0\uFE0F [Agent] strictMode proxy failed: ${G.message}`),z)return q.warn("[Agent] Using agent's original result file as fallback"),{raw:$,structured:z}}}if(k)throw k;let W=M?z==null?"file existed but JSON.parse failed \u2014 see WARN log above":A?"JSON was valid but Zod validation failed \u2014 see WARN log above":"no structured object after read (unexpected)":"file never appeared (agent may not have run Write tool to the path above)";throw q.error(`\u274C [Agent] No validated structured output: ${W}`),q.error("\u{1F4A1} Tip: Set strictMode=true in .zibby.config.js for OpenAI proxy fallback"),new Error(`Agent did not produce a valid result file at ${h}. Enable strictMode for proxy fallback.`)}if(k)throw k;return this._extractFinalResult($)||w?.parsedText||$}_extractFinalResult(e){if(!e)return null;let r=e.split(`
|
|
120
|
+
`),n=null;for(let i of r){let o=i.trim();if(o)try{let a=JSON.parse(o);if(a.type==="assistant"&&a.message?.content){let s=a.message.content;if(Array.isArray(s)){let c=s.filter(u=>u.type==="text"&&u.text).map(u=>u.text).join("");c&&(n=c)}else typeof s=="string"&&s&&(n=s)}}catch{}}return n?.trim()||null}_setupMcpConfig(e,r,n,i=null,o=null){let a=n?.headless,s=Oi(Hd(),".cursor"),c=Oi(s,"mcp.json"),u={};if(Kd(c))try{u=JSON.parse(OM(c,"utf-8"))}catch{}let l=u.mcpServers||{},d=n?.paths?.output||Qs,p=Oi(r||process.cwd(),d,Ko),f=Array.isArray(i)?i.map(g=>Tr(g)).filter(Boolean):[...pb()].map(([,g])=>g),m=new Set;for(let g of f)typeof g.resolve=="function"&&(m.has(g.serverName)||(m.add(g.serverName),this._ensureSkillConfigured(l,g,e,p,o,a)));if(e){let g=Tr("browser");g&&typeof g.resolve=="function"&&!m.has(g.serverName)&&this._ensureSkillConfigured(l,g,e,p,"execute_live",a)}if(Object.keys(l).length===0)return q.debug("[MCP] No MCP servers configured - agent will run without tool access"),{isolatedMcpHome:null};let v=`${JSON.stringify({mcpServers:l},null,2)}
|
|
121
|
+
`;if(IM(e)){let g=EM(r||process.cwd()),h=Oi(g,".cursor","mcp.json");return zM(h,v,"utf8"),q.debug(`[MCP] Isolated cursor-agent HOME (session-scoped mcp.json): ${g} | servers: ${Object.keys(l).join(", ")}`),{isolatedMcpHome:g}}return Kd(s)||jM(s,{recursive:!0}),zM(c,v,"utf8"),q.debug(`[MCP] Global ~/.cursor/mcp.json | servers: ${Object.keys(l).join(", ")}`),{isolatedMcpHome:null}}_ensureSkillConfigured(e,r,n,i,o=null,a){let s=r.cursorKey||r.serverName,c=e[s]?s:e[r.serverName]?r.serverName:null;if(c&&n){let l=typeof r.resolve=="function"?r.resolve({sessionPath:n,nodeName:o,headless:a}):null;l?.args?e[c].args=l.args:e[c].args=(e[c].args||[]).map(f=>f.startsWith("--output-dir=")?`--output-dir=${n}`:f);let d=l?.env||{},p=r.sessionEnvKey?{[r.sessionEnvKey]:i}:{};e[c].env={...e[c].env||{},...d,...p},q.debug(`[MCP] Updated ${c} session \u2192 ${n}`);return}if(c)return;let u=r.resolve({sessionPath:n,nodeName:o,headless:a});u&&(e[s]={...u,...r.sessionEnvKey&&{env:{...u.env||{},[r.sessionEnvKey]:i}}},q.debug(`[MCP] Configured ${s}`))}_spawnWithStreaming(e,r,n,i,o=null,a=null,s=null){return new Promise((c,u)=>{let l=Date.now(),d="",p="",f=Date.now(),m=0,v=!1,g=null,h=!1,_=!1,y=null;if(a)try{y=Oi(xee(String(a)),xm)}catch{y=null}let b=!1,x=()=>{b||(b=!0,PM(s))},w={...process.env};s&&(w.HOME=s,process.platform==="win32"&&(w.USERPROFILE=s),q.debug(`[Agent] cursor-agent HOME=${s} (isolated MCP config)`));let k=_ee(e,r,{cwd:n,shell:!1,stdio:["pipe","pipe","pipe"],env:w});q.debug(`[Agent] PID: ${k.pid}`),k.stdin.on("error",R=>{R.code!=="EPIPE"&&q.warn(`[Agent] stdin error: ${R.message}`)}),k.stdout.on("error",R=>{R.code!=="EPIPE"&&q.warn(`[Agent] stdout error: ${R.message}`)}),k.stderr.on("error",R=>{R.code!=="EPIPE"&&q.warn(`[Agent] stderr error: ${R.message}`)}),o?(k.stdin.write(o,R=>{R&&R.code!=="EPIPE"&&q.warn(`[Agent] Failed to write to stdin: ${R.message}`),k.stdin.end()}),q.debug(`[Agent] Prompt also piped to stdin (${o.length} chars)`)):k.stdin.end();let $=null;y&&($=setInterval(()=>{if(!(v||_))try{if(Kd(y)){v=!0,g="studio-stop";try{bee(y)}catch{}q.warn("\u{1F6D1} Studio stop requested \u2014 terminating Cursor agent (and MCP browser session)"),k.kill("SIGTERM"),setTimeout(()=>{k.killed||k.kill("SIGKILL")},2e3)}}catch{}},600));let T=new Set,A=new Date(l).toISOString().replace(/\.\d+Z$/,""),z=setInterval(()=>{let R=Math.round((Date.now()-l)/1e3),te=Math.round((Date.now()-f)/1e3),G=[];try{let De=Math.ceil(R/60)+1,de=os(`find "${n}" -type f -mmin -${De} -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/target/*' 2>/dev/null | head -20`,{encoding:"utf-8",timeout:5e3}).trim();if(de)for(let F of de.split(`
|
|
122
|
+
`)){let I=F.replace(`${n}/`,"");T.has(I)||(T.add(I),G.push(I))}}catch{}let ye="";G.length>0&&(ye=` | \u{1F4C1} new: ${G.map(de=>de.split("/").pop()).join(", ")}`),T.size>0&&(ye+=` | \u{1F4E6} total: ${T.size} files`),q.debug(`\u{1F493} [Agent] Running for ${R}s | ${m} lines output${ye}`),m===0&&R>=30&&T.size===0&&(R<35&&q.warn(`\u26A0\uFE0F [Agent] No output after ${R}s \u2014 agent may be stuck. Check your CURSOR_API_KEY.`),R>=60&&(v=!0,g=g||"stall",q.error(`\u274C [Agent] No response after ${R}s \u2014 killing. Verify CURSOR_API_KEY is valid and agent CLI works: agent --version`),k.kill("SIGTERM"),setTimeout(()=>{k.killed||k.kill("SIGKILL")},3e3)))},3e4),M=setTimeout(()=>{v=!0,g=g||"timeout";let R=Math.round((Date.now()-l)/1e3);q.error(`\u23F1\uFE0F [Agent] Timeout after ${R}s \u2014 killing process (PID: ${k.pid})`),d.trim()&&q.warn(`\u{1F4E4} [Agent] Partial output (${d.length} chars) before timeout:
|
|
123
|
+
${d.slice(-2e3)}`),k.kill("SIGTERM"),setTimeout(()=>{k.killed||k.kill("SIGKILL")},5e3)},i),W=new Ys;W.onToolCall=(R,te)=>{let G=R,ye=te;if(R==="mcpToolCall"&&te?.name)G=te.name.replace(/^mcp_+[^_]+_+/,""),G.includes("-")&&G.split("-")[0]===G.split("-")[1]&&(G=G.split("-")[0]),ye=te.args??te.input??te;else{if(R==="readToolCall"||R==="editToolCall"||R==="writeToolCall")return;(R.startsWith("mcp__")||R.includes("ToolCall"))&&(G=R.replace(/^mcp_+[^_]+_+/,"").replace(/ToolCall$/,""))}if(G.includes("memory")?Ht.stepMemory(`Tool: ${G}`):Ht.stepTool(`Tool: ${G}`),ye!=null&&typeof ye=="object"&&Object.keys(ye).length>0&&!_){let de=JSON.stringify(ye),F=de.length>100?`${de.substring(0,100)}...`:de;console.log(` Input: ${F}`)}},k.stdout.on("data",R=>{let te=R.toString();d+=te,f=Date.now(),h||(h=!0);let G=W.processChunk(te);G&&!_&&process.stdout.write(G);let ye=te.split(`
|
|
124
|
+
`).filter(De=>De.trim());m+=ye.length}),k.stderr.on("data",R=>{let te=R.toString();p+=te,f=Date.now(),h||(h=!0);let G=te.split(`
|
|
125
|
+
`).filter(ye=>ye.trim());for(let ye of G)q.warn(`\u26A0\uFE0F [Agent stderr] ${ye}`)}),k.on("close",(R,te)=>{_=!0,x(),clearTimeout(M),clearInterval(z),$&&clearInterval($),W.flush();let G=Math.round((Date.now()-l)/1e3);if(q.debug(`[Agent] Exited: code=${R}, signal=${te}, elapsed=${G}s, output=${d.length} chars`),v){if(g==="studio-stop"){u(new Error("Stopped from Zibby Studio"));return}u(new Error(`Cursor Agent timed out after ${G}s (limit: ${i/1e3}s). ${m} lines produced. Last output ${Math.round((Date.now()-f)/1e3)}s ago. ${d.trim()?`
|
|
126
|
+
Partial output (last 500 chars):
|
|
127
|
+
${d.slice(-500)}`:"No output captured."}`));return}if(R!==0){u(new Error(`Cursor Agent failed: exit code ${R}, signal ${te}. ${p.trim()?`
|
|
128
|
+
Stderr: ${p.slice(-1e3)}`:""}${d.trim()?`
|
|
129
|
+
Stdout (last 500 chars): ${d.slice(-500)}`:""}`));return}let ye=W.getResult(),De=ye?JSON.stringify(ye,null,2):W.getRawText()||d||"";c({stdout:d||p||"",parsedText:De})}),k.on("error",R=>{x(),clearTimeout(M),clearInterval(z),$&&clearInterval($),u(new Error(`Cursor Agent spawn error: ${R.message}
|
|
130
|
+
Binary: ${e}
|
|
131
|
+
This usually means the binary is not in PATH. Try:
|
|
132
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc`))})})}}});import{execFile as zte}from"child_process";import{randomUUID as Ote}from"crypto";import{copyFile as jte,mkdir as pI,readFile as Nte,rm as Cte,writeFile as Vg}from"fs/promises";import{createRequire as Rte}from"module";import{homedir as EI,tmpdir as Ate}from"os";import{dirname as UM,isAbsolute as X2,join as ji,relative as Ute,resolve as Wg,sep as e6}from"path";import{fileURLToPath as Dte}from"url";import{setMaxListeners as Mte}from"events";import{spawn as Fte}from"child_process";import{createInterface as Vte}from"readline";import{homedir as Tne}from"os";import{join as zne}from"path";import{randomUUID as bie}from"crypto";import{appendFile as xie,mkdir as wie}from"fs/promises";import{join as m2}from"path";import{realpathSync as h2}from"fs";import{cwd as Sie}from"process";import{randomUUID as P6}from"crypto";import{appendFile as Oie,mkdir as jie,symlink as Nie,unlink as Cie}from"fs/promises";import{dirname as T6,join as z6}from"path";import*as Le from"fs";import{mkdir as Zie,open as Lie,readdir as Fie,readFile as v2,rename as Vie,rmdir as Wie,rm as Bie,stat as Kie,unlink as Hie}from"fs/promises";import{execFile as goe}from"child_process";import{promisify as voe}from"util";import{createHash as Soe}from"crypto";import{userInfo as $oe}from"os";function Iee(t){return this[t]}function zee(t,e){this[t]=Tee.bind(null,e)}function t6(t=qte){let e=new AbortController;return Mte(t,e.signal),e}function Zte(t,e,r){return new Promise((n,i)=>{if(e?.aborted){r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n();return}let o=setTimeout((s,c,u)=>{s?.removeEventListener("abort",c),u()},t,e,a,n);function a(){clearTimeout(o),r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n()}e?.addEventListener("abort",a,{once:!0}),r?.unref&&o.unref()})}function Lte(t,e){t(Error(e))}function fI(t,e,r){let n,i=new Promise((o,a)=>{n=setTimeout(Lte,e,a,r),typeof n=="object"&&n.unref?.()});return Promise.race([t,i]).finally(()=>{n!==void 0&&clearTimeout(n)})}function r6(){return process.versions.bun!==void 0}function Jte(t){var e=Qte.call(t,Qd),r=t[Qd];try{t[Qd]=void 0;var n=!0}catch{}var i=Yte.call(t);return n&&(e?t[Qd]=r:delete t[Qd]),i}function rre(t){return tre.call(t)}function are(t){return t==null?t===void 0?ore:ire:DM&&DM in Object(t)?Xte(t):nre(t)}function cre(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function fre(t){if(!i6(t))return!1;var e=sre(t);return e==lre||e==dre||e==ure||e==pre}function gre(t){return!!MM&&MM in t}function bre(t){if(t!=null){try{return _re.call(t)}catch{}try{return t+""}catch{}}return""}function Tre(t){if(!i6(t)||vre(t))return!1;var e=mre(t)?Pre:kre;return e.test(xre(t))}function Ore(t,e){return t?.[e]}function Nre(t,e){var r=jre(t,e);return zre(r)?r:void 0}function Rre(){this.__data__=_p?_p(null):{},this.size=0}function Ure(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Lre(t){var e=this.__data__;if(_p){var r=e[t];return r===Mre?void 0:r}return Zre.call(e,t)?e[t]:void 0}function Bre(t){var e=this.__data__;return _p?e[t]!==void 0:Wre.call(e,t)}function Gre(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_p&&e===void 0?Hre:e,this}function bu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Yre(){this.__data__=[],this.size=0}function Xre(t,e){return t===e||t!==t&&e!==e}function tne(t,e){for(var r=t.length;r--;)if(ene(t[r][0],e))return r;return-1}function ine(t){var e=this.__data__,r=Fv(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():nne.call(e,r,1),--this.size,!0}function ane(t){var e=this.__data__,r=Fv(e,t);return r<0?void 0:e[r][1]}function cne(t){return Fv(this.__data__,t)>-1}function lne(t,e){var r=this.__data__,n=Fv(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function xu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function hne(){this.size=0,this.__data__={hash:new qM,map:new(mne||pne),string:new qM}}function vne(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function _ne(t,e){var r=t.__data__;return yne(e)?r[typeof e=="string"?"string":"hash"]:r.map}function bne(t){var e=Vv(this,t).delete(t);return this.size-=e?1:0,e}function wne(t){return Vv(this,t).get(t)}function Sne(t){return Vv(this,t).has(t)}function Ine(t,e){var r=Vv(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function wu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function oE(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Pne);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(oE.Cache||a6),r}function ls(t){if(!t)return!1;if(typeof t=="boolean")return t;let e=String(t).toLowerCase().trim();return["1","true","yes","on"].includes(e)}function he(t,e,r,n,i){if(n==="m")throw TypeError("Private method is not writable");if(n==="a"&&!i)throw TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function Z(t,e,r,n){if(r==="a"&&!n)throw TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function bp(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}function zI(t){return typeof t!="object"?{}:t??{}}function LM(t){if(!t)return!0;for(let e in t)return!1;return!0}function Nne(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Une(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}function Mne(){if(typeof navigator>"u"||!navigator)return null;let t=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:r}of t){let n=r.exec(navigator.userAgent);if(n){let i=n[1]||0,o=n[2]||0,a=n[3]||0;return{browser:e,version:`${i}.${o}.${a}`}}}return null}function Zne(){if(typeof fetch<"u")return fetch;throw Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new Anthropic({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function u6(...t){let e=globalThis.ReadableStream;if(typeof e>"u")throw Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...t)}function l6(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return u6({start(){},async pull(r){let{done:n,value:i}=await e.next();n?r.close():r.enqueue(i)},async cancel(){await e.return?.()}})}function sE(t){if(t[Symbol.asyncIterator])return t;let e=t.getReader();return{async next(){try{let r=await e.read();return r?.done&&e.releaseLock(),r}catch(r){throw e.releaseLock(),r}},async return(){let r=e.cancel();return e.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function Lne(t){if(t===null||typeof t!="object")return;if(t[Symbol.asyncIterator]){await t[Symbol.asyncIterator]().return?.();return}let e=t.getReader(),r=e.cancel();e.releaseLock(),await r}function Vne(t){return Object.entries(t).filter(([e,r])=>typeof r<"u").map(([e,r])=>{if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return`${encodeURIComponent(e)}=${encodeURIComponent(r)}`;if(r===null)return`${encodeURIComponent(e)}=`;throw new Ae(`Cannot stringify type ${typeof r}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}function Wne(t){let e=0;for(let i of t)e+=i.length;let r=new Uint8Array(e),n=0;for(let i of t)r.set(i,n),n+=i.length;return r}function cE(t){let e;return(BM??(e=new globalThis.TextEncoder,BM=e.encode.bind(e)))(t)}function HM(t){let e;return(KM??(e=new globalThis.TextDecoder,KM=e.decode.bind(e)))(t)}function Bne(t,e){for(let r=e??0;r<t.length;r++){if(t[r]===10)return{preceding:r,index:r+1,carriage:!1};if(t[r]===13)return{preceding:r,index:r+1,carriage:!0}}return null}function Kne(t){for(let e=0;e<t.length-1;e++){if(t[e]===10&&t[e+1]===10||t[e]===13&&t[e+1]===13)return e+2;if(t[e]===13&&t[e+1]===10&&e+3<t.length&&t[e+2]===13&&t[e+3]===10)return e+4}return-1}function fp(){}function $g(t,e,r){return!e||cv[t]>cv[r]?fp:e[t].bind(e)}function sn(t){let e=t.logger,r=t.logLevel??"off";if(!e)return Hne;let n=QM.get(e);if(n&&n[0]===r)return n[1];let i={error:$g("error",e,r),warn:$g("warn",e,r),info:$g("info",e,r),debug:$g("debug",e,r)};return QM.set(e,[r,i]),i}async function*Gne(t,e){if(!t.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Ae("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new Ae("Attempted to iterate over a response with no body");let r=new OI,n=new ps,i=sE(t.body);for await(let o of Qne(i))for(let a of n.decode(o)){let s=r.decode(a);s&&(yield s)}for(let o of n.flush()){let a=r.decode(o);a&&(yield a)}}async function*Qne(t){let e=new Uint8Array;for await(let r of t){if(r==null)continue;let n=r instanceof ArrayBuffer?new Uint8Array(r):typeof r=="string"?cE(r):r,i=new Uint8Array(e.length+n.length);i.set(e),i.set(n,e.length),e=i;let o;for(;(o=Kne(e))!==-1;)yield e.slice(0,o),e=e.slice(o)}e.length>0&&(yield e)}function Yne(t,e){let r=t.indexOf(e);return r!==-1?[t.substring(0,r),e,t.substring(r+e.length)]:[t,"",""]}async function d6(t,e){let{response:r,requestLogID:n,retryOfRequestLogID:i,startTime:o}=e,a=await(async()=>{if(e.options.stream)return sn(t).debug("response",r.status,r.url,r.headers,r.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(r,e.controller):fs.fromSSEResponse(r,e.controller);if(r.status===204)return null;if(e.options.__binaryResponse)return r;let s=r.headers.get("content-type")?.split(";")[0]?.trim();if(s?.includes("application/json")||s?.endsWith("+json")){if(r.headers.get("content-length")==="0")return;let c=await r.json();return p6(c,r)}return await r.text()})();return sn(t).debug(`[${n}] response parsed`,us({retryOfRequestLogID:i,url:r.url,status:r.status,body:a,durationMs:Date.now()-o})),a}function p6(t,e){return!t||typeof t!="object"||Array.isArray(t)?t:Object.defineProperty(t,"_request_id",{value:e.headers.get("request-id"),enumerable:!1})}function Xc(t,e,r){return f6(),new File(t,e??"unknown_file",r)}function Bg(t,e){let r=typeof t=="object"&&t!==null&&("name"in t&&t.name&&String(t.name)||"url"in t&&t.url&&String(t.url)||"filename"in t&&t.filename&&String(t.filename)||"path"in t&&t.path&&String(t.path))||"";return e?r.split(/[\\/]/).pop()||void 0:r}function Jne(t){let e=typeof t=="function"?t:t.fetch,r=YM.get(e);if(r)return r;let n=(async()=>{try{let i="Response"in e?e.Response:(await e("data:,")).constructor,o=new FormData;return o.toString()!==await new i(o).text()}catch{return!0}})();return YM.set(e,n),n}async function nie(t,e,r){if(f6(),t=await t,e||(e=Bg(t,!0)),tie(t))return t instanceof File&&e==null&&r==null?t:Xc([await t.arrayBuffer()],e??t.name,{type:t.type,lastModified:t.lastModified,...r});if(rie(t)){let i=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),Xc(await CI(i),e,r)}let n=await CI(t);if(!r?.type){let i=n.find(o=>typeof o=="object"&&"type"in o&&o.type);typeof i=="string"&&(r={...r,type:i})}return Xc(n,e,r)}async function CI(t){let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(h6(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(m6(t))for await(let r of t)e.push(...await CI(r));else{let r=t?.constructor?.name;throw Error(`Unexpected data type: ${typeof t}${r?`; constructor: ${r}`:""}${iie(t)}`)}return e}function iie(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(e=>`"${e}"`).join(", ")}]`}function*oie(t){if(!t)return;if(g6 in t){let{values:n,nulls:i}=t;yield*n.entries();for(let o of i)yield[o,null];return}let e=!1,r;t instanceof Headers?r=t.entries():ZM(t)?r=t:(e=!0,r=Object.entries(t??{}));for(let n of r){let i=n[0];if(typeof i!="string")throw TypeError("expected header name to be a string");let o=ZM(n[1])?n[1]:[n[1]],a=!1;for(let s of o)s!==void 0&&(e&&!a&&(a=!0,yield[i,null]),yield[i,s])}}function Kg(t){return typeof t=="object"&&t!==null&&vp in t}function v6(t,e){let r=new Set;if(t)for(let n of t)Kg(n)&&r.add(n[vp]);if(e){for(let n of e)if(Kg(n)&&r.add(n[vp]),Array.isArray(n.content))for(let i of n.content)Kg(i)&&r.add(i[vp])}return Array.from(r)}function y6(t,e){let r=v6(t,e);return r.length===0?{}:{"x-stainless-helper":r.join(", ")}}function aie(t){return Kg(t)?{"x-stainless-helper":t[vp]}:{}}function _6(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}function x6(t){return t?.output_format??t?.output_config?.format}function XM(t,e,r){let n=x6(e);return!e||!("parse"in(n??{}))?{...t,content:t.content.map(i=>{if(i.type==="text"){let o=Object.defineProperty({...i},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(o,"parsed",{get(){return r.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),null},enumerable:!1})}return i}),parsed_output:null}:w6(t,e,r)}function w6(t,e,r){let n=null,i=t.content.map(o=>{if(o.type==="text"){let a=cie(e,o.text);n===null&&(n=a);let s=Object.defineProperty({...o},"parsed_output",{value:a,enumerable:!1});return Object.defineProperty(s,"parsed",{get(){return r.logger.warn("The `parsed` property on `text` blocks is deprecated, please use `parsed_output` instead."),a},enumerable:!1})}return o});return{...t,content:i,parsed_output:n}}function cie(t,e){let r=x6(t);if(r?.type!=="json_schema")return null;try{return"parse"in r?r.parse(e):JSON.parse(e)}catch(n){throw new Ae(`Failed to parse structured output: ${n}`)}}function n2(t){return t.type==="tool_use"||t.type==="server_tool_use"||t.type==="mcp_tool_use"}function o2(){let t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}async function mie(t,e=t.messages.at(-1)){if(!e||e.role!=="assistant"||!e.content||typeof e.content=="string")return null;let r=e.content.filter(n=>n.type==="tool_use");return r.length===0?null:{role:"user",content:await Promise.all(r.map(async n=>{let i=t.tools.find(o=>("name"in o?o.name:o.mcp_server_name)===n.name);if(!i||!("run"in i))return{type:"tool_result",tool_use_id:n.id,content:`Error: Tool '${n.name}' not found`,is_error:!0};try{let o=n.input;"parse"in i&&i.parse&&(o=i.parse(o));let a=await i.run(o);return{type:"tool_result",tool_use_id:n.id,content:a}}catch(o){return{type:"tool_result",tool_use_id:n.id,content:o instanceof mv?o.content:`Error: ${o instanceof Error?o.message:String(o)}`,is_error:!0}}}))}}function s2(t){if(!t.output_format)return t;if(t.output_config?.format)throw new Ae("Both output_format and output_config.format were provided. Please use only output_config.format (output_format is deprecated).");let{output_format:e,...r}=t;return{...r,output_config:{...t.output_config,format:e}}}function S6(t){return t?.output_config?.format}function c2(t,e,r){let n=S6(e);return!e||!("parse"in(n??{}))?{...t,content:t.content.map(i=>i.type==="text"?Object.defineProperty({...i},"parsed_output",{value:null,enumerable:!1}):i),parsed_output:null}:$6(t,e,r)}function $6(t,e,r){let n=null,i=t.content.map(o=>{if(o.type==="text"){let a=gie(e,o.text);return n===null&&(n=a),Object.defineProperty({...o},"parsed_output",{value:a,enumerable:!1})}return o});return{...t,content:i,parsed_output:n}}function gie(t,e){let r=S6(t);if(r?.type!=="json_schema")return null;try{return"parse"in r?r.parse(e):JSON.parse(e)}catch(n){throw new Ae(`Failed to parse structured output: ${n}`)}}function p2(t){return t.type==="tool_use"||t.type==="server_tool_use"}function E6(t){return t instanceof Error?t:Error(String(t))}function Gg(t){return t instanceof Error?t.message:String(t)}function yp(t){if(t&&typeof t=="object"&&"code"in t&&typeof t.code=="string")return t.code}function dE(t){return yp(t)==="ENOENT"}function kie(){if(Kc)return Kc;if(!ls(process.env.DEBUG_CLAUDE_AGENT_SDK))return eu=null,Kc=Promise.resolve(),Kc;let t=m2(aE(),"debug");return eu=m2(t,`sdk-${bie()}.txt`),process.stderr.write(`SDK debug logs: ${eu}
|
|
133
|
+
`),Kc=wie(t,{recursive:!0}).then(()=>{}).catch(()=>{}),Kc}function ro(t){if(eu===null)return;let e=`${new Date().toISOString()} ${t}
|
|
134
|
+
`;kie().then(()=>{eu&&xie(eu,e).catch(()=>{})})}function pE(){let t=new Set;return{subscribe(e){return t.add(e),()=>{t.delete(e)}},emit(...e){let r;for(let n of t)try{n(...e)}catch(i){(r??=[]).push(i)}if(r)throw r.length===1?r[0]:AggregateError(r,"Signal listener(s) threw")},clear(){t.clear()}}}function $ie(){let t="";if(typeof process<"u"&&typeof process.cwd=="function"&&typeof h2=="function"){let e=Sie();try{t=h2(e).normalize("NFC")}catch{t=e.normalize("NFC")}}return{originalCwd:t,projectRoot:t,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:t,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,hasStreamingInput:!1,kairosActive:!1,strictToolResultPairing:!1,memoryToggledOff:!1,teamMemoryServerStatus:void 0,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:"cli",sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:["userSettings","projectSettings","localSettings","flagSettings","policySettings"],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:P6(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],loopChainStartedAt:Object.create(null),sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,sdkOAuthTokenRefreshCallback:null,mainThreadAgentType:void 0,isRemoteMode:!1,directConnectServerUrl:void 0,activeRoutine:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,thinkingClearLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function Eie(){return Iie.sessionId}function Rie({writeFn:t,flushIntervalMs:e=1e3,maxBufferSize:r=100,maxBufferBytes:n=1/0,immediateMode:i=!1}){let o=[],a=0,s=null,c=null;function u(){s&&(clearTimeout(s),s=null)}function l(){c&&(t(c.join("")),c=null),o.length!==0&&(t(o.join("")),o=[],a=0,u())}function d(){s||(s=setTimeout(l,e))}function p(){if(c){c.push(...o),o=[],a=0,u();return}let f=o;o=[],a=0,u(),c=f,setImmediate(()=>{let m=c;c=null,m&&t(m.join(""))})}return{write(f){if(i){t(f);return}o.push(f),a+=f.length,d(),(o.length>=r||a>=n)&&p()},flush:l,dispose(){l()}}}function Aie(t){return g2.add(t),()=>g2.delete(t)}function Die(t){let e=[],r=t.match(/^MCP server ["']([^"']+)["']/);if(r&&r[1])e.push("mcp"),e.push(r[1].toLowerCase());else{let o=t.match(/^([^:[]+):/);o&&o[1]&&e.push(o[1].trim().toLowerCase())}let n=t.match(/^\[([^\]]+)]/);n&&n[1]&&e.push(n[1].trim().toLowerCase()),t.toLowerCase().includes("1p event:")&&e.push("1p");let i=t.match(/:\s*([^:]+?)(?:\s+(?:type|mode|status|event))?:/);if(i&&i[1]){let o=i[1].trim().toLowerCase();o.length<30&&!o.includes(" ")&&e.push(o)}return Array.from(new Set(e))}function Mie(t,e){return e?t.length===0?!1:e.isExclusive?!t.some(r=>e.exclude.includes(r)):t.some(r=>e.include.includes(r)):!0}function qie(t,e){if(!e)return!0;let r=Die(t);return Mie(r,e)}function y2(){return Qie}function Yie(t,e){t.destroyed||t.write(e)}function Jie(t){Yie(process.stderr,t)}function roe(t){if(!qI()||typeof process>"u"||typeof process.versions>"u"||typeof process.versions.node>"u")return!1;let e=toe();return qie(t,e)}async function ioe(t,e,r,n){t&&await jie(e,{recursive:!0}).catch(()=>{}),await Oie(r,n),C6()}function ooe(){}function aoe(){if(!Zg){let t=null;Zg=Rie({writeFn:e=>{let r=N6(),n=T6(r),i=t!==n;if(t=n,qI()){if(i)try{y2().mkdirSync(n)}catch{}y2().appendFileSync(r,e),C6();return}SI=SI.then(ioe.bind(null,i,n,r,e)).catch(ooe)},flushIntervalMs:1e3,maxBufferSize:100,immediateMode:qI()}),Aie(async()=>{Zg?.dispose(),await SI})}return Zg}function Wn(t,{level:e}={level:"debug"}){if(MI[e]<MI[Xie()]||!roe(t))return;noe&&t.includes(`
|
|
135
|
+
`)&&(t=wn(t));let r=`${new Date().toISOString()} [${e.toUpperCase()}] ${t.trim()}
|
|
136
|
+
`;if(O6()){Jie(r);return}aoe().write(r)}function N6(){return j6()??process.env.CLAUDE_CODE_DEBUG_LOGS_DIR??z6(aE(),"debug",`${Eie()}.txt`)}function coe(){return soe}function wn(t,e,r){let n=[];try{let a=ar(n,cr`JSON.stringify(${t})`,0);return JSON.stringify(t,e,r)}catch(a){var i=a,o=1}finally{sr(n,i,o)}}function uoe(t){let e=t.trim();return e.startsWith("{")&&e.endsWith("}")}function loe(t,e){let r={...t};if(e){let n=e.enabled===!0&&e.failIfUnavailable===void 0?{...e,failIfUnavailable:!0}:e,i=r.settings;if(i&&!uoe(i))throw Error("Cannot use both a settings file path and the sandbox option. Include the sandbox configuration in your settings file instead.");let o={sandbox:n};if(i)try{o={...fE(i),sandbox:n}}catch{}r.settings=wn(o)}return r}function poe(){for(let t of wv)t.killed||t.kill("SIGTERM")}function foe(t){wv.add(t),!_2&&(_2=!0,process.on("exit",poe))}function moe(t){return![".js",".mjs",".tsx",".ts",".jsx"].some(e=>t.endsWith(e))}function hoe(t,e=process.platform,r=process.arch){let n;e==="linux"?n=[`@anthropic-ai/claude-agent-sdk-linux-${r}-musl/cli`,`@anthropic-ai/claude-agent-sdk-linux-${r}/cli`]:e==="win32"?n=[`@anthropic-ai/claude-agent-sdk-win32-${r}/cli.exe`]:n=[`@anthropic-ai/claude-agent-sdk-${e}-${r}/cli`];for(let i of n)try{return t(i)}catch{}return null}function yoe(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r)|0;return e}function boe(t){return typeof t!="string"?null:_oe.test(t)?t:null}function xoe(t){return Math.abs(yoe(t)).toString(36)}function woe(t){let e=t.replace(/[^a-zA-Z0-9]/g,"-");return e.length<=b2?e:`${e.slice(0,b2)}-${xoe(t)}`}function Ioe(){return"prod"}function joe(){let t=process.env.CLAUDE_LOCAL_OAUTH_API_BASE?.replace(/\/$/,"")??"http://localhost:8000",e=process.env.CLAUDE_LOCAL_OAUTH_APPS_BASE?.replace(/\/$/,"")??"http://localhost:4000",r=process.env.CLAUDE_LOCAL_OAUTH_CONSOLE_BASE?.replace(/\/$/,"")??"http://localhost:3000";return{BASE_API_URL:t,CONSOLE_AUTHORIZE_URL:`${r}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${e}/oauth/authorize`,CLAUDE_AI_ORIGIN:e,TOKEN_URL:`${t}/v1/oauth/token`,API_KEY_URL:`${t}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${t}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${r}/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,CLAUDEAI_SUCCESS_URL:`${r}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${r}/oauth/code/callback`,CLIENT_ID:"22422756-60c9-4084-8eb7-27705fd5cf9a",OAUTH_FILE_SUFFIX:"-local-oauth",MCP_PROXY_URL:"http://localhost:8205",MCP_PROXY_PATH:"/v1/toolbox/shttp/mcp/{server_id}"}}function Coe(){let t=(()=>{switch(Ioe()){case"local":return joe();case"staging":return Ooe??x2;case"prod":return x2}})(),e=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(e){let n=e.replace(/\/$/,"");if(!Noe.includes(n))throw Error("CLAUDE_CODE_CUSTOM_OAUTH_URL is not an approved endpoint.");t={...t,BASE_API_URL:n,CONSOLE_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_AUTHORIZE_URL:`${n}/oauth/authorize`,CLAUDE_AI_ORIGIN:n,TOKEN_URL:`${n}/v1/oauth/token`,API_KEY_URL:`${n}/api/oauth/claude_cli/create_api_key`,ROLES_URL:`${n}/api/oauth/claude_cli/roles`,CONSOLE_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,CLAUDEAI_SUCCESS_URL:`${n}/oauth/code/success?app=claude-code`,MANUAL_REDIRECT_URL:`${n}/oauth/code/callback`,OAUTH_FILE_SUFFIX:"-custom-oauth"}}let r=process.env.CLAUDE_CODE_OAUTH_CLIENT_ID;return r&&(t={...t,CLIENT_ID:r}),t}function Aoe(t=""){let e=aE(),r=process.env.CLAUDE_CONFIG_DIR?`-${Soe("sha256").update(e).digest("hex").substring(0,8)}`:"";return`Claude Code${Coe().OAUTH_FILE_SUFFIX}${t}${r}`}function Uoe(){try{return process.env.USER||$oe().username}catch{return"claude-code-user"}}function BI(){return Moe}function ue(t,e){let r=BI(),n=KI({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===kp?void 0:kp].filter(i=>!!i)});t.common.issues.push(n)}function We(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,a)=>{let{message:s}=t;return o.code==="invalid_enum_value"?{message:s??a.defaultError}:typeof a.data>"u"?{message:s??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:s??r??a.defaultError}},description:i}}function U6(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function rae(t){return new RegExp(`^${U6(t)}$`)}function nae(t){let e=`${A6}T${U6(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function iae(t,e){return!!((e==="v4"||!e)&&Goe.test(t)||(e==="v6"||!e)&&Yoe.test(t))}function oae(t,e){if(!Woe.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function aae(t,e){return!!((e==="v4"||!e)&&Qoe.test(t)||(e==="v6"||!e)&&Joe.test(t))}function sae(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}function Qc(t){if(t instanceof Gn){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Ni.create(Qc(n))}return new Gn({...t._def,shape:()=>e})}else return t instanceof va?new va({...t._def,type:Qc(t.element)}):t instanceof Ni?Ni.create(Qc(t.unwrap())):t instanceof Co?Co.create(Qc(t.unwrap())):t instanceof No?No.create(t.items.map(e=>Qc(e))):t}function GI(t,e){let r=fa(t),n=fa(e);if(t===e)return{valid:!0,data:t};if(r===ve.object&&n===ve.object){let i=St.objectKeys(e),o=St.objectKeys(t).filter(s=>i.indexOf(s)!==-1),a={...t,...e};for(let s of o){let c=GI(t[s],e[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===ve.array&&n===ve.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],s=e[o],c=GI(a,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===ve.date&&n===ve.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function D6(t,e){return new pu({values:t,typeName:Re.ZodEnum,...We(e)})}function U(t,e,r){function n(s,c){var u;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(u=s._zod).traits??(u.traits=new Set),s._zod.traits.add(t),e(s,c);for(let l in a.prototype)l in s||Object.defineProperty(s,l,{value:a.prototype[l].bind(s)});s._zod.constr=a,s._zod.def=c}let i=r?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function a(s){var c;let u=r?.Parent?new o:this;n(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}function dn(t){return t&&Object.assign(Iv,t),Iv}function cae(t){return t}function uae(t){return t}function lae(t){}function dae(t){throw Error()}function pae(t){}function mE(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,n])=>e.indexOf(+r)===-1).map(([r,n])=>n)}function oe(t,e="|"){return t.map(r=>Ge(r)).join(e)}function L6(t,e){return typeof e=="bigint"?e.toString():e}function Wv(t){return{get value(){{let e=t();return Object.defineProperty(this,"value",{value:e}),e}throw Error("cached value already set")}}}function bs(t){return t==null}function Bv(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function F6(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}function Ot(t,e,r){Object.defineProperty(t,e,{get(){{let n=r();return t[e]=n,n}throw Error("cached value already set")},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function hE(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function fae(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function mae(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function hae(t=10){let e="";for(let r=0;r<t;r++)e+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return e}function Yc(t){return JSON.stringify(t)}function Cp(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Rp(t){if(Cp(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(Cp(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function gae(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function xs(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Di(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r?.parent)&&(n._zod.parent=t),n}function re(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function yae(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function Ge(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function B6(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function _ae(t,e){let r={},n=t._zod.def;for(let i in e){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);e[i]&&(r[i]=n.shape[i])}return Di(t,{...t._zod.def,shape:r,checks:[]})}function bae(t,e){let r={...t._zod.def.shape},n=t._zod.def;for(let i in e){if(!(i in n.shape))throw Error(`Unrecognized key: "${i}"`);e[i]&&delete r[i]}return Di(t,{...t._zod.def,shape:r,checks:[]})}function xae(t,e){if(!Rp(e))throw Error("Invalid input to extend: expected a plain object");let r={...t._zod.def,get shape(){let n={...t._zod.def.shape,...e};return hE(this,"shape",n),n},checks:[]};return Di(t,r)}function wae(t,e){return Di(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return hE(this,"shape",r),r},catchall:e._zod.def.catchall,checks:[]})}function kae(t,e,r){let n=e._zod.def.shape,i={...n};if(r)for(let o in r){if(!(o in n))throw Error(`Unrecognized key: "${o}"`);r[o]&&(i[o]=t?new t({type:"optional",innerType:n[o]}):n[o])}else for(let o in n)i[o]=t?new t({type:"optional",innerType:n[o]}):n[o];return Di(e,{...e._zod.def,shape:i,checks:[]})}function Sae(t,e,r){let n=e._zod.def.shape,i={...n};if(r)for(let o in r){if(!(o in i))throw Error(`Unrecognized key: "${o}"`);r[o]&&(i[o]=new t({type:"nonoptional",innerType:n[o]}))}else for(let o in n)i[o]=new t({type:"nonoptional",innerType:n[o]});return Di(e,{...e._zod.def,shape:i,checks:[]})}function tu(t,e=0){for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function si(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function gp(t){return typeof t=="string"?t:t?.message}function Ai(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=gp(t.inst?._zod.def?.error?.(t))??gp(e?.error?.(t))??gp(r.customError?.(t))??gp(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,!e?.reportInput&&delete n.input,n}function Kv(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Hv(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function G6(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function $ae(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function yE(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function _E(t,e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s}));else if(a.code==="invalid_key")i({issues:a.issues});else if(a.code==="invalid_element")i({issues:a.issues});else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){let u=a.path[c];c!==a.path.length-1?s[u]=s[u]||{_errors:[]}:(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(a))),s=s[u],c++}}};return i(t),n}function Y6(t,e){let r=e||function(o){return o.message},n={errors:[]},i=(o,a=[])=>{var s,c;for(let u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},u.path));else if(u.code==="invalid_key")i({issues:u.issues},u.path);else if(u.code==="invalid_element")i({issues:u.issues},u.path);else{let l=[...a,...u.path];if(l.length===0){n.errors.push(r(u));continue}let d=n,p=0;for(;p<l.length;){let f=l[p],m=p===l.length-1;typeof f=="string"?(d.properties??(d.properties={}),(s=d.properties)[f]??(s[f]={errors:[]}),d=d.properties[f]):(d.items??(d.items=[]),(c=d.items)[f]??(c[f]={errors:[]}),d=d.items[f]),m&&d.errors.push(r(u)),p++}}};return i(t),n}function J6(t){let e=[];for(let r of t)typeof r=="number"?e.push(`[${r}]`):typeof r=="symbol"?e.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?e.push(`[${JSON.stringify(r)}]`):(e.length&&e.push("."),e.push(r));return e.join("")}function X6(t){let e=[],r=[...t.issues].sort((n,i)=>n.path.length-i.path.length);for(let n of r)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${J6(n.path)}`);return e.join(`
|
|
137
|
+
`)}function uq(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}function _q(t){return typeof t.precision=="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${t.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function bq(t){return new RegExp(`^${_q(t)}$`)}function xq(t){let e=_q({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${vq}T(?:${n})$`)}function I2(t,e,r){t.issues.length&&e.issues.push(...si(r,t.issues))}function zE(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function vZ(t){if(!EE.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return zE(r)}function bZ(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}function E2(t,e,r){t.issues.length&&e.issues.push(...si(r,t.issues)),e.value[r]=t.value}function Lg(t,e,r){t.issues.length&&e.issues.push(...si(r,t.issues)),e.value[r]=t.value}function P2(t,e,r,n){t.issues.length?n[r]===void 0?r in n?e.value[r]=void 0:e.value[r]=t.value:e.issues.push(...si(r,t.issues)):t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function T2(t,e,r,n){for(let i of t)if(i.issues.length===0)return e.value=i.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(i=>i.issues.map(o=>Ai(o,n,dn())))}),e}function XI(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Rp(t)&&Rp(e)){let r=Object.keys(e),n=Object.keys(t).filter(o=>r.indexOf(o)!==-1),i={...t,...e};for(let o of n){let a=XI(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[n],a=XI(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function z2(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),tu(t))return t;let n=XI(e.value,r.value);if(!n.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return t.value=n.data,t}function Fg(t,e,r){t.issues.length&&e.issues.push(...si(r,t.issues)),e.value[r]=t.value}function O2(t,e,r,n,i,o,a){t.issues.length&&(Ev.has(typeof n)?r.issues.push(...si(n,t.issues)):r.issues.push({origin:"map",code:"invalid_key",input:i,inst:o,issues:t.issues.map(s=>Ai(s,a,dn()))})),e.issues.length&&(Ev.has(typeof n)?r.issues.push(...si(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:e.issues.map(s=>Ai(s,a,dn()))})),r.value.set(t.value,e.value)}function j2(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function N2(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function C2(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}function R2(t,e,r){return tu(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}function A2(t){return t.value=Object.freeze(t.value),t}function U2(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(G6(i))}}function Uae(){return{localeError:Aae()}}function Mae(){return{localeError:Dae()}}function D2(t,e,r,n){let i=Math.abs(t),o=i%10,a=i%100;return a>=11&&a<=19?n:o===1?e:o>=2&&o<=4?r:n}function Zae(){return{localeError:qae()}}function Fae(){return{localeError:Lae()}}function Wae(){return{localeError:Vae()}}function Kae(){return{localeError:Bae()}}function XZ(){return{localeError:Gae()}}function Jae(){return{localeError:Yae()}}function ese(){return{localeError:Xae()}}function rse(){return{localeError:tse()}}function ise(){return{localeError:nse()}}function ase(){return{localeError:ose()}}function cse(){return{localeError:sse()}}function lse(){return{localeError:use()}}function pse(){return{localeError:dse()}}function mse(){return{localeError:fse()}}function gse(){return{localeError:hse()}}function yse(){return{localeError:vse()}}function bse(){return{localeError:_se()}}function wse(){return{localeError:xse()}}function Sse(){return{localeError:kse()}}function Ise(){return{localeError:$se()}}function Pse(){return{localeError:Ese()}}function zse(){return{localeError:Tse()}}function jse(){return{localeError:Ose()}}function Cse(){return{localeError:Nse()}}function Ase(){return{localeError:Rse()}}function Dse(){return{localeError:Use()}}function M2(t,e,r,n){let i=Math.abs(t),o=i%10,a=i%100;return a>=11&&a<=19?n:o===1?e:o>=2&&o<=4?r:n}function qse(){return{localeError:Mse()}}function Lse(){return{localeError:Zse()}}function Vse(){return{localeError:Fse()}}function Bse(){return{localeError:Wse()}}function Hse(){return{localeError:Kse()}}function Yse(){return{localeError:Qse()}}function Xse(){return{localeError:Jse()}}function tce(){return{localeError:ece()}}function nce(){return{localeError:rce()}}function oce(){return{localeError:ice()}}function sce(){return{localeError:ace()}}function qE(){return new Ap}function rL(t,e){return new t({type:"string",...re(e)})}function nL(t,e){return new t({type:"string",coerce:!0,...re(e)})}function ZE(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...re(e)})}function jv(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...re(e)})}function LE(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...re(e)})}function FE(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(e)})}function VE(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(e)})}function WE(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(e)})}function BE(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...re(e)})}function KE(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...re(e)})}function HE(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(e)})}function GE(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...re(e)})}function QE(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(e)})}function YE(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...re(e)})}function JE(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...re(e)})}function XE(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(e)})}function eP(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(e)})}function tP(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(e)})}function rP(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(e)})}function nP(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(e)})}function iP(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...re(e)})}function oP(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...re(e)})}function aP(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...re(e)})}function sP(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...re(e)})}function oL(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(e)})}function aL(t,e){return new t({type:"string",format:"date",check:"string_format",...re(e)})}function sL(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...re(e)})}function cL(t,e){return new t({type:"string",format:"duration",check:"string_format",...re(e)})}function uL(t,e){return new t({type:"number",checks:[],...re(e)})}function lL(t,e){return new t({type:"number",coerce:!0,checks:[],...re(e)})}function dL(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...re(e)})}function pL(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...re(e)})}function fL(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...re(e)})}function mL(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...re(e)})}function hL(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...re(e)})}function gL(t,e){return new t({type:"boolean",...re(e)})}function vL(t,e){return new t({type:"boolean",coerce:!0,...re(e)})}function yL(t,e){return new t({type:"bigint",...re(e)})}function _L(t,e){return new t({type:"bigint",coerce:!0,...re(e)})}function bL(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...re(e)})}function xL(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...re(e)})}function wL(t,e){return new t({type:"symbol",...re(e)})}function kL(t,e){return new t({type:"undefined",...re(e)})}function SL(t,e){return new t({type:"null",...re(e)})}function $L(t){return new t({type:"any"})}function Nv(t){return new t({type:"unknown"})}function IL(t,e){return new t({type:"never",...re(e)})}function EL(t,e){return new t({type:"void",...re(e)})}function PL(t,e){return new t({type:"date",...re(e)})}function TL(t,e){return new t({type:"date",coerce:!0,...re(e)})}function zL(t,e){return new t({type:"nan",...re(e)})}function vs(t,e){return new PE({check:"less_than",...re(e),value:t,inclusive:!1})}function Ci(t,e){return new PE({check:"less_than",...re(e),value:t,inclusive:!0})}function ys(t,e){return new TE({check:"greater_than",...re(e),value:t,inclusive:!1})}function Bn(t,e){return new TE({check:"greater_than",...re(e),value:t,inclusive:!0})}function OL(t){return ys(0,t)}function jL(t){return vs(0,t)}function NL(t){return Ci(0,t)}function CL(t){return Bn(0,t)}function Up(t,e){return new jq({check:"multiple_of",...re(e),value:t})}function Qv(t,e){return new Rq({check:"max_size",...re(e),maximum:t})}function Dp(t,e){return new Aq({check:"min_size",...re(e),minimum:t})}function cP(t,e){return new Uq({check:"size_equals",...re(e),size:t})}function Yv(t,e){return new Dq({check:"max_length",...re(e),maximum:t})}function yu(t,e){return new Mq({check:"min_length",...re(e),minimum:t})}function Jv(t,e){return new qq({check:"length_equals",...re(e),length:t})}function uP(t,e){return new Zq({check:"string_format",format:"regex",...re(e),pattern:t})}function lP(t){return new Lq({check:"string_format",format:"lowercase",...re(t)})}function dP(t){return new Fq({check:"string_format",format:"uppercase",...re(t)})}function pP(t,e){return new Vq({check:"string_format",format:"includes",...re(e),includes:t})}function fP(t,e){return new Wq({check:"string_format",format:"starts_with",...re(e),prefix:t})}function mP(t,e){return new Bq({check:"string_format",format:"ends_with",...re(e),suffix:t})}function RL(t,e,r){return new Kq({check:"property",property:t,schema:e,...re(r)})}function hP(t,e){return new Hq({check:"mime_type",mime:t,...re(e)})}function ws(t){return new Gq({check:"overwrite",tx:t})}function gP(t){return ws(e=>e.normalize(t))}function vP(){return ws(t=>t.trim())}function yP(){return ws(t=>t.toLowerCase())}function _P(){return ws(t=>t.toUpperCase())}function bP(t,e,r){return new t({type:"array",element:e,...re(r)})}function cce(t,e,r){return new t({type:"union",options:e,...re(r)})}function uce(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...re(n)})}function lce(t,e,r){return new t({type:"intersection",left:e,right:r})}function AL(t,e,r,n){let i=r instanceof Fe;return new t({type:"tuple",items:e,rest:i?r:null,...re(i?n:r)})}function dce(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...re(n)})}function pce(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...re(n)})}function fce(t,e,r){return new t({type:"set",valueType:e,...re(r)})}function mce(t,e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new t({type:"enum",entries:n,...re(r)})}function hce(t,e,r){return new t({type:"enum",entries:e,...re(r)})}function gce(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...re(r)})}function UL(t,e){return new t({type:"file",...re(e)})}function vce(t,e){return new t({type:"transform",transform:e})}function yce(t,e){return new t({type:"optional",innerType:e})}function _ce(t,e){return new t({type:"nullable",innerType:e})}function bce(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}function xce(t,e,r){return new t({type:"nonoptional",innerType:e,...re(r)})}function wce(t,e){return new t({type:"success",innerType:e})}function kce(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function Sce(t,e,r){return new t({type:"pipe",in:e,out:r})}function $ce(t,e){return new t({type:"readonly",innerType:e})}function Ice(t,e,r){return new t({type:"template_literal",parts:e,...re(r)})}function Ece(t,e){return new t({type:"lazy",getter:e})}function Pce(t,e){return new t({type:"promise",innerType:e})}function DL(t,e,r){let n=re(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function ML(t,e,r){return new t({type:"custom",check:"custom",fn:e,...re(r)})}function qL(t,e){let r=re(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let o=new Set(n),a=new Set(i),s=t.Pipe??DE,c=t.Boolean??jE,u=t.String??Fp,l=new(t.Transform??UE)({type:"transform",transform:(p,f)=>{let m=p;return r.case!=="sensitive"&&(m=m.toLowerCase()),o.has(m)?!0:a.has(m)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:f.value,inst:l}),{})},error:r.error}),d=new s({type:"pipe",in:new u({type:"string",error:r.error}),out:l,error:r.error});return new s({type:"pipe",in:d,out:new c({type:"boolean",error:r.error}),error:r.error})}function ZL(t,e,r,n={}){let i=re(n),o={...re(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:a=>r.test(a),...i};return r instanceof RegExp&&(o.pattern=r),new t(o)}function LL(t){return new Cv({type:"function",input:Array.isArray(t?.input)?AL(Gv,t?.input):t?.input??bP(CE,Nv(Ov)),output:t?.output??Nv(Ov)})}function FL(t,e){if(t instanceof Ap){let n=new Mp(e),i={};for(let s of t._idmap.entries()){let[c,u]=s;n.process(u)}let o={},a={registry:t,uri:e?.uri||(s=>s),defs:i};for(let s of t._idmap.entries()){let[c,u]=s;o[c]=n.emit(u,{...e,external:a})}if(Object.keys(i).length>0){let s=n.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[s]:i}}return{schemas:o}}let r=new Mp(e);return r.process(t),r.emit(t,e)}function xr(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return xr(n.element,r);case"object":{for(let i in n.shape)if(xr(n.shape[i],r))return!0;return!1}case"union":{for(let i of n.options)if(xr(i,r))return!0;return!1}case"intersection":return xr(n.left,r)||xr(n.right,r);case"tuple":{for(let i of n.items)if(xr(i,r))return!0;return!!(n.rest&&xr(n.rest,r))}case"record":return xr(n.keyType,r)||xr(n.valueType,r);case"map":return xr(n.keyType,r)||xr(n.valueType,r);case"set":return xr(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return xr(n.innerType,r);case"lazy":return xr(n.getter(),r);case"default":return xr(n.innerType,r);case"prefault":return xr(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return xr(n.in,r)||xr(n.out,r);case"success":return!1;case"catch":return!1;default:}throw Error(`Unknown schema type: ${n.type}`)}function VL(t){return oL(wP,t)}function WL(t){return aL(kP,t)}function BL(t){return sL(SP,t)}function KL(t){return cL($P,t)}function H(t){return rL(Xv,t)}function jce(t){return ZE(EP,t)}function Nce(t){return jv(Rv,t)}function Cce(t){return LE(jo,t)}function Rce(t){return FE(jo,t)}function Ace(t){return VE(jo,t)}function Uce(t){return WE(jo,t)}function Dce(t){return BE(PP,t)}function Mce(t){return KE(TP,t)}function qce(t){return HE(zP,t)}function Zce(t){return GE(OP,t)}function Lce(t){return QE(jP,t)}function Fce(t){return YE(NP,t)}function Vce(t){return JE(CP,t)}function Wce(t){return XE(RP,t)}function Bce(t){return eP(AP,t)}function Kce(t){return tP(UP,t)}function Hce(t){return rP(DP,t)}function Gce(t){return nP(MP,t)}function Qce(t){return iP(qP,t)}function Yce(t){return oP(ZP,t)}function Jce(t){return aP(LP,t)}function Xce(t){return sP(FP,t)}function eue(t,e,r={}){return ZL(XL,t,e,r)}function zt(t){return uL(ey,t)}function eE(t){return dL(ku,t)}function tue(t){return pL(ku,t)}function rue(t){return fL(ku,t)}function nue(t){return mL(ku,t)}function iue(t){return hL(ku,t)}function wr(t){return gL(ty,t)}function oue(t){return yL(ry,t)}function aue(t){return bL(VP,t)}function sue(t){return xL(VP,t)}function cue(t){return wL(eF,t)}function uue(t){return kL(tF,t)}function WP(t){return SL(rF,t)}function lue(){return $L(nF)}function rr(){return Nv(iF)}function ny(t){return IL(oF,t)}function due(t){return EL(aF,t)}function pue(t){return PL(BP,t)}function mt(t,e){return bP(sF,t,e)}function fue(t){let e=t._zod.def.shape;return Se(Object.keys(e))}function ge(t,e){let r={type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},...ft.normalizeParams(e)};return new iy(r)}function mue(t,e){return new iy({type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},catchall:ny(),...ft.normalizeParams(e)})}function cn(t,e){return new iy({type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},catchall:rr(),...ft.normalizeParams(e)})}function Lt(t,e){return new KP({type:"union",options:t,...ft.normalizeParams(e)})}function HP(t,e,r){return new cF({type:"union",options:e,discriminator:t,...ft.normalizeParams(r)})}function oy(t,e){return new uF({type:"intersection",left:t,right:e})}function hue(t,e,r){let n=e instanceof Fe,i=n?r:e;return new lF({type:"tuple",items:t,rest:n?e:null,...ft.normalizeParams(i)})}function Zt(t,e,r){return new GP({type:"record",keyType:t,valueType:e,...ft.normalizeParams(r)})}function gue(t,e,r){return new GP({type:"record",keyType:Lt([t,ny()]),valueType:e,...ft.normalizeParams(r)})}function vue(t,e,r){return new dF({type:"map",keyType:t,valueType:e,...ft.normalizeParams(r)})}function yue(t,e){return new pF({type:"set",valueType:t,...ft.normalizeParams(e)})}function Sn(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new qp({type:"enum",entries:r,...ft.normalizeParams(e)})}function _ue(t,e){return new qp({type:"enum",entries:t,...ft.normalizeParams(e)})}function Se(t,e){return new fF({type:"literal",values:Array.isArray(t)?t:[t],...ft.normalizeParams(e)})}function bue(t){return UL(mF,t)}function YP(t){return new QP({type:"transform",transform:t})}function Qt(t){return new JP({type:"optional",innerType:t})}function Av(t){return new hF({type:"nullable",innerType:t})}function xue(t){return Qt(Av(t))}function vF(t,e){return new gF({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function _F(t,e){return new yF({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function bF(t,e){return new XP({type:"nonoptional",innerType:t,...ft.normalizeParams(e)})}function wue(t){return new xF({type:"success",innerType:t})}function kF(t,e){return new wF({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function kue(t){return zL(SF,t)}function Uv(t,e){return new eT({type:"pipe",in:t,out:e})}function IF(t){return new $F({type:"readonly",innerType:t})}function Sue(t,e){return new EF({type:"template_literal",parts:t,...ft.normalizeParams(e)})}function TF(t){return new PF({type:"lazy",getter:t})}function $ue(t){return new zF({type:"promise",innerType:t})}function OF(t,e){let r=new dr({check:"custom",...ft.normalizeParams(e)});return r._zod.check=t,r}function jF(t,e){return DL(ay,t??(()=>!0),e)}function NF(t,e={}){return ML(ay,t,e)}function CF(t,e){let r=OF(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(ft.issue(i,n.value,r._zod.def));else{let o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),n.issues.push(ft.issue(o))}},t(n.value,n)),e);return r}function Iue(t,e={error:`Input not instance of ${t.name}`}){let r=new ay({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...ft.normalizeParams(e)});return r._zod.bag.Class=t,r}function Pue(t){let e=TF(()=>Lt([H(t),zt(),wr(),WP(),mt(e),Zt(H(),e)]));return e}function tT(t,e){return Uv(YP(t),e)}function zue(t){dn({customError:t})}function Oue(){return dn().customError}function jue(t){return nL(Xv,t)}function Nue(t){return lL(ey,t)}function Cue(t){return vL(ty,t)}function Rue(t){return _L(ry,t)}function Aue(t){return TL(BP,t)}function Ede(t){let e;return()=>e??=t()}async function Pde(t,e){try{await jte(t,e)}catch(r){if(!dE(r))throw r}}async function Tde(t,e){if(!t)return;let r=t;try{let n=fE(t);n?.claudeAiOauth?.refreshToken&&(delete n.claudeAiOauth.refreshToken,r=wn(n))}catch{}await Vg(e,r,{mode:384})}function zde(){if(process.platform!=="darwin")return Promise.resolve(void 0);let t=Aoe(Roe);return new Promise(e=>{zte("security",["find-generic-password","-a",Uoe(),"-w","-s",t],{encoding:"utf-8",timeout:5e3},(r,n)=>e(r?void 0:n.trim()||void 0))})}async function Ode(t,e,r,n,i=6e4){if(!boe(e))return;let o=Wg(r??"."),a=woe(o),s=await fI(t.load({projectKey:a,sessionId:e}),i,`SessionStore.load() timed out after ${i}ms for session ${e}`);if(!s||s.length===0)return;let c=ji(Ate(),`claude-resume-${Ote()}`);try{let u=ji(c,"projects",a);await pI(u,{recursive:!0});let l=ji(u,`${e}.jsonl`);await Vg(l,V2(s),{mode:384});let d=n?.CLAUDE_CONFIG_DIR??process.env.CLAUDE_CONFIG_DIR,p=d??ji(EI(),".claude"),f;try{f=await Nte(ji(p,".credentials.json"),"utf-8")}catch(m){if(!dE(m))throw m}if(!d&&!(n?.ANTHROPIC_API_KEY??process.env.ANTHROPIC_API_KEY)&&!(n?.CLAUDE_CODE_OAUTH_TOKEN??process.env.CLAUDE_CODE_OAUTH_TOKEN)&&(f=await zde()??f),await Tde(f,ji(c,".credentials.json")),await Pde(ji(d??EI(),".claude.json"),ji(c,".claude.json")),t.listSubkeys){let m=ji(u,e),v=await fI(t.listSubkeys({projectKey:a,sessionId:e}),i,`SessionStore.listSubkeys() timed out after ${i}ms for session ${e}`);for(let g of v){let h=Wg(m,g+".jsonl");if(!g||X2(g)||g.split(/[\\/]/).includes("..")||!h.startsWith(m+e6)){Wn(`[SessionStore] skipping unsafe subpath from listSubkeys: ${g}`,{level:"warn"});continue}let _=await fI(t.load({projectKey:a,sessionId:e,subpath:g}),i,`SessionStore.load() timed out after ${i}ms for session ${e} subpath ${g}`);if(!_||_.length===0)continue;let y=[],b=[];for(let x of _)Cde(x)?y.push(x):b.push(x);if(b.length>0&&(await pI(UM(h),{recursive:!0}),await Vg(h,V2(b),{mode:384})),y.length>0){let x=y.at(-1),w=Wg(m,g+".meta.json");await pI(UM(w),{recursive:!0});let{type:k,...$}=x;await Vg(w,wn($),{mode:384})}}}return c}catch(u){throw await a9(c),u}}function L2(t,e,r,n){let{systemPrompt:i,settings:o,settingSources:a,sandbox:s,...c}=t??{},u,l,d;i===void 0?u="":typeof i=="string"?u=i:i.type==="preset"&&(l=i.append,d=i.excludeDynamicSections);let p=c.pathToClaudeCodeExecutable;if(!p){let Hs=Dte(import.meta.url),ho=Rte(Hs),ym=hoe(nb=>ho.resolve(nb));if(ym)p=ym;else try{p=ho.resolve("./cli.js")}catch{throw Error(`Native CLI binary for ${process.platform}-${process.arch} not found. Reinstall @anthropic-ai/claude-agent-sdk without --omit=optional, or set options.pathToClaudeCodeExecutable.`)}}process.env.CLAUDE_AGENT_SDK_VERSION="0.2.105";let{abortController:f=t6(),additionalDirectories:m=[],agent:v,agents:g,allowedTools:h=[],betas:_,canUseTool:y,continue:b,cwd:x,debug:w,debugFile:k,disallowedTools:$=[],tools:T,env:A,executable:z=r6()?"bun":"node",executableArgs:M=[],extraArgs:W={},fallbackModel:R,enableFileCheckpointing:te,toolConfig:G,forkSession:ye,hooks:De,includeHookEvents:de,includePartialMessages:F,onElicitation:I,persistSession:V,sessionStore:C,thinking:S,effort:P,maxThinkingTokens:B,maxTurns:ie,maxBudgetUsd:me,taskBudget:ut,mcpServers:Pe,model:nr,outputFormat:D,permissionMode:L="default",allowDangerouslySkipPermissions:Q=!1,permissionPromptToolName:ne,plugins:xe,getOAuthToken:Be,workload:mr,resume:Nn,resumeSessionAt:Mr,sessionId:qr,stderr:yr,strictMcpConfig:Vo}=c;if(C&&V===!1)throw Error("sessionStore cannot be used with persistSession: false -- the storage adapter requires local writes to mirror from. Use CLAUDE_CONFIG_DIR=/tmp for ephemeral local writes with external mirroring.");let Qr=D?.type==="json_schema"?D.schema:void 0,Cn=A?{...A}:{...process.env};Cn.CLAUDE_CODE_ENTRYPOINT||(Cn.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),te&&(Cn.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING="true"),Be&&(Cn.CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH="1"),G?.askUserQuestion?.previewFormat&&(Cn.CLAUDE_CODE_QUESTION_PREVIEW_FORMAT=G.askUserQuestion.previewFormat);let Wo={},Ks=new Map;if(Pe)for(let[Hs,ho]of Object.entries(Pe))ho.type==="sdk"&&ho.instance?Ks.set(Hs,ho.instance):Wo[Hs]=ho;let Bo;if(S)switch(S.type){case"adaptive":Bo={type:"adaptive",display:S.display};break;case"enabled":Bo={type:"enabled",budgetTokens:S.budgetTokens,display:S.display};break;case"disabled":Bo={type:"disabled"};break}else B!==void 0&&(Bo=B===0?{type:"disabled"}:{type:"enabled",budgetTokens:B});r&&(Cn.CLAUDE_CONFIG_DIR=r);let ml=new ZI({abortController:f,additionalDirectories:m,agent:v,betas:_,cwd:x,debug:w,debugFile:k,executable:z,executableArgs:M,extraArgs:mr?{...W,workload:mr}:W,pathToClaudeCodeExecutable:p,env:Cn,forkSession:ye,stderr:yr,thinkingConfig:Bo,effort:P,maxTurns:ie,maxBudgetUsd:me,taskBudget:ut,model:nr,fallbackModel:R,jsonSchema:Qr,permissionMode:L,allowDangerouslySkipPermissions:Q,permissionPromptToolName:ne,continueConversation:b,resume:Nn,resumeSessionAt:Mr,sessionId:qr,settings:typeof o=="object"?wn(o):o,settingSources:a,allowedTools:h,disallowedTools:$,tools:T,mcpServers:Wo,strictMcpConfig:Vo,canUseTool:!!y,hooks:!!De,includeHookEvents:de,includePartialMessages:F,persistSession:V,sessionMirror:!!C,plugins:xe,sandbox:s,spawnClaudeCodeProcess:c.spawnClaudeCodeProcess,deferSpawn:n}),rb={systemPrompt:u,appendSystemPrompt:l,excludeDynamicSections:d,agents:g,promptSuggestions:c.promptSuggestions,agentProgressSummaries:c.agentProgressSummaries},D1=new VI(ml,e,y,De,f,Ks,Qr,rb,I,Be);if(C){let Hs=new WI(async(ho,ym)=>{let nb=ji(Cn.CLAUDE_CONFIG_DIR??ji(EI(),".claude"),"projects"),M1=Rde(ho,nb);M1&&await C.append(M1,ym)});D1.setTranscriptMirrorBatcher(Hs)}return{queryInstance:D1,transport:ml,abortController:f,processEnv:Cn}}function F2(t,e,r,n){typeof r=="string"?e.write(wn({type:"user",session_id:"",message:{role:"user",content:[{type:"text",text:r}]},parent_tool_use_id:null})+`
|
|
138
|
+
`):t.streamInput(r).catch(i=>n.abort(i))}async function a9(t){for(let e=0;;e++)try{return await Cte(t,{recursive:!0,force:!0})}catch(r){if(e>=4||!jde.has(yp(r)??""))return;await Zte((e+1)*100)}}function Nde(t,e){t.waitForExit().catch(()=>{}).finally(()=>a9(e))}function s9({prompt:t,options:e}){if(e?.resume&&e?.sessionStore){let{queryInstance:o,transport:a,abortController:s,processEnv:c}=L2({...e},typeof t=="string",void 0,!0),u=Wg(e.cwd??".");return Ode(e.sessionStore,e.resume,u,e.env,e.loadTimeoutMs).then(l=>{l&&(a.updateEnv({CLAUDE_CONFIG_DIR:l}),c.CLAUDE_CONFIG_DIR=l,o.addCleanupCallback(()=>Nde(a,l))),o.isClosed()||a.spawn()}).catch(l=>{let d=E6(l);a.spawnAbort(d),o.setError(d)}),F2(o,a,t,s),o}let{queryInstance:r,transport:n,abortController:i}=L2(e,typeof t=="string");return F2(r,n,t,i),r}function V2(t){return t.map(e=>wn(e)).join(`
|
|
139
|
+
`)+`
|
|
140
|
+
`}function Cde(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="agent_metadata"}function Rde(t,e){let r=Ute(e,t);if(r.startsWith("..")||X2(r))return null;let n=r.split(e6);if(n.length<2)return null;let i=n[0],o=n[1];if(n.length===2&&o.endsWith(".jsonl"))return{projectKey:i,sessionId:o.replace(/\.jsonl$/,"")};if(n.length>=4){let a=n.slice(2),s=a.length-1;return a[s]=a.at(-1).replace(/\.jsonl$/,""),{projectKey:i,sessionId:o,subpath:a.join("/")}}return null}var wee,kee,II,See,$ee,Eee,Pee,W2,le,Tee,_s,Oee,jee,ar,sr,Qg,AM,et,$t,_a,Mv,Nee,B2,K2,Yg,Cee,Ui,Ree,Aee,H2,Uee,qv,Zv,tE,Lv,rE,Dee,Mee,qee,Zee,Lee,Fee,Vee,Wee,Bee,Kee,Hee,Gee,Qee,Yee,Jee,Xee,ete,tte,nE,rte,nte,ite,ote,G2,Q2,ate,ste,cte,ute,lte,Y2,dte,pte,fte,mte,hte,gte,vte,yte,_te,bte,xte,wte,kte,Ste,$te,Ite,J2,Ete,Pte,Tte,qte,ma,Wte,Bte,Kte,Hte,iE,Gte,Jg,n6,Qte,Yte,Qd,Xte,ere,tre,nre,ire,ore,DM,sre,i6,ure,lre,dre,pre,mre,hre,mI,MM,vre,yre,_re,xre,wre,kre,Sre,$re,Ire,Ere,Pre,zre,jre,o6,Cre,_p,Are,Dre,Mre,qre,Zre,Fre,Vre,Wre,Kre,Hre,Qre,qM,Jre,ene,Fv,rne,nne,one,sne,une,dne,pne,fne,mne,gne,yne,Vv,xne,kne,$ne,Ene,a6,Pne,ba,aE,s6,PI,Ae,un,Kn,ru,Xg,ev,tv,rv,nv,iv,ov,av,sv,One,jne,TI,ZM,Cne,c6,Rne,Hc,Ane,Dne,FM,VM,WM,qne,Fne,BM,KM,Fn,Vn,ps,cv,GM,Hne,QM,us,Yd,fs,OI,mp,uv,Ig,lv,jI,ms,dv,f6,m6,uE,YM,Xne,eie,NI,h6,tie,rie,Hn,g6,ht,vp,JM,sie,zr,pv,fv,b6,uie,Gc,lie,die,k6,oi,la,Vc,Jd,Eg,Xd,ep,Pg,tp,Po,rp,Tg,zg,as,Og,jg,np,hI,e2,Ng,gI,vI,yI,t2,r2,RI,mv,pie,fie,ip,Wc,ss,br,op,Ln,Oo,da,ap,i2,AI,hv,gv,vv,a2,hie,hs,yv,xp,ga,_v,ai,pa,Bc,sp,Cg,cp,up,Rg,lp,To,dp,Ag,Ug,cs,Dg,Mg,pp,_I,u2,bI,xI,wI,kI,l2,d2,UI,bv,wp,f2,vie,xv,qg,DI,lE,Hg,I6,yie,_ie,ur,nu,eu,Kc,Iie,Pie,AUe,Tie,UUe,zie,DUe,g2,Uie,Gie,Qie,MI,Xie,eoe,qI,toe,O6,j6,noe,Zg,SI,C6,LUe,soe,cr,fE,doe,wv,_2,ZI,LI,FI,VI,WI,WUe,_oe,b2,BUe,KUe,koe,HUe,Eoe,R6,Poe,Toe,zoe,YUe,x2,Ooe,Noe,Roe,St,w2,ve,fa,X,ci,Doe,kp,Moe,KI,ln,Ce,hp,kn,k2,S2,iu,kv,be,ui,$2,tt,qoe,Zoe,Loe,Foe,Voe,Woe,Boe,Koe,Hoe,$I,Goe,Qoe,Yoe,Joe,Xoe,eae,A6,tae,ou,Sp,$p,Ip,Ep,Pp,au,su,Tp,ha,no,zp,va,Gn,cu,zo,HI,uu,No,QI,Op,jp,YI,lu,du,pu,fu,gs,Ri,Ni,Co,mu,hu,Np,Sv,$v,gu,JUe,Re,XUe,e4e,t4e,r4e,n4e,i4e,o4e,a4e,s4e,c4e,u4e,l4e,d4e,p4e,f4e,m4e,h4e,g4e,v4e,y4e,_4e,b4e,x4e,w4e,k4e,S4e,$4e,I4e,E4e,P4e,T4e,z4e,O4e,j4e,M6,q6,Z6,ya,Iv,ft,gE,V6,vae,Ev,W6,K6,H6,JI,Q6,vE,Zp,bE,Pv,xE,Tv,wE,kE,SE,$E,IE,eq,tq,rq,nq,iq,oq,aq,Iae,sq,vu,Eae,Pae,Tae,cq,zae,Oae,jae,Nae,Cae,lq,dq,pq,fq,mq,EE,hq,Rae,gq,vq,yq,wq,kq,Sq,$q,Iq,Eq,Pq,Tq,zq,dr,Oq,PE,TE,jq,Nq,Cq,Rq,Aq,Uq,Dq,Mq,qq,Lp,Zq,Lq,Fq,Vq,Wq,Bq,Kq,Hq,Gq,zv,Qq,Fe,Fp,Kt,Yq,Jq,Xq,eZ,tZ,rZ,nZ,iZ,oZ,aZ,sZ,cZ,uZ,lZ,dZ,pZ,fZ,mZ,hZ,gZ,yZ,_Z,xZ,wZ,OE,kZ,jE,NE,SZ,$Z,IZ,EZ,PZ,Ov,TZ,zZ,OZ,CE,RE,AE,jZ,NZ,Gv,CZ,RZ,AZ,UZ,DZ,MZ,UE,qZ,ZZ,LZ,FZ,VZ,WZ,BZ,KZ,DE,HZ,GZ,QZ,YZ,JZ,ME,Aae,Dae,qae,Lae,Vae,Bae,Hae,Gae,Qae,Yae,Xae,tse,nse,ose,sse,use,dse,fse,hse,vse,_se,xse,kse,$se,Ese,Tse,Ose,Nse,Rse,Use,Mse,Zse,Fse,Wse,Kse,Gse,Qse,Jse,ece,rce,ice,ace,eL,tL,Ap,ds,iL,Cv,Mp,Tce,zce,N4e,Jc,xP,wP,kP,SP,$P,HL,Oce,Vp,GL,QL,YL,JL,rt,IP,Xv,Yt,EP,Rv,jo,PP,TP,zP,OP,jP,NP,CP,RP,AP,UP,DP,MP,qP,ZP,LP,FP,XL,ey,ku,ty,ry,VP,eF,tF,rF,nF,iF,oF,aF,BP,sF,iy,KP,cF,uF,lF,GP,dF,pF,qp,fF,mF,QP,JP,hF,gF,yF,XP,xF,wF,SF,eT,$F,EF,PF,zF,ay,Eue,Tue,RF,Uue,sy,kr,AF,UF,C4e,Due,Mue,rT,Qn,cy,Or,li,di,jr,uy,que,Zue,DF,q2,MF,R4e,A4e,qF,Lue,ZF,Fue,Wp,_u,LF,Vue,Wue,Bue,Kue,Hue,Gue,Que,Yue,Jue,Xue,FF,ele,tle,VF,rle,Bp,Kp,nle,Hp,WF,ile,BF,KF,HF,GF,U4e,QF,YF,JF,D4e,XF,e9,nT,t9,Gp,Su,r9,ole,ale,sle,cle,ule,iT,lle,dle,ple,fle,mle,hle,gle,vle,yle,_le,ble,xle,wle,kle,Sle,$le,oT,aT,sT,Ile,Ele,Ple,cT,Tle,zle,Ole,jle,Nle,n9,Cle,Rle,i9,M4e,Ale,Ule,Dle,q4e,o9,Mle,qle,Zle,Lle,Fle,Vle,Wle,Ble,Kle,Dv,Hle,Gle,Qle,Yle,Jle,Xle,ede,tde,rde,nde,ide,ode,ade,sde,cde,ude,lde,dde,pde,fde,mde,hde,gde,vde,yde,_de,bde,xde,wde,kde,Sde,$de,Ide,Z4e,L4e,F4e,V4e,W4e,B4e,K4e,H4e,G4e,Z2,Q4e,jde,c9=E(()=>{wee=Object.create,{getPrototypeOf:kee,defineProperty:II,getOwnPropertyNames:See}=Object,$ee=Object.prototype.hasOwnProperty;W2=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var i=e?Eee??=new WeakMap:Pee??=new WeakMap,o=i.get(t);if(o)return o}r=t!=null?wee(kee(t)):{};let a=e||!t||!t.__esModule?II(r,"default",{value:t,enumerable:!0}):r;for(let s of See(t))$ee.call(a,s)||II(a,s,{get:Iee.bind(t,s),enumerable:!0});return n&&i.set(t,a),a},le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Tee=t=>t;_s=(t,e)=>{for(var r in e)II(t,r,{get:e[r],enumerable:!0,configurable:!0,set:zee.bind(e,r)})},Oee=Symbol.dispose||Symbol.for("Symbol.dispose"),jee=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),ar=(t,e,r)=>{if(e!=null){if(typeof e!="object"&&typeof e!="function")throw TypeError('Object expected to be assigned to "using" declaration');var n;if(r&&(n=e[jee]),n===void 0&&(n=e[Oee]),typeof n!="function")throw TypeError("Object not disposable");t.push([r,n,e])}else r&&t.push([r]);return e},sr=(t,e,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(a,s,c,u){return u=Error(c),u.name="SuppressedError",u.error=a,u.suppressed=s,u},i=a=>e=r?new n(a,e,"An error was suppressed during disposal"):(r=!0,a),o=a=>{for(;a=t.pop();)try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(o,c=>(i(c),o()))}catch(c){i(c)}if(r)throw e};return o()},Qg=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(_){if(super(),!t.IDENTIFIER.test(_))throw Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((y,b)=>`${y}${b}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((y,b)=>(b instanceof r&&(y[b.str]=(y[b.str]||0)+1),y),{})}}t._Code=n,t.nil=new n("");function i(h,..._){let y=[h[0]],b=0;for(;b<_.length;)s(y,_[b]),y.push(h[++b]);return new n(y)}t._=i;var o=new n("+");function a(h,..._){let y=[f(h[0])],b=0;for(;b<_.length;)y.push(o),s(y,_[b]),y.push(o,f(h[++b]));return c(y),new n(y)}t.str=a;function s(h,_){_ instanceof n?h.push(..._._items):_ instanceof r?h.push(_):h.push(d(_))}t.addCodeArg=s;function c(h){let _=1;for(;_<h.length-1;){if(h[_]===o){let y=u(h[_-1],h[_+1]);if(y!==void 0){h.splice(_-1,3,y);continue}h[_++]="+"}_++}}function u(h,_){if(_==='""')return h;if(h==='""')return _;if(typeof h=="string")return _ instanceof r||h[h.length-1]!=='"'?void 0:typeof _!="string"?`${h.slice(0,-1)}${_}"`:_[0]==='"'?h.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(h instanceof r))return`"${h}${_.slice(1)}`}function l(h,_){return _.emptyStr()?h:h.emptyStr()?_:a`${h}${_}`}t.strConcat=l;function d(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:f(Array.isArray(h)?h.join(","):h)}function p(h){return new n(f(h))}t.stringify=p;function f(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=f;function m(h){return typeof h=="string"&&t.IDENTIFIER.test(h)?new n(`.${h}`):i`[${h}]`}t.getProperty=m;function v(h){if(typeof h=="string"&&t.IDENTIFIER.test(h))return new n(`${h}`);throw Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}t.getEsmExportName=v;function g(h){return new n(h.toString())}t.regexpCode=g}),AM=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Qg();class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof e.Name?u:this.name(u)}name(u){return new e.Name(this._newName(u))}_newName(u){let l=this._names[u]||this._nameGroup(u);return`${u}${l.index++}`}_nameGroup(u){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}t.Scope=i;class o extends e.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:d}){this.value=u,this.scopePath=e._`.${new e.Name(l)}[${d}]`}}t.ValueScopeName=o;var a=e._`\n`;class s extends i{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:e.nil}}get(){return this._scope}name(u){return new o(u,this._newName(u))}value(u,l){var d;if(l.ref===void 0)throw Error("CodeGen: ref must be passed in value");let p=this.toName(u),{prefix:f}=p,m=(d=l.key)!==null&&d!==void 0?d:l.ref,v=this._values[f];if(v){let _=v.get(m);if(_)return _}else v=this._values[f]=new Map;v.set(m,p);let g=this._scope[f]||(this._scope[f]=[]),h=g.length;return g[h]=l.ref,p.setValue(l,{property:f,itemIndex:h}),p}getValue(u,l){let d=this._values[u];if(d)return d.get(l)}scopeRefs(u,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw Error(`CodeGen: name "${d}" has no value`);return e._`${u}${d.scopePath}`})}scopeCode(u=this._values,l,d){return this._reduceValues(u,p=>{if(p.value===void 0)throw Error(`CodeGen: name "${p}" has no value`);return p.value.code},l,d)}_reduceValues(u,l,d={},p){let f=e.nil;for(let m in u){let v=u[m];if(!v)continue;let g=d[m]=d[m]||new Map;v.forEach(h=>{if(g.has(h))return;g.set(h,n.Started);let _=l(h);if(_){let y=this.opts.es5?t.varKinds.var:t.varKinds.const;f=e._`${f}${y} ${h} = ${_};${this.opts._n}`}else if(_=p?.(h))f=e._`${f}${_}${this.opts._n}`;else throw new r(h);g.set(h,n.Completed)})}return f}}t.ValueScope=s}),et=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Qg(),r=AM(),n=Qg();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=AM();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(S,P){return this}}class a extends o{constructor(S,P,B){super(),this.varKind=S,this.name=P,this.rhs=B}render({es5:S,_n:P}){let B=S?r.varKinds.var:this.varKind,ie=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ie};`+P}optimizeNames(S,P){if(S[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,S,P)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class s extends o{constructor(S,P,B){super(),this.lhs=S,this.rhs=P,this.sideEffects=B}render({_n:S}){return`${this.lhs} = ${this.rhs};`+S}optimizeNames(S,P){if(!(this.lhs instanceof e.Name&&!S[this.lhs.str]&&!this.sideEffects))return this.rhs=R(this.rhs,S,P),this}get names(){let S=this.lhs instanceof e.Name?{}:{...this.lhs.names};return W(S,this.rhs)}}class c extends s{constructor(S,P,B,ie){super(S,B,ie),this.op=P}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class u extends o{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class l extends o{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class d extends o{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class p extends o{constructor(S){super(),this.code=S}render({_n:S}){return`${this.code};`+S}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(S,P){return this.code=R(this.code,S,P),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class f extends o{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((P,B)=>P+B.render(S),"")}optimizeNodes(){let{nodes:S}=this,P=S.length;for(;P--;){let B=S[P].optimizeNodes();Array.isArray(B)?S.splice(P,1,...B):B?S[P]=B:S.splice(P,1)}return S.length>0?this:void 0}optimizeNames(S,P){let{nodes:B}=this,ie=B.length;for(;ie--;){let me=B[ie];me.optimizeNames(S,P)||(te(S,me.names),B.splice(ie,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((S,P)=>M(S,P.names),{})}}class m extends f{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class v extends f{}class g extends m{}g.kind="else";class h extends m{constructor(S,P){super(P),this.condition=S}render(S){let P=`if(${this.condition})`+super.render(S);return this.else&&(P+="else "+this.else.render(S)),P}optimizeNodes(){super.optimizeNodes();let S=this.condition;if(S===!0)return this.nodes;let P=this.else;if(P){let B=P.optimizeNodes();P=this.else=Array.isArray(B)?new g(B):B}if(P)return S===!1?P instanceof h?P:P.nodes:this.nodes.length?this:new h(G(S),P instanceof h?[P]:P.nodes);if(!(S===!1||!this.nodes.length))return this}optimizeNames(S,P){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(S,P),!!(super.optimizeNames(S,P)||this.else))return this.condition=R(this.condition,S,P),this}get names(){let S=super.names;return W(S,this.condition),this.else&&M(S,this.else.names),S}}h.kind="if";class _ extends m{}_.kind="for";class y extends _{constructor(S){super(),this.iteration=S}render(S){return`for(${this.iteration})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iteration=R(this.iteration,S,P),this}get names(){return M(super.names,this.iteration.names)}}class b extends _{constructor(S,P,B,ie){super(),this.varKind=S,this.name=P,this.from=B,this.to=ie}render(S){let P=S.es5?r.varKinds.var:this.varKind,{name:B,from:ie,to:me}=this;return`for(${P} ${B}=${ie}; ${B}<${me}; ${B}++)`+super.render(S)}get names(){let S=W(super.names,this.from);return W(S,this.to)}}class x extends _{constructor(S,P,B,ie){super(),this.loop=S,this.varKind=P,this.name=B,this.iterable=ie}render(S){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(S)}optimizeNames(S,P){if(super.optimizeNames(S,P))return this.iterable=R(this.iterable,S,P),this}get names(){return M(super.names,this.iterable.names)}}class w extends m{constructor(S,P,B){super(),this.name=S,this.args=P,this.async=B}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}w.kind="func";class k extends f{render(S){return"return "+super.render(S)}}k.kind="return";class $ extends m{render(S){let P="try"+super.render(S);return this.catch&&(P+=this.catch.render(S)),this.finally&&(P+=this.finally.render(S)),P}optimizeNodes(){var S,P;return super.optimizeNodes(),(S=this.catch)===null||S===void 0||S.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(S,P){var B,ie;return super.optimizeNames(S,P),(B=this.catch)===null||B===void 0||B.optimizeNames(S,P),(ie=this.finally)===null||ie===void 0||ie.optimizeNames(S,P),this}get names(){let S=super.names;return this.catch&&M(S,this.catch.names),this.finally&&M(S,this.finally.names),S}}class T extends m{constructor(S){super(),this.error=S}render(S){return`catch(${this.error})`+super.render(S)}}T.kind="catch";class A extends m{render(S){return"finally"+super.render(S)}}A.kind="finally";class z{constructor(S,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
141
|
+
`:""},this._extScope=S,this._scope=new r.Scope({parent:S}),this._nodes=[new v]}toString(){return this._root.render(this.opts)}name(S){return this._scope.name(S)}scopeName(S){return this._extScope.name(S)}scopeValue(S,P){let B=this._extScope.value(S,P);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(S,P){return this._extScope.getValue(S,P)}scopeRefs(S){return this._extScope.scopeRefs(S,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(S,P,B,ie){let me=this._scope.toName(P);return B!==void 0&&ie&&(this._constants[me.str]=B),this._leafNode(new a(S,me,B)),me}const(S,P,B){return this._def(r.varKinds.const,S,P,B)}let(S,P,B){return this._def(r.varKinds.let,S,P,B)}var(S,P,B){return this._def(r.varKinds.var,S,P,B)}assign(S,P,B){return this._leafNode(new s(S,P,B))}add(S,P){return this._leafNode(new c(S,t.operators.ADD,P))}code(S){return typeof S=="function"?S():S!==e.nil&&this._leafNode(new p(S)),this}object(...S){let P=["{"];for(let[B,ie]of S)P.length>1&&P.push(","),P.push(B),(B!==ie||this.opts.es5)&&(P.push(":"),(0,e.addCodeArg)(P,ie));return P.push("}"),new e._Code(P)}if(S,P,B){if(this._blockNode(new h(S)),P&&B)this.code(P).else().code(B).endIf();else if(P)this.code(P).endIf();else if(B)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(S){return this._elseNode(new h(S))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(h,g)}_for(S,P){return this._blockNode(S),P&&this.code(P).endFor(),this}for(S,P){return this._for(new y(S),P)}forRange(S,P,B,ie,me=this.opts.es5?r.varKinds.var:r.varKinds.let){let ut=this._scope.toName(S);return this._for(new b(me,ut,P,B),()=>ie(ut))}forOf(S,P,B,ie=r.varKinds.const){let me=this._scope.toName(S);if(this.opts.es5){let ut=P instanceof e.Name?P:this.var("_arr",P);return this.forRange("_i",0,e._`${ut}.length`,Pe=>{this.var(me,e._`${ut}[${Pe}]`),B(me)})}return this._for(new x("of",ie,me,P),()=>B(me))}forIn(S,P,B,ie=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,e._`Object.keys(${P})`,B);let me=this._scope.toName(S);return this._for(new x("in",ie,me,P),()=>B(me))}endFor(){return this._endBlockNode(_)}label(S){return this._leafNode(new u(S))}break(S){return this._leafNode(new l(S))}return(S){let P=new k;if(this._blockNode(P),this.code(S),P.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(S,P,B){if(!P&&!B)throw Error('CodeGen: "try" without "catch" and "finally"');let ie=new $;if(this._blockNode(ie),this.code(S),P){let me=this.name("e");this._currNode=ie.catch=new T(me),P(me)}return B&&(this._currNode=ie.finally=new A,this.code(B)),this._endBlockNode(T,A)}throw(S){return this._leafNode(new d(S))}block(S,P){return this._blockStarts.push(this._nodes.length),S&&this.code(S).endBlock(P),this}endBlock(S){let P=this._blockStarts.pop();if(P===void 0)throw Error("CodeGen: not in self-balancing block");let B=this._nodes.length-P;if(B<0||S!==void 0&&B!==S)throw Error(`CodeGen: wrong number of nodes: ${B} vs ${S} expected`);return this._nodes.length=P,this}func(S,P=e.nil,B,ie){return this._blockNode(new w(S,P,B)),ie&&this.code(ie).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(S=1){for(;S-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(S){return this._currNode.nodes.push(S),this}_blockNode(S){this._currNode.nodes.push(S),this._nodes.push(S)}_endBlockNode(S,P){let B=this._currNode;if(B instanceof S||P&&B instanceof P)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${P?`${S.kind}/${P.kind}`:S.kind}"`)}_elseNode(S){let P=this._currNode;if(!(P instanceof h))throw Error('CodeGen: "else" without "if"');return this._currNode=P.else=S,this}get _root(){return this._nodes[0]}get _currNode(){let S=this._nodes;return S[S.length-1]}set _currNode(S){let P=this._nodes;P[P.length-1]=S}}t.CodeGen=z;function M(C,S){for(let P in S)C[P]=(C[P]||0)+(S[P]||0);return C}function W(C,S){return S instanceof e._CodeOrName?M(C,S.names):C}function R(C,S,P){if(C instanceof e.Name)return B(C);if(!ie(C))return C;return new e._Code(C._items.reduce((me,ut)=>(ut instanceof e.Name&&(ut=B(ut)),ut instanceof e._Code?me.push(...ut._items):me.push(ut),me),[]));function B(me){let ut=P[me.str];return ut===void 0||S[me.str]!==1?me:(delete S[me.str],ut)}function ie(me){return me instanceof e._Code&&me._items.some(ut=>ut instanceof e.Name&&S[ut.str]===1&&P[ut.str]!==void 0)}}function te(C,S){for(let P in S)C[P]=(C[P]||0)-(S[P]||0)}function G(C){return typeof C=="boolean"||typeof C=="number"||C===null?!C:e._`!${V(C)}`}t.not=G;var ye=I(t.operators.AND);function De(...C){return C.reduce(ye)}t.and=De;var de=I(t.operators.OR);function F(...C){return C.reduce(de)}t.or=F;function I(C){return(S,P)=>S===e.nil?P:P===e.nil?S:e._`${V(S)} ${C} ${V(P)}`}function V(C){return C instanceof e.Name?C:e._`(${C})`}}),$t=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=et(),r=Qg();function n(w){let k={};for(let $ of w)k[$]=!0;return k}t.toHash=n;function i(w,k){return typeof k=="boolean"?k:Object.keys(k).length===0?!0:(o(w,k),!a(k,w.self.RULES.all))}t.alwaysValidSchema=i;function o(w,k=w.schema){let{opts:$,self:T}=w;if(!$.strictSchema||typeof k=="boolean")return;let A=T.RULES.keywords;for(let z in k)A[z]||x(w,`unknown keyword: "${z}"`)}t.checkUnknownRules=o;function a(w,k){if(typeof w=="boolean")return!w;for(let $ in w)if(k[$])return!0;return!1}t.schemaHasRules=a;function s(w,k){if(typeof w=="boolean")return!w;for(let $ in w)if($!=="$ref"&&k.all[$])return!0;return!1}t.schemaHasRulesButRef=s;function c({topSchemaRef:w,schemaPath:k},$,T,A){if(!A){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return e._`${$}`}return e._`${w}${k}${(0,e.getProperty)(T)}`}t.schemaRefOrVal=c;function u(w){return p(decodeURIComponent(w))}t.unescapeFragment=u;function l(w){return encodeURIComponent(d(w))}t.escapeFragment=l;function d(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function p(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=p;function f(w,k){if(Array.isArray(w))for(let $ of w)k($);else k(w)}t.eachItem=f;function m({mergeNames:w,mergeToName:k,mergeValues:$,resultToName:T}){return(A,z,M,W)=>{let R=M===void 0?z:M instanceof e.Name?(z instanceof e.Name?w(A,z,M):k(A,z,M),M):z instanceof e.Name?(k(A,M,z),z):$(z,M);return W===e.Name&&!(R instanceof e.Name)?T(A,R):R}}t.mergeEvaluated={props:m({mergeNames:(w,k,$)=>w.if(e._`${$} !== true && ${k} !== undefined`,()=>{w.if(e._`${k} === true`,()=>w.assign($,!0),()=>w.assign($,e._`${$} || {}`).code(e._`Object.assign(${$}, ${k})`))}),mergeToName:(w,k,$)=>w.if(e._`${$} !== true`,()=>{k===!0?w.assign($,!0):(w.assign($,e._`${$} || {}`),g(w,$,k))}),mergeValues:(w,k)=>w===!0?!0:{...w,...k},resultToName:v}),items:m({mergeNames:(w,k,$)=>w.if(e._`${$} !== true && ${k} !== undefined`,()=>w.assign($,e._`${k} === true ? true : ${$} > ${k} ? ${$} : ${k}`)),mergeToName:(w,k,$)=>w.if(e._`${$} !== true`,()=>w.assign($,k===!0?!0:e._`${$} > ${k} ? ${$} : ${k}`)),mergeValues:(w,k)=>w===!0?!0:Math.max(w,k),resultToName:(w,k)=>w.var("items",k)})};function v(w,k){if(k===!0)return w.var("props",!0);let $=w.var("props",e._`{}`);return k!==void 0&&g(w,$,k),$}t.evaluatedPropsToName=v;function g(w,k,$){Object.keys($).forEach(T=>w.assign(e._`${k}${(0,e.getProperty)(T)}`,!0))}t.setEvaluated=g;var h={};function _(w,k){return w.scopeValue("func",{ref:k,code:h[k.code]||(h[k.code]=new r._Code(k.code))})}t.useFunc=_;var y;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(y||(t.Type=y={}));function b(w,k,$){if(w instanceof e.Name){let T=k===y.Num;return $?T?e._`"[" + ${w} + "]"`:e._`"['" + ${w} + "']"`:T?e._`"/" + ${w}`:e._`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0,e.getProperty)(w).toString():"/"+d(w)}t.getErrorPath=b;function x(w,k,$=w.opts.strictSchema){if($){if(k=`strict mode: ${k}`,$===!0)throw Error(k);w.self.logger.warn(k)}}t.checkStrictMode=x}),_a=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),Mv=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=et(),r=$t(),n=_a();t.keywordError={message:({keyword:g})=>e.str`must pass "${g}" keyword validation`},t.keyword$DataError={message:({keyword:g,schemaType:h})=>h?e.str`"${g}" keyword must be ${h} ($data)`:e.str`"${g}" keyword is invalid ($data)`};function i(g,h=t.keywordError,_,y){let{it:b}=g,{gen:x,compositeRule:w,allErrors:k}=b,$=d(g,h,_);y??(w||k)?c(x,$):u(b,e._`[${$}]`)}t.reportError=i;function o(g,h=t.keywordError,_){let{it:y}=g,{gen:b,compositeRule:x,allErrors:w}=y,k=d(g,h,_);c(b,k),!(x||w)&&u(y,n.default.vErrors)}t.reportExtraError=o;function a(g,h){g.assign(n.default.errors,h),g.if(e._`${n.default.vErrors} !== null`,()=>g.if(h,()=>g.assign(e._`${n.default.vErrors}.length`,h),()=>g.assign(n.default.vErrors,null)))}t.resetErrorsCount=a;function s({gen:g,keyword:h,schemaValue:_,data:y,errsCount:b,it:x}){if(b===void 0)throw Error("ajv implementation error");let w=g.name("err");g.forRange("i",b,n.default.errors,k=>{g.const(w,e._`${n.default.vErrors}[${k}]`),g.if(e._`${w}.instancePath === undefined`,()=>g.assign(e._`${w}.instancePath`,(0,e.strConcat)(n.default.instancePath,x.errorPath))),g.assign(e._`${w}.schemaPath`,e.str`${x.errSchemaPath}/${h}`),x.opts.verbose&&(g.assign(e._`${w}.schema`,_),g.assign(e._`${w}.data`,y))})}t.extendErrors=s;function c(g,h){let _=g.const("err",h);g.if(e._`${n.default.vErrors} === null`,()=>g.assign(n.default.vErrors,e._`[${_}]`),e._`${n.default.vErrors}.push(${_})`),g.code(e._`${n.default.errors}++`)}function u(g,h){let{gen:_,validateName:y,schemaEnv:b}=g;b.$async?_.throw(e._`new ${g.ValidationError}(${h})`):(_.assign(e._`${y}.errors`,h),_.return(!1))}var l={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(g,h,_){let{createErrors:y}=g.it;return y===!1?e._`{}`:p(g,h,_)}function p(g,h,_={}){let{gen:y,it:b}=g,x=[f(b,_),m(g,_)];return v(g,h,x),y.object(...x)}function f({errorPath:g},{instancePath:h}){let _=h?e.str`${g}${(0,r.getErrorPath)(h,r.Type.Str)}`:g;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function m({keyword:g,it:{errSchemaPath:h}},{schemaPath:_,parentSchema:y}){let b=y?h:e.str`${h}/${g}`;return _&&(b=e.str`${b}${(0,r.getErrorPath)(_,r.Type.Str)}`),[l.schemaPath,b]}function v(g,{params:h,message:_},y){let{keyword:b,data:x,schemaValue:w,it:k}=g,{opts:$,propertyName:T,topSchemaRef:A,schemaPath:z}=k;y.push([l.keyword,b],[l.params,typeof h=="function"?h(g):h||e._`{}`]),$.messages&&y.push([l.message,typeof _=="function"?_(g):_]),$.verbose&&y.push([l.schema,w],[l.parentSchema,e._`${A}${z}`],[n.default.data,x]),T&&y.push([l.propertyName,T])}}),Nee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Mv(),r=et(),n=_a(),i={message:"boolean schema is false"};function o(c){let{gen:u,schema:l,validateName:d}=c;l===!1?s(c,!1):typeof l=="object"&&l.$async===!0?u.return(n.default.data):(u.assign(r._`${d}.errors`,null),u.return(!0))}t.topBoolOrEmptySchema=o;function a(c,u){let{gen:l,schema:d}=c;d===!1?(l.var(u,!1),s(c)):l.var(u,!0)}t.boolOrEmptySchema=a;function s(c,u){let{gen:l,data:d}=c,p={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(p,i,void 0,u)}}),B2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(o){return typeof o=="string"&&r.has(o)}t.isJSONType=n;function i(){let o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=i}),K2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:i,self:o},a){let s=o.RULES.types[a];return s&&s!==!0&&r(i,s)}t.schemaHasRulesForType=e;function r(i,o){return o.rules.some(a=>n(i,a))}t.shouldUseGroup=r;function n(i,o){var a;return i[o.keyword]!==void 0||((a=o.definition.implements)===null||a===void 0?void 0:a.some(s=>i[s]!==void 0))}t.shouldUseRule=n}),Yg=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=B2(),r=K2(),n=Mv(),i=et(),o=$t(),a;(function(y){y[y.Correct=0]="Correct",y[y.Wrong=1]="Wrong"})(a||(t.DataType=a={}));function s(y){let b=c(y.type);if(b.includes("null")){if(y.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!b.length&&y.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');y.nullable===!0&&b.push("null")}return b}t.getSchemaTypes=s;function c(y){let b=Array.isArray(y)?y:y?[y]:[];if(b.every(e.isJSONType))return b;throw Error("type must be JSONType or JSONType[]: "+b.join(","))}t.getJSONTypes=c;function u(y,b){let{gen:x,data:w,opts:k}=y,$=d(b,k.coerceTypes),T=b.length>0&&!($.length===0&&b.length===1&&(0,r.schemaHasRulesForType)(y,b[0]));if(T){let A=v(b,w,k.strictNumbers,a.Wrong);x.if(A,()=>{$.length?p(y,b,$):h(y)})}return T}t.coerceAndCheckDataType=u;var l=new Set(["string","number","integer","boolean","null"]);function d(y,b){return b?y.filter(x=>l.has(x)||b==="array"&&x==="array"):[]}function p(y,b,x){let{gen:w,data:k,opts:$}=y,T=w.let("dataType",i._`typeof ${k}`),A=w.let("coerced",i._`undefined`);$.coerceTypes==="array"&&w.if(i._`${T} == 'object' && Array.isArray(${k}) && ${k}.length == 1`,()=>w.assign(k,i._`${k}[0]`).assign(T,i._`typeof ${k}`).if(v(b,k,$.strictNumbers),()=>w.assign(A,k))),w.if(i._`${A} !== undefined`);for(let M of x)(l.has(M)||M==="array"&&$.coerceTypes==="array")&&z(M);w.else(),h(y),w.endIf(),w.if(i._`${A} !== undefined`,()=>{w.assign(k,A),f(y,A)});function z(M){switch(M){case"string":w.elseIf(i._`${T} == "number" || ${T} == "boolean"`).assign(A,i._`"" + ${k}`).elseIf(i._`${k} === null`).assign(A,i._`""`);return;case"number":w.elseIf(i._`${T} == "boolean" || ${k} === null
|
|
142
|
+
|| (${T} == "string" && ${k} && ${k} == +${k})`).assign(A,i._`+${k}`);return;case"integer":w.elseIf(i._`${T} === "boolean" || ${k} === null
|
|
143
|
+
|| (${T} === "string" && ${k} && ${k} == +${k} && !(${k} % 1))`).assign(A,i._`+${k}`);return;case"boolean":w.elseIf(i._`${k} === "false" || ${k} === 0 || ${k} === null`).assign(A,!1).elseIf(i._`${k} === "true" || ${k} === 1`).assign(A,!0);return;case"null":w.elseIf(i._`${k} === "" || ${k} === 0 || ${k} === false`),w.assign(A,null);return;case"array":w.elseIf(i._`${T} === "string" || ${T} === "number"
|
|
144
|
+
|| ${T} === "boolean" || ${k} === null`).assign(A,i._`[${k}]`)}}}function f({gen:y,parentData:b,parentDataProperty:x},w){y.if(i._`${b} !== undefined`,()=>y.assign(i._`${b}[${x}]`,w))}function m(y,b,x,w=a.Correct){let k=w===a.Correct?i.operators.EQ:i.operators.NEQ,$;switch(y){case"null":return i._`${b} ${k} null`;case"array":$=i._`Array.isArray(${b})`;break;case"object":$=i._`${b} && typeof ${b} == "object" && !Array.isArray(${b})`;break;case"integer":$=T(i._`!(${b} % 1) && !isNaN(${b})`);break;case"number":$=T();break;default:return i._`typeof ${b} ${k} ${y}`}return w===a.Correct?$:(0,i.not)($);function T(A=i.nil){return(0,i.and)(i._`typeof ${b} == "number"`,A,x?i._`isFinite(${b})`:i.nil)}}t.checkDataType=m;function v(y,b,x,w){if(y.length===1)return m(y[0],b,x,w);let k,$=(0,o.toHash)(y);if($.array&&$.object){let T=i._`typeof ${b} != "object"`;k=$.null?T:i._`!${b} || ${T}`,delete $.null,delete $.array,delete $.object}else k=i.nil;$.number&&delete $.integer;for(let T in $)k=(0,i.and)(k,m(T,b,x,w));return k}t.checkDataTypes=v;var g={message:({schema:y})=>`must be ${y}`,params:({schema:y,schemaValue:b})=>typeof y=="string"?i._`{type: ${y}}`:i._`{type: ${b}}`};function h(y){let b=_(y);(0,n.reportError)(b,g)}t.reportTypeError=h;function _(y){let{gen:b,data:x,schema:w}=y,k=(0,o.schemaRefOrVal)(y,w,"type");return{gen:b,keyword:"type",data:x,schema:w.type,schemaCode:k,schemaValue:k,parentSchema:w,params:{},it:y}}}),Cee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=et(),r=$t();function n(o,a){let{properties:s,items:c}=o.schema;if(a==="object"&&s)for(let u in s)i(o,u,s[u].default);else a==="array"&&Array.isArray(c)&&c.forEach((u,l)=>i(o,l,u.default))}t.assignDefaults=n;function i(o,a,s){let{gen:c,compositeRule:u,data:l,opts:d}=o;if(s===void 0)return;let p=e._`${l}${(0,e.getProperty)(a)}`;if(u){(0,r.checkStrictMode)(o,`default is ignored for: ${p}`);return}let f=e._`${p} === undefined`;d.useDefaults==="empty"&&(f=e._`${f} || ${p} === null || ${p} === ""`),c.if(f,e._`${p} = ${(0,e.stringify)(s)}`)}}),Ui=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=et(),r=$t(),n=_a(),i=$t();function o(y,b){let{gen:x,data:w,it:k}=y;x.if(d(x,w,b,k.opts.ownProperties),()=>{y.setParams({missingProperty:e._`${b}`},!0),y.error()})}t.checkReportMissingProp=o;function a({gen:y,data:b,it:{opts:x}},w,k){return(0,e.or)(...w.map($=>(0,e.and)(d(y,b,$,x.ownProperties),e._`${k} = ${$}`)))}t.checkMissingProp=a;function s(y,b){y.setParams({missingProperty:b},!0),y.error()}t.reportMissingProp=s;function c(y){return y.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}t.hasPropFunc=c;function u(y,b,x){return e._`${c(y)}.call(${b}, ${x})`}t.isOwnProperty=u;function l(y,b,x,w){let k=e._`${b}${(0,e.getProperty)(x)} !== undefined`;return w?e._`${k} && ${u(y,b,x)}`:k}t.propertyInData=l;function d(y,b,x,w){let k=e._`${b}${(0,e.getProperty)(x)} === undefined`;return w?(0,e.or)(k,(0,e.not)(u(y,b,x))):k}t.noPropertyInData=d;function p(y){return y?Object.keys(y).filter(b=>b!=="__proto__"):[]}t.allSchemaProperties=p;function f(y,b){return p(b).filter(x=>!(0,r.alwaysValidSchema)(y,b[x]))}t.schemaProperties=f;function m({schemaCode:y,data:b,it:{gen:x,topSchemaRef:w,schemaPath:k,errorPath:$},it:T},A,z,M){let W=M?e._`${y}, ${b}, ${w}${k}`:b,R=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,$)],[n.default.parentData,T.parentData],[n.default.parentDataProperty,T.parentDataProperty],[n.default.rootData,n.default.rootData]];T.opts.dynamicRef&&R.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);let te=e._`${W}, ${x.object(...R)}`;return z!==e.nil?e._`${A}.call(${z}, ${te})`:e._`${A}(${te})`}t.callValidateCode=m;var v=e._`new RegExp`;function g({gen:y,it:{opts:b}},x){let w=b.unicodeRegExp?"u":"",{regExp:k}=b.code,$=k(x,w);return y.scopeValue("pattern",{key:$.toString(),ref:$,code:e._`${k.code==="new RegExp"?v:(0,i.useFunc)(y,k)}(${x}, ${w})`})}t.usePattern=g;function h(y){let{gen:b,data:x,keyword:w,it:k}=y,$=b.name("valid");if(k.allErrors){let A=b.let("valid",!0);return T(()=>b.assign(A,!1)),A}return b.var($,!0),T(()=>b.break()),$;function T(A){let z=b.const("len",e._`${x}.length`);b.forRange("i",0,z,M=>{y.subschema({keyword:w,dataProp:M,dataPropType:r.Type.Num},$),b.if((0,e.not)($),A)})}}t.validateArray=h;function _(y){let{gen:b,schema:x,keyword:w,it:k}=y;if(!Array.isArray(x))throw Error("ajv implementation error");if(x.some(A=>(0,r.alwaysValidSchema)(k,A))&&!k.opts.unevaluated)return;let $=b.let("valid",!1),T=b.name("_valid");b.block(()=>x.forEach((A,z)=>{let M=y.subschema({keyword:w,schemaProp:z,compositeRule:!0},T);b.assign($,e._`${$} || ${T}`),!y.mergeValidEvaluated(M,T)&&b.if((0,e.not)($))})),y.result($,()=>y.reset(),()=>y.error(!0))}t.validateUnion=_}),Ree=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=et(),r=_a(),n=Ui(),i=Mv();function o(f,m){let{gen:v,keyword:g,schema:h,parentSchema:_,it:y}=f,b=m.macro.call(y.self,h,_,y),x=l(v,g,b);y.opts.validateSchema!==!1&&y.self.validateSchema(b,!0);let w=v.name("valid");f.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${y.errSchemaPath}/${g}`,topSchemaRef:x,compositeRule:!0},w),f.pass(w,()=>f.error(!0))}t.macroKeywordCode=o;function a(f,m){var v;let{gen:g,keyword:h,schema:_,parentSchema:y,$data:b,it:x}=f;u(x,m);let w=!b&&m.compile?m.compile.call(x.self,_,y,x):m.validate,k=l(g,h,w),$=g.let("valid");f.block$data($,T),f.ok((v=m.valid)!==null&&v!==void 0?v:$);function T(){if(m.errors===!1)M(),m.modifying&&s(f),W(()=>f.error());else{let R=m.async?A():z();m.modifying&&s(f),W(()=>c(f,R))}}function A(){let R=g.let("ruleErrs",null);return g.try(()=>M(e._`await `),te=>g.assign($,!1).if(e._`${te} instanceof ${x.ValidationError}`,()=>g.assign(R,e._`${te}.errors`),()=>g.throw(te))),R}function z(){let R=e._`${k}.errors`;return g.assign(R,null),M(e.nil),R}function M(R=m.async?e._`await `:e.nil){let te=x.opts.passContext?r.default.this:r.default.self,G=!("compile"in m&&!b||m.schema===!1);g.assign($,e._`${R}${(0,n.callValidateCode)(f,k,te,G)}`,m.modifying)}function W(R){var te;g.if((0,e.not)((te=m.valid)!==null&&te!==void 0?te:$),R)}}t.funcKeywordCode=a;function s(f){let{gen:m,data:v,it:g}=f;m.if(g.parentData,()=>m.assign(v,e._`${g.parentData}[${g.parentDataProperty}]`))}function c(f,m){let{gen:v}=f;v.if(e._`Array.isArray(${m})`,()=>{v.assign(r.default.vErrors,e._`${r.default.vErrors} === null ? ${m} : ${r.default.vErrors}.concat(${m})`).assign(r.default.errors,e._`${r.default.vErrors}.length`),(0,i.extendErrors)(f)},()=>f.error())}function u({schemaEnv:f},m){if(m.async&&!f.$async)throw Error("async keyword in sync schema")}function l(f,m,v){if(v===void 0)throw Error(`keyword "${m}" failed to compile`);return f.scopeValue("keyword",typeof v=="function"?{ref:v}:{ref:v,code:(0,e.stringify)(v)})}function d(f,m,v=!1){return!m.length||m.some(g=>g==="array"?Array.isArray(f):g==="object"?f&&typeof f=="object"&&!Array.isArray(f):typeof f==g||v&&typeof f>"u")}t.validSchemaType=d;function p({schema:f,opts:m,self:v,errSchemaPath:g},h,_){if(Array.isArray(h.keyword)?!h.keyword.includes(_):h.keyword!==_)throw Error("ajv implementation error");let y=h.dependencies;if(y?.some(b=>!Object.prototype.hasOwnProperty.call(f,b)))throw Error(`parent schema must have dependencies of ${_}: ${y.join(",")}`);if(h.validateSchema&&!h.validateSchema(f[_])){let b=`keyword "${_}" value is invalid at path "${g}": `+v.errorsText(h.validateSchema.errors);if(m.validateSchema==="log")v.logger.error(b);else throw Error(b)}}t.validateKeywordUsage=p}),Aee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=et(),r=$t();function n(a,{keyword:s,schemaProp:c,schema:u,schemaPath:l,errSchemaPath:d,topSchemaRef:p}){if(s!==void 0&&u!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let f=a.schema[s];return c===void 0?{schema:f,schemaPath:e._`${a.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:f[c],schemaPath:e._`${a.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(c)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,r.escapeFragment)(c)}`}}if(u!==void 0){if(l===void 0||d===void 0||p===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:p,errSchemaPath:d}}throw Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function i(a,s,{dataProp:c,dataPropType:u,data:l,dataTypes:d,propertyName:p}){if(l!==void 0&&c!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:f}=s;if(c!==void 0){let{errorPath:v,dataPathArr:g,opts:h}=s,_=f.let("data",e._`${s.data}${(0,e.getProperty)(c)}`,!0);m(_),a.errorPath=e.str`${v}${(0,r.getErrorPath)(c,u,h.jsPropertySyntax)}`,a.parentDataProperty=e._`${c}`,a.dataPathArr=[...g,a.parentDataProperty]}if(l!==void 0){let v=l instanceof e.Name?l:f.let("data",l,!0);m(v),p!==void 0&&(a.propertyName=p)}d&&(a.dataTypes=d);function m(v){a.data=v,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,v]}}t.extendSubschemaData=i;function o(a,{jtdDiscriminator:s,jtdMetadata:c,compositeRule:u,createErrors:l,allErrors:d}){u!==void 0&&(a.compositeRule=u),l!==void 0&&(a.createErrors=l),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=s,a.jtdMetadata=c}t.extendSubschemaMode=o}),H2=le((t,e)=>{e.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var o,a,s;if(Array.isArray(n)){if(o=n.length,o!=i.length)return!1;for(a=o;a--!==0;)if(!r(n[a],i[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(s=Object.keys(n),o=s.length,o!==Object.keys(i).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(i,s[a]))return!1;for(a=o;a--!==0;){var c=s[a];if(!r(n[c],i[c]))return!1}return!0}return n!==n&&i!==i}}),Uee=le((t,e)=>{var r=e.exports=function(o,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var c=typeof s=="function"?s:s.pre||function(){},u=s.post||function(){};n(a,c,u,o,"",o)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function n(o,a,s,c,u,l,d,p,f,m){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,u,l,d,p,f,m);for(var v in c){var g=c[v];if(Array.isArray(g)){if(v in r.arrayKeywords)for(var h=0;h<g.length;h++)n(o,a,s,g[h],u+"/"+v+"/"+h,l,u,v,c,h)}else if(v in r.propsKeywords){if(g&&typeof g=="object")for(var _ in g)n(o,a,s,g[_],u+"/"+v+"/"+i(_),l,u,v,c,_)}else(v in r.keywords||o.allKeys&&!(v in r.skipKeywords))&&n(o,a,s,g,u+"/"+v,l,u,v,c)}s(c,u,l,d,p,f,m)}}function i(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}}),qv=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=$t(),r=H2(),n=Uee(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(g,h=!0){return typeof g=="boolean"?!0:h===!0?!s(g):h?c(g)<=h:!1}t.inlineRef=o;var a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(let h in g){if(a.has(h))return!0;let _=g[h];if(Array.isArray(_)&&_.some(s)||typeof _=="object"&&s(_))return!0}return!1}function c(g){let h=0;for(let _ in g){if(_==="$ref")return 1/0;if(h++,!i.has(_)&&(typeof g[_]=="object"&&(0,e.eachItem)(g[_],y=>h+=c(y)),h===1/0))return 1/0}return h}function u(g,h="",_){_!==!1&&(h=p(h));let y=g.parse(h);return l(g,y)}t.getFullPath=u;function l(g,h){return g.serialize(h).split("#")[0]+"#"}t._getFullPath=l;var d=/#\/?$/;function p(g){return g?g.replace(d,""):""}t.normalizeId=p;function f(g,h,_){return _=p(_),g.resolve(h,_)}t.resolveUrl=f;var m=/^[a-z_][-a-z0-9._]*$/i;function v(g,h){if(typeof g=="boolean")return{};let{schemaId:_,uriResolver:y}=this.opts,b=p(g[_]||h),x={"":b},w=u(y,b,!1),k={},$=new Set;return n(g,{allKeys:!0},(z,M,W,R)=>{if(R===void 0)return;let te=w+M,G=x[R];typeof z[_]=="string"&&(G=ye.call(this,z[_])),De.call(this,z.$anchor),De.call(this,z.$dynamicAnchor),x[M]=G;function ye(de){let F=this.opts.uriResolver.resolve;if(de=p(G?F(G,de):de),$.has(de))throw A(de);$.add(de);let I=this.refs[de];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?T(z,I.schema,de):de!==p(te)&&(de[0]==="#"?(T(z,k[de],de),k[de]=z):this.refs[de]=te),de}function De(de){if(typeof de=="string"){if(!m.test(de))throw Error(`invalid anchor "${de}"`);ye.call(this,`#${de}`)}}}),k;function T(z,M,W){if(M!==void 0&&!r(z,M))throw A(W)}function A(z){return Error(`reference "${z}" resolves to more than one schema`)}}t.getSchemaRefs=v}),Zv=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Nee(),r=Yg(),n=K2(),i=Yg(),o=Cee(),a=Ree(),s=Aee(),c=et(),u=_a(),l=qv(),d=$t(),p=Mv();function f(D){if(w(D)&&($(D),x(D))){h(D);return}m(D,()=>(0,e.topBoolOrEmptySchema)(D))}t.validateFunctionCode=f;function m({gen:D,validateName:L,schema:Q,schemaEnv:ne,opts:xe},Be){xe.code.es5?D.func(L,c._`${u.default.data}, ${u.default.valCxt}`,ne.$async,()=>{D.code(c._`"use strict"; ${y(Q,xe)}`),g(D,xe),D.code(Be)}):D.func(L,c._`${u.default.data}, ${v(xe)}`,ne.$async,()=>D.code(y(Q,xe)).code(Be))}function v(D){return c._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${D.dynamicRef?c._`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function g(D,L){D.if(u.default.valCxt,()=>{D.var(u.default.instancePath,c._`${u.default.valCxt}.${u.default.instancePath}`),D.var(u.default.parentData,c._`${u.default.valCxt}.${u.default.parentData}`),D.var(u.default.parentDataProperty,c._`${u.default.valCxt}.${u.default.parentDataProperty}`),D.var(u.default.rootData,c._`${u.default.valCxt}.${u.default.rootData}`),L.dynamicRef&&D.var(u.default.dynamicAnchors,c._`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{D.var(u.default.instancePath,c._`""`),D.var(u.default.parentData,c._`undefined`),D.var(u.default.parentDataProperty,c._`undefined`),D.var(u.default.rootData,u.default.data),L.dynamicRef&&D.var(u.default.dynamicAnchors,c._`{}`)})}function h(D){let{schema:L,opts:Q,gen:ne}=D;m(D,()=>{Q.$comment&&L.$comment&&R(D),z(D),ne.let(u.default.vErrors,null),ne.let(u.default.errors,0),Q.unevaluated&&_(D),T(D),te(D)})}function _(D){let{gen:L,validateName:Q}=D;D.evaluated=L.const("evaluated",c._`${Q}.evaluated`),L.if(c._`${D.evaluated}.dynamicProps`,()=>L.assign(c._`${D.evaluated}.props`,c._`undefined`)),L.if(c._`${D.evaluated}.dynamicItems`,()=>L.assign(c._`${D.evaluated}.items`,c._`undefined`))}function y(D,L){let Q=typeof D=="object"&&D[L.schemaId];return Q&&(L.code.source||L.code.process)?c._`/*# sourceURL=${Q} */`:c.nil}function b(D,L){if(w(D)&&($(D),x(D))){k(D,L);return}(0,e.boolOrEmptySchema)(D,L)}function x({schema:D,self:L}){if(typeof D=="boolean")return!D;for(let Q in D)if(L.RULES.all[Q])return!0;return!1}function w(D){return typeof D.schema!="boolean"}function k(D,L){let{schema:Q,gen:ne,opts:xe}=D;xe.$comment&&Q.$comment&&R(D),M(D),W(D);let Be=ne.const("_errs",u.default.errors);T(D,Be),ne.var(L,c._`${Be} === ${u.default.errors}`)}function $(D){(0,d.checkUnknownRules)(D),A(D)}function T(D,L){if(D.opts.jtd)return ye(D,[],!1,L);let Q=(0,r.getSchemaTypes)(D.schema),ne=(0,r.coerceAndCheckDataType)(D,Q);ye(D,Q,!ne,L)}function A(D){let{schema:L,errSchemaPath:Q,opts:ne,self:xe}=D;L.$ref&&ne.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(L,xe.RULES)&&xe.logger.warn(`$ref: keywords ignored in schema at path "${Q}"`)}function z(D){let{schema:L,opts:Q}=D;L.default!==void 0&&Q.useDefaults&&Q.strictSchema&&(0,d.checkStrictMode)(D,"default is ignored in the schema root")}function M(D){let L=D.schema[D.opts.schemaId];L&&(D.baseId=(0,l.resolveUrl)(D.opts.uriResolver,D.baseId,L))}function W(D){if(D.schema.$async&&!D.schemaEnv.$async)throw Error("async schema in sync schema")}function R({gen:D,schemaEnv:L,schema:Q,errSchemaPath:ne,opts:xe}){let Be=Q.$comment;if(xe.$comment===!0)D.code(c._`${u.default.self}.logger.log(${Be})`);else if(typeof xe.$comment=="function"){let mr=c.str`${ne}/$comment`,Nn=D.scopeValue("root",{ref:L.root});D.code(c._`${u.default.self}.opts.$comment(${Be}, ${mr}, ${Nn}.schema)`)}}function te(D){let{gen:L,schemaEnv:Q,validateName:ne,ValidationError:xe,opts:Be}=D;Q.$async?L.if(c._`${u.default.errors} === 0`,()=>L.return(u.default.data),()=>L.throw(c._`new ${xe}(${u.default.vErrors})`)):(L.assign(c._`${ne}.errors`,u.default.vErrors),Be.unevaluated&&G(D),L.return(c._`${u.default.errors} === 0`))}function G({gen:D,evaluated:L,props:Q,items:ne}){Q instanceof c.Name&&D.assign(c._`${L}.props`,Q),ne instanceof c.Name&&D.assign(c._`${L}.items`,ne)}function ye(D,L,Q,ne){let{gen:xe,schema:Be,data:mr,allErrors:Nn,opts:Mr,self:qr}=D,{RULES:yr}=qr;if(Be.$ref&&(Mr.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(Be,yr))){xe.block(()=>me(D,"$ref",yr.all.$ref.definition));return}Mr.jtd||de(D,L),xe.block(()=>{for(let Qr of yr.rules)Vo(Qr);Vo(yr.post)});function Vo(Qr){(0,n.shouldUseGroup)(Be,Qr)&&(Qr.type?(xe.if((0,i.checkDataType)(Qr.type,mr,Mr.strictNumbers)),De(D,Qr),L.length===1&&L[0]===Qr.type&&Q&&(xe.else(),(0,i.reportTypeError)(D)),xe.endIf()):De(D,Qr),Nn||xe.if(c._`${u.default.errors} === ${ne||0}`))}}function De(D,L){let{gen:Q,schema:ne,opts:{useDefaults:xe}}=D;xe&&(0,o.assignDefaults)(D,L.type),Q.block(()=>{for(let Be of L.rules)(0,n.shouldUseRule)(ne,Be)&&me(D,Be.keyword,Be.definition,L.type)})}function de(D,L){D.schemaEnv.meta||!D.opts.strictTypes||(F(D,L),!D.opts.allowUnionTypes&&I(D,L),V(D,D.dataTypes))}function F(D,L){if(L.length){if(!D.dataTypes.length){D.dataTypes=L;return}L.forEach(Q=>{S(D.dataTypes,Q)||B(D,`type "${Q}" not allowed by context "${D.dataTypes.join(",")}"`)}),P(D,L)}}function I(D,L){L.length>1&&!(L.length===2&&L.includes("null"))&&B(D,"use allowUnionTypes to allow union type keyword")}function V(D,L){let Q=D.self.RULES.all;for(let ne in Q){let xe=Q[ne];if(typeof xe=="object"&&(0,n.shouldUseRule)(D.schema,xe)){let{type:Be}=xe.definition;Be.length&&!Be.some(mr=>C(L,mr))&&B(D,`missing type "${Be.join(",")}" for keyword "${ne}"`)}}}function C(D,L){return D.includes(L)||L==="number"&&D.includes("integer")}function S(D,L){return D.includes(L)||L==="integer"&&D.includes("number")}function P(D,L){let Q=[];for(let ne of D.dataTypes)S(L,ne)?Q.push(ne):L.includes("integer")&&ne==="number"&&Q.push("integer");D.dataTypes=Q}function B(D,L){let Q=D.schemaEnv.baseId+D.errSchemaPath;L+=` at "${Q}" (strictTypes)`,(0,d.checkStrictMode)(D,L,D.opts.strictTypes)}class ie{constructor(L,Q,ne){if((0,a.validateKeywordUsage)(L,Q,ne),this.gen=L.gen,this.allErrors=L.allErrors,this.keyword=ne,this.data=L.data,this.schema=L.schema[ne],this.$data=Q.$data&&L.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(L,this.schema,ne,this.$data),this.schemaType=Q.schemaType,this.parentSchema=L.schema,this.params={},this.it=L,this.def=Q,this.$data)this.schemaCode=L.gen.const("vSchema",nr(this.$data,L));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,Q.schemaType,Q.allowUndefined))throw Error(`${ne} value must be ${JSON.stringify(Q.schemaType)}`);("code"in Q?Q.trackErrors:Q.errors!==!1)&&(this.errsCount=L.gen.const("_errs",u.default.errors))}result(L,Q,ne){this.failResult((0,c.not)(L),Q,ne)}failResult(L,Q,ne){this.gen.if(L),ne?ne():this.error(),Q?(this.gen.else(),Q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(L,Q){this.failResult((0,c.not)(L),void 0,Q)}fail(L){if(L===void 0){this.error(),!this.allErrors&&this.gen.if(!1);return}this.gen.if(L),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(L){if(!this.$data)return this.fail(L);let{schemaCode:Q}=this;this.fail(c._`${Q} !== undefined && (${(0,c.or)(this.invalid$data(),L)})`)}error(L,Q,ne){if(Q){this.setParams(Q),this._error(L,ne),this.setParams({});return}this._error(L,ne)}_error(L,Q){(L?p.reportExtraError:p.reportError)(this,this.def.error,Q)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(L){this.allErrors||this.gen.if(L)}setParams(L,Q){Q?Object.assign(this.params,L):this.params=L}block$data(L,Q,ne=c.nil){this.gen.block(()=>{this.check$data(L,ne),Q()})}check$data(L=c.nil,Q=c.nil){if(!this.$data)return;let{gen:ne,schemaCode:xe,schemaType:Be,def:mr}=this;ne.if((0,c.or)(c._`${xe} === undefined`,Q)),L!==c.nil&&ne.assign(L,!0),(Be.length||mr.validateSchema)&&(ne.elseIf(this.invalid$data()),this.$dataError(),L!==c.nil&&ne.assign(L,!1)),ne.else()}invalid$data(){let{gen:L,schemaCode:Q,schemaType:ne,def:xe,it:Be}=this;return(0,c.or)(mr(),Nn());function mr(){if(ne.length){if(!(Q instanceof c.Name))throw Error("ajv implementation error");let Mr=Array.isArray(ne)?ne:[ne];return c._`${(0,i.checkDataTypes)(Mr,Q,Be.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function Nn(){if(xe.validateSchema){let Mr=L.scopeValue("validate$data",{ref:xe.validateSchema});return c._`!${Mr}(${Q})`}return c.nil}}subschema(L,Q){let ne=(0,s.getSubschema)(this.it,L);(0,s.extendSubschemaData)(ne,this.it,L),(0,s.extendSubschemaMode)(ne,L);let xe={...this.it,...ne,items:void 0,props:void 0};return b(xe,Q),xe}mergeEvaluated(L,Q){let{it:ne,gen:xe}=this;ne.opts.unevaluated&&(ne.props!==!0&&L.props!==void 0&&(ne.props=d.mergeEvaluated.props(xe,L.props,ne.props,Q)),ne.items!==!0&&L.items!==void 0&&(ne.items=d.mergeEvaluated.items(xe,L.items,ne.items,Q)))}mergeValidEvaluated(L,Q){let{it:ne,gen:xe}=this;if(ne.opts.unevaluated&&(ne.props!==!0||ne.items!==!0))return xe.if(Q,()=>this.mergeEvaluated(L,c.Name)),!0}}t.KeywordCxt=ie;function me(D,L,Q,ne){let xe=new ie(D,Q,L);"code"in Q?Q.code(xe,ne):xe.$data&&Q.validate?(0,a.funcKeywordCode)(xe,Q):"macro"in Q?(0,a.macroKeywordCode)(xe,Q):(Q.compile||Q.validate)&&(0,a.funcKeywordCode)(xe,Q)}var ut=/^\/(?:[^~]|~0|~1)*$/,Pe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function nr(D,{dataLevel:L,dataNames:Q,dataPathArr:ne}){let xe,Be;if(D==="")return u.default.rootData;if(D[0]==="/"){if(!ut.test(D))throw Error(`Invalid JSON-pointer: ${D}`);xe=D,Be=u.default.rootData}else{let qr=Pe.exec(D);if(!qr)throw Error(`Invalid JSON-pointer: ${D}`);let yr=+qr[1];if(xe=qr[2],xe==="#"){if(yr>=L)throw Error(Mr("property/index",yr));return ne[L-yr]}if(yr>L)throw Error(Mr("data",yr));if(Be=Q[L-yr],!xe)return Be}let mr=Be,Nn=xe.split("/");for(let qr of Nn)qr&&(Be=c._`${Be}${(0,c.getProperty)((0,d.unescapeJsonPointer)(qr))}`,mr=c._`${mr} && ${Be}`);return mr;function Mr(qr,yr){return`Cannot access ${qr} ${yr} levels up, current level is ${L}`}}t.getData=nr}),tE=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),Lv=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=qv();class r extends Error{constructor(i,o,a,s){super(s||`can't resolve reference ${a} from id ${o}`),this.missingRef=(0,e.resolveUrl)(i,o,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}t.default=r}),rE=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=et(),r=tE(),n=_a(),i=qv(),o=$t(),a=Zv();class s{constructor(_){var y;this.refs={},this.dynamicAnchors={};let b;typeof _.schema=="object"&&(b=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(y=_.baseId)!==null&&y!==void 0?y:(0,i.normalizeId)(b?.[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=b?.$async,this.refs={}}}t.SchemaEnv=s;function c(h){let _=d.call(this,h);if(_)return _;let y=(0,i.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:b,lines:x}=this.opts.code,{ownProperties:w}=this.opts,k=new e.CodeGen(this.scope,{es5:b,lines:x,ownProperties:w}),$;h.$async&&($=k.scopeValue("Error",{ref:r.default,code:e._`require("ajv/dist/runtime/validation_error").default`}));let T=k.scopeName("validate");h.validateName=T;let A={gen:k,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:k.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,e.stringify)(h.schema)}:{ref:h.schema}),validateName:T,ValidationError:$,schema:h.schema,schemaEnv:h,rootId:y,baseId:h.baseId||y,schemaPath:e.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:e._`""`,opts:this.opts,self:this},z;try{this._compilations.add(h),(0,a.validateFunctionCode)(A),k.optimize(this.opts.code.optimize);let M=k.toString();z=`${k.scopeRefs(n.default.scope)}return ${M}`,this.opts.code.process&&(z=this.opts.code.process(z,h));let W=Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(T,{ref:W}),W.errors=null,W.schema=h.schema,W.schemaEnv=h,h.$async&&(W.$async=!0),this.opts.code.source===!0&&(W.source={validateName:T,validateCode:M,scopeValues:k._values}),this.opts.unevaluated){let{props:R,items:te}=A;W.evaluated={props:R instanceof e.Name?void 0:R,items:te instanceof e.Name?void 0:te,dynamicProps:R instanceof e.Name,dynamicItems:te instanceof e.Name},W.source&&(W.source.evaluated=(0,e.stringify)(W.evaluated))}return h.validate=W,h}catch(M){throw delete h.validate,delete h.validateName,z&&this.logger.error("Error compiling schema, function code:",z),M}finally{this._compilations.delete(h)}}t.compileSchema=c;function u(h,_,y){var b;y=(0,i.resolveUrl)(this.opts.uriResolver,_,y);let x=h.refs[y];if(x)return x;let w=f.call(this,h,y);if(w===void 0){let k=(b=h.localRefs)===null||b===void 0?void 0:b[y],{schemaId:$}=this.opts;k&&(w=new s({schema:k,schemaId:$,root:h,baseId:_}))}if(w!==void 0)return h.refs[y]=l.call(this,w)}t.resolveRef=u;function l(h){return(0,i.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:c.call(this,h)}function d(h){for(let _ of this._compilations)if(p(_,h))return _}t.getCompilingSchema=d;function p(h,_){return h.schema===_.schema&&h.root===_.root&&h.baseId===_.baseId}function f(h,_){let y;for(;typeof(y=this.refs[_])=="string";)_=y;return y||this.schemas[_]||m.call(this,h,_)}function m(h,_){let y=this.opts.uriResolver.parse(_),b=(0,i._getFullPath)(this.opts.uriResolver,y),x=(0,i.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&b===x)return g.call(this,y,h);let w=(0,i.normalizeId)(b),k=this.refs[w]||this.schemas[w];if(typeof k=="string"){let $=m.call(this,h,k);return typeof $?.schema!="object"?void 0:g.call(this,y,$)}if(typeof k?.schema=="object"){if(k.validate||c.call(this,k),w===(0,i.normalizeId)(_)){let{schema:$}=k,{schemaId:T}=this.opts,A=$[T];return A&&(x=(0,i.resolveUrl)(this.opts.uriResolver,x,A)),new s({schema:$,schemaId:T,root:h,baseId:x})}return g.call(this,y,k)}}t.resolveSchema=m;var v=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(h,{baseId:_,schema:y,root:b}){var x;if(((x=h.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(let $ of h.fragment.slice(1).split("/")){if(typeof y=="boolean")return;let T=y[(0,o.unescapeFragment)($)];if(T===void 0)return;y=T;let A=typeof y=="object"&&y[this.opts.schemaId];!v.has($)&&A&&(_=(0,i.resolveUrl)(this.opts.uriResolver,_,A))}let w;if(typeof y!="boolean"&&y.$ref&&!(0,o.schemaHasRulesButRef)(y,this.RULES)){let $=(0,i.resolveUrl)(this.opts.uriResolver,_,y.$ref);w=m.call(this,b,$)}let{schemaId:k}=this.opts;if(w=w||new s({schema:y,schemaId:k,root:b,baseId:_}),w.schema!==w.root.schema)return w}}),Dee=le((t,e)=>{e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),Mee=le((t,e)=>{var r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};e.exports={HEX:r}}),qee=le((t,e)=>{var{HEX:r}=Mee(),n=/^(?:(?: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;function i(h){if(u(h,".")<3)return{host:h,isIPV4:!1};let _=h.match(n)||[],[y]=_;return y?{host:c(y,"."),isIPV4:!0}:{host:h,isIPV4:!1}}function o(h,_=!1){let y="",b=!0;for(let x of h){if(r[x]===void 0)return;x!=="0"&&b===!0&&(b=!1),b||(y+=x)}return _&&y.length===0&&(y="0"),y}function a(h){let _=0,y={error:!1,address:"",zone:""},b=[],x=[],w=!1,k=!1,$=!1;function T(){if(x.length){if(w===!1){let A=o(x);if(A!==void 0)b.push(A);else return y.error=!0,!1}x.length=0}return!0}for(let A=0;A<h.length;A++){let z=h[A];if(!(z==="["||z==="]"))if(z===":"){if(k===!0&&($=!0),!T())break;if(_++,b.push(":"),_>7){y.error=!0;break}A-1>=0&&h[A-1]===":"&&(k=!0);continue}else if(z==="%"){if(!T())break;w=!0}else{x.push(z);continue}}return x.length&&(w?y.zone=x.join(""):$?b.push(x.join("")):b.push(o(x))),y.address=b.join(""),y}function s(h){if(u(h,":")<2)return{host:h,isIPV6:!1};let _=a(h);if(_.error)return{host:h,isIPV6:!1};{let{address:y,address:b}=_;return _.zone&&(y+="%"+_.zone,b+="%25"+_.zone),{host:y,escapedHost:b,isIPV6:!0}}}function c(h,_){let y="",b=!0,x=h.length;for(let w=0;w<x;w++){let k=h[w];k==="0"&&b?(w+1<=x&&h[w+1]===_||w+1===x)&&(y+=k,b=!1):(k===_?b=!0:b=!1,y+=k)}return y}function u(h,_){let y=0;for(let b=0;b<h.length;b++)h[b]===_&&y++;return y}var l=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,p=/^\/\.\.(?:\/|$)/u,f=/^\/?(?:.|\n)*?(?=\/|$)/u;function m(h){let _=[];for(;h.length;)if(h.match(l))h=h.replace(l,"");else if(h.match(d))h=h.replace(d,"/");else if(h.match(p))h=h.replace(p,"/"),_.pop();else if(h==="."||h==="..")h="";else{let y=h.match(f);if(y){let b=y[0];h=h.slice(b.length),_.push(b)}else throw Error("Unexpected dot segment condition")}return _.join("")}function v(h,_){let y=_!==!0?escape:unescape;return h.scheme!==void 0&&(h.scheme=y(h.scheme)),h.userinfo!==void 0&&(h.userinfo=y(h.userinfo)),h.host!==void 0&&(h.host=y(h.host)),h.path!==void 0&&(h.path=y(h.path)),h.query!==void 0&&(h.query=y(h.query)),h.fragment!==void 0&&(h.fragment=y(h.fragment)),h}function g(h){let _=[];if(h.userinfo!==void 0&&(_.push(h.userinfo),_.push("@")),h.host!==void 0){let y=unescape(h.host),b=i(y);if(b.isIPV4)y=b.host;else{let x=s(b.host);x.isIPV6===!0?y=`[${x.escapedHost}]`:y=h.host}_.push(y)}return(typeof h.port=="number"||typeof h.port=="string")&&(_.push(":"),_.push(String(h.port))),_.length?_.join(""):void 0}e.exports={recomposeAuthority:g,normalizeComponentEncoding:v,removeDotSegments:m,normalizeIPv4:i,normalizeIPv6:s,stringArrayToHexStripped:o}}),Zee=le((t,e)=>{var r=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function i(b){return typeof b.secure=="boolean"?b.secure:String(b.scheme).toLowerCase()==="wss"}function o(b){return b.host||(b.error=b.error||"HTTP URIs must have a host."),b}function a(b){let x=String(b.scheme).toLowerCase()==="https";return(b.port===(x?443:80)||b.port==="")&&(b.port=void 0),b.path||(b.path="/"),b}function s(b){return b.secure=i(b),b.resourceName=(b.path||"/")+(b.query?"?"+b.query:""),b.path=void 0,b.query=void 0,b}function c(b){if((b.port===(i(b)?443:80)||b.port==="")&&(b.port=void 0),typeof b.secure=="boolean"&&(b.scheme=b.secure?"wss":"ws",b.secure=void 0),b.resourceName){let[x,w]=b.resourceName.split("?");b.path=x&&x!=="/"?x:void 0,b.query=w,b.resourceName=void 0}return b.fragment=void 0,b}function u(b,x){if(!b.path)return b.error="URN can not be parsed",b;let w=b.path.match(n);if(w){let k=x.scheme||b.scheme||"urn";b.nid=w[1].toLowerCase(),b.nss=w[2];let $=`${k}:${x.nid||b.nid}`,T=y[$];b.path=void 0,T&&(b=T.parse(b,x))}else b.error=b.error||"URN can not be parsed.";return b}function l(b,x){let w=x.scheme||b.scheme||"urn",k=b.nid.toLowerCase(),$=`${w}:${x.nid||k}`,T=y[$];T&&(b=T.serialize(b,x));let A=b,z=b.nss;return A.path=`${k||x.nid}:${z}`,x.skipEscape=!0,A}function d(b,x){let w=b;return w.uuid=w.nss,w.nss=void 0,!x.tolerant&&(!w.uuid||!r.test(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function p(b){let x=b;return x.nss=(b.uuid||"").toLowerCase(),x}var f={scheme:"http",domainHost:!0,parse:o,serialize:a},m={scheme:"https",domainHost:f.domainHost,parse:o,serialize:a},v={scheme:"ws",domainHost:!0,parse:s,serialize:c},g={scheme:"wss",domainHost:v.domainHost,parse:v.parse,serialize:v.serialize},h={scheme:"urn",parse:u,serialize:l,skipNormalize:!0},_={scheme:"urn:uuid",parse:d,serialize:p,skipNormalize:!0},y={http:f,https:m,ws:v,wss:g,urn:h,"urn:uuid":_};e.exports=y}),Lee=le((t,e)=>{var{normalizeIPv6:r,normalizeIPv4:n,removeDotSegments:i,recomposeAuthority:o,normalizeComponentEncoding:a}=qee(),s=Zee();function c(_,y){return typeof _=="string"?_=p(g(_,y),y):typeof _=="object"&&(_=g(p(_,y),y)),_}function u(_,y,b){let x=Object.assign({scheme:"null"},b),w=l(g(_,x),g(y,x),x,!0);return p(w,{...x,skipEscape:!0})}function l(_,y,b,x){let w={};return x||(_=g(p(_,b),b),y=g(p(y,b),b)),b=b||{},!b.tolerant&&y.scheme?(w.scheme=y.scheme,w.userinfo=y.userinfo,w.host=y.host,w.port=y.port,w.path=i(y.path||""),w.query=y.query):(y.userinfo!==void 0||y.host!==void 0||y.port!==void 0?(w.userinfo=y.userinfo,w.host=y.host,w.port=y.port,w.path=i(y.path||""),w.query=y.query):(y.path?(y.path.charAt(0)==="/"?w.path=i(y.path):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?w.path="/"+y.path:_.path?w.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+y.path:w.path=y.path,w.path=i(w.path)),w.query=y.query):(w.path=_.path,y.query!==void 0?w.query=y.query:w.query=_.query),w.userinfo=_.userinfo,w.host=_.host,w.port=_.port),w.scheme=_.scheme),w.fragment=y.fragment,w}function d(_,y,b){return typeof _=="string"?(_=unescape(_),_=p(a(g(_,b),!0),{...b,skipEscape:!0})):typeof _=="object"&&(_=p(a(_,!0),{...b,skipEscape:!0})),typeof y=="string"?(y=unescape(y),y=p(a(g(y,b),!0),{...b,skipEscape:!0})):typeof y=="object"&&(y=p(a(y,!0),{...b,skipEscape:!0})),_.toLowerCase()===y.toLowerCase()}function p(_,y){let b={host:_.host,scheme:_.scheme,userinfo:_.userinfo,port:_.port,path:_.path,query:_.query,nid:_.nid,nss:_.nss,uuid:_.uuid,fragment:_.fragment,reference:_.reference,resourceName:_.resourceName,secure:_.secure,error:""},x=Object.assign({},y),w=[],k=s[(x.scheme||b.scheme||"").toLowerCase()];k&&k.serialize&&k.serialize(b,x),b.path!==void 0&&(x.skipEscape?b.path=unescape(b.path):(b.path=escape(b.path),b.scheme!==void 0&&(b.path=b.path.split("%3A").join(":")))),x.reference!=="suffix"&&b.scheme&&w.push(b.scheme,":");let $=o(b);if($!==void 0&&(x.reference!=="suffix"&&w.push("//"),w.push($),b.path&&b.path.charAt(0)!=="/"&&w.push("/")),b.path!==void 0){let T=b.path;!x.absolutePath&&(!k||!k.absolutePath)&&(T=i(T)),$===void 0&&(T=T.replace(/^\/\//u,"/%2F")),w.push(T)}return b.query!==void 0&&w.push("?",b.query),b.fragment!==void 0&&w.push("#",b.fragment),w.join("")}var f=Array.from({length:127},(_,y)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(y)));function m(_){let y=0;for(let b=0,x=_.length;b<x;++b)if(y=_.charCodeAt(b),y>126||f[y])return!0;return!1}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(_,y){let b=Object.assign({},y),x={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},w=_.indexOf("%")!==-1,k=!1;b.reference==="suffix"&&(_=(b.scheme?b.scheme+":":"")+"//"+_);let $=_.match(v);if($){if(x.scheme=$[1],x.userinfo=$[3],x.host=$[4],x.port=parseInt($[5],10),x.path=$[6]||"",x.query=$[7],x.fragment=$[8],isNaN(x.port)&&(x.port=$[5]),x.host){let A=n(x.host);if(A.isIPV4===!1){let z=r(A.host);x.host=z.host.toLowerCase(),k=z.isIPV6}else x.host=A.host,k=!0}x.scheme===void 0&&x.userinfo===void 0&&x.host===void 0&&x.port===void 0&&x.query===void 0&&!x.path?x.reference="same-document":x.scheme===void 0?x.reference="relative":x.fragment===void 0?x.reference="absolute":x.reference="uri",b.reference&&b.reference!=="suffix"&&b.reference!==x.reference&&(x.error=x.error||"URI is not a "+b.reference+" reference.");let T=s[(b.scheme||x.scheme||"").toLowerCase()];if(!b.unicodeSupport&&(!T||!T.unicodeSupport)&&x.host&&(b.domainHost||T&&T.domainHost)&&k===!1&&m(x.host))try{x.host=URL.domainToASCII(x.host.toLowerCase())}catch(A){x.error=x.error||"Host's domain name can not be converted to ASCII: "+A}(!T||T&&!T.skipNormalize)&&(w&&x.scheme!==void 0&&(x.scheme=unescape(x.scheme)),w&&x.host!==void 0&&(x.host=unescape(x.host)),x.path&&(x.path=escape(unescape(x.path))),x.fragment&&(x.fragment=encodeURI(decodeURIComponent(x.fragment)))),T&&T.parse&&T.parse(x,b)}else x.error=x.error||"URI can not be parsed.";return x}var h={SCHEMES:s,normalize:c,resolve:u,resolveComponents:l,equal:d,serialize:p,parse:g};e.exports=h,e.exports.default=h,e.exports.fastUri=h}),Fee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Lee();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),Vee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Zv();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=et();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=tE(),i=Lv(),o=B2(),a=rE(),s=et(),c=qv(),u=Yg(),l=$t(),d=Dee(),p=Fee(),f=(F,I)=>new RegExp(F,I);f.code="new RegExp";var m=["removeAdditional","useDefaults","coerceTypes"],v=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function y(F){var I,V,C,S,P,B,ie,me,ut,Pe,nr,D,L,Q,ne,xe,Be,mr,Nn,Mr,qr,yr,Vo,Qr,Cn;let Wo=F.strict,Ks=(I=F.code)===null||I===void 0?void 0:I.optimize,Bo=Ks===!0||Ks===void 0?1:Ks||0,ml=(C=(V=F.code)===null||V===void 0?void 0:V.regExp)!==null&&C!==void 0?C:f,rb=(S=F.uriResolver)!==null&&S!==void 0?S:p.default;return{strictSchema:(B=(P=F.strictSchema)!==null&&P!==void 0?P:Wo)!==null&&B!==void 0?B:!0,strictNumbers:(me=(ie=F.strictNumbers)!==null&&ie!==void 0?ie:Wo)!==null&&me!==void 0?me:!0,strictTypes:(Pe=(ut=F.strictTypes)!==null&&ut!==void 0?ut:Wo)!==null&&Pe!==void 0?Pe:"log",strictTuples:(D=(nr=F.strictTuples)!==null&&nr!==void 0?nr:Wo)!==null&&D!==void 0?D:"log",strictRequired:(Q=(L=F.strictRequired)!==null&&L!==void 0?L:Wo)!==null&&Q!==void 0?Q:!1,code:F.code?{...F.code,optimize:Bo,regExp:ml}:{optimize:Bo,regExp:ml},loopRequired:(ne=F.loopRequired)!==null&&ne!==void 0?ne:_,loopEnum:(xe=F.loopEnum)!==null&&xe!==void 0?xe:_,meta:(Be=F.meta)!==null&&Be!==void 0?Be:!0,messages:(mr=F.messages)!==null&&mr!==void 0?mr:!0,inlineRefs:(Nn=F.inlineRefs)!==null&&Nn!==void 0?Nn:!0,schemaId:(Mr=F.schemaId)!==null&&Mr!==void 0?Mr:"$id",addUsedSchema:(qr=F.addUsedSchema)!==null&&qr!==void 0?qr:!0,validateSchema:(yr=F.validateSchema)!==null&&yr!==void 0?yr:!0,validateFormats:(Vo=F.validateFormats)!==null&&Vo!==void 0?Vo:!0,unicodeRegExp:(Qr=F.unicodeRegExp)!==null&&Qr!==void 0?Qr:!0,int32range:(Cn=F.int32range)!==null&&Cn!==void 0?Cn:!0,uriResolver:rb}}class b{constructor(I={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts={...I,...y(I)};let{es5:V,lines:C}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:v,es5:V,lines:C}),this.logger=M(I.logger);let S=I.validateFormats;I.validateFormats=!1,this.RULES=(0,o.getRules)(),x.call(this,g,I,"NOT SUPPORTED"),x.call(this,h,I,"DEPRECATED","warn"),this._metaOpts=A.call(this),I.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&T.call(this,I.keywords),typeof I.meta=="object"&&this.addMetaSchema(I.meta),k.call(this),I.validateFormats=S}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:I,meta:V,schemaId:C}=this.opts,S=d;C==="id"&&(S={...d},S.id=S.$id,delete S.$id),V&&I&&this.addMetaSchema(S,S[C],!1)}defaultMeta(){let{meta:I,schemaId:V}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[V]||I:void 0}validate(I,V){let C;if(typeof I=="string"){if(C=this.getSchema(I),!C)throw Error(`no schema with key or ref "${I}"`)}else C=this.compile(I);let S=C(V);return"$async"in C||(this.errors=C.errors),S}compile(I,V){let C=this._addSchema(I,V);return C.validate||this._compileSchemaEnv(C)}compileAsync(I,V){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:C}=this.opts;return S.call(this,I,V);async function S(Pe,nr){await P.call(this,Pe.$schema);let D=this._addSchema(Pe,nr);return D.validate||B.call(this,D)}async function P(Pe){Pe&&!this.getSchema(Pe)&&await S.call(this,{$ref:Pe},!0)}async function B(Pe){try{return this._compileSchemaEnv(Pe)}catch(nr){if(!(nr instanceof i.default))throw nr;return ie.call(this,nr),await me.call(this,nr.missingSchema),B.call(this,Pe)}}function ie({missingSchema:Pe,missingRef:nr}){if(this.refs[Pe])throw Error(`AnySchema ${Pe} is loaded but ${nr} cannot be resolved`)}async function me(Pe){let nr=await ut.call(this,Pe);this.refs[Pe]||await P.call(this,nr.$schema),this.refs[Pe]||this.addSchema(nr,Pe,V)}async function ut(Pe){let nr=this._loading[Pe];if(nr)return nr;try{return await(this._loading[Pe]=C(Pe))}finally{delete this._loading[Pe]}}}addSchema(I,V,C,S=this.opts.validateSchema){if(Array.isArray(I)){for(let B of I)this.addSchema(B,void 0,C,S);return this}let P;if(typeof I=="object"){let{schemaId:B}=this.opts;if(P=I[B],P!==void 0&&typeof P!="string")throw Error(`schema ${B} must be string`)}return V=(0,c.normalizeId)(V||P),this._checkUnique(V),this.schemas[V]=this._addSchema(I,C,V,S,!0),this}addMetaSchema(I,V,C=this.opts.validateSchema){return this.addSchema(I,V,!0,C),this}validateSchema(I,V){if(typeof I=="boolean")return!0;let C;if(C=I.$schema,C!==void 0&&typeof C!="string")throw Error("$schema must be a string");if(C=C||this.opts.defaultMeta||this.defaultMeta(),!C)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let S=this.validate(C,I);if(!S&&V){let P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw Error(P)}return S}getSchema(I){let V;for(;typeof(V=w.call(this,I))=="string";)I=V;if(V===void 0){let{schemaId:C}=this.opts,S=new a.SchemaEnv({schema:{},schemaId:C});if(V=a.resolveSchema.call(this,S,I),!V)return;this.refs[I]=V}return V.validate||this._compileSchemaEnv(V)}removeSchema(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(typeof I){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let V=w.call(this,I);return typeof V=="object"&&this._cache.delete(V.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{let V=I;this._cache.delete(V);let C=I[this.opts.schemaId];return C&&(C=(0,c.normalizeId)(C),delete this.schemas[C],delete this.refs[C]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(I){for(let V of I)this.addKeyword(V);return this}addKeyword(I,V){let C;if(typeof I=="string")C=I,typeof V=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),V.keyword=C);else if(typeof I=="object"&&V===void 0){if(V=I,C=V.keyword,Array.isArray(C)&&!C.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(R.call(this,C,V),!V)return(0,l.eachItem)(C,P=>te.call(this,P)),this;ye.call(this,V);let S={...V,type:(0,u.getJSONTypes)(V.type),schemaType:(0,u.getJSONTypes)(V.schemaType)};return(0,l.eachItem)(C,S.type.length===0?P=>te.call(this,P,S):P=>S.type.forEach(B=>te.call(this,P,S,B))),this}getKeyword(I){let V=this.RULES.all[I];return typeof V=="object"?V.definition:!!V}removeKeyword(I){let{RULES:V}=this;delete V.keywords[I],delete V.all[I];for(let C of V.rules){let S=C.rules.findIndex(P=>P.keyword===I);S>=0&&C.rules.splice(S,1)}return this}addFormat(I,V){return typeof V=="string"&&(V=new RegExp(V)),this.formats[I]=V,this}errorsText(I=this.errors,{separator:V=", ",dataVar:C="data"}={}){return!I||I.length===0?"No errors":I.map(S=>`${C}${S.instancePath} ${S.message}`).reduce((S,P)=>S+V+P)}$dataMetaSchema(I,V){let C=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(let S of V){let P=S.split("/").slice(1),B=I;for(let ie of P)B=B[ie];for(let ie in C){let me=C[ie];if(typeof me!="object")continue;let{$data:ut}=me.definition,Pe=B[ie];ut&&Pe&&(B[ie]=de(Pe))}}return I}_removeAllSchemas(I,V){for(let C in I){let S=I[C];(!V||V.test(C))&&(typeof S=="string"?delete I[C]:S&&!S.meta&&(this._cache.delete(S.schema),delete I[C]))}}_addSchema(I,V,C,S=this.opts.validateSchema,P=this.opts.addUsedSchema){let B,{schemaId:ie}=this.opts;if(typeof I=="object")B=I[ie];else{if(this.opts.jtd)throw Error("schema must be object");if(typeof I!="boolean")throw Error("schema must be object or boolean")}let me=this._cache.get(I);if(me!==void 0)return me;C=(0,c.normalizeId)(B||C);let ut=c.getSchemaRefs.call(this,I,C);return me=new a.SchemaEnv({schema:I,schemaId:ie,meta:V,baseId:C,localRefs:ut}),this._cache.set(me.schema,me),P&&!C.startsWith("#")&&(C&&this._checkUnique(C),this.refs[C]=me),S&&this.validateSchema(I,!0),me}_checkUnique(I){if(this.schemas[I]||this.refs[I])throw Error(`schema with key or id "${I}" already exists`)}_compileSchemaEnv(I){if(I.meta?this._compileMetaSchema(I):a.compileSchema.call(this,I),!I.validate)throw Error("ajv implementation error");return I.validate}_compileMetaSchema(I){let V=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,I)}finally{this.opts=V}}}b.ValidationError=n.default,b.MissingRefError=i.default,t.default=b;function x(F,I,V,C="error"){for(let S in F){let P=S;P in I&&this.logger[C](`${V}: option ${S}. ${F[P]}`)}}function w(F){return F=(0,c.normalizeId)(F),this.schemas[F]||this.refs[F]}function k(){let F=this.opts.schemas;if(F)if(Array.isArray(F))this.addSchema(F);else for(let I in F)this.addSchema(F[I],I)}function $(){for(let F in this.opts.formats){let I=this.opts.formats[F];I&&this.addFormat(F,I)}}function T(F){if(Array.isArray(F)){this.addVocabulary(F);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let I in F){let V=F[I];V.keyword||(V.keyword=I),this.addKeyword(V)}}function A(){let F={...this.opts};for(let I of m)delete F[I];return F}var z={log(){},warn(){},error(){}};function M(F){if(F===!1)return z;if(F===void 0)return console;if(F.log&&F.warn&&F.error)return F;throw Error("logger must implement log, warn and error methods")}var W=/^[a-z_$][a-z0-9_$:-]*$/i;function R(F,I){let{RULES:V}=this;if((0,l.eachItem)(F,C=>{if(V.keywords[C])throw Error(`Keyword ${C} is already defined`);if(!W.test(C))throw Error(`Keyword ${C} has invalid name`)}),!!I&&I.$data&&!("code"in I||"validate"in I))throw Error('$data keyword must have "code" or "validate" function')}function te(F,I,V){var C;let S=I?.post;if(V&&S)throw Error('keyword with "post" flag cannot have "type"');let{RULES:P}=this,B=S?P.post:P.rules.find(({type:me})=>me===V);if(B||(B={type:V,rules:[]},P.rules.push(B)),P.keywords[F]=!0,!I)return;let ie={keyword:F,definition:{...I,type:(0,u.getJSONTypes)(I.type),schemaType:(0,u.getJSONTypes)(I.schemaType)}};I.before?G.call(this,B,ie,I.before):B.rules.push(ie),P.all[F]=ie,(C=I.implements)===null||C===void 0||C.forEach(me=>this.addKeyword(me))}function G(F,I,V){let C=F.rules.findIndex(S=>S.keyword===V);C>=0?F.rules.splice(C,0,I):(F.rules.push(I),this.logger.warn(`rule ${V} is not defined`))}function ye(F){let{metaSchema:I}=F;I!==void 0&&(F.$data&&this.opts.$data&&(I=de(I)),F.validateSchema=this.compile(I,!0))}var De={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function de(F){return{anyOf:[F,De]}}}),Wee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),Bee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=Lv(),r=Ui(),n=et(),i=_a(),o=rE(),a=$t(),s={keyword:"$ref",schemaType:"string",code(l){let{gen:d,schema:p,it:f}=l,{baseId:m,schemaEnv:v,validateName:g,opts:h,self:_}=f,{root:y}=v;if((p==="#"||p==="#/")&&m===y.baseId)return x();let b=o.resolveRef.call(_,y,m,p);if(b===void 0)throw new e.default(f.opts.uriResolver,m,p);if(b instanceof o.SchemaEnv)return w(b);return k(b);function x(){if(v===y)return u(l,g,v,v.$async);let $=d.scopeValue("root",{ref:y});return u(l,n._`${$}.validate`,y,y.$async)}function w($){let T=c(l,$);u(l,T,$,$.$async)}function k($){let T=d.scopeValue("schema",h.code.source===!0?{ref:$,code:(0,n.stringify)($)}:{ref:$}),A=d.name("valid"),z=l.subschema({schema:$,dataTypes:[],schemaPath:n.nil,topSchemaRef:T,errSchemaPath:p},A);l.mergeEvaluated(z),l.ok(A)}}};function c(l,d){let{gen:p}=l;return d.validate?p.scopeValue("validate",{ref:d.validate}):n._`${p.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=c;function u(l,d,p,f){let{gen:m,it:v}=l,{allErrors:g,schemaEnv:h,opts:_}=v,y=_.passContext?i.default.this:n.nil;f?b():x();function b(){if(!h.$async)throw Error("async schema referenced by sync schema");let $=m.let("valid");m.try(()=>{m.code(n._`await ${(0,r.callValidateCode)(l,d,y)}`),k(d),!g&&m.assign($,!0)},T=>{m.if(n._`!(${T} instanceof ${v.ValidationError})`,()=>m.throw(T)),w(T),!g&&m.assign($,!1)}),l.ok($)}function x(){l.result((0,r.callValidateCode)(l,d,y),()=>k(d),()=>w(d))}function w($){let T=n._`${$}.errors`;m.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${T} : ${i.default.vErrors}.concat(${T})`),m.assign(i.default.errors,n._`${i.default.vErrors}.length`)}function k($){var T;if(!v.opts.unevaluated)return;let A=(T=p?.validate)===null||T===void 0?void 0:T.evaluated;if(v.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(v.props=a.mergeEvaluated.props(m,A.props,v.props));else{let z=m.var("props",n._`${$}.evaluated.props`);v.props=a.mergeEvaluated.props(m,z,v.props,n.Name)}if(v.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(v.items=a.mergeEvaluated.items(m,A.items,v.items));else{let z=m.var("items",n._`${$}.evaluated.items`);v.items=a.mergeEvaluated.items(m,z,v.items,n.Name)}}}t.callRef=u,t.default=s}),Kee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Wee(),r=Bee(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),Hee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},i={message:({keyword:a,schemaCode:s})=>e.str`must be ${n[a].okStr} ${s}`,params:({keyword:a,schemaCode:s})=>e._`{comparison: ${n[a].okStr}, limit: ${s}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:i,code(a){let{keyword:s,data:c,schemaCode:u}=a;a.fail$data(e._`${c} ${n[s].fail} ${u} || isNaN(${c})`)}};t.default=o}),Gee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message:({schemaCode:i})=>e.str`must be multiple of ${i}`,params:({schemaCode:i})=>e._`{multipleOf: ${i}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(i){let{gen:o,data:a,schemaCode:s,it:c}=i,u=c.opts.multipleOfPrecision,l=o.let("res"),d=u?e._`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:e._`${l} !== parseInt(${l})`;i.fail$data(e._`(${s} === 0 || (${l} = ${a}/${s}, ${d}))`)}};t.default=n}),Qee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){let n=r.length,i=0,o=0,a;for(;o<n;)i++,a=r.charCodeAt(o++),a>=55296&&a<=56319&&o<n&&(a=r.charCodeAt(o),(a&64512)===56320&&o++);return i}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),Yee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=$t(),n=Qee(),i={message({keyword:a,schemaCode:s}){let c=a==="maxLength"?"more":"fewer";return e.str`must NOT have ${c} than ${s} characters`},params:({schemaCode:a})=>e._`{limit: ${a}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:i,code(a){let{keyword:s,data:c,schemaCode:u,it:l}=a,d=s==="maxLength"?e.operators.GT:e.operators.LT,p=l.opts.unicode===!1?e._`${c}.length`:e._`${(0,r.useFunc)(a.gen,n.default)}(${c})`;a.fail$data(e._`${p} ${d} ${u}`)}};t.default=o}),Jee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ui(),r=$t(),n=et(),i={message:({schemaCode:a})=>n.str`must match pattern "${a}"`,params:({schemaCode:a})=>n._`{pattern: ${a}}`},o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:i,code(a){let{gen:s,data:c,$data:u,schema:l,schemaCode:d,it:p}=a,f=p.opts.unicodeRegExp?"u":"";if(u){let{regExp:m}=p.opts.code,v=m.code==="new RegExp"?n._`new RegExp`:(0,r.useFunc)(s,m),g=s.let("valid");s.try(()=>s.assign(g,n._`${v}(${d}, ${f}).test(${c})`),()=>s.assign(g,!1)),a.fail$data(n._`!${g}`)}else{let m=(0,e.usePattern)(a,l);a.fail$data(n._`!${m}.test(${c})`)}}};t.default=o}),Xee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message({keyword:i,schemaCode:o}){let a=i==="maxProperties"?"more":"fewer";return e.str`must NOT have ${a} than ${o} properties`},params:({schemaCode:i})=>e._`{limit: ${i}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(i){let{keyword:o,data:a,schemaCode:s}=i,c=o==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data(e._`Object.keys(${a}).length ${c} ${s}`)}};t.default=n}),ete=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ui(),r=et(),n=$t(),i={message:({params:{missingProperty:a}})=>r.str`must have required property '${a}'`,params:({params:{missingProperty:a}})=>r._`{missingProperty: ${a}}`},o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:i,code(a){let{gen:s,schema:c,schemaCode:u,data:l,$data:d,it:p}=a,{opts:f}=p;if(!d&&c.length===0)return;let m=c.length>=f.loopRequired;if(p.allErrors?v():g(),f.strictRequired){let y=a.parentSchema.properties,{definedProperties:b}=a.it;for(let x of c)if(y?.[x]===void 0&&!b.has(x)){let w=p.schemaEnv.baseId+p.errSchemaPath,k=`required property "${x}" is not defined at "${w}" (strictRequired)`;(0,n.checkStrictMode)(p,k,p.opts.strictRequired)}}function v(){if(m||d)a.block$data(r.nil,h);else for(let y of c)(0,e.checkReportMissingProp)(a,y)}function g(){let y=s.let("missing");if(m||d){let b=s.let("valid",!0);a.block$data(b,()=>_(y,b)),a.ok(b)}else s.if((0,e.checkMissingProp)(a,c,y)),(0,e.reportMissingProp)(a,y),s.else()}function h(){s.forOf("prop",u,y=>{a.setParams({missingProperty:y}),s.if((0,e.noPropertyInData)(s,l,y,f.ownProperties),()=>a.error())})}function _(y,b){a.setParams({missingProperty:y}),s.forOf(y,u,()=>{s.assign(b,(0,e.propertyInData)(s,l,y,f.ownProperties)),s.if((0,r.not)(b),()=>{a.error(),s.break()})},r.nil)}}};t.default=o}),tte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message({keyword:i,schemaCode:o}){let a=i==="maxItems"?"more":"fewer";return e.str`must NOT have ${a} than ${o} items`},params:({schemaCode:i})=>e._`{limit: ${i}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(i){let{keyword:o,data:a,schemaCode:s}=i,c=o==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data(e._`${a}.length ${c} ${s}`)}};t.default=n}),nE=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=H2();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),rte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Yg(),r=et(),n=$t(),i=nE(),o={message:({params:{i:s,j:c}})=>r.str`must NOT have duplicate items (items ## ${c} and ${s} are identical)`,params:({params:{i:s,j:c}})=>r._`{i: ${s}, j: ${c}}`},a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:o,code(s){let{gen:c,data:u,$data:l,schema:d,parentSchema:p,schemaCode:f,it:m}=s;if(!l&&!d)return;let v=c.let("valid"),g=p.items?(0,e.getSchemaTypes)(p.items):[];s.block$data(v,h,r._`${f} === false`),s.ok(v);function h(){let x=c.let("i",r._`${u}.length`),w=c.let("j");s.setParams({i:x,j:w}),c.assign(v,!0),c.if(r._`${x} > 1`,()=>(_()?y:b)(x,w))}function _(){return g.length>0&&!g.some(x=>x==="object"||x==="array")}function y(x,w){let k=c.name("item"),$=(0,e.checkDataTypes)(g,k,m.opts.strictNumbers,e.DataType.Wrong),T=c.const("indices",r._`{}`);c.for(r._`;${x}--;`,()=>{c.let(k,r._`${u}[${x}]`),c.if($,r._`continue`),g.length>1&&c.if(r._`typeof ${k} == "string"`,r._`${k} += "_"`),c.if(r._`typeof ${T}[${k}] == "number"`,()=>{c.assign(w,r._`${T}[${k}]`),s.error(),c.assign(v,!1).break()}).code(r._`${T}[${k}] = ${x}`)})}function b(x,w){let k=(0,n.useFunc)(c,i.default),$=c.name("outer");c.label($).for(r._`;${x}--;`,()=>c.for(r._`${w} = ${x}; ${w}--;`,()=>c.if(r._`${k}(${u}[${x}], ${u}[${w}])`,()=>{s.error(),c.assign(v,!1).break($)})))}}};t.default=a}),nte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=$t(),n=nE(),i={message:"must be equal to constant",params:({schemaCode:a})=>e._`{allowedValue: ${a}}`},o={keyword:"const",$data:!0,error:i,code(a){let{gen:s,data:c,$data:u,schemaCode:l,schema:d}=a;u||d&&typeof d=="object"?a.fail$data(e._`!${(0,r.useFunc)(s,n.default)}(${c}, ${l})`):a.fail(e._`${d} !== ${c}`)}};t.default=o}),ite=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=$t(),n=nE(),i={message:"must be equal to one of the allowed values",params:({schemaCode:a})=>e._`{allowedValues: ${a}}`},o={keyword:"enum",schemaType:"array",$data:!0,error:i,code(a){let{gen:s,data:c,$data:u,schema:l,schemaCode:d,it:p}=a;if(!u&&l.length===0)throw Error("enum must have non-empty array");let f=l.length>=p.opts.loopEnum,m,v=()=>m??(m=(0,r.useFunc)(s,n.default)),g;if(f||u)g=s.let("valid"),a.block$data(g,h);else{if(!Array.isArray(l))throw Error("ajv implementation error");let y=s.const("vSchema",d);g=(0,e.or)(...l.map((b,x)=>_(y,x)))}a.pass(g);function h(){s.assign(g,!1),s.forOf("v",d,y=>s.if(e._`${v()}(${c}, ${y})`,()=>s.assign(g,!0).break()))}function _(y,b){let x=l[b];return typeof x=="object"&&x!==null?e._`${v()}(${c}, ${y}[${b}])`:e._`${c} === ${x}`}}};t.default=o}),ote=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Hee(),r=Gee(),n=Yee(),i=Jee(),o=Xee(),a=ete(),s=tte(),c=rte(),u=nte(),l=ite(),d=[e.default,r.default,n.default,i.default,o.default,a.default,s.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];t.default=d}),G2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=et(),r=$t(),n={message:({params:{len:a}})=>e.str`must NOT have more than ${a} items`,params:({params:{len:a}})=>e._`{limit: ${a}}`},i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(a){let{parentSchema:s,it:c}=a,{items:u}=s;if(!Array.isArray(u)){(0,r.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(a,u)}};function o(a,s){let{gen:c,schema:u,data:l,keyword:d,it:p}=a;p.items=!0;let f=c.const("len",e._`${l}.length`);if(u===!1)a.setParams({len:s.length}),a.pass(e._`${f} <= ${s.length}`);else if(typeof u=="object"&&!(0,r.alwaysValidSchema)(p,u)){let v=c.var("valid",e._`${f} <= ${s.length}`);c.if((0,e.not)(v),()=>m(v)),a.ok(v)}function m(v){c.forRange("i",s.length,f,g=>{a.subschema({keyword:d,dataProp:g,dataPropType:r.Type.Num},v),!p.allErrors&&c.if((0,e.not)(v),()=>c.break())})}}t.validateAdditionalItems=o,t.default=i}),Q2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=et(),r=$t(),n=Ui(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){let{schema:s,it:c}=a;if(Array.isArray(s))return o(a,"additionalItems",s);c.items=!0,!(0,r.alwaysValidSchema)(c,s)&&a.ok((0,n.validateArray)(a))}};function o(a,s,c=a.schema){let{gen:u,parentSchema:l,data:d,keyword:p,it:f}=a;g(l),f.opts.unevaluated&&c.length&&f.items!==!0&&(f.items=r.mergeEvaluated.items(u,c.length,f.items));let m=u.name("valid"),v=u.const("len",e._`${d}.length`);c.forEach((h,_)=>{(0,r.alwaysValidSchema)(f,h)||(u.if(e._`${v} > ${_}`,()=>a.subschema({keyword:p,schemaProp:_,dataProp:_},m)),a.ok(m))});function g(h){let{opts:_,errSchemaPath:y}=f,b=c.length,x=b===h.minItems&&(b===h.maxItems||h[s]===!1);if(_.strictTuples&&!x){let w=`"${p}" is ${b}-tuple, but minItems or maxItems/${s} are not specified or different at path "${y}"`;(0,r.checkStrictMode)(f,w,_.strictTuples)}}}t.validateTuple=o,t.default=i}),ate=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Q2(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),ste=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=$t(),n=Ui(),i=G2(),o={message:({params:{len:s}})=>e.str`must NOT have more than ${s} items`,params:({params:{len:s}})=>e._`{limit: ${s}}`},a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:o,code(s){let{schema:c,parentSchema:u,it:l}=s,{prefixItems:d}=u;l.items=!0,!(0,r.alwaysValidSchema)(l,c)&&(d?(0,i.validateAdditionalItems)(s,d):s.ok((0,n.validateArray)(s)))}};t.default=a}),cte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=$t(),n={message:({params:{min:o,max:a}})=>a===void 0?e.str`must contain at least ${o} valid item(s)`:e.str`must contain at least ${o} and no more than ${a} valid item(s)`,params:({params:{min:o,max:a}})=>a===void 0?e._`{minContains: ${o}}`:e._`{minContains: ${o}, maxContains: ${a}}`},i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(o){let{gen:a,schema:s,parentSchema:c,data:u,it:l}=o,d,p,{minContains:f,maxContains:m}=c;l.opts.next?(d=f===void 0?1:f,p=m):d=1;let v=a.const("len",e._`${u}.length`);if(o.setParams({min:d,max:p}),p===void 0&&d===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,r.alwaysValidSchema)(l,s)){let b=e._`${v} >= ${d}`;p!==void 0&&(b=e._`${b} && ${v} <= ${p}`),o.pass(b);return}l.items=!0;let g=a.name("valid");p===void 0&&d===1?_(g,()=>a.if(g,()=>a.break())):d===0?(a.let(g,!0),p!==void 0&&a.if(e._`${u}.length > 0`,h)):(a.let(g,!1),h()),o.result(g,()=>o.reset());function h(){let b=a.name("_valid"),x=a.let("count",0);_(b,()=>a.if(b,()=>y(x)))}function _(b,x){a.forRange("i",0,v,w=>{o.subschema({keyword:"contains",dataProp:w,dataPropType:r.Type.Num,compositeRule:!0},b),x()})}function y(b){a.code(e._`${b}++`),p===void 0?a.if(e._`${b} >= ${d}`,()=>a.assign(g,!0).break()):(a.if(e._`${b} > ${p}`,()=>a.assign(g,!1).break()),d===1?a.assign(g,!0):a.if(e._`${b} >= ${d}`,()=>a.assign(g,!0)))}}};t.default=i}),ute=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=et(),r=$t(),n=Ui();t.error={message:({params:{property:c,depsCount:u,deps:l}})=>{let d=u===1?"property":"properties";return e.str`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>e._`{property: ${c},
|
|
145
|
+
missingProperty: ${d},
|
|
146
|
+
depsCount: ${u},
|
|
147
|
+
deps: ${l}}`};var i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(c){let[u,l]=o(c);a(c,u),s(c,l)}};function o({schema:c}){let u={},l={};for(let d in c){if(d==="__proto__")continue;let p=Array.isArray(c[d])?u:l;p[d]=c[d]}return[u,l]}function a(c,u=c.schema){let{gen:l,data:d,it:p}=c;if(Object.keys(u).length===0)return;let f=l.let("missing");for(let m in u){let v=u[m];if(v.length===0)continue;let g=(0,n.propertyInData)(l,d,m,p.opts.ownProperties);c.setParams({property:m,depsCount:v.length,deps:v.join(", ")}),p.allErrors?l.if(g,()=>{for(let h of v)(0,n.checkReportMissingProp)(c,h)}):(l.if(e._`${g} && (${(0,n.checkMissingProp)(c,v,f)})`),(0,n.reportMissingProp)(c,f),l.else())}}t.validatePropertyDeps=a;function s(c,u=c.schema){let{gen:l,data:d,keyword:p,it:f}=c,m=l.name("valid");for(let v in u)(0,r.alwaysValidSchema)(f,u[v])||(l.if((0,n.propertyInData)(l,d,v,f.opts.ownProperties),()=>{let g=c.subschema({keyword:p,schemaProp:v},m);c.mergeValidEvaluated(g,m)},()=>l.var(m,!0)),c.ok(m))}t.validateSchemaDeps=s,t.default=i}),lte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=$t(),n={message:"property name must be valid",params:({params:o})=>e._`{propertyName: ${o.propertyName}}`},i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(o){let{gen:a,schema:s,data:c,it:u}=o;if((0,r.alwaysValidSchema)(u,s))return;let l=a.name("valid");a.forIn("key",c,d=>{o.setParams({propertyName:d}),o.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),a.if((0,e.not)(l),()=>{o.error(!0),!u.allErrors&&a.break()})}),o.ok(l)}};t.default=i}),Y2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ui(),r=et(),n=_a(),i=$t(),o={message:"must NOT have additional properties",params:({params:s})=>r._`{additionalProperty: ${s.additionalProperty}}`},a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:o,code(s){let{gen:c,schema:u,parentSchema:l,data:d,errsCount:p,it:f}=s;if(!p)throw Error("ajv implementation error");let{allErrors:m,opts:v}=f;if(f.props=!0,v.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(f,u))return;let g=(0,e.allSchemaProperties)(l.properties),h=(0,e.allSchemaProperties)(l.patternProperties);_(),s.ok(r._`${p} === ${n.default.errors}`);function _(){c.forIn("key",d,k=>{!g.length&&!h.length?x(k):c.if(y(k),()=>x(k))})}function y(k){let $;if(g.length>8){let T=(0,i.schemaRefOrVal)(f,l.properties,"properties");$=(0,e.isOwnProperty)(c,T,k)}else g.length?$=(0,r.or)(...g.map(T=>r._`${k} === ${T}`)):$=r.nil;return h.length&&($=(0,r.or)($,...h.map(T=>r._`${(0,e.usePattern)(s,T)}.test(${k})`))),(0,r.not)($)}function b(k){c.code(r._`delete ${d}[${k}]`)}function x(k){if(v.removeAdditional==="all"||v.removeAdditional&&u===!1){b(k);return}if(u===!1){s.setParams({additionalProperty:k}),s.error(),!m&&c.break();return}if(typeof u=="object"&&!(0,i.alwaysValidSchema)(f,u)){let $=c.name("valid");v.removeAdditional==="failing"?(w(k,$,!1),c.if((0,r.not)($),()=>{s.reset(),b(k)})):(w(k,$),!m&&c.if((0,r.not)($),()=>c.break()))}}function w(k,$,T){let A={keyword:"additionalProperties",dataProp:k,dataPropType:i.Type.Str};T===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(A,$)}}};t.default=a}),dte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Zv(),r=Ui(),n=$t(),i=Y2(),o={keyword:"properties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,parentSchema:u,data:l,it:d}=a;d.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(d,i.default,"additionalProperties"));let p=(0,r.allSchemaProperties)(c);for(let h of p)d.definedProperties.add(h);d.opts.unevaluated&&p.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(s,(0,n.toHash)(p),d.props));let f=p.filter(h=>!(0,n.alwaysValidSchema)(d,c[h]));if(f.length===0)return;let m=s.name("valid");for(let h of f)v(h)?g(h):(s.if((0,r.propertyInData)(s,l,h,d.opts.ownProperties)),g(h),!d.allErrors&&s.else().var(m,!0),s.endIf()),a.it.definedProperties.add(h),a.ok(m);function v(h){return d.opts.useDefaults&&!d.compositeRule&&c[h].default!==void 0}function g(h){a.subschema({keyword:"properties",schemaProp:h,dataProp:h},m)}}};t.default=o}),pte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ui(),r=et(),n=$t(),i=$t(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,data:u,parentSchema:l,it:d}=a,{opts:p}=d,f=(0,e.allSchemaProperties)(c),m=f.filter(x=>(0,n.alwaysValidSchema)(d,c[x]));if(f.length===0||m.length===f.length&&(!d.opts.unevaluated||d.props===!0))return;let v=p.strictSchema&&!p.allowMatchingProperties&&l.properties,g=s.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,i.evaluatedPropsToName)(s,d.props));let{props:h}=d;_();function _(){for(let x of f)v&&y(x),d.allErrors?b(x):(s.var(g,!0),b(x),s.if(g))}function y(x){for(let w in v)new RegExp(x).test(w)&&(0,n.checkStrictMode)(d,`property ${w} matches pattern ${x} (use allowMatchingProperties)`)}function b(x){s.forIn("key",u,w=>{s.if(r._`${(0,e.usePattern)(a,x)}.test(${w})`,()=>{let k=m.includes(x);k||a.subschema({keyword:"patternProperties",schemaProp:x,dataProp:w,dataPropType:i.Type.Str},g),d.opts.unevaluated&&h!==!0?s.assign(r._`${h}[${w}]`,!0):!k&&!d.allErrors&&s.if((0,r.not)(g),()=>s.break())})})}}};t.default=o}),fte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=$t(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){let{gen:i,schema:o,it:a}=n;if((0,e.alwaysValidSchema)(a,o)){n.fail();return}let s=i.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),n.failResult(s,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),mte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ui(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),hte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=$t(),n={message:"must match exactly one schema in oneOf",params:({params:o})=>e._`{passingSchemas: ${o.passing}}`},i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(o){let{gen:a,schema:s,parentSchema:c,it:u}=o;if(!Array.isArray(s))throw Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;let l=s,d=a.let("valid",!1),p=a.let("passing",null),f=a.name("_valid");o.setParams({passing:p}),a.block(m),o.result(d,()=>o.reset(),()=>o.error(!0));function m(){l.forEach((v,g)=>{let h;(0,r.alwaysValidSchema)(u,v)?a.var(f,!0):h=o.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},f),g>0&&a.if(e._`${f} && ${d}`).assign(d,!1).assign(p,e._`[${p}, ${g}]`).else(),a.if(f,()=>{a.assign(d,!0),a.assign(p,g),h&&o.mergeEvaluated(h,e.Name)})})}}};t.default=i}),gte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=$t(),r={keyword:"allOf",schemaType:"array",code(n){let{gen:i,schema:o,it:a}=n;if(!Array.isArray(o))throw Error("ajv implementation error");let s=i.name("valid");o.forEach((c,u)=>{if((0,e.alwaysValidSchema)(a,c))return;let l=n.subschema({keyword:"allOf",schemaProp:u},s);n.ok(s),n.mergeEvaluated(l)})}};t.default=r}),vte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=$t(),n={message:({params:a})=>e.str`must match "${a.ifClause}" schema`,params:({params:a})=>e._`{failingKeyword: ${a.ifClause}}`},i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(a){let{gen:s,parentSchema:c,it:u}=a;c.then===void 0&&c.else===void 0&&(0,r.checkStrictMode)(u,'"if" without "then" and "else" is ignored');let l=o(u,"then"),d=o(u,"else");if(!l&&!d)return;let p=s.let("valid",!0),f=s.name("_valid");if(m(),a.reset(),l&&d){let g=s.let("ifClause");a.setParams({ifClause:g}),s.if(f,v("then",g),v("else",g))}else l?s.if(f,v("then")):s.if((0,e.not)(f),v("else"));a.pass(p,()=>a.error(!0));function m(){let g=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);a.mergeEvaluated(g)}function v(g,h){return()=>{let _=a.subschema({keyword:g},f);s.assign(p,f),a.mergeValidEvaluated(_,p),h?s.assign(h,e._`${g}`):a.setParams({ifClause:g})}}}};function o(a,s){let c=a.schema[s];return c!==void 0&&!(0,r.alwaysValidSchema)(a,c)}t.default=i}),yte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=$t(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:i,it:o}){i.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};t.default=r}),_te=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=G2(),r=ate(),n=Q2(),i=ste(),o=cte(),a=ute(),s=lte(),c=Y2(),u=dte(),l=pte(),d=fte(),p=mte(),f=hte(),m=gte(),v=vte(),g=yte();function h(_=!1){let y=[d.default,p.default,f.default,m.default,v.default,g.default,s.default,c.default,a.default,u.default,l.default];return _?y.push(r.default,i.default):y.push(e.default,n.default),y.push(o.default),y}t.default=h}),bte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message:({schemaCode:i})=>e.str`must match format "${i}"`,params:({schemaCode:i})=>e._`{format: ${i}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(i,o){let{gen:a,data:s,$data:c,schema:u,schemaCode:l,it:d}=i,{opts:p,errSchemaPath:f,schemaEnv:m,self:v}=d;if(!p.validateFormats)return;c?g():h();function g(){let _=a.scopeValue("formats",{ref:v.formats,code:p.code.formats}),y=a.const("fDef",e._`${_}[${l}]`),b=a.let("fType"),x=a.let("format");a.if(e._`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>a.assign(b,e._`${y}.type || "string"`).assign(x,e._`${y}.validate`),()=>a.assign(b,e._`"string"`).assign(x,y)),i.fail$data((0,e.or)(w(),k()));function w(){return p.strictSchema===!1?e.nil:e._`${l} && !${x}`}function k(){let $=m.$async?e._`(${y}.async ? await ${x}(${s}) : ${x}(${s}))`:e._`${x}(${s})`,T=e._`(typeof ${x} == "function" ? ${$} : ${x}.test(${s}))`;return e._`${x} && ${x} !== true && ${b} === ${o} && !${T}`}}function h(){let _=v.formats[u];if(!_){w();return}if(_===!0)return;let[y,b,x]=k(_);y===o&&i.pass($());function w(){if(p.strictSchema===!1){v.logger.warn(T());return}throw Error(T());function T(){return`unknown format "${u}" ignored in schema at path "${f}"`}}function k(T){let A=T instanceof RegExp?(0,e.regexpCode)(T):p.code.formats?e._`${p.code.formats}${(0,e.getProperty)(u)}`:void 0,z=a.scopeValue("formats",{key:u,ref:T,code:A});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,e._`${z}.validate`]:["string",T,z]}function $(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!m.$async)throw Error("async format in sync schema");return e._`await ${x}(${s})`}return typeof b=="function"?e._`${x}(${s})`:e._`${x}.test(${s})`}}}};t.default=n}),xte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=bte(),r=[e.default];t.default=r}),wte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),kte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Kee(),r=ote(),n=_te(),i=xte(),o=wte(),a=[e.default,r.default,(0,n.default)(),i.default,o.metadataVocabulary,o.contentVocabulary];t.default=a}),Ste=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0;var e;(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(t.DiscrError=e={}))}),$te=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=Ste(),n=rE(),i=Lv(),o=$t(),a={message:({params:{discrError:c,tagName:u}})=>c===r.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:c,tag:u,tagName:l}})=>e._`{error: ${c}, tag: ${l}, tagValue: ${u}}`},s={keyword:"discriminator",type:"object",schemaType:"object",error:a,code(c){let{gen:u,data:l,schema:d,parentSchema:p,it:f}=c,{oneOf:m}=p;if(!f.opts.discriminator)throw Error("discriminator: requires discriminator option");let v=d.propertyName;if(typeof v!="string")throw Error("discriminator: requires propertyName");if(d.mapping)throw Error("discriminator: mapping is not supported");if(!m)throw Error("discriminator: requires oneOf keyword");let g=u.let("valid",!1),h=u.const("tag",e._`${l}${(0,e.getProperty)(v)}`);u.if(e._`typeof ${h} == "string"`,()=>_(),()=>c.error(!1,{discrError:r.DiscrError.Tag,tag:h,tagName:v})),c.ok(g);function _(){let x=b();u.if(!1);for(let w in x)u.elseIf(e._`${h} === ${w}`),u.assign(g,y(x[w]));u.else(),c.error(!1,{discrError:r.DiscrError.Mapping,tag:h,tagName:v}),u.endIf()}function y(x){let w=u.name("valid"),k=c.subschema({keyword:"oneOf",schemaProp:x},w);return c.mergeEvaluated(k,e.Name),w}function b(){var x;let w={},k=T(p),$=!0;for(let M=0;M<m.length;M++){let W=m[M];if(W?.$ref&&!(0,o.schemaHasRulesButRef)(W,f.self.RULES)){let te=W.$ref;if(W=n.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,te),W instanceof n.SchemaEnv&&(W=W.schema),W===void 0)throw new i.default(f.opts.uriResolver,f.baseId,te)}let R=(x=W?.properties)===null||x===void 0?void 0:x[v];if(typeof R!="object")throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);$=$&&(k||T(W)),A(R,M)}if(!$)throw Error(`discriminator: "${v}" must be required`);return w;function T({required:M}){return Array.isArray(M)&&M.includes(v)}function A(M,W){if(M.const)z(M.const,W);else if(M.enum)for(let R of M.enum)z(R,W);else throw Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function z(M,W){if(typeof M!="string"||M in w)throw Error(`discriminator: "${v}" values must be unique strings`);w[M]=W}}}};t.default=s}),Ite=le((t,e)=>{e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),J2=le((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=Vee(),n=kte(),i=$te(),o=Ite(),a=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(m=>this.addVocabulary(m)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let m=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(m,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=Zv();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=et();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=tE();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=Lv();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}),Ete=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(z,M){return{validate:z,compare:M}}t.fullFormats={date:e(o,a),time:e(c(!0),u),"date-time":e(p(!0),f),"iso-time":e(c(),l),"iso-date-time":e(p(),m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"uri-reference":/^(?:[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,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:A,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:y,int32:{type:"number",validate:w},int64:{type:"number",validate:k},float:{type:"number",validate:$},double:{type:"number",validate:$},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":e(/^\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,f),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":e(/^\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,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[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},t.formatNames=Object.keys(t.fullFormats);function r(z){return z%4===0&&(z%100!==0||z%400===0)}var n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(z){let M=n.exec(z);if(!M)return!1;let W=+M[1],R=+M[2],te=+M[3];return R>=1&&R<=12&&te>=1&&te<=(R===2&&r(W)?29:i[R])}function a(z,M){if(z&&M)return z>M?1:z<M?-1:0}var s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(z){return function(M){let W=s.exec(M);if(!W)return!1;let R=+W[1],te=+W[2],G=+W[3],ye=W[4],De=W[5]==="-"?-1:1,de=+(W[6]||0),F=+(W[7]||0);if(de>23||F>59||z&&!ye)return!1;if(R<=23&&te<=59&&G<60)return!0;let I=te-F*De,V=R-de*De-(I<0?1:0);return(V===23||V===-1)&&(I===59||I===-1)&&G<61}}function u(z,M){if(!(z&&M))return;let W=new Date("2020-01-01T"+z).valueOf(),R=new Date("2020-01-01T"+M).valueOf();if(W&&R)return W-R}function l(z,M){if(!(z&&M))return;let W=s.exec(z),R=s.exec(M);if(W&&R)return z=W[1]+W[2]+W[3],M=R[1]+R[2]+R[3],z>M?1:z<M?-1:0}var d=/t|\s/i;function p(z){let M=c(z);return function(W){let R=W.split(d);return R.length===2&&o(R[0])&&M(R[1])}}function f(z,M){if(!(z&&M))return;let W=new Date(z).valueOf(),R=new Date(M).valueOf();if(W&&R)return W-R}function m(z,M){if(!(z&&M))return;let[W,R]=z.split(d),[te,G]=M.split(d),ye=a(W,te);if(ye!==void 0)return ye||u(R,G)}var v=/\/|:/,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function h(z){return v.test(z)&&g.test(z)}var _=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(z){return _.lastIndex=0,_.test(z)}var b=-2147483648,x=2147483647;function w(z){return Number.isInteger(z)&&z<=x&&z>=b}function k(z){return Number.isInteger(z)}function $(){return!0}var T=/[^\\]\\Z/;function A(z){if(T.test(z))return!1;try{return new RegExp(z),!0}catch{return!1}}}),Pte=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=J2(),r=et(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:s,schemaCode:c})=>r.str`should be ${i[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>r._`{comparison: ${i[s].okStr}, limit: ${c}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:o,code(s){let{gen:c,data:u,schemaCode:l,keyword:d,it:p}=s,{opts:f,self:m}=p;if(!f.validateFormats)return;let v=new e.KeywordCxt(p,m.RULES.all.format.definition,"format");v.$data?g():h();function g(){let y=c.scopeValue("formats",{ref:m.formats,code:f.code.formats}),b=c.const("fmt",r._`${y}[${v.schemaCode}]`);s.fail$data((0,r.or)(r._`typeof ${b} != "object"`,r._`${b} instanceof RegExp`,r._`typeof ${b}.compare != "function"`,_(b)))}function h(){let y=v.schema,b=m.formats[y];if(!b||b===!0)return;if(typeof b!="object"||b instanceof RegExp||typeof b.compare!="function")throw Error(`"${d}": format "${y}" does not define "compare" function`);let x=c.scopeValue("formats",{key:y,ref:b,code:f.code.formats?r._`${f.code.formats}${(0,r.getProperty)(y)}`:void 0});s.fail$data(_(x))}function _(y){return r._`${y}.compare(${u}, ${l}) ${i[d].fail} 0`}},dependencies:["format"]};var a=s=>(s.addKeyword(t.formatLimitDefinition),s);t.default=a}),Tte=le((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=Ete(),n=Pte(),i=et(),o=new i.Name("fullFormats"),a=new i.Name("fastFormats"),s=(u,l={keywords:!0})=>{if(Array.isArray(l))return c(u,l,r.fullFormats,o),u;let[d,p]=l.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o],f=l.formats||r.formatNames;return c(u,f,d,p),l.keywords&&(0,n.default)(u),u};s.get=(u,l="full")=>{let d=(l==="fast"?r.fastFormats:r.fullFormats)[u];if(!d)throw Error(`Unknown format "${u}"`);return d};function c(u,l,d,p){var f,m;(f=(m=u.opts.code).formats)!==null&&f!==void 0||(m.formats=i._`require("ajv-formats/dist/formats").${p}`);for(let v of l)u.addFormat(v,d[v])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s}),qte=50;ma=class extends Error{};Wte=typeof global=="object"&&global&&global.Object===Object&&global,Bte=Wte,Kte=typeof self=="object"&&self&&self.Object===Object&&self,Hte=Bte||Kte||Function("return this")(),iE=Hte,Gte=iE.Symbol,Jg=Gte,n6=Object.prototype,Qte=n6.hasOwnProperty,Yte=n6.toString,Qd=Jg?Jg.toStringTag:void 0;Xte=Jte,ere=Object.prototype,tre=ere.toString;nre=rre,ire="[object Null]",ore="[object Undefined]",DM=Jg?Jg.toStringTag:void 0;sre=are;i6=cre,ure="[object AsyncFunction]",lre="[object Function]",dre="[object GeneratorFunction]",pre="[object Proxy]";mre=fre,hre=iE["__core-js_shared__"],mI=hre,MM=(function(){var t=/[^.]+$/.exec(mI&&mI.keys&&mI.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();vre=gre,yre=Function.prototype,_re=yre.toString;xre=bre,wre=/[\\^$.*+?()[\]{}|]/g,kre=/^\[object .+?Constructor\]$/,Sre=Function.prototype,$re=Object.prototype,Ire=Sre.toString,Ere=$re.hasOwnProperty,Pre=RegExp("^"+Ire.call(Ere).replace(wre,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");zre=Tre;jre=Ore;o6=Nre,Cre=o6(Object,"create"),_p=Cre;Are=Rre;Dre=Ure,Mre="__lodash_hash_undefined__",qre=Object.prototype,Zre=qre.hasOwnProperty;Fre=Lre,Vre=Object.prototype,Wre=Vre.hasOwnProperty;Kre=Bre,Hre="__lodash_hash_undefined__";Qre=Gre;bu.prototype.clear=Are;bu.prototype.delete=Dre;bu.prototype.get=Fre;bu.prototype.has=Kre;bu.prototype.set=Qre;qM=bu;Jre=Yre;ene=Xre;Fv=tne,rne=Array.prototype,nne=rne.splice;one=ine;sne=ane;une=cne;dne=lne;xu.prototype.clear=Jre;xu.prototype.delete=one;xu.prototype.get=sne;xu.prototype.has=une;xu.prototype.set=dne;pne=xu,fne=o6(iE,"Map"),mne=fne;gne=hne;yne=vne;Vv=_ne;xne=bne;kne=wne;$ne=Sne;Ene=Ine;wu.prototype.clear=gne;wu.prototype.delete=xne;wu.prototype.get=kne;wu.prototype.has=$ne;wu.prototype.set=Ene;a6=wu,Pne="Expected a function";oE.Cache=a6;ba=oE,aE=ba(()=>(process.env.CLAUDE_CONFIG_DIR??zne(Tne(),".claude")).normalize("NFC"),()=>process.env.CLAUDE_CONFIG_DIR);s6=function(){let{crypto:t}=globalThis;if(t?.randomUUID)return s6=t.randomUUID.bind(t),t.randomUUID();let e=new Uint8Array(1),r=t?()=>t.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^r()&15>>+n/4).toString(16))};PI=t=>{if(t instanceof Error)return t;if(typeof t=="object"&&t!==null){try{if(Object.prototype.toString.call(t)==="[object Error]"){let e=Error(t.message,t.cause?{cause:t.cause}:{});return t.stack&&(e.stack=t.stack),t.cause&&!e.cause&&(e.cause=t.cause),t.name&&(e.name=t.name),e}}catch{}try{return Error(JSON.stringify(t))}catch{}}return Error(t)},Ae=class extends Error{},un=class t extends Ae{constructor(e,r,n,i,o){super(`${t.makeMessage(e,r,n)}`),this.status=e,this.headers=i,this.requestID=i?.get("request-id"),this.error=r,this.type=o??null}static makeMessage(e,r,n){let i=r?.message?typeof r.message=="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;return e&&i?`${e} ${i}`:e?`${e} status code (no body)`:i||"(no status code or body)"}static generate(e,r,n,i){if(!e||!i)return new ru({message:n,cause:PI(r)});let o=r,a=o?.error?.type;return e===400?new ev(e,o,n,i,a):e===401?new tv(e,o,n,i,a):e===403?new rv(e,o,n,i,a):e===404?new nv(e,o,n,i,a):e===409?new iv(e,o,n,i,a):e===422?new ov(e,o,n,i,a):e===429?new av(e,o,n,i,a):e>=500?new sv(e,o,n,i,a):new t(e,o,n,i,a)}},Kn=class extends un{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},ru=class extends un{constructor({message:e,cause:r}){super(void 0,void 0,e||"Connection error.",void 0),r&&(this.cause=r)}},Xg=class extends ru{constructor({message:e}={}){super({message:e??"Request timed out."})}},ev=class extends un{},tv=class extends un{},rv=class extends un{},nv=class extends un{},iv=class extends un{},ov=class extends un{},av=class extends un{},sv=class extends un{},One=/^[a-z][a-z0-9+.-]*:/i,jne=t=>One.test(t),TI=t=>(TI=Array.isArray,TI(t)),ZM=TI;Cne=(t,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new Ae(`${t} must be an integer`);if(e<0)throw new Ae(`${t} must be a positive integer`);return e},c6=t=>{try{return JSON.parse(t)}catch{return}},Rne=t=>new Promise(e=>setTimeout(e,t)),Hc="0.81.0",Ane=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";Dne=()=>{let t=Une();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Hc,"X-Stainless-OS":VM(Deno.build.os),"X-Stainless-Arch":FM(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Hc,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(t==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Hc,"X-Stainless-OS":VM(globalThis.process.platform??"unknown"),"X-Stainless-Arch":FM(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=Mne();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Hc,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Hc,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};FM=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",VM=t=>(t=t.toLowerCase(),t.includes("ios")?"iOS":t==="android"?"Android":t==="darwin"?"MacOS":t==="win32"?"Windows":t==="freebsd"?"FreeBSD":t==="openbsd"?"OpenBSD":t==="linux"?"Linux":t?`Other:${t}`:"Unknown"),qne=()=>WM??(WM=Dne());Fne=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)});ps=class{constructor(){Fn.set(this,void 0),Vn.set(this,void 0),he(this,Fn,new Uint8Array,"f"),he(this,Vn,null,"f")}decode(e){if(e==null)return[];let r=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?cE(e):e;he(this,Fn,Wne([Z(this,Fn,"f"),r]),"f");let n=[],i;for(;(i=Bne(Z(this,Fn,"f"),Z(this,Vn,"f")))!=null;){if(i.carriage&&Z(this,Vn,"f")==null){he(this,Vn,i.index,"f");continue}if(Z(this,Vn,"f")!=null&&(i.index!==Z(this,Vn,"f")+1||i.carriage)){n.push(HM(Z(this,Fn,"f").subarray(0,Z(this,Vn,"f")-1))),he(this,Fn,Z(this,Fn,"f").subarray(Z(this,Vn,"f")),"f"),he(this,Vn,null,"f");continue}let o=Z(this,Vn,"f")!==null?i.preceding-1:i.preceding,a=HM(Z(this,Fn,"f").subarray(0,o));n.push(a),he(this,Fn,Z(this,Fn,"f").subarray(i.index),"f"),he(this,Vn,null,"f")}return n}flush(){return Z(this,Fn,"f").length?this.decode(`
|
|
148
|
+
`):[]}};Fn=new WeakMap,Vn=new WeakMap;ps.NEWLINE_CHARS=new Set([`
|
|
149
|
+
`,"\r"]);ps.NEWLINE_REGEXP=/\r\n|[\n\r]/g;cv={off:0,error:200,warn:300,info:400,debug:500},GM=(t,e,r)=>{if(t){if(Nne(cv,t))return t;sn(r).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(cv))}`)}};Hne={error:fp,warn:fp,info:fp,debug:fp},QM=new WeakMap;us=t=>(t.options&&(t.options={...t.options},delete t.options.headers),t.headers&&(t.headers=Object.fromEntries((t.headers instanceof Headers?[...t.headers]:Object.entries(t.headers)).map(([e,r])=>[e,e.toLowerCase()==="x-api-key"||e.toLowerCase()==="authorization"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":r]))),"retryOfRequestLogID"in t&&(t.retryOfRequestLogID&&(t.retryOf=t.retryOfRequestLogID),delete t.retryOfRequestLogID),t),fs=class t{constructor(e,r,n){this.iterator=e,Yd.set(this,void 0),this.controller=r,he(this,Yd,n,"f")}static fromSSEResponse(e,r,n){let i=!1,o=n?sn(n):console;async function*a(){if(i)throw new Ae("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let s=!1;try{for await(let c of Gne(e,r)){if(c.event==="completion")try{yield JSON.parse(c.data)}catch(u){throw o.error("Could not parse message into JSON:",c.data),o.error("From chunk:",c.raw),u}if(c.event==="message_start"||c.event==="message_delta"||c.event==="message_stop"||c.event==="content_block_start"||c.event==="content_block_delta"||c.event==="content_block_stop")try{yield JSON.parse(c.data)}catch(u){throw o.error("Could not parse message into JSON:",c.data),o.error("From chunk:",c.raw),u}if(c.event!=="ping"&&c.event==="error"){let u=c6(c.data)??c.data,l=u?.error?.type;throw new un(void 0,u,void 0,e.headers,l)}}s=!0}catch(c){if(bp(c))return;throw c}finally{s||r.abort()}}return new t(a,r,n)}static fromReadableStream(e,r,n){let i=!1;async function*o(){let s=new ps,c=sE(e);for await(let u of c)for(let l of s.decode(u))yield l;for(let u of s.flush())yield u}async function*a(){if(i)throw new Ae("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");i=!0;let s=!1;try{for await(let c of o())s||c&&(yield JSON.parse(c));s=!0}catch(c){if(bp(c))return;throw c}finally{s||r.abort()}}return new t(a,r,n)}[(Yd=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],r=[],n=this.iterator(),i=o=>({next:()=>{if(o.length===0){let a=n.next();e.push(a),r.push(a)}return o.shift()}});return[new t(()=>i(e),this.controller,Z(this,Yd,"f")),new t(()=>i(r),this.controller,Z(this,Yd,"f"))]}toReadableStream(){let e=this,r;return u6({async start(){r=e[Symbol.asyncIterator]()},async pull(n){try{let{value:i,done:o}=await r.next();if(o)return n.close();let a=cE(JSON.stringify(i)+`
|
|
150
|
+
`);n.enqueue(a)}catch(i){n.error(i)}},async cancel(){await r.return?.()}})}};OI=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let o={event:this.event,data:this.data.join(`
|
|
151
|
+
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],o}if(this.chunks.push(e),e.startsWith(":"))return null;let[r,n,i]=Yne(e,":");return i.startsWith(" ")&&(i=i.substring(1)),r==="event"?this.event=i:r==="data"&&this.data.push(i),null}};uv=class t extends Promise{constructor(e,r,n=d6){super(i=>{i(null)}),this.responsePromise=r,this.parseResponse=n,mp.set(this,void 0),he(this,mp,e,"f")}_thenUnwrap(e){return new t(Z(this,mp,"f"),this.responsePromise,async(r,n)=>p6(e(await this.parseResponse(r,n),n),n.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,r]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:r,request_id:r.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(e=>this.parseResponse(Z(this,mp,"f"),e))),this.parsedPromise}then(e,r){return this.parse().then(e,r)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}};mp=new WeakMap;lv=class{constructor(e,r,n,i){Ig.set(this,void 0),he(this,Ig,e,"f"),this.options=i,this.response=r,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let e=this.nextPageRequestOptions();if(!e)throw new Ae("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await Z(this,Ig,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(Ig=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let r of e.getPaginatedItems())yield r}},jI=class extends uv{constructor(e,r,n){super(e,r,async(i,o)=>new n(i,o.response,await d6(i,o),o.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let r of e)yield r}},ms=class extends lv{constructor(e,r,n,i){super(e,r,n,i),this.data=n.data||[],this.has_more=n.has_more||!1,this.first_id=n.first_id||null,this.last_id=n.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){if(this.options.query?.before_id){let r=this.first_id;return r?{...this.options,query:{...zI(this.options.query),before_id:r}}:null}let e=this.last_id;return e?{...this.options,query:{...zI(this.options.query),after_id:e}}:null}},dv=class extends lv{constructor(e,r,n,i){super(e,r,n,i),this.data=n.data||[],this.has_more=n.has_more||!1,this.next_page=n.next_page||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let e=this.next_page;return e?{...this.options,query:{...zI(this.options.query),page:e}}:null}},f6=()=>{if(typeof File>"u"){let{process:t}=globalThis,e=typeof t?.versions?.node=="string"&&parseInt(t.versions.node.split("."))<20;throw Error("`File` is not defined as a global, which is required for file uploads."+(e?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};m6=t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function",uE=async(t,e,r=!0)=>({...t,body:await Xne(t.body,e,r)}),YM=new WeakMap;Xne=async(t,e,r=!0)=>{if(!await Jne(e))throw TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let n=new FormData;return await Promise.all(Object.entries(t||{}).map(([i,o])=>NI(n,i,o,r))),n},eie=t=>t instanceof Blob&&"name"in t,NI=async(t,e,r,n)=>{if(r!==void 0){if(r==null)throw TypeError(`Received null for "${e}"; to pass null in FormData, you must use the string 'null'`);if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")t.append(e,String(r));else if(r instanceof Response){let i={},o=r.headers.get("Content-Type");o&&(i={type:o}),t.append(e,Xc([await r.blob()],Bg(r,n),i))}else if(m6(r))t.append(e,Xc([await new Response(l6(r)).blob()],Bg(r,n)));else if(eie(r))t.append(e,Xc([r],Bg(r,n),{type:r.type}));else if(Array.isArray(r))await Promise.all(r.map(i=>NI(t,e+"[]",i,n)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([i,o])=>NI(t,`${e}[${i}]`,o,n)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${r} instead`)}},h6=t=>t!=null&&typeof t=="object"&&typeof t.size=="number"&&typeof t.type=="string"&&typeof t.text=="function"&&typeof t.slice=="function"&&typeof t.arrayBuffer=="function",tie=t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&h6(t),rie=t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function";Hn=class{constructor(e){this._client=e}},g6=Symbol.for("brand.privateNullableHeaders");ht=t=>{let e=new Headers,r=new Set;for(let n of t){let i=new Set;for(let[o,a]of oie(n)){let s=o.toLowerCase();i.has(s)||(e.delete(o),i.add(s)),a===null?(e.delete(o),r.add(s)):(e.append(o,a),r.delete(s))}}return{[g6]:!0,values:e,nulls:r}},vp=Symbol("anthropic.sdk.stainlessHelper");JM=Object.freeze(Object.create(null)),sie=(t=_6)=>function(e,...r){if(e.length===1)return e[0];let n=!1,i=[],o=e.reduce((u,l,d)=>{/[?#]/.test(l)&&(n=!0);let p=r[d],f=(n?encodeURIComponent:t)(""+p);return d!==r.length&&(p==null||typeof p=="object"&&p.toString===Object.getPrototypeOf(Object.getPrototypeOf(p.hasOwnProperty??JM)??JM)?.toString)&&(f=p+"",i.push({start:u.length+l.length,length:f.length,error:`Value of type ${Object.prototype.toString.call(p).slice(8,-1)} is not a valid path parameter`})),u+l+(d===r.length?"":f)},""),a=o.split(/[?#]/,1)[0],s=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=s.exec(a))!==null;)i.push({start:c.index,length:c[0].length,error:`Value "${c[0]}" can't be safely passed as a path parameter`});if(i.sort((u,l)=>u.start-l.start),i.length>0){let u=0,l=i.reduce((d,p)=>{let f=" ".repeat(p.start-u),m="^".repeat(p.length);return u=p.start+p.length,d+f+m},"");throw new Ae(`Path parameters result in path with invalid segments:
|
|
152
|
+
${i.map(d=>d.error).join(`
|
|
153
|
+
`)}
|
|
154
|
+
${o}
|
|
155
|
+
${l}`)}return o},zr=sie(_6),pv=class extends Hn{list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/files",ms,{query:i,...r,headers:ht([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete(zr`/v1/files/${e}`,{...n,headers:ht([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString()},n?.headers])})}download(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/files/${e}/content`,{...n,headers:ht([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString(),Accept:"application/binary"},n?.headers]),__binaryResponse:!0})}retrieveMetadata(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/files/${e}`,{...n,headers:ht([{"anthropic-beta":[...i??[],"files-api-2025-04-14"].toString()},n?.headers])})}upload(e,r){let{betas:n,...i}=e;return this._client.post("/v1/files",uE({body:i,...r,headers:ht([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},aie(i.file),r?.headers])},this._client))}},fv=class extends Hn{retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/models/${e}?beta=true`,{...n,headers:ht([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/models?beta=true",ms,{query:i,...r,headers:ht([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},b6={"claude-opus-4-20250514":8192,"claude-opus-4-0":8192,"claude-4-opus-20250514":8192,"anthropic.claude-opus-4-20250514-v1:0":8192,"claude-opus-4@20250514":8192,"claude-opus-4-1-20250805":8192,"anthropic.claude-opus-4-1-20250805-v1:0":8192,"claude-opus-4-1@20250805":8192};uie=t=>{let e=0,r=[];for(;e<t.length;){let n=t[e];if(n==="\\"){e++;continue}if(n==="{"){r.push({type:"brace",value:"{"}),e++;continue}if(n==="}"){r.push({type:"brace",value:"}"}),e++;continue}if(n==="["){r.push({type:"paren",value:"["}),e++;continue}if(n==="]"){r.push({type:"paren",value:"]"}),e++;continue}if(n===":"){r.push({type:"separator",value:":"}),e++;continue}if(n===","){r.push({type:"delimiter",value:","}),e++;continue}if(n==='"'){let a="",s=!1;for(n=t[++e];n!=='"';){if(e===t.length){s=!0;break}if(n==="\\"){if(e++,e===t.length){s=!0;break}a+=n+t[e],n=t[++e]}else a+=n,n=t[++e]}n=t[++e],!s&&r.push({type:"string",value:a});continue}if(n&&/\s/.test(n)){e++;continue}let i=/[0-9]/;if(n&&i.test(n)||n==="-"||n==="."){let a="";for(n==="-"&&(a+=n,n=t[++e]);n&&i.test(n)||n===".";)a+=n,n=t[++e];r.push({type:"number",value:a});continue}let o=/[a-z]/i;if(n&&o.test(n)){let a="";for(;n&&o.test(n)&&e!==t.length;)a+=n,n=t[++e];if(a=="true"||a=="false"||a==="null")r.push({type:"name",value:a});else{e++;continue}continue}e++}return r},Gc=t=>{if(t.length===0)return t;let e=t[t.length-1];switch(e.type){case"separator":return t=t.slice(0,t.length-1),Gc(t);case"number":let r=e.value[e.value.length-1];if(r==="."||r==="-")return t=t.slice(0,t.length-1),Gc(t);case"string":let n=t[t.length-2];if(n?.type==="delimiter")return t=t.slice(0,t.length-1),Gc(t);if(n?.type==="brace"&&n.value==="{")return t=t.slice(0,t.length-1),Gc(t);break;case"delimiter":return t=t.slice(0,t.length-1),Gc(t)}return t},lie=t=>{let e=[];return t.map(r=>{r.type==="brace"&&(r.value==="{"?e.push("}"):e.splice(e.lastIndexOf("}"),1)),r.type==="paren"&&(r.value==="["?e.push("]"):e.splice(e.lastIndexOf("]"),1))}),e.length>0&&e.reverse().map(r=>{r==="}"?t.push({type:"brace",value:"}"}):r==="]"&&t.push({type:"paren",value:"]"})}),t},die=t=>{let e="";return t.map(r=>{r.type==="string"?e+='"'+r.value+'"':e+=r.value}),e},k6=t=>JSON.parse(die(lie(Gc(uie(t))))),r2="__json_buf";RI=class t{constructor(e,r){oi.add(this),this.messages=[],this.receivedMessages=[],la.set(this,void 0),Vc.set(this,null),this.controller=new AbortController,Jd.set(this,void 0),Eg.set(this,()=>{}),Xd.set(this,()=>{}),ep.set(this,void 0),Pg.set(this,()=>{}),tp.set(this,()=>{}),Po.set(this,{}),rp.set(this,!1),Tg.set(this,!1),zg.set(this,!1),as.set(this,!1),Og.set(this,void 0),jg.set(this,void 0),np.set(this,void 0),Ng.set(this,n=>{if(he(this,Tg,!0,"f"),bp(n)&&(n=new Kn),n instanceof Kn)return he(this,zg,!0,"f"),this._emit("abort",n);if(n instanceof Ae)return this._emit("error",n);if(n instanceof Error){let i=new Ae(n.message);return i.cause=n,this._emit("error",i)}return this._emit("error",new Ae(String(n)))}),he(this,Jd,new Promise((n,i)=>{he(this,Eg,n,"f"),he(this,Xd,i,"f")}),"f"),he(this,ep,new Promise((n,i)=>{he(this,Pg,n,"f"),he(this,tp,i,"f")}),"f"),Z(this,Jd,"f").catch(()=>{}),Z(this,ep,"f").catch(()=>{}),he(this,Vc,e,"f"),he(this,np,r?.logger??console,"f")}get response(){return Z(this,Og,"f")}get request_id(){return Z(this,jg,"f")}async withResponse(){he(this,as,!0,"f");let e=await Z(this,Jd,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t(null);return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n,{logger:i}={}){let o=new t(r,{logger:i});for(let a of r.messages)o._addMessageParam(a);return he(o,Vc,{...r,stream:!0},"f"),o._run(()=>o._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),o}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},Z(this,Ng,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let i=n?.signal,o;i&&(i.aborted&&this.controller.abort(),o=this.controller.abort.bind(this.controller),i.addEventListener("abort",o));try{Z(this,oi,"m",gI).call(this);let{response:a,data:s}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(a);for await(let c of s)Z(this,oi,"m",vI).call(this,c);if(s.controller.signal?.aborted)throw new Kn;Z(this,oi,"m",yI).call(this)}finally{i&&o&&i.removeEventListener("abort",o)}}_connected(e){this.ended||(he(this,Og,e,"f"),he(this,jg,e?.headers.get("request-id"),"f"),Z(this,Eg,"f").call(this,e),this._emit("connect"))}get ended(){return Z(this,rp,"f")}get errored(){return Z(this,Tg,"f")}get aborted(){return Z(this,zg,"f")}abort(){this.controller.abort()}on(e,r){return(Z(this,Po,"f")[e]||(Z(this,Po,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=Z(this,Po,"f")[e];if(!n)return this;let i=n.findIndex(o=>o.listener===r);return i>=0&&n.splice(i,1),this}once(e,r){return(Z(this,Po,"f")[e]||(Z(this,Po,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{he(this,as,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){he(this,as,!0,"f"),await Z(this,ep,"f")}get currentMessage(){return Z(this,la,"f")}async finalMessage(){return await this.done(),Z(this,oi,"m",hI).call(this)}async finalText(){return await this.done(),Z(this,oi,"m",e2).call(this)}_emit(e,...r){if(Z(this,rp,"f"))return;e==="end"&&(he(this,rp,!0,"f"),Z(this,Pg,"f").call(this));let n=Z(this,Po,"f")[e];if(n&&(Z(this,Po,"f")[e]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),e==="abort"){let i=r[0];!Z(this,as,"f")&&!n?.length&&Promise.reject(i),Z(this,Xd,"f").call(this,i),Z(this,tp,"f").call(this,i),this._emit("end");return}if(e==="error"){let i=r[0];!Z(this,as,"f")&&!n?.length&&Promise.reject(i),Z(this,Xd,"f").call(this,i),Z(this,tp,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Z(this,oi,"m",hI).call(this))}async _fromReadableStream(e,r){let n=r?.signal,i;n&&(n.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),n.addEventListener("abort",i));try{Z(this,oi,"m",gI).call(this),this._connected(null);let o=fs.fromReadableStream(e,this.controller);for await(let a of o)Z(this,oi,"m",vI).call(this,a);if(o.controller.signal?.aborted)throw new Kn;Z(this,oi,"m",yI).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(la=new WeakMap,Vc=new WeakMap,Jd=new WeakMap,Eg=new WeakMap,Xd=new WeakMap,ep=new WeakMap,Pg=new WeakMap,tp=new WeakMap,Po=new WeakMap,rp=new WeakMap,Tg=new WeakMap,zg=new WeakMap,as=new WeakMap,Og=new WeakMap,jg=new WeakMap,np=new WeakMap,Ng=new WeakMap,oi=new WeakSet,hI=function(){if(this.receivedMessages.length===0)throw new Ae("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},e2=function(){if(this.receivedMessages.length===0)throw new Ae("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(e.length===0)throw new Ae("stream ended without producing a content block with type=text");return e.join(" ")},gI=function(){this.ended||he(this,la,void 0,"f")},vI=function(e){if(this.ended)return;let r=Z(this,oi,"m",t2).call(this,e);switch(this._emit("streamEvent",e,r),e.type){case"content_block_delta":{let n=r.content.at(-1);switch(e.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",e.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",e.delta.citation,n.citations??[]);break}case"input_json_delta":{n2(n)&&n.input&&this._emit("inputJson",e.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",e.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}case"compaction_delta":{n.type==="compaction"&&n.content&&this._emit("compaction",n.content);break}default:e.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(XM(r,Z(this,Vc,"f"),{logger:Z(this,np,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{he(this,la,r,"f");break}case"content_block_start":case"message_delta":break}},yI=function(){if(this.ended)throw new Ae("stream has ended, this shouldn't happen");let e=Z(this,la,"f");if(!e)throw new Ae("request ended without sending any chunks");return he(this,la,void 0,"f"),XM(e,Z(this,Vc,"f"),{logger:Z(this,np,"f")})},t2=function(e){let r=Z(this,la,"f");if(e.type==="message_start"){if(r)throw new Ae(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!r)throw new Ae(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":return r;case"message_delta":return r.container=e.delta.container,r.stop_reason=e.delta.stop_reason,r.stop_sequence=e.delta.stop_sequence,r.usage.output_tokens=e.usage.output_tokens,r.context_management=e.context_management,e.usage.input_tokens!=null&&(r.usage.input_tokens=e.usage.input_tokens),e.usage.cache_creation_input_tokens!=null&&(r.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),e.usage.cache_read_input_tokens!=null&&(r.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),e.usage.server_tool_use!=null&&(r.usage.server_tool_use=e.usage.server_tool_use),e.usage.iterations!=null&&(r.usage.iterations=e.usage.iterations),r;case"content_block_start":return r.content.push(e.content_block),r;case"content_block_delta":{let n=r.content.at(e.index);switch(e.delta.type){case"text_delta":{n?.type==="text"&&(r.content[e.index]={...n,text:(n.text||"")+e.delta.text});break}case"citations_delta":{n?.type==="text"&&(r.content[e.index]={...n,citations:[...n.citations??[],e.delta.citation]});break}case"input_json_delta":{if(n&&n2(n)){let i=n[r2]||"";i+=e.delta.partial_json;let o={...n};if(Object.defineProperty(o,r2,{value:i,enumerable:!1,writable:!0}),i)try{o.input=k6(i)}catch(a){let s=new Ae(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${a}. JSON: ${i}`);Z(this,Ng,"f").call(this,s)}r.content[e.index]=o}break}case"thinking_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,thinking:n.thinking+e.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,signature:e.delta.signature});break}case"compaction_delta":{n?.type==="compaction"&&(r.content[e.index]={...n,content:(n.content||"")+e.delta.content});break}default:e.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",i=>{let o=r.shift();o?o.resolve(i):e.push(i)}),this.on("end",()=>{n=!0;for(let i of r)i.resolve(void 0);r.length=0}),this.on("abort",i=>{n=!0;for(let o of r)o.reject(i);r.length=0}),this.on("error",i=>{n=!0;for(let o of r)o.reject(i);r.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,o)=>r.push({resolve:i,reject:o})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new fs(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}},mv=class extends Error{constructor(e){let r=typeof e=="string"?e:e.map(n=>n.type==="text"?n.text:`[${n.type}]`).join(" ");super(r),this.name="ToolError",this.content=e}},pie=1e5,fie=`You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
|
|
156
|
+
1. Task Overview
|
|
157
|
+
The user's core request and success criteria
|
|
158
|
+
Any clarifications or constraints they specified
|
|
159
|
+
2. Current State
|
|
160
|
+
What has been completed so far
|
|
161
|
+
Files created, modified, or analyzed (with paths if relevant)
|
|
162
|
+
Key outputs or artifacts produced
|
|
163
|
+
3. Important Discoveries
|
|
164
|
+
Technical constraints or requirements uncovered
|
|
165
|
+
Decisions made and their rationale
|
|
166
|
+
Errors encountered and how they were resolved
|
|
167
|
+
What approaches were tried that didn't work (and why)
|
|
168
|
+
4. Next Steps
|
|
169
|
+
Specific actions needed to complete the task
|
|
170
|
+
Any blockers or open questions to resolve
|
|
171
|
+
Priority order if multiple steps remain
|
|
172
|
+
5. Context to Preserve
|
|
173
|
+
User preferences or style requirements
|
|
174
|
+
Domain-specific details that aren't obvious
|
|
175
|
+
Any promises made to the user
|
|
176
|
+
Be concise but complete\u2014err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
|
|
177
|
+
Wrap your summary in <summary></summary> tags.`;hv=class{constructor(e,r,n){ip.add(this),this.client=e,Wc.set(this,!1),ss.set(this,!1),br.set(this,void 0),op.set(this,void 0),Ln.set(this,void 0),Oo.set(this,void 0),da.set(this,void 0),ap.set(this,0),he(this,br,{params:{...r,messages:structuredClone(r.messages)}},"f");let i=["BetaToolRunner",...v6(r.tools,r.messages)].join(", ");he(this,op,{...n,headers:ht([{"x-stainless-helper":i},n?.headers])},"f"),he(this,da,o2(),"f")}async*[(Wc=new WeakMap,ss=new WeakMap,br=new WeakMap,op=new WeakMap,Ln=new WeakMap,Oo=new WeakMap,da=new WeakMap,ap=new WeakMap,ip=new WeakSet,i2=async function(){let e=Z(this,br,"f").params.compactionControl;if(!e||!e.enabled)return!1;let r=0;if(Z(this,Ln,"f")!==void 0)try{let c=await Z(this,Ln,"f");r=c.usage.input_tokens+(c.usage.cache_creation_input_tokens??0)+(c.usage.cache_read_input_tokens??0)+c.usage.output_tokens}catch{return!1}let n=e.contextTokenThreshold??pie;if(r<n)return!1;let i=e.model??Z(this,br,"f").params.model,o=e.summaryPrompt??fie,a=Z(this,br,"f").params.messages;if(a[a.length-1].role==="assistant"){let c=a[a.length-1];if(Array.isArray(c.content)){let u=c.content.filter(l=>l.type!=="tool_use");u.length===0?a.pop():c.content=u}}let s=await this.client.beta.messages.create({model:i,messages:[...a,{role:"user",content:[{type:"text",text:o}]}],max_tokens:Z(this,br,"f").params.max_tokens},{headers:{"x-stainless-helper":"compaction"}});if(s.content[0]?.type!=="text")throw new Ae("Expected text response for compaction");return Z(this,br,"f").params.messages=[{role:"user",content:s.content}],!0},Symbol.asyncIterator)](){var e;if(Z(this,Wc,"f"))throw new Ae("Cannot iterate over a consumed stream");he(this,Wc,!0,"f"),he(this,ss,!0,"f"),he(this,Oo,void 0,"f");try{for(;;){let r;try{if(Z(this,br,"f").params.max_iterations&&Z(this,ap,"f")>=Z(this,br,"f").params.max_iterations)break;he(this,ss,!1,"f"),he(this,Oo,void 0,"f"),he(this,ap,(e=Z(this,ap,"f"),e++,e),"f"),he(this,Ln,void 0,"f");let{max_iterations:n,compactionControl:i,...o}=Z(this,br,"f").params;if(o.stream?(r=this.client.beta.messages.stream({...o},Z(this,op,"f")),he(this,Ln,r.finalMessage(),"f"),Z(this,Ln,"f").catch(()=>{}),yield r):(he(this,Ln,this.client.beta.messages.create({...o,stream:!1},Z(this,op,"f")),"f"),yield Z(this,Ln,"f")),!await Z(this,ip,"m",i2).call(this)){if(!Z(this,ss,"f")){let{role:s,content:c}=await Z(this,Ln,"f");Z(this,br,"f").params.messages.push({role:s,content:c})}let a=await Z(this,ip,"m",AI).call(this,Z(this,br,"f").params.messages.at(-1));if(a)Z(this,br,"f").params.messages.push(a);else if(!Z(this,ss,"f"))break}}finally{r&&r.abort()}}if(!Z(this,Ln,"f"))throw new Ae("ToolRunner concluded without a message from the server");Z(this,da,"f").resolve(await Z(this,Ln,"f"))}catch(r){throw he(this,Wc,!1,"f"),Z(this,da,"f").promise.catch(()=>{}),Z(this,da,"f").reject(r),he(this,da,o2(),"f"),r}}setMessagesParams(e){typeof e=="function"?Z(this,br,"f").params=e(Z(this,br,"f").params):Z(this,br,"f").params=e,he(this,ss,!0,"f"),he(this,Oo,void 0,"f")}async generateToolResponse(){let e=await Z(this,Ln,"f")??this.params.messages.at(-1);return e?Z(this,ip,"m",AI).call(this,e):null}done(){return Z(this,da,"f").promise}async runUntilDone(){if(!Z(this,Wc,"f"))for await(let e of this);return this.done()}get params(){return Z(this,br,"f").params}pushMessages(...e){this.setMessagesParams(r=>({...r,messages:[...r.messages,...e]}))}then(e,r){return this.runUntilDone().then(e,r)}};AI=async function(t){return Z(this,Oo,"f")!==void 0?Z(this,Oo,"f"):(he(this,Oo,mie(Z(this,br,"f").params,t),"f"),Z(this,Oo,"f"))};gv=class t{constructor(e,r){this.iterator=e,this.controller=r}async*decoder(){let e=new ps;for await(let r of this.iterator)for(let n of e.decode(r))yield JSON.parse(n);for(let r of e.flush())yield JSON.parse(r)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,r){if(!e.body)throw r.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new Ae("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new Ae("Attempted to iterate over a response with no body");return new t(sE(e.body),r)}},vv=class extends Hn{create(e,r){let{betas:n,...i}=e;return this._client.post("/v1/messages/batches?beta=true",{body:i,...r,headers:ht([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/messages/batches/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/messages/batches?beta=true",ms,{query:i,...r,headers:ht([{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete(zr`/v1/messages/batches/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}cancel(e,r={},n){let{betas:i}=r??{};return this._client.post(zr`/v1/messages/batches/${e}/cancel?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString()},n?.headers])})}async results(e,r={},n){let i=await this.retrieve(e);if(!i.results_url)throw new Ae(`No batch \`results_url\`; Has it finished processing? ${i.processing_status} - ${i.id}`);let{betas:o}=r??{};return this._client.get(i.results_url,{...n,headers:ht([{"anthropic-beta":[...o??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},n?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((a,s)=>gv.fromResponse(s.response,s.controller))}},a2={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026"},hie=["claude-opus-4-6"],hs=class extends Hn{constructor(){super(...arguments),this.batches=new vv(this._client)}create(e,r){let n=s2(e),{betas:i,...o}=n;o.model in a2&&console.warn(`The model '${o.model}' is deprecated and will reach end-of-life on ${a2[o.model]}
|
|
178
|
+
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),o.model in hie&&o.thinking&&o.thinking.type==="enabled"&&console.warn(`Using Claude with ${o.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let a=this._client._options.timeout;if(!o.stream&&a==null){let c=b6[o.model]??void 0;a=this._client.calculateNonstreamingTimeout(o.max_tokens,c)}let s=y6(o.tools,o.messages);return this._client.post("/v1/messages?beta=true",{body:o,timeout:a??6e5,...r,headers:ht([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},s,r?.headers]),stream:n.stream??!1})}parse(e,r){return r={...r,headers:ht([{"anthropic-beta":[...e.betas??[],"structured-outputs-2025-12-15"].toString()},r?.headers])},this.create(e,r).then(n=>w6(n,e,{logger:this._client.logger??console}))}stream(e,r){return RI.createMessage(this,e,r)}countTokens(e,r){let n=s2(e),{betas:i,...o}=n;return this._client.post("/v1/messages/count_tokens?beta=true",{body:o,...r,headers:ht([{"anthropic-beta":[...i??[],"token-counting-2024-11-01"].toString()},r?.headers])})}toolRunner(e,r){return new hv(this._client,e,r)}};hs.Batches=vv;hs.BetaToolRunner=hv;hs.ToolError=mv;yv=class extends Hn{create(e,r={},n){let{betas:i,...o}=r??{};return this._client.post(zr`/v1/skills/${e}/versions?beta=true`,uE({body:o,...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])},this._client))}retrieve(e,r,n){let{skill_id:i,betas:o}=r;return this._client.get(zr`/v1/skills/${i}/versions/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...o??[],"skills-2025-10-02"].toString()},n?.headers])})}list(e,r={},n){let{betas:i,...o}=r??{};return this._client.getAPIList(zr`/v1/skills/${e}/versions?beta=true`,dv,{query:o,...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}delete(e,r,n){let{skill_id:i,betas:o}=r;return this._client.delete(zr`/v1/skills/${i}/versions/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...o??[],"skills-2025-10-02"].toString()},n?.headers])})}},xp=class extends Hn{constructor(){super(...arguments),this.versions=new yv(this._client)}create(e={},r){let{betas:n,...i}=e??{};return this._client.post("/v1/skills?beta=true",uE({body:i,...r,headers:ht([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},r?.headers])},this._client,!1))}retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/skills/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/skills?beta=true",dv,{query:i,...r,headers:ht([{"anthropic-beta":[...n??[],"skills-2025-10-02"].toString()},r?.headers])})}delete(e,r={},n){let{betas:i}=r??{};return this._client.delete(zr`/v1/skills/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}};xp.Versions=yv;ga=class extends Hn{constructor(){super(...arguments),this.models=new fv(this._client),this.messages=new hs(this._client),this.files=new pv(this._client),this.skills=new xp(this._client)}};ga.Models=fv;ga.Messages=hs;ga.Files=pv;ga.Skills=xp;_v=class extends Hn{create(e,r){let{betas:n,...i}=e;return this._client.post("/v1/complete",{body:i,timeout:this._client._options.timeout??6e5,...r,headers:ht([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers]),stream:e.stream??!1})}};d2="__json_buf";UI=class t{constructor(e,r){ai.add(this),this.messages=[],this.receivedMessages=[],pa.set(this,void 0),Bc.set(this,null),this.controller=new AbortController,sp.set(this,void 0),Cg.set(this,()=>{}),cp.set(this,()=>{}),up.set(this,void 0),Rg.set(this,()=>{}),lp.set(this,()=>{}),To.set(this,{}),dp.set(this,!1),Ag.set(this,!1),Ug.set(this,!1),cs.set(this,!1),Dg.set(this,void 0),Mg.set(this,void 0),pp.set(this,void 0),bI.set(this,n=>{if(he(this,Ag,!0,"f"),bp(n)&&(n=new Kn),n instanceof Kn)return he(this,Ug,!0,"f"),this._emit("abort",n);if(n instanceof Ae)return this._emit("error",n);if(n instanceof Error){let i=new Ae(n.message);return i.cause=n,this._emit("error",i)}return this._emit("error",new Ae(String(n)))}),he(this,sp,new Promise((n,i)=>{he(this,Cg,n,"f"),he(this,cp,i,"f")}),"f"),he(this,up,new Promise((n,i)=>{he(this,Rg,n,"f"),he(this,lp,i,"f")}),"f"),Z(this,sp,"f").catch(()=>{}),Z(this,up,"f").catch(()=>{}),he(this,Bc,e,"f"),he(this,pp,r?.logger??console,"f")}get response(){return Z(this,Dg,"f")}get request_id(){return Z(this,Mg,"f")}async withResponse(){he(this,cs,!0,"f");let e=await Z(this,sp,"f");if(!e)throw Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let r=new t(null);return r._run(()=>r._fromReadableStream(e)),r}static createMessage(e,r,n,{logger:i}={}){let o=new t(r,{logger:i});for(let a of r.messages)o._addMessageParam(a);return he(o,Bc,{...r,stream:!0},"f"),o._run(()=>o._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),o}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},Z(this,bI,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,r=!0){this.receivedMessages.push(e),r&&this._emit("message",e)}async _createMessage(e,r,n){let i=n?.signal,o;i&&(i.aborted&&this.controller.abort(),o=this.controller.abort.bind(this.controller),i.addEventListener("abort",o));try{Z(this,ai,"m",xI).call(this);let{response:a,data:s}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(a);for await(let c of s)Z(this,ai,"m",wI).call(this,c);if(s.controller.signal?.aborted)throw new Kn;Z(this,ai,"m",kI).call(this)}finally{i&&o&&i.removeEventListener("abort",o)}}_connected(e){this.ended||(he(this,Dg,e,"f"),he(this,Mg,e?.headers.get("request-id"),"f"),Z(this,Cg,"f").call(this,e),this._emit("connect"))}get ended(){return Z(this,dp,"f")}get errored(){return Z(this,Ag,"f")}get aborted(){return Z(this,Ug,"f")}abort(){this.controller.abort()}on(e,r){return(Z(this,To,"f")[e]||(Z(this,To,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=Z(this,To,"f")[e];if(!n)return this;let i=n.findIndex(o=>o.listener===r);return i>=0&&n.splice(i,1),this}once(e,r){return(Z(this,To,"f")[e]||(Z(this,To,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{he(this,cs,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){he(this,cs,!0,"f"),await Z(this,up,"f")}get currentMessage(){return Z(this,pa,"f")}async finalMessage(){return await this.done(),Z(this,ai,"m",_I).call(this)}async finalText(){return await this.done(),Z(this,ai,"m",u2).call(this)}_emit(e,...r){if(Z(this,dp,"f"))return;e==="end"&&(he(this,dp,!0,"f"),Z(this,Rg,"f").call(this));let n=Z(this,To,"f")[e];if(n&&(Z(this,To,"f")[e]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),e==="abort"){let i=r[0];!Z(this,cs,"f")&&!n?.length&&Promise.reject(i),Z(this,cp,"f").call(this,i),Z(this,lp,"f").call(this,i),this._emit("end");return}if(e==="error"){let i=r[0];!Z(this,cs,"f")&&!n?.length&&Promise.reject(i),Z(this,cp,"f").call(this,i),Z(this,lp,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",Z(this,ai,"m",_I).call(this))}async _fromReadableStream(e,r){let n=r?.signal,i;n&&(n.aborted&&this.controller.abort(),i=this.controller.abort.bind(this.controller),n.addEventListener("abort",i));try{Z(this,ai,"m",xI).call(this),this._connected(null);let o=fs.fromReadableStream(e,this.controller);for await(let a of o)Z(this,ai,"m",wI).call(this,a);if(o.controller.signal?.aborted)throw new Kn;Z(this,ai,"m",kI).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(pa=new WeakMap,Bc=new WeakMap,sp=new WeakMap,Cg=new WeakMap,cp=new WeakMap,up=new WeakMap,Rg=new WeakMap,lp=new WeakMap,To=new WeakMap,dp=new WeakMap,Ag=new WeakMap,Ug=new WeakMap,cs=new WeakMap,Dg=new WeakMap,Mg=new WeakMap,pp=new WeakMap,bI=new WeakMap,ai=new WeakSet,_I=function(){if(this.receivedMessages.length===0)throw new Ae("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},u2=function(){if(this.receivedMessages.length===0)throw new Ae("stream ended without producing a Message with role=assistant");let e=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(e.length===0)throw new Ae("stream ended without producing a content block with type=text");return e.join(" ")},xI=function(){this.ended||he(this,pa,void 0,"f")},wI=function(e){if(this.ended)return;let r=Z(this,ai,"m",l2).call(this,e);switch(this._emit("streamEvent",e,r),e.type){case"content_block_delta":{let n=r.content.at(-1);switch(e.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",e.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",e.delta.citation,n.citations??[]);break}case"input_json_delta":{p2(n)&&n.input&&this._emit("inputJson",e.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",e.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}default:e.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(c2(r,Z(this,Bc,"f"),{logger:Z(this,pp,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{he(this,pa,r,"f");break}case"content_block_start":case"message_delta":break}},kI=function(){if(this.ended)throw new Ae("stream has ended, this shouldn't happen");let e=Z(this,pa,"f");if(!e)throw new Ae("request ended without sending any chunks");return he(this,pa,void 0,"f"),c2(e,Z(this,Bc,"f"),{logger:Z(this,pp,"f")})},l2=function(e){let r=Z(this,pa,"f");if(e.type==="message_start"){if(r)throw new Ae(`Unexpected event order, got ${e.type} before receiving "message_stop"`);return e.message}if(!r)throw new Ae(`Unexpected event order, got ${e.type} before "message_start"`);switch(e.type){case"message_stop":return r;case"message_delta":return r.stop_reason=e.delta.stop_reason,r.stop_sequence=e.delta.stop_sequence,r.usage.output_tokens=e.usage.output_tokens,e.usage.input_tokens!=null&&(r.usage.input_tokens=e.usage.input_tokens),e.usage.cache_creation_input_tokens!=null&&(r.usage.cache_creation_input_tokens=e.usage.cache_creation_input_tokens),e.usage.cache_read_input_tokens!=null&&(r.usage.cache_read_input_tokens=e.usage.cache_read_input_tokens),e.usage.server_tool_use!=null&&(r.usage.server_tool_use=e.usage.server_tool_use),r;case"content_block_start":return r.content.push({...e.content_block}),r;case"content_block_delta":{let n=r.content.at(e.index);switch(e.delta.type){case"text_delta":{n?.type==="text"&&(r.content[e.index]={...n,text:(n.text||"")+e.delta.text});break}case"citations_delta":{n?.type==="text"&&(r.content[e.index]={...n,citations:[...n.citations??[],e.delta.citation]});break}case"input_json_delta":{if(n&&p2(n)){let i=n[d2]||"";i+=e.delta.partial_json;let o={...n};Object.defineProperty(o,d2,{value:i,enumerable:!1,writable:!0}),i&&(o.input=k6(i)),r.content[e.index]=o}break}case"thinking_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,thinking:n.thinking+e.delta.thinking});break}case"signature_delta":{n?.type==="thinking"&&(r.content[e.index]={...n,signature:e.delta.signature});break}default:e.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let e=[],r=[],n=!1;return this.on("streamEvent",i=>{let o=r.shift();o?o.resolve(i):e.push(i)}),this.on("end",()=>{n=!0;for(let i of r)i.resolve(void 0);r.length=0}),this.on("abort",i=>{n=!0;for(let o of r)o.reject(i);r.length=0}),this.on("error",i=>{n=!0;for(let o of r)o.reject(i);r.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,o)=>r.push({resolve:i,reject:o})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new fs(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}},bv=class extends Hn{create(e,r){return this._client.post("/v1/messages/batches",{body:e,...r})}retrieve(e,r){return this._client.get(zr`/v1/messages/batches/${e}`,r)}list(e={},r){return this._client.getAPIList("/v1/messages/batches",ms,{query:e,...r})}delete(e,r){return this._client.delete(zr`/v1/messages/batches/${e}`,r)}cancel(e,r){return this._client.post(zr`/v1/messages/batches/${e}/cancel`,r)}async results(e,r){let n=await this.retrieve(e);if(!n.results_url)throw new Ae(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);return this._client.get(n.results_url,{...r,headers:ht([{Accept:"application/binary"},r?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((i,o)=>gv.fromResponse(o.response,o.controller))}},wp=class extends Hn{constructor(){super(...arguments),this.batches=new bv(this._client)}create(e,r){e.model in f2&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${f2[e.model]}
|
|
179
|
+
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),e.model in vie&&e.thinking&&e.thinking.type==="enabled"&&console.warn(`Using Claude with ${e.model} and 'thinking.type=enabled' is deprecated. Use 'thinking.type=adaptive' instead which results in better model performance in our testing: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking`);let n=this._client._options.timeout;if(!e.stream&&n==null){let o=b6[e.model]??void 0;n=this._client.calculateNonstreamingTimeout(e.max_tokens,o)}let i=y6(e.tools,e.messages);return this._client.post("/v1/messages",{body:e,timeout:n??6e5,...r,headers:ht([i,r?.headers]),stream:e.stream??!1})}parse(e,r){return this.create(e,r).then(n=>$6(n,e,{logger:this._client.logger??console}))}stream(e,r){return UI.createMessage(this,e,r,{logger:this._client.logger??console})}countTokens(e,r){return this._client.post("/v1/messages/count_tokens",{body:e,...r})}},f2={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-3-opus-20240229":"January 5th, 2026","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025","claude-3-7-sonnet-latest":"February 19th, 2026","claude-3-7-sonnet-20250219":"February 19th, 2026","claude-3-5-haiku-latest":"February 19th, 2026","claude-3-5-haiku-20241022":"February 19th, 2026"},vie=["claude-opus-4-6"];wp.Batches=bv;xv=class extends Hn{retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(zr`/v1/models/${e}`,{...n,headers:ht([{...i?.toString()!=null?{"anthropic-beta":i?.toString()}:void 0},n?.headers])})}list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/models",ms,{query:i,...r,headers:ht([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},qg=t=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[t]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(t)?.trim()},yie="\\n\\nHuman:",_ie="\\n\\nAssistant:",ur=class{constructor({baseURL:e=qg("ANTHROPIC_BASE_URL"),apiKey:r=qg("ANTHROPIC_API_KEY")??null,authToken:n=qg("ANTHROPIC_AUTH_TOKEN")??null,...i}={}){DI.add(this),Hg.set(this,void 0);let o={apiKey:r,authToken:n,...i,baseURL:e||"https://api.anthropic.com"};if(!o.dangerouslyAllowBrowser&&Ane())throw new Ae(`It looks like you're running in a browser-like environment.
|
|
180
|
+
|
|
181
|
+
This is disabled by default, as it risks exposing your secret API credentials to attackers.
|
|
182
|
+
If you understand the risks and have appropriate mitigations in place,
|
|
183
|
+
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
|
|
184
|
+
|
|
185
|
+
new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
186
|
+
`);this.baseURL=o.baseURL,this.timeout=o.timeout??lE.DEFAULT_TIMEOUT,this.logger=o.logger??console;let a="warn";this.logLevel=a,this.logLevel=GM(o.logLevel,"ClientOptions.logLevel",this)??GM(qg("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??a,this.fetchOptions=o.fetchOptions,this.maxRetries=o.maxRetries??2,this.fetch=o.fetch??Zne(),he(this,Hg,Fne,"f"),this._options=o,this.apiKey=typeof r=="string"?r:null,this.authToken=n}withOptions(e){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,authToken:this.authToken,...e})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:e,nulls:r}){if(!(e.get("x-api-key")||e.get("authorization"))&&!(this.apiKey&&e.get("x-api-key"))&&!r.has("x-api-key")&&!(this.authToken&&e.get("authorization"))&&!r.has("authorization"))throw Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}async authHeaders(e){return ht([await this.apiKeyAuth(e),await this.bearerAuth(e)])}async apiKeyAuth(e){if(this.apiKey!=null)return ht([{"X-Api-Key":this.apiKey}])}async bearerAuth(e){if(this.authToken!=null)return ht([{Authorization:`Bearer ${this.authToken}`}])}stringifyQuery(e){return Vne(e)}getUserAgent(){return`${this.constructor.name}/JS ${Hc}`}defaultIdempotencyKey(){return`stainless-node-retry-${s6()}`}makeStatusError(e,r,n,i){return un.generate(e,r,n,i)}buildURL(e,r,n){let i=!Z(this,DI,"m",I6).call(this)&&n||this.baseURL,o=jne(e)?new URL(e):new URL(i+(i.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),a=this.defaultQuery(),s=Object.fromEntries(o.searchParams);return(!LM(a)||!LM(s))&&(r={...s,...a,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(o.search=this.stringifyQuery(r)),o.toString()}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new Ae("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#streaming-responses for more details");return 6e5}async prepareOptions(e){}async prepareRequest(e,{url:r,options:n}){}get(e,r){return this.methodRequest("get",e,r)}post(e,r){return this.methodRequest("post",e,r)}patch(e,r){return this.methodRequest("patch",e,r)}put(e,r){return this.methodRequest("put",e,r)}delete(e,r){return this.methodRequest("delete",e,r)}methodRequest(e,r,n){return this.request(Promise.resolve(n).then(i=>({method:e,path:r,...i})))}request(e,r=null){return new uv(this,this.makeRequest(e,r,void 0))}async makeRequest(e,r,n){let i=await e,o=i.maxRetries??this.maxRetries;r==null&&(r=o),await this.prepareOptions(i);let{req:a,url:s,timeout:c}=await this.buildRequest(i,{retryCount:o-r});await this.prepareRequest(a,{url:s,options:i});let u="log_"+(Math.random()*16777216|0).toString(16).padStart(6,"0"),l=n===void 0?"":`, retryOf: ${n}`,d=Date.now();if(sn(this).debug(`[${u}] sending request`,us({retryOfRequestLogID:n,method:i.method,url:s,options:i,headers:a.headers})),i.signal?.aborted)throw new Kn;let p=new AbortController,f=await this.fetchWithTimeout(s,a,c,p).catch(PI),m=Date.now();if(f instanceof globalThis.Error){let h=`retrying, ${r} attempts remaining`;if(i.signal?.aborted)throw new Kn;let _=bp(f)||/timed? ?out/i.test(String(f)+("cause"in f?String(f.cause):""));if(r)return sn(this).info(`[${u}] connection ${_?"timed out":"failed"} - ${h}`),sn(this).debug(`[${u}] connection ${_?"timed out":"failed"} (${h})`,us({retryOfRequestLogID:n,url:s,durationMs:m-d,message:f.message})),this.retryRequest(i,r,n??u);throw sn(this).info(`[${u}] connection ${_?"timed out":"failed"} - error; no more retries left`),sn(this).debug(`[${u}] connection ${_?"timed out":"failed"} (error; no more retries left)`,us({retryOfRequestLogID:n,url:s,durationMs:m-d,message:f.message})),_?new Xg:new ru({cause:f})}let v=[...f.headers.entries()].filter(([h])=>h==="request-id").map(([h,_])=>", "+h+": "+JSON.stringify(_)).join(""),g=`[${u}${l}${v}] ${a.method} ${s} ${f.ok?"succeeded":"failed"} with status ${f.status} in ${m-d}ms`;if(!f.ok){let h=await this.shouldRetry(f);if(r&&h){let w=`retrying, ${r} attempts remaining`;return await Lne(f.body),sn(this).info(`${g} - ${w}`),sn(this).debug(`[${u}] response error (${w})`,us({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,durationMs:m-d})),this.retryRequest(i,r,n??u,f.headers)}let _=h?"error; no more retries left":"error; not retryable";sn(this).info(`${g} - ${_}`);let y=await f.text().catch(w=>PI(w).message),b=c6(y),x=b?void 0:y;throw sn(this).debug(`[${u}] response error (${_})`,us({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,message:x,durationMs:Date.now()-d})),this.makeStatusError(f.status,b,x,f.headers)}return sn(this).info(g),sn(this).debug(`[${u}] response start`,us({retryOfRequestLogID:n,url:f.url,status:f.status,headers:f.headers,durationMs:m-d})),{response:f,options:i,controller:p,requestLogID:u,retryOfRequestLogID:n,startTime:d}}getAPIList(e,r,n){return this.requestAPIList(r,n&&"then"in n?n.then(i=>({method:"get",path:e,...i})):{method:"get",path:e,...n})}requestAPIList(e,r){let n=this.makeRequest(r,null,void 0);return new jI(this,n,e)}async fetchWithTimeout(e,r,n,i){let{signal:o,method:a,...s}=r||{},c=this._makeAbort(i);o&&o.addEventListener("abort",c,{once:!0});let u=setTimeout(c,n),l=globalThis.ReadableStream&&s.body instanceof globalThis.ReadableStream||typeof s.body=="object"&&s.body!==null&&Symbol.asyncIterator in s.body,d={signal:i.signal,...l?{duplex:"half"}:{},method:"GET",...s};a&&(d.method=a.toUpperCase());try{return await this.fetch.call(void 0,e,d)}finally{clearTimeout(u)}}async shouldRetry(e){let r=e.headers.get("x-should-retry");return r==="true"?!0:r==="false"?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,r,n,i){let o,a=i?.get("retry-after-ms");if(a){let c=parseFloat(a);Number.isNaN(c)||(o=c)}let s=i?.get("retry-after");if(s&&!o){let c=parseFloat(s);Number.isNaN(c)?o=Date.parse(s)-Date.now():o=c*1e3}if(o===void 0){let c=e.maxRetries??this.maxRetries;o=this.calculateDefaultRetryTimeoutMillis(r,c)}return await Rne(o),this.makeRequest(e,r-1,n)}calculateDefaultRetryTimeoutMillis(e,r){let n=r-e,i=Math.min(.5*Math.pow(2,n),8),o=1-Math.random()*.25;return i*o*1e3}calculateNonstreamingTimeout(e,r){if(36e5*e/128e3>6e5||r!=null&&e>r)throw new Ae("Streaming is required for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-typescript#long-requests for more details");return 6e5}async buildRequest(e,{retryCount:r=0}={}){let n={...e},{method:i,path:o,query:a,defaultBaseURL:s}=n,c=this.buildURL(o,a,s);"timeout"in n&&Cne("timeout",n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:u,body:l}=this.buildBody({options:n}),d=await this.buildHeaders({options:e,method:i,bodyHeaders:u,retryCount:r});return{req:{method:i,headers:d,...n.signal&&{signal:n.signal},...globalThis.ReadableStream&&l instanceof globalThis.ReadableStream&&{duplex:"half"},...l&&{body:l},...this.fetchOptions??{},...n.fetchOptions??{}},url:c,timeout:n.timeout}}async buildHeaders({options:e,method:r,bodyHeaders:n,retryCount:i}){let o={};this.idempotencyHeader&&r!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),o[this.idempotencyHeader]=e.idempotencyKey);let a=ht([o,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(i),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...qne(),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01"},await this.authHeaders(e),this._options.defaultHeaders,n,e.headers]);return this.validateHeaders(a),a.values}_makeAbort(e){return()=>e.abort()}buildBody({options:{body:e,headers:r}}){if(!e)return{bodyHeaders:void 0,body:void 0};let n=ht([r]);return ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof DataView||typeof e=="string"&&n.values.has("content-type")||globalThis.Blob&&e instanceof globalThis.Blob||e instanceof FormData||e instanceof URLSearchParams||globalThis.ReadableStream&&e instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:e}:typeof e=="object"&&(Symbol.asyncIterator in e||Symbol.iterator in e&&"next"in e&&typeof e.next=="function")?{bodyHeaders:void 0,body:l6(e)}:typeof e=="object"&&n.values.get("content-type")==="application/x-www-form-urlencoded"?{bodyHeaders:{"content-type":"application/x-www-form-urlencoded"},body:this.stringifyQuery(e)}:Z(this,Hg,"f").call(this,{body:e,headers:n})}};lE=ur,Hg=new WeakMap,DI=new WeakSet,I6=function(){return this.baseURL!=="https://api.anthropic.com"};ur.Anthropic=lE;ur.HUMAN_PROMPT=yie;ur.AI_PROMPT=_ie;ur.DEFAULT_TIMEOUT=6e5;ur.AnthropicError=Ae;ur.APIError=un;ur.APIConnectionError=ru;ur.APIConnectionTimeoutError=Xg;ur.APIUserAbortError=Kn;ur.NotFoundError=nv;ur.ConflictError=iv;ur.RateLimitError=av;ur.BadRequestError=ev;ur.AuthenticationError=tv;ur.InternalServerError=sv;ur.PermissionDeniedError=rv;ur.UnprocessableEntityError=ov;ur.toFile=nie;nu=class extends ur{constructor(){super(...arguments),this.completions=new _v(this),this.messages=new wp(this),this.models=new xv(this),this.beta=new ga(this)}};nu.Completions=_v;nu.Messages=wp;nu.Models=xv;nu.Beta=ga;Kc=null;Iie=$ie();Pie=pE(),AUe=Pie.subscribe,Tie=pE(),UUe=Tie.subscribe,zie=pE(),DUe=zie.subscribe;g2=new Set;Uie=ba(t=>{if(!t||t.trim()==="")return null;let e=t.split(",").map(o=>o.trim()).filter(Boolean);if(e.length===0)return null;let r=e.some(o=>o.startsWith("!")),n=e.some(o=>!o.startsWith("!"));if(r&&n)return null;let i=e.map(o=>o.replace(/^!/,"").toLowerCase());return{include:r?[]:i,exclude:r?i:[],isExclusive:r}});Gie={cwd(){return process.cwd()},existsSync(t){let e=[];try{let i=ar(e,cr`fs.existsSync(${t})`,0);return Le.existsSync(t)}catch(i){var r=i,n=1}finally{sr(e,r,n)}},async stat(t){return Kie(t)},async readdir(t){return Fie(t,{withFileTypes:!0})},async unlink(t){return Hie(t)},async rmdir(t){return Wie(t)},async rm(t,e){return Bie(t,e)},async mkdir(t,e){try{await Zie(t,{recursive:!0,...e})}catch(r){if(yp(r)!=="EEXIST")throw r}},async readFile(t,e){return v2(t,{encoding:e.encoding})},async rename(t,e){return Vie(t,e)},statSync(t){let e=[];try{let i=ar(e,cr`fs.statSync(${t})`,0);return Le.statSync(t)}catch(i){var r=i,n=1}finally{sr(e,r,n)}},lstatSync(t){let e=[];try{let i=ar(e,cr`fs.lstatSync(${t})`,0);return Le.lstatSync(t)}catch(i){var r=i,n=1}finally{sr(e,r,n)}},readFileSync(t,e){let r=[];try{let o=ar(r,cr`fs.readFileSync(${t})`,0);return Le.readFileSync(t,{encoding:e.encoding})}catch(o){var n=o,i=1}finally{sr(r,n,i)}},readFileBytesSync(t){let e=[];try{let i=ar(e,cr`fs.readFileBytesSync(${t})`,0);return Le.readFileSync(t)}catch(i){var r=i,n=1}finally{sr(e,r,n)}},readSync(t,e){let r=[];try{let o=ar(r,cr`fs.readSync(${t}, ${e.length} bytes)`,0),a;try{a=Le.openSync(t,"r");let s=Buffer.alloc(e.length),c=Le.readSync(a,s,0,e.length,0);return{buffer:s,bytesRead:c}}finally{a&&Le.closeSync(a)}}catch(o){var n=o,i=1}finally{sr(r,n,i)}},appendFileSync(t,e,r){let n=[];try{let a=ar(n,cr`fs.appendFileSync(${t}, ${e.length} chars)`,0);if(r?.mode!==void 0)try{let s=Le.openSync(t,"ax",r.mode);try{Le.appendFileSync(s,e)}finally{Le.closeSync(s)}return}catch(s){if(yp(s)!=="EEXIST")throw s}Le.appendFileSync(t,e)}catch(a){var i=a,o=1}finally{sr(n,i,o)}},copyFileSync(t,e){let r=[];try{let o=ar(r,cr`fs.copyFileSync(${t} → ${e})`,0);Le.copyFileSync(t,e)}catch(o){var n=o,i=1}finally{sr(r,n,i)}},unlinkSync(t){let e=[];try{let i=ar(e,cr`fs.unlinkSync(${t})`,0);Le.unlinkSync(t)}catch(i){var r=i,n=1}finally{sr(e,r,n)}},renameSync(t,e){let r=[];try{let o=ar(r,cr`fs.renameSync(${t} → ${e})`,0);Le.renameSync(t,e)}catch(o){var n=o,i=1}finally{sr(r,n,i)}},linkSync(t,e){let r=[];try{let o=ar(r,cr`fs.linkSync(${t} → ${e})`,0);Le.linkSync(t,e)}catch(o){var n=o,i=1}finally{sr(r,n,i)}},symlinkSync(t,e,r){let n=[];try{let a=ar(n,cr`fs.symlinkSync(${t} → ${e})`,0);Le.symlinkSync(t,e,r)}catch(a){var i=a,o=1}finally{sr(n,i,o)}},readlinkSync(t){let e=[];try{let i=ar(e,cr`fs.readlinkSync(${t})`,0);return Le.readlinkSync(t)}catch(i){var r=i,n=1}finally{sr(e,r,n)}},realpathSync(t){let e=[];try{let i=ar(e,cr`fs.realpathSync(${t})`,0);return Le.realpathSync(t).normalize("NFC")}catch(i){var r=i,n=1}finally{sr(e,r,n)}},mkdirSync(t,e){let r=[];try{let o=ar(r,cr`fs.mkdirSync(${t})`,0),a={recursive:!0};e?.mode!==void 0&&(a.mode=e.mode);try{Le.mkdirSync(t,a)}catch(s){if(yp(s)!=="EEXIST")throw s}}catch(o){var n=o,i=1}finally{sr(r,n,i)}},readdirSync(t){let e=[];try{let i=ar(e,cr`fs.readdirSync(${t})`,0);return Le.readdirSync(t,{withFileTypes:!0})}catch(i){var r=i,n=1}finally{sr(e,r,n)}},readdirStringSync(t){let e=[];try{let i=ar(e,cr`fs.readdirStringSync(${t})`,0);return Le.readdirSync(t)}catch(i){var r=i,n=1}finally{sr(e,r,n)}},isDirEmptySync(t){let e=[];try{let i=ar(e,cr`fs.isDirEmptySync(${t})`,0);return this.readdirSync(t).length===0}catch(i){var r=i,n=1}finally{sr(e,r,n)}},rmdirSync(t){let e=[];try{let i=ar(e,cr`fs.rmdirSync(${t})`,0);Le.rmdirSync(t)}catch(i){var r=i,n=1}finally{sr(e,r,n)}},rmSync(t,e){let r=[];try{let o=ar(r,cr`fs.rmSync(${t})`,0);Le.rmSync(t,e)}catch(o){var n=o,i=1}finally{sr(r,n,i)}},createWriteStream(t){return Le.createWriteStream(t)},async readFileBytes(t,e){if(e===void 0)return v2(t);let r=await Lie(t,"r");try{let{size:n}=await r.stat(),i=Math.min(n,e),o=Buffer.allocUnsafe(i),a=0;for(;a<i;){let{bytesRead:s}=await r.read(o,a,i-a,a);if(s===0)break;a+=s}return a<i?o.subarray(0,a):o}finally{await r.close()}}},Qie=Gie;MI={verbose:0,debug:1,info:2,warn:3,error:4},Xie=ba(()=>{let t=process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return t&&Object.hasOwn(MI,t)?t:"debug"}),eoe=!1,qI=ba(()=>eoe||ls(process.env.DEBUG)||ls(process.env.DEBUG_SDK)||process.argv.includes("--debug")||process.argv.includes("-d")||O6()||process.argv.some(t=>t.startsWith("--debug="))||j6()!==null),toe=ba(()=>{let t=process.argv.find(r=>r.startsWith("--debug="));if(!t)return null;let e=t.substring(8);return Uie(e)}),O6=ba(()=>process.argv.includes("--debug-to-stderr")||process.argv.includes("-d2e")),j6=ba(()=>{for(let t=0;t<process.argv.length;t++){let e=process.argv[t];if(e.startsWith("--debug-file="))return e.substring(13);if(e==="--debug-file"&&t+1<process.argv.length)return process.argv[t+1]}return null});noe=!1,Zg=null,SI=Promise.resolve();C6=ba(async()=>{try{let t=N6(),e=T6(t),r=z6(e,"latest");await Cie(r).catch(()=>{}),await Nie(t,r)}catch{}}),LUe=(()=>{let t=process.env.CLAUDE_CODE_SLOW_OPERATION_THRESHOLD_MS;if(t!==void 0){let e=Number(t);if(!Number.isNaN(e)&&e>=0)return e}return 1/0})(),soe={[Symbol.dispose](){}};cr=coe;fE=(t,e)=>{let r=[];try{let o=ar(r,cr`JSON.parse(${t})`,0);return typeof e>"u"?JSON.parse(t):JSON.parse(t,e)}catch(o){var n=o,i=1}finally{sr(r,n,i)}};doe=2e3,wv=new Set,_2=!1;ZI=class{options;process;processStdin;processStdout;ready=!1;abortController;exitError;exitListeners=[];abortHandler;pendingWrites=[];pendingEndInput=!1;spawnResolve;spawnReject;spawnPromise;constructor(e){this.options=e,this.abortController=e.abortController||t6(),e.deferSpawn?(this.spawnPromise=new Promise((r,n)=>{this.spawnResolve=r,this.spawnReject=n}),this.spawnPromise.catch(()=>{})):this.initialize()}spawn(){try{this.initialize()}catch(r){throw this.spawnAbort(E6(r)),r}let e=this.pendingWrites;this.pendingWrites=[],this.spawnResolve&&(this.spawnResolve(),this.spawnResolve=void 0,this.spawnReject=void 0);for(let r of e)this.write(r);this.pendingEndInput&&(this.pendingEndInput=!1,this.processStdin?.end())}spawnAbort(e){this.spawnReject&&(this.spawnReject(e),this.spawnReject=void 0,this.spawnResolve=void 0,this.pendingWrites=[])}updateEnv(e){this.options.env?Object.assign(this.options.env,e):this.options.env={...e}}getDefaultExecutable(){return r6()?"bun":"node"}spawnLocalProcess(e){let{command:r,args:n,cwd:i,env:o,signal:a}=e,s=ls(o.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr?"pipe":"ignore",c=Fte(r,n,{cwd:i,stdio:["pipe","pipe",s],signal:a,env:o,windowsHide:!0});return(ls(o.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr)&&c.stderr.on("data",u=>{let l=u.toString();ro(l),this.options.stderr&&this.options.stderr(l)}),{stdin:c.stdin,stdout:c.stdout,get killed(){return c.killed},get exitCode(){return c.exitCode},kill:c.kill.bind(c),on:c.on.bind(c),once:c.once.bind(c),off:c.off.bind(c)}}initialize(){try{let{additionalDirectories:e=[],agent:r,betas:n,cwd:i,executable:o=this.getDefaultExecutable(),executableArgs:a=[],extraArgs:s={},pathToClaudeCodeExecutable:c,env:u={...process.env},thinkingConfig:l,maxTurns:d,maxBudgetUsd:p,taskBudget:f,model:m,fallbackModel:v,jsonSchema:g,permissionMode:h,allowDangerouslySkipPermissions:_,permissionPromptToolName:y,continueConversation:b,resume:x,settingSources:w,allowedTools:k=[],disallowedTools:$=[],tools:T,mcpServers:A,strictMcpConfig:z,canUseTool:M,includePartialMessages:W,plugins:R,sandbox:te}=this.options,G=["--output-format","stream-json","--verbose","--input-format","stream-json"];if(l){switch(l.type){case"enabled":l.budgetTokens===void 0?G.push("--thinking","adaptive"):G.push("--max-thinking-tokens",l.budgetTokens.toString());break;case"disabled":G.push("--thinking","disabled");break;case"adaptive":G.push("--thinking","adaptive");break}l.type!=="disabled"&&l.display&&G.push("--thinking-display",l.display)}if(this.options.effort&&G.push("--effort",this.options.effort),d&&G.push("--max-turns",d.toString()),p!==void 0&&G.push("--max-budget-usd",p.toString()),f&&G.push("--task-budget",f.total.toString()),m&&G.push("--model",m),r&&G.push("--agent",r),n&&n.length>0&&G.push("--betas",n.join(",")),g&&G.push("--json-schema",wn(g)),this.options.debugFile?G.push("--debug-file",this.options.debugFile):this.options.debug&&G.push("--debug"),ls(u.DEBUG_CLAUDE_AGENT_SDK)&&G.push("--debug-to-stderr"),M){if(y)throw Error("canUseTool callback cannot be used with permissionPromptToolName. Please use one or the other.");G.push("--permission-prompt-tool","stdio")}else y&&G.push("--permission-prompt-tool",y);if(b&&G.push("--continue"),x&&G.push("--resume",x),this.options.assistant&&G.push("--assistant"),this.options.channels&&this.options.channels.length>0&&G.push("--channels",...this.options.channels),k.length>0&&G.push("--allowedTools",k.join(",")),$.length>0&&G.push("--disallowedTools",$.join(",")),T!==void 0&&(Array.isArray(T)?T.length===0?G.push("--tools",""):G.push("--tools",T.join(",")):G.push("--tools","default")),A&&Object.keys(A).length>0&&G.push("--mcp-config",wn({mcpServers:A})),w!==void 0&&G.push(`--setting-sources=${w.join(",")}`),z&&G.push("--strict-mcp-config"),h&&G.push("--permission-mode",h),_&&G.push("--allow-dangerously-skip-permissions"),v){if(m&&v===m)throw Error("Fallback model cannot be the same as the main model. Please specify a different model for fallbackModel option.");G.push("--fallback-model",v)}this.options.includeHookEvents&&G.push("--include-hook-events"),W&&G.push("--include-partial-messages"),this.options.sessionMirror&&G.push("--session-mirror");for(let C of e)G.push("--add-dir",C);if(R&&R.length>0)for(let C of R)if(C.type==="local")G.push("--plugin-dir",C.path);else throw Error(`Unsupported plugin type: ${C.type}`);this.options.forkSession&&G.push("--fork-session"),this.options.resumeSessionAt&&G.push("--resume-session-at",this.options.resumeSessionAt),this.options.sessionId&&G.push("--session-id",this.options.sessionId),this.options.persistSession===!1&&G.push("--no-session-persistence");let ye={...s??{}};this.options.settings&&(ye.settings=this.options.settings);let De=loe(ye,te);for(let[C,S]of Object.entries(De))S===null?G.push(`--${C}`):G.push(`--${C}`,S);u.CLAUDE_CODE_ENTRYPOINT||(u.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),delete u.NODE_OPTIONS,ls(u.DEBUG_CLAUDE_AGENT_SDK)?u.DEBUG="1":delete u.DEBUG;let de=moe(c),F=de?c:o,I=de?[...a,...G]:[...a,c,...G],V={command:F,args:I,cwd:i,env:u,signal:this.abortController.signal};this.options.spawnClaudeCodeProcess?(ro(`Spawning Claude Code (custom): ${F} ${I.join(" ")}`),this.process=this.options.spawnClaudeCodeProcess(V)):(ro(`Spawning Claude Code: ${F} ${I.join(" ")}`),this.process=this.spawnLocalProcess(V)),this.processStdin=this.process.stdin,this.processStdout=this.process.stdout,foe(this.process),this.abortHandler=()=>{this.process&&!this.process.killed&&this.process.kill("SIGTERM")},this.abortController.signal.addEventListener("abort",this.abortHandler),this.process.on("error",C=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new ma("Claude Code process aborted by user");else if(dE(C)){let S=de?`Claude Code native binary not found at ${c}. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.`:`Claude Code executable not found at ${c}. Is options.pathToClaudeCodeExecutable set?`;this.exitError=ReferenceError(S),ro(this.exitError.message)}else this.exitError=Error(`Failed to spawn Claude Code process: ${C.message}`),ro(this.exitError.message)}),this.process.on("exit",(C,S)=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new ma("Claude Code process aborted by user");else{let P=this.getProcessExitError(C,S);P&&(this.exitError=P,ro(P.message))}}),this.ready=!0}catch(e){throw this.ready=!1,e}}getProcessExitError(e,r){if(e!==0&&e!==null)return Error(`Claude Code process exited with code ${e}`);if(r)return Error(`Claude Code process terminated by signal ${r}`)}write(e){if(this.abortController.signal.aborted)throw new ma("Operation aborted");if(this.spawnResolve){this.pendingWrites.push(e);return}if(!this.ready||!this.processStdin)throw Error("ProcessTransport is not ready for writing");if(this.processStdin.writableEnded){ro("[ProcessTransport] Dropping write to ended stdin stream");return}if(this.process?.killed||this.process?.exitCode!==null)throw Error("Cannot write to terminated process");if(this.exitError)throw Error(`Cannot write to process that exited with error: ${this.exitError.message}`);ro(`[ProcessTransport] Writing to stdin: ${e.substring(0,100)}`);try{this.processStdin.write(e)||ro("[ProcessTransport] Write buffer full, data queued")}catch(r){throw this.ready=!1,Error(`Failed to write to process stdin: ${Gg(r)}`)}}close(){this.spawnAbort(Error("Query closed before spawn")),this.processStdin&&(this.processStdin.end(),this.processStdin=void 0),this.abortHandler&&(this.abortController.signal.removeEventListener("abort",this.abortHandler),this.abortHandler=void 0);for(let{handler:r}of this.exitListeners)this.process?.off("exit",r);this.exitListeners=[];let e=this.process;e&&!e.killed&&e.exitCode===null?(setTimeout(r=>{r.killed||r.exitCode!==null||(r.kill("SIGTERM"),setTimeout(n=>{n.exitCode===null&&n.kill("SIGKILL")},5e3,r).unref())},doe,e).unref(),e.once("exit",()=>wv.delete(e))):e&&wv.delete(e),this.ready=!1}isReady(){return this.ready}async*readMessages(){if(this.spawnPromise&&(await this.spawnPromise,this.spawnPromise=void 0),!this.processStdout)throw Error("ProcessTransport output stream not available");if(this.exitError)throw this.exitError;let e=Vte({input:this.processStdout}),r=this.process?(()=>{let n=this.process,i=()=>e.close();return n.on("error",i),()=>n.off("error",i)})():void 0;this.exitError&&e.close();try{for await(let n of e)if(n.trim()){let i;try{i=fE(n)}catch{ro(`Non-JSON stdout: ${n}`);continue}yield i}if(this.exitError)throw this.exitError;await this.waitForExit()}catch(n){throw n}finally{r?.(),e.close()}}endInput(){if(this.spawnResolve){this.pendingEndInput=!0;return}this.processStdin&&this.processStdin.end()}getInputStream(){return this.processStdin}onExit(e){if(!this.process)return()=>{};let r=(n,i)=>{let o=this.getProcessExitError(n,i);e(o)};return this.process.on("exit",r),this.exitListeners.push({callback:e,handler:r}),()=>{this.process&&this.process.off("exit",r);let n=this.exitListeners.findIndex(i=>i.handler===r);n!==-1&&this.exitListeners.splice(n,1)}}async waitForExit(){if(!this.process){if(this.exitError)throw this.exitError;return}if(this.process.exitCode!==null||this.process.killed||this.exitError){if(this.exitError)throw this.exitError;return}return new Promise((e,r)=>{let n=(o,a)=>{if(this.abortController.signal.aborted){r(new ma("Operation aborted"));return}let s=this.getProcessExitError(o,a);s?r(s):e()};this.process.once("exit",n);let i=o=>{this.process.off("exit",n),r(o)};this.process.once("error",i),this.process.once("exit",()=>{this.process.off("error",i)})})}};LI=class{returned;queue=[];readResolve;readReject;isDone=!1;hasError;started=!1;constructor(e){this.returned=e}[Symbol.asyncIterator](){if(this.started)throw Error("Stream can only be iterated once");return this.started=!0,this}next(){return this.queue.length>0?Promise.resolve({done:!1,value:this.queue.shift()}):this.isDone?Promise.resolve({done:!0,value:void 0}):this.hasError?Promise.reject(this.hasError):new Promise((e,r)=>{this.readResolve=e,this.readReject=r})}enqueue(e){if(this.readResolve){let r=this.readResolve;this.readResolve=void 0,this.readReject=void 0,r({done:!1,value:e})}else this.queue.push(e)}done(){if(this.isDone=!0,this.readResolve){let e=this.readResolve;this.readResolve=void 0,this.readReject=void 0,e({done:!0,value:void 0})}}error(e){if(this.hasError=e,this.readReject){let r=this.readReject;this.readResolve=void 0,this.readReject=void 0,r(e)}}return(){return this.isDone=!0,this.returned&&this.returned(),Promise.resolve({done:!0,value:void 0})}},FI=class{sendMcpMessage;isClosed=!1;constructor(e){this.sendMcpMessage=e}onclose;onerror;onmessage;async start(){}async send(e){if(this.isClosed)throw Error("Transport is closed");this.sendMcpMessage(e)}async close(){this.isClosed||(this.isClosed=!0,this.onclose?.())}},VI=class{transport;isSingleUserTurn;canUseTool;hooks;abortController;jsonSchema;initConfig;onElicitation;getOAuthToken;pendingControlResponses=new Map;cleanupPerformed=!1;sdkMessages;inputStream=new LI;initialization;cancelControllers=new Map;hookCallbacks=new Map;nextCallbackId=0;sdkMcpTransports=new Map;sdkMcpServerInstances=new Map;pendingMcpResponses=new Map;firstResultReceivedResolve;firstResultReceived=!1;lastErrorResultText;transcriptMirrorBatcher;cleanupCallbacks=[];cleanupPromise;setIsSingleUserTurn(e){this.isSingleUserTurn=e}setTranscriptMirrorBatcher(e){this.transcriptMirrorBatcher=e}addCleanupCallback(e){this.cleanupPerformed?e():this.cleanupCallbacks.push(e)}isClosed(){return this.cleanupPerformed}hasBidirectionalNeeds(){return this.sdkMcpTransports.size>0||this.hooks!==void 0&&Object.keys(this.hooks).length>0||this.canUseTool!==void 0||this.onElicitation!==void 0||this.getOAuthToken!==void 0}constructor(e,r,n,i,o,a=new Map,s,c,u,l){this.transport=e,this.isSingleUserTurn=r,this.canUseTool=n,this.hooks=i,this.abortController=o,this.jsonSchema=s,this.initConfig=c,this.onElicitation=u,this.getOAuthToken=l;for(let[d,p]of a)this.connectSdkMcpServer(d,p);this.sdkMessages=this.readSdkMessages(),this.readMessages(),this.initialization=this.initialize(),this.initialization.catch(()=>{})}setError(e){this.inputStream.error(e)}async stopTask(e){await this.request({subtype:"stop_task",task_id:e})}close(){this.cleanup()}cleanup(e){return this.cleanupPromise?this.cleanupPromise:(this.cleanupPerformed=!0,this.cleanupPromise=this.performCleanup(e),this.cleanupPromise)}async performCleanup(e){for(let r of this.cleanupCallbacks)try{r()}catch{}if(this.cleanupCallbacks=[],this.transcriptMirrorBatcher)try{await this.transcriptMirrorBatcher.flush()}catch{}try{for(let n of this.cancelControllers.values())n.abort();this.cancelControllers.clear(),this.transport.close();let r=e??Error("Query closed before response received");for(let{reject:n}of this.pendingControlResponses.values())n(r);this.pendingControlResponses.clear();for(let{reject:n}of this.pendingMcpResponses.values())n(r);this.pendingMcpResponses.clear(),this.hookCallbacks.clear();for(let n of this.sdkMcpTransports.values())n.close().catch(()=>{});this.sdkMcpTransports.clear(),e?this.inputStream.error(e):this.inputStream.done()}catch{}}next(...[e]){return this.sdkMessages.next(e)}async return(e){return await this.cleanup(),this.sdkMessages.return(e)}async throw(e){return await this.cleanup(),this.sdkMessages.throw(e)}[Symbol.asyncIterator](){return this.sdkMessages}async[Symbol.asyncDispose](){await this.cleanup()}async readMessages(){try{for await(let e of this.transport.readMessages()){if(e.type==="control_response"){let r=this.pendingControlResponses.get(e.response.request_id);r&&r.handler(e.response);continue}else if(e.type==="control_request"){this.handleControlRequest(e);continue}else if(e.type==="control_cancel_request"){this.handleControlCancelRequest(e);continue}else{if(e.type==="keep_alive")continue;if(e.type==="transcript_mirror"){this.transcriptMirrorBatcher?.enqueue(e.filePath,e.entries);continue}}e.type==="system"&&e.subtype==="post_turn_summary"||(e.type==="result"?(this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.lastErrorResultText=e.is_error?e.subtype==="success"?e.result:e.errors.join("; "):void 0,this.firstResultReceived=!0,this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.isSingleUserTurn&&(Wn("[Query.readMessages] First result received for single-turn query, closing stdin"),this.transport.endInput())):e.type==="system"&&e.subtype==="session_state_changed"||(this.lastErrorResultText=void 0),this.inputStream.enqueue(e))}this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.inputStream.done(),this.cleanup()}catch(e){if(this.transcriptMirrorBatcher&&await this.transcriptMirrorBatcher.flush(),this.firstResultReceivedResolve&&this.firstResultReceivedResolve(),this.lastErrorResultText!==void 0&&!(e instanceof ma)){let r=Error(`Claude Code returned an error result: ${this.lastErrorResultText}`);Wn(`[Query.readMessages] Replacing exit error with result text. Original: ${Gg(e)}`),this.inputStream.error(r),this.cleanup(r);return}this.inputStream.error(e),this.cleanup(e)}}async handleControlRequest(e){let r=new AbortController;this.cancelControllers.set(e.request_id,r);try{let n=await this.processControlRequest(e,r.signal);if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"success",request_id:e.request_id,response:n}};await Promise.resolve(this.transport.write(wn(i)+`
|
|
187
|
+
`))}catch(n){if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"error",request_id:e.request_id,error:Gg(n)}};try{await Promise.resolve(this.transport.write(wn(i)+`
|
|
188
|
+
`))}catch(o){Wn(`[Query.handleControlRequest] Error-response write failed: ${Gg(o)}`,{level:"error"})}}finally{this.cancelControllers.delete(e.request_id)}}handleControlCancelRequest(e){let r=this.cancelControllers.get(e.request_id);r&&(r.abort(),this.cancelControllers.delete(e.request_id))}async processControlRequest(e,r){if(e.request.subtype==="can_use_tool"){if(!this.canUseTool)throw Error("canUseTool callback is not provided.");return{...await this.canUseTool(e.request.tool_name,e.request.input,{signal:r,suggestions:e.request.permission_suggestions,blockedPath:e.request.blocked_path,decisionReason:e.request.decision_reason,title:e.request.title,displayName:e.request.display_name,description:e.request.description,toolUseID:e.request.tool_use_id,agentID:e.request.agent_id}),toolUseID:e.request.tool_use_id}}else{if(e.request.subtype==="hook_callback")return await this.handleHookCallbacks(e.request.callback_id,e.request.input,e.request.tool_use_id,r);if(e.request.subtype==="mcp_message"){let n=e.request,i=this.sdkMcpTransports.get(n.server_name);if(!i)throw Error(`SDK MCP server not found: ${n.server_name}`);return"method"in n.message&&"id"in n.message&&n.message.id!==null?{mcp_response:await this.handleMcpControlRequest(n.server_name,n,i)}:(i.onmessage&&i.onmessage(n.message),{mcp_response:{jsonrpc:"2.0",result:{},id:0}})}else if(e.request.subtype==="elicitation"){let n=e.request;return this.onElicitation?await this.onElicitation({serverName:n.mcp_server_name,message:n.message,mode:n.mode,url:n.url,elicitationId:n.elicitation_id,requestedSchema:n.requested_schema,title:n.title,displayName:n.display_name,description:n.description},{signal:r}):{action:"decline"}}else if(e.request.subtype==="oauth_token_refresh"){if(!this.getOAuthToken)throw Error("getOAuthToken callback is not provided.");return{accessToken:await this.getOAuthToken({signal:r})??null}}}throw Error("Unsupported control request subtype: "+e.request.subtype)}async*readSdkMessages(){try{for await(let e of this.inputStream)yield e}finally{await this.cleanup()}}async initialize(){let e;if(this.hooks){e={};for(let[i,o]of Object.entries(this.hooks))o.length>0&&(e[i]=o.map(a=>{let s=[];for(let c of a.hooks){let u=`hook_${this.nextCallbackId++}`;this.hookCallbacks.set(u,c),s.push(u)}return{matcher:a.matcher,hookCallbackIds:s,timeout:a.timeout}}))}let r=this.sdkMcpTransports.size>0?Array.from(this.sdkMcpTransports.keys()):void 0,n={subtype:"initialize",hooks:e,sdkMcpServers:r,jsonSchema:this.jsonSchema,systemPrompt:this.initConfig?.systemPrompt,appendSystemPrompt:this.initConfig?.appendSystemPrompt,excludeDynamicSections:this.initConfig?.excludeDynamicSections,agents:this.initConfig?.agents,promptSuggestions:this.initConfig?.promptSuggestions,agentProgressSummaries:this.initConfig?.agentProgressSummaries};return(await this.request(n)).response}async interrupt(){await this.request({subtype:"interrupt"})}async setPermissionMode(e){await this.request({subtype:"set_permission_mode",mode:e})}async setModel(e){await this.request({subtype:"set_model",model:e})}async setMaxThinkingTokens(e){await this.request({subtype:"set_max_thinking_tokens",max_thinking_tokens:e})}async applyFlagSettings(e){await this.request({subtype:"apply_flag_settings",settings:e})}async getSettings(){return(await this.request({subtype:"get_settings"})).response}async rewindFiles(e,r){return(await this.request({subtype:"rewind_files",user_message_id:e,dry_run:r?.dryRun})).response}async cancelAsyncMessage(e){return(await this.request({subtype:"cancel_async_message",message_uuid:e})).response.cancelled}async seedReadState(e,r){await this.request({subtype:"seed_read_state",path:e,mtime:r})}async enableRemoteControl(e,r){return(await this.request({subtype:"remote_control",enabled:e,...r!==void 0&&{name:r}})).response}async generateSessionTitle(e,r){return(await this.request({subtype:"generate_session_title",description:e,persist:r?.persist})).response.title}async askSideQuestion(e){let r=(await this.request({subtype:"side_question",question:e})).response;return r.response===null?null:{response:r.response,synthetic:r.synthetic??!1}}processPendingPermissionRequests(e){for(let r of e)r.request.subtype==="can_use_tool"&&this.handleControlRequest(r).catch(()=>{})}request(e){let r=Math.random().toString(36).substring(2,15),n={request_id:r,type:"control_request",request:e};return new Promise((i,o)=>{this.pendingControlResponses.set(r,{handler:a=>{this.pendingControlResponses.delete(r),a.subtype==="success"?i(a):(o(Error(a.error)),a.pending_permission_requests&&this.processPendingPermissionRequests(a.pending_permission_requests))},reject:o}),Promise.resolve(this.transport.write(wn(n)+`
|
|
189
|
+
`)).catch(a=>{this.pendingControlResponses.delete(r),o(a)})})}initializationResult(){return this.initialization}async supportedCommands(){return(await this.initialization).commands}async supportedModels(){return(await this.initialization).models}async supportedAgents(){return(await this.initialization).agents}async reconnectMcpServer(e){await this.request({subtype:"mcp_reconnect",serverName:e})}async toggleMcpServer(e,r){await this.request({subtype:"mcp_toggle",serverName:e,enabled:r})}async enableChannel(e){await this.request({subtype:"channel_enable",serverName:e})}async mcpAuthenticate(e){return(await this.request({subtype:"mcp_authenticate",serverName:e})).response}async mcpClearAuth(e){return(await this.request({subtype:"mcp_clear_auth",serverName:e})).response}async mcpSubmitOAuthCallbackUrl(e,r){return(await this.request({subtype:"mcp_oauth_callback_url",serverName:e,callbackUrl:r})).response}async claudeAuthenticate(e){return(await this.request({subtype:"claude_authenticate",loginWithClaudeAi:e})).response}async claudeOAuthCallback(e,r){return(await this.request({subtype:"claude_oauth_callback",authorizationCode:e,state:r})).response}async claudeOAuthWaitForCompletion(){return(await this.request({subtype:"claude_oauth_wait_for_completion"})).response}async mcpServerStatus(){return(await this.request({subtype:"mcp_status"})).response.mcpServers}async getContextUsage(){return(await this.request({subtype:"get_context_usage"})).response}async reloadPlugins(){return(await this.request({subtype:"reload_plugins"})).response}async setMcpServers(e){let r={},n={};for(let[s,c]of Object.entries(e))c.type==="sdk"&&"instance"in c?r[s]=c.instance:n[s]=c;let i=new Set(this.sdkMcpServerInstances.keys()),o=new Set(Object.keys(r));for(let s of i)o.has(s)||await this.disconnectSdkMcpServer(s);for(let[s,c]of Object.entries(r))i.has(s)||this.connectSdkMcpServer(s,c);let a={};for(let s of Object.keys(r))a[s]={type:"sdk",name:s};return(await this.request({subtype:"mcp_set_servers",servers:{...n,...a}})).response}async accountInfo(){return(await this.initialization).account}async streamInput(e){Wn("[Query.streamInput] Starting to process input stream");try{let r=0;for await(let n of e){if(r++,Wn(`[Query.streamInput] Processing message ${r}: ${n.type}`),this.abortController?.signal.aborted)break;await Promise.resolve(this.transport.write(wn(n)+`
|
|
190
|
+
`))}Wn(`[Query.streamInput] Finished processing ${r} messages from input stream`),r>0&&this.hasBidirectionalNeeds()&&(Wn("[Query.streamInput] Has bidirectional needs, waiting for first result"),await this.waitForFirstResult()),Wn("[Query] Calling transport.endInput() to close stdin to CLI process"),this.transport.endInput()}catch(r){if(!(r instanceof ma))throw r}}waitForFirstResult(){return this.firstResultReceived?(Wn("[Query.waitForFirstResult] Result already received, returning immediately"),Promise.resolve()):new Promise(e=>{if(this.abortController?.signal.aborted){e();return}this.abortController?.signal.addEventListener("abort",()=>e(),{once:!0}),this.firstResultReceivedResolve=e})}handleHookCallbacks(e,r,n,i){let o=this.hookCallbacks.get(e);if(!o)throw Error(`No hook callback found for ID: ${e}`);return o(r,n,{signal:i})}connectSdkMcpServer(e,r){let n=new FI(i=>this.sendMcpServerMessageToCli(e,i));this.sdkMcpTransports.set(e,n),this.sdkMcpServerInstances.set(e,r),r.connect(n).catch(i=>{this.sdkMcpTransports.get(e)===n&&this.sdkMcpTransports.delete(e),this.sdkMcpServerInstances.get(e)===r&&this.sdkMcpServerInstances.delete(e),Wn(`[Query.connectSdkMcpServer] Failed to connect MCP server '${e}': ${i}`,{level:"error"})})}async disconnectSdkMcpServer(e){let r=this.sdkMcpTransports.get(e);r&&(await r.close(),this.sdkMcpTransports.delete(e)),this.sdkMcpServerInstances.delete(e)}sendMcpServerMessageToCli(e,r){if("id"in r&&r.id!==null&&r.id!==void 0){let i=`${e}:${r.id}`,o=this.pendingMcpResponses.get(i);if(o){o.resolve(r),this.pendingMcpResponses.delete(i);return}}let n={type:"control_request",request_id:P6(),request:{subtype:"mcp_message",server_name:e,message:r}};Promise.resolve(this.transport.write(wn(n)+`
|
|
191
|
+
`)).catch(i=>{Wn(`[Query.sendMcpServerMessageToCli] Transport write failed: ${i}`,{level:"error"})})}handleMcpControlRequest(e,r,n){let i="id"in r.message?r.message.id:null,o=`${e}:${i}`;return new Promise((a,s)=>{let c=()=>{this.pendingMcpResponses.delete(o)},u=d=>{c(),a(d)},l=d=>{c(),s(d)};if(this.pendingMcpResponses.set(o,{resolve:u,reject:l}),n.onmessage)n.onmessage(r.message);else{c(),s(Error("No message handler registered"));return}})}},WI=class{send;pending=[];flushPromise=null;constructor(e){this.send=e}enqueue(e,r){this.pending.push({filePath:e,entries:r})}async flush(){this.flushPromise&&await this.flushPromise;let e=this.pending.splice(0);e.length!==0&&(this.flushPromise=this.doFlush(e),await this.flushPromise,this.flushPromise=null)}async doFlush(e){let r=new Map;for(let n of e){let i=r.get(n.filePath);i?i.push(...n.entries):r.set(n.filePath,n.entries.slice())}for(let[n,i]of r)try{await this.send(n,i)}catch(o){Wn(`[TranscriptMirrorBatcher] flush failed for ${n}: ${o}`,{level:"error"})}}},WUe=voe(goe);_oe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;b2=200;BUe=Buffer.from('{"type":"attribution-snapshot"'),KUe=Buffer.from('{"type":"system"'),koe=10,HUe=Buffer.from([koe]);Eoe="user:inference",R6="user:profile",Poe="org:create_api_key",Toe=[Poe,R6],zoe=[R6,Eoe,"user:sessions:claude_code","user:mcp_servers","user:file_upload"],YUe=Array.from(new Set([...Toe,...zoe])),x2={BASE_API_URL:"https://api.anthropic.com",CONSOLE_AUTHORIZE_URL:"https://platform.claude.com/oauth/authorize",CLAUDE_AI_AUTHORIZE_URL:"https://claude.com/cai/oauth/authorize",CLAUDE_AI_ORIGIN:"https://claude.ai",TOKEN_URL:"https://platform.claude.com/v1/oauth/token",API_KEY_URL:"https://api.anthropic.com/api/oauth/claude_cli/create_api_key",ROLES_URL:"https://api.anthropic.com/api/oauth/claude_cli/roles",CONSOLE_SUCCESS_URL:"https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",CLAUDEAI_SUCCESS_URL:"https://platform.claude.com/oauth/code/success?app=claude-code",MANUAL_REDIRECT_URL:"https://platform.claude.com/oauth/code/callback",CLIENT_ID:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",OAUTH_FILE_SUFFIX:"",MCP_PROXY_URL:"https://mcp-proxy.anthropic.com",MCP_PROXY_PATH:"/v1/mcp/{server_id}"},Ooe=void 0;Noe=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"];Roe="-credentials";(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw Error()}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(St||(St={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(w2||(w2={}));ve=St.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fa=t=>{switch(typeof t){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(t)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(t)?ve.array:t===null?ve.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ve.promise:typeof Map<"u"&&t instanceof Map?ve.map:typeof Set<"u"&&t instanceof Set?ve.set:typeof Date<"u"&&t instanceof Date?ve.date:ve.object;default:return ve.unknown}},X=St.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ci=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){let u=a.path[c];c!==a.path.length-1?s[u]=s[u]||{_errors:[]}:(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(a))),s=s[u],c++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,St.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];r[o]=r[o]||[],r[o].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};ci.create=t=>new ci(t);Doe=(t,e)=>{let r;switch(t.code){case X.invalid_type:t.received===ve.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case X.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,St.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:r=`Unrecognized key(s) in object: ${St.joinValues(t.keys,", ")}`;break;case X.invalid_union:r="Invalid input";break;case X.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${St.joinValues(t.options)}`;break;case X.invalid_enum_value:r=`Invalid enum value. Expected ${St.joinValues(t.options)}, received '${t.received}'`;break;case X.invalid_arguments:r="Invalid function arguments";break;case X.invalid_return_type:r="Invalid function return type";break;case X.invalid_date:r="Invalid date";break;case X.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:St.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case X.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case X.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case X.custom:r="Invalid input";break;case X.invalid_intersection_types:r="Intersection results could not be merged";break;case X.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case X.not_finite:r="Number must be finite";break;default:r=e.defaultError,St.assertNever(t)}return{message:r}},kp=Doe,Moe=kp;KI=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:e,defaultError:s}).message;return{...i,path:o,message:s}};ln=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return Ce;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Ce;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}},Ce=Object.freeze({status:"aborted"}),hp=t=>({status:"dirty",value:t}),kn=t=>({status:"valid",value:t}),k2=t=>t.status==="aborted",S2=t=>t.status==="dirty",iu=t=>t.status==="valid",kv=t=>typeof Promise<"u"&&t instanceof Promise;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(be||(be={}));ui=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},$2=(t,e)=>{if(iu(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new ci(t.common.issues);return this._error=r,this._error}}};tt=class{get description(){return this._def.description}_getType(e){return fa(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:fa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ln,ctx:{common:e.parent.common,data:e.data,parsedType:fa(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(kv(r))throw Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fa(e)},i=this._parseSync({data:e,path:n.path,parent:n});return $2(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fa(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return iu(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>iu(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fa(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(kv(i)?i:Promise.resolve(i));return $2(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=e(i),s=()=>o.addIssue({code:X.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Ri({schema:this,typeName:Re.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ni.create(this,this._def)}nullable(){return Co.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return va.create(this)}promise(){return gs.create(this,this._def)}or(e){return cu.create([this,e],this._def)}and(e){return uu.create(this,e,this._def)}transform(e){return new Ri({...We(this._def),schema:this,typeName:Re.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new mu({...We(this._def),innerType:this,defaultValue:r,typeName:Re.ZodDefault})}brand(){return new Sv({typeName:Re.ZodBranded,type:this,...We(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new hu({...We(this._def),innerType:this,catchValue:r,typeName:Re.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return $v.create(this,e)}readonly(){return gu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},qoe=/^c[^\s-]{8,}$/i,Zoe=/^[0-9a-z]+$/,Loe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Foe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Voe=/^[a-z0-9_-]{21}$/i,Woe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Boe=/^[-+]?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)?)??$/,Koe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Hoe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Goe=/^(?:(?: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])$/,Qoe=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Yoe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Joe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Xoe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eae=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,A6="((\\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])))",tae=new RegExp(`^${A6}$`);ou=class t extends tt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ve.string){let i=this._getOrReturnCtx(e);return ue(i,{code:X.invalid_type,expected:ve.string,received:i.parsedType}),Ce}let r=new ln,n;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),ue(n,{code:X.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),ue(n,{code:X.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let o=e.data.length>i.value,a=e.data.length<i.value;(o||a)&&(n=this._getOrReturnCtx(e,n),o?ue(n,{code:X.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&ue(n,{code:X.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Koe.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"email",code:X.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")$I||($I=new RegExp(Hoe,"u")),$I.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"emoji",code:X.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Foe.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"uuid",code:X.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Voe.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"nanoid",code:X.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")qoe.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"cuid",code:X.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Zoe.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"cuid2",code:X.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Loe.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"ulid",code:X.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),ue(n,{validation:"url",code:X.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,!i.regex.test(e.data)&&(n=this._getOrReturnCtx(e,n),ue(n,{validation:"regex",code:X.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),ue(n,{code:X.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),ue(n,{code:X.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),ue(n,{code:X.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?nae(i).test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{code:X.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?tae.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{code:X.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?rae(i).test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{code:X.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Boe.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"duration",code:X.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?iae(e.data,i.version)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"ip",code:X.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?oae(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"jwt",code:X.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?aae(e.data,i.version)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"cidr",code:X.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Xoe.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"base64",code:X.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?eae.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"base64url",code:X.invalid_string,message:i.message}),r.dirty()):St.assertNever(i);return{status:r.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:X.invalid_string,...be.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...be.errToObj(e)})}url(e){return this._addCheck({kind:"url",...be.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...be.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...be.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...be.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...be.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...be.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...be.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...be.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...be.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...be.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...be.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...be.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...be.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...be.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...be.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...be.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...be.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...be.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...be.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...be.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...be.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...be.errToObj(r)})}nonempty(e){return this.min(1,be.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ou.create=t=>new ou({checks:[],typeName:Re.ZodString,coerce:t?.coerce??!1,...We(t)});Sp=class t extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ve.number){let i=this._getOrReturnCtx(e);return ue(i,{code:X.invalid_type,expected:ve.number,received:i.parsedType}),Ce}let r,n=new ln;for(let i of this._def.checks)i.kind==="int"?St.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ue(r,{code:X.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:X.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:X.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?sae(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),ue(r,{code:X.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ue(r,{code:X.not_finite,message:i.message}),n.dirty()):St.assertNever(i);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,be.toString(r))}gt(e,r){return this.setLimit("min",e,!1,be.toString(r))}lte(e,r){return this.setLimit("max",e,!0,be.toString(r))}lt(e,r){return this.setLimit("max",e,!1,be.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:be.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:be.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:be.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:be.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:be.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:be.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:be.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:be.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:be.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:be.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&St.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Sp.create=t=>new Sp({checks:[],typeName:Re.ZodNumber,coerce:t?.coerce||!1,...We(t)});$p=class t extends tt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ve.bigint)return this._getInvalidInput(e);let r,n=new ln;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:X.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:X.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ue(r,{code:X.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):St.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:ve.bigint,received:r.parsedType}),Ce}gte(e,r){return this.setLimit("min",e,!0,be.toString(r))}gt(e,r){return this.setLimit("min",e,!1,be.toString(r))}lte(e,r){return this.setLimit("max",e,!0,be.toString(r))}lt(e,r){return this.setLimit("max",e,!1,be.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:be.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:be.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:be.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:be.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:be.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:be.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};$p.create=t=>new $p({checks:[],typeName:Re.ZodBigInt,coerce:t?.coerce??!1,...We(t)});Ip=class extends tt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ve.boolean){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:ve.boolean,received:r.parsedType}),Ce}return kn(e.data)}};Ip.create=t=>new Ip({typeName:Re.ZodBoolean,coerce:t?.coerce||!1,...We(t)});Ep=class t extends tt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ve.date){let i=this._getOrReturnCtx(e);return ue(i,{code:X.invalid_type,expected:ve.date,received:i.parsedType}),Ce}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return ue(i,{code:X.invalid_date}),Ce}let r=new ln,n;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),ue(n,{code:X.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),ue(n,{code:X.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):St.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:be.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:be.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Ep.create=t=>new Ep({checks:[],coerce:t?.coerce||!1,typeName:Re.ZodDate,...We(t)});Pp=class extends tt{_parse(e){if(this._getType(e)!==ve.symbol){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:ve.symbol,received:r.parsedType}),Ce}return kn(e.data)}};Pp.create=t=>new Pp({typeName:Re.ZodSymbol,...We(t)});au=class extends tt{_parse(e){if(this._getType(e)!==ve.undefined){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:ve.undefined,received:r.parsedType}),Ce}return kn(e.data)}};au.create=t=>new au({typeName:Re.ZodUndefined,...We(t)});su=class extends tt{_parse(e){if(this._getType(e)!==ve.null){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:ve.null,received:r.parsedType}),Ce}return kn(e.data)}};su.create=t=>new su({typeName:Re.ZodNull,...We(t)});Tp=class extends tt{constructor(){super(...arguments),this._any=!0}_parse(e){return kn(e.data)}};Tp.create=t=>new Tp({typeName:Re.ZodAny,...We(t)});ha=class extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return kn(e.data)}};ha.create=t=>new ha({typeName:Re.ZodUnknown,...We(t)});no=class extends tt{_parse(e){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:ve.never,received:r.parsedType}),Ce}};no.create=t=>new no({typeName:Re.ZodNever,...We(t)});zp=class extends tt{_parse(e){if(this._getType(e)!==ve.undefined){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:ve.void,received:r.parsedType}),Ce}return kn(e.data)}};zp.create=t=>new zp({typeName:Re.ZodVoid,...We(t)});va=class t extends tt{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==ve.array)return ue(r,{code:X.invalid_type,expected:ve.array,received:r.parsedType}),Ce;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(ue(r,{code:a?X.too_big:X.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(ue(r,{code:X.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(ue(r,{code:X.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new ui(r,a,r.path,s)))).then(a=>ln.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new ui(r,a,r.path,s)));return ln.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:be.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:be.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:be.toString(r)}})}nonempty(e){return this.min(1,e)}};va.create=(t,e)=>new va({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Re.ZodArray,...We(e)});Gn=class t extends tt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=St.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==ve.object){let c=this._getOrReturnCtx(e);return ue(c,{code:X.invalid_type,expected:ve.object,received:c.parsedType}),Ce}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof no&&this._def.unknownKeys==="strip"))for(let c in n.data)o.includes(c)||a.push(c);let s=[];for(let c of o){let u=i[c],l=n.data[c];s.push({key:{status:"valid",value:c},value:u._parse(new ui(n,l,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof no){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of a)s.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")a.length>0&&(ue(n,{code:X.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of a){let l=n.data[u];s.push({key:{status:"valid",value:u},value:c._parse(new ui(n,l,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of s){let l=await u.key,d=await u.value;c.push({key:l,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>ln.mergeObjectSync(r,c)):ln.mergeObjectSync(r,s)}get shape(){return this._def.shape()}strict(e){return be.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let i=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:be.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Re.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of St.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of St.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Qc(this)}partial(e){let r={};for(let n of St.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of St.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Ni;)i=i._def.innerType;r[n]=i}return new t({...this._def,shape:()=>r})}keyof(){return D6(St.objectKeys(this.shape))}};Gn.create=(t,e)=>new Gn({shape:()=>t,unknownKeys:"strip",catchall:no.create(),typeName:Re.ZodObject,...We(e)});Gn.strictCreate=(t,e)=>new Gn({shape:()=>t,unknownKeys:"strict",catchall:no.create(),typeName:Re.ZodObject,...We(e)});Gn.lazycreate=(t,e)=>new Gn({shape:t,unknownKeys:"strip",catchall:no.create(),typeName:Re.ZodObject,...We(e)});cu=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new ci(s.ctx.common.issues));return ue(r,{code:X.invalid_union,unionErrors:a}),Ce}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(c=>new ci(c));return ue(r,{code:X.invalid_union,unionErrors:s}),Ce}}get options(){return this._def.options}};cu.create=(t,e)=>new cu({options:t,typeName:Re.ZodUnion,...We(e)});zo=t=>t instanceof lu?zo(t.schema):t instanceof Ri?zo(t.innerType()):t instanceof du?[t.value]:t instanceof pu?t.options:t instanceof fu?St.objectValues(t.enum):t instanceof mu?zo(t._def.innerType):t instanceof au?[void 0]:t instanceof su?[null]:t instanceof Ni?[void 0,...zo(t.unwrap())]:t instanceof Co?[null,...zo(t.unwrap())]:t instanceof Sv||t instanceof gu?zo(t.unwrap()):t instanceof hu?zo(t._def.innerType):[],HI=class t extends tt{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ve.object)return ue(r,{code:X.invalid_type,expected:ve.object,received:r.parsedType}),Ce;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(ue(r,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let a=zo(o.shape[e]);if(!a.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,o)}}return new t({typeName:Re.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...We(n)})}};uu=class extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(k2(o)||k2(a))return Ce;let s=GI(o.value,a.value);return s.valid?((S2(o)||S2(a))&&r.dirty(),{status:r.value,value:s.data}):(ue(n,{code:X.invalid_intersection_types}),Ce)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};uu.create=(t,e,r)=>new uu({left:t,right:e,typeName:Re.ZodIntersection,...We(r)});No=class t extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.array)return ue(n,{code:X.invalid_type,expected:ve.array,received:n.parsedType}),Ce;if(n.data.length<this._def.items.length)return ue(n,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&n.data.length>this._def.items.length&&(ue(n,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((o,a)=>{let s=this._def.items[a]||this._def.rest;return s?s._parse(new ui(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>ln.mergeArray(r,o)):ln.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};No.create=(t,e)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new No({items:t,typeName:Re.ZodTuple,rest:null,...We(e)})};QI=class t extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.object)return ue(n,{code:X.invalid_type,expected:ve.object,received:n.parsedType}),Ce;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new ui(n,s,n.path,s)),value:a._parse(new ui(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?ln.mergeObjectAsync(r,i):ln.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof tt?new t({keyType:e,valueType:r,typeName:Re.ZodRecord,...We(n)}):new t({keyType:ou.create(),valueType:e,typeName:Re.ZodRecord,...We(r)})}},Op=class extends tt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.map)return ue(n,{code:X.invalid_type,expected:ve.map,received:n.parsedType}),Ce;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,c],u)=>({key:i._parse(new ui(n,s,n.path,[u,"key"])),value:o._parse(new ui(n,c,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Ce;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let{key:u,value:l}=c;if(u.status==="aborted"||l.status==="aborted")return Ce;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}}}};Op.create=(t,e,r)=>new Op({valueType:e,keyType:t,typeName:Re.ZodMap,...We(r)});jp=class t extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ve.set)return ue(n,{code:X.invalid_type,expected:ve.set,received:n.parsedType}),Ce;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(ue(n,{code:X.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(ue(n,{code:X.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Ce;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let s=[...n.data.values()].map((c,u)=>o._parse(new ui(n,c,n.path,u)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:be.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:be.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};jp.create=(t,e)=>new jp({valueType:t,minSize:null,maxSize:null,typeName:Re.ZodSet,...We(e)});YI=class t extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ve.function)return ue(r,{code:X.invalid_type,expected:ve.function,received:r.parsedType}),Ce;function n(s,c){return KI({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,BI(),kp].filter(u=>!!u),issueData:{code:X.invalid_arguments,argumentsError:c}})}function i(s,c){return KI({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,BI(),kp].filter(u=>!!u),issueData:{code:X.invalid_return_type,returnTypeError:c}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof gs){let s=this;return kn(async function(...c){let u=new ci([]),l=await s._def.args.parseAsync(c,o).catch(p=>{throw u.addIssue(n(c,p)),u}),d=await Reflect.apply(a,this,l);return await s._def.returns._def.type.parseAsync(d,o).catch(p=>{throw u.addIssue(i(d,p)),u})})}else{let s=this;return kn(function(...c){let u=s._def.args.safeParse(c,o);if(!u.success)throw new ci([n(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(l,o);if(!d.success)throw new ci([i(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:No.create(e).rest(ha.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||No.create([]).rest(ha.create()),returns:r||ha.create(),typeName:Re.ZodFunction,...We(n)})}},lu=class extends tt{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};lu.create=(t,e)=>new lu({getter:t,typeName:Re.ZodLazy,...We(e)});du=class extends tt{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return ue(r,{received:r.data,code:X.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:e.data}}get value(){return this._def.value}};du.create=(t,e)=>new du({value:t,typeName:Re.ZodLiteral,...We(e)});pu=class t extends tt{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return ue(r,{expected:St.joinValues(n),received:r.parsedType,code:X.invalid_type}),Ce}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return ue(r,{received:r.data,code:X.invalid_enum_value,options:n}),Ce}return kn(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};pu.create=D6;fu=class extends tt{_parse(e){let r=St.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==ve.string&&n.parsedType!==ve.number){let i=St.objectValues(r);return ue(n,{expected:St.joinValues(i),received:n.parsedType,code:X.invalid_type}),Ce}if(this._cache||(this._cache=new Set(St.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=St.objectValues(r);return ue(n,{received:n.data,code:X.invalid_enum_value,options:i}),Ce}return kn(e.data)}get enum(){return this._def.values}};fu.create=(t,e)=>new fu({values:t,typeName:Re.ZodNativeEnum,...We(e)});gs=class extends tt{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ve.promise&&r.common.async===!1)return ue(r,{code:X.invalid_type,expected:ve.promise,received:r.parsedType}),Ce;let n=r.parsedType===ve.promise?r.data:Promise.resolve(r.data);return kn(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};gs.create=(t,e)=>new gs({type:t,typeName:Re.ZodPromise,...We(e)});Ri=class extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Re.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{ue(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return Ce;let c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?Ce:c.status==="dirty"||r.value==="dirty"?hp(c.value):c});{if(r.value==="aborted")return Ce;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?Ce:s.status==="dirty"||r.value==="dirty"?hp(s.value):s}}if(i.type==="refinement"){let a=s=>{let c=i.refinement(s,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Ce:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?Ce:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!iu(a))return Ce;let s=i.transform(a.value,o);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>iu(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):Ce);St.assertNever(i)}};Ri.create=(t,e,r)=>new Ri({schema:t,typeName:Re.ZodEffects,effect:e,...We(r)});Ri.createWithPreprocess=(t,e,r)=>new Ri({schema:e,effect:{type:"preprocess",transform:t},typeName:Re.ZodEffects,...We(r)});Ni=class extends tt{_parse(e){return this._getType(e)===ve.undefined?kn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ni.create=(t,e)=>new Ni({innerType:t,typeName:Re.ZodOptional,...We(e)});Co=class extends tt{_parse(e){return this._getType(e)===ve.null?kn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Co.create=(t,e)=>new Co({innerType:t,typeName:Re.ZodNullable,...We(e)});mu=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===ve.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};mu.create=(t,e)=>new mu({innerType:t,typeName:Re.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...We(e)});hu=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return kv(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ci(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ci(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};hu.create=(t,e)=>new hu({innerType:t,typeName:Re.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...We(e)});Np=class extends tt{_parse(e){if(this._getType(e)!==ve.nan){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:ve.nan,received:r.parsedType}),Ce}return{status:"valid",value:e.data}}};Np.create=t=>new Np({typeName:Re.ZodNaN,...We(t)});Sv=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},$v=class t extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ce:i.status==="dirty"?(r.dirty(),hp(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Ce:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:Re.ZodPipeline})}},gu=class extends tt{_parse(e){let r=this._def.innerType._parse(e),n=i=>(iu(i)&&(i.value=Object.freeze(i.value)),i);return kv(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};gu.create=(t,e)=>new gu({innerType:t,typeName:Re.ZodReadonly,...We(e)});JUe={object:Gn.lazycreate};(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Re||(Re={}));XUe=ou.create,e4e=Sp.create,t4e=Np.create,r4e=$p.create,n4e=Ip.create,i4e=Ep.create,o4e=Pp.create,a4e=au.create,s4e=su.create,c4e=Tp.create,u4e=ha.create,l4e=no.create,d4e=zp.create,p4e=va.create,f4e=Gn.create,m4e=Gn.strictCreate,h4e=cu.create,g4e=HI.create,v4e=uu.create,y4e=No.create,_4e=QI.create,b4e=Op.create,x4e=jp.create,w4e=YI.create,k4e=lu.create,S4e=du.create,$4e=pu.create,I4e=fu.create,E4e=gs.create,P4e=Ri.create,T4e=Ni.create,z4e=Co.create,O4e=Ri.createWithPreprocess,j4e=$v.create,M6={};_s(M6,{version:()=>Qq,util:()=>ft,treeifyError:()=>Y6,toJSONSchema:()=>FL,toDotPath:()=>J6,safeParseAsync:()=>$E,safeParse:()=>kE,registry:()=>qE,regexes:()=>IE,prettifyError:()=>X6,parseAsync:()=>Tv,parse:()=>Pv,locales:()=>ME,isValidJWT:()=>bZ,isValidBase64URL:()=>vZ,isValidBase64:()=>zE,globalRegistry:()=>ds,globalConfig:()=>Iv,function:()=>LL,formatError:()=>_E,flattenError:()=>yE,config:()=>dn,clone:()=>Di,_xid:()=>JE,_void:()=>EL,_uuidv7:()=>WE,_uuidv6:()=>VE,_uuidv4:()=>FE,_uuid:()=>LE,_url:()=>BE,_uppercase:()=>dP,_unknown:()=>Nv,_union:()=>cce,_undefined:()=>kL,_ulid:()=>YE,_uint64:()=>xL,_uint32:()=>hL,_tuple:()=>AL,_trim:()=>vP,_transform:()=>vce,_toUpperCase:()=>_P,_toLowerCase:()=>yP,_templateLiteral:()=>Ice,_symbol:()=>wL,_success:()=>wce,_stringbool:()=>qL,_stringFormat:()=>ZL,_string:()=>rL,_startsWith:()=>fP,_size:()=>cP,_set:()=>fce,_safeParseAsync:()=>SE,_safeParse:()=>wE,_regex:()=>uP,_refine:()=>ML,_record:()=>dce,_readonly:()=>$ce,_property:()=>RL,_promise:()=>Pce,_positive:()=>OL,_pipe:()=>Sce,_parseAsync:()=>xE,_parse:()=>bE,_overwrite:()=>ws,_optional:()=>yce,_number:()=>uL,_nullable:()=>_ce,_null:()=>SL,_normalize:()=>gP,_nonpositive:()=>NL,_nonoptional:()=>xce,_nonnegative:()=>CL,_never:()=>IL,_negative:()=>jL,_nativeEnum:()=>hce,_nanoid:()=>HE,_nan:()=>zL,_multipleOf:()=>Up,_minSize:()=>Dp,_minLength:()=>yu,_min:()=>Bn,_mime:()=>hP,_maxSize:()=>Qv,_maxLength:()=>Yv,_max:()=>Ci,_map:()=>pce,_lte:()=>Ci,_lt:()=>vs,_lowercase:()=>lP,_literal:()=>gce,_length:()=>Jv,_lazy:()=>Ece,_ksuid:()=>XE,_jwt:()=>sP,_isoTime:()=>sL,_isoDuration:()=>cL,_isoDateTime:()=>oL,_isoDate:()=>aL,_ipv6:()=>tP,_ipv4:()=>eP,_intersection:()=>lce,_int64:()=>bL,_int32:()=>mL,_int:()=>dL,_includes:()=>pP,_guid:()=>jv,_gte:()=>Bn,_gt:()=>ys,_float64:()=>fL,_float32:()=>pL,_file:()=>UL,_enum:()=>mce,_endsWith:()=>mP,_emoji:()=>KE,_email:()=>ZE,_e164:()=>aP,_discriminatedUnion:()=>uce,_default:()=>bce,_date:()=>PL,_custom:()=>DL,_cuid2:()=>QE,_cuid:()=>GE,_coercedString:()=>nL,_coercedNumber:()=>lL,_coercedDate:()=>TL,_coercedBoolean:()=>vL,_coercedBigint:()=>_L,_cidrv6:()=>nP,_cidrv4:()=>rP,_catch:()=>kce,_boolean:()=>gL,_bigint:()=>yL,_base64url:()=>oP,_base64:()=>iP,_array:()=>bP,_any:()=>$L,TimePrecision:()=>iL,NEVER:()=>q6,JSONSchemaGenerator:()=>Mp,JSONSchema:()=>Tce,Doc:()=>zv,$output:()=>eL,$input:()=>tL,$constructor:()=>U,$brand:()=>Z6,$ZodXID:()=>aZ,$ZodVoid:()=>zZ,$ZodUnknown:()=>Ov,$ZodUnion:()=>AE,$ZodUndefined:()=>IZ,$ZodUUID:()=>Jq,$ZodURL:()=>eZ,$ZodULID:()=>oZ,$ZodType:()=>Fe,$ZodTuple:()=>Gv,$ZodTransform:()=>UE,$ZodTemplateLiteral:()=>GZ,$ZodSymbol:()=>$Z,$ZodSuccess:()=>WZ,$ZodStringFormat:()=>Kt,$ZodString:()=>Fp,$ZodSet:()=>AZ,$ZodRegistry:()=>Ap,$ZodRecord:()=>CZ,$ZodRealError:()=>Zp,$ZodReadonly:()=>HZ,$ZodPromise:()=>QZ,$ZodPrefault:()=>FZ,$ZodPipe:()=>DE,$ZodOptional:()=>qZ,$ZodObject:()=>RE,$ZodNumberFormat:()=>kZ,$ZodNumber:()=>OE,$ZodNullable:()=>ZZ,$ZodNull:()=>EZ,$ZodNonOptional:()=>VZ,$ZodNever:()=>TZ,$ZodNanoID:()=>rZ,$ZodNaN:()=>KZ,$ZodMap:()=>RZ,$ZodLiteral:()=>DZ,$ZodLazy:()=>YZ,$ZodKSUID:()=>sZ,$ZodJWT:()=>xZ,$ZodIntersection:()=>NZ,$ZodISOTime:()=>lZ,$ZodISODuration:()=>dZ,$ZodISODateTime:()=>cZ,$ZodISODate:()=>uZ,$ZodIPv6:()=>fZ,$ZodIPv4:()=>pZ,$ZodGUID:()=>Yq,$ZodFunction:()=>Cv,$ZodFile:()=>MZ,$ZodError:()=>vE,$ZodEnum:()=>UZ,$ZodEmoji:()=>tZ,$ZodEmail:()=>Xq,$ZodE164:()=>_Z,$ZodDiscriminatedUnion:()=>jZ,$ZodDefault:()=>LZ,$ZodDate:()=>OZ,$ZodCustomStringFormat:()=>wZ,$ZodCustom:()=>JZ,$ZodCheckUpperCase:()=>Fq,$ZodCheckStringFormat:()=>Lp,$ZodCheckStartsWith:()=>Wq,$ZodCheckSizeEquals:()=>Uq,$ZodCheckRegex:()=>Zq,$ZodCheckProperty:()=>Kq,$ZodCheckOverwrite:()=>Gq,$ZodCheckNumberFormat:()=>Nq,$ZodCheckMultipleOf:()=>jq,$ZodCheckMinSize:()=>Aq,$ZodCheckMinLength:()=>Mq,$ZodCheckMimeType:()=>Hq,$ZodCheckMaxSize:()=>Rq,$ZodCheckMaxLength:()=>Dq,$ZodCheckLowerCase:()=>Lq,$ZodCheckLessThan:()=>PE,$ZodCheckLengthEquals:()=>qq,$ZodCheckIncludes:()=>Vq,$ZodCheckGreaterThan:()=>TE,$ZodCheckEndsWith:()=>Bq,$ZodCheckBigIntFormat:()=>Cq,$ZodCheck:()=>dr,$ZodCatch:()=>BZ,$ZodCUID2:()=>iZ,$ZodCUID:()=>nZ,$ZodCIDRv6:()=>hZ,$ZodCIDRv4:()=>mZ,$ZodBoolean:()=>jE,$ZodBigIntFormat:()=>SZ,$ZodBigInt:()=>NE,$ZodBase64URL:()=>yZ,$ZodBase64:()=>gZ,$ZodAsyncError:()=>ya,$ZodArray:()=>CE,$ZodAny:()=>PZ});q6=Object.freeze({status:"aborted"});Z6=Symbol("zod_brand"),ya=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Iv={};ft={};_s(ft,{unwrapMessage:()=>gp,stringifyPrimitive:()=>Ge,required:()=>Sae,randomString:()=>hae,propertyKeyTypes:()=>Ev,promiseAllObject:()=>mae,primitiveTypes:()=>W6,prefixIssues:()=>si,pick:()=>_ae,partial:()=>kae,optionalKeys:()=>B6,omit:()=>bae,numKeys:()=>gae,nullish:()=>bs,normalizeParams:()=>re,merge:()=>wae,jsonStringifyReplacer:()=>L6,joinValues:()=>oe,issue:()=>G6,isPlainObject:()=>Rp,isObject:()=>Cp,getSizableOrigin:()=>Kv,getParsedType:()=>vae,getLengthableOrigin:()=>Hv,getEnumValues:()=>mE,getElementAtPath:()=>fae,floatSafeRemainder:()=>F6,finalizeIssue:()=>Ai,extend:()=>xae,escapeRegex:()=>xs,esc:()=>Yc,defineLazy:()=>Ot,createTransparentProxy:()=>yae,clone:()=>Di,cleanRegex:()=>Bv,cleanEnum:()=>$ae,captureStackTrace:()=>gE,cached:()=>Wv,assignProp:()=>hE,assertNotEqual:()=>uae,assertNever:()=>dae,assertIs:()=>lae,assertEqual:()=>cae,assert:()=>pae,allowsEval:()=>V6,aborted:()=>tu,NUMBER_FORMAT_RANGES:()=>K6,Class:()=>JI,BIGINT_FORMAT_RANGES:()=>H6});gE=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};V6=Wv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});vae=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw Error(`Unknown data type: ${e}`)}},Ev=new Set(["string","number","symbol"]),W6=new Set(["string","number","bigint","boolean","symbol","undefined"]);K6={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},H6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};JI=class{constructor(...e){}},Q6=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,L6,2)},enumerable:!0})},vE=U("$ZodError",Q6),Zp=U("$ZodError",Q6,{Parent:Error});bE=t=>(e,r,n,i)=>{let o=n?Object.assign(n,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new ya;if(a.issues.length){let s=new(i?.Err??t)(a.issues.map(c=>Ai(c,o,dn())));throw gE(s,i?.callee),s}return a.value},Pv=bE(Zp),xE=t=>async(e,r,n,i)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(i?.Err??t)(a.issues.map(c=>Ai(c,o,dn())));throw gE(s,i?.callee),s}return a.value},Tv=xE(Zp),wE=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new ya;return o.issues.length?{success:!1,error:new(t??vE)(o.issues.map(a=>Ai(a,i,dn())))}:{success:!0,data:o.value}},kE=wE(Zp),SE=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(a=>Ai(a,i,dn())))}:{success:!0,data:o.value}},$E=SE(Zp),IE={};_s(IE,{xid:()=>nq,uuid7:()=>Tae,uuid6:()=>Pae,uuid4:()=>Eae,uuid:()=>vu,uppercase:()=>zq,unicodeEmail:()=>jae,undefined:()=>Pq,ulid:()=>rq,time:()=>bq,string:()=>wq,rfc5322Email:()=>Oae,number:()=>$q,null:()=>Eq,nanoid:()=>oq,lowercase:()=>Tq,ksuid:()=>iq,ipv6:()=>dq,ipv4:()=>lq,integer:()=>Sq,html5Email:()=>zae,hostname:()=>hq,guid:()=>sq,extendedDuration:()=>Iae,emoji:()=>uq,email:()=>cq,e164:()=>gq,duration:()=>aq,domain:()=>Rae,datetime:()=>xq,date:()=>yq,cuid2:()=>tq,cuid:()=>eq,cidrv6:()=>fq,cidrv4:()=>pq,browserEmail:()=>Nae,boolean:()=>Iq,bigint:()=>kq,base64url:()=>EE,base64:()=>mq,_emoji:()=>Cae});eq=/^[cC][^\s-]{8,}$/,tq=/^[0-9a-z]+$/,rq=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,nq=/^[0-9a-vA-V]{20}$/,iq=/^[A-Za-z0-9]{27}$/,oq=/^[a-zA-Z0-9_-]{21}$/,aq=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Iae=/^[-+]?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)?)??$/,sq=/^([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})$/,vu=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Eae=vu(4),Pae=vu(6),Tae=vu(7),cq=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,zae=/^[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])?)*$/,Oae=/^(([^<>()\[\]\\.,;:\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,}))$/,jae=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Nae=/^[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])?)*$/,Cae="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";lq=/^(?:(?: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])$/,dq=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,pq=/^((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])$/,fq=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mq=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,EE=/^[A-Za-z0-9_-]*$/,hq=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Rae=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,gq=/^\+(?:[0-9]){6,14}[0-9]$/,vq="(?:(?:\\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])))",yq=new RegExp(`^${vq}$`);wq=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},kq=/^\d+n?$/,Sq=/^\d+$/,$q=/^-?\d+(?:\.\d+)?/i,Iq=/true|false/i,Eq=/null/i,Pq=/undefined/i,Tq=/^[^A-Z]*$/,zq=/^[^a-z]*$/,dr=U("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),Oq={number:"number",bigint:"bigint",object:"date"},PE=U("$ZodCheckLessThan",(t,e)=>{dr.init(t,e);let r=Oq[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),TE=U("$ZodCheckGreaterThan",(t,e)=>{dr.init(t,e);let r=Oq[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),jq=U("$ZodCheckMultipleOf",(t,e)=>{dr.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):F6(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),Nq=U("$ZodCheckNumberFormat",(t,e)=>{dr.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,o]=K6[e.format];t._zod.onattach.push(a=>{let s=a._zod.bag;s.format=e.format,s.minimum=i,s.maximum=o,r&&(s.pattern=Sq)}),t._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:e.format,code:"invalid_type",input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,continue:!e.abort});return}}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inst:t})}}),Cq=U("$ZodCheckBigIntFormat",(t,e)=>{dr.init(t,e);let[r,n]=H6[e.format];t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,o.minimum=r,o.maximum=n}),t._zod.check=i=>{let o=i.value;o<r&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>n&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inst:t})}}),Rq=U("$ZodCheckMaxSize",(t,e)=>{dr.init(t,e),t._zod.when=r=>{let n=r.value;return!bs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let n=r.value;n.size<=e.maximum||r.issues.push({origin:Kv(n),code:"too_big",maximum:e.maximum,input:n,inst:t,continue:!e.abort})}}),Aq=U("$ZodCheckMinSize",(t,e)=>{dr.init(t,e),t._zod.when=r=>{let n=r.value;return!bs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let n=r.value;n.size>=e.minimum||r.issues.push({origin:Kv(n),code:"too_small",minimum:e.minimum,input:n,inst:t,continue:!e.abort})}}),Uq=U("$ZodCheckSizeEquals",(t,e)=>{dr.init(t,e),t._zod.when=r=>{let n=r.value;return!bs(n)&&n.size!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=r=>{let n=r.value,i=n.size;if(i===e.size)return;let o=i>e.size;r.issues.push({origin:Kv(n),...o?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),Dq=U("$ZodCheckMaxLength",(t,e)=>{dr.init(t,e),t._zod.when=r=>{let n=r.value;return!bs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let n=r.value;if(n.length<=e.maximum)return;let i=Hv(n);r.issues.push({origin:i,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Mq=U("$ZodCheckMinLength",(t,e)=>{dr.init(t,e),t._zod.when=r=>{let n=r.value;return!bs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let n=r.value;if(n.length>=e.minimum)return;let i=Hv(n);r.issues.push({origin:i,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),qq=U("$ZodCheckLengthEquals",(t,e)=>{dr.init(t,e),t._zod.when=r=>{let n=r.value;return!bs(n)&&n.length!==void 0},t._zod.onattach.push(r=>{let n=r._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=r=>{let n=r.value,i=n.length;if(i===e.length)return;let o=Hv(n),a=i>e.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),Lp=U("$ZodCheckStringFormat",(t,e)=>{var r,n;dr.init(t,e),t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),Zq=U("$ZodCheckRegex",(t,e)=>{Lp.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Lq=U("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Tq),Lp.init(t,e)}),Fq=U("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=zq),Lp.init(t,e)}),Vq=U("$ZodCheckIncludes",(t,e)=>{dr.init(t,e);let r=xs(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Wq=U("$ZodCheckStartsWith",(t,e)=>{dr.init(t,e);let r=new RegExp(`^${xs(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),Bq=U("$ZodCheckEndsWith",(t,e)=>{dr.init(t,e);let r=new RegExp(`.*${xs(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});Kq=U("$ZodCheckProperty",(t,e)=>{dr.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>I2(i,r,e.property));I2(n,r,e.property)}}),Hq=U("$ZodCheckMimeType",(t,e)=>{dr.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t})}}),Gq=U("$ZodCheckOverwrite",(t,e)=>{dr.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),zv=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
192
|
+
`).filter(o=>o),n=Math.min(...r.map(o=>o.length-o.trimStart().length)),i=r.map(o=>o.slice(n)).map(o=>" ".repeat(this.indent*2)+o);for(let o of i)this.content.push(o)}compile(){let e=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...r,n.join(`
|
|
193
|
+
`))}},Qq={major:4,minor:0,patch:0},Fe=U("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Qq;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let o of i._zod.onattach)o(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(o,a,s)=>{let c=tu(o),u;for(let l of a){if(l._zod.when){if(!l._zod.when(o))continue}else if(c)continue;let d=o.issues.length,p=l._zod.check(o);if(p instanceof Promise&&s?.async===!1)throw new ya;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,o.issues.length!==d&&(c||(c=tu(o,d)))});else{if(o.issues.length===d)continue;c||(c=tu(o,d))}}return u?u.then(()=>o):o};t._zod.run=(o,a)=>{let s=t._zod.parse(o,a);if(s instanceof Promise){if(a.async===!1)throw new ya;return s.then(c=>i(c,n,a))}return i(s,n,a)}}t["~standard"]={validate:i=>{try{let o=kE(t,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return $E(t,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),Fp=U("$ZodString",(t,e)=>{Fe.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??wq(t._zod.bag),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),Kt=U("$ZodStringFormat",(t,e)=>{Lp.init(t,e),Fp.init(t,e)}),Yq=U("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=sq),Kt.init(t,e)}),Jq=U("$ZodUUID",(t,e)=>{if(e.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=vu(r))}else e.pattern??(e.pattern=vu());Kt.init(t,e)}),Xq=U("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=cq),Kt.init(t,e)}),eZ=U("$ZodURL",(t,e)=>{Kt.init(t,e),t._zod.check=r=>{try{let n=r.value,i=new URL(n),o=i.href;e.hostname&&(e.hostname.lastIndex=0,!e.hostname.test(i.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:hq.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,!e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),!n.endsWith("/")&&o.endsWith("/")?r.value=o.slice(0,-1):r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),tZ=U("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=uq()),Kt.init(t,e)}),rZ=U("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=oq),Kt.init(t,e)}),nZ=U("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=eq),Kt.init(t,e)}),iZ=U("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=tq),Kt.init(t,e)}),oZ=U("$ZodULID",(t,e)=>{e.pattern??(e.pattern=rq),Kt.init(t,e)}),aZ=U("$ZodXID",(t,e)=>{e.pattern??(e.pattern=nq),Kt.init(t,e)}),sZ=U("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=iq),Kt.init(t,e)}),cZ=U("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=xq(e)),Kt.init(t,e)}),uZ=U("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=yq),Kt.init(t,e)}),lZ=U("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=bq(e)),Kt.init(t,e)}),dZ=U("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=aq),Kt.init(t,e)}),pZ=U("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=lq),Kt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),fZ=U("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=dq),Kt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),mZ=U("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=pq),Kt.init(t,e)}),hZ=U("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=fq),Kt.init(t,e),t._zod.check=r=>{let[n,i]=r.value.split("/");try{if(!i)throw Error();let o=Number(i);if(`${o}`!==i||o<0||o>128)throw Error();new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});gZ=U("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=mq),Kt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{zE(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});yZ=U("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=EE),Kt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{vZ(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),_Z=U("$ZodE164",(t,e)=>{e.pattern??(e.pattern=gq),Kt.init(t,e)});xZ=U("$ZodJWT",(t,e)=>{Kt.init(t,e),t._zod.check=r=>{bZ(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),wZ=U("$ZodCustomStringFormat",(t,e)=>{Kt.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),OE=U("$ZodNumber",(t,e)=>{Fe.init(t,e),t._zod.pattern=t._zod.bag.pattern??$q,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),r}}),kZ=U("$ZodNumber",(t,e)=>{Nq.init(t,e),OE.init(t,e)}),jE=U("$ZodBoolean",(t,e)=>{Fe.init(t,e),t._zod.pattern=Iq,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),NE=U("$ZodBigInt",(t,e)=>{Fe.init(t,e),t._zod.pattern=kq,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),SZ=U("$ZodBigInt",(t,e)=>{Cq.init(t,e),NE.init(t,e)}),$Z=U("$ZodSymbol",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),IZ=U("$ZodUndefined",(t,e)=>{Fe.init(t,e),t._zod.pattern=Pq,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),EZ=U("$ZodNull",(t,e)=>{Fe.init(t,e),t._zod.pattern=Eq,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),PZ=U("$ZodAny",(t,e)=>{Fe.init(t,e),t._zod.parse=r=>r}),Ov=U("$ZodUnknown",(t,e)=>{Fe.init(t,e),t._zod.parse=r=>r}),TZ=U("$ZodNever",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),zZ=U("$ZodVoid",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),OZ=U("$ZodDate",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),r}});CE=U("$ZodArray",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let o=[];for(let a=0;a<i.length;a++){let s=i[a],c=e.element._zod.run({value:s,issues:[]},n);c instanceof Promise?o.push(c.then(u=>E2(u,r,a))):E2(c,r,a)}return o.length?Promise.all(o).then(()=>r):r}});RE=U("$ZodObject",(t,e)=>{Fe.init(t,e);let r=Wv(()=>{let l=Object.keys(e.shape);for(let p of l)if(!(e.shape[p]instanceof Fe))throw Error(`Invalid element at key "${p}": expected a Zod schema`);let d=B6(e.shape);return{shape:e.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});Ot(t._zod,"propValues",()=>{let l=e.shape,d={};for(let p in l){let f=l[p]._zod;if(f.values){d[p]??(d[p]=new Set);for(let m of f.values)d[p].add(m)}}return d});let n=l=>{let d=new zv(["shape","payload","ctx"]),p=r.value,f=h=>{let _=Yc(h);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),v=0;for(let h of p.keys)m[h]=`key_${v++}`;d.write("const newResult = {}");for(let h of p.keys)if(p.optionalKeys.has(h)){let _=m[h];d.write(`const ${_} = ${f(h)};`);let y=Yc(h);d.write(`
|
|
194
|
+
if (${_}.issues.length) {
|
|
195
|
+
if (input[${y}] === undefined) {
|
|
196
|
+
if (${y} in input) {
|
|
197
|
+
newResult[${y}] = undefined;
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
payload.issues = payload.issues.concat(
|
|
201
|
+
${_}.issues.map((iss) => ({
|
|
202
|
+
...iss,
|
|
203
|
+
path: iss.path ? [${y}, ...iss.path] : [${y}],
|
|
204
|
+
}))
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
} else if (${_}.value === undefined) {
|
|
208
|
+
if (${y} in input) newResult[${y}] = undefined;
|
|
209
|
+
} else {
|
|
210
|
+
newResult[${y}] = ${_}.value;
|
|
211
|
+
}
|
|
212
|
+
`)}else{let _=m[h];d.write(`const ${_} = ${f(h)};`),d.write(`
|
|
213
|
+
if (${_}.issues.length) payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
|
|
214
|
+
...iss,
|
|
215
|
+
path: iss.path ? [${Yc(h)}, ...iss.path] : [${Yc(h)}]
|
|
216
|
+
})));`),d.write(`newResult[${Yc(h)}] = ${_}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let g=d.compile();return(h,_)=>g(l,h,_)},i,o=Cp,a=!Iv.jitless,s=a&&V6.value,c=e.catchall,u;t._zod.parse=(l,d)=>{u??(u=r.value);let p=l.value;if(!o(p))return l.issues.push({expected:"object",code:"invalid_type",input:p,inst:t}),l;let f=[];if(a&&s&&d?.async===!1&&d.jitless!==!0)i||(i=n(e.shape)),l=i(l,d);else{l.value={};let _=u.shape;for(let y of u.keys){let b=_[y],x=b._zod.run({value:p[y],issues:[]},d),w=b._zod.optin==="optional"&&b._zod.optout==="optional";x instanceof Promise?f.push(x.then(k=>w?P2(k,l,y,p):Lg(k,l,y))):w?P2(x,l,y,p):Lg(x,l,y)}}if(!c)return f.length?Promise.all(f).then(()=>l):l;let m=[],v=u.keySet,g=c._zod,h=g.def.type;for(let _ of Object.keys(p)){if(v.has(_))continue;if(h==="never"){m.push(_);continue}let y=g.run({value:p[_],issues:[]},d);y instanceof Promise?f.push(y.then(b=>Lg(b,l,_))):Lg(y,l,_)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:p,inst:t}),f.length?Promise.all(f).then(()=>l):l}});AE=U("$ZodUnion",(t,e)=>{Fe.init(t,e),Ot(t._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Ot(t._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Ot(t._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),Ot(t._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){let r=e.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>Bv(n.source)).join("|")})$`)}}),t._zod.parse=(r,n)=>{let i=!1,o=[];for(let a of e.options){let s=a._zod.run({value:r.value,issues:[]},n);if(s instanceof Promise)o.push(s),i=!0;else{if(s.issues.length===0)return s;o.push(s)}}return i?Promise.all(o).then(a=>T2(a,r,t,n)):T2(o,r,t,n)}}),jZ=U("$ZodDiscriminatedUnion",(t,e)=>{AE.init(t,e);let r=t._zod.parse;Ot(t._zod,"propValues",()=>{let i={};for(let o of e.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[s,c]of Object.entries(a)){i[s]||(i[s]=new Set);for(let u of c)i[s].add(u)}}return i});let n=Wv(()=>{let i=e.options,o=new Map;for(let a of i){let s=a._zod.propValues[e.discriminator];if(!s||s.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let c of s){if(o.has(c))throw Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});t._zod.parse=(i,o)=>{let a=i.value;if(!Cp(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),i;let s=n.value.get(a?.[e.discriminator]);return s?s._zod.run(i,o):e.unionFallback?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[e.discriminator],inst:t}),i)}}),NZ=U("$ZodIntersection",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,o=e.left._zod.run({value:i,issues:[]},n),a=e.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([s,c])=>z2(r,s,c)):z2(r,o,a)}});Gv=U("$ZodTuple",(t,e)=>{Fe.init(t,e);let r=e.items,n=r.length-[...r].reverse().findIndex(i=>i._zod.optin!=="optional");t._zod.parse=(i,o)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[];if(!e.rest){let u=a.length>r.length,l=a.length<n-1;if(u||l)return i.issues.push({input:a,inst:t,origin:"array",...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length}}),i}let c=-1;for(let u of r){if(c++,c>=a.length&&c>=n)continue;let l=u._zod.run({value:a[c],issues:[]},o);l instanceof Promise?s.push(l.then(d=>Fg(d,i,c))):Fg(l,i,c)}if(e.rest){let u=a.slice(r.length);for(let l of u){c++;let d=e.rest._zod.run({value:l,issues:[]},o);d instanceof Promise?s.push(d.then(p=>Fg(p,i,c))):Fg(d,i,c)}}return s.length?Promise.all(s).then(()=>i):i}});CZ=U("$ZodRecord",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Rp(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let o=[];if(e.keyType._zod.values){let a=e.keyType._zod.values;r.value={};for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=e.valueType._zod.run({value:i[c],issues:[]},n);u instanceof Promise?o.push(u.then(l=>{l.issues.length&&r.issues.push(...si(c,l.issues)),r.value[c]=l.value})):(u.issues.length&&r.issues.push(...si(c,u.issues)),r.value[c]=u.value)}let s;for(let c in i)a.has(c)||(s=s??[],s.push(c));s&&s.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:s})}else{r.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let s=e.keyType._zod.run({value:a,issues:[]},n);if(s instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(s.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:s.issues.map(u=>Ai(u,n,dn())),input:a,path:[a],inst:t}),r.value[s.value]=s.value;continue}let c=e.valueType._zod.run({value:i[a],issues:[]},n);c instanceof Promise?o.push(c.then(u=>{u.issues.length&&r.issues.push(...si(a,u.issues)),r.value[s.value]=u.value})):(c.issues.length&&r.issues.push(...si(a,c.issues)),r.value[s.value]=c.value)}}return o.length?Promise.all(o).then(()=>r):r}}),RZ=U("$ZodMap",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let o=[];r.value=new Map;for(let[a,s]of i){let c=e.keyType._zod.run({value:a,issues:[]},n),u=e.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([l,d])=>{O2(l,d,r,a,i,t,n)})):O2(c,u,r,a,i,t,n)}return o.length?Promise.all(o).then(()=>r):r}});AZ=U("$ZodSet",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let a of i){let s=e.valueType._zod.run({value:a,issues:[]},n);s instanceof Promise?o.push(s.then(c=>j2(c,r))):j2(s,r)}return o.length?Promise.all(o).then(()=>r):r}});UZ=U("$ZodEnum",(t,e)=>{Fe.init(t,e);let r=mE(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(n=>Ev.has(typeof n)).map(n=>typeof n=="string"?xs(n):n.toString()).join("|")})$`),t._zod.parse=(n,i)=>{let o=n.value;return t._zod.values.has(o)||n.issues.push({code:"invalid_value",values:r,input:o,inst:t}),n}}),DZ=U("$ZodLiteral",(t,e)=>{Fe.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?xs(r):r?r.toString():String(r)).join("|")})$`),t._zod.parse=(r,n)=>{let i=r.value;return t._zod.values.has(i)||r.issues.push({code:"invalid_value",values:e.values,input:i,inst:t}),r}}),MZ=U("$ZodFile",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}}),UE=U("$ZodTransform",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(r.value=o,r));if(i instanceof Promise)throw new ya;return r.value=i,r}}),qZ=U("$ZodOptional",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Ot(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Ot(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Bv(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(r,n):r.value===void 0?r:e.innerType._zod.run(r,n)}),ZZ=U("$ZodNullable",(t,e)=>{Fe.init(t,e),Ot(t._zod,"optin",()=>e.innerType._zod.optin),Ot(t._zod,"optout",()=>e.innerType._zod.optout),Ot(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${Bv(r.source)}|null)$`):void 0}),Ot(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),LZ=U("$ZodDefault",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",Ot(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>N2(o,e)):N2(i,e)}});FZ=U("$ZodPrefault",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",Ot(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),VZ=U("$ZodNonOptional",(t,e)=>{Fe.init(t,e),Ot(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>C2(o,t)):C2(i,t)}});WZ=U("$ZodSuccess",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),BZ=U("$ZodCatch",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",Ot(t._zod,"optout",()=>e.innerType._zod.optout),Ot(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(a=>Ai(a,n,dn()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(o=>Ai(o,n,dn()))},input:r.value}),r.issues=[]),r)}}),KZ=U("$ZodNaN",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),DE=U("$ZodPipe",(t,e)=>{Fe.init(t,e),Ot(t._zod,"values",()=>e.in._zod.values),Ot(t._zod,"optin",()=>e.in._zod.optin),Ot(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(r,n)=>{let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(o=>R2(o,e,n)):R2(i,e,n)}});HZ=U("$ZodReadonly",(t,e)=>{Fe.init(t,e),Ot(t._zod,"propValues",()=>e.innerType._zod.propValues),Ot(t._zod,"values",()=>e.innerType._zod.values),Ot(t._zod,"optin",()=>e.innerType._zod.optin),Ot(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(A2):A2(i)}});GZ=U("$ZodTemplateLiteral",(t,e)=>{Fe.init(t,e);let r=[];for(let n of e.parts)if(n instanceof Fe){if(!n._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw Error(`Invalid template literal part: ${n._zod.traits}`);let o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,a))}else if(n===null||W6.has(typeof n))r.push(xs(`${n}`));else throw Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"template_literal",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:"template_literal",pattern:t._zod.pattern.source}),n)}),QZ=U("$ZodPromise",(t,e)=>{Fe.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),YZ=U("$ZodLazy",(t,e)=>{Fe.init(t,e),Ot(t._zod,"innerType",()=>e.getter()),Ot(t._zod,"pattern",()=>t._zod.innerType._zod.pattern),Ot(t._zod,"propValues",()=>t._zod.innerType._zod.propValues),Ot(t._zod,"optin",()=>t._zod.innerType._zod.optin),Ot(t._zod,"optout",()=>t._zod.innerType._zod.optout),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),JZ=U("$ZodCustom",(t,e)=>{dr.init(t,e),Fe.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(o=>U2(o,r,n,t));U2(i,r,n,t)}});ME={};_s(ME,{zhTW:()=>sce,zhCN:()=>oce,vi:()=>nce,ur:()=>tce,ua:()=>Xse,tr:()=>Yse,th:()=>Hse,ta:()=>Bse,sv:()=>Vse,sl:()=>Lse,ru:()=>qse,pt:()=>Dse,ps:()=>Cse,pl:()=>Ase,ota:()=>jse,no:()=>zse,nl:()=>Pse,ms:()=>Ise,mk:()=>Sse,ko:()=>wse,kh:()=>bse,ja:()=>yse,it:()=>gse,id:()=>mse,hu:()=>pse,he:()=>lse,frCA:()=>cse,fr:()=>ase,fi:()=>ise,fa:()=>rse,es:()=>ese,eo:()=>Jae,en:()=>XZ,de:()=>Kae,cs:()=>Wae,ca:()=>Fae,be:()=>Zae,az:()=>Mae,ar:()=>Uae});Aae=()=>{let t={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return i=>{switch(i.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Ge(i.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${i.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??i.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${oe(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};Dae=()=>{let t={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i.expected}, daxil olan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Ge(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};qae=()=>{let t={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0456\u045E";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return i=>{switch(i.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Ge(i.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);if(a){let s=Number(i.maximum),c=D2(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${i.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);if(a){let s=Number(i.minimum),c=D2(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${i.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};Lae=()=>{let t={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${i.expected}, s'ha rebut ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${Ge(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${oe(i.values," o ")}`;case"too_big":{let o=i.inclusive?"com a m\xE0xim":"menys de",a=e(i.origin);return a?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${o} ${i.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"com a m\xEDnim":"m\xE9s de",a=e(i.origin);return a?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${o} ${i.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}};Vae=()=>{let t={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(i))return"pole";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return i=>{switch(i.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i.expected}, obdr\u017Eeno ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Ge(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${oe(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};Bae=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"Zahl";case"object":{if(Array.isArray(i))return"Array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return i=>{switch(i.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${i.expected}, erhalten ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Ge(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}};Hae=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Gae=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(n){return t[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${Hae(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Ge(n.values[0])}`:`Invalid option: expected one of ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",o=e(n.origin);return o?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",o=e(n.origin);return o?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${o.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${oe(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};Qae=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Yae=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return n=>{switch(n.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${n.expected}, ricevi\u011Dis ${Qae(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${Ge(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",o=e(n.origin);return o?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",o=e(n.origin);return o?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${o.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${oe(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};Xae=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(i))return"arreglo";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype)return i.constructor.name}}return o},n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${i.expected}, recibido ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${Ge(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Demasiado grande: se esperaba que ${i.origin??"valor"} tuviera ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${i.origin??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Demasiado peque\xF1o: se esperaba que ${i.origin} tuviera ${o}${i.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${i.origin} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i.origin}`;default:return"Entrada inv\xE1lida"}}};tse=()=>{let t={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(i))return"\u0622\u0631\u0627\u06CC\u0647";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return i=>{switch(i.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(i.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Ge(i.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${oe(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??i.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${oe(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};nse=()=>{let t={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return i=>{switch(i.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${i.expected}, oli ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Ge(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${i.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${i.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${oe(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};ose=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nombre";case"object":{if(Array.isArray(i))return"tableau";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return i=>{switch(i.code){case"invalid_type":return`Entr\xE9e invalide : ${i.expected} attendu, ${r(i.input)} re\xE7u`;case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${Ge(i.values[0])} attendu`:`Option invalide : une valeur parmi ${oe(i.values,"|")} attendue`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Trop grand : ${i.origin??"valeur"} doit ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Trop petit : ${i.origin} doit ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${oe(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};sse=()=>{let t={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return i=>{switch(i.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${i.expected}, re\xE7u ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${Ge(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u2264":"<",a=e(i.origin);return a?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u2265":">",a=e(i.origin);return a?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${oe(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};use=()=>{let t={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return i=>{switch(i.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${i.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${Ge(i.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${i.maximum.toString()} ${a.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${i.minimum.toString()} ${a.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${o.prefix}"`:o.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${o.suffix}"`:o.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${o.includes}"`:o.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${o.pattern}`:`${n[o.format]??i.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${i.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${i.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${i.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};dse=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(i))return"t\xF6mb";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return i=>{switch(i.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i.expected}, a kapott \xE9rt\xE9k ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Ge(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${i.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${o}${i.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};fse=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak valid: diharapkan ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${Ge(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};hse=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"numero";case"object":{if(Array.isArray(i))return"vettore";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input non valido: atteso ${i.expected}, ricevuto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input non valido: atteso ${Ge(i.values[0])}`:`Opzione non valida: atteso uno tra ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};vse=()=>{let t={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(i))return"\u914D\u5217";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return i=>{switch(i.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(i.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Ge(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${oe(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=e(i.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=e(i.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${i.keys.length>1?"\u7FA4":""}: ${oe(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};_se=()=>{let t={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(i))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(i===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return i=>{switch(i.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Ge(i.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${oe(i.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};xse=()=>{let t={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return i=>{switch(i.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(i.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Ge(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${oe(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),c=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${o}${a}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${o}${a}`}case"too_small":{let o=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=e(i.origin),c=s?.unit??"\uC694\uC18C";return s?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${o}${a}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${oe(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};kse=()=>{let t={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(i))return"\u043D\u0438\u0437\u0430";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return i=>{switch(i.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${Ge(i.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};$se=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"nombor";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak sah: dijangka ${i.expected}, diterima ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${Ge(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Terlalu besar: dijangka ${i.origin??"nilai"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Terlalu kecil: dijangka ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${oe(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};Ese=()=>{let t={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"getal";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return i=>{switch(i.code){case"invalid_type":return`Ongeldige invoer: verwacht ${i.expected}, ontving ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${Ge(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Te lang: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Te kort: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};Tse=()=>{let t={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"tall";case"object":{if(Array.isArray(i))return"liste";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Ugyldig input: forventet ${i.expected}, fikk ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${Ge(i.values[0])}`:`Ugyldig valg: forventet en av ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};Ose=()=>{let t={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"numara";case"object":{if(Array.isArray(i))return"saf";if(i===null)return"gayb";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return i=>{switch(i.code){case"invalid_type":return`F\xE2sit giren: umulan ${i.expected}, al\u0131nan ${r(i.input)}`;case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${Ge(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=i;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};Nse=()=>{let t={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(i))return"\u0627\u0631\u06D0";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return i=>{switch(i.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(i.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Ge(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${oe(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};Rse=()=>{let t={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"liczba";case"object":{if(Array.isArray(i))return"tablica";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return i=>{switch(i.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i.expected}, otrzymano ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Ge(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};Use=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(i))return"array";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${i.expected}, recebido ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${Ge(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}};Mse=()=>{let t={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return i=>{switch(i.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Ge(i.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);if(a){let s=Number(i.maximum),c=M2(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);if(a){let s=Number(i.minimum),c=M2(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};Zse=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(i))return"tabela";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return i=>{switch(i.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${i.expected}, prejeto ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Ge(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};Fse=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"antal";case"object":{if(Array.isArray(i))return"lista";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return i=>{switch(i.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${i.expected}, fick ${r(i.input)}`;case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Ge(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${oe(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};Wse=()=>{let t={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(i))return"\u0B85\u0BA3\u0BBF";if(i===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Ge(i.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${oe(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};Kse=()=>{let t={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(i))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(i===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return i=>{switch(i.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Ge(i.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=e(i.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=e(i.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${i.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${oe(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};Gse=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},Qse=()=>{let t={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(n){return t[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return n=>{switch(n.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${n.expected}, al\u0131nan ${Gse(n.input)}`;case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Ge(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${oe(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",o=e(n.origin);return o?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${o.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",o=e(n.origin);return o?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${o.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${oe(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};Jse=()=>{let t={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(i))return"\u043C\u0430\u0441\u0438\u0432";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return i=>{switch(i.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Ge(i.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${oe(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};ece=()=>{let t={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(i))return"\u0622\u0631\u06D2";if(i===null)return"\u0646\u0644";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return i=>{switch(i.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(i.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Ge(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${oe(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${o}${i.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${o}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${i.keys.length>1?"\u0632":""}: ${oe(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};rce=()=>{let t={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(i))return"m\u1EA3ng";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return i=>{switch(i.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Ge(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??i.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${oe(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};ice=()=>{let t={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(i))return"\u6570\u7EC4";if(i===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return i=>{switch(i.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Ge(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${oe(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};ace=()=>{let t={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(i){return t[i]??null}let r=i=>{let o=typeof i;switch(o){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return o},n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return i=>{switch(i.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i.expected}\uFF0C\u4F46\u6536\u5230 ${r(i.input)}`;case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Ge(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${oe(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${oe(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};eL=Symbol("ZodOutput"),tL=Symbol("ZodInput"),Ap=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];if(this._map.set(e,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}remove(e){return this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};ds=qE();iL={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};Cv=class{constructor(e){this._def=e,this.def=e}implement(e){if(typeof e!="function")throw Error("implement() must be called with a function");let r=(...n)=>{let i=this._def.input?Pv(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(i))throw Error("Invalid arguments schema: not an array or tuple schema.");let o=e(...i);return this._def.output?Pv(this._def.output,o,void 0,{callee:r}):o};return r}implementAsync(e){if(typeof e!="function")throw Error("implement() must be called with a function");let r=async(...n)=>{let i=this._def.input?await Tv(this._def.input,n,void 0,{callee:r}):n;if(!Array.isArray(i))throw Error("Invalid arguments schema: not an array or tuple schema.");let o=await e(...i);return this._def.output?Tv(this._def.output,o,void 0,{callee:r}):o};return r}input(...e){let r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new Gv({type:"tuple",items:e[0],rest:e[1]}),output:this._def.output}):new r({type:"function",input:e[0],output:this._def.output})}output(e){return new this.constructor({type:"function",input:this._def.input,output:e})}};Mp=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??ds,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,r={path:[],schemaPath:[]}){var n;let i=e._zod.def,o={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(e);if(a)return a.count++,r.schemaPath.includes(e)&&(a.cycle=r.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path},d=e._zod.parent;if(d)s.ref=d,this.process(d,l),this.seen.get(d).isParent=!0;else{let p=s.schema;switch(i.type){case"string":{let f=p;f.type="string";let{minimum:m,maximum:v,format:g,patterns:h,contentEncoding:_}=e._zod.bag;if(typeof m=="number"&&(f.minLength=m),typeof v=="number"&&(f.maxLength=v),g&&(f.format=o[g]??g,f.format===""&&delete f.format),_&&(f.contentEncoding=_),h&&h.size>0){let y=[...h];y.length===1?f.pattern=y[0].source:y.length>1&&(s.schema.allOf=[...y.map(b=>({...this.target==="draft-7"?{type:"string"}:{},pattern:b.source}))])}break}case"number":{let f=p,{minimum:m,maximum:v,format:g,multipleOf:h,exclusiveMaximum:_,exclusiveMinimum:y}=e._zod.bag;typeof g=="string"&&g.includes("int")?f.type="integer":f.type="number",typeof y=="number"&&(f.exclusiveMinimum=y),typeof m=="number"&&(f.minimum=m,typeof y=="number"&&(y>=m?delete f.minimum:delete f.exclusiveMinimum)),typeof _=="number"&&(f.exclusiveMaximum=_),typeof v=="number"&&(f.maximum=v,typeof _=="number"&&(_<=v?delete f.maximum:delete f.exclusiveMaximum)),typeof h=="number"&&(f.multipleOf=h);break}case"boolean":{let f=p;f.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema");break}case"null":{p.type="null";break}case"any":break;case"unknown":break;case"undefined":case"never":{p.not={};break}case"void":{if(this.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema");break}case"date":{if(this.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema");break}case"array":{let f=p,{minimum:m,maximum:v}=e._zod.bag;typeof m=="number"&&(f.minItems=m),typeof v=="number"&&(f.maxItems=v),f.type="array",f.items=this.process(i.element,{...l,path:[...l.path,"items"]});break}case"object":{let f=p;f.type="object",f.properties={};let m=i.shape;for(let h in m)f.properties[h]=this.process(m[h],{...l,path:[...l.path,"properties",h]});let v=new Set(Object.keys(m)),g=new Set([...v].filter(h=>{let _=i.shape[h]._zod;return this.io==="input"?_.optin===void 0:_.optout===void 0}));g.size>0&&(f.required=Array.from(g)),i.catchall?._zod.def.type==="never"?f.additionalProperties=!1:i.catchall?i.catchall&&(f.additionalProperties=this.process(i.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(f.additionalProperties=!1);break}case"union":{let f=p;f.anyOf=i.options.map((m,v)=>this.process(m,{...l,path:[...l.path,"anyOf",v]}));break}case"intersection":{let f=p,m=this.process(i.left,{...l,path:[...l.path,"allOf",0]}),v=this.process(i.right,{...l,path:[...l.path,"allOf",1]}),g=_=>"allOf"in _&&Object.keys(_).length===1,h=[...g(m)?m.allOf:[m],...g(v)?v.allOf:[v]];f.allOf=h;break}case"tuple":{let f=p;f.type="array";let m=i.items.map((h,_)=>this.process(h,{...l,path:[...l.path,"prefixItems",_]}));if(this.target==="draft-2020-12"?f.prefixItems=m:f.items=m,i.rest){let h=this.process(i.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?f.items=h:f.additionalItems=h}i.rest&&(f.items=this.process(i.rest,{...l,path:[...l.path,"items"]}));let{minimum:v,maximum:g}=e._zod.bag;typeof v=="number"&&(f.minItems=v),typeof g=="number"&&(f.maxItems=g);break}case"record":{let f=p;f.type="object",f.propertyNames=this.process(i.keyType,{...l,path:[...l.path,"propertyNames"]}),f.additionalProperties=this.process(i.valueType,{...l,path:[...l.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema");break}case"enum":{let f=p,m=mE(i.entries);m.every(v=>typeof v=="number")&&(f.type="number"),m.every(v=>typeof v=="string")&&(f.type="string"),f.enum=m;break}case"literal":{let f=p,m=[];for(let v of i.values)if(v===void 0){if(this.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof v=="bigint"){if(this.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");m.push(Number(v))}else m.push(v);if(m.length!==0)if(m.length===1){let v=m[0];f.type=v===null?"null":typeof v,f.const=v}else m.every(v=>typeof v=="number")&&(f.type="number"),m.every(v=>typeof v=="string")&&(f.type="string"),m.every(v=>typeof v=="boolean")&&(f.type="string"),m.every(v=>v===null)&&(f.type="null"),f.enum=m;break}case"file":{let f=p,m={type:"string",format:"binary",contentEncoding:"binary"},{minimum:v,maximum:g,mime:h}=e._zod.bag;v!==void 0&&(m.minLength=v),g!==void 0&&(m.maxLength=g),h?h.length===1?(m.contentMediaType=h[0],Object.assign(f,m)):f.anyOf=h.map(_=>({...m,contentMediaType:_})):Object.assign(f,m);break}case"transform":{if(this.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let f=this.process(i.innerType,l);p.anyOf=[f,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,l),s.ref=i.innerType;break}case"success":{let f=p;f.type="boolean";break}case"default":{this.process(i.innerType,l),s.ref=i.innerType,p.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,l),s.ref=i.innerType,this.io==="input"&&(p._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,l),s.ref=i.innerType;let f;try{f=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}p.default=f;break}case"nan":{if(this.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let f=p,m=e._zod.pattern;if(!m)throw Error("Pattern not found in template literal");f.type="string",f.pattern=m.source;break}case"pipe":{let f=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(f,l),s.ref=f;break}case"readonly":{this.process(i.innerType,l),s.ref=i.innerType,p.readOnly=!0;break}case"promise":{this.process(i.innerType,l),s.ref=i.innerType;break}case"optional":{this.process(i.innerType,l),s.ref=i.innerType;break}case"lazy":{let f=e._zod.innerType;this.process(f,l),s.ref=f;break}case"custom":{if(this.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),this.io==="input"&&xr(e)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(e).schema}emit(e,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},i=this.seen.get(e);if(!i)throw Error("Unprocessed schema. This is a bug in Zod.");let o=l=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let m=n.external.registry.get(l[0])?.id;if(m)return{ref:n.external.uri(m)};let v=l[1].defId??l[1].schema.id??`schema${this.counter++}`;return l[1].defId=v,{defId:v,ref:`${n.external.uri("__shared")}#/${d}/${v}`}}if(l[1]===i)return{ref:"#"};let p=`#/${d}/`,f=l[1].schema.id??`__schema${this.counter++}`;return{defId:f,ref:p+f}},a=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:p,defId:f}=o(l);d.def={...d.schema},f&&(d.defId=f);let m=d.schema;for(let v in m)delete m[v];m.$ref=p};for(let l of this.seen.entries()){let d=l[1];if(e===l[0]){a(l);continue}if(n.external){let p=n.external.registry.get(l[0])?.id;if(e!==l[0]&&p){a(l);continue}}if(this.metadataRegistry.get(l[0])?.id){a(l);continue}if(d.cycle){if(n.cycles==="throw")throw Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
217
|
+
|
|
218
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);n.cycles==="ref"&&a(l);continue}if(d.count>1&&n.reused==="ref"){a(l);continue}}let s=(l,d)=>{let p=this.seen.get(l),f=p.def??p.schema,m={...f};if(p.ref===null)return;let v=p.ref;if(p.ref=null,v){s(v,d);let g=this.seen.get(v).schema;g.$ref&&d.target==="draft-7"?(f.allOf=f.allOf??[],f.allOf.push(g)):(Object.assign(f,g),Object.assign(f,m))}p.isParent||this.override({zodSchema:l,jsonSchema:f,path:p.path??[]})};for(let l of[...this.seen.entries()].reverse())s(l[0],{target:this.target});let c={};this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),Object.assign(c,i.def);let u=n.external?.defs??{};for(let l of this.seen.entries()){let d=l[1];d.def&&d.defId&&(u[d.defId]=d.def)}!n.external&&Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw Error("Error converting schema to JSON.")}}};Tce={},zce=U("ZodMiniType",(t,e)=>{if(!t._zod)throw Error("Uninitialized schema in ZodMiniType.");Fe.init(t,e),t.def=e,t.parse=(r,n)=>Pv(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>kE(t,r,n),t.parseAsync=async(r,n)=>Tv(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>$E(t,r,n),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>Di(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t)}),N4e=U("ZodMiniObject",(t,e)=>{RE.init(t,e),zce.init(t,e),ft.defineLazy(t,"shape",()=>e.shape)}),Jc={};_s(Jc,{xid:()=>Vce,void:()=>due,uuidv7:()=>Uce,uuidv6:()=>Ace,uuidv4:()=>Rce,uuid:()=>Cce,url:()=>Dce,uppercase:()=>dP,unknown:()=>rr,union:()=>Lt,undefined:()=>uue,ulid:()=>Fce,uint64:()=>sue,uint32:()=>iue,tuple:()=>hue,trim:()=>vP,treeifyError:()=>Y6,transform:()=>YP,toUpperCase:()=>_P,toLowerCase:()=>yP,toJSONSchema:()=>FL,templateLiteral:()=>Sue,symbol:()=>cue,superRefine:()=>CF,success:()=>wue,stringbool:()=>Eue,stringFormat:()=>eue,string:()=>H,strictObject:()=>mue,startsWith:()=>fP,size:()=>cP,setErrorMap:()=>zue,set:()=>yue,safeParseAsync:()=>JL,safeParse:()=>YL,registry:()=>qE,regexes:()=>IE,regex:()=>uP,refine:()=>NF,record:()=>Zt,readonly:()=>IF,property:()=>RL,promise:()=>$ue,prettifyError:()=>X6,preprocess:()=>tT,prefault:()=>_F,positive:()=>OL,pipe:()=>Uv,partialRecord:()=>gue,parseAsync:()=>QL,parse:()=>GL,overwrite:()=>ws,optional:()=>Qt,object:()=>ge,number:()=>zt,nullish:()=>xue,nullable:()=>Av,null:()=>WP,normalize:()=>gP,nonpositive:()=>NL,nonoptional:()=>bF,nonnegative:()=>CL,never:()=>ny,negative:()=>jL,nativeEnum:()=>_ue,nanoid:()=>qce,nan:()=>kue,multipleOf:()=>Up,minSize:()=>Dp,minLength:()=>yu,mime:()=>hP,maxSize:()=>Qv,maxLength:()=>Yv,map:()=>vue,lte:()=>Ci,lt:()=>vs,lowercase:()=>lP,looseObject:()=>cn,locales:()=>ME,literal:()=>Se,length:()=>Jv,lazy:()=>TF,ksuid:()=>Wce,keyof:()=>fue,jwt:()=>Xce,json:()=>Pue,iso:()=>xP,ipv6:()=>Kce,ipv4:()=>Bce,intersection:()=>oy,int64:()=>aue,int32:()=>nue,int:()=>eE,instanceof:()=>Iue,includes:()=>pP,guid:()=>Nce,gte:()=>Bn,gt:()=>ys,globalRegistry:()=>ds,getErrorMap:()=>Oue,function:()=>LL,formatError:()=>_E,float64:()=>rue,float32:()=>tue,flattenError:()=>yE,file:()=>bue,enum:()=>Sn,endsWith:()=>mP,emoji:()=>Mce,email:()=>jce,e164:()=>Jce,discriminatedUnion:()=>HP,date:()=>pue,custom:()=>jF,cuid2:()=>Lce,cuid:()=>Zce,core:()=>M6,config:()=>dn,coerce:()=>RF,clone:()=>Di,cidrv6:()=>Gce,cidrv4:()=>Hce,check:()=>OF,catch:()=>kF,boolean:()=>wr,bigint:()=>oue,base64url:()=>Yce,base64:()=>Qce,array:()=>mt,any:()=>lue,_default:()=>vF,_ZodString:()=>IP,ZodXID:()=>CP,ZodVoid:()=>aF,ZodUnknown:()=>iF,ZodUnion:()=>KP,ZodUndefined:()=>tF,ZodUUID:()=>jo,ZodURL:()=>PP,ZodULID:()=>NP,ZodType:()=>rt,ZodTuple:()=>lF,ZodTransform:()=>QP,ZodTemplateLiteral:()=>EF,ZodSymbol:()=>eF,ZodSuccess:()=>xF,ZodStringFormat:()=>Yt,ZodString:()=>Xv,ZodSet:()=>pF,ZodRecord:()=>GP,ZodRealError:()=>Vp,ZodReadonly:()=>$F,ZodPromise:()=>zF,ZodPrefault:()=>yF,ZodPipe:()=>eT,ZodOptional:()=>JP,ZodObject:()=>iy,ZodNumberFormat:()=>ku,ZodNumber:()=>ey,ZodNullable:()=>hF,ZodNull:()=>rF,ZodNonOptional:()=>XP,ZodNever:()=>oF,ZodNanoID:()=>zP,ZodNaN:()=>SF,ZodMap:()=>dF,ZodLiteral:()=>fF,ZodLazy:()=>PF,ZodKSUID:()=>RP,ZodJWT:()=>FP,ZodIssueCode:()=>Tue,ZodIntersection:()=>uF,ZodISOTime:()=>SP,ZodISODuration:()=>$P,ZodISODateTime:()=>wP,ZodISODate:()=>kP,ZodIPv6:()=>UP,ZodIPv4:()=>AP,ZodGUID:()=>Rv,ZodFile:()=>mF,ZodError:()=>Oce,ZodEnum:()=>qp,ZodEmoji:()=>TP,ZodEmail:()=>EP,ZodE164:()=>LP,ZodDiscriminatedUnion:()=>cF,ZodDefault:()=>gF,ZodDate:()=>BP,ZodCustomStringFormat:()=>XL,ZodCustom:()=>ay,ZodCatch:()=>wF,ZodCUID2:()=>jP,ZodCUID:()=>OP,ZodCIDRv6:()=>MP,ZodCIDRv4:()=>DP,ZodBoolean:()=>ty,ZodBigIntFormat:()=>VP,ZodBigInt:()=>ry,ZodBase64URL:()=>ZP,ZodBase64:()=>qP,ZodArray:()=>sF,ZodAny:()=>nF,TimePrecision:()=>iL,NEVER:()=>q6,$output:()=>eL,$input:()=>tL,$brand:()=>Z6});xP={};_s(xP,{time:()=>BL,duration:()=>KL,datetime:()=>VL,date:()=>WL,ZodISOTime:()=>SP,ZodISODuration:()=>$P,ZodISODateTime:()=>wP,ZodISODate:()=>kP});wP=U("ZodISODateTime",(t,e)=>{cZ.init(t,e),Yt.init(t,e)});kP=U("ZodISODate",(t,e)=>{uZ.init(t,e),Yt.init(t,e)});SP=U("ZodISOTime",(t,e)=>{lZ.init(t,e),Yt.init(t,e)});$P=U("ZodISODuration",(t,e)=>{dZ.init(t,e),Yt.init(t,e)});HL=(t,e)=>{vE.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>_E(t,r)},flatten:{value:r=>yE(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},Oce=U("ZodError",HL),Vp=U("ZodError",HL,{Parent:Error}),GL=bE(Vp),QL=xE(Vp),YL=wE(Vp),JL=SE(Vp),rt=U("ZodType",(t,e)=>(Fe.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone({...e,checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),t.clone=(r,n)=>Di(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t),t.parse=(r,n)=>GL(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>YL(t,r,n),t.parseAsync=async(r,n)=>QL(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>JL(t,r,n),t.spa=t.safeParseAsync,t.refine=(r,n)=>t.check(NF(r,n)),t.superRefine=r=>t.check(CF(r)),t.overwrite=r=>t.check(ws(r)),t.optional=()=>Qt(t),t.nullable=()=>Av(t),t.nullish=()=>Qt(Av(t)),t.nonoptional=r=>bF(t,r),t.array=()=>mt(t),t.or=r=>Lt([t,r]),t.and=r=>oy(t,r),t.transform=r=>Uv(t,YP(r)),t.default=r=>vF(t,r),t.prefault=r=>_F(t,r),t.catch=r=>kF(t,r),t.pipe=r=>Uv(t,r),t.readonly=()=>IF(t),t.describe=r=>{let n=t.clone();return ds.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return ds.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return ds.get(t);let n=t.clone();return ds.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),IP=U("_ZodString",(t,e)=>{Fp.init(t,e),rt.init(t,e);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(uP(...n)),t.includes=(...n)=>t.check(pP(...n)),t.startsWith=(...n)=>t.check(fP(...n)),t.endsWith=(...n)=>t.check(mP(...n)),t.min=(...n)=>t.check(yu(...n)),t.max=(...n)=>t.check(Yv(...n)),t.length=(...n)=>t.check(Jv(...n)),t.nonempty=(...n)=>t.check(yu(1,...n)),t.lowercase=n=>t.check(lP(n)),t.uppercase=n=>t.check(dP(n)),t.trim=()=>t.check(vP()),t.normalize=(...n)=>t.check(gP(...n)),t.toLowerCase=()=>t.check(yP()),t.toUpperCase=()=>t.check(_P())}),Xv=U("ZodString",(t,e)=>{Fp.init(t,e),IP.init(t,e),t.email=r=>t.check(ZE(EP,r)),t.url=r=>t.check(BE(PP,r)),t.jwt=r=>t.check(sP(FP,r)),t.emoji=r=>t.check(KE(TP,r)),t.guid=r=>t.check(jv(Rv,r)),t.uuid=r=>t.check(LE(jo,r)),t.uuidv4=r=>t.check(FE(jo,r)),t.uuidv6=r=>t.check(VE(jo,r)),t.uuidv7=r=>t.check(WE(jo,r)),t.nanoid=r=>t.check(HE(zP,r)),t.guid=r=>t.check(jv(Rv,r)),t.cuid=r=>t.check(GE(OP,r)),t.cuid2=r=>t.check(QE(jP,r)),t.ulid=r=>t.check(YE(NP,r)),t.base64=r=>t.check(iP(qP,r)),t.base64url=r=>t.check(oP(ZP,r)),t.xid=r=>t.check(JE(CP,r)),t.ksuid=r=>t.check(XE(RP,r)),t.ipv4=r=>t.check(eP(AP,r)),t.ipv6=r=>t.check(tP(UP,r)),t.cidrv4=r=>t.check(rP(DP,r)),t.cidrv6=r=>t.check(nP(MP,r)),t.e164=r=>t.check(aP(LP,r)),t.datetime=r=>t.check(VL(r)),t.date=r=>t.check(WL(r)),t.time=r=>t.check(BL(r)),t.duration=r=>t.check(KL(r))});Yt=U("ZodStringFormat",(t,e)=>{Kt.init(t,e),IP.init(t,e)}),EP=U("ZodEmail",(t,e)=>{Xq.init(t,e),Yt.init(t,e)});Rv=U("ZodGUID",(t,e)=>{Yq.init(t,e),Yt.init(t,e)});jo=U("ZodUUID",(t,e)=>{Jq.init(t,e),Yt.init(t,e)});PP=U("ZodURL",(t,e)=>{eZ.init(t,e),Yt.init(t,e)});TP=U("ZodEmoji",(t,e)=>{tZ.init(t,e),Yt.init(t,e)});zP=U("ZodNanoID",(t,e)=>{rZ.init(t,e),Yt.init(t,e)});OP=U("ZodCUID",(t,e)=>{nZ.init(t,e),Yt.init(t,e)});jP=U("ZodCUID2",(t,e)=>{iZ.init(t,e),Yt.init(t,e)});NP=U("ZodULID",(t,e)=>{oZ.init(t,e),Yt.init(t,e)});CP=U("ZodXID",(t,e)=>{aZ.init(t,e),Yt.init(t,e)});RP=U("ZodKSUID",(t,e)=>{sZ.init(t,e),Yt.init(t,e)});AP=U("ZodIPv4",(t,e)=>{pZ.init(t,e),Yt.init(t,e)});UP=U("ZodIPv6",(t,e)=>{fZ.init(t,e),Yt.init(t,e)});DP=U("ZodCIDRv4",(t,e)=>{mZ.init(t,e),Yt.init(t,e)});MP=U("ZodCIDRv6",(t,e)=>{hZ.init(t,e),Yt.init(t,e)});qP=U("ZodBase64",(t,e)=>{gZ.init(t,e),Yt.init(t,e)});ZP=U("ZodBase64URL",(t,e)=>{yZ.init(t,e),Yt.init(t,e)});LP=U("ZodE164",(t,e)=>{_Z.init(t,e),Yt.init(t,e)});FP=U("ZodJWT",(t,e)=>{xZ.init(t,e),Yt.init(t,e)});XL=U("ZodCustomStringFormat",(t,e)=>{wZ.init(t,e),Yt.init(t,e)});ey=U("ZodNumber",(t,e)=>{OE.init(t,e),rt.init(t,e),t.gt=(n,i)=>t.check(ys(n,i)),t.gte=(n,i)=>t.check(Bn(n,i)),t.min=(n,i)=>t.check(Bn(n,i)),t.lt=(n,i)=>t.check(vs(n,i)),t.lte=(n,i)=>t.check(Ci(n,i)),t.max=(n,i)=>t.check(Ci(n,i)),t.int=n=>t.check(eE(n)),t.safe=n=>t.check(eE(n)),t.positive=n=>t.check(ys(0,n)),t.nonnegative=n=>t.check(Bn(0,n)),t.negative=n=>t.check(vs(0,n)),t.nonpositive=n=>t.check(Ci(0,n)),t.multipleOf=(n,i)=>t.check(Up(n,i)),t.step=(n,i)=>t.check(Up(n,i)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});ku=U("ZodNumberFormat",(t,e)=>{kZ.init(t,e),ey.init(t,e)});ty=U("ZodBoolean",(t,e)=>{jE.init(t,e),rt.init(t,e)});ry=U("ZodBigInt",(t,e)=>{NE.init(t,e),rt.init(t,e),t.gte=(n,i)=>t.check(Bn(n,i)),t.min=(n,i)=>t.check(Bn(n,i)),t.gt=(n,i)=>t.check(ys(n,i)),t.gte=(n,i)=>t.check(Bn(n,i)),t.min=(n,i)=>t.check(Bn(n,i)),t.lt=(n,i)=>t.check(vs(n,i)),t.lte=(n,i)=>t.check(Ci(n,i)),t.max=(n,i)=>t.check(Ci(n,i)),t.positive=n=>t.check(ys(BigInt(0),n)),t.negative=n=>t.check(vs(BigInt(0),n)),t.nonpositive=n=>t.check(Ci(BigInt(0),n)),t.nonnegative=n=>t.check(Bn(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(Up(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});VP=U("ZodBigIntFormat",(t,e)=>{SZ.init(t,e),ry.init(t,e)});eF=U("ZodSymbol",(t,e)=>{$Z.init(t,e),rt.init(t,e)});tF=U("ZodUndefined",(t,e)=>{IZ.init(t,e),rt.init(t,e)});rF=U("ZodNull",(t,e)=>{EZ.init(t,e),rt.init(t,e)});nF=U("ZodAny",(t,e)=>{PZ.init(t,e),rt.init(t,e)});iF=U("ZodUnknown",(t,e)=>{Ov.init(t,e),rt.init(t,e)});oF=U("ZodNever",(t,e)=>{TZ.init(t,e),rt.init(t,e)});aF=U("ZodVoid",(t,e)=>{zZ.init(t,e),rt.init(t,e)});BP=U("ZodDate",(t,e)=>{OZ.init(t,e),rt.init(t,e),t.min=(n,i)=>t.check(Bn(n,i)),t.max=(n,i)=>t.check(Ci(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});sF=U("ZodArray",(t,e)=>{CE.init(t,e),rt.init(t,e),t.element=e.element,t.min=(r,n)=>t.check(yu(r,n)),t.nonempty=r=>t.check(yu(1,r)),t.max=(r,n)=>t.check(Yv(r,n)),t.length=(r,n)=>t.check(Jv(r,n)),t.unwrap=()=>t.element});iy=U("ZodObject",(t,e)=>{RE.init(t,e),rt.init(t,e),ft.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Sn(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:rr()}),t.loose=()=>t.clone({...t._zod.def,catchall:rr()}),t.strict=()=>t.clone({...t._zod.def,catchall:ny()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>ft.extend(t,r),t.merge=r=>ft.merge(t,r),t.pick=r=>ft.pick(t,r),t.omit=r=>ft.omit(t,r),t.partial=(...r)=>ft.partial(JP,t,r[0]),t.required=(...r)=>ft.required(XP,t,r[0])});KP=U("ZodUnion",(t,e)=>{AE.init(t,e),rt.init(t,e),t.options=e.options});cF=U("ZodDiscriminatedUnion",(t,e)=>{KP.init(t,e),jZ.init(t,e)});uF=U("ZodIntersection",(t,e)=>{NZ.init(t,e),rt.init(t,e)});lF=U("ZodTuple",(t,e)=>{Gv.init(t,e),rt.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});GP=U("ZodRecord",(t,e)=>{CZ.init(t,e),rt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});dF=U("ZodMap",(t,e)=>{RZ.init(t,e),rt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});pF=U("ZodSet",(t,e)=>{AZ.init(t,e),rt.init(t,e),t.min=(...r)=>t.check(Dp(...r)),t.nonempty=r=>t.check(Dp(1,r)),t.max=(...r)=>t.check(Qv(...r)),t.size=(...r)=>t.check(cP(...r))});qp=U("ZodEnum",(t,e)=>{UZ.init(t,e),rt.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let a of n)if(r.has(a))o[a]=e.entries[a];else throw Error(`Key ${a} not found in enum`);return new qp({...e,checks:[],...ft.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let a of n)if(r.has(a))delete o[a];else throw Error(`Key ${a} not found in enum`);return new qp({...e,checks:[],...ft.normalizeParams(i),entries:o})}});fF=U("ZodLiteral",(t,e)=>{DZ.init(t,e),rt.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});mF=U("ZodFile",(t,e)=>{MZ.init(t,e),rt.init(t,e),t.min=(r,n)=>t.check(Dp(r,n)),t.max=(r,n)=>t.check(Qv(r,n)),t.mime=(r,n)=>t.check(hP(Array.isArray(r)?r:[r],n))});QP=U("ZodTransform",(t,e)=>{UE.init(t,e),rt.init(t,e),t._zod.parse=(r,n)=>{r.addIssue=o=>{if(typeof o=="string")r.issues.push(ft.issue(o,r.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!0),r.issues.push(ft.issue(a))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});JP=U("ZodOptional",(t,e)=>{qZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});hF=U("ZodNullable",(t,e)=>{ZZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});gF=U("ZodDefault",(t,e)=>{LZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});yF=U("ZodPrefault",(t,e)=>{FZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});XP=U("ZodNonOptional",(t,e)=>{VZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});xF=U("ZodSuccess",(t,e)=>{WZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});wF=U("ZodCatch",(t,e)=>{BZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});SF=U("ZodNaN",(t,e)=>{KZ.init(t,e),rt.init(t,e)});eT=U("ZodPipe",(t,e)=>{DE.init(t,e),rt.init(t,e),t.in=e.in,t.out=e.out});$F=U("ZodReadonly",(t,e)=>{HZ.init(t,e),rt.init(t,e)});EF=U("ZodTemplateLiteral",(t,e)=>{GZ.init(t,e),rt.init(t,e)});PF=U("ZodLazy",(t,e)=>{YZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.getter()});zF=U("ZodPromise",(t,e)=>{QZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});ay=U("ZodCustom",(t,e)=>{JZ.init(t,e),rt.init(t,e)});Eue=(...t)=>qL({Pipe:eT,Boolean:ty,String:Xv,Transform:QP},...t);Tue={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};RF={};_s(RF,{string:()=>jue,number:()=>Nue,date:()=>Aue,boolean:()=>Cue,bigint:()=>Rue});dn(XZ());Uue="io.modelcontextprotocol/related-task",sy="2.0",kr=jF(t=>t!==null&&(typeof t=="object"||typeof t=="function")),AF=Lt([H(),zt().int()]),UF=H(),C4e=cn({ttl:zt().optional(),pollInterval:zt().optional()}),Due=ge({ttl:zt().optional()}),Mue=ge({taskId:H()}),rT=cn({progressToken:AF.optional(),[Uue]:Mue.optional()}),Qn=ge({_meta:rT.optional()}),cy=Qn.extend({task:Due.optional()}),Or=ge({method:H(),params:Qn.loose().optional()}),li=ge({_meta:rT.optional()}),di=ge({method:H(),params:li.loose().optional()}),jr=cn({_meta:rT.optional()}),uy=Lt([H(),zt().int()]),que=ge({jsonrpc:Se(sy),id:uy,...Or.shape}).strict(),Zue=ge({jsonrpc:Se(sy),...di.shape}).strict(),DF=ge({jsonrpc:Se(sy),id:uy,result:jr}).strict();(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(q2||(q2={}));MF=ge({jsonrpc:Se(sy),id:uy.optional(),error:ge({code:zt().int(),message:H(),data:rr().optional()})}).strict(),R4e=Lt([que,Zue,DF,MF]),A4e=Lt([DF,MF]),qF=jr.strict(),Lue=li.extend({requestId:uy.optional(),reason:H().optional()}),ZF=di.extend({method:Se("notifications/cancelled"),params:Lue}),Fue=ge({src:H(),mimeType:H().optional(),sizes:mt(H()).optional(),theme:Sn(["light","dark"]).optional()}),Wp=ge({icons:mt(Fue).optional()}),_u=ge({name:H(),title:H().optional()}),LF=_u.extend({..._u.shape,...Wp.shape,version:H(),websiteUrl:H().optional(),description:H().optional()}),Vue=oy(ge({applyDefaults:wr().optional()}),Zt(H(),rr())),Wue=tT(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,oy(ge({form:Vue.optional(),url:kr.optional()}),Zt(H(),rr()).optional())),Bue=cn({list:kr.optional(),cancel:kr.optional(),requests:cn({sampling:cn({createMessage:kr.optional()}).optional(),elicitation:cn({create:kr.optional()}).optional()}).optional()}),Kue=cn({list:kr.optional(),cancel:kr.optional(),requests:cn({tools:cn({call:kr.optional()}).optional()}).optional()}),Hue=ge({experimental:Zt(H(),kr).optional(),sampling:ge({context:kr.optional(),tools:kr.optional()}).optional(),elicitation:Wue.optional(),roots:ge({listChanged:wr().optional()}).optional(),tasks:Bue.optional(),extensions:Zt(H(),kr).optional()}),Gue=Qn.extend({protocolVersion:H(),capabilities:Hue,clientInfo:LF}),Que=Or.extend({method:Se("initialize"),params:Gue}),Yue=ge({experimental:Zt(H(),kr).optional(),logging:kr.optional(),completions:kr.optional(),prompts:ge({listChanged:wr().optional()}).optional(),resources:ge({subscribe:wr().optional(),listChanged:wr().optional()}).optional(),tools:ge({listChanged:wr().optional()}).optional(),tasks:Kue.optional(),extensions:Zt(H(),kr).optional()}),Jue=jr.extend({protocolVersion:H(),capabilities:Yue,serverInfo:LF,instructions:H().optional()}),Xue=di.extend({method:Se("notifications/initialized"),params:li.optional()}),FF=Or.extend({method:Se("ping"),params:Qn.optional()}),ele=ge({progress:zt(),total:Qt(zt()),message:Qt(H())}),tle=ge({...li.shape,...ele.shape,progressToken:AF}),VF=di.extend({method:Se("notifications/progress"),params:tle}),rle=Qn.extend({cursor:UF.optional()}),Bp=Or.extend({params:rle.optional()}),Kp=jr.extend({nextCursor:UF.optional()}),nle=Sn(["working","input_required","completed","failed","cancelled"]),Hp=ge({taskId:H(),status:nle,ttl:Lt([zt(),WP()]),createdAt:H(),lastUpdatedAt:H(),pollInterval:Qt(zt()),statusMessage:Qt(H())}),WF=jr.extend({task:Hp}),ile=li.merge(Hp),BF=di.extend({method:Se("notifications/tasks/status"),params:ile}),KF=Or.extend({method:Se("tasks/get"),params:Qn.extend({taskId:H()})}),HF=jr.merge(Hp),GF=Or.extend({method:Se("tasks/result"),params:Qn.extend({taskId:H()})}),U4e=jr.loose(),QF=Bp.extend({method:Se("tasks/list")}),YF=Kp.extend({tasks:mt(Hp)}),JF=Or.extend({method:Se("tasks/cancel"),params:Qn.extend({taskId:H()})}),D4e=jr.merge(Hp),XF=ge({uri:H(),mimeType:Qt(H()),_meta:Zt(H(),rr()).optional()}),e9=XF.extend({text:H()}),nT=H().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),t9=XF.extend({blob:nT}),Gp=Sn(["user","assistant"]),Su=ge({audience:mt(Gp).optional(),priority:zt().min(0).max(1).optional(),lastModified:xP.datetime({offset:!0}).optional()}),r9=ge({..._u.shape,...Wp.shape,uri:H(),description:Qt(H()),mimeType:Qt(H()),size:Qt(zt()),annotations:Su.optional(),_meta:Qt(cn({}))}),ole=ge({..._u.shape,...Wp.shape,uriTemplate:H(),description:Qt(H()),mimeType:Qt(H()),annotations:Su.optional(),_meta:Qt(cn({}))}),ale=Bp.extend({method:Se("resources/list")}),sle=Kp.extend({resources:mt(r9)}),cle=Bp.extend({method:Se("resources/templates/list")}),ule=Kp.extend({resourceTemplates:mt(ole)}),iT=Qn.extend({uri:H()}),lle=iT,dle=Or.extend({method:Se("resources/read"),params:lle}),ple=jr.extend({contents:mt(Lt([e9,t9]))}),fle=di.extend({method:Se("notifications/resources/list_changed"),params:li.optional()}),mle=iT,hle=Or.extend({method:Se("resources/subscribe"),params:mle}),gle=iT,vle=Or.extend({method:Se("resources/unsubscribe"),params:gle}),yle=li.extend({uri:H()}),_le=di.extend({method:Se("notifications/resources/updated"),params:yle}),ble=ge({name:H(),description:Qt(H()),required:Qt(wr())}),xle=ge({..._u.shape,...Wp.shape,description:Qt(H()),arguments:Qt(mt(ble)),_meta:Qt(cn({}))}),wle=Bp.extend({method:Se("prompts/list")}),kle=Kp.extend({prompts:mt(xle)}),Sle=Qn.extend({name:H(),arguments:Zt(H(),H()).optional()}),$le=Or.extend({method:Se("prompts/get"),params:Sle}),oT=ge({type:Se("text"),text:H(),annotations:Su.optional(),_meta:Zt(H(),rr()).optional()}),aT=ge({type:Se("image"),data:nT,mimeType:H(),annotations:Su.optional(),_meta:Zt(H(),rr()).optional()}),sT=ge({type:Se("audio"),data:nT,mimeType:H(),annotations:Su.optional(),_meta:Zt(H(),rr()).optional()}),Ile=ge({type:Se("tool_use"),name:H(),id:H(),input:Zt(H(),rr()),_meta:Zt(H(),rr()).optional()}),Ele=ge({type:Se("resource"),resource:Lt([e9,t9]),annotations:Su.optional(),_meta:Zt(H(),rr()).optional()}),Ple=r9.extend({type:Se("resource_link")}),cT=Lt([oT,aT,sT,Ple,Ele]),Tle=ge({role:Gp,content:cT}),zle=jr.extend({description:H().optional(),messages:mt(Tle)}),Ole=di.extend({method:Se("notifications/prompts/list_changed"),params:li.optional()}),jle=ge({title:H().optional(),readOnlyHint:wr().optional(),destructiveHint:wr().optional(),idempotentHint:wr().optional(),openWorldHint:wr().optional()}),Nle=ge({taskSupport:Sn(["required","optional","forbidden"]).optional()}),n9=ge({..._u.shape,...Wp.shape,description:H().optional(),inputSchema:ge({type:Se("object"),properties:Zt(H(),kr).optional(),required:mt(H()).optional()}).catchall(rr()),outputSchema:ge({type:Se("object"),properties:Zt(H(),kr).optional(),required:mt(H()).optional()}).catchall(rr()).optional(),annotations:jle.optional(),execution:Nle.optional(),_meta:Zt(H(),rr()).optional()}),Cle=Bp.extend({method:Se("tools/list")}),Rle=Kp.extend({tools:mt(n9)}),i9=jr.extend({content:mt(cT).default([]),structuredContent:Zt(H(),rr()).optional(),isError:wr().optional()}),M4e=i9.or(jr.extend({toolResult:rr()})),Ale=cy.extend({name:H(),arguments:Zt(H(),rr()).optional()}),Ule=Or.extend({method:Se("tools/call"),params:Ale}),Dle=di.extend({method:Se("notifications/tools/list_changed"),params:li.optional()}),q4e=ge({autoRefresh:wr().default(!0),debounceMs:zt().int().nonnegative().default(300)}),o9=Sn(["debug","info","notice","warning","error","critical","alert","emergency"]),Mle=Qn.extend({level:o9}),qle=Or.extend({method:Se("logging/setLevel"),params:Mle}),Zle=li.extend({level:o9,logger:H().optional(),data:rr()}),Lle=di.extend({method:Se("notifications/message"),params:Zle}),Fle=ge({name:H().optional()}),Vle=ge({hints:mt(Fle).optional(),costPriority:zt().min(0).max(1).optional(),speedPriority:zt().min(0).max(1).optional(),intelligencePriority:zt().min(0).max(1).optional()}),Wle=ge({mode:Sn(["auto","required","none"]).optional()}),Ble=ge({type:Se("tool_result"),toolUseId:H().describe("The unique identifier for the corresponding tool call."),content:mt(cT).default([]),structuredContent:ge({}).loose().optional(),isError:wr().optional(),_meta:Zt(H(),rr()).optional()}),Kle=HP("type",[oT,aT,sT]),Dv=HP("type",[oT,aT,sT,Ile,Ble]),Hle=ge({role:Gp,content:Lt([Dv,mt(Dv)]),_meta:Zt(H(),rr()).optional()}),Gle=cy.extend({messages:mt(Hle),modelPreferences:Vle.optional(),systemPrompt:H().optional(),includeContext:Sn(["none","thisServer","allServers"]).optional(),temperature:zt().optional(),maxTokens:zt().int(),stopSequences:mt(H()).optional(),metadata:kr.optional(),tools:mt(n9).optional(),toolChoice:Wle.optional()}),Qle=Or.extend({method:Se("sampling/createMessage"),params:Gle}),Yle=jr.extend({model:H(),stopReason:Qt(Sn(["endTurn","stopSequence","maxTokens"]).or(H())),role:Gp,content:Kle}),Jle=jr.extend({model:H(),stopReason:Qt(Sn(["endTurn","stopSequence","maxTokens","toolUse"]).or(H())),role:Gp,content:Lt([Dv,mt(Dv)])}),Xle=ge({type:Se("boolean"),title:H().optional(),description:H().optional(),default:wr().optional()}),ede=ge({type:Se("string"),title:H().optional(),description:H().optional(),minLength:zt().optional(),maxLength:zt().optional(),format:Sn(["email","uri","date","date-time"]).optional(),default:H().optional()}),tde=ge({type:Sn(["number","integer"]),title:H().optional(),description:H().optional(),minimum:zt().optional(),maximum:zt().optional(),default:zt().optional()}),rde=ge({type:Se("string"),title:H().optional(),description:H().optional(),enum:mt(H()),default:H().optional()}),nde=ge({type:Se("string"),title:H().optional(),description:H().optional(),oneOf:mt(ge({const:H(),title:H()})),default:H().optional()}),ide=ge({type:Se("string"),title:H().optional(),description:H().optional(),enum:mt(H()),enumNames:mt(H()).optional(),default:H().optional()}),ode=Lt([rde,nde]),ade=ge({type:Se("array"),title:H().optional(),description:H().optional(),minItems:zt().optional(),maxItems:zt().optional(),items:ge({type:Se("string"),enum:mt(H())}),default:mt(H()).optional()}),sde=ge({type:Se("array"),title:H().optional(),description:H().optional(),minItems:zt().optional(),maxItems:zt().optional(),items:ge({anyOf:mt(ge({const:H(),title:H()}))}),default:mt(H()).optional()}),cde=Lt([ade,sde]),ude=Lt([ide,ode,cde]),lde=Lt([ude,Xle,ede,tde]),dde=cy.extend({mode:Se("form").optional(),message:H(),requestedSchema:ge({type:Se("object"),properties:Zt(H(),lde),required:mt(H()).optional()})}),pde=cy.extend({mode:Se("url"),message:H(),elicitationId:H(),url:H().url()}),fde=Lt([dde,pde]),mde=Or.extend({method:Se("elicitation/create"),params:fde}),hde=li.extend({elicitationId:H()}),gde=di.extend({method:Se("notifications/elicitation/complete"),params:hde}),vde=jr.extend({action:Sn(["accept","decline","cancel"]),content:tT(t=>t===null?void 0:t,Zt(H(),Lt([H(),zt(),wr(),mt(H())])).optional())}),yde=ge({type:Se("ref/resource"),uri:H()}),_de=ge({type:Se("ref/prompt"),name:H()}),bde=Qn.extend({ref:Lt([_de,yde]),argument:ge({name:H(),value:H()}),context:ge({arguments:Zt(H(),H()).optional()}).optional()}),xde=Or.extend({method:Se("completion/complete"),params:bde}),wde=jr.extend({completion:cn({values:mt(H()).max(100),total:Qt(zt().int()),hasMore:Qt(wr())})}),kde=ge({uri:H().startsWith("file://"),name:H().optional(),_meta:Zt(H(),rr()).optional()}),Sde=Or.extend({method:Se("roots/list"),params:Qn.optional()}),$de=jr.extend({roots:mt(kde)}),Ide=di.extend({method:Se("notifications/roots/list_changed"),params:li.optional()}),Z4e=Lt([FF,Que,xde,qle,$le,wle,ale,cle,dle,hle,vle,Ule,Cle,KF,GF,QF,JF]),L4e=Lt([ZF,VF,Xue,Ide,BF]),F4e=Lt([qF,Yle,Jle,vde,$de,HF,YF,WF]),V4e=Lt([FF,Qle,mde,Sde,KF,GF,QF,JF]),W4e=Lt([ZF,VF,Lle,_le,fle,Dle,Ole,BF,gde]),B4e=Lt([qF,Jue,wde,zle,kle,sle,ule,ple,i9,Rle,HF,YF,WF]),K4e=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),H4e=W2(J2(),1),G4e=W2(Tte(),1);(function(t){t.Completable="McpCompletable"})(Z2||(Z2={}));Q4e=Ede(()=>Jc.object({session_id:Jc.string(),ws_url:Jc.string(),work_dir:Jc.string().optional(),session_key:Jc.string().optional()}));jde=new Set(["EBUSY","EMFILE","ENFILE","ENOTEMPTY","EPERM"])});var Qp,u9=E(()=>{Da();c9();Jo();wi();Gs();Ma();go();Qp=class extends gn{constructor(){super("claude","Claude (Anthropic API)",50)}canHandle(e){let r=!!process.env.ANTHROPIC_API_KEY;return r||q.debug("ClaudeAgentStrategy: ANTHROPIC_API_KEY not set"),r}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:o=null,images:a=[],skills:s=null,sessionPath:c=null,nodeName:u=null,timeout:l,config:d={}}=r,p=n;(!p||p==="auto")&&(q.debug(`Model is '${p||"undefined"}', using default: ${Yr.CLAUDE}`),p=Yr.CLAUDE);let f=lb[p]||p;lb[p]&&p!==f&&q.debug(`Mapped model: ${p} \u2192 ${f}`),q.debug(`Invoking Claude Agent SDK with model: ${f}, skills: ${JSON.stringify(s)}`);let m=process.env.ANTHROPIC_API_KEY,v=m?` | key: ***${m.slice(-4)}`:" | key: not set";console.log(`
|
|
219
|
+
\u25C6 Model: ${f}${v}
|
|
220
|
+
`);let g=(await import("chalk")).default;console.log(`
|
|
221
|
+
${g.bold("Prompt sent to LLM:")}`),console.log(g.dim("\u2500".repeat(60))),console.log(g.dim(e)),console.log(g.dim("\u2500".repeat(60)));let{allowedTools:h,mcpServers:_}=this._resolveSkills(s,{sessionPath:c,workspace:i,nodeName:u});try{let y={cwd:i,allowedTools:h,permissionMode:"bypassPermissions",model:f,...Object.keys(_).length>0&&{mcpServers:_}};if(o){let M=typeof o.parse=="function"?en(o,{target:"openApi3"}):o;y.outputFormat={type:"json_schema",schema:M},q.debug("Structured output enforced via SDK outputFormat")}q.debug(`Agent SDK options: ${JSON.stringify({cwd:y.cwd,toolCount:h.length,permissionMode:y.permissionMode,model:y.model,hasOutputFormat:!!y.outputFormat})}`);let b="",x=0,w=[];q.debug("Starting Claude Agent SDK query stream");let k;try{k=s9({prompt:e,options:y})}catch(z){throw q.error(`Failed to initialize Claude Agent SDK: ${z.message}`),z}let $=null,T=0,A=3;try{for await(let z of k){if(w.push(z),z.type==="error"||z.error){let W=z.error?.message||z.error||z.message||"Unknown API error";throw new Error(typeof W=="string"?W:JSON.stringify(W))}let M=JSON.stringify(z.message?.content||z.text||"").slice(0,200);if(M===$){if(T++,T>=A){let W=(z.message?.content?.[0]?.text||z.text||"unknown").slice(0,100);throw new Error(`API stuck in loop (${T}x repeated): ${W}`)}}else $=M,T=1;if(z.type==="assistant"||z.constructor?.name==="AssistantMessage"){let W=z.message?.content||z.content||[];for(let R of W)if(R.type==="thinking"&&R.thinking)console.log(`${R.thinking.substring(0,200)}${R.thinking.length>200?"...":""}`);else if(R.type==="text"&&R.text)b+=R.text,R.text.length<500?console.log(`${R.text}`):console.log(`${R.text.substring(0,200)}... (${R.text.length} chars)`);else if(R.type==="tool_use"){x++,R.name.includes("memory")?Ht.stepMemory(`Tool: ${R.name}`):Ht.stepTool(`Tool: ${R.name}`);let G=JSON.stringify(R.input).substring(0,100);console.log(` Input: ${G}${JSON.stringify(R.input).length>100?"...":""}`)}}else if(!(z.type==="user"&&z.tool_use_result)){if(z.type==="result"||z.constructor?.name==="ResultMessage"){let W=z.result||z.text||z.content||b;if(o){if(z.structured_output){q.debug("Using SDK native structured_output");let te=typeof o.parse=="function"?o.parse(z.structured_output):z.structured_output;return{raw:W,structured:te}}if(W){let R=this._extractJson(W,o);if(R)return{raw:W,structured:R}}q.warn(`Could not extract structured output \u2014 returning raw text (${(W||"").length} chars)`)}return W||""}}}if(q.warn(`Agent SDK ended without result. Collected ${w.length} messages`),b.length>0)return q.debug("Returning accumulated text from messages"),b;throw new Error("Claude Agent SDK query ended without result")}catch(z){throw q.error(`Error during query stream: ${z.message}`),z}}catch(y){throw q.error("Claude Agent SDK call failed",{error:y.message}),y}}_resolveSkills(e,r){if(e===null)return q.debug("No skills \u2014 pure LLM mode"),{allowedTools:[],mcpServers:{}};if(!Array.isArray(e)||e.length===0)return q.debug("Default IDE skills for code generation"),{allowedTools:["Read","Write","Bash","Grep","Glob"],mcpServers:{}};let n=[],i={};for(let o of e){let a=Tr(o);if(!a){q.warn(`Unknown skill "${o}" \u2014 skipping`);continue}if(a.allowedTools&&n.push(...a.allowedTools),typeof a.resolve=="function"){let s=a.resolve(r);s&&(i[a.serverName]=s,q.debug(`MCP: ${a.serverName} \u2192 ${s.command} ${s.args[0]}`))}}return{allowedTools:n,mcpServers:i}}_extractJson(e,r){let n=[()=>{if(e.includes("===JSON_START===")){let i=e.indexOf("===JSON_START===")+16,o=e.indexOf("===JSON_END===");return e.substring(i,o).trim()}},()=>e.match(/```json\s*\n([\s\S]*?)\n```/)?.[1]?.trim(),()=>{if(!e.startsWith("{"))return e.match(/```\s*\n([\s\S]*?)\n```/)?.[1]?.trim()},()=>e.trim(),()=>{let i=e.indexOf("{"),o=e.lastIndexOf("}");if(i!==-1&&o>i)return e.substring(i,o+1)}];for(let i of n)try{let o=i();if(!o)continue;let a=JSON.parse(o);if(typeof a!="object"||a===null)continue;return typeof r.parse=="function"?r.parse(a):a}catch{}return null}}});var h9={};Gi(h9,{Codex:()=>Qde,Thread:()=>lT});import{promises as uT}from"fs";import Ade from"os";import l9 from"path";import{spawn as qde}from"child_process";import ly from"path";import Zde from"readline";import{createRequire as f9}from"module";async function Ude(t){if(t===void 0)return{cleanup:async()=>{}};if(!Dde(t))throw new Error("outputSchema must be a plain JSON object");let e=await uT.mkdtemp(l9.join(Ade.tmpdir(),"codex-output-schema-")),r=l9.join(e,"schema.json"),n=async()=>{try{await uT.rm(e,{recursive:!0,force:!0})}catch{}};try{return await uT.writeFile(r,JSON.stringify(t),"utf8"),{schemaPath:r,cleanup:n}}catch(i){throw await n(),i}}function Dde(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Mde(t){if(typeof t=="string")return{prompt:t,images:[]};let e=[],r=[];for(let n of t)n.type==="text"?e.push(n.text):n.type==="local_image"&&r.push(n.path);return{prompt:e.join(`
|
|
222
|
+
|
|
223
|
+
`),images:r}}function Bde(t){let e=[];return m9(t,"",e),e}function m9(t,e,r){if(!dT(t))if(e){r.push(`${e}=${Yp(t,e)}`);return}else throw new Error("Codex config overrides must be a plain object");let n=Object.entries(t);if(!(!e&&n.length===0)){if(e&&n.length===0){r.push(`${e}={}`);return}for(let[i,o]of n){if(!i)throw new Error("Codex config override keys must be non-empty strings");if(o===void 0)continue;let a=e?`${e}.${i}`:i;dT(o)?m9(o,a,r):r.push(`${a}=${Yp(o,a)}`)}}}function Yp(t,e){if(typeof t=="string")return JSON.stringify(t);if(typeof t=="number"){if(!Number.isFinite(t))throw new Error(`Codex config override at ${e} must be a finite number`);return`${t}`}else{if(typeof t=="boolean")return t?"true":"false";if(Array.isArray(t))return`[${t.map((n,i)=>Yp(n,`${e}[${i}]`)).join(", ")}]`;if(dT(t)){let r=[];for(let[n,i]of Object.entries(t)){if(!n)throw new Error("Codex config override keys must be non-empty strings");i!==void 0&&r.push(`${Hde(n)} = ${Yp(i,`${e}.${n}`)}`)}return`{${r.join(", ")}}`}else{if(t===null)throw new Error(`Codex config override at ${e} cannot be null`);{let r=typeof t;throw new Error(`Unsupported Codex config override value at ${e}: ${r}`)}}}}function Hde(t){return Kde.test(t)?t:JSON.stringify(t)}function dT(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Gde(){let{platform:t,arch:e}=process,r=null;switch(t){case"linux":case"android":switch(e){case"x64":r="x86_64-unknown-linux-musl";break;case"arm64":r="aarch64-unknown-linux-musl";break;default:break}break;case"darwin":switch(e){case"x64":r="x86_64-apple-darwin";break;case"arm64":r="aarch64-apple-darwin";break;default:break}break;case"win32":switch(e){case"x64":r="x86_64-pc-windows-msvc";break;case"arm64":r="aarch64-pc-windows-msvc";break;default:break}break;default:break}if(!r)throw new Error(`Unsupported platform: ${t} (${e})`);let n=Fde[r];if(!n)throw new Error(`Unsupported target triple: ${r}`);let i;try{let c=Vde.resolve(`${p9}/package.json`),l=f9(c).resolve(`${n}/package.json`);i=ly.join(ly.dirname(l),"vendor")}catch{throw new Error(`Unable to locate Codex CLI binaries. Ensure ${p9} is installed with optional dependencies.`)}let o=ly.join(i,r),a=process.platform==="win32"?"codex.exe":"codex";return ly.join(o,"codex",a)}var lT,d9,Lde,p9,Fde,Vde,Wde,Kde,Qde,g9=E(()=>{lT=class{_exec;_options;_id;_threadOptions;get id(){return this._id}constructor(t,e,r,n=null){this._exec=t,this._options=e,this._id=n,this._threadOptions=r}async runStreamed(t,e={}){return{events:this.runStreamedInternal(t,e)}}async*runStreamedInternal(t,e={}){let{schemaPath:r,cleanup:n}=await Ude(e.outputSchema),i=this._threadOptions,{prompt:o,images:a}=Mde(t),s=this._exec.run({input:o,baseUrl:this._options.baseUrl,apiKey:this._options.apiKey,threadId:this._id,images:a,model:i?.model,sandboxMode:i?.sandboxMode,workingDirectory:i?.workingDirectory,skipGitRepoCheck:i?.skipGitRepoCheck,outputSchemaFile:r,modelReasoningEffort:i?.modelReasoningEffort,signal:e.signal,networkAccessEnabled:i?.networkAccessEnabled,webSearchMode:i?.webSearchMode,webSearchEnabled:i?.webSearchEnabled,approvalPolicy:i?.approvalPolicy,additionalDirectories:i?.additionalDirectories});try{for await(let c of s){let u;try{u=JSON.parse(c)}catch(l){throw new Error(`Failed to parse item: ${c}`,{cause:l})}u.type==="thread.started"&&(this._id=u.thread_id),yield u}}finally{await n()}}async run(t,e={}){let r=this.runStreamedInternal(t,e),n=[],i="",o=null,a=null;for await(let s of r)if(s.type==="item.completed")s.item.type==="agent_message"&&(i=s.item.text),n.push(s.item);else if(s.type==="turn.completed")o=s.usage;else if(s.type==="turn.failed"){a=s.error;break}if(a)throw new Error(a.message);return{items:n,finalResponse:i,usage:o}}};d9="CODEX_INTERNAL_ORIGINATOR_OVERRIDE",Lde="codex_sdk_ts",p9="@openai/codex",Fde={"x86_64-unknown-linux-musl":"@openai/codex-linux-x64","aarch64-unknown-linux-musl":"@openai/codex-linux-arm64","x86_64-apple-darwin":"@openai/codex-darwin-x64","aarch64-apple-darwin":"@openai/codex-darwin-arm64","x86_64-pc-windows-msvc":"@openai/codex-win32-x64","aarch64-pc-windows-msvc":"@openai/codex-win32-arm64"},Vde=f9(import.meta.url),Wde=class{executablePath;envOverride;configOverrides;constructor(t=null,e,r){this.executablePath=t||Gde(),this.envOverride=e,this.configOverrides=r}async*run(t){let e=["exec","--experimental-json"];if(this.configOverrides)for(let c of Bde(this.configOverrides))e.push("--config",c);if(t.baseUrl&&e.push("--config",`openai_base_url=${Yp(t.baseUrl,"openai_base_url")}`),t.model&&e.push("--model",t.model),t.sandboxMode&&e.push("--sandbox",t.sandboxMode),t.workingDirectory&&e.push("--cd",t.workingDirectory),t.additionalDirectories?.length)for(let c of t.additionalDirectories)e.push("--add-dir",c);if(t.skipGitRepoCheck&&e.push("--skip-git-repo-check"),t.outputSchemaFile&&e.push("--output-schema",t.outputSchemaFile),t.modelReasoningEffort&&e.push("--config",`model_reasoning_effort="${t.modelReasoningEffort}"`),t.networkAccessEnabled!==void 0&&e.push("--config",`sandbox_workspace_write.network_access=${t.networkAccessEnabled}`),t.webSearchMode?e.push("--config",`web_search="${t.webSearchMode}"`):t.webSearchEnabled===!0?e.push("--config",'web_search="live"'):t.webSearchEnabled===!1&&e.push("--config",'web_search="disabled"'),t.approvalPolicy&&e.push("--config",`approval_policy="${t.approvalPolicy}"`),t.threadId&&e.push("resume",t.threadId),t.images?.length)for(let c of t.images)e.push("--image",c);let r={};if(this.envOverride)Object.assign(r,this.envOverride);else for(let[c,u]of Object.entries(process.env))u!==void 0&&(r[c]=u);r[d9]||(r[d9]=Lde),t.apiKey&&(r.CODEX_API_KEY=t.apiKey);let n=qde(this.executablePath,e,{env:r,signal:t.signal}),i=null;if(n.once("error",c=>i=c),!n.stdin)throw n.kill(),new Error("Child process has no stdin");if(n.stdin.write(t.input),n.stdin.end(),!n.stdout)throw n.kill(),new Error("Child process has no stdout");let o=[];n.stderr&&n.stderr.on("data",c=>{o.push(c)});let a=new Promise(c=>{n.once("exit",(u,l)=>{c({code:u,signal:l})})}),s=Zde.createInterface({input:n.stdout,crlfDelay:1/0});try{for await(let l of s)yield l;if(i)throw i;let{code:c,signal:u}=await a;if(c!==0||u){let l=Buffer.concat(o),d=u?`signal ${u}`:`code ${c??1}`;throw new Error(`Codex Exec exited with ${d}: ${l.toString("utf8")}`)}}finally{s.close(),n.removeAllListeners();try{n.killed||n.kill()}catch{}}}};Kde=/^[A-Za-z0-9_-]+$/;Qde=class{exec;options;constructor(t={}){let{codexPathOverride:e,env:r,config:n}=t;this.exec=new Wde(e,r,n),this.options=t}startThread(t={}){return new lT(this.exec,this.options,t)}resumeThread(t,e={}){return new lT(this.exec,this.options,e,t)}}});import{execSync as Yde}from"child_process";var Jp,v9=E(()=>{Da();Jo();wi();Gs();Ma();go();Jp=class extends gn{constructor(){super("codex","Codex (OpenAI)",75)}canHandle(e){if(!!!(process.env.OPENAI_API_KEY||process.env.CODEX_API_KEY))return q.debug("CodexAgentStrategy: OPENAI_API_KEY or CODEX_API_KEY not set"),!1;try{return Yde("codex --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return q.warn("[Codex] codex CLI not found. Install: npm install -g @openai/codex"),!1}}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:o=null,skills:a=null,sessionPath:s=null,nodeName:c=null,timeout:u,config:l={}}=r,{Codex:d}=await Promise.resolve().then(()=>(g9(),h9)),p=n;(!p||p==="auto")&&(q.debug(`Model is '${p||"undefined"}', using default: ${Yr.CODEX}`),p=Yr.CODEX);let f=db[p]||p;db[p]&&p!==f&&q.debug(`Mapped model: ${p} \u2192 ${f}`),q.debug(`Invoking Codex SDK with model: ${f}, skills: ${JSON.stringify(a)}`);let m=process.env.CODEX_API_KEY||process.env.OPENAI_API_KEY;m&&!process.env.CODEX_API_KEY&&(process.env.CODEX_API_KEY=m);let v=m?` | key: ***${m.slice(-4)}`:" | key: not set";console.log(`
|
|
224
|
+
\u25C6 Model: ${f}${v}
|
|
225
|
+
`);let g=(await import("chalk")).default;console.log(`
|
|
226
|
+
${g.bold("Prompt sent to LLM:")}`),console.log(g.dim("\u2500".repeat(60))),console.log(g.dim(e)),console.log(g.dim("\u2500".repeat(60)));let h=this._resolveSkillsToMcp(a,{sessionPath:s,workspace:i,nodeName:c}),_={};Object.keys(h).length>0&&(_.mcp_servers=h,q.debug(`[Codex] MCP servers: ${Object.keys(h).join(", ")}`));let b=new d({...Object.keys(_).length>0&&{config:_}}).startThread({workingDirectory:i,skipGitRepoCheck:!0,approvalPolicy:"never",sandboxMode:"danger-full-access",networkAccessEnabled:!0}),x=o&&typeof o.parse=="function",w={};if(o)try{let k=x?en(o,{target:"openAi"}):o;w.outputSchema=k,q.debug("Structured output via SDK outputSchema")}catch(k){q.warn(`[Codex] Schema conversion failed, will extract from text: ${k.message}`)}try{let{events:k}=await b.runStreamed(e,w),$=0,T="";for await(let A of k){let z=A.type;if(z==="item.completed"){let M=A.item,W=M?.type;if(W==="mcp_tool_call"){$++;let R=`${M.server}/${M.tool}`;if(Ht.stepTool(`Tool: ${R}`),M.arguments){let te=JSON.stringify(M.arguments),G=te.length>100?`${te.substring(0,100)}...`:te;console.log(` Input: ${G}`)}}else if(W==="tool_call"||W==="function_call"||W==="command_execution"){$++;let R=M.name||M.tool||M.command||"unknown";Ht.stepTool(`Tool: ${R}`)}else W==="agent_message"&&(T=M.text||"",T.length<500?console.log(T):console.log(`${T.substring(0,200)}... (${T.length} chars)`))}else z==="turn.completed"?q.debug(`[Codex] Turn completed. Usage: ${JSON.stringify(A.usage||{})}`):q.debug(`[Codex] Event: ${z} ${JSON.stringify(A).slice(0,300)}`)}if(q.debug(`[Codex] Last agent message (${T.length} chars): ${T.slice(0,500)}`),o){if(!T)throw new Error("Codex agent returned no response");let A=JSON.parse(T),z=x?o.parse(A):A;return q.debug("\u2705 [Codex] Structured output validated"),{raw:T,structured:z}}return T||""}catch(k){let $=k.message||String(k);throw q.error(`\u274C [Codex] SDK call failed: ${$}`),$.includes("exited with code")&&(q.error("\u{1F4A1} [Codex] Verify: codex --version && echo $OPENAI_API_KEY"),q.error("\u{1F4A1} [Codex] If codex is missing: npm install -g @openai/codex")),k}}_resolveSkillsToMcp(e,r={}){if(!Array.isArray(e)||e.length===0)return{};let n={};for(let i of e){let o=Tr(i);if(!o){q.warn(`[Codex] Unknown skill "${i}" \u2014 skipping`);continue}if(typeof o.resolve!="function")continue;let a=o.resolve(r);if(!a)continue;let s=o.serverName||i,c={command:a.command};a.args?.length&&(c.args=a.args),a.env&&Object.keys(a.env).length>0&&(c.env=a.env),n[s]=c,q.debug(`[Codex] MCP: ${s} \u2192 ${a.command} ${(a.args||[]).join(" ")}`)}return n}}});import{execSync as Jde,spawn as Xde}from"child_process";import{existsSync as y9,mkdirSync as _9,readFileSync as b9,rmSync as epe,writeFileSync as x9}from"fs";import{join as ks}from"path";function tpe(t){if(!t)return null;let e=String(t),r=e.match(/```(?:json)?\s*([\s\S]*?)```/i);if(r?.[1])try{return JSON.parse(r[1].trim())}catch{}let n=e.indexOf("{");if(n<0)return null;let i=0,o=!1,a=!1,s=-1;for(let c=n;c<e.length;c++){let u=e[c];if(o){a?a=!1:u==="\\"?a=!0:u==='"'&&(o=!1);continue}if(u==='"'){o=!0;continue}if(u==="{"){i===0&&(s=c),i+=1;continue}if(u==="}"){if(i===0)continue;if(i-=1,i===0&&s>=0){let l=e.slice(s,c+1);try{return JSON.parse(l)}catch{s=-1}}}}return null}function rpe(t){let e=String(t||"").trim();if(!e)return null;try{return JSON.parse(e)}catch{return tpe(e)}}function npe(t){try{let e=JSON.parse(t);if(typeof e=="string")return e;if(typeof e?.response=="string")return e.response;if(typeof e?.text=="string")return e.text;if(typeof e?.output=="string")return e.output;if(Array.isArray(e?.candidates)&&e.candidates.length>0){let r=e.candidates[0];if(typeof r?.content=="string")return r.content;if(Array.isArray(r?.content?.parts)){let n=r.content.parts.map(i=>typeof i?.text=="string"?i.text:"").join("");if(n.trim())return n}}}catch{}return t}var Xp,w9=E(()=>{Da();Jo();wi();Ma();go();Ox();mb();Xp=class extends gn{constructor(){super("gemini","Gemini (Google)",70)}canHandle(e){if(!!!(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY))return q.debug("GeminiAgentStrategy: GEMINI_API_KEY or GOOGLE_API_KEY not set"),!1;try{return Jde("gemini --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return q.warn("[Gemini] gemini CLI not found. Install: npm install -g @google/gemini-cli"),!1}}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:o=null,skills:a=null,sessionPath:s=null,nodeName:c=null,timeout:u=600*1e3}=r,l=n;(!l||l==="auto")&&(l=Yr.GEMINI);let d=G1[l]||l,p=String(process.env.GEMINI_API_KEY||"").trim(),f=String(process.env.GOOGLE_API_KEY||"").trim(),m=this._resolveSkillsToMcp(a,{sessionPath:s,workspace:i,nodeName:c}),v=Object.keys(m).length>0,g=e,h=o&&typeof o.parse=="function",_=null;if(o){let M;try{let W=h?en(o,{target:"openAi"}):o;M=JSON.stringify(W,null,2)}catch{M="{}"}if(v){g+=`
|
|
227
|
+
|
|
228
|
+
Write valid JSON that matches this schema:
|
|
229
|
+
${M}`;let W=`zibby-result-${Date.now()}.json`,R=ks(i,".zibby","tmp");_=ks(R,W),_9(R,{recursive:!0}),g+=fc.generateFileOutputInstructions(o,_)}else g+=`
|
|
230
|
+
|
|
231
|
+
Return ONLY valid JSON (no markdown, no commentary) that matches this schema:
|
|
232
|
+
${M}`}let y=this._createGeminiConfigDir(i,m),b=["--output-format","json"];d&&d!=="auto"&&b.push("--model",d);let x=Object.keys(m);if(x.length>0){b.push("--approval-mode","yolo");for(let M of x)b.push("--allowed-mcp-server-names",M);q.info(`[Gemini] Enabling MCP servers: ${x.join(", ")}`)}else a&&a.length>0&&q.warn(`[Gemini] Skills requested but no MCP servers configured: ${a.join(", ")}`);b.push("-p",g);let w={...process.env,GEMINI_CLI_HOME:y};p?(w.GEMINI_API_KEY=p,delete w.GOOGLE_API_KEY):f&&(w.GOOGLE_API_KEY=f,delete w.GEMINI_API_KEY),q.debug(`[Gemini] Command: gemini ${b.slice(0,8).join(" ")}... (${b.length} total args)`),q.debug(`[Gemini] Config home: ${y}`),q.debug(`[Gemini] GEMINI_CLI_HOME env: ${w.GEMINI_CLI_HOME}`);let k="",$=null;try{k=await new Promise((W,R)=>{let te=Xde("gemini",b,{cwd:i,env:w,stdio:["ignore","pipe","pipe"]}),G="",ye="",De=setTimeout(()=>{try{te.kill("SIGTERM")}catch{}},u);te.stdout.on("data",de=>{G+=de.toString()}),te.stderr.on("data",de=>{ye+=de.toString()}),te.on("error",de=>{clearTimeout(De),R(de)}),te.on("close",de=>{if(clearTimeout(De),de===0)return W(G.trim());R(new Error(`gemini failed with code ${de}: ${(ye||G).trim()}`))})})}catch(M){$=M}finally{try{epe(y,{recursive:!0,force:!0})}catch{}}let T=npe(k).trim();if(!o){if($)throw $;return T}if(_){let M=y9(_);if(q.info(`[Gemini] Result file: ${M?"present":"missing"} at ${_}`),M)try{let W=b9(_,"utf-8").trim(),R=JSON.parse(W),te=h?o.parse(R):R;return q.info("[Gemini] Structured output recovered from result file"),{raw:T,structured:te}}catch(W){q.warn(`[Gemini] Result file parse/validation failed: ${W.message}`)}else $||q.warn("[Gemini] Result file missing; falling back to stream-parsed JSON")}let A=null;if(o){let M=new Ys;M.zodSchema=o,M.processChunk(T),M.flush(),A=M.getResult()}if(q.info(`[Gemini] Raw stdout length: ${k.length} chars`),q.info(`[Gemini] Extracted text length: ${T.length} chars`),q.info(`[Gemini] StreamParser result: ${A?"extracted":"null"}`),A||(T.length<2e3?q.info(`[Gemini] Raw text preview:
|
|
233
|
+
${T}`):q.info(`[Gemini] Raw text preview (first 1000 chars):
|
|
234
|
+
${T.slice(0,1e3)}`),A=rpe(T)),!A)throw $||(q.error("[Gemini] Failed to extract valid JSON from output"),q.error("\u{1F4A1} Tip: Set strictMode=true in .zibby.config.js for OpenAI proxy fallback"),new Error("Gemini did not return valid JSON for structured output. Enable strictMode for proxy fallback."));let z=h?o.parse(A):A;return{raw:T,structured:z}}_resolveSkillsToMcp(e,r={}){if(!Array.isArray(e)||e.length===0)return{};let n={};for(let i of e){let o=Tr(i);if(!o||typeof o.resolve!="function")continue;let a=o.resolve(r);if(!a)continue;let s=o.cursorKey||o.serverName||i,c={command:a.command};a.args?.length&&(c.args=a.args),a.env&&Object.keys(a.env).length>0&&(c.env=a.env),a.cwd&&(c.cwd=a.cwd),n[s]=c}return n}_createGeminiConfigDir(e,r){let n=`${Date.now()}-${Math.random().toString(16).slice(2,10)}`,i=ks(e||process.cwd(),".zibby","tmp",`gemini-home-${n}`),o=ks(i,".gemini");_9(o,{recursive:!0});let a=ks(o,"settings.json"),s={},c=ks(process.env.HOME||"",".gemini","settings.json");if(y9(c))try{s=JSON.parse(b9(c,"utf-8"))}catch{s={}}let u={...s,mcpServers:{...s.mcpServers&&typeof s.mcpServers=="object"?s.mcpServers:{},...r||{}}};x9(a,`${JSON.stringify(u,null,2)}
|
|
235
|
+
`,"utf-8");let l=ks(e||process.cwd(),".zibby","tmp","gemini-settings-debug.json");try{x9(l,`${JSON.stringify(u,null,2)}
|
|
236
|
+
`,"utf-8")}catch{}return q.debug(`[Gemini] Created isolated config with ${Object.keys(u.mcpServers||{}).length} MCP servers`),q.debug(`[Gemini] MCP servers: ${JSON.stringify(Object.keys(u.mcpServers||{}),null,2)}`),i}}});var ef,pT=E(()=>{ef=class{formatTools(e){throw new Error("formatTools() must be implemented")}hasToolCalls(e){throw new Error("hasToolCalls() must be implemented")}parseToolCalls(e){throw new Error("parseToolCalls() must be implemented")}getTextContent(e){throw new Error("getTextContent() must be implemented")}buildAssistantMessage(e){throw new Error("buildAssistantMessage() must be implemented")}buildToolResultMessage(e,r){throw new Error("buildToolResultMessage() must be implemented")}injectToolsIntoBody(e,r){throw new Error("injectToolsIntoBody() must be implemented")}}});var $u,k9=E(()=>{pT();$u=class extends ef{formatTools(e){return e.map(r=>({type:"function",function:{name:r.name,description:r.description,parameters:r.parameters||r.input_schema||{type:"object",properties:{}}}}))}hasToolCalls(e){let r=e.choices?.[0]?.message;return!!(r?.tool_calls&&r.tool_calls.length>0)}parseToolCalls(e){return(e.choices?.[0]?.message?.tool_calls||[]).map(n=>({id:n.id,name:n.function.name,args:JSON.parse(n.function.arguments||"{}")}))}getTextContent(e){return e.choices?.[0]?.message?.content||""}buildAssistantMessage(e){return e.choices?.[0]?.message}buildToolResultMessage(e,r){return{role:"tool",tool_call_id:e,content:typeof r=="string"?r:JSON.stringify(r)}}injectToolsIntoBody(e,r){return r.length>0&&(e.tools=r),e}}});var tf,fT=E(()=>{tf=class{async fetchCompletion(e,r,n={}){throw new Error("fetchCompletion() must be implemented")}async fetchStreamingCompletion(e,r,n={}){throw new Error("fetchStreamingCompletion() must be implemented")}}});function dy(t){return Buffer.byteLength(JSON.stringify(t),"utf8")}function py(t,e){let r=String(t||"");if(r.length<=e)return r;let n=Math.max(0,e-28);return`${r.slice(0,n)}
|
|
237
|
+
|
|
238
|
+
[truncated for size budget]`}function mT(t,e=0){if(!t||typeof t!="object"||e>8)return t;if(Array.isArray(t))return t.map(n=>mT(n,e+1));let r={};for(let[n,i]of Object.entries(t))n==="description"||n==="title"||n==="examples"||n==="default"||(r[n]=mT(i,e+1));return r}function ipe(t=[]){return t.map(e=>({...e,function:{...e.function,description:py(e.function?.description||"",180),parameters:mT(e.function?.parameters||{type:"object",properties:{}})}}))}function S9(t){let e=new Set;for(let i of t)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let o of i.tool_calls)e.add(o.id);let r=t.filter(i=>i.role==="tool"?e.has(i.tool_call_id):!0),n=new Set;for(let i of r)i.role==="tool"&&n.add(i.tool_call_id);return r.map(i=>{if(i.role!=="assistant"||!Array.isArray(i.tool_calls)||i.tool_calls.every(c=>n.has(c.id)))return i;let{tool_calls:a,...s}=i;return{...s,content:s.content||""}})}function hT(t,e={}){let r=e.maxBytes||49e3,n=e.systemMaxChars||12e3,i={...t,messages:Array.isArray(t.messages)?[...t.messages]:[],tools:Array.isArray(t.tools)?ipe(t.tools):t.tools};i.messages.length>0&&i.messages[0]?.role==="system"&&(i.messages[0]={...i.messages[0],content:py(i.messages[0].content,n)});let o=!1;for(;dy(i)>r&&i.messages.length>2;)i.messages.splice(1,1),o=!0;if(o&&(i.messages=S9(i.messages)),dy(i)>r&&i.messages.length>0&&(i.messages[0]={...i.messages[0],content:py(i.messages[0].content,6e3)},o=!0),dy(i)>r){let a=i.messages.find(c=>c.role==="system")||i.messages[0],s=i.messages.slice(-2);i.messages=S9([a,...s].filter(Boolean).map((c,u)=>({...c,content:py(c.content,u===0?4e3:8e3)}))),o=!0}return{body:i,meta:{bytes:dy(i),trimmed:o,maxBytes:r,messageCount:i.messages.length}}}var $9=E(()=>{});var I9,Iu,E9=E(()=>{fT();$9();I9=t=>Buffer.byteLength(JSON.stringify(t),"utf8"),Iu=class extends tf{async fetchCompletion(e,r,n={}){let i=I9(e),{body:o,meta:a}=hT(e,n.payloadCompaction);n.onBudget?.({streaming:!1,beforeBytes:i,meta:a});let s=this.#e(n),c=`${r.baseUrl}${n.chatCompletionsPath||"/v1/chat/completions"}`,u=await fetch(c,{method:"POST",headers:r.headers,body:JSON.stringify(o),signal:s});if(!u.ok){let l=await u.text();throw u.status===401||u.status===403?new Error("Session expired. Run `zibby login` to re-authenticate."):new Error(`Proxy error ${u.status}: ${l}`)}return u.json()}async fetchStreamingCompletion(e,r,n={}){let i={...e,stream:!0},o=I9(i),{body:a,meta:s}=hT(i,n.payloadCompaction);n.onBudget?.({streaming:!0,beforeBytes:o,meta:s});let c=this.#e(n),u=`${r.baseUrl}${n.chatCompletionsPath||"/v1/chat/completions"}`,l=await fetch(u,{method:"POST",headers:r.headers,body:JSON.stringify(a),signal:c});if(!l.ok){let g=await l.text();throw l.status===401||l.status===403?new Error("Session expired. Run `zibby login` to re-authenticate."):new Error(`Proxy error ${l.status}: ${g}`)}let d=l.body.getReader(),p=new TextDecoder,f="",m="",v=new Map;for(;;){let{done:g,value:h}=await d.read();if(g)break;f+=p.decode(h,{stream:!0});let _=f.split(`
|
|
239
|
+
`);f=_.pop();for(let y of _){if(!y.startsWith("data: "))continue;let b=y.slice(6).trim();if(b==="[DONE]")continue;let x;try{x=JSON.parse(b)}catch{continue}let w=x.choices?.[0]?.delta;if(w&&(w.content&&(m+=w.content,n.onToken&&n.onToken(w.content)),w.tool_calls))for(let k of w.tool_calls){let $=k.index??0;v.has($)||v.set($,{id:"",name:"",args:""});let T=v.get($);k.id&&(T.id=k.id),k.function?.name&&(T.name=k.function.name),k.function?.arguments!=null&&(T.args+=k.function.arguments)}}}if(v.size>0){let g=[...v.entries()].sort(([h],[_])=>h-_).map(([,h])=>({id:h.id,type:"function",function:{name:h.name,arguments:h.args}}));return{choices:[{message:{role:"assistant",content:m||null,tool_calls:g}}]}}return{choices:[{message:{role:"assistant",content:m}}]}}#e(e={}){let r=[e.signal,e.timeout?AbortSignal.timeout(e.timeout):null].filter(Boolean);return r.length>1?AbortSignal.any(r):r[0]||void 0}}});var P9=E(()=>{pT();k9();fT();E9()});var gT=E(()=>{lr()});var fy=E(()=>{lr();we();gT()});var z9=E(()=>{lr()});var vT=E(()=>{lr();fy()});var O9=E(()=>{lr();fy()});var yT=E(()=>{lr();gT();fy();z9();lr();Zc();Dh();vT();vT();O9()});var _T=E(()=>{yT();yT()});function Eu(t){return!!t._zod}function Mi(t,e){return Eu(t)?jc(t,e):t.safeParse(e)}function my(t){if(!t)return;let e;if(Eu(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function N9(t){if(Eu(t)){let o=t._zod?.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=t.value;if(n!==void 0)return n}var hy=E(()=>{Nl();_T()});var bT=E(()=>{Bd();Bd()});var C9=E(()=>{bT();bT()});var wT,R9,xa,vy,Sr,A9,U9,TMe,lpe,dpe,kT,Yn,rf,D9,Nr,pi,fi,Cr,yy,M9,ST,q9,Z9,$T,nf,Ue,IT,L9,F9,zMe,Ss,ppe,_y,fpe,of,Pu,V9,mpe,hpe,gpe,vpe,ype,_pe,bpe,xpe,ET,wpe,by,kpe,Spe,xy,$pe,af,sf,Ipe,cf,$s,Epe,uf,wy,ky,Sy,OMe,$y,Iy,Ey,W9,B9,K9,PT,H9,lf,Tu,G9,Ppe,Tpe,TT,zpe,zT,OT,Ope,jpe,jT,NT,Npe,Cpe,Rpe,Ape,Upe,Dpe,Mpe,qpe,Zpe,CT,Lpe,Fpe,RT,AT,UT,Vpe,Wpe,Bpe,DT,Kpe,MT,qT,Hpe,Gpe,Q9,Qpe,ZT,zu,jMe,Ype,Jpe,LT,Y9,J9,Xpe,efe,tfe,rfe,nfe,ife,ofe,afe,sfe,gy,cfe,ufe,FT,VT,WT,lfe,dfe,pfe,ffe,mfe,hfe,gfe,vfe,yfe,_fe,bfe,xfe,wfe,kfe,Sfe,BT,$fe,Ife,KT,Efe,Pfe,Tfe,zfe,HT,Ofe,jfe,Nfe,Cfe,NMe,CMe,RMe,AMe,UMe,DMe,Ee,xT,df=E(()=>{C9();wT="2025-11-25",R9=[wT,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],xa="io.modelcontextprotocol/related-task",vy="2.0",Sr=lI(t=>t!==null&&(typeof t=="object"||typeof t=="function")),A9=qt([K(),Tt().int()]),U9=K(),TMe=Lr({ttl:Tt().optional(),pollInterval:Tt().optional()}),lpe=fe({ttl:Tt().optional()}),dpe=fe({taskId:K()}),kT=Lr({progressToken:A9.optional(),[xa]:dpe.optional()}),Yn=fe({_meta:kT.optional()}),rf=Yn.extend({task:lpe.optional()}),D9=t=>rf.safeParse(t).success,Nr=fe({method:K(),params:Yn.loose().optional()}),pi=fe({_meta:kT.optional()}),fi=fe({method:K(),params:pi.loose().optional()}),Cr=Lr({_meta:kT.optional()}),yy=qt([K(),Tt().int()]),M9=fe({jsonrpc:ke(vy),id:yy,...Nr.shape}).strict(),ST=t=>M9.safeParse(t).success,q9=fe({jsonrpc:ke(vy),...fi.shape}).strict(),Z9=t=>q9.safeParse(t).success,$T=fe({jsonrpc:ke(vy),id:yy,result:Cr}).strict(),nf=t=>$T.safeParse(t).success;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(Ue||(Ue={}));IT=fe({jsonrpc:ke(vy),id:yy.optional(),error:fe({code:Tt().int(),message:K(),data:Mt().optional()})}).strict(),L9=t=>IT.safeParse(t).success,F9=qt([M9,q9,$T,IT]),zMe=qt([$T,IT]),Ss=Cr.strict(),ppe=pi.extend({requestId:yy.optional(),reason:K().optional()}),_y=fi.extend({method:ke("notifications/cancelled"),params:ppe}),fpe=fe({src:K(),mimeType:K().optional(),sizes:ot(K()).optional(),theme:Fr(["light","dark"]).optional()}),of=fe({icons:ot(fpe).optional()}),Pu=fe({name:K(),title:K().optional()}),V9=Pu.extend({...Pu.shape,...of.shape,version:K(),websiteUrl:K().optional(),description:K().optional()}),mpe=Wd(fe({applyDefaults:vr().optional()}),Ct(K(),Mt())),hpe=Sg(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Wd(fe({form:mpe.optional(),url:Sr.optional()}),Ct(K(),Mt()).optional())),gpe=Lr({list:Sr.optional(),cancel:Sr.optional(),requests:Lr({sampling:Lr({createMessage:Sr.optional()}).optional(),elicitation:Lr({create:Sr.optional()}).optional()}).optional()}),vpe=Lr({list:Sr.optional(),cancel:Sr.optional(),requests:Lr({tools:Lr({call:Sr.optional()}).optional()}).optional()}),ype=fe({experimental:Ct(K(),Sr).optional(),sampling:fe({context:Sr.optional(),tools:Sr.optional()}).optional(),elicitation:hpe.optional(),roots:fe({listChanged:vr().optional()}).optional(),tasks:gpe.optional(),extensions:Ct(K(),Sr).optional()}),_pe=Yn.extend({protocolVersion:K(),capabilities:ype,clientInfo:V9}),bpe=Nr.extend({method:ke("initialize"),params:_pe}),xpe=fe({experimental:Ct(K(),Sr).optional(),logging:Sr.optional(),completions:Sr.optional(),prompts:fe({listChanged:vr().optional()}).optional(),resources:fe({subscribe:vr().optional(),listChanged:vr().optional()}).optional(),tools:fe({listChanged:vr().optional()}).optional(),tasks:vpe.optional(),extensions:Ct(K(),Sr).optional()}),ET=Cr.extend({protocolVersion:K(),capabilities:xpe,serverInfo:V9,instructions:K().optional()}),wpe=fi.extend({method:ke("notifications/initialized"),params:pi.optional()}),by=Nr.extend({method:ke("ping"),params:Yn.optional()}),kpe=fe({progress:Tt(),total:Bt(Tt()),message:Bt(K())}),Spe=fe({...pi.shape,...kpe.shape,progressToken:A9}),xy=fi.extend({method:ke("notifications/progress"),params:Spe}),$pe=Yn.extend({cursor:U9.optional()}),af=Nr.extend({params:$pe.optional()}),sf=Cr.extend({nextCursor:U9.optional()}),Ipe=Fr(["working","input_required","completed","failed","cancelled"]),cf=fe({taskId:K(),status:Ipe,ttl:qt([Tt(),yg()]),createdAt:K(),lastUpdatedAt:K(),pollInterval:Bt(Tt()),statusMessage:Bt(K())}),$s=Cr.extend({task:cf}),Epe=pi.merge(cf),uf=fi.extend({method:ke("notifications/tasks/status"),params:Epe}),wy=Nr.extend({method:ke("tasks/get"),params:Yn.extend({taskId:K()})}),ky=Cr.merge(cf),Sy=Nr.extend({method:ke("tasks/result"),params:Yn.extend({taskId:K()})}),OMe=Cr.loose(),$y=af.extend({method:ke("tasks/list")}),Iy=sf.extend({tasks:ot(cf)}),Ey=Nr.extend({method:ke("tasks/cancel"),params:Yn.extend({taskId:K()})}),W9=Cr.merge(cf),B9=fe({uri:K(),mimeType:Bt(K()),_meta:Ct(K(),Mt()).optional()}),K9=B9.extend({text:K()}),PT=K().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),H9=B9.extend({blob:PT}),lf=Fr(["user","assistant"]),Tu=fe({audience:ot(lf).optional(),priority:Tt().min(0).max(1).optional(),lastModified:is.datetime({offset:!0}).optional()}),G9=fe({...Pu.shape,...of.shape,uri:K(),description:Bt(K()),mimeType:Bt(K()),size:Bt(Tt()),annotations:Tu.optional(),_meta:Bt(Lr({}))}),Ppe=fe({...Pu.shape,...of.shape,uriTemplate:K(),description:Bt(K()),mimeType:Bt(K()),annotations:Tu.optional(),_meta:Bt(Lr({}))}),Tpe=af.extend({method:ke("resources/list")}),TT=sf.extend({resources:ot(G9)}),zpe=af.extend({method:ke("resources/templates/list")}),zT=sf.extend({resourceTemplates:ot(Ppe)}),OT=Yn.extend({uri:K()}),Ope=OT,jpe=Nr.extend({method:ke("resources/read"),params:Ope}),jT=Cr.extend({contents:ot(qt([K9,H9]))}),NT=fi.extend({method:ke("notifications/resources/list_changed"),params:pi.optional()}),Npe=OT,Cpe=Nr.extend({method:ke("resources/subscribe"),params:Npe}),Rpe=OT,Ape=Nr.extend({method:ke("resources/unsubscribe"),params:Rpe}),Upe=pi.extend({uri:K()}),Dpe=fi.extend({method:ke("notifications/resources/updated"),params:Upe}),Mpe=fe({name:K(),description:Bt(K()),required:Bt(vr())}),qpe=fe({...Pu.shape,...of.shape,description:Bt(K()),arguments:Bt(ot(Mpe)),_meta:Bt(Lr({}))}),Zpe=af.extend({method:ke("prompts/list")}),CT=sf.extend({prompts:ot(qpe)}),Lpe=Yn.extend({name:K(),arguments:Ct(K(),K()).optional()}),Fpe=Nr.extend({method:ke("prompts/get"),params:Lpe}),RT=fe({type:ke("text"),text:K(),annotations:Tu.optional(),_meta:Ct(K(),Mt()).optional()}),AT=fe({type:ke("image"),data:PT,mimeType:K(),annotations:Tu.optional(),_meta:Ct(K(),Mt()).optional()}),UT=fe({type:ke("audio"),data:PT,mimeType:K(),annotations:Tu.optional(),_meta:Ct(K(),Mt()).optional()}),Vpe=fe({type:ke("tool_use"),name:K(),id:K(),input:Ct(K(),Mt()),_meta:Ct(K(),Mt()).optional()}),Wpe=fe({type:ke("resource"),resource:qt([K9,H9]),annotations:Tu.optional(),_meta:Ct(K(),Mt()).optional()}),Bpe=G9.extend({type:ke("resource_link")}),DT=qt([RT,AT,UT,Bpe,Wpe]),Kpe=fe({role:lf,content:DT}),MT=Cr.extend({description:K().optional(),messages:ot(Kpe)}),qT=fi.extend({method:ke("notifications/prompts/list_changed"),params:pi.optional()}),Hpe=fe({title:K().optional(),readOnlyHint:vr().optional(),destructiveHint:vr().optional(),idempotentHint:vr().optional(),openWorldHint:vr().optional()}),Gpe=fe({taskSupport:Fr(["required","optional","forbidden"]).optional()}),Q9=fe({...Pu.shape,...of.shape,description:K().optional(),inputSchema:fe({type:ke("object"),properties:Ct(K(),Sr).optional(),required:ot(K()).optional()}).catchall(Mt()),outputSchema:fe({type:ke("object"),properties:Ct(K(),Sr).optional(),required:ot(K()).optional()}).catchall(Mt()).optional(),annotations:Hpe.optional(),execution:Gpe.optional(),_meta:Ct(K(),Mt()).optional()}),Qpe=af.extend({method:ke("tools/list")}),ZT=sf.extend({tools:ot(Q9)}),zu=Cr.extend({content:ot(DT).default([]),structuredContent:Ct(K(),Mt()).optional(),isError:vr().optional()}),jMe=zu.or(Cr.extend({toolResult:Mt()})),Ype=rf.extend({name:K(),arguments:Ct(K(),Mt()).optional()}),Jpe=Nr.extend({method:ke("tools/call"),params:Ype}),LT=fi.extend({method:ke("notifications/tools/list_changed"),params:pi.optional()}),Y9=fe({autoRefresh:vr().default(!0),debounceMs:Tt().int().nonnegative().default(300)}),J9=Fr(["debug","info","notice","warning","error","critical","alert","emergency"]),Xpe=Yn.extend({level:J9}),efe=Nr.extend({method:ke("logging/setLevel"),params:Xpe}),tfe=pi.extend({level:J9,logger:K().optional(),data:Mt()}),rfe=fi.extend({method:ke("notifications/message"),params:tfe}),nfe=fe({name:K().optional()}),ife=fe({hints:ot(nfe).optional(),costPriority:Tt().min(0).max(1).optional(),speedPriority:Tt().min(0).max(1).optional(),intelligencePriority:Tt().min(0).max(1).optional()}),ofe=fe({mode:Fr(["auto","required","none"]).optional()}),afe=fe({type:ke("tool_result"),toolUseId:K().describe("The unique identifier for the corresponding tool call."),content:ot(DT).default([]),structuredContent:fe({}).loose().optional(),isError:vr().optional(),_meta:Ct(K(),Mt()).optional()}),sfe=xg("type",[RT,AT,UT]),gy=xg("type",[RT,AT,UT,Vpe,afe]),cfe=fe({role:lf,content:qt([gy,ot(gy)]),_meta:Ct(K(),Mt()).optional()}),ufe=rf.extend({messages:ot(cfe),modelPreferences:ife.optional(),systemPrompt:K().optional(),includeContext:Fr(["none","thisServer","allServers"]).optional(),temperature:Tt().optional(),maxTokens:Tt().int(),stopSequences:ot(K()).optional(),metadata:Sr.optional(),tools:ot(Q9).optional(),toolChoice:ofe.optional()}),FT=Nr.extend({method:ke("sampling/createMessage"),params:ufe}),VT=Cr.extend({model:K(),stopReason:Bt(Fr(["endTurn","stopSequence","maxTokens"]).or(K())),role:lf,content:sfe}),WT=Cr.extend({model:K(),stopReason:Bt(Fr(["endTurn","stopSequence","maxTokens","toolUse"]).or(K())),role:lf,content:qt([gy,ot(gy)])}),lfe=fe({type:ke("boolean"),title:K().optional(),description:K().optional(),default:vr().optional()}),dfe=fe({type:ke("string"),title:K().optional(),description:K().optional(),minLength:Tt().optional(),maxLength:Tt().optional(),format:Fr(["email","uri","date","date-time"]).optional(),default:K().optional()}),pfe=fe({type:Fr(["number","integer"]),title:K().optional(),description:K().optional(),minimum:Tt().optional(),maximum:Tt().optional(),default:Tt().optional()}),ffe=fe({type:ke("string"),title:K().optional(),description:K().optional(),enum:ot(K()),default:K().optional()}),mfe=fe({type:ke("string"),title:K().optional(),description:K().optional(),oneOf:ot(fe({const:K(),title:K()})),default:K().optional()}),hfe=fe({type:ke("string"),title:K().optional(),description:K().optional(),enum:ot(K()),enumNames:ot(K()).optional(),default:K().optional()}),gfe=qt([ffe,mfe]),vfe=fe({type:ke("array"),title:K().optional(),description:K().optional(),minItems:Tt().optional(),maxItems:Tt().optional(),items:fe({type:ke("string"),enum:ot(K())}),default:ot(K()).optional()}),yfe=fe({type:ke("array"),title:K().optional(),description:K().optional(),minItems:Tt().optional(),maxItems:Tt().optional(),items:fe({anyOf:ot(fe({const:K(),title:K()}))}),default:ot(K()).optional()}),_fe=qt([vfe,yfe]),bfe=qt([hfe,gfe,_fe]),xfe=qt([bfe,lfe,dfe,pfe]),wfe=rf.extend({mode:ke("form").optional(),message:K(),requestedSchema:fe({type:ke("object"),properties:Ct(K(),xfe),required:ot(K()).optional()})}),kfe=rf.extend({mode:ke("url"),message:K(),elicitationId:K(),url:K().url()}),Sfe=qt([wfe,kfe]),BT=Nr.extend({method:ke("elicitation/create"),params:Sfe}),$fe=pi.extend({elicitationId:K()}),Ife=fi.extend({method:ke("notifications/elicitation/complete"),params:$fe}),KT=Cr.extend({action:Fr(["accept","decline","cancel"]),content:Sg(t=>t===null?void 0:t,Ct(K(),qt([K(),Tt(),vr(),ot(K())])).optional())}),Efe=fe({type:ke("ref/resource"),uri:K()}),Pfe=fe({type:ke("ref/prompt"),name:K()}),Tfe=Yn.extend({ref:qt([Pfe,Efe]),argument:fe({name:K(),value:K()}),context:fe({arguments:Ct(K(),K()).optional()}).optional()}),zfe=Nr.extend({method:ke("completion/complete"),params:Tfe}),HT=Cr.extend({completion:Lr({values:ot(K()).max(100),total:Bt(Tt().int()),hasMore:Bt(vr())})}),Ofe=fe({uri:K().startsWith("file://"),name:K().optional(),_meta:Ct(K(),Mt()).optional()}),jfe=Nr.extend({method:ke("roots/list"),params:Yn.optional()}),Nfe=Cr.extend({roots:ot(Ofe)}),Cfe=fi.extend({method:ke("notifications/roots/list_changed"),params:pi.optional()}),NMe=qt([by,bpe,zfe,efe,Fpe,Zpe,Tpe,zpe,jpe,Cpe,Ape,Jpe,Qpe,wy,Sy,$y,Ey]),CMe=qt([_y,xy,wpe,Cfe,uf]),RMe=qt([Ss,VT,WT,KT,Nfe,ky,Iy,$s]),AMe=qt([by,FT,BT,jfe,wy,Sy,$y,Ey]),UMe=qt([_y,xy,rfe,Dpe,NT,LT,qT,uf,Ife]),DMe=qt([Ss,ET,HT,MT,CT,TT,zT,jT,zu,ZT,ky,Iy,$s]),Ee=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===Ue.UrlElicitationRequired&&n){let i=n;if(i.elicitations)return new xT(i.elicitations,r)}return new t(e,r,n)}},xT=class extends Ee{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(Ue.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}});function wa(t){return t==="completed"||t==="failed"||t==="cancelled"}var X9=E(()=>{});function GT(t){let r=my(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=N9(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function QT(t,e){let r=Mi(t,e);if(!r.success)throw r.error;return r.data}var eV=E(()=>{_T();hy();Jo()});function tV(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function rV(t,e){let r={...t};for(let n in e){let i=n,o=e[i];if(o===void 0)continue;let a=r[i];tV(a)&&tV(o)?r[i]={...a,...o}:r[i]=o}return r}var Rfe,Py,nV=E(()=>{hy();df();X9();eV();Rfe=6e4,Py=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(_y,r=>{this._oncancel(r)}),this.setNotificationHandler(xy,r=>{this._onprogress(r)}),this.setRequestHandler(by,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(wy,async(r,n)=>{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new Ee(Ue.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(Sy,async(r,n)=>{let i=async()=>{let o=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(o,n.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{let d=c,p=new Ee(d.error.code,d.error.message,d.error.data);l(p)}else{let d=s.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(s.message,{relatedRequestId:n.requestId})}}let a=await this._taskStore.getTask(o,n.sessionId);if(!a)throw new Ee(Ue.InvalidParams,`Task not found: ${o}`);if(!wa(a.status))return await this._waitForTaskUpdate(o,n.signal),await i();if(wa(a.status)){let s=await this._taskStore.getTaskResult(o,n.sessionId);return this._clearTaskQueue(o),{...s,_meta:{...s._meta,[xa]:{taskId:o}}}}return await i()};return await i()}),this.setRequestHandler($y,async(r,n)=>{try{let{tasks:i,nextCursor:o}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:i,nextCursor:o,_meta:{}}}catch(i){throw new Ee(Ue.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(Ey,async(r,n)=>{try{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new Ee(Ue.InvalidParams,`Task not found: ${r.params.taskId}`);if(wa(i.status))throw new Ee(Ue.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new Ee(Ue.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(i){throw i instanceof Ee?i:new Ee(Ue.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,r,n,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),Ee.fromError(Ue.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=o=>{n?.(o),this._onerror(o)};let i=this._transport?.onmessage;this._transport.onmessage=(o,a)=>{i?.(o,a),nf(o)||L9(o)?this._onresponse(o):ST(o)?this._onrequest(o,a):Z9(o)?this._onnotification(o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(o)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._timeoutInfo.values())clearTimeout(n.timeoutId);this._timeoutInfo.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=Ee.fromError(Ue.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of e.values())n(r)}_onerror(e){this.onerror?.(e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,o=e.params?._meta?.[xa]?.taskId;if(n===void 0){let l={jsonrpc:"2.0",id:e.id,error:{code:Ue.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:l,timestamp:Date.now()},i?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):i?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let s=D9(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,u={signal:a.signal,sessionId:i?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(a.signal.aborted)return;let d={relatedRequestId:e.id};o&&(d.relatedTask={taskId:o}),await this.notification(l,d)},sendRequest:async(l,d,p)=>{if(a.signal.aborted)throw new Ee(Ue.ConnectionClosed,"Request was cancelled");let f={...p,relatedRequestId:e.id};o&&!f.relatedTask&&(f.relatedTask={taskId:o});let m=f.relatedTask?.taskId??o;return m&&c&&await c.updateTaskStatus(m,"input_required"),await this.request(l,d,f)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:o,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,u)).then(async l=>{if(a.signal.aborted)return;let d={result:l,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:d,timestamp:Date.now()},i?.sessionId):await i?.send(d)},async l=>{if(a.signal.aborted)return;let d={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(l.code)?l.code:Ue.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:d,timestamp:Date.now()},i?.sessionId):await i?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,i=Number(r),o=this._progressHandlers.get(i);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(i),s=this._timeoutInfo.get(i);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(c){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),a(c);return}o(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),nf(e))n(e);else{let a=new Ee(e.error.code,e.error.message,e.error.data);n(a)}return}let i=this._responseHandlers.get(r);if(i===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let o=!1;if(nf(e)&&e.result&&typeof e.result=="object"){let a=e.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,r))}}if(o||this._progressHandlers.delete(r),nf(e))i(e);else{let a=Ee.fromError(e.error.code,e.error.message,e.error.data);i(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,r,n){let{task:i}=n??{};if(!i){try{yield{type:"result",result:await this.request(e,r,n)}}catch(a){yield{type:"error",error:a instanceof Ee?a:new Ee(Ue.InternalError,String(a))}}return}let o;try{let a=await this.request(e,$s,n);if(a.task)o=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new Ee(Ue.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:o},n);if(yield{type:"taskStatus",task:s},wa(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,n)}:s.status==="failed"?yield{type:"error",error:new Ee(Ue.InternalError,`Task ${o} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new Ee(Ue.InternalError,`Task ${o} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},r,n)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof Ee?a:new Ee(Ue.InternalError,String(a))}}}request(e,r,n){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:c}=n??{};return new Promise((u,l)=>{let d=_=>{l(_)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),s&&this.assertTaskCapability(e.method)}catch(_){d(_);return}n?.signal?.throwIfAborted();let p=this._requestMessageId++,f={...e,jsonrpc:"2.0",id:p};n?.onprogress&&(this._progressHandlers.set(p,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:p}}),s&&(f.params={...f.params,task:s}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[xa]:c}});let m=_=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(_)}},{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(b=>this._onerror(new Error(`Failed to send cancellation: ${b}`)));let y=_ instanceof Ee?_:new Ee(Ue.RequestTimeout,String(_));l(y)};this._responseHandlers.set(p,_=>{if(!n?.signal?.aborted){if(_ instanceof Error)return l(_);try{let y=Mi(r,_.result);y.success?u(y.data):l(y.error)}catch(y){l(y)}}}),n?.signal?.addEventListener("abort",()=>{m(n?.signal?.reason)});let v=n?.timeout??Rfe,g=()=>m(Ee.fromError(Ue.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(p,v,n?.maxTotalTimeout,g,n?.resetTimeoutOnProgress??!1);let h=c?.taskId;if(h){let _=y=>{let b=this._responseHandlers.get(p);b?b(y):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,_),this._enqueueTaskMessage(h,{type:"request",message:f,timestamp:Date.now()}).catch(y=>{this._cleanupTimeout(p),l(y)})}else this._transport.send(f,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(_=>{this._cleanupTimeout(p),l(_)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},ky,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},Iy,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},W9,r)}async notification(e,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=r?.relatedTask?.taskId;if(n){let s={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[xa]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let s={...e,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[xa]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let a={...e,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[xa]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(e,r){let n=GT(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(i,o)=>{let a=QT(e,i);return Promise.resolve(r(a,o))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){let n=GT(e);this._notificationHandlers.set(n,i=>{let o=QT(e,i);return Promise.resolve(r(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let i=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,i)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let i of n)if(i.type==="request"&&ST(i.message)){let o=i.message.id,a=this._requestResolvers.get(o);a?(a(new Ee(Ue.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let i=await this._taskStore?.getTask(e);i?.pollInterval&&(n=i.pollInterval)}catch{}return new Promise((i,o)=>{if(r.aborted){o(new Ee(Ue.InvalidRequest,"Request cancelled"));return}let a=setTimeout(i,n);r.addEventListener("abort",()=>{clearTimeout(a),o(new Ee(Ue.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async i=>{if(!e)throw new Error("No request provided");return await n.createTask(i,e.id,{method:e.method,params:e.params},r)},getTask:async i=>{let o=await n.getTask(i,r);if(!o)throw new Ee(Ue.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(i,o,a)=>{await n.storeTaskResult(i,o,a,r);let s=await n.getTask(i,r);if(s){let c=uf.parse({method:"notifications/tasks/status",params:s});await this.notification(c),wa(s.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>n.getTaskResult(i,r),updateTaskStatus:async(i,o,a)=>{let s=await n.getTask(i,r);if(!s)throw new Ee(Ue.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(wa(s.status))throw new Ee(Ue.InvalidParams,`Cannot update task "${i}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(i,o,a,r);let c=await n.getTask(i,r);if(c){let u=uf.parse({method:"notifications/tasks/status",params:c});await this.notification(u),wa(c.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>n.listTasks(i,r)}}}});var mf=O(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.regexpCode=It.getEsmExportName=It.getProperty=It.safeStringify=It.stringify=It.strConcat=It.addCodeArg=It.str=It._=It.nil=It._Code=It.Name=It.IDENTIFIER=It._CodeOrName=void 0;var pf=class{};It._CodeOrName=pf;It.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Is=class extends pf{constructor(e){if(super(),!It.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};It.Name=Is;var mi=class extends pf{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Is&&(r[n.str]=(r[n.str]||0)+1),r),{})}};It._Code=mi;It.nil=new mi("");function iV(t,...e){let r=[t[0]],n=0;for(;n<e.length;)JT(r,e[n]),r.push(t[++n]);return new mi(r)}It._=iV;var YT=new mi("+");function oV(t,...e){let r=[ff(t[0])],n=0;for(;n<e.length;)r.push(YT),JT(r,e[n]),r.push(YT,ff(t[++n]));return Afe(r),new mi(r)}It.str=oV;function JT(t,e){e instanceof mi?t.push(...e._items):e instanceof Is?t.push(e):t.push(Mfe(e))}It.addCodeArg=JT;function Afe(t){let e=1;for(;e<t.length-1;){if(t[e]===YT){let r=Ufe(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Ufe(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Is||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof Is))return`"${t}${e.slice(1)}`}function Dfe(t,e){return e.emptyStr()?t:t.emptyStr()?e:oV`${t}${e}`}It.strConcat=Dfe;function Mfe(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:ff(Array.isArray(t)?t.join(","):t)}function qfe(t){return new mi(ff(t))}It.stringify=qfe;function ff(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}It.safeStringify=ff;function Zfe(t){return typeof t=="string"&&It.IDENTIFIER.test(t)?new mi(`.${t}`):iV`[${t}]`}It.getProperty=Zfe;function Lfe(t){if(typeof t=="string"&&It.IDENTIFIER.test(t))return new mi(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}It.getEsmExportName=Lfe;function Ffe(t){return new mi(t.toString())}It.regexpCode=Ffe});var tz=O(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.ValueScope=In.ValueScopeName=In.Scope=In.varKinds=In.UsedValueState=void 0;var $n=mf(),XT=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Ty;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Ty||(In.UsedValueState=Ty={}));In.varKinds={const:new $n.Name("const"),let:new $n.Name("let"),var:new $n.Name("var")};var zy=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof $n.Name?e:this.name(e)}name(e){return new $n.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};In.Scope=zy;var Oy=class extends $n.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,$n._)`.${new $n.Name(r)}[${n}]`}};In.ValueScopeName=Oy;var Vfe=(0,$n._)`\n`,ez=class extends zy{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Vfe:$n.nil}}get(){return this._scope}name(e){return new Oy(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[o];if(s){let l=s.get(a);if(l)return l}else s=this._values[o]=new Map;s.set(a,i);let c=this._scope[o]||(this._scope[o]=[]),u=c.length;return c[u]=r.ref,i.setValue(r,{property:o,itemIndex:u}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,$n._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=$n.nil;for(let a in e){let s=e[a];if(!s)continue;let c=n[a]=n[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,Ty.Started);let l=r(u);if(l){let d=this.opts.es5?In.varKinds.var:In.varKinds.const;o=(0,$n._)`${o}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))o=(0,$n._)`${o}${l}${this.opts._n}`;else throw new XT(u);c.set(u,Ty.Completed)})}return o}};In.ValueScope=ez});var at=O(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.or=nt.and=nt.not=nt.CodeGen=nt.operators=nt.varKinds=nt.ValueScopeName=nt.ValueScope=nt.Scope=nt.Name=nt.regexpCode=nt.stringify=nt.getProperty=nt.nil=nt.strConcat=nt.str=nt._=void 0;var gt=mf(),qi=tz(),ka=mf();Object.defineProperty(nt,"_",{enumerable:!0,get:function(){return ka._}});Object.defineProperty(nt,"str",{enumerable:!0,get:function(){return ka.str}});Object.defineProperty(nt,"strConcat",{enumerable:!0,get:function(){return ka.strConcat}});Object.defineProperty(nt,"nil",{enumerable:!0,get:function(){return ka.nil}});Object.defineProperty(nt,"getProperty",{enumerable:!0,get:function(){return ka.getProperty}});Object.defineProperty(nt,"stringify",{enumerable:!0,get:function(){return ka.stringify}});Object.defineProperty(nt,"regexpCode",{enumerable:!0,get:function(){return ka.regexpCode}});Object.defineProperty(nt,"Name",{enumerable:!0,get:function(){return ka.Name}});var Ry=tz();Object.defineProperty(nt,"Scope",{enumerable:!0,get:function(){return Ry.Scope}});Object.defineProperty(nt,"ValueScope",{enumerable:!0,get:function(){return Ry.ValueScope}});Object.defineProperty(nt,"ValueScopeName",{enumerable:!0,get:function(){return Ry.ValueScopeName}});Object.defineProperty(nt,"varKinds",{enumerable:!0,get:function(){return Ry.varKinds}});nt.operators={GT:new gt._Code(">"),GTE:new gt._Code(">="),LT:new gt._Code("<"),LTE:new gt._Code("<="),EQ:new gt._Code("==="),NEQ:new gt._Code("!=="),NOT:new gt._Code("!"),OR:new gt._Code("||"),AND:new gt._Code("&&"),ADD:new gt._Code("+")};var Ro=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},rz=class extends Ro{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?qi.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=ju(this.rhs,e,r)),this}get names(){return this.rhs instanceof gt._CodeOrName?this.rhs.names:{}}},jy=class extends Ro{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof gt.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=ju(this.rhs,e,r),this}get names(){let e=this.lhs instanceof gt.Name?{}:{...this.lhs.names};return Cy(e,this.rhs)}},nz=class extends jy{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},iz=class extends Ro{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},oz=class extends Ro{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},az=class extends Ro{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},sz=class extends Ro{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=ju(this.code,e,r),this}get names(){return this.code instanceof gt._CodeOrName?this.code.names:{}}},hf=class extends Ro{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(Wfe(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Ts(e,r.names),{})}},Ao=class extends hf{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},cz=class extends hf{},Ou=class extends Ao{};Ou.kind="else";var Es=class t extends Ao{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Ou(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(aV(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=ju(this.condition,e,r),this}get names(){let e=super.names;return Cy(e,this.condition),this.else&&Ts(e,this.else.names),e}};Es.kind="if";var Ps=class extends Ao{};Ps.kind="for";var uz=class extends Ps{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=ju(this.iteration,e,r),this}get names(){return Ts(super.names,this.iteration.names)}},lz=class extends Ps{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?qi.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=Cy(super.names,this.from);return Cy(e,this.to)}},Ny=class extends Ps{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=ju(this.iterable,e,r),this}get names(){return Ts(super.names,this.iterable.names)}},gf=class extends Ao{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};gf.kind="func";var vf=class extends hf{render(e){return"return "+super.render(e)}};vf.kind="return";var dz=class extends Ao{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Ts(e,this.catch.names),this.finally&&Ts(e,this.finally.names),e}},yf=class extends Ao{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};yf.kind="catch";var _f=class extends Ao{render(e){return"finally"+super.render(e)}};_f.kind="finally";var pz=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
240
|
+
`:""},this._extScope=e,this._scope=new qi.Scope({parent:e}),this._nodes=[new cz]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new rz(e,o,n)),o}const(e,r,n){return this._def(qi.varKinds.const,e,r,n)}let(e,r,n){return this._def(qi.varKinds.let,e,r,n)}var(e,r,n){return this._def(qi.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new jy(e,r,n))}add(e,r){return this._leafNode(new nz(e,nt.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==gt.nil&&this._leafNode(new sz(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,gt.addCodeArg)(r,i));return r.push("}"),new gt._Code(r)}if(e,r,n){if(this._blockNode(new Es(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Es(e))}else(){return this._elseNode(new Ou)}endIf(){return this._endBlockNode(Es,Ou)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new uz(e),r)}forRange(e,r,n,i,o=this.opts.es5?qi.varKinds.var:qi.varKinds.let){let a=this._scope.toName(e);return this._for(new lz(o,a,r,n),()=>i(a))}forOf(e,r,n,i=qi.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof gt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,gt._)`${a}.length`,s=>{this.var(o,(0,gt._)`${a}[${s}]`),n(o)})}return this._for(new Ny("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?qi.varKinds.var:qi.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,gt._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new Ny("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Ps)}label(e){return this._leafNode(new iz(e))}break(e){return this._leafNode(new oz(e))}return(e){let r=new vf;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(vf)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new dz;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new yf(o),r(o)}return n&&(this._currNode=i.finally=new _f,this.code(n)),this._endBlockNode(yf,_f)}throw(e){return this._leafNode(new az(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=gt.nil,n,i){return this._blockNode(new gf(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(gf)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Es))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};nt.CodeGen=pz;function Ts(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Cy(t,e){return e instanceof gt._CodeOrName?Ts(t,e.names):t}function ju(t,e,r){if(t instanceof gt.Name)return n(t);if(!i(t))return t;return new gt._Code(t._items.reduce((o,a)=>(a instanceof gt.Name&&(a=n(a)),a instanceof gt._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function i(o){return o instanceof gt._Code&&o._items.some(a=>a instanceof gt.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function Wfe(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function aV(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,gt._)`!${fz(t)}`}nt.not=aV;var Bfe=sV(nt.operators.AND);function Kfe(...t){return t.reduce(Bfe)}nt.and=Kfe;var Hfe=sV(nt.operators.OR);function Gfe(...t){return t.reduce(Hfe)}nt.or=Gfe;function sV(t){return(e,r)=>e===gt.nil?r:r===gt.nil?e:(0,gt._)`${fz(e)} ${t} ${fz(r)}`}function fz(t){return t instanceof gt.Name?t:(0,gt._)`(${t})`}});var _t=O(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.checkStrictMode=st.getErrorPath=st.Type=st.useFunc=st.setEvaluated=st.evaluatedPropsToName=st.mergeEvaluated=st.eachItem=st.unescapeJsonPointer=st.escapeJsonPointer=st.escapeFragment=st.unescapeFragment=st.schemaRefOrVal=st.schemaHasRulesButRef=st.schemaHasRules=st.checkUnknownRules=st.alwaysValidSchema=st.toHash=void 0;var Ft=at(),Qfe=mf();function Yfe(t){let e={};for(let r of t)e[r]=!0;return e}st.toHash=Yfe;function Jfe(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(lV(t,e),!dV(e,t.self.RULES.all))}st.alwaysValidSchema=Jfe;function lV(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||mV(t,`unknown keyword: "${o}"`)}st.checkUnknownRules=lV;function dV(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}st.schemaHasRules=dV;function Xfe(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}st.schemaHasRulesButRef=Xfe;function eme({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Ft._)`${r}`}return(0,Ft._)`${t}${e}${(0,Ft.getProperty)(n)}`}st.schemaRefOrVal=eme;function tme(t){return pV(decodeURIComponent(t))}st.unescapeFragment=tme;function rme(t){return encodeURIComponent(hz(t))}st.escapeFragment=rme;function hz(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}st.escapeJsonPointer=hz;function pV(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}st.unescapeJsonPointer=pV;function nme(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}st.eachItem=nme;function cV({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,a,s)=>{let c=a===void 0?o:a instanceof Ft.Name?(o instanceof Ft.Name?t(i,o,a):e(i,o,a),a):o instanceof Ft.Name?(e(i,a,o),o):r(o,a);return s===Ft.Name&&!(c instanceof Ft.Name)?n(i,c):c}}st.mergeEvaluated={props:cV({mergeNames:(t,e,r)=>t.if((0,Ft._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Ft._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Ft._)`${r} || {}`).code((0,Ft._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Ft._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Ft._)`${r} || {}`),gz(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:fV}),items:cV({mergeNames:(t,e,r)=>t.if((0,Ft._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Ft._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Ft._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Ft._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function fV(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Ft._)`{}`);return e!==void 0&&gz(t,r,e),r}st.evaluatedPropsToName=fV;function gz(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Ft._)`${e}${(0,Ft.getProperty)(n)}`,!0))}st.setEvaluated=gz;var uV={};function ime(t,e){return t.scopeValue("func",{ref:e,code:uV[e.code]||(uV[e.code]=new Qfe._Code(e.code))})}st.useFunc=ime;var mz;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(mz||(st.Type=mz={}));function ome(t,e,r){if(t instanceof Ft.Name){let n=e===mz.Num;return r?n?(0,Ft._)`"[" + ${t} + "]"`:(0,Ft._)`"['" + ${t} + "']"`:n?(0,Ft._)`"/" + ${t}`:(0,Ft._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Ft.getProperty)(t).toString():"/"+hz(t)}st.getErrorPath=ome;function mV(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}st.checkStrictMode=mV});var Uo=O(vz=>{"use strict";Object.defineProperty(vz,"__esModule",{value:!0});var Vr=at(),ame={data:new Vr.Name("data"),valCxt:new Vr.Name("valCxt"),instancePath:new Vr.Name("instancePath"),parentData:new Vr.Name("parentData"),parentDataProperty:new Vr.Name("parentDataProperty"),rootData:new Vr.Name("rootData"),dynamicAnchors:new Vr.Name("dynamicAnchors"),vErrors:new Vr.Name("vErrors"),errors:new Vr.Name("errors"),this:new Vr.Name("this"),self:new Vr.Name("self"),scope:new Vr.Name("scope"),json:new Vr.Name("json"),jsonPos:new Vr.Name("jsonPos"),jsonLen:new Vr.Name("jsonLen"),jsonPart:new Vr.Name("jsonPart")};vz.default=ame});var bf=O(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.extendErrors=Wr.resetErrorsCount=Wr.reportExtraError=Wr.reportError=Wr.keyword$DataError=Wr.keywordError=void 0;var bt=at(),Ay=_t(),pn=Uo();Wr.keywordError={message:({keyword:t})=>(0,bt.str)`must pass "${t}" keyword validation`};Wr.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,bt.str)`"${t}" keyword must be ${e} ($data)`:(0,bt.str)`"${t}" keyword is invalid ($data)`};function sme(t,e=Wr.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:a,allErrors:s}=i,c=vV(t,e,r);n??(a||s)?hV(o,c):gV(i,(0,bt._)`[${c}]`)}Wr.reportError=sme;function cme(t,e=Wr.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,s=vV(t,e,r);hV(i,s),o||a||gV(n,pn.default.vErrors)}Wr.reportExtraError=cme;function ume(t,e){t.assign(pn.default.errors,e),t.if((0,bt._)`${pn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,bt._)`${pn.default.vErrors}.length`,e),()=>t.assign(pn.default.vErrors,null)))}Wr.resetErrorsCount=ume;function lme({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",i,pn.default.errors,s=>{t.const(a,(0,bt._)`${pn.default.vErrors}[${s}]`),t.if((0,bt._)`${a}.instancePath === undefined`,()=>t.assign((0,bt._)`${a}.instancePath`,(0,bt.strConcat)(pn.default.instancePath,o.errorPath))),t.assign((0,bt._)`${a}.schemaPath`,(0,bt.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,bt._)`${a}.schema`,r),t.assign((0,bt._)`${a}.data`,n))})}Wr.extendErrors=lme;function hV(t,e){let r=t.const("err",e);t.if((0,bt._)`${pn.default.vErrors} === null`,()=>t.assign(pn.default.vErrors,(0,bt._)`[${r}]`),(0,bt._)`${pn.default.vErrors}.push(${r})`),t.code((0,bt._)`${pn.default.errors}++`)}function gV(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,bt._)`new ${t.ValidationError}(${e})`):(r.assign((0,bt._)`${n}.errors`,e),r.return(!1))}var zs={keyword:new bt.Name("keyword"),schemaPath:new bt.Name("schemaPath"),params:new bt.Name("params"),propertyName:new bt.Name("propertyName"),message:new bt.Name("message"),schema:new bt.Name("schema"),parentSchema:new bt.Name("parentSchema")};function vV(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,bt._)`{}`:dme(t,e,r)}function dme(t,e,r={}){let{gen:n,it:i}=t,o=[pme(i,r),fme(t,r)];return mme(t,e,o),n.object(...o)}function pme({errorPath:t},{instancePath:e}){let r=e?(0,bt.str)`${t}${(0,Ay.getErrorPath)(e,Ay.Type.Str)}`:t;return[pn.default.instancePath,(0,bt.strConcat)(pn.default.instancePath,r)]}function fme({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,bt.str)`${e}/${t}`;return r&&(i=(0,bt.str)`${i}${(0,Ay.getErrorPath)(r,Ay.Type.Str)}`),[zs.schemaPath,i]}function mme(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:a,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;n.push([zs.keyword,i],[zs.params,typeof e=="function"?e(t):e||(0,bt._)`{}`]),c.messages&&n.push([zs.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([zs.schema,a],[zs.parentSchema,(0,bt._)`${l}${d}`],[pn.default.data,o]),u&&n.push([zs.propertyName,u])}});var _V=O(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.boolOrEmptySchema=Nu.topBoolOrEmptySchema=void 0;var hme=bf(),gme=at(),vme=Uo(),yme={message:"boolean schema is false"};function _me(t){let{gen:e,schema:r,validateName:n}=t;r===!1?yV(t,!1):typeof r=="object"&&r.$async===!0?e.return(vme.default.data):(e.assign((0,gme._)`${n}.errors`,null),e.return(!0))}Nu.topBoolOrEmptySchema=_me;function bme(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),yV(t)):r.var(e,!0)}Nu.boolOrEmptySchema=bme;function yV(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,hme.reportError)(i,yme,void 0,e)}});var yz=O(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.getRules=Cu.isJSONType=void 0;var xme=["string","number","integer","boolean","null","object","array"],wme=new Set(xme);function kme(t){return typeof t=="string"&&wme.has(t)}Cu.isJSONType=kme;function Sme(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Cu.getRules=Sme});var _z=O(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa.shouldUseRule=Sa.shouldUseGroup=Sa.schemaHasRulesForType=void 0;function $me({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&bV(t,n)}Sa.schemaHasRulesForType=$me;function bV(t,e){return e.rules.some(r=>xV(t,r))}Sa.shouldUseGroup=bV;function xV(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Sa.shouldUseRule=xV});var xf=O(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.reportTypeError=Br.checkDataTypes=Br.checkDataType=Br.coerceAndCheckDataType=Br.getJSONTypes=Br.getSchemaTypes=Br.DataType=void 0;var Ime=yz(),Eme=_z(),Pme=bf(),Qe=at(),wV=_t(),Ru;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Ru||(Br.DataType=Ru={}));function Tme(t){let e=kV(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Br.getSchemaTypes=Tme;function kV(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Ime.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Br.getJSONTypes=kV;function zme(t,e){let{gen:r,data:n,opts:i}=t,o=Ome(e,i.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,Eme.schemaHasRulesForType)(t,e[0]));if(a){let s=xz(e,n,i.strictNumbers,Ru.Wrong);r.if(s,()=>{o.length?jme(t,e,o):wz(t)})}return a}Br.coerceAndCheckDataType=zme;var SV=new Set(["string","number","integer","boolean","null"]);function Ome(t,e){return e?t.filter(r=>SV.has(r)||e==="array"&&r==="array"):[]}function jme(t,e,r){let{gen:n,data:i,opts:o}=t,a=n.let("dataType",(0,Qe._)`typeof ${i}`),s=n.let("coerced",(0,Qe._)`undefined`);o.coerceTypes==="array"&&n.if((0,Qe._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Qe._)`${i}[0]`).assign(a,(0,Qe._)`typeof ${i}`).if(xz(e,i,o.strictNumbers),()=>n.assign(s,i))),n.if((0,Qe._)`${s} !== undefined`);for(let u of r)(SV.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);n.else(),wz(t),n.endIf(),n.if((0,Qe._)`${s} !== undefined`,()=>{n.assign(i,s),Nme(t,s)});function c(u){switch(u){case"string":n.elseIf((0,Qe._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,Qe._)`"" + ${i}`).elseIf((0,Qe._)`${i} === null`).assign(s,(0,Qe._)`""`);return;case"number":n.elseIf((0,Qe._)`${a} == "boolean" || ${i} === null
|
|
241
|
+
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Qe._)`+${i}`);return;case"integer":n.elseIf((0,Qe._)`${a} === "boolean" || ${i} === null
|
|
242
|
+
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,Qe._)`+${i}`);return;case"boolean":n.elseIf((0,Qe._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,Qe._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,Qe._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,Qe._)`${a} === "string" || ${a} === "number"
|
|
243
|
+
|| ${a} === "boolean" || ${i} === null`).assign(s,(0,Qe._)`[${i}]`)}}}function Nme({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Qe._)`${e} !== undefined`,()=>t.assign((0,Qe._)`${e}[${r}]`,n))}function bz(t,e,r,n=Ru.Correct){let i=n===Ru.Correct?Qe.operators.EQ:Qe.operators.NEQ,o;switch(t){case"null":return(0,Qe._)`${e} ${i} null`;case"array":o=(0,Qe._)`Array.isArray(${e})`;break;case"object":o=(0,Qe._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,Qe._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,Qe._)`typeof ${e} ${i} ${t}`}return n===Ru.Correct?o:(0,Qe.not)(o);function a(s=Qe.nil){return(0,Qe.and)((0,Qe._)`typeof ${e} == "number"`,s,r?(0,Qe._)`isFinite(${e})`:Qe.nil)}}Br.checkDataType=bz;function xz(t,e,r,n){if(t.length===1)return bz(t[0],e,r,n);let i,o=(0,wV.toHash)(t);if(o.array&&o.object){let a=(0,Qe._)`typeof ${e} != "object"`;i=o.null?a:(0,Qe._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Qe.nil;o.number&&delete o.integer;for(let a in o)i=(0,Qe.and)(i,bz(a,e,r,n));return i}Br.checkDataTypes=xz;var Cme={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Qe._)`{type: ${t}}`:(0,Qe._)`{type: ${e}}`};function wz(t){let e=Rme(t);(0,Pme.reportError)(e,Cme)}Br.reportTypeError=wz;function Rme(t){let{gen:e,data:r,schema:n}=t,i=(0,wV.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var IV=O(Uy=>{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});Uy.assignDefaults=void 0;var Au=at(),Ame=_t();function Ume(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)$V(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>$V(t,o,i.default))}Uy.assignDefaults=Ume;function $V(t,e,r){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(r===void 0)return;let s=(0,Au._)`${o}${(0,Au.getProperty)(e)}`;if(i){(0,Ame.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,Au._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,Au._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,Au._)`${s} = ${(0,Au.stringify)(r)}`)}});var hi=O(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.validateUnion=Rt.validateArray=Rt.usePattern=Rt.callValidateCode=Rt.schemaProperties=Rt.allSchemaProperties=Rt.noPropertyInData=Rt.propertyInData=Rt.isOwnProperty=Rt.hasPropFunc=Rt.reportMissingProp=Rt.checkMissingProp=Rt.checkReportMissingProp=void 0;var Jt=at(),kz=_t(),$a=Uo(),Dme=_t();function Mme(t,e){let{gen:r,data:n,it:i}=t;r.if($z(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Jt._)`${e}`},!0),t.error()})}Rt.checkReportMissingProp=Mme;function qme({gen:t,data:e,it:{opts:r}},n,i){return(0,Jt.or)(...n.map(o=>(0,Jt.and)($z(t,e,o,r.ownProperties),(0,Jt._)`${i} = ${o}`)))}Rt.checkMissingProp=qme;function Zme(t,e){t.setParams({missingProperty:e},!0),t.error()}Rt.reportMissingProp=Zme;function EV(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Jt._)`Object.prototype.hasOwnProperty`})}Rt.hasPropFunc=EV;function Sz(t,e,r){return(0,Jt._)`${EV(t)}.call(${e}, ${r})`}Rt.isOwnProperty=Sz;function Lme(t,e,r,n){let i=(0,Jt._)`${e}${(0,Jt.getProperty)(r)} !== undefined`;return n?(0,Jt._)`${i} && ${Sz(t,e,r)}`:i}Rt.propertyInData=Lme;function $z(t,e,r,n){let i=(0,Jt._)`${e}${(0,Jt.getProperty)(r)} === undefined`;return n?(0,Jt.or)(i,(0,Jt.not)(Sz(t,e,r))):i}Rt.noPropertyInData=$z;function PV(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Rt.allSchemaProperties=PV;function Fme(t,e){return PV(e).filter(r=>!(0,kz.alwaysValidSchema)(t,e[r]))}Rt.schemaProperties=Fme;function Vme({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,c,u){let l=u?(0,Jt._)`${t}, ${e}, ${n}${i}`:e,d=[[$a.default.instancePath,(0,Jt.strConcat)($a.default.instancePath,o)],[$a.default.parentData,a.parentData],[$a.default.parentDataProperty,a.parentDataProperty],[$a.default.rootData,$a.default.rootData]];a.opts.dynamicRef&&d.push([$a.default.dynamicAnchors,$a.default.dynamicAnchors]);let p=(0,Jt._)`${l}, ${r.object(...d)}`;return c!==Jt.nil?(0,Jt._)`${s}.call(${c}, ${p})`:(0,Jt._)`${s}(${p})`}Rt.callValidateCode=Vme;var Wme=(0,Jt._)`new RegExp`;function Bme({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Jt._)`${i.code==="new RegExp"?Wme:(0,Dme.useFunc)(t,i)}(${r}, ${n})`})}Rt.usePattern=Bme;function Kme(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let c=e.const("len",(0,Jt._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:kz.Type.Num},o),e.if((0,Jt.not)(o),s)})}}Rt.validateArray=Kme;function Hme(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,kz.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let l=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},s);e.assign(a,(0,Jt._)`${a} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,Jt.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}Rt.validateUnion=Hme});var OV=O(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.validateKeywordUsage=io.validSchemaType=io.funcKeywordCode=io.macroKeywordCode=void 0;var fn=at(),Os=Uo(),Gme=hi(),Qme=bf();function Yme(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=t,s=e.macro.call(a.self,i,o,a),c=zV(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=r.name("valid");t.subschema({schema:s,schemaPath:fn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}io.macroKeywordCode=Yme;function Jme(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:c}=t;ehe(c,e);let u=!s&&e.compile?e.compile.call(c.self,o,a,c):e.validate,l=zV(n,i,u),d=n.let("valid");t.block$data(d,p),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function p(){if(e.errors===!1)v(),e.modifying&&TV(t),g(()=>t.error());else{let h=e.async?f():m();e.modifying&&TV(t),g(()=>Xme(t,h))}}function f(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,fn._)`await `),_=>n.assign(d,!1).if((0,fn._)`${_} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,fn._)`${_}.errors`),()=>n.throw(_))),h}function m(){let h=(0,fn._)`${l}.errors`;return n.assign(h,null),v(fn.nil),h}function v(h=e.async?(0,fn._)`await `:fn.nil){let _=c.opts.passContext?Os.default.this:Os.default.self,y=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,fn._)`${h}${(0,Gme.callValidateCode)(t,l,_,y)}`,e.modifying)}function g(h){var _;n.if((0,fn.not)((_=e.valid)!==null&&_!==void 0?_:d),h)}}io.funcKeywordCode=Jme;function TV(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,fn._)`${n.parentData}[${n.parentDataProperty}]`))}function Xme(t,e){let{gen:r}=t;r.if((0,fn._)`Array.isArray(${e})`,()=>{r.assign(Os.default.vErrors,(0,fn._)`${Os.default.vErrors} === null ? ${e} : ${Os.default.vErrors}.concat(${e})`).assign(Os.default.errors,(0,fn._)`${Os.default.vErrors}.length`),(0,Qme.extendErrors)(t)},()=>t.error())}function ehe({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function zV(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,fn.stringify)(r)})}function the(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}io.validSchemaType=the;function rhe({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}io.validateKeywordUsage=rhe});var NV=O(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.extendSubschemaMode=Ia.extendSubschemaData=Ia.getSubschema=void 0;var oo=at(),jV=_t();function nhe(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,oo._)`${t.schemaPath}${(0,oo.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,oo._)`${t.schemaPath}${(0,oo.getProperty)(e)}${(0,oo.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,jV.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Ia.getSubschema=nhe;function ihe(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=e,p=s.let("data",(0,oo._)`${e.data}${(0,oo.getProperty)(r)}`,!0);c(p),t.errorPath=(0,oo.str)`${u}${(0,jV.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,oo._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(i!==void 0){let u=i instanceof oo.Name?i:s.let("data",i,!0);c(u),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}Ia.extendSubschemaData=ihe;function ohe(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Ia.extendSubschemaMode=ohe});var wf=O((u2e,CV)=>{"use strict";CV.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}});var AV=O((l2e,RV)=>{"use strict";var Ea=RV.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};Dy(e,n,i,t,"",t)};Ea.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ea.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ea.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ea.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Dy(t,e,r,n,i,o,a,s,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in Ea.arrayKeywords)for(var p=0;p<d.length;p++)Dy(t,e,r,d[p],i+"/"+l+"/"+p,o,i,l,n,p)}else if(l in Ea.propsKeywords){if(d&&typeof d=="object")for(var f in d)Dy(t,e,r,d[f],i+"/"+l+"/"+ahe(f),o,i,l,n,f)}else(l in Ea.keywords||t.allKeys&&!(l in Ea.skipKeywords))&&Dy(t,e,r,d,i+"/"+l,o,i,l,n)}r(n,i,o,a,s,c,u)}}function ahe(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var kf=O(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.getSchemaRefs=En.resolveUrl=En.normalizeId=En._getFullPath=En.getFullPath=En.inlineRef=void 0;var she=_t(),che=wf(),uhe=AV(),lhe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function dhe(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Iz(t):e?UV(t)<=e:!1}En.inlineRef=dhe;var phe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Iz(t){for(let e in t){if(phe.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Iz)||typeof r=="object"&&Iz(r))return!0}return!1}function UV(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!lhe.has(r)&&(typeof t[r]=="object"&&(0,she.eachItem)(t[r],n=>e+=UV(n)),e===1/0))return 1/0}return e}function DV(t,e="",r){r!==!1&&(e=Uu(e));let n=t.parse(e);return MV(t,n)}En.getFullPath=DV;function MV(t,e){return t.serialize(e).split("#")[0]+"#"}En._getFullPath=MV;var fhe=/#\/?$/;function Uu(t){return t?t.replace(fhe,""):""}En.normalizeId=Uu;function mhe(t,e,r){return r=Uu(r),t.resolve(e,r)}En.resolveUrl=mhe;var hhe=/^[a-z_][-a-z0-9._]*$/i;function ghe(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Uu(t[r]||e),o={"":i},a=DV(n,i,!1),s={},c=new Set;return uhe(t,{allKeys:!0},(d,p,f,m)=>{if(m===void 0)return;let v=a+p,g=o[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),_.call(this,d.$anchor),_.call(this,d.$dynamicAnchor),o[p]=g;function h(y){let b=this.opts.uriResolver.resolve;if(y=Uu(g?b(g,y):y),c.has(y))throw l(y);c.add(y);let x=this.refs[y];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?u(d,x.schema,y):y!==Uu(v)&&(y[0]==="#"?(u(d,s[y],y),s[y]=d):this.refs[y]=v),y}function _(y){if(typeof y=="string"){if(!hhe.test(y))throw new Error(`invalid anchor "${y}"`);h.call(this,`#${y}`)}}}),s;function u(d,p,f){if(p!==void 0&&!che(d,p))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}En.getSchemaRefs=ghe});var If=O(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.getData=Pa.KeywordCxt=Pa.validateFunctionCode=void 0;var VV=_V(),qV=xf(),Pz=_z(),My=xf(),vhe=IV(),$f=OV(),Ez=NV(),$e=at(),Me=Uo(),yhe=kf(),Do=_t(),Sf=bf();function _he(t){if(KV(t)&&(HV(t),BV(t))){whe(t);return}WV(t,()=>(0,VV.topBoolOrEmptySchema)(t))}Pa.validateFunctionCode=_he;function WV({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,$e._)`${Me.default.data}, ${Me.default.valCxt}`,n.$async,()=>{t.code((0,$e._)`"use strict"; ${ZV(r,i)}`),xhe(t,i),t.code(o)}):t.func(e,(0,$e._)`${Me.default.data}, ${bhe(i)}`,n.$async,()=>t.code(ZV(r,i)).code(o))}function bhe(t){return(0,$e._)`{${Me.default.instancePath}="", ${Me.default.parentData}, ${Me.default.parentDataProperty}, ${Me.default.rootData}=${Me.default.data}${t.dynamicRef?(0,$e._)`, ${Me.default.dynamicAnchors}={}`:$e.nil}}={}`}function xhe(t,e){t.if(Me.default.valCxt,()=>{t.var(Me.default.instancePath,(0,$e._)`${Me.default.valCxt}.${Me.default.instancePath}`),t.var(Me.default.parentData,(0,$e._)`${Me.default.valCxt}.${Me.default.parentData}`),t.var(Me.default.parentDataProperty,(0,$e._)`${Me.default.valCxt}.${Me.default.parentDataProperty}`),t.var(Me.default.rootData,(0,$e._)`${Me.default.valCxt}.${Me.default.rootData}`),e.dynamicRef&&t.var(Me.default.dynamicAnchors,(0,$e._)`${Me.default.valCxt}.${Me.default.dynamicAnchors}`)},()=>{t.var(Me.default.instancePath,(0,$e._)`""`),t.var(Me.default.parentData,(0,$e._)`undefined`),t.var(Me.default.parentDataProperty,(0,$e._)`undefined`),t.var(Me.default.rootData,Me.default.data),e.dynamicRef&&t.var(Me.default.dynamicAnchors,(0,$e._)`{}`)})}function whe(t){let{schema:e,opts:r,gen:n}=t;WV(t,()=>{r.$comment&&e.$comment&&QV(t),Ehe(t),n.let(Me.default.vErrors,null),n.let(Me.default.errors,0),r.unevaluated&&khe(t),GV(t),zhe(t)})}function khe(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,$e._)`${r}.evaluated`),e.if((0,$e._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,$e._)`${t.evaluated}.props`,(0,$e._)`undefined`)),e.if((0,$e._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,$e._)`${t.evaluated}.items`,(0,$e._)`undefined`))}function ZV(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,$e._)`/*# sourceURL=${r} */`:$e.nil}function She(t,e){if(KV(t)&&(HV(t),BV(t))){$he(t,e);return}(0,VV.boolOrEmptySchema)(t,e)}function BV({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function KV(t){return typeof t.schema!="boolean"}function $he(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&QV(t),Phe(t),The(t);let o=n.const("_errs",Me.default.errors);GV(t,o),n.var(e,(0,$e._)`${o} === ${Me.default.errors}`)}function HV(t){(0,Do.checkUnknownRules)(t),Ihe(t)}function GV(t,e){if(t.opts.jtd)return LV(t,[],!1,e);let r=(0,qV.getSchemaTypes)(t.schema),n=(0,qV.coerceAndCheckDataType)(t,r);LV(t,r,!n,e)}function Ihe(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Do.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Ehe(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Do.checkStrictMode)(t,"default is ignored in the schema root")}function Phe(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,yhe.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function The(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function QV({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,$e._)`${Me.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,$e.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,$e._)`${Me.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function zhe(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,$e._)`${Me.default.errors} === 0`,()=>e.return(Me.default.data),()=>e.throw((0,$e._)`new ${i}(${Me.default.vErrors})`)):(e.assign((0,$e._)`${n}.errors`,Me.default.vErrors),o.unevaluated&&Ohe(t),e.return((0,$e._)`${Me.default.errors} === 0`))}function Ohe({gen:t,evaluated:e,props:r,items:n}){r instanceof $e.Name&&t.assign((0,$e._)`${e}.props`,r),n instanceof $e.Name&&t.assign((0,$e._)`${e}.items`,n)}function LV(t,e,r,n){let{gen:i,schema:o,data:a,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Do.schemaHasRulesButRef)(o,l))){i.block(()=>JV(t,"$ref",l.all.$ref.definition));return}c.jtd||jhe(t,e),i.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,Pz.shouldUseGroup)(o,p)&&(p.type?(i.if((0,My.checkDataType)(p.type,a,c.strictNumbers)),FV(t,p),e.length===1&&e[0]===p.type&&r&&(i.else(),(0,My.reportTypeError)(t)),i.endIf()):FV(t,p),s||i.if((0,$e._)`${Me.default.errors} === ${n||0}`))}}function FV(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,vhe.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Pz.shouldUseRule)(n,o)&&JV(t,o.keyword,o.definition,e.type)})}function jhe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Nhe(t,e),t.opts.allowUnionTypes||Che(t,e),Rhe(t,t.dataTypes))}function Nhe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{YV(t.dataTypes,r)||Tz(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Uhe(t,e)}}function Che(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Tz(t,"use allowUnionTypes to allow union type keyword")}function Rhe(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Pz.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>Ahe(e,a))&&Tz(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function Ahe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function YV(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Uhe(t,e){let r=[];for(let n of t.dataTypes)YV(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Tz(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Do.checkStrictMode)(t,e,t.opts.strictTypes)}var qy=class{constructor(e,r,n){if((0,$f.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Do.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",XV(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,$f.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Me.default.errors))}result(e,r,n){this.failResult((0,$e.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,$e.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,$e._)`${r} !== undefined && (${(0,$e.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Sf.reportExtraError:Sf.reportError)(this,this.def.error,r)}$dataError(){(0,Sf.reportError)(this,this.def.$dataError||Sf.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Sf.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=$e.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=$e.nil,r=$e.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,$e.or)((0,$e._)`${i} === undefined`,r)),e!==$e.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==$e.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,$e.or)(a(),s());function a(){if(n.length){if(!(r instanceof $e.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,$e._)`${(0,My.checkDataTypes)(c,r,o.opts.strictNumbers,My.DataType.Wrong)}`}return $e.nil}function s(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,$e._)`!${c}(${r})`}return $e.nil}}subschema(e,r){let n=(0,Ez.getSubschema)(this.it,e);(0,Ez.extendSubschemaData)(n,this.it,e),(0,Ez.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return She(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Do.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Do.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,$e.Name)),!0}};Pa.KeywordCxt=qy;function JV(t,e,r,n){let i=new qy(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,$f.funcKeywordCode)(i,r):"macro"in r?(0,$f.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,$f.funcKeywordCode)(i,r)}var Dhe=/^\/(?:[^~]|~0|~1)*$/,Mhe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function XV(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Me.default.rootData;if(t[0]==="/"){if(!Dhe.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Me.default.rootData}else{let u=Mhe.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(i=u[2],i==="#"){if(l>=e)throw new Error(c("property/index",l));return n[e-l]}if(l>e)throw new Error(c("data",l));if(o=r[e-l],!i)return o}let a=o,s=i.split("/");for(let u of s)u&&(o=(0,$e._)`${o}${(0,$e.getProperty)((0,Do.unescapeJsonPointer)(u))}`,a=(0,$e._)`${a} && ${o}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}Pa.getData=XV});var Zy=O(Oz=>{"use strict";Object.defineProperty(Oz,"__esModule",{value:!0});var zz=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Oz.default=zz});var Ef=O(Cz=>{"use strict";Object.defineProperty(Cz,"__esModule",{value:!0});var jz=kf(),Nz=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,jz.resolveUrl)(e,r,n),this.missingSchema=(0,jz.normalizeId)((0,jz.getFullPath)(e,this.missingRef))}};Cz.default=Nz});var Fy=O(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.resolveSchema=gi.getCompilingSchema=gi.resolveRef=gi.compileSchema=gi.SchemaEnv=void 0;var Zi=at(),qhe=Zy(),js=Uo(),Li=kf(),eW=_t(),Zhe=If(),Du=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Li.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};gi.SchemaEnv=Du;function Az(t){let e=tW.call(this,t);if(e)return e;let r=(0,Li.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new Zi.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:qhe.default,code:(0,Zi._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");t.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:js.default.data,parentData:js.default.parentData,parentDataProperty:js.default.parentDataProperty,dataNames:[js.default.data],dataPathArr:[Zi.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Zi.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Zi.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Zi._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,Zhe.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(js.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let f=new Function(`${js.default.self}`,`${js.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:v}=u;f.evaluated={props:m instanceof Zi.Name?void 0:m,items:v instanceof Zi.Name?void 0:v,dynamicProps:m instanceof Zi.Name,dynamicItems:v instanceof Zi.Name},f.source&&(f.source.evaluated=(0,Zi.stringify)(f.evaluated))}return t.validate=f,t}catch(d){throw delete t.validate,delete t.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(t)}}gi.compileSchema=Az;function Lhe(t,e,r){var n;r=(0,Li.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=Whe.call(this,t,r);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new Du({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=Fhe.call(this,o)}gi.resolveRef=Lhe;function Fhe(t){return(0,Li.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Az.call(this,t)}function tW(t){for(let e of this._compilations)if(Vhe(e,t))return e}gi.getCompilingSchema=tW;function Vhe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Whe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Ly.call(this,t,e)}function Ly(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Li._getFullPath)(this.opts.uriResolver,r),i=(0,Li.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Rz.call(this,r,t);let o=(0,Li.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=Ly.call(this,t,a);return typeof s?.schema!="object"?void 0:Rz.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||Az.call(this,a),o===(0,Li.normalizeId)(e)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,Li.resolveUrl)(this.opts.uriResolver,i,u)),new Du({schema:s,schemaId:c,root:t,baseId:i})}return Rz.call(this,r,a)}}gi.resolveSchema=Ly;var Bhe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Rz(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,eW.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Bhe.has(s)&&u&&(e=(0,Li.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,eW.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Li.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Ly.call(this,n,s)}let{schemaId:a}=this.opts;if(o=o||new Du({schema:r,schemaId:a,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var rW=O((g2e,Khe)=>{Khe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Dz=O((v2e,aW)=>{"use strict";var Hhe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),iW=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);function Uz(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var Ghe=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function nW(t){return t.length=0,!0}function Qhe(t,e,r){if(t.length){let n=Uz(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function Yhe(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,a=!1,s=Qhe;for(let c=0;c<t.length;c++){let u=t[c];if(!(u==="["||u==="]"))if(u===":"){if(o===!0&&(a=!0),!s(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(o=!0),n.push(":");continue}else if(u==="%"){if(!s(i,n,r))break;s=nW}else{i.push(u);continue}}return i.length&&(s===nW?r.zone=i.join(""):a?n.push(i.join("")):n.push(Uz(i))),r.address=n.join(""),r}function oW(t){if(Jhe(t,":")<2)return{host:t,isIPV6:!1};let e=Yhe(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function Jhe(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function Xhe(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}function ege(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function tge(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!iW(r)){let n=oW(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}aW.exports={nonSimpleDomain:Ghe,recomposeAuthority:tge,normalizeComponentEncoding:ege,removeDotSegments:Xhe,isIPv4:iW,isUUID:Hhe,normalizeIPv6:oW,stringArrayToHexStripped:Uz}});var dW=O((y2e,lW)=>{"use strict";var{isUUID:rge}=Dz(),nge=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,ige=["http","https","ws","wss","urn","urn:uuid"];function oge(t){return ige.indexOf(t)!==-1}function Mz(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function sW(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function cW(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function age(t){return t.secure=Mz(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function sge(t){if((t.port===(Mz(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function cge(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(nge);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=qz(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function uge(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=qz(i);o&&(t=o.serialize(t,e));let a=t,s=t.nss;return a.path=`${n||e.nid}:${s}`,e.skipEscape=!0,a}function lge(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!rge(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function dge(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var uW={scheme:"http",domainHost:!0,parse:sW,serialize:cW},pge={scheme:"https",domainHost:uW.domainHost,parse:sW,serialize:cW},Vy={scheme:"ws",domainHost:!0,parse:age,serialize:sge},fge={scheme:"wss",domainHost:Vy.domainHost,parse:Vy.parse,serialize:Vy.serialize},mge={scheme:"urn",parse:cge,serialize:uge,skipNormalize:!0},hge={scheme:"urn:uuid",parse:lge,serialize:dge,skipNormalize:!0},Wy={http:uW,https:pge,ws:Vy,wss:fge,urn:mge,"urn:uuid":hge};Object.setPrototypeOf(Wy,null);function qz(t){return t&&(Wy[t]||Wy[t.toLowerCase()])||void 0}lW.exports={wsIsSecure:Mz,SCHEMES:Wy,isValidSchemeName:oge,getSchemeHandler:qz}});var Lz=O((_2e,Ky)=>{"use strict";var{normalizeIPv6:gge,removeDotSegments:Pf,recomposeAuthority:vge,normalizeComponentEncoding:By,isIPv4:yge,nonSimpleDomain:_ge}=Dz(),{SCHEMES:bge,getSchemeHandler:pW}=dW();function xge(t,e){return typeof t=="string"?t=ao(Mo(t,e),e):typeof t=="object"&&(t=Mo(ao(t,e),e)),t}function wge(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=fW(Mo(t,n),Mo(e,n),n,!0);return n.skipEscape=!0,ao(i,n)}function fW(t,e,r,n){let i={};return n||(t=Mo(ao(t,r),r),e=Mo(ao(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Pf(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=Pf(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=Pf(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=Pf(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function kge(t,e,r){return typeof t=="string"?(t=unescape(t),t=ao(By(Mo(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=ao(By(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=ao(By(Mo(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=ao(By(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function ao(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),i=[],o=pW(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let a=vge(r);if(a!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(a),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let s=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(s=Pf(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),i.push(s)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var Sge=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Mo(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let o=t.match(Sge);if(o){if(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]),n.host)if(yge(n.host)===!1){let c=gge(n.host);n.host=c.host.toLowerCase(),i=c.isIPV6}else i=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=pW(r.scheme||n.scheme);if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&i===!1&&_ge(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(s){n.error=n.error||"Host's domain name can not be converted to ASCII: "+s}(!a||a&&!a.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Zz={SCHEMES:bge,normalize:xge,resolve:wge,resolveComponent:fW,equal:kge,serialize:ao,parse:Mo};Ky.exports=Zz;Ky.exports.default=Zz;Ky.exports.fastUri=Zz});var hW=O(Fz=>{"use strict";Object.defineProperty(Fz,"__esModule",{value:!0});var mW=Lz();mW.code='require("ajv/dist/runtime/uri").default';Fz.default=mW});var kW=O(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.CodeGen=Rr.Name=Rr.nil=Rr.stringify=Rr.str=Rr._=Rr.KeywordCxt=void 0;var $ge=If();Object.defineProperty(Rr,"KeywordCxt",{enumerable:!0,get:function(){return $ge.KeywordCxt}});var Mu=at();Object.defineProperty(Rr,"_",{enumerable:!0,get:function(){return Mu._}});Object.defineProperty(Rr,"str",{enumerable:!0,get:function(){return Mu.str}});Object.defineProperty(Rr,"stringify",{enumerable:!0,get:function(){return Mu.stringify}});Object.defineProperty(Rr,"nil",{enumerable:!0,get:function(){return Mu.nil}});Object.defineProperty(Rr,"Name",{enumerable:!0,get:function(){return Mu.Name}});Object.defineProperty(Rr,"CodeGen",{enumerable:!0,get:function(){return Mu.CodeGen}});var Ige=Zy(),bW=Ef(),Ege=yz(),Tf=Fy(),Pge=at(),zf=kf(),Hy=xf(),Wz=_t(),gW=rW(),Tge=hW(),xW=(t,e)=>new RegExp(t,e);xW.code="new RegExp";var zge=["removeAdditional","useDefaults","coerceTypes"],Oge=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),jge={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Nge={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},vW=200;function Cge(t){var e,r,n,i,o,a,s,c,u,l,d,p,f,m,v,g,h,_,y,b,x,w,k,$,T;let A=t.strict,z=(e=t.code)===null||e===void 0?void 0:e.optimize,M=z===!0||z===void 0?1:z||0,W=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:xW,R=(i=t.uriResolver)!==null&&i!==void 0?i:Tge.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:A)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:A)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:A)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=t.strictTuples)!==null&&d!==void 0?d:A)!==null&&p!==void 0?p:"log",strictRequired:(m=(f=t.strictRequired)!==null&&f!==void 0?f:A)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:M,regExp:W}:{optimize:M,regExp:W},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:vW,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:vW,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(_=t.messages)!==null&&_!==void 0?_:!0,inlineRefs:(y=t.inlineRefs)!==null&&y!==void 0?y:!0,schemaId:(b=t.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=t.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(k=t.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:($=t.unicodeRegExp)!==null&&$!==void 0?$:!0,int32range:(T=t.int32range)!==null&&T!==void 0?T:!0,uriResolver:R}}var Of=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Cge(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new Pge.ValueScope({scope:{},prefixes:Oge,es5:r,lines:n}),this.logger=qge(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Ege.getRules)(),yW.call(this,jge,e,"NOT SUPPORTED"),yW.call(this,Nge,e,"DEPRECATED","warn"),this._metaOpts=Dge.call(this),e.formats&&Age.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Uge.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Rge.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=gW;n==="id"&&(i={...gW},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(l,d){await o.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||a.call(this,p)}async function o(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof bW.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,l)}}function s({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await o.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,zf.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=_W.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Tf.SchemaEnv({schema:{},schemaId:n});if(r=Tf.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=_W.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,zf.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Lge.call(this,n,r),!r)return(0,Wz.eachItem)(n,o=>Vz.call(this,o)),this;Vge.call(this,r);let i={...r,type:(0,Hy.getJSONTypes)(r.type),schemaType:(0,Hy.getJSONTypes)(r.schemaType)};return(0,Wz.eachItem)(n,i.type.length===0?o=>Vz.call(this,o,i):o=>i.type.forEach(a=>Vz.call(this,o,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=a[s];u&&l&&(a[s]=wW(l))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,zf.normalizeId)(a||n);let u=zf.getSchemaRefs.call(this,e,n);return c=new Tf.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Tf.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{Tf.compileSchema.call(this,e)}finally{this.opts=r}}};Of.ValidationError=Ige.default;Of.MissingRefError=bW.default;Rr.default=Of;function yW(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function _W(t){return t=(0,zf.normalizeId)(t),this.schemas[t]||this.refs[t]}function Rge(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Age(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Uge(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Dge(){let t={...this.opts};for(let e of zge)delete t[e];return t}var Mge={log(){},warn(){},error(){}};function qge(t){if(t===!1)return Mge;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Zge=/^[a-z_$][a-z0-9_$:-]*$/i;function Lge(t,e){let{RULES:r}=this;if((0,Wz.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Zge.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Vz(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,Hy.getJSONTypes)(e.type),schemaType:(0,Hy.getJSONTypes)(e.schemaType)}};e.before?Fge.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function Fge(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Vge(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=wW(e)),t.validateSchema=this.compile(e,!0))}var Wge={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function wW(t){return{anyOf:[t,Wge]}}});var SW=O(Bz=>{"use strict";Object.defineProperty(Bz,"__esModule",{value:!0});var Bge={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Bz.default=Bge});var PW=O(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.callRef=Ns.getValidate=void 0;var Kge=Ef(),$W=hi(),Pn=at(),qu=Uo(),IW=Fy(),Gy=_t(),Hge={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:c}=n,{root:u}=o;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=IW.resolveRef.call(c,u,i,r);if(l===void 0)throw new Kge.default(n.opts.uriResolver,i,r);if(l instanceof IW.SchemaEnv)return p(l);return f(l);function d(){if(o===u)return Qy(t,a,o,o.$async);let m=e.scopeValue("root",{ref:u});return Qy(t,(0,Pn._)`${m}.validate`,u,u.$async)}function p(m){let v=EW(t,m);Qy(t,v,m,m.$async)}function f(m){let v=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,Pn.stringify)(m)}:{ref:m}),g=e.name("valid"),h=t.subschema({schema:m,dataTypes:[],schemaPath:Pn.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(h),t.ok(g)}}};function EW(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Pn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Ns.getValidate=EW;function Qy(t,e,r,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?qu.default.this:Pn.nil;n?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,Pn._)`await ${(0,$W.callValidateCode)(t,e,u)}`),f(e),a||i.assign(m,!0)},v=>{i.if((0,Pn._)`!(${v} instanceof ${o.ValidationError})`,()=>i.throw(v)),p(v),a||i.assign(m,!1)}),t.ok(m)}function d(){t.result((0,$W.callValidateCode)(t,e,u),()=>f(e),()=>p(e))}function p(m){let v=(0,Pn._)`${m}.errors`;i.assign(qu.default.vErrors,(0,Pn._)`${qu.default.vErrors} === null ? ${v} : ${qu.default.vErrors}.concat(${v})`),i.assign(qu.default.errors,(0,Pn._)`${qu.default.vErrors}.length`)}function f(m){var v;if(!o.opts.unevaluated)return;let g=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(o.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(o.props=Gy.mergeEvaluated.props(i,g.props,o.props));else{let h=i.var("props",(0,Pn._)`${m}.evaluated.props`);o.props=Gy.mergeEvaluated.props(i,h,o.props,Pn.Name)}if(o.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(o.items=Gy.mergeEvaluated.items(i,g.items,o.items));else{let h=i.var("items",(0,Pn._)`${m}.evaluated.items`);o.items=Gy.mergeEvaluated.items(i,h,o.items,Pn.Name)}}}Ns.callRef=Qy;Ns.default=Hge});var TW=O(Kz=>{"use strict";Object.defineProperty(Kz,"__esModule",{value:!0});var Gge=SW(),Qge=PW(),Yge=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Gge.default,Qge.default];Kz.default=Yge});var zW=O(Hz=>{"use strict";Object.defineProperty(Hz,"__esModule",{value:!0});var Yy=at(),Ta=Yy.operators,Jy={maximum:{okStr:"<=",ok:Ta.LTE,fail:Ta.GT},minimum:{okStr:">=",ok:Ta.GTE,fail:Ta.LT},exclusiveMaximum:{okStr:"<",ok:Ta.LT,fail:Ta.GTE},exclusiveMinimum:{okStr:">",ok:Ta.GT,fail:Ta.LTE}},Jge={message:({keyword:t,schemaCode:e})=>(0,Yy.str)`must be ${Jy[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Yy._)`{comparison: ${Jy[t].okStr}, limit: ${e}}`},Xge={keyword:Object.keys(Jy),type:"number",schemaType:"number",$data:!0,error:Jge,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Yy._)`${r} ${Jy[e].fail} ${n} || isNaN(${r})`)}};Hz.default=Xge});var OW=O(Gz=>{"use strict";Object.defineProperty(Gz,"__esModule",{value:!0});var jf=at(),eve={message:({schemaCode:t})=>(0,jf.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,jf._)`{multipleOf: ${t}}`},tve={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:eve,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,jf._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,jf._)`${a} !== parseInt(${a})`;t.fail$data((0,jf._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};Gz.default=tve});var NW=O(Qz=>{"use strict";Object.defineProperty(Qz,"__esModule",{value:!0});function jW(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}Qz.default=jW;jW.code='require("ajv/dist/runtime/ucs2length").default'});var CW=O(Yz=>{"use strict";Object.defineProperty(Yz,"__esModule",{value:!0});var Cs=at(),rve=_t(),nve=NW(),ive={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Cs.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Cs._)`{limit: ${t}}`},ove={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:ive,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Cs.operators.GT:Cs.operators.LT,a=i.opts.unicode===!1?(0,Cs._)`${r}.length`:(0,Cs._)`${(0,rve.useFunc)(t.gen,nve.default)}(${r})`;t.fail$data((0,Cs._)`${a} ${o} ${n}`)}};Yz.default=ove});var RW=O(Jz=>{"use strict";Object.defineProperty(Jz,"__esModule",{value:!0});var ave=hi(),sve=_t(),Zu=at(),cve={message:({schemaCode:t})=>(0,Zu.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Zu._)`{pattern: ${t}}`},uve={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:cve,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,Zu._)`new RegExp`:(0,sve.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,Zu._)`${u}(${o}, ${s}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,Zu._)`!${l}`)}else{let c=(0,ave.usePattern)(t,i);t.fail$data((0,Zu._)`!${c}.test(${r})`)}}};Jz.default=uve});var AW=O(Xz=>{"use strict";Object.defineProperty(Xz,"__esModule",{value:!0});var Nf=at(),lve={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Nf.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Nf._)`{limit: ${t}}`},dve={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:lve,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Nf.operators.GT:Nf.operators.LT;t.fail$data((0,Nf._)`Object.keys(${r}).length ${i} ${n}`)}};Xz.default=dve});var UW=O(eO=>{"use strict";Object.defineProperty(eO,"__esModule",{value:!0});var Cf=hi(),Rf=at(),pve=_t(),fve={message:({params:{missingProperty:t}})=>(0,Rf.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Rf._)`{missingProperty: ${t}}`},mve={keyword:"required",type:"object",schemaType:"array",$data:!0,error:fve,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:a}=t,{opts:s}=a;if(!o&&r.length===0)return;let c=r.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let f=t.parentSchema.properties,{definedProperties:m}=t.it;for(let v of r)if(f?.[v]===void 0&&!m.has(v)){let g=a.schemaEnv.baseId+a.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,pve.checkStrictMode)(a,h,a.opts.strictRequired)}}function u(){if(c||o)t.block$data(Rf.nil,d);else for(let f of r)(0,Cf.checkReportMissingProp)(t,f)}function l(){let f=e.let("missing");if(c||o){let m=e.let("valid",!0);t.block$data(m,()=>p(f,m)),t.ok(m)}else e.if((0,Cf.checkMissingProp)(t,r,f)),(0,Cf.reportMissingProp)(t,f),e.else()}function d(){e.forOf("prop",n,f=>{t.setParams({missingProperty:f}),e.if((0,Cf.noPropertyInData)(e,i,f,s.ownProperties),()=>t.error())})}function p(f,m){t.setParams({missingProperty:f}),e.forOf(f,n,()=>{e.assign(m,(0,Cf.propertyInData)(e,i,f,s.ownProperties)),e.if((0,Rf.not)(m),()=>{t.error(),e.break()})},Rf.nil)}}};eO.default=mve});var DW=O(tO=>{"use strict";Object.defineProperty(tO,"__esModule",{value:!0});var Af=at(),hve={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,Af.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Af._)`{limit: ${t}}`},gve={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:hve,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?Af.operators.GT:Af.operators.LT;t.fail$data((0,Af._)`${r}.length ${i} ${n}`)}};tO.default=gve});var Xy=O(rO=>{"use strict";Object.defineProperty(rO,"__esModule",{value:!0});var MW=wf();MW.code='require("ajv/dist/runtime/equal").default';rO.default=MW});var qW=O(iO=>{"use strict";Object.defineProperty(iO,"__esModule",{value:!0});var nO=xf(),Ar=at(),vve=_t(),yve=Xy(),_ve={message:({params:{i:t,j:e}})=>(0,Ar.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ar._)`{i: ${t}, j: ${e}}`},bve={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:_ve,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=t;if(!n&&!i)return;let c=e.let("valid"),u=o.items?(0,nO.getSchemaTypes)(o.items):[];t.block$data(c,l,(0,Ar._)`${a} === false`),t.ok(c);function l(){let m=e.let("i",(0,Ar._)`${r}.length`),v=e.let("j");t.setParams({i:m,j:v}),e.assign(c,!0),e.if((0,Ar._)`${m} > 1`,()=>(d()?p:f)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function p(m,v){let g=e.name("item"),h=(0,nO.checkDataTypes)(u,g,s.opts.strictNumbers,nO.DataType.Wrong),_=e.const("indices",(0,Ar._)`{}`);e.for((0,Ar._)`;${m}--;`,()=>{e.let(g,(0,Ar._)`${r}[${m}]`),e.if(h,(0,Ar._)`continue`),u.length>1&&e.if((0,Ar._)`typeof ${g} == "string"`,(0,Ar._)`${g} += "_"`),e.if((0,Ar._)`typeof ${_}[${g}] == "number"`,()=>{e.assign(v,(0,Ar._)`${_}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Ar._)`${_}[${g}] = ${m}`)})}function f(m,v){let g=(0,vve.useFunc)(e,yve.default),h=e.name("outer");e.label(h).for((0,Ar._)`;${m}--;`,()=>e.for((0,Ar._)`${v} = ${m}; ${v}--;`,()=>e.if((0,Ar._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(h)})))}}};iO.default=bve});var ZW=O(aO=>{"use strict";Object.defineProperty(aO,"__esModule",{value:!0});var oO=at(),xve=_t(),wve=Xy(),kve={message:"must be equal to constant",params:({schemaCode:t})=>(0,oO._)`{allowedValue: ${t}}`},Sve={keyword:"const",$data:!0,error:kve,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,oO._)`!${(0,xve.useFunc)(e,wve.default)}(${r}, ${i})`):t.fail((0,oO._)`${o} !== ${r}`)}};aO.default=Sve});var LW=O(sO=>{"use strict";Object.defineProperty(sO,"__esModule",{value:!0});var Uf=at(),$ve=_t(),Ive=Xy(),Eve={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Uf._)`{allowedValues: ${t}}`},Pve={keyword:"enum",schemaType:"array",$data:!0,error:Eve,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,$ve.useFunc)(e,Ive.default)),l;if(s||n)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let f=e.const("vSchema",o);l=(0,Uf.or)(...i.map((m,v)=>p(f,v)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",o,f=>e.if((0,Uf._)`${u()}(${r}, ${f})`,()=>e.assign(l,!0).break()))}function p(f,m){let v=i[m];return typeof v=="object"&&v!==null?(0,Uf._)`${u()}(${r}, ${f}[${m}])`:(0,Uf._)`${r} === ${v}`}}};sO.default=Pve});var FW=O(cO=>{"use strict";Object.defineProperty(cO,"__esModule",{value:!0});var Tve=zW(),zve=OW(),Ove=CW(),jve=RW(),Nve=AW(),Cve=UW(),Rve=DW(),Ave=qW(),Uve=ZW(),Dve=LW(),Mve=[Tve.default,zve.default,Ove.default,jve.default,Nve.default,Cve.default,Rve.default,Ave.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Uve.default,Dve.default];cO.default=Mve});var lO=O(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.validateAdditionalItems=void 0;var Rs=at(),uO=_t(),qve={message:({params:{len:t}})=>(0,Rs.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Rs._)`{limit: ${t}}`},Zve={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:qve,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,uO.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}VW(t,n)}};function VW(t,e){let{gen:r,schema:n,data:i,keyword:o,it:a}=t;a.items=!0;let s=r.const("len",(0,Rs._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Rs._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,uO.alwaysValidSchema)(a,n)){let u=r.var("valid",(0,Rs._)`${s} <= ${e.length}`);r.if((0,Rs.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,l=>{t.subschema({keyword:o,dataProp:l,dataPropType:uO.Type.Num},u),a.allErrors||r.if((0,Rs.not)(u),()=>r.break())})}}Df.validateAdditionalItems=VW;Df.default=Zve});var dO=O(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.validateTuple=void 0;var WW=at(),e_=_t(),Lve=hi(),Fve={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return BW(t,"additionalItems",e);r.items=!0,!(0,e_.alwaysValidSchema)(r,e)&&t.ok((0,Lve.validateArray)(t))}};function BW(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:s}=t;l(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=e_.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),u=n.const("len",(0,WW._)`${o}.length`);r.forEach((d,p)=>{(0,e_.alwaysValidSchema)(s,d)||(n.if((0,WW._)`${u} > ${p}`,()=>t.subschema({keyword:a,schemaProp:p,dataProp:p},c)),t.ok(c))});function l(d){let{opts:p,errSchemaPath:f}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(p.strictTuples&&!v){let g=`"${a}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${f}"`;(0,e_.checkStrictMode)(s,g,p.strictTuples)}}}Mf.validateTuple=BW;Mf.default=Fve});var KW=O(pO=>{"use strict";Object.defineProperty(pO,"__esModule",{value:!0});var Vve=dO(),Wve={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Vve.validateTuple)(t,"items")};pO.default=Wve});var GW=O(fO=>{"use strict";Object.defineProperty(fO,"__esModule",{value:!0});var HW=at(),Bve=_t(),Kve=hi(),Hve=lO(),Gve={message:({params:{len:t}})=>(0,HW.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,HW._)`{limit: ${t}}`},Qve={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Gve,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Bve.alwaysValidSchema)(n,e)&&(i?(0,Hve.validateAdditionalItems)(t,i):t.ok((0,Kve.validateArray)(t)))}};fO.default=Qve});var QW=O(mO=>{"use strict";Object.defineProperty(mO,"__esModule",{value:!0});var vi=at(),t_=_t(),Yve={message:({params:{min:t,max:e}})=>e===void 0?(0,vi.str)`must contain at least ${t} valid item(s)`:(0,vi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,vi._)`{minContains: ${t}}`:(0,vi._)`{minContains: ${t}, maxContains: ${e}}`},Jve={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Yve,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,a,s,{minContains:c,maxContains:u}=n;o.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=e.const("len",(0,vi._)`${i}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,t_.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,t_.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,t_.alwaysValidSchema)(o,r)){let v=(0,vi._)`${l} >= ${a}`;s!==void 0&&(v=(0,vi._)`${v} && ${l} <= ${s}`),t.pass(v);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?f(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,vi._)`${i}.length > 0`,p)):(e.let(d,!1),p()),t.result(d,()=>t.reset());function p(){let v=e.name("_valid"),g=e.let("count",0);f(v,()=>e.if(v,()=>m(g)))}function f(v,g){e.forRange("i",0,l,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:t_.Type.Num,compositeRule:!0},v),g()})}function m(v){e.code((0,vi._)`${v}++`),s===void 0?e.if((0,vi._)`${v} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,vi._)`${v} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,vi._)`${v} >= ${a}`,()=>e.assign(d,!0)))}}};mO.default=Jve});var XW=O(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.validateSchemaDeps=so.validatePropertyDeps=so.error=void 0;var hO=at(),Xve=_t(),qf=hi();so.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,hO.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,hO._)`{property: ${t},
|
|
244
|
+
missingProperty: ${n},
|
|
245
|
+
depsCount: ${e},
|
|
246
|
+
deps: ${r}}`};var eye={keyword:"dependencies",type:"object",schemaType:"object",error:so.error,code(t){let[e,r]=tye(t);YW(t,e),JW(t,r)}};function tye({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function YW(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let c=(0,qf.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of s)(0,qf.checkReportMissingProp)(t,u)}):(r.if((0,hO._)`${c} && (${(0,qf.checkMissingProp)(t,s,o)})`),(0,qf.reportMissingProp)(t,o),r.else())}}so.validatePropertyDeps=YW;function JW(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,a=r.name("valid");for(let s in e)(0,Xve.alwaysValidSchema)(o,e[s])||(r.if((0,qf.propertyInData)(r,n,s,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:s},a);t.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),t.ok(a))}so.validateSchemaDeps=JW;so.default=eye});var tB=O(gO=>{"use strict";Object.defineProperty(gO,"__esModule",{value:!0});var eB=at(),rye=_t(),nye={message:"property name must be valid",params:({params:t})=>(0,eB._)`{propertyName: ${t.propertyName}}`},iye={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:nye,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,rye.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,eB.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};gO.default=iye});var yO=O(vO=>{"use strict";Object.defineProperty(vO,"__esModule",{value:!0});var r_=hi(),Fi=at(),oye=Uo(),n_=_t(),aye={message:"must NOT have additional properties",params:({params:t})=>(0,Fi._)`{additionalProperty: ${t.additionalProperty}}`},sye={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:aye,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,n_.alwaysValidSchema)(a,r))return;let u=(0,r_.allSchemaProperties)(n.properties),l=(0,r_.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Fi._)`${o} === ${oye.default.errors}`);function d(){e.forIn("key",i,g=>{!u.length&&!l.length?m(g):e.if(p(g),()=>m(g))})}function p(g){let h;if(u.length>8){let _=(0,n_.schemaRefOrVal)(a,n.properties,"properties");h=(0,r_.isOwnProperty)(e,_,g)}else u.length?h=(0,Fi.or)(...u.map(_=>(0,Fi._)`${g} === ${_}`)):h=Fi.nil;return l.length&&(h=(0,Fi.or)(h,...l.map(_=>(0,Fi._)`${(0,r_.usePattern)(t,_)}.test(${g})`))),(0,Fi.not)(h)}function f(g){e.code((0,Fi._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,n_.alwaysValidSchema)(a,r)){let h=e.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),e.if((0,Fi.not)(h),()=>{t.reset(),f(g)})):(v(g,h),s||e.if((0,Fi.not)(h),()=>e.break()))}}function v(g,h,_){let y={keyword:"additionalProperties",dataProp:g,dataPropType:n_.Type.Str};_===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(y,h)}}};vO.default=sye});var iB=O(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});var cye=If(),rB=hi(),_O=_t(),nB=yO(),uye={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&nB.default.code(new cye.KeywordCxt(o,nB.default,"additionalProperties"));let a=(0,rB.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=_O.mergeEvaluated.props(e,(0,_O.toHash)(a),o.props));let s=a.filter(d=>!(0,_O.alwaysValidSchema)(o,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,rB.propertyInData)(e,i,d,o.opts.ownProperties)),l(d),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};bO.default=uye});var cB=O(xO=>{"use strict";Object.defineProperty(xO,"__esModule",{value:!0});var oB=hi(),i_=at(),aB=_t(),sB=_t(),lye={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:a}=o,s=(0,oB.allSchemaProperties)(r),c=s.filter(v=>(0,aB.alwaysValidSchema)(o,r[v]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&i.properties,l=e.name("valid");o.props!==!0&&!(o.props instanceof i_.Name)&&(o.props=(0,sB.evaluatedPropsToName)(e,o.props));let{props:d}=o;p();function p(){for(let v of s)u&&f(v),o.allErrors?m(v):(e.var(l,!0),m(v),e.if(l))}function f(v){for(let g in u)new RegExp(v).test(g)&&(0,aB.checkStrictMode)(o,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){e.forIn("key",n,g=>{e.if((0,i_._)`${(0,oB.usePattern)(t,v)}.test(${g})`,()=>{let h=c.includes(v);h||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:sB.Type.Str},l),o.opts.unevaluated&&d!==!0?e.assign((0,i_._)`${d}[${g}]`,!0):!h&&!o.allErrors&&e.if((0,i_.not)(l),()=>e.break())})})}}};xO.default=lye});var uB=O(wO=>{"use strict";Object.defineProperty(wO,"__esModule",{value:!0});var dye=_t(),pye={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,dye.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};wO.default=pye});var lB=O(kO=>{"use strict";Object.defineProperty(kO,"__esModule",{value:!0});var fye=hi(),mye={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fye.validateUnion,error:{message:"must match a schema in anyOf"}};kO.default=mye});var dB=O(SO=>{"use strict";Object.defineProperty(SO,"__esModule",{value:!0});var o_=at(),hye=_t(),gye={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,o_._)`{passingSchemas: ${t.passing}}`},vye={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:gye,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(a,()=>t.reset(),()=>t.error(!0));function u(){o.forEach((l,d)=>{let p;(0,hye.alwaysValidSchema)(i,l)?e.var(c,!0):p=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,o_._)`${c} && ${a}`).assign(a,!1).assign(s,(0,o_._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(s,d),p&&t.mergeEvaluated(p,o_.Name)})})}}};SO.default=vye});var pB=O($O=>{"use strict";Object.defineProperty($O,"__esModule",{value:!0});var yye=_t(),_ye={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,a)=>{if((0,yye.alwaysValidSchema)(n,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(s)})}};$O.default=_ye});var hB=O(IO=>{"use strict";Object.defineProperty(IO,"__esModule",{value:!0});var a_=at(),mB=_t(),bye={message:({params:t})=>(0,a_.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,a_._)`{failingKeyword: ${t.ifClause}}`},xye={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:bye,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,mB.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=fB(n,"then"),o=fB(n,"else");if(!i&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&o){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(s,u("then",l),u("else",l))}else i?e.if(s,u("then")):e.if((0,a_.not)(s),u("else"));t.pass(a,()=>t.error(!0));function c(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(l)}function u(l,d){return()=>{let p=t.subschema({keyword:l},s);e.assign(a,s),t.mergeValidEvaluated(p,a),d?e.assign(d,(0,a_._)`${l}`):t.setParams({ifClause:l})}}}};function fB(t,e){let r=t.schema[e];return r!==void 0&&!(0,mB.alwaysValidSchema)(t,r)}IO.default=xye});var gB=O(EO=>{"use strict";Object.defineProperty(EO,"__esModule",{value:!0});var wye=_t(),kye={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,wye.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};EO.default=kye});var vB=O(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});var Sye=lO(),$ye=KW(),Iye=dO(),Eye=GW(),Pye=QW(),Tye=XW(),zye=tB(),Oye=yO(),jye=iB(),Nye=cB(),Cye=uB(),Rye=lB(),Aye=dB(),Uye=pB(),Dye=hB(),Mye=gB();function qye(t=!1){let e=[Cye.default,Rye.default,Aye.default,Uye.default,Dye.default,Mye.default,zye.default,Oye.default,Tye.default,jye.default,Nye.default];return t?e.push($ye.default,Eye.default):e.push(Sye.default,Iye.default),e.push(Pye.default),e}PO.default=qye});var yB=O(TO=>{"use strict";Object.defineProperty(TO,"__esModule",{value:!0});var pr=at(),Zye={message:({schemaCode:t})=>(0,pr.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,pr._)`{format: ${t}}`},Lye={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Zye,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;i?p():f();function p(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,pr._)`${m}[${a}]`),g=r.let("fType"),h=r.let("format");r.if((0,pr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,pr._)`${v}.type || "string"`).assign(h,(0,pr._)`${v}.validate`),()=>r.assign(g,(0,pr._)`"string"`).assign(h,v)),t.fail$data((0,pr.or)(_(),y()));function _(){return c.strictSchema===!1?pr.nil:(0,pr._)`${a} && !${h}`}function y(){let b=l.$async?(0,pr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,pr._)`${h}(${n})`,x=(0,pr._)`(typeof ${h} == "function" ? ${b} : ${h}.test(${n}))`;return(0,pr._)`${h} && ${h} !== true && ${g} === ${e} && !${x}`}}function f(){let m=d.formats[o];if(!m){_();return}if(m===!0)return;let[v,g,h]=y(m);v===e&&t.pass(b());function _(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function y(x){let w=x instanceof RegExp?(0,pr.regexpCode)(x):c.code.formats?(0,pr._)`${c.code.formats}${(0,pr.getProperty)(o)}`:void 0,k=r.scopeValue("formats",{key:o,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,pr._)`${k}.validate`]:["string",x,k]}function b(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,pr._)`await ${h}(${n})`}return typeof g=="function"?(0,pr._)`${h}(${n})`:(0,pr._)`${h}.test(${n})`}}}};TO.default=Lye});var _B=O(zO=>{"use strict";Object.defineProperty(zO,"__esModule",{value:!0});var Fye=yB(),Vye=[Fye.default];zO.default=Vye});var bB=O(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.contentVocabulary=Lu.metadataVocabulary=void 0;Lu.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Lu.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var wB=O(OO=>{"use strict";Object.defineProperty(OO,"__esModule",{value:!0});var Wye=TW(),Bye=FW(),Kye=vB(),Hye=_B(),xB=bB(),Gye=[Wye.default,Bye.default,(0,Kye.default)(),Hye.default,xB.metadataVocabulary,xB.contentVocabulary];OO.default=Gye});var SB=O(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.DiscrError=void 0;var kB;(function(t){t.Tag="tag",t.Mapping="mapping"})(kB||(s_.DiscrError=kB={}))});var IB=O(NO=>{"use strict";Object.defineProperty(NO,"__esModule",{value:!0});var Fu=at(),jO=SB(),$B=Fy(),Qye=Ef(),Yye=_t(),Jye={message:({params:{discrError:t,tagName:e}})=>t===jO.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Fu._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Xye={keyword:"discriminator",type:"object",schemaType:"object",error:Jye,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,Fu._)`${r}${(0,Fu.getProperty)(s)}`);e.if((0,Fu._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:jO.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let f=p();e.if(!1);for(let m in f)e.elseIf((0,Fu._)`${u} === ${m}`),e.assign(c,d(f[m]));e.else(),t.error(!1,{discrError:jO.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(f){let m=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:f},m);return t.mergeEvaluated(v,Fu.Name),m}function p(){var f;let m={},v=h(i),g=!0;for(let b=0;b<a.length;b++){let x=a[b];if(x?.$ref&&!(0,Yye.schemaHasRulesButRef)(x,o.self.RULES)){let k=x.$ref;if(x=$B.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,k),x instanceof $B.SchemaEnv&&(x=x.schema),x===void 0)throw new Qye.default(o.opts.uriResolver,o.baseId,k)}let w=(f=x?.properties)===null||f===void 0?void 0:f[s];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(v||h(x)),_(w,b)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function h({required:b}){return Array.isArray(b)&&b.includes(s)}function _(b,x){if(b.const)y(b.const,x);else if(b.enum)for(let w of b.enum)y(w,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function y(b,x){if(typeof b!="string"||b in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[b]=x}}}};NO.default=Xye});var EB=O((s6e,e_e)=>{e_e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var TB=O((Xt,CO)=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.MissingRefError=Xt.ValidationError=Xt.CodeGen=Xt.Name=Xt.nil=Xt.stringify=Xt.str=Xt._=Xt.KeywordCxt=Xt.Ajv=void 0;var t_e=kW(),r_e=wB(),n_e=IB(),PB=EB(),i_e=["/properties"],c_="http://json-schema.org/draft-07/schema",Vu=class extends t_e.default{_addVocabularies(){super._addVocabularies(),r_e.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(n_e.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(PB,i_e):PB;this.addMetaSchema(e,c_,!1),this.refs["http://json-schema.org/schema"]=c_}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c_)?c_:void 0)}};Xt.Ajv=Vu;CO.exports=Xt=Vu;CO.exports.Ajv=Vu;Object.defineProperty(Xt,"__esModule",{value:!0});Xt.default=Vu;var o_e=If();Object.defineProperty(Xt,"KeywordCxt",{enumerable:!0,get:function(){return o_e.KeywordCxt}});var Wu=at();Object.defineProperty(Xt,"_",{enumerable:!0,get:function(){return Wu._}});Object.defineProperty(Xt,"str",{enumerable:!0,get:function(){return Wu.str}});Object.defineProperty(Xt,"stringify",{enumerable:!0,get:function(){return Wu.stringify}});Object.defineProperty(Xt,"nil",{enumerable:!0,get:function(){return Wu.nil}});Object.defineProperty(Xt,"Name",{enumerable:!0,get:function(){return Wu.Name}});Object.defineProperty(Xt,"CodeGen",{enumerable:!0,get:function(){return Wu.CodeGen}});var a_e=Zy();Object.defineProperty(Xt,"ValidationError",{enumerable:!0,get:function(){return a_e.default}});var s_e=Ef();Object.defineProperty(Xt,"MissingRefError",{enumerable:!0,get:function(){return s_e.default}})});var UB=O(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.formatNames=uo.fastFormats=uo.fullFormats=void 0;function co(t,e){return{validate:t,compare:e}}uo.fullFormats={date:co(NB,DO),time:co(AO(!0),MO),"date-time":co(zB(!0),RB),"iso-time":co(AO(),CB),"iso-date-time":co(zB(),AB),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:f_e,"uri-reference":/^(?:[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,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:b_e,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:m_e,int32:{type:"number",validate:v_e},int64:{type:"number",validate:y_e},float:{type:"number",validate:jB},double:{type:"number",validate:jB},password:!0,binary:!0};uo.fastFormats={...uo.fullFormats,date:co(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,DO),time:co(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,MO),"date-time":co(/^\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,RB),"iso-time":co(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,CB),"iso-date-time":co(/^\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,AB),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[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};uo.formatNames=Object.keys(uo.fullFormats);function c_e(t){return t%4===0&&(t%100!==0||t%400===0)}var u_e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,l_e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function NB(t){let e=u_e.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],i=+e[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&c_e(r)?29:l_e[n])}function DO(t,e){if(t&&e)return t>e?1:t<e?-1:0}var RO=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function AO(t){return function(r){let n=RO.exec(r);if(!n)return!1;let i=+n[1],o=+n[2],a=+n[3],s=n[4],c=n[5]==="-"?-1:1,u=+(n[6]||0),l=+(n[7]||0);if(u>23||l>59||t&&!s)return!1;if(i<=23&&o<=59&&a<60)return!0;let d=o-l*c,p=i-u*c-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&a<61}}function MO(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}function CB(t,e){if(!(t&&e))return;let r=RO.exec(t),n=RO.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t<e?-1:0}var UO=/t|\s/i;function zB(t){let e=AO(t);return function(n){let i=n.split(UO);return i.length===2&&NB(i[0])&&e(i[1])}}function RB(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function AB(t,e){if(!(t&&e))return;let[r,n]=t.split(UO),[i,o]=e.split(UO),a=DO(r,i);if(a!==void 0)return a||MO(n,o)}var d_e=/\/|:/,p_e=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function f_e(t){return d_e.test(t)&&p_e.test(t)}var OB=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function m_e(t){return OB.lastIndex=0,OB.test(t)}var h_e=-(2**31),g_e=2**31-1;function v_e(t){return Number.isInteger(t)&&t<=g_e&&t>=h_e}function y_e(t){return Number.isInteger(t)}function jB(){return!0}var __e=/[^\\]\\Z/;function b_e(t){if(__e.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Ff=O(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.regexpCode=Et.getEsmExportName=Et.getProperty=Et.safeStringify=Et.stringify=Et.strConcat=Et.addCodeArg=Et.str=Et._=Et.nil=Et._Code=Et.Name=Et.IDENTIFIER=Et._CodeOrName=void 0;var Zf=class{};Et._CodeOrName=Zf;Et.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var As=class extends Zf{constructor(e){if(super(),!Et.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Et.Name=As;var yi=class extends Zf{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof As&&(r[n.str]=(r[n.str]||0)+1),r),{})}};Et._Code=yi;Et.nil=new yi("");function DB(t,...e){let r=[t[0]],n=0;for(;n<e.length;)ZO(r,e[n]),r.push(t[++n]);return new yi(r)}Et._=DB;var qO=new yi("+");function MB(t,...e){let r=[Lf(t[0])],n=0;for(;n<e.length;)r.push(qO),ZO(r,e[n]),r.push(qO,Lf(t[++n]));return x_e(r),new yi(r)}Et.str=MB;function ZO(t,e){e instanceof yi?t.push(...e._items):e instanceof As?t.push(e):t.push(S_e(e))}Et.addCodeArg=ZO;function x_e(t){let e=1;for(;e<t.length-1;){if(t[e]===qO){let r=w_e(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function w_e(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof As||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof As))return`"${t}${e.slice(1)}`}function k_e(t,e){return e.emptyStr()?t:t.emptyStr()?e:MB`${t}${e}`}Et.strConcat=k_e;function S_e(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Lf(Array.isArray(t)?t.join(","):t)}function $_e(t){return new yi(Lf(t))}Et.stringify=$_e;function Lf(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Et.safeStringify=Lf;function I_e(t){return typeof t=="string"&&Et.IDENTIFIER.test(t)?new yi(`.${t}`):DB`[${t}]`}Et.getProperty=I_e;function E_e(t){if(typeof t=="string"&&Et.IDENTIFIER.test(t))return new yi(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}Et.getEsmExportName=E_e;function P_e(t){return new yi(t.toString())}Et.regexpCode=P_e});var VO=O(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.ValueScope=zn.ValueScopeName=zn.Scope=zn.varKinds=zn.UsedValueState=void 0;var Tn=Ff(),LO=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},u_;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(u_||(zn.UsedValueState=u_={}));zn.varKinds={const:new Tn.Name("const"),let:new Tn.Name("let"),var:new Tn.Name("var")};var l_=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof Tn.Name?e:this.name(e)}name(e){return new Tn.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};zn.Scope=l_;var d_=class extends Tn.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,Tn._)`.${new Tn.Name(r)}[${n}]`}};zn.ValueScopeName=d_;var T_e=(0,Tn._)`\n`,FO=class extends l_{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?T_e:Tn.nil}}get(){return this._scope}name(e){return new d_(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[o];if(s){let l=s.get(a);if(l)return l}else s=this._values[o]=new Map;s.set(a,i);let c=this._scope[o]||(this._scope[o]=[]),u=c.length;return c[u]=r.ref,i.setValue(r,{property:o,itemIndex:u}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Tn._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=Tn.nil;for(let a in e){let s=e[a];if(!s)continue;let c=n[a]=n[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,u_.Started);let l=r(u);if(l){let d=this.opts.es5?zn.varKinds.var:zn.varKinds.const;o=(0,Tn._)`${o}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))o=(0,Tn._)`${o}${l}${this.opts._n}`;else throw new LO(u);c.set(u,u_.Completed)})}return o}};zn.ValueScope=FO});var Je=O(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.or=it.and=it.not=it.CodeGen=it.operators=it.varKinds=it.ValueScopeName=it.ValueScope=it.Scope=it.Name=it.regexpCode=it.stringify=it.getProperty=it.nil=it.strConcat=it.str=it._=void 0;var vt=Ff(),Vi=VO(),za=Ff();Object.defineProperty(it,"_",{enumerable:!0,get:function(){return za._}});Object.defineProperty(it,"str",{enumerable:!0,get:function(){return za.str}});Object.defineProperty(it,"strConcat",{enumerable:!0,get:function(){return za.strConcat}});Object.defineProperty(it,"nil",{enumerable:!0,get:function(){return za.nil}});Object.defineProperty(it,"getProperty",{enumerable:!0,get:function(){return za.getProperty}});Object.defineProperty(it,"stringify",{enumerable:!0,get:function(){return za.stringify}});Object.defineProperty(it,"regexpCode",{enumerable:!0,get:function(){return za.regexpCode}});Object.defineProperty(it,"Name",{enumerable:!0,get:function(){return za.Name}});var h_=VO();Object.defineProperty(it,"Scope",{enumerable:!0,get:function(){return h_.Scope}});Object.defineProperty(it,"ValueScope",{enumerable:!0,get:function(){return h_.ValueScope}});Object.defineProperty(it,"ValueScopeName",{enumerable:!0,get:function(){return h_.ValueScopeName}});Object.defineProperty(it,"varKinds",{enumerable:!0,get:function(){return h_.varKinds}});it.operators={GT:new vt._Code(">"),GTE:new vt._Code(">="),LT:new vt._Code("<"),LTE:new vt._Code("<="),EQ:new vt._Code("==="),NEQ:new vt._Code("!=="),NOT:new vt._Code("!"),OR:new vt._Code("||"),AND:new vt._Code("&&"),ADD:new vt._Code("+")};var qo=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},WO=class extends qo{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Vi.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Ku(this.rhs,e,r)),this}get names(){return this.rhs instanceof vt._CodeOrName?this.rhs.names:{}}},p_=class extends qo{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof vt.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Ku(this.rhs,e,r),this}get names(){let e=this.lhs instanceof vt.Name?{}:{...this.lhs.names};return m_(e,this.rhs)}},BO=class extends p_{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},KO=class extends qo{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},HO=class extends qo{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},GO=class extends qo{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},QO=class extends qo{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Ku(this.code,e,r),this}get names(){return this.code instanceof vt._CodeOrName?this.code.names:{}}},Vf=class extends qo{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(z_e(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Ms(e,r.names),{})}},Zo=class extends Vf{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},YO=class extends Vf{},Bu=class extends Zo{};Bu.kind="else";var Us=class t extends Zo{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Bu(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(qB(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Ku(this.condition,e,r),this}get names(){let e=super.names;return m_(e,this.condition),this.else&&Ms(e,this.else.names),e}};Us.kind="if";var Ds=class extends Zo{};Ds.kind="for";var JO=class extends Ds{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Ku(this.iteration,e,r),this}get names(){return Ms(super.names,this.iteration.names)}},XO=class extends Ds{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Vi.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=m_(super.names,this.from);return m_(e,this.to)}},f_=class extends Ds{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Ku(this.iterable,e,r),this}get names(){return Ms(super.names,this.iterable.names)}},Wf=class extends Zo{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Wf.kind="func";var Bf=class extends Vf{render(e){return"return "+super.render(e)}};Bf.kind="return";var ej=class extends Zo{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Ms(e,this.catch.names),this.finally&&Ms(e,this.finally.names),e}},Kf=class extends Zo{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Kf.kind="catch";var Hf=class extends Zo{render(e){return"finally"+super.render(e)}};Hf.kind="finally";var tj=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
247
|
+
`:""},this._extScope=e,this._scope=new Vi.Scope({parent:e}),this._nodes=[new YO]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new WO(e,o,n)),o}const(e,r,n){return this._def(Vi.varKinds.const,e,r,n)}let(e,r,n){return this._def(Vi.varKinds.let,e,r,n)}var(e,r,n){return this._def(Vi.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new p_(e,r,n))}add(e,r){return this._leafNode(new BO(e,it.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==vt.nil&&this._leafNode(new QO(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,vt.addCodeArg)(r,i));return r.push("}"),new vt._Code(r)}if(e,r,n){if(this._blockNode(new Us(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Us(e))}else(){return this._elseNode(new Bu)}endIf(){return this._endBlockNode(Us,Bu)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new JO(e),r)}forRange(e,r,n,i,o=this.opts.es5?Vi.varKinds.var:Vi.varKinds.let){let a=this._scope.toName(e);return this._for(new XO(o,a,r,n),()=>i(a))}forOf(e,r,n,i=Vi.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof vt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,vt._)`${a}.length`,s=>{this.var(o,(0,vt._)`${a}[${s}]`),n(o)})}return this._for(new f_("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?Vi.varKinds.var:Vi.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,vt._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new f_("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Ds)}label(e){return this._leafNode(new KO(e))}break(e){return this._leafNode(new HO(e))}return(e){let r=new Bf;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Bf)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new ej;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new Kf(o),r(o)}return n&&(this._currNode=i.finally=new Hf,this.code(n)),this._endBlockNode(Kf,Hf)}throw(e){return this._leafNode(new GO(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=vt.nil,n,i){return this._blockNode(new Wf(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Wf)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Us))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};it.CodeGen=tj;function Ms(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function m_(t,e){return e instanceof vt._CodeOrName?Ms(t,e.names):t}function Ku(t,e,r){if(t instanceof vt.Name)return n(t);if(!i(t))return t;return new vt._Code(t._items.reduce((o,a)=>(a instanceof vt.Name&&(a=n(a)),a instanceof vt._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function i(o){return o instanceof vt._Code&&o._items.some(a=>a instanceof vt.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function z_e(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function qB(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,vt._)`!${rj(t)}`}it.not=qB;var O_e=ZB(it.operators.AND);function j_e(...t){return t.reduce(O_e)}it.and=j_e;var N_e=ZB(it.operators.OR);function C_e(...t){return t.reduce(N_e)}it.or=C_e;function ZB(t){return(e,r)=>e===vt.nil?r:r===vt.nil?e:(0,vt._)`${rj(e)} ${t} ${rj(r)}`}function rj(t){return t instanceof vt.Name?t:(0,vt._)`(${t})`}});var xt=O(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.checkStrictMode=ct.getErrorPath=ct.Type=ct.useFunc=ct.setEvaluated=ct.evaluatedPropsToName=ct.mergeEvaluated=ct.eachItem=ct.unescapeJsonPointer=ct.escapeJsonPointer=ct.escapeFragment=ct.unescapeFragment=ct.schemaRefOrVal=ct.schemaHasRulesButRef=ct.schemaHasRules=ct.checkUnknownRules=ct.alwaysValidSchema=ct.toHash=void 0;var Vt=Je(),R_e=Ff();function A_e(t){let e={};for(let r of t)e[r]=!0;return e}ct.toHash=A_e;function U_e(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(VB(t,e),!WB(e,t.self.RULES.all))}ct.alwaysValidSchema=U_e;function VB(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||HB(t,`unknown keyword: "${o}"`)}ct.checkUnknownRules=VB;function WB(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ct.schemaHasRules=WB;function D_e(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}ct.schemaHasRulesButRef=D_e;function M_e({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Vt._)`${r}`}return(0,Vt._)`${t}${e}${(0,Vt.getProperty)(n)}`}ct.schemaRefOrVal=M_e;function q_e(t){return BB(decodeURIComponent(t))}ct.unescapeFragment=q_e;function Z_e(t){return encodeURIComponent(ij(t))}ct.escapeFragment=Z_e;function ij(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ct.escapeJsonPointer=ij;function BB(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ct.unescapeJsonPointer=BB;function L_e(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ct.eachItem=L_e;function LB({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,a,s)=>{let c=a===void 0?o:a instanceof Vt.Name?(o instanceof Vt.Name?t(i,o,a):e(i,o,a),a):o instanceof Vt.Name?(e(i,a,o),o):r(o,a);return s===Vt.Name&&!(c instanceof Vt.Name)?n(i,c):c}}ct.mergeEvaluated={props:LB({mergeNames:(t,e,r)=>t.if((0,Vt._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Vt._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Vt._)`${r} || {}`).code((0,Vt._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Vt._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Vt._)`${r} || {}`),oj(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:KB}),items:LB({mergeNames:(t,e,r)=>t.if((0,Vt._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Vt._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Vt._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Vt._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function KB(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Vt._)`{}`);return e!==void 0&&oj(t,r,e),r}ct.evaluatedPropsToName=KB;function oj(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Vt._)`${e}${(0,Vt.getProperty)(n)}`,!0))}ct.setEvaluated=oj;var FB={};function F_e(t,e){return t.scopeValue("func",{ref:e,code:FB[e.code]||(FB[e.code]=new R_e._Code(e.code))})}ct.useFunc=F_e;var nj;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(nj||(ct.Type=nj={}));function V_e(t,e,r){if(t instanceof Vt.Name){let n=e===nj.Num;return r?n?(0,Vt._)`"[" + ${t} + "]"`:(0,Vt._)`"['" + ${t} + "']"`:n?(0,Vt._)`"/" + ${t}`:(0,Vt._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Vt.getProperty)(t).toString():"/"+ij(t)}ct.getErrorPath=V_e;function HB(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}ct.checkStrictMode=HB});var Lo=O(aj=>{"use strict";Object.defineProperty(aj,"__esModule",{value:!0});var Kr=Je(),W_e={data:new Kr.Name("data"),valCxt:new Kr.Name("valCxt"),instancePath:new Kr.Name("instancePath"),parentData:new Kr.Name("parentData"),parentDataProperty:new Kr.Name("parentDataProperty"),rootData:new Kr.Name("rootData"),dynamicAnchors:new Kr.Name("dynamicAnchors"),vErrors:new Kr.Name("vErrors"),errors:new Kr.Name("errors"),this:new Kr.Name("this"),self:new Kr.Name("self"),scope:new Kr.Name("scope"),json:new Kr.Name("json"),jsonPos:new Kr.Name("jsonPos"),jsonLen:new Kr.Name("jsonLen"),jsonPart:new Kr.Name("jsonPart")};aj.default=W_e});var Gf=O(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});Hr.extendErrors=Hr.resetErrorsCount=Hr.reportExtraError=Hr.reportError=Hr.keyword$DataError=Hr.keywordError=void 0;var wt=Je(),g_=xt(),mn=Lo();Hr.keywordError={message:({keyword:t})=>(0,wt.str)`must pass "${t}" keyword validation`};Hr.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,wt.str)`"${t}" keyword must be ${e} ($data)`:(0,wt.str)`"${t}" keyword is invalid ($data)`};function B_e(t,e=Hr.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:a,allErrors:s}=i,c=YB(t,e,r);n??(a||s)?GB(o,c):QB(i,(0,wt._)`[${c}]`)}Hr.reportError=B_e;function K_e(t,e=Hr.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,s=YB(t,e,r);GB(i,s),o||a||QB(n,mn.default.vErrors)}Hr.reportExtraError=K_e;function H_e(t,e){t.assign(mn.default.errors,e),t.if((0,wt._)`${mn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,wt._)`${mn.default.vErrors}.length`,e),()=>t.assign(mn.default.vErrors,null)))}Hr.resetErrorsCount=H_e;function G_e({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",i,mn.default.errors,s=>{t.const(a,(0,wt._)`${mn.default.vErrors}[${s}]`),t.if((0,wt._)`${a}.instancePath === undefined`,()=>t.assign((0,wt._)`${a}.instancePath`,(0,wt.strConcat)(mn.default.instancePath,o.errorPath))),t.assign((0,wt._)`${a}.schemaPath`,(0,wt.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,wt._)`${a}.schema`,r),t.assign((0,wt._)`${a}.data`,n))})}Hr.extendErrors=G_e;function GB(t,e){let r=t.const("err",e);t.if((0,wt._)`${mn.default.vErrors} === null`,()=>t.assign(mn.default.vErrors,(0,wt._)`[${r}]`),(0,wt._)`${mn.default.vErrors}.push(${r})`),t.code((0,wt._)`${mn.default.errors}++`)}function QB(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,wt._)`new ${t.ValidationError}(${e})`):(r.assign((0,wt._)`${n}.errors`,e),r.return(!1))}var qs={keyword:new wt.Name("keyword"),schemaPath:new wt.Name("schemaPath"),params:new wt.Name("params"),propertyName:new wt.Name("propertyName"),message:new wt.Name("message"),schema:new wt.Name("schema"),parentSchema:new wt.Name("parentSchema")};function YB(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,wt._)`{}`:Q_e(t,e,r)}function Q_e(t,e,r={}){let{gen:n,it:i}=t,o=[Y_e(i,r),J_e(t,r)];return X_e(t,e,o),n.object(...o)}function Y_e({errorPath:t},{instancePath:e}){let r=e?(0,wt.str)`${t}${(0,g_.getErrorPath)(e,g_.Type.Str)}`:t;return[mn.default.instancePath,(0,wt.strConcat)(mn.default.instancePath,r)]}function J_e({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,wt.str)`${e}/${t}`;return r&&(i=(0,wt.str)`${i}${(0,g_.getErrorPath)(r,g_.Type.Str)}`),[qs.schemaPath,i]}function X_e(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:a,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;n.push([qs.keyword,i],[qs.params,typeof e=="function"?e(t):e||(0,wt._)`{}`]),c.messages&&n.push([qs.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([qs.schema,a],[qs.parentSchema,(0,wt._)`${l}${d}`],[mn.default.data,o]),u&&n.push([qs.propertyName,u])}});var XB=O(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.boolOrEmptySchema=Hu.topBoolOrEmptySchema=void 0;var ebe=Gf(),tbe=Je(),rbe=Lo(),nbe={message:"boolean schema is false"};function ibe(t){let{gen:e,schema:r,validateName:n}=t;r===!1?JB(t,!1):typeof r=="object"&&r.$async===!0?e.return(rbe.default.data):(e.assign((0,tbe._)`${n}.errors`,null),e.return(!0))}Hu.topBoolOrEmptySchema=ibe;function obe(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),JB(t)):r.var(e,!0)}Hu.boolOrEmptySchema=obe;function JB(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,ebe.reportError)(i,nbe,void 0,e)}});var sj=O(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});Gu.getRules=Gu.isJSONType=void 0;var abe=["string","number","integer","boolean","null","object","array"],sbe=new Set(abe);function cbe(t){return typeof t=="string"&&sbe.has(t)}Gu.isJSONType=cbe;function ube(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Gu.getRules=ube});var cj=O(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.shouldUseRule=Oa.shouldUseGroup=Oa.schemaHasRulesForType=void 0;function lbe({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&e3(t,n)}Oa.schemaHasRulesForType=lbe;function e3(t,e){return e.rules.some(r=>t3(t,r))}Oa.shouldUseGroup=e3;function t3(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Oa.shouldUseRule=t3});var Qf=O(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.reportTypeError=Gr.checkDataTypes=Gr.checkDataType=Gr.coerceAndCheckDataType=Gr.getJSONTypes=Gr.getSchemaTypes=Gr.DataType=void 0;var dbe=sj(),pbe=cj(),fbe=Gf(),Ye=Je(),r3=xt(),Qu;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Qu||(Gr.DataType=Qu={}));function mbe(t){let e=n3(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Gr.getSchemaTypes=mbe;function n3(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(dbe.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Gr.getJSONTypes=n3;function hbe(t,e){let{gen:r,data:n,opts:i}=t,o=gbe(e,i.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,pbe.schemaHasRulesForType)(t,e[0]));if(a){let s=lj(e,n,i.strictNumbers,Qu.Wrong);r.if(s,()=>{o.length?vbe(t,e,o):dj(t)})}return a}Gr.coerceAndCheckDataType=hbe;var i3=new Set(["string","number","integer","boolean","null"]);function gbe(t,e){return e?t.filter(r=>i3.has(r)||e==="array"&&r==="array"):[]}function vbe(t,e,r){let{gen:n,data:i,opts:o}=t,a=n.let("dataType",(0,Ye._)`typeof ${i}`),s=n.let("coerced",(0,Ye._)`undefined`);o.coerceTypes==="array"&&n.if((0,Ye._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ye._)`${i}[0]`).assign(a,(0,Ye._)`typeof ${i}`).if(lj(e,i,o.strictNumbers),()=>n.assign(s,i))),n.if((0,Ye._)`${s} !== undefined`);for(let u of r)(i3.has(u)||u==="array"&&o.coerceTypes==="array")&&c(u);n.else(),dj(t),n.endIf(),n.if((0,Ye._)`${s} !== undefined`,()=>{n.assign(i,s),ybe(t,s)});function c(u){switch(u){case"string":n.elseIf((0,Ye._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,Ye._)`"" + ${i}`).elseIf((0,Ye._)`${i} === null`).assign(s,(0,Ye._)`""`);return;case"number":n.elseIf((0,Ye._)`${a} == "boolean" || ${i} === null
|
|
248
|
+
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Ye._)`+${i}`);return;case"integer":n.elseIf((0,Ye._)`${a} === "boolean" || ${i} === null
|
|
249
|
+
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,Ye._)`+${i}`);return;case"boolean":n.elseIf((0,Ye._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,Ye._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,Ye._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,Ye._)`${a} === "string" || ${a} === "number"
|
|
250
|
+
|| ${a} === "boolean" || ${i} === null`).assign(s,(0,Ye._)`[${i}]`)}}}function ybe({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Ye._)`${e} !== undefined`,()=>t.assign((0,Ye._)`${e}[${r}]`,n))}function uj(t,e,r,n=Qu.Correct){let i=n===Qu.Correct?Ye.operators.EQ:Ye.operators.NEQ,o;switch(t){case"null":return(0,Ye._)`${e} ${i} null`;case"array":o=(0,Ye._)`Array.isArray(${e})`;break;case"object":o=(0,Ye._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,Ye._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,Ye._)`typeof ${e} ${i} ${t}`}return n===Qu.Correct?o:(0,Ye.not)(o);function a(s=Ye.nil){return(0,Ye.and)((0,Ye._)`typeof ${e} == "number"`,s,r?(0,Ye._)`isFinite(${e})`:Ye.nil)}}Gr.checkDataType=uj;function lj(t,e,r,n){if(t.length===1)return uj(t[0],e,r,n);let i,o=(0,r3.toHash)(t);if(o.array&&o.object){let a=(0,Ye._)`typeof ${e} != "object"`;i=o.null?a:(0,Ye._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Ye.nil;o.number&&delete o.integer;for(let a in o)i=(0,Ye.and)(i,uj(a,e,r,n));return i}Gr.checkDataTypes=lj;var _be={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ye._)`{type: ${t}}`:(0,Ye._)`{type: ${e}}`};function dj(t){let e=bbe(t);(0,fbe.reportError)(e,_be)}Gr.reportTypeError=dj;function bbe(t){let{gen:e,data:r,schema:n}=t,i=(0,r3.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var a3=O(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});v_.assignDefaults=void 0;var Yu=Je(),xbe=xt();function wbe(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)o3(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>o3(t,o,i.default))}v_.assignDefaults=wbe;function o3(t,e,r){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(r===void 0)return;let s=(0,Yu._)`${o}${(0,Yu.getProperty)(e)}`;if(i){(0,xbe.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,Yu._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,Yu._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,Yu._)`${s} = ${(0,Yu.stringify)(r)}`)}});var _i=O(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.validateUnion=At.validateArray=At.usePattern=At.callValidateCode=At.schemaProperties=At.allSchemaProperties=At.noPropertyInData=At.propertyInData=At.isOwnProperty=At.hasPropFunc=At.reportMissingProp=At.checkMissingProp=At.checkReportMissingProp=void 0;var er=Je(),pj=xt(),ja=Lo(),kbe=xt();function Sbe(t,e){let{gen:r,data:n,it:i}=t;r.if(mj(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,er._)`${e}`},!0),t.error()})}At.checkReportMissingProp=Sbe;function $be({gen:t,data:e,it:{opts:r}},n,i){return(0,er.or)(...n.map(o=>(0,er.and)(mj(t,e,o,r.ownProperties),(0,er._)`${i} = ${o}`)))}At.checkMissingProp=$be;function Ibe(t,e){t.setParams({missingProperty:e},!0),t.error()}At.reportMissingProp=Ibe;function s3(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,er._)`Object.prototype.hasOwnProperty`})}At.hasPropFunc=s3;function fj(t,e,r){return(0,er._)`${s3(t)}.call(${e}, ${r})`}At.isOwnProperty=fj;function Ebe(t,e,r,n){let i=(0,er._)`${e}${(0,er.getProperty)(r)} !== undefined`;return n?(0,er._)`${i} && ${fj(t,e,r)}`:i}At.propertyInData=Ebe;function mj(t,e,r,n){let i=(0,er._)`${e}${(0,er.getProperty)(r)} === undefined`;return n?(0,er.or)(i,(0,er.not)(fj(t,e,r))):i}At.noPropertyInData=mj;function c3(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}At.allSchemaProperties=c3;function Pbe(t,e){return c3(e).filter(r=>!(0,pj.alwaysValidSchema)(t,e[r]))}At.schemaProperties=Pbe;function Tbe({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,c,u){let l=u?(0,er._)`${t}, ${e}, ${n}${i}`:e,d=[[ja.default.instancePath,(0,er.strConcat)(ja.default.instancePath,o)],[ja.default.parentData,a.parentData],[ja.default.parentDataProperty,a.parentDataProperty],[ja.default.rootData,ja.default.rootData]];a.opts.dynamicRef&&d.push([ja.default.dynamicAnchors,ja.default.dynamicAnchors]);let p=(0,er._)`${l}, ${r.object(...d)}`;return c!==er.nil?(0,er._)`${s}.call(${c}, ${p})`:(0,er._)`${s}(${p})`}At.callValidateCode=Tbe;var zbe=(0,er._)`new RegExp`;function Obe({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,er._)`${i.code==="new RegExp"?zbe:(0,kbe.useFunc)(t,i)}(${r}, ${n})`})}At.usePattern=Obe;function jbe(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let c=e.const("len",(0,er._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:pj.Type.Num},o),e.if((0,er.not)(o),s)})}}At.validateArray=jbe;function Nbe(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,pj.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let l=t.subschema({keyword:n,schemaProp:u,compositeRule:!0},s);e.assign(a,(0,er._)`${a} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,er.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}At.validateUnion=Nbe});var d3=O(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.validateKeywordUsage=lo.validSchemaType=lo.funcKeywordCode=lo.macroKeywordCode=void 0;var hn=Je(),Zs=Lo(),Cbe=_i(),Rbe=Gf();function Abe(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=t,s=e.macro.call(a.self,i,o,a),c=l3(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=r.name("valid");t.subschema({schema:s,schemaPath:hn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}lo.macroKeywordCode=Abe;function Ube(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:c}=t;Mbe(c,e);let u=!s&&e.compile?e.compile.call(c.self,o,a,c):e.validate,l=l3(n,i,u),d=n.let("valid");t.block$data(d,p),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function p(){if(e.errors===!1)v(),e.modifying&&u3(t),g(()=>t.error());else{let h=e.async?f():m();e.modifying&&u3(t),g(()=>Dbe(t,h))}}function f(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,hn._)`await `),_=>n.assign(d,!1).if((0,hn._)`${_} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,hn._)`${_}.errors`),()=>n.throw(_))),h}function m(){let h=(0,hn._)`${l}.errors`;return n.assign(h,null),v(hn.nil),h}function v(h=e.async?(0,hn._)`await `:hn.nil){let _=c.opts.passContext?Zs.default.this:Zs.default.self,y=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,hn._)`${h}${(0,Cbe.callValidateCode)(t,l,_,y)}`,e.modifying)}function g(h){var _;n.if((0,hn.not)((_=e.valid)!==null&&_!==void 0?_:d),h)}}lo.funcKeywordCode=Ube;function u3(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,hn._)`${n.parentData}[${n.parentDataProperty}]`))}function Dbe(t,e){let{gen:r}=t;r.if((0,hn._)`Array.isArray(${e})`,()=>{r.assign(Zs.default.vErrors,(0,hn._)`${Zs.default.vErrors} === null ? ${e} : ${Zs.default.vErrors}.concat(${e})`).assign(Zs.default.errors,(0,hn._)`${Zs.default.vErrors}.length`),(0,Rbe.extendErrors)(t)},()=>t.error())}function Mbe({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function l3(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,hn.stringify)(r)})}function qbe(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}lo.validSchemaType=qbe;function Zbe({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}lo.validateKeywordUsage=Zbe});var f3=O(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.extendSubschemaMode=Na.extendSubschemaData=Na.getSubschema=void 0;var po=Je(),p3=xt();function Lbe(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,po._)`${t.schemaPath}${(0,po.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,po._)`${t.schemaPath}${(0,po.getProperty)(e)}${(0,po.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,p3.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Na.getSubschema=Lbe;function Fbe(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=e,p=s.let("data",(0,po._)`${e.data}${(0,po.getProperty)(r)}`,!0);c(p),t.errorPath=(0,po.str)`${u}${(0,p3.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,po._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(i!==void 0){let u=i instanceof po.Name?i:s.let("data",i,!0);c(u),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u]}}Na.extendSubschemaData=Fbe;function Vbe(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Na.extendSubschemaMode=Vbe});var h3=O((k6e,m3)=>{"use strict";var Ca=m3.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};y_(e,n,i,t,"",t)};Ca.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ca.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ca.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ca.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function y_(t,e,r,n,i,o,a,s,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in Ca.arrayKeywords)for(var p=0;p<d.length;p++)y_(t,e,r,d[p],i+"/"+l+"/"+p,o,i,l,n,p)}else if(l in Ca.propsKeywords){if(d&&typeof d=="object")for(var f in d)y_(t,e,r,d[f],i+"/"+l+"/"+Wbe(f),o,i,l,n,f)}else(l in Ca.keywords||t.allKeys&&!(l in Ca.skipKeywords))&&y_(t,e,r,d,i+"/"+l,o,i,l,n)}r(n,i,o,a,s,c,u)}}function Wbe(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Yf=O(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.getSchemaRefs=On.resolveUrl=On.normalizeId=On._getFullPath=On.getFullPath=On.inlineRef=void 0;var Bbe=xt(),Kbe=wf(),Hbe=h3(),Gbe=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Qbe(t,e=!0){return typeof t=="boolean"?!0:e===!0?!hj(t):e?g3(t)<=e:!1}On.inlineRef=Qbe;var Ybe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hj(t){for(let e in t){if(Ybe.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(hj)||typeof r=="object"&&hj(r))return!0}return!1}function g3(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Gbe.has(r)&&(typeof t[r]=="object"&&(0,Bbe.eachItem)(t[r],n=>e+=g3(n)),e===1/0))return 1/0}return e}function v3(t,e="",r){r!==!1&&(e=Ju(e));let n=t.parse(e);return y3(t,n)}On.getFullPath=v3;function y3(t,e){return t.serialize(e).split("#")[0]+"#"}On._getFullPath=y3;var Jbe=/#\/?$/;function Ju(t){return t?t.replace(Jbe,""):""}On.normalizeId=Ju;function Xbe(t,e,r){return r=Ju(r),t.resolve(e,r)}On.resolveUrl=Xbe;var exe=/^[a-z_][-a-z0-9._]*$/i;function txe(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Ju(t[r]||e),o={"":i},a=v3(n,i,!1),s={},c=new Set;return Hbe(t,{allKeys:!0},(d,p,f,m)=>{if(m===void 0)return;let v=a+p,g=o[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),_.call(this,d.$anchor),_.call(this,d.$dynamicAnchor),o[p]=g;function h(y){let b=this.opts.uriResolver.resolve;if(y=Ju(g?b(g,y):y),c.has(y))throw l(y);c.add(y);let x=this.refs[y];return typeof x=="string"&&(x=this.refs[x]),typeof x=="object"?u(d,x.schema,y):y!==Ju(v)&&(y[0]==="#"?(u(d,s[y],y),s[y]=d):this.refs[y]=v),y}function _(y){if(typeof y=="string"){if(!exe.test(y))throw new Error(`invalid anchor "${y}"`);h.call(this,`#${y}`)}}}),s;function u(d,p,f){if(p!==void 0&&!Kbe(d,p))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}On.getSchemaRefs=txe});var em=O(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.getData=Ra.KeywordCxt=Ra.validateFunctionCode=void 0;var k3=XB(),_3=Qf(),vj=cj(),__=Qf(),rxe=a3(),Xf=d3(),gj=f3(),Ie=Je(),qe=Lo(),nxe=Yf(),Fo=xt(),Jf=Gf();function ixe(t){if(I3(t)&&(E3(t),$3(t))){sxe(t);return}S3(t,()=>(0,k3.topBoolOrEmptySchema)(t))}Ra.validateFunctionCode=ixe;function S3({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,Ie._)`${qe.default.data}, ${qe.default.valCxt}`,n.$async,()=>{t.code((0,Ie._)`"use strict"; ${b3(r,i)}`),axe(t,i),t.code(o)}):t.func(e,(0,Ie._)`${qe.default.data}, ${oxe(i)}`,n.$async,()=>t.code(b3(r,i)).code(o))}function oxe(t){return(0,Ie._)`{${qe.default.instancePath}="", ${qe.default.parentData}, ${qe.default.parentDataProperty}, ${qe.default.rootData}=${qe.default.data}${t.dynamicRef?(0,Ie._)`, ${qe.default.dynamicAnchors}={}`:Ie.nil}}={}`}function axe(t,e){t.if(qe.default.valCxt,()=>{t.var(qe.default.instancePath,(0,Ie._)`${qe.default.valCxt}.${qe.default.instancePath}`),t.var(qe.default.parentData,(0,Ie._)`${qe.default.valCxt}.${qe.default.parentData}`),t.var(qe.default.parentDataProperty,(0,Ie._)`${qe.default.valCxt}.${qe.default.parentDataProperty}`),t.var(qe.default.rootData,(0,Ie._)`${qe.default.valCxt}.${qe.default.rootData}`),e.dynamicRef&&t.var(qe.default.dynamicAnchors,(0,Ie._)`${qe.default.valCxt}.${qe.default.dynamicAnchors}`)},()=>{t.var(qe.default.instancePath,(0,Ie._)`""`),t.var(qe.default.parentData,(0,Ie._)`undefined`),t.var(qe.default.parentDataProperty,(0,Ie._)`undefined`),t.var(qe.default.rootData,qe.default.data),e.dynamicRef&&t.var(qe.default.dynamicAnchors,(0,Ie._)`{}`)})}function sxe(t){let{schema:e,opts:r,gen:n}=t;S3(t,()=>{r.$comment&&e.$comment&&T3(t),pxe(t),n.let(qe.default.vErrors,null),n.let(qe.default.errors,0),r.unevaluated&&cxe(t),P3(t),hxe(t)})}function cxe(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Ie._)`${r}.evaluated`),e.if((0,Ie._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Ie._)`${t.evaluated}.props`,(0,Ie._)`undefined`)),e.if((0,Ie._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Ie._)`${t.evaluated}.items`,(0,Ie._)`undefined`))}function b3(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Ie._)`/*# sourceURL=${r} */`:Ie.nil}function uxe(t,e){if(I3(t)&&(E3(t),$3(t))){lxe(t,e);return}(0,k3.boolOrEmptySchema)(t,e)}function $3({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function I3(t){return typeof t.schema!="boolean"}function lxe(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&T3(t),fxe(t),mxe(t);let o=n.const("_errs",qe.default.errors);P3(t,o),n.var(e,(0,Ie._)`${o} === ${qe.default.errors}`)}function E3(t){(0,Fo.checkUnknownRules)(t),dxe(t)}function P3(t,e){if(t.opts.jtd)return x3(t,[],!1,e);let r=(0,_3.getSchemaTypes)(t.schema),n=(0,_3.coerceAndCheckDataType)(t,r);x3(t,r,!n,e)}function dxe(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Fo.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function pxe(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Fo.checkStrictMode)(t,"default is ignored in the schema root")}function fxe(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,nxe.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function mxe(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function T3({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,Ie._)`${qe.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,Ie.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,Ie._)`${qe.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function hxe(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,Ie._)`${qe.default.errors} === 0`,()=>e.return(qe.default.data),()=>e.throw((0,Ie._)`new ${i}(${qe.default.vErrors})`)):(e.assign((0,Ie._)`${n}.errors`,qe.default.vErrors),o.unevaluated&&gxe(t),e.return((0,Ie._)`${qe.default.errors} === 0`))}function gxe({gen:t,evaluated:e,props:r,items:n}){r instanceof Ie.Name&&t.assign((0,Ie._)`${e}.props`,r),n instanceof Ie.Name&&t.assign((0,Ie._)`${e}.items`,n)}function x3(t,e,r,n){let{gen:i,schema:o,data:a,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0,Fo.schemaHasRulesButRef)(o,l))){i.block(()=>O3(t,"$ref",l.all.$ref.definition));return}c.jtd||vxe(t,e),i.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,vj.shouldUseGroup)(o,p)&&(p.type?(i.if((0,__.checkDataType)(p.type,a,c.strictNumbers)),w3(t,p),e.length===1&&e[0]===p.type&&r&&(i.else(),(0,__.reportTypeError)(t)),i.endIf()):w3(t,p),s||i.if((0,Ie._)`${qe.default.errors} === ${n||0}`))}}function w3(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,rxe.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,vj.shouldUseRule)(n,o)&&O3(t,o.keyword,o.definition,e.type)})}function vxe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(yxe(t,e),t.opts.allowUnionTypes||_xe(t,e),bxe(t,t.dataTypes))}function yxe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{z3(t.dataTypes,r)||yj(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),wxe(t,e)}}function _xe(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&yj(t,"use allowUnionTypes to allow union type keyword")}function bxe(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,vj.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>xxe(e,a))&&yj(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function xxe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function z3(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function wxe(t,e){let r=[];for(let n of t.dataTypes)z3(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function yj(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Fo.checkStrictMode)(t,e,t.opts.strictTypes)}var b_=class{constructor(e,r,n){if((0,Xf.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Fo.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",j3(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Xf.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",qe.default.errors))}result(e,r,n){this.failResult((0,Ie.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Ie.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,Ie._)`${r} !== undefined && (${(0,Ie.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Jf.reportExtraError:Jf.reportError)(this,this.def.error,r)}$dataError(){(0,Jf.reportError)(this,this.def.$dataError||Jf.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Jf.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=Ie.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=Ie.nil,r=Ie.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,Ie.or)((0,Ie._)`${i} === undefined`,r)),e!==Ie.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==Ie.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,Ie.or)(a(),s());function a(){if(n.length){if(!(r instanceof Ie.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,Ie._)`${(0,__.checkDataTypes)(c,r,o.opts.strictNumbers,__.DataType.Wrong)}`}return Ie.nil}function s(){if(i.validateSchema){let c=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,Ie._)`!${c}(${r})`}return Ie.nil}}subschema(e,r){let n=(0,gj.getSubschema)(this.it,e);(0,gj.extendSubschemaData)(n,this.it,e),(0,gj.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return uxe(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Fo.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Fo.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,Ie.Name)),!0}};Ra.KeywordCxt=b_;function O3(t,e,r,n){let i=new b_(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Xf.funcKeywordCode)(i,r):"macro"in r?(0,Xf.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Xf.funcKeywordCode)(i,r)}var kxe=/^\/(?:[^~]|~0|~1)*$/,Sxe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function j3(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return qe.default.rootData;if(t[0]==="/"){if(!kxe.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=qe.default.rootData}else{let u=Sxe.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let l=+u[1];if(i=u[2],i==="#"){if(l>=e)throw new Error(c("property/index",l));return n[e-l]}if(l>e)throw new Error(c("data",l));if(o=r[e-l],!i)return o}let a=o,s=i.split("/");for(let u of s)u&&(o=(0,Ie._)`${o}${(0,Ie.getProperty)((0,Fo.unescapeJsonPointer)(u))}`,a=(0,Ie._)`${a} && ${o}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}Ra.getData=j3});var x_=O(bj=>{"use strict";Object.defineProperty(bj,"__esModule",{value:!0});var _j=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};bj.default=_j});var tm=O(kj=>{"use strict";Object.defineProperty(kj,"__esModule",{value:!0});var xj=Yf(),wj=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,xj.resolveUrl)(e,r,n),this.missingSchema=(0,xj.normalizeId)((0,xj.getFullPath)(e,this.missingRef))}};kj.default=wj});var k_=O(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.resolveSchema=bi.getCompilingSchema=bi.resolveRef=bi.compileSchema=bi.SchemaEnv=void 0;var Wi=Je(),$xe=x_(),Ls=Lo(),Bi=Yf(),N3=xt(),Ixe=em(),Xu=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Bi.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};bi.SchemaEnv=Xu;function $j(t){let e=C3.call(this,t);if(e)return e;let r=(0,Bi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new Wi.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:$xe.default,code:(0,Wi._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");t.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:Ls.default.data,parentData:Ls.default.parentData,parentDataProperty:Ls.default.parentDataProperty,dataNames:[Ls.default.data],dataPathArr:[Wi.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Wi.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Wi.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Wi._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,Ixe.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(Ls.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let f=new Function(`${Ls.default.self}`,`${Ls.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:v}=u;f.evaluated={props:m instanceof Wi.Name?void 0:m,items:v instanceof Wi.Name?void 0:v,dynamicProps:m instanceof Wi.Name,dynamicItems:v instanceof Wi.Name},f.source&&(f.source.evaluated=(0,Wi.stringify)(f.evaluated))}return t.validate=f,t}catch(d){throw delete t.validate,delete t.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(t)}}bi.compileSchema=$j;function Exe(t,e,r){var n;r=(0,Bi.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=zxe.call(this,t,r);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new Xu({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=Pxe.call(this,o)}bi.resolveRef=Exe;function Pxe(t){return(0,Bi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:$j.call(this,t)}function C3(t){for(let e of this._compilations)if(Txe(e,t))return e}bi.getCompilingSchema=C3;function Txe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function zxe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||w_.call(this,t,e)}function w_(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Bi._getFullPath)(this.opts.uriResolver,r),i=(0,Bi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Sj.call(this,r,t);let o=(0,Bi.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=w_.call(this,t,a);return typeof s?.schema!="object"?void 0:Sj.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||$j.call(this,a),o===(0,Bi.normalizeId)(e)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,Bi.resolveUrl)(this.opts.uriResolver,i,u)),new Xu({schema:s,schemaId:c,root:t,baseId:i})}return Sj.call(this,r,a)}}bi.resolveSchema=w_;var Oxe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Sj(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,N3.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Oxe.has(s)&&u&&(e=(0,Bi.resolveUrl)(this.opts.uriResolver,e,u))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,N3.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Bi.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=w_.call(this,n,s)}let{schemaId:a}=this.opts;if(o=o||new Xu({schema:r,schemaId:a,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var R3=O((T6e,jxe)=>{jxe.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var U3=O(Ij=>{"use strict";Object.defineProperty(Ij,"__esModule",{value:!0});var A3=Lz();A3.code='require("ajv/dist/runtime/uri").default';Ij.default=A3});var W3=O(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.CodeGen=Ur.Name=Ur.nil=Ur.stringify=Ur.str=Ur._=Ur.KeywordCxt=void 0;var Nxe=em();Object.defineProperty(Ur,"KeywordCxt",{enumerable:!0,get:function(){return Nxe.KeywordCxt}});var el=Je();Object.defineProperty(Ur,"_",{enumerable:!0,get:function(){return el._}});Object.defineProperty(Ur,"str",{enumerable:!0,get:function(){return el.str}});Object.defineProperty(Ur,"stringify",{enumerable:!0,get:function(){return el.stringify}});Object.defineProperty(Ur,"nil",{enumerable:!0,get:function(){return el.nil}});Object.defineProperty(Ur,"Name",{enumerable:!0,get:function(){return el.Name}});Object.defineProperty(Ur,"CodeGen",{enumerable:!0,get:function(){return el.CodeGen}});var Cxe=x_(),L3=tm(),Rxe=sj(),rm=k_(),Axe=Je(),nm=Yf(),S_=Qf(),Pj=xt(),D3=R3(),Uxe=U3(),F3=(t,e)=>new RegExp(t,e);F3.code="new RegExp";var Dxe=["removeAdditional","useDefaults","coerceTypes"],Mxe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),qxe={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Zxe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},M3=200;function Lxe(t){var e,r,n,i,o,a,s,c,u,l,d,p,f,m,v,g,h,_,y,b,x,w,k,$,T;let A=t.strict,z=(e=t.code)===null||e===void 0?void 0:e.optimize,M=z===!0||z===void 0?1:z||0,W=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:F3,R=(i=t.uriResolver)!==null&&i!==void 0?i:Uxe.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:A)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=t.strictNumbers)!==null&&s!==void 0?s:A)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=t.strictTypes)!==null&&u!==void 0?u:A)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=t.strictTuples)!==null&&d!==void 0?d:A)!==null&&p!==void 0?p:"log",strictRequired:(m=(f=t.strictRequired)!==null&&f!==void 0?f:A)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:M,regExp:W}:{optimize:M,regExp:W},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:M3,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:M3,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(_=t.messages)!==null&&_!==void 0?_:!0,inlineRefs:(y=t.inlineRefs)!==null&&y!==void 0?y:!0,schemaId:(b=t.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(x=t.addUsedSchema)!==null&&x!==void 0?x:!0,validateSchema:(w=t.validateSchema)!==null&&w!==void 0?w:!0,validateFormats:(k=t.validateFormats)!==null&&k!==void 0?k:!0,unicodeRegExp:($=t.unicodeRegExp)!==null&&$!==void 0?$:!0,int32range:(T=t.int32range)!==null&&T!==void 0?T:!0,uriResolver:R}}var im=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Lxe(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new Axe.ValueScope({scope:{},prefixes:Mxe,es5:r,lines:n}),this.logger=Hxe(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Rxe.getRules)(),q3.call(this,qxe,e,"NOT SUPPORTED"),q3.call(this,Zxe,e,"DEPRECATED","warn"),this._metaOpts=Bxe.call(this),e.formats&&Vxe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Wxe.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Fxe.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=D3;n==="id"&&(i={...D3},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(l,d){await o.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||a.call(this,p)}async function o(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof L3.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,l)}}function s({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await o.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=n(l))}finally{delete this._loading[l]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,nm.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=Z3.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new rm.SchemaEnv({schema:{},schemaId:n});if(r=rm.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Z3.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,nm.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Qxe.call(this,n,r),!r)return(0,Pj.eachItem)(n,o=>Ej.call(this,o)),this;Jxe.call(this,r);let i={...r,type:(0,S_.getJSONTypes)(r.type),schemaType:(0,S_.getJSONTypes)(r.schemaType)};return(0,Pj.eachItem)(n,i.type.length===0?o=>Ej.call(this,o,i):o=>i.type.forEach(a=>Ej.call(this,o,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=a[s];u&&l&&(a[s]=V3(l))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;n=(0,nm.normalizeId)(a||n);let u=nm.getSchemaRefs.call(this,e,n);return c=new rm.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),i&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):rm.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{rm.compileSchema.call(this,e)}finally{this.opts=r}}};im.ValidationError=Cxe.default;im.MissingRefError=L3.default;Ur.default=im;function q3(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function Z3(t){return t=(0,nm.normalizeId)(t),this.schemas[t]||this.refs[t]}function Fxe(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Vxe(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Wxe(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Bxe(){let t={...this.opts};for(let e of Dxe)delete t[e];return t}var Kxe={log(){},warn(){},error(){}};function Hxe(t){if(t===!1)return Kxe;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Gxe=/^[a-z_$][a-z0-9_$:-]*$/i;function Qxe(t,e){let{RULES:r}=this;if((0,Pj.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Gxe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Ej(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,S_.getJSONTypes)(e.type),schemaType:(0,S_.getJSONTypes)(e.schemaType)}};e.before?Yxe.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function Yxe(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Jxe(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=V3(e)),t.validateSchema=this.compile(e,!0))}var Xxe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function V3(t){return{anyOf:[t,Xxe]}}});var B3=O(Tj=>{"use strict";Object.defineProperty(Tj,"__esModule",{value:!0});var ewe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Tj.default=ewe});var Q3=O(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.callRef=Fs.getValidate=void 0;var twe=tm(),K3=_i(),jn=Je(),tl=Lo(),H3=k_(),$_=xt(),rwe={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:c}=n,{root:u}=o;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=H3.resolveRef.call(c,u,i,r);if(l===void 0)throw new twe.default(n.opts.uriResolver,i,r);if(l instanceof H3.SchemaEnv)return p(l);return f(l);function d(){if(o===u)return I_(t,a,o,o.$async);let m=e.scopeValue("root",{ref:u});return I_(t,(0,jn._)`${m}.validate`,u,u.$async)}function p(m){let v=G3(t,m);I_(t,v,m,m.$async)}function f(m){let v=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,jn.stringify)(m)}:{ref:m}),g=e.name("valid"),h=t.subschema({schema:m,dataTypes:[],schemaPath:jn.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(h),t.ok(g)}}};function G3(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,jn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Fs.getValidate=G3;function I_(t,e,r,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:s,opts:c}=o,u=c.passContext?tl.default.this:jn.nil;n?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=i.let("valid");i.try(()=>{i.code((0,jn._)`await ${(0,K3.callValidateCode)(t,e,u)}`),f(e),a||i.assign(m,!0)},v=>{i.if((0,jn._)`!(${v} instanceof ${o.ValidationError})`,()=>i.throw(v)),p(v),a||i.assign(m,!1)}),t.ok(m)}function d(){t.result((0,K3.callValidateCode)(t,e,u),()=>f(e),()=>p(e))}function p(m){let v=(0,jn._)`${m}.errors`;i.assign(tl.default.vErrors,(0,jn._)`${tl.default.vErrors} === null ? ${v} : ${tl.default.vErrors}.concat(${v})`),i.assign(tl.default.errors,(0,jn._)`${tl.default.vErrors}.length`)}function f(m){var v;if(!o.opts.unevaluated)return;let g=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(o.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(o.props=$_.mergeEvaluated.props(i,g.props,o.props));else{let h=i.var("props",(0,jn._)`${m}.evaluated.props`);o.props=$_.mergeEvaluated.props(i,h,o.props,jn.Name)}if(o.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(o.items=$_.mergeEvaluated.items(i,g.items,o.items));else{let h=i.var("items",(0,jn._)`${m}.evaluated.items`);o.items=$_.mergeEvaluated.items(i,h,o.items,jn.Name)}}}Fs.callRef=I_;Fs.default=rwe});var Y3=O(zj=>{"use strict";Object.defineProperty(zj,"__esModule",{value:!0});var nwe=B3(),iwe=Q3(),owe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",nwe.default,iwe.default];zj.default=owe});var J3=O(Oj=>{"use strict";Object.defineProperty(Oj,"__esModule",{value:!0});var E_=Je(),Aa=E_.operators,P_={maximum:{okStr:"<=",ok:Aa.LTE,fail:Aa.GT},minimum:{okStr:">=",ok:Aa.GTE,fail:Aa.LT},exclusiveMaximum:{okStr:"<",ok:Aa.LT,fail:Aa.GTE},exclusiveMinimum:{okStr:">",ok:Aa.GT,fail:Aa.LTE}},awe={message:({keyword:t,schemaCode:e})=>(0,E_.str)`must be ${P_[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,E_._)`{comparison: ${P_[t].okStr}, limit: ${e}}`},swe={keyword:Object.keys(P_),type:"number",schemaType:"number",$data:!0,error:awe,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,E_._)`${r} ${P_[e].fail} ${n} || isNaN(${r})`)}};Oj.default=swe});var X3=O(jj=>{"use strict";Object.defineProperty(jj,"__esModule",{value:!0});var om=Je(),cwe={message:({schemaCode:t})=>(0,om.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,om._)`{multipleOf: ${t}}`},uwe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:cwe,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,om._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,om._)`${a} !== parseInt(${a})`;t.fail$data((0,om._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};jj.default=uwe});var tK=O(Nj=>{"use strict";Object.defineProperty(Nj,"__esModule",{value:!0});function eK(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}Nj.default=eK;eK.code='require("ajv/dist/runtime/ucs2length").default'});var rK=O(Cj=>{"use strict";Object.defineProperty(Cj,"__esModule",{value:!0});var Vs=Je(),lwe=xt(),dwe=tK(),pwe={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Vs.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Vs._)`{limit: ${t}}`},fwe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:pwe,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Vs.operators.GT:Vs.operators.LT,a=i.opts.unicode===!1?(0,Vs._)`${r}.length`:(0,Vs._)`${(0,lwe.useFunc)(t.gen,dwe.default)}(${r})`;t.fail$data((0,Vs._)`${a} ${o} ${n}`)}};Cj.default=fwe});var nK=O(Rj=>{"use strict";Object.defineProperty(Rj,"__esModule",{value:!0});var mwe=_i(),hwe=xt(),rl=Je(),gwe={message:({schemaCode:t})=>(0,rl.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,rl._)`{pattern: ${t}}`},vwe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:gwe,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,rl._)`new RegExp`:(0,hwe.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,rl._)`${u}(${o}, ${s}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,rl._)`!${l}`)}else{let c=(0,mwe.usePattern)(t,i);t.fail$data((0,rl._)`!${c}.test(${r})`)}}};Rj.default=vwe});var iK=O(Aj=>{"use strict";Object.defineProperty(Aj,"__esModule",{value:!0});var am=Je(),ywe={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,am.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,am._)`{limit: ${t}}`},_we={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ywe,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?am.operators.GT:am.operators.LT;t.fail$data((0,am._)`Object.keys(${r}).length ${i} ${n}`)}};Aj.default=_we});var oK=O(Uj=>{"use strict";Object.defineProperty(Uj,"__esModule",{value:!0});var sm=_i(),cm=Je(),bwe=xt(),xwe={message:({params:{missingProperty:t}})=>(0,cm.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,cm._)`{missingProperty: ${t}}`},wwe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:xwe,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:a}=t,{opts:s}=a;if(!o&&r.length===0)return;let c=r.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let f=t.parentSchema.properties,{definedProperties:m}=t.it;for(let v of r)if(f?.[v]===void 0&&!m.has(v)){let g=a.schemaEnv.baseId+a.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,bwe.checkStrictMode)(a,h,a.opts.strictRequired)}}function u(){if(c||o)t.block$data(cm.nil,d);else for(let f of r)(0,sm.checkReportMissingProp)(t,f)}function l(){let f=e.let("missing");if(c||o){let m=e.let("valid",!0);t.block$data(m,()=>p(f,m)),t.ok(m)}else e.if((0,sm.checkMissingProp)(t,r,f)),(0,sm.reportMissingProp)(t,f),e.else()}function d(){e.forOf("prop",n,f=>{t.setParams({missingProperty:f}),e.if((0,sm.noPropertyInData)(e,i,f,s.ownProperties),()=>t.error())})}function p(f,m){t.setParams({missingProperty:f}),e.forOf(f,n,()=>{e.assign(m,(0,sm.propertyInData)(e,i,f,s.ownProperties)),e.if((0,cm.not)(m),()=>{t.error(),e.break()})},cm.nil)}}};Uj.default=wwe});var aK=O(Dj=>{"use strict";Object.defineProperty(Dj,"__esModule",{value:!0});var um=Je(),kwe={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,um.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,um._)`{limit: ${t}}`},Swe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:kwe,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?um.operators.GT:um.operators.LT;t.fail$data((0,um._)`${r}.length ${i} ${n}`)}};Dj.default=Swe});var T_=O(Mj=>{"use strict";Object.defineProperty(Mj,"__esModule",{value:!0});var sK=wf();sK.code='require("ajv/dist/runtime/equal").default';Mj.default=sK});var cK=O(Zj=>{"use strict";Object.defineProperty(Zj,"__esModule",{value:!0});var qj=Qf(),Dr=Je(),$we=xt(),Iwe=T_(),Ewe={message:({params:{i:t,j:e}})=>(0,Dr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Dr._)`{i: ${t}, j: ${e}}`},Pwe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Ewe,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=t;if(!n&&!i)return;let c=e.let("valid"),u=o.items?(0,qj.getSchemaTypes)(o.items):[];t.block$data(c,l,(0,Dr._)`${a} === false`),t.ok(c);function l(){let m=e.let("i",(0,Dr._)`${r}.length`),v=e.let("j");t.setParams({i:m,j:v}),e.assign(c,!0),e.if((0,Dr._)`${m} > 1`,()=>(d()?p:f)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function p(m,v){let g=e.name("item"),h=(0,qj.checkDataTypes)(u,g,s.opts.strictNumbers,qj.DataType.Wrong),_=e.const("indices",(0,Dr._)`{}`);e.for((0,Dr._)`;${m}--;`,()=>{e.let(g,(0,Dr._)`${r}[${m}]`),e.if(h,(0,Dr._)`continue`),u.length>1&&e.if((0,Dr._)`typeof ${g} == "string"`,(0,Dr._)`${g} += "_"`),e.if((0,Dr._)`typeof ${_}[${g}] == "number"`,()=>{e.assign(v,(0,Dr._)`${_}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Dr._)`${_}[${g}] = ${m}`)})}function f(m,v){let g=(0,$we.useFunc)(e,Iwe.default),h=e.name("outer");e.label(h).for((0,Dr._)`;${m}--;`,()=>e.for((0,Dr._)`${v} = ${m}; ${v}--;`,()=>e.if((0,Dr._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(h)})))}}};Zj.default=Pwe});var uK=O(Fj=>{"use strict";Object.defineProperty(Fj,"__esModule",{value:!0});var Lj=Je(),Twe=xt(),zwe=T_(),Owe={message:"must be equal to constant",params:({schemaCode:t})=>(0,Lj._)`{allowedValue: ${t}}`},jwe={keyword:"const",$data:!0,error:Owe,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,Lj._)`!${(0,Twe.useFunc)(e,zwe.default)}(${r}, ${i})`):t.fail((0,Lj._)`${o} !== ${r}`)}};Fj.default=jwe});var lK=O(Vj=>{"use strict";Object.defineProperty(Vj,"__esModule",{value:!0});var lm=Je(),Nwe=xt(),Cwe=T_(),Rwe={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,lm._)`{allowedValues: ${t}}`},Awe={keyword:"enum",schemaType:"array",$data:!0,error:Rwe,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,Nwe.useFunc)(e,Cwe.default)),l;if(s||n)l=e.let("valid"),t.block$data(l,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let f=e.const("vSchema",o);l=(0,lm.or)(...i.map((m,v)=>p(f,v)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",o,f=>e.if((0,lm._)`${u()}(${r}, ${f})`,()=>e.assign(l,!0).break()))}function p(f,m){let v=i[m];return typeof v=="object"&&v!==null?(0,lm._)`${u()}(${r}, ${f}[${m}])`:(0,lm._)`${r} === ${v}`}}};Vj.default=Awe});var dK=O(Wj=>{"use strict";Object.defineProperty(Wj,"__esModule",{value:!0});var Uwe=J3(),Dwe=X3(),Mwe=rK(),qwe=nK(),Zwe=iK(),Lwe=oK(),Fwe=aK(),Vwe=cK(),Wwe=uK(),Bwe=lK(),Kwe=[Uwe.default,Dwe.default,Mwe.default,qwe.default,Zwe.default,Lwe.default,Fwe.default,Vwe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Wwe.default,Bwe.default];Wj.default=Kwe});var Kj=O(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.validateAdditionalItems=void 0;var Ws=Je(),Bj=xt(),Hwe={message:({params:{len:t}})=>(0,Ws.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ws._)`{limit: ${t}}`},Gwe={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Hwe,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Bj.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}pK(t,n)}};function pK(t,e){let{gen:r,schema:n,data:i,keyword:o,it:a}=t;a.items=!0;let s=r.const("len",(0,Ws._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Ws._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,Bj.alwaysValidSchema)(a,n)){let u=r.var("valid",(0,Ws._)`${s} <= ${e.length}`);r.if((0,Ws.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,l=>{t.subschema({keyword:o,dataProp:l,dataPropType:Bj.Type.Num},u),a.allErrors||r.if((0,Ws.not)(u),()=>r.break())})}}dm.validateAdditionalItems=pK;dm.default=Gwe});var Hj=O(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.validateTuple=void 0;var fK=Je(),z_=xt(),Qwe=_i(),Ywe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return mK(t,"additionalItems",e);r.items=!0,!(0,z_.alwaysValidSchema)(r,e)&&t.ok((0,Qwe.validateArray)(t))}};function mK(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:s}=t;l(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=z_.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),u=n.const("len",(0,fK._)`${o}.length`);r.forEach((d,p)=>{(0,z_.alwaysValidSchema)(s,d)||(n.if((0,fK._)`${u} > ${p}`,()=>t.subschema({keyword:a,schemaProp:p,dataProp:p},c)),t.ok(c))});function l(d){let{opts:p,errSchemaPath:f}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(p.strictTuples&&!v){let g=`"${a}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${f}"`;(0,z_.checkStrictMode)(s,g,p.strictTuples)}}}pm.validateTuple=mK;pm.default=Ywe});var hK=O(Gj=>{"use strict";Object.defineProperty(Gj,"__esModule",{value:!0});var Jwe=Hj(),Xwe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Jwe.validateTuple)(t,"items")};Gj.default=Xwe});var vK=O(Qj=>{"use strict";Object.defineProperty(Qj,"__esModule",{value:!0});var gK=Je(),e0e=xt(),t0e=_i(),r0e=Kj(),n0e={message:({params:{len:t}})=>(0,gK.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,gK._)`{limit: ${t}}`},i0e={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:n0e,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,e0e.alwaysValidSchema)(n,e)&&(i?(0,r0e.validateAdditionalItems)(t,i):t.ok((0,t0e.validateArray)(t)))}};Qj.default=i0e});var yK=O(Yj=>{"use strict";Object.defineProperty(Yj,"__esModule",{value:!0});var xi=Je(),O_=xt(),o0e={message:({params:{min:t,max:e}})=>e===void 0?(0,xi.str)`must contain at least ${t} valid item(s)`:(0,xi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,xi._)`{minContains: ${t}}`:(0,xi._)`{minContains: ${t}, maxContains: ${e}}`},a0e={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:o0e,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,a,s,{minContains:c,maxContains:u}=n;o.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=e.const("len",(0,xi._)`${i}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,O_.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,O_.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,O_.alwaysValidSchema)(o,r)){let v=(0,xi._)`${l} >= ${a}`;s!==void 0&&(v=(0,xi._)`${v} && ${l} <= ${s}`),t.pass(v);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?f(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,xi._)`${i}.length > 0`,p)):(e.let(d,!1),p()),t.result(d,()=>t.reset());function p(){let v=e.name("_valid"),g=e.let("count",0);f(v,()=>e.if(v,()=>m(g)))}function f(v,g){e.forRange("i",0,l,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:O_.Type.Num,compositeRule:!0},v),g()})}function m(v){e.code((0,xi._)`${v}++`),s===void 0?e.if((0,xi._)`${v} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,xi._)`${v} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,xi._)`${v} >= ${a}`,()=>e.assign(d,!0)))}}};Yj.default=a0e});var xK=O(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.validateSchemaDeps=fo.validatePropertyDeps=fo.error=void 0;var Jj=Je(),s0e=xt(),fm=_i();fo.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Jj.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Jj._)`{property: ${t},
|
|
251
|
+
missingProperty: ${n},
|
|
252
|
+
depsCount: ${e},
|
|
253
|
+
deps: ${r}}`};var c0e={keyword:"dependencies",type:"object",schemaType:"object",error:fo.error,code(t){let[e,r]=u0e(t);_K(t,e),bK(t,r)}};function u0e({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function _K(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let c=(0,fm.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of s)(0,fm.checkReportMissingProp)(t,u)}):(r.if((0,Jj._)`${c} && (${(0,fm.checkMissingProp)(t,s,o)})`),(0,fm.reportMissingProp)(t,o),r.else())}}fo.validatePropertyDeps=_K;function bK(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,a=r.name("valid");for(let s in e)(0,s0e.alwaysValidSchema)(o,e[s])||(r.if((0,fm.propertyInData)(r,n,s,o.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:s},a);t.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),t.ok(a))}fo.validateSchemaDeps=bK;fo.default=c0e});var kK=O(Xj=>{"use strict";Object.defineProperty(Xj,"__esModule",{value:!0});var wK=Je(),l0e=xt(),d0e={message:"property name must be valid",params:({params:t})=>(0,wK._)`{propertyName: ${t.propertyName}}`},p0e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:d0e,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,l0e.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,wK.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};Xj.default=p0e});var t1=O(e1=>{"use strict";Object.defineProperty(e1,"__esModule",{value:!0});var j_=_i(),Ki=Je(),f0e=Lo(),N_=xt(),m0e={message:"must NOT have additional properties",params:({params:t})=>(0,Ki._)`{additionalProperty: ${t.additionalProperty}}`},h0e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:m0e,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,N_.alwaysValidSchema)(a,r))return;let u=(0,j_.allSchemaProperties)(n.properties),l=(0,j_.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Ki._)`${o} === ${f0e.default.errors}`);function d(){e.forIn("key",i,g=>{!u.length&&!l.length?m(g):e.if(p(g),()=>m(g))})}function p(g){let h;if(u.length>8){let _=(0,N_.schemaRefOrVal)(a,n.properties,"properties");h=(0,j_.isOwnProperty)(e,_,g)}else u.length?h=(0,Ki.or)(...u.map(_=>(0,Ki._)`${g} === ${_}`)):h=Ki.nil;return l.length&&(h=(0,Ki.or)(h,...l.map(_=>(0,Ki._)`${(0,j_.usePattern)(t,_)}.test(${g})`))),(0,Ki.not)(h)}function f(g){e.code((0,Ki._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,N_.alwaysValidSchema)(a,r)){let h=e.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),e.if((0,Ki.not)(h),()=>{t.reset(),f(g)})):(v(g,h),s||e.if((0,Ki.not)(h),()=>e.break()))}}function v(g,h,_){let y={keyword:"additionalProperties",dataProp:g,dataPropType:N_.Type.Str};_===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(y,h)}}};e1.default=h0e});var IK=O(n1=>{"use strict";Object.defineProperty(n1,"__esModule",{value:!0});var g0e=em(),SK=_i(),r1=xt(),$K=t1(),v0e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&$K.default.code(new g0e.KeywordCxt(o,$K.default,"additionalProperties"));let a=(0,SK.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=r1.mergeEvaluated.props(e,(0,r1.toHash)(a),o.props));let s=a.filter(d=>!(0,r1.alwaysValidSchema)(o,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,SK.propertyInData)(e,i,d,o.opts.ownProperties)),l(d),o.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};n1.default=v0e});var zK=O(i1=>{"use strict";Object.defineProperty(i1,"__esModule",{value:!0});var EK=_i(),C_=Je(),PK=xt(),TK=xt(),y0e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:a}=o,s=(0,EK.allSchemaProperties)(r),c=s.filter(v=>(0,PK.alwaysValidSchema)(o,r[v]));if(s.length===0||c.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&i.properties,l=e.name("valid");o.props!==!0&&!(o.props instanceof C_.Name)&&(o.props=(0,TK.evaluatedPropsToName)(e,o.props));let{props:d}=o;p();function p(){for(let v of s)u&&f(v),o.allErrors?m(v):(e.var(l,!0),m(v),e.if(l))}function f(v){for(let g in u)new RegExp(v).test(g)&&(0,PK.checkStrictMode)(o,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){e.forIn("key",n,g=>{e.if((0,C_._)`${(0,EK.usePattern)(t,v)}.test(${g})`,()=>{let h=c.includes(v);h||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:TK.Type.Str},l),o.opts.unevaluated&&d!==!0?e.assign((0,C_._)`${d}[${g}]`,!0):!h&&!o.allErrors&&e.if((0,C_.not)(l),()=>e.break())})})}}};i1.default=y0e});var OK=O(o1=>{"use strict";Object.defineProperty(o1,"__esModule",{value:!0});var _0e=xt(),b0e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,_0e.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};o1.default=b0e});var jK=O(a1=>{"use strict";Object.defineProperty(a1,"__esModule",{value:!0});var x0e=_i(),w0e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:x0e.validateUnion,error:{message:"must match a schema in anyOf"}};a1.default=w0e});var NK=O(s1=>{"use strict";Object.defineProperty(s1,"__esModule",{value:!0});var R_=Je(),k0e=xt(),S0e={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,R_._)`{passingSchemas: ${t.passing}}`},$0e={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:S0e,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(a,()=>t.reset(),()=>t.error(!0));function u(){o.forEach((l,d)=>{let p;(0,k0e.alwaysValidSchema)(i,l)?e.var(c,!0):p=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,R_._)`${c} && ${a}`).assign(a,!1).assign(s,(0,R_._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(a,!0),e.assign(s,d),p&&t.mergeEvaluated(p,R_.Name)})})}}};s1.default=$0e});var CK=O(c1=>{"use strict";Object.defineProperty(c1,"__esModule",{value:!0});var I0e=xt(),E0e={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,a)=>{if((0,I0e.alwaysValidSchema)(n,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(s)})}};c1.default=E0e});var UK=O(u1=>{"use strict";Object.defineProperty(u1,"__esModule",{value:!0});var A_=Je(),AK=xt(),P0e={message:({params:t})=>(0,A_.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,A_._)`{failingKeyword: ${t.ifClause}}`},T0e={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:P0e,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,AK.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=RK(n,"then"),o=RK(n,"else");if(!i&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&o){let l=e.let("ifClause");t.setParams({ifClause:l}),e.if(s,u("then",l),u("else",l))}else i?e.if(s,u("then")):e.if((0,A_.not)(s),u("else"));t.pass(a,()=>t.error(!0));function c(){let l=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(l)}function u(l,d){return()=>{let p=t.subschema({keyword:l},s);e.assign(a,s),t.mergeValidEvaluated(p,a),d?e.assign(d,(0,A_._)`${l}`):t.setParams({ifClause:l})}}}};function RK(t,e){let r=t.schema[e];return r!==void 0&&!(0,AK.alwaysValidSchema)(t,r)}u1.default=T0e});var DK=O(l1=>{"use strict";Object.defineProperty(l1,"__esModule",{value:!0});var z0e=xt(),O0e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,z0e.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};l1.default=O0e});var MK=O(d1=>{"use strict";Object.defineProperty(d1,"__esModule",{value:!0});var j0e=Kj(),N0e=hK(),C0e=Hj(),R0e=vK(),A0e=yK(),U0e=xK(),D0e=kK(),M0e=t1(),q0e=IK(),Z0e=zK(),L0e=OK(),F0e=jK(),V0e=NK(),W0e=CK(),B0e=UK(),K0e=DK();function H0e(t=!1){let e=[L0e.default,F0e.default,V0e.default,W0e.default,B0e.default,K0e.default,D0e.default,M0e.default,U0e.default,q0e.default,Z0e.default];return t?e.push(N0e.default,R0e.default):e.push(j0e.default,C0e.default),e.push(A0e.default),e}d1.default=H0e});var qK=O(p1=>{"use strict";Object.defineProperty(p1,"__esModule",{value:!0});var fr=Je(),G0e={message:({schemaCode:t})=>(0,fr.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,fr._)`{format: ${t}}`},Q0e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:G0e,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;i?p():f();function p(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,fr._)`${m}[${a}]`),g=r.let("fType"),h=r.let("format");r.if((0,fr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,fr._)`${v}.type || "string"`).assign(h,(0,fr._)`${v}.validate`),()=>r.assign(g,(0,fr._)`"string"`).assign(h,v)),t.fail$data((0,fr.or)(_(),y()));function _(){return c.strictSchema===!1?fr.nil:(0,fr._)`${a} && !${h}`}function y(){let b=l.$async?(0,fr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,fr._)`${h}(${n})`,x=(0,fr._)`(typeof ${h} == "function" ? ${b} : ${h}.test(${n}))`;return(0,fr._)`${h} && ${h} !== true && ${g} === ${e} && !${x}`}}function f(){let m=d.formats[o];if(!m){_();return}if(m===!0)return;let[v,g,h]=y(m);v===e&&t.pass(b());function _(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function y(x){let w=x instanceof RegExp?(0,fr.regexpCode)(x):c.code.formats?(0,fr._)`${c.code.formats}${(0,fr.getProperty)(o)}`:void 0,k=r.scopeValue("formats",{key:o,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,fr._)`${k}.validate`]:["string",x,k]}function b(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,fr._)`await ${h}(${n})`}return typeof g=="function"?(0,fr._)`${h}(${n})`:(0,fr._)`${h}.test(${n})`}}}};p1.default=Q0e});var ZK=O(f1=>{"use strict";Object.defineProperty(f1,"__esModule",{value:!0});var Y0e=qK(),J0e=[Y0e.default];f1.default=J0e});var LK=O(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.contentVocabulary=nl.metadataVocabulary=void 0;nl.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];nl.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var VK=O(m1=>{"use strict";Object.defineProperty(m1,"__esModule",{value:!0});var X0e=Y3(),eke=dK(),tke=MK(),rke=ZK(),FK=LK(),nke=[X0e.default,eke.default,(0,tke.default)(),rke.default,FK.metadataVocabulary,FK.contentVocabulary];m1.default=nke});var BK=O(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});U_.DiscrError=void 0;var WK;(function(t){t.Tag="tag",t.Mapping="mapping"})(WK||(U_.DiscrError=WK={}))});var HK=O(g1=>{"use strict";Object.defineProperty(g1,"__esModule",{value:!0});var il=Je(),h1=BK(),KK=k_(),ike=tm(),oke=xt(),ake={message:({params:{discrError:t,tagName:e}})=>t===h1.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,il._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},ske={keyword:"discriminator",type:"object",schemaType:"object",error:ake,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,il._)`${r}${(0,il.getProperty)(s)}`);e.if((0,il._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:h1.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let f=p();e.if(!1);for(let m in f)e.elseIf((0,il._)`${u} === ${m}`),e.assign(c,d(f[m]));e.else(),t.error(!1,{discrError:h1.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(f){let m=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:f},m);return t.mergeEvaluated(v,il.Name),m}function p(){var f;let m={},v=h(i),g=!0;for(let b=0;b<a.length;b++){let x=a[b];if(x?.$ref&&!(0,oke.schemaHasRulesButRef)(x,o.self.RULES)){let k=x.$ref;if(x=KK.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,k),x instanceof KK.SchemaEnv&&(x=x.schema),x===void 0)throw new ike.default(o.opts.uriResolver,o.baseId,k)}let w=(f=x?.properties)===null||f===void 0?void 0:f[s];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(v||h(x)),_(w,b)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function h({required:b}){return Array.isArray(b)&&b.includes(s)}function _(b,x){if(b.const)y(b.const,x);else if(b.enum)for(let w of b.enum)y(w,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function y(b,x){if(typeof b!="string"||b in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[b]=x}}}};g1.default=ske});var GK=O((vqe,cke)=>{cke.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var YK=O((tr,v1)=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.MissingRefError=tr.ValidationError=tr.CodeGen=tr.Name=tr.nil=tr.stringify=tr.str=tr._=tr.KeywordCxt=tr.Ajv=void 0;var uke=W3(),lke=VK(),dke=HK(),QK=GK(),pke=["/properties"],D_="http://json-schema.org/draft-07/schema",ol=class extends uke.default{_addVocabularies(){super._addVocabularies(),lke.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(dke.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(QK,pke):QK;this.addMetaSchema(e,D_,!1),this.refs["http://json-schema.org/schema"]=D_}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(D_)?D_:void 0)}};tr.Ajv=ol;v1.exports=tr=ol;v1.exports.Ajv=ol;Object.defineProperty(tr,"__esModule",{value:!0});tr.default=ol;var fke=em();Object.defineProperty(tr,"KeywordCxt",{enumerable:!0,get:function(){return fke.KeywordCxt}});var al=Je();Object.defineProperty(tr,"_",{enumerable:!0,get:function(){return al._}});Object.defineProperty(tr,"str",{enumerable:!0,get:function(){return al.str}});Object.defineProperty(tr,"stringify",{enumerable:!0,get:function(){return al.stringify}});Object.defineProperty(tr,"nil",{enumerable:!0,get:function(){return al.nil}});Object.defineProperty(tr,"Name",{enumerable:!0,get:function(){return al.Name}});Object.defineProperty(tr,"CodeGen",{enumerable:!0,get:function(){return al.CodeGen}});var mke=x_();Object.defineProperty(tr,"ValidationError",{enumerable:!0,get:function(){return mke.default}});var hke=tm();Object.defineProperty(tr,"MissingRefError",{enumerable:!0,get:function(){return hke.default}})});var JK=O(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.formatLimitDefinition=void 0;var gke=YK(),Hi=Je(),Ua=Hi.operators,M_={formatMaximum:{okStr:"<=",ok:Ua.LTE,fail:Ua.GT},formatMinimum:{okStr:">=",ok:Ua.GTE,fail:Ua.LT},formatExclusiveMaximum:{okStr:"<",ok:Ua.LT,fail:Ua.GTE},formatExclusiveMinimum:{okStr:">",ok:Ua.GT,fail:Ua.LTE}},vke={message:({keyword:t,schemaCode:e})=>(0,Hi.str)`should be ${M_[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Hi._)`{comparison: ${M_[t].okStr}, limit: ${e}}`};sl.formatLimitDefinition={keyword:Object.keys(M_),type:"string",schemaType:"string",$data:!0,error:vke,code(t){let{gen:e,data:r,schemaCode:n,keyword:i,it:o}=t,{opts:a,self:s}=o;if(!a.validateFormats)return;let c=new gke.KeywordCxt(o,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let p=e.scopeValue("formats",{ref:s.formats,code:a.code.formats}),f=e.const("fmt",(0,Hi._)`${p}[${c.schemaCode}]`);t.fail$data((0,Hi.or)((0,Hi._)`typeof ${f} != "object"`,(0,Hi._)`${f} instanceof RegExp`,(0,Hi._)`typeof ${f}.compare != "function"`,d(f)))}function l(){let p=c.schema,f=s.formats[p];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw new Error(`"${i}": format "${p}" does not define "compare" function`);let m=e.scopeValue("formats",{key:p,ref:f,code:a.code.formats?(0,Hi._)`${a.code.formats}${(0,Hi.getProperty)(p)}`:void 0});t.fail$data(d(m))}function d(p){return(0,Hi._)`${p}.compare(${r}, ${n}) ${M_[i].fail} 0`}},dependencies:["format"]};var yke=t=>(t.addKeyword(sl.formatLimitDefinition),t);sl.default=yke});var rH=O((mm,tH)=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var cl=UB(),_ke=JK(),y1=Je(),XK=new y1.Name("fullFormats"),bke=new y1.Name("fastFormats"),_1=(t,e={keywords:!0})=>{if(Array.isArray(e))return eH(t,e,cl.fullFormats,XK),t;let[r,n]=e.mode==="fast"?[cl.fastFormats,bke]:[cl.fullFormats,XK],i=e.formats||cl.formatNames;return eH(t,i,r,n),e.keywords&&(0,_ke.default)(t),t};_1.get=(t,e="full")=>{let n=(e==="fast"?cl.fastFormats:cl.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function eH(t,e,r,n){var i,o;(i=(o=t.opts.code).formats)!==null&&i!==void 0||(o.formats=(0,y1._)`require("ajv-formats/dist/formats").${n}`);for(let a of e)t.addFormat(a,r[a])}tH.exports=mm=_1;Object.defineProperty(mm,"__esModule",{value:!0});mm.default=_1});function xke(){let t=new nH.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,iH.default)(t),t}var nH,iH,q_,oH=E(()=>{nH=hl(TB(),1),iH=hl(rH(),1);q_=class{constructor(e){this._ajv=e??xke()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}});var Z_,aH=E(()=>{df();Z_=class{constructor(e){this._client=e}async*callToolStream(e,r=zu,n){let i=this._client,o={...n,task:n?.task??(i.isToolTask(e.name)?{}:void 0)},a=i.requestStream({method:"tools/call",params:e},r,o),s=i.getToolOutputValidator(e.name);for await(let c of a){if(c.type==="result"&&s){let u=c.result;if(!u.structuredContent&&!u.isError){yield{type:"error",error:new Ee(Ue.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`)};return}if(u.structuredContent)try{let l=s(u.structuredContent);if(!l.valid){yield{type:"error",error:new Ee(Ue.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)};return}}catch(l){if(l instanceof Ee){yield{type:"error",error:l};return}yield{type:"error",error:new Ee(Ue.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)};return}}yield c}}async getTask(e,r){return this._client.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._client.getTaskResult({taskId:e},r,n)}async listTasks(e,r){return this._client.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._client.cancelTask({taskId:e},r)}requestStream(e,r,n){return this._client.requestStream(e,r,n)}}});function sH(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!t.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}function cH(t,e,r){if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!t.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!t.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var uH=E(()=>{});function L_(t,e){if(!(!t||e===null||typeof e!="object")){if(t.type==="object"&&t.properties&&typeof t.properties=="object"){let r=e,n=t.properties;for(let i of Object.keys(n)){let o=n[i];r[i]===void 0&&Object.prototype.hasOwnProperty.call(o,"default")&&(r[i]=o.default),r[i]!==void 0&&L_(o,r[i])}}if(Array.isArray(t.anyOf))for(let r of t.anyOf)typeof r!="boolean"&&L_(r,e);if(Array.isArray(t.oneOf))for(let r of t.oneOf)typeof r!="boolean"&&L_(r,e)}}function wke(t){if(!t)return{supportsFormMode:!1,supportsUrlMode:!1};let e=t.form!==void 0,r=t.url!==void 0;return{supportsFormMode:e||!e&&!r,supportsUrlMode:r}}var F_,lH=E(()=>{nV();df();oH();hy();aH();uH();F_=class extends Py{constructor(e,r){super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=r?.capabilities??{},this._jsonSchemaValidator=r?.jsonSchemaValidator??new q_,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",LT,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",qT,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",NT,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Z_(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=rV(this._capabilities,e)}setRequestHandler(e,r){let i=my(e)?.method;if(!i)throw new Error("Schema is missing a method literal");let o;if(Eu(i)){let s=i;o=s._zod?.def?.value??s.value}else{let s=i;o=s._def?.value??s.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");let a=o;if(a==="elicitation/create"){let s=async(c,u)=>{let l=Mi(BT,c);if(!l.success){let _=l.error instanceof Error?l.error.message:String(l.error);throw new Ee(Ue.InvalidParams,`Invalid elicitation request: ${_}`)}let{params:d}=l.data;d.mode=d.mode??"form";let{supportsFormMode:p,supportsUrlMode:f}=wke(this._capabilities.elicitation);if(d.mode==="form"&&!p)throw new Ee(Ue.InvalidParams,"Client does not support form-mode elicitation requests");if(d.mode==="url"&&!f)throw new Ee(Ue.InvalidParams,"Client does not support URL-mode elicitation requests");let m=await Promise.resolve(r(c,u));if(d.task){let _=Mi($s,m);if(!_.success){let y=_.error instanceof Error?_.error.message:String(_.error);throw new Ee(Ue.InvalidParams,`Invalid task creation result: ${y}`)}return _.data}let v=Mi(KT,m);if(!v.success){let _=v.error instanceof Error?v.error.message:String(v.error);throw new Ee(Ue.InvalidParams,`Invalid elicitation result: ${_}`)}let g=v.data,h=d.mode==="form"?d.requestedSchema:void 0;if(d.mode==="form"&&g.action==="accept"&&g.content&&h&&this._capabilities.elicitation?.form?.applyDefaults)try{L_(h,g.content)}catch{}return g};return super.setRequestHandler(e,s)}if(a==="sampling/createMessage"){let s=async(c,u)=>{let l=Mi(FT,c);if(!l.success){let g=l.error instanceof Error?l.error.message:String(l.error);throw new Ee(Ue.InvalidParams,`Invalid sampling request: ${g}`)}let{params:d}=l.data,p=await Promise.resolve(r(c,u));if(d.task){let g=Mi($s,p);if(!g.success){let h=g.error instanceof Error?g.error.message:String(g.error);throw new Ee(Ue.InvalidParams,`Invalid task creation result: ${h}`)}return g.data}let m=d.tools||d.toolChoice?WT:VT,v=Mi(m,p);if(!v.success){let g=v.error instanceof Error?v.error.message:String(v.error);throw new Ee(Ue.InvalidParams,`Invalid sampling result: ${g}`)}return v.data};return super.setRequestHandler(e,s)}return super.setRequestHandler(e,r)}assertCapability(e,r){if(!this._serverCapabilities?.[e])throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{let n=await this.request({method:"initialize",params:{protocolVersion:wT,capabilities:this._capabilities,clientInfo:this._clientInfo}},ET,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!R9.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){switch(e){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"initialize":break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break;case"notifications/initialized":break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${e})`);break;case"ping":break}}assertTaskCapability(e){sH(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&cH(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},Ss,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},HT,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},Ss,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},MT,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},CT,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},TT,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},zT,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},jT,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},Ss,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},Ss,r)}async callTool(e,r=zu,n){if(this.isToolTaskRequired(e.name))throw new Ee(Ue.InvalidRequest,`Tool "${e.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);let i=await this.request({method:"tools/call",params:e},r,n),o=this.getToolOutputValidator(e.name);if(o){if(!i.structuredContent&&!i.isError)throw new Ee(Ue.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(i.structuredContent)try{let a=o(i.structuredContent);if(!a.valid)throw new Ee(Ue.InvalidParams,`Structured content does not match the tool's output schema: ${a.errorMessage}`)}catch(a){throw a instanceof Ee?a:new Ee(Ue.InvalidParams,`Failed to validate structured content: ${a instanceof Error?a.message:String(a)}`)}}return i}isToolTask(e){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(e):!1}isToolTaskRequired(e){return this._cachedRequiredTaskTools.has(e)}cacheToolMetadata(e){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(let r of e){if(r.outputSchema){let i=this._jsonSchemaValidator.getValidator(r.outputSchema);this._cachedToolOutputValidators.set(r.name,i)}let n=r.execution?.taskSupport;(n==="required"||n==="optional")&&this._cachedKnownTaskTools.add(r.name),n==="required"&&this._cachedRequiredTaskTools.add(r.name)}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){let n=await this.request({method:"tools/list",params:e},ZT,r);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,r,n,i){let o=Y9.safeParse(n);if(!o.success)throw new Error(`Invalid ${e} listChanged options: ${o.error.message}`);if(typeof n.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:s}=o.data,{onChanged:c}=n,u=async()=>{if(!a){c(null,null);return}try{let d=await i();c(null,d)}catch(d){let p=d instanceof Error?d:new Error(String(d));c(p,null)}},l=()=>{if(s){let d=this._listChangedDebounceTimers.get(e);d&&clearTimeout(d);let p=setTimeout(u,s);this._listChangedDebounceTimers.set(e,p)}else u()};this.setNotificationHandler(r,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}});var hH=O((zqe,mH)=>{mH.exports=fH;fH.sync=Ske;var dH=kt("fs");function kke(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i)return!0}return!1}function pH(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:kke(e,r)}function fH(t,e,r){dH.stat(t,function(n,i){r(n,n?!1:pH(i,t,e))})}function Ske(t,e){return pH(dH.statSync(t),t,e)}});var bH=O((Oqe,_H)=>{_H.exports=vH;vH.sync=$ke;var gH=kt("fs");function vH(t,e,r){gH.stat(t,function(n,i){r(n,n?!1:yH(i,e))})}function $ke(t,e){return yH(gH.statSync(t),e)}function yH(t,e){return t.isFile()&&Ike(t,e)}function Ike(t,e){var r=t.mode,n=t.uid,i=t.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),a=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),s=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=s|c,d=r&u||r&c&&i===a||r&s&&n===o||r&l&&o===0;return d}});var wH=O((Nqe,xH)=>{var jqe=kt("fs"),V_;process.platform==="win32"||global.TESTING_WINDOWS?V_=hH():V_=bH();xH.exports=b1;b1.sync=Eke;function b1(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){b1(t,e||{},function(o,a){o?i(o):n(a)})})}V_(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function Eke(t,e){try{return V_.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var TH=O((Cqe,PH)=>{var ul=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",kH=kt("path"),Pke=ul?";":":",SH=wH(),$H=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),IH=(t,e)=>{let r=e.colon||Pke,n=t.match(/\//)||ul&&t.match(/\\/)?[""]:[...ul?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],i=ul?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=ul?i.split(r):[""];return ul&&t.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},EH=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:i,pathExtExe:o}=IH(t,e),a=[],s=u=>new Promise((l,d)=>{if(u===n.length)return e.all&&a.length?l(a):d($H(t));let p=n[u],f=/^".*"$/.test(p)?p.slice(1,-1):p,m=kH.join(f,t),v=!f&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;l(c(v,u,0))}),c=(u,l,d)=>new Promise((p,f)=>{if(d===i.length)return p(s(l+1));let m=i[d];SH(u+m,{pathExt:o},(v,g)=>{if(!v&&g)if(e.all)a.push(u+m);else return p(u+m);return p(c(u,l,d+1))})});return r?s(0).then(u=>r(null,u),r):s(0)},Tke=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=IH(t,e),o=[];for(let a=0;a<r.length;a++){let s=r[a],c=/^".*"$/.test(s)?s.slice(1,-1):s,u=kH.join(c,t),l=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;for(let d=0;d<n.length;d++){let p=l+n[d];try{if(SH.sync(p,{pathExt:i}))if(e.all)o.push(p);else return p}catch{}}}if(e.all&&o.length)return o;if(e.nothrow)return null;throw $H(t)};PH.exports=EH;EH.sync=Tke});var OH=O((Rqe,x1)=>{"use strict";var zH=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};x1.exports=zH;x1.exports.default=zH});var RH=O((Aqe,CH)=>{"use strict";var jH=kt("path"),zke=TH(),Oke=OH();function NH(t,e){let r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(t.options.cwd)}catch{}let a;try{a=zke.sync(t.command,{path:r[Oke({env:r})],pathExt:e?jH.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return a&&(a=jH.resolve(i?t.options.cwd:"",a)),a}function jke(t){return NH(t)||NH(t,!0)}CH.exports=jke});var AH=O((Uqe,k1)=>{"use strict";var w1=/([()\][%!^"`<>&|;, *?])/g;function Nke(t){return t=t.replace(w1,"^$1"),t}function Cke(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(w1,"^$1"),e&&(t=t.replace(w1,"^$1")),t}k1.exports.command=Nke;k1.exports.argument=Cke});var DH=O((Dqe,UH)=>{"use strict";UH.exports=/^#!(.*)/});var qH=O((Mqe,MH)=>{"use strict";var Rke=DH();MH.exports=(t="")=>{let e=t.match(Rke);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var LH=O((qqe,ZH)=>{"use strict";var S1=kt("fs"),Ake=qH();function Uke(t){let r=Buffer.alloc(150),n;try{n=S1.openSync(t,"r"),S1.readSync(n,r,0,150,0),S1.closeSync(n)}catch{}return Ake(r.toString())}ZH.exports=Uke});var BH=O((Zqe,WH)=>{"use strict";var Dke=kt("path"),FH=RH(),VH=AH(),Mke=LH(),qke=process.platform==="win32",Zke=/\.(?:com|exe)$/i,Lke=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Fke(t){t.file=FH(t);let e=t.file&&Mke(t.file);return e?(t.args.unshift(t.file),t.command=e,FH(t)):t.file}function Vke(t){if(!qke)return t;let e=Fke(t),r=!Zke.test(e);if(t.options.forceShell||r){let n=Lke.test(e);t.command=Dke.normalize(t.command),t.command=VH.command(t.command),t.args=t.args.map(o=>VH.argument(o,n));let i=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${i}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Wke(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let n={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?n:Vke(n)}WH.exports=Wke});var GH=O((Lqe,HH)=>{"use strict";var $1=process.platform==="win32";function I1(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function Bke(t,e){if(!$1)return;let r=t.emit;t.emit=function(n,i){if(n==="exit"){let o=KH(i,e);if(o)return r.call(t,"error",o)}return r.apply(t,arguments)}}function KH(t,e){return $1&&t===1&&!e.file?I1(e.original,"spawn"):null}function Kke(t,e){return $1&&t===1&&!e.file?I1(e.original,"spawnSync"):null}HH.exports={hookChildProcess:Bke,verifyENOENT:KH,verifyENOENTSync:Kke,notFoundError:I1}});var JH=O((Fqe,ll)=>{"use strict";var QH=kt("child_process"),E1=BH(),P1=GH();function YH(t,e,r){let n=E1(t,e,r),i=QH.spawn(n.command,n.args,n.options);return P1.hookChildProcess(i,n),i}function Hke(t,e,r){let n=E1(t,e,r),i=QH.spawnSync(n.command,n.args,n.options);return i.error=i.error||P1.verifyENOENTSync(i.status,n),i}ll.exports=YH;ll.exports.spawn=YH;ll.exports.sync=Hke;ll.exports._parse=E1;ll.exports._enoent=P1});function Gke(t){return F9.parse(JSON.parse(t))}function XH(t){return JSON.stringify(t)+`
|
|
254
|
+
`}var W_,eG=E(()=>{df();W_=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
255
|
+
`);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),Gke(r)}clear(){this._buffer=void 0}}});import T1 from"node:process";import{PassThrough as Qke}from"node:stream";function Jke(){let t={};for(let e of Yke){let r=T1.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}var tG,Yke,B_,rG=E(()=>{tG=hl(JH(),1);eG();Yke=T1.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];B_=class{constructor(e){this._readBuffer=new W_,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new Qke)}async start(){if(this._process)throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,r)=>{this._process=(0,tG.default)(this._serverParams.command,this._serverParams.args??[],{env:{...Jke(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:T1.platform==="win32",cwd:this._serverParams.cwd}),this._process.on("error",n=>{r(n),this.onerror?.(n)}),this._process.on("spawn",()=>{e()}),this._process.on("close",n=>{this._process=void 0,this.onclose?.()}),this._process.stdin?.on("error",n=>{this.onerror?.(n)}),this._process.stdout?.on("data",n=>{this._readBuffer.append(n),this.processReadBuffer()}),this._process.stdout?.on("error",n=>{this.onerror?.(n)}),this._stderrStream&&this._process.stderr&&this._process.stderr.pipe(this._stderrStream)})}get stderr(){return this._stderrStream?this._stderrStream:this._process?.stderr??null}get pid(){return this._process?.pid??null}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){if(this._process){let e=this._process;this._process=void 0;let r=new Promise(n=>{e.once("close",()=>{n()})});try{e.stdin?.end()}catch{}if(await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())]),e.exitCode===null){try{e.kill("SIGTERM")}catch{}await Promise.race([r,new Promise(n=>setTimeout(n,2e3).unref())])}if(e.exitCode===null)try{e.kill("SIGKILL")}catch{}}this._readBuffer.clear()}send(e){return new Promise(r=>{if(!this._process?.stdin)throw new Error("Not connected");let n=XH(e);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}}});var K_,nG=E(()=>{lH();rG();wi();K_=class{#e=new Map;async ensureServer(e,r){if(this.#e.has(e))return this.#e.get(e);let{command:n,args:i=[],env:o={}}=r;q.debug(`[MCP] Starting ${e}: ${n} ${i.join(" ")}`);let a=new B_({command:n,args:i,env:{...process.env,...o}}),s=new F_({name:`zibby-chat-${e}`,version:"1.0.0"},{capabilities:{}});await s.connect(a);let c={client:s,transport:a,serverConfig:r};return this.#e.set(e,c),c}async callTool(e,r,n={}){let i=this.#e.get(e);if(!i)throw new Error(`MCP server "${e}" not running`);q.debug(`[MCP] ${e}.${r}(${JSON.stringify(n).slice(0,200)})`);let o=await i.client.callTool({name:r,arguments:n});return{text:o.content?.filter(s=>s.type==="text").map(s=>s.text).join(`
|
|
256
|
+
`)||"",isError:o.isError||!1}}isRunning(e){return this.#e.has(e)}async stopServer(e){let r=this.#e.get(e);if(r){try{await r.client.close()}catch(n){q.debug(`[MCP] Error closing ${e}: ${n.message}`)}this.#e.delete(e)}}async stopAll(){let e=[...this.#e.keys()];await Promise.allSettled(e.map(r=>this.stopServer(r)))}}});import{existsSync as Xke,readFileSync as eSe}from"fs";import{join as tSe}from"path";import{homedir as rSe}from"os";function nSe(){try{let t=tSe(rSe(),".zibby","config.json");return Xke(t)?JSON.parse(eSe(t,"utf-8")):{}}catch{return{}}}function H_(t){return String(t||"").replace(/\/v1\/?$/,"")}function iSe(t,e){let r=process.env.OPENAI_PROXY_URL;if(r)return H_(r);if(t==="session")return e.proxyUrl?H_(e.proxyUrl):`${(process.env.ZIBBY_API_URL||"https://api-prod.zibby.app").replace(/\/$/,"")}/openai-proxy`;if(t==="byok"){let n=process.env.OPENAI_BASE_URL;return H_(n||"https://api.openai.com")}return H_(r||"")}function z1(){let t=nSe(),e=process.env.ZIBBY_USER_TOKEN||t.sessionToken||null,r=process.env.OPENAI_API_KEY||null,n=(process.env.ASSISTANT_AUTH_MODE||"").trim().toLowerCase(),i=process.env.OPENAI_PROXY_NO_AUTH==="true",o=process.env.OPENAI_PROXY_URL,a="session";n==="byok"||n==="local"||n==="session"?a=n:e?a="session":r?a="byok":o&&i&&(a="local");let s=iSe(a,t),c={"Content-Type":"application/json"};if(a==="session"){if(!e)return{ok:!1,mode:a,reason:"missing_session_token"};c.Authorization=`Bearer ${e}`}else if(a==="byok"){if(!r)return{ok:!1,mode:a,reason:"missing_openai_api_key"};c.Authorization=`Bearer ${r}`}else if(a==="local"){if(!s)return{ok:!1,mode:a,reason:"missing_openai_proxy_url"};!i&&r&&(c.Authorization=`Bearer ${r}`)}return s?{ok:!0,mode:a,baseUrl:s,headers:c,tokenPreview:c.Authorization?`***${c.Authorization.slice(-4)}`:"none"}:{ok:!1,mode:a,reason:"missing_base_url"}}var iG=E(()=>{});function G_(t,e){let r=String(t??"");return r.length<=e?r:`${r.slice(0,Math.max(0,e-30))}
|
|
257
|
+
|
|
258
|
+
[tool result truncated for size]`}function oSe(t,e){if(typeof t=="string")return G_(t,e);try{return G_(JSON.stringify(t),e)}catch{return G_(String(t),e)}}function oG(t){let e=new Set;for(let i of t)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let o of i.tool_calls)e.add(o.id);let r=t.filter(i=>i.role==="tool"?e.has(i.tool_call_id):!0),n=new Set;for(let i of r)i.role==="tool"&&n.add(i.tool_call_id);return r.map(i=>{if(i.role!=="assistant"||!Array.isArray(i.tool_calls)||i.tool_calls.every(c=>n.has(c.id)))return i;let{tool_calls:a,...s}=i;return{...s,content:s.content||""}})}function aSe(t){let e=Array.isArray(t?.messages)?t.messages:[],r=e.find(o=>o.role==="system"),n=e.slice(-4).map(o=>({...o,content:G_(o.content,o.role==="tool"?1200:2500)}));n=oG(n);let i={...t,messages:[r,...n].filter(Boolean)};return delete i.tools,i}async function sSe({body:t,streaming:e,auth:r,options:n,fetchCompletion:i,fetchStreamingCompletion:o,onFallbackLog:a}){try{return e?await o(t,r,n):await i(t,r,n)}catch(s){let c=String(s?.message||s||"");if(!/proxy error 413|payload too large/i.test(c))throw s;let u=aSe(t);return typeof a=="function"&&a(t,u),{data:e?await o(u,r,n):await i(u,r,n),fallback:u}}}async function aG({body:t,auth:e,options:r,streaming:n,toolContext:i,activeSkills:o,round:a,verbose:s,dependencies:c,config:u={}}){let l=u.maxToolResultChars||3e3,{fetchCompletion:d,fetchStreamingCompletion:p,onFallbackLog:f,hasToolCalls:m,getTextContent:v,parseToolCalls:g,buildAssistantMessage:h,buildToolResultMessage:_,executeTool:y,onToolCallLog:b,injectTools:x}=c;Array.isArray(t?.messages)&&(t.messages=oG(t.messages));let w=await sSe({body:t,streaming:n,auth:e,options:r,fetchCompletion:d,fetchStreamingCompletion:p,onFallbackLog:f}),k=w?.data||w;if(!m(k))return{done:!0,text:v(k),body:w?.fallback||t};let $=g(k),T=w?.fallback||t;T.messages.push(h(k)),s&&typeof b=="function"&&b($);let A=await Promise.all($.map((z,M)=>(typeof r.onToolCall=="function"&&r.onToolCall(z.name,z.args,{round:a,index:M,total:$.length}),y(z,i))));for(let z=0;z<$.length;z++){let W=$[z].name==="get_skill_context"?typeof A[z]=="string"?A[z]:JSON.stringify(A[z]):oSe(A[z],l);T.messages.push(_($[z].id,W))}return typeof r.onToolCall=="function"&&r.onToolCall(null),x(T,o),{done:!1,body:T}}var sG=E(()=>{});function pl(t){!t||typeof t!="object"||(t.type==="object"&&t.properties&&(t.required=Object.keys(t.properties),t.additionalProperties=!1,Object.values(t.properties).forEach(pl)),t.type==="array"&&t.items&&pl(t.items),t.anyOf&&t.anyOf.forEach(pl),t.oneOf&&t.oneOf.forEach(pl),t.allOf&&t.allOf.forEach(pl))}function Q_(t){return Array.isArray(t)?new Set(t.map(e=>String(e||"").trim()).filter(Boolean)):new Set}function dSe(t){return Array.isArray(t)?t.map(e=>String(e||"").trim()).filter(Boolean):[]}var cSe,uSe,O1,cG,dl,lSe,hm,uG=E(()=>{Da();wi();Ma();P9();nG();go();iG();sG();cSe=Yr.ASSISTANT,uSe=15,O1="get_skill_context";cG={maxBytes:49e3,systemMaxChars:12e3},dl=()=>process.env.ZIBBY_VERBOSE==="true"||process.env.ZIBBY_DEBUG==="true",lSe=t=>Buffer.byteLength(JSON.stringify(t),"utf8");hm=class extends gn{#e;#t;#r=new K_;constructor(e=null){super("assistant","Zibby Assistant",200),e&&typeof e=="object"&&(e.toolProvider||e.completionProvider)?(this.#e=e.toolProvider||new $u,this.#t=e.completionProvider||new Iu):(this.#e=e||new $u,this.#t=new Iu)}canHandle(e){return z1().ok}async invoke(e,r={}){let n=r.model&&r.model!=="auto"?r.model:cSe,i=z1();if(!i.ok)throw i.reason==="missing_session_token"?new Error("Login required. Run `zibby login` to authenticate."):i.reason==="missing_openai_api_key"?new Error("Missing OPENAI_API_KEY for BYOK mode."):i.reason==="missing_openai_proxy_url"?new Error("Missing OPENAI_PROXY_URL for local mode."):new Error(`Assistant auth unavailable (${i.reason}).`);let o=r.messages||[{role:"user",content:e}],a=i.baseUrl,s=dl();if(s?await this.#m(o,n,a,i.tokenPreview||"none"):q.debug(`[Assistant] ${a} | model: ${n} | messages: ${o.length}`),r.schema)return this.#u(n,o,i,r);let c=r.activeSkills||[],u=this.#d(r),l=this.#p(c,u),d=this.#f(l),p=this.#l(r),f={...r,payloadCompaction:p},m={activeSkills:l,options:f,executionRegistry:d,capabilityPolicy:u},v=!!r.stream,g={model:n,messages:[...o],stream:!1};this.#i(g,l,u);for(let h=0;h<uSe;h++){if(r.signal?.aborted)throw new Error("Aborted");let _=await aG({body:g,auth:i,options:f,streaming:v,toolContext:m,activeSkills:l,round:h,verbose:s,dependencies:{fetchCompletion:this.#o.bind(this),fetchStreamingCompletion:this.#c.bind(this),onFallbackLog:(y,b)=>{dl()&&console.log(`413 fallback: messages ${y.messages.length} -> ${b.messages.length}, bytes=${lSe(b)}`)},hasToolCalls:y=>this.#e.hasToolCalls(y),getTextContent:y=>this.#e.getTextContent(y),parseToolCalls:y=>this.#e.parseToolCalls(y),buildAssistantMessage:y=>this.#e.buildAssistantMessage(y),buildToolResultMessage:(y,b)=>this.#e.buildToolResultMessage(y,b),executeTool:(y,b)=>this.#s(y,b),onToolCallLog:async y=>{let b=(await import("chalk")).default;console.log(b.dim(` ${y.map(x=>`${x.name}(${JSON.stringify(x.args).slice(0,80)})`).join(", ")}`))},injectTools:(y,b)=>this.#i(y,b,u)},config:{maxToolResultChars:r.maxToolResultChars||3e3}});if(_.done)return _.text;g.messages=_.body.messages,_.body.tools?g.tools=_.body.tools:delete g.tools}return"I hit my tool-calling limit for this turn. Please try again."}async cleanup(){await this.#r.stopAll()}#i(e,r,n=null){let i=this.#a(r,n),o=this.#e.formatTools(i);this.#e.injectToolsIntoBody(e,o)}#a(e,r=null){let n=[],i=new Set;for(let o of e){let a=Tr(o);if(a?.tools?.length)for(let s of a.tools)this.#n(s.name,r)&&(i.has(s.name)||(i.add(s.name),n.push({name:s.name,description:s.description,parameters:s.parameters||s.input_schema||{type:"object",properties:{}}})))}return!r?.disableSkillContextTool&&this.#n(O1,r)&&n.push({name:O1,description:"Fetch full prompt guidance/instructions for one installed skill on demand. Use this before making complex tool decisions if guidance is needed.",parameters:{type:"object",properties:{skillId:{type:"string",description:"Installed skill id to inspect (e.g. jira, github, runner, chat-memory)"}},required:["skillId"]}}),n}async#s(e,r){let{activeSkills:n,options:i,executionRegistry:o,capabilityPolicy:a}=r;if(!this.#n(e.name,a))return`Tool "${e.name}" blocked by policy`;if(e.name===O1){let u=String(e.args?.skillId||"").trim();if(!u)return JSON.stringify({error:"skillId is required"});if(!n.includes(u))return JSON.stringify({error:`Skill "${u}" is not active`,activeSkills:n});let l=Tr(u);if(!l)return JSON.stringify({error:`Skill "${u}" not found`});let d=typeof l.promptFragment=="function"?l.promptFragment():l.promptFragment||"",p=(l.tools||[]).map(m=>m.name),f=JSON.stringify({skillId:u,description:l.description||"",toolNames:p,promptFragment:d||""});return dl()&&(console.log(`
|
|
259
|
+
\u{1F4D6} get_skill_context("${u}") \u2192 ${f.length} chars (fragment: ${d.length} chars)`),console.log(` tools: [${p.join(", ")}]`),console.log(` fragment preview: ${d.slice(0,200).replace(/\n/g,"\\n")}\u2026
|
|
260
|
+
`)),f}let s=o?.get(e.name)||null;if(!s)return`Unknown tool: ${e.name}`;let c=Tr(s.skillId);if(!c)return`Skill "${s.skillId}" not found for tool "${e.name}"`;if(s.mode==="handler")try{return c.handleToolCall(e.name,e.args,r)}catch(u){return`Error in ${e.name}: ${u.message}`}if(s.mode==="mcp")try{if(!this.#r.isRunning(c.serverName)){let l=c.resolve(i);if(!l)return`Skill "${s.skillId}" is not available (cannot start server)`;await this.#r.ensureServer(c.serverName,l)}let u=await this.#r.callTool(c.serverName,e.name,e.args);return u.text||(u.isError?"Tool call failed":"Done")}catch(u){return`MCP error (${c.serverName}): ${u.message}`}return`Skill "${s.skillId}" owns tool "${e.name}" but has no execution mode`}async#c(e,r,n){return this.#t.fetchStreamingCompletion(e,r,{...n,onBudget:({beforeBytes:i,meta:o})=>{dl()&&console.log(`payload bytes (stream) before=${i} after=${o.bytes} trimmed=${o.trimmed} messages=${o.messageCount}`)}})}async#o(e,r,n){return this.#t.fetchCompletion(e,r,{...n,onBudget:({beforeBytes:i,meta:o})=>{dl()&&console.log(`payload bytes before=${i} after=${o.bytes} trimmed=${o.trimmed} messages=${o.messageCount}`)}})}async#u(e,r,n,i){let{zodToJsonSchema:o}=await Promise.resolve().then(()=>(Jo(),sN)),a=typeof i.schema?.parse=="function",s=a?o(i.schema):i.schema;delete s.$schema,pl(s);let c={model:e,messages:r,stream:!1,response_format:{type:"json_schema",json_schema:{name:"extract",schema:s,strict:!0}}},u=await this.#o(c,n,i),l=this.#e.getTextContent(u),d=JSON.parse(l),p=a?i.schema.parse(d):d;return{raw:l,structured:p}}#l(e={}){let r=e?.config?.agent?.assistant?.payloadCompaction||{};return{maxBytes:Number(r.maxBytes||e.maxPayloadBytes||cG.maxBytes),systemMaxChars:Number(r.systemMaxChars||cG.systemMaxChars)}}#d(e={}){let r=e?.config?.agent?.assistant?.toolPolicy||{};return{allowTools:Q_(r.allowTools||e.allowTools),denyTools:Q_(r.denyTools||e.denyTools),denyPrefixes:dSe(r.denyPrefixes||e.denyToolPrefixes),includeSkills:Q_(r.includeSkills||e.includeSkills),excludeSkills:Q_(r.excludeSkills||e.excludeSkills),disableSkillContextTool:!!(r.disableSkillContextTool||e.disableSkillContextTool)}}#p(e,r){let n=r?.includeSkills||new Set,i=r?.excludeSkills||new Set;return n.size===0&&i.size===0?e:e.filter(o=>!(n.size>0&&!n.has(o)||i.has(o)))}#n(e,r){let n=String(e||"").trim();if(!n)return!1;let i=r?.allowTools;if(i&&i.size>0&&!i.has(n))return!1;let o=r?.denyTools;return!(o&&o.has(n)||(r?.denyPrefixes||[]).some(s=>n.startsWith(s)))}#f(e){let r=new Map,n=[];for(let i of e){let o=Tr(i);if(!o?.tools?.length)continue;let a=typeof o.handleToolCall=="function"?"handler":o.serverName&&typeof o.resolve=="function"?"mcp":null;if(a)for(let s of o.tools){let c=String(s?.name||"").trim();if(c){if(r.has(c)){n.push({tool:c,winner:r.get(c).skillId,skipped:i});continue}r.set(c,{skillId:i,mode:a})}}}if(n.length>0&&dl()){let i=n.slice(0,5).map(o=>`${o.tool}:${o.winner}>${o.skipped}`).join(", ");console.log(`tool registry collisions: ${i}${n.length>5?" ...":""}`)}return r}async#m(e,r,n,i){console.log(`
|
|
261
|
+
\u25C6 Model: ${r} | proxy: ${n} | token: ${i||"none"}
|
|
262
|
+
`);let o=(await import("chalk")).default;console.log(o.bold("Prompt sent to LLM:")),console.log(o.dim("\u2500".repeat(60)));let a=!1;for(let s of e)if(s.role==="system")console.log(o.dim(`[System] ${s.content||""}`));else{a||(console.log(o.dim("\u2500\u2500\u2500 chat history \u2500\u2500\u2500")),a=!0);let c=s.role==="user"?"Human":"AI",u=s.content?.length>200?`${s.content.slice(0,200)}...`:s.content||"";console.log(o.dim(`[${c}] ${u}`))}console.log(o.dim("\u2500".repeat(60)))}}});var gm={};Gi(gm,{AgentStrategy:()=>gn,AssistantStrategy:()=>hm,ClaudeAgentStrategy:()=>Qp,CodexAgentStrategy:()=>Jp,CursorAgentStrategy:()=>Gd,GeminiAgentStrategy:()=>Xp,getAgentStrategy:()=>dG,invokeAgent:()=>pSe});function dG(t={}){let{state:e={},preferredAgent:r=null}=t,n=r||e.agentType||process.env.AGENT_TYPE;if(!n)throw new Error("No agent specified. Set agent.claude, agent.cursor, agent.codex, or agent.gemini in .zibby.config.js");q.debug(`Agent selection: requested=${n}`);let i=lG.find(o=>o.getName()===n);if(!i)throw new Error(`Unknown agent '${n}'. Available: ${lG.map(o=>o.getName()).join(", ")}`);if(q.debug(`Checking if ${n} can handle this environment...`),!i.canHandle(t)){let a={assistant:"Run `zibby login` to authenticate",claude:"Set ANTHROPIC_API_KEY in .env",cursor:"Install cursor-agent CLI or set CURSOR_API_KEY",codex:"Install codex CLI (npm i -g @openai/codex) and set OPENAI_API_KEY in .env",gemini:"Install gemini CLI (npm i -g @google/gemini-cli) and set GEMINI_API_KEY in .env"}[n]||"Check your environment configuration";throw new Error(`Agent '${n}' is not available. ${a}`)}return q.debug(`Using agent: ${i.getName()}`),i}async function pSe(t,e={},r={}){try{await import("@zibby/skills")}catch{}let n=dG(e),i=e.state?.config||r.config||{},o=i.models||{},a=r.nodeName&&o[r.nodeName]||null,s=o.default||null,c=n.name,u=i.agent?.[c]?.model||null,l=a||s||u||r.model||null,d={...r,model:l,workspace:e.state?.workspace||r.workspace,schema:r.schema||e.schema,images:r.images||e.images||[],skills:r.skills||e.skills||[],config:i},p=d.skills||[];if(p.length>0&&!r.skipPromptFragments){let{getSkill:m}=await Promise.resolve().then(()=>(go(),fb)),v=p.map(g=>{let h=m(g)?.promptFragment;return typeof h=="function"?h():h}).filter(Boolean);v.length>0&&(t+=`
|
|
263
|
+
|
|
264
|
+
${v.join(`
|
|
265
|
+
|
|
266
|
+
`)}`)}let f=e.state?._currentNodeConfig?.extraPromptInstructions?.trim();return f&&(t+=`
|
|
267
|
+
|
|
268
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
269
|
+
\u26A0\uFE0F PRIORITY OVERRIDE \u2014 THE FOLLOWING INSTRUCTIONS TAKE PRECEDENCE OVER ALL PREVIOUS CONTENT
|
|
270
|
+
\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
|
|
271
|
+
|
|
272
|
+
${f}
|
|
273
|
+
`),q.debug(`Prompt length: ${t.length} chars`),process.env.STAGE!=="prod"&&q.debug(`Full prompt:
|
|
274
|
+
${t}`),n.invoke(t,d)}var lG,vm=E(()=>{RM();u9();v9();w9();uG();wi();Da();lG=[new hm,new Gd,new Qp,new Jp,new Xp]});var TG=new Set(["__proto__","constructor","prototype"]);function ob(t){if(TG.has(t))throw new Error(`Invalid state key: "${t}"`)}var _m=class{constructor(e={}){this._state=Object.create(null),Object.assign(this._state,{messages:[],errors:[],artifacts:{},metadata:{},...e}),this._history=[]}get(e){return this._state[e]}set(e,r){ob(e),this._history.push({...this._state}),this._state[e]=r}update(e){let r=Object.getOwnPropertyNames(e);for(let n of r)ob(n);this._history.push({...this._state});for(let n of r)this._state[n]=e[n]}append(e,r){ob(e),this._history.push({...this._state}),Array.isArray(this._state[e])||(this._state[e]=[]),this._state[e].push(r)}getAll(){return{...this._state}}rollback(){this._history.length>0&&(this._state=this._history.pop())}};var bm=class{constructor(e){this.schema=e}parse(e){let r=e.match(/```json\s*([\s\S]*?)\s*```/);if(r)return this.validate(JSON.parse(r[1]));let n=e.match(/\{[\s\S]*\}/);return n?this.validate(JSON.parse(n[0])):this.validate({result:e.trim()})}validate(e){let r=[];for(let[n,i]of Object.entries(this.schema)){if(i.required&&!(n in e)&&r.push(`Missing required field: ${n}`),n in e&&i.type){let o=typeof e[n];o!==i.type&&r.push(`Field '${n}' expected ${i.type}, got ${o}`)}if(i.validate&&n in e){let o=i.validate(e[n]);o&&r.push(`Field '${n}': ${o}`)}}if(r.length>0)throw new Error(`Output validation failed:
|
|
275
|
+
${r.join(`
|
|
276
|
+
`)}`);return e}};wi();Gs();wm();import{writeFileSync as j1,readFileSync as pG,existsSync as fG,mkdirSync as fSe}from"fs";import{join as N1,dirname as mSe}from"path";import Y_ from"chalk";var fl=class{constructor(e){if(this.config=e,this.name=e.name,this.prompt=e.prompt,this.outputSchema=e.outputSchema,!this.outputSchema&&!e._isCustomCode)throw new Error(`Node '${this.name}' must define outputSchema (Zod schema). This defines the contract for what the node returns to state.`);this.isZodSchema=this.outputSchema&&typeof this.outputSchema._def<"u",this.parser=e.outputSchema&&!this.isZodSchema?new bm(e.outputSchema):null,this.retries=e.retries||0,this.onComplete=e.onComplete,this.customExecute=e.execute}async execute(e,r){let n=()=>r&&typeof r.getAll=="function"?r.getAll():e,i=d=>r&&typeof r.get=="function"?r.get(d):e?.[d];if(typeof this.customExecute=="function"){q.info("\u26A1 Using custom execute method (skipping LLM)");try{let d=await this.customExecute(e);return typeof d=="object"&&d!==null&&d.success===!1?{success:!1,error:d.error||"Node execution failed",raw:d.raw||null}:this.isZodSchema?(q.debug("Validating return value against outputSchema..."),{success:!0,output:this.outputSchema.parse(d),raw:null}):{success:!0,output:d,raw:null}}catch(d){return q.error(`\u274C Node '${this.name}' execution failed: ${d.message}`),d.name==="ZodError"&&q.error(`Schema validation errors: ${JSON.stringify(d.errors,null,2)}`),{success:!1,error:d.message,raw:null}}}let o=typeof this.prompt=="function"?this.prompt(n()):this.prompt,a=i("_skillHints");a&&(o=`${a}
|
|
277
|
+
|
|
278
|
+
${o}`);let s=n(),c=s.cwd||process.cwd(),u=s.sessionPath;try{if(u){let d=N1(u,Ko);if(fG(d)){let f=JSON.parse(pG(d,"utf-8"));f.currentNode=this.name,j1(d,JSON.stringify(f,null,2),"utf-8")}let p=N1(u,"..",Ko);if(fG(p))try{let f=JSON.parse(pG(p,"utf-8"));f.currentNode=this.name,j1(p,JSON.stringify(f,null,2),"utf-8")}catch{}}}catch(d){q.debug(`Could not update session info: ${d.message}`)}let l=null;for(let d=0;d<=this.retries;d++)try{q.debug(`Node.execute attempt ${d} for '${this.name}'`);let p=n(),f=p.config||{},m={state:p},v={workspace:c,schema:this.isZodSchema?this.outputSchema:null,skills:this.config.skills||[],sessionPath:u,config:f,nodeName:this.name,timeout:this.config?.timeout||3e5},g=e?._coreInvokeAgent;g||(g=(await Promise.resolve().then(()=>(vm(),gm))).invokeAgent);let h=await g(o,m,v),_,y;if(typeof h=="string"?(_=h,y=null):h.structured?(_=h.raw||JSON.stringify(h.structured,null,2),y=h.structured):(_=h.raw||JSON.stringify(h,null,2),y=h.extracted||null),u)try{let b=N1(u,this.name,"raw_stream_output.txt");fSe(mSe(b),{recursive:!0}),j1(b,typeof _=="string"?_:JSON.stringify(_),"utf-8")}catch(b){q.debug(`Could not save raw output: ${b.message}`)}if(this.isZodSchema&&y){console.log(`
|
|
279
|
+
\u{1F50D} ${Y_.cyan("Validated output:")} ${Y_.white(JSON.stringify(y,null,2))}`);let b=y;if(typeof this.onComplete=="function")try{b=await this.onComplete(n(),y)}catch(x){q.warn(`onComplete hook failed: ${x.message}`)}return{success:!0,output:b,raw:_}}if(typeof this.onComplete=="function")try{return{success:!0,output:await this.onComplete(n(),{raw:_}),raw:_}}catch(b){throw new Error(`onComplete failed: ${b.message}`,{cause:b})}if(this.parser){let b=this.parser.parse(_);return console.log(`
|
|
280
|
+
\u{1F50D} ${Y_.cyan("Parsed output:")} ${Y_.white(JSON.stringify(b,null,2))}`),Ht.step("Output parsed"),{success:!0,output:b,raw:_}}return{success:!0,output:_,raw:_}}catch(p){l=p,d<this.retries&&q.info(`Node '${this.name}' failed, retrying (${d+1}/${this.retries})...`)}return{success:!1,error:l.message,raw:null}}},J_=class extends fl{constructor(e){super({...e,_isCustomCode:!0}),this.condition=e.condition}async execute(e,r){let n=r&&typeof r.getAll=="function"?r.getAll():e;return{success:!0,output:{nextNode:this.condition(n)},raw:null}}};import{existsSync as mG,readFileSync as hSe}from"fs";import{join as C1,dirname as hG}from"path";var X_=class{static async loadContext(e,r,n={}){let i={},o=n.filenames||["CONTEXT.md","AGENTS.md"];if(e){let s=hG(C1(r,e));for(let c of o){let u=await this.findAndMergeContextFiles(c,s,r);if(u){let l=c.replace(/\.[^.]+$/,"").toLowerCase();i[l]=u}}}let a=n.discovery||{};for(let[s,c]of Object.entries(a))try{let u=C1(r,c);if(mG(u)){let l=await this.loadFile(u);i[s]=l}}catch(u){console.warn(`\u26A0\uFE0F Could not load context '${s}' from '${c}': ${u.message}`)}return i}static async findAndMergeContextFiles(e,r,n){let i=[],o=r;for(;o.startsWith(n);){let a=C1(o,e);if(mG(a))try{let c=await this.loadFile(a);i.unshift(c)}catch(c){console.warn(`\u26A0\uFE0F Could not load ${e} from ${a}: ${c.message}`)}let s=hG(o);if(s===o)break;o=s}return i.length===0?null:i.every(a=>typeof a=="string")?i.join(`
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
`):i.every(a=>typeof a=="object")?Object.assign({},...i):i[i.length-1]}static async loadFile(e){let r=hSe(e,"utf-8");if(e.endsWith(".json"))return JSON.parse(r);if(e.endsWith(".js")||e.endsWith(".mjs")){let{pathToFileURL:n}=await import("url"),i=await import(n(e).href);return i.default||i}return r}};Jo();wm();Gs();import{mkdirSync as vG,existsSync as R1,writeFileSync as gG,unlinkSync as gSe}from"fs";import{join as Bs,resolve as yG}from"path";import{config as vSe}from"dotenv";import ySe from"handlebars";function _Se({traceFrom:t,sessionId:e,sessionPath:r,idSource:n,mkdirFresh:i}){if(process.env.ZIBBY_SESSION_LOG==="0"||process.env.ZIBBY_SESSION_LOG==="false")return;let o=typeof process.ppid=="number"?process.ppid:"n/a",a=`[zibby:session] from=${t} pid=${process.pid} ppid=${o} sessionId=${e} source=${n} mkdir=${i?"yes":"no"} path=${r}`;if(console.log(a),(process.env.ZIBBY_TRACE_SESSION==="1"||process.env.ZIBBY_TRACE_SESSION==="true")&&process.env.ZIBBY_SESSION_LOG!=="0"&&process.env.ZIBBY_SESSION_LOG!=="false"){let u=(new Error("session trace").stack||"").split(`
|
|
285
|
+
`).slice(2,14).join(`
|
|
286
|
+
`);console.log(`[zibby:session] stack (${t}):
|
|
287
|
+
${u}`)}}function bSe(){return process.env.ZIBBY_RUN_SOURCE==="studio"||process.env.ZIBBY_KEEP_SESSION_ENV==="1"||process.env.ZIBBY_KEEP_SESSION_ENV==="true"}function xSe(){if(process.env.ZIBBY_RUN_SOURCE!=="studio")return;let t=process.env.ZIBBY_SESSION_PATH;if(!(t==null||String(t).trim()===""))try{return yG(String(t).trim())}catch{return String(t).trim()}}function wSe(){bSe()||(delete process.env.ZIBBY_SESSION_PATH,delete process.env.ZIBBY_SESSION_ID)}function kSe({sessionPath:t,sessionId:e}){t&&typeof t=="string"&&(process.env.ZIBBY_SESSION_PATH=t),e!=null&&String(e).trim()!==""&&(process.env.ZIBBY_SESSION_ID=String(e).trim())}function SSe(t={}){let e=H1.map(o=>process.env[o]).find(Boolean),r=Math.random().toString(36).slice(2,6),n=e||`${Date.now()}_${r}`,i=t.paths?.sessionPrefix;return i?`${i}_${n}`:n}function $Se({cwd:t=process.cwd(),config:e={},initialState:r={},traceFrom:n="resolveWorkflowSession"}={}){let i=r.sessionPath,o=r.sessionTimestamp,a="initialState.sessionPath";if(!i&&process.env.ZIBBY_SESSION_PATH)try{let u=yG(String(process.env.ZIBBY_SESSION_PATH));u&&(i=u,a="ZIBBY_SESSION_PATH")}catch{}let s;if(i)s=String(i).split(/[/\\]/).filter(Boolean).pop(),o==null&&(o=Date.now());else{let u=process.env.ZIBBY_SESSION_ID&&String(process.env.ZIBBY_SESSION_ID).trim();if(u)s=u,a="ZIBBY_SESSION_ID";else{let d=e.sessionId!=null?String(e.sessionId).trim():"";d&&d!=="last"?(s=d,a="config.sessionId"):(s=SSe(e),a="generated")}o=o??Date.now();let l=e.paths?.output||Qs;i=Bs(t,l,K1,s)}let c=!R1(i);return c&&vG(i,{recursive:!0}),_Se({traceFrom:n,sessionId:s,sessionPath:i,idSource:a,mkdirFresh:c}),kSe({sessionPath:i,sessionId:s}),{sessionPath:i,sessionId:s,sessionTimestamp:o}}var eb=class{constructor(e={}){this.nodes=new Map,this.edges=new Map,this.entryPoint=null,this.middleware=Array.isArray(e.middleware)?[...e.middleware]:[],e.nodeMiddleware&&this.middleware.push(e.nodeMiddleware),this.nodeTypeMap=new Map,this.conditionalCodeMap=new Map,this.stateSchema=e.stateSchema||null,this.nodePrompts=new Map,this.nodeOptions=new Map,this._invokeAgent=e.invokeAgent||null}setStateSchema(e){return this.stateSchema=e,this}getStateSchema(){return this.stateSchema}addNode(e,r,n={}){let i=r instanceof fl?r:new fl(r);return i.name=e,this.nodes.set(e,i),n.prompt&&this.nodePrompts.set(e,n.prompt),Object.keys(n).length>0&&this.nodeOptions.set(e,n),this}addConditionalNode(e,r){let n=new J_({...r,name:e});return this.nodes.set(e,n),this}addEdge(e,r){return this.edges.set(e,r),this}setNodeType(e,r){return this.nodeTypeMap.set(e,r),this}addConditionalEdges(e,r,{labels:n}={}){return this.edges.set(e,{conditional:!0,routes:r,labels:n}),typeof r=="function"&&this.conditionalCodeMap.set(e,r.toString()),this}setEntryPoint(e){return this.entryPoint=e,this}use(e){return typeof e=="function"&&this.middleware.push(e),this}_composeMiddleware(e,r,n,i,o){let a=n;for(let s=e.length-1;s>=0;s--){let c=e[s],u=a;a=()=>c(r,u,i,o)}return a()}serialize(){let e=[],r={};for(let[o,a]of this.nodes){let s=this.nodeTypeMap.get(o)||o;e.push({id:o,type:s,data:{nodeType:s,label:o}});let c=a._isCustomCode||!1,u={};c&&typeof a.execute=="function"&&(u.customCode=a.execute.toString());let l=this.nodePrompts.get(o);if(l&&(u.prompt=l),typeof a.customExecute=="function"&&(u.executeCode=a.customExecute.toString()),a.outputSchema)try{if(typeof a.outputSchema._def<"u"){let f=en(a.outputSchema,{target:"openApi3"}),m=this._flattenJsonSchemaToVariables(f);u.outputSchema={jsonSchema:f,variables:m}}else u.outputSchema={schema:a.outputSchema}}catch(p){console.warn(`Failed to convert schema for ${o}:`,p.message)}let d=(this.resolvedToolsMap||{})[o];d?.toolIds&&(u.tools=d.toolIds),Object.keys(u).length>0&&(r[o]=u)}let n=[];for(let[o,a]of this.edges)if(typeof a=="string")n.push({source:o,target:a});else if(a.conditional){let s=this.conditionalCodeMap.get(o)||a.routes.toString(),c=this._inferConditionalTargets(a.routes),u=a.labels||{};for(let l of c){let d={source:o,target:l,data:{conditionalCode:s}};u[l]&&(d.label=u[l]),n.push(d)}}let i=null;if(this.stateSchema)try{i=en(this.stateSchema,{target:"openApi3"})}catch{i=this.stateSchema}return{nodes:e,edges:n,nodeConfigs:r,stateSchema:i}}_inferConditionalTargets(e){let r=e.toString(),n=new Set,i=/return\s+['"]([^'"]+)['"]/g,o;for(;(o=i.exec(r))!==null;)n.add(o[1]);return[...n]}_flattenJsonSchemaToVariables(e,r=""){let n=e;if(e.$ref&&e.definitions){let i=e.$ref.replace("#/definitions/","");n=e.definitions[i]||e}return this._flattenSchema(n,r)}_flattenSchema(e,r=""){if(!e||typeof e!="object")return[];let n=[],i=e.properties||{},o=e.required||[];for(let[a,s]of Object.entries(i)){let c=r?`${r}.${a}`:a,u=!o.includes(a);if(n.push({path:c,type:s.type||"unknown",label:s.description||this._formatLabel(a),optional:u}),s.type==="object"&&s.properties){let l=this._flattenSchema(s,c);n.push(...l)}if(s.type==="array"&&s.items?.type==="object"&&s.items.properties){let l=this._flattenSchema(s.items,`${c}[]`);n.push(...l)}}return n}_formatLabel(e){return e.replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase()).trim()}_summarizeNodeOutput(e,r){if(!r||typeof r!="object")return[];let n=[];r.success!==void 0&&n.push(`Result: ${r.success?"passed":"failed"}`);for(let[i,o]of Object.entries(r))if(!(i==="success"||i==="raw"||i==="nextNode")){if(typeof o=="string"&&o.length<=80)n.push(`${i}: ${o}`);else if(Array.isArray(o)){let a=o.length,s=o.filter(u=>u?.passed===!0).length;if(o.some(u=>u?.passed!==void 0)){let u=a-s;n.push(`${i}: ${s}/${a} passed${u?`, ${u} failed`:""}`)}else n.push(`${i}: ${a} items`)}if(n.length>=4)break}return n}async run(e,r={}){if(!this.entryPoint)throw new Error("No entry point set for graph");let n=r.cwd||process.cwd();vSe({path:Bs(n,".env")});let i=r.config||{};if(!i||Object.keys(i).length===0)try{let x=Bs(n,".zibby.config.js");R1(x)&&(i=(await import(x)).default||{})}catch{}process.env.EXECUTION_ID&&!i.agent?.strictMode&&(i.agent={...i.agent,strictMode:!0});let o=r.agentType;if(!o){let x=i?.agent;x?.provider?o=x.provider:x?.gemini?o="gemini":x?.claude?o="claude":x?.cursor?o="cursor":x?.codex?o="codex":o=process.env.AGENT_TYPE||"cursor"}let a=r.contextConfig||e?.config?.contextConfig||e?.config?.context||i?.context||{};if(this.stateSchema){let x=this.stateSchema.safeParse(r);if(!x.success){let w=x.error.issues.map(k=>`${k.path.join(".")}: ${k.message}`);throw console.error("\u274C Initial state validation failed:"),w.forEach(k=>console.error(` - ${k}`)),new Error(`State validation failed: ${w.join(", ")}`)}Ht.step("State validated against schema")}let s=xSe(),c=r.sessionPath||s;c||wSe();let{sessionPath:u,sessionTimestamp:l,sessionId:d}=$Se({cwd:n,config:i,traceFrom:"WorkflowGraph.run",initialState:{sessionPath:c,sessionTimestamp:r.sessionTimestamp}});Ht.step(`Session ${d}`);let p=await X_.loadContext(r.specPath||"",n,a);Object.keys(p).length>0&&Ht.step(`Context loaded: ${Object.keys(p).join(", ")}`);let f=r.outputPath;!f&&r.specPath&&(e?.calculateOutputPath?f=e.calculateOutputPath(r.specPath):console.warn(`\u26A0\uFE0F outputPath not resolved (specPath=${r.specPath})`));let m=new _m({...r,config:i,agentType:o,outputPath:f,sessionPath:u,sessionTimestamp:l,context:p,resolvedTools:this.resolvedToolsMap||{}}),v=new Map;try{await import("@zibby/skills")}catch{}let{getSkill:g}=await Promise.resolve().then(()=>(go(),fb)),h=new Set;for(let[,x]of this.nodes)for(let w of x.config?.skills||[])h.add(w);for(let x of h){let w=g(x);if(typeof w?.middleware=="function")try{let k=await w.middleware();typeof k=="function"&&v.set(x,k)}catch{}}let _=this.entryPoint,y=[];for(;_&&_!=="END";){let x=Bs(u,xm);if(R1(x)){console.warn(`
|
|
288
|
+
\u{1F6D1} Studio stop requested \u2014 ending workflow.`);try{gSe(x)}catch{}if(e&&typeof e.cleanup=="function")try{await e.cleanup()}catch{}return Ht.step("Workflow stopped by Studio"),{success:!0,state:m.getAll(),executionLog:y,stoppedByStudio:!0}}let w=this.nodes.get(_);if(!w)throw new Error(`Node '${_}' not found in graph`);let k=JSON.stringify({sessionPath:u,sessionTimestamp:l,currentNode:_,createdAt:new Date().toISOString(),config:m.get("config")}),$=Bs(u,Ko);gG($,k,"utf-8");let T=m.get("config")?.paths?.output||Qs,A=Bs(n,T,Ko);vG(Bs(n,T),{recursive:!0});try{gG(A,k,"utf-8")}catch{}let z=r.onPipelineProgress;if(typeof z=="function")try{z({cwd:n,sessionPath:u,sessionId:d,outputBase:m.get("config")?.paths?.output||Qs,currentNode:_})}catch{}let M=(this.resolvedToolsMap||{})[_]||null;m.set("_currentNodeTools",M);let W=m.get("nodeConfigs")||{};m.set("_currentNodeConfig",W[_]||{}),Ht.nodeStart(_);let R=Date.now(),te=this.nodePrompts.get(_);if(!this._invokeAgent){let de=await Promise.resolve().then(()=>(vm(),gm));this._invokeAgent=de.invokeAgent}let G=this._invokeAgent,De={state:m,invokeAgent:async(de={},F={})=>{let I=F.prompt||"";if(te)try{I=ySe.compile(te,{noEscape:!0})(de)}catch(S){throw console.error(`\u274C Template rendering failed for node '${_}':`,S.message),new Error(`Template rendering failed: ${S.message}`,{cause:S})}else if(!I)throw new Error(`No prompt template configured for node '${_}' and no prompt provided in options`);let V={state:m.getAll(),images:F.images||[]},C={model:F.model||m.get("model"),workspace:m.get("workspace"),schema:F.schema,...F};return G(I,V,C)},_coreInvokeAgent:G,agent:e,nodeId:_,promptTemplate:te,getPromptTemplate:()=>te,...m.getAll()};try{let de=(w.config?.skills||[]).map(P=>v.get(P)).filter(Boolean),F=[...this.middleware,...de],I;F.length>0?I=await this._composeMiddleware(F,_,async()=>w.execute(De,m),m.getAll(),m):I=await w.execute(De,m);let V=Date.now()-R;if(y.push({node:_,success:I.success,duration:V,timestamp:new Date().toISOString()}),!I.success){if(String(I.error||"").includes("Stopped from Zibby Studio")){if(Ht.step("Workflow stopped by Studio"),m.set("stoppedByStudio",!0),e&&typeof e.cleanup=="function")try{await e.cleanup()}catch{}return{success:!0,state:m.getAll(),executionLog:y,stoppedByStudio:!0}}m.append("errors",{node:_,error:I.error});let B=w.config?.retries||0,ie=`${_}_retries`,me=m.getAll()[ie]||0;if(me<B){Ht.stepInfo(`Retrying (attempt ${me+1}/${B})`),m.update({[ie]:me+1,[`${_}_raw`]:I.raw});continue}throw Ht.nodeFailed(_,I.error,{duration:V}),new Error(`Node '${_}' failed after ${me} attempts: ${I.error}`)}m.update({[_]:I.output});let C=this._summarizeNodeOutput(_,I.output);Ht.nodeComplete(_,{duration:V,details:C});let S=this.edges.get(_);if(!S)_="END";else if(S.conditional){let P=m.getAll(),B=S.routes(P);Ht.route(_,B),_=B}else _=S}catch(de){throw Ht.isInsideNode&&Ht.nodeFailed(_,de.message,{duration:Date.now()-R}),m.set("failed",!0),m.set("failedAt",_),de}}Ht.graphComplete();let b={success:!0,state:m.getAll(),executionLog:y};return e&&typeof e.onComplete=="function"&&await e.onComplete(b),b}};var A1=new Map;function ISe(t,e){A1.set(t,e)}function _G(t){return A1.get(t)}function U1(t){return A1.has(t)}ISe("ai_agent",{name:"ai_agent",factory:!0,create:(t,e={})=>({name:t,execute:async r=>{let n=r?._coreInvokeAgent;n||(n=(await Promise.resolve().then(()=>(vm(),gm))).invokeAgent);let i=e.extraPromptInstructions||"Execute the task based on the current state.",o=zSe(i,r),a=await n(o,{cwd:r.workspace||process.cwd(),model:r.model,tools:e.resolvedTools||null});return{success:!0,output:{raw:a,nodeId:t},raw:typeof a=="string"?a:a.raw}}})});function ESe(t){let e=/@([\w.]+)/g,r=new Set,n;for(;(n=e.exec(t))!==null;)r.add(n[1]);return Array.from(r)}function PSe(t,e){let r=e.split("."),n=t;for(let i of r){if(n==null)return;n=n[i]}return n}function TSe(t){return t==null?"[not available]":typeof t=="string"?t:typeof t=="object"?t.raw&&typeof t.raw=="string"?t.raw:JSON.stringify(t,null,2):String(t)}function zSe(t,e){let r=ESe(t);if(r.length===0)return t;let n=[],i=new Set;for(let o of r){let a=o.split(".")[0];if(i.has(a))continue;let s=PSe(e,o);if(s!==void 0){let c=TSe(s),u=o.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase());n.push(`## ${u}
|
|
289
|
+
${c}`),o.includes(".")||i.add(a)}}return n.length===0?t:`${t}
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
# Referenced Context
|
|
293
|
+
|
|
294
|
+
${n.join(`
|
|
295
|
+
|
|
296
|
+
`)}`}go();var OSe={};function xG(t,e){if(Array.isArray(e))return bG(e);let r=OSe[t];return!r||r.length===0?null:bG(r)}function bG(t){if(!Array.isArray(t)||t.length===0)return null;let e=[],r={},n=[];for(let i of t){let o=Tr(i);if(!o){console.warn(`[ToolResolver] Unknown skill "${i}" \u2014 skipping`);continue}n.push(i);for(let a of o.tools||[])e.push({name:a.name,description:a.description,input_schema:a.input_schema||{type:"object",properties:{}}});if(!r[o.serverName])if(typeof o.resolve=="function"){let a=o.resolve();a&&(r[o.serverName]={...a,toolPrefix:i})}else{let a={};for(let s of o.envKeys||[]){let c=process.env[s];c&&(a[s]=c)}r[o.serverName]={command:o.command,args:[...o.args||[]],env:a,toolPrefix:i}}}return n.length===0?null:{toolIds:n,claudeTools:e,mcpServers:r}}wi();function QZe(t,e={}){let{nodes:r,edges:n,nodeConfigs:i={}}=t;if(!Array.isArray(r)||r.length===0)throw new mo("Graph must have at least one node");if(!Array.isArray(n))throw new mo("Graph edges must be an array");let o=new eb(e);e.stateSchema&&o.setStateSchema(e.stateSchema);let a=new Set,s=new Map,c={};for(let p of r){let f=tb(p);s.set(p.id,{...p,resolvedType:f}),f==="decision"&&a.add(p.id)}for(let[p,f]of s){if(a.has(p))continue;let m=f.resolvedType,v=i[p]||{},g=v.tools,h=xG(m,g);h&&(c[p]=h);let _={};v.prompt&&(_.prompt=v.prompt);let y=U1(m);if(q.debug(`[compiler] Node "${p}" type="${m}" registered=${y} hasCustomCode=${!!v.customCode} hasExecuteCode=${!!v.executeCode}`),v.customCode&&!y)q.debug("[compiler] \u2192 using customCode (unregistered node)"),o.addNode(p,wG(p,v.customCode,v),_),o.setNodeType(p,m);else if(y){q.debug("[compiler] \u2192 using registered implementation");let b=_G(m);b.factory?o.addNode(p,b.create(p,{...v,resolvedTools:h}),_):o.addNode(p,b,_),o.setNodeType(p,m)}else if(v.executeCode)q.debug("[compiler] \u2192 using executeCode (fallback)"),o.addNode(p,wG(p,v.executeCode,v),_),o.setNodeType(p,m);else throw new mo(`Unknown node type "${m}" for node "${p}". Did you forget to register it?`)}o.resolvedToolsMap=c;let u=new Set;for(let p of n)a.has(p.target)||u.add(p.target);let l=r.find(p=>!a.has(p.id)&&!u.has(p.id));if(!l)throw new mo("Could not determine entry point: no node without incoming edges found");o.setEntryPoint(l.id);let d=jSe(n,"source");for(let p of n){let f=a.has(p.source),m=a.has(p.target);if(!f)if(m){let v=p.target,g=d.get(v)||[];if(g.length===0)throw new mo(`Decision node "${v}" has no outgoing edges`);let h=NSe(v,g,a);o.addConditionalEdges(p.source,h)}else o.addEdge(p.source,p.target)}return o}function YZe(t){let e=[];if(!t||typeof t!="object")return{valid:!1,errors:["Config must be a non-null object"]};if((!Array.isArray(t.nodes)||t.nodes.length===0)&&e.push("Graph must have at least one node"),Array.isArray(t.edges)||e.push("Graph edges must be an array"),e.length>0)return{valid:!1,errors:e};let r=t.nodeConfigs||{};for(let s of t.nodes){let c=tb(s);if(c==="decision"||U1(c))continue;let u=r[s.id]||{};u.customCode||u.executeCode||e.push(`Unknown node type "${c}" for node "${s.id}". Register it or provide customCode/executeCode.`)}let n=new Set(t.nodes.map(s=>s.id));for(let s of t.edges)n.has(s.source)||e.push(`Edge references unknown source node "${s.source}"`),n.has(s.target)||e.push(`Edge references unknown target node "${s.target}"`);let i=new Set(t.nodes.filter(s=>tb(s)==="decision").map(s=>s.id)),o=new Set;for(let s of t.edges)i.has(s.target)||o.add(s.target);let a=t.nodes.filter(s=>!i.has(s.id)&&!o.has(s.id));a.length===0?e.push("No entry point found (every node has incoming edges)"):a.length>1&&e.push(`Multiple entry points found: ${a.map(s=>s.id).join(", ")}. Graph must have exactly one.`);for(let s of i){let c=t.edges.filter(l=>l.source===s);c.length===0&&e.push(`Decision node "${s}" has no outgoing edges`),c.some(l=>l.data?.conditionalCode||l.conditionalCode)||e.push(`Decision node "${s}" outgoing edges have no conditionalCode`)}return{valid:e.length===0,errors:e}}function JZe(t){return!t||!Array.isArray(t.nodes)?[]:t.nodes.filter(e=>tb(e)!=="decision").map(e=>e.id)}function tb(t){let e=t.data?.nodeType||t.data?.type||t.type;return e==="workflowNode"||e==="custom"||e==="default"?t.id:e}function jSe(t,e){let r=new Map;for(let n of t){let i=n[e];r.has(i)||r.set(i,[]),r.get(i).push(n)}return r}function NSe(t,e,r){let n=e.find(s=>s.data?.conditionalCode||s.conditionalCode);if(!n)throw new mo(`Decision node "${t}" has no conditionalCode on its outgoing edges`);let i=n.data?.conditionalCode||n.conditionalCode,o=new Set(e.map(s=>s.target).filter(s=>!r.has(s))),a;try{let c=new Function(`return (${i})`)();a=u=>{let l=c(u);return o.has(l)||q.warn(`Conditional route from "${t}" returned "${l}" which is not a valid target. Valid: ${[...o].join(", ")}`),l}}catch(s){throw new mo(`Failed to compile conditionalCode for decision "${t}": ${s.message}`)}return a}function wG(t,e,r={}){let n;try{n=new Function("invokeAgent","require","console",`return (${e})`)}catch(a){throw new mo(`Failed to compile customCode for node "${t}": ${a.message}`)}let i=n(async(...a)=>{let{invokeAgent:s}=await Promise.resolve().then(()=>(vm(),gm));return s(...a)},typeof kt<"u"?kt:void 0,console),o=null;return r.outputSchema&&(o=r.outputSchema.jsonSchema||r.outputSchema),{name:t,_isCustomCode:!0,outputSchema:o,execute:async a=>{try{let s=await i(a);return typeof s=="object"&&"success"in s?s:{success:!0,output:s,raw:null}}catch(s){return{success:!1,error:s.message,raw:null}}}}}var mo=class extends Error{constructor(e){super(e),this.name="CompilationError"}};export{mo as CompilationError,QZe as compileGraph,JZe as extractSteps,YZe as validateGraphConfig};
|
|
297
|
+
/*! Bundled license information:
|
|
298
|
+
|
|
299
|
+
mime-db/index.js:
|
|
300
|
+
(*!
|
|
301
|
+
* mime-db
|
|
302
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
303
|
+
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
|
304
|
+
* MIT Licensed
|
|
305
|
+
*)
|
|
306
|
+
|
|
307
|
+
mime-types/index.js:
|
|
308
|
+
(*!
|
|
309
|
+
* mime-types
|
|
310
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
311
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
312
|
+
* MIT Licensed
|
|
313
|
+
*)
|
|
314
|
+
*/
|