@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.
Files changed (94) hide show
  1. package/dist/agents/base.js +319 -14
  2. package/dist/backend-client.js +1 -1
  3. package/dist/constants/tool-names.js +1 -1
  4. package/dist/constants/zibby-scratch.js +1 -1
  5. package/dist/constants.js +1 -1
  6. package/dist/enrichment/base.js +1 -1
  7. package/dist/enrichment/enrichers/accessibility-enricher.js +1 -1
  8. package/dist/enrichment/enrichers/dom-enricher.js +1 -1
  9. package/dist/enrichment/enrichers/page-state-enricher.js +1 -1
  10. package/dist/enrichment/enrichers/position-enricher.js +1 -1
  11. package/dist/enrichment/index.js +4 -1
  12. package/dist/enrichment/mcp-integration.js +4 -1
  13. package/dist/enrichment/mcp-ref-enricher.js +1 -1
  14. package/dist/enrichment/pipeline.js +2 -2
  15. package/dist/enrichment/trace-text-enricher.js +2 -1
  16. package/dist/framework/agents/assistant-strategy.js +69 -5
  17. package/dist/framework/agents/base.js +1 -1
  18. package/dist/framework/agents/claude-strategy.js +107 -4
  19. package/dist/framework/agents/codex-strategy.js +23 -4
  20. package/dist/framework/agents/cursor-strategy.js +138 -20
  21. package/dist/framework/agents/gemini-strategy.js +34 -7
  22. package/dist/framework/agents/index.js +285 -6
  23. package/dist/framework/agents/middleware/assistant-round-pipeline.js +2 -2
  24. package/dist/framework/agents/providers/base.js +1 -1
  25. package/dist/framework/agents/providers/index.js +4 -1
  26. package/dist/framework/agents/providers/openai-transport.js +4 -2
  27. package/dist/framework/agents/providers/openai.js +1 -1
  28. package/dist/framework/agents/providers/transport-base.js +1 -1
  29. package/dist/framework/agents/utils/auth-resolver.js +1 -1
  30. package/dist/framework/agents/utils/cursor-output-formatter.js +25 -1
  31. package/dist/framework/agents/utils/openai-proxy-formatter.js +75 -5
  32. package/dist/framework/agents/utils/payload-budget.js +2 -2
  33. package/dist/framework/agents/utils/structured-output-formatter.js +8 -4
  34. package/dist/framework/code-generator.js +309 -10
  35. package/dist/framework/constants.js +1 -1
  36. package/dist/framework/context-loader.js +2 -2
  37. package/dist/framework/function-bridge.js +60 -1
  38. package/dist/framework/function-skill-registry.js +1 -1
  39. package/dist/framework/graph-compiler.js +314 -1
  40. package/dist/framework/graph.js +305 -4
  41. package/dist/framework/index.js +331 -1
  42. package/dist/framework/mcp-client.js +56 -2
  43. package/dist/framework/node-registry.js +294 -3
  44. package/dist/framework/node.js +297 -4
  45. package/dist/framework/output-parser.js +2 -2
  46. package/dist/framework/skill-registry.js +1 -1
  47. package/dist/framework/state-utils.js +5 -1
  48. package/dist/framework/state.js +1 -1
  49. package/dist/framework/tool-resolver.js +1 -1
  50. package/dist/index.js +512 -5
  51. package/dist/package.json +1 -1
  52. package/dist/runtime/generation/base.js +1 -1
  53. package/dist/runtime/generation/index.js +58 -3
  54. package/dist/runtime/generation/mcp-ref-strategy.js +17 -17
  55. package/dist/runtime/generation/stable-id-strategy.js +14 -14
  56. package/dist/runtime/stable-id-runtime.js +1 -1
  57. package/dist/runtime/verification/base.js +1 -1
  58. package/dist/runtime/verification/index.js +3 -3
  59. package/dist/runtime/verification/playwright-json-strategy.js +1 -1
  60. package/dist/runtime/zibby-runtime.js +1 -1
  61. package/dist/sync/index.js +1 -1
  62. package/dist/sync/uploader.js +1 -1
  63. package/dist/tools/run-playwright-test.js +3 -3
  64. package/dist/utils/adf-converter.js +1 -1
  65. package/dist/utils/ast-utils.js +9 -1
  66. package/dist/utils/ci-setup.js +4 -4
  67. package/dist/utils/cursor-mcp-isolated-home.js +1 -1
  68. package/dist/utils/cursor-utils.js +1 -1
  69. package/dist/utils/live-frame-discovery.js +1 -1
  70. package/dist/utils/logger.js +1 -1
  71. package/dist/utils/mcp-config-writer.js +4 -4
  72. package/dist/utils/mission-control-from-run-states.js +1 -1
  73. package/dist/utils/node-schema-parser.js +9 -1
  74. package/dist/utils/parallel-config.js +1 -1
  75. package/dist/utils/post-process-events.js +2 -1
  76. package/dist/utils/repo-clone.js +1 -0
  77. package/dist/utils/result-handler.js +1 -1
  78. package/dist/utils/ripple-effect.js +1 -1
  79. package/dist/utils/run-capacity-coordinator.js +3 -1
  80. package/dist/utils/run-capacity-queue.js +2 -2
  81. package/dist/utils/run-index-merge.js +1 -1
  82. package/dist/utils/run-index-post-cli.js +4 -1
  83. package/dist/utils/run-registry.js +3 -3
  84. package/dist/utils/run-state-session.js +2 -2
  85. package/dist/utils/selector-generator.js +4 -4
  86. package/dist/utils/session-state-constants.js +1 -1
  87. package/dist/utils/session-state-live-runs.js +1 -1
  88. package/dist/utils/streaming-parser.js +3 -3
  89. package/dist/utils/test-post-processor.js +14 -11
  90. package/dist/utils/timeline.js +6 -6
  91. package/dist/utils/trace-parser.js +2 -2
  92. package/dist/utils/video-organizer.js +3 -3
  93. package/package.json +1 -1
  94. package/templates/browser-test-automation/result-handler.mjs +4 -39
@@ -1,9 +1,300 @@
1
- const f=new Map;function p(t,e){f.set(t,e)}function y(t){return f.get(t)}function x(t){return f.has(t)}function h(){return Array.from(f.keys())}function S(t){const e=f.get(t);return e?e.factory&&typeof e.create=="function"?e.create.toString():typeof e.execute=="function"?e.execute.toString():typeof e=="function"?e.toString():null:null}p("ai_agent",{name:"ai_agent",factory:!0,create:(t,e={})=>({name:t,execute:async r=>{let n=r?._coreInvokeAgent;n||(n=(await import("./agents/index.js")).invokeAgent);const c=e.extraPromptInstructions||"Execute the task based on the current state.",i=w(c,r),o=await n(i,{cwd:r.workspace||process.cwd(),model:r.model,tools:e.resolvedTools||null});return{success:!0,output:{raw:o,nodeId:t},raw:typeof o=="string"?o:o.raw}}})});function g(t){const e=/@([\w.]+)/g,r=new Set;let n;for(;(n=e.exec(t))!==null;)r.add(n[1]);return Array.from(r)}function d(t,e){const r=e.split(".");let n=t;for(const c of r){if(n==null)return;n=n[c]}return n}function m(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 w(t,e){const r=g(t);if(r.length===0)return t;const n=[],c=new Set;for(const i of r){const o=i.split(".")[0];if(c.has(o))continue;const s=d(e,i);if(s!==void 0){const u=m(s),a=i.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase());n.push(`## ${a}
2
- ${u}`),i.includes(".")||c.add(o)}}return n.length===0?t:`${t}
1
+ var HH=Object.create;var F_=Object.defineProperty;var GH=Object.getOwnPropertyDescriptor;var QH=Object.getOwnPropertyNames;var YH=Object.getPrototypeOf,JH=Object.prototype.hasOwnProperty;var zt=(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),Ki=(t,e)=>{for(var r in e)F_(t,r,{get:e[r],enumerable:!0})},XH=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of QH(e))!JH.call(t,i)&&i!==r&&F_(t,i,{get:()=>e[i],enumerable:!(n=GH(e,i))||n.enumerable});return t};var ul=(t,e,r)=>(r=t!=null?HH(YH(t)):{},XH(e||!t||!t.__esModule?F_(r,"default",{value:t,enumerable:!0}):r,t));var mn,Ro=E(()=>{mn=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}}});import ll from"chalk";var Hi,V_,H,pa=E(()=>{Hi={debug:0,info:1,warn:2,error:3,silent:4},V_=class{constructor(){this._level=this._getLogLevel()}_getLogLevel(){if(process.env.ZIBBY_DEBUG==="true")return Hi.debug;if(process.env.ZIBBY_VERBOSE==="true")return Hi.info;let e=process.env.LOG_LEVEL?.toLowerCase();return e&&e in Hi?Hi[e]:Hi.info}_shouldLog(e){return Hi[e]>=this._level}_formatMessage(e,r,n={}){let i=new Date().toISOString(),o=`${this._getPrefix(e)} ${r}`;return Object.keys(n).length>0&&(o+=ll.dim(` ${JSON.stringify(n)}`)),o}_getPrefix(e){return{debug:ll.gray("[DEBUG]"),info:ll.cyan("[INFO]"),warn:ll.yellow("[WARN]"),error:ll.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 Hi&&(this._level=Hi[e])}getLevel(){return Object.keys(Hi).find(e=>Hi[e]===this._level)}},H=new V_});var Gr,W_,B_,v1,pm,Co=E(()=>{Gr={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"},W_={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"},B_={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"},v1={auto:"gemini-2.5-pro","gemini-2.5-pro":"gemini-2.5-pro","gemini-2.5-flash":"gemini-2.5-flash"},pm={CURSOR_AGENT_DEFAULT:1200*1e3,OPENAI_REQUEST:18e4}});var y1,_1,b1,x1=E(()=>{y1=".zibby/output",_1=".session-info.json",b1=".zibby-studio-stop"});var w1={};Ki(w1,{getAllSkills:()=>K_,getSkill:()=>Qr,hasSkill:()=>tG,listSkillIds:()=>rG,registerSkill:()=>eG});function eG(t){if(!t||typeof t.id!="string")throw new Error("Skill definition must include a string id");dl.set(t.id,Object.freeze({...t}))}function Qr(t){return dl.get(t)||null}function tG(t){return dl.has(t)}function K_(){return new Map(dl)}function rG(){return Array.from(dl.keys())}var dl,Ao=E(()=>{dl=new Map});var Bs,H_=E(()=>{Bs=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(`
2
+ `);this.buffer=r.pop()||"";let n="";for(let i of r)if(i.trim())try{let a=JSON.parse(i);this._emitToolCalls(a);let o=this.extractText(a);if(o){if(this.rawText&&o.startsWith(this.rawText)){let s=o.substring(this.rawText.length);this.rawText=o,n+=s}else(!this.rawText.includes(o)||o.length<20)&&(this.rawText+=o,n+=o);this.tryExtractResult(this.rawText)}else this.isValidResult(a)&&(this.rawText+=`${i}
3
+ `,n+=`${i}
4
+ `,this.extractedResult=a)}catch{if(i.includes('"text"')||i.includes('"content"')){let o=i.match(/"text"\s*:\s*"([^"]*)/),s=i.match(/"content"\s*:\s*"([^"]*)/),c=o?o[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=(o,s)=>{if(!o)return;let c=`${o}:${JSON.stringify(s??{})}`;this._lastToolEmit!==c&&(this._lastToolEmit=c,this.onToolCall(o,s??void 0))},n=o=>{if(o!=null){if(typeof o=="object"&&!Array.isArray(o))return o;if(typeof o=="string")try{return JSON.parse(o)}catch{return}}};if(e.type==="tool_use"||e.type==="tool_call"){if(e.name){r(e.name,n(e.input??e.arguments));return}let o=e.tool_call;if(o&&typeof o=="object"&&!Array.isArray(o)){let s=Object.keys(o);if(s.length===1){let c=s[0],u=o[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 o of e.tool_calls)r(o.name,n(o.input??o.arguments));return}let i=e.message??e;if(Array.isArray(i?.tool_calls)){for(let o of i.tool_calls)r(o.name,n(o.input??o.arguments));return}let a=i?.content??e.content;if(Array.isArray(a))for(let o of a)(o.type==="tool_use"||o.type==="tool_call")&&o.name&&r(o.name,n(o.input??o.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 a=0,o=0;for(;a<e.length&&(a=e.indexOf("{",a),a!==-1);){let d=0,f=a;for(let p=a;p<e.length;p++)if(e[p]==="{")d++;else if(e[p]==="}"&&(d--,d===0)){f=p,r.push({text:e.substring(a,f+1),source:"brace"}),o++;break}a=f+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 f=r[d];try{let p=f.text.replace(/,(\s*[}\]])/g,"$1"),m=JSON.parse(p);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 Q_,nG,G_,Y_,fm=E(()=>{Q_=Symbol("Let zodToJsonSchema decide on which parser to use"),nG=(t,e)=>{if(e.description)try{return{...t,...JSON.parse(e.description)}}catch{}return t},G_={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"},Y_=t=>typeof t=="string"?{...G_,name:t}:{...G_,...t}});var J_,X_=E(()=>{fm();J_=t=>{let e=Y_(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 mm(t,e,r,n){n?.errorMessages&&r&&(t.errorMessage={...t.errorMessage,[e]:r})}function dt(t,e,r,n,i){t[e]=r,mm(t,e,n,i)}var Va=E(()=>{});var pl,hm=E(()=>{pl=(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,k1,de,fa,fl=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 a={};for(let o of i)a[o]=o;return a},t.getValidEnumValues=i=>{let a=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(let s of a)o[s]=i[s];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(a){return i[a]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let a=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},t.find=(i,a)=>{for(let o of i)if(a(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(pt||(pt={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(k1||(k1={}));de=pt.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 de.undefined;case"string":return de.string;case"number":return Number.isNaN(t)?de.nan:de.number;case"boolean":return de.boolean;case"function":return de.function;case"bigint":return de.bigint;case"symbol":return de.symbol;case"object":return Array.isArray(t)?de.array:t===null?de.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?de.promise:typeof Map<"u"&&t instanceof Map?de.map:typeof Set<"u"&&t instanceof Set?de.set:typeof Date<"u"&&t instanceof Date?de.date:de.object;default:return de.unknown}}});var Y,Nn,gm=E(()=>{fl();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"]),Nn=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(a){return a.message},n={_errors:[]},i=a=>{for(let o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let s=n,c=0;for(;c<o.path.length;){let u=o.path[c];c===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))):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 a=i.path[0];r[a]=r[a]||[],r[a].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Nn.create=t=>new Nn(t)});var iG,Wa,eb=E(()=>{gm();fl();iG=(t,e)=>{let r;switch(t.code){case Y.invalid_type:t.received===de.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}},Wa=iG});function ml(){return aG}var aG,vm=E(()=>{eb();aG=Wa});function se(t,e){let r=ml(),n=ym({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Wa?void 0:Wa].filter(i=>!!i)});t.common.issues.push(n)}var ym,Mr,je,Ks,Yr,tb,rb,Uo,hl,nb=E(()=>{vm();eb();ym=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)s=u(o,{data:e,defaultError:s}).message;return{...i,path:a,message:s}};Mr=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 a=await i.key,o=await i.value;n.push({key:a,value:o})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return je;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:e.value,value:n}}},je=Object.freeze({status:"aborted"}),Ks=t=>({status:"dirty",value:t}),Yr=t=>({status:"valid",value:t}),tb=t=>t.status==="aborted",rb=t=>t.status==="dirty",Uo=t=>t.status==="valid",hl=t=>typeof Promise<"u"&&t instanceof Promise});var S1=E(()=>{});var _e,$1=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:(o,s)=>{let{message:c}=t;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??n??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:c??r??s.defaultError}},description:i}}function P1(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 wG(t){return new RegExp(`^${P1(t)}$`)}function kG(t){let e=`${E1}T${P1(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 SG(t,e){return!!((e==="v4"||!e)&&hG.test(t)||(e==="v6"||!e)&&vG.test(t))}function $G(t,e){if(!dG.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 IG(t,e){return!!((e==="v4"||!e)&&gG.test(t)||(e==="v6"||!e)&&yG.test(t))}function EG(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(t.toFixed(i).replace(".","")),o=Number.parseInt(e.toFixed(i).replace(".",""));return a%o/10**i}function Hs(t){if(t instanceof Rn){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=xi.create(Hs(n))}return new Rn({...t._def,shape:()=>e})}else return t instanceof Ka?new Ka({...t._def,type:Hs(t.element)}):t instanceof xi?xi.create(Hs(t.unwrap())):t instanceof ga?ga.create(Hs(t.unwrap())):t instanceof ha?ha.create(t.items.map(e=>Hs(e))):t}function ob(t,e){let r=fa(t),n=fa(e);if(t===e)return{valid:!0,data:t};if(r===de.object&&n===de.object){let i=pt.objectKeys(e),a=pt.objectKeys(t).filter(s=>i.indexOf(s)!==-1),o={...t,...e};for(let s of a){let c=ob(t[s],e[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(r===de.array&&n===de.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let a=0;a<t.length;a++){let o=t[a],s=e[a],c=ob(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===de.date&&n===de.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function T1(t,e){return new rc({values:t,typeName:ee.ZodEnum,...Ve(e)})}var Qn,I1,Xe,oG,sG,cG,uG,lG,dG,pG,fG,mG,ib,hG,gG,vG,yG,_G,bG,E1,xG,Gs,gl,vl,yl,_l,bl,Qs,Ys,xl,Ba,Gi,wl,Ka,Rn,Js,ma,ab,Xs,ha,sb,kl,Sl,cb,ec,tc,rc,nc,Do,wi,xi,ga,ic,ac,$l,_m,bm,oc,vSe,ee,ySe,_Se,bSe,xSe,wSe,kSe,SSe,$Se,ISe,ESe,PSe,TSe,zSe,OSe,PG,jSe,NSe,RSe,CSe,ASe,USe,DSe,MSe,qSe,ZSe,LSe,FSe,VSe,WSe,BSe,KSe,HSe,GSe,QSe,z1=E(()=>{gm();vm();$1();nb();fl();Qn=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}},I1=(t,e)=>{if(Uo(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 Nn(t.common.issues);return this._error=r,this._error}}};Xe=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 Mr,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(hl(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:fa(e)},i=this._parseSync({data:e,path:n.path,parent:n});return I1(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 Uo(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=>Uo(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}),a=await(hl(i)?i:Promise.resolve(i));return I1(n,a)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{let o=e(i),s=()=>a.addIssue({code:Y.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!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 wi({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 xi.create(this,this._def)}nullable(){return ga.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ka.create(this)}promise(){return Do.create(this,this._def)}or(e){return Js.create([this,e],this._def)}and(e){return Xs.create(this,e,this._def)}transform(e){return new wi({...Ve(this._def),schema:this,typeName:ee.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ic({...Ve(this._def),innerType:this,defaultValue:r,typeName:ee.ZodDefault})}brand(){return new _m({typeName:ee.ZodBranded,type:this,...Ve(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new ac({...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 bm.create(this,e)}readonly(){return oc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},oG=/^c[^\s-]{8,}$/i,sG=/^[0-9a-z]+$/,cG=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uG=/^[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,dG=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,pG=/^[-+]?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)?)??$/,fG=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mG="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",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])$/,gG=/^(?:(?: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])$/,vG=/^(([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]))$/,yG=/^(([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])$/,_G=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,bG=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,E1="((\\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(`^${E1}$`);Gs=class t extends Xe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==de.string){let a=this._getOrReturnCtx(e);return se(a,{code:Y.invalid_type,expected:de.string,received:a.parsedType}),je}let n=new Mr,i;for(let a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:Y.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:Y.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){let o=e.data.length>a.value,s=e.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(e,i),o?se(i,{code:Y.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&se(i,{code:Y.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")fG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"email",code:Y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")ib||(ib=new RegExp(mG,"u")),ib.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"emoji",code:Y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")uG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"uuid",code:Y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")lG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"nanoid",code:Y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")oG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cuid",code:Y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")sG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cuid2",code:Y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")cG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"ulid",code:Y.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),se(i,{validation:"url",code:Y.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"regex",code:Y.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?kG(a).test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?xG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?wG(a).test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:Y.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?pG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"duration",code:Y.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?SG(e.data,a.version)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"ip",code:Y.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?$G(e.data,a.alg)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"jwt",code:Y.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?IG(e.data,a.version)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cidr",code:Y.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?_G.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"base64",code:Y.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?bG.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"base64url",code:Y.invalid_string,message:a.message}),n.dirty()):pt.assertNever(a);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}};Gs.create=t=>new Gs({checks:[],typeName:ee.ZodString,coerce:t?.coerce??!1,...Ve(t)});gl=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)!==de.number){let a=this._getOrReturnCtx(e);return se(a,{code:Y.invalid_type,expected:de.number,received:a.parsedType}),je}let n,i=new Mr;for(let a of this._def.checks)a.kind==="int"?pt.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:Y.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?EG(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:Y.not_finite,message:a.message}),i.dirty()):pt.assertNever(a);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)}};gl.create=t=>new gl({checks:[],typeName:ee.ZodNumber,coerce:t?.coerce||!1,...Ve(t)});vl=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)!==de.bigint)return this._getInvalidInput(e);let n,i=new Mr;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:Y.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):pt.assertNever(a);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return se(r,{code:Y.invalid_type,expected:de.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}};vl.create=t=>new vl({checks:[],typeName:ee.ZodBigInt,coerce:t?.coerce??!1,...Ve(t)});yl=class extends Xe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==de.boolean){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:de.boolean,received:n.parsedType}),je}return Yr(e.data)}};yl.create=t=>new yl({typeName:ee.ZodBoolean,coerce:t?.coerce||!1,...Ve(t)});_l=class t extends Xe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==de.date){let a=this._getOrReturnCtx(e);return se(a,{code:Y.invalid_type,expected:de.date,received:a.parsedType}),je}if(Number.isNaN(e.data.getTime())){let a=this._getOrReturnCtx(e);return se(a,{code:Y.invalid_date}),je}let n=new Mr,i;for(let a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:Y.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:Y.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):pt.assertNever(a);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}};_l.create=t=>new _l({checks:[],coerce:t?.coerce||!1,typeName:ee.ZodDate,...Ve(t)});bl=class extends Xe{_parse(e){if(this._getType(e)!==de.symbol){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:de.symbol,received:n.parsedType}),je}return Yr(e.data)}};bl.create=t=>new bl({typeName:ee.ZodSymbol,...Ve(t)});Qs=class extends Xe{_parse(e){if(this._getType(e)!==de.undefined){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:de.undefined,received:n.parsedType}),je}return Yr(e.data)}};Qs.create=t=>new Qs({typeName:ee.ZodUndefined,...Ve(t)});Ys=class extends Xe{_parse(e){if(this._getType(e)!==de.null){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:de.null,received:n.parsedType}),je}return Yr(e.data)}};Ys.create=t=>new Ys({typeName:ee.ZodNull,...Ve(t)});xl=class extends Xe{constructor(){super(...arguments),this._any=!0}_parse(e){return Yr(e.data)}};xl.create=t=>new xl({typeName:ee.ZodAny,...Ve(t)});Ba=class extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Yr(e.data)}};Ba.create=t=>new Ba({typeName:ee.ZodUnknown,...Ve(t)});Gi=class extends Xe{_parse(e){let r=this._getOrReturnCtx(e);return se(r,{code:Y.invalid_type,expected:de.never,received:r.parsedType}),je}};Gi.create=t=>new Gi({typeName:ee.ZodNever,...Ve(t)});wl=class extends Xe{_parse(e){if(this._getType(e)!==de.undefined){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:de.void,received:n.parsedType}),je}return Yr(e.data)}};wl.create=t=>new wl({typeName:ee.ZodVoid,...Ve(t)});Ka=class t extends Xe{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==de.array)return se(r,{code:Y.invalid_type,expected:de.array,received:r.parsedType}),je;if(i.exactLength!==null){let o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(se(r,{code:o?Y.too_big:Y.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?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((o,s)=>i.type._parseAsync(new Qn(r,o,r.path,s)))).then(o=>Mr.mergeArray(n,o));let a=[...r.data].map((o,s)=>i.type._parseSync(new Qn(r,o,r.path,s)));return Mr.mergeArray(n,a)}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)}};Ka.create=(t,e)=>new Ka({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ee.ZodArray,...Ve(e)});Rn=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)!==de.object){let u=this._getOrReturnCtx(e);return se(u,{code:Y.invalid_type,expected:de.object,received:u.parsedType}),je}let{status:n,ctx:i}=this._processInputParams(e),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Gi&&this._def.unknownKeys==="strip"))for(let u in i.data)o.includes(u)||s.push(u);let c=[];for(let u of o){let l=a[u],d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Qn(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Gi){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 Qn(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,f=await l.value;u.push({key:d,value:f,alwaysSet:l.alwaysSet})}return u}).then(u=>Mr.mergeObjectSync(n,u)):Mr.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 Hs(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 a=this.shape[n];for(;a instanceof xi;)a=a._def.innerType;r[n]=a}return new t({...this._def,shape:()=>r})}keyof(){return T1(pt.objectKeys(this.shape))}};Rn.create=(t,e)=>new Rn({shape:()=>t,unknownKeys:"strip",catchall:Gi.create(),typeName:ee.ZodObject,...Ve(e)});Rn.strictCreate=(t,e)=>new Rn({shape:()=>t,unknownKeys:"strict",catchall:Gi.create(),typeName:ee.ZodObject,...Ve(e)});Rn.lazycreate=(t,e)=>new Rn({shape:t,unknownKeys:"strip",catchall:Gi.create(),typeName:ee.ZodObject,...Ve(e)});Js=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(a){for(let s of a)if(s.result.status==="valid")return s.result;for(let s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(s=>new Nn(s.ctx.common.issues));return se(r,{code:Y.invalid_union,unionErrors:o}),je}if(r.common.async)return Promise.all(n.map(async a=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a,o=[];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"&&!a&&(a={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(c=>new Nn(c));return se(r,{code:Y.invalid_union,unionErrors:s}),je}}get options(){return this._def.options}};Js.create=(t,e)=>new Js({options:t,typeName:ee.ZodUnion,...Ve(e)});ma=t=>t instanceof ec?ma(t.schema):t instanceof wi?ma(t.innerType()):t instanceof tc?[t.value]:t instanceof rc?t.options:t instanceof nc?pt.objectValues(t.enum):t instanceof ic?ma(t._def.innerType):t instanceof Qs?[void 0]:t instanceof Ys?[null]:t instanceof xi?[void 0,...ma(t.unwrap())]:t instanceof ga?[null,...ma(t.unwrap())]:t instanceof _m||t instanceof oc?ma(t.unwrap()):t instanceof ac?ma(t._def.innerType):[],ab=class t extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==de.object)return se(r,{code:Y.invalid_type,expected:de.object,received:r.parsedType}),je;let n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._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 a of r){let o=ma(a.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of o){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,a)}}return new t({typeName:ee.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ve(n)})}};Xs=class extends Xe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(a,o)=>{if(tb(a)||tb(o))return je;let s=ob(a.value,o.value);return s.valid?((rb(a)||rb(o))&&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(([a,o])=>i(a,o)):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}))}};Xs.create=(t,e,r)=>new Xs({left:t,right:e,typeName:ee.ZodIntersection,...Ve(r)});ha=class t extends Xe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==de.array)return se(n,{code:Y.invalid_type,expected:de.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 a=[...n.data].map((o,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new Qn(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>Mr.mergeArray(r,o)):Mr.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};ha.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ha({items:t,typeName:ee.ZodTuple,rest:null,...Ve(e)})};sb=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!==de.object)return se(n,{code:Y.invalid_type,expected:de.object,received:n.parsedType}),je;let i=[],a=this._def.keyType,o=this._def.valueType;for(let s in n.data)i.push({key:a._parse(new Qn(n,s,n.path,s)),value:o._parse(new Qn(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?Mr.mergeObjectAsync(r,i):Mr.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:Gs.create(),valueType:e,typeName:ee.ZodRecord,...Ve(r)})}},kl=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!==de.map)return se(n,{code:Y.invalid_type,expected:de.map,received:n.parsedType}),je;let i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,c],u)=>({key:i._parse(new Qn(n,s,n.path,[u,"key"])),value:a._parse(new Qn(n,c,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of o){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 o){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}}}};kl.create=(t,e,r)=>new kl({valueType:e,keyType:t,typeName:ee.ZodMap,...Ve(r)});Sl=class t extends Xe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==de.set)return se(n,{code:Y.invalid_type,expected:de.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 a=this._def.valueType;function o(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)=>a._parse(new Qn(n,c,n.path,u)));return n.common.async?Promise.all(s).then(c=>o(c)):o(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)}};Sl.create=(t,e)=>new Sl({valueType:t,minSize:null,maxSize:null,typeName:ee.ZodSet,...Ve(e)});cb=class t extends Xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==de.function)return se(r,{code:Y.invalid_type,expected:de.function,received:r.parsedType}),je;function n(s,c){return ym({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ml(),Wa].filter(u=>!!u),issueData:{code:Y.invalid_arguments,argumentsError:c}})}function i(s,c){return ym({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ml(),Wa].filter(u=>!!u),issueData:{code:Y.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Do){let s=this;return Yr(async function(...c){let u=new Nn([]),l=await s._def.args.parseAsync(c,a).catch(p=>{throw u.addIssue(n(c,p)),u}),d=await Reflect.apply(o,this,l);return await s._def.returns._def.type.parseAsync(d,a).catch(p=>{throw u.addIssue(i(d,p)),u})})}else{let s=this;return Yr(function(...c){let u=s._def.args.safeParse(c,a);if(!u.success)throw new Nn([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=s._def.returns.safeParse(l,a);if(!d.success)throw new Nn([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:ha.create(e).rest(Ba.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||ha.create([]).rest(Ba.create()),returns:r||Ba.create(),typeName:ee.ZodFunction,...Ve(n)})}},ec=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})}};ec.create=(t,e)=>new ec({getter:t,typeName:ee.ZodLazy,...Ve(e)});tc=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}};tc.create=(t,e)=>new tc({value:t,typeName:ee.ZodLiteral,...Ve(e)});rc=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 Yr(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})}};rc.create=T1;nc=class extends Xe{_parse(e){let r=pt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==de.string&&n.parsedType!==de.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 Yr(e.data)}get enum(){return this._def.values}};nc.create=(t,e)=>new nc({values:t,typeName:ee.ZodNativeEnum,...Ve(e)});Do=class extends Xe{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==de.promise&&r.common.async===!1)return se(r,{code:Y.invalid_type,expected:de.promise,received:r.parsedType}),je;let n=r.parsedType===de.promise?r.data:Promise.resolve(r.data);return Yr(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Do.create=(t,e)=>new Do({type:t,typeName:ee.ZodPromise,...Ve(e)});wi=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,a={addIssue:o=>{se(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){let o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).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"?Ks(c.value):r.value==="dirty"?Ks(c.value):c});{if(r.value==="aborted")return je;let s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?je:s.status==="dirty"?Ks(s.value):r.value==="dirty"?Ks(s.value):s}}if(i.type==="refinement"){let o=s=>{let c=i.refinement(s,a);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(),o(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(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Uo(o))return je;let s=i.transform(o.value,a);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(o=>Uo(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):je);pt.assertNever(i)}};wi.create=(t,e,r)=>new wi({schema:t,typeName:ee.ZodEffects,effect:e,...Ve(r)});wi.createWithPreprocess=(t,e,r)=>new wi({schema:e,effect:{type:"preprocess",transform:t},typeName:ee.ZodEffects,...Ve(r)});xi=class extends Xe{_parse(e){return this._getType(e)===de.undefined?Yr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};xi.create=(t,e)=>new xi({innerType:t,typeName:ee.ZodOptional,...Ve(e)});ga=class extends Xe{_parse(e){return this._getType(e)===de.null?Yr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ga.create=(t,e)=>new ga({innerType:t,typeName:ee.ZodNullable,...Ve(e)});ic=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===de.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ic.create=(t,e)=>new ic({innerType:t,typeName:ee.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});ac=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 hl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Nn(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Nn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};ac.create=(t,e)=>new ac({innerType:t,typeName:ee.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});$l=class extends Xe{_parse(e){if(this._getType(e)!==de.nan){let n=this._getOrReturnCtx(e);return se(n,{code:Y.invalid_type,expected:de.nan,received:n.parsedType}),je}return{status:"valid",value:e.data}}};$l.create=t=>new $l({typeName:ee.ZodNaN,...Ve(t)});_m=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}},bm=class t extends Xe{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?je:a.status==="dirty"?(r.dirty(),Ks(a.value)):this._def.out._parseAsync({data:a.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})}},oc=class extends Xe{_parse(e){let r=this._def.innerType._parse(e),n=i=>(Uo(i)&&(i.value=Object.freeze(i.value)),i);return hl(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};oc.create=(t,e)=>new oc({innerType:t,typeName:ee.ZodReadonly,...Ve(e)});vSe={object:Rn.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={}));ySe=Gs.create,_Se=gl.create,bSe=$l.create,xSe=vl.create,wSe=yl.create,kSe=_l.create,SSe=bl.create,$Se=Qs.create,ISe=Ys.create,ESe=xl.create,PSe=Ba.create,TSe=Gi.create,zSe=wl.create,OSe=Ka.create,PG=Rn.create,jSe=Rn.strictCreate,NSe=Js.create,RSe=ab.create,CSe=Xs.create,ASe=ha.create,USe=sb.create,DSe=kl.create,MSe=Sl.create,qSe=cb.create,ZSe=ec.create,LSe=tc.create,FSe=rc.create,VSe=nc.create,WSe=Do.create,BSe=wi.create,KSe=xi.create,HSe=ga.create,GSe=wi.createWithPreprocess,QSe=bm.create});var ub=E(()=>{vm();nb();S1();fl();z1();gm()});var Il=E(()=>{ub();ub()});function Ht(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?pl(e,t.currentPath):e.join("/")}}var Yn=E(()=>{hm()});function lb(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 db=E(()=>{Il();Va();mr()});function pb(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 fb=E(()=>{Va()});function mb(){return{type:"boolean"}}var hb=E(()=>{});function El(t,e){return Te(t.type._def,e)}var xm=E(()=>{mr()});var gb,vb=E(()=>{mr();gb=(t,e)=>Te(t.innerType._def,e)});function wm(t,e,r){let n=r??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,a)=>wm(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 OG(t,e)}}var OG,yb=E(()=>{Va();OG=(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 _b(t,e){return{...Te(t.innerType._def,e),default:t.defaultValue()}}var bb=E(()=>{mr()});function xb(t,e){return e.effectStrategy==="input"?Te(t.schema._def,e):Ht(e)}var wb=E(()=>{mr();Yn()});function kb(t){return{type:"string",enum:Array.from(t.values)}}var Sb=E(()=>{});function $b(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(a=>!!a),n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,i=[];return r.forEach(a=>{if(jG(a))i.push(...a.allOf),a.unevaluatedProperties===void 0&&(n=void 0);else{let o=a;if("additionalProperties"in a&&a.additionalProperties===!1){let{additionalProperties:s,...c}=a;o=c}else n=void 0;i.push(o)}}),i.length?{allOf:i,...n}:void 0}var jG,Ib=E(()=>{mr();jG=t=>"type"in t&&t.type==="string"?!1:"allOf"in t});function Eb(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 Pb=E(()=>{});function Pl(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":ki(r,"email",n.message,e);break;case"format:idn-email":ki(r,"idn-email",n.message,e);break;case"pattern:zod":Jr(r,Jn.email,n.message,e);break}break;case"url":ki(r,"uri",n.message,e);break;case"uuid":ki(r,"uuid",n.message,e);break;case"regex":Jr(r,n.regex,n.message,e);break;case"cuid":Jr(r,Jn.cuid,n.message,e);break;case"cuid2":Jr(r,Jn.cuid2,n.message,e);break;case"startsWith":Jr(r,RegExp(`^${zb(n.value,e)}`),n.message,e);break;case"endsWith":Jr(r,RegExp(`${zb(n.value,e)}$`),n.message,e);break;case"datetime":ki(r,"date-time",n.message,e);break;case"date":ki(r,"date",n.message,e);break;case"time":ki(r,"time",n.message,e);break;case"duration":ki(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":{Jr(r,RegExp(zb(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&ki(r,"ipv4",n.message,e),n.version!=="v4"&&ki(r,"ipv6",n.message,e);break}case"base64url":Jr(r,Jn.base64url,n.message,e);break;case"jwt":Jr(r,Jn.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&Jr(r,Jn.ipv4Cidr,n.message,e),n.version!=="v4"&&Jr(r,Jn.ipv6Cidr,n.message,e);break}case"emoji":Jr(r,Jn.emoji(),n.message,e);break;case"ulid":{Jr(r,Jn.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{ki(r,"binary",n.message,e);break}case"contentEncoding:base64":{dt(r,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{Jr(r,Jn.base64,n.message,e);break}}break}case"nanoid":Jr(r,Jn.nanoid,n.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function zb(t,e){return e.patternStrategy==="escape"?RG(t):t}function RG(t){let e="";for(let r=0;r<t.length;r++)NG.has(t[r])||(e+="\\"),e+=t[r];return e}function ki(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 Jr(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:O1(e,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):dt(t,"pattern",O1(e,n),r,n)}function O1(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="",a=!1,o=!1,s=!1;for(let c=0;c<n.length;c++){if(a){i+=n[c],a=!1;continue}if(r.i){if(o){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
5
+ ]))`;continue}else if(n[c]==="$"){i+=`($|(?=[\r
6
+ ]))`;continue}}if(r.s&&n[c]==="."){i+=o?`${n[c]}\r
7
+ `:`[${n[c]}\r
8
+ ]`;continue}i+=n[c],n[c]==="\\"?a=!0:o&&n[c]==="]"?o=!1:!o&&n[c]==="["&&(o=!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 Tb,Jn,NG,km=E(()=>{Va();Jn={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:()=>(Tb===void 0&&(Tb=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Tb),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-_]*$/};NG=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function Tl(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]})??Ht(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}=Pl(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}=El(t.keyType._def,e);return{...r,propertyNames:i}}}return r}var Sm=E(()=>{Il();mr();km();xm();Yn()});function Ob(t,e){if(e.mapStrategy==="record")return Tl(t,e);let r=Te(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||Ht(e),n=Te(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||Ht(e);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var jb=E(()=>{mr();Sm();Yn()});function Nb(t){let e=t.values,n=Object.keys(t.values).filter(a=>typeof e[e[a]]!="number").map(a=>e[a]),i=Array.from(new Set(n.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:n}}var Rb=E(()=>{});function Cb(t){return t.target==="openAi"?void 0:{not:Ht({...t,currentPath:[...t.currentPath,"not"]})}}var Ab=E(()=>{Yn()});function Ub(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Db=E(()=>{});function Mb(t,e){if(e.target==="openApi3")return j1(t,e);let r=t.options instanceof Map?Array.from(t.options.values()):t.options;if(r.every(n=>n._def.typeName in sc&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((i,a)=>{let o=sc[a._def.typeName];return o&&!i.includes(o)?[...i,o]: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,a)=>{let o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...i,o];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];default:return i}},[]);if(n.length===r.length){let i=n.filter((a,o,s)=>s.indexOf(a)===o);return{type:i.length>1?i:i[0],enum:r.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(a=>!n.includes(a))],[])};return j1(t,e)}var sc,j1,$m=E(()=>{mr();sc={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};j1=(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 qb(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:sc[t.innerType._def.typeName],nullable:!0}:{type:[sc[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 Zb=E(()=>{mr();$m()});function Lb(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",mm(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 Fb=E(()=>{Va()});function Vb(t,e){let r=e.target==="openAi",n={type:"object",properties:{}},i=[],a=t.shape();for(let s in a){let c=a[s];if(c===void 0||c._def===void 0)continue;let u=AG(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 o=CG(t,e);return o!==void 0&&(n.additionalProperties=o),n}function CG(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 AG(t){try{return t.isOptional()}catch{return!0}}var Wb=E(()=>{mr()});var Bb,Kb=E(()=>{mr();Yn();Bb=(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:Ht(e)},r]}:Ht(e)}});var Hb,Gb=E(()=>{mr();Hb=(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 Qb(t,e){return Te(t.type._def,e)}var Yb=E(()=>{mr()});function Jb(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 Xb=E(()=>{Va();mr()});function ex(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 tx=E(()=>{mr()});function rx(t){return{not:Ht(t)}}var nx=E(()=>{Yn()});function ix(t){return Ht(t)}var ax=E(()=>{Yn()});var ox,sx=E(()=>{mr();ox=(t,e)=>Te(t.innerType._def,e)});var cx,ux=E(()=>{Il();Yn();db();fb();hb();xm();vb();yb();bb();wb();Sb();Ib();Pb();jb();Rb();Ab();Db();Zb();Fb();Wb();Kb();Gb();Yb();Sm();Xb();km();tx();nx();$m();ax();sx();cx=(t,e,r)=>{switch(e){case ee.ZodString:return Pl(t,r);case ee.ZodNumber:return Lb(t,r);case ee.ZodObject:return Vb(t,r);case ee.ZodBigInt:return pb(t,r);case ee.ZodBoolean:return mb();case ee.ZodDate:return wm(t,r);case ee.ZodUndefined:return rx(r);case ee.ZodNull:return Ub(r);case ee.ZodArray:return lb(t,r);case ee.ZodUnion:case ee.ZodDiscriminatedUnion:return Mb(t,r);case ee.ZodIntersection:return $b(t,r);case ee.ZodTuple:return ex(t,r);case ee.ZodRecord:return Tl(t,r);case ee.ZodLiteral:return Eb(t,r);case ee.ZodEnum:return kb(t);case ee.ZodNativeEnum:return Nb(t);case ee.ZodNullable:return qb(t,r);case ee.ZodOptional:return Bb(t,r);case ee.ZodMap:return Ob(t,r);case ee.ZodSet:return Jb(t,r);case ee.ZodLazy:return()=>t.getter()._def;case ee.ZodPromise:return Qb(t,r);case ee.ZodNaN:case ee.ZodNever:return Cb(r);case ee.ZodEffects:return xb(t,r);case ee.ZodAny:return Ht(r);case ee.ZodUnknown:return ix(r);case ee.ZodDefault:return _b(t,r);case ee.ZodBranded:return El(t,r);case ee.ZodReadonly:return ox(t,r);case ee.ZodCatch:return gb(t,r);case ee.ZodPipeline:return Hb(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!==Q_)return s}if(n&&!r){let s=UG(n,e);if(s!==void 0)return s}let i={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,i);let a=cx(t,t.typeName,e),o=typeof a=="function"?Te(a(),e):a;if(o&&DG(t,e,o),e.postProcess){let s=e.postProcess(o,t,e);return i.jsonSchema=o,s}return i.jsonSchema=o,o}var UG,DG,mr=E(()=>{fm();ux();hm();Yn();UG=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:pl(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`),Ht(e)):e.$refStrategy==="seen"?Ht(e):void 0}},DG=(t,e,r)=>(t.description&&(r.description=t.description,e.markdownDescription&&(r.markdownDescription=t.description)),r)});var N1=E(()=>{});var Xn,lx=E(()=>{mr();X_();Yn();Xn=(t,e)=>{let r=J_(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)??Ht(r)}),{}):void 0,i=typeof e=="string"?e:e?.nameStrategy==="title"?void 0:e?.name,a=Te(t._def,i===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??Ht(r),o=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;o!==void 0&&(a.title=o),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?{...a,[r.definitionPath]:n}:a:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:a}};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 R1={};Ki(R1,{addErrorMessage:()=>mm,default:()=>MG,defaultOptions:()=>G_,getDefaultOptions:()=>Y_,getRefs:()=>J_,getRelativePath:()=>pl,ignoreOverride:()=>Q_,jsonDescription:()=>nG,parseAnyDef:()=>Ht,parseArrayDef:()=>lb,parseBigintDef:()=>pb,parseBooleanDef:()=>mb,parseBrandedDef:()=>El,parseCatchDef:()=>gb,parseDateDef:()=>wm,parseDef:()=>Te,parseDefaultDef:()=>_b,parseEffectsDef:()=>xb,parseEnumDef:()=>kb,parseIntersectionDef:()=>$b,parseLiteralDef:()=>Eb,parseMapDef:()=>Ob,parseNativeEnumDef:()=>Nb,parseNeverDef:()=>Cb,parseNullDef:()=>Ub,parseNullableDef:()=>qb,parseNumberDef:()=>Lb,parseObjectDef:()=>Vb,parseOptionalDef:()=>Bb,parsePipelineDef:()=>Hb,parsePromiseDef:()=>Qb,parseReadonlyDef:()=>ox,parseRecordDef:()=>Tl,parseSetDef:()=>Jb,parseStringDef:()=>Pl,parseTupleDef:()=>ex,parseUndefinedDef:()=>rx,parseUnionDef:()=>Mb,parseUnknownDef:()=>ix,primitiveMappings:()=>sc,selectParser:()=>cx,setResponseValueAndErrors:()=>dt,zodPatterns:()=>Jn,zodToJsonSchema:()=>Xn});var MG,Mo=E(()=>{fm();X_();Va();hm();mr();N1();Yn();db();fb();hb();xm();vb();yb();bb();wb();Sb();Ib();Pb();jb();Rb();Ab();Db();Zb();Fb();Wb();Kb();Gb();Yb();sx();Sm();Xb();km();tx();nx();$m();ax();ux();lx();lx();MG=Xn});var cc,dx=E(()=>{Mo();cc=class{static generateFileOutputInstructions(e,r){let n;typeof e?.parse=="function"?n=Xn(e,{target:"openApi3"}):n=e;let i=this._buildExample(n);return`
9
+ \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
10
+ \u{1F6A8} MANDATORY: WRITE RESULT TO FILE \u{1F6A8}
11
+ \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
12
+ You MUST write your final result as pure JSON to this EXACT file path:
13
+
14
+ ${r}
15
+
16
+ Use your file writing tool (WriteFile or ApplyPatch) to create this file.
17
+ DO NOT just output JSON to stdout. The file MUST exist when you finish.
18
+ DO NOT skip this step. The workflow WILL FAIL if the file is missing.
19
+
20
+ Required JSON structure:
21
+ ${JSON.stringify(i,null,2)}
22
+
23
+ JSON types (strict \u2014 validators reject wrong types):
24
+ - Use bare JSON numbers for numeric fields (e.g. 3000). Do NOT quote them as strings (wrong: "3000").
25
+ - Use true/false without quotes for booleans.
26
+ - Use unquoted null where a field may be null.
27
+
28
+ 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,a]of Object.entries(e.properties))n[i]=this._buildExample(a);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 zl(t,e){return function(){return t.apply(e,arguments)}}var px=E(()=>{"use strict"});function Ol(t){return t!==null&&!uc(t)&&t.constructor!==null&&!uc(t.constructor)&&hn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}function ZG(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&M1(t.buffer),e}function JG(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}function Nl(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),lc(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(Ol(t))return;let a=r?Object.getOwnPropertyNames(t):Object.keys(t),o=a.length,s;for(n=0;n<o;n++)s=a[n],e.call(null,t[s],s,t)}}function Z1(t,e){if(Ol(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 fx(){let{caseless:t,skipUndefined:e}=L1(this)&&this||{},r={},n=(i,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;let o=t&&Z1(r,a)||a;Im(r[o])&&Im(i)?r[o]=fx(r[o],i):Im(i)?r[o]=fx({},i):lc(i)?r[o]=i.slice():(!e||!uc(i))&&(r[o]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&Nl(arguments[i],n);return r}function w5(t){return!!(t&&hn(t.append)&&t[D1]==="FormData"&&t[Em])}var qG,mx,Em,D1,Pm,Si,Tm,lc,uc,M1,LG,hn,q1,jl,FG,Im,VG,WG,BG,KG,HG,GG,QG,YG,C1,A1,XG,e5,t5,r5,n5,i5,a5,qo,L1,o5,s5,c5,u5,l5,d5,p5,f5,m5,h5,g5,U1,v5,F1,y5,_5,b5,x5,k5,S5,$5,V1,I5,E5,j,Wt=E(()=>{"use strict";px();({toString:qG}=Object.prototype),{getPrototypeOf:mx}=Object,{iterator:Em,toStringTag:D1}=Symbol,Pm=(t=>e=>{let r=qG.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Si=t=>(t=t.toLowerCase(),e=>Pm(e)===t),Tm=t=>e=>typeof e===t,{isArray:lc}=Array,uc=Tm("undefined");M1=Si("ArrayBuffer");LG=Tm("string"),hn=Tm("function"),q1=Tm("number"),jl=t=>t!==null&&typeof t=="object",FG=t=>t===!0||t===!1,Im=t=>{if(Pm(t)!=="object")return!1;let e=mx(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(D1 in t)&&!(Em in t)},VG=t=>{if(!jl(t)||Ol(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},WG=Si("Date"),BG=Si("File"),KG=t=>!!(t&&typeof t.uri<"u"),HG=t=>t&&typeof t.getParts<"u",GG=Si("Blob"),QG=Si("FileList"),YG=t=>jl(t)&&hn(t.pipe);C1=JG(),A1=typeof C1.FormData<"u"?C1.FormData:void 0,XG=t=>{let e;return t&&(A1&&t instanceof A1||hn(t.append)&&((e=Pm(t))==="formdata"||e==="object"&&hn(t.toString)&&t.toString()==="[object FormData]"))},e5=Si("URLSearchParams"),[t5,r5,n5,i5]=["ReadableStream","Request","Response","Headers"].map(Si),a5=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");qo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,L1=t=>!uc(t)&&t!==qo;o5=(t,e,r,{allOwnKeys:n}={})=>(Nl(e,(i,a)=>{r&&hn(i)?Object.defineProperty(t,a,{value:zl(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,a,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),s5=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),c5=(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)},u5=(t,e,r,n)=>{let i,a,o,s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),a=i.length;a-- >0;)o=i[a],(!n||n(o,t,e))&&!s[o]&&(e[o]=t[o],s[o]=!0);t=r!==!1&&mx(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},d5=t=>{if(!t)return null;if(lc(t))return t;let e=t.length;if(!q1(e))return null;let r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},p5=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&mx(Uint8Array)),f5=(t,e)=>{let n=(t&&t[Em]).call(t),i;for(;(i=n.next())&&!i.done;){let a=i.value;e.call(t,a[0],a[1])}},m5=(t,e)=>{let r,n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},h5=Si("HTMLFormElement"),g5=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),U1=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),v5=Si("RegExp"),F1=(t,e)=>{let r=Object.getOwnPropertyDescriptors(t),n={};Nl(r,(i,a)=>{let o;(o=e(i,a,t))!==!1&&(n[a]=o||i)}),Object.defineProperties(t,n)},y5=t=>{F1(t,(e,r)=>{if(hn(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let n=t[r];if(hn(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+"'")})}})},_5=(t,e)=>{let r={},n=i=>{i.forEach(a=>{r[a]=!0})};return lc(t)?n(t):n(String(t).split(e)),r},b5=()=>{},x5=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;k5=t=>{let e=new Array(10),r=(n,i)=>{if(jl(n)){if(e.indexOf(n)>=0)return;if(Ol(n))return n;if(!("toJSON"in n)){e[i]=n;let a=lc(n)?[]:{};return Nl(n,(o,s)=>{let c=r(o,i+1);!uc(c)&&(a[s]=c)}),e[i]=void 0,a}}return n};return r(t,0)},S5=Si("AsyncFunction"),$5=t=>t&&(jl(t)||hn(t))&&hn(t.then)&&hn(t.catch),V1=((t,e)=>t?setImmediate:e?((r,n)=>(qo.addEventListener("message",({source:i,data:a})=>{i===qo&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),qo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",hn(qo.postMessage)),I5=typeof queueMicrotask<"u"?queueMicrotask.bind(qo):typeof process<"u"&&process.nextTick||V1,E5=t=>t!=null&&hn(t[Em]),j={isArray:lc,isArrayBuffer:M1,isBuffer:Ol,isFormData:XG,isArrayBufferView:ZG,isString:LG,isNumber:q1,isBoolean:FG,isObject:jl,isPlainObject:Im,isEmptyObject:VG,isReadableStream:t5,isRequest:r5,isResponse:n5,isHeaders:i5,isUndefined:uc,isDate:WG,isFile:BG,isReactNativeBlob:KG,isReactNative:HG,isBlob:GG,isRegExp:v5,isFunction:hn,isStream:YG,isURLSearchParams:e5,isTypedArray:p5,isFileList:QG,forEach:Nl,merge:fx,extend:o5,trim:a5,stripBOM:s5,inherits:c5,toFlatObject:u5,kindOf:Pm,kindOfTest:Si,endsWith:l5,toArray:d5,forEachEntry:f5,matchAll:m5,isHTMLForm:h5,hasOwnProperty:U1,hasOwnProp:U1,reduceDescriptors:F1,freezeMethods:y5,toObjectSet:_5,toCamelCase:g5,noop:b5,toFiniteNumber:x5,findKey:Z1,global:qo,isContextDefined:L1,isSpecCompliantForm:w5,toJSONObject:k5,isAsyncFn:S5,isThenable:$5,setImmediate:V1,asap:I5,isIterable:E5}});var Xr,ae,Cn=E(()=>{"use strict";Wt();Xr=class t extends Error{static from(e,r,n,i,a,o){let s=new t(e.message,r||e.code,n,i,a);return s.cause=e,s.name=e.name,e.status!=null&&s.status==null&&(s.status=e.status),o&&Object.assign(s,o),s}constructor(e,r,n,i,a){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),a&&(this.response=a,this.status=a.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}}};Xr.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Xr.ERR_BAD_OPTION="ERR_BAD_OPTION";Xr.ECONNABORTED="ECONNABORTED";Xr.ETIMEDOUT="ETIMEDOUT";Xr.ERR_NETWORK="ERR_NETWORK";Xr.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Xr.ERR_DEPRECATED="ERR_DEPRECATED";Xr.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Xr.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Xr.ERR_CANCELED="ERR_CANCELED";Xr.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Xr.ERR_INVALID_URL="ERR_INVALID_URL";ae=Xr});var K1=O((YEe,B1)=>{var W1=zt("stream").Stream,P5=zt("util");B1.exports=$i;function $i(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}P5.inherits($i,W1);$i.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($i.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});$i.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};$i.prototype.resume=function(){this._released||this.release(),this.source.resume()};$i.prototype.pause=function(){this.source.pause()};$i.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};$i.prototype.pipe=function(){var t=W1.prototype.pipe.apply(this,arguments);return this.resume(),t};$i.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)};$i.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 Y1=O((JEe,Q1)=>{var T5=zt("util"),G1=zt("stream").Stream,H1=K1();Q1.exports=ir;function ir(){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}T5.inherits(ir,G1);ir.create=function(t){var e=new this;t=t||{};for(var r in t)e[r]=t[r];return e};ir.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};ir.prototype.append=function(t){var e=ir.isStreamLike(t);if(e){if(!(t instanceof H1)){var r=H1.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};ir.prototype.pipe=function(t,e){return G1.prototype.pipe.call(this,t,e),this.resume(),t};ir.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}};ir.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=ir.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};ir.prototype._pipeNext=function(t){this._currentStream=t;var e=ir.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()};ir.prototype._handleErrors=function(t){var e=this;t.on("error",function(r){e._emitError(r)})};ir.prototype.write=function(t){this.emit("data",t)};ir.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};ir.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")};ir.prototype.end=function(){this._reset(),this.emit("end")};ir.prototype.destroy=function(){this._reset(),this.emit("close")};ir.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};ir.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};ir.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)};ir.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var J1=O((XEe,z5)=>{z5.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((ePe,X1)=>{X1.exports=J1()});var nN=O(gn=>{"use strict";var zm=eN(),O5=zt("path").extname,tN=/^\s*([^;\s]*)(?:;|\s|$)/,j5=/^text\//i;gn.charset=rN;gn.charsets={lookup:rN};gn.contentType=N5;gn.extension=R5;gn.extensions=Object.create(null);gn.lookup=C5;gn.types=Object.create(null);A5(gn.extensions,gn.types);function rN(t){if(!t||typeof t!="string")return!1;var e=tN.exec(t),r=e&&zm[e[1].toLowerCase()];return r&&r.charset?r.charset:e&&j5.test(e[1])?"UTF-8":!1}function N5(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?gn.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var r=gn.charset(e);r&&(e+="; charset="+r.toLowerCase())}return e}function R5(t){if(!t||typeof t!="string")return!1;var e=tN.exec(t),r=e&&gn.extensions[e[1].toLowerCase()];return!r||!r.length?!1:r[0]}function C5(t){if(!t||typeof t!="string")return!1;var e=O5("x."+t).toLowerCase().substr(1);return e&&gn.types[e]||!1}function A5(t,e){var r=["nginx","apache",void 0,"iana"];Object.keys(zm).forEach(function(i){var a=zm[i],o=a.extensions;if(!(!o||!o.length)){t[i]=o;for(var s=0;s<o.length;s++){var c=o[s];if(e[c]){var u=r.indexOf(zm[e[c]].source),l=r.indexOf(a.source);if(e[c]!=="application/octet-stream"&&(u>l||u===l&&e[c].substr(0,12)==="application/"))continue}e[c]=i}}})}});var aN=O((rPe,iN)=>{iN.exports=U5;function U5(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var hx=O((nPe,sN)=>{var oN=aN();sN.exports=D5;function D5(t){var e=!1;return oN(function(){e=!0}),function(n,i){e?t(n,i):oN(function(){t(n,i)})}}});var gx=O((iPe,cN)=>{cN.exports=M5;function M5(t){Object.keys(t.jobs).forEach(q5.bind(t)),t.jobs={}}function q5(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var vx=O((aPe,lN)=>{var uN=hx(),Z5=gx();lN.exports=L5;function L5(t,e,r,n){var i=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[i]=F5(e,i,t[i],function(a,o){i in r.jobs&&(delete r.jobs[i],a?Z5(r):r.results[i]=o,n(a,r.results))})}function F5(t,e,r,n){var i;return t.length==2?i=t(r,uN(n)):i=t(r,e,uN(n)),i}});var yx=O((oPe,dN)=>{dN.exports=V5;function V5(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,a){return e(t[i],t[a])}),n}});var _x=O((sPe,pN)=>{var W5=gx(),B5=hx();pN.exports=K5;function K5(t){Object.keys(this.jobs).length&&(this.index=this.size,W5(this),B5(t)(null,this.results))}});var mN=O((cPe,fN)=>{var H5=vx(),G5=yx(),Q5=_x();fN.exports=Y5;function Y5(t,e,r){for(var n=G5(t);n.index<(n.keyedList||t).length;)H5(t,e,n,function(i,a){if(i){r(i,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Q5.bind(n,r)}});var bx=O((uPe,Om)=>{var hN=vx(),J5=yx(),X5=_x();Om.exports=eQ;Om.exports.ascending=gN;Om.exports.descending=tQ;function eQ(t,e,r,n){var i=J5(t,r);return hN(t,e,i,function a(o,s){if(o){n(o,s);return}if(i.index++,i.index<(i.keyedList||t).length){hN(t,e,i,a);return}n(null,i.results)}),X5.bind(i,n)}function gN(t,e){return t<e?-1:t>e?1:0}function tQ(t,e){return-1*gN(t,e)}});var yN=O((lPe,vN)=>{var rQ=bx();vN.exports=nQ;function nQ(t,e,r){return rQ(t,e,null,r)}});var bN=O((dPe,_N)=>{_N.exports={parallel:mN(),serial:yN(),serialOrdered:bx()}});var xx=O((pPe,xN)=>{"use strict";xN.exports=Object});var kN=O((fPe,wN)=>{"use strict";wN.exports=Error});var $N=O((mPe,SN)=>{"use strict";SN.exports=EvalError});var EN=O((hPe,IN)=>{"use strict";IN.exports=RangeError});var TN=O((gPe,PN)=>{"use strict";PN.exports=ReferenceError});var ON=O((vPe,zN)=>{"use strict";zN.exports=SyntaxError});var jm=O((yPe,jN)=>{"use strict";jN.exports=TypeError});var RN=O((_Pe,NN)=>{"use strict";NN.exports=URIError});var AN=O((bPe,CN)=>{"use strict";CN.exports=Math.abs});var DN=O((xPe,UN)=>{"use strict";UN.exports=Math.floor});var qN=O((wPe,MN)=>{"use strict";MN.exports=Math.max});var LN=O((kPe,ZN)=>{"use strict";ZN.exports=Math.min});var VN=O((SPe,FN)=>{"use strict";FN.exports=Math.pow});var BN=O(($Pe,WN)=>{"use strict";WN.exports=Math.round});var HN=O((IPe,KN)=>{"use strict";KN.exports=Number.isNaN||function(e){return e!==e}});var QN=O((EPe,GN)=>{"use strict";var iQ=HN();GN.exports=function(e){return iQ(e)||e===0?e:e<0?-1:1}});var JN=O((PPe,YN)=>{"use strict";YN.exports=Object.getOwnPropertyDescriptor});var wx=O((TPe,XN)=>{"use strict";var Nm=JN();if(Nm)try{Nm([],"length")}catch{Nm=null}XN.exports=Nm});var tR=O((zPe,eR)=>{"use strict";var Rm=Object.defineProperty||!1;if(Rm)try{Rm({},"a",{value:1})}catch{Rm=!1}eR.exports=Rm});var kx=O((OPe,rR)=>{"use strict";rR.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 a 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 o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[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 aR=O((jPe,iR)=>{"use strict";var nR=typeof Symbol<"u"&&Symbol,aQ=kx();iR.exports=function(){return typeof nR!="function"||typeof Symbol!="function"||typeof nR("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:aQ()}});var Sx=O((NPe,oR)=>{"use strict";oR.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var $x=O((RPe,sR)=>{"use strict";var oQ=xx();sR.exports=oQ.getPrototypeOf||null});var lR=O((CPe,uR)=>{"use strict";var sQ="Function.prototype.bind called on incompatible ",cQ=Object.prototype.toString,uQ=Math.max,lQ="[object Function]",cR=function(e,r){for(var n=[],i=0;i<e.length;i+=1)n[i]=e[i];for(var a=0;a<r.length;a+=1)n[a+e.length]=r[a];return n},dQ=function(e,r){for(var n=[],i=r||0,a=0;i<e.length;i+=1,a+=1)n[a]=e[i];return n},pQ=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};uR.exports=function(e){var r=this;if(typeof r!="function"||cQ.apply(r)!==lQ)throw new TypeError(sQ+r);for(var n=dQ(arguments,1),i,a=function(){if(this instanceof i){var l=r.apply(this,cR(n,arguments));return Object(l)===l?l:this}return r.apply(e,cR(n,arguments))},o=uQ(0,r.length-n.length),s=[],c=0;c<o;c++)s[c]="$"+c;if(i=Function("binder","return function ("+pQ(s,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var u=function(){};u.prototype=r.prototype,i.prototype=new u,u.prototype=null}return i}});var Rl=O((APe,dR)=>{"use strict";var fQ=lR();dR.exports=Function.prototype.bind||fQ});var Cm=O((UPe,pR)=>{"use strict";pR.exports=Function.prototype.call});var Ix=O((DPe,fR)=>{"use strict";fR.exports=Function.prototype.apply});var hR=O((MPe,mR)=>{"use strict";mR.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var vR=O((qPe,gR)=>{"use strict";var mQ=Rl(),hQ=Ix(),gQ=Cm(),vQ=hR();gR.exports=vQ||mQ.call(gQ,hQ)});var _R=O((ZPe,yR)=>{"use strict";var yQ=Rl(),_Q=jm(),bQ=Cm(),xQ=vR();yR.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new _Q("a function is required");return xQ(yQ,bQ,e)}});var $R=O((LPe,SR)=>{"use strict";var wQ=_R(),bR=wx(),wR;try{wR=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Ex=!!wR&&bR&&bR(Object.prototype,"__proto__"),kR=Object,xR=kR.getPrototypeOf;SR.exports=Ex&&typeof Ex.get=="function"?wQ([Ex.get]):typeof xR=="function"?function(e){return xR(e==null?e:kR(e))}:!1});var zR=O((FPe,TR)=>{"use strict";var IR=Sx(),ER=$x(),PR=$R();TR.exports=IR?function(e){return IR(e)}:ER?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return ER(e)}:PR?function(e){return PR(e)}:null});var Am=O((VPe,OR)=>{"use strict";var kQ=Function.prototype.call,SQ=Object.prototype.hasOwnProperty,$Q=Rl();OR.exports=$Q.call(kQ,SQ)});var DR=O((WPe,UR)=>{"use strict";var lt,IQ=xx(),EQ=kN(),PQ=$N(),TQ=EN(),zQ=TN(),mc=ON(),fc=jm(),OQ=RN(),jQ=AN(),NQ=DN(),RQ=qN(),CQ=LN(),AQ=VN(),UQ=BN(),DQ=QN(),CR=Function,Px=function(t){try{return CR('"use strict"; return ('+t+").constructor;")()}catch{}},Cl=wx(),MQ=tR(),Tx=function(){throw new fc},qQ=Cl?(function(){try{return arguments.callee,Tx}catch{try{return Cl(arguments,"callee").get}catch{return Tx}}})():Tx,dc=aR()(),Sr=zR(),ZQ=$x(),LQ=Sx(),AR=Ix(),Al=Cm(),pc={},FQ=typeof Uint8Array>"u"||!Sr?lt:Sr(Uint8Array),Zo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?lt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?lt:ArrayBuffer,"%ArrayIteratorPrototype%":dc&&Sr?Sr([][Symbol.iterator]()):lt,"%AsyncFromSyncIteratorPrototype%":lt,"%AsyncFunction%":pc,"%AsyncGenerator%":pc,"%AsyncGeneratorFunction%":pc,"%AsyncIteratorPrototype%":pc,"%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%":EQ,"%eval%":eval,"%EvalError%":PQ,"%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%":pc,"%Int8Array%":typeof Int8Array>"u"?lt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?lt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?lt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":dc&&Sr?Sr(Sr([][Symbol.iterator]())):lt,"%JSON%":typeof JSON=="object"?JSON:lt,"%Map%":typeof Map>"u"?lt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!dc||!Sr?lt:Sr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":IQ,"%Object.getOwnPropertyDescriptor%":Cl,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?lt:Promise,"%Proxy%":typeof Proxy>"u"?lt:Proxy,"%RangeError%":TQ,"%ReferenceError%":zQ,"%Reflect%":typeof Reflect>"u"?lt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?lt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!dc||!Sr?lt:Sr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?lt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":dc&&Sr?Sr(""[Symbol.iterator]()):lt,"%Symbol%":dc?Symbol:lt,"%SyntaxError%":mc,"%ThrowTypeError%":qQ,"%TypedArray%":FQ,"%TypeError%":fc,"%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%":OQ,"%WeakMap%":typeof WeakMap>"u"?lt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?lt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?lt:WeakSet,"%Function.prototype.call%":Al,"%Function.prototype.apply%":AR,"%Object.defineProperty%":MQ,"%Object.getPrototypeOf%":ZQ,"%Math.abs%":jQ,"%Math.floor%":NQ,"%Math.max%":RQ,"%Math.min%":CQ,"%Math.pow%":AQ,"%Math.round%":UQ,"%Math.sign%":DQ,"%Reflect.getPrototypeOf%":LQ};if(Sr)try{null.error}catch(t){jR=Sr(Sr(t)),Zo["%Error.prototype%"]=jR}var jR,VQ=function t(e){var r;if(e==="%AsyncFunction%")r=Px("async function () {}");else if(e==="%GeneratorFunction%")r=Px("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Px("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Sr&&(r=Sr(i.prototype))}return Zo[e]=r,r},NR={__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"]},Ul=Rl(),Um=Am(),WQ=Ul.call(Al,Array.prototype.concat),BQ=Ul.call(AR,Array.prototype.splice),RR=Ul.call(Al,String.prototype.replace),Dm=Ul.call(Al,String.prototype.slice),KQ=Ul.call(Al,RegExp.prototype.exec),HQ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,GQ=/\\(\\)?/g,QQ=function(e){var r=Dm(e,0,1),n=Dm(e,-1);if(r==="%"&&n!=="%")throw new mc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new mc("invalid intrinsic syntax, expected opening `%`");var i=[];return RR(e,HQ,function(a,o,s,c){i[i.length]=s?RR(c,GQ,"$1"):o||a}),i},YQ=function(e,r){var n=e,i;if(Um(NR,n)&&(i=NR[n],n="%"+i[0]+"%"),Um(Zo,n)){var a=Zo[n];if(a===pc&&(a=VQ(n)),typeof a>"u"&&!r)throw new fc("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new mc("intrinsic "+e+" does not exist!")};UR.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new fc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new fc('"allowMissing" argument must be a boolean');if(KQ(/^%?[^%]*%?$/,e)===null)throw new mc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=QQ(e),i=n.length>0?n[0]:"",a=YQ("%"+i+"%",r),o=a.name,s=a.value,c=!1,u=a.alias;u&&(i=u[0],BQ(n,WQ([0,1],u)));for(var l=1,d=!0;l<n.length;l+=1){var f=n[l],p=Dm(f,0,1),m=Dm(f,-1);if((p==='"'||p==="'"||p==="`"||m==='"'||m==="'"||m==="`")&&p!==m)throw new mc("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),i+="."+f,o="%"+i+"%",Um(Zo,o))s=Zo[o];else if(s!=null){if(!(f in s)){if(!r)throw new fc("base intrinsic for "+e+" exists, but the property is not available.");return}if(Cl&&l+1>=n.length){var v=Cl(s,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[f]}else d=Um(s,f),s=s[f];d&&!c&&(Zo[o]=s)}}return s}});var qR=O((BPe,MR)=>{"use strict";var JQ=kx();MR.exports=function(){return JQ()&&!!Symbol.toStringTag}});var FR=O((KPe,LR)=>{"use strict";var XQ=DR(),ZR=XQ("%Object.defineProperty%",!0),e8=qR()(),t8=Am(),r8=jm(),Mm=e8?Symbol.toStringTag:null;LR.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 r8("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Mm&&(n||!t8(e,Mm))&&(ZR?ZR(e,Mm,{configurable:!i,enumerable:!1,value:r,writable:!1}):e[Mm]=r)}});var WR=O((HPe,VR)=>{"use strict";VR.exports=function(t,e){return Object.keys(e).forEach(function(r){t[r]=t[r]||e[r]}),t}});var KR=O((GPe,BR)=>{"use strict";var Nx=Y1(),n8=zt("util"),zx=zt("path"),i8=zt("http"),a8=zt("https"),o8=zt("url").parse,s8=zt("fs"),c8=zt("stream").Stream,u8=zt("crypto"),Ox=nN(),l8=bN(),d8=FR(),Ha=Am(),jx=WR();function yt(t){if(!(this instanceof yt))return new yt(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Nx.call(this),t=t||{};for(var e in t)this[e]=t[e]}n8.inherits(yt,Nx);yt.LINE_BREAK=`\r
29
+ `;yt.DEFAULT_CONTENT_TYPE="application/octet-stream";yt.prototype.append=function(t,e,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Nx.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),a=this._multiPartFooter();n(i),n(e),n(a),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&&Ha(e,"httpVersion"))&&!(e instanceof c8))&&(r.knownLength||this._valuesToMeasure.push(e))};yt.prototype._lengthRetriever=function(t,e){Ha(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):s8.stat(t.path,function(r,n){if(r){e(r);return}var i=n.size-(t.start?t.start:0);e(null,i)}):Ha(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Ha(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),a="",o={"Content-Disposition":["form-data",'name="'+t+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};typeof r.header=="object"&&jx(o,r.header);var s;for(var c in o)if(Ha(o,c)){if(s=o[c],s==null)continue;Array.isArray(s)||(s=[s]),s.length&&(a+=c+": "+s.join("; ")+yt.LINE_BREAK)}return"--"+this.getBoundary()+yt.LINE_BREAK+a+yt.LINE_BREAK};yt.prototype._getContentDisposition=function(t,e){var r;if(typeof e.filepath=="string"?r=zx.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?r=zx.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Ha(t,"httpVersion")&&(r=zx.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=Ox.lookup(t.name)),!r&&t&&t.path&&(r=Ox.lookup(t.path)),!r&&t&&t.readable&&Ha(t,"httpVersion")&&(r=t.headers["content-type"]),!r&&(e.filepath||e.filename)&&(r=Ox.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)Ha(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="--------------------------"+u8.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=o8(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=a8.request(n):r=i8.request(n),this.getLength(function(a,o){if(a&&a!=="Unknown stream"){this._error(a);return}if(o&&r.setHeader("Content-Length",o),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]"};d8(yt.prototype,"FormData");BR.exports=yt});var HR,qm,Rx=E(()=>{HR=ul(KR(),1),qm=HR.default});function Ax(t){return j.isPlainObject(t)||j.isArray(t)}function GR(t){return j.endsWith(t,"[]")?t.slice(0,-2):t}function Cx(t,e,r){return t?t.concat(e).map(function(i,a){return i=GR(i),!r&&a?"["+i+"]":i}).join(r?".":""):e}function p8(t){return j.isArray(t)&&!t.some(Ax)}function m8(t,e,r){if(!j.isObject(t))throw new TypeError("target must be an object");e=e||new(qm||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,a=r.dots,o=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(Cx(g,v,a),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)&&p8(m)||(j.isFileList(m)||j.endsWith(v,"[]"))&&(h=j.toArray(m)))return v=GR(v),h.forEach(function(y,_){!(j.isUndefined(y)||y===null)&&e.append(o===!0?Cx([v],_,a):o===null?v:v+"[]",u(y))}),!1}return Ax(m)?!0:(e.append(Cx(g,v,a),u(m)),!1)}let d=[],f=Object.assign(f8,{defaultVisitor:l,convertValue:u,isVisitable:Ax});function p(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,b){(!(j.isUndefined(h)||h===null)&&i.call(e,h,j.isString(b)?b.trim():b,v,f))===!0&&p(h,v?v.concat(b):[b])}),d.pop()}}if(!j.isObject(t))throw new TypeError("data must be an object");return p(t),e}var f8,Ga,Dl=E(()=>{"use strict";Wt();Cn();Rx();f8=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});Ga=m8});function QR(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function YR(t,e){this._pairs=[],t&&Ga(t,this,e)}var JR,XR,eC=E(()=>{"use strict";Dl();JR=YR.prototype;JR.append=function(e,r){this._pairs.push([e,r])};JR.toString=function(e){let r=e?function(n){return e.call(this,n,QR)}:QR;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};XR=YR});function h8(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lo(t,e,r){if(!e)return t;let n=r&&r.encode||h8,i=j.isFunction(r)?{serialize:r}:r,a=i&&i.serialize,o;if(a?o=a(e,i):o=j.isURLSearchParams(e)?e.toString():new XR(e,i).toString(n),o){let s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}var Zm=E(()=>{"use strict";Wt();eC()});var Ux,Dx,tC=E(()=>{"use strict";Wt();Ux=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)})}},Dx=Ux});var Qa,Ml=E(()=>{"use strict";Qa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0}});import g8 from"url";var rC,nC=E(()=>{"use strict";rC=g8.URLSearchParams});import v8 from"crypto";var Mx,iC,aC,y8,oC,sC=E(()=>{nC();Rx();Mx="abcdefghijklmnopqrstuvwxyz",iC="0123456789",aC={DIGIT:iC,ALPHA:Mx,ALPHA_DIGIT:Mx+Mx.toUpperCase()+iC},y8=(t=16,e=aC.ALPHA_DIGIT)=>{let r="",{length:n}=e,i=new Uint32Array(t);v8.randomFillSync(i);for(let a=0;a<t;a++)r+=e[i[a]%n];return r},oC={isNode:!0,classes:{URLSearchParams:rC,FormData:qm,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:aC,generateString:y8,protocols:["http","https","file","data"]}});var Lx={};Ki(Lx,{hasBrowserEnv:()=>Zx,hasStandardBrowserEnv:()=>_8,hasStandardBrowserWebWorkerEnv:()=>b8,navigator:()=>qx,origin:()=>x8});var Zx,qx,_8,b8,x8,cC=E(()=>{Zx=typeof window<"u"&&typeof document<"u",qx=typeof navigator=="object"&&navigator||void 0,_8=Zx&&(!qx||["ReactNative","NativeScript","NS"].indexOf(qx.product)<0),b8=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",x8=Zx&&window.location.href||"http://localhost"});var Et,Ii=E(()=>{sC();cC();Et={...Lx,...oC}});function Fx(t,e){return Ga(t,new Et.classes.URLSearchParams,{visitor:function(r,n,i,a){return Et.isNode&&j.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}var uC=E(()=>{"use strict";Wt();Dl();Ii()});function w8(t){return j.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function k8(t){let e={},r=Object.keys(t),n,i=r.length,a;for(n=0;n<i;n++)a=r[n],e[a]=t[a];return e}function S8(t){function e(r,n,i,a){let o=r[a++];if(o==="__proto__")return!0;let s=Number.isFinite(+o),c=a>=r.length;return o=!o&&j.isArray(i)?i.length:o,c?(j.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s):((!i[o]||!j.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],a)&&j.isArray(i[o])&&(i[o]=k8(i[o])),!s)}if(j.isFormData(t)&&j.isFunction(t.entries)){let r={};return j.forEachEntry(t,(n,i)=>{e(w8(n),i,r,0)}),r}return null}var Lm,Vx=E(()=>{"use strict";Wt();Lm=S8});function $8(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 Wx,hc,Fm=E(()=>{"use strict";Wt();Cn();Ml();Dl();uC();Ii();Vx();Wx={transitional:Qa,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){let n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=j.isObject(e);if(a&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return i?JSON.stringify(Lm(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(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Fx(e,this.formSerializer).toString();if((s=j.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Ga(s?{"files[]":e}:e,c&&new c,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),$8(e)):e}],transformResponse:[function(e){let r=this.transitional||Wx.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 o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(s){if(o)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:Et.classes.FormData,Blob:Et.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=>{Wx.headers[t]={}});hc=Wx});var I8,lC,dC=E(()=>{"use strict";Wt();I8=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"]),lC=t=>{let e={},r,n,i;return t&&t.split(`
30
+ `).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&I8[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e}});function fC(t,e){if(!(t===!1||t==null)){if(j.isArray(t)){t.forEach(r=>fC(r,e));return}if(!E8(String(t)))throw new Error(`Invalid character in header content ["${e}"]`)}}function ql(t){return t&&String(t).trim().toLowerCase()}function P8(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 Vm(t){return t===!1||t==null?t:j.isArray(t)?t.map(Vm):P8(String(t))}function T8(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 Bx(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 O8(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function j8(t,e){let r=j.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,a,o){return this[n].call(this,e,i,a,o)},configurable:!0})})}var pC,E8,z8,gc,nr,Qi=E(()=>{"use strict";Wt();dC();pC=Symbol("internals"),E8=t=>!/[\r\n]/.test(t);z8=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());gc=class{constructor(e){e&&this.set(e)}set(e,r,n){let i=this;function a(s,c,u){let l=ql(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)&&(fC(s,c),i[d||c]=Vm(s))}let o=(s,c)=>j.forEach(s,(u,l)=>a(u,l,c));if(j.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(j.isString(e)&&(e=e.trim())&&!z8(e))o(lC(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]}o(s,r)}else e!=null&&a(r,e,n);return this}get(e,r){if(e=ql(e),e){let n=j.findKey(this,e);if(n){let i=this[n];if(!r)return i;if(r===!0)return T8(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=ql(e),e){let n=j.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Bx(this,this[n],n,r)))}return!1}delete(e,r){let n=this,i=!1;function a(o){if(o=ql(o),o){let s=j.findKey(n,o);s&&(!r||Bx(n,n[s],s,r))&&(delete n[s],i=!0)}}return j.isArray(e)?e.forEach(a):a(e),i}clear(e){let r=Object.keys(this),n=r.length,i=!1;for(;n--;){let a=r[n];(!e||Bx(this,this[a],a,e,!0))&&(delete this[a],i=!0)}return i}normalize(e){let r=this,n={};return j.forEach(this,(i,a)=>{let o=j.findKey(n,a);if(o){r[o]=Vm(i),delete r[a];return}let s=e?O8(a):String(a).trim();s!==a&&delete r[a],r[s]=Vm(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(`
31
+ `)}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[pC]=this[pC]={accessors:{}}).accessors,i=this.prototype;function a(o){let s=ql(o);n[s]||(j8(i,o),n[s]=!0)}return j.isArray(e)?e.forEach(a):a(e),this}};gc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);j.reduceDescriptors(gc.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});j.freezeMethods(gc);nr=gc});function Zl(t,e){let r=this||hc,n=e||r,i=nr.from(n.headers),a=n.data;return j.forEach(t,function(s){a=s.call(r,a,i.normalize(),e?e.status:void 0)}),i.normalize(),a}var mC=E(()=>{"use strict";Wt();Fm();Qi()});function Ll(t){return!!(t&&t.__CANCEL__)}var Kx=E(()=>{"use strict"});var Hx,An,Fo=E(()=>{"use strict";Cn();Hx=class extends ae{constructor(e,r,n){super(e??"canceled",ae.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}},An=Hx});function Yi(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 Wm=E(()=>{"use strict";Cn()});function Gx(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}var hC=E(()=>{"use strict"});function Qx(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var gC=E(()=>{"use strict"});function Vo(t,e,r){let n=!Gx(e);return t&&(n||r==!1)?Qx(t,e):e}var Bm=E(()=>{"use strict";hC();gC()});function R8(t){try{return new URL(t)}catch{return null}}function vC(t){var e=(typeof t=="string"?R8(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)||N8[r]||0,!C8(n,i)))return"";var a=Yx(r+"_proxy")||Yx("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function C8(t,e){var r=Yx("no_proxy").toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(n){if(!n)return!0;var i=n.match(/^(.+):(\d+)$/),a=i?i[1]:n,o=i?parseInt(i[2]):0;return o&&o!==e?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!t.endsWith(a)):t!==a}):!0}function Yx(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var N8,yC=E(()=>{"use strict";N8={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var bC=O((YTe,_C)=>{var vc=1e3,yc=vc*60,_c=yc*60,Wo=_c*24,A8=Wo*7,U8=Wo*365.25;_C.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return D8(t);if(r==="number"&&isFinite(t))return e.long?q8(t):M8(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function D8(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*U8;case"weeks":case"week":case"w":return r*A8;case"days":case"day":case"d":return r*Wo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_c;case"minutes":case"minute":case"mins":case"min":case"m":return r*yc;case"seconds":case"second":case"secs":case"sec":case"s":return r*vc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function M8(t){var e=Math.abs(t);return e>=Wo?Math.round(t/Wo)+"d":e>=_c?Math.round(t/_c)+"h":e>=yc?Math.round(t/yc)+"m":e>=vc?Math.round(t/vc)+"s":t+"ms"}function q8(t){var e=Math.abs(t);return e>=Wo?Km(t,e,Wo,"day"):e>=_c?Km(t,e,_c,"hour"):e>=yc?Km(t,e,yc,"minute"):e>=vc?Km(t,e,vc,"second"):t+" ms"}function Km(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var Jx=O((JTe,xC)=>{function Z8(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=s,r.humanize=bC(),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 f=0;f<l.length;f++)d=(d<<5)-d+l.charCodeAt(f),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=e;function r(l){let d,f=null,p,m;function v(...g){if(!v.enabled)return;let h=v,b=Number(new Date),y=b-(d||b);h.diff=y,h.prev=d,h.curr=b,d=b,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let _=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(w,k)=>{if(w==="%%")return"%";_++;let $=r.formatters[k];if(typeof $=="function"){let T=g[_];w=$.call(h,T),g.splice(_,1),_--}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:()=>f!==null?f:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(l)),m),set:g=>{f=g}}),typeof r.init=="function"&&r.init(v),v}function n(l,d){let f=r(this.namespace+(typeof d>"u"?":":d)+l);return f.log=this.log,f}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 f of d)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function a(l,d){let f=0,p=0,m=-1,v=0;for(;f<l.length;)if(p<d.length&&(d[p]===l[f]||d[p]==="*"))d[p]==="*"?(m=p,v=f,p++):(f++,p++);else if(m!==-1)p=m+1,v++,f=v;else return!1;for(;p<d.length&&d[p]==="*";)p++;return p===d.length}function o(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function s(l){for(let d of r.skips)if(a(l,d))return!1;for(let d of r.names)if(a(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}xC.exports=Z8});var wC=O((vn,Hm)=>{vn.formatArgs=F8;vn.save=V8;vn.load=W8;vn.useColors=L8;vn.storage=B8();vn.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`."))}})();vn.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 L8(){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 F8(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Hm.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)}vn.log=console.debug||console.log||(()=>{});function V8(t){try{t?vn.storage.setItem("debug",t):vn.storage.removeItem("debug")}catch{}}function W8(){let t;try{t=vn.storage.getItem("debug")||vn.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function B8(){try{return localStorage}catch{}}Hm.exports=Jx()(vn);var{formatters:K8}=Hm.exports;K8.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var SC=O((XTe,kC)=>{"use strict";kC.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 EC=O((eze,IC)=>{"use strict";var H8=zt("os"),$C=zt("tty"),ei=SC(),{env:$r}=process,Ya;ei("no-color")||ei("no-colors")||ei("color=false")||ei("color=never")?Ya=0:(ei("color")||ei("colors")||ei("color=true")||ei("color=always"))&&(Ya=1);"FORCE_COLOR"in $r&&($r.FORCE_COLOR==="true"?Ya=1:$r.FORCE_COLOR==="false"?Ya=0:Ya=$r.FORCE_COLOR.length===0?1:Math.min(parseInt($r.FORCE_COLOR,10),3));function Xx(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function ew(t,e){if(Ya===0)return 0;if(ei("color=16m")||ei("color=full")||ei("color=truecolor"))return 3;if(ei("color=256"))return 2;if(t&&!e&&Ya===void 0)return 0;let r=Ya||0;if($r.TERM==="dumb")return r;if(process.platform==="win32"){let n=H8.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in $r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in $r)||$r.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in $r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test($r.TEAMCITY_VERSION)?1:0;if($r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in $r){let n=parseInt(($r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch($r.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test($r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test($r.TERM)||"COLORTERM"in $r?1:r}function G8(t){let e=ew(t,t&&t.isTTY);return Xx(e)}IC.exports={supportsColor:G8,stdout:Xx(ew(!0,$C.isatty(1))),stderr:Xx(ew(!0,$C.isatty(2)))}});var TC=O((Ir,Qm)=>{var Q8=zt("tty"),Gm=zt("util");Ir.init=n7;Ir.log=e7;Ir.formatArgs=J8;Ir.save=t7;Ir.load=r7;Ir.useColors=Y8;Ir.destroy=Gm.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ir.colors=[6,2,3,4,5,1];try{let t=EC();t&&(t.stderr||t).level>=2&&(Ir.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{}Ir.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,a)=>a.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 Y8(){return"colors"in Ir.inspectOpts?!!Ir.inspectOpts.colors:Q8.isatty(process.stderr.fd)}function J8(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),a=` ${i};1m${e} \x1B[0m`;t[0]=a+t[0].split(`
32
+ `).join(`
33
+ `+a),t.push(i+"m+"+Qm.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=X8()+e+" "+t[0]}function X8(){return Ir.inspectOpts.hideDate?"":new Date().toISOString()+" "}function e7(...t){return process.stderr.write(Gm.formatWithOptions(Ir.inspectOpts,...t)+`
34
+ `)}function t7(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function r7(){return process.env.DEBUG}function n7(t){t.inspectOpts={};let e=Object.keys(Ir.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Ir.inspectOpts[e[r]]}Qm.exports=Jx()(Ir);var{formatters:PC}=Qm.exports;PC.o=function(t){return this.inspectOpts.colors=this.useColors,Gm.inspect(t,this.inspectOpts).split(`
35
+ `).map(e=>e.trim()).join(" ")};PC.O=function(t){return this.inspectOpts.colors=this.useColors,Gm.inspect(t,this.inspectOpts)}});var zC=O((tze,tw)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?tw.exports=wC():tw.exports=TC()});var jC=O((rze,OC)=>{var Fl;OC.exports=function(){if(!Fl){try{Fl=zC()("follow-redirects")}catch{}typeof Fl!="function"&&(Fl=function(){})}Fl.apply(null,arguments)}});var UC=O((nze,fw)=>{var Wl=zt("url"),Vl=Wl.URL,i7=zt("http"),a7=zt("https"),ow=zt("stream").Writable,sw=zt("assert"),NC=jC();(function(){var e=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=Ko(Error.captureStackTrace);!e&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var cw=!1;try{sw(new Vl(""))}catch(t){cw=t.code==="ERR_INVALID_URL"}var o7=["Authorization","Proxy-Authorization","Cookie"],s7=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],uw=["abort","aborted","connect","error","socket","timeout"],lw=Object.create(null);uw.forEach(function(t){lw[t]=function(e,r,n){this._redirectable.emit(t,e,r,n)}});var nw=Bl("ERR_INVALID_URL","Invalid URL",TypeError),iw=Bl("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),c7=Bl("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",iw),u7=Bl("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),l7=Bl("ERR_STREAM_WRITE_AFTER_END","write after end"),d7=ow.prototype.destroy||CC;function yn(t,e){ow.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 iw?i:new iw({cause:i}))}},this._headerFilter=new RegExp("^(?:"+o7.concat(t.sensitiveHeaders).map(v7).join("|")+")$","i"),this._performRequest()}yn.prototype=Object.create(ow.prototype);yn.prototype.abort=function(){pw(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};yn.prototype.destroy=function(t){return pw(this._currentRequest,t),d7.call(this,t),this};yn.prototype.write=function(t,e,r){if(this._ending)throw new l7;if(!Bo(t)&&!h7(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Ko(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 u7),this.abort())};yn.prototype.end=function(t,e,r){if(Ko(t)?(r=t,t=e=null):Ko(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}};yn.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};yn.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};yn.prototype.setTimeout=function(t,e){var r=this;function n(o){o.setTimeout(t),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),a()},t),n(o)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),r.removeListener("close",a),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",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){yn.prototype[t]=function(e,r){return this._currentRequest[t](e,r)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(yn.prototype,t,{get:function(){return this._currentRequest[t]}})});yn.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),m7(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))}};yn.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 uw)n.on(i,lw[i]);if(this._currentUrl=/^\//.test(this._options.path)?Wl.format(this._options):this._options.path,this._isRedirect){var a=0,o=this,s=this._requestBodyBuffers;(function c(u){if(n===o._currentRequest)if(u)o.emit("error",u);else if(a<s.length){var l=s[a++];n.finished||n.write(l.data,l.encoding,c)}else o._ended&&n.end()})()}};yn.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(pw(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new c7;var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var a=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=[],rw(/^content-/i,this._options.headers));var o=rw(/^host$/i,this._options.headers),s=dw(this._currentUrl),c=o||s.host,u=/^\w+:/.test(r)?this._currentUrl:Wl.format(Object.assign(s,{host:c})),l=p7(r,u);if(NC("redirecting to",l.href),this._isRedirect=!0,aw(l,this._options),(l.protocol!==s.protocol&&l.protocol!=="https:"||l.host!==c&&!f7(l.host,c))&&rw(this._headerFilter,this._options.headers),Ko(i)){var d={headers:t.headers,statusCode:e},f={url:u,method:a,headers:n};i(this._options,d,f),this._sanitizeOptions(this._options)}this._performRequest()};function RC(t){var e={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(t).forEach(function(n){var i=n+":",a=r[i]=t[n],o=e[n]=Object.create(a);function s(u,l,d){return g7(u)?u=aw(u):Bo(u)?u=aw(dw(u)):(d=l,l=AC(u),u={protocol:i}),Ko(l)&&(d=l,l=null),l=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},u,l),l.nativeProtocols=r,!Bo(l.host)&&!Bo(l.hostname)&&(l.hostname="::1"),sw.equal(l.protocol,i,"protocol mismatch"),NC("options",l),new yn(l,d)}function c(u,l,d){var f=o.request(u,l,d);return f.end(),f}Object.defineProperties(o,{request:{value:s,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function CC(){}function dw(t){var e;if(cw)e=new Vl(t);else if(e=AC(Wl.parse(t)),!Bo(e.protocol))throw new nw({input:t});return e}function p7(t,e){return cw?new Vl(t,e):dw(Wl.resolve(e,t))}function AC(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new nw({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new nw({input:t.href||t});return t}function aw(t,e){var r=e||{};for(var n of s7)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 rw(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 Bl(t,e,r){function n(i){Ko(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 pw(t,e){for(var r of uw)t.removeListener(r,lw[r]);t.on("error",CC),t.destroy(e)}function f7(t,e){sw(Bo(t)&&Bo(e));var r=t.length-e.length-1;return r>0&&t[r]==="."&&t.endsWith(e)}function m7(t){return t instanceof Array}function Bo(t){return typeof t=="string"||t instanceof String}function Ko(t){return typeof t=="function"}function h7(t){return typeof t=="object"&&"length"in t}function g7(t){return Vl&&t instanceof Vl}function v7(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}fw.exports=RC({http:i7,https:a7});fw.exports.wrap=RC});var Ho,Ym=E(()=>{Ho="1.15.0"});function Kl(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var mw=E(()=>{"use strict"});function hw(t,e,r){let n=r&&r.Blob||Et.classes.Blob,i=Kl(t);if(e===void 0&&n&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let a=y7.exec(t);if(!a)throw new ae("Invalid URL",ae.ERR_INVALID_URL);let o=a[1],s=a[2],c=a[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:o})}return u}throw new ae("Unsupported protocol "+i,ae.ERR_NOT_SUPPORT)}var y7,DC=E(()=>{"use strict";Cn();mw();Ii();y7=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/});import _7 from"stream";var gw,vw,yw,MC=E(()=>{"use strict";Wt();gw=Symbol("internals"),vw=class extends _7.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[gw]={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[gw];return r.onReadCallback&&r.onReadCallback(),super._read(e)}_transform(e,r,n){let i=this[gw],a=i.maxRate,o=this.readableHighWaterMark,s=i.timeWindow,c=1e3/s,u=a/c,l=i.minChunkSize!==!1?Math.max(i.minChunkSize,u*.01):0,d=(p,m)=>{let v=Buffer.byteLength(p);i.bytesSeen+=v,i.bytes+=v,i.isCaptured&&this.emit("progress",i.bytesSeen),this.push(p)?process.nextTick(m):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(m)}},f=(p,m)=>{let v=Buffer.byteLength(p),g=null,h=o,b,y=0;if(a){let _=Date.now();(!i.ts||(y=_-i.ts)>=s)&&(i.ts=_,b=u-i.bytes,i.bytes=b<0?-b:0,y=0),b=u-i.bytes}if(a){if(b<=0)return setTimeout(()=>{m(null,p)},s-y);b<h&&(h=b)}h&&v>h&&v-h>l&&(g=p.subarray(h),p=p.subarray(0,h)),d(p,g?()=>{process.nextTick(m,null,g)}:m)};f(e,function p(m,v){if(m)return n(m);v?f(v,p):n(null)})}},yw=vw});var qC,b7,Jm,_w=E(()=>{({asyncIterator:qC}=Symbol),b7=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[qC]?yield*t[qC]():yield t},Jm=b7});import x7 from"util";import{Readable as w7}from"stream";var k7,Hl,Go,S7,$7,bw,I7,ZC,LC=E(()=>{Wt();_w();Ii();k7=Et.ALPHABET.ALPHA_DIGIT+"-_",Hl=typeof TextEncoder=="function"?new TextEncoder:new x7.TextEncoder,Go=`\r
36
+ `,S7=Hl.encode(Go),$7=2,bw=class{constructor(e,r){let{escapeName:n}=this.constructor,i=j.isString(r),a=`Content-Disposition: form-data; name="${n(e)}"${!i&&r.name?`; filename="${n(r.name)}"`:""}${Go}`;i?r=Hl.encode(String(r).replace(/\r?\n|\r\n?/g,Go)):a+=`Content-Type: ${r.type||"application/octet-stream"}${Go}`,this.headers=Hl.encode(a+Go),this.contentLength=i?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+$7,this.name=e,this.value=r}async*encode(){yield this.headers;let{value:e}=this;j.isTypedArray(e)?yield e:yield*Jm(e),yield S7}static escapeName(e){return String(e).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},I7=(t,e,r)=>{let{tag:n="form-data-boundary",size:i=25,boundary:a=n+"-"+Et.generateString(i,k7)}=r||{};if(!j.isFormData(t))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let o=Hl.encode("--"+a+Go),s=Hl.encode("--"+a+"--"+Go),c=s.byteLength,u=Array.from(t.entries()).map(([d,f])=>{let p=new bw(d,f);return c+=p.size,p});c+=o.byteLength*u.length,c=j.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(c)&&(l["Content-Length"]=c),e&&e(l),w7.from((async function*(){for(let d of u)yield o,yield*d.encode();yield s})())},ZC=I7});import E7 from"stream";var xw,FC,VC=E(()=>{"use strict";xw=class extends E7.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)}},FC=xw});var P7,WC,BC=E(()=>{Wt();P7=(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(a){n(a)}},n)}:t,WC=P7});function ww(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)||T7[e.protocol.split(":",1)[0]]||0,i=KC(e.hostname.toLowerCase());return r.split(/[\s,]+/).some(a=>{if(!a)return!1;let[o,s]=z7(a);return o=KC(o),!o||s&&s!==n?!1:(o.charAt(0)==="*"&&(o=o.slice(1)),o.charAt(0)==="."?i.endsWith(o):i===o)})}var T7,z7,KC,HC=E(()=>{T7={http:80,https:443,ws:80,wss:443,ftp:21},z7=t=>{let e=t,r=0;if(e.charAt(0)==="["){let a=e.indexOf("]");if(a!==-1){let o=e.slice(1,a),s=e.slice(a+1);return s.charAt(0)===":"&&/^\d+$/.test(s.slice(1))&&(r=Number.parseInt(s.slice(1),10)),[o,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]},KC=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),t.replace(/\.+$/,""))});function O7(t,e){t=t||10;let r=new Array(t),n=new Array(t),i=0,a=0,o;return e=e!==void 0?e:1e3,function(c){let u=Date.now(),l=n[a];o||(o=u),r[i]=c,n[i]=u;let d=a,f=0;for(;d!==i;)f+=r[d++],d=d%t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),u-o<e)return;let p=l&&u-l;return p?Math.round(f*1e3/p):void 0}}var GC,QC=E(()=>{"use strict";GC=O7});function j7(t,e){let r=0,n=1e3/e,i,a,o=(u,l=Date.now())=>{r=l,i=null,a&&(clearTimeout(a),a=null),t(...u)};return[(...u)=>{let l=Date.now(),d=l-r;d>=n?o(u,l):(i=u,a||(a=setTimeout(()=>{a=null,o(i)},n-d)))},()=>i&&o(i)]}var YC,JC=E(()=>{YC=j7});var va,bc,xc,Xm=E(()=>{QC();JC();Wt();va=(t,e,r=3)=>{let n=0,i=GC(50,250);return YC(a=>{let o=a.loaded,s=a.lengthComputable?a.total:void 0,c=o-n,u=i(c),l=o<=s;n=o;let d={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&l?(s-o)/u:void 0,event:a,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},r)},bc=(t,e)=>{let r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},xc=t=>(...e)=>j.asap(()=>t(...e))});function kw(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 a=n.length,o=n.length;for(let f=0;f<o;f++)if(n.charCodeAt(f)===37&&f+2<o){let p=n.charCodeAt(f+1),m=n.charCodeAt(f+2);(p>=48&&p<=57||p>=65&&p<=70||p>=97&&p<=102)&&(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(a-=2,f+=2)}let s=0,c=o-1,u=f=>f>=2&&n.charCodeAt(f-2)===37&&n.charCodeAt(f-1)===51&&(n.charCodeAt(f)===68||n.charCodeAt(f)===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(a/4)*3-(s||0);return d>0?d:0}return Buffer.byteLength(n,"utf8")}var XC=E(()=>{});import N7 from"http";import R7 from"https";import aA from"http2";import oA from"util";import Xa from"zlib";import Ja from"stream";import{EventEmitter as C7}from"events";function Z7(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function cA(t,e,r){let n=e;if(!n&&n!==!1){let i=vC(r);i&&(ww(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 o=Buffer.from(n.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+o}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(a){cA(a,e,a.href)}}var sA,eA,A7,tA,U7,D7,M7,rA,nA,Sw,q7,L7,F7,V7,iA,W7,uA,lA=E(()=>{Wt();Wm();Bm();Zm();yC();sA=ul(UC(),1);Ym();Ml();Cn();Fo();Ii();DC();Qi();MC();LC();_w();VC();BC();HC();Xm();XC();eA={flush:Xa.constants.Z_SYNC_FLUSH,finishFlush:Xa.constants.Z_SYNC_FLUSH},A7={flush:Xa.constants.BROTLI_OPERATION_FLUSH,finishFlush:Xa.constants.BROTLI_OPERATION_FLUSH},tA=j.isFunction(Xa.createBrotliDecompress),{http:U7,https:D7}=sA.default,M7=/https:?/,rA=Et.protocols.map(t=>t+":"),nA=(t,[e,r])=>(t.on("end",r).on("error",r),e),Sw=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[f,p]=n[d];if(!f.destroyed&&!f.closed&&oA.isDeepStrictEqual(p,r))return f}}let i=aA.connect(e,r),a,o=()=>{if(a)return;a=!0;let l=n,d=l.length,f=d;for(;f--;)if(l[f][0]===i){d===1?delete this.sessions[e]:l.splice(f,1),i.closed||i.close();return}},s=i.request,{sessionTimeout:c}=r;if(c!=null){let l,d=0;i.request=function(){let f=s.apply(this,arguments);return d++,l&&(clearTimeout(l),l=null),f.once("close",()=>{--d||(l=setTimeout(()=>{l=null,o()},c))}),f}}i.once("close",o);let u=[i,r];return n?n.push(u):n=this.sessions[e]=[u],i}},q7=new Sw;L7=typeof process<"u"&&j.kindOf(process)==="process",F7=t=>new Promise((e,r)=>{let n,i,a=(c,u)=>{i||(i=!0,n&&n(c,u))},o=c=>{a(c),e(c)},s=c=>{a(c,!0),r(c)};t(o,s,c=>n=c).catch(s)}),V7=({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)}},iA=(t,e)=>V7(j.isObject(t)?t:{address:t,family:e}),W7={request(t,e){let r=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:n,headers:i}=t,a=q7.getSession(r,n),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:s,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=aA.constants,l={[o]:t.protocol.replace(":",""),[s]:t.method,[c]:t.path};j.forEach(i,(f,p)=>{p.charAt(0)!==":"&&(l[p]=f)});let d=a.request(l);return d.once("response",f=>{let p=d;f=Object.assign({},f);let m=f[u];delete f[u],p.headers=f,p.statusCode=+m,e(p)}),d}},uA=L7&&function(e){return F7(async function(n,i,a){let{data:o,lookup:s,family:c,httpVersion:u=1,http2Options:l}=e,{responseType:d,responseEncoding:f}=e,p=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 B=WC(s,I=>j.isArray(I)?I:[I]);s=(I,W,C)=>{B(I,W,(S,P,K)=>{if(S)return C(S);let oe=j.isArray(P)?P.map(ge=>iA(ge)):[iA(P,K)];W.all?C(S,oe):C(S,oe[0].address,oe[0].family)})}}let b=new C7;function y(B){try{b.emit("abort",!B||B.type?new An(null,e,g):B)}catch(I){console.warn("emit error",I)}}b.once("abort",i);let _=()=>{e.cancelToken&&e.cancelToken.unsubscribe(y),e.signal&&e.signal.removeEventListener("abort",y),b.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(y),e.signal&&(e.signal.aborted?y():e.signal.addEventListener("abort",y))),a((B,I)=>{if(m=!0,I){v=!0,_();return}let{data:W}=B;if(W instanceof Ja.Readable||W instanceof Ja.Duplex){let C=Ja.finished(W,()=>{C(),_()})}else _()});let x=Vo(e.baseURL,e.url,e.allowAbsoluteUrls),w=new URL(x,Et.hasBrowserEnv?Et.origin:void 0),k=w.protocol||rA[0];if(k==="data:"){if(e.maxContentLength>-1){let I=String(e.url||x||"");if(kw(I)>e.maxContentLength)return i(new ae("maxContentLength size of "+e.maxContentLength+" exceeded",ae.ERR_BAD_RESPONSE,e))}let B;if(p!=="GET")return Yi(n,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{B=hw(e.url,d==="blob",{Blob:e.env&&e.env.Blob})}catch(I){throw ae.from(I,ae.ERR_BAD_REQUEST,e)}return d==="text"?(B=B.toString(f),(!f||f==="utf8")&&(B=j.stripBOM(B))):d==="stream"&&(B=Ja.Readable.from(B)),Yi(n,i,{data:B,status:200,statusText:"OK",headers:new nr,config:e})}if(rA.indexOf(k)===-1)return i(new ae("Unsupported protocol "+k,ae.ERR_BAD_REQUEST,e));let $=nr.from(e.headers).normalize();$.set("User-Agent","axios/"+Ho,!1);let{onUploadProgress:T,onDownloadProgress:A}=e,z=e.maxRate,M,L;if(j.isSpecCompliantForm(o)){let B=$.getContentType(/boundary=([-_\w\d]{10,70})/i);o=ZC(o,I=>{$.set(I)},{tag:`axios-${Ho}-boundary`,boundary:B&&B[1]||void 0})}else if(j.isFormData(o)&&j.isFunction(o.getHeaders)){if($.set(o.getHeaders()),!$.hasContentLength())try{let B=await oA.promisify(o.getLength).call(o);Number.isFinite(B)&&B>=0&&$.setContentLength(B)}catch{}}else if(j.isBlob(o)||j.isFile(o))o.size&&$.setContentType(o.type||"application/octet-stream"),$.setContentLength(o.size||0),o=Ja.Readable.from(Jm(o));else if(o&&!j.isStream(o)){if(!Buffer.isBuffer(o))if(j.isArrayBuffer(o))o=Buffer.from(new Uint8Array(o));else if(j.isString(o))o=Buffer.from(o,"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(o.length,!1),e.maxBodyLength>-1&&o.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],L=z[1]):M=L=z,o&&(T||M)&&(j.isStream(o)||(o=Ja.Readable.from(o,{objectMode:!1})),o=Ja.pipeline([o,new yw({maxRate:j.toFiniteNumber(M)})],j.noop),T&&o.on("progress",nA(o,bc(R,va(xc(T),!1,3)))));let te;if(e.auth){let B=e.auth.username||"",I=e.auth.password||"";te=B+":"+I}if(!te&&w.username){let B=w.username,I=w.password;te=B+":"+I}te&&$.delete("authorization");let G;try{G=Lo(w.pathname+w.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(B){let I=new Error(B.message);return I.config=e,I.url=e.url,I.exists=!0,i(I)}$.set("Accept-Encoding","gzip, compress, deflate"+(tA?", br":""),!1);let ve={path:G,method:p,headers:$.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:te,protocol:k,family:c,beforeRedirect:Z7,beforeRedirects:{},http2Options:l};!j.isUndefined(s)&&(ve.lookup=s),e.socketPath?ve.socketPath=e.socketPath:(ve.hostname=w.hostname.startsWith("[")?w.hostname.slice(1,-1):w.hostname,ve.port=w.port,cA(ve,e.proxy,k+"//"+w.hostname+(w.port?":"+w.port:"")+ve.path));let Fe,ye=M7.test(ve.protocol);if(ve.agent=ye?e.httpsAgent:e.httpAgent,h?Fe=W7:e.transport?Fe=e.transport:e.maxRedirects===0?Fe=ye?R7:N7:(e.maxRedirects&&(ve.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ve.beforeRedirects.config=e.beforeRedirect),Fe=ye?D7:U7),e.maxBodyLength>-1?ve.maxBodyLength=e.maxBodyLength:ve.maxBodyLength=1/0,e.insecureHTTPParser&&(ve.insecureHTTPParser=e.insecureHTTPParser),g=Fe.request(ve,function(I){if(g.destroyed)return;let W=[I],C=j.toFiniteNumber(I.headers["content-length"]);if(A||L){let oe=new yw({maxRate:j.toFiniteNumber(L)});A&&oe.on("progress",nA(oe,bc(C,va(xc(A),!0,3)))),W.push(oe)}let S=I,P=I.req||g;if(e.decompress!==!1&&I.headers["content-encoding"])switch((p==="HEAD"||I.statusCode===204)&&delete I.headers["content-encoding"],(I.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":W.push(Xa.createUnzip(eA)),delete I.headers["content-encoding"];break;case"deflate":W.push(new FC),W.push(Xa.createUnzip(eA)),delete I.headers["content-encoding"];break;case"br":tA&&(W.push(Xa.createBrotliDecompress(A7)),delete I.headers["content-encoding"])}S=W.length>1?Ja.pipeline(W,j.noop):W[0];let K={status:I.statusCode,statusText:I.statusMessage,headers:new nr(I.headers),config:e,request:P};if(d==="stream")K.data=S,Yi(n,i,K);else{let oe=[],ge=0;S.on("data",function(Pe){oe.push(Pe),ge+=Pe.length,e.maxContentLength>-1&&ge>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=oe.length===1?oe[0]:Buffer.concat(oe);d!=="arraybuffer"&&(Pe=Pe.toString(f),(!f||f==="utf8")&&(Pe=j.stripBOM(Pe))),K.data=Pe}catch(Pe){return i(ae.from(Pe,null,e,K.request,K))}Yi(n,i,K)})}b.once("abort",oe=>{S.destroyed||(S.emit("error",oe),S.destroy())})}),b.once("abort",B=>{g.close?g.close():g.destroy(B)}),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 B=parseInt(e.timeout,10);if(Number.isNaN(B)){y(new ae("error trying to parse `config.timeout` to int",ae.ERR_BAD_OPTION_VALUE,e,g));return}g.setTimeout(B,function(){if(m)return;let W=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",C=e.transitional||Qa;e.timeoutErrorMessage&&(W=e.timeoutErrorMessage),y(new ae(W,C.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,e,g))})}else g.setTimeout(0);if(j.isStream(o)){let B=!1,I=!1;o.on("end",()=>{B=!0}),o.once("error",W=>{I=!0,g.destroy(W)}),o.on("close",()=>{!B&&!I&&y(new An("Request stream has been aborted",e,g))}),o.pipe(g)}else o&&g.write(o),g.end()})}});var dA,pA=E(()=>{Ii();dA=Et.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Et.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Et.origin),Et.navigator&&/(msie|trident)/i.test(Et.navigator.userAgent)):()=>!0});var fA,mA=E(()=>{Wt();Ii();fA=Et.hasStandardBrowserEnv?{write(t,e,r,n,i,a,o){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}`),a===!0&&s.push("secure"),j.isString(o)&&s.push(`SameSite=${o}`),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 Ei(t,e){e=e||{};let r={};function n(u,l,d,f){return j.isPlainObject(u)&&j.isPlainObject(l)?j.merge.call({caseless:f},u,l):j.isPlainObject(l)?j.merge({},l):j.isArray(l)?l.slice():l}function i(u,l,d,f){if(j.isUndefined(l)){if(!j.isUndefined(u))return n(void 0,u,d,f)}else return n(u,l,d,f)}function a(u,l){if(!j.isUndefined(l))return n(void 0,l)}function o(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:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,l,d)=>i(hA(u),hA(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,f=d(t[l],e[l],l);j.isUndefined(f)&&d!==s||(r[l]=f)}),r}var hA,eh=E(()=>{"use strict";Wt();Qi();hA=t=>t instanceof nr?{...t}:t});var th,$w=E(()=>{Ii();Wt();pA();mA();Bm();eh();Qi();Zm();th=t=>{let e=Ei({},t),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=e;if(e.headers=o=nr.from(o),e.url=Lo(Vo(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),j.isFormData(r)){if(Et.hasStandardBrowserEnv||Et.hasStandardBrowserWebWorkerEnv)o.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())&&o.set(l,d)})}}if(Et.hasStandardBrowserEnv&&(n&&j.isFunction(n)&&(n=n(e)),n||n!==!1&&dA(e.url))){let c=i&&a&&fA.read(a);c&&o.set(i,c)}return e}});var B7,gA,vA=E(()=>{Wt();Wm();Ml();Cn();Fo();mw();Ii();Qi();Xm();$w();B7=typeof XMLHttpRequest<"u",gA=B7&&function(t){return new Promise(function(r,n){let i=th(t),a=i.data,o=nr.from(i.headers).normalize(),{responseType:s,onUploadProgress:c,onDownloadProgress:u}=i,l,d,f,p,m;function v(){p&&p(),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=nr.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};Yi(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(_){let x=_&&_.message?_.message:"Network Error",w=new ae(x,ae.ERR_NETWORK,t,g);w.event=_||null,n(w),g=null},g.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",x=i.transitional||Qa;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),n(new ae(_,x.clarifyTimeoutError?ae.ETIMEDOUT:ae.ECONNABORTED,t,g)),g=null},a===void 0&&o.setContentType(null),"setRequestHeader"in g&&j.forEach(o.toJSON(),function(_,x){g.setRequestHeader(x,_)}),j.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),s&&s!=="json"&&(g.responseType=i.responseType),u&&([f,m]=va(u,!0),g.addEventListener("progress",f)),c&&g.upload&&([d,p]=va(c),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(l=y=>{g&&(n(!y||y.type?new An(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 b=Kl(i.url);if(b&&Et.protocols.indexOf(b)===-1){n(new ae("Unsupported protocol "+b+":",ae.ERR_BAD_REQUEST,t));return}g.send(a||null)})}});var K7,yA,_A=E(()=>{Fo();Cn();Wt();K7=(t,e)=>{let{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i,a=function(u){if(!i){i=!0,s();let l=u instanceof Error?u:this.reason;n.abort(l instanceof ae?l:new An(l instanceof Error?l.message:l))}},o=e&&setTimeout(()=>{o=null,a(new ae(`timeout of ${e}ms exceeded`,ae.ETIMEDOUT))},e),s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),t=null)};t.forEach(u=>u.addEventListener("abort",a));let{signal:c}=n;return c.unsubscribe=()=>j.asap(s),c}},yA=K7});var H7,G7,Q7,Iw,bA=E(()=>{H7=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},G7=async function*(t,e){for await(let r of Q7(t))yield*H7(r,e)},Q7=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()}},Iw=(t,e,r,n)=>{let i=G7(t,e),a=0,o,s=c=>{o||(o=!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 f=a+=d;r(f)}c.enqueue(new Uint8Array(l))}catch(u){throw s(u),u}},cancel(c){return s(c),i.return()}},{highWaterMark:2})}});var xA,rh,Y7,wA,kA,SA,J7,X7,Ew,HOe,$A=E(()=>{Ii();Wt();Cn();_A();bA();Qi();Xm();$w();Wm();xA=64*1024,{isFunction:rh}=j,Y7=(({Request:t,Response:e})=>({Request:t,Response:e}))(j.global),{ReadableStream:wA,TextEncoder:kA}=j.global,SA=(t,...e)=>{try{return!!t(...e)}catch{return!1}},J7=t=>{t=j.merge.call({skipUndefined:!0},Y7,t);let{fetch:e,Request:r,Response:n}=t,i=e?rh(e):typeof fetch=="function",a=rh(r),o=rh(n);if(!i)return!1;let s=i&&rh(wA),c=i&&(typeof kA=="function"?(m=>v=>m.encode(v))(new kA):async m=>new Uint8Array(await new r(m).arrayBuffer())),u=a&&s&&SA(()=>{let m=!1,v=new wA,g=new r(Et.origin,{body:v,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return v.cancel(),m&&!g}),l=o&&s&&SA(()=>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 f=async m=>{if(m==null)return 0;if(j.isBlob(m))return m.size;if(j.isSpecCompliantForm(m))return(await new r(Et.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},p=async(m,v)=>{let g=j.toFiniteNumber(m.getContentLength());return g??f(v)};return async m=>{let{url:v,method:g,data:h,signal:b,cancelToken:y,timeout:_,onDownloadProgress:x,onUploadProgress:w,responseType:k,headers:$,withCredentials:T="same-origin",fetchOptions:A}=th(m),z=e||fetch;k=k?(k+"").toLowerCase():"text";let M=yA([b,y&&y.toAbortSignal()],_),L=null,R=M&&M.unsubscribe&&(()=>{M.unsubscribe()}),te;try{if(w&&u&&g!=="get"&&g!=="head"&&(te=await p($,h))!==0){let I=new r(v,{method:"POST",body:h,duplex:"half"}),W;if(j.isFormData(h)&&(W=I.headers.get("content-type"))&&$.setContentType(W),I.body){let[C,S]=bc(te,va(xc(w)));h=Iw(I.body,xA,C,S)}}j.isString(T)||(T=T?"include":"omit");let G=a&&"credentials"in r.prototype,ve={...A,signal:M,method:g.toUpperCase(),headers:$.normalize().toJSON(),body:h,duplex:"half",credentials:G?T:void 0};L=a&&new r(v,ve);let Fe=await(a?z(L,A):z(v,ve)),ye=l&&(k==="stream"||k==="response");if(l&&(x||ye&&R)){let I={};["status","statusText","headers"].forEach(P=>{I[P]=Fe[P]});let W=j.toFiniteNumber(Fe.headers.get("content-length")),[C,S]=x&&bc(W,va(xc(x),!0))||[];Fe=new n(Iw(Fe.body,xA,C,()=>{S&&S(),R&&R()}),I)}k=k||"text";let B=await d[j.findKey(d,k)||"text"](Fe,m);return!ye&&R&&R(),await new Promise((I,W)=>{Yi(I,W,{data:B,headers:nr.from(Fe.headers),status:Fe.status,statusText:Fe.statusText,config:m,request:L})})}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,L,G&&G.response),{cause:G.cause||G}):ae.from(G,G&&G.code,m,L,G&&G.response)}}},X7=new Map,Ew=t=>{let e=t&&t.env||{},{fetch:r,Request:n,Response:i}=e,a=[n,i,r],o=a.length,s=o,c,u,l=X7;for(;s--;)c=a[s],u=l.get(c),u===void 0&&l.set(c,u=s?new Map:J7(e)),l=u;return u},HOe=Ew()});function rY(t,e){t=j.isArray(t)?t:[t];let{length:r}=t,n,i,a={};for(let o=0;o<r;o++){n=t[o];let s;if(i=n,!tY(n)&&(i=Pw[(s=String(n)).toLowerCase()],i===void 0))throw new ae(`Unknown adapter '${s}'`);if(i&&(j.isFunction(i)||(i=i.get(e))))break;a[s||"#"+o]=i}if(!i){let o=Object.entries(a).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build")),s=r?o.length>1?`since :
37
+ `+o.map(IA).join(`
38
+ `):" "+IA(o[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}var Pw,IA,tY,nh,Tw=E(()=>{Wt();lA();vA();$A();Cn();Pw={http:uA,xhr:gA,fetch:{get:Ew}};j.forEach(Pw,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});IA=t=>`- ${t}`,tY=t=>j.isFunction(t)||t===null||t===!1;nh={getAdapter:rY,adapters:Pw}});function zw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new An(null,t)}function ih(t){return zw(t),t.headers=nr.from(t.headers),t.data=Zl.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),nh.getAdapter(t.adapter||hc.adapter,t)(t).then(function(n){return zw(t),n.data=Zl.call(t,t.transformResponse,n),n.headers=nr.from(n.headers),n},function(n){return Ll(n)||(zw(t),n&&n.response&&(n.response.data=Zl.call(t,t.transformResponse,n.response),n.response.headers=nr.from(n.response.headers))),Promise.reject(n)})}var EA=E(()=>{"use strict";mC();Kx();Fm();Fo();Qi();Tw()});function nY(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 a=n[i],o=e[a];if(o){let s=t[a],c=s===void 0||o(s,a,t);if(c!==!0)throw new ae("option "+a+" must be "+c,ae.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ae("Unknown option "+a,ae.ERR_BAD_OPTION)}}var ah,PA,Gl,TA=E(()=>{"use strict";Ym();Cn();ah={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ah[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});PA={};ah.transitional=function(e,r,n){function i(a,o){return"[Axios v"+Ho+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(e===!1)throw new ae(i(o," has been removed"+(r?" in "+r:"")),ae.ERR_DEPRECATED);return r&&!PA[o]&&(PA[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,o,s):!0}};ah.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};Gl={assertOptions:nY,validators:ah}});var ti,wc,Ql,zA=E(()=>{"use strict";Wt();Zm();tC();EA();eh();Bm();TA();Qi();Ml();ti=Gl.validators,wc=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Dx,response:new Dx}}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 a=(()=>{if(!i.stack)return"";let o=i.stack.indexOf(`
39
+ `);return o===-1?"":i.stack.slice(o+1)})();try{if(!n.stack)n.stack=a;else if(a){let o=a.indexOf(`
40
+ `),s=o===-1?-1:a.indexOf(`
41
+ `,o+1),c=s===-1?"":a.slice(s+1);String(n.stack).endsWith(c)||(n.stack+=`
42
+ `+a)}}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Ei(this.defaults,r);let{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&Gl.assertOptions(n,{silentJSONParsing:ti.transitional(ti.boolean),forcedJSONParsing:ti.transitional(ti.boolean),clarifyTimeoutError:ti.transitional(ti.boolean),legacyInterceptorReqResOrdering:ti.transitional(ti.boolean)},!1),i!=null&&(j.isFunction(i)?r.paramsSerializer={serialize:i}:Gl.assertOptions(i,{encode:ti.function,serialize:ti.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Gl.assertOptions(r,{baseUrl:ti.spelling("baseURL"),withXsrfToken:ti.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=a&&j.merge(a.common,a[r.method]);a&&j.forEach(["delete","get","head","post","put","patch","common"],m=>{delete a[m]}),r.headers=nr.concat(o,a);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||Qa;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,f;if(!c){let m=[ih.bind(this),void 0];for(m.unshift(...s),m.push(...u),f=m.length,l=Promise.resolve(r);d<f;)l=l.then(m[d++],m[d++]);return l}f=s.length;let p=r;for(;d<f;){let m=s[d++],v=s[d++];try{p=m(p)}catch(g){v.call(this,g);break}}try{l=ih.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,f=u.length;d<f;)l=l.then(u[d++],u[d++]);return l}getUri(e){e=Ei(this.defaults,e);let r=Vo(e.baseURL,e.url,e.allowAbsoluteUrls);return Lo(r,e.params,e.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(e){wc.prototype[e]=function(r,n){return this.request(Ei(n||{},{method:e,url:r,data:(n||{}).data}))}});j.forEach(["post","put","patch"],function(e){function r(n){return function(a,o,s){return this.request(Ei(s||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}wc.prototype[e]=r(),wc.prototype[e+"Form"]=r(!0)});Ql=wc});var Ow,OA,jA=E(()=>{"use strict";Fo();Ow=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});let n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a,o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},e(function(a,o,s){n.reason||(n.reason=new An(a,o,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}}},OA=Ow});function jw(t){return function(r){return t.apply(null,r)}}var NA=E(()=>{"use strict"});function Nw(t){return j.isObject(t)&&t.isAxiosError===!0}var RA=E(()=>{"use strict";Wt()});var Rw,CA,AA=E(()=>{Rw={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(Rw).forEach(([t,e])=>{Rw[e]=t});CA=Rw});function UA(t){let e=new Ql(t),r=zl(Ql.prototype.request,e);return j.extend(r,Ql.prototype,e,{allOwnKeys:!0}),j.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return UA(Ei(t,i))},r}var hr,oh,DA=E(()=>{"use strict";Wt();px();zA();eh();Fm();Vx();Fo();jA();Kx();Ym();Dl();Cn();NA();RA();Qi();Tw();AA();hr=UA(hc);hr.Axios=Ql;hr.CanceledError=An;hr.CancelToken=OA;hr.isCancel=Ll;hr.VERSION=Ho;hr.toFormData=Ga;hr.AxiosError=ae;hr.Cancel=hr.CanceledError;hr.all=function(e){return Promise.all(e)};hr.spread=jw;hr.isAxiosError=Nw;hr.mergeConfig=Ei;hr.AxiosHeaders=nr;hr.formToJSON=t=>Lm(j.isHTMLForm(t)?new FormData(t):t);hr.getAdapter=nh.getAdapter;hr.HttpStatusCode=CA;hr.default=hr;oh=hr});var Wje,Bje,Kje,Hje,Gje,Qje,Yje,Jje,Xje,e1e,t1e,r1e,n1e,i1e,a1e,o1e,MA=E(()=>{DA();({Axios:Wje,AxiosError:Bje,CanceledError:Kje,isCancel:Hje,CancelToken:Gje,VERSION:Qje,all:Yje,Cancel:Jje,isAxiosError:Xje,spread:e1e,toFormData:t1e,AxiosHeaders:r1e,HttpStatusCode:n1e,formToJSON:i1e,getAdapter:a1e,mergeConfig:o1e}=oh)});function N(t,e,r){function n(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,c);let u=o.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let f=l[d];f in s||(s[f]=u[f].bind(s))}}let i=r?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:t});function o(s){var c;let u=r?.Parent?new a:this;n(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}function yr(t){return t&&Object.assign(sh,t),sh}var qA,Ji,Qo,sh,kc=E(()=>{qA=Object.freeze({status:"aborted"});Ji=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Qo=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},sh={}});var J={};Ki(J,{BIGINT_FORMAT_RANGES:()=>Vw,Class:()=>Aw,NUMBER_FORMAT_RANGES:()=>Fw,aborted:()=>no,allowsEval:()=>Mw,assert:()=>cY,assertEqual:()=>iY,assertIs:()=>oY,assertNever:()=>sY,assertNotEqual:()=>aY,assignProp:()=>to,base64ToUint8Array:()=>HA,base64urlToUint8Array:()=>_Y,cached:()=>$c,captureStackTrace:()=>uh,cleanEnum:()=>yY,cleanRegex:()=>Xl,clone:()=>en,cloneDef:()=>lY,createTransparentProxy:()=>gY,defineLazy:()=>Ke,esc:()=>ch,escapeRegex:()=>ri,extend:()=>VA,finalizeIssue:()=>_n,floatSafeRemainder:()=>Uw,getElementAtPath:()=>dY,getEnumValues:()=>Jl,getLengthableOrigin:()=>rd,getParsedType:()=>hY,getSizableOrigin:()=>td,hexToUint8Array:()=>xY,isObject:()=>Yo,isPlainObject:()=>ro,issue:()=>Ic,joinValues:()=>ze,jsonStringifyReplacer:()=>Sc,merge:()=>vY,mergeDefs:()=>ya,normalizeParams:()=>ce,nullish:()=>eo,numKeys:()=>mY,objectClone:()=>uY,omit:()=>FA,optionalKeys:()=>Lw,parsedType:()=>Ne,partial:()=>BA,pick:()=>LA,prefixIssues:()=>Un,primitiveTypes:()=>Zw,promiseAllObject:()=>pY,propertyKeyTypes:()=>ed,randomString:()=>fY,required:()=>KA,safeExtend:()=>WA,shallowClone:()=>qw,slugify:()=>Dw,stringifyPrimitive:()=>Oe,uint8ArrayToBase64:()=>GA,uint8ArrayToBase64url:()=>bY,uint8ArrayToHex:()=>wY,unwrapMessage:()=>Yl});function iY(t){return t}function aY(t){return t}function oY(t){}function sY(t){throw new Error("Unexpected value in exhaustive check")}function cY(t){}function Jl(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 Sc(t,e){return typeof e=="bigint"?e.toString():e}function $c(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function eo(t){return t==null}function Xl(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Uw(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 a=r>i?r:i,o=Number.parseInt(t.toFixed(a).replace(".","")),s=Number.parseInt(e.toFixed(a).replace(".",""));return o%s/10**a}function Ke(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==ZA)return n===void 0&&(n=ZA,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function uY(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function to(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ya(...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 ya(t._zod.def)}function dY(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function pY(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let a=0;a<e.length;a++)i[e[a]]=n[a];return i})}function fY(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function ch(t){return JSON.stringify(t)}function Dw(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Yo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function ro(t){if(Yo(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Yo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function qw(t){return ro(t)?{...t}:Array.isArray(t)?[...t]:t}function mY(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function ri(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function en(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 gY(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,a){return e??(e=t()),Reflect.set(e,n,i,a)},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 Lw(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function LA(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 a=ya(t._zod.def,{get shape(){let o={};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(o[s]=r.shape[s])}return to(this,"shape",o),o},checks:[]});return en(t,a)}function FA(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 a=ya(t._zod.def,{get shape(){let o={...t._zod.def.shape};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete o[s]}return to(this,"shape",o),o},checks:[]});return en(t,a)}function VA(t,e){if(!ro(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let a=t._zod.def.shape;for(let o in e)if(Object.getOwnPropertyDescriptor(a,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=ya(t._zod.def,{get shape(){let a={...t._zod.def.shape,...e};return to(this,"shape",a),a}});return en(t,i)}function WA(t,e){if(!ro(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=ya(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return to(this,"shape",n),n}});return en(t,r)}function vY(t,e){let r=ya(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return to(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:[]});return en(t,r)}function BA(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 o=ya(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 to(this,"shape",c),c},checks:[]});return en(e,o)}function KA(t,e,r){let n=ya(e._zod.def,{get shape(){let i=e._zod.def.shape,a={...i};if(r)for(let o in r){if(!(o in a))throw new Error(`Unrecognized key: "${o}"`);r[o]&&(a[o]=new t({type:"nonoptional",innerType:i[o]}))}else for(let o in i)a[o]=new t({type:"nonoptional",innerType:i[o]});return to(this,"shape",a),a}});return en(e,n)}function no(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 Un(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Yl(t){return typeof t=="string"?t:t?.message}function _n(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=Yl(t.inst?._zod.def?.error?.(t))??Yl(e?.error?.(t))??Yl(r.customError?.(t))??Yl(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function td(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function rd(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 Ic(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function yY(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function HA(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 GA(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function _Y(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return HA(e+r)}function bY(t){return GA(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 wY(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var ZA,uh,Mw,hY,ed,Zw,Fw,Vw,Aw,we=E(()=>{ZA=Symbol("evaluating");uh="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};Mw=$c(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});hY=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}`)}},ed=new Set(["string","number","symbol"]),Zw=new Set(["string","number","bigint","boolean","symbol","undefined"]);Fw={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]},Vw={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Aw=class{constructor(...e){}}});function dh(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 ph(t,e=r=>r.message){let r={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(o=>n({issues:o}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)r._errors.push(e(a));else{let o=r,s=0;for(;s<a.path.length;){let c=a.path[s];s===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(e(a))):o[c]=o[c]||{_errors:[]},o=o[c],s++}}};return n(t),r}var QA,lh,nd,Ww=E(()=>{kc();we();QA=(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,Sc,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},lh=N("$ZodError",QA),nd=N("$ZodError",QA,{Parent:Error})});var id,ad,od,sd,cd,Ec,ud,ld,YA,JA,XA,eU,tU,rU,nU,iU,Bw=E(()=>{kc();Ww();we();id=t=>(e,r,n,i)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new Ji;if(o.issues.length){let s=new(i?.Err??t)(o.issues.map(c=>_n(c,a,yr())));throw uh(s,i?.callee),s}return o.value},ad=id(nd),od=t=>async(e,r,n,i)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let s=new(i?.Err??t)(o.issues.map(c=>_n(c,a,yr())));throw uh(s,i?.callee),s}return o.value},sd=od(nd),cd=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Ji;return a.issues.length?{success:!1,error:new(t??lh)(a.issues.map(o=>_n(o,i,yr())))}:{success:!0,data:a.value}},Ec=cd(nd),ud=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new t(a.issues.map(o=>_n(o,i,yr())))}:{success:!0,data:a.value}},ld=ud(nd),YA=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return id(t)(e,r,i)},JA=t=>(e,r,n)=>id(t)(e,r,n),XA=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return od(t)(e,r,i)},eU=t=>async(e,r,n)=>od(t)(e,r,n),tU=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return cd(t)(e,r,i)},rU=t=>(e,r,n)=>cd(t)(e,r,n),nU=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ud(t)(e,r,i)},iU=t=>async(e,r,n)=>ud(t)(e,r,n)});var ni={};Ki(ni,{base64:()=>c0,base64url:()=>fh,bigint:()=>m0,boolean:()=>g0,browserEmail:()=>OY,cidrv4:()=>o0,cidrv6:()=>s0,cuid:()=>Kw,cuid2:()=>Hw,date:()=>l0,datetime:()=>p0,domain:()=>RY,duration:()=>Xw,e164:()=>u0,email:()=>t0,emoji:()=>r0,extendedDuration:()=>SY,guid:()=>e0,hex:()=>CY,hostname:()=>NY,html5Email:()=>PY,idnEmail:()=>zY,integer:()=>h0,ipv4:()=>n0,ipv6:()=>i0,ksuid:()=>Yw,lowercase:()=>_0,mac:()=>a0,md5_base64:()=>UY,md5_base64url:()=>DY,md5_hex:()=>AY,nanoid:()=>Jw,null:()=>v0,number:()=>mh,rfc5322Email:()=>TY,sha1_base64:()=>qY,sha1_base64url:()=>ZY,sha1_hex:()=>MY,sha256_base64:()=>FY,sha256_base64url:()=>VY,sha256_hex:()=>LY,sha384_base64:()=>BY,sha384_base64url:()=>KY,sha384_hex:()=>WY,sha512_base64:()=>GY,sha512_base64url:()=>QY,sha512_hex:()=>HY,string:()=>f0,time:()=>d0,ulid:()=>Gw,undefined:()=>y0,unicodeEmail:()=>aU,uppercase:()=>b0,uuid:()=>Jo,uuid4:()=>$Y,uuid6:()=>IY,uuid7:()=>EY,xid:()=>Qw});function r0(){return new RegExp(jY,"u")}function sU(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 d0(t){return new RegExp(`^${sU(t)}$`)}function p0(t){let e=sU({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(`^${oU}T(?:${n})$`)}function dd(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function pd(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var Kw,Hw,Gw,Qw,Yw,Jw,Xw,SY,e0,Jo,$Y,IY,EY,t0,PY,TY,aU,zY,OY,jY,n0,i0,a0,o0,s0,c0,fh,NY,RY,u0,oU,l0,f0,m0,h0,mh,g0,v0,y0,_0,b0,CY,AY,UY,DY,MY,qY,ZY,LY,FY,VY,WY,BY,KY,HY,GY,QY,hh=E(()=>{we();Kw=/^[cC][^\s-]{8,}$/,Hw=/^[0-9a-z]+$/,Gw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Qw=/^[0-9a-vA-V]{20}$/,Yw=/^[A-Za-z0-9]{27}$/,Jw=/^[a-zA-Z0-9_-]{21}$/,Xw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,SY=/^[-+]?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)?)??$/,e0=/^([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})$/,Jo=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)$/,$Y=Jo(4),IY=Jo(6),EY=Jo(7),t0=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,PY=/^[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])?)*$/,TY=/^(([^<>()\[\]\\.,;:\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,}))$/,aU=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,zY=aU,OY=/^[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])?)*$/,jY="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";n0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,i0=/^(([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}|:))$/,a0=t=>{let e=ri(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},o0=/^((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])$/,s0=/^(([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])$/,c0=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fh=/^[A-Za-z0-9_-]*$/,NY=/^(?=.{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])?)*\.?$/,RY=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,u0=/^\+[1-9]\d{6,14}$/,oU="(?:(?:\\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])))",l0=new RegExp(`^${oU}$`);f0=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},m0=/^-?\d+n?$/,h0=/^-?\d+$/,mh=/^-?\d+(?:\.\d+)?$/,g0=/^(?:true|false)$/i,v0=/^null$/i,y0=/^undefined$/i,_0=/^[^A-Z]*$/,b0=/^[^a-z]*$/,CY=/^[0-9a-fA-F]*$/;AY=/^[0-9a-fA-F]{32}$/,UY=dd(22,"=="),DY=pd(22),MY=/^[0-9a-fA-F]{40}$/,qY=dd(27,"="),ZY=pd(27),LY=/^[0-9a-fA-F]{64}$/,FY=dd(43,"="),VY=pd(43),WY=/^[0-9a-fA-F]{96}$/,BY=dd(64,""),KY=pd(64),HY=/^[0-9a-fA-F]{128}$/,GY=dd(86,"=="),QY=pd(86)});function cU(t,e,r){t.issues.length&&e.issues.push(...Un(r,t.issues))}var Ut,uU,x0,w0,lU,dU,pU,fU,mU,hU,gU,vU,yU,fd,_U,bU,xU,wU,kU,SU,$U,IU,EU,gh=E(()=>{kc();hh();we();Ut=N("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),uU={number:"number",bigint:"bigint",object:"date"},x0=N("$ZodCheckLessThan",(t,e)=>{Ut.init(t,e);let r=uU[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<a&&(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})}}),w0=N("$ZodCheckGreaterThan",(t,e)=>{Ut.init(t,e);let r=uU[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>a&&(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})}}),lU=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):Uw(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,a]=Fw[e.format];t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,s.minimum=i,s.maximum=a,r&&(s.pattern=h0)}),t._zod.check=o=>{let s=o.value;if(r){if(!Number.isInteger(s)){o.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?o.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}):o.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&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inclusive:!0,inst:t,continue:!e.abort})}}),pU=N("$ZodCheckBigIntFormat",(t,e)=>{Ut.init(t,e);let[r,n]=Vw[e.format];t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,a.minimum=r,a.maximum=n}),t._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}}),fU=N("$ZodCheckMaxSize",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!eo(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:td(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),mU=N("$ZodCheckMinSize",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!eo(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:td(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),hU=N("$ZodCheckSizeEquals",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!eo(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,a=i.size;if(a===e.size)return;let o=a>e.size;n.issues.push({origin:td(i),...o?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),gU=N("$ZodCheckMaxLength",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!eo(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 o=rd(i);n.issues.push({origin:o,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!eo(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 o=rd(i);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),yU=N("$ZodCheckLengthEquals",(t,e)=>{var r;Ut.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!eo(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,a=i.length;if(a===e.length)return;let o=rd(i),s=a>e.length;n.issues.push({origin:o,...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})}}),fd=N("$ZodCheckStringFormat",(t,e)=>{var r,n;Ut.init(t,e),t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.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=()=>{})}),_U=N("$ZodCheckRegex",(t,e)=>{fd.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})}}),bU=N("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=_0),fd.init(t,e)}),xU=N("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=b0),fd.init(t,e)}),wU=N("$ZodCheckIncludes",(t,e)=>{Ut.init(t,e);let r=ri(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let a=i._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),kU=N("$ZodCheckStartsWith",(t,e)=>{Ut.init(t,e);let r=new RegExp(`^${ri(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})}}),SU=N("$ZodCheckEndsWith",(t,e)=>{Ut.init(t,e);let r=new RegExp(`.*${ri(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})}});$U=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=>cU(i,r,e.property));cU(n,r,e.property)}}),IU=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})}}),EU=N("$ZodCheckOverwrite",(t,e)=>{Ut.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}})});var vh,k0=E(()=>{vh=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(`
43
+ `).filter(o=>o),i=Math.min(...n.map(o=>o.length-o.trimStart().length)),a=n.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(let o of a)this.content.push(o)}compile(){let e=Function,r=this?.args,i=[...(this?.content??[""]).map(a=>` ${a}`)];return new e(...r,i.join(`
44
+ `))}}});var TU,S0=E(()=>{TU={major:4,minor:3,patch:6}});function ZU(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function YY(t){if(!fh.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return ZU(r)}function JY(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 zU(t,e,r){t.issues.length&&e.issues.push(...Un(r,t.issues)),e.value[r]=t.value}function wh(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...Un(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function LU(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=Lw(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function FU(t,e,r,n,i,a){let o=[],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"){o.push(d);continue}let f=c.run({value:e[d],issues:[]},n);f instanceof Promise?t.push(f.then(p=>wh(p,r,d,e,l))):wh(f,r,d,e,l)}return o.length&&r.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:a}),t.length?Promise.all(t).then(()=>r):r}function OU(t,e,r,n){for(let a of t)if(a.issues.length===0)return e.value=a.value,e;let i=t.filter(a=>!no(a));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(a=>a.issues.map(o=>_n(o,n,yr())))}),e)}function jU(t,e,r,n){let i=t.filter(a=>a.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(a=>a.issues.map(o=>_n(o,n,yr())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}function $0(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(ro(t)&&ro(e)){let r=Object.keys(e),n=Object.keys(t).filter(a=>r.indexOf(a)!==-1),i={...t,...e};for(let a of n){let o=$0(t[a],e[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i[a]=o.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],a=e[n],o=$0(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function NU(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 a=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(a.length&&i&&t.issues.push({...i,keys:a}),no(t))return t;let o=$0(e.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}function yh(t,e,r){t.issues.length&&e.issues.push(...Un(r,t.issues)),e.value[r]=t.value}function RU(t,e,r,n,i,a,o){t.issues.length&&(ed.has(typeof n)?r.issues.push(...Un(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:a,issues:t.issues.map(s=>_n(s,o,yr()))})),e.issues.length&&(ed.has(typeof n)?r.issues.push(...Un(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:e.issues.map(s=>_n(s,o,yr()))})),r.value.set(t.value,e.value)}function CU(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function AU(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}function UU(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function DU(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 _h(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}function bh(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(a=>xh(t,a,e.out,r)):xh(t,i,e.out,r)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(a=>xh(t,a,e.in,r)):xh(t,i,e.in,r)}}function xh(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}function MU(t){return t.value=Object.freeze(t.value),t}function qU(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(Ic(i))}}var qe,Xo,jt,I0,E0,P0,T0,z0,O0,j0,N0,R0,C0,A0,U0,D0,M0,q0,Z0,L0,F0,V0,W0,B0,K0,H0,G0,Q0,kh,Y0,md,Sh,J0,X0,ek,tk,rk,nk,ik,ak,ok,sk,VU,WU,hd,ck,uk,lk,$h,dk,pk,fk,mk,hk,gk,vk,Ih,yk,_k,bk,xk,wk,kk,Sk,$k,Ik,gd,Ek,Pk,Tk,zk,Ok,jk,Nk=E(()=>{gh();kc();k0();Bw();hh();we();S0();we();qe=N("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=TU;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let a of i._zod.onattach)a(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,s,c)=>{let u=no(o),l;for(let d of s){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(u)continue;let f=o.issues.length,p=d._zod.check(o);if(p instanceof Promise&&c?.async===!1)throw new Ji;if(l||p instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await p,o.issues.length!==f&&(u||(u=no(o,f)))});else{if(o.issues.length===f)continue;u||(u=no(o,f))}}return l?l.then(()=>o):o},a=(o,s,c)=>{if(no(o))return o.aborted=!0,o;let u=i(s,n,c);if(u instanceof Promise){if(c.async===!1)throw new Ji;return u.then(l=>t._zod.parse(l,c))}return t._zod.parse(u,c)};t._zod.run=(o,s)=>{if(s.skipChecks)return t._zod.parse(o,s);if(s.direction==="backward"){let u=t._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>a(l,o,s)):a(u,o,s)}let c=t._zod.parse(o,s);if(c instanceof Promise){if(s.async===!1)throw new Ji;return c.then(u=>i(u,n,s))}return i(c,n,s)}}Ke(t,"~standard",()=>({validate:i=>{try{let a=Ec(t,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return ld(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),Xo=N("$ZodString",(t,e)=>{qe.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??f0(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)=>{fd.init(t,e),Xo.init(t,e)}),I0=N("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=e0),jt.init(t,e)}),E0=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=Jo(n))}else e.pattern??(e.pattern=Jo());jt.init(t,e)}),P0=N("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=t0),jt.init(t,e)}),T0=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})}}}),z0=N("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=r0()),jt.init(t,e)}),O0=N("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Jw),jt.init(t,e)}),j0=N("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Kw),jt.init(t,e)}),N0=N("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Hw),jt.init(t,e)}),R0=N("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Gw),jt.init(t,e)}),C0=N("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Qw),jt.init(t,e)}),A0=N("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Yw),jt.init(t,e)}),U0=N("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=p0(e)),jt.init(t,e)}),D0=N("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=l0),jt.init(t,e)}),M0=N("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=d0(e)),jt.init(t,e)}),q0=N("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Xw),jt.init(t,e)}),Z0=N("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=n0),jt.init(t,e),t._zod.bag.format="ipv4"}),L0=N("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=i0),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})}}}),F0=N("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=a0(e.delimiter)),jt.init(t,e),t._zod.bag.format="mac"}),V0=N("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=o0),jt.init(t,e)}),W0=N("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=s0),jt.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,a]=n;if(!a)throw new Error;let o=Number(a);if(`${o}`!==a)throw new Error;if(o<0||o>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})}}});B0=N("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=c0),jt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{ZU(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});K0=N("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=fh),jt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{YY(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),H0=N("$ZodE164",(t,e)=>{e.pattern??(e.pattern=u0),jt.init(t,e)});G0=N("$ZodJWT",(t,e)=>{jt.init(t,e),t._zod.check=r=>{JY(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Q0=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})}}),kh=N("$ZodNumber",(t,e)=>{qe.init(t,e),t._zod.pattern=t._zod.bag.pattern??mh,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 a=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,...a?{received:a}:{}}),r}}),Y0=N("$ZodNumberFormat",(t,e)=>{dU.init(t,e),kh.init(t,e)}),md=N("$ZodBoolean",(t,e)=>{qe.init(t,e),t._zod.pattern=g0,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}}),Sh=N("$ZodBigInt",(t,e)=>{qe.init(t,e),t._zod.pattern=m0,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}}),J0=N("$ZodBigIntFormat",(t,e)=>{pU.init(t,e),Sh.init(t,e)}),X0=N("$ZodSymbol",(t,e)=>{qe.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}}),ek=N("$ZodUndefined",(t,e)=>{qe.init(t,e),t._zod.pattern=y0,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}}),tk=N("$ZodNull",(t,e)=>{qe.init(t,e),t._zod.pattern=v0,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}}),rk=N("$ZodAny",(t,e)=>{qe.init(t,e),t._zod.parse=r=>r}),nk=N("$ZodUnknown",(t,e)=>{qe.init(t,e),t._zod.parse=r=>r}),ik=N("$ZodNever",(t,e)=>{qe.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),ak=N("$ZodVoid",(t,e)=>{qe.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}}),ok=N("$ZodDate",(t,e)=>{qe.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:t}),r}});sk=N("$ZodArray",(t,e)=>{qe.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 a=[];for(let o=0;o<i.length;o++){let s=i[o],c=e.element._zod.run({value:s,issues:[]},n);c instanceof Promise?a.push(c.then(u=>zU(u,r,o))):zU(c,r,o)}return a.length?Promise.all(a).then(()=>r):r}});VU=N("$ZodObject",(t,e)=>{if(qe.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=$c(()=>LU(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=Yo,a=e.catchall,o;t._zod.parse=(s,c)=>{o??(o=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=o.shape;for(let f of o.keys){let p=d[f],m=p._zod.optout==="optional",v=p._zod.run({value:u[f],issues:[]},c);v instanceof Promise?l.push(v.then(g=>wh(g,s,f,u,m))):wh(v,s,f,u,m)}return a?FU(l,u,s,c,n.value,t):l.length?Promise.all(l).then(()=>s):s}}),WU=N("$ZodObjectJIT",(t,e)=>{VU.init(t,e);let r=t._zod.parse,n=$c(()=>LU(e)),i=f=>{let p=new vh(["shape","payload","ctx"]),m=n.value,v=y=>{let _=ch(y);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};p.write("const input = payload.value;");let g=Object.create(null),h=0;for(let y of m.keys)g[y]=`key_${h++}`;p.write("const newResult = {};");for(let y of m.keys){let _=g[y],x=ch(y),k=f[y]?._zod?.optout==="optional";p.write(`const ${_} = ${v(y)};`),k?p.write(`
45
+ if (${_}.issues.length) {
46
+ if (${x} in input) {
47
+ payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
48
+ ...iss,
49
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
50
+ })));
51
+ }
52
+ }
53
+
54
+ if (${_}.value === undefined) {
55
+ if (${x} in input) {
56
+ newResult[${x}] = undefined;
57
+ }
58
+ } else {
59
+ newResult[${x}] = ${_}.value;
60
+ }
61
+
62
+ `):p.write(`
63
+ if (${_}.issues.length) {
64
+ payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
65
+ ...iss,
66
+ path: iss.path ? [${x}, ...iss.path] : [${x}]
67
+ })));
68
+ }
69
+
70
+ if (${_}.value === undefined) {
71
+ if (${x} in input) {
72
+ newResult[${x}] = undefined;
73
+ }
74
+ } else {
75
+ newResult[${x}] = ${_}.value;
76
+ }
77
+
78
+ `)}p.write("payload.value = newResult;"),p.write("return payload;");let b=p.compile();return(y,_)=>b(f,y,_)},a,o=Yo,s=!sh.jitless,u=s&&Mw.value,l=e.catchall,d;t._zod.parse=(f,p)=>{d??(d=n.value);let m=f.value;return o(m)?s&&u&&p?.async===!1&&p.jitless!==!0?(a||(a=i(e.shape)),f=a(f,p),l?FU([],m,f,p,d,t):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),f)}});hd=N("$ZodUnion",(t,e)=>{qe.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(a=>a._zod.pattern);return new RegExp(`^(${i.map(a=>Xl(a.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,a)=>{if(r)return n(i,a);let o=!1,s=[];for(let c of e.options){let u=c._zod.run({value:i.value,issues:[]},a);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}return o?Promise.all(s).then(c=>OU(c,i,t,a)):OU(s,i,t,a)}});ck=N("$ZodXor",(t,e)=>{hd.init(t,e),e.inclusive=!1;let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,a)=>{if(r)return n(i,a);let o=!1,s=[];for(let c of e.options){let u=c._zod.run({value:i.value,issues:[]},a);u instanceof Promise?(s.push(u),o=!0):s.push(u)}return o?Promise.all(s).then(c=>jU(c,i,t,a)):jU(s,i,t,a)}}),uk=N("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,hd.init(t,e);let r=t._zod.parse;Ke(t._zod,"propValues",()=>{let i={};for(let a of e.options){let o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let[s,c]of Object.entries(o)){i[s]||(i[s]=new Set);for(let u of c)i[s].add(u)}}return i});let n=$c(()=>{let i=e.options,a=new Map;for(let o of i){let s=o._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let c of s){if(a.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,o)}}return a});t._zod.parse=(i,a)=>{let o=i.value;if(!Yo(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:t}),i;let s=n.value.get(o?.[e.discriminator]);return s?s._zod.run(i,a):e.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:o,path:[e.discriminator],inst:t}),i)}}),lk=N("$ZodIntersection",(t,e)=>{qe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,a=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([c,u])=>NU(r,c,u)):NU(r,a,o)}});$h=N("$ZodTuple",(t,e)=>{qe.init(t,e);let r=e.items;t._zod.parse=(n,i)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let o=[],s=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),c=s===-1?0:r.length-s;if(!e.rest){let l=a.length>r.length,d=a.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:a,inst:t,origin:"array"}),n}let u=-1;for(let l of r){if(u++,u>=a.length&&u>=c)continue;let d=l._zod.run({value:a[u],issues:[]},i);d instanceof Promise?o.push(d.then(f=>yh(f,n,u))):yh(d,n,u)}if(e.rest){let l=a.slice(r.length);for(let d of l){u++;let f=e.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?o.push(f.then(p=>yh(p,n,u))):yh(f,n,u)}}return o.length?Promise.all(o).then(()=>n):n}});dk=N("$ZodRecord",(t,e)=>{qe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!ro(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let a=[],o=e.keyType._zod.values;if(o){r.value={};let s=new Set;for(let u of o)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?a.push(l.then(d=>{d.issues.length&&r.issues.push(...Un(u,d.issues)),r.value[u]=d.value})):(l.issues.length&&r.issues.push(...Un(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"&&mh.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=>_n(d,n,yr())),input:s,path:[s],inst:t});continue}let l=e.valueType._zod.run({value:i[s],issues:[]},n);l instanceof Promise?a.push(l.then(d=>{d.issues.length&&r.issues.push(...Un(s,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...Un(s,l.issues)),r.value[c.value]=l.value)}}return a.length?Promise.all(a).then(()=>r):r}}),pk=N("$ZodMap",(t,e)=>{qe.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 a=[];r.value=new Map;for(let[o,s]of i){let c=e.keyType._zod.run({value:o,issues:[]},n),u=e.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||u instanceof Promise?a.push(Promise.all([c,u]).then(([l,d])=>{RU(l,d,r,o,i,t,n)})):RU(c,u,r,o,i,t,n)}return a.length?Promise.all(a).then(()=>r):r}});fk=N("$ZodSet",(t,e)=>{qe.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 a=[];r.value=new Set;for(let o of i){let s=e.valueType._zod.run({value:o,issues:[]},n);s instanceof Promise?a.push(s.then(c=>CU(c,r))):CU(s,r)}return a.length?Promise.all(a).then(()=>r):r}});mk=N("$ZodEnum",(t,e)=>{qe.init(t,e);let r=Jl(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>ed.has(typeof i)).map(i=>typeof i=="string"?ri(i):i.toString()).join("|")})$`),t._zod.parse=(i,a)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r,input:o,inst:t}),i}}),hk=N("$ZodLiteral",(t,e)=>{if(qe.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"?ri(n):n?ri(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:e.values,input:a,inst:t}),n}}),gk=N("$ZodFile",(t,e)=>{qe.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}}),vk=N("$ZodTransform",(t,e)=>{qe.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Qo(t.constructor.name);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 Ji;return r.value=i,r}});Ih=N("$ZodOptional",(t,e)=>{qe.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(`^(${Xl(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(a=>AU(a,r.value)):AU(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),yk=N("$ZodExactOptional",(t,e)=>{Ih.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)}),_k=N("$ZodNullable",(t,e)=>{qe.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(`^(${Xl(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)}),bk=N("$ZodDefault",(t,e)=>{qe.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(a=>UU(a,e)):UU(i,e)}});xk=N("$ZodPrefault",(t,e)=>{qe.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))}),wk=N("$ZodNonOptional",(t,e)=>{qe.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(a=>DU(a,t)):DU(i,t)}});kk=N("$ZodSuccess",(t,e)=>{qe.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Qo("ZodSuccess");let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),Sk=N("$ZodCatch",(t,e)=>{qe.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(a=>(r.value=a.value,a.issues.length&&(r.value=e.catchValue({...r,error:{issues:a.issues.map(o=>_n(o,n,yr()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(a=>_n(a,n,yr()))},input:r.value}),r.issues=[]),r)}}),$k=N("$ZodNaN",(t,e)=>{qe.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)}),Ik=N("$ZodPipe",(t,e)=>{qe.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 a=e.out._zod.run(r,n);return a instanceof Promise?a.then(o=>_h(o,e.in,n)):_h(a,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(a=>_h(a,e.out,n)):_h(i,e.out,n)}});gd=N("$ZodCodec",(t,e)=>{qe.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 a=e.in._zod.run(r,n);return a instanceof Promise?a.then(o=>bh(o,e,n)):bh(a,e,n)}else{let a=e.out._zod.run(r,n);return a instanceof Promise?a.then(o=>bh(o,e,n)):bh(a,e,n)}}});Ek=N("$ZodReadonly",(t,e)=>{qe.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(MU):MU(i)}});Pk=N("$ZodTemplateLiteral",(t,e)=>{qe.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 a=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(a,o))}else if(n===null||Zw.has(typeof n))r.push(ri(`${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)}),Tk=N("$ZodFunction",(t,e)=>(qe.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?ad(t._def.input,n):n,a=Reflect.apply(r,this,i);return t._def.output?ad(t._def.output,a):a}},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 sd(t._def.input,n):n,a=await Reflect.apply(r,this,i);return t._def.output?await sd(t._def.output,a):a}},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 $h({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)),zk=N("$ZodPromise",(t,e)=>{qe.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),Ok=N("$ZodLazy",(t,e)=>{qe.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),qe.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(a=>qU(a,r,n,t));qU(i,r,n,t)}})});var BU=E(()=>{we()});var KU=E(()=>{we()});var HU=E(()=>{we()});var GU=E(()=>{we()});var QU=E(()=>{we()});var YU=E(()=>{we()});var JU=E(()=>{we()});var XU=E(()=>{we()});function Rk(){return{localeError:eJ()}}var eJ,Ck=E(()=>{we();eJ=()=>{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 a=n[i.expected]??i.expected,o=Ne(i.input),s=n[o]??o;return`Invalid input: expected ${a}, 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 a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.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 t4=E(()=>{we()});var r4=E(()=>{we()});var n4=E(()=>{we()});var i4=E(()=>{we()});var a4=E(()=>{we()});var o4=E(()=>{we()});var s4=E(()=>{we()});var c4=E(()=>{we()});var u4=E(()=>{we()});var l4=E(()=>{we()});var d4=E(()=>{we()});var p4=E(()=>{we()});var f4=E(()=>{we()});var Ak=E(()=>{we()});var m4=E(()=>{Ak()});var h4=E(()=>{we()});var g4=E(()=>{we()});var v4=E(()=>{we()});var y4=E(()=>{we()});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()});var E4=E(()=>{we()});var P4=E(()=>{we()});var T4=E(()=>{we()});var z4=E(()=>{we()});var Uk=E(()=>{we()});var O4=E(()=>{Uk()});var j4=E(()=>{we()});var N4=E(()=>{we()});var R4=E(()=>{we()});var C4=E(()=>{we()});var A4=E(()=>{we()});var U4=E(()=>{we()});var Eh=E(()=>{BU();KU();HU();GU();QU();YU();JU();XU();Ck();e4();t4();r4();n4();i4();a4();o4();s4();c4();u4();l4();d4();p4();f4();m4();Ak();h4();g4();v4();y4();_4();b4();x4();w4();k4();S4();$4();I4();E4();P4();T4();z4();O4();Uk();j4();N4();R4();C4();A4();U4()});function qk(){return new Mk}var D4,Mk,tn,vd=E(()=>{Mk=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)}};(D4=globalThis).__zod_globalRegistry??(D4.__zod_globalRegistry=qk());tn=globalThis.__zod_globalRegistry});function Zk(t,e){return new t({type:"string",...ce(e)})}function Ph(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ce(e)})}function yd(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ce(e)})}function Th(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 Oh(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ce(e)})}function jh(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ce(e)})}function _d(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ce(e)})}function Nh(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ce(e)})}function Rh(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ce(e)})}function Ch(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ce(e)})}function Ah(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ce(e)})}function Uh(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ce(e)})}function Dh(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ce(e)})}function Mh(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ce(e)})}function qh(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ce(e)})}function Zh(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ce(e)})}function Lk(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...ce(e)})}function Lh(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ce(e)})}function Fh(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ce(e)})}function Vh(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ce(e)})}function Wh(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ce(e)})}function Bh(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ce(e)})}function Kh(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ce(e)})}function Fk(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ce(e)})}function Vk(t,e){return new t({type:"string",format:"date",check:"string_format",...ce(e)})}function Wk(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ce(e)})}function Bk(t,e){return new t({type:"string",format:"duration",check:"string_format",...ce(e)})}function Kk(t,e){return new t({type:"number",checks:[],...ce(e)})}function Hk(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ce(e)})}function Gk(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...ce(e)})}function Qk(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...ce(e)})}function Yk(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...ce(e)})}function Jk(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...ce(e)})}function Xk(t,e){return new t({type:"boolean",...ce(e)})}function eS(t,e){return new t({type:"bigint",...ce(e)})}function tS(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ce(e)})}function rS(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ce(e)})}function nS(t,e){return new t({type:"symbol",...ce(e)})}function iS(t,e){return new t({type:"undefined",...ce(e)})}function aS(t,e){return new t({type:"null",...ce(e)})}function oS(t){return new t({type:"any"})}function sS(t){return new t({type:"unknown"})}function cS(t,e){return new t({type:"never",...ce(e)})}function uS(t,e){return new t({type:"void",...ce(e)})}function lS(t,e){return new t({type:"date",...ce(e)})}function dS(t,e){return new t({type:"nan",...ce(e)})}function _a(t,e){return new x0({check:"less_than",...ce(e),value:t,inclusive:!1})}function Dn(t,e){return new x0({check:"less_than",...ce(e),value:t,inclusive:!0})}function ba(t,e){return new w0({check:"greater_than",...ce(e),value:t,inclusive:!1})}function rn(t,e){return new w0({check:"greater_than",...ce(e),value:t,inclusive:!0})}function pS(t){return ba(0,t)}function fS(t){return _a(0,t)}function mS(t){return Dn(0,t)}function hS(t){return rn(0,t)}function es(t,e){return new lU({check:"multiple_of",...ce(e),value:t})}function ts(t,e){return new fU({check:"max_size",...ce(e),maximum:t})}function xa(t,e){return new mU({check:"min_size",...ce(e),minimum:t})}function Pc(t,e){return new hU({check:"size_equals",...ce(e),size:t})}function Tc(t,e){return new gU({check:"max_length",...ce(e),maximum:t})}function io(t,e){return new vU({check:"min_length",...ce(e),minimum:t})}function zc(t,e){return new yU({check:"length_equals",...ce(e),length:t})}function bd(t,e){return new _U({check:"string_format",format:"regex",...ce(e),pattern:t})}function xd(t){return new bU({check:"string_format",format:"lowercase",...ce(t)})}function wd(t){return new xU({check:"string_format",format:"uppercase",...ce(t)})}function kd(t,e){return new wU({check:"string_format",format:"includes",...ce(e),includes:t})}function Sd(t,e){return new kU({check:"string_format",format:"starts_with",...ce(e),prefix:t})}function $d(t,e){return new SU({check:"string_format",format:"ends_with",...ce(e),suffix:t})}function gS(t,e,r){return new $U({check:"property",property:t,schema:e,...ce(r)})}function Id(t,e){return new IU({check:"mime_type",mime:t,...ce(e)})}function Xi(t){return new EU({check:"overwrite",tx:t})}function Ed(t){return Xi(e=>e.normalize(t))}function Pd(){return Xi(t=>t.trim())}function Td(){return Xi(t=>t.toLowerCase())}function zd(){return Xi(t=>t.toUpperCase())}function Hh(){return Xi(t=>Dw(t))}function M4(t,e,r){return new t({type:"array",element:e,...ce(r)})}function vS(t,e){return new t({type:"file",...ce(e)})}function yS(t,e,r){let n=ce(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function _S(t,e,r){return new t({type:"custom",check:"custom",fn:e,...ce(r)})}function bS(t){let e=iJ(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(Ic(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(Ic(i))}},t(r.value,r)));return e}function iJ(t,e){let r=new Ut({check:"custom",...ce(e)});return r._zod.check=t,r}function xS(t){let e=new Ut({check:"describe"});return e._zod.onattach=[r=>{let n=tn.get(r)??{};tn.add(r,{...n,description:t})}],e._zod.check=()=>{},e}function wS(t){let e=new Ut({check:"meta"});return e._zod.onattach=[r=>{let n=tn.get(r)??{};tn.add(r,{...n,...t})}],e._zod.check=()=>{},e}function kS(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(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let a=new Set(n),o=new Set(i),s=t.Codec??gd,c=t.Boolean??md,u=t.String??Xo,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),f=new s({type:"pipe",in:l,out:d,transform:((p,m)=>{let v=p;return r.case!=="sensitive"&&(v=v.toLowerCase()),a.has(v)?!0:o.has(v)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:m.value,inst:f,continue:!1}),{})}),reverseTransform:((p,m)=>p===!0?n[0]||"true":i[0]||"false"),error:r.error});return f}function Oc(t,e,r,n={}){let i=ce(n),a={...ce(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:s=>r.test(s),...i};return r instanceof RegExp&&(a.pattern=r),new t(a)}var q4=E(()=>{gh();vd();Nk();we()});function jc(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??tn,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,a=e.seen.get(t);if(a)return a.count++,r.schemaPath.includes(t)&&(a.cycle=r.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,o);let s=t._zod.toJSONSchema?.();if(s)o.schema=s;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,l);else{let f=o.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,f,l)}let d=t._zod.parent;d&&(o.ref||(o.ref=d),Nt(d,e,l),e.seen.get(d).isParent=!0)}let c=e.metadataRegistry.get(t);return c&&Object.assign(o.schema,c),e.io==="input"&&nn(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function Nc(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 o of t.seen.entries()){let s=t.metadataRegistry.get(o[0])?.id;if(s){let c=n.get(s);if(c&&c!==o[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,o[0])}}let i=o=>{let s=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let d=t.external.registry.get(o[0])?.id,f=t.external.uri??(m=>m);if(d)return{ref:f(d)};let p=o[1].defId??o[1].schema.id??`schema${t.counter++}`;return o[1].defId=p,{defId:p,ref:`${f("__shared")}#/${s}/${p}`}}if(o[1]===r)return{ref:"#"};let u=`#/${s}/`,l=o[1].schema.id??`__schema${t.counter++}`;return{defId:l,ref:u+l}},a=o=>{if(o[1].schema.$ref)return;let s=o[1],{ref:c,defId:u}=i(o);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 o of t.seen.entries()){let s=o[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
79
+
80
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let o of t.seen.entries()){let s=o[1];if(e===o[0]){a(o);continue}if(t.external){let u=t.external.registry.get(o[0])?.id;if(e!==o[0]&&u){a(o);continue}}if(t.metadataRegistry.get(o[0])?.id){a(o);continue}if(s.cycle){a(o);continue}if(s.count>1&&t.reused==="ref"){a(o);continue}}}function Rc(t,e){let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=o=>{let s=t.seen.get(o);if(s.ref===null)return;let c=s.def??s.schema,u={...c},l=s.ref;if(s.ref=null,l){n(l);let f=t.seen.get(l),p=f.schema;if(p.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Object.assign(c,p),Object.assign(c,u),o._zod.parent===l)for(let v in c)v==="$ref"||v==="allOf"||v in u||delete c[v];if(p.$ref&&f.def)for(let v in c)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(c[v])===JSON.stringify(f.def[v])&&delete c[v]}let d=o._zod.parent;if(d&&d!==l){n(d);let f=t.seen.get(d);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let p in c)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(c[p])===JSON.stringify(f.def[p])&&delete c[p]}t.override({zodSchema:o,jsonSchema:c,path:s.path??[]})};for(let o of[...t.seen.entries()].reverse())n(o[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 o=t.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(o)}Object.assign(i,r.def??r.schema);let a=t.external?.defs??{};for(let o of t.seen.entries()){let s=o[1];s.def&&s.defId&&(a[s.defId]=s.def)}t.external||Object.keys(a).length>0&&(t.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{let o=JSON.parse(JSON.stringify(i));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:Od(e,"input",t.processors),output:Od(e,"output",t.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function nn(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 nn(n.element,r);if(n.type==="set")return nn(n.valueType,r);if(n.type==="lazy")return nn(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 nn(n.innerType,r);if(n.type==="intersection")return nn(n.left,r)||nn(n.right,r);if(n.type==="record"||n.type==="map")return nn(n.keyType,r)||nn(n.valueType,r);if(n.type==="pipe")return nn(n.in,r)||nn(n.out,r);if(n.type==="object"){for(let i in n.shape)if(nn(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(nn(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(nn(i,r))return!0;return!!(n.rest&&nn(n.rest,r))}return!1}var Z4,Od,jd=E(()=>{vd();Z4=(t,e={})=>r=>{let n=jc({...r,processors:e});return Nt(t,n),Nc(n,t),Rc(n,t)},Od=(t,e,r={})=>n=>{let{libraryOptions:i,target:a}=n??{},o=jc({...i??{},target:a,io:e,processors:r});return Nt(t,o),Nc(o,t),Rc(o,t)}});function Cc(t,e){if("_idmap"in t){let n=t,i=jc({...e,processors:SS}),a={};for(let c of n._idmap.entries()){let[u,l]=c;Nt(l,i)}let o={},s={registry:n,uri:e?.uri,defs:a};i.external=s;for(let c of n._idmap.entries()){let[u,l]=c;Nc(i,l),o[u]=Rc(i,l)}if(Object.keys(a).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[c]:a}}return{schemas:o}}let r=jc({...e,processors:SS});return Nt(t,r),Nc(r,t),Rc(r,t)}var aJ,$S,IS,ES,PS,TS,zS,OS,jS,NS,RS,CS,AS,US,DS,MS,qS,ZS,LS,FS,VS,WS,BS,KS,HS,GS,Gh,QS,YS,JS,XS,e$,t$,r$,n$,i$,a$,o$,Qh,s$,SS,Ac=E(()=>{jd();we();aJ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$S=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:u}=t._zod.bag;if(typeof a=="number"&&(i.minLength=a),typeof o=="number"&&(i.maxLength=o),s&&(i.format=aJ[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}))])}},IS=(t,e,r,n)=>{let i=r,{minimum:a,maximum:o,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 a=="number"&&(i.minimum=a,typeof l=="number"&&e.target!=="draft-04"&&(l>=a?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 o=="number"&&(i.maximum=o,typeof u=="number"&&e.target!=="draft-04"&&(u<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c=="number"&&(i.multipleOf=c)},ES=(t,e,r,n)=>{r.type="boolean"},PS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},TS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},zS=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},OS=(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")},NS=(t,e,r,n)=>{r.not={}},RS=(t,e,r,n)=>{},CS=(t,e,r,n)=>{},AS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},US=(t,e,r,n)=>{let i=t._zod.def,a=Jl(i.entries);a.every(o=>typeof o=="number")&&(r.type="number"),a.every(o=>typeof o=="string")&&(r.type="string"),r.enum=a},DS=(t,e,r,n)=>{let i=t._zod.def,a=[];for(let o of i.values)if(o===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let o=a[0];r.type=o===null?"null":typeof o,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[o]:r.const=o}else a.every(o=>typeof o=="number")&&(r.type="number"),a.every(o=>typeof o=="string")&&(r.type="string"),a.every(o=>typeof o=="boolean")&&(r.type="boolean"),a.every(o=>o===null)&&(r.type="null"),r.enum=a},MS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},qS=(t,e,r,n)=>{let i=r,a=t._zod.pattern;if(!a)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=a.source},ZS=(t,e,r,n)=>{let i=r,a={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:s,mime:c}=t._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,a)},LS=(t,e,r,n)=>{r.type="boolean"},FS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},VS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},WS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},BS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},KS=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},HS=(t,e,r,n)=>{let i=r,a=t._zod.def,{minimum:o,maximum:s}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=Nt(a.element,e,{...n,path:[...n.path,"items"]})},GS=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="object",i.properties={};let o=a.shape;for(let u in o)i.properties[u]=Nt(o[u],e,{...n,path:[...n.path,"properties",u]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(u=>{let l=a.shape[u]._zod;return e.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type==="never"?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Nt(a.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},Gh=(t,e,r,n)=>{let i=t._zod.def,a=i.inclusive===!1,o=i.options.map((s,c)=>Nt(s,e,{...n,path:[...n.path,a?"oneOf":"anyOf",c]}));a?r.oneOf=o:r.anyOf=o},QS=(t,e,r,n)=>{let i=t._zod.def,a=Nt(i.left,e,{...n,path:[...n.path,"allOf",0]}),o=Nt(i.right,e,{...n,path:[...n.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];r.allOf=c},YS=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="array";let o=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",c=a.items.map((f,p)=>Nt(f,e,{...n,path:[...n.path,o,p]})),u=a.rest?Nt(a.rest,e,{...n,path:[...n.path,s,...e.target==="openapi-3.0"?[a.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)},JS=(t,e,r,n)=>{let i=r,a=t._zod.def;i.type="object";let o=a.keyType,c=o._zod.bag?.patterns;if(a.mode==="loose"&&c&&c.size>0){let l=Nt(a.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(a.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Nt(a.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let u=o._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(i.required=l)}},XS=(t,e,r,n)=>{let i=t._zod.def,a=Nt(i.innerType,e,n),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,r.nullable=!0):r.anyOf=[a,{type:"null"}]},e$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},t$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},r$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},n$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=o},i$=(t,e,r,n)=>{let i=t._zod.def,a=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Nt(a,e,n);let o=e.seen.get(t);o.ref=a},a$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType,r.readOnly=!0},o$=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},Qh=(t,e,r,n)=>{let i=t._zod.def;Nt(i.innerType,e,n);let a=e.seen.get(t);a.ref=i.innerType},s$=(t,e,r,n)=>{let i=t._zod.innerType;Nt(i,e,n);let a=e.seen.get(t);a.ref=i},SS={string:$S,number:IS,boolean:ES,bigint:PS,symbol:TS,null:zS,undefined:OS,void:jS,never:NS,any:RS,unknown:CS,date:AS,enum:US,literal:DS,nan:MS,template_literal:qS,file:ZS,success:LS,custom:FS,function:VS,transform:WS,map:BS,set:KS,array:HS,object:GS,union:Gh,intersection:QS,tuple:YS,record:JS,nullable:XS,nonoptional:e$,default:t$,prefault:r$,catch:n$,pipe:i$,readonly:a$,promise:o$,optional:Qh,lazy:s$}});var L4=E(()=>{Ac();jd()});var F4=E(()=>{});var ur=E(()=>{kc();Bw();Ww();Nk();gh();S0();we();hh();Eh();vd();k0();q4();jd();Ac();L4();F4()});var Yh={};Ki(Yh,{endsWith:()=>$d,gt:()=>ba,gte:()=>rn,includes:()=>kd,length:()=>zc,lowercase:()=>xd,lt:()=>_a,lte:()=>Dn,maxLength:()=>Tc,maxSize:()=>ts,mime:()=>Id,minLength:()=>io,minSize:()=>xa,multipleOf:()=>es,negative:()=>fS,nonnegative:()=>hS,nonpositive:()=>mS,normalize:()=>Ed,overwrite:()=>Xi,positive:()=>pS,property:()=>gS,regex:()=>bd,size:()=>Pc,slugify:()=>Hh,startsWith:()=>Sd,toLowerCase:()=>Td,toUpperCase:()=>zd,trim:()=>Pd,uppercase:()=>wd});var Jh=E(()=>{ur()});var rs={};Ki(rs,{ZodISODate:()=>l$,ZodISODateTime:()=>c$,ZodISODuration:()=>m$,ZodISOTime:()=>p$,date:()=>d$,datetime:()=>u$,duration:()=>h$,time:()=>f$});function u$(t){return Fk(c$,t)}function d$(t){return Vk(l$,t)}function f$(t){return Wk(p$,t)}function h$(t){return Bk(m$,t)}var c$,l$,p$,m$,Nd=E(()=>{ur();Cd();c$=N("ZodISODateTime",(t,e)=>{U0.init(t,e),Dt.init(t,e)});l$=N("ZodISODate",(t,e)=>{D0.init(t,e),Dt.init(t,e)});p$=N("ZodISOTime",(t,e)=>{M0.init(t,e),Dt.init(t,e)});m$=N("ZodISODuration",(t,e)=>{q0.init(t,e),Dt.init(t,e)})});var V4,SCe,Mn,g$=E(()=>{ur();ur();we();V4=(t,e)=>{lh.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>ph(t,r)},flatten:{value:r=>dh(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,Sc,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,Sc,2)}},isEmpty:{get(){return t.issues.length===0}}})},SCe=N("ZodError",V4),Mn=N("ZodError",V4,{Parent:Error})});var W4,B4,K4,H4,G4,Q4,Y4,J4,X4,eD,tD,rD,v$=E(()=>{ur();g$();W4=id(Mn),B4=od(Mn),K4=cd(Mn),H4=ud(Mn),G4=YA(Mn),Q4=JA(Mn),Y4=XA(Mn),J4=eU(Mn),X4=tU(Mn),eD=rU(Mn),tD=nU(Mn),rD=iU(Mn)});var Rd={};Ki(Rd,{ZodAny:()=>sD,ZodArray:()=>dD,ZodBase64:()=>j$,ZodBase64URL:()=>N$,ZodBigInt:()=>og,ZodBigIntFormat:()=>A$,ZodBoolean:()=>ag,ZodCIDRv4:()=>z$,ZodCIDRv6:()=>O$,ZodCUID:()=>k$,ZodCUID2:()=>S$,ZodCatch:()=>OD,ZodCodec:()=>F$,ZodCustom:()=>pg,ZodCustomStringFormat:()=>Ud,ZodDate:()=>D$,ZodDefault:()=>$D,ZodDiscriminatedUnion:()=>fD,ZodE164:()=>R$,ZodEmail:()=>b$,ZodEmoji:()=>x$,ZodEnum:()=>Ad,ZodExactOptional:()=>wD,ZodFile:()=>bD,ZodFunction:()=>qD,ZodGUID:()=>Xh,ZodIPv4:()=>P$,ZodIPv6:()=>T$,ZodIntersection:()=>mD,ZodJWT:()=>C$,ZodKSUID:()=>E$,ZodLazy:()=>UD,ZodLiteral:()=>_D,ZodMAC:()=>nD,ZodMap:()=>vD,ZodNaN:()=>ND,ZodNanoID:()=>w$,ZodNever:()=>uD,ZodNonOptional:()=>Z$,ZodNull:()=>oD,ZodNullable:()=>SD,ZodNumber:()=>ig,ZodNumberFormat:()=>Uc,ZodObject:()=>cg,ZodOptional:()=>q$,ZodPipe:()=>L$,ZodPrefault:()=>ED,ZodPromise:()=>MD,ZodReadonly:()=>RD,ZodRecord:()=>dg,ZodSet:()=>yD,ZodString:()=>rg,ZodStringFormat:()=>Dt,ZodSuccess:()=>zD,ZodSymbol:()=>iD,ZodTemplateLiteral:()=>AD,ZodTransform:()=>xD,ZodTuple:()=>hD,ZodType:()=>He,ZodULID:()=>$$,ZodURL:()=>ng,ZodUUID:()=>wa,ZodUndefined:()=>aD,ZodUnion:()=>ug,ZodUnknown:()=>cD,ZodVoid:()=>lD,ZodXID:()=>I$,ZodXor:()=>pD,_ZodString:()=>_$,_default:()=>ID,_function:()=>uX,any:()=>WJ,array:()=>at,base64:()=>PJ,base64url:()=>TJ,bigint:()=>qJ,boolean:()=>gr,catch:()=>jD,check:()=>lX,cidrv4:()=>IJ,cidrv6:()=>EJ,codec:()=>oX,cuid:()=>yJ,cuid2:()=>_J,custom:()=>V$,date:()=>KJ,describe:()=>dX,discriminatedUnion:()=>lg,e164:()=>zJ,email:()=>cJ,emoji:()=>gJ,enum:()=>Zr,exactOptional:()=>kD,file:()=>rX,float32:()=>AJ,float64:()=>UJ,function:()=>uX,guid:()=>uJ,hash:()=>CJ,hex:()=>RJ,hostname:()=>NJ,httpUrl:()=>hJ,instanceof:()=>fX,int:()=>y$,int32:()=>DJ,int64:()=>ZJ,intersection:()=>Dd,ipv4:()=>kJ,ipv6:()=>$J,json:()=>hX,jwt:()=>OJ,keyof:()=>HJ,ksuid:()=>wJ,lazy:()=>DD,literal:()=>ke,looseObject:()=>qr,looseRecord:()=>JJ,mac:()=>SJ,map:()=>XJ,meta:()=>pX,nan:()=>aX,nanoid:()=>vJ,nativeEnum:()=>tX,never:()=>U$,nonoptional:()=>TD,null:()=>sg,nullable:()=>eg,nullish:()=>nX,number:()=>Pt,object:()=>pe,optional:()=>Bt,partialRecord:()=>YJ,pipe:()=>tg,prefault:()=>PD,preprocess:()=>fg,promise:()=>cX,readonly:()=>CD,record:()=>Rt,refine:()=>ZD,set:()=>eX,strictObject:()=>GJ,string:()=>F,stringFormat:()=>jJ,stringbool:()=>mX,success:()=>iX,superRefine:()=>LD,symbol:()=>FJ,templateLiteral:()=>sX,transform:()=>M$,tuple:()=>gD,uint32:()=>MJ,uint64:()=>LJ,ulid:()=>bJ,undefined:()=>VJ,union:()=>qt,unknown:()=>Mt,url:()=>mJ,uuid:()=>lJ,uuidv4:()=>dJ,uuidv6:()=>pJ,uuidv7:()=>fJ,void:()=>BJ,xid:()=>xJ,xor:()=>QJ});function F(t){return Zk(rg,t)}function cJ(t){return Ph(b$,t)}function uJ(t){return yd(Xh,t)}function lJ(t){return Th(wa,t)}function dJ(t){return zh(wa,t)}function pJ(t){return Oh(wa,t)}function fJ(t){return jh(wa,t)}function mJ(t){return _d(ng,t)}function hJ(t){return _d(ng,{protocol:/^https?$/,hostname:ni.domain,...J.normalizeParams(t)})}function gJ(t){return Nh(x$,t)}function vJ(t){return Rh(w$,t)}function yJ(t){return Ch(k$,t)}function _J(t){return Ah(S$,t)}function bJ(t){return Uh($$,t)}function xJ(t){return Dh(I$,t)}function wJ(t){return Mh(E$,t)}function kJ(t){return qh(P$,t)}function SJ(t){return Lk(nD,t)}function $J(t){return Zh(T$,t)}function IJ(t){return Lh(z$,t)}function EJ(t){return Fh(O$,t)}function PJ(t){return Vh(j$,t)}function TJ(t){return Wh(N$,t)}function zJ(t){return Bh(R$,t)}function OJ(t){return Kh(C$,t)}function jJ(t,e,r={}){return Oc(Ud,t,e,r)}function NJ(t){return Oc(Ud,"hostname",ni.hostname,t)}function RJ(t){return Oc(Ud,"hex",ni.hex,t)}function CJ(t,e){let r=e?.enc??"hex",n=`${t}_${r}`,i=ni[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Oc(Ud,n,i,e)}function Pt(t){return Kk(ig,t)}function y$(t){return Hk(Uc,t)}function AJ(t){return Gk(Uc,t)}function UJ(t){return Qk(Uc,t)}function DJ(t){return Yk(Uc,t)}function MJ(t){return Jk(Uc,t)}function gr(t){return Xk(ag,t)}function qJ(t){return eS(og,t)}function ZJ(t){return tS(A$,t)}function LJ(t){return rS(A$,t)}function FJ(t){return nS(iD,t)}function VJ(t){return iS(aD,t)}function sg(t){return aS(oD,t)}function WJ(){return oS(sD)}function Mt(){return sS(cD)}function U$(t){return cS(uD,t)}function BJ(t){return uS(lD,t)}function KJ(t){return lS(D$,t)}function at(t,e){return M4(dD,t,e)}function HJ(t){let e=t._zod.def.shape;return Zr(Object.keys(e))}function pe(t,e){let r={type:"object",shape:t??{},...J.normalizeParams(e)};return new cg(r)}function GJ(t,e){return new cg({type:"object",shape:t,catchall:U$(),...J.normalizeParams(e)})}function qr(t,e){return new cg({type:"object",shape:t,catchall:Mt(),...J.normalizeParams(e)})}function qt(t,e){return new ug({type:"union",options:t,...J.normalizeParams(e)})}function QJ(t,e){return new pD({type:"union",options:t,inclusive:!1,...J.normalizeParams(e)})}function lg(t,e,r){return new fD({type:"union",options:e,discriminator:t,...J.normalizeParams(r)})}function Dd(t,e){return new mD({type:"intersection",left:t,right:e})}function gD(t,e,r){let n=e instanceof qe,i=n?r:e,a=n?e:null;return new hD({type:"tuple",items:t,rest:a,...J.normalizeParams(i)})}function Rt(t,e,r){return new dg({type:"record",keyType:t,valueType:e,...J.normalizeParams(r)})}function YJ(t,e,r){let n=en(t);return n._zod.values=void 0,new dg({type:"record",keyType:n,valueType:e,...J.normalizeParams(r)})}function JJ(t,e,r){return new dg({type:"record",keyType:t,valueType:e,mode:"loose",...J.normalizeParams(r)})}function XJ(t,e,r){return new vD({type:"map",keyType:t,valueType:e,...J.normalizeParams(r)})}function eX(t,e){return new yD({type:"set",valueType:t,...J.normalizeParams(e)})}function Zr(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Ad({type:"enum",entries:r,...J.normalizeParams(e)})}function tX(t,e){return new Ad({type:"enum",entries:t,...J.normalizeParams(e)})}function ke(t,e){return new _D({type:"literal",values:Array.isArray(t)?t:[t],...J.normalizeParams(e)})}function rX(t){return vS(bD,t)}function M$(t){return new xD({type:"transform",transform:t})}function Bt(t){return new q$({type:"optional",innerType:t})}function kD(t){return new wD({type:"optional",innerType:t})}function eg(t){return new SD({type:"nullable",innerType:t})}function nX(t){return Bt(eg(t))}function ID(t,e){return new $D({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():J.shallowClone(e)}})}function PD(t,e){return new ED({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():J.shallowClone(e)}})}function TD(t,e){return new Z$({type:"nonoptional",innerType:t,...J.normalizeParams(e)})}function iX(t){return new zD({type:"success",innerType:t})}function jD(t,e){return new OD({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function aX(t){return dS(ND,t)}function tg(t,e){return new L$({type:"pipe",in:t,out:e})}function oX(t,e,r){return new F$({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}function CD(t){return new RD({type:"readonly",innerType:t})}function sX(t,e){return new AD({type:"template_literal",parts:t,...J.normalizeParams(e)})}function DD(t){return new UD({type:"lazy",getter:t})}function cX(t){return new MD({type:"promise",innerType:t})}function uX(t){return new qD({type:"function",input:Array.isArray(t?.input)?gD(t?.input):t?.input??at(Mt()),output:t?.output??Mt()})}function lX(t){let e=new Ut({check:"custom"});return e._zod.check=t,e}function V$(t,e){return yS(pg,t??(()=>!0),e)}function ZD(t,e={}){return _S(pg,t,e)}function LD(t){return bS(t)}function fX(t,e={}){let r=new pg({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 hX(t){let e=DD(()=>qt([F(t),Pt(),gr(),sg(),at(e),Rt(F(),e)]));return e}function fg(t,e){return tg(M$(t),e)}var He,_$,rg,Dt,b$,Xh,wa,ng,x$,w$,k$,S$,$$,I$,E$,P$,nD,T$,z$,O$,j$,N$,R$,C$,Ud,ig,Uc,ag,og,A$,iD,aD,oD,sD,cD,uD,lD,D$,dD,cg,ug,pD,fD,mD,hD,dg,vD,yD,Ad,_D,bD,xD,q$,wD,SD,$D,ED,Z$,zD,OD,ND,L$,F$,RD,AD,UD,MD,qD,pg,dX,pX,mX,Cd=E(()=>{ur();ur();Ac();jd();Jh();Nd();v$();He=N("ZodType",(t,e)=>(qe.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Od(t,"input"),output:Od(t,"output")}}),t.toJSONSchema=Z4(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)=>en(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>W4(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>K4(t,r,n),t.parseAsync=async(r,n)=>B4(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>H4(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>G4(t,r,n),t.decode=(r,n)=>Q4(t,r,n),t.encodeAsync=async(r,n)=>Y4(t,r,n),t.decodeAsync=async(r,n)=>J4(t,r,n),t.safeEncode=(r,n)=>X4(t,r,n),t.safeDecode=(r,n)=>eD(t,r,n),t.safeEncodeAsync=async(r,n)=>tD(t,r,n),t.safeDecodeAsync=async(r,n)=>rD(t,r,n),t.refine=(r,n)=>t.check(ZD(r,n)),t.superRefine=r=>t.check(LD(r)),t.overwrite=r=>t.check(Xi(r)),t.optional=()=>Bt(t),t.exactOptional=()=>kD(t),t.nullable=()=>eg(t),t.nullish=()=>Bt(eg(t)),t.nonoptional=r=>TD(t,r),t.array=()=>at(t),t.or=r=>qt([t,r]),t.and=r=>Dd(t,r),t.transform=r=>tg(t,M$(r)),t.default=r=>ID(t,r),t.prefault=r=>PD(t,r),t.catch=r=>jD(t,r),t.pipe=r=>tg(t,r),t.readonly=()=>CD(t),t.describe=r=>{let n=t.clone();return tn.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return tn.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return tn.get(t);let n=t.clone();return tn.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),_$=N("_ZodString",(t,e)=>{Xo.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,a)=>$S(t,n,i,a);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(bd(...n)),t.includes=(...n)=>t.check(kd(...n)),t.startsWith=(...n)=>t.check(Sd(...n)),t.endsWith=(...n)=>t.check($d(...n)),t.min=(...n)=>t.check(io(...n)),t.max=(...n)=>t.check(Tc(...n)),t.length=(...n)=>t.check(zc(...n)),t.nonempty=(...n)=>t.check(io(1,...n)),t.lowercase=n=>t.check(xd(n)),t.uppercase=n=>t.check(wd(n)),t.trim=()=>t.check(Pd()),t.normalize=(...n)=>t.check(Ed(...n)),t.toLowerCase=()=>t.check(Td()),t.toUpperCase=()=>t.check(zd()),t.slugify=()=>t.check(Hh())}),rg=N("ZodString",(t,e)=>{Xo.init(t,e),_$.init(t,e),t.email=r=>t.check(Ph(b$,r)),t.url=r=>t.check(_d(ng,r)),t.jwt=r=>t.check(Kh(C$,r)),t.emoji=r=>t.check(Nh(x$,r)),t.guid=r=>t.check(yd(Xh,r)),t.uuid=r=>t.check(Th(wa,r)),t.uuidv4=r=>t.check(zh(wa,r)),t.uuidv6=r=>t.check(Oh(wa,r)),t.uuidv7=r=>t.check(jh(wa,r)),t.nanoid=r=>t.check(Rh(w$,r)),t.guid=r=>t.check(yd(Xh,r)),t.cuid=r=>t.check(Ch(k$,r)),t.cuid2=r=>t.check(Ah(S$,r)),t.ulid=r=>t.check(Uh($$,r)),t.base64=r=>t.check(Vh(j$,r)),t.base64url=r=>t.check(Wh(N$,r)),t.xid=r=>t.check(Dh(I$,r)),t.ksuid=r=>t.check(Mh(E$,r)),t.ipv4=r=>t.check(qh(P$,r)),t.ipv6=r=>t.check(Zh(T$,r)),t.cidrv4=r=>t.check(Lh(z$,r)),t.cidrv6=r=>t.check(Fh(O$,r)),t.e164=r=>t.check(Bh(R$,r)),t.datetime=r=>t.check(u$(r)),t.date=r=>t.check(d$(r)),t.time=r=>t.check(f$(r)),t.duration=r=>t.check(h$(r))});Dt=N("ZodStringFormat",(t,e)=>{jt.init(t,e),_$.init(t,e)}),b$=N("ZodEmail",(t,e)=>{P0.init(t,e),Dt.init(t,e)});Xh=N("ZodGUID",(t,e)=>{I0.init(t,e),Dt.init(t,e)});wa=N("ZodUUID",(t,e)=>{E0.init(t,e),Dt.init(t,e)});ng=N("ZodURL",(t,e)=>{T0.init(t,e),Dt.init(t,e)});x$=N("ZodEmoji",(t,e)=>{z0.init(t,e),Dt.init(t,e)});w$=N("ZodNanoID",(t,e)=>{O0.init(t,e),Dt.init(t,e)});k$=N("ZodCUID",(t,e)=>{j0.init(t,e),Dt.init(t,e)});S$=N("ZodCUID2",(t,e)=>{N0.init(t,e),Dt.init(t,e)});$$=N("ZodULID",(t,e)=>{R0.init(t,e),Dt.init(t,e)});I$=N("ZodXID",(t,e)=>{C0.init(t,e),Dt.init(t,e)});E$=N("ZodKSUID",(t,e)=>{A0.init(t,e),Dt.init(t,e)});P$=N("ZodIPv4",(t,e)=>{Z0.init(t,e),Dt.init(t,e)});nD=N("ZodMAC",(t,e)=>{F0.init(t,e),Dt.init(t,e)});T$=N("ZodIPv6",(t,e)=>{L0.init(t,e),Dt.init(t,e)});z$=N("ZodCIDRv4",(t,e)=>{V0.init(t,e),Dt.init(t,e)});O$=N("ZodCIDRv6",(t,e)=>{W0.init(t,e),Dt.init(t,e)});j$=N("ZodBase64",(t,e)=>{B0.init(t,e),Dt.init(t,e)});N$=N("ZodBase64URL",(t,e)=>{K0.init(t,e),Dt.init(t,e)});R$=N("ZodE164",(t,e)=>{H0.init(t,e),Dt.init(t,e)});C$=N("ZodJWT",(t,e)=>{G0.init(t,e),Dt.init(t,e)});Ud=N("ZodCustomStringFormat",(t,e)=>{Q0.init(t,e),Dt.init(t,e)});ig=N("ZodNumber",(t,e)=>{kh.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,a)=>IS(t,n,i,a),t.gt=(n,i)=>t.check(ba(n,i)),t.gte=(n,i)=>t.check(rn(n,i)),t.min=(n,i)=>t.check(rn(n,i)),t.lt=(n,i)=>t.check(_a(n,i)),t.lte=(n,i)=>t.check(Dn(n,i)),t.max=(n,i)=>t.check(Dn(n,i)),t.int=n=>t.check(y$(n)),t.safe=n=>t.check(y$(n)),t.positive=n=>t.check(ba(0,n)),t.nonnegative=n=>t.check(rn(0,n)),t.negative=n=>t.check(_a(0,n)),t.nonpositive=n=>t.check(Dn(0,n)),t.multipleOf=(n,i)=>t.check(es(n,i)),t.step=(n,i)=>t.check(es(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});Uc=N("ZodNumberFormat",(t,e)=>{Y0.init(t,e),ig.init(t,e)});ag=N("ZodBoolean",(t,e)=>{md.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>ES(t,r,n,i)});og=N("ZodBigInt",(t,e)=>{Sh.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,a)=>PS(t,n,i,a),t.gte=(n,i)=>t.check(rn(n,i)),t.min=(n,i)=>t.check(rn(n,i)),t.gt=(n,i)=>t.check(ba(n,i)),t.gte=(n,i)=>t.check(rn(n,i)),t.min=(n,i)=>t.check(rn(n,i)),t.lt=(n,i)=>t.check(_a(n,i)),t.lte=(n,i)=>t.check(Dn(n,i)),t.max=(n,i)=>t.check(Dn(n,i)),t.positive=n=>t.check(ba(BigInt(0),n)),t.negative=n=>t.check(_a(BigInt(0),n)),t.nonpositive=n=>t.check(Dn(BigInt(0),n)),t.nonnegative=n=>t.check(rn(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(es(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});A$=N("ZodBigIntFormat",(t,e)=>{J0.init(t,e),og.init(t,e)});iD=N("ZodSymbol",(t,e)=>{X0.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>TS(t,r,n,i)});aD=N("ZodUndefined",(t,e)=>{ek.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>OS(t,r,n,i)});oD=N("ZodNull",(t,e)=>{tk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>zS(t,r,n,i)});sD=N("ZodAny",(t,e)=>{rk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>RS(t,r,n,i)});cD=N("ZodUnknown",(t,e)=>{nk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>CS(t,r,n,i)});uD=N("ZodNever",(t,e)=>{ik.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>NS(t,r,n,i)});lD=N("ZodVoid",(t,e)=>{ak.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>jS(t,r,n,i)});D$=N("ZodDate",(t,e)=>{ok.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,a)=>AS(t,n,i,a),t.min=(n,i)=>t.check(rn(n,i)),t.max=(n,i)=>t.check(Dn(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)=>{sk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>HS(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(io(r,n)),t.nonempty=r=>t.check(io(1,r)),t.max=(r,n)=>t.check(Tc(r,n)),t.length=(r,n)=>t.check(zc(r,n)),t.unwrap=()=>t.element});cg=N("ZodObject",(t,e)=>{WU.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>GS(t,r,n,i),J.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Zr(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:U$()}),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(q$,t,r[0]),t.required=(...r)=>J.required(Z$,t,r[0])});ug=N("ZodUnion",(t,e)=>{hd.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Gh(t,r,n,i),t.options=e.options});pD=N("ZodXor",(t,e)=>{ug.init(t,e),ck.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Gh(t,r,n,i),t.options=e.options});fD=N("ZodDiscriminatedUnion",(t,e)=>{ug.init(t,e),uk.init(t,e)});mD=N("ZodIntersection",(t,e)=>{lk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>QS(t,r,n,i)});hD=N("ZodTuple",(t,e)=>{$h.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>YS(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});dg=N("ZodRecord",(t,e)=>{dk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>JS(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});vD=N("ZodMap",(t,e)=>{pk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>BS(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(xa(...r)),t.nonempty=r=>t.check(xa(1,r)),t.max=(...r)=>t.check(ts(...r)),t.size=(...r)=>t.check(Pc(...r))});yD=N("ZodSet",(t,e)=>{fk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>KS(t,r,n,i),t.min=(...r)=>t.check(xa(...r)),t.nonempty=r=>t.check(xa(1,r)),t.max=(...r)=>t.check(ts(...r)),t.size=(...r)=>t.check(Pc(...r))});Ad=N("ZodEnum",(t,e)=>{mk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(n,i,a)=>US(t,n,i,a),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let a={};for(let o of n)if(r.has(o))a[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new Ad({...e,checks:[],...J.normalizeParams(i),entries:a})},t.exclude=(n,i)=>{let a={...e.entries};for(let o of n)if(r.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new Ad({...e,checks:[],...J.normalizeParams(i),entries:a})}});_D=N("ZodLiteral",(t,e)=>{hk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>DS(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]}})});bD=N("ZodFile",(t,e)=>{gk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>ZS(t,r,n,i),t.min=(r,n)=>t.check(xa(r,n)),t.max=(r,n)=>t.check(ts(r,n)),t.mime=(r,n)=>t.check(Id(Array.isArray(r)?r:[r],n))});xD=N("ZodTransform",(t,e)=>{vk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>WS(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Qo(t.constructor.name);r.addIssue=a=>{if(typeof a=="string")r.issues.push(J.issue(a,r.value,e));else{let o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),r.issues.push(J.issue(o))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r)):(r.value=i,r)}});q$=N("ZodOptional",(t,e)=>{Ih.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Qh(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});wD=N("ZodExactOptional",(t,e)=>{yk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Qh(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});SD=N("ZodNullable",(t,e)=>{_k.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>XS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});$D=N("ZodDefault",(t,e)=>{bk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>t$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});ED=N("ZodPrefault",(t,e)=>{xk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>r$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});Z$=N("ZodNonOptional",(t,e)=>{wk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>e$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});zD=N("ZodSuccess",(t,e)=>{kk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>LS(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});OD=N("ZodCatch",(t,e)=>{Sk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>n$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});ND=N("ZodNaN",(t,e)=>{$k.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>MS(t,r,n,i)});L$=N("ZodPipe",(t,e)=>{Ik.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>i$(t,r,n,i),t.in=e.in,t.out=e.out});F$=N("ZodCodec",(t,e)=>{L$.init(t,e),gd.init(t,e)});RD=N("ZodReadonly",(t,e)=>{Ek.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>a$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});AD=N("ZodTemplateLiteral",(t,e)=>{Pk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>qS(t,r,n,i)});UD=N("ZodLazy",(t,e)=>{Ok.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>s$(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});MD=N("ZodPromise",(t,e)=>{zk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>o$(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});qD=N("ZodFunction",(t,e)=>{Tk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>VS(t,r,n,i)});pg=N("ZodCustom",(t,e)=>{jk.init(t,e),He.init(t,e),t._zod.processJSONSchema=(r,n,i)=>FS(t,r,n,i)});dX=xS,pX=wS;mX=(...t)=>kS({Codec:F$,Boolean:ag,String:rg},...t)});var FD,WD=E(()=>{ur();ur();FD||(FD={})});var jCe,BD=E(()=>{vd();Jh();Nd();Cd();jCe={...Rd,...Yh,iso:rs}});var KD=E(()=>{ur();Cd()});var Md=E(()=>{ur();Cd();Jh();g$();v$();WD();ur();Ck();ur();Ac();BD();Eh();Nd();Nd();KD();yr(Rk())});var GD=E(()=>{Md();Md()});import{homedir as EX}from"os";import{join as PX}from"path";import{existsSync as TX,readFileSync as zX}from"fs";function OX(){if(process.env.OPENAI_PROXY_TOKEN)return H.debug("[Auth] Using OPENAI_PROXY_TOKEN (ECS execution)"),process.env.OPENAI_PROXY_TOKEN;if(process.env.ZIBBY_USER_TOKEN)return H.debug("[Auth] Using ZIBBY_USER_TOKEN (CI/CD PAT)"),process.env.ZIBBY_USER_TOKEN;try{let t=PX(EX(),".zibby","config.json");if(TX(t)){let e=JSON.parse(zX(t,"utf-8"));if(e.sessionToken)return H.debug("[Auth] Using session token from zibby login"),e.sessionToken}}catch(t){H.debug(`[Auth] Could not read zibby login session: ${t.message}`)}return null}function jX(){return process.env.OPENAI_PROXY_URL?process.env.OPENAI_PROXY_URL.replace(/\/v1\/?$/,""):"https://api-prod.zibby.app/openai-proxy"}function Dc(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(Dc)}else"additionalProperties"in t||(t.additionalProperties=!0);t.type==="array"&&t.items&&Dc(t.items),t.anyOf&&t.anyOf.forEach(Dc),t.oneOf&&t.oneOf.forEach(Dc),t.allOf&&t.allOf.forEach(Dc)}}async function QD(t,e){H.info("\u{1F527} [OpenAI Proxy] Formatting structured output...");let r=OX();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=jX();H.info(`\u{1F517} Using OpenAI proxy: ${n}`);let i=Cc(e),a=i;if(i.$ref&&i.definitions){let l=i.$ref.split("/").pop();a=i.definitions[l]||i,H.debug(`Extracted schema from $ref: ${l}`)}delete a.$schema,Dc(a);let o=4e5,s=t;t.length>o&&(H.warn(`\u26A0\uFE0F [OpenAI Proxy] Raw text (${t.length} chars) exceeds limit, keeping last ${o} chars`),s=`... [truncated early content] ...
81
+ ${t.slice(-o)}`);let c=`Extract and format the following information into structured JSON matching the schema.
82
+
83
+ RAW CONTENT:
84
+ ${s}
85
+
86
+ 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:Gr.OPENAI_POSTPROCESSING,messages:[{role:"user",content:c}],response_format:{type:"json_schema",json_schema:{name:"extract",schema:a,strict:!0}}};H.info(`\u{1F4E4} Sending to OpenAI proxy: model=${Gr.OPENAI_POSTPROCESSING}, schema keys=${Object.keys(a.properties||{}).join(", ")}`),H.debug(` Schema size: ${JSON.stringify(a).length} chars`),H.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 f=(await oh.post(n,u,{headers:l,timeout:pm.OPENAI_REQUEST})).data?.choices?.[0]?.message?.content;if(!f)throw new Error("OpenAI proxy returned empty response");let p=JSON.parse(f);return H.info("\u2705 Successfully formatted with OpenAI proxy"),{structured:p,raw:t}}catch(l){if(l.response){let d=l.response.status,f=l.response.data;throw H.error(`\u274C OpenAI proxy request failed: ${d}`),H.error(` Status: ${d}`),H.error(` Response: ${JSON.stringify(f,null,2)}`),d===401||d===403?new Error(`Authentication failed for OpenAI proxy.
87
+ Run \`zibby login\` or set ZIBBY_USER_TOKEN environment variable.
88
+ Response: ${JSON.stringify(f)}`,{cause:l}):new Error(`Failed to format Cursor output: ${f?.error?.message||"Unknown error"}`,{cause:l})}throw H.error(`\u274C OpenAI proxy request failed: ${l.message}`),new Error(`Failed to format output: ${l.message}`,{cause:l})}}var YD=E(()=>{MA();GD();pa();Co()});import Er from"chalk";function nM(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`}function iM(t,e){return(r,n,i)=>{if(typeof r!="string")return t(r,n,i);let a=process.stdout.columns||120,o="";for(let s=0;s<r.length;s++){let c=r[s];e.lineStart&&(o+=tM,e.col=rM,e.lineStart=!1),c===`
89
+ `?(o+=c,e.lineStart=!0,e.col=0,e.inEsc=!1):c==="\x1B"?(e.inEsc=!0,o+=c):e.inEsc?(o+=c,(c>="A"&&c<="Z"||c>="a"&&c<="z")&&(e.inEsc=!1)):(e.col++,o+=c,e.col>=a&&(o+=`
90
+ ${tM}`,e.col=rM))}return t(o,n,i)}}var NX,qd,RX,JD,W$,XD,eM,B$,tM,rM,K$,ka,mg=E(()=>{NX="__WORKFLOW_GRAPH_LOG__",qd=Er.gray("\u2502"),RX=Er.gray("\u250C"),JD=Er.gray("\u2514"),W$=Er.green("\u25C6"),XD=Er.hex("#c084fc")("\u25C6"),eM=Er.hex("#2dd4bf")("\u25C6"),B$=Er.red("\u25C6"),tM=`${qd} `,rM=2;K$=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=iM(this._origStdoutWrite,e),process.stderr.write=iM(this._origStderrWrite,r)}_stopIntercepting(){this._origStdoutWrite&&(this._outState&&!this._outState.lineStart&&this._origStdoutWrite(`
91
+ `),process.stdout.write=this._origStdoutWrite),this._origStderrWrite&&(this._errState&&!this._errState.lineStart&&this._origStderrWrite(`
92
+ `),process.stderr.write=this._origStderrWrite),this._origStdoutWrite=null,this._origStderrWrite=null}_rawWrite(e){(this._origStdoutWrite||process.stdout.write.bind(process.stdout))(`${e}
93
+ `)}_emitGraphLogMarker(e){if(!this._emitWorkflowGraphMarkers)return;let r=`${NX}${JSON.stringify(e)}
94
+ `;this._origStdoutWrite?this._origStdoutWrite(r):process.stdout.write(r)}_writeDot(e,r){this._origStdoutWrite?(this._outState&&!this._outState.lineStart&&(this._origStdoutWrite(`
95
+ `),this._outState.lineStart=!0,this._outState.col=0),this._origStdoutWrite(`${e} ${r}
96
+ `)):process.stdout.write.bind(process.stdout)(`${e} ${r}
97
+ `)}step(e){this._origStdoutWrite?this._writeDot(W$,e):process.stdout.write.bind(process.stdout)(`${qd} ${W$} ${e}
98
+ `)}stepTool(e){this._origStdoutWrite?this._writeDot(XD,e):process.stdout.write.bind(process.stdout)(`${qd} ${XD} ${e}
99
+ `)}stepMemory(e){let r=Er.hex("#2dd4bf")(e);this._origStdoutWrite?this._writeDot(eM,r):process.stdout.write.bind(process.stdout)(`${qd} ${eM} ${r}
100
+ `)}stepFail(e){this._origStdoutWrite?this._writeDot(B$,Er.red(e)):process.stdout.write.bind(process.stdout)(`${qd} ${B$} ${Er.red(e)}
101
+ `)}nodeStart(e){this._currentNode=e,this._emitGraphLogMarker({phase:"node_begin",node:e}),this._rawWrite(`${RX} ${e}`),this._startIntercepting()}nodeComplete(e,r={}){this._stopIntercepting();let{duration:n,details:i}=r;if(i)for(let o of i)this._rawWrite(`${W$} ${o}`);let a=n?Er.dim(` ${nM(n)}`):"";this._rawWrite(`${JD} ${Er.green("done")}${a}`),this._emitGraphLogMarker({phase:"node_end",node:e}),this._rawWrite("")}nodeFailed(e,r,n={}){this._stopIntercepting();let{duration:i}=n,a=i?Er.dim(` ${nM(i)}`):"";this._rawWrite(`${B$} ${Er.red(r)}`),this._rawWrite(`${JD} ${Er.red("failed")}${a}`),this._emitGraphLogMarker({phase:"node_end",node:e}),this._rawWrite("")}route(e,r){this._rawWrite(Er.dim(` ${e} \u2192 ${r}`)),this._rawWrite("")}graphComplete(){this._rawWrite(Er.green.bold("\u2713 Workflow completed"))}},ka=new K$});import{copyFileSync as CX,existsSync as H$,lstatSync as AX,mkdirSync as aM,rmSync as UX,symlinkSync as DX,unlinkSync as MX}from"fs";import{join as Sa}from"path";import{homedir as qX}from"os";import{randomBytes as ZX}from"crypto";function oM(t){return!(!t||typeof t!="string"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="1"||process.env.ZIBBY_CURSOR_USE_GLOBAL_MCP==="true")}function sM(t){let e=Sa(t||process.cwd(),".zibby","tmp");aM(e,{recursive:!0});let r=`${process.pid}-${Date.now()}-${ZX(4).toString("hex")}`,n=Sa(e,`cursor-agent-home-${r}`),i=Sa(n,".cursor");aM(i,{recursive:!0});let a=qX(),o=Sa(a,".cursor");if(H$(o))for(let s of LX){let c=Sa(o,s);if(H$(c))try{CX(c,Sa(i,s))}catch{}}if(process.platform==="darwin"){let s=Sa(a,"Library");if(H$(s))try{DX(s,Sa(n,"Library"))}catch{}}return n}function cM(t){if(!(!t||typeof t!="string"))try{let e=Sa(t,"Library");try{AX(e).isSymbolicLink()&&MX(e)}catch{}UX(t,{recursive:!0,force:!0})}catch{}}var LX,uM=E(()=>{LX=["cli-config.json","config.json","auth.json","argv.json"]});import{spawn as FX,execSync as ns}from"child_process";import{writeFileSync as lM,readFileSync as dM,mkdirSync as pM,existsSync as Zd,accessSync as fM,constants as mM,unlinkSync as VX}from"fs";import{join as Ti,resolve as WX}from"path";import{homedir as Ld}from"os";var Fd,hM=E(()=>{Ro();pa();Co();x1();Ao();H_();dx();YD();mg();uM();Fd=class extends mn{constructor(){super("cursor","Cursor (CLI)",100)}canHandle(e){let r=[Ti(Ld(),".local","bin","cursor-agent"),Ti(Ld(),".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("/")){fM(n,mM.X_OK);let i=ns(`"${n}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(i&&i.length>0)return H.debug(`[Cursor] Found agent at: ${n} (version: ${i.trim().slice(0,50)})`),!0}else{let i=ns(`which ${n}`,{encoding:"utf-8",timeout:2e3,stdio:"pipe"}).trim();if(!i)continue;let a=ns(`${n} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});if(a&&a.length>0)return H.debug(`[Cursor] Found '${n}' in PATH at ${i} (version: ${a.trim().slice(0,50)})`),!0}}catch{continue}return H.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:a=null,skills:o=null,sessionPath:s=null,nodeName:c=null,timeout:u=pm.CURSOR_AGENT_DEFAULT,config:l={}}=r,d=l?.agent?.strictMode||!1,f=r.model??l?.agent?.cursor?.model??Gr.CURSOR;H.debug(`[Cursor] Invoking (model: ${f}, timeout: ${u/1e3}s, skills: ${JSON.stringify(o)})`);let m=(this._setupMcpConfig(s,n,l,o,c)||{}).isolatedMcpHome??null,v=[Ti(Ld(),".local","bin","cursor-agent"),Ti(Ld(),".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("/"))fM(A,mM.X_OK),ns(`"${A}" --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"});else{if(!ns(`which ${A}`,{encoding:"utf-8",timeout:2e3}).trim())throw new Error("not in PATH");ns(`${A} --version 2>&1`,{encoding:"utf-8",timeout:3e3,stdio:"pipe"})}g=A,H.debug(`[Agent] Using binary: ${A}`);break}catch(z){H.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(a){let A=`zibby-result-${Date.now()}.json`;h=Ti(n,".zibby","tmp",A);let z=Ti(n,".zibby","tmp");Zd(z)||pM(z,{recursive:!0});let M=cc.generateFileOutputInstructions(a,h);e=`${e}
114
+
115
+ ${M}`}let b=process.env.CURSOR_API_KEY,y=b?` | key: ***${b.slice(-4)}`:" | key: not set";console.log(`
116
+ \u25C6 Model: ${f||"auto"}${y}
117
+ `);let _=(await import("chalk")).default;console.log(`
118
+ ${_.bold("Prompt sent to LLM:")}`),console.log(_.dim("\u2500".repeat(60))),console.log(_.dim(e)),console.log(_.dim("\u2500".repeat(60)));let x=["--print","--force","--approve-mcps","--output-format","stream-json","--stream-partial-output","--model",f||"auto"];if(process.env.CURSOR_API_KEY&&x.push("--api-key",process.env.CURSOR_API_KEY),x.push(e),H.debug(`[Agent] Prompt: ${e.length} chars, model: ${f||"auto"}`),H.debug(`[Agent] Workspace: ${n}`),process.env.LOG_LEVEL==="debug"||process.env.ZIBBY_LOG_CURSOR_CLI==="1")try{console.log(`\u{1F527} Cursor CLI --model ${f||"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(a){let A=typeof a.parse=="function",z=null,M=!!(h&&Zd(h));if(h&&H.info(`[Agent] Result file: ${M?"present":"missing"} at ${h}`),M)try{let R=dM(h,"utf-8").trim();z=JSON.parse(R),H.info(`[Agent] Parsed JSON from result file OK (${R.length} chars) \u2192 object ready for validation`),k&&H.debug("[Agent] Agent exited non-zero but result file was written \u2014 recovering")}catch(R){H.warn(`\u26A0\uFE0F [Agent] Result file exists on disk but is not valid JSON: ${R.message}`)}else if(k)H.warn(`[Agent] Result file missing at ${h} (agent process error \u2014 may still recover if strictMode repairs)`);else throw H.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=a.parse(z);return H.info("\u2705 [Agent] Zod validation passed for structured result file"),d&&H.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:$,structured:R}}catch(R){H.warn(`\u26A0\uFE0F [Agent] JSON parsed but Zod rejected it (wrong types/shape): ${R.message?.slice(0,400)}`)}else{if(z)return H.info("\u2705 [Agent] File-based output extracted (no Zod parse fn) \u2014 accepting as structured"),d&&H.debug("[Agent] strictMode enabled but not needed \u2014 agent wrote valid file"),{raw:$,structured:z};M&&H.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;H.info(`[Agent] strictMode: calling OpenAI proxy to fix structured output (${te.length} chars in)`);try{let G=await QD(te,a);if(A){let ve=a.parse(G.structured);return H.info("\u2705 [Agent] Proxy output passed Zod validation"),{raw:$,structured:ve}}return{raw:$,...G}}catch(G){if(H.warn(`\u26A0\uFE0F [Agent] strictMode proxy failed: ${G.message}`),z)return H.warn("[Agent] Using agent's original result file as fallback"),{raw:$,structured:z}}}if(k)throw k;let L=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 H.error(`\u274C [Agent] No validated structured output: ${L}`),H.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 a=i.trim();if(a)try{let o=JSON.parse(a);if(o.type==="assistant"&&o.message?.content){let s=o.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,a=null){let o=n?.headless,s=Ti(Ld(),".cursor"),c=Ti(s,"mcp.json"),u={};if(Zd(c))try{u=JSON.parse(dM(c,"utf-8"))}catch{}let l=u.mcpServers||{},d=n?.paths?.output||y1,f=Ti(r||process.cwd(),d,_1),p=Array.isArray(i)?i.map(g=>Qr(g)).filter(Boolean):[...K_()].map(([,g])=>g),m=new Set;for(let g of p)typeof g.resolve=="function"&&(m.has(g.serverName)||(m.add(g.serverName),this._ensureSkillConfigured(l,g,e,f,a,o)));if(e){let g=Qr("browser");g&&typeof g.resolve=="function"&&!m.has(g.serverName)&&this._ensureSkillConfigured(l,g,e,f,"execute_live",o)}if(Object.keys(l).length===0)return H.debug("[MCP] No MCP servers configured - agent will run without tool access"),{isolatedMcpHome:null};let v=`${JSON.stringify({mcpServers:l},null,2)}
121
+ `;if(oM(e)){let g=sM(r||process.cwd()),h=Ti(g,".cursor","mcp.json");return lM(h,v,"utf8"),H.debug(`[MCP] Isolated cursor-agent HOME (session-scoped mcp.json): ${g} | servers: ${Object.keys(l).join(", ")}`),{isolatedMcpHome:g}}return Zd(s)||pM(s,{recursive:!0}),lM(c,v,"utf8"),H.debug(`[MCP] Global ~/.cursor/mcp.json | servers: ${Object.keys(l).join(", ")}`),{isolatedMcpHome:null}}_ensureSkillConfigured(e,r,n,i,a=null,o){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:a,headless:o}):null;l?.args?e[c].args=l.args:e[c].args=(e[c].args||[]).map(p=>p.startsWith("--output-dir=")?`--output-dir=${n}`:p);let d=l?.env||{},f=r.sessionEnvKey?{[r.sessionEnvKey]:i}:{};e[c].env={...e[c].env||{},...d,...f},H.debug(`[MCP] Updated ${c} session \u2192 ${n}`);return}if(c)return;let u=r.resolve({sessionPath:n,nodeName:a,headless:o});u&&(e[s]={...u,...r.sessionEnvKey&&{env:{...u.env||{},[r.sessionEnvKey]:i}}},H.debug(`[MCP] Configured ${s}`))}_spawnWithStreaming(e,r,n,i,a=null,o=null,s=null){return new Promise((c,u)=>{let l=Date.now(),d="",f="",p=Date.now(),m=0,v=!1,g=null,h=!1,b=!1,y=null;if(o)try{y=Ti(WX(String(o)),b1)}catch{y=null}let _=!1,x=()=>{_||(_=!0,cM(s))},w={...process.env};s&&(w.HOME=s,process.platform==="win32"&&(w.USERPROFILE=s),H.debug(`[Agent] cursor-agent HOME=${s} (isolated MCP config)`));let k=FX(e,r,{cwd:n,shell:!1,stdio:["pipe","pipe","pipe"],env:w});H.debug(`[Agent] PID: ${k.pid}`),k.stdin.on("error",R=>{R.code!=="EPIPE"&&H.warn(`[Agent] stdin error: ${R.message}`)}),k.stdout.on("error",R=>{R.code!=="EPIPE"&&H.warn(`[Agent] stdout error: ${R.message}`)}),k.stderr.on("error",R=>{R.code!=="EPIPE"&&H.warn(`[Agent] stderr error: ${R.message}`)}),a?(k.stdin.write(a,R=>{R&&R.code!=="EPIPE"&&H.warn(`[Agent] Failed to write to stdin: ${R.message}`),k.stdin.end()}),H.debug(`[Agent] Prompt also piped to stdin (${a.length} chars)`)):k.stdin.end();let $=null;y&&($=setInterval(()=>{if(!(v||b))try{if(Zd(y)){v=!0,g="studio-stop";try{VX(y)}catch{}H.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()-p)/1e3),G=[];try{let Fe=Math.ceil(R/60)+1,ye=ns(`find "${n}" -type f -mmin -${Fe} -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/target/*' 2>/dev/null | head -20`,{encoding:"utf-8",timeout:5e3}).trim();if(ye)for(let B of ye.split(`
122
+ `)){let I=B.replace(`${n}/`,"");T.has(I)||(T.add(I),G.push(I))}}catch{}let ve="";G.length>0&&(ve=` | \u{1F4C1} new: ${G.map(ye=>ye.split("/").pop()).join(", ")}`),T.size>0&&(ve+=` | \u{1F4E6} total: ${T.size} files`),H.debug(`\u{1F493} [Agent] Running for ${R}s | ${m} lines output${ve}`),m===0&&R>=30&&T.size===0&&(R<35&&H.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",H.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);H.error(`\u23F1\uFE0F [Agent] Timeout after ${R}s \u2014 killing process (PID: ${k.pid})`),d.trim()&&H.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),L=new Bs;L.onToolCall=(R,te)=>{let G=R,ve=te;if(R==="mcpToolCall"&&te?.name)G=te.name.replace(/^mcp_+[^_]+_+/,""),G.includes("-")&&G.split("-")[0]===G.split("-")[1]&&(G=G.split("-")[0]),ve=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")?ka.stepMemory(`Tool: ${G}`):ka.stepTool(`Tool: ${G}`),ve!=null&&typeof ve=="object"&&Object.keys(ve).length>0&&!b){let ye=JSON.stringify(ve),B=ye.length>100?`${ye.substring(0,100)}...`:ye;console.log(` Input: ${B}`)}},k.stdout.on("data",R=>{let te=R.toString();d+=te,p=Date.now(),h||(h=!0);let G=L.processChunk(te);G&&!b&&process.stdout.write(G);let ve=te.split(`
124
+ `).filter(Fe=>Fe.trim());m+=ve.length}),k.stderr.on("data",R=>{let te=R.toString();f+=te,p=Date.now(),h||(h=!0);let G=te.split(`
125
+ `).filter(ve=>ve.trim());for(let ve of G)H.warn(`\u26A0\uFE0F [Agent stderr] ${ve}`)}),k.on("close",(R,te)=>{b=!0,x(),clearTimeout(M),clearInterval(z),$&&clearInterval($),L.flush();let G=Math.round((Date.now()-l)/1e3);if(H.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()-p)/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}. ${f.trim()?`
128
+ Stderr: ${f.slice(-1e3)}`:""}${d.trim()?`
129
+ Stdout (last 500 chars): ${d.slice(-500)}`:""}`));return}let ve=L.getResult(),Fe=ve?JSON.stringify(ve,null,2):L.getRawText()||d||"";c({stdout:d||f||"",parsedText:Fe})}),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 ete}from"child_process";import{randomUUID as tte}from"crypto";import{copyFile as rte,mkdir as G$,readFile as nte,rm as ite,writeFile as Rg}from"fs/promises";import{createRequire as ate}from"module";import{homedir as lI,tmpdir as ote}from"os";import{dirname as vM,isAbsolute as N2,join as zi,relative as ste,resolve as Cg,sep as R2}from"path";import{fileURLToPath as cte}from"url";import{setMaxListeners as ute}from"events";import{spawn as fte}from"child_process";import{createInterface as mte}from"readline";import{homedir as Xre}from"os";import{join as ene}from"path";import{randomUUID as Vne}from"crypto";import{appendFile as Wne,mkdir as Bne}from"fs/promises";import{join as HM}from"path";import{realpathSync as GM}from"fs";import{cwd as Hne}from"process";import{randomUUID as c6}from"crypto";import{appendFile as tie,mkdir as rie,symlink as nie,unlink as iie}from"fs/promises";import{dirname as u6,join as l6}from"path";import*as Ze from"fs";import{mkdir as die,open as pie,readdir as fie,readFile as YM,rename as mie,rmdir as hie,rm as gie,stat as vie,unlink as yie}from"fs/promises";import{execFile as qie}from"child_process";import{promisify as Zie}from"util";import{createHash as Hie}from"crypto";import{userInfo as Gie}from"os";function QX(t){return this[t]}function eee(t,e){this[t]=XX.bind(null,e)}function C2(t=lte){let e=new AbortController;return ute(t,e.signal),e}function dte(t,e,r){return new Promise((n,i)=>{if(e?.aborted){r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n();return}let a=setTimeout((s,c,u)=>{s?.removeEventListener("abort",c),u()},t,e,o,n);function o(){clearTimeout(a),r?.throwOnAbort||r?.abortError?i(r.abortError?.()??Error("aborted")):n()}e?.addEventListener("abort",o,{once:!0}),r?.unref&&a.unref()})}function pte(t,e){t(Error(e))}function Q$(t,e,r){let n,i=new Promise((a,o)=>{n=setTimeout(pte,e,o,r),typeof n=="object"&&n.unref?.()});return Promise.race([t,i]).finally(()=>{n!==void 0&&clearTimeout(n)})}function A2(){return process.versions.bun!==void 0}function wte(t){var e=bte.call(t,Vd),r=t[Vd];try{t[Vd]=void 0;var n=!0}catch{}var i=xte.call(t);return n&&(e?t[Vd]=r:delete t[Vd]),i}function Ite(t){return $te.call(t)}function zte(t){return t==null?t===void 0?Tte:Pte:yM&&yM in Object(t)?kte(t):Ete(t)}function jte(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ute(t){if(!D2(t))return!1;var e=Ote(t);return e==Rte||e==Cte||e==Nte||e==Ate}function qte(t){return!!_M&&_M in t}function Vte(t){if(t!=null){try{return Fte.call(t)}catch{}try{return t+""}catch{}}return""}function Xte(t){if(!D2(t)||Zte(t))return!1;var e=Dte(t)?Jte:Kte;return e.test(Wte(t))}function tre(t,e){return t?.[e]}function nre(t,e){var r=rre(t,e);return ere(r)?r:void 0}function are(){this.__data__=fp?fp(null):{},this.size=0}function sre(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function pre(t){var e=this.__data__;if(fp){var r=e[t];return r===ure?void 0:r}return dre.call(e,t)?e[t]:void 0}function gre(t){var e=this.__data__;return fp?e[t]!==void 0:hre.call(e,t)}function _re(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=fp&&e===void 0?yre:e,this}function hu(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 xre(){this.__data__=[],this.size=0}function kre(t,e){return t===e||t!==t&&e!==e}function $re(t,e){for(var r=t.length;r--;)if(Sre(t[r][0],e))return r;return-1}function Pre(t){var e=this.__data__,r=Nv(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Ere.call(e,r,1),--this.size,!0}function zre(t){var e=this.__data__,r=Nv(e,t);return r<0?void 0:e[r][1]}function jre(t){return Nv(this.__data__,t)>-1}function Rre(t,e){var r=this.__data__,n=Nv(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function gu(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 Mre(){this.size=0,this.__data__={hash:new bM,map:new(Dre||Are),string:new bM}}function Zre(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Fre(t,e){var r=t.__data__;return Lre(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Vre(t){var e=Rv(this,t).delete(t);return this.size-=e?1:0,e}function Bre(t){return Rv(this,t).get(t)}function Hre(t){return Rv(this,t).has(t)}function Qre(t,e){var r=Rv(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function vu(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 LI(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Jre);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(LI.Cache||q2),r}function cs(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 fe(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 q(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 mp(t){return typeof t=="object"&&t!==null&&("name"in t&&t.name==="AbortError"||"message"in t&&String(t.message).includes("FetchRequestCanceledException"))}function fI(t){return typeof t!="object"?{}:t??{}}function wM(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 sne(){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 une(){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,a=n[2]||0,o=n[3]||0;return{browser:e,version:`${i}.${a}.${o}`}}}return null}function dne(){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 F2(...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 V2(t){let e=Symbol.asyncIterator in t?t[Symbol.asyncIterator]():t[Symbol.iterator]();return F2({start(){},async pull(r){let{done:n,value:i}=await e.next();n?r.close():r.enqueue(i)},async cancel(){await e.return?.()}})}function VI(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 pne(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 mne(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 hne(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 WI(t){let e;return(IM??(e=new globalThis.TextEncoder,IM=e.encode.bind(e)))(t)}function PM(t){let e;return(EM??(e=new globalThis.TextDecoder,EM=e.decode.bind(e)))(t)}function gne(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 vne(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 sp(){}function hg(t,e,r){return!e||Jg[t]>Jg[r]?sp:e[t].bind(e)}function an(t){let e=t.logger,r=t.logLevel??"off";if(!e)return yne;let n=zM.get(e);if(n&&n[0]===r)return n[1];let i={error:hg("error",e,r),warn:hg("warn",e,r),info:hg("info",e,r),debug:hg("debug",e,r)};return zM.set(e,[r,i]),i}async function*_ne(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 mI,n=new ls,i=VI(t.body);for await(let a of bne(i))for(let o of n.decode(a)){let s=r.decode(o);s&&(yield s)}for(let a of n.flush()){let o=r.decode(a);o&&(yield o)}}async function*bne(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"?WI(r):r,i=new Uint8Array(e.length+n.length);i.set(e),i.set(n,e.length),e=i;let a;for(;(a=vne(e))!==-1;)yield e.slice(0,a),e=e.slice(a)}e.length>0&&(yield e)}function xne(t,e){let r=t.indexOf(e);return r!==-1?[t.substring(0,r),e,t.substring(r+e.length)]:[t,"",""]}async function W2(t,e){let{response:r,requestLogID:n,retryOfRequestLogID:i,startTime:a}=e,o=await(async()=>{if(e.options.stream)return an(t).debug("response",r.status,r.url,r.headers,r.body),e.options.__streamClass?e.options.__streamClass.fromSSEResponse(r,e.controller):ds.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 B2(c,r)}return await r.text()})();return an(t).debug(`[${n}] response parsed`,ss({retryOfRequestLogID:i,url:r.url,status:r.status,body:o,durationMs:Date.now()-a})),o}function B2(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 Hc(t,e,r){return K2(),new File(t,e??"unknown_file",r)}function Ag(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 wne(t){let e=typeof t=="function"?t:t.fetch,r=OM.get(e);if(r)return r;let n=(async()=>{try{let i="Response"in e?e.Response:(await e("data:,")).constructor,a=new FormData;return a.toString()!==await new i(a).text()}catch{return!0}})();return OM.set(e,n),n}async function Ene(t,e,r){if(K2(),t=await t,e||(e=Ag(t,!0)),$ne(t))return t instanceof File&&e==null&&r==null?t:Hc([await t.arrayBuffer()],e??t.name,{type:t.type,lastModified:t.lastModified,...r});if(Ine(t)){let i=await t.blob();return e||(e=new URL(t.url).pathname.split(/[\\/]/).pop()),Hc(await vI(i),e,r)}let n=await vI(t);if(!r?.type){let i=n.find(a=>typeof a=="object"&&"type"in a&&a.type);typeof i=="string"&&(r={...r,type:i})}return Hc(n,e,r)}async function vI(t){let e=[];if(typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer)e.push(t);else if(G2(t))e.push(t instanceof Blob?t:await t.arrayBuffer());else if(H2(t))for await(let r of t)e.push(...await vI(r));else{let r=t?.constructor?.name;throw Error(`Unexpected data type: ${typeof t}${r?`; constructor: ${r}`:""}${Pne(t)}`)}return e}function Pne(t){return typeof t!="object"||t===null?"":`; props: [${Object.getOwnPropertyNames(t).map(e=>`"${e}"`).join(", ")}]`}function*Tne(t){if(!t)return;if(Q2 in t){let{values:n,nulls:i}=t;yield*n.entries();for(let a of i)yield[a,null];return}let e=!1,r;t instanceof Headers?r=t.entries():xM(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 a=xM(n[1])?n[1]:[n[1]],o=!1;for(let s of a)s!==void 0&&(e&&!o&&(o=!0,yield[i,null]),yield[i,s])}}function Ug(t){return typeof t=="object"&&t!==null&&dp in t}function Y2(t,e){let r=new Set;if(t)for(let n of t)Ug(n)&&r.add(n[dp]);if(e){for(let n of e)if(Ug(n)&&r.add(n[dp]),Array.isArray(n.content))for(let i of n.content)Ug(i)&&r.add(i[dp])}return Array.from(r)}function J2(t,e){let r=Y2(t,e);return r.length===0?{}:{"x-stainless-helper":r.join(", ")}}function zne(t){return Ug(t)?{"x-stainless-helper":t[dp]}:{}}function X2(t){return t.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}function t6(t){return t?.output_format??t?.output_config?.format}function NM(t,e,r){let n=t6(e);return!e||!("parse"in(n??{}))?{...t,content:t.content.map(i=>{if(i.type==="text"){let a=Object.defineProperty({...i},"parsed_output",{value:null,enumerable:!1});return Object.defineProperty(a,"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}:r6(t,e,r)}function r6(t,e,r){let n=null,i=t.content.map(a=>{if(a.type==="text"){let o=jne(e,a.text);n===null&&(n=o);let s=Object.defineProperty({...a},"parsed_output",{value:o,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."),o},enumerable:!1})}return a});return{...t,content:i,parsed_output:n}}function jne(t,e){let r=t6(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 UM(t){return t.type==="tool_use"||t.type==="server_tool_use"||t.type==="mcp_tool_use"}function MM(){let t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}async function Dne(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(a=>("name"in a?a.name:a.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 a=n.input;"parse"in i&&i.parse&&(a=i.parse(a));let o=await i.run(a);return{type:"tool_result",tool_use_id:n.id,content:o}}catch(a){return{type:"tool_result",tool_use_id:n.id,content:a instanceof iv?a.content:`Error: ${a instanceof Error?a.message:String(a)}`,is_error:!0}}}))}}function ZM(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 i6(t){return t?.output_config?.format}function LM(t,e,r){let n=i6(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}:a6(t,e,r)}function a6(t,e,r){let n=null,i=t.content.map(a=>{if(a.type==="text"){let o=qne(e,a.text);return n===null&&(n=o),Object.defineProperty({...a},"parsed_output",{value:o,enumerable:!1})}return a});return{...t,content:i,parsed_output:n}}function qne(t,e){let r=i6(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 BM(t){return t.type==="tool_use"||t.type==="server_tool_use"}function s6(t){return t instanceof Error?t:Error(String(t))}function Mg(t){return t instanceof Error?t.message:String(t)}function pp(t){if(t&&typeof t=="object"&&"code"in t&&typeof t.code=="string")return t.code}function HI(t){return pp(t)==="ENOENT"}function Kne(){if(Lc)return Lc;if(!cs(process.env.DEBUG_CLAUDE_AGENT_SDK))return Gc=null,Lc=Promise.resolve(),Lc;let t=HM(FI(),"debug");return Gc=HM(t,`sdk-${Vne()}.txt`),process.stderr.write(`SDK debug logs: ${Gc}
133
+ `),Lc=Bne(t,{recursive:!0}).then(()=>{}).catch(()=>{}),Lc}function ea(t){if(Gc===null)return;let e=`${new Date().toISOString()} ${t}
134
+ `;Kne().then(()=>{Gc&&Wne(Gc,e).catch(()=>{})})}function GI(){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 Gne(){let t="";if(typeof process<"u"&&typeof process.cwd=="function"&&typeof GM=="function"){let e=Hne();try{t=GM(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:c6(),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 Yne(){return Qne.sessionId}function aie({writeFn:t,flushIntervalMs:e=1e3,maxBufferSize:r=100,maxBufferBytes:n=1/0,immediateMode:i=!1}){let a=[],o=0,s=null,c=null;function u(){s&&(clearTimeout(s),s=null)}function l(){c&&(t(c.join("")),c=null),a.length!==0&&(t(a.join("")),a=[],o=0,u())}function d(){s||(s=setTimeout(l,e))}function f(){if(c){c.push(...a),a=[],o=0,u();return}let p=a;a=[],o=0,u(),c=p,setImmediate(()=>{let m=c;c=null,m&&t(m.join(""))})}return{write(p){if(i){t(p);return}a.push(p),o+=p.length,d(),(a.length>=r||o>=n)&&f()},flush:l,dispose(){l()}}}function oie(t){return QM.add(t),()=>QM.delete(t)}function cie(t){let e=[],r=t.match(/^MCP server ["']([^"']+)["']/);if(r&&r[1])e.push("mcp"),e.push(r[1].toLowerCase());else{let a=t.match(/^([^:[]+):/);a&&a[1]&&e.push(a[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 a=i[1].trim().toLowerCase();a.length<30&&!a.includes(" ")&&e.push(a)}return Array.from(new Set(e))}function uie(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 lie(t,e){if(!e)return!0;let r=cie(t);return uie(r,e)}function JM(){return bie}function xie(t,e){t.destroyed||t.write(e)}function wie(t){xie(process.stderr,t)}function Iie(t){if(!kI()||typeof process>"u"||typeof process.versions>"u"||typeof process.versions.node>"u")return!1;let e=$ie();return lie(t,e)}async function Pie(t,e,r,n){t&&await rie(e,{recursive:!0}).catch(()=>{}),await tie(r,n),m6()}function Tie(){}function zie(){if(!Og){let t=null;Og=aie({writeFn:e=>{let r=f6(),n=u6(r),i=t!==n;if(t=n,kI()){if(i)try{JM().mkdirSync(n)}catch{}JM().appendFileSync(r,e),m6();return}sI=sI.then(Pie.bind(null,i,n,r,e)).catch(Tie)},flushIntervalMs:1e3,maxBufferSize:100,immediateMode:kI()}),oie(async()=>{Og?.dispose(),await sI})}return Og}function Fn(t,{level:e}={level:"debug"}){if(wI[e]<wI[kie()]||!Iie(t))return;Eie&&t.includes(`
135
+ `)&&(t=bn(t));let r=`${new Date().toISOString()} [${e.toUpperCase()}] ${t.trim()}
136
+ `;if(d6()){wie(r);return}zie().write(r)}function f6(){return p6()??process.env.CLAUDE_CODE_DEBUG_LOGS_DIR??l6(FI(),"debug",`${Yne()}.txt`)}function jie(){return Oie}function bn(t,e,r){let n=[];try{let o=ar(n,sr`JSON.stringify(${t})`,0);return JSON.stringify(t,e,r)}catch(o){var i=o,a=1}finally{or(n,i,a)}}function Nie(t){let e=t.trim();return e.startsWith("{")&&e.endsWith("}")}function Rie(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&&!Nie(i))throw Error("Cannot use both a settings file path and the sandbox option. Include the sandbox configuration in your settings file instead.");let a={sandbox:n};if(i)try{a={...QI(i),sandbox:n}}catch{}r.settings=bn(a)}return r}function Aie(){for(let t of pv)t.killed||t.kill("SIGTERM")}function Uie(t){pv.add(t),!XM&&(XM=!0,process.on("exit",Aie))}function Die(t){return![".js",".mjs",".tsx",".ts",".jsx"].some(e=>t.endsWith(e))}function Mie(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 Lie(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r)|0;return e}function Vie(t){return typeof t!="string"?null:Fie.test(t)?t:null}function Wie(t){return Math.abs(Lie(t)).toString(36)}function Bie(t){let e=t.replace(/[^a-zA-Z0-9]/g,"-");return e.length<=e2?e:`${e.slice(0,e2)}-${Wie(t)}`}function Qie(){return"prod"}function rae(){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 iae(){let t=(()=>{switch(Qie()){case"local":return rae();case"staging":return tae??t2;case"prod":return t2}})(),e=process.env.CLAUDE_CODE_CUSTOM_OAUTH_URL;if(e){let n=e.replace(/\/$/,"");if(!nae.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 oae(t=""){let e=FI(),r=process.env.CLAUDE_CONFIG_DIR?`-${Hie("sha256").update(e).digest("hex").substring(0,8)}`:"";return`Claude Code${iae().OAUTH_FILE_SUFFIX}${t}${r}`}function sae(){try{return process.env.USER||Gie().username}catch{return"claude-code-user"}}function TI(){return uae}function ue(t,e){let r=TI(),n=zI({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===vp?void 0:vp].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:(a,o)=>{let{message:s}=t;return a.code==="invalid_enum_value"?{message:s??o.defaultError}:typeof o.data>"u"?{message:s??n??o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:s??r??o.defaultError}},description:i}}function v6(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 Iae(t){return new RegExp(`^${v6(t)}$`)}function Eae(t){let e=`${g6}T${v6(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 Pae(t,e){return!!((e==="v4"||!e)&&_ae.test(t)||(e==="v6"||!e)&&xae.test(t))}function Tae(t,e){if(!hae.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 zae(t,e){return!!((e==="v4"||!e)&&bae.test(t)||(e==="v6"||!e)&&wae.test(t))}function Oae(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(t.toFixed(i).replace(".","")),o=Number.parseInt(e.toFixed(i).replace(".",""));return a%o/10**i}function Wc(t){if(t instanceof Kn){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Oi.create(Wc(n))}return new Kn({...t._def,shape:()=>e})}else return t instanceof fo?new fo({...t._def,type:Wc(t.element)}):t instanceof Oi?Oi.create(Wc(t.unwrap())):t instanceof Oa?Oa.create(Wc(t.unwrap())):t instanceof za?za.create(t.items.map(e=>Wc(e))):t}function jI(t,e){let r=co(t),n=co(e);if(t===e)return{valid:!0,data:t};if(r===he.object&&n===he.object){let i=kt.objectKeys(e),a=kt.objectKeys(t).filter(s=>i.indexOf(s)!==-1),o={...t,...e};for(let s of a){let c=jI(t[s],e[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(r===he.array&&n===he.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let a=0;a<t.length;a++){let o=t[a],s=e[a],c=jI(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return r===he.date&&n===he.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}function y6(t,e){return new su({values:t,typeName:Ce.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 o.prototype)l in s||Object.defineProperty(s,l,{value:o.prototype[l].bind(s)});s._zod.constr=o,s._zod.def=c}let i=r?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:t});function o(s){var c;let u=r?.Parent?new a:this;n(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(t)}),Object.defineProperty(o,"name",{value:t}),o}function un(t){return t&&Object.assign(gv,t),gv}function jae(t){return t}function Nae(t){return t}function Rae(t){}function Cae(t){throw Error()}function Aae(t){}function YI(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 ie(t,e="|"){return t.map(r=>Ge(r)).join(e)}function w6(t,e){return typeof e=="bigint"?e.toString():e}function Cv(t){return{get value(){{let e=t();return Object.defineProperty(this,"value",{value:e}),e}throw Error("cached value already set")}}}function ys(t){return t==null}function Av(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function k6(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,a=Number.parseInt(t.toFixed(i).replace(".","")),o=Number.parseInt(e.toFixed(i).replace(".",""));return a%o/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 JI(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Uae(t,e){return e?e.reduce((r,n)=>r?.[n],t):t}function Dae(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let a=0;a<e.length;a++)i[e[a]]=n[a];return i})}function Mae(t=10){let e="";for(let r=0;r<t;r++)e+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return e}function Bc(t){return JSON.stringify(t)}function Pp(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Tp(t){if(Pp(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let r=e.prototype;return!(Pp(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function qae(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}function _s(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ai(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 Lae(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,a){return e??(e=t()),Reflect.set(e,n,i,a)},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 I6(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}function Fae(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 Ai(t,{...t._zod.def,shape:r,checks:[]})}function Vae(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 Ai(t,{...t._zod.def,shape:r,checks:[]})}function Wae(t,e){if(!Tp(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 JI(this,"shape",n),n},checks:[]};return Ai(t,r)}function Bae(t,e){return Ai(t,{...t._zod.def,get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return JI(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 a in r){if(!(a in n))throw Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=t?new t({type:"optional",innerType:n[a]}):n[a])}else for(let a in n)i[a]=t?new t({type:"optional",innerType:n[a]}):n[a];return Ai(e,{...e._zod.def,shape:i,checks:[]})}function Hae(t,e,r){let n=e._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new t({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new t({type:"nonoptional",innerType:n[a]});return Ai(e,{...e._zod.def,shape:i,checks:[]})}function Qc(t,e=0){for(let r=e;r<t.issues.length;r++)if(t.issues[r]?.continue!==!0)return!0;return!1}function oi(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function lp(t){return typeof t=="string"?t:t?.message}function Ri(t,e,r){let n={...t,path:t.path??[]};if(!t.message){let i=lp(t.inst?._zod.def?.error?.(t))??lp(e?.error?.(t))??lp(r.customError?.(t))??lp(r.localeError?.(t))??"Invalid input";n.message=i}return delete n.inst,delete n.continue,!e?.reportInput&&delete n.input,n}function Uv(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Dv(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function T6(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function Gae(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function tE(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 rE(t,e){let r=e||function(a){return a.message},n={_errors:[]},i=a=>{for(let o of a.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(r(o));else{let s=n,c=0;for(;c<o.path.length;){let u=o.path[c];c!==o.path.length-1?s[u]=s[u]||{_errors:[]}:(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))),s=s[u],c++}}};return i(t),n}function O6(t,e){let r=e||function(a){return a.message},n={errors:[]},i=(a,o=[])=>{var s,c;for(let u of a.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=[...o,...u.path];if(l.length===0){n.errors.push(r(u));continue}let d=n,f=0;for(;f<l.length;){let p=l[f],m=f===l.length-1;typeof p=="string"?(d.properties??(d.properties={}),(s=d.properties)[p]??(s[p]={errors:[]}),d=d.properties[p]):(d.items??(d.items=[]),(c=d.items)[p]??(c[p]={errors:[]}),d=d.items[p]),m&&d.errors.push(r(u)),f++}}};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 N6(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 F6(){return new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")}function X6(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 eq(t){return new RegExp(`^${X6(t)}$`)}function tq(t){let e=X6({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(`^${Y6}T(?:${n})$`)}function o2(t,e,r){t.issues.length&&e.issues.push(...oi(r,t.issues))}function fE(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}function Yq(t){if(!lE.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return fE(r)}function eZ(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 s2(t,e,r){t.issues.length&&e.issues.push(...oi(r,t.issues)),e.value[r]=t.value}function jg(t,e,r){t.issues.length&&e.issues.push(...oi(r,t.issues)),e.value[r]=t.value}function c2(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(...oi(r,t.issues)):t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function u2(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(a=>Ri(a,n,un())))}),e}function AI(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(Tp(t)&&Tp(e)){let r=Object.keys(e),n=Object.keys(t).filter(a=>r.indexOf(a)!==-1),i={...t,...e};for(let a of n){let o=AI(t[a],e[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i[a]=o.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],a=e[n],o=AI(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};r.push(o.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function l2(t,e,r){if(e.issues.length&&t.issues.push(...e.issues),r.issues.length&&t.issues.push(...r.issues),Qc(t))return t;let n=AI(e.value,r.value);if(!n.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return t.value=n.data,t}function Ng(t,e,r){t.issues.length&&e.issues.push(...oi(r,t.issues)),e.value[r]=t.value}function d2(t,e,r,n,i,a,o){t.issues.length&&(vv.has(typeof n)?r.issues.push(...oi(n,t.issues)):r.issues.push({origin:"map",code:"invalid_key",input:i,inst:a,issues:t.issues.map(s=>Ri(s,o,un()))})),e.issues.length&&(vv.has(typeof n)?r.issues.push(...oi(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:n,issues:e.issues.map(s=>Ri(s,o,un()))})),r.value.set(t.value,e.value)}function p2(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}function f2(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}function m2(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 h2(t,e,r){return Qc(t)?t:e.out._zod.run({value:t.value,issues:t.issues},r)}function g2(t){return t.value=Object.freeze(t.value),t}function v2(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(T6(i))}}function soe(){return{localeError:ooe()}}function uoe(){return{localeError:coe()}}function y2(t,e,r,n){let i=Math.abs(t),a=i%10,o=i%100;return o>=11&&o<=19?n:a===1?e:a>=2&&a<=4?r:n}function doe(){return{localeError:loe()}}function foe(){return{localeError:poe()}}function hoe(){return{localeError:moe()}}function voe(){return{localeError:goe()}}function NZ(){return{localeError:_oe()}}function woe(){return{localeError:xoe()}}function Soe(){return{localeError:koe()}}function Ioe(){return{localeError:$oe()}}function Poe(){return{localeError:Eoe()}}function zoe(){return{localeError:Toe()}}function joe(){return{localeError:Ooe()}}function Roe(){return{localeError:Noe()}}function Aoe(){return{localeError:Coe()}}function Doe(){return{localeError:Uoe()}}function qoe(){return{localeError:Moe()}}function Loe(){return{localeError:Zoe()}}function Voe(){return{localeError:Foe()}}function Boe(){return{localeError:Woe()}}function Hoe(){return{localeError:Koe()}}function Qoe(){return{localeError:Goe()}}function Joe(){return{localeError:Yoe()}}function ese(){return{localeError:Xoe()}}function rse(){return{localeError:tse()}}function ise(){return{localeError:nse()}}function ose(){return{localeError:ase()}}function cse(){return{localeError:sse()}}function _2(t,e,r,n){let i=Math.abs(t),a=i%10,o=i%100;return o>=11&&o<=19?n:a===1?e:a>=2&&a<=4?r:n}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 xse(){return{localeError:bse()}}function kse(){return{localeError:wse()}}function $se(){return{localeError:Sse()}}function Ese(){return{localeError:Ise()}}function Tse(){return{localeError:Pse()}}function Ose(){return{localeError:zse()}}function kE(){return new zp}function AZ(t,e){return new t({type:"string",...re(e)})}function UZ(t,e){return new t({type:"string",coerce:!0,...re(e)})}function SE(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...re(e)})}function wv(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...re(e)})}function $E(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...re(e)})}function IE(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(e)})}function EE(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(e)})}function PE(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(e)})}function TE(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...re(e)})}function zE(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...re(e)})}function OE(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(e)})}function jE(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...re(e)})}function NE(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(e)})}function RE(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...re(e)})}function CE(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...re(e)})}function AE(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(e)})}function UE(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(e)})}function DE(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(e)})}function ME(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(e)})}function qE(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(e)})}function ZE(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...re(e)})}function LE(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...re(e)})}function FE(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...re(e)})}function VE(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...re(e)})}function MZ(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(e)})}function qZ(t,e){return new t({type:"string",format:"date",check:"string_format",...re(e)})}function ZZ(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...re(e)})}function LZ(t,e){return new t({type:"string",format:"duration",check:"string_format",...re(e)})}function FZ(t,e){return new t({type:"number",checks:[],...re(e)})}function VZ(t,e){return new t({type:"number",coerce:!0,checks:[],...re(e)})}function WZ(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...re(e)})}function BZ(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...re(e)})}function KZ(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...re(e)})}function HZ(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...re(e)})}function GZ(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...re(e)})}function QZ(t,e){return new t({type:"boolean",...re(e)})}function YZ(t,e){return new t({type:"boolean",coerce:!0,...re(e)})}function JZ(t,e){return new t({type:"bigint",...re(e)})}function XZ(t,e){return new t({type:"bigint",coerce:!0,...re(e)})}function eL(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...re(e)})}function tL(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...re(e)})}function rL(t,e){return new t({type:"symbol",...re(e)})}function nL(t,e){return new t({type:"undefined",...re(e)})}function iL(t,e){return new t({type:"null",...re(e)})}function aL(t){return new t({type:"any"})}function kv(t){return new t({type:"unknown"})}function oL(t,e){return new t({type:"never",...re(e)})}function sL(t,e){return new t({type:"void",...re(e)})}function cL(t,e){return new t({type:"date",...re(e)})}function uL(t,e){return new t({type:"date",coerce:!0,...re(e)})}function lL(t,e){return new t({type:"nan",...re(e)})}function hs(t,e){return new dE({check:"less_than",...re(e),value:t,inclusive:!1})}function ji(t,e){return new dE({check:"less_than",...re(e),value:t,inclusive:!0})}function gs(t,e){return new pE({check:"greater_than",...re(e),value:t,inclusive:!1})}function Vn(t,e){return new pE({check:"greater_than",...re(e),value:t,inclusive:!0})}function dL(t){return gs(0,t)}function pL(t){return hs(0,t)}function fL(t){return ji(0,t)}function mL(t){return Vn(0,t)}function Op(t,e){return new pq({check:"multiple_of",...re(e),value:t})}function qv(t,e){return new hq({check:"max_size",...re(e),maximum:t})}function jp(t,e){return new gq({check:"min_size",...re(e),minimum:t})}function WE(t,e){return new vq({check:"size_equals",...re(e),size:t})}function Zv(t,e){return new yq({check:"max_length",...re(e),maximum:t})}function fu(t,e){return new _q({check:"min_length",...re(e),minimum:t})}function Lv(t,e){return new bq({check:"length_equals",...re(e),length:t})}function BE(t,e){return new xq({check:"string_format",format:"regex",...re(e),pattern:t})}function KE(t){return new wq({check:"string_format",format:"lowercase",...re(t)})}function HE(t){return new kq({check:"string_format",format:"uppercase",...re(t)})}function GE(t,e){return new Sq({check:"string_format",format:"includes",...re(e),includes:t})}function QE(t,e){return new $q({check:"string_format",format:"starts_with",...re(e),prefix:t})}function YE(t,e){return new Iq({check:"string_format",format:"ends_with",...re(e),suffix:t})}function hL(t,e,r){return new Eq({check:"property",property:t,schema:e,...re(r)})}function JE(t,e){return new Pq({check:"mime_type",mime:t,...re(e)})}function bs(t){return new Tq({check:"overwrite",tx:t})}function XE(t){return bs(e=>e.normalize(t))}function eP(){return bs(t=>t.trim())}function tP(){return bs(t=>t.toLowerCase())}function rP(){return bs(t=>t.toUpperCase())}function nP(t,e,r){return new t({type:"array",element:e,...re(r)})}function jse(t,e,r){return new t({type:"union",options:e,...re(r)})}function Nse(t,e,r,n){return new t({type:"union",options:r,discriminator:e,...re(n)})}function Rse(t,e,r){return new t({type:"intersection",left:e,right:r})}function gL(t,e,r,n){let i=r instanceof Le;return new t({type:"tuple",items:e,rest:i?r:null,...re(i?n:r)})}function Cse(t,e,r,n){return new t({type:"record",keyType:e,valueType:r,...re(n)})}function Ase(t,e,r,n){return new t({type:"map",keyType:e,valueType:r,...re(n)})}function Use(t,e,r){return new t({type:"set",valueType:e,...re(r)})}function Dse(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 Mse(t,e,r){return new t({type:"enum",entries:e,...re(r)})}function qse(t,e,r){return new t({type:"literal",values:Array.isArray(e)?e:[e],...re(r)})}function vL(t,e){return new t({type:"file",...re(e)})}function Zse(t,e){return new t({type:"transform",transform:e})}function Lse(t,e){return new t({type:"optional",innerType:e})}function Fse(t,e){return new t({type:"nullable",innerType:e})}function Vse(t,e,r){return new t({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():r}})}function Wse(t,e,r){return new t({type:"nonoptional",innerType:e,...re(r)})}function Bse(t,e){return new t({type:"success",innerType:e})}function Kse(t,e,r){return new t({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}function Hse(t,e,r){return new t({type:"pipe",in:e,out:r})}function Gse(t,e){return new t({type:"readonly",innerType:e})}function Qse(t,e,r){return new t({type:"template_literal",parts:e,...re(r)})}function Yse(t,e){return new t({type:"lazy",getter:e})}function Jse(t,e){return new t({type:"promise",innerType:e})}function yL(t,e,r){let n=re(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function _L(t,e,r){return new t({type:"custom",check:"custom",fn:e,...re(r)})}function bL(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(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let a=new Set(n),o=new Set(i),s=t.Pipe??xE,c=t.Boolean??hE,u=t.String??Up,l=new(t.Transform??bE)({type:"transform",transform:(f,p)=>{let m=f;return r.case!=="sensitive"&&(m=m.toLowerCase()),a.has(m)?!0:o.has(m)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:p.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 xL(t,e,r,n={}){let i=re(n),a={...re(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:o=>r.test(o),...i};return r instanceof RegExp&&(a.pattern=r),new t(a)}function wL(t){return new Sv({type:"function",input:Array.isArray(t?.input)?gL(Mv,t?.input):t?.input??nP(vE,kv(xv)),output:t?.output??kv(xv)})}function kL(t,e){if(t instanceof zp){let n=new Np(e),i={};for(let s of t._idmap.entries()){let[c,u]=s;n.process(u)}let a={},o={registry:t,uri:e?.uri||(s=>s),defs:i};for(let s of t._idmap.entries()){let[c,u]=s;a[c]=n.emit(u,{...e,external:o})}if(Object.keys(i).length>0){let s=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:i}}return{schemas:a}}let r=new Np(e);return r.process(t),r.emit(t,e)}function br(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 br(n.element,r);case"object":{for(let i in n.shape)if(br(n.shape[i],r))return!0;return!1}case"union":{for(let i of n.options)if(br(i,r))return!0;return!1}case"intersection":return br(n.left,r)||br(n.right,r);case"tuple":{for(let i of n.items)if(br(i,r))return!0;return!!(n.rest&&br(n.rest,r))}case"record":return br(n.keyType,r)||br(n.valueType,r);case"map":return br(n.keyType,r)||br(n.valueType,r);case"set":return br(n.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return br(n.innerType,r);case"lazy":return br(n.getter(),r);case"default":return br(n.innerType,r);case"prefault":return br(n.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return br(n.in,r)||br(n.out,r);case"success":return!1;case"catch":return!1;default:}throw Error(`Unknown schema type: ${n.type}`)}function SL(t){return MZ(aP,t)}function $L(t){return qZ(oP,t)}function IL(t){return ZZ(sP,t)}function EL(t){return LZ(cP,t)}function V(t){return AZ(Fv,t)}function rce(t){return SE(lP,t)}function nce(t){return wv($v,t)}function ice(t){return $E(Ta,t)}function ace(t){return IE(Ta,t)}function oce(t){return EE(Ta,t)}function sce(t){return PE(Ta,t)}function cce(t){return TE(dP,t)}function uce(t){return zE(pP,t)}function lce(t){return OE(fP,t)}function dce(t){return jE(mP,t)}function pce(t){return NE(hP,t)}function fce(t){return RE(gP,t)}function mce(t){return CE(vP,t)}function hce(t){return AE(yP,t)}function gce(t){return UE(_P,t)}function vce(t){return DE(bP,t)}function yce(t){return ME(xP,t)}function _ce(t){return qE(wP,t)}function bce(t){return ZE(kP,t)}function xce(t){return LE(SP,t)}function wce(t){return FE($P,t)}function kce(t){return VE(IP,t)}function Sce(t,e,r={}){return xL(NL,t,e,r)}function Tt(t){return FZ(Vv,t)}function UI(t){return WZ(yu,t)}function $ce(t){return BZ(yu,t)}function Ice(t){return KZ(yu,t)}function Ece(t){return HZ(yu,t)}function Pce(t){return GZ(yu,t)}function xr(t){return QZ(Wv,t)}function Tce(t){return JZ(Bv,t)}function zce(t){return eL(EP,t)}function Oce(t){return tL(EP,t)}function jce(t){return rL(RL,t)}function Nce(t){return nL(CL,t)}function PP(t){return iL(AL,t)}function Rce(){return aL(UL)}function tr(){return kv(DL)}function Kv(t){return oL(ML,t)}function Cce(t){return sL(qL,t)}function Ace(t){return cL(TP,t)}function mt(t,e){return nP(ZL,t,e)}function Uce(t){let e=t._zod.def.shape;return Se(Object.keys(e))}function me(t,e){let r={type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},...ft.normalizeParams(e)};return new Hv(r)}function Dce(t,e){return new Hv({type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},catchall:Kv(),...ft.normalizeParams(e)})}function on(t,e){return new Hv({type:"object",get shape(){return ft.assignProp(this,"shape",{...t}),this.shape},catchall:tr(),...ft.normalizeParams(e)})}function Lt(t,e){return new zP({type:"union",options:t,...ft.normalizeParams(e)})}function OP(t,e,r){return new LL({type:"union",options:e,discriminator:t,...ft.normalizeParams(r)})}function Gv(t,e){return new FL({type:"intersection",left:t,right:e})}function Mce(t,e,r){let n=e instanceof Le,i=n?r:e;return new VL({type:"tuple",items:t,rest:n?e:null,...ft.normalizeParams(i)})}function Zt(t,e,r){return new jP({type:"record",keyType:t,valueType:e,...ft.normalizeParams(r)})}function qce(t,e,r){return new jP({type:"record",keyType:Lt([t,Kv()]),valueType:e,...ft.normalizeParams(r)})}function Zce(t,e,r){return new WL({type:"map",keyType:t,valueType:e,...ft.normalizeParams(r)})}function Lce(t,e){return new BL({type:"set",valueType:t,...ft.normalizeParams(e)})}function wn(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Rp({type:"enum",entries:r,...ft.normalizeParams(e)})}function Fce(t,e){return new Rp({type:"enum",entries:t,...ft.normalizeParams(e)})}function Se(t,e){return new KL({type:"literal",values:Array.isArray(t)?t:[t],...ft.normalizeParams(e)})}function Vce(t){return vL(HL,t)}function RP(t){return new NP({type:"transform",transform:t})}function Gt(t){return new CP({type:"optional",innerType:t})}function Iv(t){return new GL({type:"nullable",innerType:t})}function Wce(t){return Gt(Iv(t))}function YL(t,e){return new QL({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function XL(t,e){return new JL({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}function eF(t,e){return new AP({type:"nonoptional",innerType:t,...ft.normalizeParams(e)})}function Bce(t){return new tF({type:"success",innerType:t})}function nF(t,e){return new rF({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}function Kce(t){return lL(iF,t)}function Ev(t,e){return new UP({type:"pipe",in:t,out:e})}function oF(t){return new aF({type:"readonly",innerType:t})}function Hce(t,e){return new sF({type:"template_literal",parts:t,...ft.normalizeParams(e)})}function uF(t){return new cF({type:"lazy",getter:t})}function Gce(t){return new lF({type:"promise",innerType:t})}function dF(t,e){let r=new lr({check:"custom",...ft.normalizeParams(e)});return r._zod.check=t,r}function pF(t,e){return yL(Qv,t??(()=>!0),e)}function fF(t,e={}){return _L(Qv,t,e)}function mF(t,e){let r=dF(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(ft.issue(i,n.value,r._zod.def));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=r),a.continue??(a.continue=!r._zod.def.abort),n.issues.push(ft.issue(a))}},t(n.value,n)),e);return r}function Qce(t,e={error:`Input not instance of ${t.name}`}){let r=new Qv({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...ft.normalizeParams(e)});return r._zod.bag.Class=t,r}function Jce(t){let e=uF(()=>Lt([V(t),Tt(),xr(),PP(),mt(e),Zt(V(),e)]));return e}function DP(t,e){return Ev(RP(t),e)}function eue(t){un({customError:t})}function tue(){return un().customError}function rue(t){return UZ(Fv,t)}function nue(t){return VZ(Vv,t)}function iue(t){return YZ(Wv,t)}function aue(t){return XZ(Bv,t)}function oue(t){return uL(TP,t)}function Yle(t){let e;return()=>e??=t()}async function Jle(t,e){try{await rte(t,e)}catch(r){if(!HI(r))throw r}}async function Xle(t,e){if(!t)return;let r=t;try{let n=QI(t);n?.claudeAiOauth?.refreshToken&&(delete n.claudeAiOauth.refreshToken,r=bn(n))}catch{}await Rg(e,r,{mode:384})}function ede(){if(process.platform!=="darwin")return Promise.resolve(void 0);let t=oae(aae);return new Promise(e=>{ete("security",["find-generic-password","-a",sae(),"-w","-s",t],{encoding:"utf-8",timeout:5e3},(r,n)=>e(r?void 0:n.trim()||void 0))})}async function tde(t,e,r,n,i=6e4){if(!Vie(e))return;let a=Cg(r??"."),o=Bie(a),s=await Q$(t.load({projectKey:o,sessionId:e}),i,`SessionStore.load() timed out after ${i}ms for session ${e}`);if(!s||s.length===0)return;let c=zi(ote(),`claude-resume-${tte()}`);try{let u=zi(c,"projects",o);await G$(u,{recursive:!0});let l=zi(u,`${e}.jsonl`);await Rg(l,S2(s),{mode:384});let d=n?.CLAUDE_CONFIG_DIR??process.env.CLAUDE_CONFIG_DIR,f=d??zi(lI(),".claude"),p;try{p=await nte(zi(f,".credentials.json"),"utf-8")}catch(m){if(!HI(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)&&(p=await ede()??p),await Xle(p,zi(c,".credentials.json")),await Jle(zi(d??lI(),".claude.json"),zi(c,".claude.json")),t.listSubkeys){let m=zi(u,e),v=await Q$(t.listSubkeys({projectKey:o,sessionId:e}),i,`SessionStore.listSubkeys() timed out after ${i}ms for session ${e}`);for(let g of v){let h=Cg(m,g+".jsonl");if(!g||N2(g)||g.split(/[\\/]/).includes("..")||!h.startsWith(m+R2)){Fn(`[SessionStore] skipping unsafe subpath from listSubkeys: ${g}`,{level:"warn"});continue}let b=await Q$(t.load({projectKey:o,sessionId:e,subpath:g}),i,`SessionStore.load() timed out after ${i}ms for session ${e} subpath ${g}`);if(!b||b.length===0)continue;let y=[],_=[];for(let x of b)ide(x)?y.push(x):_.push(x);if(_.length>0&&(await G$(vM(h),{recursive:!0}),await Rg(h,S2(_),{mode:384})),y.length>0){let x=y.at(-1),w=Cg(m,g+".meta.json");await G$(vM(w),{recursive:!0});let{type:k,...$}=x;await Rg(w,bn($),{mode:384})}}}return c}catch(u){throw await qF(c),u}}function w2(t,e,r,n){let{systemPrompt:i,settings:a,settingSources:o,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 f=c.pathToClaudeCodeExecutable;if(!f){let Ws=cte(import.meta.url),da=ate(Ws),dm=Mie(L_=>da.resolve(L_));if(dm)f=dm;else try{f=da.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:p=C2(),additionalDirectories:m=[],agent:v,agents:g,allowedTools:h=[],betas:b,canUseTool:y,continue:_,cwd:x,debug:w,debugFile:k,disallowedTools:$=[],tools:T,env:A,executable:z=A2()?"bun":"node",executableArgs:M=[],extraArgs:L={},fallbackModel:R,enableFileCheckpointing:te,toolConfig:G,forkSession:ve,hooks:Fe,includeHookEvents:ye,includePartialMessages:B,onElicitation:I,persistSession:W,sessionStore:C,thinking:S,effort:P,maxThinkingTokens:K,maxTurns:oe,maxBudgetUsd:ge,taskBudget:ut,mcpServers:Pe,model:rr,outputFormat:D,permissionMode:Z="default",allowDangerouslySkipPermissions:Q=!1,permissionPromptToolName:ne,plugins:xe,getOAuthToken:Be,workload:fr,resume:On,resumeSessionAt:Ur,sessionId:Dr,stderr:vr,strictMcpConfig:Za}=c;if(C&&W===!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 Hr=D?.type==="json_schema"?D.schema:void 0,jn=A?{...A}:{...process.env};jn.CLAUDE_CODE_ENTRYPOINT||(jn.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),te&&(jn.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING="true"),Be&&(jn.CLAUDE_CODE_SDK_HAS_OAUTH_REFRESH="1"),G?.askUserQuestion?.previewFormat&&(jn.CLAUDE_CODE_QUESTION_PREVIEW_FORMAT=G.askUserQuestion.previewFormat);let La={},Vs=new Map;if(Pe)for(let[Ws,da]of Object.entries(Pe))da.type==="sdk"&&da.instance?Vs.set(Ws,da.instance):La[Ws]=da;let Fa;if(S)switch(S.type){case"adaptive":Fa={type:"adaptive",display:S.display};break;case"enabled":Fa={type:"enabled",budgetTokens:S.budgetTokens,display:S.display};break;case"disabled":Fa={type:"disabled"};break}else K!==void 0&&(Fa=K===0?{type:"disabled"}:{type:"enabled",budgetTokens:K});r&&(jn.CLAUDE_CONFIG_DIR=r);let cl=new SI({abortController:p,additionalDirectories:m,agent:v,betas:b,cwd:x,debug:w,debugFile:k,executable:z,executableArgs:M,extraArgs:fr?{...L,workload:fr}:L,pathToClaudeCodeExecutable:f,env:jn,forkSession:ve,stderr:vr,thinkingConfig:Fa,effort:P,maxTurns:oe,maxBudgetUsd:ge,taskBudget:ut,model:rr,fallbackModel:R,jsonSchema:Hr,permissionMode:Z,allowDangerouslySkipPermissions:Q,permissionPromptToolName:ne,continueConversation:_,resume:On,resumeSessionAt:Ur,sessionId:Dr,settings:typeof a=="object"?bn(a):a,settingSources:o,allowedTools:h,disallowedTools:$,tools:T,mcpServers:La,strictMcpConfig:Za,canUseTool:!!y,hooks:!!Fe,includeHookEvents:ye,includePartialMessages:B,persistSession:W,sessionMirror:!!C,plugins:xe,sandbox:s,spawnClaudeCodeProcess:c.spawnClaudeCodeProcess,deferSpawn:n}),Z_={systemPrompt:u,appendSystemPrompt:l,excludeDynamicSections:d,agents:g,promptSuggestions:c.promptSuggestions,agentProgressSummaries:c.agentProgressSummaries},h1=new EI(cl,e,y,Fe,p,Vs,Hr,Z_,I,Be);if(C){let Ws=new PI(async(da,dm)=>{let L_=zi(jn.CLAUDE_CONFIG_DIR??zi(lI(),".claude"),"projects"),g1=ade(da,L_);g1&&await C.append(g1,dm)});h1.setTranscriptMirrorBatcher(Ws)}return{queryInstance:h1,transport:cl,abortController:p,processEnv:jn}}function k2(t,e,r,n){typeof r=="string"?e.write(bn({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 qF(t){for(let e=0;;e++)try{return await ite(t,{recursive:!0,force:!0})}catch(r){if(e>=4||!rde.has(pp(r)??""))return;await dte((e+1)*100)}}function nde(t,e){t.waitForExit().catch(()=>{}).finally(()=>qF(e))}function ZF({prompt:t,options:e}){if(e?.resume&&e?.sessionStore){let{queryInstance:a,transport:o,abortController:s,processEnv:c}=w2({...e},typeof t=="string",void 0,!0),u=Cg(e.cwd??".");return tde(e.sessionStore,e.resume,u,e.env,e.loadTimeoutMs).then(l=>{l&&(o.updateEnv({CLAUDE_CONFIG_DIR:l}),c.CLAUDE_CONFIG_DIR=l,a.addCleanupCallback(()=>nde(o,l))),a.isClosed()||o.spawn()}).catch(l=>{let d=s6(l);o.spawnAbort(d),a.setError(d)}),k2(a,o,t,s),a}let{queryInstance:r,transport:n,abortController:i}=w2(e,typeof t=="string");return k2(r,n,t,i),r}function S2(t){return t.map(e=>bn(e)).join(`
139
+ `)+`
140
+ `}function ide(t){return typeof t=="object"&&t!==null&&"type"in t&&t.type==="agent_metadata"}function ade(t,e){let r=ste(e,t);if(r.startsWith("..")||N2(r))return null;let n=r.split(R2);if(n.length<2)return null;let i=n[0],a=n[1];if(n.length===2&&a.endsWith(".jsonl"))return{projectKey:i,sessionId:a.replace(/\.jsonl$/,"")};if(n.length>=4){let o=n.slice(2),s=o.length-1;return o[s]=o.at(-1).replace(/\.jsonl$/,""),{projectKey:i,sessionId:a,subpath:o.join("/")}}return null}var BX,KX,uI,HX,GX,YX,JX,$2,le,XX,vs,tee,ree,ar,or,qg,gM,et,St,ho,Tv,nee,I2,E2,Zg,iee,Ci,aee,oee,P2,see,zv,Ov,DI,jv,MI,cee,uee,lee,dee,pee,fee,mee,hee,gee,vee,yee,_ee,bee,xee,wee,kee,See,$ee,qI,Iee,Eee,Pee,Tee,T2,z2,zee,Oee,jee,Nee,Ree,O2,Cee,Aee,Uee,Dee,Mee,qee,Zee,Lee,Fee,Vee,Wee,Bee,Kee,Hee,Gee,Qee,j2,Yee,Jee,Xee,lte,uo,hte,gte,vte,yte,ZI,_te,Lg,U2,bte,xte,Vd,kte,Ste,$te,Ete,Pte,Tte,yM,Ote,D2,Nte,Rte,Cte,Ate,Dte,Mte,Y$,_M,Zte,Lte,Fte,Wte,Bte,Kte,Hte,Gte,Qte,Yte,Jte,ere,rre,M2,ire,fp,ore,cre,ure,lre,dre,fre,mre,hre,vre,yre,bre,bM,wre,Sre,Nv,Ire,Ere,Tre,Ore,Nre,Cre,Are,Ure,Dre,qre,Lre,Rv,Wre,Kre,Gre,Yre,q2,Jre,go,FI,Z2,dI,Ae,sn,Wn,Yc,Fg,Vg,Wg,Bg,Kg,Hg,Gg,Qg,Yg,tne,rne,pI,xM,ine,L2,ane,Fc,one,cne,kM,SM,$M,lne,fne,IM,EM,Zn,Ln,ls,Jg,TM,yne,zM,ss,Wd,ds,mI,cp,Xg,gg,ev,hI,ps,tv,K2,H2,BI,OM,kne,Sne,gI,G2,$ne,Ine,Bn,Q2,ht,dp,jM,One,Pr,rv,nv,e6,Nne,Vc,Rne,Cne,n6,ii,ao,Mc,Bd,vg,Kd,Hd,yg,Gd,$a,Qd,_g,bg,is,xg,wg,Yd,J$,RM,kg,X$,eI,tI,CM,AM,yI,iv,Ane,Une,Jd,qc,as,_r,Xd,qn,Pa,oo,ep,DM,_I,av,ov,sv,qM,Mne,fs,cv,hp,po,uv,ai,so,Zc,tp,Sg,rp,np,$g,ip,Ia,ap,Ig,Eg,os,Pg,Tg,op,rI,FM,nI,iI,aI,oI,VM,WM,bI,lv,gp,KM,Zne,dv,zg,xI,KI,Dg,o6,Lne,Fne,cr,Jc,Gc,Lc,Qne,Jne,LAe,Xne,FAe,eie,VAe,QM,sie,_ie,bie,wI,kie,Sie,kI,$ie,d6,p6,Eie,Og,sI,m6,HAe,Oie,sr,QI,Cie,pv,XM,SI,$I,II,EI,PI,YAe,Fie,e2,JAe,XAe,Kie,eUe,Yie,h6,Jie,Xie,eae,nUe,t2,tae,nae,aae,kt,r2,he,co,X,si,cae,vp,uae,zI,cn,Re,up,xn,n2,i2,Xc,fv,be,ci,a2,tt,lae,dae,pae,fae,mae,hae,gae,vae,yae,cI,_ae,bae,xae,wae,kae,Sae,g6,$ae,eu,yp,_p,bp,xp,wp,tu,ru,kp,lo,ta,Sp,fo,Kn,nu,Ea,OI,iu,za,NI,$p,Ip,RI,au,ou,su,cu,ms,Ni,Oi,Oa,uu,lu,Ep,mv,hv,du,iUe,Ce,aUe,oUe,sUe,cUe,uUe,lUe,dUe,pUe,fUe,mUe,hUe,gUe,vUe,yUe,_Ue,bUe,xUe,wUe,kUe,SUe,$Ue,IUe,EUe,PUe,TUe,zUe,OUe,jUe,NUe,RUe,CUe,AUe,UUe,DUe,_6,b6,x6,mo,gv,ft,XI,S6,Zae,vv,$6,E6,P6,CI,z6,eE,Cp,nE,yv,iE,_v,aE,oE,sE,cE,uE,R6,C6,A6,U6,D6,M6,q6,Qae,Z6,pu,Yae,Jae,Xae,L6,eoe,toe,roe,noe,ioe,V6,W6,B6,K6,H6,lE,G6,aoe,Q6,Y6,J6,rq,nq,iq,aq,oq,sq,cq,uq,lq,lr,dq,dE,pE,pq,fq,mq,hq,gq,vq,yq,_q,bq,Ap,xq,wq,kq,Sq,$q,Iq,Eq,Pq,Tq,bv,zq,Le,Up,Kt,Oq,jq,Nq,Rq,Cq,Aq,Uq,Dq,Mq,qq,Zq,Lq,Fq,Vq,Wq,Bq,Kq,Hq,Gq,Qq,Jq,Xq,tZ,rZ,mE,nZ,hE,gE,iZ,aZ,oZ,sZ,cZ,xv,uZ,lZ,dZ,vE,yE,_E,pZ,fZ,Mv,mZ,hZ,gZ,vZ,yZ,_Z,bE,bZ,xZ,wZ,kZ,SZ,$Z,IZ,EZ,xE,PZ,TZ,zZ,OZ,jZ,wE,ooe,coe,loe,poe,moe,goe,yoe,_oe,boe,xoe,koe,$oe,Eoe,Toe,Ooe,Noe,Coe,Uoe,Moe,Zoe,Foe,Woe,Koe,Goe,Yoe,Xoe,tse,nse,ase,sse,use,dse,fse,hse,vse,_se,bse,wse,Sse,Ise,Pse,zse,RZ,CZ,zp,us,DZ,Sv,Np,Xse,ece,MUe,Kc,iP,aP,oP,sP,cP,PL,tce,Dp,TL,zL,OL,jL,rt,uP,Fv,Qt,lP,$v,Ta,dP,pP,fP,mP,hP,gP,vP,yP,_P,bP,xP,wP,kP,SP,$P,IP,NL,Vv,yu,Wv,Bv,EP,RL,CL,AL,UL,DL,ML,qL,TP,ZL,Hv,zP,LL,FL,VL,jP,WL,BL,Rp,KL,HL,NP,CP,GL,QL,JL,AP,tF,rF,iF,UP,aF,sF,cF,lF,Qv,Yce,Xce,hF,sue,Yv,wr,gF,vF,qUe,cue,uue,MP,Hn,Jv,Tr,ui,li,zr,Xv,lue,due,yF,b2,_F,ZUe,LUe,bF,pue,xF,fue,Mp,mu,wF,mue,hue,gue,vue,yue,_ue,bue,xue,wue,kue,kF,Sue,$ue,SF,Iue,qp,Zp,Eue,Lp,$F,Pue,IF,EF,PF,TF,FUe,zF,OF,jF,VUe,NF,RF,qP,CF,Fp,_u,AF,Tue,zue,Oue,jue,Nue,ZP,Rue,Cue,Aue,Uue,Due,Mue,que,Zue,Lue,Fue,Vue,Wue,Bue,Kue,Hue,Gue,LP,FP,VP,Que,Yue,Jue,WP,Xue,ele,tle,rle,nle,UF,ile,ale,DF,WUe,ole,sle,cle,BUe,MF,ule,lle,dle,ple,fle,mle,hle,gle,vle,Pv,yle,_le,ble,xle,wle,kle,Sle,$le,Ile,Ele,Ple,Tle,zle,Ole,jle,Nle,Rle,Cle,Ale,Ule,Dle,Mle,qle,Zle,Lle,Fle,Vle,Wle,Ble,Kle,Hle,Gle,Qle,KUe,HUe,GUe,QUe,YUe,JUe,XUe,e4e,t4e,x2,r4e,rde,LF=E(()=>{BX=Object.create,{getPrototypeOf:KX,defineProperty:uI,getOwnPropertyNames:HX}=Object,GX=Object.prototype.hasOwnProperty;$2=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var i=e?YX??=new WeakMap:JX??=new WeakMap,a=i.get(t);if(a)return a}r=t!=null?BX(KX(t)):{};let o=e||!t||!t.__esModule?uI(r,"default",{value:t,enumerable:!0}):r;for(let s of HX(t))GX.call(o,s)||uI(o,s,{get:QX.bind(t,s),enumerable:!0});return n&&i.set(t,o),o},le=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),XX=t=>t;vs=(t,e)=>{for(var r in e)uI(t,r,{get:e[r],enumerable:!0,configurable:!0,set:eee.bind(e,r)})},tee=Symbol.dispose||Symbol.for("Symbol.dispose"),ree=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[ree]),n===void 0&&(n=e[tee]),typeof n!="function")throw TypeError("Object not disposable");t.push([r,n,e])}else r&&t.push([r]);return e},or=(t,e,r)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(o,s,c,u){return u=Error(c),u.name="SuppressedError",u.error=o,u.suppressed=s,u},i=o=>e=r?new n(o,e,"An error was suppressed during disposal"):(r=!0,o),a=o=>{for(;o=t.pop();)try{var s=o[1]&&o[1].call(o[2]);if(o[0])return Promise.resolve(s).then(a,c=>(i(c),a()))}catch(c){i(c)}if(r)throw e};return a()},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(b){if(super(),!t.IDENTIFIER.test(b))throw Error("CodeGen: name must be a valid identifier");this.str=b}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(b){super(),this._items=typeof b=="string"?[b]:b}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let b=this._items[0];return b===""||b==='""'}get str(){var b;return(b=this._str)!==null&&b!==void 0?b:this._str=this._items.reduce((y,_)=>`${y}${_}`,"")}get names(){var b;return(b=this._names)!==null&&b!==void 0?b:this._names=this._items.reduce((y,_)=>(_ instanceof r&&(y[_.str]=(y[_.str]||0)+1),y),{})}}t._Code=n,t.nil=new n("");function i(h,...b){let y=[h[0]],_=0;for(;_<b.length;)s(y,b[_]),y.push(h[++_]);return new n(y)}t._=i;var a=new n("+");function o(h,...b){let y=[p(h[0])],_=0;for(;_<b.length;)y.push(a),s(y,b[_]),y.push(a,p(h[++_]));return c(y),new n(y)}t.str=o;function s(h,b){b instanceof n?h.push(...b._items):b instanceof r?h.push(b):h.push(d(b))}t.addCodeArg=s;function c(h){let b=1;for(;b<h.length-1;){if(h[b]===a){let y=u(h[b-1],h[b+1]);if(y!==void 0){h.splice(b-1,3,y);continue}h[b++]="+"}b++}}function u(h,b){if(b==='""')return h;if(h==='""')return b;if(typeof h=="string")return b instanceof r||h[h.length-1]!=='"'?void 0:typeof b!="string"?`${h.slice(0,-1)}${b}"`:b[0]==='"'?h.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(h instanceof r))return`"${h}${b.slice(1)}`}function l(h,b){return b.emptyStr()?h:h.emptyStr()?b:o`${h}${b}`}t.strConcat=l;function d(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:p(Array.isArray(h)?h.join(","):h)}function f(h){return new n(p(h))}t.stringify=f;function p(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=p;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}),gM=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 a 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=a;var o=e._`\n`;class s extends i{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?o:e.nil}}get(){return this._scope}name(u){return new a(u,this._newName(u))}value(u,l){var d;if(l.ref===void 0)throw Error("CodeGen: ref must be passed in value");let f=this.toName(u),{prefix:p}=f,m=(d=l.key)!==null&&d!==void 0?d:l.ref,v=this._values[p];if(v){let b=v.get(m);if(b)return b}else v=this._values[p]=new Map;v.set(m,f);let g=this._scope[p]||(this._scope[p]=[]),h=g.length;return g[h]=l.ref,f.setValue(l,{property:p,itemIndex:h}),f}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,f=>{if(f.value===void 0)throw Error(`CodeGen: name "${f}" has no value`);return f.value.code},l,d)}_reduceValues(u,l,d={},f){let p=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 b=l(h);if(b){let y=this.opts.es5?t.varKinds.var:t.varKinds.const;p=e._`${p}${y} ${h} = ${b};${this.opts._n}`}else if(b=f?.(h))p=e._`${p}${b}${this.opts._n}`;else throw new r(h);g.set(h,n.Completed)})}return p}}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=gM(),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=gM();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 a{optimizeNodes(){return this}optimizeNames(S,P){return this}}class o extends a{constructor(S,P,K){super(),this.varKind=S,this.name=P,this.rhs=K}render({es5:S,_n:P}){let K=S?r.varKinds.var:this.varKind,oe=this.rhs===void 0?"":` = ${this.rhs}`;return`${K} ${this.name}${oe};`+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 a{constructor(S,P,K){super(),this.lhs=S,this.rhs=P,this.sideEffects=K}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 L(S,this.rhs)}}class c extends s{constructor(S,P,K,oe){super(S,K,oe),this.op=P}render({_n:S}){return`${this.lhs} ${this.op}= ${this.rhs};`+S}}class u extends a{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`${this.label}:`+S}}class l extends a{constructor(S){super(),this.label=S,this.names={}}render({_n:S}){return`break${this.label?` ${this.label}`:""};`+S}}class d extends a{constructor(S){super(),this.error=S}render({_n:S}){return`throw ${this.error};`+S}get names(){return this.error.names}}class f extends a{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 p extends a{constructor(S=[]){super(),this.nodes=S}render(S){return this.nodes.reduce((P,K)=>P+K.render(S),"")}optimizeNodes(){let{nodes:S}=this,P=S.length;for(;P--;){let K=S[P].optimizeNodes();Array.isArray(K)?S.splice(P,1,...K):K?S[P]=K:S.splice(P,1)}return S.length>0?this:void 0}optimizeNames(S,P){let{nodes:K}=this,oe=K.length;for(;oe--;){let ge=K[oe];ge.optimizeNames(S,P)||(te(S,ge.names),K.splice(oe,1))}return K.length>0?this:void 0}get names(){return this.nodes.reduce((S,P)=>M(S,P.names),{})}}class m extends p{render(S){return"{"+S._n+super.render(S)+"}"+S._n}}class v extends p{}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 K=P.optimizeNodes();P=this.else=Array.isArray(K)?new g(K):K}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 K;if(this.else=(K=this.else)===null||K===void 0?void 0:K.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 L(S,this.condition),this.else&&M(S,this.else.names),S}}h.kind="if";class b extends m{}b.kind="for";class y extends b{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 _ extends b{constructor(S,P,K,oe){super(),this.varKind=S,this.name=P,this.from=K,this.to=oe}render(S){let P=S.es5?r.varKinds.var:this.varKind,{name:K,from:oe,to:ge}=this;return`for(${P} ${K}=${oe}; ${K}<${ge}; ${K}++)`+super.render(S)}get names(){let S=L(super.names,this.from);return L(S,this.to)}}class x extends b{constructor(S,P,K,oe){super(),this.loop=S,this.varKind=P,this.name=K,this.iterable=oe}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,K){super(),this.name=S,this.args=P,this.async=K}render(S){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(S)}}w.kind="func";class k extends p{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 K,oe;return super.optimizeNames(S,P),(K=this.catch)===null||K===void 0||K.optimizeNames(S,P),(oe=this.finally)===null||oe===void 0||oe.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 K=this._extScope.value(S,P);return(this._values[K.prefix]||(this._values[K.prefix]=new Set)).add(K),K}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,K,oe){let ge=this._scope.toName(P);return K!==void 0&&oe&&(this._constants[ge.str]=K),this._leafNode(new o(S,ge,K)),ge}const(S,P,K){return this._def(r.varKinds.const,S,P,K)}let(S,P,K){return this._def(r.varKinds.let,S,P,K)}var(S,P,K){return this._def(r.varKinds.var,S,P,K)}assign(S,P,K){return this._leafNode(new s(S,P,K))}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 f(S)),this}object(...S){let P=["{"];for(let[K,oe]of S)P.length>1&&P.push(","),P.push(K),(K!==oe||this.opts.es5)&&(P.push(":"),(0,e.addCodeArg)(P,oe));return P.push("}"),new e._Code(P)}if(S,P,K){if(this._blockNode(new h(S)),P&&K)this.code(P).else().code(K).endIf();else if(P)this.code(P).endIf();else if(K)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,K,oe,ge=this.opts.es5?r.varKinds.var:r.varKinds.let){let ut=this._scope.toName(S);return this._for(new _(ge,ut,P,K),()=>oe(ut))}forOf(S,P,K,oe=r.varKinds.const){let ge=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(ge,e._`${ut}[${Pe}]`),K(ge)})}return this._for(new x("of",oe,ge,P),()=>K(ge))}forIn(S,P,K,oe=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(S,e._`Object.keys(${P})`,K);let ge=this._scope.toName(S);return this._for(new x("in",oe,ge,P),()=>K(ge))}endFor(){return this._endBlockNode(b)}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,K){if(!P&&!K)throw Error('CodeGen: "try" without "catch" and "finally"');let oe=new $;if(this._blockNode(oe),this.code(S),P){let ge=this.name("e");this._currNode=oe.catch=new T(ge),P(ge)}return K&&(this._currNode=oe.finally=new A,this.code(K)),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 K=this._nodes.length-P;if(K<0||S!==void 0&&K!==S)throw Error(`CodeGen: wrong number of nodes: ${K} vs ${S} expected`);return this._nodes.length=P,this}func(S,P=e.nil,K,oe){return this._blockNode(new w(S,P,K)),oe&&this.code(oe).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 K=this._currNode;if(K instanceof S||P&&K 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 L(C,S){return S instanceof e._CodeOrName?M(C,S.names):C}function R(C,S,P){if(C instanceof e.Name)return K(C);if(!oe(C))return C;return new e._Code(C._items.reduce((ge,ut)=>(ut instanceof e.Name&&(ut=K(ut)),ut instanceof e._Code?ge.push(...ut._items):ge.push(ut),ge),[]));function K(ge){let ut=P[ge.str];return ut===void 0||S[ge.str]!==1?ge:(delete S[ge.str],ut)}function oe(ge){return ge instanceof e._Code&&ge._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._`!${W(C)}`}t.not=G;var ve=I(t.operators.AND);function Fe(...C){return C.reduce(ve)}t.and=Fe;var ye=I(t.operators.OR);function B(...C){return C.reduce(ye)}t.or=B;function I(C){return(S,P)=>S===e.nil?P:P===e.nil?S:e._`${W(S)} ${C} ${W(P)}`}function W(C){return C instanceof e.Name?C:e._`(${C})`}}),St=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:(a(w,k),!o(k,w.self.RULES.all))}t.alwaysValidSchema=i;function a(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=a;function o(w,k){if(typeof w=="boolean")return!w;for(let $ in w)if(k[$])return!0;return!1}t.schemaHasRules=o;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 f(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 f(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=f;function p(w,k){if(Array.isArray(w))for(let $ of w)k($);else k(w)}t.eachItem=p;function m({mergeNames:w,mergeToName:k,mergeValues:$,resultToName:T}){return(A,z,M,L)=>{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 L===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 b(w,k){return w.scopeValue("func",{ref:k,code:h[k.code]||(h[k.code]=new r._Code(k.code))})}t.useFunc=b;var y;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(y||(t.Type=y={}));function _(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=_;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}),ho=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}),Tv=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=St(),n=ho();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,b,y){let{it:_}=g,{gen:x,compositeRule:w,allErrors:k}=_,$=d(g,h,b);y??(w||k)?c(x,$):u(_,e._`[${$}]`)}t.reportError=i;function a(g,h=t.keywordError,b){let{it:y}=g,{gen:_,compositeRule:x,allErrors:w}=y,k=d(g,h,b);c(_,k),!(x||w)&&u(y,n.default.vErrors)}t.reportExtraError=a;function o(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=o;function s({gen:g,keyword:h,schemaValue:b,data:y,errsCount:_,it:x}){if(_===void 0)throw Error("ajv implementation error");let w=g.name("err");g.forRange("i",_,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`,b),g.assign(e._`${w}.data`,y))})}t.extendErrors=s;function c(g,h){let b=g.const("err",h);g.if(e._`${n.default.vErrors} === null`,()=>g.assign(n.default.vErrors,e._`[${b}]`),e._`${n.default.vErrors}.push(${b})`),g.code(e._`${n.default.errors}++`)}function u(g,h){let{gen:b,validateName:y,schemaEnv:_}=g;_.$async?b.throw(e._`new ${g.ValidationError}(${h})`):(b.assign(e._`${y}.errors`,h),b.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,b){let{createErrors:y}=g.it;return y===!1?e._`{}`:f(g,h,b)}function f(g,h,b={}){let{gen:y,it:_}=g,x=[p(_,b),m(g,b)];return v(g,h,x),y.object(...x)}function p({errorPath:g},{instancePath:h}){let b=h?e.str`${g}${(0,r.getErrorPath)(h,r.Type.Str)}`:g;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,b)]}function m({keyword:g,it:{errSchemaPath:h}},{schemaPath:b,parentSchema:y}){let _=y?h:e.str`${h}/${g}`;return b&&(_=e.str`${_}${(0,r.getErrorPath)(b,r.Type.Str)}`),[l.schemaPath,_]}function v(g,{params:h,message:b},y){let{keyword:_,data:x,schemaValue:w,it:k}=g,{opts:$,propertyName:T,topSchemaRef:A,schemaPath:z}=k;y.push([l.keyword,_],[l.params,typeof h=="function"?h(g):h||e._`{}`]),$.messages&&y.push([l.message,typeof b=="function"?b(g):b]),$.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=Tv(),r=et(),n=ho(),i={message:"boolean schema is false"};function a(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=a;function o(c,u){let{gen:l,schema:d}=c;d===!1?(l.var(u,!1),s(c)):l.var(u,!0)}t.boolOrEmptySchema=o;function s(c,u){let{gen:l,data:d}=c,f={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(f,i,void 0,u)}}),I2=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(a){return typeof a=="string"&&r.has(a)}t.isJSONType=n;function i(){let a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=i}),E2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:i,self:a},o){let s=a.RULES.types[o];return s&&s!==!0&&r(i,s)}t.schemaHasRulesForType=e;function r(i,a){return a.rules.some(o=>n(i,o))}t.shouldUseGroup=r;function n(i,a){var o;return i[a.keyword]!==void 0||((o=a.definition.implements)===null||o===void 0?void 0:o.some(s=>i[s]!==void 0))}t.shouldUseRule=n}),Zg=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=I2(),r=E2(),n=Tv(),i=et(),a=St(),o;(function(y){y[y.Correct=0]="Correct",y[y.Wrong=1]="Wrong"})(o||(t.DataType=o={}));function s(y){let _=c(y.type);if(_.includes("null")){if(y.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!_.length&&y.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');y.nullable===!0&&_.push("null")}return _}t.getSchemaTypes=s;function c(y){let _=Array.isArray(y)?y:y?[y]:[];if(_.every(e.isJSONType))return _;throw Error("type must be JSONType or JSONType[]: "+_.join(","))}t.getJSONTypes=c;function u(y,_){let{gen:x,data:w,opts:k}=y,$=d(_,k.coerceTypes),T=_.length>0&&!($.length===0&&_.length===1&&(0,r.schemaHasRulesForType)(y,_[0]));if(T){let A=v(_,w,k.strictNumbers,o.Wrong);x.if(A,()=>{$.length?f(y,_,$):h(y)})}return T}t.coerceAndCheckDataType=u;var l=new Set(["string","number","integer","boolean","null"]);function d(y,_){return _?y.filter(x=>l.has(x)||_==="array"&&x==="array"):[]}function f(y,_,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(_,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),p(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 p({gen:y,parentData:_,parentDataProperty:x},w){y.if(i._`${_} !== undefined`,()=>y.assign(i._`${_}[${x}]`,w))}function m(y,_,x,w=o.Correct){let k=w===o.Correct?i.operators.EQ:i.operators.NEQ,$;switch(y){case"null":return i._`${_} ${k} null`;case"array":$=i._`Array.isArray(${_})`;break;case"object":$=i._`${_} && typeof ${_} == "object" && !Array.isArray(${_})`;break;case"integer":$=T(i._`!(${_} % 1) && !isNaN(${_})`);break;case"number":$=T();break;default:return i._`typeof ${_} ${k} ${y}`}return w===o.Correct?$:(0,i.not)($);function T(A=i.nil){return(0,i.and)(i._`typeof ${_} == "number"`,A,x?i._`isFinite(${_})`:i.nil)}}t.checkDataType=m;function v(y,_,x,w){if(y.length===1)return m(y[0],_,x,w);let k,$=(0,a.toHash)(y);if($.array&&$.object){let T=i._`typeof ${_} != "object"`;k=$.null?T:i._`!${_} || ${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,_,x,w));return k}t.checkDataTypes=v;var g={message:({schema:y})=>`must be ${y}`,params:({schema:y,schemaValue:_})=>typeof y=="string"?i._`{type: ${y}}`:i._`{type: ${_}}`};function h(y){let _=b(y);(0,n.reportError)(_,g)}t.reportTypeError=h;function b(y){let{gen:_,data:x,schema:w}=y,k=(0,a.schemaRefOrVal)(y,w,"type");return{gen:_,keyword:"type",data:x,schema:w.type,schemaCode:k,schemaValue:k,parentSchema:w,params:{},it:y}}}),iee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=et(),r=St();function n(a,o){let{properties:s,items:c}=a.schema;if(o==="object"&&s)for(let u in s)i(a,u,s[u].default);else o==="array"&&Array.isArray(c)&&c.forEach((u,l)=>i(a,l,u.default))}t.assignDefaults=n;function i(a,o,s){let{gen:c,compositeRule:u,data:l,opts:d}=a;if(s===void 0)return;let f=e._`${l}${(0,e.getProperty)(o)}`;if(u){(0,r.checkStrictMode)(a,`default is ignored for: ${f}`);return}let p=e._`${f} === undefined`;d.useDefaults==="empty"&&(p=e._`${p} || ${f} === null || ${f} === ""`),c.if(p,e._`${f} = ${(0,e.stringify)(s)}`)}}),Ci=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=St(),n=ho(),i=St();function a(y,_){let{gen:x,data:w,it:k}=y;x.if(d(x,w,_,k.opts.ownProperties),()=>{y.setParams({missingProperty:e._`${_}`},!0),y.error()})}t.checkReportMissingProp=a;function o({gen:y,data:_,it:{opts:x}},w,k){return(0,e.or)(...w.map($=>(0,e.and)(d(y,_,$,x.ownProperties),e._`${k} = ${$}`)))}t.checkMissingProp=o;function s(y,_){y.setParams({missingProperty:_},!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,_,x){return e._`${c(y)}.call(${_}, ${x})`}t.isOwnProperty=u;function l(y,_,x,w){let k=e._`${_}${(0,e.getProperty)(x)} !== undefined`;return w?e._`${k} && ${u(y,_,x)}`:k}t.propertyInData=l;function d(y,_,x,w){let k=e._`${_}${(0,e.getProperty)(x)} === undefined`;return w?(0,e.or)(k,(0,e.not)(u(y,_,x))):k}t.noPropertyInData=d;function f(y){return y?Object.keys(y).filter(_=>_!=="__proto__"):[]}t.allSchemaProperties=f;function p(y,_){return f(_).filter(x=>!(0,r.alwaysValidSchema)(y,_[x]))}t.schemaProperties=p;function m({schemaCode:y,data:_,it:{gen:x,topSchemaRef:w,schemaPath:k,errorPath:$},it:T},A,z,M){let L=M?e._`${y}, ${_}, ${w}${k}`:_,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._`${L}, ${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:_}},x){let w=_.unicodeRegExp?"u":"",{regExp:k}=_.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:_,data:x,keyword:w,it:k}=y,$=_.name("valid");if(k.allErrors){let A=_.let("valid",!0);return T(()=>_.assign(A,!1)),A}return _.var($,!0),T(()=>_.break()),$;function T(A){let z=_.const("len",e._`${x}.length`);_.forRange("i",0,z,M=>{y.subschema({keyword:w,dataProp:M,dataPropType:r.Type.Num},$),_.if((0,e.not)($),A)})}}t.validateArray=h;function b(y){let{gen:_,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 $=_.let("valid",!1),T=_.name("_valid");_.block(()=>x.forEach((A,z)=>{let M=y.subschema({keyword:w,schemaProp:z,compositeRule:!0},T);_.assign($,e._`${$} || ${T}`),!y.mergeValidEvaluated(M,T)&&_.if((0,e.not)($))})),y.result($,()=>y.reset(),()=>y.error(!0))}t.validateUnion=b}),aee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=et(),r=ho(),n=Ci(),i=Tv();function a(p,m){let{gen:v,keyword:g,schema:h,parentSchema:b,it:y}=p,_=m.macro.call(y.self,h,b,y),x=l(v,g,_);y.opts.validateSchema!==!1&&y.self.validateSchema(_,!0);let w=v.name("valid");p.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${y.errSchemaPath}/${g}`,topSchemaRef:x,compositeRule:!0},w),p.pass(w,()=>p.error(!0))}t.macroKeywordCode=a;function o(p,m){var v;let{gen:g,keyword:h,schema:b,parentSchema:y,$data:_,it:x}=p;u(x,m);let w=!_&&m.compile?m.compile.call(x.self,b,y,x):m.validate,k=l(g,h,w),$=g.let("valid");p.block$data($,T),p.ok((v=m.valid)!==null&&v!==void 0?v:$);function T(){if(m.errors===!1)M(),m.modifying&&s(p),L(()=>p.error());else{let R=m.async?A():z();m.modifying&&s(p),L(()=>c(p,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&&!_||m.schema===!1);g.assign($,e._`${R}${(0,n.callValidateCode)(p,k,te,G)}`,m.modifying)}function L(R){var te;g.if((0,e.not)((te=m.valid)!==null&&te!==void 0?te:$),R)}}t.funcKeywordCode=o;function s(p){let{gen:m,data:v,it:g}=p;m.if(g.parentData,()=>m.assign(v,e._`${g.parentData}[${g.parentDataProperty}]`))}function c(p,m){let{gen:v}=p;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)(p)},()=>p.error())}function u({schemaEnv:p},m){if(m.async&&!p.$async)throw Error("async keyword in sync schema")}function l(p,m,v){if(v===void 0)throw Error(`keyword "${m}" failed to compile`);return p.scopeValue("keyword",typeof v=="function"?{ref:v}:{ref:v,code:(0,e.stringify)(v)})}function d(p,m,v=!1){return!m.length||m.some(g=>g==="array"?Array.isArray(p):g==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==g||v&&typeof p>"u")}t.validSchemaType=d;function f({schema:p,opts:m,self:v,errSchemaPath:g},h,b){if(Array.isArray(h.keyword)?!h.keyword.includes(b):h.keyword!==b)throw Error("ajv implementation error");let y=h.dependencies;if(y?.some(_=>!Object.prototype.hasOwnProperty.call(p,_)))throw Error(`parent schema must have dependencies of ${b}: ${y.join(",")}`);if(h.validateSchema&&!h.validateSchema(p[b])){let _=`keyword "${b}" value is invalid at path "${g}": `+v.errorsText(h.validateSchema.errors);if(m.validateSchema==="log")v.logger.error(_);else throw Error(_)}}t.validateKeywordUsage=f}),oee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=et(),r=St();function n(o,{keyword:s,schemaProp:c,schema:u,schemaPath:l,errSchemaPath:d,topSchemaRef:f}){if(s!==void 0&&u!==void 0)throw Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let p=o.schema[s];return c===void 0?{schema:p,schemaPath:e._`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:p[c],schemaPath:e._`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(c)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,r.escapeFragment)(c)}`}}if(u!==void 0){if(l===void 0||d===void 0||f===void 0)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:l,topSchemaRef:f,errSchemaPath:d}}throw Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function i(o,s,{dataProp:c,dataPropType:u,data:l,dataTypes:d,propertyName:f}){if(l!==void 0&&c!==void 0)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:p}=s;if(c!==void 0){let{errorPath:v,dataPathArr:g,opts:h}=s,b=p.let("data",e._`${s.data}${(0,e.getProperty)(c)}`,!0);m(b),o.errorPath=e.str`${v}${(0,r.getErrorPath)(c,u,h.jsPropertySyntax)}`,o.parentDataProperty=e._`${c}`,o.dataPathArr=[...g,o.parentDataProperty]}if(l!==void 0){let v=l instanceof e.Name?l:p.let("data",l,!0);m(v),f!==void 0&&(o.propertyName=f)}d&&(o.dataTypes=d);function m(v){o.data=v,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,v]}}t.extendSubschemaData=i;function a(o,{jtdDiscriminator:s,jtdMetadata:c,compositeRule:u,createErrors:l,allErrors:d}){u!==void 0&&(o.compositeRule=u),l!==void 0&&(o.createErrors=l),d!==void 0&&(o.allErrors=d),o.jtdDiscriminator=s,o.jtdMetadata=c}t.extendSubschemaMode=a}),P2=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 a,o,s;if(Array.isArray(n)){if(a=n.length,a!=i.length)return!1;for(o=a;o--!==0;)if(!r(n[o],i[o]))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),a=s.length,a!==Object.keys(i).length)return!1;for(o=a;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,s[o]))return!1;for(o=a;o--!==0;){var c=s[o];if(!r(n[c],i[c]))return!1}return!0}return n!==n&&i!==i}}),see=le((t,e)=>{var r=e.exports=function(a,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var c=typeof s=="function"?s:s.pre||function(){},u=s.post||function(){};n(o,c,u,a,"",a)};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(a,o,s,c,u,l,d,f,p,m){if(c&&typeof c=="object"&&!Array.isArray(c)){o(c,u,l,d,f,p,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(a,o,s,g[h],u+"/"+v+"/"+h,l,u,v,c,h)}else if(v in r.propsKeywords){if(g&&typeof g=="object")for(var b in g)n(a,o,s,g[b],u+"/"+v+"/"+i(b),l,u,v,c,b)}else(v in r.keywords||a.allKeys&&!(v in r.skipKeywords))&&n(a,o,s,g,u+"/"+v,l,u,v,c)}s(c,u,l,d,f,p,m)}}function i(a){return a.replace(/~/g,"~0").replace(/\//g,"~1")}}),zv=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=St(),r=P2(),n=see(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(g,h=!0){return typeof g=="boolean"?!0:h===!0?!s(g):h?c(g)<=h:!1}t.inlineRef=a;var o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(let h in g){if(o.has(h))return!0;let b=g[h];if(Array.isArray(b)&&b.some(s)||typeof b=="object"&&s(b))return!0}return!1}function c(g){let h=0;for(let b in g){if(b==="$ref")return 1/0;if(h++,!i.has(b)&&(typeof g[b]=="object"&&(0,e.eachItem)(g[b],y=>h+=c(y)),h===1/0))return 1/0}return h}function u(g,h="",b){b!==!1&&(h=f(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 f(g){return g?g.replace(d,""):""}t.normalizeId=f;function p(g,h,b){return b=f(b),g.resolve(h,b)}t.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function v(g,h){if(typeof g=="boolean")return{};let{schemaId:b,uriResolver:y}=this.opts,_=f(g[b]||h),x={"":_},w=u(y,_,!1),k={},$=new Set;return n(g,{allKeys:!0},(z,M,L,R)=>{if(R===void 0)return;let te=w+M,G=x[R];typeof z[b]=="string"&&(G=ve.call(this,z[b])),Fe.call(this,z.$anchor),Fe.call(this,z.$dynamicAnchor),x[M]=G;function ve(ye){let B=this.opts.uriResolver.resolve;if(ye=f(G?B(G,ye):ye),$.has(ye))throw A(ye);$.add(ye);let I=this.refs[ye];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?T(z,I.schema,ye):ye!==f(te)&&(ye[0]==="#"?(T(z,k[ye],ye),k[ye]=z):this.refs[ye]=te),ye}function Fe(ye){if(typeof ye=="string"){if(!m.test(ye))throw Error(`invalid anchor "${ye}"`);ve.call(this,`#${ye}`)}}}),k;function T(z,M,L){if(M!==void 0&&!r(z,M))throw A(L)}function A(z){return Error(`reference "${z}" resolves to more than one schema`)}}t.getSchemaRefs=v}),Ov=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=nee(),r=Zg(),n=E2(),i=Zg(),a=iee(),o=aee(),s=oee(),c=et(),u=ho(),l=zv(),d=St(),f=Tv();function p(D){if(w(D)&&($(D),x(D))){h(D);return}m(D,()=>(0,e.topBoolOrEmptySchema)(D))}t.validateFunctionCode=p;function m({gen:D,validateName:Z,schema:Q,schemaEnv:ne,opts:xe},Be){xe.code.es5?D.func(Z,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(Z,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,Z){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}`),Z.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),Z.dynamicRef&&D.var(u.default.dynamicAnchors,c._`{}`)})}function h(D){let{schema:Z,opts:Q,gen:ne}=D;m(D,()=>{Q.$comment&&Z.$comment&&R(D),z(D),ne.let(u.default.vErrors,null),ne.let(u.default.errors,0),Q.unevaluated&&b(D),T(D),te(D)})}function b(D){let{gen:Z,validateName:Q}=D;D.evaluated=Z.const("evaluated",c._`${Q}.evaluated`),Z.if(c._`${D.evaluated}.dynamicProps`,()=>Z.assign(c._`${D.evaluated}.props`,c._`undefined`)),Z.if(c._`${D.evaluated}.dynamicItems`,()=>Z.assign(c._`${D.evaluated}.items`,c._`undefined`))}function y(D,Z){let Q=typeof D=="object"&&D[Z.schemaId];return Q&&(Z.code.source||Z.code.process)?c._`/*# sourceURL=${Q} */`:c.nil}function _(D,Z){if(w(D)&&($(D),x(D))){k(D,Z);return}(0,e.boolOrEmptySchema)(D,Z)}function x({schema:D,self:Z}){if(typeof D=="boolean")return!D;for(let Q in D)if(Z.RULES.all[Q])return!0;return!1}function w(D){return typeof D.schema!="boolean"}function k(D,Z){let{schema:Q,gen:ne,opts:xe}=D;xe.$comment&&Q.$comment&&R(D),M(D),L(D);let Be=ne.const("_errs",u.default.errors);T(D,Be),ne.var(Z,c._`${Be} === ${u.default.errors}`)}function $(D){(0,d.checkUnknownRules)(D),A(D)}function T(D,Z){if(D.opts.jtd)return ve(D,[],!1,Z);let Q=(0,r.getSchemaTypes)(D.schema),ne=(0,r.coerceAndCheckDataType)(D,Q);ve(D,Q,!ne,Z)}function A(D){let{schema:Z,errSchemaPath:Q,opts:ne,self:xe}=D;Z.$ref&&ne.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(Z,xe.RULES)&&xe.logger.warn(`$ref: keywords ignored in schema at path "${Q}"`)}function z(D){let{schema:Z,opts:Q}=D;Z.default!==void 0&&Q.useDefaults&&Q.strictSchema&&(0,d.checkStrictMode)(D,"default is ignored in the schema root")}function M(D){let Z=D.schema[D.opts.schemaId];Z&&(D.baseId=(0,l.resolveUrl)(D.opts.uriResolver,D.baseId,Z))}function L(D){if(D.schema.$async&&!D.schemaEnv.$async)throw Error("async schema in sync schema")}function R({gen:D,schemaEnv:Z,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 fr=c.str`${ne}/$comment`,On=D.scopeValue("root",{ref:Z.root});D.code(c._`${u.default.self}.opts.$comment(${Be}, ${fr}, ${On}.schema)`)}}function te(D){let{gen:Z,schemaEnv:Q,validateName:ne,ValidationError:xe,opts:Be}=D;Q.$async?Z.if(c._`${u.default.errors} === 0`,()=>Z.return(u.default.data),()=>Z.throw(c._`new ${xe}(${u.default.vErrors})`)):(Z.assign(c._`${ne}.errors`,u.default.vErrors),Be.unevaluated&&G(D),Z.return(c._`${u.default.errors} === 0`))}function G({gen:D,evaluated:Z,props:Q,items:ne}){Q instanceof c.Name&&D.assign(c._`${Z}.props`,Q),ne instanceof c.Name&&D.assign(c._`${Z}.items`,ne)}function ve(D,Z,Q,ne){let{gen:xe,schema:Be,data:fr,allErrors:On,opts:Ur,self:Dr}=D,{RULES:vr}=Dr;if(Be.$ref&&(Ur.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(Be,vr))){xe.block(()=>ge(D,"$ref",vr.all.$ref.definition));return}Ur.jtd||ye(D,Z),xe.block(()=>{for(let Hr of vr.rules)Za(Hr);Za(vr.post)});function Za(Hr){(0,n.shouldUseGroup)(Be,Hr)&&(Hr.type?(xe.if((0,i.checkDataType)(Hr.type,fr,Ur.strictNumbers)),Fe(D,Hr),Z.length===1&&Z[0]===Hr.type&&Q&&(xe.else(),(0,i.reportTypeError)(D)),xe.endIf()):Fe(D,Hr),On||xe.if(c._`${u.default.errors} === ${ne||0}`))}}function Fe(D,Z){let{gen:Q,schema:ne,opts:{useDefaults:xe}}=D;xe&&(0,a.assignDefaults)(D,Z.type),Q.block(()=>{for(let Be of Z.rules)(0,n.shouldUseRule)(ne,Be)&&ge(D,Be.keyword,Be.definition,Z.type)})}function ye(D,Z){D.schemaEnv.meta||!D.opts.strictTypes||(B(D,Z),!D.opts.allowUnionTypes&&I(D,Z),W(D,D.dataTypes))}function B(D,Z){if(Z.length){if(!D.dataTypes.length){D.dataTypes=Z;return}Z.forEach(Q=>{S(D.dataTypes,Q)||K(D,`type "${Q}" not allowed by context "${D.dataTypes.join(",")}"`)}),P(D,Z)}}function I(D,Z){Z.length>1&&!(Z.length===2&&Z.includes("null"))&&K(D,"use allowUnionTypes to allow union type keyword")}function W(D,Z){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(fr=>C(Z,fr))&&K(D,`missing type "${Be.join(",")}" for keyword "${ne}"`)}}}function C(D,Z){return D.includes(Z)||Z==="number"&&D.includes("integer")}function S(D,Z){return D.includes(Z)||Z==="integer"&&D.includes("number")}function P(D,Z){let Q=[];for(let ne of D.dataTypes)S(Z,ne)?Q.push(ne):Z.includes("integer")&&ne==="number"&&Q.push("integer");D.dataTypes=Q}function K(D,Z){let Q=D.schemaEnv.baseId+D.errSchemaPath;Z+=` at "${Q}" (strictTypes)`,(0,d.checkStrictMode)(D,Z,D.opts.strictTypes)}class oe{constructor(Z,Q,ne){if((0,o.validateKeywordUsage)(Z,Q,ne),this.gen=Z.gen,this.allErrors=Z.allErrors,this.keyword=ne,this.data=Z.data,this.schema=Z.schema[ne],this.$data=Q.$data&&Z.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(Z,this.schema,ne,this.$data),this.schemaType=Q.schemaType,this.parentSchema=Z.schema,this.params={},this.it=Z,this.def=Q,this.$data)this.schemaCode=Z.gen.const("vSchema",rr(this.$data,Z));else if(this.schemaCode=this.schemaValue,!(0,o.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=Z.gen.const("_errs",u.default.errors))}result(Z,Q,ne){this.failResult((0,c.not)(Z),Q,ne)}failResult(Z,Q,ne){this.gen.if(Z),ne?ne():this.error(),Q?(this.gen.else(),Q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(Z,Q){this.failResult((0,c.not)(Z),void 0,Q)}fail(Z){if(Z===void 0){this.error(),!this.allErrors&&this.gen.if(!1);return}this.gen.if(Z),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(Z){if(!this.$data)return this.fail(Z);let{schemaCode:Q}=this;this.fail(c._`${Q} !== undefined && (${(0,c.or)(this.invalid$data(),Z)})`)}error(Z,Q,ne){if(Q){this.setParams(Q),this._error(Z,ne),this.setParams({});return}this._error(Z,ne)}_error(Z,Q){(Z?f.reportExtraError:f.reportError)(this,this.def.error,Q)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(Z){this.allErrors||this.gen.if(Z)}setParams(Z,Q){Q?Object.assign(this.params,Z):this.params=Z}block$data(Z,Q,ne=c.nil){this.gen.block(()=>{this.check$data(Z,ne),Q()})}check$data(Z=c.nil,Q=c.nil){if(!this.$data)return;let{gen:ne,schemaCode:xe,schemaType:Be,def:fr}=this;ne.if((0,c.or)(c._`${xe} === undefined`,Q)),Z!==c.nil&&ne.assign(Z,!0),(Be.length||fr.validateSchema)&&(ne.elseIf(this.invalid$data()),this.$dataError(),Z!==c.nil&&ne.assign(Z,!1)),ne.else()}invalid$data(){let{gen:Z,schemaCode:Q,schemaType:ne,def:xe,it:Be}=this;return(0,c.or)(fr(),On());function fr(){if(ne.length){if(!(Q instanceof c.Name))throw Error("ajv implementation error");let Ur=Array.isArray(ne)?ne:[ne];return c._`${(0,i.checkDataTypes)(Ur,Q,Be.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function On(){if(xe.validateSchema){let Ur=Z.scopeValue("validate$data",{ref:xe.validateSchema});return c._`!${Ur}(${Q})`}return c.nil}}subschema(Z,Q){let ne=(0,s.getSubschema)(this.it,Z);(0,s.extendSubschemaData)(ne,this.it,Z),(0,s.extendSubschemaMode)(ne,Z);let xe={...this.it,...ne,items:void 0,props:void 0};return _(xe,Q),xe}mergeEvaluated(Z,Q){let{it:ne,gen:xe}=this;ne.opts.unevaluated&&(ne.props!==!0&&Z.props!==void 0&&(ne.props=d.mergeEvaluated.props(xe,Z.props,ne.props,Q)),ne.items!==!0&&Z.items!==void 0&&(ne.items=d.mergeEvaluated.items(xe,Z.items,ne.items,Q)))}mergeValidEvaluated(Z,Q){let{it:ne,gen:xe}=this;if(ne.opts.unevaluated&&(ne.props!==!0||ne.items!==!0))return xe.if(Q,()=>this.mergeEvaluated(Z,c.Name)),!0}}t.KeywordCxt=oe;function ge(D,Z,Q,ne){let xe=new oe(D,Q,Z);"code"in Q?Q.code(xe,ne):xe.$data&&Q.validate?(0,o.funcKeywordCode)(xe,Q):"macro"in Q?(0,o.macroKeywordCode)(xe,Q):(Q.compile||Q.validate)&&(0,o.funcKeywordCode)(xe,Q)}var ut=/^\/(?:[^~]|~0|~1)*$/,Pe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function rr(D,{dataLevel:Z,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 Dr=Pe.exec(D);if(!Dr)throw Error(`Invalid JSON-pointer: ${D}`);let vr=+Dr[1];if(xe=Dr[2],xe==="#"){if(vr>=Z)throw Error(Ur("property/index",vr));return ne[Z-vr]}if(vr>Z)throw Error(Ur("data",vr));if(Be=Q[Z-vr],!xe)return Be}let fr=Be,On=xe.split("/");for(let Dr of On)Dr&&(Be=c._`${Be}${(0,c.getProperty)((0,d.unescapeJsonPointer)(Dr))}`,fr=c._`${fr} && ${Be}`);return fr;function Ur(Dr,vr){return`Cannot access ${Dr} ${vr} levels up, current level is ${Z}`}}t.getData=rr}),DI=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}),jv=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=zv();class r extends Error{constructor(i,a,o,s){super(s||`can't resolve reference ${o} from id ${a}`),this.missingRef=(0,e.resolveUrl)(i,a,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}t.default=r}),MI=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=et(),r=DI(),n=ho(),i=zv(),a=St(),o=Ov();class s{constructor(b){var y;this.refs={},this.dynamicAnchors={};let _;typeof b.schema=="object"&&(_=b.schema),this.schema=b.schema,this.schemaId=b.schemaId,this.root=b.root||this,this.baseId=(y=b.baseId)!==null&&y!==void 0?y:(0,i.normalizeId)(_?.[b.schemaId||"$id"]),this.schemaPath=b.schemaPath,this.localRefs=b.localRefs,this.meta=b.meta,this.$async=_?.$async,this.refs={}}}t.SchemaEnv=s;function c(h){let b=d.call(this,h);if(b)return b;let y=(0,i.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:_,lines:x}=this.opts.code,{ownProperties:w}=this.opts,k=new e.CodeGen(this.scope,{es5:_,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,o.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 L=Function(`${n.default.self}`,`${n.default.scope}`,z)(this,this.scope.get());if(this.scope.value(T,{ref:L}),L.errors=null,L.schema=h.schema,L.schemaEnv=h,h.$async&&(L.$async=!0),this.opts.code.source===!0&&(L.source={validateName:T,validateCode:M,scopeValues:k._values}),this.opts.unevaluated){let{props:R,items:te}=A;L.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},L.source&&(L.source.evaluated=(0,e.stringify)(L.evaluated))}return h.validate=L,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,b,y){var _;y=(0,i.resolveUrl)(this.opts.uriResolver,b,y);let x=h.refs[y];if(x)return x;let w=p.call(this,h,y);if(w===void 0){let k=(_=h.localRefs)===null||_===void 0?void 0:_[y],{schemaId:$}=this.opts;k&&(w=new s({schema:k,schemaId:$,root:h,baseId:b}))}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 b of this._compilations)if(f(b,h))return b}t.getCompilingSchema=d;function f(h,b){return h.schema===b.schema&&h.root===b.root&&h.baseId===b.baseId}function p(h,b){let y;for(;typeof(y=this.refs[b])=="string";)b=y;return y||this.schemas[b]||m.call(this,h,b)}function m(h,b){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&&_===x)return g.call(this,y,h);let w=(0,i.normalizeId)(_),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)(b)){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:b,schema:y,root:_}){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,a.unescapeFragment)($)];if(T===void 0)return;y=T;let A=typeof y=="object"&&y[this.opts.schemaId];!v.has($)&&A&&(b=(0,i.resolveUrl)(this.opts.uriResolver,b,A))}let w;if(typeof y!="boolean"&&y.$ref&&!(0,a.schemaHasRulesButRef)(y,this.RULES)){let $=(0,i.resolveUrl)(this.opts.uriResolver,b,y.$ref);w=m.call(this,_,$)}let{schemaId:k}=this.opts;if(w=w||new s({schema:y,schemaId:k,root:_,baseId:b}),w.schema!==w.root.schema)return w}}),cee=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}}),uee=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}}),lee=le((t,e)=>{var{HEX:r}=uee(),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 b=h.match(n)||[],[y]=b;return y?{host:c(y,"."),isIPV4:!0}:{host:h,isIPV4:!1}}function a(h,b=!1){let y="",_=!0;for(let x of h){if(r[x]===void 0)return;x!=="0"&&_===!0&&(_=!1),_||(y+=x)}return b&&y.length===0&&(y="0"),y}function o(h){let b=0,y={error:!1,address:"",zone:""},_=[],x=[],w=!1,k=!1,$=!1;function T(){if(x.length){if(w===!1){let A=a(x);if(A!==void 0)_.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(":"),b>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(""):$?_.push(x.join("")):_.push(a(x))),y.address=_.join(""),y}function s(h){if(u(h,":")<2)return{host:h,isIPV6:!1};let b=o(h);if(b.error)return{host:h,isIPV6:!1};{let{address:y,address:_}=b;return b.zone&&(y+="%"+b.zone,_+="%25"+b.zone),{host:y,escapedHost:_,isIPV6:!0}}}function c(h,b){let y="",_=!0,x=h.length;for(let w=0;w<x;w++){let k=h[w];k==="0"&&_?(w+1<=x&&h[w+1]===b||w+1===x)&&(y+=k,_=!1):(k===b?_=!0:_=!1,y+=k)}return y}function u(h,b){let y=0;for(let _=0;_<h.length;_++)h[_]===b&&y++;return y}var l=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,f=/^\/\.\.(?:\/|$)/u,p=/^\/?(?:.|\n)*?(?=\/|$)/u;function m(h){let b=[];for(;h.length;)if(h.match(l))h=h.replace(l,"");else if(h.match(d))h=h.replace(d,"/");else if(h.match(f))h=h.replace(f,"/"),b.pop();else if(h==="."||h==="..")h="";else{let y=h.match(p);if(y){let _=y[0];h=h.slice(_.length),b.push(_)}else throw Error("Unexpected dot segment condition")}return b.join("")}function v(h,b){let y=b!==!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 b=[];if(h.userinfo!==void 0&&(b.push(h.userinfo),b.push("@")),h.host!==void 0){let y=unescape(h.host),_=i(y);if(_.isIPV4)y=_.host;else{let x=s(_.host);x.isIPV6===!0?y=`[${x.escapedHost}]`:y=h.host}b.push(y)}return(typeof h.port=="number"||typeof h.port=="string")&&(b.push(":"),b.push(String(h.port))),b.length?b.join(""):void 0}e.exports={recomposeAuthority:g,normalizeComponentEncoding:v,removeDotSegments:m,normalizeIPv4:i,normalizeIPv6:s,stringArrayToHexStripped:a}}),dee=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(_){return typeof _.secure=="boolean"?_.secure:String(_.scheme).toLowerCase()==="wss"}function a(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function o(_){let x=String(_.scheme).toLowerCase()==="https";return(_.port===(x?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function s(_){return _.secure=i(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function c(_){if((_.port===(i(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){let[x,w]=_.resourceName.split("?");_.path=x&&x!=="/"?x:void 0,_.query=w,_.resourceName=void 0}return _.fragment=void 0,_}function u(_,x){if(!_.path)return _.error="URN can not be parsed",_;let w=_.path.match(n);if(w){let k=x.scheme||_.scheme||"urn";_.nid=w[1].toLowerCase(),_.nss=w[2];let $=`${k}:${x.nid||_.nid}`,T=y[$];_.path=void 0,T&&(_=T.parse(_,x))}else _.error=_.error||"URN can not be parsed.";return _}function l(_,x){let w=x.scheme||_.scheme||"urn",k=_.nid.toLowerCase(),$=`${w}:${x.nid||k}`,T=y[$];T&&(_=T.serialize(_,x));let A=_,z=_.nss;return A.path=`${k||x.nid}:${z}`,x.skipEscape=!0,A}function d(_,x){let w=_;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 f(_){let x=_;return x.nss=(_.uuid||"").toLowerCase(),x}var p={scheme:"http",domainHost:!0,parse:a,serialize:o},m={scheme:"https",domainHost:p.domainHost,parse:a,serialize:o},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},b={scheme:"urn:uuid",parse:d,serialize:f,skipNormalize:!0},y={http:p,https:m,ws:v,wss:g,urn:h,"urn:uuid":b};e.exports=y}),pee=le((t,e)=>{var{normalizeIPv6:r,normalizeIPv4:n,removeDotSegments:i,recomposeAuthority:a,normalizeComponentEncoding:o}=lee(),s=dee();function c(b,y){return typeof b=="string"?b=f(g(b,y),y):typeof b=="object"&&(b=g(f(b,y),y)),b}function u(b,y,_){let x=Object.assign({scheme:"null"},_),w=l(g(b,x),g(y,x),x,!0);return f(w,{...x,skipEscape:!0})}function l(b,y,_,x){let w={};return x||(b=g(f(b,_),_),y=g(f(y,_),_)),_=_||{},!_.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):((b.userinfo!==void 0||b.host!==void 0||b.port!==void 0)&&!b.path?w.path="/"+y.path:b.path?w.path=b.path.slice(0,b.path.lastIndexOf("/")+1)+y.path:w.path=y.path,w.path=i(w.path)),w.query=y.query):(w.path=b.path,y.query!==void 0?w.query=y.query:w.query=b.query),w.userinfo=b.userinfo,w.host=b.host,w.port=b.port),w.scheme=b.scheme),w.fragment=y.fragment,w}function d(b,y,_){return typeof b=="string"?(b=unescape(b),b=f(o(g(b,_),!0),{..._,skipEscape:!0})):typeof b=="object"&&(b=f(o(b,!0),{..._,skipEscape:!0})),typeof y=="string"?(y=unescape(y),y=f(o(g(y,_),!0),{..._,skipEscape:!0})):typeof y=="object"&&(y=f(o(y,!0),{..._,skipEscape:!0})),b.toLowerCase()===y.toLowerCase()}function f(b,y){let _={host:b.host,scheme:b.scheme,userinfo:b.userinfo,port:b.port,path:b.path,query:b.query,nid:b.nid,nss:b.nss,uuid:b.uuid,fragment:b.fragment,reference:b.reference,resourceName:b.resourceName,secure:b.secure,error:""},x=Object.assign({},y),w=[],k=s[(x.scheme||_.scheme||"").toLowerCase()];k&&k.serialize&&k.serialize(_,x),_.path!==void 0&&(x.skipEscape?_.path=unescape(_.path):(_.path=escape(_.path),_.scheme!==void 0&&(_.path=_.path.split("%3A").join(":")))),x.reference!=="suffix"&&_.scheme&&w.push(_.scheme,":");let $=a(_);if($!==void 0&&(x.reference!=="suffix"&&w.push("//"),w.push($),_.path&&_.path.charAt(0)!=="/"&&w.push("/")),_.path!==void 0){let T=_.path;!x.absolutePath&&(!k||!k.absolutePath)&&(T=i(T)),$===void 0&&(T=T.replace(/^\/\//u,"/%2F")),w.push(T)}return _.query!==void 0&&w.push("?",_.query),_.fragment!==void 0&&w.push("#",_.fragment),w.join("")}var p=Array.from({length:127},(b,y)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(y)));function m(b){let y=0;for(let _=0,x=b.length;_<x;++_)if(y=b.charCodeAt(_),y>126||p[y])return!0;return!1}var v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function g(b,y){let _=Object.assign({},y),x={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},w=b.indexOf("%")!==-1,k=!1;_.reference==="suffix"&&(b=(_.scheme?_.scheme+":":"")+"//"+b);let $=b.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",_.reference&&_.reference!=="suffix"&&_.reference!==x.reference&&(x.error=x.error||"URI is not a "+_.reference+" reference.");let T=s[(_.scheme||x.scheme||"").toLowerCase()];if(!_.unicodeSupport&&(!T||!T.unicodeSupport)&&x.host&&(_.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,_)}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:f,parse:g};e.exports=h,e.exports.default=h,e.exports.fastUri=h}),fee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=pee();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),mee=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=Ov();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=DI(),i=jv(),a=I2(),o=MI(),s=et(),c=zv(),u=Zg(),l=St(),d=cee(),f=fee(),p=(B,I)=>new RegExp(B,I);p.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.'},b=200;function y(B){var I,W,C,S,P,K,oe,ge,ut,Pe,rr,D,Z,Q,ne,xe,Be,fr,On,Ur,Dr,vr,Za,Hr,jn;let La=B.strict,Vs=(I=B.code)===null||I===void 0?void 0:I.optimize,Fa=Vs===!0||Vs===void 0?1:Vs||0,cl=(C=(W=B.code)===null||W===void 0?void 0:W.regExp)!==null&&C!==void 0?C:p,Z_=(S=B.uriResolver)!==null&&S!==void 0?S:f.default;return{strictSchema:(K=(P=B.strictSchema)!==null&&P!==void 0?P:La)!==null&&K!==void 0?K:!0,strictNumbers:(ge=(oe=B.strictNumbers)!==null&&oe!==void 0?oe:La)!==null&&ge!==void 0?ge:!0,strictTypes:(Pe=(ut=B.strictTypes)!==null&&ut!==void 0?ut:La)!==null&&Pe!==void 0?Pe:"log",strictTuples:(D=(rr=B.strictTuples)!==null&&rr!==void 0?rr:La)!==null&&D!==void 0?D:"log",strictRequired:(Q=(Z=B.strictRequired)!==null&&Z!==void 0?Z:La)!==null&&Q!==void 0?Q:!1,code:B.code?{...B.code,optimize:Fa,regExp:cl}:{optimize:Fa,regExp:cl},loopRequired:(ne=B.loopRequired)!==null&&ne!==void 0?ne:b,loopEnum:(xe=B.loopEnum)!==null&&xe!==void 0?xe:b,meta:(Be=B.meta)!==null&&Be!==void 0?Be:!0,messages:(fr=B.messages)!==null&&fr!==void 0?fr:!0,inlineRefs:(On=B.inlineRefs)!==null&&On!==void 0?On:!0,schemaId:(Ur=B.schemaId)!==null&&Ur!==void 0?Ur:"$id",addUsedSchema:(Dr=B.addUsedSchema)!==null&&Dr!==void 0?Dr:!0,validateSchema:(vr=B.validateSchema)!==null&&vr!==void 0?vr:!0,validateFormats:(Za=B.validateFormats)!==null&&Za!==void 0?Za:!0,unicodeRegExp:(Hr=B.unicodeRegExp)!==null&&Hr!==void 0?Hr:!0,int32range:(jn=B.int32range)!==null&&jn!==void 0?jn:!0,uriResolver:Z_}}class _{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:W,lines:C}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:v,es5:W,lines:C}),this.logger=M(I.logger);let S=I.validateFormats;I.validateFormats=!1,this.RULES=(0,a.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:W,schemaId:C}=this.opts,S=d;C==="id"&&(S={...d},S.id=S.$id,delete S.$id),W&&I&&this.addMetaSchema(S,S[C],!1)}defaultMeta(){let{meta:I,schemaId:W}=this.opts;return this.opts.defaultMeta=typeof I=="object"?I[W]||I:void 0}validate(I,W){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(W);return"$async"in C||(this.errors=C.errors),S}compile(I,W){let C=this._addSchema(I,W);return C.validate||this._compileSchemaEnv(C)}compileAsync(I,W){if(typeof this.opts.loadSchema!="function")throw Error("options.loadSchema should be a function");let{loadSchema:C}=this.opts;return S.call(this,I,W);async function S(Pe,rr){await P.call(this,Pe.$schema);let D=this._addSchema(Pe,rr);return D.validate||K.call(this,D)}async function P(Pe){Pe&&!this.getSchema(Pe)&&await S.call(this,{$ref:Pe},!0)}async function K(Pe){try{return this._compileSchemaEnv(Pe)}catch(rr){if(!(rr instanceof i.default))throw rr;return oe.call(this,rr),await ge.call(this,rr.missingSchema),K.call(this,Pe)}}function oe({missingSchema:Pe,missingRef:rr}){if(this.refs[Pe])throw Error(`AnySchema ${Pe} is loaded but ${rr} cannot be resolved`)}async function ge(Pe){let rr=await ut.call(this,Pe);this.refs[Pe]||await P.call(this,rr.$schema),this.refs[Pe]||this.addSchema(rr,Pe,W)}async function ut(Pe){let rr=this._loading[Pe];if(rr)return rr;try{return await(this._loading[Pe]=C(Pe))}finally{delete this._loading[Pe]}}}addSchema(I,W,C,S=this.opts.validateSchema){if(Array.isArray(I)){for(let K of I)this.addSchema(K,void 0,C,S);return this}let P;if(typeof I=="object"){let{schemaId:K}=this.opts;if(P=I[K],P!==void 0&&typeof P!="string")throw Error(`schema ${K} must be string`)}return W=(0,c.normalizeId)(W||P),this._checkUnique(W),this.schemas[W]=this._addSchema(I,C,W,S,!0),this}addMetaSchema(I,W,C=this.opts.validateSchema){return this.addSchema(I,W,!0,C),this}validateSchema(I,W){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&&W){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 W;for(;typeof(W=w.call(this,I))=="string";)I=W;if(W===void 0){let{schemaId:C}=this.opts,S=new o.SchemaEnv({schema:{},schemaId:C});if(W=o.resolveSchema.call(this,S,I),!W)return;this.refs[I]=W}return W.validate||this._compileSchemaEnv(W)}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 W=w.call(this,I);return typeof W=="object"&&this._cache.delete(W.schema),delete this.schemas[I],delete this.refs[I],this}case"object":{let W=I;this._cache.delete(W);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 W of I)this.addKeyword(W);return this}addKeyword(I,W){let C;if(typeof I=="string")C=I,typeof W=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),W.keyword=C);else if(typeof I=="object"&&W===void 0){if(W=I,C=W.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,W),!W)return(0,l.eachItem)(C,P=>te.call(this,P)),this;ve.call(this,W);let S={...W,type:(0,u.getJSONTypes)(W.type),schemaType:(0,u.getJSONTypes)(W.schemaType)};return(0,l.eachItem)(C,S.type.length===0?P=>te.call(this,P,S):P=>S.type.forEach(K=>te.call(this,P,S,K))),this}getKeyword(I){let W=this.RULES.all[I];return typeof W=="object"?W.definition:!!W}removeKeyword(I){let{RULES:W}=this;delete W.keywords[I],delete W.all[I];for(let C of W.rules){let S=C.rules.findIndex(P=>P.keyword===I);S>=0&&C.rules.splice(S,1)}return this}addFormat(I,W){return typeof W=="string"&&(W=new RegExp(W)),this.formats[I]=W,this}errorsText(I=this.errors,{separator:W=", ",dataVar:C="data"}={}){return!I||I.length===0?"No errors":I.map(S=>`${C}${S.instancePath} ${S.message}`).reduce((S,P)=>S+W+P)}$dataMetaSchema(I,W){let C=this.RULES.all;I=JSON.parse(JSON.stringify(I));for(let S of W){let P=S.split("/").slice(1),K=I;for(let oe of P)K=K[oe];for(let oe in C){let ge=C[oe];if(typeof ge!="object")continue;let{$data:ut}=ge.definition,Pe=K[oe];ut&&Pe&&(K[oe]=ye(Pe))}}return I}_removeAllSchemas(I,W){for(let C in I){let S=I[C];(!W||W.test(C))&&(typeof S=="string"?delete I[C]:S&&!S.meta&&(this._cache.delete(S.schema),delete I[C]))}}_addSchema(I,W,C,S=this.opts.validateSchema,P=this.opts.addUsedSchema){let K,{schemaId:oe}=this.opts;if(typeof I=="object")K=I[oe];else{if(this.opts.jtd)throw Error("schema must be object");if(typeof I!="boolean")throw Error("schema must be object or boolean")}let ge=this._cache.get(I);if(ge!==void 0)return ge;C=(0,c.normalizeId)(K||C);let ut=c.getSchemaRefs.call(this,I,C);return ge=new o.SchemaEnv({schema:I,schemaId:oe,meta:W,baseId:C,localRefs:ut}),this._cache.set(ge.schema,ge),P&&!C.startsWith("#")&&(C&&this._checkUnique(C),this.refs[C]=ge),S&&this.validateSchema(I,!0),ge}_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):o.compileSchema.call(this,I),!I.validate)throw Error("ajv implementation error");return I.validate}_compileMetaSchema(I){let W=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,I)}finally{this.opts=W}}}_.ValidationError=n.default,_.MissingRefError=i.default,t.default=_;function x(B,I,W,C="error"){for(let S in B){let P=S;P in I&&this.logger[C](`${W}: option ${S}. ${B[P]}`)}}function w(B){return B=(0,c.normalizeId)(B),this.schemas[B]||this.refs[B]}function k(){let B=this.opts.schemas;if(B)if(Array.isArray(B))this.addSchema(B);else for(let I in B)this.addSchema(B[I],I)}function $(){for(let B in this.opts.formats){let I=this.opts.formats[B];I&&this.addFormat(B,I)}}function T(B){if(Array.isArray(B)){this.addVocabulary(B);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let I in B){let W=B[I];W.keyword||(W.keyword=I),this.addKeyword(W)}}function A(){let B={...this.opts};for(let I of m)delete B[I];return B}var z={log(){},warn(){},error(){}};function M(B){if(B===!1)return z;if(B===void 0)return console;if(B.log&&B.warn&&B.error)return B;throw Error("logger must implement log, warn and error methods")}var L=/^[a-z_$][a-z0-9_$:-]*$/i;function R(B,I){let{RULES:W}=this;if((0,l.eachItem)(B,C=>{if(W.keywords[C])throw Error(`Keyword ${C} is already defined`);if(!L.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(B,I,W){var C;let S=I?.post;if(W&&S)throw Error('keyword with "post" flag cannot have "type"');let{RULES:P}=this,K=S?P.post:P.rules.find(({type:ge})=>ge===W);if(K||(K={type:W,rules:[]},P.rules.push(K)),P.keywords[B]=!0,!I)return;let oe={keyword:B,definition:{...I,type:(0,u.getJSONTypes)(I.type),schemaType:(0,u.getJSONTypes)(I.schemaType)}};I.before?G.call(this,K,oe,I.before):K.rules.push(oe),P.all[B]=oe,(C=I.implements)===null||C===void 0||C.forEach(ge=>this.addKeyword(ge))}function G(B,I,W){let C=B.rules.findIndex(S=>S.keyword===W);C>=0?B.rules.splice(C,0,I):(B.rules.push(I),this.logger.warn(`rule ${W} is not defined`))}function ve(B){let{metaSchema:I}=B;I!==void 0&&(B.$data&&this.opts.$data&&(I=ye(I)),B.validateSchema=this.compile(I,!0))}var Fe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ye(B){return{anyOf:[B,Fe]}}}),hee=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}),gee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=jv(),r=Ci(),n=et(),i=ho(),a=MI(),o=St(),s={keyword:"$ref",schemaType:"string",code(l){let{gen:d,schema:f,it:p}=l,{baseId:m,schemaEnv:v,validateName:g,opts:h,self:b}=p,{root:y}=v;if((f==="#"||f==="#/")&&m===y.baseId)return x();let _=a.resolveRef.call(b,y,m,f);if(_===void 0)throw new e.default(p.opts.uriResolver,m,f);if(_ instanceof a.SchemaEnv)return w(_);return k(_);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:f},A);l.mergeEvaluated(z),l.ok(A)}}};function c(l,d){let{gen:f}=l;return d.validate?f.scopeValue("validate",{ref:d.validate}):n._`${f.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=c;function u(l,d,f,p){let{gen:m,it:v}=l,{allErrors:g,schemaEnv:h,opts:b}=v,y=b.passContext?i.default.this:n.nil;p?_():x();function _(){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=f?.validate)===null||T===void 0?void 0:T.evaluated;if(v.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(v.props=o.mergeEvaluated.props(m,A.props,v.props));else{let z=m.var("props",n._`${$}.evaluated.props`);v.props=o.mergeEvaluated.props(m,z,v.props,n.Name)}if(v.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(v.items=o.mergeEvaluated.items(m,A.items,v.items));else{let z=m.var("items",n._`${$}.evaluated.items`);v.items=o.mergeEvaluated.items(m,z,v.items,n.Name)}}}t.callRef=u,t.default=s}),vee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=hee(),r=gee(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),yee=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:o,schemaCode:s})=>e.str`must be ${n[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>e._`{comparison: ${n[o].okStr}, limit: ${s}}`},a={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:i,code(o){let{keyword:s,data:c,schemaCode:u}=o;o.fail$data(e._`${c} ${n[s].fail} ${u} || isNaN(${c})`)}};t.default=a}),_ee=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:a,data:o,schemaCode:s,it:c}=i,u=c.opts.multipleOfPrecision,l=a.let("res"),d=u?e._`Math.abs(Math.round(${l}) - ${l}) > 1e-${u}`:e._`${l} !== parseInt(${l})`;i.fail$data(e._`(${s} === 0 || (${l} = ${o}/${s}, ${d}))`)}};t.default=n}),bee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){let n=r.length,i=0,a=0,o;for(;a<n;)i++,o=r.charCodeAt(a++),o>=55296&&o<=56319&&a<n&&(o=r.charCodeAt(a),(o&64512)===56320&&a++);return i}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),xee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=St(),n=bee(),i={message({keyword:o,schemaCode:s}){let c=o==="maxLength"?"more":"fewer";return e.str`must NOT have ${c} than ${s} characters`},params:({schemaCode:o})=>e._`{limit: ${o}}`},a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:i,code(o){let{keyword:s,data:c,schemaCode:u,it:l}=o,d=s==="maxLength"?e.operators.GT:e.operators.LT,f=l.opts.unicode===!1?e._`${c}.length`:e._`${(0,r.useFunc)(o.gen,n.default)}(${c})`;o.fail$data(e._`${f} ${d} ${u}`)}};t.default=a}),wee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ci(),r=St(),n=et(),i={message:({schemaCode:o})=>n.str`must match pattern "${o}"`,params:({schemaCode:o})=>n._`{pattern: ${o}}`},a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:i,code(o){let{gen:s,data:c,$data:u,schema:l,schemaCode:d,it:f}=o,p=f.opts.unicodeRegExp?"u":"";if(u){let{regExp:m}=f.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}, ${p}).test(${c})`),()=>s.assign(g,!1)),o.fail$data(n._`!${g}`)}else{let m=(0,e.usePattern)(o,l);o.fail$data(n._`!${m}.test(${c})`)}}};t.default=a}),kee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message({keyword:i,schemaCode:a}){let o=i==="maxProperties"?"more":"fewer";return e.str`must NOT have ${o} than ${a} properties`},params:({schemaCode:i})=>e._`{limit: ${i}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(i){let{keyword:a,data:o,schemaCode:s}=i,c=a==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data(e._`Object.keys(${o}).length ${c} ${s}`)}};t.default=n}),See=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ci(),r=et(),n=St(),i={message:({params:{missingProperty:o}})=>r.str`must have required property '${o}'`,params:({params:{missingProperty:o}})=>r._`{missingProperty: ${o}}`},a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:i,code(o){let{gen:s,schema:c,schemaCode:u,data:l,$data:d,it:f}=o,{opts:p}=f;if(!d&&c.length===0)return;let m=c.length>=p.loopRequired;if(f.allErrors?v():g(),p.strictRequired){let y=o.parentSchema.properties,{definedProperties:_}=o.it;for(let x of c)if(y?.[x]===void 0&&!_.has(x)){let w=f.schemaEnv.baseId+f.errSchemaPath,k=`required property "${x}" is not defined at "${w}" (strictRequired)`;(0,n.checkStrictMode)(f,k,f.opts.strictRequired)}}function v(){if(m||d)o.block$data(r.nil,h);else for(let y of c)(0,e.checkReportMissingProp)(o,y)}function g(){let y=s.let("missing");if(m||d){let _=s.let("valid",!0);o.block$data(_,()=>b(y,_)),o.ok(_)}else s.if((0,e.checkMissingProp)(o,c,y)),(0,e.reportMissingProp)(o,y),s.else()}function h(){s.forOf("prop",u,y=>{o.setParams({missingProperty:y}),s.if((0,e.noPropertyInData)(s,l,y,p.ownProperties),()=>o.error())})}function b(y,_){o.setParams({missingProperty:y}),s.forOf(y,u,()=>{s.assign(_,(0,e.propertyInData)(s,l,y,p.ownProperties)),s.if((0,r.not)(_),()=>{o.error(),s.break()})},r.nil)}}};t.default=a}),$ee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r={message({keyword:i,schemaCode:a}){let o=i==="maxItems"?"more":"fewer";return e.str`must NOT have ${o} than ${a} items`},params:({schemaCode:i})=>e._`{limit: ${i}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(i){let{keyword:a,data:o,schemaCode:s}=i,c=a==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data(e._`${o}.length ${c} ${s}`)}};t.default=n}),qI=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=P2();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),Iee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Zg(),r=et(),n=St(),i=qI(),a={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}}`},o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a,code(s){let{gen:c,data:u,$data:l,schema:d,parentSchema:f,schemaCode:p,it:m}=s;if(!l&&!d)return;let v=c.let("valid"),g=f.items?(0,e.getSchemaTypes)(f.items):[];s.block$data(v,h,r._`${p} === 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`,()=>(b()?y:_)(x,w))}function b(){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 _(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=o}),Eee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=St(),n=qI(),i={message:"must be equal to constant",params:({schemaCode:o})=>e._`{allowedValue: ${o}}`},a={keyword:"const",$data:!0,error:i,code(o){let{gen:s,data:c,$data:u,schemaCode:l,schema:d}=o;u||d&&typeof d=="object"?o.fail$data(e._`!${(0,r.useFunc)(s,n.default)}(${c}, ${l})`):o.fail(e._`${d} !== ${c}`)}};t.default=a}),Pee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=St(),n=qI(),i={message:"must be equal to one of the allowed values",params:({schemaCode:o})=>e._`{allowedValues: ${o}}`},a={keyword:"enum",schemaType:"array",$data:!0,error:i,code(o){let{gen:s,data:c,$data:u,schema:l,schemaCode:d,it:f}=o;if(!u&&l.length===0)throw Error("enum must have non-empty array");let p=l.length>=f.opts.loopEnum,m,v=()=>m??(m=(0,r.useFunc)(s,n.default)),g;if(p||u)g=s.let("valid"),o.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((_,x)=>b(y,x)))}o.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 b(y,_){let x=l[_];return typeof x=="object"&&x!==null?e._`${v()}(${c}, ${y}[${_}])`:e._`${c} === ${x}`}}};t.default=a}),Tee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=yee(),r=_ee(),n=xee(),i=wee(),a=kee(),o=See(),s=$ee(),c=Iee(),u=Eee(),l=Pee(),d=[e.default,r.default,n.default,i.default,a.default,o.default,s.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];t.default=d}),T2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=et(),r=St(),n={message:({params:{len:o}})=>e.str`must NOT have more than ${o} items`,params:({params:{len:o}})=>e._`{limit: ${o}}`},i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(o){let{parentSchema:s,it:c}=o,{items:u}=s;if(!Array.isArray(u)){(0,r.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(o,u)}};function a(o,s){let{gen:c,schema:u,data:l,keyword:d,it:f}=o;f.items=!0;let p=c.const("len",e._`${l}.length`);if(u===!1)o.setParams({len:s.length}),o.pass(e._`${p} <= ${s.length}`);else if(typeof u=="object"&&!(0,r.alwaysValidSchema)(f,u)){let v=c.var("valid",e._`${p} <= ${s.length}`);c.if((0,e.not)(v),()=>m(v)),o.ok(v)}function m(v){c.forRange("i",s.length,p,g=>{o.subschema({keyword:d,dataProp:g,dataPropType:r.Type.Num},v),!f.allErrors&&c.if((0,e.not)(v),()=>c.break())})}}t.validateAdditionalItems=a,t.default=i}),z2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=et(),r=St(),n=Ci(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){let{schema:s,it:c}=o;if(Array.isArray(s))return a(o,"additionalItems",s);c.items=!0,!(0,r.alwaysValidSchema)(c,s)&&o.ok((0,n.validateArray)(o))}};function a(o,s,c=o.schema){let{gen:u,parentSchema:l,data:d,keyword:f,it:p}=o;g(l),p.opts.unevaluated&&c.length&&p.items!==!0&&(p.items=r.mergeEvaluated.items(u,c.length,p.items));let m=u.name("valid"),v=u.const("len",e._`${d}.length`);c.forEach((h,b)=>{(0,r.alwaysValidSchema)(p,h)||(u.if(e._`${v} > ${b}`,()=>o.subschema({keyword:f,schemaProp:b,dataProp:b},m)),o.ok(m))});function g(h){let{opts:b,errSchemaPath:y}=p,_=c.length,x=_===h.minItems&&(_===h.maxItems||h[s]===!1);if(b.strictTuples&&!x){let w=`"${f}" is ${_}-tuple, but minItems or maxItems/${s} are not specified or different at path "${y}"`;(0,r.checkStrictMode)(p,w,b.strictTuples)}}}t.validateTuple=a,t.default=i}),zee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=z2(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Oee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=St(),n=Ci(),i=T2(),a={message:({params:{len:s}})=>e.str`must NOT have more than ${s} items`,params:({params:{len:s}})=>e._`{limit: ${s}}`},o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:a,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=o}),jee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=St(),n={message:({params:{min:a,max:o}})=>o===void 0?e.str`must contain at least ${a} valid item(s)`:e.str`must contain at least ${a} and no more than ${o} valid item(s)`,params:({params:{min:a,max:o}})=>o===void 0?e._`{minContains: ${a}}`:e._`{minContains: ${a}, maxContains: ${o}}`},i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(a){let{gen:o,schema:s,parentSchema:c,data:u,it:l}=a,d,f,{minContains:p,maxContains:m}=c;l.opts.next?(d=p===void 0?1:p,f=m):d=1;let v=o.const("len",e._`${u}.length`);if(a.setParams({min:d,max:f}),f===void 0&&d===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(f!==void 0&&d>f){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,r.alwaysValidSchema)(l,s)){let _=e._`${v} >= ${d}`;f!==void 0&&(_=e._`${_} && ${v} <= ${f}`),a.pass(_);return}l.items=!0;let g=o.name("valid");f===void 0&&d===1?b(g,()=>o.if(g,()=>o.break())):d===0?(o.let(g,!0),f!==void 0&&o.if(e._`${u}.length > 0`,h)):(o.let(g,!1),h()),a.result(g,()=>a.reset());function h(){let _=o.name("_valid"),x=o.let("count",0);b(_,()=>o.if(_,()=>y(x)))}function b(_,x){o.forRange("i",0,v,w=>{a.subschema({keyword:"contains",dataProp:w,dataPropType:r.Type.Num,compositeRule:!0},_),x()})}function y(_){o.code(e._`${_}++`),f===void 0?o.if(e._`${_} >= ${d}`,()=>o.assign(g,!0).break()):(o.if(e._`${_} > ${f}`,()=>o.assign(g,!1).break()),d===1?o.assign(g,!0):o.if(e._`${_} >= ${d}`,()=>o.assign(g,!0)))}}};t.default=i}),Nee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=et(),r=St(),n=Ci();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]=a(c);o(c,u),s(c,l)}};function a({schema:c}){let u={},l={};for(let d in c){if(d==="__proto__")continue;let f=Array.isArray(c[d])?u:l;f[d]=c[d]}return[u,l]}function o(c,u=c.schema){let{gen:l,data:d,it:f}=c;if(Object.keys(u).length===0)return;let p=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,f.opts.ownProperties);c.setParams({property:m,depsCount:v.length,deps:v.join(", ")}),f.allErrors?l.if(g,()=>{for(let h of v)(0,n.checkReportMissingProp)(c,h)}):(l.if(e._`${g} && (${(0,n.checkMissingProp)(c,v,p)})`),(0,n.reportMissingProp)(c,p),l.else())}}t.validatePropertyDeps=o;function s(c,u=c.schema){let{gen:l,data:d,keyword:f,it:p}=c,m=l.name("valid");for(let v in u)(0,r.alwaysValidSchema)(p,u[v])||(l.if((0,n.propertyInData)(l,d,v,p.opts.ownProperties),()=>{let g=c.subschema({keyword:f,schemaProp:v},m);c.mergeValidEvaluated(g,m)},()=>l.var(m,!0)),c.ok(m))}t.validateSchemaDeps=s,t.default=i}),Ree=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=St(),n={message:"property name must be valid",params:({params:a})=>e._`{propertyName: ${a.propertyName}}`},i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(a){let{gen:o,schema:s,data:c,it:u}=a;if((0,r.alwaysValidSchema)(u,s))return;let l=o.name("valid");o.forIn("key",c,d=>{a.setParams({propertyName:d}),a.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),o.if((0,e.not)(l),()=>{a.error(!0),!u.allErrors&&o.break()})}),a.ok(l)}};t.default=i}),O2=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ci(),r=et(),n=ho(),i=St(),a={message:"must NOT have additional properties",params:({params:s})=>r._`{additionalProperty: ${s.additionalProperty}}`},o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:a,code(s){let{gen:c,schema:u,parentSchema:l,data:d,errsCount:f,it:p}=s;if(!f)throw Error("ajv implementation error");let{allErrors:m,opts:v}=p;if(p.props=!0,v.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(p,u))return;let g=(0,e.allSchemaProperties)(l.properties),h=(0,e.allSchemaProperties)(l.patternProperties);b(),s.ok(r._`${f} === ${n.default.errors}`);function b(){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)(p,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 _(k){c.code(r._`delete ${d}[${k}]`)}function x(k){if(v.removeAdditional==="all"||v.removeAdditional&&u===!1){_(k);return}if(u===!1){s.setParams({additionalProperty:k}),s.error(),!m&&c.break();return}if(typeof u=="object"&&!(0,i.alwaysValidSchema)(p,u)){let $=c.name("valid");v.removeAdditional==="failing"?(w(k,$,!1),c.if((0,r.not)($),()=>{s.reset(),_(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=o}),Cee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ov(),r=Ci(),n=St(),i=O2(),a={keyword:"properties",type:"object",schemaType:"object",code(o){let{gen:s,schema:c,parentSchema:u,data:l,it:d}=o;d.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(d,i.default,"additionalProperties"));let f=(0,r.allSchemaProperties)(c);for(let h of f)d.definedProperties.add(h);d.opts.unevaluated&&f.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(s,(0,n.toHash)(f),d.props));let p=f.filter(h=>!(0,n.alwaysValidSchema)(d,c[h]));if(p.length===0)return;let m=s.name("valid");for(let h of p)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()),o.it.definedProperties.add(h),o.ok(m);function v(h){return d.opts.useDefaults&&!d.compositeRule&&c[h].default!==void 0}function g(h){o.subschema({keyword:"properties",schemaProp:h,dataProp:h},m)}}};t.default=a}),Aee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ci(),r=et(),n=St(),i=St(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(o){let{gen:s,schema:c,data:u,parentSchema:l,it:d}=o,{opts:f}=d,p=(0,e.allSchemaProperties)(c),m=p.filter(x=>(0,n.alwaysValidSchema)(d,c[x]));if(p.length===0||m.length===p.length&&(!d.opts.unevaluated||d.props===!0))return;let v=f.strictSchema&&!f.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;b();function b(){for(let x of p)v&&y(x),d.allErrors?_(x):(s.var(g,!0),_(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 _(x){s.forIn("key",u,w=>{s.if(r._`${(0,e.usePattern)(o,x)}.test(${w})`,()=>{let k=m.includes(x);k||o.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=a}),Uee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=St(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){let{gen:i,schema:a,it:o}=n;if((0,e.alwaysValidSchema)(o,a)){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}),Dee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ci(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),Mee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=St(),n={message:"must match exactly one schema in oneOf",params:({params:a})=>e._`{passingSchemas: ${a.passing}}`},i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(a){let{gen:o,schema:s,parentSchema:c,it:u}=a;if(!Array.isArray(s))throw Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;let l=s,d=o.let("valid",!1),f=o.let("passing",null),p=o.name("_valid");a.setParams({passing:f}),o.block(m),a.result(d,()=>a.reset(),()=>a.error(!0));function m(){l.forEach((v,g)=>{let h;(0,r.alwaysValidSchema)(u,v)?o.var(p,!0):h=a.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},p),g>0&&o.if(e._`${p} && ${d}`).assign(d,!1).assign(f,e._`[${f}, ${g}]`).else(),o.if(p,()=>{o.assign(d,!0),o.assign(f,g),h&&a.mergeEvaluated(h,e.Name)})})}}};t.default=i}),qee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=St(),r={keyword:"allOf",schemaType:"array",code(n){let{gen:i,schema:a,it:o}=n;if(!Array.isArray(a))throw Error("ajv implementation error");let s=i.name("valid");a.forEach((c,u)=>{if((0,e.alwaysValidSchema)(o,c))return;let l=n.subschema({keyword:"allOf",schemaProp:u},s);n.ok(s),n.mergeEvaluated(l)})}};t.default=r}),Zee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=St(),n={message:({params:o})=>e.str`must match "${o.ifClause}" schema`,params:({params:o})=>e._`{failingKeyword: ${o.ifClause}}`},i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(o){let{gen:s,parentSchema:c,it:u}=o;c.then===void 0&&c.else===void 0&&(0,r.checkStrictMode)(u,'"if" without "then" and "else" is ignored');let l=a(u,"then"),d=a(u,"else");if(!l&&!d)return;let f=s.let("valid",!0),p=s.name("_valid");if(m(),o.reset(),l&&d){let g=s.let("ifClause");o.setParams({ifClause:g}),s.if(p,v("then",g),v("else",g))}else l?s.if(p,v("then")):s.if((0,e.not)(p),v("else"));o.pass(f,()=>o.error(!0));function m(){let g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},p);o.mergeEvaluated(g)}function v(g,h){return()=>{let b=o.subschema({keyword:g},p);s.assign(f,p),o.mergeValidEvaluated(b,f),h?s.assign(h,e._`${g}`):o.setParams({ifClause:g})}}}};function a(o,s){let c=o.schema[s];return c!==void 0&&!(0,r.alwaysValidSchema)(o,c)}t.default=i}),Lee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=St(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:i,it:a}){i.if===void 0&&(0,e.checkStrictMode)(a,`"${n}" without "if" is ignored`)}};t.default=r}),Fee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=T2(),r=zee(),n=z2(),i=Oee(),a=jee(),o=Nee(),s=Ree(),c=O2(),u=Cee(),l=Aee(),d=Uee(),f=Dee(),p=Mee(),m=qee(),v=Zee(),g=Lee();function h(b=!1){let y=[d.default,f.default,p.default,m.default,v.default,g.default,s.default,c.default,o.default,u.default,l.default];return b?y.push(r.default,i.default):y.push(e.default,n.default),y.push(a.default),y}t.default=h}),Vee=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,a){let{gen:o,data:s,$data:c,schema:u,schemaCode:l,it:d}=i,{opts:f,errSchemaPath:p,schemaEnv:m,self:v}=d;if(!f.validateFormats)return;c?g():h();function g(){let b=o.scopeValue("formats",{ref:v.formats,code:f.code.formats}),y=o.const("fDef",e._`${b}[${l}]`),_=o.let("fType"),x=o.let("format");o.if(e._`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>o.assign(_,e._`${y}.type || "string"`).assign(x,e._`${y}.validate`),()=>o.assign(_,e._`"string"`).assign(x,y)),i.fail$data((0,e.or)(w(),k()));function w(){return f.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 && ${_} === ${a} && !${T}`}}function h(){let b=v.formats[u];if(!b){w();return}if(b===!0)return;let[y,_,x]=k(b);y===a&&i.pass($());function w(){if(f.strictSchema===!1){v.logger.warn(T());return}throw Error(T());function T(){return`unknown format "${u}" ignored in schema at path "${p}"`}}function k(T){let A=T instanceof RegExp?(0,e.regexpCode)(T):f.code.formats?e._`${f.code.formats}${(0,e.getProperty)(u)}`:void 0,z=o.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 b=="object"&&!(b instanceof RegExp)&&b.async){if(!m.$async)throw Error("async format in sync schema");return e._`await ${x}(${s})`}return typeof _=="function"?e._`${x}(${s})`:e._`${x}.test(${s})`}}}};t.default=n}),Wee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Vee(),r=[e.default];t.default=r}),Bee=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"]}),Kee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=vee(),r=Tee(),n=Fee(),i=Wee(),a=Bee(),o=[e.default,r.default,(0,n.default)(),i.default,a.metadataVocabulary,a.contentVocabulary];t.default=o}),Hee=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={}))}),Gee=le(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=et(),r=Hee(),n=MI(),i=jv(),a=St(),o={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:o,code(c){let{gen:u,data:l,schema:d,parentSchema:f,it:p}=c,{oneOf:m}=f;if(!p.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"`,()=>b(),()=>c.error(!1,{discrError:r.DiscrError.Tag,tag:h,tagName:v})),c.ok(g);function b(){let x=_();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 _(){var x;let w={},k=T(f),$=!0;for(let M=0;M<m.length;M++){let L=m[M];if(L?.$ref&&!(0,a.schemaHasRulesButRef)(L,p.self.RULES)){let te=L.$ref;if(L=n.resolveRef.call(p.self,p.schemaEnv.root,p.baseId,te),L instanceof n.SchemaEnv&&(L=L.schema),L===void 0)throw new i.default(p.opts.uriResolver,p.baseId,te)}let R=(x=L?.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(L)),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,L){if(M.const)z(M.const,L);else if(M.enum)for(let R of M.enum)z(R,L);else throw Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function z(M,L){if(typeof M!="string"||M in w)throw Error(`discriminator: "${v}" values must be unique strings`);w[M]=L}}}};t.default=s}),Qee=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=mee(),n=Kee(),i=Gee(),a=Qee(),o=["/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(a,o):a;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=Ov();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=DI();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=jv();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})}),Yee=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(a,o),time:e(c(!0),u),"date-time":e(f(!0),p),"iso-time":e(c(),l),"iso-date-time":e(f(),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$/,o),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,p),"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 a(z){let M=n.exec(z);if(!M)return!1;let L=+M[1],R=+M[2],te=+M[3];return R>=1&&R<=12&&te>=1&&te<=(R===2&&r(L)?29:i[R])}function o(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 L=s.exec(M);if(!L)return!1;let R=+L[1],te=+L[2],G=+L[3],ve=L[4],Fe=L[5]==="-"?-1:1,ye=+(L[6]||0),B=+(L[7]||0);if(ye>23||B>59||z&&!ve)return!1;if(R<=23&&te<=59&&G<60)return!0;let I=te-B*Fe,W=R-ye*Fe-(I<0?1:0);return(W===23||W===-1)&&(I===59||I===-1)&&G<61}}function u(z,M){if(!(z&&M))return;let L=new Date("2020-01-01T"+z).valueOf(),R=new Date("2020-01-01T"+M).valueOf();if(L&&R)return L-R}function l(z,M){if(!(z&&M))return;let L=s.exec(z),R=s.exec(M);if(L&&R)return z=L[1]+L[2]+L[3],M=R[1]+R[2]+R[3],z>M?1:z<M?-1:0}var d=/t|\s/i;function f(z){let M=c(z);return function(L){let R=L.split(d);return R.length===2&&a(R[0])&&M(R[1])}}function p(z,M){if(!(z&&M))return;let L=new Date(z).valueOf(),R=new Date(M).valueOf();if(L&&R)return L-R}function m(z,M){if(!(z&&M))return;let[L,R]=z.split(d),[te,G]=M.split(d),ve=o(L,te);if(ve!==void 0)return ve||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 b=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(z){return b.lastIndex=0,b.test(z)}var _=-2147483648,x=2147483647;function w(z){return Number.isInteger(z)&&z<=x&&z>=_}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}}}),Jee=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}},a={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:a,code(s){let{gen:c,data:u,schemaCode:l,keyword:d,it:f}=s,{opts:p,self:m}=f;if(!p.validateFormats)return;let v=new e.KeywordCxt(f,m.RULES.all.format.definition,"format");v.$data?g():h();function g(){let y=c.scopeValue("formats",{ref:m.formats,code:p.code.formats}),_=c.const("fmt",r._`${y}[${v.schemaCode}]`);s.fail$data((0,r.or)(r._`typeof ${_} != "object"`,r._`${_} instanceof RegExp`,r._`typeof ${_}.compare != "function"`,b(_)))}function h(){let y=v.schema,_=m.formats[y];if(!_||_===!0)return;if(typeof _!="object"||_ instanceof RegExp||typeof _.compare!="function")throw Error(`"${d}": format "${y}" does not define "compare" function`);let x=c.scopeValue("formats",{key:y,ref:_,code:p.code.formats?r._`${p.code.formats}${(0,r.getProperty)(y)}`:void 0});s.fail$data(b(x))}function b(y){return r._`${y}.compare(${u}, ${l}) ${i[d].fail} 0`}},dependencies:["format"]};var o=s=>(s.addKeyword(t.formatLimitDefinition),s);t.default=o}),Xee=le((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=Yee(),n=Jee(),i=et(),a=new i.Name("fullFormats"),o=new i.Name("fastFormats"),s=(u,l={keywords:!0})=>{if(Array.isArray(l))return c(u,l,r.fullFormats,a),u;let[d,f]=l.mode==="fast"?[r.fastFormats,o]:[r.fullFormats,a],p=l.formats||r.formatNames;return c(u,p,d,f),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,f){var p,m;(p=(m=u.opts.code).formats)!==null&&p!==void 0||(m.formats=i._`require("ajv-formats/dist/formats").${f}`);for(let v of l)u.addFormat(v,d[v])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s}),lte=50;uo=class extends Error{};hte=typeof global=="object"&&global&&global.Object===Object&&global,gte=hte,vte=typeof self=="object"&&self&&self.Object===Object&&self,yte=gte||vte||Function("return this")(),ZI=yte,_te=ZI.Symbol,Lg=_te,U2=Object.prototype,bte=U2.hasOwnProperty,xte=U2.toString,Vd=Lg?Lg.toStringTag:void 0;kte=wte,Ste=Object.prototype,$te=Ste.toString;Ete=Ite,Pte="[object Null]",Tte="[object Undefined]",yM=Lg?Lg.toStringTag:void 0;Ote=zte;D2=jte,Nte="[object AsyncFunction]",Rte="[object Function]",Cte="[object GeneratorFunction]",Ate="[object Proxy]";Dte=Ute,Mte=ZI["__core-js_shared__"],Y$=Mte,_M=(function(){var t=/[^.]+$/.exec(Y$&&Y$.keys&&Y$.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();Zte=qte,Lte=Function.prototype,Fte=Lte.toString;Wte=Vte,Bte=/[\\^$.*+?()[\]{}|]/g,Kte=/^\[object .+?Constructor\]$/,Hte=Function.prototype,Gte=Object.prototype,Qte=Hte.toString,Yte=Gte.hasOwnProperty,Jte=RegExp("^"+Qte.call(Yte).replace(Bte,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");ere=Xte;rre=tre;M2=nre,ire=M2(Object,"create"),fp=ire;ore=are;cre=sre,ure="__lodash_hash_undefined__",lre=Object.prototype,dre=lre.hasOwnProperty;fre=pre,mre=Object.prototype,hre=mre.hasOwnProperty;vre=gre,yre="__lodash_hash_undefined__";bre=_re;hu.prototype.clear=ore;hu.prototype.delete=cre;hu.prototype.get=fre;hu.prototype.has=vre;hu.prototype.set=bre;bM=hu;wre=xre;Sre=kre;Nv=$re,Ire=Array.prototype,Ere=Ire.splice;Tre=Pre;Ore=zre;Nre=jre;Cre=Rre;gu.prototype.clear=wre;gu.prototype.delete=Tre;gu.prototype.get=Ore;gu.prototype.has=Nre;gu.prototype.set=Cre;Are=gu,Ure=M2(ZI,"Map"),Dre=Ure;qre=Mre;Lre=Zre;Rv=Fre;Wre=Vre;Kre=Bre;Gre=Hre;Yre=Qre;vu.prototype.clear=qre;vu.prototype.delete=Wre;vu.prototype.get=Kre;vu.prototype.has=Gre;vu.prototype.set=Yre;q2=vu,Jre="Expected a function";LI.Cache=q2;go=LI,FI=go(()=>(process.env.CLAUDE_CONFIG_DIR??ene(Xre(),".claude")).normalize("NFC"),()=>process.env.CLAUDE_CONFIG_DIR);Z2=function(){let{crypto:t}=globalThis;if(t?.randomUUID)return Z2=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))};dI=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{},sn=class t extends Ae{constructor(e,r,n,i,a){super(`${t.makeMessage(e,r,n)}`),this.status=e,this.headers=i,this.requestID=i?.get("request-id"),this.error=r,this.type=a??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 Yc({message:n,cause:dI(r)});let a=r,o=a?.error?.type;return e===400?new Vg(e,a,n,i,o):e===401?new Wg(e,a,n,i,o):e===403?new Bg(e,a,n,i,o):e===404?new Kg(e,a,n,i,o):e===409?new Hg(e,a,n,i,o):e===422?new Gg(e,a,n,i,o):e===429?new Qg(e,a,n,i,o):e>=500?new Yg(e,a,n,i,o):new t(e,a,n,i,o)}},Wn=class extends sn{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},Yc=class extends sn{constructor({message:e,cause:r}){super(void 0,void 0,e||"Connection error.",void 0),r&&(this.cause=r)}},Fg=class extends Yc{constructor({message:e}={}){super({message:e??"Request timed out."})}},Vg=class extends sn{},Wg=class extends sn{},Bg=class extends sn{},Kg=class extends sn{},Hg=class extends sn{},Gg=class extends sn{},Qg=class extends sn{},Yg=class extends sn{},tne=/^[a-z][a-z0-9+.-]*:/i,rne=t=>tne.test(t),pI=t=>(pI=Array.isArray,pI(t)),xM=pI;ine=(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},L2=t=>{try{return JSON.parse(t)}catch{return}},ane=t=>new Promise(e=>setTimeout(e,t)),Fc="0.81.0",one=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";cne=()=>{let t=sne();if(t==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Fc,"X-Stainless-OS":SM(Deno.build.os),"X-Stainless-Arch":kM(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":Fc,"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":Fc,"X-Stainless-OS":SM(globalThis.process.platform??"unknown"),"X-Stainless-Arch":kM(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=une();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":Fc,"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":Fc,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};kM=t=>t==="x32"?"x32":t==="x86_64"||t==="x64"?"x64":t==="arm"?"arm":t==="aarch64"||t==="arm64"?"arm64":t?`other:${t}`:"unknown",SM=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"),lne=()=>$M??($M=cne());fne=({headers:t,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)});ls=class{constructor(){Zn.set(this,void 0),Ln.set(this,void 0),fe(this,Zn,new Uint8Array,"f"),fe(this,Ln,null,"f")}decode(e){if(e==null)return[];let r=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?WI(e):e;fe(this,Zn,hne([q(this,Zn,"f"),r]),"f");let n=[],i;for(;(i=gne(q(this,Zn,"f"),q(this,Ln,"f")))!=null;){if(i.carriage&&q(this,Ln,"f")==null){fe(this,Ln,i.index,"f");continue}if(q(this,Ln,"f")!=null&&(i.index!==q(this,Ln,"f")+1||i.carriage)){n.push(PM(q(this,Zn,"f").subarray(0,q(this,Ln,"f")-1))),fe(this,Zn,q(this,Zn,"f").subarray(q(this,Ln,"f")),"f"),fe(this,Ln,null,"f");continue}let a=q(this,Ln,"f")!==null?i.preceding-1:i.preceding,o=PM(q(this,Zn,"f").subarray(0,a));n.push(o),fe(this,Zn,q(this,Zn,"f").subarray(i.index),"f"),fe(this,Ln,null,"f")}return n}flush(){return q(this,Zn,"f").length?this.decode(`
148
+ `):[]}};Zn=new WeakMap,Ln=new WeakMap;ls.NEWLINE_CHARS=new Set([`
149
+ `,"\r"]);ls.NEWLINE_REGEXP=/\r\n|[\n\r]/g;Jg={off:0,error:200,warn:300,info:400,debug:500},TM=(t,e,r)=>{if(t){if(nne(Jg,t))return t;an(r).warn(`${e} was set to ${JSON.stringify(t)}, expected one of ${JSON.stringify(Object.keys(Jg))}`)}};yne={error:sp,warn:sp,info:sp,debug:sp},zM=new WeakMap;ss=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),ds=class t{constructor(e,r,n){this.iterator=e,Wd.set(this,void 0),this.controller=r,fe(this,Wd,n,"f")}static fromSSEResponse(e,r,n){let i=!1,a=n?an(n):console;async function*o(){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 _ne(e,r)){if(c.event==="completion")try{yield JSON.parse(c.data)}catch(u){throw a.error("Could not parse message into JSON:",c.data),a.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 a.error("Could not parse message into JSON:",c.data),a.error("From chunk:",c.raw),u}if(c.event!=="ping"&&c.event==="error"){let u=L2(c.data)??c.data,l=u?.error?.type;throw new sn(void 0,u,void 0,e.headers,l)}}s=!0}catch(c){if(mp(c))return;throw c}finally{s||r.abort()}}return new t(o,r,n)}static fromReadableStream(e,r,n){let i=!1;async function*a(){let s=new ls,c=VI(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*o(){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 a())s||c&&(yield JSON.parse(c));s=!0}catch(c){if(mp(c))return;throw c}finally{s||r.abort()}}return new t(o,r,n)}[(Wd=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],r=[],n=this.iterator(),i=a=>({next:()=>{if(a.length===0){let o=n.next();e.push(o),r.push(o)}return a.shift()}});return[new t(()=>i(e),this.controller,q(this,Wd,"f")),new t(()=>i(r),this.controller,q(this,Wd,"f"))]}toReadableStream(){let e=this,r;return F2({async start(){r=e[Symbol.asyncIterator]()},async pull(n){try{let{value:i,done:a}=await r.next();if(a)return n.close();let o=WI(JSON.stringify(i)+`
150
+ `);n.enqueue(o)}catch(i){n.error(i)}},async cancel(){await r.return?.()}})}};mI=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 a={event:this.event,data:this.data.join(`
151
+ `),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],a}if(this.chunks.push(e),e.startsWith(":"))return null;let[r,n,i]=xne(e,":");return i.startsWith(" ")&&(i=i.substring(1)),r==="event"?this.event=i:r==="data"&&this.data.push(i),null}};Xg=class t extends Promise{constructor(e,r,n=W2){super(i=>{i(null)}),this.responsePromise=r,this.parseResponse=n,cp.set(this,void 0),fe(this,cp,e,"f")}_thenUnwrap(e){return new t(q(this,cp,"f"),this.responsePromise,async(r,n)=>B2(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(q(this,cp,"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)}};cp=new WeakMap;ev=class{constructor(e,r,n,i){gg.set(this,void 0),fe(this,gg,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 q(this,gg,"f").requestAPIList(this.constructor,e)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(gg=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let r of e.getPaginatedItems())yield r}},hI=class extends Xg{constructor(e,r,n){super(e,r,async(i,a)=>new n(i,a.response,await W2(i,a),a.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let r of e)yield r}},ps=class extends ev{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:{...fI(this.options.query),before_id:r}}:null}let e=this.last_id;return e?{...this.options,query:{...fI(this.options.query),after_id:e}}:null}},tv=class extends ev{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:{...fI(this.options.query),page:e}}:null}},K2=()=>{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`.":""))}};H2=t=>t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function",BI=async(t,e,r=!0)=>({...t,body:await kne(t.body,e,r)}),OM=new WeakMap;kne=async(t,e,r=!0)=>{if(!await wne(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,a])=>gI(n,i,a,r))),n},Sne=t=>t instanceof Blob&&"name"in t,gI=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={},a=r.headers.get("Content-Type");a&&(i={type:a}),t.append(e,Hc([await r.blob()],Ag(r,n),i))}else if(H2(r))t.append(e,Hc([await new Response(V2(r)).blob()],Ag(r,n)));else if(Sne(r))t.append(e,Hc([r],Ag(r,n),{type:r.type}));else if(Array.isArray(r))await Promise.all(r.map(i=>gI(t,e+"[]",i,n)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([i,a])=>gI(t,`${e}[${i}]`,a,n)));else throw TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${r} instead`)}},G2=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",$ne=t=>t!=null&&typeof t=="object"&&typeof t.name=="string"&&typeof t.lastModified=="number"&&G2(t),Ine=t=>t!=null&&typeof t=="object"&&typeof t.url=="string"&&typeof t.blob=="function";Bn=class{constructor(e){this._client=e}},Q2=Symbol.for("brand.privateNullableHeaders");ht=t=>{let e=new Headers,r=new Set;for(let n of t){let i=new Set;for(let[a,o]of Tne(n)){let s=a.toLowerCase();i.has(s)||(e.delete(a),i.add(s)),o===null?(e.delete(a),r.add(s)):(e.append(a,o),r.delete(s))}}return{[Q2]:!0,values:e,nulls:r}},dp=Symbol("anthropic.sdk.stainlessHelper");jM=Object.freeze(Object.create(null)),One=(t=X2)=>function(e,...r){if(e.length===1)return e[0];let n=!1,i=[],a=e.reduce((u,l,d)=>{/[?#]/.test(l)&&(n=!0);let f=r[d],p=(n?encodeURIComponent:t)(""+f);return d!==r.length&&(f==null||typeof f=="object"&&f.toString===Object.getPrototypeOf(Object.getPrototypeOf(f.hasOwnProperty??jM)??jM)?.toString)&&(p=f+"",i.push({start:u.length+l.length,length:p.length,error:`Value of type ${Object.prototype.toString.call(f).slice(8,-1)} is not a valid path parameter`})),u+l+(d===r.length?"":p)},""),o=a.split(/[?#]/,1)[0],s=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=s.exec(o))!==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,f)=>{let p=" ".repeat(f.start-u),m="^".repeat(f.length);return u=f.start+f.length,d+p+m},"");throw new Ae(`Path parameters result in path with invalid segments:
152
+ ${i.map(d=>d.error).join(`
153
+ `)}
154
+ ${a}
155
+ ${l}`)}return a},Pr=One(X2),rv=class extends Bn{list(e={},r){let{betas:n,...i}=e??{};return this._client.getAPIList("/v1/files",ps,{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(Pr`/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(Pr`/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(Pr`/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",BI({body:i,...r,headers:ht([{"anthropic-beta":[...n??[],"files-api-2025-04-14"].toString()},zne(i.file),r?.headers])},this._client))}},nv=class extends Bn{retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(Pr`/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",ps,{query:i,...r,headers:ht([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},e6={"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};Nne=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 o="",s=!1;for(n=t[++e];n!=='"';){if(e===t.length){s=!0;break}if(n==="\\"){if(e++,e===t.length){s=!0;break}o+=n+t[e],n=t[++e]}else o+=n,n=t[++e]}n=t[++e],!s&&r.push({type:"string",value:o});continue}if(n&&/\s/.test(n)){e++;continue}let i=/[0-9]/;if(n&&i.test(n)||n==="-"||n==="."){let o="";for(n==="-"&&(o+=n,n=t[++e]);n&&i.test(n)||n===".";)o+=n,n=t[++e];r.push({type:"number",value:o});continue}let a=/[a-z]/i;if(n&&a.test(n)){let o="";for(;n&&a.test(n)&&e!==t.length;)o+=n,n=t[++e];if(o=="true"||o=="false"||o==="null")r.push({type:"name",value:o});else{e++;continue}continue}e++}return r},Vc=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),Vc(t);case"number":let r=e.value[e.value.length-1];if(r==="."||r==="-")return t=t.slice(0,t.length-1),Vc(t);case"string":let n=t[t.length-2];if(n?.type==="delimiter")return t=t.slice(0,t.length-1),Vc(t);if(n?.type==="brace"&&n.value==="{")return t=t.slice(0,t.length-1),Vc(t);break;case"delimiter":return t=t.slice(0,t.length-1),Vc(t)}return t},Rne=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},Cne=t=>{let e="";return t.map(r=>{r.type==="string"?e+='"'+r.value+'"':e+=r.value}),e},n6=t=>JSON.parse(Cne(Rne(Vc(Nne(t))))),AM="__json_buf";yI=class t{constructor(e,r){ii.add(this),this.messages=[],this.receivedMessages=[],ao.set(this,void 0),Mc.set(this,null),this.controller=new AbortController,Bd.set(this,void 0),vg.set(this,()=>{}),Kd.set(this,()=>{}),Hd.set(this,void 0),yg.set(this,()=>{}),Gd.set(this,()=>{}),$a.set(this,{}),Qd.set(this,!1),_g.set(this,!1),bg.set(this,!1),is.set(this,!1),xg.set(this,void 0),wg.set(this,void 0),Yd.set(this,void 0),kg.set(this,n=>{if(fe(this,_g,!0,"f"),mp(n)&&(n=new Wn),n instanceof Wn)return fe(this,bg,!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)))}),fe(this,Bd,new Promise((n,i)=>{fe(this,vg,n,"f"),fe(this,Kd,i,"f")}),"f"),fe(this,Hd,new Promise((n,i)=>{fe(this,yg,n,"f"),fe(this,Gd,i,"f")}),"f"),q(this,Bd,"f").catch(()=>{}),q(this,Hd,"f").catch(()=>{}),fe(this,Mc,e,"f"),fe(this,Yd,r?.logger??console,"f")}get response(){return q(this,xg,"f")}get request_id(){return q(this,wg,"f")}async withResponse(){fe(this,is,!0,"f");let e=await q(this,Bd,"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 a=new t(r,{logger:i});for(let o of r.messages)a._addMessageParam(o);return fe(a,Mc,{...r,stream:!0},"f"),a._run(()=>a._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},q(this,kg,"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,a;i&&(i.aborted&&this.controller.abort(),a=this.controller.abort.bind(this.controller),i.addEventListener("abort",a));try{q(this,ii,"m",X$).call(this);let{response:o,data:s}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(o);for await(let c of s)q(this,ii,"m",eI).call(this,c);if(s.controller.signal?.aborted)throw new Wn;q(this,ii,"m",tI).call(this)}finally{i&&a&&i.removeEventListener("abort",a)}}_connected(e){this.ended||(fe(this,xg,e,"f"),fe(this,wg,e?.headers.get("request-id"),"f"),q(this,vg,"f").call(this,e),this._emit("connect"))}get ended(){return q(this,Qd,"f")}get errored(){return q(this,_g,"f")}get aborted(){return q(this,bg,"f")}abort(){this.controller.abort()}on(e,r){return(q(this,$a,"f")[e]||(q(this,$a,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=q(this,$a,"f")[e];if(!n)return this;let i=n.findIndex(a=>a.listener===r);return i>=0&&n.splice(i,1),this}once(e,r){return(q(this,$a,"f")[e]||(q(this,$a,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{fe(this,is,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){fe(this,is,!0,"f"),await q(this,Hd,"f")}get currentMessage(){return q(this,ao,"f")}async finalMessage(){return await this.done(),q(this,ii,"m",J$).call(this)}async finalText(){return await this.done(),q(this,ii,"m",RM).call(this)}_emit(e,...r){if(q(this,Qd,"f"))return;e==="end"&&(fe(this,Qd,!0,"f"),q(this,yg,"f").call(this));let n=q(this,$a,"f")[e];if(n&&(q(this,$a,"f")[e]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),e==="abort"){let i=r[0];!q(this,is,"f")&&!n?.length&&Promise.reject(i),q(this,Kd,"f").call(this,i),q(this,Gd,"f").call(this,i),this._emit("end");return}if(e==="error"){let i=r[0];!q(this,is,"f")&&!n?.length&&Promise.reject(i),q(this,Kd,"f").call(this,i),q(this,Gd,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",q(this,ii,"m",J$).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{q(this,ii,"m",X$).call(this),this._connected(null);let a=ds.fromReadableStream(e,this.controller);for await(let o of a)q(this,ii,"m",eI).call(this,o);if(a.controller.signal?.aborted)throw new Wn;q(this,ii,"m",tI).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(ao=new WeakMap,Mc=new WeakMap,Bd=new WeakMap,vg=new WeakMap,Kd=new WeakMap,Hd=new WeakMap,yg=new WeakMap,Gd=new WeakMap,$a=new WeakMap,Qd=new WeakMap,_g=new WeakMap,bg=new WeakMap,is=new WeakMap,xg=new WeakMap,wg=new WeakMap,Yd=new WeakMap,kg=new WeakMap,ii=new WeakSet,J$=function(){if(this.receivedMessages.length===0)throw new Ae("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},RM=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(" ")},X$=function(){this.ended||fe(this,ao,void 0,"f")},eI=function(e){if(this.ended)return;let r=q(this,ii,"m",CM).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":{UM(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(NM(r,q(this,Mc,"f"),{logger:q(this,Yd,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{fe(this,ao,r,"f");break}case"content_block_start":case"message_delta":break}},tI=function(){if(this.ended)throw new Ae("stream has ended, this shouldn't happen");let e=q(this,ao,"f");if(!e)throw new Ae("request ended without sending any chunks");return fe(this,ao,void 0,"f"),NM(e,q(this,Mc,"f"),{logger:q(this,Yd,"f")})},CM=function(e){let r=q(this,ao,"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&&UM(n)){let i=n[AM]||"";i+=e.delta.partial_json;let a={...n};if(Object.defineProperty(a,AM,{value:i,enumerable:!1,writable:!0}),i)try{a.input=n6(i)}catch(o){let s=new Ae(`Unable to parse tool parameter JSON from model. Please retry your request or adjust your prompt. Error: ${o}. JSON: ${i}`);q(this,kg,"f").call(this,s)}r.content[e.index]=a}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 a=r.shift();a?a.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 a of r)a.reject(i);r.length=0}),this.on("error",i=>{n=!0;for(let a of r)a.reject(i);r.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,a)=>r.push({resolve:i,reject:a})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new ds(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}},iv=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}},Ane=1e5,Une=`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.`;av=class{constructor(e,r,n){Jd.add(this),this.client=e,qc.set(this,!1),as.set(this,!1),_r.set(this,void 0),Xd.set(this,void 0),qn.set(this,void 0),Pa.set(this,void 0),oo.set(this,void 0),ep.set(this,0),fe(this,_r,{params:{...r,messages:structuredClone(r.messages)}},"f");let i=["BetaToolRunner",...Y2(r.tools,r.messages)].join(", ");fe(this,Xd,{...n,headers:ht([{"x-stainless-helper":i},n?.headers])},"f"),fe(this,oo,MM(),"f")}async*[(qc=new WeakMap,as=new WeakMap,_r=new WeakMap,Xd=new WeakMap,qn=new WeakMap,Pa=new WeakMap,oo=new WeakMap,ep=new WeakMap,Jd=new WeakSet,DM=async function(){let e=q(this,_r,"f").params.compactionControl;if(!e||!e.enabled)return!1;let r=0;if(q(this,qn,"f")!==void 0)try{let c=await q(this,qn,"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??Ane;if(r<n)return!1;let i=e.model??q(this,_r,"f").params.model,a=e.summaryPrompt??Une,o=q(this,_r,"f").params.messages;if(o[o.length-1].role==="assistant"){let c=o[o.length-1];if(Array.isArray(c.content)){let u=c.content.filter(l=>l.type!=="tool_use");u.length===0?o.pop():c.content=u}}let s=await this.client.beta.messages.create({model:i,messages:[...o,{role:"user",content:[{type:"text",text:a}]}],max_tokens:q(this,_r,"f").params.max_tokens},{headers:{"x-stainless-helper":"compaction"}});if(s.content[0]?.type!=="text")throw new Ae("Expected text response for compaction");return q(this,_r,"f").params.messages=[{role:"user",content:s.content}],!0},Symbol.asyncIterator)](){var e;if(q(this,qc,"f"))throw new Ae("Cannot iterate over a consumed stream");fe(this,qc,!0,"f"),fe(this,as,!0,"f"),fe(this,Pa,void 0,"f");try{for(;;){let r;try{if(q(this,_r,"f").params.max_iterations&&q(this,ep,"f")>=q(this,_r,"f").params.max_iterations)break;fe(this,as,!1,"f"),fe(this,Pa,void 0,"f"),fe(this,ep,(e=q(this,ep,"f"),e++,e),"f"),fe(this,qn,void 0,"f");let{max_iterations:n,compactionControl:i,...a}=q(this,_r,"f").params;if(a.stream?(r=this.client.beta.messages.stream({...a},q(this,Xd,"f")),fe(this,qn,r.finalMessage(),"f"),q(this,qn,"f").catch(()=>{}),yield r):(fe(this,qn,this.client.beta.messages.create({...a,stream:!1},q(this,Xd,"f")),"f"),yield q(this,qn,"f")),!await q(this,Jd,"m",DM).call(this)){if(!q(this,as,"f")){let{role:s,content:c}=await q(this,qn,"f");q(this,_r,"f").params.messages.push({role:s,content:c})}let o=await q(this,Jd,"m",_I).call(this,q(this,_r,"f").params.messages.at(-1));if(o)q(this,_r,"f").params.messages.push(o);else if(!q(this,as,"f"))break}}finally{r&&r.abort()}}if(!q(this,qn,"f"))throw new Ae("ToolRunner concluded without a message from the server");q(this,oo,"f").resolve(await q(this,qn,"f"))}catch(r){throw fe(this,qc,!1,"f"),q(this,oo,"f").promise.catch(()=>{}),q(this,oo,"f").reject(r),fe(this,oo,MM(),"f"),r}}setMessagesParams(e){typeof e=="function"?q(this,_r,"f").params=e(q(this,_r,"f").params):q(this,_r,"f").params=e,fe(this,as,!0,"f"),fe(this,Pa,void 0,"f")}async generateToolResponse(){let e=await q(this,qn,"f")??this.params.messages.at(-1);return e?q(this,Jd,"m",_I).call(this,e):null}done(){return q(this,oo,"f").promise}async runUntilDone(){if(!q(this,qc,"f"))for await(let e of this);return this.done()}get params(){return q(this,_r,"f").params}pushMessages(...e){this.setMessagesParams(r=>({...r,messages:[...r.messages,...e]}))}then(e,r){return this.runUntilDone().then(e,r)}};_I=async function(t){return q(this,Pa,"f")!==void 0?q(this,Pa,"f"):(fe(this,Pa,Dne(q(this,_r,"f").params,t),"f"),q(this,Pa,"f"))};ov=class t{constructor(e,r){this.iterator=e,this.controller=r}async*decoder(){let e=new ls;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(VI(e.body),r)}},sv=class extends Bn{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(Pr`/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",ps,{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(Pr`/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(Pr`/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:a}=r??{};return this._client.get(i.results_url,{...n,headers:ht([{"anthropic-beta":[...a??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary"},n?.headers]),stream:!0,__binaryResponse:!0})._thenUnwrap((o,s)=>ov.fromResponse(s.response,s.controller))}},qM={"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"},Mne=["claude-opus-4-6"],fs=class extends Bn{constructor(){super(...arguments),this.batches=new sv(this._client)}create(e,r){let n=ZM(e),{betas:i,...a}=n;a.model in qM&&console.warn(`The model '${a.model}' is deprecated and will reach end-of-life on ${qM[a.model]}
178
+ Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),a.model in Mne&&a.thinking&&a.thinking.type==="enabled"&&console.warn(`Using Claude with ${a.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 o=this._client._options.timeout;if(!a.stream&&o==null){let c=e6[a.model]??void 0;o=this._client.calculateNonstreamingTimeout(a.max_tokens,c)}let s=J2(a.tools,a.messages);return this._client.post("/v1/messages?beta=true",{body:a,timeout:o??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=>r6(n,e,{logger:this._client.logger??console}))}stream(e,r){return yI.createMessage(this,e,r)}countTokens(e,r){let n=ZM(e),{betas:i,...a}=n;return this._client.post("/v1/messages/count_tokens?beta=true",{body:a,...r,headers:ht([{"anthropic-beta":[...i??[],"token-counting-2024-11-01"].toString()},r?.headers])})}toolRunner(e,r){return new av(this._client,e,r)}};fs.Batches=sv;fs.BetaToolRunner=av;fs.ToolError=iv;cv=class extends Bn{create(e,r={},n){let{betas:i,...a}=r??{};return this._client.post(Pr`/v1/skills/${e}/versions?beta=true`,BI({body:a,...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])},this._client))}retrieve(e,r,n){let{skill_id:i,betas:a}=r;return this._client.get(Pr`/v1/skills/${i}/versions/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},n?.headers])})}list(e,r={},n){let{betas:i,...a}=r??{};return this._client.getAPIList(Pr`/v1/skills/${e}/versions?beta=true`,tv,{query:a,...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}delete(e,r,n){let{skill_id:i,betas:a}=r;return this._client.delete(Pr`/v1/skills/${i}/versions/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...a??[],"skills-2025-10-02"].toString()},n?.headers])})}},hp=class extends Bn{constructor(){super(...arguments),this.versions=new cv(this._client)}create(e={},r){let{betas:n,...i}=e??{};return this._client.post("/v1/skills?beta=true",BI({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(Pr`/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",tv,{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(Pr`/v1/skills/${e}?beta=true`,{...n,headers:ht([{"anthropic-beta":[...i??[],"skills-2025-10-02"].toString()},n?.headers])})}};hp.Versions=cv;po=class extends Bn{constructor(){super(...arguments),this.models=new nv(this._client),this.messages=new fs(this._client),this.files=new rv(this._client),this.skills=new hp(this._client)}};po.Models=nv;po.Messages=fs;po.Files=rv;po.Skills=hp;uv=class extends Bn{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})}};WM="__json_buf";bI=class t{constructor(e,r){ai.add(this),this.messages=[],this.receivedMessages=[],so.set(this,void 0),Zc.set(this,null),this.controller=new AbortController,tp.set(this,void 0),Sg.set(this,()=>{}),rp.set(this,()=>{}),np.set(this,void 0),$g.set(this,()=>{}),ip.set(this,()=>{}),Ia.set(this,{}),ap.set(this,!1),Ig.set(this,!1),Eg.set(this,!1),os.set(this,!1),Pg.set(this,void 0),Tg.set(this,void 0),op.set(this,void 0),nI.set(this,n=>{if(fe(this,Ig,!0,"f"),mp(n)&&(n=new Wn),n instanceof Wn)return fe(this,Eg,!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)))}),fe(this,tp,new Promise((n,i)=>{fe(this,Sg,n,"f"),fe(this,rp,i,"f")}),"f"),fe(this,np,new Promise((n,i)=>{fe(this,$g,n,"f"),fe(this,ip,i,"f")}),"f"),q(this,tp,"f").catch(()=>{}),q(this,np,"f").catch(()=>{}),fe(this,Zc,e,"f"),fe(this,op,r?.logger??console,"f")}get response(){return q(this,Pg,"f")}get request_id(){return q(this,Tg,"f")}async withResponse(){fe(this,os,!0,"f");let e=await q(this,tp,"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 a=new t(r,{logger:i});for(let o of r.messages)a._addMessageParam(o);return fe(a,Zc,{...r,stream:!0},"f"),a._run(()=>a._createMessage(e,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},q(this,nI,"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,a;i&&(i.aborted&&this.controller.abort(),a=this.controller.abort.bind(this.controller),i.addEventListener("abort",a));try{q(this,ai,"m",iI).call(this);let{response:o,data:s}=await e.create({...r,stream:!0},{...n,signal:this.controller.signal}).withResponse();this._connected(o);for await(let c of s)q(this,ai,"m",aI).call(this,c);if(s.controller.signal?.aborted)throw new Wn;q(this,ai,"m",oI).call(this)}finally{i&&a&&i.removeEventListener("abort",a)}}_connected(e){this.ended||(fe(this,Pg,e,"f"),fe(this,Tg,e?.headers.get("request-id"),"f"),q(this,Sg,"f").call(this,e),this._emit("connect"))}get ended(){return q(this,ap,"f")}get errored(){return q(this,Ig,"f")}get aborted(){return q(this,Eg,"f")}abort(){this.controller.abort()}on(e,r){return(q(this,Ia,"f")[e]||(q(this,Ia,"f")[e]=[])).push({listener:r}),this}off(e,r){let n=q(this,Ia,"f")[e];if(!n)return this;let i=n.findIndex(a=>a.listener===r);return i>=0&&n.splice(i,1),this}once(e,r){return(q(this,Ia,"f")[e]||(q(this,Ia,"f")[e]=[])).push({listener:r,once:!0}),this}emitted(e){return new Promise((r,n)=>{fe(this,os,!0,"f"),e!=="error"&&this.once("error",n),this.once(e,r)})}async done(){fe(this,os,!0,"f"),await q(this,np,"f")}get currentMessage(){return q(this,so,"f")}async finalMessage(){return await this.done(),q(this,ai,"m",rI).call(this)}async finalText(){return await this.done(),q(this,ai,"m",FM).call(this)}_emit(e,...r){if(q(this,ap,"f"))return;e==="end"&&(fe(this,ap,!0,"f"),q(this,$g,"f").call(this));let n=q(this,Ia,"f")[e];if(n&&(q(this,Ia,"f")[e]=n.filter(i=>!i.once),n.forEach(({listener:i})=>i(...r))),e==="abort"){let i=r[0];!q(this,os,"f")&&!n?.length&&Promise.reject(i),q(this,rp,"f").call(this,i),q(this,ip,"f").call(this,i),this._emit("end");return}if(e==="error"){let i=r[0];!q(this,os,"f")&&!n?.length&&Promise.reject(i),q(this,rp,"f").call(this,i),q(this,ip,"f").call(this,i),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",q(this,ai,"m",rI).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{q(this,ai,"m",iI).call(this),this._connected(null);let a=ds.fromReadableStream(e,this.controller);for await(let o of a)q(this,ai,"m",aI).call(this,o);if(a.controller.signal?.aborted)throw new Wn;q(this,ai,"m",oI).call(this)}finally{n&&i&&n.removeEventListener("abort",i)}}[(so=new WeakMap,Zc=new WeakMap,tp=new WeakMap,Sg=new WeakMap,rp=new WeakMap,np=new WeakMap,$g=new WeakMap,ip=new WeakMap,Ia=new WeakMap,ap=new WeakMap,Ig=new WeakMap,Eg=new WeakMap,os=new WeakMap,Pg=new WeakMap,Tg=new WeakMap,op=new WeakMap,nI=new WeakMap,ai=new WeakSet,rI=function(){if(this.receivedMessages.length===0)throw new Ae("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},FM=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(" ")},iI=function(){this.ended||fe(this,so,void 0,"f")},aI=function(e){if(this.ended)return;let r=q(this,ai,"m",VM).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":{BM(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(LM(r,q(this,Zc,"f"),{logger:q(this,op,"f")}),!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{fe(this,so,r,"f");break}case"content_block_start":case"message_delta":break}},oI=function(){if(this.ended)throw new Ae("stream has ended, this shouldn't happen");let e=q(this,so,"f");if(!e)throw new Ae("request ended without sending any chunks");return fe(this,so,void 0,"f"),LM(e,q(this,Zc,"f"),{logger:q(this,op,"f")})},VM=function(e){let r=q(this,so,"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&&BM(n)){let i=n[WM]||"";i+=e.delta.partial_json;let a={...n};Object.defineProperty(a,WM,{value:i,enumerable:!1,writable:!0}),i&&(a.input=n6(i)),r.content[e.index]=a}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 a=r.shift();a?a.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 a of r)a.reject(i);r.length=0}),this.on("error",i=>{n=!0;for(let a of r)a.reject(i);r.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,a)=>r.push({resolve:i,reject:a})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new ds(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}},lv=class extends Bn{create(e,r){return this._client.post("/v1/messages/batches",{body:e,...r})}retrieve(e,r){return this._client.get(Pr`/v1/messages/batches/${e}`,r)}list(e={},r){return this._client.getAPIList("/v1/messages/batches",ps,{query:e,...r})}delete(e,r){return this._client.delete(Pr`/v1/messages/batches/${e}`,r)}cancel(e,r){return this._client.post(Pr`/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,a)=>ov.fromResponse(a.response,a.controller))}},gp=class extends Bn{constructor(){super(...arguments),this.batches=new lv(this._client)}create(e,r){e.model in KM&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${KM[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 Zne&&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 a=e6[e.model]??void 0;n=this._client.calculateNonstreamingTimeout(e.max_tokens,a)}let i=J2(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=>a6(n,e,{logger:this._client.logger??console}))}stream(e,r){return bI.createMessage(this,e,r,{logger:this._client.logger??console})}countTokens(e,r){return this._client.post("/v1/messages/count_tokens",{body:e,...r})}},KM={"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"},Zne=["claude-opus-4-6"];gp.Batches=lv;dv=class extends Bn{retrieve(e,r={},n){let{betas:i}=r??{};return this._client.get(Pr`/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",ps,{query:i,...r,headers:ht([{...n?.toString()!=null?{"anthropic-beta":n?.toString()}:void 0},r?.headers])})}},zg=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()},Lne="\\n\\nHuman:",Fne="\\n\\nAssistant:",cr=class{constructor({baseURL:e=zg("ANTHROPIC_BASE_URL"),apiKey:r=zg("ANTHROPIC_API_KEY")??null,authToken:n=zg("ANTHROPIC_AUTH_TOKEN")??null,...i}={}){xI.add(this),Dg.set(this,void 0);let a={apiKey:r,authToken:n,...i,baseURL:e||"https://api.anthropic.com"};if(!a.dangerouslyAllowBrowser&&one())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=a.baseURL,this.timeout=a.timeout??KI.DEFAULT_TIMEOUT,this.logger=a.logger??console;let o="warn";this.logLevel=o,this.logLevel=TM(a.logLevel,"ClientOptions.logLevel",this)??TM(zg("ANTHROPIC_LOG"),"process.env['ANTHROPIC_LOG']",this)??o,this.fetchOptions=a.fetchOptions,this.maxRetries=a.maxRetries??2,this.fetch=a.fetch??dne(),fe(this,Dg,fne,"f"),this._options=a,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 mne(e)}getUserAgent(){return`${this.constructor.name}/JS ${Fc}`}defaultIdempotencyKey(){return`stainless-node-retry-${Z2()}`}makeStatusError(e,r,n,i){return sn.generate(e,r,n,i)}buildURL(e,r,n){let i=!q(this,xI,"m",o6).call(this)&&n||this.baseURL,a=rne(e)?new URL(e):new URL(i+(i.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),o=this.defaultQuery(),s=Object.fromEntries(a.searchParams);return(!wM(o)||!wM(s))&&(r={...s,...o,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(a.search=this.stringifyQuery(r)),a.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 Xg(this,this.makeRequest(e,r,void 0))}async makeRequest(e,r,n){let i=await e,a=i.maxRetries??this.maxRetries;r==null&&(r=a),await this.prepareOptions(i);let{req:o,url:s,timeout:c}=await this.buildRequest(i,{retryCount:a-r});await this.prepareRequest(o,{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(an(this).debug(`[${u}] sending request`,ss({retryOfRequestLogID:n,method:i.method,url:s,options:i,headers:o.headers})),i.signal?.aborted)throw new Wn;let f=new AbortController,p=await this.fetchWithTimeout(s,o,c,f).catch(dI),m=Date.now();if(p instanceof globalThis.Error){let h=`retrying, ${r} attempts remaining`;if(i.signal?.aborted)throw new Wn;let b=mp(p)||/timed? ?out/i.test(String(p)+("cause"in p?String(p.cause):""));if(r)return an(this).info(`[${u}] connection ${b?"timed out":"failed"} - ${h}`),an(this).debug(`[${u}] connection ${b?"timed out":"failed"} (${h})`,ss({retryOfRequestLogID:n,url:s,durationMs:m-d,message:p.message})),this.retryRequest(i,r,n??u);throw an(this).info(`[${u}] connection ${b?"timed out":"failed"} - error; no more retries left`),an(this).debug(`[${u}] connection ${b?"timed out":"failed"} (error; no more retries left)`,ss({retryOfRequestLogID:n,url:s,durationMs:m-d,message:p.message})),b?new Fg:new Yc({cause:p})}let v=[...p.headers.entries()].filter(([h])=>h==="request-id").map(([h,b])=>", "+h+": "+JSON.stringify(b)).join(""),g=`[${u}${l}${v}] ${o.method} ${s} ${p.ok?"succeeded":"failed"} with status ${p.status} in ${m-d}ms`;if(!p.ok){let h=await this.shouldRetry(p);if(r&&h){let w=`retrying, ${r} attempts remaining`;return await pne(p.body),an(this).info(`${g} - ${w}`),an(this).debug(`[${u}] response error (${w})`,ss({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),this.retryRequest(i,r,n??u,p.headers)}let b=h?"error; no more retries left":"error; not retryable";an(this).info(`${g} - ${b}`);let y=await p.text().catch(w=>dI(w).message),_=L2(y),x=_?void 0:y;throw an(this).debug(`[${u}] response error (${b})`,ss({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,message:x,durationMs:Date.now()-d})),this.makeStatusError(p.status,_,x,p.headers)}return an(this).info(g),an(this).debug(`[${u}] response start`,ss({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),{response:p,options:i,controller:f,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 hI(this,n,e)}async fetchWithTimeout(e,r,n,i){let{signal:a,method:o,...s}=r||{},c=this._makeAbort(i);a&&a.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};o&&(d.method=o.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 a,o=i?.get("retry-after-ms");if(o){let c=parseFloat(o);Number.isNaN(c)||(a=c)}let s=i?.get("retry-after");if(s&&!a){let c=parseFloat(s);Number.isNaN(c)?a=Date.parse(s)-Date.now():a=c*1e3}if(a===void 0){let c=e.maxRetries??this.maxRetries;a=this.calculateDefaultRetryTimeoutMillis(r,c)}return await ane(a),this.makeRequest(e,r-1,n)}calculateDefaultRetryTimeoutMillis(e,r){let n=r-e,i=Math.min(.5*Math.pow(2,n),8),a=1-Math.random()*.25;return i*a*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:a,query:o,defaultBaseURL:s}=n,c=this.buildURL(a,o,s);"timeout"in n&&ine("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 a={};this.idempotencyHeader&&r!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),a[this.idempotencyHeader]=e.idempotencyKey);let o=ht([a,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(i),...e.timeout?{"X-Stainless-Timeout":String(Math.trunc(e.timeout/1e3))}:{},...lne(),...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(o),o.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:V2(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)}:q(this,Dg,"f").call(this,{body:e,headers:n})}};KI=cr,Dg=new WeakMap,xI=new WeakSet,o6=function(){return this.baseURL!=="https://api.anthropic.com"};cr.Anthropic=KI;cr.HUMAN_PROMPT=Lne;cr.AI_PROMPT=Fne;cr.DEFAULT_TIMEOUT=6e5;cr.AnthropicError=Ae;cr.APIError=sn;cr.APIConnectionError=Yc;cr.APIConnectionTimeoutError=Fg;cr.APIUserAbortError=Wn;cr.NotFoundError=Kg;cr.ConflictError=Hg;cr.RateLimitError=Qg;cr.BadRequestError=Vg;cr.AuthenticationError=Wg;cr.InternalServerError=Yg;cr.PermissionDeniedError=Bg;cr.UnprocessableEntityError=Gg;cr.toFile=Ene;Jc=class extends cr{constructor(){super(...arguments),this.completions=new uv(this),this.messages=new gp(this),this.models=new dv(this),this.beta=new po(this)}};Jc.Completions=uv;Jc.Messages=gp;Jc.Models=dv;Jc.Beta=po;Lc=null;Qne=Gne();Jne=GI(),LAe=Jne.subscribe,Xne=GI(),FAe=Xne.subscribe,eie=GI(),VAe=eie.subscribe;QM=new Set;sie=go(t=>{if(!t||t.trim()==="")return null;let e=t.split(",").map(a=>a.trim()).filter(Boolean);if(e.length===0)return null;let r=e.some(a=>a.startsWith("!")),n=e.some(a=>!a.startsWith("!"));if(r&&n)return null;let i=e.map(a=>a.replace(/^!/,"").toLowerCase());return{include:r?[]:i,exclude:r?i:[],isExclusive:r}});_ie={cwd(){return process.cwd()},existsSync(t){let e=[];try{let i=ar(e,sr`fs.existsSync(${t})`,0);return Ze.existsSync(t)}catch(i){var r=i,n=1}finally{or(e,r,n)}},async stat(t){return vie(t)},async readdir(t){return fie(t,{withFileTypes:!0})},async unlink(t){return yie(t)},async rmdir(t){return hie(t)},async rm(t,e){return gie(t,e)},async mkdir(t,e){try{await die(t,{recursive:!0,...e})}catch(r){if(pp(r)!=="EEXIST")throw r}},async readFile(t,e){return YM(t,{encoding:e.encoding})},async rename(t,e){return mie(t,e)},statSync(t){let e=[];try{let i=ar(e,sr`fs.statSync(${t})`,0);return Ze.statSync(t)}catch(i){var r=i,n=1}finally{or(e,r,n)}},lstatSync(t){let e=[];try{let i=ar(e,sr`fs.lstatSync(${t})`,0);return Ze.lstatSync(t)}catch(i){var r=i,n=1}finally{or(e,r,n)}},readFileSync(t,e){let r=[];try{let a=ar(r,sr`fs.readFileSync(${t})`,0);return Ze.readFileSync(t,{encoding:e.encoding})}catch(a){var n=a,i=1}finally{or(r,n,i)}},readFileBytesSync(t){let e=[];try{let i=ar(e,sr`fs.readFileBytesSync(${t})`,0);return Ze.readFileSync(t)}catch(i){var r=i,n=1}finally{or(e,r,n)}},readSync(t,e){let r=[];try{let a=ar(r,sr`fs.readSync(${t}, ${e.length} bytes)`,0),o;try{o=Ze.openSync(t,"r");let s=Buffer.alloc(e.length),c=Ze.readSync(o,s,0,e.length,0);return{buffer:s,bytesRead:c}}finally{o&&Ze.closeSync(o)}}catch(a){var n=a,i=1}finally{or(r,n,i)}},appendFileSync(t,e,r){let n=[];try{let o=ar(n,sr`fs.appendFileSync(${t}, ${e.length} chars)`,0);if(r?.mode!==void 0)try{let s=Ze.openSync(t,"ax",r.mode);try{Ze.appendFileSync(s,e)}finally{Ze.closeSync(s)}return}catch(s){if(pp(s)!=="EEXIST")throw s}Ze.appendFileSync(t,e)}catch(o){var i=o,a=1}finally{or(n,i,a)}},copyFileSync(t,e){let r=[];try{let a=ar(r,sr`fs.copyFileSync(${t} → ${e})`,0);Ze.copyFileSync(t,e)}catch(a){var n=a,i=1}finally{or(r,n,i)}},unlinkSync(t){let e=[];try{let i=ar(e,sr`fs.unlinkSync(${t})`,0);Ze.unlinkSync(t)}catch(i){var r=i,n=1}finally{or(e,r,n)}},renameSync(t,e){let r=[];try{let a=ar(r,sr`fs.renameSync(${t} → ${e})`,0);Ze.renameSync(t,e)}catch(a){var n=a,i=1}finally{or(r,n,i)}},linkSync(t,e){let r=[];try{let a=ar(r,sr`fs.linkSync(${t} → ${e})`,0);Ze.linkSync(t,e)}catch(a){var n=a,i=1}finally{or(r,n,i)}},symlinkSync(t,e,r){let n=[];try{let o=ar(n,sr`fs.symlinkSync(${t} → ${e})`,0);Ze.symlinkSync(t,e,r)}catch(o){var i=o,a=1}finally{or(n,i,a)}},readlinkSync(t){let e=[];try{let i=ar(e,sr`fs.readlinkSync(${t})`,0);return Ze.readlinkSync(t)}catch(i){var r=i,n=1}finally{or(e,r,n)}},realpathSync(t){let e=[];try{let i=ar(e,sr`fs.realpathSync(${t})`,0);return Ze.realpathSync(t).normalize("NFC")}catch(i){var r=i,n=1}finally{or(e,r,n)}},mkdirSync(t,e){let r=[];try{let a=ar(r,sr`fs.mkdirSync(${t})`,0),o={recursive:!0};e?.mode!==void 0&&(o.mode=e.mode);try{Ze.mkdirSync(t,o)}catch(s){if(pp(s)!=="EEXIST")throw s}}catch(a){var n=a,i=1}finally{or(r,n,i)}},readdirSync(t){let e=[];try{let i=ar(e,sr`fs.readdirSync(${t})`,0);return Ze.readdirSync(t,{withFileTypes:!0})}catch(i){var r=i,n=1}finally{or(e,r,n)}},readdirStringSync(t){let e=[];try{let i=ar(e,sr`fs.readdirStringSync(${t})`,0);return Ze.readdirSync(t)}catch(i){var r=i,n=1}finally{or(e,r,n)}},isDirEmptySync(t){let e=[];try{let i=ar(e,sr`fs.isDirEmptySync(${t})`,0);return this.readdirSync(t).length===0}catch(i){var r=i,n=1}finally{or(e,r,n)}},rmdirSync(t){let e=[];try{let i=ar(e,sr`fs.rmdirSync(${t})`,0);Ze.rmdirSync(t)}catch(i){var r=i,n=1}finally{or(e,r,n)}},rmSync(t,e){let r=[];try{let a=ar(r,sr`fs.rmSync(${t})`,0);Ze.rmSync(t,e)}catch(a){var n=a,i=1}finally{or(r,n,i)}},createWriteStream(t){return Ze.createWriteStream(t)},async readFileBytes(t,e){if(e===void 0)return YM(t);let r=await pie(t,"r");try{let{size:n}=await r.stat(),i=Math.min(n,e),a=Buffer.allocUnsafe(i),o=0;for(;o<i;){let{bytesRead:s}=await r.read(a,o,i-o,o);if(s===0)break;o+=s}return o<i?a.subarray(0,o):a}finally{await r.close()}}},bie=_ie;wI={verbose:0,debug:1,info:2,warn:3,error:4},kie=go(()=>{let t=process.env.CLAUDE_CODE_DEBUG_LOG_LEVEL?.toLowerCase().trim();return t&&Object.hasOwn(wI,t)?t:"debug"}),Sie=!1,kI=go(()=>Sie||cs(process.env.DEBUG)||cs(process.env.DEBUG_SDK)||process.argv.includes("--debug")||process.argv.includes("-d")||d6()||process.argv.some(t=>t.startsWith("--debug="))||p6()!==null),$ie=go(()=>{let t=process.argv.find(r=>r.startsWith("--debug="));if(!t)return null;let e=t.substring(8);return sie(e)}),d6=go(()=>process.argv.includes("--debug-to-stderr")||process.argv.includes("-d2e")),p6=go(()=>{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});Eie=!1,Og=null,sI=Promise.resolve();m6=go(async()=>{try{let t=f6(),e=u6(t),r=l6(e,"latest");await iie(r).catch(()=>{}),await nie(t,r)}catch{}}),HAe=(()=>{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})(),Oie={[Symbol.dispose](){}};sr=jie;QI=(t,e)=>{let r=[];try{let a=ar(r,sr`JSON.parse(${t})`,0);return typeof e>"u"?JSON.parse(t):JSON.parse(t,e)}catch(a){var n=a,i=1}finally{or(r,n,i)}};Cie=2e3,pv=new Set,XM=!1;SI=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||C2(),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(s6(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 A2()?"bun":"node"}spawnLocalProcess(e){let{command:r,args:n,cwd:i,env:a,signal:o}=e,s=cs(a.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr?"pipe":"ignore",c=fte(r,n,{cwd:i,stdio:["pipe","pipe",s],signal:o,env:a,windowsHide:!0});return(cs(a.DEBUG_CLAUDE_AGENT_SDK)||this.options.stderr)&&c.stderr.on("data",u=>{let l=u.toString();ea(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:a=this.getDefaultExecutable(),executableArgs:o=[],extraArgs:s={},pathToClaudeCodeExecutable:c,env:u={...process.env},thinkingConfig:l,maxTurns:d,maxBudgetUsd:f,taskBudget:p,model:m,fallbackModel:v,jsonSchema:g,permissionMode:h,allowDangerouslySkipPermissions:b,permissionPromptToolName:y,continueConversation:_,resume:x,settingSources:w,allowedTools:k=[],disallowedTools:$=[],tools:T,mcpServers:A,strictMcpConfig:z,canUseTool:M,includePartialMessages:L,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()),f!==void 0&&G.push("--max-budget-usd",f.toString()),p&&G.push("--task-budget",p.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",bn(g)),this.options.debugFile?G.push("--debug-file",this.options.debugFile):this.options.debug&&G.push("--debug"),cs(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(_&&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",bn({mcpServers:A})),w!==void 0&&G.push(`--setting-sources=${w.join(",")}`),z&&G.push("--strict-mcp-config"),h&&G.push("--permission-mode",h),b&&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"),L&&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 ve={...s??{}};this.options.settings&&(ve.settings=this.options.settings);let Fe=Rie(ve,te);for(let[C,S]of Object.entries(Fe))S===null?G.push(`--${C}`):G.push(`--${C}`,S);u.CLAUDE_CODE_ENTRYPOINT||(u.CLAUDE_CODE_ENTRYPOINT="sdk-ts"),delete u.NODE_OPTIONS,cs(u.DEBUG_CLAUDE_AGENT_SDK)?u.DEBUG="1":delete u.DEBUG;let ye=Die(c),B=ye?c:a,I=ye?[...o,...G]:[...o,c,...G],W={command:B,args:I,cwd:i,env:u,signal:this.abortController.signal};this.options.spawnClaudeCodeProcess?(ea(`Spawning Claude Code (custom): ${B} ${I.join(" ")}`),this.process=this.options.spawnClaudeCodeProcess(W)):(ea(`Spawning Claude Code: ${B} ${I.join(" ")}`),this.process=this.spawnLocalProcess(W)),this.processStdin=this.process.stdin,this.processStdout=this.process.stdout,Uie(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 uo("Claude Code process aborted by user");else if(HI(C)){let S=ye?`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),ea(this.exitError.message)}else this.exitError=Error(`Failed to spawn Claude Code process: ${C.message}`),ea(this.exitError.message)}),this.process.on("exit",(C,S)=>{if(this.ready=!1,this.abortController.signal.aborted)this.exitError=new uo("Claude Code process aborted by user");else{let P=this.getProcessExitError(C,S);P&&(this.exitError=P,ea(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 uo("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){ea("[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}`);ea(`[ProcessTransport] Writing to stdin: ${e.substring(0,100)}`);try{this.processStdin.write(e)||ea("[ProcessTransport] Write buffer full, data queued")}catch(r){throw this.ready=!1,Error(`Failed to write to process stdin: ${Mg(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())},Cie,e).unref(),e.once("exit",()=>pv.delete(e))):e&&pv.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=mte({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=QI(n)}catch{ea(`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 a=this.getProcessExitError(n,i);e(a)};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=(a,o)=>{if(this.abortController.signal.aborted){r(new uo("Operation aborted"));return}let s=this.getProcessExitError(a,o);s?r(s):e()};this.process.once("exit",n);let i=a=>{this.process.off("exit",n),r(a)};this.process.once("error",i),this.process.once("exit",()=>{this.process.off("error",i)})})}};$I=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})}},II=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?.())}},EI=class{transport;isSingleUserTurn;canUseTool;hooks;abortController;jsonSchema;initConfig;onElicitation;getOAuthToken;pendingControlResponses=new Map;cleanupPerformed=!1;sdkMessages;inputStream=new $I;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,a,o=new Map,s,c,u,l){this.transport=e,this.isSingleUserTurn=r,this.canUseTool=n,this.hooks=i,this.abortController=a,this.jsonSchema=s,this.initConfig=c,this.onElicitation=u,this.getOAuthToken=l;for(let[d,f]of o)this.connectSdkMcpServer(d,f);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&&(Fn("[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 uo)){let r=Error(`Claude Code returned an error result: ${this.lastErrorResultText}`);Fn(`[Query.readMessages] Replacing exit error with result text. Original: ${Mg(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(bn(i)+`
187
+ `))}catch(n){if(this.cleanupPerformed)return;let i={type:"control_response",response:{subtype:"error",request_id:e.request_id,error:Mg(n)}};try{await Promise.resolve(this.transport.write(bn(i)+`
188
+ `))}catch(a){Fn(`[Query.handleControlRequest] Error-response write failed: ${Mg(a)}`,{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,a]of Object.entries(this.hooks))a.length>0&&(e[i]=a.map(o=>{let s=[];for(let c of o.hooks){let u=`hook_${this.nextCallbackId++}`;this.hookCallbacks.set(u,c),s.push(u)}return{matcher:o.matcher,hookCallbackIds:s,timeout:o.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,a)=>{this.pendingControlResponses.set(r,{handler:o=>{this.pendingControlResponses.delete(r),o.subtype==="success"?i(o):(a(Error(o.error)),o.pending_permission_requests&&this.processPendingPermissionRequests(o.pending_permission_requests))},reject:a}),Promise.resolve(this.transport.write(bn(n)+`
189
+ `)).catch(o=>{this.pendingControlResponses.delete(r),a(o)})})}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()),a=new Set(Object.keys(r));for(let s of i)a.has(s)||await this.disconnectSdkMcpServer(s);for(let[s,c]of Object.entries(r))i.has(s)||this.connectSdkMcpServer(s,c);let o={};for(let s of Object.keys(r))o[s]={type:"sdk",name:s};return(await this.request({subtype:"mcp_set_servers",servers:{...n,...o}})).response}async accountInfo(){return(await this.initialization).account}async streamInput(e){Fn("[Query.streamInput] Starting to process input stream");try{let r=0;for await(let n of e){if(r++,Fn(`[Query.streamInput] Processing message ${r}: ${n.type}`),this.abortController?.signal.aborted)break;await Promise.resolve(this.transport.write(bn(n)+`
190
+ `))}Fn(`[Query.streamInput] Finished processing ${r} messages from input stream`),r>0&&this.hasBidirectionalNeeds()&&(Fn("[Query.streamInput] Has bidirectional needs, waiting for first result"),await this.waitForFirstResult()),Fn("[Query] Calling transport.endInput() to close stdin to CLI process"),this.transport.endInput()}catch(r){if(!(r instanceof uo))throw r}}waitForFirstResult(){return this.firstResultReceived?(Fn("[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 a=this.hookCallbacks.get(e);if(!a)throw Error(`No hook callback found for ID: ${e}`);return a(r,n,{signal:i})}connectSdkMcpServer(e,r){let n=new II(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),Fn(`[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}`,a=this.pendingMcpResponses.get(i);if(a){a.resolve(r),this.pendingMcpResponses.delete(i);return}}let n={type:"control_request",request_id:c6(),request:{subtype:"mcp_message",server_name:e,message:r}};Promise.resolve(this.transport.write(bn(n)+`
191
+ `)).catch(i=>{Fn(`[Query.sendMcpServerMessageToCli] Transport write failed: ${i}`,{level:"error"})})}handleMcpControlRequest(e,r,n){let i="id"in r.message?r.message.id:null,a=`${e}:${i}`;return new Promise((o,s)=>{let c=()=>{this.pendingMcpResponses.delete(a)},u=d=>{c(),o(d)},l=d=>{c(),s(d)};if(this.pendingMcpResponses.set(a,{resolve:u,reject:l}),n.onmessage)n.onmessage(r.message);else{c(),s(Error("No message handler registered"));return}})}},PI=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(a){Fn(`[TranscriptMirrorBatcher] flush failed for ${n}: ${a}`,{level:"error"})}}},YAe=Zie(qie);Fie=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;e2=200;JAe=Buffer.from('{"type":"attribution-snapshot"'),XAe=Buffer.from('{"type":"system"'),Kie=10,eUe=Buffer.from([Kie]);Yie="user:inference",h6="user:profile",Jie="org:create_api_key",Xie=[Jie,h6],eae=[h6,Yie,"user:sessions:claude_code","user:mcp_servers","user:file_upload"],nUe=Array.from(new Set([...Xie,...eae])),t2={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}"},tae=void 0;nae=["https://beacon.claude-ai.staging.ant.dev","https://claude.fedstart.com","https://claude-staging.fedstart.com"];aae="-credentials";(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw Error()}t.assertNever=r,t.arrayToEnum=i=>{let a={};for(let o of i)a[o]=o;return a},t.getValidEnumValues=i=>{let a=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(let s of a)o[s]=i[s];return t.objectValues(o)},t.objectValues=i=>t.objectKeys(i).map(function(a){return i[a]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let a=[];for(let o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},t.find=(i,a)=>{for(let o of i)if(a(o))return o},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(kt||(kt={}));(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(r2||(r2={}));he=kt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),co=t=>{switch(typeof t){case"undefined":return he.undefined;case"string":return he.string;case"number":return Number.isNaN(t)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(t)?he.array:t===null?he.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?he.promise:typeof Map<"u"&&t instanceof Map?he.map:typeof Set<"u"&&t instanceof Set?he.set:typeof Date<"u"&&t instanceof Date?he.date:he.object;default:return he.unknown}},X=kt.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"]),si=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(a){return a.message},n={_errors:[]},i=a=>{for(let o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let s=n,c=0;for(;c<o.path.length;){let u=o.path[c];c!==o.path.length-1?s[u]=s[u]||{_errors:[]}:(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(o))),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,kt.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 a=i.path[0];r[a]=r[a]||[],r[a].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};si.create=t=>new si(t);cae=(t,e)=>{let r;switch(t.code){case X.invalid_type:t.received===he.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case X.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,kt.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:r=`Unrecognized key(s) in object: ${kt.joinValues(t.keys,", ")}`;break;case X.invalid_union:r="Invalid input";break;case X.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${kt.joinValues(t.options)}`;break;case X.invalid_enum_value:r=`Invalid enum value. Expected ${kt.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}"`:kt.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,kt.assertNever(t)}return{message:r}},vp=cae,uae=vp;zI=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,a=[...r,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)s=u(o,{data:e,defaultError:s}).message;return{...i,path:a,message:s}};cn=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 Re;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 a=await i.key,o=await i.value;n.push({key:a,value:o})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Re;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:e.value,value:n}}},Re=Object.freeze({status:"aborted"}),up=t=>({status:"dirty",value:t}),xn=t=>({status:"valid",value:t}),n2=t=>t.status==="aborted",i2=t=>t.status==="dirty",Xc=t=>t.status==="valid",fv=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={}));ci=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}},a2=(t,e)=>{if(Xc(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 si(t.common.issues);return this._error=r,this._error}}};tt=class{get description(){return this._def.description}_getType(e){return co(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:co(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new cn,ctx:{common:e.parent.common,data:e.data,parsedType:co(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(fv(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:co(e)},i=this._parseSync({data:e,path:n.path,parent:n});return a2(n,i)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:co(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return Xc(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=>Xc(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:co(e)},i=this._parse({data:e,path:n.path,parent:n}),a=await(fv(i)?i:Promise.resolve(i));return a2(n,a)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,a)=>{let o=e(i),s=()=>a.addIssue({code:X.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!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 Ni({schema:this,typeName:Ce.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 Oi.create(this,this._def)}nullable(){return Oa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fo.create(this)}promise(){return ms.create(this,this._def)}or(e){return nu.create([this,e],this._def)}and(e){return iu.create(this,e,this._def)}transform(e){return new Ni({...We(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new uu({...We(this._def),innerType:this,defaultValue:r,typeName:Ce.ZodDefault})}brand(){return new mv({typeName:Ce.ZodBranded,type:this,...We(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new lu({...We(this._def),innerType:this,catchValue:r,typeName:Ce.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return hv.create(this,e)}readonly(){return du.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},lae=/^c[^\s-]{8,}$/i,dae=/^[0-9a-z]+$/,pae=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fae=/^[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,mae=/^[a-z0-9_-]{21}$/i,hae=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gae=/^[-+]?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)?)??$/,vae=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yae="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",_ae=/^(?:(?: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])$/,bae=/^(?:(?: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])$/,xae=/^(([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]))$/,wae=/^(([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])$/,kae=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Sae=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,g6="((\\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])))",$ae=new RegExp(`^${g6}$`);eu=class t extends tt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==he.string){let i=this._getOrReturnCtx(e);return ue(i,{code:X.invalid_type,expected:he.string,received:i.parsedType}),Re}let r=new cn,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 a=e.data.length>i.value,o=e.data.length<i.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?ue(n,{code:X.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&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")vae.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")cI||(cI=new RegExp(yae,"u")),cI.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")fae.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")mae.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")lae.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")dae.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")pae.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"?Eae(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"?$ae.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{code:X.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Iae(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"?gae.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"duration",code:X.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Pae(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"?Tae(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"?zae(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"?kae.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"base64",code:X.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Sae.test(e.data)||(n=this._getOrReturnCtx(e,n),ue(n,{validation:"base64url",code:X.invalid_string,message:i.message}),r.dirty()):kt.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}};eu.create=t=>new eu({checks:[],typeName:Ce.ZodString,coerce:t?.coerce??!1,...We(t)});yp=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)!==he.number){let i=this._getOrReturnCtx(e);return ue(i,{code:X.invalid_type,expected:he.number,received:i.parsedType}),Re}let r,n=new cn;for(let i of this._def.checks)i.kind==="int"?kt.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"?Oae(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()):kt.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"&&kt.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)}};yp.create=t=>new yp({checks:[],typeName:Ce.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)!==he.bigint)return this._getInvalidInput(e);let r,n=new cn;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()):kt.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:he.bigint,received:r.parsedType}),Re}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:Ce.ZodBigInt,coerce:t?.coerce??!1,...We(t)});bp=class extends tt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==he.boolean){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:he.boolean,received:r.parsedType}),Re}return xn(e.data)}};bp.create=t=>new bp({typeName:Ce.ZodBoolean,coerce:t?.coerce||!1,...We(t)});xp=class t extends tt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==he.date){let i=this._getOrReturnCtx(e);return ue(i,{code:X.invalid_type,expected:he.date,received:i.parsedType}),Re}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return ue(i,{code:X.invalid_date}),Re}let r=new cn,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()):kt.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}};xp.create=t=>new xp({checks:[],coerce:t?.coerce||!1,typeName:Ce.ZodDate,...We(t)});wp=class extends tt{_parse(e){if(this._getType(e)!==he.symbol){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:he.symbol,received:r.parsedType}),Re}return xn(e.data)}};wp.create=t=>new wp({typeName:Ce.ZodSymbol,...We(t)});tu=class extends tt{_parse(e){if(this._getType(e)!==he.undefined){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:he.undefined,received:r.parsedType}),Re}return xn(e.data)}};tu.create=t=>new tu({typeName:Ce.ZodUndefined,...We(t)});ru=class extends tt{_parse(e){if(this._getType(e)!==he.null){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:he.null,received:r.parsedType}),Re}return xn(e.data)}};ru.create=t=>new ru({typeName:Ce.ZodNull,...We(t)});kp=class extends tt{constructor(){super(...arguments),this._any=!0}_parse(e){return xn(e.data)}};kp.create=t=>new kp({typeName:Ce.ZodAny,...We(t)});lo=class extends tt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return xn(e.data)}};lo.create=t=>new lo({typeName:Ce.ZodUnknown,...We(t)});ta=class extends tt{_parse(e){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:he.never,received:r.parsedType}),Re}};ta.create=t=>new ta({typeName:Ce.ZodNever,...We(t)});Sp=class extends tt{_parse(e){if(this._getType(e)!==he.undefined){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:he.void,received:r.parsedType}),Re}return xn(e.data)}};Sp.create=t=>new Sp({typeName:Ce.ZodVoid,...We(t)});fo=class t extends tt{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==he.array)return ue(r,{code:X.invalid_type,expected:he.array,received:r.parsedType}),Re;if(i.exactLength!==null){let o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(ue(r,{code:o?X.too_big:X.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?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((o,s)=>i.type._parseAsync(new ci(r,o,r.path,s)))).then(o=>cn.mergeArray(n,o));let a=[...r.data].map((o,s)=>i.type._parseSync(new ci(r,o,r.path,s)));return cn.mergeArray(n,a)}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)}};fo.create=(t,e)=>new fo({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...We(e)});Kn=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=kt.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==he.object){let c=this._getOrReturnCtx(e);return ue(c,{code:X.invalid_type,expected:he.object,received:c.parsedType}),Re}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof ta&&this._def.unknownKeys==="strip"))for(let c in n.data)a.includes(c)||o.push(c);let s=[];for(let c of a){let u=i[c],l=n.data[c];s.push({key:{status:"valid",value:c},value:u._parse(new ci(n,l,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof ta){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of o)s.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")o.length>0&&(ue(n,{code:X.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of o){let l=n.data[u];s.push({key:{status:"valid",value:u},value:c._parse(new ci(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=>cn.mergeObjectSync(r,c)):cn.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:Ce.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 kt.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 kt.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return Wc(this)}partial(e){let r={};for(let n of kt.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 kt.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Oi;)i=i._def.innerType;r[n]=i}return new t({...this._def,shape:()=>r})}keyof(){return y6(kt.objectKeys(this.shape))}};Kn.create=(t,e)=>new Kn({shape:()=>t,unknownKeys:"strip",catchall:ta.create(),typeName:Ce.ZodObject,...We(e)});Kn.strictCreate=(t,e)=>new Kn({shape:()=>t,unknownKeys:"strict",catchall:ta.create(),typeName:Ce.ZodObject,...We(e)});Kn.lazycreate=(t,e)=>new Kn({shape:t,unknownKeys:"strip",catchall:ta.create(),typeName:Ce.ZodObject,...We(e)});nu=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(a){for(let s of a)if(s.result.status==="valid")return s.result;for(let s of a)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(s=>new si(s.ctx.common.issues));return ue(r,{code:X.invalid_union,unionErrors:o}),Re}if(r.common.async)return Promise.all(n.map(async a=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(i);{let a,o=[];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"&&!a&&(a={result:l,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let s=o.map(c=>new si(c));return ue(r,{code:X.invalid_union,unionErrors:s}),Re}}get options(){return this._def.options}};nu.create=(t,e)=>new nu({options:t,typeName:Ce.ZodUnion,...We(e)});Ea=t=>t instanceof au?Ea(t.schema):t instanceof Ni?Ea(t.innerType()):t instanceof ou?[t.value]:t instanceof su?t.options:t instanceof cu?kt.objectValues(t.enum):t instanceof uu?Ea(t._def.innerType):t instanceof tu?[void 0]:t instanceof ru?[null]:t instanceof Oi?[void 0,...Ea(t.unwrap())]:t instanceof Oa?[null,...Ea(t.unwrap())]:t instanceof mv||t instanceof du?Ea(t.unwrap()):t instanceof lu?Ea(t._def.innerType):[],OI=class t extends tt{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.object)return ue(r,{code:X.invalid_type,expected:he.object,received:r.parsedType}),Re;let n=this.discriminator,i=r.data[n],a=this.optionsMap.get(i);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(ue(r,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Re)}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 a of r){let o=Ea(a.shape[e]);if(!o.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of o){if(i.has(s))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,a)}}return new t({typeName:Ce.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...We(n)})}};iu=class extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(a,o)=>{if(n2(a)||n2(o))return Re;let s=jI(a.value,o.value);return s.valid?((i2(a)||i2(o))&&r.dirty(),{status:r.value,value:s.data}):(ue(n,{code:X.invalid_intersection_types}),Re)};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(([a,o])=>i(a,o)):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}))}};iu.create=(t,e,r)=>new iu({left:t,right:e,typeName:Ce.ZodIntersection,...We(r)});za=class t extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.array)return ue(n,{code:X.invalid_type,expected:he.array,received:n.parsedType}),Re;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"}),Re;!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((a,o)=>{let s=this._def.items[o]||this._def.rest;return s?s._parse(new ci(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>cn.mergeArray(r,a)):cn.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};za.create=(t,e)=>{if(!Array.isArray(t))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new za({items:t,typeName:Ce.ZodTuple,rest:null,...We(e)})};NI=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!==he.object)return ue(n,{code:X.invalid_type,expected:he.object,received:n.parsedType}),Re;let i=[],a=this._def.keyType,o=this._def.valueType;for(let s in n.data)i.push({key:a._parse(new ci(n,s,n.path,s)),value:o._parse(new ci(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?cn.mergeObjectAsync(r,i):cn.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:Ce.ZodRecord,...We(n)}):new t({keyType:eu.create(),valueType:e,typeName:Ce.ZodRecord,...We(r)})}},$p=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!==he.map)return ue(n,{code:X.invalid_type,expected:he.map,received:n.parsedType}),Re;let i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,c],u)=>({key:i._parse(new ci(n,s,n.path,[u,"key"])),value:a._parse(new ci(n,c,n.path,[u,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of o){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return Re;(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 o){let{key:u,value:l}=c;if(u.status==="aborted"||l.status==="aborted")return Re;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}}}};$p.create=(t,e,r)=>new $p({valueType:e,keyType:t,typeName:Ce.ZodMap,...We(r)});Ip=class t extends tt{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==he.set)return ue(n,{code:X.invalid_type,expected:he.set,received:n.parsedType}),Re;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 a=this._def.valueType;function o(c){let u=new Set;for(let l of c){if(l.status==="aborted")return Re;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let s=[...n.data.values()].map((c,u)=>a._parse(new ci(n,c,n.path,u)));return n.common.async?Promise.all(s).then(c=>o(c)):o(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)}};Ip.create=(t,e)=>new Ip({valueType:t,minSize:null,maxSize:null,typeName:Ce.ZodSet,...We(e)});RI=class t extends tt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.function)return ue(r,{code:X.invalid_type,expected:he.function,received:r.parsedType}),Re;function n(s,c){return zI({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,TI(),vp].filter(u=>!!u),issueData:{code:X.invalid_arguments,argumentsError:c}})}function i(s,c){return zI({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,TI(),vp].filter(u=>!!u),issueData:{code:X.invalid_return_type,returnTypeError:c}})}let a={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof ms){let s=this;return xn(async function(...c){let u=new si([]),l=await s._def.args.parseAsync(c,a).catch(f=>{throw u.addIssue(n(c,f)),u}),d=await Reflect.apply(o,this,l);return await s._def.returns._def.type.parseAsync(d,a).catch(f=>{throw u.addIssue(i(d,f)),u})})}else{let s=this;return xn(function(...c){let u=s._def.args.safeParse(c,a);if(!u.success)throw new si([n(c,u.error)]);let l=Reflect.apply(o,this,u.data),d=s._def.returns.safeParse(l,a);if(!d.success)throw new si([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:za.create(e).rest(lo.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||za.create([]).rest(lo.create()),returns:r||lo.create(),typeName:Ce.ZodFunction,...We(n)})}},au=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})}};au.create=(t,e)=>new au({getter:t,typeName:Ce.ZodLazy,...We(e)});ou=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}),Re}return{status:"valid",value:e.data}}get value(){return this._def.value}};ou.create=(t,e)=>new ou({value:t,typeName:Ce.ZodLiteral,...We(e)});su=class t extends tt{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return ue(r,{expected:kt.joinValues(n),received:r.parsedType,code:X.invalid_type}),Re}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}),Re}return xn(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})}};su.create=y6;cu=class extends tt{_parse(e){let r=kt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==he.string&&n.parsedType!==he.number){let i=kt.objectValues(r);return ue(n,{expected:kt.joinValues(i),received:n.parsedType,code:X.invalid_type}),Re}if(this._cache||(this._cache=new Set(kt.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=kt.objectValues(r);return ue(n,{received:n.data,code:X.invalid_enum_value,options:i}),Re}return xn(e.data)}get enum(){return this._def.values}};cu.create=(t,e)=>new cu({values:t,typeName:Ce.ZodNativeEnum,...We(e)});ms=class extends tt{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==he.promise&&r.common.async===!1)return ue(r,{code:X.invalid_type,expected:he.promise,received:r.parsedType}),Re;let n=r.parsedType===he.promise?r.data:Promise.resolve(r.data);return xn(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ms.create=(t,e)=>new ms({type:t,typeName:Ce.ZodPromise,...We(e)});Ni=class extends tt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:o=>{ue(n,o),o.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){let o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(r.value==="aborted")return Re;let c=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return c.status==="aborted"?Re:c.status==="dirty"||r.value==="dirty"?up(c.value):c});{if(r.value==="aborted")return Re;let s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?Re:s.status==="dirty"||r.value==="dirty"?up(s.value):s}}if(i.type==="refinement"){let o=s=>{let c=i.refinement(s,a);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"?Re:(s.status==="dirty"&&r.dirty(),o(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"?Re:(s.status==="dirty"&&r.dirty(),o(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Xc(o))return Re;let s=i.transform(o.value,a);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(o=>Xc(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:r.value,value:s})):Re);kt.assertNever(i)}};Ni.create=(t,e,r)=>new Ni({schema:t,typeName:Ce.ZodEffects,effect:e,...We(r)});Ni.createWithPreprocess=(t,e,r)=>new Ni({schema:e,effect:{type:"preprocess",transform:t},typeName:Ce.ZodEffects,...We(r)});Oi=class extends tt{_parse(e){return this._getType(e)===he.undefined?xn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Oi.create=(t,e)=>new Oi({innerType:t,typeName:Ce.ZodOptional,...We(e)});Oa=class extends tt{_parse(e){return this._getType(e)===he.null?xn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Oa.create=(t,e)=>new Oa({innerType:t,typeName:Ce.ZodNullable,...We(e)});uu=class extends tt{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===he.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};uu.create=(t,e)=>new uu({innerType:t,typeName:Ce.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...We(e)});lu=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 fv(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new si(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new si(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};lu.create=(t,e)=>new lu({innerType:t,typeName:Ce.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...We(e)});Ep=class extends tt{_parse(e){if(this._getType(e)!==he.nan){let r=this._getOrReturnCtx(e);return ue(r,{code:X.invalid_type,expected:he.nan,received:r.parsedType}),Re}return{status:"valid",value:e.data}}};Ep.create=t=>new Ep({typeName:Ce.ZodNaN,...We(t)});mv=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}},hv=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"?Re:i.status==="dirty"?(r.dirty(),up(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"?Re: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:Ce.ZodPipeline})}},du=class extends tt{_parse(e){let r=this._def.innerType._parse(e),n=i=>(Xc(i)&&(i.value=Object.freeze(i.value)),i);return fv(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};du.create=(t,e)=>new du({innerType:t,typeName:Ce.ZodReadonly,...We(e)});iUe={object:Kn.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"})(Ce||(Ce={}));aUe=eu.create,oUe=yp.create,sUe=Ep.create,cUe=_p.create,uUe=bp.create,lUe=xp.create,dUe=wp.create,pUe=tu.create,fUe=ru.create,mUe=kp.create,hUe=lo.create,gUe=ta.create,vUe=Sp.create,yUe=fo.create,_Ue=Kn.create,bUe=Kn.strictCreate,xUe=nu.create,wUe=OI.create,kUe=iu.create,SUe=za.create,$Ue=NI.create,IUe=$p.create,EUe=Ip.create,PUe=RI.create,TUe=au.create,zUe=ou.create,OUe=su.create,jUe=cu.create,NUe=ms.create,RUe=Ni.create,CUe=Oi.create,AUe=Oa.create,UUe=Ni.createWithPreprocess,DUe=hv.create,_6={};vs(_6,{version:()=>zq,util:()=>ft,treeifyError:()=>O6,toJSONSchema:()=>kL,toDotPath:()=>j6,safeParseAsync:()=>cE,safeParse:()=>oE,registry:()=>kE,regexes:()=>uE,prettifyError:()=>N6,parseAsync:()=>_v,parse:()=>yv,locales:()=>wE,isValidJWT:()=>eZ,isValidBase64URL:()=>Yq,isValidBase64:()=>fE,globalRegistry:()=>us,globalConfig:()=>gv,function:()=>wL,formatError:()=>rE,flattenError:()=>tE,config:()=>un,clone:()=>Ai,_xid:()=>CE,_void:()=>sL,_uuidv7:()=>PE,_uuidv6:()=>EE,_uuidv4:()=>IE,_uuid:()=>$E,_url:()=>TE,_uppercase:()=>HE,_unknown:()=>kv,_union:()=>jse,_undefined:()=>nL,_ulid:()=>RE,_uint64:()=>tL,_uint32:()=>GZ,_tuple:()=>gL,_trim:()=>eP,_transform:()=>Zse,_toUpperCase:()=>rP,_toLowerCase:()=>tP,_templateLiteral:()=>Qse,_symbol:()=>rL,_success:()=>Bse,_stringbool:()=>bL,_stringFormat:()=>xL,_string:()=>AZ,_startsWith:()=>QE,_size:()=>WE,_set:()=>Use,_safeParseAsync:()=>sE,_safeParse:()=>aE,_regex:()=>BE,_refine:()=>_L,_record:()=>Cse,_readonly:()=>Gse,_property:()=>hL,_promise:()=>Jse,_positive:()=>dL,_pipe:()=>Hse,_parseAsync:()=>iE,_parse:()=>nE,_overwrite:()=>bs,_optional:()=>Lse,_number:()=>FZ,_nullable:()=>Fse,_null:()=>iL,_normalize:()=>XE,_nonpositive:()=>fL,_nonoptional:()=>Wse,_nonnegative:()=>mL,_never:()=>oL,_negative:()=>pL,_nativeEnum:()=>Mse,_nanoid:()=>OE,_nan:()=>lL,_multipleOf:()=>Op,_minSize:()=>jp,_minLength:()=>fu,_min:()=>Vn,_mime:()=>JE,_maxSize:()=>qv,_maxLength:()=>Zv,_max:()=>ji,_map:()=>Ase,_lte:()=>ji,_lt:()=>hs,_lowercase:()=>KE,_literal:()=>qse,_length:()=>Lv,_lazy:()=>Yse,_ksuid:()=>AE,_jwt:()=>VE,_isoTime:()=>ZZ,_isoDuration:()=>LZ,_isoDateTime:()=>MZ,_isoDate:()=>qZ,_ipv6:()=>DE,_ipv4:()=>UE,_intersection:()=>Rse,_int64:()=>eL,_int32:()=>HZ,_int:()=>WZ,_includes:()=>GE,_guid:()=>wv,_gte:()=>Vn,_gt:()=>gs,_float64:()=>KZ,_float32:()=>BZ,_file:()=>vL,_enum:()=>Dse,_endsWith:()=>YE,_emoji:()=>zE,_email:()=>SE,_e164:()=>FE,_discriminatedUnion:()=>Nse,_default:()=>Vse,_date:()=>cL,_custom:()=>yL,_cuid2:()=>NE,_cuid:()=>jE,_coercedString:()=>UZ,_coercedNumber:()=>VZ,_coercedDate:()=>uL,_coercedBoolean:()=>YZ,_coercedBigint:()=>XZ,_cidrv6:()=>qE,_cidrv4:()=>ME,_catch:()=>Kse,_boolean:()=>QZ,_bigint:()=>JZ,_base64url:()=>LE,_base64:()=>ZE,_array:()=>nP,_any:()=>aL,TimePrecision:()=>DZ,NEVER:()=>b6,JSONSchemaGenerator:()=>Np,JSONSchema:()=>Xse,Doc:()=>bv,$output:()=>RZ,$input:()=>CZ,$constructor:()=>U,$brand:()=>x6,$ZodXID:()=>qq,$ZodVoid:()=>lZ,$ZodUnknown:()=>xv,$ZodUnion:()=>_E,$ZodUndefined:()=>oZ,$ZodUUID:()=>jq,$ZodURL:()=>Rq,$ZodULID:()=>Mq,$ZodType:()=>Le,$ZodTuple:()=>Mv,$ZodTransform:()=>bE,$ZodTemplateLiteral:()=>TZ,$ZodSymbol:()=>aZ,$ZodSuccess:()=>$Z,$ZodStringFormat:()=>Kt,$ZodString:()=>Up,$ZodSet:()=>gZ,$ZodRegistry:()=>zp,$ZodRecord:()=>mZ,$ZodRealError:()=>Cp,$ZodReadonly:()=>PZ,$ZodPromise:()=>zZ,$ZodPrefault:()=>kZ,$ZodPipe:()=>xE,$ZodOptional:()=>bZ,$ZodObject:()=>yE,$ZodNumberFormat:()=>nZ,$ZodNumber:()=>mE,$ZodNullable:()=>xZ,$ZodNull:()=>sZ,$ZodNonOptional:()=>SZ,$ZodNever:()=>uZ,$ZodNanoID:()=>Aq,$ZodNaN:()=>EZ,$ZodMap:()=>hZ,$ZodLiteral:()=>yZ,$ZodLazy:()=>OZ,$ZodKSUID:()=>Zq,$ZodJWT:()=>tZ,$ZodIntersection:()=>fZ,$ZodISOTime:()=>Vq,$ZodISODuration:()=>Wq,$ZodISODateTime:()=>Lq,$ZodISODate:()=>Fq,$ZodIPv6:()=>Kq,$ZodIPv4:()=>Bq,$ZodGUID:()=>Oq,$ZodFunction:()=>Sv,$ZodFile:()=>_Z,$ZodError:()=>eE,$ZodEnum:()=>vZ,$ZodEmoji:()=>Cq,$ZodEmail:()=>Nq,$ZodE164:()=>Xq,$ZodDiscriminatedUnion:()=>pZ,$ZodDefault:()=>wZ,$ZodDate:()=>dZ,$ZodCustomStringFormat:()=>rZ,$ZodCustom:()=>jZ,$ZodCheckUpperCase:()=>kq,$ZodCheckStringFormat:()=>Ap,$ZodCheckStartsWith:()=>$q,$ZodCheckSizeEquals:()=>vq,$ZodCheckRegex:()=>xq,$ZodCheckProperty:()=>Eq,$ZodCheckOverwrite:()=>Tq,$ZodCheckNumberFormat:()=>fq,$ZodCheckMultipleOf:()=>pq,$ZodCheckMinSize:()=>gq,$ZodCheckMinLength:()=>_q,$ZodCheckMimeType:()=>Pq,$ZodCheckMaxSize:()=>hq,$ZodCheckMaxLength:()=>yq,$ZodCheckLowerCase:()=>wq,$ZodCheckLessThan:()=>dE,$ZodCheckLengthEquals:()=>bq,$ZodCheckIncludes:()=>Sq,$ZodCheckGreaterThan:()=>pE,$ZodCheckEndsWith:()=>Iq,$ZodCheckBigIntFormat:()=>mq,$ZodCheck:()=>lr,$ZodCatch:()=>IZ,$ZodCUID2:()=>Dq,$ZodCUID:()=>Uq,$ZodCIDRv6:()=>Gq,$ZodCIDRv4:()=>Hq,$ZodBoolean:()=>hE,$ZodBigIntFormat:()=>iZ,$ZodBigInt:()=>gE,$ZodBase64URL:()=>Jq,$ZodBase64:()=>Qq,$ZodAsyncError:()=>mo,$ZodArray:()=>vE,$ZodAny:()=>cZ});b6=Object.freeze({status:"aborted"});x6=Symbol("zod_brand"),mo=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},gv={};ft={};vs(ft,{unwrapMessage:()=>lp,stringifyPrimitive:()=>Ge,required:()=>Hae,randomString:()=>Mae,propertyKeyTypes:()=>vv,promiseAllObject:()=>Dae,primitiveTypes:()=>$6,prefixIssues:()=>oi,pick:()=>Fae,partial:()=>Kae,optionalKeys:()=>I6,omit:()=>Vae,numKeys:()=>qae,nullish:()=>ys,normalizeParams:()=>re,merge:()=>Bae,jsonStringifyReplacer:()=>w6,joinValues:()=>ie,issue:()=>T6,isPlainObject:()=>Tp,isObject:()=>Pp,getSizableOrigin:()=>Uv,getParsedType:()=>Zae,getLengthableOrigin:()=>Dv,getEnumValues:()=>YI,getElementAtPath:()=>Uae,floatSafeRemainder:()=>k6,finalizeIssue:()=>Ri,extend:()=>Wae,escapeRegex:()=>_s,esc:()=>Bc,defineLazy:()=>Ot,createTransparentProxy:()=>Lae,clone:()=>Ai,cleanRegex:()=>Av,cleanEnum:()=>Gae,captureStackTrace:()=>XI,cached:()=>Cv,assignProp:()=>JI,assertNotEqual:()=>Nae,assertNever:()=>Cae,assertIs:()=>Rae,assertEqual:()=>jae,assert:()=>Aae,allowsEval:()=>S6,aborted:()=>Qc,NUMBER_FORMAT_RANGES:()=>E6,Class:()=>CI,BIGINT_FORMAT_RANGES:()=>P6});XI=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};S6=Cv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});Zae=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}`)}},vv=new Set(["string","number","symbol"]),$6=new Set(["string","number","bigint","boolean","symbol","undefined"]);E6={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]},P6={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};CI=class{constructor(...e){}},z6=(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,w6,2)},enumerable:!0})},eE=U("$ZodError",z6),Cp=U("$ZodError",z6,{Parent:Error});nE=t=>(e,r,n,i)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise)throw new mo;if(o.issues.length){let s=new(i?.Err??t)(o.issues.map(c=>Ri(c,a,un())));throw XI(s,i?.callee),s}return o.value},yv=nE(Cp),iE=t=>async(e,r,n,i)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let s=new(i?.Err??t)(o.issues.map(c=>Ri(c,a,un())));throw XI(s,i?.callee),s}return o.value},_v=iE(Cp),aE=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},a=e._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new mo;return a.issues.length?{success:!1,error:new(t??eE)(a.issues.map(o=>Ri(o,i,un())))}:{success:!0,data:a.value}},oE=aE(Cp),sE=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new t(a.issues.map(o=>Ri(o,i,un())))}:{success:!0,data:a.value}},cE=sE(Cp),uE={};vs(uE,{xid:()=>U6,uuid7:()=>Xae,uuid6:()=>Jae,uuid4:()=>Yae,uuid:()=>pu,uppercase:()=>lq,unicodeEmail:()=>roe,undefined:()=>cq,ulid:()=>A6,time:()=>eq,string:()=>rq,rfc5322Email:()=>toe,number:()=>aq,null:()=>sq,nanoid:()=>M6,lowercase:()=>uq,ksuid:()=>D6,ipv6:()=>W6,ipv4:()=>V6,integer:()=>iq,html5Email:()=>eoe,hostname:()=>G6,guid:()=>Z6,extendedDuration:()=>Qae,emoji:()=>F6,email:()=>L6,e164:()=>Q6,duration:()=>q6,domain:()=>aoe,datetime:()=>tq,date:()=>J6,cuid2:()=>C6,cuid:()=>R6,cidrv6:()=>K6,cidrv4:()=>B6,browserEmail:()=>noe,boolean:()=>oq,bigint:()=>nq,base64url:()=>lE,base64:()=>H6,_emoji:()=>ioe});R6=/^[cC][^\s-]{8,}$/,C6=/^[0-9a-z]+$/,A6=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,U6=/^[0-9a-vA-V]{20}$/,D6=/^[A-Za-z0-9]{27}$/,M6=/^[a-zA-Z0-9_-]{21}$/,q6=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Qae=/^[-+]?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)?)??$/,Z6=/^([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})$/,pu=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)$/,Yae=pu(4),Jae=pu(6),Xae=pu(7),L6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,eoe=/^[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])?)*$/,toe=/^(([^<>()\[\]\\.,;:\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,}))$/,roe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,noe=/^[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])?)*$/,ioe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";V6=/^(?:(?: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])$/,W6=/^(([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})$/,B6=/^((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])$/,K6=/^(([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])$/,H6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,lE=/^[A-Za-z0-9_-]*$/,G6=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,aoe=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Q6=/^\+(?:[0-9]){6,14}[0-9]$/,Y6="(?:(?:\\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])))",J6=new RegExp(`^${Y6}$`);rq=t=>{let e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},nq=/^\d+n?$/,iq=/^\d+$/,aq=/^-?\d+(?:\.\d+)?/i,oq=/true|false/i,sq=/null/i,cq=/undefined/i,uq=/^[^A-Z]*$/,lq=/^[^a-z]*$/,lr=U("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),dq={number:"number",bigint:"bigint",object:"date"},dE=U("$ZodCheckLessThan",(t,e)=>{lr.init(t,e);let r=dq[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<a&&(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})}}),pE=U("$ZodCheckGreaterThan",(t,e)=>{lr.init(t,e);let r=dq[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,a=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>a&&(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})}}),pq=U("$ZodCheckMultipleOf",(t,e)=>{lr.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):k6(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})}}),fq=U("$ZodCheckNumberFormat",(t,e)=>{lr.init(t,e),e.format=e.format||"float64";let r=e.format?.includes("int"),n=r?"int":"number",[i,a]=E6[e.format];t._zod.onattach.push(o=>{let s=o._zod.bag;s.format=e.format,s.minimum=i,s.maximum=a,r&&(s.pattern=iq)}),t._zod.check=o=>{let s=o.value;if(r){if(!Number.isInteger(s)){o.issues.push({expected:n,format:e.format,code:"invalid_type",input:s,inst:t});return}if(!Number.isSafeInteger(s)){s>0?o.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}):o.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&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),s>a&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:a,inst:t})}}),mq=U("$ZodCheckBigIntFormat",(t,e)=>{lr.init(t,e);let[r,n]=P6[e.format];t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,a.minimum=r,a.maximum=n}),t._zod.check=i=>{let a=i.value;a<r&&i.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),a>n&&i.issues.push({origin:"bigint",input:a,code:"too_big",maximum:n,inst:t})}}),hq=U("$ZodCheckMaxSize",(t,e)=>{lr.init(t,e),t._zod.when=r=>{let n=r.value;return!ys(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:Uv(n),code:"too_big",maximum:e.maximum,input:n,inst:t,continue:!e.abort})}}),gq=U("$ZodCheckMinSize",(t,e)=>{lr.init(t,e),t._zod.when=r=>{let n=r.value;return!ys(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:Uv(n),code:"too_small",minimum:e.minimum,input:n,inst:t,continue:!e.abort})}}),vq=U("$ZodCheckSizeEquals",(t,e)=>{lr.init(t,e),t._zod.when=r=>{let n=r.value;return!ys(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 a=i>e.size;r.issues.push({origin:Uv(n),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),yq=U("$ZodCheckMaxLength",(t,e)=>{lr.init(t,e),t._zod.when=r=>{let n=r.value;return!ys(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=Dv(n);r.issues.push({origin:i,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),_q=U("$ZodCheckMinLength",(t,e)=>{lr.init(t,e),t._zod.when=r=>{let n=r.value;return!ys(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=Dv(n);r.issues.push({origin:i,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),bq=U("$ZodCheckLengthEquals",(t,e)=>{lr.init(t,e),t._zod.when=r=>{let n=r.value;return!ys(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 a=Dv(n),o=i>e.length;r.issues.push({origin:a,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),Ap=U("$ZodCheckStringFormat",(t,e)=>{var r,n;lr.init(t,e),t._zod.onattach.push(i=>{let a=i._zod.bag;a.format=e.format,e.pattern&&(a.patterns??(a.patterns=new Set),a.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=()=>{})}),xq=U("$ZodCheckRegex",(t,e)=>{Ap.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})}}),wq=U("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=uq),Ap.init(t,e)}),kq=U("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=lq),Ap.init(t,e)}),Sq=U("$ZodCheckIncludes",(t,e)=>{lr.init(t,e);let r=_s(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let a=i._zod.bag;a.patterns??(a.patterns=new Set),a.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})}}),$q=U("$ZodCheckStartsWith",(t,e)=>{lr.init(t,e);let r=new RegExp(`^${_s(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})}}),Iq=U("$ZodCheckEndsWith",(t,e)=>{lr.init(t,e);let r=new RegExp(`.*${_s(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})}});Eq=U("$ZodCheckProperty",(t,e)=>{lr.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=>o2(i,r,e.property));o2(n,r,e.property)}}),Pq=U("$ZodCheckMimeType",(t,e)=>{lr.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})}}),Tq=U("$ZodCheckOverwrite",(t,e)=>{lr.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}}),bv=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(a=>a),n=Math.min(...r.map(a=>a.length-a.trimStart().length)),i=r.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let e=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...r,n.join(`
193
+ `))}},zq={major:4,minor:0,patch:0},Le=U("$ZodType",(t,e)=>{var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=zq;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let i of n)for(let a of i._zod.onattach)a(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,o,s)=>{let c=Qc(a),u;for(let l of o){if(l._zod.when){if(!l._zod.when(a))continue}else if(c)continue;let d=a.issues.length,f=l._zod.check(a);if(f instanceof Promise&&s?.async===!1)throw new mo;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,a.issues.length!==d&&(c||(c=Qc(a,d)))});else{if(a.issues.length===d)continue;c||(c=Qc(a,d))}}return u?u.then(()=>a):a};t._zod.run=(a,o)=>{let s=t._zod.parse(a,o);if(s instanceof Promise){if(o.async===!1)throw new mo;return s.then(c=>i(c,n,o))}return i(s,n,o)}}t["~standard"]={validate:i=>{try{let a=oE(t,i);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return cE(t,i).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}}),Up=U("$ZodString",(t,e)=>{Le.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??rq(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)=>{Ap.init(t,e),Up.init(t,e)}),Oq=U("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Z6),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=pu(r))}else e.pattern??(e.pattern=pu());Kt.init(t,e)}),Nq=U("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=L6),Kt.init(t,e)}),Rq=U("$ZodURL",(t,e)=>{Kt.init(t,e),t._zod.check=r=>{try{let n=r.value,i=new URL(n),a=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:G6.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("/")&&a.endsWith("/")?r.value=a.slice(0,-1):r.value=a;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),Cq=U("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=F6()),Kt.init(t,e)}),Aq=U("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=M6),Kt.init(t,e)}),Uq=U("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=R6),Kt.init(t,e)}),Dq=U("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=C6),Kt.init(t,e)}),Mq=U("$ZodULID",(t,e)=>{e.pattern??(e.pattern=A6),Kt.init(t,e)}),qq=U("$ZodXID",(t,e)=>{e.pattern??(e.pattern=U6),Kt.init(t,e)}),Zq=U("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=D6),Kt.init(t,e)}),Lq=U("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=tq(e)),Kt.init(t,e)}),Fq=U("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=J6),Kt.init(t,e)}),Vq=U("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=eq(e)),Kt.init(t,e)}),Wq=U("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=q6),Kt.init(t,e)}),Bq=U("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=V6),Kt.init(t,e),t._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Kq=U("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=W6),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})}}}),Hq=U("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=B6),Kt.init(t,e)}),Gq=U("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=K6),Kt.init(t,e),t._zod.check=r=>{let[n,i]=r.value.split("/");try{if(!i)throw Error();let a=Number(i);if(`${a}`!==i||a<0||a>128)throw Error();new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});Qq=U("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=H6),Kt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),t._zod.check=r=>{fE(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});Jq=U("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=lE),Kt.init(t,e),t._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),t._zod.check=r=>{Yq(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Xq=U("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Q6),Kt.init(t,e)});tZ=U("$ZodJWT",(t,e)=>{Kt.init(t,e),t._zod.check=r=>{eZ(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),rZ=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})}}),mE=U("$ZodNumber",(t,e)=>{Le.init(t,e),t._zod.pattern=t._zod.bag.pattern??aq,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 a=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,...a?{received:a}:{}}),r}}),nZ=U("$ZodNumber",(t,e)=>{fq.init(t,e),mE.init(t,e)}),hE=U("$ZodBoolean",(t,e)=>{Le.init(t,e),t._zod.pattern=oq,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}}),gE=U("$ZodBigInt",(t,e)=>{Le.init(t,e),t._zod.pattern=nq,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}}),iZ=U("$ZodBigInt",(t,e)=>{mq.init(t,e),gE.init(t,e)}),aZ=U("$ZodSymbol",(t,e)=>{Le.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}}),oZ=U("$ZodUndefined",(t,e)=>{Le.init(t,e),t._zod.pattern=cq,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}}),sZ=U("$ZodNull",(t,e)=>{Le.init(t,e),t._zod.pattern=sq,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}}),cZ=U("$ZodAny",(t,e)=>{Le.init(t,e),t._zod.parse=r=>r}),xv=U("$ZodUnknown",(t,e)=>{Le.init(t,e),t._zod.parse=r=>r}),uZ=U("$ZodNever",(t,e)=>{Le.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),lZ=U("$ZodVoid",(t,e)=>{Le.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}}),dZ=U("$ZodDate",(t,e)=>{Le.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:t}),r}});vE=U("$ZodArray",(t,e)=>{Le.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 a=[];for(let o=0;o<i.length;o++){let s=i[o],c=e.element._zod.run({value:s,issues:[]},n);c instanceof Promise?a.push(c.then(u=>s2(u,r,o))):s2(c,r,o)}return a.length?Promise.all(a).then(()=>r):r}});yE=U("$ZodObject",(t,e)=>{Le.init(t,e);let r=Cv(()=>{let l=Object.keys(e.shape);for(let f of l)if(!(e.shape[f]instanceof Le))throw Error(`Invalid element at key "${f}": expected a Zod schema`);let d=I6(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 f in l){let p=l[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(let m of p.values)d[f].add(m)}}return d});let n=l=>{let d=new bv(["shape","payload","ctx"]),f=r.value,p=h=>{let b=Bc(h);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),v=0;for(let h of f.keys)m[h]=`key_${v++}`;d.write("const newResult = {}");for(let h of f.keys)if(f.optionalKeys.has(h)){let b=m[h];d.write(`const ${b} = ${p(h)};`);let y=Bc(h);d.write(`
194
+ if (${b}.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
+ ${b}.issues.map((iss) => ({
202
+ ...iss,
203
+ path: iss.path ? [${y}, ...iss.path] : [${y}],
204
+ }))
205
+ );
206
+ }
207
+ } else if (${b}.value === undefined) {
208
+ if (${y} in input) newResult[${y}] = undefined;
209
+ } else {
210
+ newResult[${y}] = ${b}.value;
211
+ }
212
+ `)}else{let b=m[h];d.write(`const ${b} = ${p(h)};`),d.write(`
213
+ if (${b}.issues.length) payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
214
+ ...iss,
215
+ path: iss.path ? [${Bc(h)}, ...iss.path] : [${Bc(h)}]
216
+ })));`),d.write(`newResult[${Bc(h)}] = ${b}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let g=d.compile();return(h,b)=>g(l,h,b)},i,a=Pp,o=!gv.jitless,s=o&&S6.value,c=e.catchall,u;t._zod.parse=(l,d)=>{u??(u=r.value);let f=l.value;if(!a(f))return l.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),l;let p=[];if(o&&s&&d?.async===!1&&d.jitless!==!0)i||(i=n(e.shape)),l=i(l,d);else{l.value={};let b=u.shape;for(let y of u.keys){let _=b[y],x=_._zod.run({value:f[y],issues:[]},d),w=_._zod.optin==="optional"&&_._zod.optout==="optional";x instanceof Promise?p.push(x.then(k=>w?c2(k,l,y,f):jg(k,l,y))):w?c2(x,l,y,f):jg(x,l,y)}}if(!c)return p.length?Promise.all(p).then(()=>l):l;let m=[],v=u.keySet,g=c._zod,h=g.def.type;for(let b of Object.keys(f)){if(v.has(b))continue;if(h==="never"){m.push(b);continue}let y=g.run({value:f[b],issues:[]},d);y instanceof Promise?p.push(y.then(_=>jg(_,l,b))):jg(y,l,b)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:f,inst:t}),p.length?Promise.all(p).then(()=>l):l}});_E=U("$ZodUnion",(t,e)=>{Le.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=>Av(n.source)).join("|")})$`)}}),t._zod.parse=(r,n)=>{let i=!1,a=[];for(let o of e.options){let s=o._zod.run({value:r.value,issues:[]},n);if(s instanceof Promise)a.push(s),i=!0;else{if(s.issues.length===0)return s;a.push(s)}}return i?Promise.all(a).then(o=>u2(o,r,t,n)):u2(a,r,t,n)}}),pZ=U("$ZodDiscriminatedUnion",(t,e)=>{_E.init(t,e);let r=t._zod.parse;Ot(t._zod,"propValues",()=>{let i={};for(let a of e.options){let o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let[s,c]of Object.entries(o)){i[s]||(i[s]=new Set);for(let u of c)i[s].add(u)}}return i});let n=Cv(()=>{let i=e.options,a=new Map;for(let o of i){let s=o._zod.propValues[e.discriminator];if(!s||s.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let c of s){if(a.has(c))throw Error(`Duplicate discriminator value "${String(c)}"`);a.set(c,o)}}return a});t._zod.parse=(i,a)=>{let o=i.value;if(!Pp(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:t}),i;let s=n.value.get(o?.[e.discriminator]);return s?s._zod.run(i,a):e.unionFallback?r(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:o,path:[e.discriminator],inst:t}),i)}}),fZ=U("$ZodIntersection",(t,e)=>{Le.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,a=e.left._zod.run({value:i,issues:[]},n),o=e.right._zod.run({value:i,issues:[]},n);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([s,c])=>l2(r,s,c)):l2(r,a,o)}});Mv=U("$ZodTuple",(t,e)=>{Le.init(t,e);let r=e.items,n=r.length-[...r].reverse().findIndex(i=>i._zod.optin!=="optional");t._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[];if(!e.rest){let u=o.length>r.length,l=o.length<n-1;if(u||l)return i.issues.push({input:o,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>=o.length&&c>=n)continue;let l=u._zod.run({value:o[c],issues:[]},a);l instanceof Promise?s.push(l.then(d=>Ng(d,i,c))):Ng(l,i,c)}if(e.rest){let u=o.slice(r.length);for(let l of u){c++;let d=e.rest._zod.run({value:l,issues:[]},a);d instanceof Promise?s.push(d.then(f=>Ng(f,i,c))):Ng(d,i,c)}}return s.length?Promise.all(s).then(()=>i):i}});mZ=U("$ZodRecord",(t,e)=>{Le.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Tp(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let a=[];if(e.keyType._zod.values){let o=e.keyType._zod.values;r.value={};for(let c of o)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=e.valueType._zod.run({value:i[c],issues:[]},n);u instanceof Promise?a.push(u.then(l=>{l.issues.length&&r.issues.push(...oi(c,l.issues)),r.value[c]=l.value})):(u.issues.length&&r.issues.push(...oi(c,u.issues)),r.value[c]=u.value)}let s;for(let c in i)o.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 o of Reflect.ownKeys(i)){if(o==="__proto__")continue;let s=e.keyType._zod.run({value:o,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=>Ri(u,n,un())),input:o,path:[o],inst:t}),r.value[s.value]=s.value;continue}let c=e.valueType._zod.run({value:i[o],issues:[]},n);c instanceof Promise?a.push(c.then(u=>{u.issues.length&&r.issues.push(...oi(o,u.issues)),r.value[s.value]=u.value})):(c.issues.length&&r.issues.push(...oi(o,c.issues)),r.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>r):r}}),hZ=U("$ZodMap",(t,e)=>{Le.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 a=[];r.value=new Map;for(let[o,s]of i){let c=e.keyType._zod.run({value:o,issues:[]},n),u=e.valueType._zod.run({value:s,issues:[]},n);c instanceof Promise||u instanceof Promise?a.push(Promise.all([c,u]).then(([l,d])=>{d2(l,d,r,o,i,t,n)})):d2(c,u,r,o,i,t,n)}return a.length?Promise.all(a).then(()=>r):r}});gZ=U("$ZodSet",(t,e)=>{Le.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 a=[];r.value=new Set;for(let o of i){let s=e.valueType._zod.run({value:o,issues:[]},n);s instanceof Promise?a.push(s.then(c=>p2(c,r))):p2(s,r)}return a.length?Promise.all(a).then(()=>r):r}});vZ=U("$ZodEnum",(t,e)=>{Le.init(t,e);let r=YI(e.entries);t._zod.values=new Set(r),t._zod.pattern=new RegExp(`^(${r.filter(n=>vv.has(typeof n)).map(n=>typeof n=="string"?_s(n):n.toString()).join("|")})$`),t._zod.parse=(n,i)=>{let a=n.value;return t._zod.values.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:t}),n}}),yZ=U("$ZodLiteral",(t,e)=>{Le.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?_s(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}}),_Z=U("$ZodFile",(t,e)=>{Le.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}}),bE=U("$ZodTransform",(t,e)=>{Le.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(a=>(r.value=a,r));if(i instanceof Promise)throw new mo;return r.value=i,r}}),bZ=U("$ZodOptional",(t,e)=>{Le.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(`^(${Av(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)}),xZ=U("$ZodNullable",(t,e)=>{Le.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(`^(${Av(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)}),wZ=U("$ZodDefault",(t,e)=>{Le.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(a=>f2(a,e)):f2(i,e)}});kZ=U("$ZodPrefault",(t,e)=>{Le.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))}),SZ=U("$ZodNonOptional",(t,e)=>{Le.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(a=>m2(a,t)):m2(i,t)}});$Z=U("$ZodSuccess",(t,e)=>{Le.init(t,e),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(a=>(r.value=a.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),IZ=U("$ZodCatch",(t,e)=>{Le.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(a=>(r.value=a.value,a.issues.length&&(r.value=e.catchValue({...r,error:{issues:a.issues.map(o=>Ri(o,n,un()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(a=>Ri(a,n,un()))},input:r.value}),r.issues=[]),r)}}),EZ=U("$ZodNaN",(t,e)=>{Le.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)}),xE=U("$ZodPipe",(t,e)=>{Le.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(a=>h2(a,e,n)):h2(i,e,n)}});PZ=U("$ZodReadonly",(t,e)=>{Le.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(g2):g2(i)}});TZ=U("$ZodTemplateLiteral",(t,e)=>{Le.init(t,e);let r=[];for(let n of e.parts)if(n instanceof Le){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 a=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(a,o))}else if(n===null||$6.has(typeof n))r.push(_s(`${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)}),zZ=U("$ZodPromise",(t,e)=>{Le.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),OZ=U("$ZodLazy",(t,e)=>{Le.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)=>{lr.init(t,e),Le.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(a=>v2(a,r,n,t));v2(i,r,n,t)}});wE={};vs(wE,{zhTW:()=>Ose,zhCN:()=>Tse,vi:()=>Ese,ur:()=>$se,ua:()=>kse,tr:()=>xse,th:()=>yse,ta:()=>gse,sv:()=>mse,sl:()=>pse,ru:()=>lse,pt:()=>cse,ps:()=>ise,pl:()=>ose,ota:()=>rse,no:()=>ese,nl:()=>Joe,ms:()=>Qoe,mk:()=>Hoe,ko:()=>Boe,kh:()=>Voe,ja:()=>Loe,it:()=>qoe,id:()=>Doe,hu:()=>Aoe,he:()=>Roe,frCA:()=>joe,fr:()=>zoe,fi:()=>Poe,fa:()=>Ioe,es:()=>Soe,eo:()=>woe,en:()=>NZ,de:()=>voe,cs:()=>hoe,ca:()=>foe,be:()=>doe,az:()=>uoe,ar:()=>soe});ooe=()=>{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 a=typeof i;switch(a){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 a},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: ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?` \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"} ${a} ${i.maximum.toString()} ${o.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"} ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\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 ${a} ${i.minimum.toString()} ${o.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 ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`${n[a.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":""}: ${ie(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"}}};coe=()=>{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 a=typeof i;switch(a){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 a},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: ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${a}${i.maximum.toString()} ${o.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${a.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:a.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${a.suffix}" il\u0259 bitm\u0259lidir`:a.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${a.includes}" daxil olmal\u0131d\u0131r`:a.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${a.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[a.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":""}: ${ie(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"}}};loe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);if(o){let s=Number(i.maximum),c=y2(s,o.unit.one,o.unit.few,o.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 ${o.verb} ${a}${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 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);if(o){let s=Number(i.minimum),c=y2(s,o.unit.one,o.unit.few,o.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 ${o.verb} ${a}${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 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[a.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"}: ${ie(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"}}};poe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values," o ")}`;case"too_big":{let a=i.inclusive?"com a m\xE0xim":"menys de",o=e(i.origin);return o?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${a} ${i.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"com a m\xEDnim":"m\xE9s de",o=e(i.origin);return o?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${a} ${i.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${a.prefix}"`:a.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format inv\xE0lid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${a.pattern}`:`Format inv\xE0lid per a ${n[a.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":""}: ${ie(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"}}};moe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${a}${i.maximum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${a}${i.minimum.toString()} ${o.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${a.prefix}"`:a.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${a.suffix}"`:a.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${a.includes}"`:a.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${a.pattern}`:`Neplatn\xFD form\xE1t ${n[a.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: ${ie(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"}}};goe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ist`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ist`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ung\xFCltiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ung\xFCltiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ung\xFCltiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${a.pattern} entsprechen`:`Ung\xFCltig: ${n[a.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"}: ${ie(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"}}};yoe=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},_oe=()=>{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 ${yoe(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Ge(n.values[0])}`:`Invalid option: expected one of ${ie(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.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":""}: ${ie(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"}}};boe=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},xoe=()=>{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 ${boe(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${Ge(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${ie(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.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":""}: ${ie(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"}}};koe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Demasiado grande: se esperaba que ${i.origin??"valor"} tuviera ${a}${i.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${i.origin??"valor"} fuera ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Demasiado peque\xF1o: se esperaba que ${i.origin} tuviera ${a}${i.minimum.toString()} ${o.unit}`:`Demasiado peque\xF1o: se esperaba que ${i.origin} fuera ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${n[a.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":""}: ${ie(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"}}};$oe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${a}${i.maximum.toString()} ${o.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 ${a}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} ${o.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:a.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${a.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:a.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${a.includes}" \u0628\u0627\u0634\u062F`:a.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${a.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[a.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: ${ie(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"}}};Eoe=()=>{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 a=typeof i;switch(a){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 a},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: ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Liian suuri: ${o.subject} t\xE4ytyy olla ${a}${i.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Liian pieni: ${o.subject} t\xE4ytyy olla ${a}${i.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${a.includes}"`:a.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${a.pattern}`:`Virheellinen ${n[a.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"}: ${ie(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"}}};Toe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")} attendue`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Trop grand : ${i.origin??"valeur"} doit ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i.origin??"valeur"} doit \xEAtre ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Trop petit : ${i.origin} doit ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Trop petit : ${i.origin} doit \xEAtre ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${a.pattern}`:`${n[a.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":""} : ${ie(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"}}};Ooe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"\u2264":"<",o=e(i.origin);return o?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${a}${i.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"\u2265":">",o=e(i.origin);return o?`Trop petit : attendu que ${i.origin} ait ${a}${i.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${i.origin} soit ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Cha\xEEne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${a.pattern}`:`${n[a.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":""} : ${ie(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"}}};Noe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.maximum.toString()} ${o.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${i.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.minimum.toString()} ${o.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${i.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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"${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`${n[a.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"}: ${ie(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"}}};Coe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${a}${i.maximum.toString()} ${o.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${a}${i.minimum.toString()} ${o.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\xC9rv\xE9nytelen string: "${a.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:a.format==="ends_with"?`\xC9rv\xE9nytelen string: "${a.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:a.format==="includes"?`\xC9rv\xE9nytelen string: "${a.includes}" \xE9rt\xE9ket kell tartalmaznia`:a.format==="regex"?`\xC9rv\xE9nytelen string: ${a.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[a.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":""}: ${ie(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"}}};Uoe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${a}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Terlalu kecil: diharapkan ${i.origin} memiliki ${a}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${n[a.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":""}: ${ie(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"}}};Moe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Troppo grande: ${i.origin??"valore"} deve avere ${a}${i.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Troppo piccolo: ${i.origin} deve avere ${a}${i.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${i.origin} deve essere ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${n[a.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"}: ${ie(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"}}};Zoe=()=>{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 a=typeof i;switch(a){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 a},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: ${ie(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let a=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",o=e(i.origin);return o?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o.unit??"\u8981\u7D20"}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let a=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",o=e(i.origin);return o?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o.unit}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${a}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${a.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:a.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${a.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[a.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":""}: ${ie(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"}}};Foe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${a} ${i.maximum.toString()} ${o.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"} ${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${a} ${i.minimum.toString()} ${o.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[a.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 ${ie(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"}}};Woe=()=>{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 a=typeof i;switch(a){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 a},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: ${ie(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let a=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",o=a==="\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} ${a}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${a}${o}`}case"too_small":{let a=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",o=a==="\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} ${a}${o}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${a}${o}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:a.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${a.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:a.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${a.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[a.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: ${ie(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"}}};Koe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\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 ${a}${i.maximum.toString()} ${o.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 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\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 ${a}${i.minimum.toString()} ${o.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 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`Invalid ${n[a.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"}: ${ie(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"}}};Goe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Terlalu besar: dijangka ${i.origin??"nilai"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Terlalu kecil: dijangka ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${n[a.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${ie(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"}}};Yoe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Te lang: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} ${o.unit??"elementen"} bevat`:`Te lang: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} is`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Te kort: verwacht dat ${i.origin} ${a}${i.minimum.toString()} ${o.unit} bevat`:`Te kort: verwacht dat ${i.origin} ${a}${i.minimum.toString()} is`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${n[a.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":""}: ${ie(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"}}};Xoe=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${a}${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`For lite(n): forventet ${i.origin} til \xE5 ha ${a}${i.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${n[a.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"}: ${ie(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"}}};tse=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${a}${i.maximum.toString()} ${o.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${a}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${a}${i.minimum.toString()} ${o.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${a}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let a=i;return a.format==="starts_with"?`F\xE2sit metin: "${a.prefix}" ile ba\u015Flamal\u0131.`:a.format==="ends_with"?`F\xE2sit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`F\xE2sit metin: "${a.includes}" ihtiv\xE2 etmeli.`:a.format==="regex"?`F\xE2sit metin: ${a.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[a.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":""}: ${ie(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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${a}${i.maximum.toString()} ${o.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 ${a}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} ${o.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${a}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:a.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${a.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:a.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${a.includes}" \u0648\u0644\u0631\u064A`:a.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${a.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[a.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"}: ${ie(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"}}};ase=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${i.maximum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${a}${i.minimum.toString()} ${o.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${a.prefix}"`:a.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${a.suffix}"`:a.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${a.includes}"`:a.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${a.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[a.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":""}: ${ie(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"}}};sse=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${a}${i.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Muito pequeno: esperado que ${i.origin} tivesse ${a}${i.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${a.prefix}"`:a.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inv\xE1lido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${a.pattern}`:`${n[a.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":""}: ${ie(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"}}};use=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);if(o){let s=Number(i.maximum),c=_2(s,o.unit.one,o.unit.few,o.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 ${a}${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 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);if(o){let s=Number(i.minimum),c=_2(s,o.unit.one,o.unit.few,o.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 ${a}${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 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[a.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":""}: ${ie(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"}}};dse=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${a}${i.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${a}${i.minimum.toString()} ${o.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${n[a.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"}: ${ie(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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.maximum.toString()} ${o.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.minimum.toString()} ${o.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${a.includes}"`:a.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${a.pattern}"`:`Ogiltig(t) ${n[a.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"}: ${ie(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"}}};hse=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\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"} ${a}${i.maximum.toString()} ${o.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"} ${a}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\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} ${a}${i.minimum.toString()} ${o.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} ${a}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${a.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:a.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${a.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[a.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":""}: ${ie(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"}}};vse=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",o=e(i.origin);return o?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.maximum.toString()} ${o.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${a} ${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",o=e(i.origin);return o?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.minimum.toString()} ${o.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${a} ${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:a.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 ${a.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[a.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: ${ie(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"}}};_se=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},bse=()=>{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 ${_se(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: ${ie(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=e(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=e(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.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":""}: ${ie(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"}}};wse=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\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"} ${o.verb} ${a}${i.maximum.toString()} ${o.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 ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\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} ${o.verb} ${a}${i.minimum.toString()} ${o.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 ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.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 "${a.prefix}"`:a.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 "${a.suffix}"`:a.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 "${a.includes}"`:a.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 ${a.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[a.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":""}: ${ie(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"}}};Sse=()=>{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 a=typeof i;switch(a){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 a},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: ${ie(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${a}${i.maximum.toString()} ${o.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 ${a}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${a}${i.minimum.toString()} ${o.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 ${a}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${a.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:a.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${a.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[a.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":""}: ${ie(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"}}};Ise=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${a.prefix}"`:a.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${a.suffix}"`:a.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${a.includes}"`:a.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${a.pattern}`:`${n[a.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: ${ie(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"}}};Pse=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${a}${i.maximum.toString()} ${o.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.prefix}" \u5F00\u5934`:a.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${a.suffix}" \u7ED3\u5C3E`:a.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${a.pattern}`:`\u65E0\u6548${n[a.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): ${ie(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"}}};zse=()=>{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 a=typeof i;switch(a){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 a},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 ${ie(i.values,"|")}`;case"too_big":{let a=i.inclusive?"<=":"<",o=e(i.origin);return o?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${a}${i.maximum.toString()} ${o.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${a}${i.maximum.toString()}`}case"too_small":{let a=i.inclusive?">=":">",o=e(i.origin);return o?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${a}${i.minimum.toString()} ${o.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.prefix}" \u958B\u982D`:a.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${a.suffix}" \u7D50\u5C3E`:a.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${a.includes}"`:a.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${a.pattern}`:`\u7121\u6548\u7684 ${n[a.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${ie(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"}}};RZ=Symbol("ZodOutput"),CZ=Symbol("ZodInput"),zp=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)}};us=kE();DZ={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};Sv=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?yv(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 a=e(...i);return this._def.output?yv(this._def.output,a,void 0,{callee:r}):a};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 _v(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 a=await e(...i);return this._def.output?_v(this._def.output,a,void 0,{callee:r}):a};return r}input(...e){let r=this.constructor;return Array.isArray(e[0])?new r({type:"function",input:new Mv({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})}};Np=class{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??us,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,a={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},o=this.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.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 f=s.schema;switch(i.type){case"string":{let p=f;p.type="string";let{minimum:m,maximum:v,format:g,patterns:h,contentEncoding:b}=e._zod.bag;if(typeof m=="number"&&(p.minLength=m),typeof v=="number"&&(p.maxLength=v),g&&(p.format=a[g]??g,p.format===""&&delete p.format),b&&(p.contentEncoding=b),h&&h.size>0){let y=[...h];y.length===1?p.pattern=y[0].source:y.length>1&&(s.schema.allOf=[...y.map(_=>({...this.target==="draft-7"?{type:"string"}:{},pattern:_.source}))])}break}case"number":{let p=f,{minimum:m,maximum:v,format:g,multipleOf:h,exclusiveMaximum:b,exclusiveMinimum:y}=e._zod.bag;typeof g=="string"&&g.includes("int")?p.type="integer":p.type="number",typeof y=="number"&&(p.exclusiveMinimum=y),typeof m=="number"&&(p.minimum=m,typeof y=="number"&&(y>=m?delete p.minimum:delete p.exclusiveMinimum)),typeof b=="number"&&(p.exclusiveMaximum=b),typeof v=="number"&&(p.maximum=v,typeof b=="number"&&(b<=v?delete p.maximum:delete p.exclusiveMaximum)),typeof h=="number"&&(p.multipleOf=h);break}case"boolean":{let p=f;p.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":{f.type="null";break}case"any":break;case"unknown":break;case"undefined":case"never":{f.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 p=f,{minimum:m,maximum:v}=e._zod.bag;typeof m=="number"&&(p.minItems=m),typeof v=="number"&&(p.maxItems=v),p.type="array",p.items=this.process(i.element,{...l,path:[...l.path,"items"]});break}case"object":{let p=f;p.type="object",p.properties={};let m=i.shape;for(let h in m)p.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 b=i.shape[h]._zod;return this.io==="input"?b.optin===void 0:b.optout===void 0}));g.size>0&&(p.required=Array.from(g)),i.catchall?._zod.def.type==="never"?p.additionalProperties=!1:i.catchall?i.catchall&&(p.additionalProperties=this.process(i.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(p.additionalProperties=!1);break}case"union":{let p=f;p.anyOf=i.options.map((m,v)=>this.process(m,{...l,path:[...l.path,"anyOf",v]}));break}case"intersection":{let p=f,m=this.process(i.left,{...l,path:[...l.path,"allOf",0]}),v=this.process(i.right,{...l,path:[...l.path,"allOf",1]}),g=b=>"allOf"in b&&Object.keys(b).length===1,h=[...g(m)?m.allOf:[m],...g(v)?v.allOf:[v]];p.allOf=h;break}case"tuple":{let p=f;p.type="array";let m=i.items.map((h,b)=>this.process(h,{...l,path:[...l.path,"prefixItems",b]}));if(this.target==="draft-2020-12"?p.prefixItems=m:p.items=m,i.rest){let h=this.process(i.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?p.items=h:p.additionalItems=h}i.rest&&(p.items=this.process(i.rest,{...l,path:[...l.path,"items"]}));let{minimum:v,maximum:g}=e._zod.bag;typeof v=="number"&&(p.minItems=v),typeof g=="number"&&(p.maxItems=g);break}case"record":{let p=f;p.type="object",p.propertyNames=this.process(i.keyType,{...l,path:[...l.path,"propertyNames"]}),p.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 p=f,m=YI(i.entries);m.every(v=>typeof v=="number")&&(p.type="number"),m.every(v=>typeof v=="string")&&(p.type="string"),p.enum=m;break}case"literal":{let p=f,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];p.type=v===null?"null":typeof v,p.const=v}else m.every(v=>typeof v=="number")&&(p.type="number"),m.every(v=>typeof v=="string")&&(p.type="string"),m.every(v=>typeof v=="boolean")&&(p.type="string"),m.every(v=>v===null)&&(p.type="null"),p.enum=m;break}case"file":{let p=f,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(p,m)):p.anyOf=h.map(b=>({...m,contentMediaType:b})):Object.assign(p,m);break}case"transform":{if(this.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let p=this.process(i.innerType,l);f.anyOf=[p,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,l),s.ref=i.innerType;break}case"success":{let p=f;p.type="boolean";break}case"default":{this.process(i.innerType,l),s.ref=i.innerType,f.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,l),s.ref=i.innerType,this.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,l),s.ref=i.innerType;let p;try{p=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}f.default=p;break}case"nan":{if(this.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let p=f,m=e._zod.pattern;if(!m)throw Error("Pattern not found in template literal");p.type="string",p.pattern=m.source;break}case"pipe":{let p=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(p,l),s.ref=p;break}case"readonly":{this.process(i.innerType,l),s.ref=i.innerType,f.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 p=e._zod.innerType;this.process(p,l),s.ref=p;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"&&br(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 a=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 f=`#/${d}/`,p=l[1].schema.id??`__schema${this.counter++}`;return{defId:p,ref:f+p}},o=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:f,defId:p}=a(l);d.def={...d.schema},p&&(d.defId=p);let m=d.schema;for(let v in m)delete m[v];m.$ref=f};for(let l of this.seen.entries()){let d=l[1];if(e===l[0]){o(l);continue}if(n.external){let f=n.external.registry.get(l[0])?.id;if(e!==l[0]&&f){o(l);continue}}if(this.metadataRegistry.get(l[0])?.id){o(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"&&o(l);continue}if(d.count>1&&n.reused==="ref"){o(l);continue}}let s=(l,d)=>{let f=this.seen.get(l),p=f.def??f.schema,m={...p};if(f.ref===null)return;let v=f.ref;if(f.ref=null,v){s(v,d);let g=this.seen.get(v).schema;g.$ref&&d.target==="draft-7"?(p.allOf=p.allOf??[],p.allOf.push(g)):(Object.assign(p,g),Object.assign(p,m))}f.isParent||this.override({zodSchema:l,jsonSchema:p,path:f.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.")}}};Xse={},ece=U("ZodMiniType",(t,e)=>{if(!t._zod)throw Error("Uninitialized schema in ZodMiniType.");Le.init(t,e),t.def=e,t.parse=(r,n)=>yv(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>oE(t,r,n),t.parseAsync=async(r,n)=>_v(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>cE(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)=>Ai(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t)}),MUe=U("ZodMiniObject",(t,e)=>{yE.init(t,e),ece.init(t,e),ft.defineLazy(t,"shape",()=>e.shape)}),Kc={};vs(Kc,{xid:()=>mce,void:()=>Cce,uuidv7:()=>sce,uuidv6:()=>oce,uuidv4:()=>ace,uuid:()=>ice,url:()=>cce,uppercase:()=>HE,unknown:()=>tr,union:()=>Lt,undefined:()=>Nce,ulid:()=>fce,uint64:()=>Oce,uint32:()=>Pce,tuple:()=>Mce,trim:()=>eP,treeifyError:()=>O6,transform:()=>RP,toUpperCase:()=>rP,toLowerCase:()=>tP,toJSONSchema:()=>kL,templateLiteral:()=>Hce,symbol:()=>jce,superRefine:()=>mF,success:()=>Bce,stringbool:()=>Yce,stringFormat:()=>Sce,string:()=>V,strictObject:()=>Dce,startsWith:()=>QE,size:()=>WE,setErrorMap:()=>eue,set:()=>Lce,safeParseAsync:()=>jL,safeParse:()=>OL,registry:()=>kE,regexes:()=>uE,regex:()=>BE,refine:()=>fF,record:()=>Zt,readonly:()=>oF,property:()=>hL,promise:()=>Gce,prettifyError:()=>N6,preprocess:()=>DP,prefault:()=>XL,positive:()=>dL,pipe:()=>Ev,partialRecord:()=>qce,parseAsync:()=>zL,parse:()=>TL,overwrite:()=>bs,optional:()=>Gt,object:()=>me,number:()=>Tt,nullish:()=>Wce,nullable:()=>Iv,null:()=>PP,normalize:()=>XE,nonpositive:()=>fL,nonoptional:()=>eF,nonnegative:()=>mL,never:()=>Kv,negative:()=>pL,nativeEnum:()=>Fce,nanoid:()=>lce,nan:()=>Kce,multipleOf:()=>Op,minSize:()=>jp,minLength:()=>fu,mime:()=>JE,maxSize:()=>qv,maxLength:()=>Zv,map:()=>Zce,lte:()=>ji,lt:()=>hs,lowercase:()=>KE,looseObject:()=>on,locales:()=>wE,literal:()=>Se,length:()=>Lv,lazy:()=>uF,ksuid:()=>hce,keyof:()=>Uce,jwt:()=>kce,json:()=>Jce,iso:()=>iP,ipv6:()=>vce,ipv4:()=>gce,intersection:()=>Gv,int64:()=>zce,int32:()=>Ece,int:()=>UI,instanceof:()=>Qce,includes:()=>GE,guid:()=>nce,gte:()=>Vn,gt:()=>gs,globalRegistry:()=>us,getErrorMap:()=>tue,function:()=>wL,formatError:()=>rE,float64:()=>Ice,float32:()=>$ce,flattenError:()=>tE,file:()=>Vce,enum:()=>wn,endsWith:()=>YE,emoji:()=>uce,email:()=>rce,e164:()=>wce,discriminatedUnion:()=>OP,date:()=>Ace,custom:()=>pF,cuid2:()=>pce,cuid:()=>dce,core:()=>_6,config:()=>un,coerce:()=>hF,clone:()=>Ai,cidrv6:()=>_ce,cidrv4:()=>yce,check:()=>dF,catch:()=>nF,boolean:()=>xr,bigint:()=>Tce,base64url:()=>xce,base64:()=>bce,array:()=>mt,any:()=>Rce,_default:()=>YL,_ZodString:()=>uP,ZodXID:()=>vP,ZodVoid:()=>qL,ZodUnknown:()=>DL,ZodUnion:()=>zP,ZodUndefined:()=>CL,ZodUUID:()=>Ta,ZodURL:()=>dP,ZodULID:()=>gP,ZodType:()=>rt,ZodTuple:()=>VL,ZodTransform:()=>NP,ZodTemplateLiteral:()=>sF,ZodSymbol:()=>RL,ZodSuccess:()=>tF,ZodStringFormat:()=>Qt,ZodString:()=>Fv,ZodSet:()=>BL,ZodRecord:()=>jP,ZodRealError:()=>Dp,ZodReadonly:()=>aF,ZodPromise:()=>lF,ZodPrefault:()=>JL,ZodPipe:()=>UP,ZodOptional:()=>CP,ZodObject:()=>Hv,ZodNumberFormat:()=>yu,ZodNumber:()=>Vv,ZodNullable:()=>GL,ZodNull:()=>AL,ZodNonOptional:()=>AP,ZodNever:()=>ML,ZodNanoID:()=>fP,ZodNaN:()=>iF,ZodMap:()=>WL,ZodLiteral:()=>KL,ZodLazy:()=>cF,ZodKSUID:()=>yP,ZodJWT:()=>IP,ZodIssueCode:()=>Xce,ZodIntersection:()=>FL,ZodISOTime:()=>sP,ZodISODuration:()=>cP,ZodISODateTime:()=>aP,ZodISODate:()=>oP,ZodIPv6:()=>bP,ZodIPv4:()=>_P,ZodGUID:()=>$v,ZodFile:()=>HL,ZodError:()=>tce,ZodEnum:()=>Rp,ZodEmoji:()=>pP,ZodEmail:()=>lP,ZodE164:()=>$P,ZodDiscriminatedUnion:()=>LL,ZodDefault:()=>QL,ZodDate:()=>TP,ZodCustomStringFormat:()=>NL,ZodCustom:()=>Qv,ZodCatch:()=>rF,ZodCUID2:()=>hP,ZodCUID:()=>mP,ZodCIDRv6:()=>wP,ZodCIDRv4:()=>xP,ZodBoolean:()=>Wv,ZodBigIntFormat:()=>EP,ZodBigInt:()=>Bv,ZodBase64URL:()=>SP,ZodBase64:()=>kP,ZodArray:()=>ZL,ZodAny:()=>UL,TimePrecision:()=>DZ,NEVER:()=>b6,$output:()=>RZ,$input:()=>CZ,$brand:()=>x6});iP={};vs(iP,{time:()=>IL,duration:()=>EL,datetime:()=>SL,date:()=>$L,ZodISOTime:()=>sP,ZodISODuration:()=>cP,ZodISODateTime:()=>aP,ZodISODate:()=>oP});aP=U("ZodISODateTime",(t,e)=>{Lq.init(t,e),Qt.init(t,e)});oP=U("ZodISODate",(t,e)=>{Fq.init(t,e),Qt.init(t,e)});sP=U("ZodISOTime",(t,e)=>{Vq.init(t,e),Qt.init(t,e)});cP=U("ZodISODuration",(t,e)=>{Wq.init(t,e),Qt.init(t,e)});PL=(t,e)=>{eE.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>rE(t,r)},flatten:{value:r=>tE(t,r)},addIssue:{value:r=>t.issues.push(r)},addIssues:{value:r=>t.issues.push(...r)},isEmpty:{get(){return t.issues.length===0}}})},tce=U("ZodError",PL),Dp=U("ZodError",PL,{Parent:Error}),TL=nE(Dp),zL=iE(Dp),OL=aE(Dp),jL=sE(Dp),rt=U("ZodType",(t,e)=>(Le.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)=>Ai(t,r,n),t.brand=()=>t,t.register=(r,n)=>(r.add(t,n),t),t.parse=(r,n)=>TL(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>OL(t,r,n),t.parseAsync=async(r,n)=>zL(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(fF(r,n)),t.superRefine=r=>t.check(mF(r)),t.overwrite=r=>t.check(bs(r)),t.optional=()=>Gt(t),t.nullable=()=>Iv(t),t.nullish=()=>Gt(Iv(t)),t.nonoptional=r=>eF(t,r),t.array=()=>mt(t),t.or=r=>Lt([t,r]),t.and=r=>Gv(t,r),t.transform=r=>Ev(t,RP(r)),t.default=r=>YL(t,r),t.prefault=r=>XL(t,r),t.catch=r=>nF(t,r),t.pipe=r=>Ev(t,r),t.readonly=()=>oF(t),t.describe=r=>{let n=t.clone();return us.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){return us.get(t)?.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return us.get(t);let n=t.clone();return us.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),uP=U("_ZodString",(t,e)=>{Up.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(BE(...n)),t.includes=(...n)=>t.check(GE(...n)),t.startsWith=(...n)=>t.check(QE(...n)),t.endsWith=(...n)=>t.check(YE(...n)),t.min=(...n)=>t.check(fu(...n)),t.max=(...n)=>t.check(Zv(...n)),t.length=(...n)=>t.check(Lv(...n)),t.nonempty=(...n)=>t.check(fu(1,...n)),t.lowercase=n=>t.check(KE(n)),t.uppercase=n=>t.check(HE(n)),t.trim=()=>t.check(eP()),t.normalize=(...n)=>t.check(XE(...n)),t.toLowerCase=()=>t.check(tP()),t.toUpperCase=()=>t.check(rP())}),Fv=U("ZodString",(t,e)=>{Up.init(t,e),uP.init(t,e),t.email=r=>t.check(SE(lP,r)),t.url=r=>t.check(TE(dP,r)),t.jwt=r=>t.check(VE(IP,r)),t.emoji=r=>t.check(zE(pP,r)),t.guid=r=>t.check(wv($v,r)),t.uuid=r=>t.check($E(Ta,r)),t.uuidv4=r=>t.check(IE(Ta,r)),t.uuidv6=r=>t.check(EE(Ta,r)),t.uuidv7=r=>t.check(PE(Ta,r)),t.nanoid=r=>t.check(OE(fP,r)),t.guid=r=>t.check(wv($v,r)),t.cuid=r=>t.check(jE(mP,r)),t.cuid2=r=>t.check(NE(hP,r)),t.ulid=r=>t.check(RE(gP,r)),t.base64=r=>t.check(ZE(kP,r)),t.base64url=r=>t.check(LE(SP,r)),t.xid=r=>t.check(CE(vP,r)),t.ksuid=r=>t.check(AE(yP,r)),t.ipv4=r=>t.check(UE(_P,r)),t.ipv6=r=>t.check(DE(bP,r)),t.cidrv4=r=>t.check(ME(xP,r)),t.cidrv6=r=>t.check(qE(wP,r)),t.e164=r=>t.check(FE($P,r)),t.datetime=r=>t.check(SL(r)),t.date=r=>t.check($L(r)),t.time=r=>t.check(IL(r)),t.duration=r=>t.check(EL(r))});Qt=U("ZodStringFormat",(t,e)=>{Kt.init(t,e),uP.init(t,e)}),lP=U("ZodEmail",(t,e)=>{Nq.init(t,e),Qt.init(t,e)});$v=U("ZodGUID",(t,e)=>{Oq.init(t,e),Qt.init(t,e)});Ta=U("ZodUUID",(t,e)=>{jq.init(t,e),Qt.init(t,e)});dP=U("ZodURL",(t,e)=>{Rq.init(t,e),Qt.init(t,e)});pP=U("ZodEmoji",(t,e)=>{Cq.init(t,e),Qt.init(t,e)});fP=U("ZodNanoID",(t,e)=>{Aq.init(t,e),Qt.init(t,e)});mP=U("ZodCUID",(t,e)=>{Uq.init(t,e),Qt.init(t,e)});hP=U("ZodCUID2",(t,e)=>{Dq.init(t,e),Qt.init(t,e)});gP=U("ZodULID",(t,e)=>{Mq.init(t,e),Qt.init(t,e)});vP=U("ZodXID",(t,e)=>{qq.init(t,e),Qt.init(t,e)});yP=U("ZodKSUID",(t,e)=>{Zq.init(t,e),Qt.init(t,e)});_P=U("ZodIPv4",(t,e)=>{Bq.init(t,e),Qt.init(t,e)});bP=U("ZodIPv6",(t,e)=>{Kq.init(t,e),Qt.init(t,e)});xP=U("ZodCIDRv4",(t,e)=>{Hq.init(t,e),Qt.init(t,e)});wP=U("ZodCIDRv6",(t,e)=>{Gq.init(t,e),Qt.init(t,e)});kP=U("ZodBase64",(t,e)=>{Qq.init(t,e),Qt.init(t,e)});SP=U("ZodBase64URL",(t,e)=>{Jq.init(t,e),Qt.init(t,e)});$P=U("ZodE164",(t,e)=>{Xq.init(t,e),Qt.init(t,e)});IP=U("ZodJWT",(t,e)=>{tZ.init(t,e),Qt.init(t,e)});NL=U("ZodCustomStringFormat",(t,e)=>{rZ.init(t,e),Qt.init(t,e)});Vv=U("ZodNumber",(t,e)=>{mE.init(t,e),rt.init(t,e),t.gt=(n,i)=>t.check(gs(n,i)),t.gte=(n,i)=>t.check(Vn(n,i)),t.min=(n,i)=>t.check(Vn(n,i)),t.lt=(n,i)=>t.check(hs(n,i)),t.lte=(n,i)=>t.check(ji(n,i)),t.max=(n,i)=>t.check(ji(n,i)),t.int=n=>t.check(UI(n)),t.safe=n=>t.check(UI(n)),t.positive=n=>t.check(gs(0,n)),t.nonnegative=n=>t.check(Vn(0,n)),t.negative=n=>t.check(hs(0,n)),t.nonpositive=n=>t.check(ji(0,n)),t.multipleOf=(n,i)=>t.check(Op(n,i)),t.step=(n,i)=>t.check(Op(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});yu=U("ZodNumberFormat",(t,e)=>{nZ.init(t,e),Vv.init(t,e)});Wv=U("ZodBoolean",(t,e)=>{hE.init(t,e),rt.init(t,e)});Bv=U("ZodBigInt",(t,e)=>{gE.init(t,e),rt.init(t,e),t.gte=(n,i)=>t.check(Vn(n,i)),t.min=(n,i)=>t.check(Vn(n,i)),t.gt=(n,i)=>t.check(gs(n,i)),t.gte=(n,i)=>t.check(Vn(n,i)),t.min=(n,i)=>t.check(Vn(n,i)),t.lt=(n,i)=>t.check(hs(n,i)),t.lte=(n,i)=>t.check(ji(n,i)),t.max=(n,i)=>t.check(ji(n,i)),t.positive=n=>t.check(gs(BigInt(0),n)),t.negative=n=>t.check(hs(BigInt(0),n)),t.nonpositive=n=>t.check(ji(BigInt(0),n)),t.nonnegative=n=>t.check(Vn(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(Op(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});EP=U("ZodBigIntFormat",(t,e)=>{iZ.init(t,e),Bv.init(t,e)});RL=U("ZodSymbol",(t,e)=>{aZ.init(t,e),rt.init(t,e)});CL=U("ZodUndefined",(t,e)=>{oZ.init(t,e),rt.init(t,e)});AL=U("ZodNull",(t,e)=>{sZ.init(t,e),rt.init(t,e)});UL=U("ZodAny",(t,e)=>{cZ.init(t,e),rt.init(t,e)});DL=U("ZodUnknown",(t,e)=>{xv.init(t,e),rt.init(t,e)});ML=U("ZodNever",(t,e)=>{uZ.init(t,e),rt.init(t,e)});qL=U("ZodVoid",(t,e)=>{lZ.init(t,e),rt.init(t,e)});TP=U("ZodDate",(t,e)=>{dZ.init(t,e),rt.init(t,e),t.min=(n,i)=>t.check(Vn(n,i)),t.max=(n,i)=>t.check(ji(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});ZL=U("ZodArray",(t,e)=>{vE.init(t,e),rt.init(t,e),t.element=e.element,t.min=(r,n)=>t.check(fu(r,n)),t.nonempty=r=>t.check(fu(1,r)),t.max=(r,n)=>t.check(Zv(r,n)),t.length=(r,n)=>t.check(Lv(r,n)),t.unwrap=()=>t.element});Hv=U("ZodObject",(t,e)=>{yE.init(t,e),rt.init(t,e),ft.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>wn(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:tr()}),t.loose=()=>t.clone({...t._zod.def,catchall:tr()}),t.strict=()=>t.clone({...t._zod.def,catchall:Kv()}),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(CP,t,r[0]),t.required=(...r)=>ft.required(AP,t,r[0])});zP=U("ZodUnion",(t,e)=>{_E.init(t,e),rt.init(t,e),t.options=e.options});LL=U("ZodDiscriminatedUnion",(t,e)=>{zP.init(t,e),pZ.init(t,e)});FL=U("ZodIntersection",(t,e)=>{fZ.init(t,e),rt.init(t,e)});VL=U("ZodTuple",(t,e)=>{Mv.init(t,e),rt.init(t,e),t.rest=r=>t.clone({...t._zod.def,rest:r})});jP=U("ZodRecord",(t,e)=>{mZ.init(t,e),rt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});WL=U("ZodMap",(t,e)=>{hZ.init(t,e),rt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});BL=U("ZodSet",(t,e)=>{gZ.init(t,e),rt.init(t,e),t.min=(...r)=>t.check(jp(...r)),t.nonempty=r=>t.check(jp(1,r)),t.max=(...r)=>t.check(qv(...r)),t.size=(...r)=>t.check(WE(...r))});Rp=U("ZodEnum",(t,e)=>{vZ.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 a={};for(let o of n)if(r.has(o))a[o]=e.entries[o];else throw Error(`Key ${o} not found in enum`);return new Rp({...e,checks:[],...ft.normalizeParams(i),entries:a})},t.exclude=(n,i)=>{let a={...e.entries};for(let o of n)if(r.has(o))delete a[o];else throw Error(`Key ${o} not found in enum`);return new Rp({...e,checks:[],...ft.normalizeParams(i),entries:a})}});KL=U("ZodLiteral",(t,e)=>{yZ.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]}})});HL=U("ZodFile",(t,e)=>{_Z.init(t,e),rt.init(t,e),t.min=(r,n)=>t.check(jp(r,n)),t.max=(r,n)=>t.check(qv(r,n)),t.mime=(r,n)=>t.check(JE(Array.isArray(r)?r:[r],n))});NP=U("ZodTransform",(t,e)=>{bE.init(t,e),rt.init(t,e),t._zod.parse=(r,n)=>{r.addIssue=a=>{if(typeof a=="string")r.issues.push(ft.issue(a,r.value,e));else{let o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!0),r.issues.push(ft.issue(o))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(a=>(r.value=a,r)):(r.value=i,r)}});CP=U("ZodOptional",(t,e)=>{bZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});GL=U("ZodNullable",(t,e)=>{xZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});QL=U("ZodDefault",(t,e)=>{wZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});JL=U("ZodPrefault",(t,e)=>{kZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});AP=U("ZodNonOptional",(t,e)=>{SZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});tF=U("ZodSuccess",(t,e)=>{$Z.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});rF=U("ZodCatch",(t,e)=>{IZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});iF=U("ZodNaN",(t,e)=>{EZ.init(t,e),rt.init(t,e)});UP=U("ZodPipe",(t,e)=>{xE.init(t,e),rt.init(t,e),t.in=e.in,t.out=e.out});aF=U("ZodReadonly",(t,e)=>{PZ.init(t,e),rt.init(t,e)});sF=U("ZodTemplateLiteral",(t,e)=>{TZ.init(t,e),rt.init(t,e)});cF=U("ZodLazy",(t,e)=>{OZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.getter()});lF=U("ZodPromise",(t,e)=>{zZ.init(t,e),rt.init(t,e),t.unwrap=()=>t._zod.def.innerType});Qv=U("ZodCustom",(t,e)=>{jZ.init(t,e),rt.init(t,e)});Yce=(...t)=>bL({Pipe:UP,Boolean:Wv,String:Fv,Transform:NP},...t);Xce={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"};hF={};vs(hF,{string:()=>rue,number:()=>nue,date:()=>oue,boolean:()=>iue,bigint:()=>aue});un(NZ());sue="io.modelcontextprotocol/related-task",Yv="2.0",wr=pF(t=>t!==null&&(typeof t=="object"||typeof t=="function")),gF=Lt([V(),Tt().int()]),vF=V(),qUe=on({ttl:Tt().optional(),pollInterval:Tt().optional()}),cue=me({ttl:Tt().optional()}),uue=me({taskId:V()}),MP=on({progressToken:gF.optional(),[sue]:uue.optional()}),Hn=me({_meta:MP.optional()}),Jv=Hn.extend({task:cue.optional()}),Tr=me({method:V(),params:Hn.loose().optional()}),ui=me({_meta:MP.optional()}),li=me({method:V(),params:ui.loose().optional()}),zr=on({_meta:MP.optional()}),Xv=Lt([V(),Tt().int()]),lue=me({jsonrpc:Se(Yv),id:Xv,...Tr.shape}).strict(),due=me({jsonrpc:Se(Yv),...li.shape}).strict(),yF=me({jsonrpc:Se(Yv),id:Xv,result:zr}).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"})(b2||(b2={}));_F=me({jsonrpc:Se(Yv),id:Xv.optional(),error:me({code:Tt().int(),message:V(),data:tr().optional()})}).strict(),ZUe=Lt([lue,due,yF,_F]),LUe=Lt([yF,_F]),bF=zr.strict(),pue=ui.extend({requestId:Xv.optional(),reason:V().optional()}),xF=li.extend({method:Se("notifications/cancelled"),params:pue}),fue=me({src:V(),mimeType:V().optional(),sizes:mt(V()).optional(),theme:wn(["light","dark"]).optional()}),Mp=me({icons:mt(fue).optional()}),mu=me({name:V(),title:V().optional()}),wF=mu.extend({...mu.shape,...Mp.shape,version:V(),websiteUrl:V().optional(),description:V().optional()}),mue=Gv(me({applyDefaults:xr().optional()}),Zt(V(),tr())),hue=DP(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Gv(me({form:mue.optional(),url:wr.optional()}),Zt(V(),tr()).optional())),gue=on({list:wr.optional(),cancel:wr.optional(),requests:on({sampling:on({createMessage:wr.optional()}).optional(),elicitation:on({create:wr.optional()}).optional()}).optional()}),vue=on({list:wr.optional(),cancel:wr.optional(),requests:on({tools:on({call:wr.optional()}).optional()}).optional()}),yue=me({experimental:Zt(V(),wr).optional(),sampling:me({context:wr.optional(),tools:wr.optional()}).optional(),elicitation:hue.optional(),roots:me({listChanged:xr().optional()}).optional(),tasks:gue.optional(),extensions:Zt(V(),wr).optional()}),_ue=Hn.extend({protocolVersion:V(),capabilities:yue,clientInfo:wF}),bue=Tr.extend({method:Se("initialize"),params:_ue}),xue=me({experimental:Zt(V(),wr).optional(),logging:wr.optional(),completions:wr.optional(),prompts:me({listChanged:xr().optional()}).optional(),resources:me({subscribe:xr().optional(),listChanged:xr().optional()}).optional(),tools:me({listChanged:xr().optional()}).optional(),tasks:vue.optional(),extensions:Zt(V(),wr).optional()}),wue=zr.extend({protocolVersion:V(),capabilities:xue,serverInfo:wF,instructions:V().optional()}),kue=li.extend({method:Se("notifications/initialized"),params:ui.optional()}),kF=Tr.extend({method:Se("ping"),params:Hn.optional()}),Sue=me({progress:Tt(),total:Gt(Tt()),message:Gt(V())}),$ue=me({...ui.shape,...Sue.shape,progressToken:gF}),SF=li.extend({method:Se("notifications/progress"),params:$ue}),Iue=Hn.extend({cursor:vF.optional()}),qp=Tr.extend({params:Iue.optional()}),Zp=zr.extend({nextCursor:vF.optional()}),Eue=wn(["working","input_required","completed","failed","cancelled"]),Lp=me({taskId:V(),status:Eue,ttl:Lt([Tt(),PP()]),createdAt:V(),lastUpdatedAt:V(),pollInterval:Gt(Tt()),statusMessage:Gt(V())}),$F=zr.extend({task:Lp}),Pue=ui.merge(Lp),IF=li.extend({method:Se("notifications/tasks/status"),params:Pue}),EF=Tr.extend({method:Se("tasks/get"),params:Hn.extend({taskId:V()})}),PF=zr.merge(Lp),TF=Tr.extend({method:Se("tasks/result"),params:Hn.extend({taskId:V()})}),FUe=zr.loose(),zF=qp.extend({method:Se("tasks/list")}),OF=Zp.extend({tasks:mt(Lp)}),jF=Tr.extend({method:Se("tasks/cancel"),params:Hn.extend({taskId:V()})}),VUe=zr.merge(Lp),NF=me({uri:V(),mimeType:Gt(V()),_meta:Zt(V(),tr()).optional()}),RF=NF.extend({text:V()}),qP=V().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),CF=NF.extend({blob:qP}),Fp=wn(["user","assistant"]),_u=me({audience:mt(Fp).optional(),priority:Tt().min(0).max(1).optional(),lastModified:iP.datetime({offset:!0}).optional()}),AF=me({...mu.shape,...Mp.shape,uri:V(),description:Gt(V()),mimeType:Gt(V()),size:Gt(Tt()),annotations:_u.optional(),_meta:Gt(on({}))}),Tue=me({...mu.shape,...Mp.shape,uriTemplate:V(),description:Gt(V()),mimeType:Gt(V()),annotations:_u.optional(),_meta:Gt(on({}))}),zue=qp.extend({method:Se("resources/list")}),Oue=Zp.extend({resources:mt(AF)}),jue=qp.extend({method:Se("resources/templates/list")}),Nue=Zp.extend({resourceTemplates:mt(Tue)}),ZP=Hn.extend({uri:V()}),Rue=ZP,Cue=Tr.extend({method:Se("resources/read"),params:Rue}),Aue=zr.extend({contents:mt(Lt([RF,CF]))}),Uue=li.extend({method:Se("notifications/resources/list_changed"),params:ui.optional()}),Due=ZP,Mue=Tr.extend({method:Se("resources/subscribe"),params:Due}),que=ZP,Zue=Tr.extend({method:Se("resources/unsubscribe"),params:que}),Lue=ui.extend({uri:V()}),Fue=li.extend({method:Se("notifications/resources/updated"),params:Lue}),Vue=me({name:V(),description:Gt(V()),required:Gt(xr())}),Wue=me({...mu.shape,...Mp.shape,description:Gt(V()),arguments:Gt(mt(Vue)),_meta:Gt(on({}))}),Bue=qp.extend({method:Se("prompts/list")}),Kue=Zp.extend({prompts:mt(Wue)}),Hue=Hn.extend({name:V(),arguments:Zt(V(),V()).optional()}),Gue=Tr.extend({method:Se("prompts/get"),params:Hue}),LP=me({type:Se("text"),text:V(),annotations:_u.optional(),_meta:Zt(V(),tr()).optional()}),FP=me({type:Se("image"),data:qP,mimeType:V(),annotations:_u.optional(),_meta:Zt(V(),tr()).optional()}),VP=me({type:Se("audio"),data:qP,mimeType:V(),annotations:_u.optional(),_meta:Zt(V(),tr()).optional()}),Que=me({type:Se("tool_use"),name:V(),id:V(),input:Zt(V(),tr()),_meta:Zt(V(),tr()).optional()}),Yue=me({type:Se("resource"),resource:Lt([RF,CF]),annotations:_u.optional(),_meta:Zt(V(),tr()).optional()}),Jue=AF.extend({type:Se("resource_link")}),WP=Lt([LP,FP,VP,Jue,Yue]),Xue=me({role:Fp,content:WP}),ele=zr.extend({description:V().optional(),messages:mt(Xue)}),tle=li.extend({method:Se("notifications/prompts/list_changed"),params:ui.optional()}),rle=me({title:V().optional(),readOnlyHint:xr().optional(),destructiveHint:xr().optional(),idempotentHint:xr().optional(),openWorldHint:xr().optional()}),nle=me({taskSupport:wn(["required","optional","forbidden"]).optional()}),UF=me({...mu.shape,...Mp.shape,description:V().optional(),inputSchema:me({type:Se("object"),properties:Zt(V(),wr).optional(),required:mt(V()).optional()}).catchall(tr()),outputSchema:me({type:Se("object"),properties:Zt(V(),wr).optional(),required:mt(V()).optional()}).catchall(tr()).optional(),annotations:rle.optional(),execution:nle.optional(),_meta:Zt(V(),tr()).optional()}),ile=qp.extend({method:Se("tools/list")}),ale=Zp.extend({tools:mt(UF)}),DF=zr.extend({content:mt(WP).default([]),structuredContent:Zt(V(),tr()).optional(),isError:xr().optional()}),WUe=DF.or(zr.extend({toolResult:tr()})),ole=Jv.extend({name:V(),arguments:Zt(V(),tr()).optional()}),sle=Tr.extend({method:Se("tools/call"),params:ole}),cle=li.extend({method:Se("notifications/tools/list_changed"),params:ui.optional()}),BUe=me({autoRefresh:xr().default(!0),debounceMs:Tt().int().nonnegative().default(300)}),MF=wn(["debug","info","notice","warning","error","critical","alert","emergency"]),ule=Hn.extend({level:MF}),lle=Tr.extend({method:Se("logging/setLevel"),params:ule}),dle=ui.extend({level:MF,logger:V().optional(),data:tr()}),ple=li.extend({method:Se("notifications/message"),params:dle}),fle=me({name:V().optional()}),mle=me({hints:mt(fle).optional(),costPriority:Tt().min(0).max(1).optional(),speedPriority:Tt().min(0).max(1).optional(),intelligencePriority:Tt().min(0).max(1).optional()}),hle=me({mode:wn(["auto","required","none"]).optional()}),gle=me({type:Se("tool_result"),toolUseId:V().describe("The unique identifier for the corresponding tool call."),content:mt(WP).default([]),structuredContent:me({}).loose().optional(),isError:xr().optional(),_meta:Zt(V(),tr()).optional()}),vle=OP("type",[LP,FP,VP]),Pv=OP("type",[LP,FP,VP,Que,gle]),yle=me({role:Fp,content:Lt([Pv,mt(Pv)]),_meta:Zt(V(),tr()).optional()}),_le=Jv.extend({messages:mt(yle),modelPreferences:mle.optional(),systemPrompt:V().optional(),includeContext:wn(["none","thisServer","allServers"]).optional(),temperature:Tt().optional(),maxTokens:Tt().int(),stopSequences:mt(V()).optional(),metadata:wr.optional(),tools:mt(UF).optional(),toolChoice:hle.optional()}),ble=Tr.extend({method:Se("sampling/createMessage"),params:_le}),xle=zr.extend({model:V(),stopReason:Gt(wn(["endTurn","stopSequence","maxTokens"]).or(V())),role:Fp,content:vle}),wle=zr.extend({model:V(),stopReason:Gt(wn(["endTurn","stopSequence","maxTokens","toolUse"]).or(V())),role:Fp,content:Lt([Pv,mt(Pv)])}),kle=me({type:Se("boolean"),title:V().optional(),description:V().optional(),default:xr().optional()}),Sle=me({type:Se("string"),title:V().optional(),description:V().optional(),minLength:Tt().optional(),maxLength:Tt().optional(),format:wn(["email","uri","date","date-time"]).optional(),default:V().optional()}),$le=me({type:wn(["number","integer"]),title:V().optional(),description:V().optional(),minimum:Tt().optional(),maximum:Tt().optional(),default:Tt().optional()}),Ile=me({type:Se("string"),title:V().optional(),description:V().optional(),enum:mt(V()),default:V().optional()}),Ele=me({type:Se("string"),title:V().optional(),description:V().optional(),oneOf:mt(me({const:V(),title:V()})),default:V().optional()}),Ple=me({type:Se("string"),title:V().optional(),description:V().optional(),enum:mt(V()),enumNames:mt(V()).optional(),default:V().optional()}),Tle=Lt([Ile,Ele]),zle=me({type:Se("array"),title:V().optional(),description:V().optional(),minItems:Tt().optional(),maxItems:Tt().optional(),items:me({type:Se("string"),enum:mt(V())}),default:mt(V()).optional()}),Ole=me({type:Se("array"),title:V().optional(),description:V().optional(),minItems:Tt().optional(),maxItems:Tt().optional(),items:me({anyOf:mt(me({const:V(),title:V()}))}),default:mt(V()).optional()}),jle=Lt([zle,Ole]),Nle=Lt([Ple,Tle,jle]),Rle=Lt([Nle,kle,Sle,$le]),Cle=Jv.extend({mode:Se("form").optional(),message:V(),requestedSchema:me({type:Se("object"),properties:Zt(V(),Rle),required:mt(V()).optional()})}),Ale=Jv.extend({mode:Se("url"),message:V(),elicitationId:V(),url:V().url()}),Ule=Lt([Cle,Ale]),Dle=Tr.extend({method:Se("elicitation/create"),params:Ule}),Mle=ui.extend({elicitationId:V()}),qle=li.extend({method:Se("notifications/elicitation/complete"),params:Mle}),Zle=zr.extend({action:wn(["accept","decline","cancel"]),content:DP(t=>t===null?void 0:t,Zt(V(),Lt([V(),Tt(),xr(),mt(V())])).optional())}),Lle=me({type:Se("ref/resource"),uri:V()}),Fle=me({type:Se("ref/prompt"),name:V()}),Vle=Hn.extend({ref:Lt([Fle,Lle]),argument:me({name:V(),value:V()}),context:me({arguments:Zt(V(),V()).optional()}).optional()}),Wle=Tr.extend({method:Se("completion/complete"),params:Vle}),Ble=zr.extend({completion:on({values:mt(V()).max(100),total:Gt(Tt().int()),hasMore:Gt(xr())})}),Kle=me({uri:V().startsWith("file://"),name:V().optional(),_meta:Zt(V(),tr()).optional()}),Hle=Tr.extend({method:Se("roots/list"),params:Hn.optional()}),Gle=zr.extend({roots:mt(Kle)}),Qle=li.extend({method:Se("notifications/roots/list_changed"),params:ui.optional()}),KUe=Lt([kF,bue,Wle,lle,Gue,Bue,zue,jue,Cue,Mue,Zue,sle,ile,EF,TF,zF,jF]),HUe=Lt([xF,SF,kue,Qle,IF]),GUe=Lt([bF,xle,wle,Zle,Gle,PF,OF,$F]),QUe=Lt([kF,ble,Dle,Hle,EF,TF,zF,jF]),YUe=Lt([xF,SF,ple,Fue,Uue,cle,tle,IF,qle]),JUe=Lt([bF,wue,Ble,ele,Kue,Oue,Nue,Aue,DF,ale,PF,OF,$F]),XUe=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),e4e=$2(j2(),1),t4e=$2(Xee(),1);(function(t){t.Completable="McpCompletable"})(x2||(x2={}));r4e=Yle(()=>Kc.object({session_id:Kc.string(),ws_url:Kc.string(),work_dir:Kc.string().optional(),session_key:Kc.string().optional()}));rde=new Set(["EBUSY","EMFILE","ENFILE","ENOTEMPTY","EPERM"])});var Vp,FF=E(()=>{Ro();LF();Mo();pa();mg();Co();Ao();Vp=class extends mn{constructor(){super("claude","Claude (Anthropic API)",50)}canHandle(e){let r=!!process.env.ANTHROPIC_API_KEY;return r||H.debug("ClaudeAgentStrategy: ANTHROPIC_API_KEY not set"),r}async invoke(e,r={}){let{model:n,workspace:i=process.cwd(),schema:a=null,images:o=[],skills:s=null,sessionPath:c=null,nodeName:u=null,timeout:l,config:d={}}=r,f=n;(!f||f==="auto")&&(H.debug(`Model is '${f||"undefined"}', using default: ${Gr.CLAUDE}`),f=Gr.CLAUDE);let p=W_[f]||f;W_[f]&&f!==p&&H.debug(`Mapped model: ${f} \u2192 ${p}`),H.debug(`Invoking Claude Agent SDK with model: ${p}, 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: ${p}${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:b}=this._resolveSkills(s,{sessionPath:c,workspace:i,nodeName:u});try{let y={cwd:i,allowedTools:h,permissionMode:"bypassPermissions",model:p,...Object.keys(b).length>0&&{mcpServers:b}};if(a){let M=typeof a.parse=="function"?Xn(a,{target:"openApi3"}):a;y.outputFormat={type:"json_schema",schema:M},H.debug("Structured output enforced via SDK outputFormat")}H.debug(`Agent SDK options: ${JSON.stringify({cwd:y.cwd,toolCount:h.length,permissionMode:y.permissionMode,model:y.model,hasOutputFormat:!!y.outputFormat})}`);let _="",x=0,w=[];H.debug("Starting Claude Agent SDK query stream");let k;try{k=ZF({prompt:e,options:y})}catch(z){throw H.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 L=z.error?.message||z.error||z.message||"Unknown API error";throw new Error(typeof L=="string"?L:JSON.stringify(L))}let M=JSON.stringify(z.message?.content||z.text||"").slice(0,200);if(M===$){if(T++,T>=A){let L=(z.message?.content?.[0]?.text||z.text||"unknown").slice(0,100);throw new Error(`API stuck in loop (${T}x repeated): ${L}`)}}else $=M,T=1;if(z.type==="assistant"||z.constructor?.name==="AssistantMessage"){let L=z.message?.content||z.content||[];for(let R of L)if(R.type==="thinking"&&R.thinking)console.log(`${R.thinking.substring(0,200)}${R.thinking.length>200?"...":""}`);else if(R.type==="text"&&R.text)_+=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")?ka.stepMemory(`Tool: ${R.name}`):ka.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 L=z.result||z.text||z.content||_;if(a){if(z.structured_output){H.debug("Using SDK native structured_output");let te=typeof a.parse=="function"?a.parse(z.structured_output):z.structured_output;return{raw:L,structured:te}}if(L){let R=this._extractJson(L,a);if(R)return{raw:L,structured:R}}H.warn(`Could not extract structured output \u2014 returning raw text (${(L||"").length} chars)`)}return L||""}}}if(H.warn(`Agent SDK ended without result. Collected ${w.length} messages`),_.length>0)return H.debug("Returning accumulated text from messages"),_;throw new Error("Claude Agent SDK query ended without result")}catch(z){throw H.error(`Error during query stream: ${z.message}`),z}}catch(y){throw H.error("Claude Agent SDK call failed",{error:y.message}),y}}_resolveSkills(e,r){if(e===null)return H.debug("No skills \u2014 pure LLM mode"),{allowedTools:[],mcpServers:{}};if(!Array.isArray(e)||e.length===0)return H.debug("Default IDE skills for code generation"),{allowedTools:["Read","Write","Bash","Grep","Glob"],mcpServers:{}};let n=[],i={};for(let a of e){let o=Qr(a);if(!o){H.warn(`Unknown skill "${a}" \u2014 skipping`);continue}if(o.allowedTools&&n.push(...o.allowedTools),typeof o.resolve=="function"){let s=o.resolve(r);s&&(i[o.serverName]=s,H.debug(`MCP: ${o.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,a=e.indexOf("===JSON_END===");return e.substring(i,a).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("{"),a=e.lastIndexOf("}");if(i!==-1&&a>i)return e.substring(i,a+1)}];for(let i of n)try{let a=i();if(!a)continue;let o=JSON.parse(a);if(typeof o!="object"||o===null)continue;return typeof r.parse=="function"?r.parse(o):o}catch{}return null}}});var GF={};Ki(GF,{Codex:()=>bde,Thread:()=>KP});import{promises as BP}from"fs";import ode from"os";import VF from"path";import{spawn as lde}from"child_process";import ey from"path";import dde from"readline";import{createRequire as KF}from"module";async function sde(t){if(t===void 0)return{cleanup:async()=>{}};if(!cde(t))throw new Error("outputSchema must be a plain JSON object");let e=await BP.mkdtemp(VF.join(ode.tmpdir(),"codex-output-schema-")),r=VF.join(e,"schema.json"),n=async()=>{try{await BP.rm(e,{recursive:!0,force:!0})}catch{}};try{return await BP.writeFile(r,JSON.stringify(t),"utf8"),{schemaPath:r,cleanup:n}}catch(i){throw await n(),i}}function cde(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function ude(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 gde(t){let e=[];return HF(t,"",e),e}function HF(t,e,r){if(!HP(t))if(e){r.push(`${e}=${Wp(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,a]of n){if(!i)throw new Error("Codex config override keys must be non-empty strings");if(a===void 0)continue;let o=e?`${e}.${i}`:i;HP(a)?HF(a,o,r):r.push(`${o}=${Wp(a,o)}`)}}}function Wp(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)=>Wp(n,`${e}[${i}]`)).join(", ")}]`;if(HP(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(`${yde(n)} = ${Wp(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 yde(t){return vde.test(t)?t:JSON.stringify(t)}function HP(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function _de(){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=mde.resolve(`${BF}/package.json`),l=KF(c).resolve(`${n}/package.json`);i=ey.join(ey.dirname(l),"vendor")}catch{throw new Error(`Unable to locate Codex CLI binaries. Ensure ${BF} is installed with optional dependencies.`)}let a=ey.join(i,r),o=process.platform==="win32"?"codex.exe":"codex";return ey.join(a,"codex",o)}var KP,WF,pde,BF,fde,mde,hde,vde,bde,QF=E(()=>{KP=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 sde(e.outputSchema),i=this._threadOptions,{prompt:a,images:o}=ude(t),s=this._exec.run({input:a,baseUrl:this._options.baseUrl,apiKey:this._options.apiKey,threadId:this._id,images:o,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="",a=null,o=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")a=s.usage;else if(s.type==="turn.failed"){o=s.error;break}if(o)throw new Error(o.message);return{items:n,finalResponse:i,usage:a}}};WF="CODEX_INTERNAL_ORIGINATOR_OVERRIDE",pde="codex_sdk_ts",BF="@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"},mde=KF(import.meta.url),hde=class{executablePath;envOverride;configOverrides;constructor(t=null,e,r){this.executablePath=t||_de(),this.envOverride=e,this.configOverrides=r}async*run(t){let e=["exec","--experimental-json"];if(this.configOverrides)for(let c of gde(this.configOverrides))e.push("--config",c);if(t.baseUrl&&e.push("--config",`openai_base_url=${Wp(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[WF]||(r[WF]=pde),t.apiKey&&(r.CODEX_API_KEY=t.apiKey);let n=lde(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 a=[];n.stderr&&n.stderr.on("data",c=>{a.push(c)});let o=new Promise(c=>{n.once("exit",(u,l)=>{c({code:u,signal:l})})}),s=dde.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 o;if(c!==0||u){let l=Buffer.concat(a),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{}}}};vde=/^[A-Za-z0-9_-]+$/;bde=class{exec;options;constructor(t={}){let{codexPathOverride:e,env:r,config:n}=t;this.exec=new hde(e,r,n),this.options=t}startThread(t={}){return new KP(this.exec,this.options,t)}resumeThread(t,e={}){return new KP(this.exec,this.options,e,t)}}});import{execSync as xde}from"child_process";var Bp,YF=E(()=>{Ro();Mo();pa();mg();Co();Ao();Bp=class extends mn{constructor(){super("codex","Codex (OpenAI)",75)}canHandle(e){if(!!!(process.env.OPENAI_API_KEY||process.env.CODEX_API_KEY))return H.debug("CodexAgentStrategy: OPENAI_API_KEY or CODEX_API_KEY not set"),!1;try{return xde("codex --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return H.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:a=null,skills:o=null,sessionPath:s=null,nodeName:c=null,timeout:u,config:l={}}=r,{Codex:d}=await Promise.resolve().then(()=>(QF(),GF)),f=n;(!f||f==="auto")&&(H.debug(`Model is '${f||"undefined"}', using default: ${Gr.CODEX}`),f=Gr.CODEX);let p=B_[f]||f;B_[f]&&f!==p&&H.debug(`Mapped model: ${f} \u2192 ${p}`),H.debug(`Invoking Codex SDK with model: ${p}, skills: ${JSON.stringify(o)}`);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: ${p}${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(o,{sessionPath:s,workspace:i,nodeName:c}),b={};Object.keys(h).length>0&&(b.mcp_servers=h,H.debug(`[Codex] MCP servers: ${Object.keys(h).join(", ")}`));let _=new d({...Object.keys(b).length>0&&{config:b}}).startThread({workingDirectory:i,skipGitRepoCheck:!0,approvalPolicy:"never",sandboxMode:"danger-full-access",networkAccessEnabled:!0}),x=a&&typeof a.parse=="function",w={};if(a)try{let k=x?Xn(a,{target:"openAi"}):a;w.outputSchema=k,H.debug("Structured output via SDK outputSchema")}catch(k){H.warn(`[Codex] Schema conversion failed, will extract from text: ${k.message}`)}try{let{events:k}=await _.runStreamed(e,w),$=0,T="";for await(let A of k){let z=A.type;if(z==="item.completed"){let M=A.item,L=M?.type;if(L==="mcp_tool_call"){$++;let R=`${M.server}/${M.tool}`;if(ka.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(L==="tool_call"||L==="function_call"||L==="command_execution"){$++;let R=M.name||M.tool||M.command||"unknown";ka.stepTool(`Tool: ${R}`)}else L==="agent_message"&&(T=M.text||"",T.length<500?console.log(T):console.log(`${T.substring(0,200)}... (${T.length} chars)`))}else z==="turn.completed"?H.debug(`[Codex] Turn completed. Usage: ${JSON.stringify(A.usage||{})}`):H.debug(`[Codex] Event: ${z} ${JSON.stringify(A).slice(0,300)}`)}if(H.debug(`[Codex] Last agent message (${T.length} chars): ${T.slice(0,500)}`),a){if(!T)throw new Error("Codex agent returned no response");let A=JSON.parse(T),z=x?a.parse(A):A;return H.debug("\u2705 [Codex] Structured output validated"),{raw:T,structured:z}}return T||""}catch(k){let $=k.message||String(k);throw H.error(`\u274C [Codex] SDK call failed: ${$}`),$.includes("exited with code")&&(H.error("\u{1F4A1} [Codex] Verify: codex --version && echo $OPENAI_API_KEY"),H.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 a=Qr(i);if(!a){H.warn(`[Codex] Unknown skill "${i}" \u2014 skipping`);continue}if(typeof a.resolve!="function")continue;let o=a.resolve(r);if(!o)continue;let s=a.serverName||i,c={command:o.command};o.args?.length&&(c.args=o.args),o.env&&Object.keys(o.env).length>0&&(c.env=o.env),n[s]=c,H.debug(`[Codex] MCP: ${s} \u2192 ${o.command} ${(o.args||[]).join(" ")}`)}return n}}});import{execSync as wde,spawn as kde}from"child_process";import{existsSync as JF,mkdirSync as XF,readFileSync as e9,rmSync as Sde,writeFileSync as t9}from"fs";import{join as xs}from"path";function $de(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,a=!1,o=!1,s=-1;for(let c=n;c<e.length;c++){let u=e[c];if(a){o?o=!1:u==="\\"?o=!0:u==='"'&&(a=!1);continue}if(u==='"'){a=!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 Ide(t){let e=String(t||"").trim();if(!e)return null;try{return JSON.parse(e)}catch{return $de(e)}}function Ede(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 Kp,r9=E(()=>{Ro();Mo();pa();Co();Ao();dx();H_();Kp=class extends mn{constructor(){super("gemini","Gemini (Google)",70)}canHandle(e){if(!!!(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY))return H.debug("GeminiAgentStrategy: GEMINI_API_KEY or GOOGLE_API_KEY not set"),!1;try{return wde("gemini --version",{encoding:"utf-8",timeout:5e3,stdio:"pipe"}),!0}catch{return H.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:a=null,skills:o=null,sessionPath:s=null,nodeName:c=null,timeout:u=600*1e3}=r,l=n;(!l||l==="auto")&&(l=Gr.GEMINI);let d=v1[l]||l,f=String(process.env.GEMINI_API_KEY||"").trim(),p=String(process.env.GOOGLE_API_KEY||"").trim(),m=this._resolveSkillsToMcp(o,{sessionPath:s,workspace:i,nodeName:c}),v=Object.keys(m).length>0,g=e,h=a&&typeof a.parse=="function",b=null;if(a){let M;try{let L=h?Xn(a,{target:"openAi"}):a;M=JSON.stringify(L,null,2)}catch{M="{}"}if(v){g+=`
227
+
228
+ Write valid JSON that matches this schema:
229
+ ${M}`;let L=`zibby-result-${Date.now()}.json`,R=xs(i,".zibby","tmp");b=xs(R,L),XF(R,{recursive:!0}),g+=cc.generateFileOutputInstructions(a,b)}else g+=`
230
+
231
+ Return ONLY valid JSON (no markdown, no commentary) that matches this schema:
232
+ ${M}`}let y=this._createGeminiConfigDir(i,m),_=["--output-format","json"];d&&d!=="auto"&&_.push("--model",d);let x=Object.keys(m);if(x.length>0){_.push("--approval-mode","yolo");for(let M of x)_.push("--allowed-mcp-server-names",M);H.info(`[Gemini] Enabling MCP servers: ${x.join(", ")}`)}else o&&o.length>0&&H.warn(`[Gemini] Skills requested but no MCP servers configured: ${o.join(", ")}`);_.push("-p",g);let w={...process.env,GEMINI_CLI_HOME:y};f?(w.GEMINI_API_KEY=f,delete w.GOOGLE_API_KEY):p&&(w.GOOGLE_API_KEY=p,delete w.GEMINI_API_KEY),H.debug(`[Gemini] Command: gemini ${_.slice(0,8).join(" ")}... (${_.length} total args)`),H.debug(`[Gemini] Config home: ${y}`),H.debug(`[Gemini] GEMINI_CLI_HOME env: ${w.GEMINI_CLI_HOME}`);let k="",$=null;try{k=await new Promise((L,R)=>{let te=kde("gemini",_,{cwd:i,env:w,stdio:["ignore","pipe","pipe"]}),G="",ve="",Fe=setTimeout(()=>{try{te.kill("SIGTERM")}catch{}},u);te.stdout.on("data",ye=>{G+=ye.toString()}),te.stderr.on("data",ye=>{ve+=ye.toString()}),te.on("error",ye=>{clearTimeout(Fe),R(ye)}),te.on("close",ye=>{if(clearTimeout(Fe),ye===0)return L(G.trim());R(new Error(`gemini failed with code ${ye}: ${(ve||G).trim()}`))})})}catch(M){$=M}finally{try{Sde(y,{recursive:!0,force:!0})}catch{}}let T=Ede(k).trim();if(!a){if($)throw $;return T}if(b){let M=JF(b);if(H.info(`[Gemini] Result file: ${M?"present":"missing"} at ${b}`),M)try{let L=e9(b,"utf-8").trim(),R=JSON.parse(L),te=h?a.parse(R):R;return H.info("[Gemini] Structured output recovered from result file"),{raw:T,structured:te}}catch(L){H.warn(`[Gemini] Result file parse/validation failed: ${L.message}`)}else $||H.warn("[Gemini] Result file missing; falling back to stream-parsed JSON")}let A=null;if(a){let M=new Bs;M.zodSchema=a,M.processChunk(T),M.flush(),A=M.getResult()}if(H.info(`[Gemini] Raw stdout length: ${k.length} chars`),H.info(`[Gemini] Extracted text length: ${T.length} chars`),H.info(`[Gemini] StreamParser result: ${A?"extracted":"null"}`),A||(T.length<2e3?H.info(`[Gemini] Raw text preview:
233
+ ${T}`):H.info(`[Gemini] Raw text preview (first 1000 chars):
234
+ ${T.slice(0,1e3)}`),A=Ide(T)),!A)throw $||(H.error("[Gemini] Failed to extract valid JSON from output"),H.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?a.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 a=Qr(i);if(!a||typeof a.resolve!="function")continue;let o=a.resolve(r);if(!o)continue;let s=a.cursorKey||a.serverName||i,c={command:o.command};o.args?.length&&(c.args=o.args),o.env&&Object.keys(o.env).length>0&&(c.env=o.env),o.cwd&&(c.cwd=o.cwd),n[s]=c}return n}_createGeminiConfigDir(e,r){let n=`${Date.now()}-${Math.random().toString(16).slice(2,10)}`,i=xs(e||process.cwd(),".zibby","tmp",`gemini-home-${n}`),a=xs(i,".gemini");XF(a,{recursive:!0});let o=xs(a,"settings.json"),s={},c=xs(process.env.HOME||"",".gemini","settings.json");if(JF(c))try{s=JSON.parse(e9(c,"utf-8"))}catch{s={}}let u={...s,mcpServers:{...s.mcpServers&&typeof s.mcpServers=="object"?s.mcpServers:{},...r||{}}};t9(o,`${JSON.stringify(u,null,2)}
235
+ `,"utf-8");let l=xs(e||process.cwd(),".zibby","tmp","gemini-settings-debug.json");try{t9(l,`${JSON.stringify(u,null,2)}
236
+ `,"utf-8")}catch{}return H.debug(`[Gemini] Created isolated config with ${Object.keys(u.mcpServers||{}).length} MCP servers`),H.debug(`[Gemini] MCP servers: ${JSON.stringify(Object.keys(u.mcpServers||{}),null,2)}`),i}}});var Hp,GP=E(()=>{Hp=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 bu,n9=E(()=>{GP();bu=class extends Hp{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 Gp,QP=E(()=>{Gp=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 ty(t){return Buffer.byteLength(JSON.stringify(t),"utf8")}function ry(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 YP(t,e=0){if(!t||typeof t!="object"||e>8)return t;if(Array.isArray(t))return t.map(n=>YP(n,e+1));let r={};for(let[n,i]of Object.entries(t))n==="description"||n==="title"||n==="examples"||n==="default"||(r[n]=YP(i,e+1));return r}function Pde(t=[]){return t.map(e=>({...e,function:{...e.function,description:ry(e.function?.description||"",180),parameters:YP(e.function?.parameters||{type:"object",properties:{}})}}))}function i9(t){let e=new Set;for(let i of t)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let a of i.tool_calls)e.add(a.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:o,...s}=i;return{...s,content:s.content||""}})}function JP(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)?Pde(t.tools):t.tools};i.messages.length>0&&i.messages[0]?.role==="system"&&(i.messages[0]={...i.messages[0],content:ry(i.messages[0].content,n)});let a=!1;for(;ty(i)>r&&i.messages.length>2;)i.messages.splice(1,1),a=!0;if(a&&(i.messages=i9(i.messages)),ty(i)>r&&i.messages.length>0&&(i.messages[0]={...i.messages[0],content:ry(i.messages[0].content,6e3)},a=!0),ty(i)>r){let o=i.messages.find(c=>c.role==="system")||i.messages[0],s=i.messages.slice(-2);i.messages=i9([o,...s].filter(Boolean).map((c,u)=>({...c,content:ry(c.content,u===0?4e3:8e3)}))),a=!0}return{body:i,meta:{bytes:ty(i),trimmed:a,maxBytes:r,messageCount:i.messages.length}}}var a9=E(()=>{});var o9,xu,s9=E(()=>{QP();a9();o9=t=>Buffer.byteLength(JSON.stringify(t),"utf8"),xu=class extends Gp{async fetchCompletion(e,r,n={}){let i=o9(e),{body:a,meta:o}=JP(e,n.payloadCompaction);n.onBudget?.({streaming:!1,beforeBytes:i,meta:o});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(a),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},a=o9(i),{body:o,meta:s}=JP(i,n.payloadCompaction);n.onBudget?.({streaming:!0,beforeBytes:a,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(o),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(),f=new TextDecoder,p="",m="",v=new Map;for(;;){let{done:g,value:h}=await d.read();if(g)break;p+=f.decode(h,{stream:!0});let b=p.split(`
239
+ `);p=b.pop();for(let y of b){if(!y.startsWith("data: "))continue;let _=y.slice(6).trim();if(_==="[DONE]")continue;let x;try{x=JSON.parse(_)}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],[b])=>h-b).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 c9=E(()=>{GP();n9();QP();s9()});var XP=E(()=>{ur()});var ny=E(()=>{ur();we();XP()});var l9=E(()=>{ur()});var eT=E(()=>{ur();ny()});var d9=E(()=>{ur();ny()});var tT=E(()=>{ur();XP();ny();l9();ur();Ac();Eh();eT();eT();d9()});var rT=E(()=>{tT();tT()});function wu(t){return!!t._zod}function Ui(t,e){return wu(t)?Ec(t,e):t.safeParse(e)}function iy(t){if(!t)return;let e;if(wu(t)?e=t._zod?.def?.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function f9(t){if(wu(t)){let a=t._zod?.def;if(a){if(a.value!==void 0)return a.value;if(Array.isArray(a.values)&&a.values.length>0)return a.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 ay=E(()=>{Il();rT()});var nT=E(()=>{Md();Md()});var m9=E(()=>{nT();nT()});var aT,h9,vo,sy,kr,g9,v9,CDe,Rde,Cde,oT,Gn,Qp,y9,Or,di,pi,jr,cy,_9,sT,b9,x9,cT,Yp,Ue,uT,w9,k9,ADe,ws,Ade,uy,Ude,Jp,ku,S9,Dde,Mde,qde,Zde,Lde,Fde,Vde,Wde,lT,Bde,ly,Kde,Hde,dy,Gde,Xp,ef,Qde,tf,ks,Yde,rf,py,fy,my,UDe,hy,gy,vy,$9,I9,E9,dT,P9,nf,Su,T9,Jde,Xde,pT,epe,fT,mT,tpe,rpe,hT,gT,npe,ipe,ape,ope,spe,cpe,upe,lpe,dpe,vT,ppe,fpe,yT,_T,bT,mpe,hpe,gpe,xT,vpe,wT,kT,ype,_pe,z9,bpe,ST,$u,DDe,xpe,wpe,$T,O9,j9,kpe,Spe,$pe,Ipe,Epe,Ppe,Tpe,zpe,Ope,oy,jpe,Npe,IT,ET,PT,Rpe,Cpe,Ape,Upe,Dpe,Mpe,qpe,Zpe,Lpe,Fpe,Vpe,Wpe,Bpe,Kpe,Hpe,TT,Gpe,Qpe,zT,Ype,Jpe,Xpe,efe,OT,tfe,rfe,nfe,ife,MDe,qDe,ZDe,LDe,FDe,VDe,Ee,iT,af=E(()=>{m9();aT="2025-11-25",h9=[aT,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],vo="io.modelcontextprotocol/related-task",sy="2.0",kr=V$(t=>t!==null&&(typeof t=="object"||typeof t=="function")),g9=qt([F(),Pt().int()]),v9=F(),CDe=qr({ttl:Pt().optional(),pollInterval:Pt().optional()}),Rde=pe({ttl:Pt().optional()}),Cde=pe({taskId:F()}),oT=qr({progressToken:g9.optional(),[vo]:Cde.optional()}),Gn=pe({_meta:oT.optional()}),Qp=Gn.extend({task:Rde.optional()}),y9=t=>Qp.safeParse(t).success,Or=pe({method:F(),params:Gn.loose().optional()}),di=pe({_meta:oT.optional()}),pi=pe({method:F(),params:di.loose().optional()}),jr=qr({_meta:oT.optional()}),cy=qt([F(),Pt().int()]),_9=pe({jsonrpc:ke(sy),id:cy,...Or.shape}).strict(),sT=t=>_9.safeParse(t).success,b9=pe({jsonrpc:ke(sy),...pi.shape}).strict(),x9=t=>b9.safeParse(t).success,cT=pe({jsonrpc:ke(sy),id:cy,result:jr}).strict(),Yp=t=>cT.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={}));uT=pe({jsonrpc:ke(sy),id:cy.optional(),error:pe({code:Pt().int(),message:F(),data:Mt().optional()})}).strict(),w9=t=>uT.safeParse(t).success,k9=qt([_9,b9,cT,uT]),ADe=qt([cT,uT]),ws=jr.strict(),Ade=di.extend({requestId:cy.optional(),reason:F().optional()}),uy=pi.extend({method:ke("notifications/cancelled"),params:Ade}),Ude=pe({src:F(),mimeType:F().optional(),sizes:at(F()).optional(),theme:Zr(["light","dark"]).optional()}),Jp=pe({icons:at(Ude).optional()}),ku=pe({name:F(),title:F().optional()}),S9=ku.extend({...ku.shape,...Jp.shape,version:F(),websiteUrl:F().optional(),description:F().optional()}),Dde=Dd(pe({applyDefaults:gr().optional()}),Rt(F(),Mt())),Mde=fg(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Dd(pe({form:Dde.optional(),url:kr.optional()}),Rt(F(),Mt()).optional())),qde=qr({list:kr.optional(),cancel:kr.optional(),requests:qr({sampling:qr({createMessage:kr.optional()}).optional(),elicitation:qr({create:kr.optional()}).optional()}).optional()}),Zde=qr({list:kr.optional(),cancel:kr.optional(),requests:qr({tools:qr({call:kr.optional()}).optional()}).optional()}),Lde=pe({experimental:Rt(F(),kr).optional(),sampling:pe({context:kr.optional(),tools:kr.optional()}).optional(),elicitation:Mde.optional(),roots:pe({listChanged:gr().optional()}).optional(),tasks:qde.optional(),extensions:Rt(F(),kr).optional()}),Fde=Gn.extend({protocolVersion:F(),capabilities:Lde,clientInfo:S9}),Vde=Or.extend({method:ke("initialize"),params:Fde}),Wde=pe({experimental:Rt(F(),kr).optional(),logging:kr.optional(),completions:kr.optional(),prompts:pe({listChanged:gr().optional()}).optional(),resources:pe({subscribe:gr().optional(),listChanged:gr().optional()}).optional(),tools:pe({listChanged:gr().optional()}).optional(),tasks:Zde.optional(),extensions:Rt(F(),kr).optional()}),lT=jr.extend({protocolVersion:F(),capabilities:Wde,serverInfo:S9,instructions:F().optional()}),Bde=pi.extend({method:ke("notifications/initialized"),params:di.optional()}),ly=Or.extend({method:ke("ping"),params:Gn.optional()}),Kde=pe({progress:Pt(),total:Bt(Pt()),message:Bt(F())}),Hde=pe({...di.shape,...Kde.shape,progressToken:g9}),dy=pi.extend({method:ke("notifications/progress"),params:Hde}),Gde=Gn.extend({cursor:v9.optional()}),Xp=Or.extend({params:Gde.optional()}),ef=jr.extend({nextCursor:v9.optional()}),Qde=Zr(["working","input_required","completed","failed","cancelled"]),tf=pe({taskId:F(),status:Qde,ttl:qt([Pt(),sg()]),createdAt:F(),lastUpdatedAt:F(),pollInterval:Bt(Pt()),statusMessage:Bt(F())}),ks=jr.extend({task:tf}),Yde=di.merge(tf),rf=pi.extend({method:ke("notifications/tasks/status"),params:Yde}),py=Or.extend({method:ke("tasks/get"),params:Gn.extend({taskId:F()})}),fy=jr.merge(tf),my=Or.extend({method:ke("tasks/result"),params:Gn.extend({taskId:F()})}),UDe=jr.loose(),hy=Xp.extend({method:ke("tasks/list")}),gy=ef.extend({tasks:at(tf)}),vy=Or.extend({method:ke("tasks/cancel"),params:Gn.extend({taskId:F()})}),$9=jr.merge(tf),I9=pe({uri:F(),mimeType:Bt(F()),_meta:Rt(F(),Mt()).optional()}),E9=I9.extend({text:F()}),dT=F().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),P9=I9.extend({blob:dT}),nf=Zr(["user","assistant"]),Su=pe({audience:at(nf).optional(),priority:Pt().min(0).max(1).optional(),lastModified:rs.datetime({offset:!0}).optional()}),T9=pe({...ku.shape,...Jp.shape,uri:F(),description:Bt(F()),mimeType:Bt(F()),size:Bt(Pt()),annotations:Su.optional(),_meta:Bt(qr({}))}),Jde=pe({...ku.shape,...Jp.shape,uriTemplate:F(),description:Bt(F()),mimeType:Bt(F()),annotations:Su.optional(),_meta:Bt(qr({}))}),Xde=Xp.extend({method:ke("resources/list")}),pT=ef.extend({resources:at(T9)}),epe=Xp.extend({method:ke("resources/templates/list")}),fT=ef.extend({resourceTemplates:at(Jde)}),mT=Gn.extend({uri:F()}),tpe=mT,rpe=Or.extend({method:ke("resources/read"),params:tpe}),hT=jr.extend({contents:at(qt([E9,P9]))}),gT=pi.extend({method:ke("notifications/resources/list_changed"),params:di.optional()}),npe=mT,ipe=Or.extend({method:ke("resources/subscribe"),params:npe}),ape=mT,ope=Or.extend({method:ke("resources/unsubscribe"),params:ape}),spe=di.extend({uri:F()}),cpe=pi.extend({method:ke("notifications/resources/updated"),params:spe}),upe=pe({name:F(),description:Bt(F()),required:Bt(gr())}),lpe=pe({...ku.shape,...Jp.shape,description:Bt(F()),arguments:Bt(at(upe)),_meta:Bt(qr({}))}),dpe=Xp.extend({method:ke("prompts/list")}),vT=ef.extend({prompts:at(lpe)}),ppe=Gn.extend({name:F(),arguments:Rt(F(),F()).optional()}),fpe=Or.extend({method:ke("prompts/get"),params:ppe}),yT=pe({type:ke("text"),text:F(),annotations:Su.optional(),_meta:Rt(F(),Mt()).optional()}),_T=pe({type:ke("image"),data:dT,mimeType:F(),annotations:Su.optional(),_meta:Rt(F(),Mt()).optional()}),bT=pe({type:ke("audio"),data:dT,mimeType:F(),annotations:Su.optional(),_meta:Rt(F(),Mt()).optional()}),mpe=pe({type:ke("tool_use"),name:F(),id:F(),input:Rt(F(),Mt()),_meta:Rt(F(),Mt()).optional()}),hpe=pe({type:ke("resource"),resource:qt([E9,P9]),annotations:Su.optional(),_meta:Rt(F(),Mt()).optional()}),gpe=T9.extend({type:ke("resource_link")}),xT=qt([yT,_T,bT,gpe,hpe]),vpe=pe({role:nf,content:xT}),wT=jr.extend({description:F().optional(),messages:at(vpe)}),kT=pi.extend({method:ke("notifications/prompts/list_changed"),params:di.optional()}),ype=pe({title:F().optional(),readOnlyHint:gr().optional(),destructiveHint:gr().optional(),idempotentHint:gr().optional(),openWorldHint:gr().optional()}),_pe=pe({taskSupport:Zr(["required","optional","forbidden"]).optional()}),z9=pe({...ku.shape,...Jp.shape,description:F().optional(),inputSchema:pe({type:ke("object"),properties:Rt(F(),kr).optional(),required:at(F()).optional()}).catchall(Mt()),outputSchema:pe({type:ke("object"),properties:Rt(F(),kr).optional(),required:at(F()).optional()}).catchall(Mt()).optional(),annotations:ype.optional(),execution:_pe.optional(),_meta:Rt(F(),Mt()).optional()}),bpe=Xp.extend({method:ke("tools/list")}),ST=ef.extend({tools:at(z9)}),$u=jr.extend({content:at(xT).default([]),structuredContent:Rt(F(),Mt()).optional(),isError:gr().optional()}),DDe=$u.or(jr.extend({toolResult:Mt()})),xpe=Qp.extend({name:F(),arguments:Rt(F(),Mt()).optional()}),wpe=Or.extend({method:ke("tools/call"),params:xpe}),$T=pi.extend({method:ke("notifications/tools/list_changed"),params:di.optional()}),O9=pe({autoRefresh:gr().default(!0),debounceMs:Pt().int().nonnegative().default(300)}),j9=Zr(["debug","info","notice","warning","error","critical","alert","emergency"]),kpe=Gn.extend({level:j9}),Spe=Or.extend({method:ke("logging/setLevel"),params:kpe}),$pe=di.extend({level:j9,logger:F().optional(),data:Mt()}),Ipe=pi.extend({method:ke("notifications/message"),params:$pe}),Epe=pe({name:F().optional()}),Ppe=pe({hints:at(Epe).optional(),costPriority:Pt().min(0).max(1).optional(),speedPriority:Pt().min(0).max(1).optional(),intelligencePriority:Pt().min(0).max(1).optional()}),Tpe=pe({mode:Zr(["auto","required","none"]).optional()}),zpe=pe({type:ke("tool_result"),toolUseId:F().describe("The unique identifier for the corresponding tool call."),content:at(xT).default([]),structuredContent:pe({}).loose().optional(),isError:gr().optional(),_meta:Rt(F(),Mt()).optional()}),Ope=lg("type",[yT,_T,bT]),oy=lg("type",[yT,_T,bT,mpe,zpe]),jpe=pe({role:nf,content:qt([oy,at(oy)]),_meta:Rt(F(),Mt()).optional()}),Npe=Qp.extend({messages:at(jpe),modelPreferences:Ppe.optional(),systemPrompt:F().optional(),includeContext:Zr(["none","thisServer","allServers"]).optional(),temperature:Pt().optional(),maxTokens:Pt().int(),stopSequences:at(F()).optional(),metadata:kr.optional(),tools:at(z9).optional(),toolChoice:Tpe.optional()}),IT=Or.extend({method:ke("sampling/createMessage"),params:Npe}),ET=jr.extend({model:F(),stopReason:Bt(Zr(["endTurn","stopSequence","maxTokens"]).or(F())),role:nf,content:Ope}),PT=jr.extend({model:F(),stopReason:Bt(Zr(["endTurn","stopSequence","maxTokens","toolUse"]).or(F())),role:nf,content:qt([oy,at(oy)])}),Rpe=pe({type:ke("boolean"),title:F().optional(),description:F().optional(),default:gr().optional()}),Cpe=pe({type:ke("string"),title:F().optional(),description:F().optional(),minLength:Pt().optional(),maxLength:Pt().optional(),format:Zr(["email","uri","date","date-time"]).optional(),default:F().optional()}),Ape=pe({type:Zr(["number","integer"]),title:F().optional(),description:F().optional(),minimum:Pt().optional(),maximum:Pt().optional(),default:Pt().optional()}),Upe=pe({type:ke("string"),title:F().optional(),description:F().optional(),enum:at(F()),default:F().optional()}),Dpe=pe({type:ke("string"),title:F().optional(),description:F().optional(),oneOf:at(pe({const:F(),title:F()})),default:F().optional()}),Mpe=pe({type:ke("string"),title:F().optional(),description:F().optional(),enum:at(F()),enumNames:at(F()).optional(),default:F().optional()}),qpe=qt([Upe,Dpe]),Zpe=pe({type:ke("array"),title:F().optional(),description:F().optional(),minItems:Pt().optional(),maxItems:Pt().optional(),items:pe({type:ke("string"),enum:at(F())}),default:at(F()).optional()}),Lpe=pe({type:ke("array"),title:F().optional(),description:F().optional(),minItems:Pt().optional(),maxItems:Pt().optional(),items:pe({anyOf:at(pe({const:F(),title:F()}))}),default:at(F()).optional()}),Fpe=qt([Zpe,Lpe]),Vpe=qt([Mpe,qpe,Fpe]),Wpe=qt([Vpe,Rpe,Cpe,Ape]),Bpe=Qp.extend({mode:ke("form").optional(),message:F(),requestedSchema:pe({type:ke("object"),properties:Rt(F(),Wpe),required:at(F()).optional()})}),Kpe=Qp.extend({mode:ke("url"),message:F(),elicitationId:F(),url:F().url()}),Hpe=qt([Bpe,Kpe]),TT=Or.extend({method:ke("elicitation/create"),params:Hpe}),Gpe=di.extend({elicitationId:F()}),Qpe=pi.extend({method:ke("notifications/elicitation/complete"),params:Gpe}),zT=jr.extend({action:Zr(["accept","decline","cancel"]),content:fg(t=>t===null?void 0:t,Rt(F(),qt([F(),Pt(),gr(),at(F())])).optional())}),Ype=pe({type:ke("ref/resource"),uri:F()}),Jpe=pe({type:ke("ref/prompt"),name:F()}),Xpe=Gn.extend({ref:qt([Jpe,Ype]),argument:pe({name:F(),value:F()}),context:pe({arguments:Rt(F(),F()).optional()}).optional()}),efe=Or.extend({method:ke("completion/complete"),params:Xpe}),OT=jr.extend({completion:qr({values:at(F()).max(100),total:Bt(Pt().int()),hasMore:Bt(gr())})}),tfe=pe({uri:F().startsWith("file://"),name:F().optional(),_meta:Rt(F(),Mt()).optional()}),rfe=Or.extend({method:ke("roots/list"),params:Gn.optional()}),nfe=jr.extend({roots:at(tfe)}),ife=pi.extend({method:ke("notifications/roots/list_changed"),params:di.optional()}),MDe=qt([ly,Vde,efe,Spe,fpe,dpe,Xde,epe,rpe,ipe,ope,wpe,bpe,py,my,hy,vy]),qDe=qt([uy,dy,Bde,ife,rf]),ZDe=qt([ws,ET,PT,zT,nfe,fy,gy,ks]),LDe=qt([ly,IT,TT,rfe,py,my,hy,vy]),FDe=qt([uy,dy,Ipe,cpe,gT,$T,kT,rf,Qpe]),VDe=qt([ws,lT,OT,wT,vT,pT,fT,hT,$u,ST,fy,gy,ks]),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 iT(i.elicitations,r)}return new t(e,r,n)}},iT=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 yo(t){return t==="completed"||t==="failed"||t==="cancelled"}var N9=E(()=>{});function jT(t){let r=iy(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=f9(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function NT(t,e){let r=Ui(t,e);if(!r.success)throw r.error;return r.data}var R9=E(()=>{rT();ay();Mo()});function C9(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function A9(t,e){let r={...t};for(let n in e){let i=n,a=e[i];if(a===void 0)continue;let o=r[i];C9(o)&&C9(a)?r[i]={...o,...a}:r[i]=a}return r}var afe,yy,U9=E(()=>{ay();af();N9();R9();afe=6e4,yy=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(uy,r=>{this._oncancel(r)}),this.setNotificationHandler(dy,r=>{this._onprogress(r)}),this.setRequestHandler(ly,r=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(py,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(my,async(r,n)=>{let i=async()=>{let a=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(a,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,f=new Ee(d.error.code,d.error.message,d.error.data);l(f)}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 o=await this._taskStore.getTask(a,n.sessionId);if(!o)throw new Ee(Ue.InvalidParams,`Task not found: ${a}`);if(!yo(o.status))return await this._waitForTaskUpdate(a,n.signal),await i();if(yo(o.status)){let s=await this._taskStore.getTaskResult(a,n.sessionId);return this._clearTaskQueue(a),{...s,_meta:{...s._meta,[vo]:{taskId:a}}}}return await i()};return await i()}),this.setRequestHandler(hy,async(r,n)=>{try{let{tasks:i,nextCursor:a}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:i,nextCursor:a,_meta:{}}}catch(i){throw new Ee(Ue.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(vy,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(yo(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 a=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!a)throw new Ee(Ue.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...a}}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,a=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:a,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=a=>{n?.(a),this._onerror(a)};let i=this._transport?.onmessage;this._transport.onmessage=(a,o)=>{i?.(a,o),Yp(a)||w9(a)?this._onresponse(a):sT(a)?this._onrequest(a,o):x9(a)?this._onnotification(a):this._onerror(new Error(`Unknown message type: ${JSON.stringify(a)}`))},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,a=e.params?._meta?.[vo]?.taskId;if(n===void 0){let l={jsonrpc:"2.0",id:e.id,error:{code:Ue.MethodNotFound,message:"Method not found"}};a&&this._taskMessageQueue?this._enqueueTaskMessage(a,{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 o=new AbortController;this._requestHandlerAbortControllers.set(e.id,o);let s=y9(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,i?.sessionId):void 0,u={signal:o.signal,sessionId:i?.sessionId,_meta:e.params?._meta,sendNotification:async l=>{if(o.signal.aborted)return;let d={relatedRequestId:e.id};a&&(d.relatedTask={taskId:a}),await this.notification(l,d)},sendRequest:async(l,d,f)=>{if(o.signal.aborted)throw new Ee(Ue.ConnectionClosed,"Request was cancelled");let p={...f,relatedRequestId:e.id};a&&!p.relatedTask&&(p.relatedTask={taskId:a});let m=p.relatedTask?.taskId??a;return m&&c&&await c.updateTaskStatus(m,"input_required"),await this.request(l,d,p)},authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo,taskId:a,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(o.signal.aborted)return;let d={result:l,jsonrpc:"2.0",id:e.id};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{type:"response",message:d,timestamp:Date.now()},i?.sessionId):await i?.send(d)},async l=>{if(o.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}}};a&&this._taskMessageQueue?await this._enqueueTaskMessage(a,{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)===o&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,i=Number(r),a=this._progressHandlers.get(i);if(!a){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let o=this._responseHandlers.get(i),s=this._timeoutInfo.get(i);if(s&&o&&s.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(c){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),o(c);return}a(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Yp(e))n(e);else{let o=new Ee(e.error.code,e.error.message,e.error.data);n(o)}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 a=!1;if(Yp(e)&&e.result&&typeof e.result=="object"){let o=e.result;if(o.task&&typeof o.task=="object"){let s=o.task;typeof s.taskId=="string"&&(a=!0,this._taskProgressTokens.set(s.taskId,r))}}if(a||this._progressHandlers.delete(r),Yp(e))i(e);else{let o=Ee.fromError(e.error.code,e.error.message,e.error.data);i(o)}}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(o){yield{type:"error",error:o instanceof Ee?o:new Ee(Ue.InternalError,String(o))}}return}let a;try{let o=await this.request(e,ks,n);if(o.task)a=o.task.taskId,yield{type:"taskCreated",task:o.task};else throw new Ee(Ue.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:a},n);if(yield{type:"taskStatus",task:s},yo(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:a},r,n)}:s.status==="failed"?yield{type:"error",error:new Ee(Ue.InternalError,`Task ${a} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new Ee(Ue.InternalError,`Task ${a} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:a},r,n)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(o){yield{type:"error",error:o instanceof Ee?o:new Ee(Ue.InternalError,String(o))}}}request(e,r,n){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,task:s,relatedTask:c}=n??{};return new Promise((u,l)=>{let d=b=>{l(b)};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(b){d(b);return}n?.signal?.throwIfAborted();let f=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:f};n?.onprogress&&(this._progressHandlers.set(f,n.onprogress),p.params={...e.params,_meta:{...e.params?._meta||{},progressToken:f}}),s&&(p.params={...p.params,task:s}),c&&(p.params={...p.params,_meta:{...p.params?._meta||{},[vo]:c}});let m=b=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(b)}},{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`)));let y=b instanceof Ee?b:new Ee(Ue.RequestTimeout,String(b));l(y)};this._responseHandlers.set(f,b=>{if(!n?.signal?.aborted){if(b instanceof Error)return l(b);try{let y=Ui(r,b.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??afe,g=()=>m(Ee.fromError(Ue.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(f,v,n?.maxTotalTimeout,g,n?.resetTimeoutOnProgress??!1);let h=c?.taskId;if(h){let b=y=>{let _=this._responseHandlers.get(f);_?_(y):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,b),this._enqueueTaskMessage(h,{type:"request",message:p,timestamp:Date.now()}).catch(y=>{this._cleanupTimeout(f),l(y)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(b=>{this._cleanupTimeout(f),l(b)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},fy,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},gy,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},$9,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||{},[vo]: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||{},[vo]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let o={...e,jsonrpc:"2.0"};r?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[vo]:r.relatedTask}}}),await this._transport.send(o,r)}setRequestHandler(e,r){let n=jT(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(i,a)=>{let o=NT(e,i);return Promise.resolve(r(o,a))})}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=jT(e);this._notificationHandlers.set(n,i=>{let a=NT(e,i);return Promise.resolve(r(a))})}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 a=i.message.id,o=this._requestResolvers.get(a);o?(o(new Ee(Ue.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(a)):this._onerror(new Error(`Resolver missing for request ${a} 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,a)=>{if(r.aborted){a(new Ee(Ue.InvalidRequest,"Request cancelled"));return}let o=setTimeout(i,n);r.addEventListener("abort",()=>{clearTimeout(o),a(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 a=await n.getTask(i,r);if(!a)throw new Ee(Ue.InvalidParams,"Failed to retrieve task: Task not found");return a},storeTaskResult:async(i,a,o)=>{await n.storeTaskResult(i,a,o,r);let s=await n.getTask(i,r);if(s){let c=rf.parse({method:"notifications/tasks/status",params:s});await this.notification(c),yo(s.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>n.getTaskResult(i,r),updateTaskStatus:async(i,a,o)=>{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(yo(s.status))throw new Ee(Ue.InvalidParams,`Cannot update task "${i}" from terminal status "${s.status}" to "${a}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(i,a,o,r);let c=await n.getTask(i,r);if(c){let u=rf.parse({method:"notifications/tasks/status",params:c});await this.notification(u),yo(c.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>n.listTasks(i,r)}}}});var cf=O($t=>{"use strict";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;var of=class{};$t._CodeOrName=of;$t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ss=class extends of{constructor(e){if(super(),!$t.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}}};$t.Name=Ss;var fi=class extends of{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 Ss&&(r[n.str]=(r[n.str]||0)+1),r),{})}};$t._Code=fi;$t.nil=new fi("");function D9(t,...e){let r=[t[0]],n=0;for(;n<e.length;)CT(r,e[n]),r.push(t[++n]);return new fi(r)}$t._=D9;var RT=new fi("+");function M9(t,...e){let r=[sf(t[0])],n=0;for(;n<e.length;)r.push(RT),CT(r,e[n]),r.push(RT,sf(t[++n]));return ofe(r),new fi(r)}$t.str=M9;function CT(t,e){e instanceof fi?t.push(...e._items):e instanceof Ss?t.push(e):t.push(ufe(e))}$t.addCodeArg=CT;function ofe(t){let e=1;for(;e<t.length-1;){if(t[e]===RT){let r=sfe(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function sfe(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ss||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 Ss))return`"${t}${e.slice(1)}`}function cfe(t,e){return e.emptyStr()?t:t.emptyStr()?e:M9`${t}${e}`}$t.strConcat=cfe;function ufe(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:sf(Array.isArray(t)?t.join(","):t)}function lfe(t){return new fi(sf(t))}$t.stringify=lfe;function sf(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}$t.safeStringify=sf;function dfe(t){return typeof t=="string"&&$t.IDENTIFIER.test(t)?new fi(`.${t}`):D9`[${t}]`}$t.getProperty=dfe;function pfe(t){if(typeof t=="string"&&$t.IDENTIFIER.test(t))return new fi(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}$t.getEsmExportName=pfe;function ffe(t){return new fi(t.toString())}$t.regexpCode=ffe});var DT=O(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.ValueScope=Sn.ValueScopeName=Sn.Scope=Sn.varKinds=Sn.UsedValueState=void 0;var kn=cf(),AT=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},_y;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(_y||(Sn.UsedValueState=_y={}));Sn.varKinds={const:new kn.Name("const"),let:new kn.Name("let"),var:new kn.Name("var")};var by=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof kn.Name?e:this.name(e)}name(e){return new kn.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}}};Sn.Scope=by;var xy=class extends kn.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,kn._)`.${new kn.Name(r)}[${n}]`}};Sn.ValueScopeName=xy;var mfe=(0,kn._)`\n`,UT=class extends by{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?mfe:kn.nil}}get(){return this._scope}name(e){return new xy(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:a}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[a];if(s){let l=s.get(o);if(l)return l}else s=this._values[a]=new Map;s.set(o,i);let c=this._scope[a]||(this._scope[a]=[]),u=c.length;return c[u]=r.ref,i.setValue(r,{property:a,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,kn._)`${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 a=kn.nil;for(let o in e){let s=e[o];if(!s)continue;let c=n[o]=n[o]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,_y.Started);let l=r(u);if(l){let d=this.opts.es5?Sn.varKinds.var:Sn.varKinds.const;a=(0,kn._)`${a}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))a=(0,kn._)`${a}${l}${this.opts._n}`;else throw new AT(u);c.set(u,_y.Completed)})}return a}};Sn.ValueScope=UT});var ot=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=cf(),Di=DT(),_o=cf();Object.defineProperty(nt,"_",{enumerable:!0,get:function(){return _o._}});Object.defineProperty(nt,"str",{enumerable:!0,get:function(){return _o.str}});Object.defineProperty(nt,"strConcat",{enumerable:!0,get:function(){return _o.strConcat}});Object.defineProperty(nt,"nil",{enumerable:!0,get:function(){return _o.nil}});Object.defineProperty(nt,"getProperty",{enumerable:!0,get:function(){return _o.getProperty}});Object.defineProperty(nt,"stringify",{enumerable:!0,get:function(){return _o.stringify}});Object.defineProperty(nt,"regexpCode",{enumerable:!0,get:function(){return _o.regexpCode}});Object.defineProperty(nt,"Name",{enumerable:!0,get:function(){return _o.Name}});var $y=DT();Object.defineProperty(nt,"Scope",{enumerable:!0,get:function(){return $y.Scope}});Object.defineProperty(nt,"ValueScope",{enumerable:!0,get:function(){return $y.ValueScope}});Object.defineProperty(nt,"ValueScopeName",{enumerable:!0,get:function(){return $y.ValueScopeName}});Object.defineProperty(nt,"varKinds",{enumerable:!0,get:function(){return $y.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 ja=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},MT=class extends ja{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Di.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=Eu(this.rhs,e,r)),this}get names(){return this.rhs instanceof gt._CodeOrName?this.rhs.names:{}}},wy=class extends ja{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=Eu(this.rhs,e,r),this}get names(){let e=this.lhs instanceof gt.Name?{}:{...this.lhs.names};return Sy(e,this.rhs)}},qT=class extends wy{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},ZT=class extends ja{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},LT=class extends ja{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},FT=class extends ja{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},VT=class extends ja{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=Eu(this.code,e,r),this}get names(){return this.code instanceof gt._CodeOrName?this.code.names:{}}},uf=class extends ja{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 a=n[i];a.optimizeNames(e,r)||(hfe(e,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Es(e,r.names),{})}},Na=class extends uf{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},WT=class extends uf{},Iu=class extends Na{};Iu.kind="else";var $s=class t extends Na{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 Iu(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(q9(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=Eu(this.condition,e,r),this}get names(){let e=super.names;return Sy(e,this.condition),this.else&&Es(e,this.else.names),e}};$s.kind="if";var Is=class extends Na{};Is.kind="for";var BT=class extends Is{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=Eu(this.iteration,e,r),this}get names(){return Es(super.names,this.iteration.names)}},KT=class extends Is{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Di.varKinds.var:this.varKind,{name:n,from:i,to:a}=this;return`for(${r} ${n}=${i}; ${n}<${a}; ${n}++)`+super.render(e)}get names(){let e=Sy(super.names,this.from);return Sy(e,this.to)}},ky=class extends Is{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=Eu(this.iterable,e,r),this}get names(){return Es(super.names,this.iterable.names)}},lf=class extends Na{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)}};lf.kind="func";var df=class extends uf{render(e){return"return "+super.render(e)}};df.kind="return";var HT=class extends Na{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&&Es(e,this.catch.names),this.finally&&Es(e,this.finally.names),e}},pf=class extends Na{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};pf.kind="catch";var ff=class extends Na{render(e){return"finally"+super.render(e)}};ff.kind="finally";var GT=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
240
+ `:""},this._extScope=e,this._scope=new Di.Scope({parent:e}),this._nodes=[new WT]}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 a=this._scope.toName(r);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new MT(e,a,n)),a}const(e,r,n){return this._def(Di.varKinds.const,e,r,n)}let(e,r,n){return this._def(Di.varKinds.let,e,r,n)}var(e,r,n){return this._def(Di.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new wy(e,r,n))}add(e,r){return this._leafNode(new qT(e,nt.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==gt.nil&&this._leafNode(new VT(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 $s(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 $s(e))}else(){return this._elseNode(new Iu)}endIf(){return this._endBlockNode($s,Iu)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new BT(e),r)}forRange(e,r,n,i,a=this.opts.es5?Di.varKinds.var:Di.varKinds.let){let o=this._scope.toName(e);return this._for(new KT(a,o,r,n),()=>i(o))}forOf(e,r,n,i=Di.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let o=r instanceof gt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,gt._)`${o}.length`,s=>{this.var(a,(0,gt._)`${o}[${s}]`),n(a)})}return this._for(new ky("of",i,a,r),()=>n(a))}forIn(e,r,n,i=this.opts.es5?Di.varKinds.var:Di.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,gt._)`Object.keys(${r})`,n);let a=this._scope.toName(e);return this._for(new ky("in",i,a,r),()=>n(a))}endFor(){return this._endBlockNode(Is)}label(e){return this._leafNode(new ZT(e))}break(e){return this._leafNode(new LT(e))}return(e){let r=new df;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(df)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new HT;if(this._blockNode(i),this.code(e),r){let a=this.name("e");this._currNode=i.catch=new pf(a),r(a)}return n&&(this._currNode=i.finally=new ff,this.code(n)),this._endBlockNode(pf,ff)}throw(e){return this._leafNode(new FT(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 lf(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(lf)}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 $s))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=GT;function Es(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Sy(t,e){return e instanceof gt._CodeOrName?Es(t,e.names):t}function Eu(t,e,r){if(t instanceof gt.Name)return n(t);if(!i(t))return t;return new gt._Code(t._items.reduce((a,o)=>(o instanceof gt.Name&&(o=n(o)),o instanceof gt._Code?a.push(...o._items):a.push(o),a),[]));function n(a){let o=r[a.str];return o===void 0||e[a.str]!==1?a:(delete e[a.str],o)}function i(a){return a instanceof gt._Code&&a._items.some(o=>o instanceof gt.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function hfe(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function q9(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,gt._)`!${QT(t)}`}nt.not=q9;var gfe=Z9(nt.operators.AND);function vfe(...t){return t.reduce(gfe)}nt.and=vfe;var yfe=Z9(nt.operators.OR);function _fe(...t){return t.reduce(yfe)}nt.or=_fe;function Z9(t){return(e,r)=>e===gt.nil?r:r===gt.nil?e:(0,gt._)`${QT(e)} ${t} ${QT(r)}`}function QT(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=ot(),bfe=cf();function xfe(t){let e={};for(let r of t)e[r]=!0;return e}st.toHash=xfe;function wfe(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(V9(t,e),!W9(e,t.self.RULES.all))}st.alwaysValidSchema=wfe;function V9(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let a in e)i[a]||H9(t,`unknown keyword: "${a}"`)}st.checkUnknownRules=V9;function W9(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}st.schemaHasRules=W9;function kfe(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=kfe;function Sfe({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=Sfe;function $fe(t){return B9(decodeURIComponent(t))}st.unescapeFragment=$fe;function Ife(t){return encodeURIComponent(JT(t))}st.escapeFragment=Ife;function JT(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}st.escapeJsonPointer=JT;function B9(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}st.unescapeJsonPointer=B9;function Efe(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}st.eachItem=Efe;function L9({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,a,o,s)=>{let c=o===void 0?a:o instanceof Ft.Name?(a instanceof Ft.Name?t(i,a,o):e(i,a,o),o):a instanceof Ft.Name?(e(i,o,a),a):r(a,o);return s===Ft.Name&&!(c instanceof Ft.Name)?n(i,c):c}}st.mergeEvaluated={props:L9({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} || {}`),XT(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:K9}),items:L9({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 K9(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Ft._)`{}`);return e!==void 0&&XT(t,r,e),r}st.evaluatedPropsToName=K9;function XT(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Ft._)`${e}${(0,Ft.getProperty)(n)}`,!0))}st.setEvaluated=XT;var F9={};function Pfe(t,e){return t.scopeValue("func",{ref:e,code:F9[e.code]||(F9[e.code]=new bfe._Code(e.code))})}st.useFunc=Pfe;var YT;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(YT||(st.Type=YT={}));function Tfe(t,e,r){if(t instanceof Ft.Name){let n=e===YT.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():"/"+JT(t)}st.getErrorPath=Tfe;function H9(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=H9});var Ra=O(ez=>{"use strict";Object.defineProperty(ez,"__esModule",{value:!0});var Lr=ot(),zfe={data:new Lr.Name("data"),valCxt:new Lr.Name("valCxt"),instancePath:new Lr.Name("instancePath"),parentData:new Lr.Name("parentData"),parentDataProperty:new Lr.Name("parentDataProperty"),rootData:new Lr.Name("rootData"),dynamicAnchors:new Lr.Name("dynamicAnchors"),vErrors:new Lr.Name("vErrors"),errors:new Lr.Name("errors"),this:new Lr.Name("this"),self:new Lr.Name("self"),scope:new Lr.Name("scope"),json:new Lr.Name("json"),jsonPos:new Lr.Name("jsonPos"),jsonLen:new Lr.Name("jsonLen"),jsonPart:new Lr.Name("jsonPart")};ez.default=zfe});var mf=O(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.extendErrors=Fr.resetErrorsCount=Fr.reportExtraError=Fr.reportError=Fr.keyword$DataError=Fr.keywordError=void 0;var bt=ot(),Iy=_t(),ln=Ra();Fr.keywordError={message:({keyword:t})=>(0,bt.str)`must pass "${t}" keyword validation`};Fr.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 Ofe(t,e=Fr.keywordError,r,n){let{it:i}=t,{gen:a,compositeRule:o,allErrors:s}=i,c=Y9(t,e,r);n??(o||s)?G9(a,c):Q9(i,(0,bt._)`[${c}]`)}Fr.reportError=Ofe;function jfe(t,e=Fr.keywordError,r){let{it:n}=t,{gen:i,compositeRule:a,allErrors:o}=n,s=Y9(t,e,r);G9(i,s),a||o||Q9(n,ln.default.vErrors)}Fr.reportExtraError=jfe;function Nfe(t,e){t.assign(ln.default.errors,e),t.if((0,bt._)`${ln.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,bt._)`${ln.default.vErrors}.length`,e),()=>t.assign(ln.default.vErrors,null)))}Fr.resetErrorsCount=Nfe;function Rfe({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",i,ln.default.errors,s=>{t.const(o,(0,bt._)`${ln.default.vErrors}[${s}]`),t.if((0,bt._)`${o}.instancePath === undefined`,()=>t.assign((0,bt._)`${o}.instancePath`,(0,bt.strConcat)(ln.default.instancePath,a.errorPath))),t.assign((0,bt._)`${o}.schemaPath`,(0,bt.str)`${a.errSchemaPath}/${e}`),a.opts.verbose&&(t.assign((0,bt._)`${o}.schema`,r),t.assign((0,bt._)`${o}.data`,n))})}Fr.extendErrors=Rfe;function G9(t,e){let r=t.const("err",e);t.if((0,bt._)`${ln.default.vErrors} === null`,()=>t.assign(ln.default.vErrors,(0,bt._)`[${r}]`),(0,bt._)`${ln.default.vErrors}.push(${r})`),t.code((0,bt._)`${ln.default.errors}++`)}function Q9(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 Ps={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 Y9(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,bt._)`{}`:Cfe(t,e,r)}function Cfe(t,e,r={}){let{gen:n,it:i}=t,a=[Afe(i,r),Ufe(t,r)];return Dfe(t,e,a),n.object(...a)}function Afe({errorPath:t},{instancePath:e}){let r=e?(0,bt.str)`${t}${(0,Iy.getErrorPath)(e,Iy.Type.Str)}`:t;return[ln.default.instancePath,(0,bt.strConcat)(ln.default.instancePath,r)]}function Ufe({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,Iy.getErrorPath)(r,Iy.Type.Str)}`),[Ps.schemaPath,i]}function Dfe(t,{params:e,message:r},n){let{keyword:i,data:a,schemaValue:o,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;n.push([Ps.keyword,i],[Ps.params,typeof e=="function"?e(t):e||(0,bt._)`{}`]),c.messages&&n.push([Ps.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([Ps.schema,o],[Ps.parentSchema,(0,bt._)`${l}${d}`],[ln.default.data,a]),u&&n.push([Ps.propertyName,u])}});var X9=O(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.boolOrEmptySchema=Pu.topBoolOrEmptySchema=void 0;var Mfe=mf(),qfe=ot(),Zfe=Ra(),Lfe={message:"boolean schema is false"};function Ffe(t){let{gen:e,schema:r,validateName:n}=t;r===!1?J9(t,!1):typeof r=="object"&&r.$async===!0?e.return(Zfe.default.data):(e.assign((0,qfe._)`${n}.errors`,null),e.return(!0))}Pu.topBoolOrEmptySchema=Ffe;function Vfe(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),J9(t)):r.var(e,!0)}Pu.boolOrEmptySchema=Vfe;function J9(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,Mfe.reportError)(i,Lfe,void 0,e)}});var tz=O(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.getRules=Tu.isJSONType=void 0;var Wfe=["string","number","integer","boolean","null","object","array"],Bfe=new Set(Wfe);function Kfe(t){return typeof t=="string"&&Bfe.has(t)}Tu.isJSONType=Kfe;function Hfe(){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:{}}}Tu.getRules=Hfe});var rz=O(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.shouldUseRule=bo.shouldUseGroup=bo.schemaHasRulesForType=void 0;function Gfe({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&eV(t,n)}bo.schemaHasRulesForType=Gfe;function eV(t,e){return e.rules.some(r=>tV(t,r))}bo.shouldUseGroup=eV;function tV(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))}bo.shouldUseRule=tV});var hf=O(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.reportTypeError=Vr.checkDataTypes=Vr.checkDataType=Vr.coerceAndCheckDataType=Vr.getJSONTypes=Vr.getSchemaTypes=Vr.DataType=void 0;var Qfe=tz(),Yfe=rz(),Jfe=mf(),Qe=ot(),rV=_t(),zu;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(zu||(Vr.DataType=zu={}));function Xfe(t){let e=nV(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}Vr.getSchemaTypes=Xfe;function nV(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Qfe.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Vr.getJSONTypes=nV;function eme(t,e){let{gen:r,data:n,opts:i}=t,a=tme(e,i.coerceTypes),o=e.length>0&&!(a.length===0&&e.length===1&&(0,Yfe.schemaHasRulesForType)(t,e[0]));if(o){let s=iz(e,n,i.strictNumbers,zu.Wrong);r.if(s,()=>{a.length?rme(t,e,a):az(t)})}return o}Vr.coerceAndCheckDataType=eme;var iV=new Set(["string","number","integer","boolean","null"]);function tme(t,e){return e?t.filter(r=>iV.has(r)||e==="array"&&r==="array"):[]}function rme(t,e,r){let{gen:n,data:i,opts:a}=t,o=n.let("dataType",(0,Qe._)`typeof ${i}`),s=n.let("coerced",(0,Qe._)`undefined`);a.coerceTypes==="array"&&n.if((0,Qe._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Qe._)`${i}[0]`).assign(o,(0,Qe._)`typeof ${i}`).if(iz(e,i,a.strictNumbers),()=>n.assign(s,i))),n.if((0,Qe._)`${s} !== undefined`);for(let u of r)(iV.has(u)||u==="array"&&a.coerceTypes==="array")&&c(u);n.else(),az(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._)`${o} == "number" || ${o} == "boolean"`).assign(s,(0,Qe._)`"" + ${i}`).elseIf((0,Qe._)`${i} === null`).assign(s,(0,Qe._)`""`);return;case"number":n.elseIf((0,Qe._)`${o} == "boolean" || ${i} === null
241
+ || (${o} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Qe._)`+${i}`);return;case"integer":n.elseIf((0,Qe._)`${o} === "boolean" || ${i} === null
242
+ || (${o} === "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._)`${o} === "string" || ${o} === "number"
243
+ || ${o} === "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 nz(t,e,r,n=zu.Correct){let i=n===zu.Correct?Qe.operators.EQ:Qe.operators.NEQ,a;switch(t){case"null":return(0,Qe._)`${e} ${i} null`;case"array":a=(0,Qe._)`Array.isArray(${e})`;break;case"object":a=(0,Qe._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=o((0,Qe._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=o();break;default:return(0,Qe._)`typeof ${e} ${i} ${t}`}return n===zu.Correct?a:(0,Qe.not)(a);function o(s=Qe.nil){return(0,Qe.and)((0,Qe._)`typeof ${e} == "number"`,s,r?(0,Qe._)`isFinite(${e})`:Qe.nil)}}Vr.checkDataType=nz;function iz(t,e,r,n){if(t.length===1)return nz(t[0],e,r,n);let i,a=(0,rV.toHash)(t);if(a.array&&a.object){let o=(0,Qe._)`typeof ${e} != "object"`;i=a.null?o:(0,Qe._)`!${e} || ${o}`,delete a.null,delete a.array,delete a.object}else i=Qe.nil;a.number&&delete a.integer;for(let o in a)i=(0,Qe.and)(i,nz(o,e,r,n));return i}Vr.checkDataTypes=iz;var ime={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Qe._)`{type: ${t}}`:(0,Qe._)`{type: ${e}}`};function az(t){let e=ame(t);(0,Jfe.reportError)(e,ime)}Vr.reportTypeError=az;function ame(t){let{gen:e,data:r,schema:n}=t,i=(0,rV.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var oV=O(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});Ey.assignDefaults=void 0;var Ou=ot(),ome=_t();function sme(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)aV(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,a)=>aV(t,a,i.default))}Ey.assignDefaults=sme;function aV(t,e,r){let{gen:n,compositeRule:i,data:a,opts:o}=t;if(r===void 0)return;let s=(0,Ou._)`${a}${(0,Ou.getProperty)(e)}`;if(i){(0,ome.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,Ou._)`${s} === undefined`;o.useDefaults==="empty"&&(c=(0,Ou._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,Ou._)`${s} = ${(0,Ou.stringify)(r)}`)}});var mi=O(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;var Yt=ot(),oz=_t(),xo=Ra(),cme=_t();function ume(t,e){let{gen:r,data:n,it:i}=t;r.if(cz(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Yt._)`${e}`},!0),t.error()})}Ct.checkReportMissingProp=ume;function lme({gen:t,data:e,it:{opts:r}},n,i){return(0,Yt.or)(...n.map(a=>(0,Yt.and)(cz(t,e,a,r.ownProperties),(0,Yt._)`${i} = ${a}`)))}Ct.checkMissingProp=lme;function dme(t,e){t.setParams({missingProperty:e},!0),t.error()}Ct.reportMissingProp=dme;function sV(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Yt._)`Object.prototype.hasOwnProperty`})}Ct.hasPropFunc=sV;function sz(t,e,r){return(0,Yt._)`${sV(t)}.call(${e}, ${r})`}Ct.isOwnProperty=sz;function pme(t,e,r,n){let i=(0,Yt._)`${e}${(0,Yt.getProperty)(r)} !== undefined`;return n?(0,Yt._)`${i} && ${sz(t,e,r)}`:i}Ct.propertyInData=pme;function cz(t,e,r,n){let i=(0,Yt._)`${e}${(0,Yt.getProperty)(r)} === undefined`;return n?(0,Yt.or)(i,(0,Yt.not)(sz(t,e,r))):i}Ct.noPropertyInData=cz;function cV(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Ct.allSchemaProperties=cV;function fme(t,e){return cV(e).filter(r=>!(0,oz.alwaysValidSchema)(t,e[r]))}Ct.schemaProperties=fme;function mme({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:o},s,c,u){let l=u?(0,Yt._)`${t}, ${e}, ${n}${i}`:e,d=[[xo.default.instancePath,(0,Yt.strConcat)(xo.default.instancePath,a)],[xo.default.parentData,o.parentData],[xo.default.parentDataProperty,o.parentDataProperty],[xo.default.rootData,xo.default.rootData]];o.opts.dynamicRef&&d.push([xo.default.dynamicAnchors,xo.default.dynamicAnchors]);let f=(0,Yt._)`${l}, ${r.object(...d)}`;return c!==Yt.nil?(0,Yt._)`${s}.call(${c}, ${f})`:(0,Yt._)`${s}(${f})`}Ct.callValidateCode=mme;var hme=(0,Yt._)`new RegExp`;function gme({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,a=i(r,n);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Yt._)`${i.code==="new RegExp"?hme:(0,cme.useFunc)(t,i)}(${r}, ${n})`})}Ct.usePattern=gme;function vme(t){let{gen:e,data:r,keyword:n,it:i}=t,a=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return o(()=>e.assign(s,!1)),s}return e.var(a,!0),o(()=>e.break()),a;function o(s){let c=e.const("len",(0,Yt._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:oz.Type.Num},a),e.if((0,Yt.not)(a),s)})}}Ct.validateArray=vme;function yme(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,oz.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=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(o,(0,Yt._)`${o} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,Yt.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}Ct.validateUnion=yme});var dV=O(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.validateKeywordUsage=ra.validSchemaType=ra.funcKeywordCode=ra.macroKeywordCode=void 0;var dn=ot(),Ts=Ra(),_me=mi(),bme=mf();function xme(t,e){let{gen:r,keyword:n,schema:i,parentSchema:a,it:o}=t,s=e.macro.call(o.self,i,a,o),c=lV(r,n,s);o.opts.validateSchema!==!1&&o.self.validateSchema(s,!0);let u=r.name("valid");t.subschema({schema:s,schemaPath:dn.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}ra.macroKeywordCode=xme;function wme(t,e){var r;let{gen:n,keyword:i,schema:a,parentSchema:o,$data:s,it:c}=t;Sme(c,e);let u=!s&&e.compile?e.compile.call(c.self,a,o,c):e.validate,l=lV(n,i,u),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)v(),e.modifying&&uV(t),g(()=>t.error());else{let h=e.async?p():m();e.modifying&&uV(t),g(()=>kme(t,h))}}function p(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,dn._)`await `),b=>n.assign(d,!1).if((0,dn._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,dn._)`${b}.errors`),()=>n.throw(b))),h}function m(){let h=(0,dn._)`${l}.errors`;return n.assign(h,null),v(dn.nil),h}function v(h=e.async?(0,dn._)`await `:dn.nil){let b=c.opts.passContext?Ts.default.this:Ts.default.self,y=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,dn._)`${h}${(0,_me.callValidateCode)(t,l,b,y)}`,e.modifying)}function g(h){var b;n.if((0,dn.not)((b=e.valid)!==null&&b!==void 0?b:d),h)}}ra.funcKeywordCode=wme;function uV(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,dn._)`${n.parentData}[${n.parentDataProperty}]`))}function kme(t,e){let{gen:r}=t;r.if((0,dn._)`Array.isArray(${e})`,()=>{r.assign(Ts.default.vErrors,(0,dn._)`${Ts.default.vErrors} === null ? ${e} : ${Ts.default.vErrors}.concat(${e})`).assign(Ts.default.errors,(0,dn._)`${Ts.default.vErrors}.length`),(0,bme.extendErrors)(t)},()=>t.error())}function Sme({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function lV(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,dn.stringify)(r)})}function $me(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")}ra.validSchemaType=$me;function Ime({schema:t,opts:e,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${a}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[a])){let c=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}ra.validateKeywordUsage=Ime});var fV=O(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.extendSubschemaMode=wo.extendSubschemaData=wo.getSubschema=void 0;var na=ot(),pV=_t();function Eme(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:o}){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,na._)`${t.schemaPath}${(0,na.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,na._)`${t.schemaPath}${(0,na.getProperty)(e)}${(0,na.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,pV.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}wo.getSubschema=Eme;function Pme(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:o}){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,f=s.let("data",(0,na._)`${e.data}${(0,na.getProperty)(r)}`,!0);c(f),t.errorPath=(0,na.str)`${u}${(0,pV.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,na._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(i!==void 0){let u=i instanceof na.Name?i:s.let("data",i,!0);c(u),o!==void 0&&(t.propertyName=o)}a&&(t.dataTypes=a);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]}}wo.extendSubschemaData=Pme;function Tme(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}wo.extendSubschemaMode=Tme});var gf=O((hMe,mV)=>{"use strict";mV.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,a;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(a=Object.keys(e),n=a.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;i--!==0;){var o=a[i];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}});var gV=O((gMe,hV)=>{"use strict";var ko=hV.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(){};Py(e,n,i,t,"",t)};ko.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ko.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ko.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ko.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 Py(t,e,r,n,i,a,o,s,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,a,o,s,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in ko.arrayKeywords)for(var f=0;f<d.length;f++)Py(t,e,r,d[f],i+"/"+l+"/"+f,a,i,l,n,f)}else if(l in ko.propsKeywords){if(d&&typeof d=="object")for(var p in d)Py(t,e,r,d[p],i+"/"+l+"/"+zme(p),a,i,l,n,p)}else(l in ko.keywords||t.allKeys&&!(l in ko.skipKeywords))&&Py(t,e,r,d,i+"/"+l,a,i,l,n)}r(n,i,a,o,s,c,u)}}function zme(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var vf=O($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.getSchemaRefs=$n.resolveUrl=$n.normalizeId=$n._getFullPath=$n.getFullPath=$n.inlineRef=void 0;var Ome=_t(),jme=gf(),Nme=gV(),Rme=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Cme(t,e=!0){return typeof t=="boolean"?!0:e===!0?!uz(t):e?vV(t)<=e:!1}$n.inlineRef=Cme;var Ame=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function uz(t){for(let e in t){if(Ame.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(uz)||typeof r=="object"&&uz(r))return!0}return!1}function vV(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Rme.has(r)&&(typeof t[r]=="object"&&(0,Ome.eachItem)(t[r],n=>e+=vV(n)),e===1/0))return 1/0}return e}function yV(t,e="",r){r!==!1&&(e=ju(e));let n=t.parse(e);return _V(t,n)}$n.getFullPath=yV;function _V(t,e){return t.serialize(e).split("#")[0]+"#"}$n._getFullPath=_V;var Ume=/#\/?$/;function ju(t){return t?t.replace(Ume,""):""}$n.normalizeId=ju;function Dme(t,e,r){return r=ju(r),t.resolve(e,r)}$n.resolveUrl=Dme;var Mme=/^[a-z_][-a-z0-9._]*$/i;function qme(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=ju(t[r]||e),a={"":i},o=yV(n,i,!1),s={},c=new Set;return Nme(t,{allKeys:!0},(d,f,p,m)=>{if(m===void 0)return;let v=o+f,g=a[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),a[f]=g;function h(y){let _=this.opts.uriResolver.resolve;if(y=ju(g?_(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 b(y){if(typeof y=="string"){if(!Mme.test(y))throw new Error(`invalid anchor "${y}"`);h.call(this,`#${y}`)}}}),s;function u(d,f,p){if(f!==void 0&&!jme(d,f))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}$n.getSchemaRefs=qme});var bf=O(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.getData=So.KeywordCxt=So.validateFunctionCode=void 0;var SV=X9(),bV=hf(),dz=rz(),Ty=hf(),Zme=oV(),_f=dV(),lz=fV(),$e=ot(),De=Ra(),Lme=vf(),Ca=_t(),yf=mf();function Fme(t){if(EV(t)&&(PV(t),IV(t))){Bme(t);return}$V(t,()=>(0,SV.topBoolOrEmptySchema)(t))}So.validateFunctionCode=Fme;function $V({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},a){i.code.es5?t.func(e,(0,$e._)`${De.default.data}, ${De.default.valCxt}`,n.$async,()=>{t.code((0,$e._)`"use strict"; ${xV(r,i)}`),Wme(t,i),t.code(a)}):t.func(e,(0,$e._)`${De.default.data}, ${Vme(i)}`,n.$async,()=>t.code(xV(r,i)).code(a))}function Vme(t){return(0,$e._)`{${De.default.instancePath}="", ${De.default.parentData}, ${De.default.parentDataProperty}, ${De.default.rootData}=${De.default.data}${t.dynamicRef?(0,$e._)`, ${De.default.dynamicAnchors}={}`:$e.nil}}={}`}function Wme(t,e){t.if(De.default.valCxt,()=>{t.var(De.default.instancePath,(0,$e._)`${De.default.valCxt}.${De.default.instancePath}`),t.var(De.default.parentData,(0,$e._)`${De.default.valCxt}.${De.default.parentData}`),t.var(De.default.parentDataProperty,(0,$e._)`${De.default.valCxt}.${De.default.parentDataProperty}`),t.var(De.default.rootData,(0,$e._)`${De.default.valCxt}.${De.default.rootData}`),e.dynamicRef&&t.var(De.default.dynamicAnchors,(0,$e._)`${De.default.valCxt}.${De.default.dynamicAnchors}`)},()=>{t.var(De.default.instancePath,(0,$e._)`""`),t.var(De.default.parentData,(0,$e._)`undefined`),t.var(De.default.parentDataProperty,(0,$e._)`undefined`),t.var(De.default.rootData,De.default.data),e.dynamicRef&&t.var(De.default.dynamicAnchors,(0,$e._)`{}`)})}function Bme(t){let{schema:e,opts:r,gen:n}=t;$V(t,()=>{r.$comment&&e.$comment&&zV(t),Yme(t),n.let(De.default.vErrors,null),n.let(De.default.errors,0),r.unevaluated&&Kme(t),TV(t),ehe(t)})}function Kme(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 xV(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 Hme(t,e){if(EV(t)&&(PV(t),IV(t))){Gme(t,e);return}(0,SV.boolOrEmptySchema)(t,e)}function IV({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 EV(t){return typeof t.schema!="boolean"}function Gme(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&zV(t),Jme(t),Xme(t);let a=n.const("_errs",De.default.errors);TV(t,a),n.var(e,(0,$e._)`${a} === ${De.default.errors}`)}function PV(t){(0,Ca.checkUnknownRules)(t),Qme(t)}function TV(t,e){if(t.opts.jtd)return wV(t,[],!1,e);let r=(0,bV.getSchemaTypes)(t.schema),n=(0,bV.coerceAndCheckDataType)(t,r);wV(t,r,!n,e)}function Qme(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Ca.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Yme(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Ca.checkStrictMode)(t,"default is ignored in the schema root")}function Jme(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Lme.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Xme(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function zV({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let a=r.$comment;if(i.$comment===!0)t.code((0,$e._)`${De.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){let o=(0,$e.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,$e._)`${De.default.self}.opts.$comment(${a}, ${o}, ${s}.schema)`)}}function ehe(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=t;r.$async?e.if((0,$e._)`${De.default.errors} === 0`,()=>e.return(De.default.data),()=>e.throw((0,$e._)`new ${i}(${De.default.vErrors})`)):(e.assign((0,$e._)`${n}.errors`,De.default.vErrors),a.unevaluated&&the(t),e.return((0,$e._)`${De.default.errors} === 0`))}function the({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 wV(t,e,r,n){let{gen:i,schema:a,data:o,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(a.$ref&&(c.ignoreKeywordsWithRef||!(0,Ca.schemaHasRulesButRef)(a,l))){i.block(()=>jV(t,"$ref",l.all.$ref.definition));return}c.jtd||rhe(t,e),i.block(()=>{for(let f of l.rules)d(f);d(l.post)});function d(f){(0,dz.shouldUseGroup)(a,f)&&(f.type?(i.if((0,Ty.checkDataType)(f.type,o,c.strictNumbers)),kV(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,Ty.reportTypeError)(t)),i.endIf()):kV(t,f),s||i.if((0,$e._)`${De.default.errors} === ${n||0}`))}}function kV(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Zme.assignDefaults)(t,e.type),r.block(()=>{for(let a of e.rules)(0,dz.shouldUseRule)(n,a)&&jV(t,a.keyword,a.definition,e.type)})}function rhe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(nhe(t,e),t.opts.allowUnionTypes||ihe(t,e),ahe(t,t.dataTypes))}function nhe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{OV(t.dataTypes,r)||pz(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),she(t,e)}}function ihe(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&pz(t,"use allowUnionTypes to allow union type keyword")}function ahe(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,dz.shouldUseRule)(t.schema,i)){let{type:a}=i.definition;a.length&&!a.some(o=>ohe(e,o))&&pz(t,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function ohe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function OV(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function she(t,e){let r=[];for(let n of t.dataTypes)OV(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function pz(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Ca.checkStrictMode)(t,e,t.opts.strictTypes)}var zy=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,Ca.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",NV(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",De.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?yf.reportExtraError:yf.reportError)(this,this.def.error,r)}$dataError(){(0,yf.reportError)(this,this.def.$dataError||yf.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,yf.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:a,def:o}=this;n.if((0,$e.or)((0,$e._)`${i} === undefined`,r)),e!==$e.nil&&n.assign(e,!0),(a.length||o.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:a}=this;return(0,$e.or)(o(),s());function o(){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,Ty.checkDataTypes)(c,r,a.opts.strictNumbers,Ty.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,lz.getSubschema)(this.it,e);(0,lz.extendSubschemaData)(n,this.it,e),(0,lz.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return Hme(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Ca.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Ca.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}};So.KeywordCxt=zy;function jV(t,e,r,n){let i=new zy(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 che=/^\/(?:[^~]|~0|~1)*$/,uhe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function NV(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,a;if(t==="")return De.default.rootData;if(t[0]==="/"){if(!che.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,a=De.default.rootData}else{let u=uhe.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(a=r[e-l],!i)return a}let o=a,s=i.split("/");for(let u of s)u&&(a=(0,$e._)`${a}${(0,$e.getProperty)((0,Ca.unescapeJsonPointer)(u))}`,o=(0,$e._)`${o} && ${a}`);return o;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}So.getData=NV});var Oy=O(mz=>{"use strict";Object.defineProperty(mz,"__esModule",{value:!0});var fz=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};mz.default=fz});var xf=O(vz=>{"use strict";Object.defineProperty(vz,"__esModule",{value:!0});var hz=vf(),gz=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,hz.resolveUrl)(e,r,n),this.missingSchema=(0,hz.normalizeId)((0,hz.getFullPath)(e,this.missingRef))}};vz.default=gz});var Ny=O(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.resolveSchema=hi.getCompilingSchema=hi.resolveRef=hi.compileSchema=hi.SchemaEnv=void 0;var Mi=ot(),lhe=Oy(),zs=Ra(),qi=vf(),RV=_t(),dhe=bf(),Nu=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,qi.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};hi.SchemaEnv=Nu;function _z(t){let e=CV.call(this,t);if(e)return e;let r=(0,qi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,o=new Mi.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a}),s;t.$async&&(s=o.scopeValue("Error",{ref:lhe.default,code:(0,Mi._)`require("ajv/dist/runtime/validation_error").default`}));let c=o.scopeName("validate");t.validateName=c;let u={gen:o,allErrors:this.opts.allErrors,data:zs.default.data,parentData:zs.default.parentData,parentDataProperty:zs.default.parentDataProperty,dataNames:[zs.default.data],dataPathArr:[Mi.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Mi.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Mi.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Mi._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,dhe.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);let d=o.toString();l=`${o.scopeRefs(zs.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let p=new Function(`${zs.default.self}`,`${zs.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){let{props:m,items:v}=u;p.evaluated={props:m instanceof Mi.Name?void 0:m,items:v instanceof Mi.Name?void 0:v,dynamicProps:m instanceof Mi.Name,dynamicItems:v instanceof Mi.Name},p.source&&(p.source.evaluated=(0,Mi.stringify)(p.evaluated))}return t.validate=p,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)}}hi.compileSchema=_z;function phe(t,e,r){var n;r=(0,qi.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let a=hhe.call(this,t,r);if(a===void 0){let o=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;o&&(a=new Nu({schema:o,schemaId:s,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=fhe.call(this,a)}hi.resolveRef=phe;function fhe(t){return(0,qi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:_z.call(this,t)}function CV(t){for(let e of this._compilations)if(mhe(e,t))return e}hi.getCompilingSchema=CV;function mhe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function hhe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||jy.call(this,t,e)}function jy(t,e){let r=this.opts.uriResolver.parse(e),n=(0,qi._getFullPath)(this.opts.uriResolver,r),i=(0,qi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return yz.call(this,r,t);let a=(0,qi.normalizeId)(n),o=this.refs[a]||this.schemas[a];if(typeof o=="string"){let s=jy.call(this,t,o);return typeof s?.schema!="object"?void 0:yz.call(this,r,s)}if(typeof o?.schema=="object"){if(o.validate||_z.call(this,o),a===(0,qi.normalizeId)(e)){let{schema:s}=o,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,qi.resolveUrl)(this.opts.uriResolver,i,u)),new Nu({schema:s,schemaId:c,root:t,baseId:i})}return yz.call(this,r,o)}}hi.resolveSchema=jy;var ghe=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function yz(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,RV.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!ghe.has(s)&&u&&(e=(0,qi.resolveUrl)(this.opts.uriResolver,e,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,RV.schemaHasRulesButRef)(r,this.RULES)){let s=(0,qi.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=jy.call(this,n,s)}let{schemaId:o}=this.opts;if(a=a||new Nu({schema:r,schemaId:o,root:n,baseId:e}),a.schema!==a.root.schema)return a}});var AV=O((wMe,vhe)=>{vhe.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 xz=O((kMe,qV)=>{"use strict";var yhe=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),DV=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 bz(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 _he=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function UV(t){return t.length=0,!0}function bhe(t,e,r){if(t.length){let n=bz(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function xhe(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],a=!1,o=!1,s=bhe;for(let c=0;c<t.length;c++){let u=t[c];if(!(u==="["||u==="]"))if(u===":"){if(a===!0&&(o=!0),!s(i,n,r))break;if(++e>7){r.error=!0;break}c>0&&t[c-1]===":"&&(a=!0),n.push(":");continue}else if(u==="%"){if(!s(i,n,r))break;s=UV}else{i.push(u);continue}}return i.length&&(s===UV?r.zone=i.join(""):o?n.push(i.join("")):n.push(bz(i))),r.address=n.join(""),r}function MV(t){if(whe(t,":")<2)return{host:t,isIPV6:!1};let e=xhe(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 whe(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function khe(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 She(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 $he(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!DV(r)){let n=MV(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}qV.exports={nonSimpleDomain:_he,recomposeAuthority:$he,normalizeComponentEncoding:She,removeDotSegments:khe,isIPv4:DV,isUUID:yhe,normalizeIPv6:MV,stringArrayToHexStripped:bz}});var WV=O((SMe,VV)=>{"use strict";var{isUUID:Ihe}=xz(),Ehe=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Phe=["http","https","ws","wss","urn","urn:uuid"];function The(t){return Phe.indexOf(t)!==-1}function wz(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 ZV(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function LV(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 zhe(t){return t.secure=wz(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function Ohe(t){if((t.port===(wz(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 jhe(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Ehe);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}`,a=kz(i);t.path=void 0,a&&(t=a.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Nhe(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}`,a=kz(i);a&&(t=a.serialize(t,e));let o=t,s=t.nss;return o.path=`${n||e.nid}:${s}`,e.skipEscape=!0,o}function Rhe(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Ihe(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Che(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var FV={scheme:"http",domainHost:!0,parse:ZV,serialize:LV},Ahe={scheme:"https",domainHost:FV.domainHost,parse:ZV,serialize:LV},Ry={scheme:"ws",domainHost:!0,parse:zhe,serialize:Ohe},Uhe={scheme:"wss",domainHost:Ry.domainHost,parse:Ry.parse,serialize:Ry.serialize},Dhe={scheme:"urn",parse:jhe,serialize:Nhe,skipNormalize:!0},Mhe={scheme:"urn:uuid",parse:Rhe,serialize:Che,skipNormalize:!0},Cy={http:FV,https:Ahe,ws:Ry,wss:Uhe,urn:Dhe,"urn:uuid":Mhe};Object.setPrototypeOf(Cy,null);function kz(t){return t&&(Cy[t]||Cy[t.toLowerCase()])||void 0}VV.exports={wsIsSecure:wz,SCHEMES:Cy,isValidSchemeName:The,getSchemeHandler:kz}});var $z=O(($Me,Uy)=>{"use strict";var{normalizeIPv6:qhe,removeDotSegments:wf,recomposeAuthority:Zhe,normalizeComponentEncoding:Ay,isIPv4:Lhe,nonSimpleDomain:Fhe}=xz(),{SCHEMES:Vhe,getSchemeHandler:BV}=WV();function Whe(t,e){return typeof t=="string"?t=ia(Aa(t,e),e):typeof t=="object"&&(t=Aa(ia(t,e),e)),t}function Bhe(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=KV(Aa(t,n),Aa(e,n),n,!0);return n.skipEscape=!0,ia(i,n)}function KV(t,e,r,n){let i={};return n||(t=Aa(ia(t,r),r),e=Aa(ia(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=wf(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=wf(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=wf(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=wf(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 Khe(t,e,r){return typeof t=="string"?(t=unescape(t),t=ia(Ay(Aa(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=ia(Ay(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=ia(Ay(Aa(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=ia(Ay(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function ia(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=[],a=BV(n.scheme||r.scheme);a&&a.serialize&&a.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 o=Zhe(r);if(o!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(o),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let s=r.path;!n.absolutePath&&(!a||!a.absolutePath)&&(s=wf(s)),o===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 Hhe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Aa(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 a=t.match(Hhe);if(a){if(n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5]),n.host)if(Lhe(n.host)===!1){let c=qhe(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 o=BV(r.scheme||n.scheme);if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&n.host&&(r.domainHost||o&&o.domainHost)&&i===!1&&Fhe(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}(!o||o&&!o.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)))),o&&o.parse&&o.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Sz={SCHEMES:Vhe,normalize:Whe,resolve:Bhe,resolveComponent:KV,equal:Khe,serialize:ia,parse:Aa};Uy.exports=Sz;Uy.exports.default=Sz;Uy.exports.fastUri=Sz});var GV=O(Iz=>{"use strict";Object.defineProperty(Iz,"__esModule",{value:!0});var HV=$z();HV.code='require("ajv/dist/runtime/uri").default';Iz.default=HV});var nW=O(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.CodeGen=Nr.Name=Nr.nil=Nr.stringify=Nr.str=Nr._=Nr.KeywordCxt=void 0;var Ghe=bf();Object.defineProperty(Nr,"KeywordCxt",{enumerable:!0,get:function(){return Ghe.KeywordCxt}});var Ru=ot();Object.defineProperty(Nr,"_",{enumerable:!0,get:function(){return Ru._}});Object.defineProperty(Nr,"str",{enumerable:!0,get:function(){return Ru.str}});Object.defineProperty(Nr,"stringify",{enumerable:!0,get:function(){return Ru.stringify}});Object.defineProperty(Nr,"nil",{enumerable:!0,get:function(){return Ru.nil}});Object.defineProperty(Nr,"Name",{enumerable:!0,get:function(){return Ru.Name}});Object.defineProperty(Nr,"CodeGen",{enumerable:!0,get:function(){return Ru.CodeGen}});var Qhe=Oy(),eW=xf(),Yhe=tz(),kf=Ny(),Jhe=ot(),Sf=vf(),Dy=hf(),Pz=_t(),QV=AV(),Xhe=GV(),tW=(t,e)=>new RegExp(t,e);tW.code="new RegExp";var ege=["removeAdditional","useDefaults","coerceTypes"],tge=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),rge={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.'},YV=200;function ige(t){var e,r,n,i,a,o,s,c,u,l,d,f,p,m,v,g,h,b,y,_,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,L=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:tW,R=(i=t.uriResolver)!==null&&i!==void 0?i:Xhe.default;return{strictSchema:(o=(a=t.strictSchema)!==null&&a!==void 0?a:A)!==null&&o!==void 0?o:!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:(f=(d=t.strictTuples)!==null&&d!==void 0?d:A)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=t.strictRequired)!==null&&p!==void 0?p:A)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:M,regExp:L}:{optimize:M,regExp:L},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:YV,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:YV,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(b=t.messages)!==null&&b!==void 0?b:!0,inlineRefs:(y=t.inlineRefs)!==null&&y!==void 0?y:!0,schemaId:(_=t.schemaId)!==null&&_!==void 0?_:"$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 $f=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...ige(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new Jhe.ValueScope({scope:{},prefixes:tge,es5:r,lines:n}),this.logger=lge(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Yhe.getRules)(),JV.call(this,rge,e,"NOT SUPPORTED"),JV.call(this,nge,e,"DEPRECATED","warn"),this._metaOpts=cge.call(this),e.formats&&oge.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&sge.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),age.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=QV;n==="id"&&(i={...QV},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 a.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||o.call(this,f)}async function a(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function o(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof eW.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),o.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 a.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 o of e)this.addSchema(o,void 0,n,i);return this}let a;if(typeof e=="object"){let{schemaId:o}=this.opts;if(a=e[o],a!==void 0&&typeof a!="string")throw new Error(`schema ${o} must be string`)}return r=(0,Sf.normalizeId)(r||a),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 a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return i}getSchema(e){let r;for(;typeof(r=XV.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new kf.SchemaEnv({schema:{},schemaId:n});if(r=kf.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=XV.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,Sf.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(pge.call(this,n,r),!r)return(0,Pz.eachItem)(n,a=>Ez.call(this,a)),this;mge.call(this,r);let i={...r,type:(0,Dy.getJSONTypes)(r.type),schemaType:(0,Dy.getJSONTypes)(r.schemaType)};return(0,Pz.eachItem)(n,i.type.length===0?a=>Ez.call(this,a,i):a=>i.type.forEach(o=>Ez.call(this,a,i,o))),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(a=>a.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,a)=>i+r+a)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let a=i.split("/").slice(1),o=e;for(let s of a)o=o[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=o[s];u&&l&&(o[s]=rW(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,a=this.opts.addUsedSchema){let o,{schemaId:s}=this.opts;if(typeof e=="object")o=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,Sf.normalizeId)(o||n);let u=Sf.getSchemaRefs.call(this,e,n);return c=new kf.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),a&&!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):kf.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{kf.compileSchema.call(this,e)}finally{this.opts=r}}};$f.ValidationError=Qhe.default;$f.MissingRefError=eW.default;Nr.default=$f;function JV(t,e,r,n="error"){for(let i in t){let a=i;a in e&&this.logger[n](`${r}: option ${i}. ${t[a]}`)}}function XV(t){return t=(0,Sf.normalizeId)(t),this.schemas[t]||this.refs[t]}function age(){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 oge(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function sge(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 cge(){let t={...this.opts};for(let e of ege)delete t[e];return t}var uge={log(){},warn(){},error(){}};function lge(t){if(t===!1)return uge;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 dge=/^[a-z_$][a-z0-9_$:-]*$/i;function pge(t,e){let{RULES:r}=this;if((0,Pz.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!dge.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 Ez(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,o=i?a.post:a.rules.find(({type:c})=>c===r);if(o||(o={type:r,rules:[]},a.rules.push(o)),a.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,Dy.getJSONTypes)(e.type),schemaType:(0,Dy.getJSONTypes)(e.schemaType)}};e.before?fge.call(this,o,s,e.before):o.rules.push(s),a.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 mge(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=rW(e)),t.validateSchema=this.compile(e,!0))}var hge={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function rW(t){return{anyOf:[t,hge]}}});var iW=O(Tz=>{"use strict";Object.defineProperty(Tz,"__esModule",{value:!0});var gge={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Tz.default=gge});var cW=O(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.callRef=Os.getValidate=void 0;var vge=xf(),aW=mi(),In=ot(),Cu=Ra(),oW=Ny(),My=_t(),yge={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:a,validateName:o,opts:s,self:c}=n,{root:u}=a;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=oW.resolveRef.call(c,u,i,r);if(l===void 0)throw new vge.default(n.opts.uriResolver,i,r);if(l instanceof oW.SchemaEnv)return f(l);return p(l);function d(){if(a===u)return qy(t,o,a,a.$async);let m=e.scopeValue("root",{ref:u});return qy(t,(0,In._)`${m}.validate`,u,u.$async)}function f(m){let v=sW(t,m);qy(t,v,m,m.$async)}function p(m){let v=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,In.stringify)(m)}:{ref:m}),g=e.name("valid"),h=t.subschema({schema:m,dataTypes:[],schemaPath:In.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(h),t.ok(g)}}};function sW(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,In._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Os.getValidate=sW;function qy(t,e,r,n){let{gen:i,it:a}=t,{allErrors:o,schemaEnv:s,opts:c}=a,u=c.passContext?Cu.default.this:In.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,In._)`await ${(0,aW.callValidateCode)(t,e,u)}`),p(e),o||i.assign(m,!0)},v=>{i.if((0,In._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),f(v),o||i.assign(m,!1)}),t.ok(m)}function d(){t.result((0,aW.callValidateCode)(t,e,u),()=>p(e),()=>f(e))}function f(m){let v=(0,In._)`${m}.errors`;i.assign(Cu.default.vErrors,(0,In._)`${Cu.default.vErrors} === null ? ${v} : ${Cu.default.vErrors}.concat(${v})`),i.assign(Cu.default.errors,(0,In._)`${Cu.default.vErrors}.length`)}function p(m){var v;if(!a.opts.unevaluated)return;let g=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(a.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(a.props=My.mergeEvaluated.props(i,g.props,a.props));else{let h=i.var("props",(0,In._)`${m}.evaluated.props`);a.props=My.mergeEvaluated.props(i,h,a.props,In.Name)}if(a.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(a.items=My.mergeEvaluated.items(i,g.items,a.items));else{let h=i.var("items",(0,In._)`${m}.evaluated.items`);a.items=My.mergeEvaluated.items(i,h,a.items,In.Name)}}}Os.callRef=qy;Os.default=yge});var uW=O(zz=>{"use strict";Object.defineProperty(zz,"__esModule",{value:!0});var _ge=iW(),bge=cW(),xge=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",_ge.default,bge.default];zz.default=xge});var lW=O(Oz=>{"use strict";Object.defineProperty(Oz,"__esModule",{value:!0});var Zy=ot(),$o=Zy.operators,Ly={maximum:{okStr:"<=",ok:$o.LTE,fail:$o.GT},minimum:{okStr:">=",ok:$o.GTE,fail:$o.LT},exclusiveMaximum:{okStr:"<",ok:$o.LT,fail:$o.GTE},exclusiveMinimum:{okStr:">",ok:$o.GT,fail:$o.LTE}},wge={message:({keyword:t,schemaCode:e})=>(0,Zy.str)`must be ${Ly[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Zy._)`{comparison: ${Ly[t].okStr}, limit: ${e}}`},kge={keyword:Object.keys(Ly),type:"number",schemaType:"number",$data:!0,error:wge,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Zy._)`${r} ${Ly[e].fail} ${n} || isNaN(${r})`)}};Oz.default=kge});var dW=O(jz=>{"use strict";Object.defineProperty(jz,"__esModule",{value:!0});var If=ot(),Sge={message:({schemaCode:t})=>(0,If.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,If._)`{multipleOf: ${t}}`},$ge={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Sge,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,a=i.opts.multipleOfPrecision,o=e.let("res"),s=a?(0,If._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,If._)`${o} !== parseInt(${o})`;t.fail$data((0,If._)`(${n} === 0 || (${o} = ${r}/${n}, ${s}))`)}};jz.default=$ge});var fW=O(Nz=>{"use strict";Object.defineProperty(Nz,"__esModule",{value:!0});function pW(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}Nz.default=pW;pW.code='require("ajv/dist/runtime/ucs2length").default'});var mW=O(Rz=>{"use strict";Object.defineProperty(Rz,"__esModule",{value:!0});var js=ot(),Ige=_t(),Ege=fW(),Pge={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,js.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,js._)`{limit: ${t}}`},Tge={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Pge,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,a=e==="maxLength"?js.operators.GT:js.operators.LT,o=i.opts.unicode===!1?(0,js._)`${r}.length`:(0,js._)`${(0,Ige.useFunc)(t.gen,Ege.default)}(${r})`;t.fail$data((0,js._)`${o} ${a} ${n}`)}};Rz.default=Tge});var hW=O(Cz=>{"use strict";Object.defineProperty(Cz,"__esModule",{value:!0});var zge=mi(),Oge=_t(),Au=ot(),jge={message:({schemaCode:t})=>(0,Au.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Au._)`{pattern: ${t}}`},Nge={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:jge,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t,s=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=o.opts.code,u=c.code==="new RegExp"?(0,Au._)`new RegExp`:(0,Oge.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,Au._)`${u}(${a}, ${s}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,Au._)`!${l}`)}else{let c=(0,zge.usePattern)(t,i);t.fail$data((0,Au._)`!${c}.test(${r})`)}}};Cz.default=Nge});var gW=O(Az=>{"use strict";Object.defineProperty(Az,"__esModule",{value:!0});var Ef=ot(),Rge={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Ef.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Ef._)`{limit: ${t}}`},Cge={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Rge,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Ef.operators.GT:Ef.operators.LT;t.fail$data((0,Ef._)`Object.keys(${r}).length ${i} ${n}`)}};Az.default=Cge});var vW=O(Uz=>{"use strict";Object.defineProperty(Uz,"__esModule",{value:!0});var Pf=mi(),Tf=ot(),Age=_t(),Uge={message:({params:{missingProperty:t}})=>(0,Tf.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Tf._)`{missingProperty: ${t}}`},Dge={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Uge,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:a,it:o}=t,{opts:s}=o;if(!a&&r.length===0)return;let c=r.length>=s.loopRequired;if(o.allErrors?u():l(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:m}=t.it;for(let v of r)if(p?.[v]===void 0&&!m.has(v)){let g=o.schemaEnv.baseId+o.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,Age.checkStrictMode)(o,h,o.opts.strictRequired)}}function u(){if(c||a)t.block$data(Tf.nil,d);else for(let p of r)(0,Pf.checkReportMissingProp)(t,p)}function l(){let p=e.let("missing");if(c||a){let m=e.let("valid",!0);t.block$data(m,()=>f(p,m)),t.ok(m)}else e.if((0,Pf.checkMissingProp)(t,r,p)),(0,Pf.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,Pf.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,m){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(m,(0,Pf.propertyInData)(e,i,p,s.ownProperties)),e.if((0,Tf.not)(m),()=>{t.error(),e.break()})},Tf.nil)}}};Uz.default=Dge});var yW=O(Dz=>{"use strict";Object.defineProperty(Dz,"__esModule",{value:!0});var zf=ot(),Mge={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,zf.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,zf._)`{limit: ${t}}`},qge={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Mge,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?zf.operators.GT:zf.operators.LT;t.fail$data((0,zf._)`${r}.length ${i} ${n}`)}};Dz.default=qge});var Fy=O(Mz=>{"use strict";Object.defineProperty(Mz,"__esModule",{value:!0});var _W=gf();_W.code='require("ajv/dist/runtime/equal").default';Mz.default=_W});var bW=O(Zz=>{"use strict";Object.defineProperty(Zz,"__esModule",{value:!0});var qz=hf(),Rr=ot(),Zge=_t(),Lge=Fy(),Fge={message:({params:{i:t,j:e}})=>(0,Rr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Rr._)`{i: ${t}, j: ${e}}`},Vge={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Fge,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:a,schemaCode:o,it:s}=t;if(!n&&!i)return;let c=e.let("valid"),u=a.items?(0,qz.getSchemaTypes)(a.items):[];t.block$data(c,l,(0,Rr._)`${o} === false`),t.ok(c);function l(){let m=e.let("i",(0,Rr._)`${r}.length`),v=e.let("j");t.setParams({i:m,j:v}),e.assign(c,!0),e.if((0,Rr._)`${m} > 1`,()=>(d()?f:p)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function f(m,v){let g=e.name("item"),h=(0,qz.checkDataTypes)(u,g,s.opts.strictNumbers,qz.DataType.Wrong),b=e.const("indices",(0,Rr._)`{}`);e.for((0,Rr._)`;${m}--;`,()=>{e.let(g,(0,Rr._)`${r}[${m}]`),e.if(h,(0,Rr._)`continue`),u.length>1&&e.if((0,Rr._)`typeof ${g} == "string"`,(0,Rr._)`${g} += "_"`),e.if((0,Rr._)`typeof ${b}[${g}] == "number"`,()=>{e.assign(v,(0,Rr._)`${b}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Rr._)`${b}[${g}] = ${m}`)})}function p(m,v){let g=(0,Zge.useFunc)(e,Lge.default),h=e.name("outer");e.label(h).for((0,Rr._)`;${m}--;`,()=>e.for((0,Rr._)`${v} = ${m}; ${v}--;`,()=>e.if((0,Rr._)`${g}(${r}[${m}], ${r}[${v}])`,()=>{t.error(),e.assign(c,!1).break(h)})))}}};Zz.default=Vge});var xW=O(Fz=>{"use strict";Object.defineProperty(Fz,"__esModule",{value:!0});var Lz=ot(),Wge=_t(),Bge=Fy(),Kge={message:"must be equal to constant",params:({schemaCode:t})=>(0,Lz._)`{allowedValue: ${t}}`},Hge={keyword:"const",$data:!0,error:Kge,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:a}=t;n||a&&typeof a=="object"?t.fail$data((0,Lz._)`!${(0,Wge.useFunc)(e,Bge.default)}(${r}, ${i})`):t.fail((0,Lz._)`${a} !== ${r}`)}};Fz.default=Hge});var wW=O(Vz=>{"use strict";Object.defineProperty(Vz,"__esModule",{value:!0});var Of=ot(),Gge=_t(),Qge=Fy(),Yge={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Of._)`{allowedValues: ${t}}`},Jge={keyword:"enum",schemaType:"array",$data:!0,error:Yge,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=o.opts.loopEnum,c,u=()=>c??(c=(0,Gge.useFunc)(e,Qge.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 p=e.const("vSchema",a);l=(0,Of.or)(...i.map((m,v)=>f(p,v)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",a,p=>e.if((0,Of._)`${u()}(${r}, ${p})`,()=>e.assign(l,!0).break()))}function f(p,m){let v=i[m];return typeof v=="object"&&v!==null?(0,Of._)`${u()}(${r}, ${p}[${m}])`:(0,Of._)`${r} === ${v}`}}};Vz.default=Jge});var kW=O(Wz=>{"use strict";Object.defineProperty(Wz,"__esModule",{value:!0});var Xge=lW(),eve=dW(),tve=mW(),rve=hW(),nve=gW(),ive=vW(),ave=yW(),ove=bW(),sve=xW(),cve=wW(),uve=[Xge.default,eve.default,tve.default,rve.default,nve.default,ive.default,ave.default,ove.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},sve.default,cve.default];Wz.default=uve});var Kz=O(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.validateAdditionalItems=void 0;var Ns=ot(),Bz=_t(),lve={message:({params:{len:t}})=>(0,Ns.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ns._)`{limit: ${t}}`},dve={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:lve,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Bz.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}SW(t,n)}};function SW(t,e){let{gen:r,schema:n,data:i,keyword:a,it:o}=t;o.items=!0;let s=r.const("len",(0,Ns._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Ns._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,Bz.alwaysValidSchema)(o,n)){let u=r.var("valid",(0,Ns._)`${s} <= ${e.length}`);r.if((0,Ns.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,l=>{t.subschema({keyword:a,dataProp:l,dataPropType:Bz.Type.Num},u),o.allErrors||r.if((0,Ns.not)(u),()=>r.break())})}}jf.validateAdditionalItems=SW;jf.default=dve});var Hz=O(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.validateTuple=void 0;var $W=ot(),Vy=_t(),pve=mi(),fve={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return IW(t,"additionalItems",e);r.items=!0,!(0,Vy.alwaysValidSchema)(r,e)&&t.ok((0,pve.validateArray)(t))}};function IW(t,e,r=t.schema){let{gen:n,parentSchema:i,data:a,keyword:o,it:s}=t;l(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Vy.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),u=n.const("len",(0,$W._)`${a}.length`);r.forEach((d,f)=>{(0,Vy.alwaysValidSchema)(s,d)||(n.if((0,$W._)`${u} > ${f}`,()=>t.subschema({keyword:o,schemaProp:f,dataProp:f},c)),t.ok(c))});function l(d){let{opts:f,errSchemaPath:p}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let g=`"${o}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Vy.checkStrictMode)(s,g,f.strictTuples)}}}Nf.validateTuple=IW;Nf.default=fve});var EW=O(Gz=>{"use strict";Object.defineProperty(Gz,"__esModule",{value:!0});var mve=Hz(),hve={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,mve.validateTuple)(t,"items")};Gz.default=hve});var TW=O(Qz=>{"use strict";Object.defineProperty(Qz,"__esModule",{value:!0});var PW=ot(),gve=_t(),vve=mi(),yve=Kz(),_ve={message:({params:{len:t}})=>(0,PW.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,PW._)`{limit: ${t}}`},bve={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:_ve,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,gve.alwaysValidSchema)(n,e)&&(i?(0,yve.validateAdditionalItems)(t,i):t.ok((0,vve.validateArray)(t)))}};Qz.default=bve});var zW=O(Yz=>{"use strict";Object.defineProperty(Yz,"__esModule",{value:!0});var gi=ot(),Wy=_t(),xve={message:({params:{min:t,max:e}})=>e===void 0?(0,gi.str)`must contain at least ${t} valid item(s)`:(0,gi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,gi._)`{minContains: ${t}}`:(0,gi._)`{minContains: ${t}, maxContains: ${e}}`},wve={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:xve,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:a}=t,o,s,{minContains:c,maxContains:u}=n;a.opts.next?(o=c===void 0?1:c,s=u):o=1;let l=e.const("len",(0,gi._)`${i}.length`);if(t.setParams({min:o,max:s}),s===void 0&&o===0){(0,Wy.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&o>s){(0,Wy.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Wy.alwaysValidSchema)(a,r)){let v=(0,gi._)`${l} >= ${o}`;s!==void 0&&(v=(0,gi._)`${v} && ${l} <= ${s}`),t.pass(v);return}a.items=!0;let d=e.name("valid");s===void 0&&o===1?p(d,()=>e.if(d,()=>e.break())):o===0?(e.let(d,!0),s!==void 0&&e.if((0,gi._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),g=e.let("count",0);p(v,()=>e.if(v,()=>m(g)))}function p(v,g){e.forRange("i",0,l,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:Wy.Type.Num,compositeRule:!0},v),g()})}function m(v){e.code((0,gi._)`${v}++`),s===void 0?e.if((0,gi._)`${v} >= ${o}`,()=>e.assign(d,!0).break()):(e.if((0,gi._)`${v} > ${s}`,()=>e.assign(d,!1).break()),o===1?e.assign(d,!0):e.if((0,gi._)`${v} >= ${o}`,()=>e.assign(d,!0)))}}};Yz.default=wve});var NW=O(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.validateSchemaDeps=aa.validatePropertyDeps=aa.error=void 0;var Jz=ot(),kve=_t(),Rf=mi();aa.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Jz.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Jz._)`{property: ${t},
244
+ missingProperty: ${n},
245
+ depsCount: ${e},
246
+ deps: ${r}}`};var Sve={keyword:"dependencies",type:"object",schemaType:"object",error:aa.error,code(t){let[e,r]=$ve(t);OW(t,e),jW(t,r)}};function $ve({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 OW(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let a=r.let("missing");for(let o in e){let s=e[o];if(s.length===0)continue;let c=(0,Rf.propertyInData)(r,n,o,i.opts.ownProperties);t.setParams({property:o,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of s)(0,Rf.checkReportMissingProp)(t,u)}):(r.if((0,Jz._)`${c} && (${(0,Rf.checkMissingProp)(t,s,a)})`),(0,Rf.reportMissingProp)(t,a),r.else())}}aa.validatePropertyDeps=OW;function jW(t,e=t.schema){let{gen:r,data:n,keyword:i,it:a}=t,o=r.name("valid");for(let s in e)(0,kve.alwaysValidSchema)(a,e[s])||(r.if((0,Rf.propertyInData)(r,n,s,a.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:s},o);t.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),t.ok(o))}aa.validateSchemaDeps=jW;aa.default=Sve});var CW=O(Xz=>{"use strict";Object.defineProperty(Xz,"__esModule",{value:!0});var RW=ot(),Ive=_t(),Eve={message:"property name must be valid",params:({params:t})=>(0,RW._)`{propertyName: ${t.propertyName}}`},Pve={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Eve,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,Ive.alwaysValidSchema)(i,r))return;let a=e.name("valid");e.forIn("key",n,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},a),e.if((0,RW.not)(a),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(a)}};Xz.default=Pve});var tO=O(eO=>{"use strict";Object.defineProperty(eO,"__esModule",{value:!0});var By=mi(),Zi=ot(),Tve=Ra(),Ky=_t(),zve={message:"must NOT have additional properties",params:({params:t})=>(0,Zi._)`{additionalProperty: ${t.additionalProperty}}`},Ove={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:zve,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:a,it:o}=t;if(!a)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,Ky.alwaysValidSchema)(o,r))return;let u=(0,By.allSchemaProperties)(n.properties),l=(0,By.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Zi._)`${a} === ${Tve.default.errors}`);function d(){e.forIn("key",i,g=>{!u.length&&!l.length?m(g):e.if(f(g),()=>m(g))})}function f(g){let h;if(u.length>8){let b=(0,Ky.schemaRefOrVal)(o,n.properties,"properties");h=(0,By.isOwnProperty)(e,b,g)}else u.length?h=(0,Zi.or)(...u.map(b=>(0,Zi._)`${g} === ${b}`)):h=Zi.nil;return l.length&&(h=(0,Zi.or)(h,...l.map(b=>(0,Zi._)`${(0,By.usePattern)(t,b)}.test(${g})`))),(0,Zi.not)(h)}function p(g){e.code((0,Zi._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,Ky.alwaysValidSchema)(o,r)){let h=e.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),e.if((0,Zi.not)(h),()=>{t.reset(),p(g)})):(v(g,h),s||e.if((0,Zi.not)(h),()=>e.break()))}}function v(g,h,b){let y={keyword:"additionalProperties",dataProp:g,dataPropType:Ky.Type.Str};b===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(y,h)}}};eO.default=Ove});var DW=O(nO=>{"use strict";Object.defineProperty(nO,"__esModule",{value:!0});var jve=bf(),AW=mi(),rO=_t(),UW=tO(),Nve={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&UW.default.code(new jve.KeywordCxt(a,UW.default,"additionalProperties"));let o=(0,AW.allSchemaProperties)(r);for(let d of o)a.definedProperties.add(d);a.opts.unevaluated&&o.length&&a.props!==!0&&(a.props=rO.mergeEvaluated.props(e,(0,rO.toHash)(o),a.props));let s=o.filter(d=>!(0,rO.alwaysValidSchema)(a,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,AW.propertyInData)(e,i,d,a.opts.ownProperties)),l(d),a.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return a.opts.useDefaults&&!a.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};nO.default=Nve});var LW=O(iO=>{"use strict";Object.defineProperty(iO,"__esModule",{value:!0});var MW=mi(),Hy=ot(),qW=_t(),ZW=_t(),Rve={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:a}=t,{opts:o}=a,s=(0,MW.allSchemaProperties)(r),c=s.filter(v=>(0,qW.alwaysValidSchema)(a,r[v]));if(s.length===0||c.length===s.length&&(!a.opts.unevaluated||a.props===!0))return;let u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,l=e.name("valid");a.props!==!0&&!(a.props instanceof Hy.Name)&&(a.props=(0,ZW.evaluatedPropsToName)(e,a.props));let{props:d}=a;f();function f(){for(let v of s)u&&p(v),a.allErrors?m(v):(e.var(l,!0),m(v),e.if(l))}function p(v){for(let g in u)new RegExp(v).test(g)&&(0,qW.checkStrictMode)(a,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){e.forIn("key",n,g=>{e.if((0,Hy._)`${(0,MW.usePattern)(t,v)}.test(${g})`,()=>{let h=c.includes(v);h||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:ZW.Type.Str},l),a.opts.unevaluated&&d!==!0?e.assign((0,Hy._)`${d}[${g}]`,!0):!h&&!a.allErrors&&e.if((0,Hy.not)(l),()=>e.break())})})}}};iO.default=Rve});var FW=O(aO=>{"use strict";Object.defineProperty(aO,"__esModule",{value:!0});var Cve=_t(),Ave={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,Cve.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"}};aO.default=Ave});var VW=O(oO=>{"use strict";Object.defineProperty(oO,"__esModule",{value:!0});var Uve=mi(),Dve={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Uve.validateUnion,error:{message:"must match a schema in anyOf"}};oO.default=Dve});var WW=O(sO=>{"use strict";Object.defineProperty(sO,"__esModule",{value:!0});var Gy=ot(),Mve=_t(),qve={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Gy._)`{passingSchemas: ${t.passing}}`},Zve={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:qve,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 a=r,o=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(o,()=>t.reset(),()=>t.error(!0));function u(){a.forEach((l,d)=>{let f;(0,Mve.alwaysValidSchema)(i,l)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,Gy._)`${c} && ${o}`).assign(o,!1).assign(s,(0,Gy._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(s,d),f&&t.mergeEvaluated(f,Gy.Name)})})}}};sO.default=Zve});var BW=O(cO=>{"use strict";Object.defineProperty(cO,"__esModule",{value:!0});var Lve=_t(),Fve={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((a,o)=>{if((0,Lve.alwaysValidSchema)(n,a))return;let s=t.subschema({keyword:"allOf",schemaProp:o},i);t.ok(i),t.mergeEvaluated(s)})}};cO.default=Fve});var GW=O(uO=>{"use strict";Object.defineProperty(uO,"__esModule",{value:!0});var Qy=ot(),HW=_t(),Vve={message:({params:t})=>(0,Qy.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Qy._)`{failingKeyword: ${t.ifClause}}`},Wve={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Vve,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,HW.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=KW(n,"then"),a=KW(n,"else");if(!i&&!a)return;let o=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&a){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,Qy.not)(s),u("else"));t.pass(o,()=>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 f=t.subschema({keyword:l},s);e.assign(o,s),t.mergeValidEvaluated(f,o),d?e.assign(d,(0,Qy._)`${l}`):t.setParams({ifClause:l})}}}};function KW(t,e){let r=t.schema[e];return r!==void 0&&!(0,HW.alwaysValidSchema)(t,r)}uO.default=Wve});var QW=O(lO=>{"use strict";Object.defineProperty(lO,"__esModule",{value:!0});var Bve=_t(),Kve={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Bve.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};lO.default=Kve});var YW=O(dO=>{"use strict";Object.defineProperty(dO,"__esModule",{value:!0});var Hve=Kz(),Gve=EW(),Qve=Hz(),Yve=TW(),Jve=zW(),Xve=NW(),eye=CW(),tye=tO(),rye=DW(),nye=LW(),iye=FW(),aye=VW(),oye=WW(),sye=BW(),cye=GW(),uye=QW();function lye(t=!1){let e=[iye.default,aye.default,oye.default,sye.default,cye.default,uye.default,eye.default,tye.default,Xve.default,rye.default,nye.default];return t?e.push(Gve.default,Yve.default):e.push(Hve.default,Qve.default),e.push(Jve.default),e}dO.default=lye});var JW=O(pO=>{"use strict";Object.defineProperty(pO,"__esModule",{value:!0});var dr=ot(),dye={message:({schemaCode:t})=>(0,dr.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,dr._)`{format: ${t}}`},pye={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:dye,code(t,e){let{gen:r,data:n,$data:i,schema:a,schemaCode:o,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;i?f():p();function f(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,dr._)`${m}[${o}]`),g=r.let("fType"),h=r.let("format");r.if((0,dr._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>r.assign(g,(0,dr._)`${v}.type || "string"`).assign(h,(0,dr._)`${v}.validate`),()=>r.assign(g,(0,dr._)`"string"`).assign(h,v)),t.fail$data((0,dr.or)(b(),y()));function b(){return c.strictSchema===!1?dr.nil:(0,dr._)`${o} && !${h}`}function y(){let _=l.$async?(0,dr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,dr._)`${h}(${n})`,x=(0,dr._)`(typeof ${h} == "function" ? ${_} : ${h}.test(${n}))`;return(0,dr._)`${h} && ${h} !== true && ${g} === ${e} && !${x}`}}function p(){let m=d.formats[a];if(!m){b();return}if(m===!0)return;let[v,g,h]=y(m);v===e&&t.pass(_());function b(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${a}" ignored in schema at path "${u}"`}}function y(x){let w=x instanceof RegExp?(0,dr.regexpCode)(x):c.code.formats?(0,dr._)`${c.code.formats}${(0,dr.getProperty)(a)}`:void 0,k=r.scopeValue("formats",{key:a,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,dr._)`${k}.validate`]:["string",x,k]}function _(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,dr._)`await ${h}(${n})`}return typeof g=="function"?(0,dr._)`${h}(${n})`:(0,dr._)`${h}.test(${n})`}}}};pO.default=pye});var XW=O(fO=>{"use strict";Object.defineProperty(fO,"__esModule",{value:!0});var fye=JW(),mye=[fye.default];fO.default=mye});var e3=O(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});Uu.contentVocabulary=Uu.metadataVocabulary=void 0;Uu.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Uu.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var r3=O(mO=>{"use strict";Object.defineProperty(mO,"__esModule",{value:!0});var hye=uW(),gye=kW(),vye=YW(),yye=XW(),t3=e3(),_ye=[hye.default,gye.default,(0,vye.default)(),yye.default,t3.metadataVocabulary,t3.contentVocabulary];mO.default=_ye});var i3=O(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});Yy.DiscrError=void 0;var n3;(function(t){t.Tag="tag",t.Mapping="mapping"})(n3||(Yy.DiscrError=n3={}))});var o3=O(gO=>{"use strict";Object.defineProperty(gO,"__esModule",{value:!0});var Du=ot(),hO=i3(),a3=Ny(),bye=xf(),xye=_t(),wye={message:({params:{discrError:t,tagName:e}})=>t===hO.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Du._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},kye={keyword:"discriminator",type:"object",schemaType:"object",error:wye,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:a}=t,{oneOf:o}=i;if(!a.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(!o)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,Du._)`${r}${(0,Du.getProperty)(s)}`);e.if((0,Du._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:hO.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let p=f();e.if(!1);for(let m in p)e.elseIf((0,Du._)`${u} === ${m}`),e.assign(c,d(p[m]));e.else(),t.error(!1,{discrError:hO.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(p){let m=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:p},m);return t.mergeEvaluated(v,Du.Name),m}function f(){var p;let m={},v=h(i),g=!0;for(let _=0;_<o.length;_++){let x=o[_];if(x?.$ref&&!(0,xye.schemaHasRulesButRef)(x,a.self.RULES)){let k=x.$ref;if(x=a3.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,k),x instanceof a3.SchemaEnv&&(x=x.schema),x===void 0)throw new bye.default(a.opts.uriResolver,a.baseId,k)}let w=(p=x?.properties)===null||p===void 0?void 0:p[s];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(v||h(x)),b(w,_)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function h({required:_}){return Array.isArray(_)&&_.includes(s)}function b(_,x){if(_.const)y(_.const,x);else if(_.enum)for(let w of _.enum)y(w,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function y(_,x){if(typeof _!="string"||_ in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[_]=x}}}};gO.default=kye});var s3=O((f2e,Sye)=>{Sye.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 u3=O((Jt,vO)=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.MissingRefError=Jt.ValidationError=Jt.CodeGen=Jt.Name=Jt.nil=Jt.stringify=Jt.str=Jt._=Jt.KeywordCxt=Jt.Ajv=void 0;var $ye=nW(),Iye=r3(),Eye=o3(),c3=s3(),Pye=["/properties"],Jy="http://json-schema.org/draft-07/schema",Mu=class extends $ye.default{_addVocabularies(){super._addVocabularies(),Iye.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Eye.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(c3,Pye):c3;this.addMetaSchema(e,Jy,!1),this.refs["http://json-schema.org/schema"]=Jy}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Jy)?Jy:void 0)}};Jt.Ajv=Mu;vO.exports=Jt=Mu;vO.exports.Ajv=Mu;Object.defineProperty(Jt,"__esModule",{value:!0});Jt.default=Mu;var Tye=bf();Object.defineProperty(Jt,"KeywordCxt",{enumerable:!0,get:function(){return Tye.KeywordCxt}});var qu=ot();Object.defineProperty(Jt,"_",{enumerable:!0,get:function(){return qu._}});Object.defineProperty(Jt,"str",{enumerable:!0,get:function(){return qu.str}});Object.defineProperty(Jt,"stringify",{enumerable:!0,get:function(){return qu.stringify}});Object.defineProperty(Jt,"nil",{enumerable:!0,get:function(){return qu.nil}});Object.defineProperty(Jt,"Name",{enumerable:!0,get:function(){return qu.Name}});Object.defineProperty(Jt,"CodeGen",{enumerable:!0,get:function(){return qu.CodeGen}});var zye=Oy();Object.defineProperty(Jt,"ValidationError",{enumerable:!0,get:function(){return zye.default}});var Oye=xf();Object.defineProperty(Jt,"MissingRefError",{enumerable:!0,get:function(){return Oye.default}})});var v3=O(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.formatNames=sa.fastFormats=sa.fullFormats=void 0;function oa(t,e){return{validate:t,compare:e}}sa.fullFormats={date:oa(f3,xO),time:oa(_O(!0),wO),"date-time":oa(l3(!0),h3),"iso-time":oa(_O(),m3),"iso-date-time":oa(l3(),g3),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Uye,"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:Vye,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:Dye,int32:{type:"number",validate:Zye},int64:{type:"number",validate:Lye},float:{type:"number",validate:p3},double:{type:"number",validate:p3},password:!0,binary:!0};sa.fastFormats={...sa.fullFormats,date:oa(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,xO),time:oa(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,wO),"date-time":oa(/^\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,h3),"iso-time":oa(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m3),"iso-date-time":oa(/^\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,g3),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};sa.formatNames=Object.keys(sa.fullFormats);function jye(t){return t%4===0&&(t%100!==0||t%400===0)}var Nye=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Rye=[0,31,28,31,30,31,30,31,31,30,31,30,31];function f3(t){let e=Nye.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&&jye(r)?29:Rye[n])}function xO(t,e){if(t&&e)return t>e?1:t<e?-1:0}var yO=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function _O(t){return function(r){let n=yO.exec(r);if(!n)return!1;let i=+n[1],a=+n[2],o=+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&&a<=59&&o<60)return!0;let d=a-l*c,f=i-u*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&o<61}}function wO(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 m3(t,e){if(!(t&&e))return;let r=yO.exec(t),n=yO.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 bO=/t|\s/i;function l3(t){let e=_O(t);return function(n){let i=n.split(bO);return i.length===2&&f3(i[0])&&e(i[1])}}function h3(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function g3(t,e){if(!(t&&e))return;let[r,n]=t.split(bO),[i,a]=e.split(bO),o=xO(r,i);if(o!==void 0)return o||wO(n,a)}var Cye=/\/|:/,Aye=/^(?:[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 Uye(t){return Cye.test(t)&&Aye.test(t)}var d3=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Dye(t){return d3.lastIndex=0,d3.test(t)}var Mye=-(2**31),qye=2**31-1;function Zye(t){return Number.isInteger(t)&&t<=qye&&t>=Mye}function Lye(t){return Number.isInteger(t)}function p3(){return!0}var Fye=/[^\\]\\Z/;function Vye(t){if(Fye.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Uf=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 Cf=class{};It._CodeOrName=Cf;It.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Rs=class extends Cf{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=Rs;var vi=class extends Cf{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 Rs&&(r[n.str]=(r[n.str]||0)+1),r),{})}};It._Code=vi;It.nil=new vi("");function y3(t,...e){let r=[t[0]],n=0;for(;n<e.length;)SO(r,e[n]),r.push(t[++n]);return new vi(r)}It._=y3;var kO=new vi("+");function _3(t,...e){let r=[Af(t[0])],n=0;for(;n<e.length;)r.push(kO),SO(r,e[n]),r.push(kO,Af(t[++n]));return Wye(r),new vi(r)}It.str=_3;function SO(t,e){e instanceof vi?t.push(...e._items):e instanceof Rs?t.push(e):t.push(Hye(e))}It.addCodeArg=SO;function Wye(t){let e=1;for(;e<t.length-1;){if(t[e]===kO){let r=Bye(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function Bye(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Rs||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 Rs))return`"${t}${e.slice(1)}`}function Kye(t,e){return e.emptyStr()?t:t.emptyStr()?e:_3`${t}${e}`}It.strConcat=Kye;function Hye(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Af(Array.isArray(t)?t.join(","):t)}function Gye(t){return new vi(Af(t))}It.stringify=Gye;function Af(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}It.safeStringify=Af;function Qye(t){return typeof t=="string"&&It.IDENTIFIER.test(t)?new vi(`.${t}`):y3`[${t}]`}It.getProperty=Qye;function Yye(t){if(typeof t=="string"&&It.IDENTIFIER.test(t))return new vi(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}It.getEsmExportName=Yye;function Jye(t){return new vi(t.toString())}It.regexpCode=Jye});var EO=O(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ValueScope=Pn.ValueScopeName=Pn.Scope=Pn.varKinds=Pn.UsedValueState=void 0;var En=Uf(),$O=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Xy;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Xy||(Pn.UsedValueState=Xy={}));Pn.varKinds={const:new En.Name("const"),let:new En.Name("let"),var:new En.Name("var")};var e_=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof En.Name?e:this.name(e)}name(e){return new En.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}}};Pn.Scope=e_;var t_=class extends En.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,En._)`.${new En.Name(r)}[${n}]`}};Pn.ValueScopeName=t_;var Xye=(0,En._)`\n`,IO=class extends e_{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Xye:En.nil}}get(){return this._scope}name(e){return new t_(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:a}=i,o=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[a];if(s){let l=s.get(o);if(l)return l}else s=this._values[a]=new Map;s.set(o,i);let c=this._scope[a]||(this._scope[a]=[]),u=c.length;return c[u]=r.ref,i.setValue(r,{property:a,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,En._)`${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 a=En.nil;for(let o in e){let s=e[o];if(!s)continue;let c=n[o]=n[o]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,Xy.Started);let l=r(u);if(l){let d=this.opts.es5?Pn.varKinds.var:Pn.varKinds.const;a=(0,En._)`${a}${d} ${u} = ${l};${this.opts._n}`}else if(l=i?.(u))a=(0,En._)`${a}${l}${this.opts._n}`;else throw new $O(u);c.set(u,Xy.Completed)})}return a}};Pn.ValueScope=IO});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=Uf(),Li=EO(),Io=Uf();Object.defineProperty(it,"_",{enumerable:!0,get:function(){return Io._}});Object.defineProperty(it,"str",{enumerable:!0,get:function(){return Io.str}});Object.defineProperty(it,"strConcat",{enumerable:!0,get:function(){return Io.strConcat}});Object.defineProperty(it,"nil",{enumerable:!0,get:function(){return Io.nil}});Object.defineProperty(it,"getProperty",{enumerable:!0,get:function(){return Io.getProperty}});Object.defineProperty(it,"stringify",{enumerable:!0,get:function(){return Io.stringify}});Object.defineProperty(it,"regexpCode",{enumerable:!0,get:function(){return Io.regexpCode}});Object.defineProperty(it,"Name",{enumerable:!0,get:function(){return Io.Name}});var a_=EO();Object.defineProperty(it,"Scope",{enumerable:!0,get:function(){return a_.Scope}});Object.defineProperty(it,"ValueScope",{enumerable:!0,get:function(){return a_.ValueScope}});Object.defineProperty(it,"ValueScopeName",{enumerable:!0,get:function(){return a_.ValueScopeName}});Object.defineProperty(it,"varKinds",{enumerable:!0,get:function(){return a_.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 Ua=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},PO=class extends Ua{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Li.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=Lu(this.rhs,e,r)),this}get names(){return this.rhs instanceof vt._CodeOrName?this.rhs.names:{}}},r_=class extends Ua{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=Lu(this.rhs,e,r),this}get names(){let e=this.lhs instanceof vt.Name?{}:{...this.lhs.names};return i_(e,this.rhs)}},TO=class extends r_{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},zO=class extends Ua{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},OO=class extends Ua{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},jO=class extends Ua{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},NO=class extends Ua{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=Lu(this.code,e,r),this}get names(){return this.code instanceof vt._CodeOrName?this.code.names:{}}},Df=class extends Ua{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 a=n[i];a.optimizeNames(e,r)||(e_e(e,a.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Us(e,r.names),{})}},Da=class extends Df{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},RO=class extends Df{},Zu=class extends Da{};Zu.kind="else";var Cs=class t extends Da{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 Zu(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(b3(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=Lu(this.condition,e,r),this}get names(){let e=super.names;return i_(e,this.condition),this.else&&Us(e,this.else.names),e}};Cs.kind="if";var As=class extends Da{};As.kind="for";var CO=class extends As{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=Lu(this.iteration,e,r),this}get names(){return Us(super.names,this.iteration.names)}},AO=class extends As{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Li.varKinds.var:this.varKind,{name:n,from:i,to:a}=this;return`for(${r} ${n}=${i}; ${n}<${a}; ${n}++)`+super.render(e)}get names(){let e=i_(super.names,this.from);return i_(e,this.to)}},n_=class extends As{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=Lu(this.iterable,e,r),this}get names(){return Us(super.names,this.iterable.names)}},Mf=class extends Da{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)}};Mf.kind="func";var qf=class extends Df{render(e){return"return "+super.render(e)}};qf.kind="return";var UO=class extends Da{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&&Us(e,this.catch.names),this.finally&&Us(e,this.finally.names),e}},Zf=class extends Da{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Zf.kind="catch";var Lf=class extends Da{render(e){return"finally"+super.render(e)}};Lf.kind="finally";var DO=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
247
+ `:""},this._extScope=e,this._scope=new Li.Scope({parent:e}),this._nodes=[new RO]}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 a=this._scope.toName(r);return n!==void 0&&i&&(this._constants[a.str]=n),this._leafNode(new PO(e,a,n)),a}const(e,r,n){return this._def(Li.varKinds.const,e,r,n)}let(e,r,n){return this._def(Li.varKinds.let,e,r,n)}var(e,r,n){return this._def(Li.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new r_(e,r,n))}add(e,r){return this._leafNode(new TO(e,it.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==vt.nil&&this._leafNode(new NO(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 Cs(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 Cs(e))}else(){return this._elseNode(new Zu)}endIf(){return this._endBlockNode(Cs,Zu)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new CO(e),r)}forRange(e,r,n,i,a=this.opts.es5?Li.varKinds.var:Li.varKinds.let){let o=this._scope.toName(e);return this._for(new AO(a,o,r,n),()=>i(o))}forOf(e,r,n,i=Li.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let o=r instanceof vt.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,vt._)`${o}.length`,s=>{this.var(a,(0,vt._)`${o}[${s}]`),n(a)})}return this._for(new n_("of",i,a,r),()=>n(a))}forIn(e,r,n,i=this.opts.es5?Li.varKinds.var:Li.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,vt._)`Object.keys(${r})`,n);let a=this._scope.toName(e);return this._for(new n_("in",i,a,r),()=>n(a))}endFor(){return this._endBlockNode(As)}label(e){return this._leafNode(new zO(e))}break(e){return this._leafNode(new OO(e))}return(e){let r=new qf;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(qf)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new UO;if(this._blockNode(i),this.code(e),r){let a=this.name("e");this._currNode=i.catch=new Zf(a),r(a)}return n&&(this._currNode=i.finally=new Lf,this.code(n)),this._endBlockNode(Zf,Lf)}throw(e){return this._leafNode(new jO(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 Mf(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Mf)}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 Cs))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=DO;function Us(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function i_(t,e){return e instanceof vt._CodeOrName?Us(t,e.names):t}function Lu(t,e,r){if(t instanceof vt.Name)return n(t);if(!i(t))return t;return new vt._Code(t._items.reduce((a,o)=>(o instanceof vt.Name&&(o=n(o)),o instanceof vt._Code?a.push(...o._items):a.push(o),a),[]));function n(a){let o=r[a.str];return o===void 0||e[a.str]!==1?a:(delete e[a.str],o)}function i(a){return a instanceof vt._Code&&a._items.some(o=>o instanceof vt.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function e_e(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function b3(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,vt._)`!${MO(t)}`}it.not=b3;var t_e=x3(it.operators.AND);function r_e(...t){return t.reduce(t_e)}it.and=r_e;var n_e=x3(it.operators.OR);function i_e(...t){return t.reduce(n_e)}it.or=i_e;function x3(t){return(e,r)=>e===vt.nil?r:r===vt.nil?e:(0,vt._)`${MO(e)} ${t} ${MO(r)}`}function MO(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(),a_e=Uf();function o_e(t){let e={};for(let r of t)e[r]=!0;return e}ct.toHash=o_e;function s_e(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(S3(t,e),!$3(e,t.self.RULES.all))}ct.alwaysValidSchema=s_e;function S3(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let a in e)i[a]||P3(t,`unknown keyword: "${a}"`)}ct.checkUnknownRules=S3;function $3(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}ct.schemaHasRules=$3;function c_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=c_e;function u_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=u_e;function l_e(t){return I3(decodeURIComponent(t))}ct.unescapeFragment=l_e;function d_e(t){return encodeURIComponent(ZO(t))}ct.escapeFragment=d_e;function ZO(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}ct.escapeJsonPointer=ZO;function I3(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}ct.unescapeJsonPointer=I3;function p_e(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}ct.eachItem=p_e;function w3({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,a,o,s)=>{let c=o===void 0?a:o instanceof Vt.Name?(a instanceof Vt.Name?t(i,a,o):e(i,a,o),o):a instanceof Vt.Name?(e(i,o,a),a):r(a,o);return s===Vt.Name&&!(c instanceof Vt.Name)?n(i,c):c}}ct.mergeEvaluated={props:w3({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} || {}`),LO(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:E3}),items:w3({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 E3(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Vt._)`{}`);return e!==void 0&&LO(t,r,e),r}ct.evaluatedPropsToName=E3;function LO(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Vt._)`${e}${(0,Vt.getProperty)(n)}`,!0))}ct.setEvaluated=LO;var k3={};function f_e(t,e){return t.scopeValue("func",{ref:e,code:k3[e.code]||(k3[e.code]=new a_e._Code(e.code))})}ct.useFunc=f_e;var qO;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(qO||(ct.Type=qO={}));function m_e(t,e,r){if(t instanceof Vt.Name){let n=e===qO.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():"/"+ZO(t)}ct.getErrorPath=m_e;function P3(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=P3});var Ma=O(FO=>{"use strict";Object.defineProperty(FO,"__esModule",{value:!0});var Wr=Je(),h_e={data:new Wr.Name("data"),valCxt:new Wr.Name("valCxt"),instancePath:new Wr.Name("instancePath"),parentData:new Wr.Name("parentData"),parentDataProperty:new Wr.Name("parentDataProperty"),rootData:new Wr.Name("rootData"),dynamicAnchors:new Wr.Name("dynamicAnchors"),vErrors:new Wr.Name("vErrors"),errors:new Wr.Name("errors"),this:new Wr.Name("this"),self:new Wr.Name("self"),scope:new Wr.Name("scope"),json:new Wr.Name("json"),jsonPos:new Wr.Name("jsonPos"),jsonLen:new Wr.Name("jsonLen"),jsonPart:new Wr.Name("jsonPart")};FO.default=h_e});var Ff=O(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.extendErrors=Br.resetErrorsCount=Br.reportExtraError=Br.reportError=Br.keyword$DataError=Br.keywordError=void 0;var wt=Je(),o_=xt(),pn=Ma();Br.keywordError={message:({keyword:t})=>(0,wt.str)`must pass "${t}" keyword validation`};Br.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 g_e(t,e=Br.keywordError,r,n){let{it:i}=t,{gen:a,compositeRule:o,allErrors:s}=i,c=O3(t,e,r);n??(o||s)?T3(a,c):z3(i,(0,wt._)`[${c}]`)}Br.reportError=g_e;function v_e(t,e=Br.keywordError,r){let{it:n}=t,{gen:i,compositeRule:a,allErrors:o}=n,s=O3(t,e,r);T3(i,s),a||o||z3(n,pn.default.vErrors)}Br.reportExtraError=v_e;function y_e(t,e){t.assign(pn.default.errors,e),t.if((0,wt._)`${pn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,wt._)`${pn.default.vErrors}.length`,e),()=>t.assign(pn.default.vErrors,null)))}Br.resetErrorsCount=y_e;function __e({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",i,pn.default.errors,s=>{t.const(o,(0,wt._)`${pn.default.vErrors}[${s}]`),t.if((0,wt._)`${o}.instancePath === undefined`,()=>t.assign((0,wt._)`${o}.instancePath`,(0,wt.strConcat)(pn.default.instancePath,a.errorPath))),t.assign((0,wt._)`${o}.schemaPath`,(0,wt.str)`${a.errSchemaPath}/${e}`),a.opts.verbose&&(t.assign((0,wt._)`${o}.schema`,r),t.assign((0,wt._)`${o}.data`,n))})}Br.extendErrors=__e;function T3(t,e){let r=t.const("err",e);t.if((0,wt._)`${pn.default.vErrors} === null`,()=>t.assign(pn.default.vErrors,(0,wt._)`[${r}]`),(0,wt._)`${pn.default.vErrors}.push(${r})`),t.code((0,wt._)`${pn.default.errors}++`)}function z3(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 Ds={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 O3(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,wt._)`{}`:b_e(t,e,r)}function b_e(t,e,r={}){let{gen:n,it:i}=t,a=[x_e(i,r),w_e(t,r)];return k_e(t,e,a),n.object(...a)}function x_e({errorPath:t},{instancePath:e}){let r=e?(0,wt.str)`${t}${(0,o_.getErrorPath)(e,o_.Type.Str)}`:t;return[pn.default.instancePath,(0,wt.strConcat)(pn.default.instancePath,r)]}function w_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,o_.getErrorPath)(r,o_.Type.Str)}`),[Ds.schemaPath,i]}function k_e(t,{params:e,message:r},n){let{keyword:i,data:a,schemaValue:o,it:s}=t,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;n.push([Ds.keyword,i],[Ds.params,typeof e=="function"?e(t):e||(0,wt._)`{}`]),c.messages&&n.push([Ds.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([Ds.schema,o],[Ds.parentSchema,(0,wt._)`${l}${d}`],[pn.default.data,a]),u&&n.push([Ds.propertyName,u])}});var N3=O(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.boolOrEmptySchema=Fu.topBoolOrEmptySchema=void 0;var S_e=Ff(),$_e=Je(),I_e=Ma(),E_e={message:"boolean schema is false"};function P_e(t){let{gen:e,schema:r,validateName:n}=t;r===!1?j3(t,!1):typeof r=="object"&&r.$async===!0?e.return(I_e.default.data):(e.assign((0,$_e._)`${n}.errors`,null),e.return(!0))}Fu.topBoolOrEmptySchema=P_e;function T_e(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),j3(t)):r.var(e,!0)}Fu.boolOrEmptySchema=T_e;function j3(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,S_e.reportError)(i,E_e,void 0,e)}});var VO=O(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});Vu.getRules=Vu.isJSONType=void 0;var z_e=["string","number","integer","boolean","null","object","array"],O_e=new Set(z_e);function j_e(t){return typeof t=="string"&&O_e.has(t)}Vu.isJSONType=j_e;function N_e(){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:{}}}Vu.getRules=N_e});var WO=O(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.shouldUseRule=Eo.shouldUseGroup=Eo.schemaHasRulesForType=void 0;function R_e({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&R3(t,n)}Eo.schemaHasRulesForType=R_e;function R3(t,e){return e.rules.some(r=>C3(t,r))}Eo.shouldUseGroup=R3;function C3(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))}Eo.shouldUseRule=C3});var Vf=O(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.reportTypeError=Kr.checkDataTypes=Kr.checkDataType=Kr.coerceAndCheckDataType=Kr.getJSONTypes=Kr.getSchemaTypes=Kr.DataType=void 0;var C_e=VO(),A_e=WO(),U_e=Ff(),Ye=Je(),A3=xt(),Wu;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Wu||(Kr.DataType=Wu={}));function D_e(t){let e=U3(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}Kr.getSchemaTypes=D_e;function U3(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(C_e.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Kr.getJSONTypes=U3;function M_e(t,e){let{gen:r,data:n,opts:i}=t,a=q_e(e,i.coerceTypes),o=e.length>0&&!(a.length===0&&e.length===1&&(0,A_e.schemaHasRulesForType)(t,e[0]));if(o){let s=KO(e,n,i.strictNumbers,Wu.Wrong);r.if(s,()=>{a.length?Z_e(t,e,a):HO(t)})}return o}Kr.coerceAndCheckDataType=M_e;var D3=new Set(["string","number","integer","boolean","null"]);function q_e(t,e){return e?t.filter(r=>D3.has(r)||e==="array"&&r==="array"):[]}function Z_e(t,e,r){let{gen:n,data:i,opts:a}=t,o=n.let("dataType",(0,Ye._)`typeof ${i}`),s=n.let("coerced",(0,Ye._)`undefined`);a.coerceTypes==="array"&&n.if((0,Ye._)`${o} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Ye._)`${i}[0]`).assign(o,(0,Ye._)`typeof ${i}`).if(KO(e,i,a.strictNumbers),()=>n.assign(s,i))),n.if((0,Ye._)`${s} !== undefined`);for(let u of r)(D3.has(u)||u==="array"&&a.coerceTypes==="array")&&c(u);n.else(),HO(t),n.endIf(),n.if((0,Ye._)`${s} !== undefined`,()=>{n.assign(i,s),L_e(t,s)});function c(u){switch(u){case"string":n.elseIf((0,Ye._)`${o} == "number" || ${o} == "boolean"`).assign(s,(0,Ye._)`"" + ${i}`).elseIf((0,Ye._)`${i} === null`).assign(s,(0,Ye._)`""`);return;case"number":n.elseIf((0,Ye._)`${o} == "boolean" || ${i} === null
248
+ || (${o} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Ye._)`+${i}`);return;case"integer":n.elseIf((0,Ye._)`${o} === "boolean" || ${i} === null
249
+ || (${o} === "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._)`${o} === "string" || ${o} === "number"
250
+ || ${o} === "boolean" || ${i} === null`).assign(s,(0,Ye._)`[${i}]`)}}}function L_e({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Ye._)`${e} !== undefined`,()=>t.assign((0,Ye._)`${e}[${r}]`,n))}function BO(t,e,r,n=Wu.Correct){let i=n===Wu.Correct?Ye.operators.EQ:Ye.operators.NEQ,a;switch(t){case"null":return(0,Ye._)`${e} ${i} null`;case"array":a=(0,Ye._)`Array.isArray(${e})`;break;case"object":a=(0,Ye._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=o((0,Ye._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=o();break;default:return(0,Ye._)`typeof ${e} ${i} ${t}`}return n===Wu.Correct?a:(0,Ye.not)(a);function o(s=Ye.nil){return(0,Ye.and)((0,Ye._)`typeof ${e} == "number"`,s,r?(0,Ye._)`isFinite(${e})`:Ye.nil)}}Kr.checkDataType=BO;function KO(t,e,r,n){if(t.length===1)return BO(t[0],e,r,n);let i,a=(0,A3.toHash)(t);if(a.array&&a.object){let o=(0,Ye._)`typeof ${e} != "object"`;i=a.null?o:(0,Ye._)`!${e} || ${o}`,delete a.null,delete a.array,delete a.object}else i=Ye.nil;a.number&&delete a.integer;for(let o in a)i=(0,Ye.and)(i,BO(o,e,r,n));return i}Kr.checkDataTypes=KO;var F_e={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ye._)`{type: ${t}}`:(0,Ye._)`{type: ${e}}`};function HO(t){let e=V_e(t);(0,U_e.reportError)(e,F_e)}Kr.reportTypeError=HO;function V_e(t){let{gen:e,data:r,schema:n}=t,i=(0,A3.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var q3=O(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.assignDefaults=void 0;var Bu=Je(),W_e=xt();function B_e(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)M3(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,a)=>M3(t,a,i.default))}s_.assignDefaults=B_e;function M3(t,e,r){let{gen:n,compositeRule:i,data:a,opts:o}=t;if(r===void 0)return;let s=(0,Bu._)`${a}${(0,Bu.getProperty)(e)}`;if(i){(0,W_e.checkStrictMode)(t,`default is ignored for: ${s}`);return}let c=(0,Bu._)`${s} === undefined`;o.useDefaults==="empty"&&(c=(0,Bu._)`${c} || ${s} === null || ${s} === ""`),n.if(c,(0,Bu._)`${s} = ${(0,Bu.stringify)(r)}`)}});var yi=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 Xt=Je(),GO=xt(),Po=Ma(),K_e=xt();function H_e(t,e){let{gen:r,data:n,it:i}=t;r.if(YO(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Xt._)`${e}`},!0),t.error()})}At.checkReportMissingProp=H_e;function G_e({gen:t,data:e,it:{opts:r}},n,i){return(0,Xt.or)(...n.map(a=>(0,Xt.and)(YO(t,e,a,r.ownProperties),(0,Xt._)`${i} = ${a}`)))}At.checkMissingProp=G_e;function Q_e(t,e){t.setParams({missingProperty:e},!0),t.error()}At.reportMissingProp=Q_e;function Z3(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Xt._)`Object.prototype.hasOwnProperty`})}At.hasPropFunc=Z3;function QO(t,e,r){return(0,Xt._)`${Z3(t)}.call(${e}, ${r})`}At.isOwnProperty=QO;function Y_e(t,e,r,n){let i=(0,Xt._)`${e}${(0,Xt.getProperty)(r)} !== undefined`;return n?(0,Xt._)`${i} && ${QO(t,e,r)}`:i}At.propertyInData=Y_e;function YO(t,e,r,n){let i=(0,Xt._)`${e}${(0,Xt.getProperty)(r)} === undefined`;return n?(0,Xt.or)(i,(0,Xt.not)(QO(t,e,r))):i}At.noPropertyInData=YO;function L3(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}At.allSchemaProperties=L3;function J_e(t,e){return L3(e).filter(r=>!(0,GO.alwaysValidSchema)(t,e[r]))}At.schemaProperties=J_e;function X_e({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:a},it:o},s,c,u){let l=u?(0,Xt._)`${t}, ${e}, ${n}${i}`:e,d=[[Po.default.instancePath,(0,Xt.strConcat)(Po.default.instancePath,a)],[Po.default.parentData,o.parentData],[Po.default.parentDataProperty,o.parentDataProperty],[Po.default.rootData,Po.default.rootData]];o.opts.dynamicRef&&d.push([Po.default.dynamicAnchors,Po.default.dynamicAnchors]);let f=(0,Xt._)`${l}, ${r.object(...d)}`;return c!==Xt.nil?(0,Xt._)`${s}.call(${c}, ${f})`:(0,Xt._)`${s}(${f})`}At.callValidateCode=X_e;var ebe=(0,Xt._)`new RegExp`;function tbe({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,a=i(r,n);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Xt._)`${i.code==="new RegExp"?ebe:(0,K_e.useFunc)(t,i)}(${r}, ${n})`})}At.usePattern=tbe;function rbe(t){let{gen:e,data:r,keyword:n,it:i}=t,a=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return o(()=>e.assign(s,!1)),s}return e.var(a,!0),o(()=>e.break()),a;function o(s){let c=e.const("len",(0,Xt._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:n,dataProp:u,dataPropType:GO.Type.Num},a),e.if((0,Xt.not)(a),s)})}}At.validateArray=rbe;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,GO.alwaysValidSchema)(i,c))&&!i.opts.unevaluated)return;let o=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(o,(0,Xt._)`${o} || ${s}`),t.mergeValidEvaluated(l,s)||e.if((0,Xt.not)(o))})),t.result(o,()=>t.reset(),()=>t.error(!0))}At.validateUnion=nbe});var W3=O(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.validateKeywordUsage=ca.validSchemaType=ca.funcKeywordCode=ca.macroKeywordCode=void 0;var fn=Je(),Ms=Ma(),ibe=yi(),abe=Ff();function obe(t,e){let{gen:r,keyword:n,schema:i,parentSchema:a,it:o}=t,s=e.macro.call(o.self,i,a,o),c=V3(r,n,s);o.opts.validateSchema!==!1&&o.self.validateSchema(s,!0);let u=r.name("valid");t.subschema({schema:s,schemaPath:fn.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),t.pass(u,()=>t.error(!0))}ca.macroKeywordCode=obe;function sbe(t,e){var r;let{gen:n,keyword:i,schema:a,parentSchema:o,$data:s,it:c}=t;ube(c,e);let u=!s&&e.compile?e.compile.call(c.self,a,o,c):e.validate,l=V3(n,i,u),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)v(),e.modifying&&F3(t),g(()=>t.error());else{let h=e.async?p():m();e.modifying&&F3(t),g(()=>cbe(t,h))}}function p(){let h=n.let("ruleErrs",null);return n.try(()=>v((0,fn._)`await `),b=>n.assign(d,!1).if((0,fn._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(h,(0,fn._)`${b}.errors`),()=>n.throw(b))),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 b=c.opts.passContext?Ms.default.this:Ms.default.self,y=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,fn._)`${h}${(0,ibe.callValidateCode)(t,l,b,y)}`,e.modifying)}function g(h){var b;n.if((0,fn.not)((b=e.valid)!==null&&b!==void 0?b:d),h)}}ca.funcKeywordCode=sbe;function F3(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,fn._)`${n.parentData}[${n.parentDataProperty}]`))}function cbe(t,e){let{gen:r}=t;r.if((0,fn._)`Array.isArray(${e})`,()=>{r.assign(Ms.default.vErrors,(0,fn._)`${Ms.default.vErrors} === null ? ${e} : ${Ms.default.vErrors}.concat(${e})`).assign(Ms.default.errors,(0,fn._)`${Ms.default.vErrors}.length`),(0,abe.extendErrors)(t)},()=>t.error())}function ube({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function V3(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 lbe(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")}ca.validSchemaType=lbe;function dbe({schema:t,opts:e,self:r,errSchemaPath:n},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw new Error("ajv implementation error");let o=i.dependencies;if(o?.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${a}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[a])){let c=`keyword "${a}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}ca.validateKeywordUsage=dbe});var K3=O(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.extendSubschemaMode=To.extendSubschemaData=To.getSubschema=void 0;var ua=Je(),B3=xt();function pbe(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:a,topSchemaRef:o}){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,ua._)`${t.schemaPath}${(0,ua.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,ua._)`${t.schemaPath}${(0,ua.getProperty)(e)}${(0,ua.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,B3.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||a===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:o,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}To.getSubschema=pbe;function fbe(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:a,propertyName:o}){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,f=s.let("data",(0,ua._)`${e.data}${(0,ua.getProperty)(r)}`,!0);c(f),t.errorPath=(0,ua.str)`${u}${(0,B3.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,ua._)`${r}`,t.dataPathArr=[...l,t.parentDataProperty]}if(i!==void 0){let u=i instanceof ua.Name?i:s.let("data",i,!0);c(u),o!==void 0&&(t.propertyName=o)}a&&(t.dataTypes=a);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]}}To.extendSubschemaData=fbe;function mbe(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:a}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}To.extendSubschemaMode=mbe});var G3=O((T2e,H3)=>{"use strict";var zo=H3.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(){};c_(e,n,i,t,"",t)};zo.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};zo.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};zo.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};zo.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 c_(t,e,r,n,i,a,o,s,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,a,o,s,c,u);for(var l in n){var d=n[l];if(Array.isArray(d)){if(l in zo.arrayKeywords)for(var f=0;f<d.length;f++)c_(t,e,r,d[f],i+"/"+l+"/"+f,a,i,l,n,f)}else if(l in zo.propsKeywords){if(d&&typeof d=="object")for(var p in d)c_(t,e,r,d[p],i+"/"+l+"/"+hbe(p),a,i,l,n,p)}else(l in zo.keywords||t.allKeys&&!(l in zo.skipKeywords))&&c_(t,e,r,d,i+"/"+l,a,i,l,n)}r(n,i,a,o,s,c,u)}}function hbe(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Wf=O(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.getSchemaRefs=Tn.resolveUrl=Tn.normalizeId=Tn._getFullPath=Tn.getFullPath=Tn.inlineRef=void 0;var gbe=xt(),vbe=gf(),ybe=G3(),_be=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function bbe(t,e=!0){return typeof t=="boolean"?!0:e===!0?!JO(t):e?Q3(t)<=e:!1}Tn.inlineRef=bbe;var xbe=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function JO(t){for(let e in t){if(xbe.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(JO)||typeof r=="object"&&JO(r))return!0}return!1}function Q3(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!_be.has(r)&&(typeof t[r]=="object"&&(0,gbe.eachItem)(t[r],n=>e+=Q3(n)),e===1/0))return 1/0}return e}function Y3(t,e="",r){r!==!1&&(e=Ku(e));let n=t.parse(e);return J3(t,n)}Tn.getFullPath=Y3;function J3(t,e){return t.serialize(e).split("#")[0]+"#"}Tn._getFullPath=J3;var wbe=/#\/?$/;function Ku(t){return t?t.replace(wbe,""):""}Tn.normalizeId=Ku;function kbe(t,e,r){return r=Ku(r),t.resolve(e,r)}Tn.resolveUrl=kbe;var Sbe=/^[a-z_][-a-z0-9._]*$/i;function $be(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Ku(t[r]||e),a={"":i},o=Y3(n,i,!1),s={},c=new Set;return ybe(t,{allKeys:!0},(d,f,p,m)=>{if(m===void 0)return;let v=o+f,g=a[m];typeof d[r]=="string"&&(g=h.call(this,d[r])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),a[f]=g;function h(y){let _=this.opts.uriResolver.resolve;if(y=Ku(g?_(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!==Ku(v)&&(y[0]==="#"?(u(d,s[y],y),s[y]=d):this.refs[y]=v),y}function b(y){if(typeof y=="string"){if(!Sbe.test(y))throw new Error(`invalid anchor "${y}"`);h.call(this,`#${y}`)}}}),s;function u(d,f,p){if(f!==void 0&&!vbe(d,f))throw l(p)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Tn.getSchemaRefs=$be});var Hf=O(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.getData=Oo.KeywordCxt=Oo.validateFunctionCode=void 0;var nB=N3(),X3=Vf(),ej=WO(),u_=Vf(),Ibe=q3(),Kf=W3(),XO=K3(),Ie=Je(),Me=Ma(),Ebe=Wf(),qa=xt(),Bf=Ff();function Pbe(t){if(oB(t)&&(sB(t),aB(t))){Obe(t);return}iB(t,()=>(0,nB.topBoolOrEmptySchema)(t))}Oo.validateFunctionCode=Pbe;function iB({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},a){i.code.es5?t.func(e,(0,Ie._)`${Me.default.data}, ${Me.default.valCxt}`,n.$async,()=>{t.code((0,Ie._)`"use strict"; ${eB(r,i)}`),zbe(t,i),t.code(a)}):t.func(e,(0,Ie._)`${Me.default.data}, ${Tbe(i)}`,n.$async,()=>t.code(eB(r,i)).code(a))}function Tbe(t){return(0,Ie._)`{${Me.default.instancePath}="", ${Me.default.parentData}, ${Me.default.parentDataProperty}, ${Me.default.rootData}=${Me.default.data}${t.dynamicRef?(0,Ie._)`, ${Me.default.dynamicAnchors}={}`:Ie.nil}}={}`}function zbe(t,e){t.if(Me.default.valCxt,()=>{t.var(Me.default.instancePath,(0,Ie._)`${Me.default.valCxt}.${Me.default.instancePath}`),t.var(Me.default.parentData,(0,Ie._)`${Me.default.valCxt}.${Me.default.parentData}`),t.var(Me.default.parentDataProperty,(0,Ie._)`${Me.default.valCxt}.${Me.default.parentDataProperty}`),t.var(Me.default.rootData,(0,Ie._)`${Me.default.valCxt}.${Me.default.rootData}`),e.dynamicRef&&t.var(Me.default.dynamicAnchors,(0,Ie._)`${Me.default.valCxt}.${Me.default.dynamicAnchors}`)},()=>{t.var(Me.default.instancePath,(0,Ie._)`""`),t.var(Me.default.parentData,(0,Ie._)`undefined`),t.var(Me.default.parentDataProperty,(0,Ie._)`undefined`),t.var(Me.default.rootData,Me.default.data),e.dynamicRef&&t.var(Me.default.dynamicAnchors,(0,Ie._)`{}`)})}function Obe(t){let{schema:e,opts:r,gen:n}=t;iB(t,()=>{r.$comment&&e.$comment&&uB(t),Abe(t),n.let(Me.default.vErrors,null),n.let(Me.default.errors,0),r.unevaluated&&jbe(t),cB(t),Mbe(t)})}function jbe(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 eB(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 Nbe(t,e){if(oB(t)&&(sB(t),aB(t))){Rbe(t,e);return}(0,nB.boolOrEmptySchema)(t,e)}function aB({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 oB(t){return typeof t.schema!="boolean"}function Rbe(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&uB(t),Ube(t),Dbe(t);let a=n.const("_errs",Me.default.errors);cB(t,a),n.var(e,(0,Ie._)`${a} === ${Me.default.errors}`)}function sB(t){(0,qa.checkUnknownRules)(t),Cbe(t)}function cB(t,e){if(t.opts.jtd)return tB(t,[],!1,e);let r=(0,X3.getSchemaTypes)(t.schema),n=(0,X3.coerceAndCheckDataType)(t,r);tB(t,r,!n,e)}function Cbe(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,qa.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Abe(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,qa.checkStrictMode)(t,"default is ignored in the schema root")}function Ube(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Ebe.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Dbe(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function uB({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let a=r.$comment;if(i.$comment===!0)t.code((0,Ie._)`${Me.default.self}.logger.log(${a})`);else if(typeof i.$comment=="function"){let o=(0,Ie.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,Ie._)`${Me.default.self}.opts.$comment(${a}, ${o}, ${s}.schema)`)}}function Mbe(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:a}=t;r.$async?e.if((0,Ie._)`${Me.default.errors} === 0`,()=>e.return(Me.default.data),()=>e.throw((0,Ie._)`new ${i}(${Me.default.vErrors})`)):(e.assign((0,Ie._)`${n}.errors`,Me.default.vErrors),a.unevaluated&&qbe(t),e.return((0,Ie._)`${Me.default.errors} === 0`))}function qbe({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 tB(t,e,r,n){let{gen:i,schema:a,data:o,allErrors:s,opts:c,self:u}=t,{RULES:l}=u;if(a.$ref&&(c.ignoreKeywordsWithRef||!(0,qa.schemaHasRulesButRef)(a,l))){i.block(()=>dB(t,"$ref",l.all.$ref.definition));return}c.jtd||Zbe(t,e),i.block(()=>{for(let f of l.rules)d(f);d(l.post)});function d(f){(0,ej.shouldUseGroup)(a,f)&&(f.type?(i.if((0,u_.checkDataType)(f.type,o,c.strictNumbers)),rB(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,u_.reportTypeError)(t)),i.endIf()):rB(t,f),s||i.if((0,Ie._)`${Me.default.errors} === ${n||0}`))}}function rB(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Ibe.assignDefaults)(t,e.type),r.block(()=>{for(let a of e.rules)(0,ej.shouldUseRule)(n,a)&&dB(t,a.keyword,a.definition,e.type)})}function Zbe(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Lbe(t,e),t.opts.allowUnionTypes||Fbe(t,e),Vbe(t,t.dataTypes))}function Lbe(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{lB(t.dataTypes,r)||tj(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Bbe(t,e)}}function Fbe(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&tj(t,"use allowUnionTypes to allow union type keyword")}function Vbe(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,ej.shouldUseRule)(t.schema,i)){let{type:a}=i.definition;a.length&&!a.some(o=>Wbe(e,o))&&tj(t,`missing type "${a.join(",")}" for keyword "${n}"`)}}}function Wbe(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function lB(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Bbe(t,e){let r=[];for(let n of t.dataTypes)lB(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function tj(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,qa.checkStrictMode)(t,e,t.opts.strictTypes)}var l_=class{constructor(e,r,n){if((0,Kf.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,qa.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",pB(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Kf.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,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?Bf.reportExtraError:Bf.reportError)(this,this.def.error,r)}$dataError(){(0,Bf.reportError)(this,this.def.$dataError||Bf.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Bf.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:a,def:o}=this;n.if((0,Ie.or)((0,Ie._)`${i} === undefined`,r)),e!==Ie.nil&&n.assign(e,!0),(a.length||o.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:a}=this;return(0,Ie.or)(o(),s());function o(){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,u_.checkDataTypes)(c,r,a.opts.strictNumbers,u_.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,XO.getSubschema)(this.it,e);(0,XO.extendSubschemaData)(n,this.it,e),(0,XO.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return Nbe(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=qa.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=qa.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}};Oo.KeywordCxt=l_;function dB(t,e,r,n){let i=new l_(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Kf.funcKeywordCode)(i,r):"macro"in r?(0,Kf.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Kf.funcKeywordCode)(i,r)}var Kbe=/^\/(?:[^~]|~0|~1)*$/,Hbe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pB(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,a;if(t==="")return Me.default.rootData;if(t[0]==="/"){if(!Kbe.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,a=Me.default.rootData}else{let u=Hbe.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(a=r[e-l],!i)return a}let o=a,s=i.split("/");for(let u of s)u&&(a=(0,Ie._)`${a}${(0,Ie.getProperty)((0,qa.unescapeJsonPointer)(u))}`,o=(0,Ie._)`${o} && ${a}`);return o;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${e}`}}Oo.getData=pB});var d_=O(nj=>{"use strict";Object.defineProperty(nj,"__esModule",{value:!0});var rj=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};nj.default=rj});var Gf=O(oj=>{"use strict";Object.defineProperty(oj,"__esModule",{value:!0});var ij=Wf(),aj=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,ij.resolveUrl)(e,r,n),this.missingSchema=(0,ij.normalizeId)((0,ij.getFullPath)(e,this.missingRef))}};oj.default=aj});var f_=O(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.resolveSchema=_i.getCompilingSchema=_i.resolveRef=_i.compileSchema=_i.SchemaEnv=void 0;var Fi=Je(),Gbe=d_(),qs=Ma(),Vi=Wf(),fB=xt(),Qbe=Hf(),Hu=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,Vi.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};_i.SchemaEnv=Hu;function cj(t){let e=mB.call(this,t);if(e)return e;let r=(0,Vi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:a}=this.opts,o=new Fi.CodeGen(this.scope,{es5:n,lines:i,ownProperties:a}),s;t.$async&&(s=o.scopeValue("Error",{ref:Gbe.default,code:(0,Fi._)`require("ajv/dist/runtime/validation_error").default`}));let c=o.scopeName("validate");t.validateName=c;let u={gen:o,allErrors:this.opts.allErrors,data:qs.default.data,parentData:qs.default.parentData,parentDataProperty:qs.default.parentDataProperty,dataNames:[qs.default.data],dataPathArr:[Fi.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Fi.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:Fi.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Fi._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(t),(0,Qbe.validateFunctionCode)(u),o.optimize(this.opts.code.optimize);let d=o.toString();l=`${o.scopeRefs(qs.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,t));let p=new Function(`${qs.default.self}`,`${qs.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:c,validateCode:d,scopeValues:o._values}),this.opts.unevaluated){let{props:m,items:v}=u;p.evaluated={props:m instanceof Fi.Name?void 0:m,items:v instanceof Fi.Name?void 0:v,dynamicProps:m instanceof Fi.Name,dynamicItems:v instanceof Fi.Name},p.source&&(p.source.evaluated=(0,Fi.stringify)(p.evaluated))}return t.validate=p,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)}}_i.compileSchema=cj;function Ybe(t,e,r){var n;r=(0,Vi.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let a=exe.call(this,t,r);if(a===void 0){let o=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;o&&(a=new Hu({schema:o,schemaId:s,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=Jbe.call(this,a)}_i.resolveRef=Ybe;function Jbe(t){return(0,Vi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:cj.call(this,t)}function mB(t){for(let e of this._compilations)if(Xbe(e,t))return e}_i.getCompilingSchema=mB;function Xbe(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function exe(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||p_.call(this,t,e)}function p_(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Vi._getFullPath)(this.opts.uriResolver,r),i=(0,Vi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return sj.call(this,r,t);let a=(0,Vi.normalizeId)(n),o=this.refs[a]||this.schemas[a];if(typeof o=="string"){let s=p_.call(this,t,o);return typeof s?.schema!="object"?void 0:sj.call(this,r,s)}if(typeof o?.schema=="object"){if(o.validate||cj.call(this,o),a===(0,Vi.normalizeId)(e)){let{schema:s}=o,{schemaId:c}=this.opts,u=s[c];return u&&(i=(0,Vi.resolveUrl)(this.opts.uriResolver,i,u)),new Hu({schema:s,schemaId:c,root:t,baseId:i})}return sj.call(this,r,o)}}_i.resolveSchema=p_;var txe=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,fB.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!txe.has(s)&&u&&(e=(0,Vi.resolveUrl)(this.opts.uriResolver,e,u))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,fB.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Vi.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=p_.call(this,n,s)}let{schemaId:o}=this.opts;if(a=a||new Hu({schema:r,schemaId:o,root:n,baseId:e}),a.schema!==a.root.schema)return a}});var hB=O((C2e,rxe)=>{rxe.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 vB=O(uj=>{"use strict";Object.defineProperty(uj,"__esModule",{value:!0});var gB=$z();gB.code='require("ajv/dist/runtime/uri").default';uj.default=gB});var $B=O(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.CodeGen=Cr.Name=Cr.nil=Cr.stringify=Cr.str=Cr._=Cr.KeywordCxt=void 0;var nxe=Hf();Object.defineProperty(Cr,"KeywordCxt",{enumerable:!0,get:function(){return nxe.KeywordCxt}});var Gu=Je();Object.defineProperty(Cr,"_",{enumerable:!0,get:function(){return Gu._}});Object.defineProperty(Cr,"str",{enumerable:!0,get:function(){return Gu.str}});Object.defineProperty(Cr,"stringify",{enumerable:!0,get:function(){return Gu.stringify}});Object.defineProperty(Cr,"nil",{enumerable:!0,get:function(){return Gu.nil}});Object.defineProperty(Cr,"Name",{enumerable:!0,get:function(){return Gu.Name}});Object.defineProperty(Cr,"CodeGen",{enumerable:!0,get:function(){return Gu.CodeGen}});var ixe=d_(),wB=Gf(),axe=VO(),Qf=f_(),oxe=Je(),Yf=Wf(),m_=Vf(),dj=xt(),yB=hB(),sxe=vB(),kB=(t,e)=>new RegExp(t,e);kB.code="new RegExp";var cxe=["removeAdditional","useDefaults","coerceTypes"],uxe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),lxe={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."},dxe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_B=200;function pxe(t){var e,r,n,i,a,o,s,c,u,l,d,f,p,m,v,g,h,b,y,_,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,L=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:kB,R=(i=t.uriResolver)!==null&&i!==void 0?i:sxe.default;return{strictSchema:(o=(a=t.strictSchema)!==null&&a!==void 0?a:A)!==null&&o!==void 0?o:!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:(f=(d=t.strictTuples)!==null&&d!==void 0?d:A)!==null&&f!==void 0?f:"log",strictRequired:(m=(p=t.strictRequired)!==null&&p!==void 0?p:A)!==null&&m!==void 0?m:!1,code:t.code?{...t.code,optimize:M,regExp:L}:{optimize:M,regExp:L},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:_B,loopEnum:(g=t.loopEnum)!==null&&g!==void 0?g:_B,meta:(h=t.meta)!==null&&h!==void 0?h:!0,messages:(b=t.messages)!==null&&b!==void 0?b:!0,inlineRefs:(y=t.inlineRefs)!==null&&y!==void 0?y:!0,schemaId:(_=t.schemaId)!==null&&_!==void 0?_:"$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 Jf=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...pxe(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new oxe.ValueScope({scope:{},prefixes:uxe,es5:r,lines:n}),this.logger=yxe(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,axe.getRules)(),bB.call(this,lxe,e,"NOT SUPPORTED"),bB.call(this,dxe,e,"DEPRECATED","warn"),this._metaOpts=gxe.call(this),e.formats&&mxe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&hxe.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=yB;n==="id"&&(i={...yB},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 a.call(this,l.$schema);let f=this._addSchema(l,d);return f.validate||o.call(this,f)}async function a(l){l&&!this.getSchema(l)&&await i.call(this,{$ref:l},!0)}async function o(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof wB.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),o.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 a.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 o of e)this.addSchema(o,void 0,n,i);return this}let a;if(typeof e=="object"){let{schemaId:o}=this.opts;if(a=e[o],a!==void 0&&typeof a!="string")throw new Error(`schema ${o} must be string`)}return r=(0,Yf.normalizeId)(r||a),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 a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return i}getSchema(e){let r;for(;typeof(r=xB.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new Qf.SchemaEnv({schema:{},schemaId:n});if(r=Qf.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=xB.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,Yf.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(bxe.call(this,n,r),!r)return(0,dj.eachItem)(n,a=>lj.call(this,a)),this;wxe.call(this,r);let i={...r,type:(0,m_.getJSONTypes)(r.type),schemaType:(0,m_.getJSONTypes)(r.schemaType)};return(0,dj.eachItem)(n,i.type.length===0?a=>lj.call(this,a,i):a=>i.type.forEach(o=>lj.call(this,a,i,o))),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(a=>a.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,a)=>i+r+a)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let a=i.split("/").slice(1),o=e;for(let s of a)o=o[s];for(let s in n){let c=n[s];if(typeof c!="object")continue;let{$data:u}=c.definition,l=o[s];u&&l&&(o[s]=SB(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,a=this.opts.addUsedSchema){let o,{schemaId:s}=this.opts;if(typeof e=="object")o=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,Yf.normalizeId)(o||n);let u=Yf.getSchemaRefs.call(this,e,n);return c=new Qf.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),a&&!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):Qf.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{Qf.compileSchema.call(this,e)}finally{this.opts=r}}};Jf.ValidationError=ixe.default;Jf.MissingRefError=wB.default;Cr.default=Jf;function bB(t,e,r,n="error"){for(let i in t){let a=i;a in e&&this.logger[n](`${r}: option ${i}. ${t[a]}`)}}function xB(t){return t=(0,Yf.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 mxe(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function hxe(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 gxe(){let t={...this.opts};for(let e of cxe)delete t[e];return t}var vxe={log(){},warn(){},error(){}};function yxe(t){if(t===!1)return vxe;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 _xe=/^[a-z_$][a-z0-9_$:-]*$/i;function bxe(t,e){let{RULES:r}=this;if((0,dj.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!_xe.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 lj(t,e,r){var n;let i=e?.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,o=i?a.post:a.rules.find(({type:c})=>c===r);if(o||(o={type:r,rules:[]},a.rules.push(o)),a.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,m_.getJSONTypes)(e.type),schemaType:(0,m_.getJSONTypes)(e.schemaType)}};e.before?xxe.call(this,o,s,e.before):o.rules.push(s),a.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function xxe(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 wxe(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=SB(e)),t.validateSchema=this.compile(e,!0))}var kxe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function SB(t){return{anyOf:[t,kxe]}}});var IB=O(pj=>{"use strict";Object.defineProperty(pj,"__esModule",{value:!0});var Sxe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};pj.default=Sxe});var zB=O(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});Zs.callRef=Zs.getValidate=void 0;var $xe=Gf(),EB=yi(),zn=Je(),Qu=Ma(),PB=f_(),h_=xt(),Ixe={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:a,validateName:o,opts:s,self:c}=n,{root:u}=a;if((r==="#"||r==="#/")&&i===u.baseId)return d();let l=PB.resolveRef.call(c,u,i,r);if(l===void 0)throw new $xe.default(n.opts.uriResolver,i,r);if(l instanceof PB.SchemaEnv)return f(l);return p(l);function d(){if(a===u)return g_(t,o,a,a.$async);let m=e.scopeValue("root",{ref:u});return g_(t,(0,zn._)`${m}.validate`,u,u.$async)}function f(m){let v=TB(t,m);g_(t,v,m,m.$async)}function p(m){let v=e.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,zn.stringify)(m)}:{ref:m}),g=e.name("valid"),h=t.subschema({schema:m,dataTypes:[],schemaPath:zn.nil,topSchemaRef:v,errSchemaPath:r},g);t.mergeEvaluated(h),t.ok(g)}}};function TB(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,zn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Zs.getValidate=TB;function g_(t,e,r,n){let{gen:i,it:a}=t,{allErrors:o,schemaEnv:s,opts:c}=a,u=c.passContext?Qu.default.this:zn.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,zn._)`await ${(0,EB.callValidateCode)(t,e,u)}`),p(e),o||i.assign(m,!0)},v=>{i.if((0,zn._)`!(${v} instanceof ${a.ValidationError})`,()=>i.throw(v)),f(v),o||i.assign(m,!1)}),t.ok(m)}function d(){t.result((0,EB.callValidateCode)(t,e,u),()=>p(e),()=>f(e))}function f(m){let v=(0,zn._)`${m}.errors`;i.assign(Qu.default.vErrors,(0,zn._)`${Qu.default.vErrors} === null ? ${v} : ${Qu.default.vErrors}.concat(${v})`),i.assign(Qu.default.errors,(0,zn._)`${Qu.default.vErrors}.length`)}function p(m){var v;if(!a.opts.unevaluated)return;let g=(v=r?.validate)===null||v===void 0?void 0:v.evaluated;if(a.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(a.props=h_.mergeEvaluated.props(i,g.props,a.props));else{let h=i.var("props",(0,zn._)`${m}.evaluated.props`);a.props=h_.mergeEvaluated.props(i,h,a.props,zn.Name)}if(a.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(a.items=h_.mergeEvaluated.items(i,g.items,a.items));else{let h=i.var("items",(0,zn._)`${m}.evaluated.items`);a.items=h_.mergeEvaluated.items(i,h,a.items,zn.Name)}}}Zs.callRef=g_;Zs.default=Ixe});var OB=O(fj=>{"use strict";Object.defineProperty(fj,"__esModule",{value:!0});var Exe=IB(),Pxe=zB(),Txe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Exe.default,Pxe.default];fj.default=Txe});var jB=O(mj=>{"use strict";Object.defineProperty(mj,"__esModule",{value:!0});var v_=Je(),jo=v_.operators,y_={maximum:{okStr:"<=",ok:jo.LTE,fail:jo.GT},minimum:{okStr:">=",ok:jo.GTE,fail:jo.LT},exclusiveMaximum:{okStr:"<",ok:jo.LT,fail:jo.GTE},exclusiveMinimum:{okStr:">",ok:jo.GT,fail:jo.LTE}},zxe={message:({keyword:t,schemaCode:e})=>(0,v_.str)`must be ${y_[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,v_._)`{comparison: ${y_[t].okStr}, limit: ${e}}`},Oxe={keyword:Object.keys(y_),type:"number",schemaType:"number",$data:!0,error:zxe,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,v_._)`${r} ${y_[e].fail} ${n} || isNaN(${r})`)}};mj.default=Oxe});var NB=O(hj=>{"use strict";Object.defineProperty(hj,"__esModule",{value:!0});var Xf=Je(),jxe={message:({schemaCode:t})=>(0,Xf.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Xf._)`{multipleOf: ${t}}`},Nxe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:jxe,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,a=i.opts.multipleOfPrecision,o=e.let("res"),s=a?(0,Xf._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,Xf._)`${o} !== parseInt(${o})`;t.fail$data((0,Xf._)`(${n} === 0 || (${o} = ${r}/${n}, ${s}))`)}};hj.default=Nxe});var CB=O(gj=>{"use strict";Object.defineProperty(gj,"__esModule",{value:!0});function RB(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}gj.default=RB;RB.code='require("ajv/dist/runtime/ucs2length").default'});var AB=O(vj=>{"use strict";Object.defineProperty(vj,"__esModule",{value:!0});var Ls=Je(),Rxe=xt(),Cxe=CB(),Axe={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Ls.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Ls._)`{limit: ${t}}`},Uxe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Axe,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,a=e==="maxLength"?Ls.operators.GT:Ls.operators.LT,o=i.opts.unicode===!1?(0,Ls._)`${r}.length`:(0,Ls._)`${(0,Rxe.useFunc)(t.gen,Cxe.default)}(${r})`;t.fail$data((0,Ls._)`${o} ${a} ${n}`)}};vj.default=Uxe});var UB=O(yj=>{"use strict";Object.defineProperty(yj,"__esModule",{value:!0});var Dxe=yi(),Mxe=xt(),Yu=Je(),qxe={message:({schemaCode:t})=>(0,Yu.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Yu._)`{pattern: ${t}}`},Zxe={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:qxe,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t,s=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=o.opts.code,u=c.code==="new RegExp"?(0,Yu._)`new RegExp`:(0,Mxe.useFunc)(e,c),l=e.let("valid");e.try(()=>e.assign(l,(0,Yu._)`${u}(${a}, ${s}).test(${r})`),()=>e.assign(l,!1)),t.fail$data((0,Yu._)`!${l}`)}else{let c=(0,Dxe.usePattern)(t,i);t.fail$data((0,Yu._)`!${c}.test(${r})`)}}};yj.default=Zxe});var DB=O(_j=>{"use strict";Object.defineProperty(_j,"__esModule",{value:!0});var em=Je(),Lxe={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,em.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,em._)`{limit: ${t}}`},Fxe={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Lxe,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?em.operators.GT:em.operators.LT;t.fail$data((0,em._)`Object.keys(${r}).length ${i} ${n}`)}};_j.default=Fxe});var MB=O(bj=>{"use strict";Object.defineProperty(bj,"__esModule",{value:!0});var tm=yi(),rm=Je(),Vxe=xt(),Wxe={message:({params:{missingProperty:t}})=>(0,rm.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,rm._)`{missingProperty: ${t}}`},Bxe={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Wxe,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:a,it:o}=t,{opts:s}=o;if(!a&&r.length===0)return;let c=r.length>=s.loopRequired;if(o.allErrors?u():l(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:m}=t.it;for(let v of r)if(p?.[v]===void 0&&!m.has(v)){let g=o.schemaEnv.baseId+o.errSchemaPath,h=`required property "${v}" is not defined at "${g}" (strictRequired)`;(0,Vxe.checkStrictMode)(o,h,o.opts.strictRequired)}}function u(){if(c||a)t.block$data(rm.nil,d);else for(let p of r)(0,tm.checkReportMissingProp)(t,p)}function l(){let p=e.let("missing");if(c||a){let m=e.let("valid",!0);t.block$data(m,()=>f(p,m)),t.ok(m)}else e.if((0,tm.checkMissingProp)(t,r,p)),(0,tm.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,tm.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,m){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(m,(0,tm.propertyInData)(e,i,p,s.ownProperties)),e.if((0,rm.not)(m),()=>{t.error(),e.break()})},rm.nil)}}};bj.default=Bxe});var qB=O(xj=>{"use strict";Object.defineProperty(xj,"__esModule",{value:!0});var nm=Je(),Kxe={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,nm.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,nm._)`{limit: ${t}}`},Hxe={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Kxe,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?nm.operators.GT:nm.operators.LT;t.fail$data((0,nm._)`${r}.length ${i} ${n}`)}};xj.default=Hxe});var __=O(wj=>{"use strict";Object.defineProperty(wj,"__esModule",{value:!0});var ZB=gf();ZB.code='require("ajv/dist/runtime/equal").default';wj.default=ZB});var LB=O(Sj=>{"use strict";Object.defineProperty(Sj,"__esModule",{value:!0});var kj=Vf(),Ar=Je(),Gxe=xt(),Qxe=__(),Yxe={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}}`},Jxe={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Yxe,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:a,schemaCode:o,it:s}=t;if(!n&&!i)return;let c=e.let("valid"),u=a.items?(0,kj.getSchemaTypes)(a.items):[];t.block$data(c,l,(0,Ar._)`${o} === 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()?f:p)(m,v))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function f(m,v){let g=e.name("item"),h=(0,kj.checkDataTypes)(u,g,s.opts.strictNumbers,kj.DataType.Wrong),b=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 ${b}[${g}] == "number"`,()=>{e.assign(v,(0,Ar._)`${b}[${g}]`),t.error(),e.assign(c,!1).break()}).code((0,Ar._)`${b}[${g}] = ${m}`)})}function p(m,v){let g=(0,Gxe.useFunc)(e,Qxe.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)})))}}};Sj.default=Jxe});var FB=O(Ij=>{"use strict";Object.defineProperty(Ij,"__esModule",{value:!0});var $j=Je(),Xxe=xt(),ewe=__(),twe={message:"must be equal to constant",params:({schemaCode:t})=>(0,$j._)`{allowedValue: ${t}}`},rwe={keyword:"const",$data:!0,error:twe,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:a}=t;n||a&&typeof a=="object"?t.fail$data((0,$j._)`!${(0,Xxe.useFunc)(e,ewe.default)}(${r}, ${i})`):t.fail((0,$j._)`${a} !== ${r}`)}};Ij.default=rwe});var VB=O(Ej=>{"use strict";Object.defineProperty(Ej,"__esModule",{value:!0});var im=Je(),nwe=xt(),iwe=__(),awe={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,im._)`{allowedValues: ${t}}`},owe={keyword:"enum",schemaType:"array",$data:!0,error:awe,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:a,it:o}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=o.opts.loopEnum,c,u=()=>c??(c=(0,nwe.useFunc)(e,iwe.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 p=e.const("vSchema",a);l=(0,im.or)(...i.map((m,v)=>f(p,v)))}t.pass(l);function d(){e.assign(l,!1),e.forOf("v",a,p=>e.if((0,im._)`${u()}(${r}, ${p})`,()=>e.assign(l,!0).break()))}function f(p,m){let v=i[m];return typeof v=="object"&&v!==null?(0,im._)`${u()}(${r}, ${p}[${m}])`:(0,im._)`${r} === ${v}`}}};Ej.default=owe});var WB=O(Pj=>{"use strict";Object.defineProperty(Pj,"__esModule",{value:!0});var swe=jB(),cwe=NB(),uwe=AB(),lwe=UB(),dwe=DB(),pwe=MB(),fwe=qB(),mwe=LB(),hwe=FB(),gwe=VB(),vwe=[swe.default,cwe.default,uwe.default,lwe.default,dwe.default,pwe.default,fwe.default,mwe.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},hwe.default,gwe.default];Pj.default=vwe});var zj=O(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.validateAdditionalItems=void 0;var Fs=Je(),Tj=xt(),ywe={message:({params:{len:t}})=>(0,Fs.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Fs._)`{limit: ${t}}`},_we={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:ywe,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,Tj.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}BB(t,n)}};function BB(t,e){let{gen:r,schema:n,data:i,keyword:a,it:o}=t;o.items=!0;let s=r.const("len",(0,Fs._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Fs._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,Tj.alwaysValidSchema)(o,n)){let u=r.var("valid",(0,Fs._)`${s} <= ${e.length}`);r.if((0,Fs.not)(u),()=>c(u)),t.ok(u)}function c(u){r.forRange("i",e.length,s,l=>{t.subschema({keyword:a,dataProp:l,dataPropType:Tj.Type.Num},u),o.allErrors||r.if((0,Fs.not)(u),()=>r.break())})}}am.validateAdditionalItems=BB;am.default=_we});var Oj=O(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.validateTuple=void 0;var KB=Je(),b_=xt(),bwe=yi(),xwe={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return HB(t,"additionalItems",e);r.items=!0,!(0,b_.alwaysValidSchema)(r,e)&&t.ok((0,bwe.validateArray)(t))}};function HB(t,e,r=t.schema){let{gen:n,parentSchema:i,data:a,keyword:o,it:s}=t;l(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=b_.mergeEvaluated.items(n,r.length,s.items));let c=n.name("valid"),u=n.const("len",(0,KB._)`${a}.length`);r.forEach((d,f)=>{(0,b_.alwaysValidSchema)(s,d)||(n.if((0,KB._)`${u} > ${f}`,()=>t.subschema({keyword:o,schemaProp:f,dataProp:f},c)),t.ok(c))});function l(d){let{opts:f,errSchemaPath:p}=s,m=r.length,v=m===d.minItems&&(m===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let g=`"${o}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,b_.checkStrictMode)(s,g,f.strictTuples)}}}om.validateTuple=HB;om.default=xwe});var GB=O(jj=>{"use strict";Object.defineProperty(jj,"__esModule",{value:!0});var wwe=Oj(),kwe={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,wwe.validateTuple)(t,"items")};jj.default=kwe});var YB=O(Nj=>{"use strict";Object.defineProperty(Nj,"__esModule",{value:!0});var QB=Je(),Swe=xt(),$we=yi(),Iwe=zj(),Ewe={message:({params:{len:t}})=>(0,QB.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,QB._)`{limit: ${t}}`},Pwe={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Ewe,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Swe.alwaysValidSchema)(n,e)&&(i?(0,Iwe.validateAdditionalItems)(t,i):t.ok((0,$we.validateArray)(t)))}};Nj.default=Pwe});var JB=O(Rj=>{"use strict";Object.defineProperty(Rj,"__esModule",{value:!0});var bi=Je(),x_=xt(),Twe={message:({params:{min:t,max:e}})=>e===void 0?(0,bi.str)`must contain at least ${t} valid item(s)`:(0,bi.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,bi._)`{minContains: ${t}}`:(0,bi._)`{minContains: ${t}, maxContains: ${e}}`},zwe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Twe,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:a}=t,o,s,{minContains:c,maxContains:u}=n;a.opts.next?(o=c===void 0?1:c,s=u):o=1;let l=e.const("len",(0,bi._)`${i}.length`);if(t.setParams({min:o,max:s}),s===void 0&&o===0){(0,x_.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&o>s){(0,x_.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,x_.alwaysValidSchema)(a,r)){let v=(0,bi._)`${l} >= ${o}`;s!==void 0&&(v=(0,bi._)`${v} && ${l} <= ${s}`),t.pass(v);return}a.items=!0;let d=e.name("valid");s===void 0&&o===1?p(d,()=>e.if(d,()=>e.break())):o===0?(e.let(d,!0),s!==void 0&&e.if((0,bi._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),g=e.let("count",0);p(v,()=>e.if(v,()=>m(g)))}function p(v,g){e.forRange("i",0,l,h=>{t.subschema({keyword:"contains",dataProp:h,dataPropType:x_.Type.Num,compositeRule:!0},v),g()})}function m(v){e.code((0,bi._)`${v}++`),s===void 0?e.if((0,bi._)`${v} >= ${o}`,()=>e.assign(d,!0).break()):(e.if((0,bi._)`${v} > ${s}`,()=>e.assign(d,!1).break()),o===1?e.assign(d,!0):e.if((0,bi._)`${v} >= ${o}`,()=>e.assign(d,!0)))}}};Rj.default=zwe});var tK=O(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.validateSchemaDeps=la.validatePropertyDeps=la.error=void 0;var Cj=Je(),Owe=xt(),sm=yi();la.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Cj.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Cj._)`{property: ${t},
251
+ missingProperty: ${n},
252
+ depsCount: ${e},
253
+ deps: ${r}}`};var jwe={keyword:"dependencies",type:"object",schemaType:"object",error:la.error,code(t){let[e,r]=Nwe(t);XB(t,e),eK(t,r)}};function Nwe({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 XB(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let a=r.let("missing");for(let o in e){let s=e[o];if(s.length===0)continue;let c=(0,sm.propertyInData)(r,n,o,i.opts.ownProperties);t.setParams({property:o,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(c,()=>{for(let u of s)(0,sm.checkReportMissingProp)(t,u)}):(r.if((0,Cj._)`${c} && (${(0,sm.checkMissingProp)(t,s,a)})`),(0,sm.reportMissingProp)(t,a),r.else())}}la.validatePropertyDeps=XB;function eK(t,e=t.schema){let{gen:r,data:n,keyword:i,it:a}=t,o=r.name("valid");for(let s in e)(0,Owe.alwaysValidSchema)(a,e[s])||(r.if((0,sm.propertyInData)(r,n,s,a.opts.ownProperties),()=>{let c=t.subschema({keyword:i,schemaProp:s},o);t.mergeValidEvaluated(c,o)},()=>r.var(o,!0)),t.ok(o))}la.validateSchemaDeps=eK;la.default=jwe});var nK=O(Aj=>{"use strict";Object.defineProperty(Aj,"__esModule",{value:!0});var rK=Je(),Rwe=xt(),Cwe={message:"property name must be valid",params:({params:t})=>(0,rK._)`{propertyName: ${t.propertyName}}`},Awe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Cwe,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,Rwe.alwaysValidSchema)(i,r))return;let a=e.name("valid");e.forIn("key",n,o=>{t.setParams({propertyName:o}),t.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},a),e.if((0,rK.not)(a),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(a)}};Aj.default=Awe});var Dj=O(Uj=>{"use strict";Object.defineProperty(Uj,"__esModule",{value:!0});var w_=yi(),Wi=Je(),Uwe=Ma(),k_=xt(),Dwe={message:"must NOT have additional properties",params:({params:t})=>(0,Wi._)`{additionalProperty: ${t.additionalProperty}}`},Mwe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Dwe,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:a,it:o}=t;if(!a)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,k_.alwaysValidSchema)(o,r))return;let u=(0,w_.allSchemaProperties)(n.properties),l=(0,w_.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Wi._)`${a} === ${Uwe.default.errors}`);function d(){e.forIn("key",i,g=>{!u.length&&!l.length?m(g):e.if(f(g),()=>m(g))})}function f(g){let h;if(u.length>8){let b=(0,k_.schemaRefOrVal)(o,n.properties,"properties");h=(0,w_.isOwnProperty)(e,b,g)}else u.length?h=(0,Wi.or)(...u.map(b=>(0,Wi._)`${g} === ${b}`)):h=Wi.nil;return l.length&&(h=(0,Wi.or)(h,...l.map(b=>(0,Wi._)`${(0,w_.usePattern)(t,b)}.test(${g})`))),(0,Wi.not)(h)}function p(g){e.code((0,Wi._)`delete ${i}[${g}]`)}function m(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){p(g);return}if(r===!1){t.setParams({additionalProperty:g}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,k_.alwaysValidSchema)(o,r)){let h=e.name("valid");c.removeAdditional==="failing"?(v(g,h,!1),e.if((0,Wi.not)(h),()=>{t.reset(),p(g)})):(v(g,h),s||e.if((0,Wi.not)(h),()=>e.break()))}}function v(g,h,b){let y={keyword:"additionalProperties",dataProp:g,dataPropType:k_.Type.Str};b===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(y,h)}}};Uj.default=Mwe});var oK=O(qj=>{"use strict";Object.defineProperty(qj,"__esModule",{value:!0});var qwe=Hf(),iK=yi(),Mj=xt(),aK=Dj(),Zwe={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:a}=t;a.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&aK.default.code(new qwe.KeywordCxt(a,aK.default,"additionalProperties"));let o=(0,iK.allSchemaProperties)(r);for(let d of o)a.definedProperties.add(d);a.opts.unevaluated&&o.length&&a.props!==!0&&(a.props=Mj.mergeEvaluated.props(e,(0,Mj.toHash)(o),a.props));let s=o.filter(d=>!(0,Mj.alwaysValidSchema)(a,r[d]));if(s.length===0)return;let c=e.name("valid");for(let d of s)u(d)?l(d):(e.if((0,iK.propertyInData)(e,i,d,a.opts.ownProperties)),l(d),a.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function u(d){return a.opts.useDefaults&&!a.compositeRule&&r[d].default!==void 0}function l(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};qj.default=Zwe});var lK=O(Zj=>{"use strict";Object.defineProperty(Zj,"__esModule",{value:!0});var sK=yi(),S_=Je(),cK=xt(),uK=xt(),Lwe={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:a}=t,{opts:o}=a,s=(0,sK.allSchemaProperties)(r),c=s.filter(v=>(0,cK.alwaysValidSchema)(a,r[v]));if(s.length===0||c.length===s.length&&(!a.opts.unevaluated||a.props===!0))return;let u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,l=e.name("valid");a.props!==!0&&!(a.props instanceof S_.Name)&&(a.props=(0,uK.evaluatedPropsToName)(e,a.props));let{props:d}=a;f();function f(){for(let v of s)u&&p(v),a.allErrors?m(v):(e.var(l,!0),m(v),e.if(l))}function p(v){for(let g in u)new RegExp(v).test(g)&&(0,cK.checkStrictMode)(a,`property ${g} matches pattern ${v} (use allowMatchingProperties)`)}function m(v){e.forIn("key",n,g=>{e.if((0,S_._)`${(0,sK.usePattern)(t,v)}.test(${g})`,()=>{let h=c.includes(v);h||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:g,dataPropType:uK.Type.Str},l),a.opts.unevaluated&&d!==!0?e.assign((0,S_._)`${d}[${g}]`,!0):!h&&!a.allErrors&&e.if((0,S_.not)(l),()=>e.break())})})}}};Zj.default=Lwe});var dK=O(Lj=>{"use strict";Object.defineProperty(Lj,"__esModule",{value:!0});var Fwe=xt(),Vwe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,Fwe.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"}};Lj.default=Vwe});var pK=O(Fj=>{"use strict";Object.defineProperty(Fj,"__esModule",{value:!0});var Wwe=yi(),Bwe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Wwe.validateUnion,error:{message:"must match a schema in anyOf"}};Fj.default=Bwe});var fK=O(Vj=>{"use strict";Object.defineProperty(Vj,"__esModule",{value:!0});var $_=Je(),Kwe=xt(),Hwe={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,$_._)`{passingSchemas: ${t.passing}}`},Gwe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Hwe,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 a=r,o=e.let("valid",!1),s=e.let("passing",null),c=e.name("_valid");t.setParams({passing:s}),e.block(u),t.result(o,()=>t.reset(),()=>t.error(!0));function u(){a.forEach((l,d)=>{let f;(0,Kwe.alwaysValidSchema)(i,l)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,$_._)`${c} && ${o}`).assign(o,!1).assign(s,(0,$_._)`[${s}, ${d}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(s,d),f&&t.mergeEvaluated(f,$_.Name)})})}}};Vj.default=Gwe});var mK=O(Wj=>{"use strict";Object.defineProperty(Wj,"__esModule",{value:!0});var Qwe=xt(),Ywe={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((a,o)=>{if((0,Qwe.alwaysValidSchema)(n,a))return;let s=t.subschema({keyword:"allOf",schemaProp:o},i);t.ok(i),t.mergeEvaluated(s)})}};Wj.default=Ywe});var vK=O(Bj=>{"use strict";Object.defineProperty(Bj,"__esModule",{value:!0});var I_=Je(),gK=xt(),Jwe={message:({params:t})=>(0,I_.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,I_._)`{failingKeyword: ${t.ifClause}}`},Xwe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Jwe,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,gK.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=hK(n,"then"),a=hK(n,"else");if(!i&&!a)return;let o=e.let("valid",!0),s=e.name("_valid");if(c(),t.reset(),i&&a){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,I_.not)(s),u("else"));t.pass(o,()=>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 f=t.subschema({keyword:l},s);e.assign(o,s),t.mergeValidEvaluated(f,o),d?e.assign(d,(0,I_._)`${l}`):t.setParams({ifClause:l})}}}};function hK(t,e){let r=t.schema[e];return r!==void 0&&!(0,gK.alwaysValidSchema)(t,r)}Bj.default=Xwe});var yK=O(Kj=>{"use strict";Object.defineProperty(Kj,"__esModule",{value:!0});var e0e=xt(),t0e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,e0e.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Kj.default=t0e});var _K=O(Hj=>{"use strict";Object.defineProperty(Hj,"__esModule",{value:!0});var r0e=zj(),n0e=GB(),i0e=Oj(),a0e=YB(),o0e=JB(),s0e=tK(),c0e=nK(),u0e=Dj(),l0e=oK(),d0e=lK(),p0e=dK(),f0e=pK(),m0e=fK(),h0e=mK(),g0e=vK(),v0e=yK();function y0e(t=!1){let e=[p0e.default,f0e.default,m0e.default,h0e.default,g0e.default,v0e.default,c0e.default,u0e.default,s0e.default,l0e.default,d0e.default];return t?e.push(n0e.default,a0e.default):e.push(r0e.default,i0e.default),e.push(o0e.default),e}Hj.default=y0e});var bK=O(Gj=>{"use strict";Object.defineProperty(Gj,"__esModule",{value:!0});var pr=Je(),_0e={message:({schemaCode:t})=>(0,pr.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,pr._)`{format: ${t}}`},b0e={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:_0e,code(t,e){let{gen:r,data:n,$data:i,schema:a,schemaCode:o,it:s}=t,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;i?f():p();function f(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=r.const("fDef",(0,pr._)`${m}[${o}]`),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)(b(),y()));function b(){return c.strictSchema===!1?pr.nil:(0,pr._)`${o} && !${h}`}function y(){let _=l.$async?(0,pr._)`(${v}.async ? await ${h}(${n}) : ${h}(${n}))`:(0,pr._)`${h}(${n})`,x=(0,pr._)`(typeof ${h} == "function" ? ${_} : ${h}.test(${n}))`;return(0,pr._)`${h} && ${h} !== true && ${g} === ${e} && !${x}`}}function p(){let m=d.formats[a];if(!m){b();return}if(m===!0)return;let[v,g,h]=y(m);v===e&&t.pass(_());function b(){if(c.strictSchema===!1){d.logger.warn(x());return}throw new Error(x());function x(){return`unknown format "${a}" 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)(a)}`:void 0,k=r.scopeValue("formats",{key:a,ref:x,code:w});return typeof x=="object"&&!(x instanceof RegExp)?[x.type||"string",x.validate,(0,pr._)`${k}.validate`]:["string",x,k]}function _(){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})`}}}};Gj.default=b0e});var xK=O(Qj=>{"use strict";Object.defineProperty(Qj,"__esModule",{value:!0});var x0e=bK(),w0e=[x0e.default];Qj.default=w0e});var wK=O(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});Ju.contentVocabulary=Ju.metadataVocabulary=void 0;Ju.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ju.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var SK=O(Yj=>{"use strict";Object.defineProperty(Yj,"__esModule",{value:!0});var k0e=OB(),S0e=WB(),$0e=_K(),I0e=xK(),kK=wK(),E0e=[k0e.default,S0e.default,(0,$0e.default)(),I0e.default,kK.metadataVocabulary,kK.contentVocabulary];Yj.default=E0e});var IK=O(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});E_.DiscrError=void 0;var $K;(function(t){t.Tag="tag",t.Mapping="mapping"})($K||(E_.DiscrError=$K={}))});var PK=O(Xj=>{"use strict";Object.defineProperty(Xj,"__esModule",{value:!0});var Xu=Je(),Jj=IK(),EK=f_(),P0e=Gf(),T0e=xt(),z0e={message:({params:{discrError:t,tagName:e}})=>t===Jj.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Xu._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},O0e={keyword:"discriminator",type:"object",schemaType:"object",error:z0e,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:a}=t,{oneOf:o}=i;if(!a.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(!o)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),u=e.const("tag",(0,Xu._)`${r}${(0,Xu.getProperty)(s)}`);e.if((0,Xu._)`typeof ${u} == "string"`,()=>l(),()=>t.error(!1,{discrError:Jj.DiscrError.Tag,tag:u,tagName:s})),t.ok(c);function l(){let p=f();e.if(!1);for(let m in p)e.elseIf((0,Xu._)`${u} === ${m}`),e.assign(c,d(p[m]));e.else(),t.error(!1,{discrError:Jj.DiscrError.Mapping,tag:u,tagName:s}),e.endIf()}function d(p){let m=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:p},m);return t.mergeEvaluated(v,Xu.Name),m}function f(){var p;let m={},v=h(i),g=!0;for(let _=0;_<o.length;_++){let x=o[_];if(x?.$ref&&!(0,T0e.schemaHasRulesButRef)(x,a.self.RULES)){let k=x.$ref;if(x=EK.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,k),x instanceof EK.SchemaEnv&&(x=x.schema),x===void 0)throw new P0e.default(a.opts.uriResolver,a.baseId,k)}let w=(p=x?.properties)===null||p===void 0?void 0:p[s];if(typeof w!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&(v||h(x)),b(w,_)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return m;function h({required:_}){return Array.isArray(_)&&_.includes(s)}function b(_,x){if(_.const)y(_.const,x);else if(_.enum)for(let w of _.enum)y(w,x);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function y(_,x){if(typeof _!="string"||_ in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[_]=x}}}};Xj.default=O0e});var TK=O((k6e,j0e)=>{j0e.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 OK=O((er,e1)=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er.MissingRefError=er.ValidationError=er.CodeGen=er.Name=er.nil=er.stringify=er.str=er._=er.KeywordCxt=er.Ajv=void 0;var N0e=$B(),R0e=SK(),C0e=PK(),zK=TK(),A0e=["/properties"],P_="http://json-schema.org/draft-07/schema",el=class extends N0e.default{_addVocabularies(){super._addVocabularies(),R0e.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(C0e.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(zK,A0e):zK;this.addMetaSchema(e,P_,!1),this.refs["http://json-schema.org/schema"]=P_}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(P_)?P_:void 0)}};er.Ajv=el;e1.exports=er=el;e1.exports.Ajv=el;Object.defineProperty(er,"__esModule",{value:!0});er.default=el;var U0e=Hf();Object.defineProperty(er,"KeywordCxt",{enumerable:!0,get:function(){return U0e.KeywordCxt}});var tl=Je();Object.defineProperty(er,"_",{enumerable:!0,get:function(){return tl._}});Object.defineProperty(er,"str",{enumerable:!0,get:function(){return tl.str}});Object.defineProperty(er,"stringify",{enumerable:!0,get:function(){return tl.stringify}});Object.defineProperty(er,"nil",{enumerable:!0,get:function(){return tl.nil}});Object.defineProperty(er,"Name",{enumerable:!0,get:function(){return tl.Name}});Object.defineProperty(er,"CodeGen",{enumerable:!0,get:function(){return tl.CodeGen}});var D0e=d_();Object.defineProperty(er,"ValidationError",{enumerable:!0,get:function(){return D0e.default}});var M0e=Gf();Object.defineProperty(er,"MissingRefError",{enumerable:!0,get:function(){return M0e.default}})});var jK=O(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});rl.formatLimitDefinition=void 0;var q0e=OK(),Bi=Je(),No=Bi.operators,T_={formatMaximum:{okStr:"<=",ok:No.LTE,fail:No.GT},formatMinimum:{okStr:">=",ok:No.GTE,fail:No.LT},formatExclusiveMaximum:{okStr:"<",ok:No.LT,fail:No.GTE},formatExclusiveMinimum:{okStr:">",ok:No.GT,fail:No.LTE}},Z0e={message:({keyword:t,schemaCode:e})=>(0,Bi.str)`should be ${T_[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Bi._)`{comparison: ${T_[t].okStr}, limit: ${e}}`};rl.formatLimitDefinition={keyword:Object.keys(T_),type:"string",schemaType:"string",$data:!0,error:Z0e,code(t){let{gen:e,data:r,schemaCode:n,keyword:i,it:a}=t,{opts:o,self:s}=a;if(!o.validateFormats)return;let c=new q0e.KeywordCxt(a,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let f=e.scopeValue("formats",{ref:s.formats,code:o.code.formats}),p=e.const("fmt",(0,Bi._)`${f}[${c.schemaCode}]`);t.fail$data((0,Bi.or)((0,Bi._)`typeof ${p} != "object"`,(0,Bi._)`${p} instanceof RegExp`,(0,Bi._)`typeof ${p}.compare != "function"`,d(p)))}function l(){let f=c.schema,p=s.formats[f];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${i}": format "${f}" does not define "compare" function`);let m=e.scopeValue("formats",{key:f,ref:p,code:o.code.formats?(0,Bi._)`${o.code.formats}${(0,Bi.getProperty)(f)}`:void 0});t.fail$data(d(m))}function d(f){return(0,Bi._)`${f}.compare(${r}, ${n}) ${T_[i].fail} 0`}},dependencies:["format"]};var L0e=t=>(t.addKeyword(rl.formatLimitDefinition),t);rl.default=L0e});var AK=O((cm,CK)=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var nl=v3(),F0e=jK(),t1=Je(),NK=new t1.Name("fullFormats"),V0e=new t1.Name("fastFormats"),r1=(t,e={keywords:!0})=>{if(Array.isArray(e))return RK(t,e,nl.fullFormats,NK),t;let[r,n]=e.mode==="fast"?[nl.fastFormats,V0e]:[nl.fullFormats,NK],i=e.formats||nl.formatNames;return RK(t,i,r,n),e.keywords&&(0,F0e.default)(t),t};r1.get=(t,e="full")=>{let n=(e==="fast"?nl.fastFormats:nl.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function RK(t,e,r,n){var i,a;(i=(a=t.opts.code).formats)!==null&&i!==void 0||(a.formats=(0,t1._)`require("ajv-formats/dist/formats").${n}`);for(let o of e)t.addFormat(o,r[o])}CK.exports=cm=r1;Object.defineProperty(cm,"__esModule",{value:!0});cm.default=r1});function W0e(){let t=new UK.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,DK.default)(t),t}var UK,DK,z_,MK=E(()=>{UK=ul(u3(),1),DK=ul(AK(),1);z_=class{constructor(e){this._ajv=e??W0e()}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 O_,qK=E(()=>{af();O_=class{constructor(e){this._client=e}async*callToolStream(e,r=$u,n){let i=this._client,a={...n,task:n?.task??(i.isToolTask(e.name)?{}:void 0)},o=i.requestStream({method:"tools/call",params:e},r,a),s=i.getToolOutputValidator(e.name);for await(let c of o){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 ZK(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 LK(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 FK=E(()=>{});function j_(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 a=n[i];r[i]===void 0&&Object.prototype.hasOwnProperty.call(a,"default")&&(r[i]=a.default),r[i]!==void 0&&j_(a,r[i])}}if(Array.isArray(t.anyOf))for(let r of t.anyOf)typeof r!="boolean"&&j_(r,e);if(Array.isArray(t.oneOf))for(let r of t.oneOf)typeof r!="boolean"&&j_(r,e)}}function B0e(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 N_,VK=E(()=>{U9();af();MK();ay();qK();FK();N_=class extends yy{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 z_,r?.listChanged&&(this._pendingListChangedConfig=r.listChanged)}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",$T,e.tools,async()=>(await this.listTools()).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",kT,e.prompts,async()=>(await this.listPrompts()).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",gT,e.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new O_(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=A9(this._capabilities,e)}setRequestHandler(e,r){let i=iy(e)?.method;if(!i)throw new Error("Schema is missing a method literal");let a;if(wu(i)){let s=i;a=s._zod?.def?.value??s.value}else{let s=i;a=s._def?.value??s.value}if(typeof a!="string")throw new Error("Schema method literal must be a string");let o=a;if(o==="elicitation/create"){let s=async(c,u)=>{let l=Ui(TT,c);if(!l.success){let b=l.error instanceof Error?l.error.message:String(l.error);throw new Ee(Ue.InvalidParams,`Invalid elicitation request: ${b}`)}let{params:d}=l.data;d.mode=d.mode??"form";let{supportsFormMode:f,supportsUrlMode:p}=B0e(this._capabilities.elicitation);if(d.mode==="form"&&!f)throw new Ee(Ue.InvalidParams,"Client does not support form-mode elicitation requests");if(d.mode==="url"&&!p)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 b=Ui(ks,m);if(!b.success){let y=b.error instanceof Error?b.error.message:String(b.error);throw new Ee(Ue.InvalidParams,`Invalid task creation result: ${y}`)}return b.data}let v=Ui(zT,m);if(!v.success){let b=v.error instanceof Error?v.error.message:String(v.error);throw new Ee(Ue.InvalidParams,`Invalid elicitation result: ${b}`)}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{j_(h,g.content)}catch{}return g};return super.setRequestHandler(e,s)}if(o==="sampling/createMessage"){let s=async(c,u)=>{let l=Ui(IT,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,f=await Promise.resolve(r(c,u));if(d.task){let g=Ui(ks,f);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?PT:ET,v=Ui(m,f);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:aT,capabilities:this._capabilities,clientInfo:this._clientInfo}},lT,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!h9.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){ZK(this._serverCapabilities?.tasks?.requests,e,"Server")}assertTaskHandlerCapability(e){this._capabilities&&LK(this._capabilities.tasks?.requests,e,"Client")}async ping(e){return this.request({method:"ping"},ws,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},OT,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},ws,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},wT,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},vT,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},pT,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},fT,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},hT,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},ws,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},ws,r)}async callTool(e,r=$u,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),a=this.getToolOutputValidator(e.name);if(a){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 o=a(i.structuredContent);if(!o.valid)throw new Ee(Ue.InvalidParams,`Structured content does not match the tool's output schema: ${o.errorMessage}`)}catch(o){throw o instanceof Ee?o:new Ee(Ue.InvalidParams,`Failed to validate structured content: ${o instanceof Error?o.message:String(o)}`)}}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},ST,r);return this.cacheToolMetadata(n.tools),n}_setupListChangedHandler(e,r,n,i){let a=O9.safeParse(n);if(!a.success)throw new Error(`Invalid ${e} listChanged options: ${a.error.message}`);if(typeof n.onChanged!="function")throw new Error(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:o,debounceMs:s}=a.data,{onChanged:c}=n,u=async()=>{if(!o){c(null,null);return}try{let d=await i();c(null,d)}catch(d){let f=d instanceof Error?d:new Error(String(d));c(f,null)}},l=()=>{if(s){let d=this._listChangedDebounceTimers.get(e);d&&clearTimeout(d);let f=setTimeout(u,s);this._listChangedDebounceTimers.set(e,f)}else u()};this.setNotificationHandler(r,l)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}});var GK=O((A6e,HK)=>{HK.exports=KK;KK.sync=H0e;var WK=zt("fs");function K0e(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 BK(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:K0e(e,r)}function KK(t,e,r){WK.stat(t,function(n,i){r(n,n?!1:BK(i,t,e))})}function H0e(t,e){return BK(WK.statSync(t),t,e)}});var eH=O((U6e,XK)=>{XK.exports=YK;YK.sync=G0e;var QK=zt("fs");function YK(t,e,r){QK.stat(t,function(n,i){r(n,n?!1:JK(i,e))})}function G0e(t,e){return JK(QK.statSync(t),e)}function JK(t,e){return t.isFile()&&Q0e(t,e)}function Q0e(t,e){var r=t.mode,n=t.uid,i=t.gid,a=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=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===o||r&s&&n===a||r&l&&a===0;return d}});var rH=O((M6e,tH)=>{var D6e=zt("fs"),R_;process.platform==="win32"||global.TESTING_WINDOWS?R_=GK():R_=eH();tH.exports=n1;n1.sync=Y0e;function n1(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){n1(t,e||{},function(a,o){a?i(a):n(o)})})}R_(t,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),r(n,i)})}function Y0e(t,e){try{return R_.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var uH=O((q6e,cH)=>{var il=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",nH=zt("path"),J0e=il?";":":",iH=rH(),aH=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),oH=(t,e)=>{let r=e.colon||J0e,n=t.match(/\//)||il&&t.match(/\\/)?[""]:[...il?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],i=il?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=il?i.split(r):[""];return il&&t.indexOf(".")!==-1&&a[0]!==""&&a.unshift(""),{pathEnv:n,pathExt:a,pathExtExe:i}},sH=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:n,pathExt:i,pathExtExe:a}=oH(t,e),o=[],s=u=>new Promise((l,d)=>{if(u===n.length)return e.all&&o.length?l(o):d(aH(t));let f=n[u],p=/^".*"$/.test(f)?f.slice(1,-1):f,m=nH.join(p,t),v=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;l(c(v,u,0))}),c=(u,l,d)=>new Promise((f,p)=>{if(d===i.length)return f(s(l+1));let m=i[d];iH(u+m,{pathExt:a},(v,g)=>{if(!v&&g)if(e.all)o.push(u+m);else return f(u+m);return f(c(u,l,d+1))})});return r?s(0).then(u=>r(null,u),r):s(0)},X0e=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:n,pathExtExe:i}=oH(t,e),a=[];for(let o=0;o<r.length;o++){let s=r[o],c=/^".*"$/.test(s)?s.slice(1,-1):s,u=nH.join(c,t),l=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+u:u;for(let d=0;d<n.length;d++){let f=l+n[d];try{if(iH.sync(f,{pathExt:i}))if(e.all)a.push(f);else return f}catch{}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw aH(t)};cH.exports=sH;sH.sync=X0e});var dH=O((Z6e,i1)=>{"use strict";var lH=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};i1.exports=lH;i1.exports.default=lH});var hH=O((L6e,mH)=>{"use strict";var pH=zt("path"),eke=uH(),tke=dH();function fH(t,e){let r=t.options.env||process.env,n=process.cwd(),i=t.options.cwd!=null,a=i&&process.chdir!==void 0&&!process.chdir.disabled;if(a)try{process.chdir(t.options.cwd)}catch{}let o;try{o=eke.sync(t.command,{path:r[tke({env:r})],pathExt:e?pH.delimiter:void 0})}catch{}finally{a&&process.chdir(n)}return o&&(o=pH.resolve(i?t.options.cwd:"",o)),o}function rke(t){return fH(t)||fH(t,!0)}mH.exports=rke});var gH=O((F6e,o1)=>{"use strict";var a1=/([()\][%!^"`<>&|;, *?])/g;function nke(t){return t=t.replace(a1,"^$1"),t}function ike(t,e){return t=`${t}`,t=t.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),t=t.replace(/(?=(\\+?)?)\1$/,"$1$1"),t=`"${t}"`,t=t.replace(a1,"^$1"),e&&(t=t.replace(a1,"^$1")),t}o1.exports.command=nke;o1.exports.argument=ike});var yH=O((V6e,vH)=>{"use strict";vH.exports=/^#!(.*)/});var bH=O((W6e,_H)=>{"use strict";var ake=yH();_H.exports=(t="")=>{let e=t.match(ake);if(!e)return null;let[r,n]=e[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var wH=O((B6e,xH)=>{"use strict";var s1=zt("fs"),oke=bH();function ske(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 oke(r.toString())}xH.exports=ske});var IH=O((K6e,$H)=>{"use strict";var cke=zt("path"),kH=hH(),SH=gH(),uke=wH(),lke=process.platform==="win32",dke=/\.(?:com|exe)$/i,pke=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function fke(t){t.file=kH(t);let e=t.file&&uke(t.file);return e?(t.args.unshift(t.file),t.command=e,kH(t)):t.file}function mke(t){if(!lke)return t;let e=fke(t),r=!dke.test(e);if(t.options.forceShell||r){let n=pke.test(e);t.command=cke.normalize(t.command),t.command=SH.command(t.command),t.args=t.args.map(a=>SH.argument(a,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 hke(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:mke(n)}$H.exports=hke});var TH=O((H6e,PH)=>{"use strict";var c1=process.platform==="win32";function u1(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 gke(t,e){if(!c1)return;let r=t.emit;t.emit=function(n,i){if(n==="exit"){let a=EH(i,e);if(a)return r.call(t,"error",a)}return r.apply(t,arguments)}}function EH(t,e){return c1&&t===1&&!e.file?u1(e.original,"spawn"):null}function vke(t,e){return c1&&t===1&&!e.file?u1(e.original,"spawnSync"):null}PH.exports={hookChildProcess:gke,verifyENOENT:EH,verifyENOENTSync:vke,notFoundError:u1}});var jH=O((G6e,al)=>{"use strict";var zH=zt("child_process"),l1=IH(),d1=TH();function OH(t,e,r){let n=l1(t,e,r),i=zH.spawn(n.command,n.args,n.options);return d1.hookChildProcess(i,n),i}function yke(t,e,r){let n=l1(t,e,r),i=zH.spawnSync(n.command,n.args,n.options);return i.error=i.error||d1.verifyENOENTSync(i.status,n),i}al.exports=OH;al.exports.spawn=OH;al.exports.sync=yke;al.exports._parse=l1;al.exports._enoent=d1});function _ke(t){return k9.parse(JSON.parse(t))}function NH(t){return JSON.stringify(t)+`
254
+ `}var C_,RH=E(()=>{af();C_=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),_ke(r)}clear(){this._buffer=void 0}}});import p1 from"node:process";import{PassThrough as bke}from"node:stream";function wke(){let t={};for(let e of xke){let r=p1.env[e];r!==void 0&&(r.startsWith("()")||(t[e]=r))}return t}var CH,xke,A_,AH=E(()=>{CH=ul(jH(),1);RH();xke=p1.platform==="win32"?["APPDATA","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PATH","PROCESSOR_ARCHITECTURE","SYSTEMDRIVE","SYSTEMROOT","TEMP","USERNAME","USERPROFILE","PROGRAMFILES"]:["HOME","LOGNAME","PATH","SHELL","TERM","USER"];A_=class{constructor(e){this._readBuffer=new C_,this._stderrStream=null,this._serverParams=e,(e.stderr==="pipe"||e.stderr==="overlapped")&&(this._stderrStream=new bke)}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,CH.default)(this._serverParams.command,this._serverParams.args??[],{env:{...wke(),...this._serverParams.env},stdio:["pipe","pipe",this._serverParams.stderr??"inherit"],shell:!1,windowsHide:p1.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=NH(e);this._process.stdin.write(n)?r():this._process.stdin.once("drain",r)})}}});var U_,UH=E(()=>{VK();AH();pa();U_=class{#e=new Map;async ensureServer(e,r){if(this.#e.has(e))return this.#e.get(e);let{command:n,args:i=[],env:a={}}=r;H.debug(`[MCP] Starting ${e}: ${n} ${i.join(" ")}`);let o=new A_({command:n,args:i,env:{...process.env,...a}}),s=new N_({name:`zibby-chat-${e}`,version:"1.0.0"},{capabilities:{}});await s.connect(o);let c={client:s,transport:o,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`);H.debug(`[MCP] ${e}.${r}(${JSON.stringify(n).slice(0,200)})`);let a=await i.client.callTool({name:r,arguments:n});return{text:a.content?.filter(s=>s.type==="text").map(s=>s.text).join(`
256
+ `)||"",isError:a.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){H.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 kke,readFileSync as Ske}from"fs";import{join as $ke}from"path";import{homedir as Ike}from"os";function Eke(){try{let t=$ke(Ike(),".zibby","config.json");return kke(t)?JSON.parse(Ske(t,"utf-8")):{}}catch{return{}}}function D_(t){return String(t||"").replace(/\/v1\/?$/,"")}function Pke(t,e){let r=process.env.OPENAI_PROXY_URL;if(r)return D_(r);if(t==="session")return e.proxyUrl?D_(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 D_(n||"https://api.openai.com")}return D_(r||"")}function f1(){let t=Eke(),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",a=process.env.OPENAI_PROXY_URL,o="session";n==="byok"||n==="local"||n==="session"?o=n:e?o="session":r?o="byok":a&&i&&(o="local");let s=Pke(o,t),c={"Content-Type":"application/json"};if(o==="session"){if(!e)return{ok:!1,mode:o,reason:"missing_session_token"};c.Authorization=`Bearer ${e}`}else if(o==="byok"){if(!r)return{ok:!1,mode:o,reason:"missing_openai_api_key"};c.Authorization=`Bearer ${r}`}else if(o==="local"){if(!s)return{ok:!1,mode:o,reason:"missing_openai_proxy_url"};!i&&r&&(c.Authorization=`Bearer ${r}`)}return s?{ok:!0,mode:o,baseUrl:s,headers:c,tokenPreview:c.Authorization?`***${c.Authorization.slice(-4)}`:"none"}:{ok:!1,mode:o,reason:"missing_base_url"}}var DH=E(()=>{});function M_(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 Tke(t,e){if(typeof t=="string")return M_(t,e);try{return M_(JSON.stringify(t),e)}catch{return M_(String(t),e)}}function MH(t){let e=new Set;for(let i of t)if(i.role==="assistant"&&Array.isArray(i.tool_calls))for(let a of i.tool_calls)e.add(a.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:o,...s}=i;return{...s,content:s.content||""}})}function zke(t){let e=Array.isArray(t?.messages)?t.messages:[],r=e.find(a=>a.role==="system"),n=e.slice(-4).map(a=>({...a,content:M_(a.content,a.role==="tool"?1200:2500)}));n=MH(n);let i={...t,messages:[r,...n].filter(Boolean)};return delete i.tools,i}async function Oke({body:t,streaming:e,auth:r,options:n,fetchCompletion:i,fetchStreamingCompletion:a,onFallbackLog:o}){try{return e?await a(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=zke(t);return typeof o=="function"&&o(t,u),{data:e?await a(u,r,n):await i(u,r,n),fallback:u}}}async function qH({body:t,auth:e,options:r,streaming:n,toolContext:i,activeSkills:a,round:o,verbose:s,dependencies:c,config:u={}}){let l=u.maxToolResultChars||3e3,{fetchCompletion:d,fetchStreamingCompletion:f,onFallbackLog:p,hasToolCalls:m,getTextContent:v,parseToolCalls:g,buildAssistantMessage:h,buildToolResultMessage:b,executeTool:y,onToolCallLog:_,injectTools:x}=c;Array.isArray(t?.messages)&&(t.messages=MH(t.messages));let w=await Oke({body:t,streaming:n,auth:e,options:r,fetchCompletion:d,fetchStreamingCompletion:f,onFallbackLog:p}),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 _=="function"&&_($);let A=await Promise.all($.map((z,M)=>(typeof r.onToolCall=="function"&&r.onToolCall(z.name,z.args,{round:o,index:M,total:$.length}),y(z,i))));for(let z=0;z<$.length;z++){let L=$[z].name==="get_skill_context"?typeof A[z]=="string"?A[z]:JSON.stringify(A[z]):Tke(A[z],l);T.messages.push(b($[z].id,L))}return typeof r.onToolCall=="function"&&r.onToolCall(null),x(T,a),{done:!1,body:T}}var ZH=E(()=>{});function sl(t){!t||typeof t!="object"||(t.type==="object"&&t.properties&&(t.required=Object.keys(t.properties),t.additionalProperties=!1,Object.values(t.properties).forEach(sl)),t.type==="array"&&t.items&&sl(t.items),t.anyOf&&t.anyOf.forEach(sl),t.oneOf&&t.oneOf.forEach(sl),t.allOf&&t.allOf.forEach(sl))}function q_(t){return Array.isArray(t)?new Set(t.map(e=>String(e||"").trim()).filter(Boolean)):new Set}function Cke(t){return Array.isArray(t)?t.map(e=>String(e||"").trim()).filter(Boolean):[]}var jke,Nke,m1,LH,ol,Rke,um,FH=E(()=>{Ro();pa();Co();c9();UH();Ao();DH();ZH();jke=Gr.ASSISTANT,Nke=15,m1="get_skill_context";LH={maxBytes:49e3,systemMaxChars:12e3},ol=()=>process.env.ZIBBY_VERBOSE==="true"||process.env.ZIBBY_DEBUG==="true",Rke=t=>Buffer.byteLength(JSON.stringify(t),"utf8");um=class extends mn{#e;#t;#r=new U_;constructor(e=null){super("assistant","Zibby Assistant",200),e&&typeof e=="object"&&(e.toolProvider||e.completionProvider)?(this.#e=e.toolProvider||new bu,this.#t=e.completionProvider||new xu):(this.#e=e||new bu,this.#t=new xu)}canHandle(e){return f1().ok}async invoke(e,r={}){let n=r.model&&r.model!=="auto"?r.model:jke,i=f1();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 a=r.messages||[{role:"user",content:e}],o=i.baseUrl,s=ol();if(s?await this.#m(a,n,o,i.tokenPreview||"none"):H.debug(`[Assistant] ${o} | model: ${n} | messages: ${a.length}`),r.schema)return this.#u(n,a,i,r);let c=r.activeSkills||[],u=this.#d(r),l=this.#p(c,u),d=this.#f(l),f=this.#l(r),p={...r,payloadCompaction:f},m={activeSkills:l,options:p,executionRegistry:d,capabilityPolicy:u},v=!!r.stream,g={model:n,messages:[...a],stream:!1};this.#i(g,l,u);for(let h=0;h<Nke;h++){if(r.signal?.aborted)throw new Error("Aborted");let b=await qH({body:g,auth:i,options:p,streaming:v,toolContext:m,activeSkills:l,round:h,verbose:s,dependencies:{fetchCompletion:this.#a.bind(this),fetchStreamingCompletion:this.#c.bind(this),onFallbackLog:(y,_)=>{ol()&&console.log(`413 fallback: messages ${y.messages.length} -> ${_.messages.length}, bytes=${Rke(_)}`)},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,_)=>this.#e.buildToolResultMessage(y,_),executeTool:(y,_)=>this.#s(y,_),onToolCallLog:async y=>{let _=(await import("chalk")).default;console.log(_.dim(` ${y.map(x=>`${x.name}(${JSON.stringify(x.args).slice(0,80)})`).join(", ")}`))},injectTools:(y,_)=>this.#i(y,_,u)},config:{maxToolResultChars:r.maxToolResultChars||3e3}});if(b.done)return b.text;g.messages=b.body.messages,b.body.tools?g.tools=b.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.#o(r,n),a=this.#e.formatTools(i);this.#e.injectToolsIntoBody(e,a)}#o(e,r=null){let n=[],i=new Set;for(let a of e){let o=Qr(a);if(o?.tools?.length)for(let s of o.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(m1,r)&&n.push({name:m1,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:a,capabilityPolicy:o}=r;if(!this.#n(e.name,o))return`Tool "${e.name}" blocked by policy`;if(e.name===m1){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=Qr(u);if(!l)return JSON.stringify({error:`Skill "${u}" not found`});let d=typeof l.promptFragment=="function"?l.promptFragment():l.promptFragment||"",f=(l.tools||[]).map(m=>m.name),p=JSON.stringify({skillId:u,description:l.description||"",toolNames:f,promptFragment:d||""});return ol()&&(console.log(`
259
+ \u{1F4D6} get_skill_context("${u}") \u2192 ${p.length} chars (fragment: ${d.length} chars)`),console.log(` tools: [${f.join(", ")}]`),console.log(` fragment preview: ${d.slice(0,200).replace(/\n/g,"\\n")}\u2026
260
+ `)),p}let s=a?.get(e.name)||null;if(!s)return`Unknown tool: ${e.name}`;let c=Qr(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:a})=>{ol()&&console.log(`payload bytes (stream) before=${i} after=${a.bytes} trimmed=${a.trimmed} messages=${a.messageCount}`)}})}async#a(e,r,n){return this.#t.fetchCompletion(e,r,{...n,onBudget:({beforeBytes:i,meta:a})=>{ol()&&console.log(`payload bytes before=${i} after=${a.bytes} trimmed=${a.trimmed} messages=${a.messageCount}`)}})}async#u(e,r,n,i){let{zodToJsonSchema:a}=await Promise.resolve().then(()=>(Mo(),R1)),o=typeof i.schema?.parse=="function",s=o?a(i.schema):i.schema;delete s.$schema,sl(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.#a(c,n,i),l=this.#e.getTextContent(u),d=JSON.parse(l),f=o?i.schema.parse(d):d;return{raw:l,structured:f}}#l(e={}){let r=e?.config?.agent?.assistant?.payloadCompaction||{};return{maxBytes:Number(r.maxBytes||e.maxPayloadBytes||LH.maxBytes),systemMaxChars:Number(r.systemMaxChars||LH.systemMaxChars)}}#d(e={}){let r=e?.config?.agent?.assistant?.toolPolicy||{};return{allowTools:q_(r.allowTools||e.allowTools),denyTools:q_(r.denyTools||e.denyTools),denyPrefixes:Cke(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(a=>!(n.size>0&&!n.has(a)||i.has(a)))}#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 a=r?.denyTools;return!(a&&a.has(n)||(r?.denyPrefixes||[]).some(s=>n.startsWith(s)))}#f(e){let r=new Map,n=[];for(let i of e){let a=Qr(i);if(!a?.tools?.length)continue;let o=typeof a.handleToolCall=="function"?"handler":a.serverName&&typeof a.resolve=="function"?"mcp":null;if(o)for(let s of a.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:o})}}}if(n.length>0&&ol()){let i=n.slice(0,5).map(a=>`${a.tool}:${a.winner}>${a.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 a=(await import("chalk")).default;console.log(a.bold("Prompt sent to LLM:")),console.log(a.dim("\u2500".repeat(60)));let o=!1;for(let s of e)if(s.role==="system")console.log(a.dim(`[System] ${s.content||""}`));else{o||(console.log(a.dim("\u2500\u2500\u2500 chat history \u2500\u2500\u2500")),o=!0);let c=s.role==="user"?"Human":"AI",u=s.content?.length>200?`${s.content.slice(0,200)}...`:s.content||"";console.log(a.dim(`[${c}] ${u}`))}console.log(a.dim("\u2500".repeat(60)))}}});var BH={};Ki(BH,{AgentStrategy:()=>mn,AssistantStrategy:()=>um,ClaudeAgentStrategy:()=>Vp,CodexAgentStrategy:()=>Bp,CursorAgentStrategy:()=>Fd,GeminiAgentStrategy:()=>Kp,getAgentStrategy:()=>WH,invokeAgent:()=>Ake});function WH(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");H.debug(`Agent selection: requested=${n}`);let i=VH.find(a=>a.getName()===n);if(!i)throw new Error(`Unknown agent '${n}'. Available: ${VH.map(a=>a.getName()).join(", ")}`);if(H.debug(`Checking if ${n} can handle this environment...`),!i.canHandle(t)){let o={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. ${o}`)}return H.debug(`Using agent: ${i.getName()}`),i}async function Ake(t,e={},r={}){try{await import("@zibby/skills")}catch{}let n=WH(e),i=e.state?.config||r.config||{},a=i.models||{},o=r.nodeName&&a[r.nodeName]||null,s=a.default||null,c=n.name,u=i.agent?.[c]?.model||null,l=o||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},f=d.skills||[];if(f.length>0&&!r.skipPromptFragments){let{getSkill:m}=await Promise.resolve().then(()=>(Ao(),w1)),v=f.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 p=e.state?._currentNodeConfig?.extraPromptInstructions?.trim();return p&&(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
+ ${p}
273
+ `),H.debug(`Prompt length: ${t.length} chars`),process.env.STAGE!=="prod"&&H.debug(`Full prompt:
274
+ ${t}`),n.invoke(t,d)}var VH,KH=E(()=>{hM();FF();YF();r9();FH();pa();Ro();VH=[new um,new Fd,new Vp,new Bp,new Kp]});var lm=new Map;function Uke(t,e){lm.set(t,e)}function Eqe(t){return lm.get(t)}function Pqe(t){return lm.has(t)}function Tqe(){return Array.from(lm.keys())}function zqe(t){let e=lm.get(t);return e?e.factory&&typeof e.create=="function"?e.create.toString():typeof e.execute=="function"?e.execute.toString():typeof e=="function"?e.toString():null:null}Uke("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(()=>(KH(),BH))).invokeAgent);let i=e.extraPromptInstructions||"Execute the task based on the current state.",a=Zke(i,r),o=await n(a,{cwd:r.workspace||process.cwd(),model:r.model,tools:e.resolvedTools||null});return{success:!0,output:{raw:o,nodeId:t},raw:typeof o=="string"?o:o.raw}}})});function Dke(t){let e=/@([\w.]+)/g,r=new Set,n;for(;(n=e.exec(t))!==null;)r.add(n[1]);return Array.from(r)}function Mke(t,e){let r=e.split("."),n=t;for(let i of r){if(n==null)return;n=n[i]}return n}function qke(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 Zke(t,e){let r=Dke(t);if(r.length===0)return t;let n=[],i=new Set;for(let a of r){let o=a.split(".")[0];if(i.has(o))continue;let s=Mke(e,a);if(s!==void 0){let c=qke(s),u=a.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase());n.push(`## ${u}
275
+ ${c}`),a.includes(".")||i.add(o)}}return n.length===0?t:`${t}
3
276
 
4
277
  ---
5
278
  # Referenced Context
6
279
 
7
280
  ${n.join(`
8
281
 
9
- `)}`}export{y as getNodeImpl,S as getNodeTemplate,x as hasNode,h as listNodeTypes,p as registerNode};
282
+ `)}`}export{Eqe as getNodeImpl,zqe as getNodeTemplate,Pqe as hasNode,Tqe as listNodeTypes,Uke as registerNode};
283
+ /*! Bundled license information:
284
+
285
+ mime-db/index.js:
286
+ (*!
287
+ * mime-db
288
+ * Copyright(c) 2014 Jonathan Ong
289
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
290
+ * MIT Licensed
291
+ *)
292
+
293
+ mime-types/index.js:
294
+ (*!
295
+ * mime-types
296
+ * Copyright(c) 2014 Jonathan Ong
297
+ * Copyright(c) 2015 Douglas Christopher Wilson
298
+ * MIT Licensed
299
+ *)
300
+ */