vantage-mcp-server 2.6.6 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +47 -47
- package/index.js.map +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|| ${s} === "boolean" || ${n} === null`).assign(a,(0,Q._)`[${n}]`)}}}function DC({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,Q._)`${t} !== undefined`,()=>e.assign((0,Q._)`${t}[${r}]`,o))}function Kg(e,t,r,o=Xo.Correct){let n=o===Xo.Correct?Q.operators.EQ:Q.operators.NEQ,i;switch(e){case"null":return(0,Q._)`${t} ${n} null`;case"array":i=(0,Q._)`Array.isArray(${t})`;break;case"object":i=(0,Q._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,Q._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,Q._)`typeof ${t} ${n} ${e}`}return o===Xo.Correct?i:(0,Q.not)(i);function s(a=Q.nil){return(0,Q.and)((0,Q._)`typeof ${t} == "number"`,a,r?(0,Q._)`isFinite(${t})`:Q.nil)}}ct.checkDataType=Kg;function Bg(e,t,r,o){if(e.length===1)return Kg(e[0],t,r,o);let n,i=(0,dx.toHash)(e);if(i.array&&i.object){let s=(0,Q._)`typeof ${t} != "object"`;n=i.null?s:(0,Q._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else n=Q.nil;i.number&&delete i.integer;for(let s in i)n=(0,Q.and)(n,Kg(s,t,r,o));return n}ct.checkDataTypes=Bg;var qC={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Q._)`{type: ${e}}`:(0,Q._)`{type: ${t}}`};function Hg(e){let t=MC(e);(0,OC.reportError)(t,qC)}ct.reportTypeError=Hg;function MC(e){let{gen:t,data:r,schema:o}=e,n=(0,dx.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}});var hx=w(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});dd.assignDefaults=void 0;var ei=X(),UC=me();function LC(e,t){let{properties:r,items:o}=e.schema;if(t==="object"&&r)for(let n in r)mx(e,n,r[n].default);else t==="array"&&Array.isArray(o)&&o.forEach((n,i)=>mx(e,i,n.default))}dd.assignDefaults=LC;function mx(e,t,r){let{gen:o,compositeRule:n,data:i,opts:s}=e;if(r===void 0)return;let a=(0,ei._)`${i}${(0,ei.getProperty)(t)}`;if(n){(0,UC.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,ei._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,ei._)`${c} || ${a} === null || ${a} === ""`),o.if(c,(0,ei._)`${a} = ${(0,ei.stringify)(r)}`)}});var Lt=w(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.validateUnion=Se.validateArray=Se.usePattern=Se.callValidateCode=Se.schemaProperties=Se.allSchemaProperties=Se.noPropertyInData=Se.propertyInData=Se.isOwnProperty=Se.hasPropFunc=Se.reportMissingProp=Se.checkMissingProp=Se.checkReportMissingProp=void 0;var Ae=X(),Jg=me(),on=Rr(),ZC=me();function VC(e,t){let{gen:r,data:o,it:n}=e;r.if(Yg(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Ae._)`${t}`},!0),e.error()})}Se.checkReportMissingProp=VC;function FC({gen:e,data:t,it:{opts:r}},o,n){return(0,Ae.or)(...o.map(i=>(0,Ae.and)(Yg(e,t,i,r.ownProperties),(0,Ae._)`${n} = ${i}`)))}Se.checkMissingProp=FC;function WC(e,t){e.setParams({missingProperty:t},!0),e.error()}Se.reportMissingProp=WC;function gx(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Ae._)`Object.prototype.hasOwnProperty`})}Se.hasPropFunc=gx;function Qg(e,t,r){return(0,Ae._)`${gx(e)}.call(${t}, ${r})`}Se.isOwnProperty=Qg;function GC(e,t,r,o){let n=(0,Ae._)`${t}${(0,Ae.getProperty)(r)} !== undefined`;return o?(0,Ae._)`${n} && ${Qg(e,t,r)}`:n}Se.propertyInData=GC;function Yg(e,t,r,o){let n=(0,Ae._)`${t}${(0,Ae.getProperty)(r)} === undefined`;return o?(0,Ae.or)(n,(0,Ae.not)(Qg(e,t,r))):n}Se.noPropertyInData=Yg;function _x(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}Se.allSchemaProperties=_x;function KC(e,t){return _x(t).filter(r=>!(0,Jg.alwaysValidSchema)(e,t[r]))}Se.schemaProperties=KC;function BC({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:s},a,c,u){let l=u?(0,Ae._)`${e}, ${t}, ${o}${n}`:t,d=[[on.default.instancePath,(0,Ae.strConcat)(on.default.instancePath,i)],[on.default.parentData,s.parentData],[on.default.parentDataProperty,s.parentDataProperty],[on.default.rootData,on.default.rootData]];s.opts.dynamicRef&&d.push([on.default.dynamicAnchors,on.default.dynamicAnchors]);let h=(0,Ae._)`${l}, ${r.object(...d)}`;return c!==Ae.nil?(0,Ae._)`${a}.call(${c}, ${h})`:(0,Ae._)`${a}(${h})`}Se.callValidateCode=BC;var HC=(0,Ae._)`new RegExp`;function JC({gen:e,it:{opts:t}},r){let o=t.unicodeRegExp?"u":"",{regExp:n}=t.code,i=n(r,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Ae._)`${n.code==="new RegExp"?HC:(0,ZC.useFunc)(e,n)}(${r}, ${o})`})}Se.usePattern=JC;function QC(e){let{gen:t,data:r,keyword:o,it:n}=e,i=t.name("valid");if(n.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,Ae._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:Jg.Type.Num},i),t.if((0,Ae.not)(i),a)})}}Se.validateArray=QC;function YC(e){let{gen:t,schema:r,keyword:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,Jg.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:o,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,Ae._)`${s} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Ae.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}Se.validateUnion=YC});var bx=w(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.validateKeywordUsage=mr.validSchemaType=mr.funcKeywordCode=mr.macroKeywordCode=void 0;var ht=X(),Zn=Rr(),XC=Lt(),eD=ka();function tD(e,t){let{gen:r,keyword:o,schema:n,parentSchema:i,it:s}=e,a=t.macro.call(s.self,n,i,s),c=yx(r,o,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:ht.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}mr.macroKeywordCode=tD;function rD(e,t){var r;let{gen:o,keyword:n,schema:i,parentSchema:s,$data:a,it:c}=e;oD(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,l=yx(o,n,u),d=o.let("valid");e.block$data(d,h),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function h(){if(t.errors===!1)f(),t.modifying&&vx(e),_(()=>e.error());else{let y=t.async?m():p();t.modifying&&vx(e),_(()=>nD(e,y))}}function m(){let y=o.let("ruleErrs",null);return o.try(()=>f((0,ht._)`await `),$=>o.assign(d,!1).if((0,ht._)`${$} instanceof ${c.ValidationError}`,()=>o.assign(y,(0,ht._)`${$}.errors`),()=>o.throw($))),y}function p(){let y=(0,ht._)`${l}.errors`;return o.assign(y,null),f(ht.nil),y}function f(y=t.async?(0,ht._)`await `:ht.nil){let $=c.opts.passContext?Zn.default.this:Zn.default.self,k=!("compile"in t&&!a||t.schema===!1);o.assign(d,(0,ht._)`${y}${(0,XC.callValidateCode)(e,l,$,k)}`,t.modifying)}function _(y){var $;o.if((0,ht.not)(($=t.valid)!==null&&$!==void 0?$:d),y)}}mr.funcKeywordCode=rD;function vx(e){let{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,(0,ht._)`${o.parentData}[${o.parentDataProperty}]`))}function nD(e,t){let{gen:r}=e;r.if((0,ht._)`Array.isArray(${t})`,()=>{r.assign(Zn.default.vErrors,(0,ht._)`${Zn.default.vErrors} === null ? ${t} : ${Zn.default.vErrors}.concat(${t})`).assign(Zn.default.errors,(0,ht._)`${Zn.default.vErrors}.length`),(0,eD.extendErrors)(e)},()=>e.error())}function oD({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function yx(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,ht.stringify)(r)})}function iD(e,t,r=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||r&&typeof e>"u")}mr.validSchemaType=iD;function sD({schema:e,opts:t,self:r,errSchemaPath:o},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let s=n.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}mr.validateKeywordUsage=sD});var $x=w(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.extendSubschemaMode=sn.extendSubschemaData=sn.getSubschema=void 0;var hr=X(),wx=me();function aD(e,{keyword:t,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,hr._)`${e.schemaPath}${(0,hr.getProperty)(t)}${(0,hr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,wx.escapeFragment)(r)}`}}if(o!==void 0){if(n===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}sn.getSubschema=aD;function cD(e,t,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:s}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,h=a.let("data",(0,hr._)`${t.data}${(0,hr.getProperty)(r)}`,!0);c(h),e.errorPath=(0,hr.str)`${u}${(0,wx.getErrorPath)(r,o,d.jsPropertySyntax)}`,e.parentDataProperty=(0,hr._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(n!==void 0){let u=n instanceof hr.Name?n:a.let("data",n,!0);c(u),s!==void 0&&(e.propertyName=s)}i&&(e.dataTypes=i);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}sn.extendSubschemaData=cD;function uD(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:i}){o!==void 0&&(e.compositeRule=o),n!==void 0&&(e.createErrors=n),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}sn.extendSubschemaMode=uD});var xx=w((JK,kx)=>{"use strict";var an=kx.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};pd(t,o,n,e,"",e)};an.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};an.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};an.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};an.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 pd(e,t,r,o,n,i,s,a,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,n,i,s,a,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in an.arrayKeywords)for(var h=0;h<d.length;h++)pd(e,t,r,d[h],n+"/"+l+"/"+h,i,n,l,o,h)}else if(l in an.propsKeywords){if(d&&typeof d=="object")for(var m in d)pd(e,t,r,d[m],n+"/"+l+"/"+lD(m),i,n,l,o,m)}else(l in an.keywords||e.allKeys&&!(l in an.skipKeywords))&&pd(e,t,r,d,n+"/"+l,i,n,l,o)}r(o,n,i,s,a,c,u)}}function lD(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var Sa=w(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.getSchemaRefs=xt.resolveUrl=xt.normalizeId=xt._getFullPath=xt.getFullPath=xt.inlineRef=void 0;var dD=me(),pD=Js(),fD=xx(),mD=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function hD(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Xg(e):t?Sx(e)<=t:!1}xt.inlineRef=hD;var gD=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Xg(e){for(let t in e){if(gD.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Xg)||typeof r=="object"&&Xg(r))return!0}return!1}function Sx(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!mD.has(r)&&(typeof e[r]=="object"&&(0,dD.eachItem)(e[r],o=>t+=Sx(o)),t===1/0))return 1/0}return t}function Tx(e,t="",r){r!==!1&&(t=ti(t));let o=e.parse(t);return Px(e,o)}xt.getFullPath=Tx;function Px(e,t){return e.serialize(t).split("#")[0]+"#"}xt._getFullPath=Px;var _D=/#\/?$/;function ti(e){return e?e.replace(_D,""):""}xt.normalizeId=ti;function vD(e,t,r){return r=ti(r),e.resolve(t,r)}xt.resolveUrl=vD;var yD=/^[a-z_][-a-z0-9._]*$/i;function bD(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=ti(e[r]||t),i={"":n},s=Tx(o,n,!1),a={},c=new Set;return fD(e,{allKeys:!0},(d,h,m,p)=>{if(p===void 0)return;let f=s+h,_=i[p];typeof d[r]=="string"&&(_=y.call(this,d[r])),$.call(this,d.$anchor),$.call(this,d.$dynamicAnchor),i[h]=_;function y(k){let N=this.opts.uriResolver.resolve;if(k=ti(_?N(_,k):k),c.has(k))throw l(k);c.add(k);let P=this.refs[k];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?u(d,P.schema,k):k!==ti(f)&&(k[0]==="#"?(u(d,a[k],k),a[k]=d):this.refs[k]=f),k}function $(k){if(typeof k=="string"){if(!yD.test(k))throw new Error(`invalid anchor "${k}"`);y.call(this,`#${k}`)}}}),a;function u(d,h,m){if(h!==void 0&&!pD(d,h))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}xt.getSchemaRefs=bD});var za=w(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.getData=cn.KeywordCxt=cn.validateFunctionCode=void 0;var Ox=cx(),zx=xa(),t_=Gg(),fd=xa(),wD=hx(),Pa=bx(),e_=$x(),Z=X(),B=Rr(),$D=Sa(),jr=me(),Ta=ka();function kD(e){if(Ax(e)&&(Cx(e),jx(e))){TD(e);return}Rx(e,()=>(0,Ox.topBoolOrEmptySchema)(e))}cn.validateFunctionCode=kD;function Rx({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},i){n.code.es5?e.func(t,(0,Z._)`${B.default.data}, ${B.default.valCxt}`,o.$async,()=>{e.code((0,Z._)`"use strict"; ${Ex(r,n)}`),SD(e,n),e.code(i)}):e.func(t,(0,Z._)`${B.default.data}, ${xD(n)}`,o.$async,()=>e.code(Ex(r,n)).code(i))}function xD(e){return(0,Z._)`{${B.default.instancePath}="", ${B.default.parentData}, ${B.default.parentDataProperty}, ${B.default.rootData}=${B.default.data}${e.dynamicRef?(0,Z._)`, ${B.default.dynamicAnchors}={}`:Z.nil}}={}`}function SD(e,t){e.if(B.default.valCxt,()=>{e.var(B.default.instancePath,(0,Z._)`${B.default.valCxt}.${B.default.instancePath}`),e.var(B.default.parentData,(0,Z._)`${B.default.valCxt}.${B.default.parentData}`),e.var(B.default.parentDataProperty,(0,Z._)`${B.default.valCxt}.${B.default.parentDataProperty}`),e.var(B.default.rootData,(0,Z._)`${B.default.valCxt}.${B.default.rootData}`),t.dynamicRef&&e.var(B.default.dynamicAnchors,(0,Z._)`${B.default.valCxt}.${B.default.dynamicAnchors}`)},()=>{e.var(B.default.instancePath,(0,Z._)`""`),e.var(B.default.parentData,(0,Z._)`undefined`),e.var(B.default.parentDataProperty,(0,Z._)`undefined`),e.var(B.default.rootData,B.default.data),t.dynamicRef&&e.var(B.default.dynamicAnchors,(0,Z._)`{}`)})}function TD(e){let{schema:t,opts:r,gen:o}=e;Rx(e,()=>{r.$comment&&t.$comment&&qx(e),ND(e),o.let(B.default.vErrors,null),o.let(B.default.errors,0),r.unevaluated&&PD(e),Dx(e),jD(e)})}function PD(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Z._)`${r}.evaluated`),t.if((0,Z._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Z._)`${e.evaluated}.props`,(0,Z._)`undefined`)),t.if((0,Z._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Z._)`${e.evaluated}.items`,(0,Z._)`undefined`))}function Ex(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Z._)`/*# sourceURL=${r} */`:Z.nil}function zD(e,t){if(Ax(e)&&(Cx(e),jx(e))){ED(e,t);return}(0,Ox.boolOrEmptySchema)(e,t)}function jx({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Ax(e){return typeof e.schema!="boolean"}function ED(e,t){let{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&qx(e),OD(e),RD(e);let i=o.const("_errs",B.default.errors);Dx(e,i),o.var(t,(0,Z._)`${i} === ${B.default.errors}`)}function Cx(e){(0,jr.checkUnknownRules)(e),ID(e)}function Dx(e,t){if(e.opts.jtd)return Ix(e,[],!1,t);let r=(0,zx.getSchemaTypes)(e.schema),o=(0,zx.coerceAndCheckDataType)(e,r);Ix(e,r,!o,t)}function ID(e){let{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,jr.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ND(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,jr.checkStrictMode)(e,"default is ignored in the schema root")}function OD(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,$D.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function RD(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function qx({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)e.code((0,Z._)`${B.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let s=(0,Z.str)`${o}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,Z._)`${B.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function jD(e){let{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=e;r.$async?t.if((0,Z._)`${B.default.errors} === 0`,()=>t.return(B.default.data),()=>t.throw((0,Z._)`new ${n}(${B.default.vErrors})`)):(t.assign((0,Z._)`${o}.errors`,B.default.vErrors),i.unevaluated&&AD(e),t.return((0,Z._)`${B.default.errors} === 0`))}function AD({gen:e,evaluated:t,props:r,items:o}){r instanceof Z.Name&&e.assign((0,Z._)`${t}.props`,r),o instanceof Z.Name&&e.assign((0,Z._)`${t}.items`,o)}function Ix(e,t,r,o){let{gen:n,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,jr.schemaHasRulesButRef)(i,l))){n.block(()=>Ux(e,"$ref",l.all.$ref.definition));return}c.jtd||CD(e,t),n.block(()=>{for(let h of l.rules)d(h);d(l.post)});function d(h){(0,t_.shouldUseGroup)(i,h)&&(h.type?(n.if((0,fd.checkDataType)(h.type,s,c.strictNumbers)),Nx(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,fd.reportTypeError)(e)),n.endIf()):Nx(e,h),a||n.if((0,Z._)`${B.default.errors} === ${o||0}`))}}function Nx(e,t){let{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,wD.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,t_.shouldUseRule)(o,i)&&Ux(e,i.keyword,i.definition,t.type)})}function CD(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(DD(e,t),e.opts.allowUnionTypes||qD(e,t),MD(e,e.dataTypes))}function DD(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Mx(e.dataTypes,r)||r_(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),LD(e,t)}}function qD(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&r_(e,"use allowUnionTypes to allow union type keyword")}function MD(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,t_.shouldUseRule)(e.schema,n)){let{type:i}=n.definition;i.length&&!i.some(s=>UD(t,s))&&r_(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function UD(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Mx(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function LD(e,t){let r=[];for(let o of e.dataTypes)Mx(t,o)?r.push(o):t.includes("integer")&&o==="number"&&r.push("integer");e.dataTypes=r}function r_(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,jr.checkStrictMode)(e,t,e.opts.strictTypes)}var md=class{constructor(t,r,o){if((0,Pa.validateKeywordUsage)(t,r,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,jr.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Lx(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Pa.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",B.default.errors))}result(t,r,o){this.failResult((0,Z.not)(t),r,o)}failResult(t,r,o){this.gen.if(t),o?o():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Z.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,Z._)`${r} !== undefined && (${(0,Z.or)(this.invalid$data(),t)})`)}error(t,r,o){if(r){this.setParams(r),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,r){(t?Ta.reportExtraError:Ta.reportError)(this,this.def.error,r)}$dataError(){(0,Ta.reportError)(this,this.def.$dataError||Ta.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ta.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,o=Z.nil){this.gen.block(()=>{this.check$data(t,o),r()})}check$data(t=Z.nil,r=Z.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:s}=this;o.if((0,Z.or)((0,Z._)`${n} === undefined`,r)),t!==Z.nil&&o.assign(t,!0),(i.length||s.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==Z.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,Z.or)(s(),a());function s(){if(o.length){if(!(r instanceof Z.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,Z._)`${(0,fd.checkDataTypes)(c,r,i.opts.strictNumbers,fd.DataType.Wrong)}`}return Z.nil}function a(){if(n.validateSchema){let c=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,Z._)`!${c}(${r})`}return Z.nil}}subschema(t,r){let o=(0,e_.getSubschema)(this.it,t);(0,e_.extendSubschemaData)(o,this.it,t),(0,e_.extendSubschemaMode)(o,t);let n={...this.it,...o,items:void 0,props:void 0};return zD(n,r),n}mergeEvaluated(t,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=jr.mergeEvaluated.props(n,t.props,o.props,r)),o.items!==!0&&t.items!==void 0&&(o.items=jr.mergeEvaluated.items(n,t.items,o.items,r)))}mergeValidEvaluated(t,r){let{it:o,gen:n}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,Z.Name)),!0}};cn.KeywordCxt=md;function Ux(e,t,r,o){let n=new md(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,Pa.funcKeywordCode)(n,r):"macro"in r?(0,Pa.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Pa.funcKeywordCode)(n,r)}var ZD=/^\/(?:[^~]|~0|~1)*$/,VD=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Lx(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,i;if(e==="")return B.default.rootData;if(e[0]==="/"){if(!ZD.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=B.default.rootData}else{let u=VD.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(n=u[2],n==="#"){if(l>=t)throw new Error(c("property/index",l));return o[t-l]}if(l>t)throw new Error(c("data",l));if(i=r[t-l],!n)return i}let s=i,a=n.split("/");for(let u of a)u&&(i=(0,Z._)`${i}${(0,Z.getProperty)((0,jr.unescapeJsonPointer)(u))}`,s=(0,Z._)`${s} && ${i}`);return s;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}cn.getData=Lx});var hd=w(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});var n_=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};o_.default=n_});var Ea=w(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});var i_=Sa(),s_=class extends Error{constructor(t,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,i_.resolveUrl)(t,r,o),this.missingSchema=(0,i_.normalizeId)((0,i_.getFullPath)(t,this.missingRef))}};a_.default=s_});var _d=w(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.resolveSchema=Zt.getCompilingSchema=Zt.resolveRef=Zt.compileSchema=Zt.SchemaEnv=void 0;var tr=X(),FD=hd(),Vn=Rr(),rr=Sa(),Zx=me(),WD=za(),ri=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let o;typeof t.schema=="object"&&(o=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,rr.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};Zt.SchemaEnv=ri;function u_(e){let t=Vx.call(this,e);if(t)return t;let r=(0,rr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,s=new tr.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:FD.default,code:(0,tr._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Vn.default.data,parentData:Vn.default.parentData,parentDataProperty:Vn.default.parentDataProperty,dataNames:[Vn.default.data],dataPathArr:[tr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,tr.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:tr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,tr._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,WD.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let d=s.toString();l=`${s.scopeRefs(Vn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let m=new Function(`${Vn.default.self}`,`${Vn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:p,items:f}=u;m.evaluated={props:p instanceof tr.Name?void 0:p,items:f instanceof tr.Name?void 0:f,dynamicProps:p instanceof tr.Name,dynamicItems:f instanceof tr.Name},m.source&&(m.source.evaluated=(0,tr.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}Zt.compileSchema=u_;function GD(e,t,r){var o;r=(0,rr.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let i=HD.call(this,e,r);if(i===void 0){let s=(o=e.localRefs)===null||o===void 0?void 0:o[r],{schemaId:a}=this.opts;s&&(i=new ri({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=KD.call(this,i)}Zt.resolveRef=GD;function KD(e){return(0,rr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u_.call(this,e)}function Vx(e){for(let t of this._compilations)if(BD(t,e))return t}Zt.getCompilingSchema=Vx;function BD(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function HD(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||gd.call(this,e,t)}function gd(e,t){let r=this.opts.uriResolver.parse(t),o=(0,rr._getFullPath)(this.opts.uriResolver,r),n=(0,rr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return c_.call(this,r,e);let i=(0,rr.normalizeId)(o),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=gd.call(this,e,s);return typeof a?.schema!="object"?void 0:c_.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||u_.call(this,s),i===(0,rr.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(n=(0,rr.resolveUrl)(this.opts.uriResolver,n,u)),new ri({schema:a,schemaId:c,root:e,baseId:n})}return c_.call(this,r,s)}}Zt.resolveSchema=gd;var JD=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function c_(e,{baseId:t,schema:r,root:o}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Zx.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!JD.has(a)&&u&&(t=(0,rr.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Zx.schemaHasRulesButRef)(r,this.RULES)){let a=(0,rr.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=gd.call(this,o,a)}let{schemaId:s}=this.opts;if(i=i||new ri({schema:r,schemaId:s,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var Fx=w((r3,QD)=>{QD.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 Gx=w(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});var Wx=Th();Wx.code='require("ajv/dist/runtime/uri").default';l_.default=Wx});var eS=w(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.CodeGen=Ye.Name=Ye.nil=Ye.stringify=Ye.str=Ye._=Ye.KeywordCxt=void 0;var YD=za();Object.defineProperty(Ye,"KeywordCxt",{enumerable:!0,get:function(){return YD.KeywordCxt}});var ni=X();Object.defineProperty(Ye,"_",{enumerable:!0,get:function(){return ni._}});Object.defineProperty(Ye,"str",{enumerable:!0,get:function(){return ni.str}});Object.defineProperty(Ye,"stringify",{enumerable:!0,get:function(){return ni.stringify}});Object.defineProperty(Ye,"nil",{enumerable:!0,get:function(){return ni.nil}});Object.defineProperty(Ye,"Name",{enumerable:!0,get:function(){return ni.Name}});Object.defineProperty(Ye,"CodeGen",{enumerable:!0,get:function(){return ni.CodeGen}});var XD=hd(),Qx=Ea(),eq=Wg(),Ia=_d(),tq=X(),Na=Sa(),vd=xa(),p_=me(),Kx=Fx(),rq=Gx(),Yx=(e,t)=>new RegExp(e,t);Yx.code="new RegExp";var nq=["removeAdditional","useDefaults","coerceTypes"],oq=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),iq={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."},sq={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Bx=200;function aq(e){var t,r,o,n,i,s,a,c,u,l,d,h,m,p,f,_,y,$,k,N,P,ze,Me,ir,pn;let Ft=e.strict,fn=(t=e.code)===null||t===void 0?void 0:t.optimize,pi=fn===!0||fn===void 0?1:fn||0,fi=(o=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&o!==void 0?o:Yx,Vd=(n=e.uriResolver)!==null&&n!==void 0?n:rq.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:Ft)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:Ft)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:Ft)!==null&&l!==void 0?l:"log",strictTuples:(h=(d=e.strictTuples)!==null&&d!==void 0?d:Ft)!==null&&h!==void 0?h:"log",strictRequired:(p=(m=e.strictRequired)!==null&&m!==void 0?m:Ft)!==null&&p!==void 0?p:!1,code:e.code?{...e.code,optimize:pi,regExp:fi}:{optimize:pi,regExp:fi},loopRequired:(f=e.loopRequired)!==null&&f!==void 0?f:Bx,loopEnum:(_=e.loopEnum)!==null&&_!==void 0?_:Bx,meta:(y=e.meta)!==null&&y!==void 0?y:!0,messages:($=e.messages)!==null&&$!==void 0?$:!0,inlineRefs:(k=e.inlineRefs)!==null&&k!==void 0?k:!0,schemaId:(N=e.schemaId)!==null&&N!==void 0?N:"$id",addUsedSchema:(P=e.addUsedSchema)!==null&&P!==void 0?P:!0,validateSchema:(ze=e.validateSchema)!==null&&ze!==void 0?ze:!0,validateFormats:(Me=e.validateFormats)!==null&&Me!==void 0?Me:!0,unicodeRegExp:(ir=e.unicodeRegExp)!==null&&ir!==void 0?ir:!0,int32range:(pn=e.int32range)!==null&&pn!==void 0?pn:!0,uriResolver:Vd}}var Oa=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...aq(t)};let{es5:r,lines:o}=this.opts.code;this.scope=new tq.ValueScope({scope:{},prefixes:oq,es5:r,lines:o}),this.logger=fq(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,eq.getRules)(),Hx.call(this,iq,t,"NOT SUPPORTED"),Hx.call(this,sq,t,"DEPRECATED","warn"),this._metaOpts=dq.call(this),t.formats&&uq.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&lq.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),cq.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:o}=this.opts,n=Kx;o==="id"&&(n={...Kx},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let o;if(typeof t=="string"){if(o=this.getSchema(t),!o)throw new Error(`no schema with key or ref "${t}"`)}else o=this.compile(t);let n=o(r);return"$async"in o||(this.errors=o.errors),n}compile(t,r){let o=this._addSchema(t,r);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return n.call(this,t,r);async function n(l,d){await i.call(this,l.$schema);let h=this._addSchema(l,d);return h.validate||s.call(this,h)}async function i(l){l&&!this.getSchema(l)&&await n.call(this,{$ref:l},!0)}async function s(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof Qx.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,l)}}function a({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 i.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]=o(l))}finally{delete this._loading[l]}}}addSchema(t,r,o,n=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,o,n);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,Na.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,o,r,n,!0),this}addMetaSchema(t,r,o=this.opts.validateSchema){return this.addSchema(t,r,!0,o),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let o;if(o=t.$schema,o!==void 0&&typeof o!="string")throw new Error("$schema must be a string");if(o=o||this.opts.defaultMeta||this.defaultMeta(),!o)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(o,t);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(t){let r;for(;typeof(r=Jx.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:o}=this.opts,n=new Ia.SchemaEnv({schema:{},schemaId:o});if(r=Ia.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Jx.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let o=t[this.opts.schemaId];return o&&(o=(0,Na.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let o;if(typeof t=="string")o=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=o);else if(typeof t=="object"&&r===void 0){if(r=t,o=r.keyword,Array.isArray(o)&&!o.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(hq.call(this,o,r),!r)return(0,p_.eachItem)(o,i=>d_.call(this,i)),this;_q.call(this,r);let n={...r,type:(0,vd.getJSONTypes)(r.type),schemaType:(0,vd.getJSONTypes)(r.schemaType)};return(0,p_.eachItem)(o,n.type.length===0?i=>d_.call(this,i,n):i=>n.type.forEach(s=>d_.call(this,i,n,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let o of r.rules){let n=o.rules.findIndex(i=>i.keyword===t);n>=0&&o.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${o}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(t,r){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let i=n.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in o){let c=o[a];if(typeof c!="object")continue;let{$data:u}=c.definition,l=s[a];u&&l&&(s[a]=Xx(l))}}return t}_removeAllSchemas(t,r){for(let o in t){let n=t[o];(!r||r.test(o))&&(typeof n=="string"?delete t[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[o]))}}_addSchema(t,r,o,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;o=(0,Na.normalizeId)(s||o);let u=Na.getSchemaRefs.call(this,t,o);return c=new Ia.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),n&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Ia.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Ia.compileSchema.call(this,t)}finally{this.opts=r}}};Oa.ValidationError=XD.default;Oa.MissingRefError=Qx.default;Ye.default=Oa;function Hx(e,t,r,o="error"){for(let n in e){let i=n;i in t&&this.logger[o](`${r}: option ${n}. ${e[i]}`)}}function Jx(e){return e=(0,Na.normalizeId)(e),this.schemas[e]||this.refs[e]}function cq(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function uq(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function lq(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function dq(){let e={...this.opts};for(let t of nq)delete e[t];return e}var pq={log(){},warn(){},error(){}};function fq(e){if(e===!1)return pq;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var mq=/^[a-z_$][a-z0-9_$:-]*$/i;function hq(e,t){let{RULES:r}=this;if((0,p_.eachItem)(e,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!mq.test(o))throw new Error(`Keyword ${o} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function d_(e,t,r){var o;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=n?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,vd.getJSONTypes)(t.type),schemaType:(0,vd.getJSONTypes)(t.schemaType)}};t.before?gq.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(o=t.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function gq(e,t,r){let o=e.rules.findIndex(n=>n.keyword===r);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function _q(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Xx(t)),e.validateSchema=this.compile(t,!0))}var vq={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Xx(e){return{anyOf:[e,vq]}}});var tS=w(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});var yq={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};f_.default=yq});var iS=w(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.callRef=Fn.getValidate=void 0;var bq=Ea(),rS=Lt(),St=X(),oi=Rr(),nS=_d(),yd=me(),wq={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:s,opts:a,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=nS.resolveRef.call(c,u,n,r);if(l===void 0)throw new bq.default(o.opts.uriResolver,n,r);if(l instanceof nS.SchemaEnv)return h(l);return m(l);function d(){if(i===u)return bd(e,s,i,i.$async);let p=t.scopeValue("root",{ref:u});return bd(e,(0,St._)`${p}.validate`,u,u.$async)}function h(p){let f=oS(e,p);bd(e,f,p,p.$async)}function m(p){let f=t.scopeValue("schema",a.code.source===!0?{ref:p,code:(0,St.stringify)(p)}:{ref:p}),_=t.name("valid"),y=e.subschema({schema:p,dataTypes:[],schemaPath:St.nil,topSchemaRef:f,errSchemaPath:r},_);e.mergeEvaluated(y),e.ok(_)}}};function oS(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,St._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Fn.getValidate=oS;function bd(e,t,r,o){let{gen:n,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?oi.default.this:St.nil;o?l():d();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");let p=n.let("valid");n.try(()=>{n.code((0,St._)`await ${(0,rS.callValidateCode)(e,t,u)}`),m(t),s||n.assign(p,!0)},f=>{n.if((0,St._)`!(${f} instanceof ${i.ValidationError})`,()=>n.throw(f)),h(f),s||n.assign(p,!1)}),e.ok(p)}function d(){e.result((0,rS.callValidateCode)(e,t,u),()=>m(t),()=>h(t))}function h(p){let f=(0,St._)`${p}.errors`;n.assign(oi.default.vErrors,(0,St._)`${oi.default.vErrors} === null ? ${f} : ${oi.default.vErrors}.concat(${f})`),n.assign(oi.default.errors,(0,St._)`${oi.default.vErrors}.length`)}function m(p){var f;if(!i.opts.unevaluated)return;let _=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(i.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(i.props=yd.mergeEvaluated.props(n,_.props,i.props));else{let y=n.var("props",(0,St._)`${p}.evaluated.props`);i.props=yd.mergeEvaluated.props(n,y,i.props,St.Name)}if(i.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(i.items=yd.mergeEvaluated.items(n,_.items,i.items));else{let y=n.var("items",(0,St._)`${p}.evaluated.items`);i.items=yd.mergeEvaluated.items(n,y,i.items,St.Name)}}}Fn.callRef=bd;Fn.default=wq});var sS=w(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});var $q=tS(),kq=iS(),xq=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",$q.default,kq.default];m_.default=xq});var aS=w(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});var wd=X(),un=wd.operators,$d={maximum:{okStr:"<=",ok:un.LTE,fail:un.GT},minimum:{okStr:">=",ok:un.GTE,fail:un.LT},exclusiveMaximum:{okStr:"<",ok:un.LT,fail:un.GTE},exclusiveMinimum:{okStr:">",ok:un.GT,fail:un.LTE}},Sq={message:({keyword:e,schemaCode:t})=>(0,wd.str)`must be ${$d[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wd._)`{comparison: ${$d[e].okStr}, limit: ${t}}`},Tq={keyword:Object.keys($d),type:"number",schemaType:"number",$data:!0,error:Sq,code(e){let{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,wd._)`${r} ${$d[t].fail} ${o} || isNaN(${r})`)}};h_.default=Tq});var cS=w(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});var Ra=X(),Pq={message:({schemaCode:e})=>(0,Ra.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ra._)`{multipleOf: ${e}}`},zq={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Pq,code(e){let{gen:t,data:r,schemaCode:o,it:n}=e,i=n.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,Ra._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Ra._)`${s} !== parseInt(${s})`;e.fail$data((0,Ra._)`(${o} === 0 || (${s} = ${r}/${o}, ${a}))`)}};g_.default=zq});var lS=w(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});function uS(e){let t=e.length,r=0,o=0,n;for(;o<t;)r++,n=e.charCodeAt(o++),n>=55296&&n<=56319&&o<t&&(n=e.charCodeAt(o),(n&64512)===56320&&o++);return r}__.default=uS;uS.code='require("ajv/dist/runtime/ucs2length").default'});var dS=w(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});var Wn=X(),Eq=me(),Iq=lS(),Nq={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Wn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Wn._)`{limit: ${e}}`},Oq={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Nq,code(e){let{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?Wn.operators.GT:Wn.operators.LT,s=n.opts.unicode===!1?(0,Wn._)`${r}.length`:(0,Wn._)`${(0,Eq.useFunc)(e.gen,Iq.default)}(${r})`;e.fail$data((0,Wn._)`${s} ${i} ${o}`)}};v_.default=Oq});var pS=w(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});var Rq=Lt(),jq=me(),ii=X(),Aq={message:({schemaCode:e})=>(0,ii.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,ii._)`{pattern: ${e}}`},Cq={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Aq,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=s.opts.code,u=c.code==="new RegExp"?(0,ii._)`new RegExp`:(0,jq.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,ii._)`${u}(${i}, ${a}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,ii._)`!${l}`)}else{let c=(0,Rq.usePattern)(e,n);e.fail$data((0,ii._)`!${c}.test(${r})`)}}};y_.default=Cq});var fS=w(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});var ja=X(),Dq={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,ja.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,ja._)`{limit: ${e}}`},qq={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Dq,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxProperties"?ja.operators.GT:ja.operators.LT;e.fail$data((0,ja._)`Object.keys(${r}).length ${n} ${o}`)}};b_.default=qq});var mS=w(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});var Aa=Lt(),Ca=X(),Mq=me(),Uq={message:({params:{missingProperty:e}})=>(0,Ca.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Ca._)`{missingProperty: ${e}}`},Lq={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Uq,code(e){let{gen:t,schema:r,schemaCode:o,data:n,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():l(),a.strictRequired){let m=e.parentSchema.properties,{definedProperties:p}=e.it;for(let f of r)if(m?.[f]===void 0&&!p.has(f)){let _=s.schemaEnv.baseId+s.errSchemaPath,y=`required property "${f}" is not defined at "${_}" (strictRequired)`;(0,Mq.checkStrictMode)(s,y,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(Ca.nil,d);else for(let m of r)(0,Aa.checkReportMissingProp)(e,m)}function l(){let m=t.let("missing");if(c||i){let p=t.let("valid",!0);e.block$data(p,()=>h(m,p)),e.ok(p)}else t.if((0,Aa.checkMissingProp)(e,r,m)),(0,Aa.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",o,m=>{e.setParams({missingProperty:m}),t.if((0,Aa.noPropertyInData)(t,n,m,a.ownProperties),()=>e.error())})}function h(m,p){e.setParams({missingProperty:m}),t.forOf(m,o,()=>{t.assign(p,(0,Aa.propertyInData)(t,n,m,a.ownProperties)),t.if((0,Ca.not)(p),()=>{e.error(),t.break()})},Ca.nil)}}};w_.default=Lq});var hS=w($_=>{"use strict";Object.defineProperty($_,"__esModule",{value:!0});var Da=X(),Zq={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,Da.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Da._)`{limit: ${e}}`},Vq={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Zq,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxItems"?Da.operators.GT:Da.operators.LT;e.fail$data((0,Da._)`${r}.length ${n} ${o}`)}};$_.default=Vq});var kd=w(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});var gS=Js();gS.code='require("ajv/dist/runtime/equal").default';k_.default=gS});var _S=w(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});var x_=xa(),Xe=X(),Fq=me(),Wq=kd(),Gq={message:({params:{i:e,j:t}})=>(0,Xe.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Xe._)`{i: ${e}, j: ${t}}`},Kq={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Gq,code(e){let{gen:t,data:r,$data:o,schema:n,parentSchema:i,schemaCode:s,it:a}=e;if(!o&&!n)return;let c=t.let("valid"),u=i.items?(0,x_.getSchemaTypes)(i.items):[];e.block$data(c,l,(0,Xe._)`${s} === false`),e.ok(c);function l(){let p=t.let("i",(0,Xe._)`${r}.length`),f=t.let("j");e.setParams({i:p,j:f}),t.assign(c,!0),t.if((0,Xe._)`${p} > 1`,()=>(d()?h:m)(p,f))}function d(){return u.length>0&&!u.some(p=>p==="object"||p==="array")}function h(p,f){let _=t.name("item"),y=(0,x_.checkDataTypes)(u,_,a.opts.strictNumbers,x_.DataType.Wrong),$=t.const("indices",(0,Xe._)`{}`);t.for((0,Xe._)`;${p}--;`,()=>{t.let(_,(0,Xe._)`${r}[${p}]`),t.if(y,(0,Xe._)`continue`),u.length>1&&t.if((0,Xe._)`typeof ${_} == "string"`,(0,Xe._)`${_} += "_"`),t.if((0,Xe._)`typeof ${$}[${_}] == "number"`,()=>{t.assign(f,(0,Xe._)`${$}[${_}]`),e.error(),t.assign(c,!1).break()}).code((0,Xe._)`${$}[${_}] = ${p}`)})}function m(p,f){let _=(0,Fq.useFunc)(t,Wq.default),y=t.name("outer");t.label(y).for((0,Xe._)`;${p}--;`,()=>t.for((0,Xe._)`${f} = ${p}; ${f}--;`,()=>t.if((0,Xe._)`${_}(${r}[${p}], ${r}[${f}])`,()=>{e.error(),t.assign(c,!1).break(y)})))}}};S_.default=Kq});var vS=w(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});var T_=X(),Bq=me(),Hq=kd(),Jq={message:"must be equal to constant",params:({schemaCode:e})=>(0,T_._)`{allowedValue: ${e}}`},Qq={keyword:"const",$data:!0,error:Jq,code(e){let{gen:t,data:r,$data:o,schemaCode:n,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,T_._)`!${(0,Bq.useFunc)(t,Hq.default)}(${r}, ${n})`):e.fail((0,T_._)`${i} !== ${r}`)}};P_.default=Qq});var yS=w(z_=>{"use strict";Object.defineProperty(z_,"__esModule",{value:!0});var qa=X(),Yq=me(),Xq=kd(),eM={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,qa._)`{allowedValues: ${e}}`},tM={keyword:"enum",schemaType:"array",$data:!0,error:eM,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:s}=e;if(!o&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,Yq.useFunc)(t,Xq.default)),l;if(a||o)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let m=t.const("vSchema",i);l=(0,qa.or)(...n.map((p,f)=>h(m,f)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",i,m=>t.if((0,qa._)`${u()}(${r}, ${m})`,()=>t.assign(l,!0).break()))}function h(m,p){let f=n[p];return typeof f=="object"&&f!==null?(0,qa._)`${u()}(${r}, ${m}[${p}])`:(0,qa._)`${r} === ${f}`}}};z_.default=tM});var bS=w(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});var rM=aS(),nM=cS(),oM=dS(),iM=pS(),sM=fS(),aM=mS(),cM=hS(),uM=_S(),lM=vS(),dM=yS(),pM=[rM.default,nM.default,oM.default,iM.default,sM.default,aM.default,cM.default,uM.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},lM.default,dM.default];E_.default=pM});var N_=w(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.validateAdditionalItems=void 0;var Gn=X(),I_=me(),fM={message:({params:{len:e}})=>(0,Gn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Gn._)`{limit: ${e}}`},mM={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:fM,code(e){let{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,I_.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}wS(e,o)}};function wS(e,t){let{gen:r,schema:o,data:n,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Gn._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,Gn._)`${a} <= ${t.length}`);else if(typeof o=="object"&&!(0,I_.alwaysValidSchema)(s,o)){let u=r.var("valid",(0,Gn._)`${a} <= ${t.length}`);r.if((0,Gn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:I_.Type.Num},u),s.allErrors||r.if((0,Gn.not)(u),()=>r.break())})}}Ma.validateAdditionalItems=wS;Ma.default=mM});var O_=w(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.validateTuple=void 0;var $S=X(),xd=me(),hM=Lt(),gM={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return kS(e,"additionalItems",t);r.items=!0,!(0,xd.alwaysValidSchema)(r,t)&&e.ok((0,hM.validateArray)(e))}};function kS(e,t,r=e.schema){let{gen:o,parentSchema:n,data:i,keyword:s,it:a}=e;l(n),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=xd.mergeEvaluated.items(o,r.length,a.items));let c=o.name("valid"),u=o.const("len",(0,$S._)`${i}.length`);r.forEach((d,h)=>{(0,xd.alwaysValidSchema)(a,d)||(o.if((0,$S._)`${u} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},c)),e.ok(c))});function l(d){let{opts:h,errSchemaPath:m}=a,p=r.length,f=p===d.minItems&&(p===d.maxItems||d[t]===!1);if(h.strictTuples&&!f){let _=`"${s}" is ${p}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,xd.checkStrictMode)(a,_,h.strictTuples)}}}Ua.validateTuple=kS;Ua.default=gM});var xS=w(R_=>{"use strict";Object.defineProperty(R_,"__esModule",{value:!0});var _M=O_(),vM={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,_M.validateTuple)(e,"items")};R_.default=vM});var TS=w(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});var SS=X(),yM=me(),bM=Lt(),wM=N_(),$M={message:({params:{len:e}})=>(0,SS.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,SS._)`{limit: ${e}}`},kM={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:$M,code(e){let{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,yM.alwaysValidSchema)(o,t)&&(n?(0,wM.validateAdditionalItems)(e,n):e.ok((0,bM.validateArray)(e)))}};j_.default=kM});var PS=w(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});var Vt=X(),Sd=me(),xM={message:({params:{min:e,max:t}})=>t===void 0?(0,Vt.str)`must contain at least ${e} valid item(s)`:(0,Vt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Vt._)`{minContains: ${e}}`:(0,Vt._)`{minContains: ${e}, maxContains: ${t}}`},SM={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:xM,code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e,s,a,{minContains:c,maxContains:u}=o;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let l=t.const("len",(0,Vt._)`${n}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,Sd.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,Sd.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Sd.alwaysValidSchema)(i,r)){let f=(0,Vt._)`${l} >= ${s}`;a!==void 0&&(f=(0,Vt._)`${f} && ${l} <= ${a}`),e.pass(f);return}i.items=!0;let d=t.name("valid");a===void 0&&s===1?m(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),a!==void 0&&t.if((0,Vt._)`${n}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){let f=t.name("_valid"),_=t.let("count",0);m(f,()=>t.if(f,()=>p(_)))}function m(f,_){t.forRange("i",0,l,y=>{e.subschema({keyword:"contains",dataProp:y,dataPropType:Sd.Type.Num,compositeRule:!0},f),_()})}function p(f){t.code((0,Vt._)`${f}++`),a===void 0?t.if((0,Vt._)`${f} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,Vt._)`${f} > ${a}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,Vt._)`${f} >= ${s}`,()=>t.assign(d,!0)))}}};A_.default=SM});var IS=w(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.validateSchemaDeps=gr.validatePropertyDeps=gr.error=void 0;var C_=X(),TM=me(),La=Lt();gr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let o=t===1?"property":"properties";return(0,C_.str)`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>(0,C_._)`{property: ${e},
|
|
14
14
|
missingProperty: ${o},
|
|
15
15
|
depsCount: ${t},
|
|
16
|
-
deps: ${r}}`};var PM={keyword:"dependencies",type:"object",schemaType:"object",error:gr.error,code(e){let[t,r]=zM(e);zS(e,t),ES(e,r)}};function zM({schema:e}){let t={},r={};for(let o in e){if(o==="__proto__")continue;let n=Array.isArray(e[o])?t:r;n[o]=e[o]}return[t,r]}function zS(e,t=e.schema){let{gen:r,data:o,it:n}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,La.propertyInData)(r,o,s,n.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0,La.checkReportMissingProp)(e,u)}):(r.if((0,C_._)`${c} && (${(0,La.checkMissingProp)(e,a,i)})`),(0,La.reportMissingProp)(e,i),r.else())}}gr.validatePropertyDeps=zS;function ES(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,s=r.name("valid");for(let a in t)(0,TM.alwaysValidSchema)(i,t[a])||(r.if((0,La.propertyInData)(r,o,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}gr.validateSchemaDeps=ES;gr.default=PM});var OS=w(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});var NS=X(),EM=me(),IM={message:"property name must be valid",params:({params:e})=>(0,NS._)`{propertyName: ${e.propertyName}}`},NM={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:IM,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,EM.alwaysValidSchema)(n,r))return;let i=t.name("valid");t.forIn("key",o,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,NS.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};D_.default=NM});var M_=w(q_=>{"use strict";Object.defineProperty(q_,"__esModule",{value:!0});var Td=Lt(),nr=X(),OM=Rr(),Pd=me(),RM={message:"must NOT have additional properties",params:({params:e})=>(0,nr._)`{additionalProperty: ${e.additionalProperty}}`},jM={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:RM,code(e){let{gen:t,schema:r,parentSchema:o,data:n,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Pd.alwaysValidSchema)(s,r))return;let u=(0,Td.allSchemaProperties)(o.properties),l=(0,Td.allSchemaProperties)(o.patternProperties);d(),e.ok((0,nr._)`${i} === ${OM.default.errors}`);function d(){t.forIn("key",n,_=>{!u.length&&!l.length?p(_):t.if(h(_),()=>p(_))})}function h(_){let y;if(u.length>8){let $=(0,Pd.schemaRefOrVal)(s,o.properties,"properties");y=(0,Td.isOwnProperty)(t,$,_)}else u.length?y=(0,nr.or)(...u.map($=>(0,nr._)`${_} === ${$}`)):y=nr.nil;return l.length&&(y=(0,nr.or)(y,...l.map($=>(0,nr._)`${(0,Td.usePattern)(e,$)}.test(${_})`))),(0,nr.not)(y)}function m(_){t.code((0,nr._)`delete ${n}[${_}]`)}function p(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Pd.alwaysValidSchema)(s,r)){let y=t.name("valid");c.removeAdditional==="failing"?(f(_,y,!1),t.if((0,nr.not)(y),()=>{e.reset(),m(_)})):(f(_,y),a||t.if((0,nr.not)(y),()=>t.break()))}}function f(_,y,$){let k={keyword:"additionalProperties",dataProp:_,dataPropType:Pd.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};q_.default=jM});var AS=w(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});var AM=za(),RS=Lt(),U_=me(),jS=M_(),CM={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&jS.default.code(new AM.KeywordCxt(i,jS.default,"additionalProperties"));let s=(0,RS.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=U_.mergeEvaluated.props(t,(0,U_.toHash)(s),i.props));let a=s.filter(d=>!(0,U_.alwaysValidSchema)(i,r[d]));if(a.length===0)return;let c=t.name("valid");for(let d of a)u(d)?l(d):(t.if((0,RS.propertyInData)(t,n,d,i.opts.ownProperties)),l(d),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return i.opts.useDefaults&&!i.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};L_.default=CM});var MS=w(Z_=>{"use strict";Object.defineProperty(Z_,"__esModule",{value:!0});var CS=Lt(),zd=X(),DS=me(),qS=me(),DM={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:n,it:i}=e,{opts:s}=i,a=(0,CS.allSchemaProperties)(r),c=a.filter(f=>(0,DS.alwaysValidSchema)(i,r[f]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&n.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof zd.Name)&&(i.props=(0,qS.evaluatedPropsToName)(t,i.props));let{props:d}=i;h();function h(){for(let f of a)u&&m(f),i.allErrors?p(f):(t.var(l,!0),p(f),t.if(l))}function m(f){for(let _ in u)new RegExp(f).test(_)&&(0,DS.checkStrictMode)(i,`property ${_} matches pattern ${f} (use allowMatchingProperties)`)}function p(f){t.forIn("key",o,_=>{t.if((0,zd._)`${(0,CS.usePattern)(e,f)}.test(${_})`,()=>{let y=c.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:_,dataPropType:qS.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,zd._)`${d}[${_}]`,!0):!y&&!i.allErrors&&t.if((0,zd.not)(l),()=>t.break())})})}}};Z_.default=DM});var US=w(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});var qM=me(),MM={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,qM.alwaysValidSchema)(o,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};V_.default=MM});var LS=w(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});var UM=Lt(),LM={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:UM.validateUnion,error:{message:"must match a schema in anyOf"}};F_.default=LM});var ZS=w(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});var Ed=X(),ZM=me(),VM={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ed._)`{passingSchemas: ${e.passing}}`},FM={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:VM,code(e){let{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((l,d)=>{let h;(0,ZM.alwaysValidSchema)(n,l)?t.var(c,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Ed._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Ed._)`[${a}, ${d}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,d),h&&e.mergeEvaluated(h,Ed.Name)})})}}};W_.default=FM});var VS=w(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});var WM=me(),GM={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((i,s)=>{if((0,WM.alwaysValidSchema)(o,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};G_.default=GM});var GS=w(K_=>{"use strict";Object.defineProperty(K_,"__esModule",{value:!0});var Id=X(),WS=me(),KM={message:({params:e})=>(0,Id.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Id._)`{failingKeyword: ${e.ifClause}}`},BM={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:KM,code(e){let{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,WS.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=FS(o,"then"),i=FS(o,"else");if(!n&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),n&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,u("then",l),u("else",l))}else n?t.if(a,u("then")):t.if((0,Id.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function u(l,d){return()=>{let h=e.subschema({keyword:l},a);t.assign(s,a),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,Id._)`${l}`):e.setParams({ifClause:l})}}}};function FS(e,t){let r=e.schema[t];return r!==void 0&&!(0,WS.alwaysValidSchema)(e,r)}K_.default=BM});var KS=w(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});var HM=me(),JM={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,HM.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};B_.default=JM});var BS=w(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});var QM=N_(),YM=xS(),XM=O_(),e4=TS(),t4=PS(),r4=IS(),n4=OS(),o4=M_(),i4=AS(),s4=MS(),a4=US(),c4=LS(),u4=ZS(),l4=VS(),d4=GS(),p4=KS();function f4(e=!1){let t=[a4.default,c4.default,u4.default,l4.default,d4.default,p4.default,n4.default,o4.default,r4.default,i4.default,s4.default];return e?t.push(YM.default,e4.default):t.push(QM.default,XM.default),t.push(t4.default),t}H_.default=f4});var HS=w(J_=>{"use strict";Object.defineProperty(J_,"__esModule",{value:!0});var Ve=X(),m4={message:({schemaCode:e})=>(0,Ve.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ve._)`{format: ${e}}`},h4={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:m4,code(e,t){let{gen:r,data:o,$data:n,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;n?h():m();function h(){let p=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,Ve._)`${p}[${s}]`),_=r.let("fType"),y=r.let("format");r.if((0,Ve._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(_,(0,Ve._)`${f}.type || "string"`).assign(y,(0,Ve._)`${f}.validate`),()=>r.assign(_,(0,Ve._)`"string"`).assign(y,f)),e.fail$data((0,Ve.or)($(),k()));function $(){return c.strictSchema===!1?Ve.nil:(0,Ve._)`${s} && !${y}`}function k(){let N=l.$async?(0,Ve._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Ve._)`${y}(${o})`,P=(0,Ve._)`(typeof ${y} == "function" ? ${N} : ${y}.test(${o}))`;return(0,Ve._)`${y} && ${y} !== true && ${_} === ${t} && !${P}`}}function m(){let p=d.formats[i];if(!p){$();return}if(p===!0)return;let[f,_,y]=k(p);f===t&&e.pass(N());function $(){if(c.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(P){let ze=P instanceof RegExp?(0,Ve.regexpCode)(P):c.code.formats?(0,Ve._)`${c.code.formats}${(0,Ve.getProperty)(i)}`:void 0,Me=r.scopeValue("formats",{key:i,ref:P,code:ze});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,Ve._)`${Me}.validate`]:["string",P,Me]}function N(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ve._)`await ${y}(${o})`}return typeof _=="function"?(0,Ve._)`${y}(${o})`:(0,Ve._)`${y}.test(${o})`}}}};J_.default=h4});var JS=w(Q_=>{"use strict";Object.defineProperty(Q_,"__esModule",{value:!0});var g4=HS(),_4=[g4.default];Q_.default=_4});var QS=w(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.contentVocabulary=si.metadataVocabulary=void 0;si.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];si.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var XS=w(Y_=>{"use strict";Object.defineProperty(Y_,"__esModule",{value:!0});var v4=sS(),y4=bS(),b4=BS(),w4=JS(),YS=QS(),$4=[v4.default,y4.default,(0,b4.default)(),w4.default,YS.metadataVocabulary,YS.contentVocabulary];Y_.default=$4});var t0=w(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.DiscrError=void 0;var e0;(function(e){e.Tag="tag",e.Mapping="mapping"})(e0||(Nd.DiscrError=e0={}))});var n0=w(ev=>{"use strict";Object.defineProperty(ev,"__esModule",{value:!0});var ai=X(),X_=t0(),r0=_d(),k4=Ea(),x4=me(),S4={message:({params:{discrError:e,tagName:t}})=>e===X_.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,ai._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},T4={keyword:"discriminator",type:"object",schemaType:"object",error:S4,code(e){let{gen:t,data:r,schema:o,parentSchema:n,it:i}=e,{oneOf:s}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=o.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,ai._)`${r}${(0,ai.getProperty)(a)}`);t.if((0,ai._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:X_.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function l(){let m=h();t.if(!1);for(let p in m)t.elseIf((0,ai._)`${u} === ${p}`),t.assign(c,d(m[p]));t.else(),e.error(!1,{discrError:X_.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function d(m){let p=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:m},p);return e.mergeEvaluated(f,ai.Name),p}function h(){var m;let p={},f=y(n),_=!0;for(let N=0;N<s.length;N++){let P=s[N];if(P?.$ref&&!(0,x4.schemaHasRulesButRef)(P,i.self.RULES)){let Me=P.$ref;if(P=r0.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Me),P instanceof r0.SchemaEnv&&(P=P.schema),P===void 0)throw new k4.default(i.opts.uriResolver,i.baseId,Me)}let ze=(m=P?.properties)===null||m===void 0?void 0:m[a];if(typeof ze!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(f||y(P)),$(ze,N)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:N}){return Array.isArray(N)&&N.includes(a)}function $(N,P){if(N.const)k(N.const,P);else if(N.enum)for(let ze of N.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(N,P){if(typeof N!="string"||N in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[N]=P}}}};ev.default=T4});var o0=w((F3,P4)=>{P4.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 s0=w((Ce,tv)=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.MissingRefError=Ce.ValidationError=Ce.CodeGen=Ce.Name=Ce.nil=Ce.stringify=Ce.str=Ce._=Ce.KeywordCxt=Ce.Ajv=void 0;var z4=eS(),E4=XS(),I4=n0(),i0=o0(),N4=["/properties"],Od="http://json-schema.org/draft-07/schema",ci=class extends z4.default{_addVocabularies(){super._addVocabularies(),E4.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(I4.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(i0,N4):i0;this.addMetaSchema(t,Od,!1),this.refs["http://json-schema.org/schema"]=Od}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Od)?Od:void 0)}};Ce.Ajv=ci;tv.exports=Ce=ci;tv.exports.Ajv=ci;Object.defineProperty(Ce,"__esModule",{value:!0});Ce.default=ci;var O4=za();Object.defineProperty(Ce,"KeywordCxt",{enumerable:!0,get:function(){return O4.KeywordCxt}});var ui=X();Object.defineProperty(Ce,"_",{enumerable:!0,get:function(){return ui._}});Object.defineProperty(Ce,"str",{enumerable:!0,get:function(){return ui.str}});Object.defineProperty(Ce,"stringify",{enumerable:!0,get:function(){return ui.stringify}});Object.defineProperty(Ce,"nil",{enumerable:!0,get:function(){return ui.nil}});Object.defineProperty(Ce,"Name",{enumerable:!0,get:function(){return ui.Name}});Object.defineProperty(Ce,"CodeGen",{enumerable:!0,get:function(){return ui.CodeGen}});var R4=hd();Object.defineProperty(Ce,"ValidationError",{enumerable:!0,get:function(){return R4.default}});var j4=Ea();Object.defineProperty(Ce,"MissingRefError",{enumerable:!0,get:function(){return j4.default}})});var a0=w(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.formatLimitDefinition=void 0;var A4=s0(),or=X(),ln=or.operators,Rd={formatMaximum:{okStr:"<=",ok:ln.LTE,fail:ln.GT},formatMinimum:{okStr:">=",ok:ln.GTE,fail:ln.LT},formatExclusiveMaximum:{okStr:"<",ok:ln.LT,fail:ln.GTE},formatExclusiveMinimum:{okStr:">",ok:ln.GT,fail:ln.LTE}},C4={message:({keyword:e,schemaCode:t})=>(0,or.str)`should be ${Rd[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,or._)`{comparison: ${Rd[e].okStr}, limit: ${t}}`};li.formatLimitDefinition={keyword:Object.keys(Rd),type:"string",schemaType:"string",$data:!0,error:C4,code(e){let{gen:t,data:r,schemaCode:o,keyword:n,it:i}=e,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new A4.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?u():l();function u(){let h=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),m=t.const("fmt",(0,or._)`${h}[${c.schemaCode}]`);e.fail$data((0,or.or)((0,or._)`typeof ${m} != "object"`,(0,or._)`${m} instanceof RegExp`,(0,or._)`typeof ${m}.compare != "function"`,d(m)))}function l(){let h=c.schema,m=a.formats[h];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${n}": format "${h}" does not define "compare" function`);let p=t.scopeValue("formats",{key:h,ref:m,code:s.code.formats?(0,or._)`${s.code.formats}${(0,or.getProperty)(h)}`:void 0});e.fail$data(d(p))}function d(h){return(0,or._)`${h}.compare(${r}, ${o}) ${Rd[n].fail} 0`}},dependencies:["format"]};var D4=e=>(e.addKeyword(li.formatLimitDefinition),e);li.default=D4});var d0=w((Za,l0)=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var di=Gk(),q4=a0(),rv=X(),c0=new rv.Name("fullFormats"),M4=new rv.Name("fastFormats"),nv=(e,t={keywords:!0})=>{if(Array.isArray(t))return u0(e,t,di.fullFormats,c0),e;let[r,o]=t.mode==="fast"?[di.fastFormats,M4]:[di.fullFormats,c0],n=t.formats||di.formatNames;return u0(e,n,r,o),t.keywords&&(0,q4.default)(e),e};nv.get=(e,t="full")=>{let o=(t==="fast"?di.fastFormats:di.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function u0(e,t,r,o){var n,i;(n=(i=e.opts.code).formats)!==null&&n!==void 0||(i.formats=(0,rv._)`require("ajv-formats/dist/formats").${o}`);for(let s of t)e.addFormat(s,r[s])}l0.exports=Za=nv;Object.defineProperty(Za,"__esModule",{value:!0});Za.default=nv});var Ge=w((ZB,z0)=>{var pv=Object.defineProperty,Q4=Object.getOwnPropertyDescriptor,Y4=Object.getOwnPropertyNames,X4=Object.prototype.hasOwnProperty,eU=(e,t)=>{for(var r in t)pv(e,r,{get:t[r],enumerable:!0})},tU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y4(t))!X4.call(e,n)&&n!==r&&pv(e,n,{get:()=>t[n],enumerable:!(o=Q4(t,n))||o.enumerable});return e},rU=e=>tU(pv({},"__esModule",{value:!0}),e),P0={};eU(P0,{APIV2Client:()=>cU,VantageAPIError:()=>Zd,pathEncode:()=>S});z0.exports=rU(P0);function S(e){return encodeURIComponent(e)}var nU={"/v2/exchange_rates/csv":{POST:!0},"/v2/business_metrics/{}/values.csv":{PUT:!0},"/v2/integrations/{}/costs.csv":{POST:!0}},Fa={};function oU(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}for(let[e,t]of Object.entries(nU)){let r=e.split("{}").map(oU).join("(.+?)");for(let[o,n]of Object.entries(t))n&&(Fa[o]||(Fa[o]=[]),Fa[o].push(new RegExp(`^${r}$`)))}function iU(e,t){if(Object.prototype.hasOwnProperty.call(Fa,e))for(let r of Fa[e]){let o=r.test(t);if(r.lastIndex=0,o)return!0}return!1}function sU(e,t){if(t)for(let[r,o]of Object.entries(t))e.searchParams.append(r,Array.isArray(o)?o.map(String).join(","):String(o))}var Zd=class extends Error{constructor(e,t,r){let o=null;if(e!==null)try{let i=JSON.parse(r);Array.isArray(i.errors)&&(o=i.errors)}catch{}let n=e===null?`Vantage API Error: ${r}`:`Vantage API Error: ${e} ${t}`+(o?` - ${o.join(", ")}`:"");super(n),this.status=e,this.statusText=t,this.body=r,this.errors=o}errors};async function dv(e,t,r,o,n){let i;try{i=await fetch(e.toString(),{method:t,headers:r,body:o})}catch(s){let a=s instanceof Error?s.message:String(s),c=new Zd(null,null,a);if(n)return[null,c];throw c}if(!i.ok){let s=new Zd(i.status,i.statusText,await i.text());if(n)return[null,s];throw s}if(i.status===204)return n?[void 0,null]:void 0;try{let s=await i.text(),a;return s&&(a=JSON.parse(s)),n?[a,null]:a}catch(s){let a=s instanceof Error?s.message:String(s),c=new Zd(i.status,i.statusText,a);if(n)return[null,c];throw c}}var aU=class{constructor(e,t,r){this.bearerToken=e,this.neverThrow=t,this.baseUrl=r}async request(e,t,r){let o=new URL(e,this.baseUrl),n={Authorization:`Bearer ${this.bearerToken}`};if(t==="GET")return sU(o,r),dv(o,t,n,void 0,this.neverThrow);if(iU(t,e)){let i=new FormData;for(let[s,a]of Object.entries(r))i.append(s,a);return n["Content-Type"]="multipart/form-data",dv(o,t,n,i,this.neverThrow)}return n["Content-Type"]="application/json",dv(o,t,n,JSON.stringify(r),this.neverThrow)}},cU=class extends aU{constructor(e,t=!1,r="https://api.vantage.sh"){super(e,t,r)}_accessGrants;_anomalyAlerts;_anomalyNotifications;_auditLogs;_billingProfiles;_billingRules;_budgetAlerts;_budgets;_businessMetrics;_costAlerts;_costProviderAccounts;_costReports;_costs;_dashboards;_dataExports;_exchangeRates;_financialCommitmentReports;_financialCommitments;_folders;_integrations;_invoices;_kubernetesEfficiencyReports;_managedAccounts;_me;_costProviders;_costServices;_userFeedback;_networkFlowReports;_products;_recommendations;_recommendationViews;_reportNotifications;_resourceReports;_resources;_savedFilters;_segments;_tags;_teams;_unitCosts;_users;_virtualTagConfigs;_workspaces;_ping;get accessGrants(){return this._accessGrants||(this._accessGrants=new uU(this)),this._accessGrants}get anomalyAlerts(){return this._anomalyAlerts||(this._anomalyAlerts=new lU(this)),this._anomalyAlerts}get anomalyNotifications(){return this._anomalyNotifications||(this._anomalyNotifications=new dU(this)),this._anomalyNotifications}get auditLogs(){return this._auditLogs||(this._auditLogs=new pU(this)),this._auditLogs}get billingProfiles(){return this._billingProfiles||(this._billingProfiles=new fU(this)),this._billingProfiles}get billingRules(){return this._billingRules||(this._billingRules=new mU(this)),this._billingRules}get budgetAlerts(){return this._budgetAlerts||(this._budgetAlerts=new hU(this)),this._budgetAlerts}get budgets(){return this._budgets||(this._budgets=new gU(this)),this._budgets}get businessMetrics(){return this._businessMetrics||(this._businessMetrics=new _U(this)),this._businessMetrics}get costAlerts(){return this._costAlerts||(this._costAlerts=new vU(this)),this._costAlerts}get costProviderAccounts(){return this._costProviderAccounts||(this._costProviderAccounts=new yU(this)),this._costProviderAccounts}get costReports(){return this._costReports||(this._costReports=new bU(this)),this._costReports}get costs(){return this._costs||(this._costs=new wU(this)),this._costs}get dashboards(){return this._dashboards||(this._dashboards=new $U(this)),this._dashboards}get dataExports(){return this._dataExports||(this._dataExports=new kU(this)),this._dataExports}get exchangeRates(){return this._exchangeRates||(this._exchangeRates=new xU(this)),this._exchangeRates}get financialCommitmentReports(){return this._financialCommitmentReports||(this._financialCommitmentReports=new SU(this)),this._financialCommitmentReports}get financialCommitments(){return this._financialCommitments||(this._financialCommitments=new TU(this)),this._financialCommitments}get folders(){return this._folders||(this._folders=new PU(this)),this._folders}get integrations(){return this._integrations||(this._integrations=new zU(this)),this._integrations}get invoices(){return this._invoices||(this._invoices=new EU(this)),this._invoices}get kubernetesEfficiencyReports(){return this._kubernetesEfficiencyReports||(this._kubernetesEfficiencyReports=new IU(this)),this._kubernetesEfficiencyReports}get managedAccounts(){return this._managedAccounts||(this._managedAccounts=new NU(this)),this._managedAccounts}get me(){return this._me||(this._me=new OU(this)),this._me}get costProviders(){return this._costProviders||(this._costProviders=new RU(this)),this._costProviders}get costServices(){return this._costServices||(this._costServices=new jU(this)),this._costServices}get userFeedback(){return this._userFeedback||(this._userFeedback=new AU(this)),this._userFeedback}get networkFlowReports(){return this._networkFlowReports||(this._networkFlowReports=new CU(this)),this._networkFlowReports}get products(){return this._products||(this._products=new DU(this)),this._products}get recommendations(){return this._recommendations||(this._recommendations=new qU(this)),this._recommendations}get recommendationViews(){return this._recommendationViews||(this._recommendationViews=new MU(this)),this._recommendationViews}get reportNotifications(){return this._reportNotifications||(this._reportNotifications=new UU(this)),this._reportNotifications}get resourceReports(){return this._resourceReports||(this._resourceReports=new LU(this)),this._resourceReports}get resources(){return this._resources||(this._resources=new ZU(this)),this._resources}get savedFilters(){return this._savedFilters||(this._savedFilters=new VU(this)),this._savedFilters}get segments(){return this._segments||(this._segments=new FU(this)),this._segments}get tags(){return this._tags||(this._tags=new WU(this)),this._tags}get teams(){return this._teams||(this._teams=new GU(this)),this._teams}get unitCosts(){return this._unitCosts||(this._unitCosts=new KU(this)),this._unitCosts}get users(){return this._users||(this._users=new BU(this)),this._users}get virtualTagConfigs(){return this._virtualTagConfigs||(this._virtualTagConfigs=new HU(this)),this._virtualTagConfigs}get workspaces(){return this._workspaces||(this._workspaces=new JU(this)),this._workspaces}get ping(){return this._ping||(this._ping=new QU(this)),this._ping}},uU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/access_grants","GET",e)}create(e){return this.client.request("/v2/access_grants","POST",e)}get(e){return this.client.request(`/v2/access_grants/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/access_grants/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/access_grants/${S(e)}`,"DELETE",{})}},lU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/anomaly_alerts","GET",e)}get(e){return this.client.request(`/v2/anomaly_alerts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/anomaly_alerts/${S(e)}`,"PUT",t)}},dU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/anomaly_notifications","GET",e)}create(e){return this.client.request("/v2/anomaly_notifications","POST",e)}get(e){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"DELETE",{})}},pU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/audit_logs","GET",e)}get(e){return this.client.request(`/v2/audit_logs/${S(e)}`,"GET",{})}},fU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/billing_profiles","GET",e)}create(e){return this.client.request("/v2/billing_profiles","POST",e)}get(e){return this.client.request(`/v2/billing_profiles/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/billing_profiles/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/billing_profiles/${S(e)}`,"DELETE",{})}},mU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/billing_rules","GET",e)}create(e){return this.client.request("/v2/billing_rules","POST",e)}get(e){return this.client.request(`/v2/billing_rules/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/billing_rules/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/billing_rules/${S(e)}`,"DELETE",{})}},hU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/budget_alerts","GET",e)}create(e){return this.client.request("/v2/budget_alerts","POST",e)}get(e){return this.client.request(`/v2/budget_alerts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/budget_alerts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/budget_alerts/${S(e)}`,"DELETE",{})}},gU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/budgets","GET",e)}create(e){return this.client.request("/v2/budgets","POST",e)}update(e,t){return this.client.request(`/v2/budgets/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/budgets/${S(e)}`,"DELETE",{})}},_U=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/business_metrics","GET",e)}create(e){return this.client.request("/v2/business_metrics","POST",e)}get(e){return this.client.request(`/v2/business_metrics/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/business_metrics/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/business_metrics/${S(e)}`,"DELETE",{})}getValues(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/values`,"GET",t)}getForecastedValues(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/forecasted_values`,"GET",t)}updateValuesCSV(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/values.csv`,"PUT",t)}},vU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/cost_alerts","POST",e)}get(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events/${S(t)}`,"GET",{})}update(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/cost_alerts/${S(e)}`,"DELETE",{})}getEvents(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events`,"GET",t)}getEvent(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events/${S(t)}`,"GET",{})}},yU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_provider_accounts","GET",e)}},bU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_reports","GET",e)}create(e){return this.client.request("/v2/cost_reports","POST",e)}get(e){return this.client.request(`/v2/cost_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/cost_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/cost_reports/${S(e)}`,"DELETE",{})}getForecastedCosts(e,t){return this.client.request(`/v2/cost_reports/${S(e)}/forecasted_costs`,"GET",t)}},wU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/costs","GET",e)}createExport(e){return this.client.request("/v2/costs/data_exports","POST",e)}},$U=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/dashboards","GET",e)}create(e){return this.client.request("/v2/dashboards","POST",e)}get(e){return this.client.request(`/v2/dashboards/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/dashboards/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/dashboards/${S(e)}`,"DELETE",{})}},kU=class{constructor(e){this.client=e}get(e){return this.client.request(`/v2/data_exports/${S(e)}`,"GET",{})}},xU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/exchange_rates","GET",e)}createViaCsv(e){return this.client.request("/v2/exchange_rates/csv","POST",e)}},SU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitment_reports","GET",e)}create(e){return this.client.request("/v2/financial_commitment_reports","POST",e)}get(e){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"DELETE",{})}},TU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitments","GET",e)}},PU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/folders","GET",e)}create(e){return this.client.request("/v2/folders","POST",e)}get(e){return this.client.request(`/v2/folders/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/folders/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/folders/${S(e)}`,"DELETE",{})}},zU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/integrations","GET",e)}get(e){return this.client.request(`/v2/integrations/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/integrations/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/integrations/${S(e)}`,"DELETE",{})}createCustomProviderIntegration(e){return this.client.request("/v2/integrations/custom_provider","POST",e)}createUserCostsUploadViaCsv(e,t){return this.client.request(`/v2/integrations/${S(e)}/costs.csv`,"POST",t)}deleteUserCostsUpload(e,t){return this.client.request(`/v2/integrations/${S(e)}/costs/${S(t)}`,"DELETE",{})}getUserCostsUploads(e){return this.client.request(`/v2/integrations/${S(e)}/costs`,"GET",{})}createGCPIntegration(e){return this.client.request("/v2/integrations/gcp","POST",e)}createAzureIntegration(e){return this.client.request("/v2/integrations/azure","POST",e)}},EU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/invoices","GET",e)}create(e){return this.client.request("/v2/invoices","POST",e)}get(e){return this.client.request(`/v2/invoices/${S(e)}`,"GET",{})}downloadInvoice(e,t){return this.client.request(`/v2/invoices/${S(e)}/download`,"POST",t)}sendInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/send`,"POST",{})}sendAndApproveInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/send_and_approve`,"POST",{})}getCostReport(e){return this.client.request(`/v2/invoices/${S(e)}/cost_report`,"GET",{})}regenerateInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/regenerate`,"POST",{})}},IU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/kubernetes_efficiency_reports","GET",e)}create(e){return this.client.request("/v2/kubernetes_efficiency_reports","POST",e)}get(e){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"DELETE",{})}createExport(e){return this.client.request("/v2/kubernetes_efficiency_reports/data_exports","POST",e)}},NU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/managed_accounts","GET",e)}create(e){return this.client.request("/v2/managed_accounts","POST",e)}get(e){return this.client.request(`/v2/managed_accounts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/managed_accounts/${S(e)}`,"DELETE",{})}updateSsoConnectionForManagedAccount(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}/sso_connection`,"PUT",t)}createSsoConnectionForManagedAccount(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}/sso_connection`,"POST",t)}},OU=class{constructor(e){this.client=e}get(){return this.client.request("/v2/me","GET",{})}},RU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_providers","GET",e)}},jU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_services","GET",e)}},AU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/user_feedback","POST",e)}},CU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/network_flow_reports","GET",e)}create(e){return this.client.request("/v2/network_flow_reports","POST",e)}get(e){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"DELETE",{})}},DU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/products","GET",e)}get(e,t){return this.client.request(`/v2/products/${S(e)}/prices/${S(t)}`,"GET",{})}getPrices(e,t){return this.client.request(`/v2/products/${S(e)}/prices`,"GET",t)}getPrice(e,t){return this.client.request(`/v2/products/${S(e)}/prices/${S(t)}`,"GET",{})}},qU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/recommendations","GET",e)}get(e){return this.client.request(`/v2/recommendations/${S(e)}`,"GET",{})}getResources(e,t){return this.client.request(`/v2/recommendations/${S(e)}/resources`,"GET",t)}getResource(e,t){return this.client.request(`/v2/recommendations/${S(e)}/resources/${S(t)}`,"GET",{})}getTypeResources(e,t){return this.client.request(`/v2/recommendations/by_type/${S(e)}/resources`,"GET",t)}},MU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/recommendation_views","GET",e)}create(e){return this.client.request("/v2/recommendation_views","POST",e)}get(e){return this.client.request(`/v2/recommendation_views/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/recommendation_views/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/recommendation_views/${S(e)}`,"DELETE",{})}},UU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/report_notifications","GET",e)}create(e){return this.client.request("/v2/report_notifications","POST",e)}get(e){return this.client.request(`/v2/report_notifications/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/report_notifications/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/report_notifications/${S(e)}`,"DELETE",{})}},LU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resource_reports","GET",e)}create(e){return this.client.request("/v2/resource_reports","POST",e)}get(e){return this.client.request(`/v2/resource_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/resource_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/resource_reports/${S(e)}`,"DELETE",{})}getColumns(e){return this.client.request("/v2/resource_reports/columns","GET",e)}},ZU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resources","GET",e)}},VU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/saved_filters","GET",e)}create(e){return this.client.request("/v2/saved_filters","POST",e)}get(e){return this.client.request(`/v2/saved_filters/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/saved_filters/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/saved_filters/${S(e)}`,"DELETE",{})}},FU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/segments","GET",e)}create(e){return this.client.request("/v2/segments","POST",e)}get(e){return this.client.request(`/v2/segments/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/segments/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/segments/${S(e)}`,"DELETE",{})}},WU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/tags","GET",e)}getValues(e,t){return this.client.request(`/v2/tags/${S(e)}/values`,"GET",t)}},GU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/teams","GET",e)}create(e){return this.client.request("/v2/teams","POST",e)}get(e){return this.client.request(`/v2/teams/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/teams/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/teams/${S(e)}`,"DELETE",{})}getMembers(e,t){return this.client.request(`/v2/teams/${S(e)}/members`,"GET",t)}addTeamMember(e,t){return this.client.request(`/v2/teams/${S(e)}/members`,"POST",t)}removeTeamMember(e,t){return this.client.request(`/v2/teams/${S(e)}/members/${S(t)}`,"DELETE",{})}},KU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/unit_costs","GET",e)}createExport(e){return this.client.request("/v2/unit_costs/data_exports","POST",e)}},BU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/users","GET",e)}get(e){return this.client.request(`/v2/users/${S(e)}`,"GET",{})}},HU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/virtual_tag_configs","POST",e)}get(){return this.client.request("/v2/virtual_tag_configs","GET",{})}update(e,t){return this.client.request(`/v2/virtual_tag_configs/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/virtual_tag_configs/${S(e)}`,"DELETE",{})}getStatus(e){return this.client.request(`/v2/virtual_tag_configs/${S(e)}/status`,"GET",{})}updateAsyncVirtualTagConfig(e,t){return this.client.request(`/v2/virtual_tag_configs/${S(e)}/async`,"PUT",t)}getAsyncVirtualTagConfigStatus(e){return this.client.request(`/v2/virtual_tag_configs/async/${S(e)}`,"GET",{})}},JU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/workspaces","GET",e)}create(e){return this.client.request("/v2/workspaces","POST",e)}get(e){return this.client.request(`/v2/workspaces/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/workspaces/${S(e)}`,"PUT",t)}},QU=class{constructor(e){this.client=e}get(){return this.client.request("/v2/ping","GET",{})}}});var ce;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(ce||(ce={}));var mv;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(mv||(mv={}));var C=ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_r=e=>{switch(typeof e){case"undefined":return C.undefined;case"string":return C.string;case"number":return Number.isNaN(e)?C.nan:C.number;case"boolean":return C.boolean;case"function":return C.function;case"bigint":return C.bigint;case"symbol":return C.symbol;case"object":return Array.isArray(e)?C.array:e===null?C.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?C.promise:typeof Map<"u"&&e instanceof Map?C.map:typeof Set<"u"&&e instanceof Set?C.set:typeof Date<"u"&&e instanceof Date?C.date:C.object;default:return C.unknown}};var T=ce.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"]);var Tt=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Tt.create=e=>new Tt(e);var X0=(e,t)=>{let r;switch(e.code){case T.invalid_type:e.received===C.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case T.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ce.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:r=`Unrecognized key(s) in object: ${ce.joinValues(e.keys,", ")}`;break;case T.invalid_union:r="Invalid input";break;case T.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ce.joinValues(e.options)}`;break;case T.invalid_enum_value:r=`Invalid enum value. Expected ${ce.joinValues(e.options)}, received '${e.received}'`;break;case T.invalid_arguments:r="Invalid function arguments";break;case T.invalid_return_type:r="Invalid function return type";break;case T.invalid_date:r="Invalid date";break;case T.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ce.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case T.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case T.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case T.custom:r="Invalid input";break;case T.invalid_intersection_types:r="Intersection results could not be merged";break;case T.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case T.not_finite:r="Number must be finite";break;default:r=t.defaultError,ce.assertNever(e)}return{message:r}},Ar=X0;var eT=Ar;function mi(){return eT}var Ga=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...n,path:i,message:a}};function A(e,t){let r=mi(),o=Ga({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ar?void 0:Ar].filter(n=>!!n)});e.common.issues.push(o)}var et=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return F;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return F;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value)}return{status:t.value,value:o}}},F=Object.freeze({status:"aborted"}),Kn=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Wd=e=>e.status==="aborted",Gd=e=>e.status==="dirty",hn=e=>e.status==="valid",hi=e=>typeof Promise<"u"&&e instanceof Promise;var q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(q||(q={}));var Nt=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}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}},hv=(e,t)=>{if(hn(t))return{success:!0,data:t.value};if(!e.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 Tt(e.common.issues);return this._error=r,this._error}}};function H(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var ee=class{get description(){return this._def.description}_getType(t){return _r(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:_r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new et,ctx:{common:t.parent.common,data:t.data,parsedType:_r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(hi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)},n=this._parseSync({data:t,path:o.path,parent:o});return hv(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return hn(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>hn(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(hi(n)?n:Promise.resolve(n));return hv(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:T.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new Wt({schema:this,typeName:E.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 Pt.create(this,this._def)}nullable(){return br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dr.create(this)}promise(){return gn.create(this,this._def)}or(t){return Yn.create([this,t],this._def)}and(t){return Xn.create(this,t,this._def)}transform(t){return new Wt({...H(this._def),schema:this,typeName:E.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new oo({...H(this._def),innerType:this,defaultValue:r,typeName:E.ZodDefault})}brand(){return new Ka({typeName:E.ZodBranded,type:this,...H(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new io({...H(this._def),innerType:this,catchValue:r,typeName:E.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ba.create(this,t)}readonly(){return so.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},tT=/^c[^\s-]{8,}$/i,rT=/^[0-9a-z]+$/,nT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,oT=/^[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,iT=/^[a-z0-9_-]{21}$/i,sT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,aT=/^[-+]?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)?)??$/,cT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,uT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Kd,lT=/^(?:(?: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])$/,dT=/^(?:(?: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])$/,pT=/^(([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]))$/,fT=/^(([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])$/,mT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gv="((\\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])))",gT=new RegExp(`^${gv}$`);function _v(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function _T(e){return new RegExp(`^${_v(e)}$`)}function vT(e){let t=`${gv}T${_v(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function yT(e,t){return!!((t==="v4"||!t)&&lT.test(e)||(t==="v6"||!t)&&pT.test(e))}function bT(e,t){if(!sT.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function wT(e,t){return!!((t==="v4"||!t)&&dT.test(e)||(t==="v6"||!t)&&fT.test(e))}var Hn=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==C.string){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.string,received:i.parsedType}),F}let o=new et,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?A(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&A(n,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")cT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"email",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Kd||(Kd=new RegExp(uT,"u")),Kd.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"emoji",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")oT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"uuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")iT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"nanoid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")tT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")rT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid2",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")nT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ulid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),A(n,{validation:"url",code:T.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"regex",code:T.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?vT(i).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?gT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?_T(i).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?aT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"duration",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?yT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ip",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?bT(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"jwt",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?wT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cidr",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?mT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?hT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64url",code:T.invalid_string,message:i.message}),o.dirty()):ce.assertNever(i);return{status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:T.invalid_string,...q.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...q.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...q.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...q.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...q.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...q.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...q.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...q.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...q.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...q.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...q.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...q.errToObj(r)})}nonempty(t){return this.min(1,q.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Hn.create=e=>new Hn({checks:[],typeName:E.ZodString,coerce:e?.coerce??!1,...H(e)});function $T(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var gi=class e extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==C.number){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.number,received:i.parsedType}),F}let o,n=new et;for(let i of this._def.checks)i.kind==="int"?ce.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:T.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?$T(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_finite,message:i.message}),n.dirty()):ce.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,q.toString(r))}gt(t,r){return this.setLimit("min",t,!1,q.toString(r))}lte(t,r){return this.setLimit("max",t,!0,q.toString(r))}lt(t,r){return this.setLimit("max",t,!1,q.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:q.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ce.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(r)&&Number.isFinite(t)}};gi.create=e=>new gi({checks:[],typeName:E.ZodNumber,coerce:e?.coerce||!1,...H(e)});var _i=class e extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==C.bigint)return this._getInvalidInput(t);let o,n=new et;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):ce.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return A(r,{code:T.invalid_type,expected:C.bigint,received:r.parsedType}),F}gte(t,r){return this.setLimit("min",t,!0,q.toString(r))}gt(t,r){return this.setLimit("min",t,!1,q.toString(r))}lte(t,r){return this.setLimit("max",t,!0,q.toString(r))}lt(t,r){return this.setLimit("max",t,!1,q.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:q.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};_i.create=e=>new _i({checks:[],typeName:E.ZodBigInt,coerce:e?.coerce??!1,...H(e)});var vi=class extends ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==C.boolean){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.boolean,received:o.parsedType}),F}return ut(t.data)}};vi.create=e=>new vi({typeName:E.ZodBoolean,coerce:e?.coerce||!1,...H(e)});var yi=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==C.date){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.date,received:i.parsedType}),F}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_date}),F}let o=new et,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):ce.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:q.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:q.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};yi.create=e=>new yi({checks:[],coerce:e?.coerce||!1,typeName:E.ZodDate,...H(e)});var bi=class extends ee{_parse(t){if(this._getType(t)!==C.symbol){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.symbol,received:o.parsedType}),F}return ut(t.data)}};bi.create=e=>new bi({typeName:E.ZodSymbol,...H(e)});var Jn=class extends ee{_parse(t){if(this._getType(t)!==C.undefined){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.undefined,received:o.parsedType}),F}return ut(t.data)}};Jn.create=e=>new Jn({typeName:E.ZodUndefined,...H(e)});var Qn=class extends ee{_parse(t){if(this._getType(t)!==C.null){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.null,received:o.parsedType}),F}return ut(t.data)}};Qn.create=e=>new Qn({typeName:E.ZodNull,...H(e)});var wi=class extends ee{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}};wi.create=e=>new wi({typeName:E.ZodAny,...H(e)});var Cr=class extends ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}};Cr.create=e=>new Cr({typeName:E.ZodUnknown,...H(e)});var sr=class extends ee{_parse(t){let r=this._getOrReturnCtx(t);return A(r,{code:T.invalid_type,expected:C.never,received:r.parsedType}),F}};sr.create=e=>new sr({typeName:E.ZodNever,...H(e)});var $i=class extends ee{_parse(t){if(this._getType(t)!==C.undefined){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.void,received:o.parsedType}),F}return ut(t.data)}};$i.create=e=>new $i({typeName:E.ZodVoid,...H(e)});var Dr=class e extends ee{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==C.array)return A(r,{code:T.invalid_type,expected:C.array,received:r.parsedType}),F;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(A(r,{code:s?T.too_big:T.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),o.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(A(r,{code:T.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(A(r,{code:T.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new Nt(r,s,r.path,a)))).then(s=>et.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new Nt(r,s,r.path,a)));return et.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:q.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:q.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:q.toString(r)}})}nonempty(t){return this.min(1,t)}};Dr.create=(e,t)=>new Dr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:E.ZodArray,...H(t)});function Bn(e){if(e instanceof zt){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Pt.create(Bn(o))}return new zt({...e._def,shape:()=>t})}else return e instanceof Dr?new Dr({...e._def,type:Bn(e.element)}):e instanceof Pt?Pt.create(Bn(e.unwrap())):e instanceof br?br.create(Bn(e.unwrap())):e instanceof yr?yr.create(e.items.map(t=>Bn(t))):e}var zt=class e extends ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=ce.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==C.object){let u=this._getOrReturnCtx(t);return A(u,{code:T.invalid_type,expected:C.object,received:u.parsedType}),F}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof sr&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Nt(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof sr){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")a.length>0&&(A(n,{code:T.unrecognized_keys,keys:a}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Nt(n,d,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,h=await l.value;u.push({key:d,value:h,alwaysSet:l.alwaysSet})}return u}).then(u=>et.mergeObjectSync(o,u)):et.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:q.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:E.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of ce.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of ce.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Bn(this)}partial(t){let r={};for(let o of ce.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of ce.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Pt;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return vv(ce.objectKeys(this.shape))}};zt.create=(e,t)=>new zt({shape:()=>e,unknownKeys:"strip",catchall:sr.create(),typeName:E.ZodObject,...H(t)});zt.strictCreate=(e,t)=>new zt({shape:()=>e,unknownKeys:"strict",catchall:sr.create(),typeName:E.ZodObject,...H(t)});zt.lazycreate=(e,t)=>new zt({shape:e,unknownKeys:"strip",catchall:sr.create(),typeName:E.ZodObject,...H(t)});var Yn=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Tt(a.ctx.common.issues));return A(r,{code:T.invalid_union,unionErrors:s}),F}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){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"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Tt(c));return A(r,{code:T.invalid_union,unionErrors:a}),F}}get options(){return this._def.options}};Yn.create=(e,t)=>new Yn({options:e,typeName:E.ZodUnion,...H(t)});var vr=e=>e instanceof eo?vr(e.schema):e instanceof Wt?vr(e.innerType()):e instanceof to?[e.value]:e instanceof ro?e.options:e instanceof no?ce.objectValues(e.enum):e instanceof oo?vr(e._def.innerType):e instanceof Jn?[void 0]:e instanceof Qn?[null]:e instanceof Pt?[void 0,...vr(e.unwrap())]:e instanceof br?[null,...vr(e.unwrap())]:e instanceof Ka||e instanceof so?vr(e.unwrap()):e instanceof io?vr(e._def.innerType):[],Bd=class e extends ee{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.object)return A(r,{code:T.invalid_type,expected:C.object,received:r.parsedType}),F;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(A(r,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),F)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=vr(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i)}}return new e({typeName:E.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...H(o)})}};function Hd(e,t){let r=_r(e),o=_r(t);if(e===t)return{valid:!0,data:e};if(r===C.object&&o===C.object){let n=ce.objectKeys(t),i=ce.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Hd(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===C.array&&o===C.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=Hd(s,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===C.date&&o===C.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Xn=class extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Wd(i)||Wd(s))return F;let a=Hd(i.value,s.value);return a.valid?((Gd(i)||Gd(s))&&r.dirty(),{status:r.value,value:a.data}):(A(o,{code:T.invalid_intersection_types}),F)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Xn.create=(e,t,r)=>new Xn({left:e,right:t,typeName:E.ZodIntersection,...H(r)});var yr=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.array)return A(o,{code:T.invalid_type,expected:C.array,received:o.parsedType}),F;if(o.data.length<this._def.items.length)return A(o,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F;!this._def.rest&&o.data.length>this._def.items.length&&(A(o,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Nt(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>et.mergeArray(r,s)):et.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yr({items:e,typeName:E.ZodTuple,rest:null,...H(t)})};var Jd=class e extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.object)return A(o,{code:T.invalid_type,expected:C.object,received:o.parsedType}),F;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new Nt(o,a,o.path,a)),value:s._parse(new Nt(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?et.mergeObjectAsync(r,n):et.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof ee?new e({keyType:t,valueType:r,typeName:E.ZodRecord,...H(o)}):new e({keyType:Hn.create(),valueType:t,typeName:E.ZodRecord,...H(r)})}},ki=class extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.map)return A(o,{code:T.invalid_type,expected:C.map,received:o.parsedType}),F;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new Nt(o,a,o.path,[u,"key"])),value:i._parse(new Nt(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return F;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return F;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};ki.create=(e,t,r)=>new ki({valueType:t,keyType:e,typeName:E.ZodMap,...H(r)});var xi=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.set)return A(o,{code:T.invalid_type,expected:C.set,received:o.parsedType}),F;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(A(o,{code:T.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(A(o,{code:T.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let l of c){if(l.status==="aborted")return F;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new Nt(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:q.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:q.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};xi.create=(e,t)=>new xi({valueType:e,minSize:null,maxSize:null,typeName:E.ZodSet,...H(t)});var Qd=class e extends ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.function)return A(r,{code:T.invalid_type,expected:C.function,received:r.parsedType}),F;function o(a,c){return Ga({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mi(),Ar].filter(u=>!!u),issueData:{code:T.invalid_arguments,argumentsError:c}})}function n(a,c){return Ga({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mi(),Ar].filter(u=>!!u),issueData:{code:T.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof gn){let a=this;return ut(async function(...c){let u=new Tt([]),l=await a._def.args.parseAsync(c,i).catch(m=>{throw u.addIssue(o(c,m)),u}),d=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(m=>{throw u.addIssue(n(d,m)),u})})}else{let a=this;return ut(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Tt([o(c,u.error)]);let l=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Tt([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:yr.create(t).rest(Cr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||yr.create([]).rest(Cr.create()),returns:r||Cr.create(),typeName:E.ZodFunction,...H(o)})}},eo=class extends ee{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};eo.create=(e,t)=>new eo({getter:e,typeName:E.ZodLazy,...H(t)});var to=class extends ee{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return A(r,{received:r.data,code:T.invalid_literal,expected:this._def.value}),F}return{status:"valid",value:t.data}}get value(){return this._def.value}};to.create=(e,t)=>new to({value:e,typeName:E.ZodLiteral,...H(t)});function vv(e,t){return new ro({values:e,typeName:E.ZodEnum,...H(t)})}var ro=class e extends ee{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return A(r,{expected:ce.joinValues(o),received:r.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return A(r,{received:r.data,code:T.invalid_enum_value,options:o}),F}return ut(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};ro.create=vv;var no=class extends ee{_parse(t){let r=ce.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==C.string&&o.parsedType!==C.number){let n=ce.objectValues(r);return A(o,{expected:ce.joinValues(n),received:o.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(ce.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=ce.objectValues(r);return A(o,{received:o.data,code:T.invalid_enum_value,options:n}),F}return ut(t.data)}get enum(){return this._def.values}};no.create=(e,t)=>new no({values:e,typeName:E.ZodNativeEnum,...H(t)});var gn=class extends ee{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.promise&&r.common.async===!1)return A(r,{code:T.invalid_type,expected:C.promise,received:r.parsedType}),F;let o=r.parsedType===C.promise?r.data:Promise.resolve(r.data);return ut(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};gn.create=(e,t)=>new gn({type:e,typeName:E.ZodPromise,...H(t)});var Wt=class extends ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===E.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{A(o,s),s.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return F;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?F:c.status==="dirty"?Kn(c.value):r.value==="dirty"?Kn(c.value):c});{if(r.value==="aborted")return F;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?F:a.status==="dirty"?Kn(a.value):r.value==="dirty"?Kn(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?F:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?F:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!hn(s))return F;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>hn(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):F);ce.assertNever(n)}};Wt.create=(e,t,r)=>new Wt({schema:e,typeName:E.ZodEffects,effect:t,...H(r)});Wt.createWithPreprocess=(e,t,r)=>new Wt({schema:t,effect:{type:"preprocess",transform:e},typeName:E.ZodEffects,...H(r)});var Pt=class extends ee{_parse(t){return this._getType(t)===C.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Pt.create=(e,t)=>new Pt({innerType:e,typeName:E.ZodOptional,...H(t)});var br=class extends ee{_parse(t){return this._getType(t)===C.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};br.create=(e,t)=>new br({innerType:e,typeName:E.ZodNullable,...H(t)});var oo=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===C.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oo.create=(e,t)=>new oo({innerType:e,typeName:E.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...H(t)});var io=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return hi(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Tt(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Tt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};io.create=(e,t)=>new io({innerType:e,typeName:E.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...H(t)});var Si=class extends ee{_parse(t){if(this._getType(t)!==C.nan){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.nan,received:o.parsedType}),F}return{status:"valid",value:t.data}}};Si.create=e=>new Si({typeName:E.ZodNaN,...H(e)});var XL=Symbol("zod_brand"),Ka=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Ba=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?F:i.status==="dirty"?(r.dirty(),Kn(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?F:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:E.ZodPipeline})}},so=class extends ee{_parse(t){let r=this._def.innerType._parse(t),o=n=>(hn(n)&&(n.value=Object.freeze(n.value)),n);return hi(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};so.create=(e,t)=>new so({innerType:e,typeName:E.ZodReadonly,...H(t)});var eZ={object:zt.lazycreate},E;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(E||(E={}));var tZ=Hn.create,rZ=gi.create,nZ=Si.create,oZ=_i.create,iZ=vi.create,sZ=yi.create,aZ=bi.create,cZ=Jn.create,uZ=Qn.create,lZ=wi.create,dZ=Cr.create,pZ=sr.create,fZ=$i.create,mZ=Dr.create,yv=zt.create,hZ=zt.strictCreate,gZ=Yn.create,_Z=Bd.create,vZ=Xn.create,yZ=yr.create,bZ=Jd.create,wZ=ki.create,$Z=xi.create,kZ=Qd.create,xZ=eo.create,SZ=to.create,TZ=ro.create,PZ=no.create,zZ=gn.create,EZ=Wt.create,IZ=Pt.create,NZ=br.create,OZ=Wt.createWithPreprocess,RZ=Ba.create;var Kt={};mn(Kt,{$ZodAny:()=>jc,$ZodArray:()=>ho,$ZodAsyncError:()=>ar,$ZodBase64:()=>xc,$ZodBase64URL:()=>Sc,$ZodBigInt:()=>Di,$ZodBigIntFormat:()=>Ic,$ZodBoolean:()=>mo,$ZodCIDRv4:()=>$c,$ZodCIDRv6:()=>kc,$ZodCUID:()=>hc,$ZodCUID2:()=>gc,$ZodCatch:()=>Yc,$ZodCheck:()=>De,$ZodCheckBigIntFormat:()=>Up,$ZodCheckEndsWith:()=>Yp,$ZodCheckGreaterThan:()=>sc,$ZodCheckIncludes:()=>Jp,$ZodCheckLengthEquals:()=>Gp,$ZodCheckLessThan:()=>ic,$ZodCheckLowerCase:()=>Bp,$ZodCheckMaxLength:()=>Fp,$ZodCheckMaxSize:()=>Lp,$ZodCheckMimeType:()=>ef,$ZodCheckMinLength:()=>Wp,$ZodCheckMinSize:()=>Zp,$ZodCheckMultipleOf:()=>qp,$ZodCheckNumberFormat:()=>Mp,$ZodCheckOverwrite:()=>tf,$ZodCheckProperty:()=>Xp,$ZodCheckRegex:()=>Kp,$ZodCheckSizeEquals:()=>Vp,$ZodCheckStartsWith:()=>Qp,$ZodCheckStringFormat:()=>fo,$ZodCheckUpperCase:()=>Hp,$ZodCustom:()=>ou,$ZodCustomStringFormat:()=>zc,$ZodDate:()=>Dc,$ZodDefault:()=>Bc,$ZodDiscriminatedUnion:()=>qc,$ZodE164:()=>Tc,$ZodEmail:()=>dc,$ZodEmoji:()=>fc,$ZodEnum:()=>Vc,$ZodError:()=>ji,$ZodFile:()=>Wc,$ZodFunction:()=>Ru,$ZodGUID:()=>uc,$ZodIPv4:()=>bc,$ZodIPv6:()=>wc,$ZodISODate:()=>sf,$ZodISODateTime:()=>of,$ZodISODuration:()=>cf,$ZodISOTime:()=>af,$ZodIntersection:()=>Mc,$ZodJWT:()=>Pc,$ZodKSUID:()=>yc,$ZodLazy:()=>nu,$ZodLiteral:()=>Fc,$ZodMap:()=>Lc,$ZodNaN:()=>Xc,$ZodNanoID:()=>mc,$ZodNever:()=>Ac,$ZodNonOptional:()=>Jc,$ZodNull:()=>Rc,$ZodNullable:()=>Kc,$ZodNumber:()=>Ci,$ZodNumberFormat:()=>Ec,$ZodObject:()=>qi,$ZodOptional:()=>Gc,$ZodPipe:()=>_o,$ZodPrefault:()=>Hc,$ZodPromise:()=>ru,$ZodReadonly:()=>eu,$ZodRealError:()=>uo,$ZodRecord:()=>Uc,$ZodRegistry:()=>yo,$ZodSet:()=>Zc,$ZodString:()=>Zr,$ZodStringFormat:()=>ke,$ZodSuccess:()=>Qc,$ZodSymbol:()=>Nc,$ZodTemplateLiteral:()=>tu,$ZodTransform:()=>go,$ZodTuple:()=>Vr,$ZodType:()=>G,$ZodULID:()=>_c,$ZodURL:()=>pc,$ZodUUID:()=>lc,$ZodUndefined:()=>Oc,$ZodUnion:()=>Mi,$ZodUnknown:()=>$n,$ZodVoid:()=>Cc,$ZodXID:()=>vc,$brand:()=>Ja,$constructor:()=>v,$input:()=>au,$output:()=>su,Doc:()=>Ai,JSONSchema:()=>zy,JSONSchemaGenerator:()=>ws,NEVER:()=>Ha,TimePrecision:()=>uu,_any:()=>ku,_array:()=>bs,_base64:()=>os,_base64url:()=>is,_bigint:()=>_u,_boolean:()=>gu,_catch:()=>ez,_cidrv4:()=>rs,_cidrv6:()=>ns,_coercedBigint:()=>_f,_coercedBoolean:()=>gf,_coercedDate:()=>vf,_coercedNumber:()=>hf,_coercedString:()=>lf,_cuid:()=>Hi,_cuid2:()=>Ji,_custom:()=>Eu,_date:()=>Tu,_default:()=>QP,_discriminatedUnion:()=>UP,_e164:()=>ss,_email:()=>Li,_emoji:()=>Ki,_endsWith:()=>ms,_enum:()=>WP,_file:()=>zu,_float32:()=>pu,_float64:()=>fu,_gt:()=>kr,_gte:()=>_t,_guid:()=>bo,_includes:()=>ps,_int:()=>du,_int32:()=>mu,_int64:()=>vu,_intersection:()=>LP,_ipv4:()=>es,_ipv6:()=>ts,_isoDate:()=>pf,_isoDateTime:()=>df,_isoDuration:()=>mf,_isoTime:()=>ff,_jwt:()=>as,_ksuid:()=>Xi,_lazy:()=>oz,_length:()=>ko,_literal:()=>KP,_lowercase:()=>ls,_lt:()=>$r,_lte:()=>Ot,_map:()=>VP,_max:()=>Ot,_maxLength:()=>$o,_maxSize:()=>wo,_mime:()=>hs,_min:()=>_t,_minLength:()=>Fr,_minSize:()=>Sn,_multipleOf:()=>xn,_nan:()=>Pu,_nanoid:()=>Bi,_nativeEnum:()=>GP,_negative:()=>bf,_never:()=>xu,_nonnegative:()=>$f,_nonoptional:()=>YP,_nonpositive:()=>wf,_normalize:()=>gs,_null:()=>$u,_nullable:()=>JP,_number:()=>lu,_optional:()=>HP,_overwrite:()=>xr,_parse:()=>ec,_parseAsync:()=>tc,_pipe:()=>tz,_positive:()=>yf,_promise:()=>iz,_property:()=>kf,_readonly:()=>rz,_record:()=>ZP,_refine:()=>Iu,_regex:()=>us,_safeParse:()=>rc,_safeParseAsync:()=>nc,_set:()=>FP,_size:()=>cs,_startsWith:()=>fs,_string:()=>cu,_stringFormat:()=>Ou,_stringbool:()=>Nu,_success:()=>XP,_symbol:()=>bu,_templateLiteral:()=>nz,_toLowerCase:()=>vs,_toUpperCase:()=>ys,_transform:()=>BP,_trim:()=>_s,_tuple:()=>xf,_uint32:()=>hu,_uint64:()=>yu,_ulid:()=>Qi,_undefined:()=>wu,_union:()=>MP,_unknown:()=>kn,_uppercase:()=>ds,_url:()=>Gi,_uuid:()=>Zi,_uuidv4:()=>Vi,_uuidv6:()=>Fi,_uuidv7:()=>Wi,_void:()=>Su,_xid:()=>Yi,clone:()=>tt,config:()=>Le,flattenError:()=>lo,formatError:()=>po,function:()=>ju,globalConfig:()=>Ti,globalRegistry:()=>Gt,isValidBase64:()=>uf,isValidBase64URL:()=>Mv,isValidJWT:()=>Uv,locales:()=>vo,parse:()=>yn,parseAsync:()=>bn,prettifyError:()=>Xa,regexes:()=>Lr,registry:()=>Ui,safeParse:()=>Mr,safeParseAsync:()=>Ur,toDotPath:()=>wv,toJSONSchema:()=>xo,treeifyError:()=>Ya,util:()=>R,version:()=>rf});var Ha=Object.freeze({status:"aborted"});function v(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let l in s.prototype)l in a||Object.defineProperty(a,l,{value:s.prototype[l].bind(a)});a._zod.constr=s,a._zod.def=c}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Ja=Symbol("zod_brand"),ar=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ti={};function Le(e){return e&&Object.assign(Ti,e),Ti}var R={};mn(R,{BIGINT_FORMAT_RANGES:()=>ap,Class:()=>Xd,NUMBER_FORMAT_RANGES:()=>sp,aborted:()=>vn,allowsEval:()=>np,assert:()=>PT,assertEqual:()=>kT,assertIs:()=>ST,assertNever:()=>TT,assertNotEqual:()=>xT,assignProp:()=>rp,cached:()=>Ei,captureStackTrace:()=>Qa,cleanEnum:()=>UT,cleanRegex:()=>Ii,clone:()=>tt,createTransparentProxy:()=>RT,defineLazy:()=>ve,esc:()=>_n,escapeRegex:()=>wr,extend:()=>CT,finalizeIssue:()=>Et,floatSafeRemainder:()=>tp,getElementAtPath:()=>zT,getEnumValues:()=>zi,getLengthableOrigin:()=>Ri,getParsedType:()=>OT,getSizableOrigin:()=>Oi,isObject:()=>ao,isPlainObject:()=>co,issue:()=>cp,joinValues:()=>x,jsonStringifyReplacer:()=>ep,merge:()=>DT,normalizeParams:()=>O,nullish:()=>qr,numKeys:()=>NT,omit:()=>AT,optionalKeys:()=>ip,partial:()=>qT,pick:()=>jT,prefixIssues:()=>gt,primitiveTypes:()=>op,promiseAllObject:()=>ET,propertyKeyTypes:()=>Ni,randomString:()=>IT,required:()=>MT,stringifyPrimitive:()=>j,unwrapMessage:()=>Pi});function kT(e){return e}function xT(e){return e}function ST(e){}function TT(e){throw new Error}function PT(e){}function zi(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function x(e,t="|"){return e.map(r=>j(r)).join(t)}function ep(e,t){return typeof t=="bigint"?t.toString():t}function Ei(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function qr(e){return e==null}function Ii(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function tp(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}function ve(e,t,r){Object.defineProperty(e,t,{get(){{let n=r();return e[t]=n,n}throw new Error("cached value already set")},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function rp(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function zT(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function ET(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function IT(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function _n(e){return JSON.stringify(e)}var Qa=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function ao(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var np=Ei(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function co(e){if(ao(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(ao(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function NT(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var OT=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Ni=new Set(["string","number","symbol"]),op=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tt(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function O(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function RT(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function j(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ip(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var sp={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]},ap={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function jT(e,t){let r={},o=e._zod.def;for(let n in t){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=o.shape[n])}return tt(e,{...e._zod.def,shape:r,checks:[]})}function AT(e,t){let r={...e._zod.def.shape},o=e._zod.def;for(let n in t){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return tt(e,{...e._zod.def,shape:r,checks:[]})}function CT(e,t){if(!co(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return rp(this,"shape",o),o},checks:[]};return tt(e,r)}function DT(e,t){return tt(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return rp(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function qT(e,t,r){let o=t._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(let i in o)n[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return tt(t,{...t._zod.def,shape:n,checks:[]})}function MT(e,t,r){let o=t._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(let i in o)n[i]=new e({type:"nonoptional",innerType:o[i]});return tt(t,{...t._zod.def,shape:n,checks:[]})}function vn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function gt(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Pi(e){return typeof e=="string"?e:e?.message}function Et(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=Pi(e.inst?._zod.def?.error?.(e))??Pi(t?.error?.(e))??Pi(r.customError?.(e))??Pi(r.localeError?.(e))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Oi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ri(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function cp(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function UT(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Xd=class{constructor(...t){}};var bv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,ep,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ji=v("$ZodError",bv),uo=v("$ZodError",bv,{Parent:Error});function lo(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function po(e,t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return n(e),o}function Ya(e,t){let r=t||function(i){return i.message},o={errors:[]},n=(i,s=[])=>{var a,c;for(let u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>n({issues:l},u.path));else if(u.code==="invalid_key")n({issues:u.issues},u.path);else if(u.code==="invalid_element")n({issues:u.issues},u.path);else{let l=[...s,...u.path];if(l.length===0){o.errors.push(r(u));continue}let d=o,h=0;for(;h<l.length;){let m=l[h],p=h===l.length-1;typeof m=="string"?(d.properties??(d.properties={}),(a=d.properties)[m]??(a[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(c=d.items)[m]??(c[m]={errors:[]}),d=d.items[m]),p&&d.errors.push(r(u)),h++}}};return n(e),o}function wv(e){let t=[];for(let r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Xa(e){let t=[],r=[...e.issues].sort((o,n)=>o.path.length-n.path.length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${wv(o.path)}`);return t.join(`
|
|
16
|
+
deps: ${r}}`};var PM={keyword:"dependencies",type:"object",schemaType:"object",error:gr.error,code(e){let[t,r]=zM(e);zS(e,t),ES(e,r)}};function zM({schema:e}){let t={},r={};for(let o in e){if(o==="__proto__")continue;let n=Array.isArray(e[o])?t:r;n[o]=e[o]}return[t,r]}function zS(e,t=e.schema){let{gen:r,data:o,it:n}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,La.propertyInData)(r,o,s,n.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0,La.checkReportMissingProp)(e,u)}):(r.if((0,C_._)`${c} && (${(0,La.checkMissingProp)(e,a,i)})`),(0,La.reportMissingProp)(e,i),r.else())}}gr.validatePropertyDeps=zS;function ES(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,s=r.name("valid");for(let a in t)(0,TM.alwaysValidSchema)(i,t[a])||(r.if((0,La.propertyInData)(r,o,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}gr.validateSchemaDeps=ES;gr.default=PM});var OS=w(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});var NS=X(),EM=me(),IM={message:"property name must be valid",params:({params:e})=>(0,NS._)`{propertyName: ${e.propertyName}}`},NM={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:IM,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,EM.alwaysValidSchema)(n,r))return;let i=t.name("valid");t.forIn("key",o,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,NS.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};D_.default=NM});var M_=w(q_=>{"use strict";Object.defineProperty(q_,"__esModule",{value:!0});var Td=Lt(),nr=X(),OM=Rr(),Pd=me(),RM={message:"must NOT have additional properties",params:({params:e})=>(0,nr._)`{additionalProperty: ${e.additionalProperty}}`},jM={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:RM,code(e){let{gen:t,schema:r,parentSchema:o,data:n,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,Pd.alwaysValidSchema)(s,r))return;let u=(0,Td.allSchemaProperties)(o.properties),l=(0,Td.allSchemaProperties)(o.patternProperties);d(),e.ok((0,nr._)`${i} === ${OM.default.errors}`);function d(){t.forIn("key",n,_=>{!u.length&&!l.length?p(_):t.if(h(_),()=>p(_))})}function h(_){let y;if(u.length>8){let $=(0,Pd.schemaRefOrVal)(s,o.properties,"properties");y=(0,Td.isOwnProperty)(t,$,_)}else u.length?y=(0,nr.or)(...u.map($=>(0,nr._)`${_} === ${$}`)):y=nr.nil;return l.length&&(y=(0,nr.or)(y,...l.map($=>(0,nr._)`${(0,Td.usePattern)(e,$)}.test(${_})`))),(0,nr.not)(y)}function m(_){t.code((0,nr._)`delete ${n}[${_}]`)}function p(_){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Pd.alwaysValidSchema)(s,r)){let y=t.name("valid");c.removeAdditional==="failing"?(f(_,y,!1),t.if((0,nr.not)(y),()=>{e.reset(),m(_)})):(f(_,y),a||t.if((0,nr.not)(y),()=>t.break()))}}function f(_,y,$){let k={keyword:"additionalProperties",dataProp:_,dataPropType:Pd.Type.Str};$===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(k,y)}}};q_.default=jM});var AS=w(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});var AM=za(),RS=Lt(),U_=me(),jS=M_(),CM={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&jS.default.code(new AM.KeywordCxt(i,jS.default,"additionalProperties"));let s=(0,RS.allSchemaProperties)(r);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=U_.mergeEvaluated.props(t,(0,U_.toHash)(s),i.props));let a=s.filter(d=>!(0,U_.alwaysValidSchema)(i,r[d]));if(a.length===0)return;let c=t.name("valid");for(let d of a)u(d)?l(d):(t.if((0,RS.propertyInData)(t,n,d,i.opts.ownProperties)),l(d),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return i.opts.useDefaults&&!i.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};L_.default=CM});var MS=w(Z_=>{"use strict";Object.defineProperty(Z_,"__esModule",{value:!0});var CS=Lt(),zd=X(),DS=me(),qS=me(),DM={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:n,it:i}=e,{opts:s}=i,a=(0,CS.allSchemaProperties)(r),c=a.filter(f=>(0,DS.alwaysValidSchema)(i,r[f]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&n.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof zd.Name)&&(i.props=(0,qS.evaluatedPropsToName)(t,i.props));let{props:d}=i;h();function h(){for(let f of a)u&&m(f),i.allErrors?p(f):(t.var(l,!0),p(f),t.if(l))}function m(f){for(let _ in u)new RegExp(f).test(_)&&(0,DS.checkStrictMode)(i,`property ${_} matches pattern ${f} (use allowMatchingProperties)`)}function p(f){t.forIn("key",o,_=>{t.if((0,zd._)`${(0,CS.usePattern)(e,f)}.test(${_})`,()=>{let y=c.includes(f);y||e.subschema({keyword:"patternProperties",schemaProp:f,dataProp:_,dataPropType:qS.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,zd._)`${d}[${_}]`,!0):!y&&!i.allErrors&&t.if((0,zd.not)(l),()=>t.break())})})}}};Z_.default=DM});var US=w(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});var qM=me(),MM={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,qM.alwaysValidSchema)(o,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};V_.default=MM});var LS=w(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});var UM=Lt(),LM={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:UM.validateUnion,error:{message:"must match a schema in anyOf"}};F_.default=LM});var ZS=w(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});var Ed=X(),ZM=me(),VM={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ed._)`{passingSchemas: ${e.passing}}`},FM={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:VM,code(e){let{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((l,d)=>{let h;(0,ZM.alwaysValidSchema)(n,l)?t.var(c,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Ed._)`${c} && ${s}`).assign(s,!1).assign(a,(0,Ed._)`[${a}, ${d}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,d),h&&e.mergeEvaluated(h,Ed.Name)})})}}};W_.default=FM});var VS=w(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});var WM=me(),GM={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((i,s)=>{if((0,WM.alwaysValidSchema)(o,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},n);e.ok(n),e.mergeEvaluated(a)})}};G_.default=GM});var GS=w(K_=>{"use strict";Object.defineProperty(K_,"__esModule",{value:!0});var Id=X(),WS=me(),KM={message:({params:e})=>(0,Id.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Id._)`{failingKeyword: ${e.ifClause}}`},BM={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:KM,code(e){let{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,WS.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=FS(o,"then"),i=FS(o,"else");if(!n&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),n&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,u("then",l),u("else",l))}else n?t.if(a,u("then")):t.if((0,Id.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function u(l,d){return()=>{let h=e.subschema({keyword:l},a);t.assign(s,a),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,Id._)`${l}`):e.setParams({ifClause:l})}}}};function FS(e,t){let r=e.schema[t];return r!==void 0&&!(0,WS.alwaysValidSchema)(e,r)}K_.default=BM});var KS=w(B_=>{"use strict";Object.defineProperty(B_,"__esModule",{value:!0});var HM=me(),JM={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,HM.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};B_.default=JM});var BS=w(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});var QM=N_(),YM=xS(),XM=O_(),e4=TS(),t4=PS(),r4=IS(),n4=OS(),o4=M_(),i4=AS(),s4=MS(),a4=US(),c4=LS(),u4=ZS(),l4=VS(),d4=GS(),p4=KS();function f4(e=!1){let t=[a4.default,c4.default,u4.default,l4.default,d4.default,p4.default,n4.default,o4.default,r4.default,i4.default,s4.default];return e?t.push(YM.default,e4.default):t.push(QM.default,XM.default),t.push(t4.default),t}H_.default=f4});var HS=w(J_=>{"use strict";Object.defineProperty(J_,"__esModule",{value:!0});var Ve=X(),m4={message:({schemaCode:e})=>(0,Ve.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ve._)`{format: ${e}}`},h4={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:m4,code(e,t){let{gen:r,data:o,$data:n,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=a;if(!c.validateFormats)return;n?h():m();function h(){let p=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),f=r.const("fDef",(0,Ve._)`${p}[${s}]`),_=r.let("fType"),y=r.let("format");r.if((0,Ve._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(_,(0,Ve._)`${f}.type || "string"`).assign(y,(0,Ve._)`${f}.validate`),()=>r.assign(_,(0,Ve._)`"string"`).assign(y,f)),e.fail$data((0,Ve.or)($(),k()));function $(){return c.strictSchema===!1?Ve.nil:(0,Ve._)`${s} && !${y}`}function k(){let N=l.$async?(0,Ve._)`(${f}.async ? await ${y}(${o}) : ${y}(${o}))`:(0,Ve._)`${y}(${o})`,P=(0,Ve._)`(typeof ${y} == "function" ? ${N} : ${y}.test(${o}))`;return(0,Ve._)`${y} && ${y} !== true && ${_} === ${t} && !${P}`}}function m(){let p=d.formats[i];if(!p){$();return}if(p===!0)return;let[f,_,y]=k(p);f===t&&e.pass(N());function $(){if(c.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function k(P){let ze=P instanceof RegExp?(0,Ve.regexpCode)(P):c.code.formats?(0,Ve._)`${c.code.formats}${(0,Ve.getProperty)(i)}`:void 0,Me=r.scopeValue("formats",{key:i,ref:P,code:ze});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,Ve._)`${Me}.validate`]:["string",P,Me]}function N(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ve._)`await ${y}(${o})`}return typeof _=="function"?(0,Ve._)`${y}(${o})`:(0,Ve._)`${y}.test(${o})`}}}};J_.default=h4});var JS=w(Q_=>{"use strict";Object.defineProperty(Q_,"__esModule",{value:!0});var g4=HS(),_4=[g4.default];Q_.default=_4});var QS=w(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.contentVocabulary=si.metadataVocabulary=void 0;si.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];si.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var XS=w(Y_=>{"use strict";Object.defineProperty(Y_,"__esModule",{value:!0});var v4=sS(),y4=bS(),b4=BS(),w4=JS(),YS=QS(),$4=[v4.default,y4.default,(0,b4.default)(),w4.default,YS.metadataVocabulary,YS.contentVocabulary];Y_.default=$4});var t0=w(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.DiscrError=void 0;var e0;(function(e){e.Tag="tag",e.Mapping="mapping"})(e0||(Nd.DiscrError=e0={}))});var n0=w(ev=>{"use strict";Object.defineProperty(ev,"__esModule",{value:!0});var ai=X(),X_=t0(),r0=_d(),k4=Ea(),x4=me(),S4={message:({params:{discrError:e,tagName:t}})=>e===X_.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,ai._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},T4={keyword:"discriminator",type:"object",schemaType:"object",error:S4,code(e){let{gen:t,data:r,schema:o,parentSchema:n,it:i}=e,{oneOf:s}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=o.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,ai._)`${r}${(0,ai.getProperty)(a)}`);t.if((0,ai._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:X_.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function l(){let m=h();t.if(!1);for(let p in m)t.elseIf((0,ai._)`${u} === ${p}`),t.assign(c,d(m[p]));t.else(),e.error(!1,{discrError:X_.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function d(m){let p=t.name("valid"),f=e.subschema({keyword:"oneOf",schemaProp:m},p);return e.mergeEvaluated(f,ai.Name),p}function h(){var m;let p={},f=y(n),_=!0;for(let N=0;N<s.length;N++){let P=s[N];if(P?.$ref&&!(0,x4.schemaHasRulesButRef)(P,i.self.RULES)){let Me=P.$ref;if(P=r0.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,Me),P instanceof r0.SchemaEnv&&(P=P.schema),P===void 0)throw new k4.default(i.opts.uriResolver,i.baseId,Me)}let ze=(m=P?.properties)===null||m===void 0?void 0:m[a];if(typeof ze!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);_=_&&(f||y(P)),$(ze,N)}if(!_)throw new Error(`discriminator: "${a}" must be required`);return p;function y({required:N}){return Array.isArray(N)&&N.includes(a)}function $(N,P){if(N.const)k(N.const,P);else if(N.enum)for(let ze of N.enum)k(ze,P);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function k(N,P){if(typeof N!="string"||N in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[N]=P}}}};ev.default=T4});var o0=w((F3,P4)=>{P4.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 s0=w((Ce,tv)=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.MissingRefError=Ce.ValidationError=Ce.CodeGen=Ce.Name=Ce.nil=Ce.stringify=Ce.str=Ce._=Ce.KeywordCxt=Ce.Ajv=void 0;var z4=eS(),E4=XS(),I4=n0(),i0=o0(),N4=["/properties"],Od="http://json-schema.org/draft-07/schema",ci=class extends z4.default{_addVocabularies(){super._addVocabularies(),E4.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(I4.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(i0,N4):i0;this.addMetaSchema(t,Od,!1),this.refs["http://json-schema.org/schema"]=Od}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Od)?Od:void 0)}};Ce.Ajv=ci;tv.exports=Ce=ci;tv.exports.Ajv=ci;Object.defineProperty(Ce,"__esModule",{value:!0});Ce.default=ci;var O4=za();Object.defineProperty(Ce,"KeywordCxt",{enumerable:!0,get:function(){return O4.KeywordCxt}});var ui=X();Object.defineProperty(Ce,"_",{enumerable:!0,get:function(){return ui._}});Object.defineProperty(Ce,"str",{enumerable:!0,get:function(){return ui.str}});Object.defineProperty(Ce,"stringify",{enumerable:!0,get:function(){return ui.stringify}});Object.defineProperty(Ce,"nil",{enumerable:!0,get:function(){return ui.nil}});Object.defineProperty(Ce,"Name",{enumerable:!0,get:function(){return ui.Name}});Object.defineProperty(Ce,"CodeGen",{enumerable:!0,get:function(){return ui.CodeGen}});var R4=hd();Object.defineProperty(Ce,"ValidationError",{enumerable:!0,get:function(){return R4.default}});var j4=Ea();Object.defineProperty(Ce,"MissingRefError",{enumerable:!0,get:function(){return j4.default}})});var a0=w(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.formatLimitDefinition=void 0;var A4=s0(),or=X(),ln=or.operators,Rd={formatMaximum:{okStr:"<=",ok:ln.LTE,fail:ln.GT},formatMinimum:{okStr:">=",ok:ln.GTE,fail:ln.LT},formatExclusiveMaximum:{okStr:"<",ok:ln.LT,fail:ln.GTE},formatExclusiveMinimum:{okStr:">",ok:ln.GT,fail:ln.LTE}},C4={message:({keyword:e,schemaCode:t})=>(0,or.str)`should be ${Rd[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,or._)`{comparison: ${Rd[e].okStr}, limit: ${t}}`};li.formatLimitDefinition={keyword:Object.keys(Rd),type:"string",schemaType:"string",$data:!0,error:C4,code(e){let{gen:t,data:r,schemaCode:o,keyword:n,it:i}=e,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new A4.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?u():l();function u(){let h=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),m=t.const("fmt",(0,or._)`${h}[${c.schemaCode}]`);e.fail$data((0,or.or)((0,or._)`typeof ${m} != "object"`,(0,or._)`${m} instanceof RegExp`,(0,or._)`typeof ${m}.compare != "function"`,d(m)))}function l(){let h=c.schema,m=a.formats[h];if(!m||m===!0)return;if(typeof m!="object"||m instanceof RegExp||typeof m.compare!="function")throw new Error(`"${n}": format "${h}" does not define "compare" function`);let p=t.scopeValue("formats",{key:h,ref:m,code:s.code.formats?(0,or._)`${s.code.formats}${(0,or.getProperty)(h)}`:void 0});e.fail$data(d(p))}function d(h){return(0,or._)`${h}.compare(${r}, ${o}) ${Rd[n].fail} 0`}},dependencies:["format"]};var D4=e=>(e.addKeyword(li.formatLimitDefinition),e);li.default=D4});var d0=w((Za,l0)=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});var di=Gk(),q4=a0(),rv=X(),c0=new rv.Name("fullFormats"),M4=new rv.Name("fastFormats"),nv=(e,t={keywords:!0})=>{if(Array.isArray(t))return u0(e,t,di.fullFormats,c0),e;let[r,o]=t.mode==="fast"?[di.fastFormats,M4]:[di.fullFormats,c0],n=t.formats||di.formatNames;return u0(e,n,r,o),t.keywords&&(0,q4.default)(e),e};nv.get=(e,t="full")=>{let o=(t==="fast"?di.fastFormats:di.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function u0(e,t,r,o){var n,i;(n=(i=e.opts.code).formats)!==null&&n!==void 0||(i.formats=(0,rv._)`require("ajv-formats/dist/formats").${o}`);for(let s of t)e.addFormat(s,r[s])}l0.exports=Za=nv;Object.defineProperty(Za,"__esModule",{value:!0});Za.default=nv});var Ge=w((ZB,z0)=>{var pv=Object.defineProperty,Q4=Object.getOwnPropertyDescriptor,Y4=Object.getOwnPropertyNames,X4=Object.prototype.hasOwnProperty,eU=(e,t)=>{for(var r in t)pv(e,r,{get:t[r],enumerable:!0})},tU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y4(t))!X4.call(e,n)&&n!==r&&pv(e,n,{get:()=>t[n],enumerable:!(o=Q4(t,n))||o.enumerable});return e},rU=e=>tU(pv({},"__esModule",{value:!0}),e),P0={};eU(P0,{APIV2Client:()=>cU,VantageAPIError:()=>Zd,pathEncode:()=>S});z0.exports=rU(P0);function S(e){return encodeURIComponent(e)}var nU={"/v2/exchange_rates/csv":{POST:!0},"/v2/business_metrics/{}/values.csv":{PUT:!0},"/v2/integrations/{}/costs.csv":{POST:!0}},Fa={};function oU(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}for(let[e,t]of Object.entries(nU)){let r=e.split("{}").map(oU).join("(.+?)");for(let[o,n]of Object.entries(t))n&&(Fa[o]||(Fa[o]=[]),Fa[o].push(new RegExp(`^${r}$`)))}function iU(e,t){if(Object.prototype.hasOwnProperty.call(Fa,e))for(let r of Fa[e]){let o=r.test(t);if(r.lastIndex=0,o)return!0}return!1}function sU(e,t){if(t)for(let[r,o]of Object.entries(t))e.searchParams.append(r,Array.isArray(o)?o.map(String).join(","):String(o))}var Zd=class extends Error{constructor(e,t,r){let o=null;if(e!==null)try{let i=JSON.parse(r);Array.isArray(i.errors)&&(o=i.errors)}catch{}let n=e===null?`Vantage API Error: ${r}`:`Vantage API Error: ${e} ${t}`+(o?` - ${o.join(", ")}`:"");super(n),this.status=e,this.statusText=t,this.body=r,this.errors=o}errors};async function dv(e,t,r,o,n){let i;try{i=await fetch(e.toString(),{method:t,headers:r,body:o})}catch(s){let a=s instanceof Error?s.message:String(s),c=new Zd(null,null,a);if(n)return[null,c];throw c}if(!i.ok){let s=new Zd(i.status,i.statusText,await i.text());if(n)return[null,s];throw s}if(i.status===204)return n?[void 0,null]:void 0;try{let s=await i.text(),a;return s&&(a=JSON.parse(s)),n?[a,null]:a}catch(s){let a=s instanceof Error?s.message:String(s),c=new Zd(i.status,i.statusText,a);if(n)return[null,c];throw c}}var aU=class{constructor(e,t,r){this.bearerToken=e,this.neverThrow=t,this.baseUrl=r}async request(e,t,r){let o=new URL(e,this.baseUrl),n={Authorization:`Bearer ${this.bearerToken}`};if(t==="GET")return sU(o,r),dv(o,t,n,void 0,this.neverThrow);if(iU(t,e)){let i=new FormData;for(let[s,a]of Object.entries(r))i.append(s,a);return n["Content-Type"]="multipart/form-data",dv(o,t,n,i,this.neverThrow)}return n["Content-Type"]="application/json",dv(o,t,n,JSON.stringify(r),this.neverThrow)}},cU=class extends aU{constructor(e,t=!1,r="https://api.vantage.sh"){super(e,t,r)}_accessGrants;_anomalyAlerts;_anomalyNotifications;_auditLogs;_billingProfiles;_billingRules;_budgetAlerts;_budgets;_businessMetrics;_costAlerts;_costProviderAccounts;_costReports;_costs;_dashboards;_dataExports;_exchangeRates;_financialCommitmentReports;_financialCommitments;_folders;_integrations;_invoices;_kubernetesEfficiencyReports;_managedAccounts;_me;_costProviders;_costServices;_userFeedback;_networkFlowReports;_products;_recommendations;_recommendationViews;_reportNotifications;_resourceReports;_resources;_savedFilters;_segments;_tags;_teams;_unitCosts;_users;_virtualTagConfigs;_workspaces;_ping;get accessGrants(){return this._accessGrants||(this._accessGrants=new uU(this)),this._accessGrants}get anomalyAlerts(){return this._anomalyAlerts||(this._anomalyAlerts=new lU(this)),this._anomalyAlerts}get anomalyNotifications(){return this._anomalyNotifications||(this._anomalyNotifications=new dU(this)),this._anomalyNotifications}get auditLogs(){return this._auditLogs||(this._auditLogs=new pU(this)),this._auditLogs}get billingProfiles(){return this._billingProfiles||(this._billingProfiles=new fU(this)),this._billingProfiles}get billingRules(){return this._billingRules||(this._billingRules=new mU(this)),this._billingRules}get budgetAlerts(){return this._budgetAlerts||(this._budgetAlerts=new hU(this)),this._budgetAlerts}get budgets(){return this._budgets||(this._budgets=new gU(this)),this._budgets}get businessMetrics(){return this._businessMetrics||(this._businessMetrics=new _U(this)),this._businessMetrics}get costAlerts(){return this._costAlerts||(this._costAlerts=new vU(this)),this._costAlerts}get costProviderAccounts(){return this._costProviderAccounts||(this._costProviderAccounts=new yU(this)),this._costProviderAccounts}get costReports(){return this._costReports||(this._costReports=new bU(this)),this._costReports}get costs(){return this._costs||(this._costs=new wU(this)),this._costs}get dashboards(){return this._dashboards||(this._dashboards=new $U(this)),this._dashboards}get dataExports(){return this._dataExports||(this._dataExports=new kU(this)),this._dataExports}get exchangeRates(){return this._exchangeRates||(this._exchangeRates=new xU(this)),this._exchangeRates}get financialCommitmentReports(){return this._financialCommitmentReports||(this._financialCommitmentReports=new SU(this)),this._financialCommitmentReports}get financialCommitments(){return this._financialCommitments||(this._financialCommitments=new TU(this)),this._financialCommitments}get folders(){return this._folders||(this._folders=new PU(this)),this._folders}get integrations(){return this._integrations||(this._integrations=new zU(this)),this._integrations}get invoices(){return this._invoices||(this._invoices=new EU(this)),this._invoices}get kubernetesEfficiencyReports(){return this._kubernetesEfficiencyReports||(this._kubernetesEfficiencyReports=new IU(this)),this._kubernetesEfficiencyReports}get managedAccounts(){return this._managedAccounts||(this._managedAccounts=new NU(this)),this._managedAccounts}get me(){return this._me||(this._me=new OU(this)),this._me}get costProviders(){return this._costProviders||(this._costProviders=new RU(this)),this._costProviders}get costServices(){return this._costServices||(this._costServices=new jU(this)),this._costServices}get userFeedback(){return this._userFeedback||(this._userFeedback=new AU(this)),this._userFeedback}get networkFlowReports(){return this._networkFlowReports||(this._networkFlowReports=new CU(this)),this._networkFlowReports}get products(){return this._products||(this._products=new DU(this)),this._products}get recommendations(){return this._recommendations||(this._recommendations=new qU(this)),this._recommendations}get recommendationViews(){return this._recommendationViews||(this._recommendationViews=new MU(this)),this._recommendationViews}get reportNotifications(){return this._reportNotifications||(this._reportNotifications=new UU(this)),this._reportNotifications}get resourceReports(){return this._resourceReports||(this._resourceReports=new LU(this)),this._resourceReports}get resources(){return this._resources||(this._resources=new ZU(this)),this._resources}get savedFilters(){return this._savedFilters||(this._savedFilters=new VU(this)),this._savedFilters}get segments(){return this._segments||(this._segments=new FU(this)),this._segments}get tags(){return this._tags||(this._tags=new WU(this)),this._tags}get teams(){return this._teams||(this._teams=new GU(this)),this._teams}get unitCosts(){return this._unitCosts||(this._unitCosts=new KU(this)),this._unitCosts}get users(){return this._users||(this._users=new BU(this)),this._users}get virtualTagConfigs(){return this._virtualTagConfigs||(this._virtualTagConfigs=new HU(this)),this._virtualTagConfigs}get workspaces(){return this._workspaces||(this._workspaces=new JU(this)),this._workspaces}get ping(){return this._ping||(this._ping=new QU(this)),this._ping}},uU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/access_grants","GET",e)}create(e){return this.client.request("/v2/access_grants","POST",e)}get(e){return this.client.request(`/v2/access_grants/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/access_grants/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/access_grants/${S(e)}`,"DELETE",{})}},lU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/anomaly_alerts","GET",e)}get(e){return this.client.request(`/v2/anomaly_alerts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/anomaly_alerts/${S(e)}`,"PUT",t)}},dU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/anomaly_notifications","GET",e)}create(e){return this.client.request("/v2/anomaly_notifications","POST",e)}get(e){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/anomaly_notifications/${S(e)}`,"DELETE",{})}},pU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/audit_logs","GET",e)}get(e){return this.client.request(`/v2/audit_logs/${S(e)}`,"GET",{})}},fU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/billing_profiles","GET",e)}create(e){return this.client.request("/v2/billing_profiles","POST",e)}get(e){return this.client.request(`/v2/billing_profiles/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/billing_profiles/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/billing_profiles/${S(e)}`,"DELETE",{})}},mU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/billing_rules","GET",e)}create(e){return this.client.request("/v2/billing_rules","POST",e)}get(e){return this.client.request(`/v2/billing_rules/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/billing_rules/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/billing_rules/${S(e)}`,"DELETE",{})}},hU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/budget_alerts","GET",e)}create(e){return this.client.request("/v2/budget_alerts","POST",e)}get(e){return this.client.request(`/v2/budget_alerts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/budget_alerts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/budget_alerts/${S(e)}`,"DELETE",{})}},gU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/budgets","GET",e)}create(e){return this.client.request("/v2/budgets","POST",e)}update(e,t){return this.client.request(`/v2/budgets/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/budgets/${S(e)}`,"DELETE",{})}},_U=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/business_metrics","GET",e)}create(e){return this.client.request("/v2/business_metrics","POST",e)}get(e){return this.client.request(`/v2/business_metrics/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/business_metrics/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/business_metrics/${S(e)}`,"DELETE",{})}getValues(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/values`,"GET",t)}getForecastedValues(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/forecasted_values`,"GET",t)}updateValuesCSV(e,t){return this.client.request(`/v2/business_metrics/${S(e)}/values.csv`,"PUT",t)}},vU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/cost_alerts","POST",e)}get(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events/${S(t)}`,"GET",{})}update(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/cost_alerts/${S(e)}`,"DELETE",{})}getEvents(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events`,"GET",t)}getEvent(e,t){return this.client.request(`/v2/cost_alerts/${S(e)}/events/${S(t)}`,"GET",{})}},yU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_provider_accounts","GET",e)}},bU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_reports","GET",e)}create(e){return this.client.request("/v2/cost_reports","POST",e)}get(e){return this.client.request(`/v2/cost_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/cost_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/cost_reports/${S(e)}`,"DELETE",{})}getForecastedCosts(e,t){return this.client.request(`/v2/cost_reports/${S(e)}/forecasted_costs`,"GET",t)}},wU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/costs","GET",e)}createExport(e){return this.client.request("/v2/costs/data_exports","POST",e)}},$U=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/dashboards","GET",e)}create(e){return this.client.request("/v2/dashboards","POST",e)}get(e){return this.client.request(`/v2/dashboards/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/dashboards/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/dashboards/${S(e)}`,"DELETE",{})}},kU=class{constructor(e){this.client=e}get(e){return this.client.request(`/v2/data_exports/${S(e)}`,"GET",{})}},xU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/exchange_rates","GET",e)}createViaCsv(e){return this.client.request("/v2/exchange_rates/csv","POST",e)}},SU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitment_reports","GET",e)}create(e){return this.client.request("/v2/financial_commitment_reports","POST",e)}get(e){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/financial_commitment_reports/${S(e)}`,"DELETE",{})}},TU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/financial_commitments","GET",e)}},PU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/folders","GET",e)}create(e){return this.client.request("/v2/folders","POST",e)}get(e){return this.client.request(`/v2/folders/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/folders/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/folders/${S(e)}`,"DELETE",{})}},zU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/integrations","GET",e)}get(e){return this.client.request(`/v2/integrations/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/integrations/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/integrations/${S(e)}`,"DELETE",{})}createCustomProviderIntegration(e){return this.client.request("/v2/integrations/custom_provider","POST",e)}createUserCostsUploadViaCsv(e,t){return this.client.request(`/v2/integrations/${S(e)}/costs.csv`,"POST",t)}deleteUserCostsUpload(e,t){return this.client.request(`/v2/integrations/${S(e)}/costs/${S(t)}`,"DELETE",{})}getUserCostsUploads(e){return this.client.request(`/v2/integrations/${S(e)}/costs`,"GET",{})}createGCPIntegration(e){return this.client.request("/v2/integrations/gcp","POST",e)}createAzureIntegration(e){return this.client.request("/v2/integrations/azure","POST",e)}},EU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/invoices","GET",e)}create(e){return this.client.request("/v2/invoices","POST",e)}get(e){return this.client.request(`/v2/invoices/${S(e)}`,"GET",{})}downloadInvoice(e,t){return this.client.request(`/v2/invoices/${S(e)}/download`,"POST",t)}sendInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/send`,"POST",{})}sendAndApproveInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/send_and_approve`,"POST",{})}getCostReport(e){return this.client.request(`/v2/invoices/${S(e)}/cost_report`,"GET",{})}regenerateInvoice(e){return this.client.request(`/v2/invoices/${S(e)}/regenerate`,"POST",{})}},IU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/kubernetes_efficiency_reports","GET",e)}create(e){return this.client.request("/v2/kubernetes_efficiency_reports","POST",e)}get(e){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/kubernetes_efficiency_reports/${S(e)}`,"DELETE",{})}createExport(e){return this.client.request("/v2/kubernetes_efficiency_reports/data_exports","POST",e)}},NU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/managed_accounts","GET",e)}create(e){return this.client.request("/v2/managed_accounts","POST",e)}get(e){return this.client.request(`/v2/managed_accounts/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/managed_accounts/${S(e)}`,"DELETE",{})}updateSsoConnectionForManagedAccount(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}/sso_connection`,"PUT",t)}createSsoConnectionForManagedAccount(e,t){return this.client.request(`/v2/managed_accounts/${S(e)}/sso_connection`,"POST",t)}},OU=class{constructor(e){this.client=e}get(){return this.client.request("/v2/me","GET",{})}},RU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_providers","GET",e)}},jU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/cost_services","GET",e)}},AU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/user_feedback","POST",e)}},CU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/network_flow_reports","GET",e)}create(e){return this.client.request("/v2/network_flow_reports","POST",e)}get(e){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/network_flow_reports/${S(e)}`,"DELETE",{})}},DU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/products","GET",e)}get(e,t){return this.client.request(`/v2/products/${S(e)}/prices/${S(t)}`,"GET",{})}getPrices(e,t){return this.client.request(`/v2/products/${S(e)}/prices`,"GET",t)}getPrice(e,t){return this.client.request(`/v2/products/${S(e)}/prices/${S(t)}`,"GET",{})}},qU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/recommendations","GET",e)}get(e){return this.client.request(`/v2/recommendations/${S(e)}`,"GET",{})}getResources(e,t){return this.client.request(`/v2/recommendations/${S(e)}/resources`,"GET",t)}getResource(e,t){return this.client.request(`/v2/recommendations/${S(e)}/resources/${S(t)}`,"GET",{})}getTypeResources(e,t){return this.client.request(`/v2/recommendations/by_type/${S(e)}/resources`,"GET",t)}},MU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/recommendation_views","GET",e)}create(e){return this.client.request("/v2/recommendation_views","POST",e)}get(e){return this.client.request(`/v2/recommendation_views/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/recommendation_views/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/recommendation_views/${S(e)}`,"DELETE",{})}},UU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/report_notifications","GET",e)}create(e){return this.client.request("/v2/report_notifications","POST",e)}get(e){return this.client.request(`/v2/report_notifications/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/report_notifications/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/report_notifications/${S(e)}`,"DELETE",{})}},LU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resource_reports","GET",e)}create(e){return this.client.request("/v2/resource_reports","POST",e)}get(e){return this.client.request(`/v2/resource_reports/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/resource_reports/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/resource_reports/${S(e)}`,"DELETE",{})}getColumns(e){return this.client.request("/v2/resource_reports/columns","GET",e)}},ZU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/resources","GET",e)}},VU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/saved_filters","GET",e)}create(e){return this.client.request("/v2/saved_filters","POST",e)}get(e){return this.client.request(`/v2/saved_filters/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/saved_filters/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/saved_filters/${S(e)}`,"DELETE",{})}},FU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/segments","GET",e)}create(e){return this.client.request("/v2/segments","POST",e)}get(e){return this.client.request(`/v2/segments/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/segments/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/segments/${S(e)}`,"DELETE",{})}},WU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/tags","GET",e)}getValues(e,t){return this.client.request(`/v2/tags/${S(e)}/values`,"GET",t)}},GU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/teams","GET",e)}create(e){return this.client.request("/v2/teams","POST",e)}get(e){return this.client.request(`/v2/teams/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/teams/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/teams/${S(e)}`,"DELETE",{})}getMembers(e,t){return this.client.request(`/v2/teams/${S(e)}/members`,"GET",t)}addTeamMember(e,t){return this.client.request(`/v2/teams/${S(e)}/members`,"POST",t)}removeTeamMember(e,t){return this.client.request(`/v2/teams/${S(e)}/members/${S(t)}`,"DELETE",{})}},KU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/unit_costs","GET",e)}createExport(e){return this.client.request("/v2/unit_costs/data_exports","POST",e)}},BU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/users","GET",e)}get(e){return this.client.request(`/v2/users/${S(e)}`,"GET",{})}},HU=class{constructor(e){this.client=e}create(e){return this.client.request("/v2/virtual_tag_configs","POST",e)}get(){return this.client.request("/v2/virtual_tag_configs","GET",{})}update(e,t){return this.client.request(`/v2/virtual_tag_configs/${S(e)}`,"PUT",t)}delete(e){return this.client.request(`/v2/virtual_tag_configs/${S(e)}`,"DELETE",{})}getStatus(e){return this.client.request(`/v2/virtual_tag_configs/${S(e)}/status`,"GET",{})}updateAsyncVirtualTagConfig(e,t){return this.client.request(`/v2/virtual_tag_configs/${S(e)}/async`,"PUT",t)}getAsyncVirtualTagConfigStatus(e){return this.client.request(`/v2/virtual_tag_configs/async/${S(e)}`,"GET",{})}},JU=class{constructor(e){this.client=e}list(e){return this.client.request("/v2/workspaces","GET",e)}create(e){return this.client.request("/v2/workspaces","POST",e)}get(e){return this.client.request(`/v2/workspaces/${S(e)}`,"GET",{})}update(e,t){return this.client.request(`/v2/workspaces/${S(e)}`,"PUT",t)}},QU=class{constructor(e){this.client=e}get(){return this.client.request("/v2/ping","GET",{})}}});var ce;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(ce||(ce={}));var mv;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(mv||(mv={}));var C=ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_r=e=>{switch(typeof e){case"undefined":return C.undefined;case"string":return C.string;case"number":return Number.isNaN(e)?C.nan:C.number;case"boolean":return C.boolean;case"function":return C.function;case"bigint":return C.bigint;case"symbol":return C.symbol;case"object":return Array.isArray(e)?C.array:e===null?C.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?C.promise:typeof Map<"u"&&e instanceof Map?C.map:typeof Set<"u"&&e instanceof Set?C.set:typeof Date<"u"&&e instanceof Date?C.date:C.object;default:return C.unknown}};var T=ce.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"]);var Tt=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Tt.create=e=>new Tt(e);var X0=(e,t)=>{let r;switch(e.code){case T.invalid_type:e.received===C.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case T.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,ce.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:r=`Unrecognized key(s) in object: ${ce.joinValues(e.keys,", ")}`;break;case T.invalid_union:r="Invalid input";break;case T.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${ce.joinValues(e.options)}`;break;case T.invalid_enum_value:r=`Invalid enum value. Expected ${ce.joinValues(e.options)}, received '${e.received}'`;break;case T.invalid_arguments:r="Invalid function arguments";break;case T.invalid_return_type:r="Invalid function return type";break;case T.invalid_date:r="Invalid date";break;case T.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:ce.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case T.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case T.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case T.custom:r="Invalid input";break;case T.invalid_intersection_types:r="Intersection results could not be merged";break;case T.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case T.not_finite:r="Number must be finite";break;default:r=t.defaultError,ce.assertNever(e)}return{message:r}},Ar=X0;var eT=Ar;function mi(){return eT}var Ga=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...n,path:i,message:a}};function A(e,t){let r=mi(),o=Ga({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ar?void 0:Ar].filter(n=>!!n)});e.common.issues.push(o)}var et=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return F;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return F;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value)}return{status:t.value,value:o}}},F=Object.freeze({status:"aborted"}),Kn=e=>({status:"dirty",value:e}),ut=e=>({status:"valid",value:e}),Wd=e=>e.status==="aborted",Gd=e=>e.status==="dirty",hn=e=>e.status==="valid",hi=e=>typeof Promise<"u"&&e instanceof Promise;var q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(q||(q={}));var Nt=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}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}},hv=(e,t)=>{if(hn(t))return{success:!0,data:t.value};if(!e.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 Tt(e.common.issues);return this._error=r,this._error}}};function H(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var ee=class{get description(){return this._def.description}_getType(t){return _r(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:_r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new et,ctx:{common:t.parent.common,data:t.data,parsedType:_r(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(hi(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)},n=this._parseSync({data:t,path:o.path,parent:o});return hv(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return hn(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>hn(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:_r(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(hi(n)?n:Promise.resolve(n));return hv(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:T.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new Wt({schema:this,typeName:E.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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 Pt.create(this,this._def)}nullable(){return br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Dr.create(this)}promise(){return gn.create(this,this._def)}or(t){return Yn.create([this,t],this._def)}and(t){return Xn.create(this,t,this._def)}transform(t){return new Wt({...H(this._def),schema:this,typeName:E.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new oo({...H(this._def),innerType:this,defaultValue:r,typeName:E.ZodDefault})}brand(){return new Ka({typeName:E.ZodBranded,type:this,...H(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new io({...H(this._def),innerType:this,catchValue:r,typeName:E.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ba.create(this,t)}readonly(){return so.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},tT=/^c[^\s-]{8,}$/i,rT=/^[0-9a-z]+$/,nT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,oT=/^[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,iT=/^[a-z0-9_-]{21}$/i,sT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,aT=/^[-+]?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)?)??$/,cT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,uT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Kd,lT=/^(?:(?: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])$/,dT=/^(?:(?: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])$/,pT=/^(([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]))$/,fT=/^(([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])$/,mT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,gv="((\\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])))",gT=new RegExp(`^${gv}$`);function _v(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function _T(e){return new RegExp(`^${_v(e)}$`)}function vT(e){let t=`${gv}T${_v(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function yT(e,t){return!!((t==="v4"||!t)&&lT.test(e)||(t==="v6"||!t)&&pT.test(e))}function bT(e,t){if(!sT.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function wT(e,t){return!!((t==="v4"||!t)&&dT.test(e)||(t==="v6"||!t)&&fT.test(e))}var Hn=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==C.string){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.string,received:i.parsedType}),F}let o=new et,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?A(n,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&A(n,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")cT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"email",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Kd||(Kd=new RegExp(uT,"u")),Kd.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"emoji",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")oT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"uuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")iT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"nanoid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")tT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")rT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cuid2",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")nT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ulid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),A(n,{validation:"url",code:T.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"regex",code:T.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?vT(i).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?gT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?_T(i).test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{code:T.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?aT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"duration",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?yT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"ip",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?bT(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"jwt",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?wT(t.data,i.version)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"cidr",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?mT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?hT.test(t.data)||(n=this._getOrReturnCtx(t,n),A(n,{validation:"base64url",code:T.invalid_string,message:i.message}),o.dirty()):ce.assertNever(i);return{status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:T.invalid_string,...q.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...q.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...q.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...q.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...q.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...q.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...q.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...q.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...q.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...q.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...q.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...q.errToObj(r)})}nonempty(t){return this.min(1,q.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Hn.create=e=>new Hn({checks:[],typeName:E.ZodString,coerce:e?.coerce??!1,...H(e)});function $T(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var gi=class e extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==C.number){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.number,received:i.parsedType}),F}let o,n=new et;for(let i of this._def.checks)i.kind==="int"?ce.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:T.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?$T(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_finite,message:i.message}),n.dirty()):ce.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,q.toString(r))}gt(t,r){return this.setLimit("min",t,!1,q.toString(r))}lte(t,r){return this.setLimit("max",t,!0,q.toString(r))}lt(t,r){return this.setLimit("max",t,!1,q.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:q.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ce.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(r)&&Number.isFinite(t)}};gi.create=e=>new gi({checks:[],typeName:E.ZodNumber,coerce:e?.coerce||!1,...H(e)});var _i=class e extends ee{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==C.bigint)return this._getInvalidInput(t);let o,n=new et;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),A(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):ce.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return A(r,{code:T.invalid_type,expected:C.bigint,received:r.parsedType}),F}gte(t,r){return this.setLimit("min",t,!0,q.toString(r))}gt(t,r){return this.setLimit("min",t,!1,q.toString(r))}lte(t,r){return this.setLimit("max",t,!0,q.toString(r))}lt(t,r){return this.setLimit("max",t,!1,q.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:q.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};_i.create=e=>new _i({checks:[],typeName:E.ZodBigInt,coerce:e?.coerce??!1,...H(e)});var vi=class extends ee{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==C.boolean){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.boolean,received:o.parsedType}),F}return ut(t.data)}};vi.create=e=>new vi({typeName:E.ZodBoolean,coerce:e?.coerce||!1,...H(e)});var yi=class e extends ee{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==C.date){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_type,expected:C.date,received:i.parsedType}),F}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return A(i,{code:T.invalid_date}),F}let o=new et,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),A(n,{code:T.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):ce.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:q.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:q.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};yi.create=e=>new yi({checks:[],coerce:e?.coerce||!1,typeName:E.ZodDate,...H(e)});var bi=class extends ee{_parse(t){if(this._getType(t)!==C.symbol){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.symbol,received:o.parsedType}),F}return ut(t.data)}};bi.create=e=>new bi({typeName:E.ZodSymbol,...H(e)});var Jn=class extends ee{_parse(t){if(this._getType(t)!==C.undefined){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.undefined,received:o.parsedType}),F}return ut(t.data)}};Jn.create=e=>new Jn({typeName:E.ZodUndefined,...H(e)});var Qn=class extends ee{_parse(t){if(this._getType(t)!==C.null){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.null,received:o.parsedType}),F}return ut(t.data)}};Qn.create=e=>new Qn({typeName:E.ZodNull,...H(e)});var wi=class extends ee{constructor(){super(...arguments),this._any=!0}_parse(t){return ut(t.data)}};wi.create=e=>new wi({typeName:E.ZodAny,...H(e)});var Cr=class extends ee{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ut(t.data)}};Cr.create=e=>new Cr({typeName:E.ZodUnknown,...H(e)});var sr=class extends ee{_parse(t){let r=this._getOrReturnCtx(t);return A(r,{code:T.invalid_type,expected:C.never,received:r.parsedType}),F}};sr.create=e=>new sr({typeName:E.ZodNever,...H(e)});var $i=class extends ee{_parse(t){if(this._getType(t)!==C.undefined){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.void,received:o.parsedType}),F}return ut(t.data)}};$i.create=e=>new $i({typeName:E.ZodVoid,...H(e)});var Dr=class e extends ee{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==C.array)return A(r,{code:T.invalid_type,expected:C.array,received:r.parsedType}),F;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(A(r,{code:s?T.too_big:T.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),o.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(A(r,{code:T.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(A(r,{code:T.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new Nt(r,s,r.path,a)))).then(s=>et.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new Nt(r,s,r.path,a)));return et.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:q.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:q.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:q.toString(r)}})}nonempty(t){return this.min(1,t)}};Dr.create=(e,t)=>new Dr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:E.ZodArray,...H(t)});function Bn(e){if(e instanceof zt){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Pt.create(Bn(o))}return new zt({...e._def,shape:()=>t})}else return e instanceof Dr?new Dr({...e._def,type:Bn(e.element)}):e instanceof Pt?Pt.create(Bn(e.unwrap())):e instanceof br?br.create(Bn(e.unwrap())):e instanceof yr?yr.create(e.items.map(t=>Bn(t))):e}var zt=class e extends ee{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=ce.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==C.object){let u=this._getOrReturnCtx(t);return A(u,{code:T.invalid_type,expected:C.object,received:u.parsedType}),F}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof sr&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new Nt(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof sr){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")a.length>0&&(A(n,{code:T.unrecognized_keys,keys:a}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of a){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new Nt(n,d,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,h=await l.value;u.push({key:d,value:h,alwaysSet:l.alwaysSet})}return u}).then(u=>et.mergeObjectSync(o,u)):et.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:q.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:E.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of ce.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of ce.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Bn(this)}partial(t){let r={};for(let o of ce.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of ce.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Pt;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return vv(ce.objectKeys(this.shape))}};zt.create=(e,t)=>new zt({shape:()=>e,unknownKeys:"strip",catchall:sr.create(),typeName:E.ZodObject,...H(t)});zt.strictCreate=(e,t)=>new zt({shape:()=>e,unknownKeys:"strict",catchall:sr.create(),typeName:E.ZodObject,...H(t)});zt.lazycreate=(e,t)=>new zt({shape:e,unknownKeys:"strip",catchall:sr.create(),typeName:E.ZodObject,...H(t)});var Yn=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Tt(a.ctx.common.issues));return A(r,{code:T.invalid_union,unionErrors:s}),F}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){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"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Tt(c));return A(r,{code:T.invalid_union,unionErrors:a}),F}}get options(){return this._def.options}};Yn.create=(e,t)=>new Yn({options:e,typeName:E.ZodUnion,...H(t)});var vr=e=>e instanceof eo?vr(e.schema):e instanceof Wt?vr(e.innerType()):e instanceof to?[e.value]:e instanceof ro?e.options:e instanceof no?ce.objectValues(e.enum):e instanceof oo?vr(e._def.innerType):e instanceof Jn?[void 0]:e instanceof Qn?[null]:e instanceof Pt?[void 0,...vr(e.unwrap())]:e instanceof br?[null,...vr(e.unwrap())]:e instanceof Ka||e instanceof so?vr(e.unwrap()):e instanceof io?vr(e._def.innerType):[],Bd=class e extends ee{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.object)return A(r,{code:T.invalid_type,expected:C.object,received:r.parsedType}),F;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(A(r,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),F)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=vr(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i)}}return new e({typeName:E.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...H(o)})}};function Hd(e,t){let r=_r(e),o=_r(t);if(e===t)return{valid:!0,data:e};if(r===C.object&&o===C.object){let n=ce.objectKeys(t),i=ce.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Hd(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===C.array&&o===C.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=Hd(s,a);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===C.date&&o===C.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Xn=class extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Wd(i)||Wd(s))return F;let a=Hd(i.value,s.value);return a.valid?((Gd(i)||Gd(s))&&r.dirty(),{status:r.value,value:a.data}):(A(o,{code:T.invalid_intersection_types}),F)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Xn.create=(e,t,r)=>new Xn({left:e,right:t,typeName:E.ZodIntersection,...H(r)});var yr=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.array)return A(o,{code:T.invalid_type,expected:C.array,received:o.parsedType}),F;if(o.data.length<this._def.items.length)return A(o,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F;!this._def.rest&&o.data.length>this._def.items.length&&(A(o,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Nt(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>et.mergeArray(r,s)):et.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yr({items:e,typeName:E.ZodTuple,rest:null,...H(t)})};var Jd=class e extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.object)return A(o,{code:T.invalid_type,expected:C.object,received:o.parsedType}),F;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new Nt(o,a,o.path,a)),value:s._parse(new Nt(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?et.mergeObjectAsync(r,n):et.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof ee?new e({keyType:t,valueType:r,typeName:E.ZodRecord,...H(o)}):new e({keyType:Hn.create(),valueType:t,typeName:E.ZodRecord,...H(r)})}},ki=class extends ee{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.map)return A(o,{code:T.invalid_type,expected:C.map,received:o.parsedType}),F;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new Nt(o,a,o.path,[u,"key"])),value:i._parse(new Nt(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return F;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return F;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value)}return{status:r.value,value:a}}}};ki.create=(e,t,r)=>new ki({valueType:t,keyType:e,typeName:E.ZodMap,...H(r)});var xi=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==C.set)return A(o,{code:T.invalid_type,expected:C.set,received:o.parsedType}),F;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(A(o,{code:T.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(A(o,{code:T.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let l of c){if(l.status==="aborted")return F;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new Nt(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:q.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:q.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};xi.create=(e,t)=>new xi({valueType:e,minSize:null,maxSize:null,typeName:E.ZodSet,...H(t)});var Qd=class e extends ee{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.function)return A(r,{code:T.invalid_type,expected:C.function,received:r.parsedType}),F;function o(a,c){return Ga({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mi(),Ar].filter(u=>!!u),issueData:{code:T.invalid_arguments,argumentsError:c}})}function n(a,c){return Ga({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,mi(),Ar].filter(u=>!!u),issueData:{code:T.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof gn){let a=this;return ut(async function(...c){let u=new Tt([]),l=await a._def.args.parseAsync(c,i).catch(m=>{throw u.addIssue(o(c,m)),u}),d=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(m=>{throw u.addIssue(n(d,m)),u})})}else{let a=this;return ut(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Tt([o(c,u.error)]);let l=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new Tt([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:yr.create(t).rest(Cr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||yr.create([]).rest(Cr.create()),returns:r||Cr.create(),typeName:E.ZodFunction,...H(o)})}},eo=class extends ee{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};eo.create=(e,t)=>new eo({getter:e,typeName:E.ZodLazy,...H(t)});var to=class extends ee{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return A(r,{received:r.data,code:T.invalid_literal,expected:this._def.value}),F}return{status:"valid",value:t.data}}get value(){return this._def.value}};to.create=(e,t)=>new to({value:e,typeName:E.ZodLiteral,...H(t)});function vv(e,t){return new ro({values:e,typeName:E.ZodEnum,...H(t)})}var ro=class e extends ee{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return A(r,{expected:ce.joinValues(o),received:r.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return A(r,{received:r.data,code:T.invalid_enum_value,options:o}),F}return ut(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};ro.create=vv;var no=class extends ee{_parse(t){let r=ce.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==C.string&&o.parsedType!==C.number){let n=ce.objectValues(r);return A(o,{expected:ce.joinValues(n),received:o.parsedType,code:T.invalid_type}),F}if(this._cache||(this._cache=new Set(ce.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=ce.objectValues(r);return A(o,{received:o.data,code:T.invalid_enum_value,options:n}),F}return ut(t.data)}get enum(){return this._def.values}};no.create=(e,t)=>new no({values:e,typeName:E.ZodNativeEnum,...H(t)});var gn=class extends ee{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==C.promise&&r.common.async===!1)return A(r,{code:T.invalid_type,expected:C.promise,received:r.parsedType}),F;let o=r.parsedType===C.promise?r.data:Promise.resolve(r.data);return ut(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};gn.create=(e,t)=>new gn({type:e,typeName:E.ZodPromise,...H(t)});var Wt=class extends ee{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===E.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{A(o,s),s.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return F;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?F:c.status==="dirty"?Kn(c.value):r.value==="dirty"?Kn(c.value):c});{if(r.value==="aborted")return F;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?F:a.status==="dirty"?Kn(a.value):r.value==="dirty"?Kn(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?F:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?F:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!hn(s))return F;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>hn(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):F);ce.assertNever(n)}};Wt.create=(e,t,r)=>new Wt({schema:e,typeName:E.ZodEffects,effect:t,...H(r)});Wt.createWithPreprocess=(e,t,r)=>new Wt({schema:t,effect:{type:"preprocess",transform:e},typeName:E.ZodEffects,...H(r)});var Pt=class extends ee{_parse(t){return this._getType(t)===C.undefined?ut(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Pt.create=(e,t)=>new Pt({innerType:e,typeName:E.ZodOptional,...H(t)});var br=class extends ee{_parse(t){return this._getType(t)===C.null?ut(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};br.create=(e,t)=>new br({innerType:e,typeName:E.ZodNullable,...H(t)});var oo=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===C.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oo.create=(e,t)=>new oo({innerType:e,typeName:E.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...H(t)});var io=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return hi(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Tt(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Tt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};io.create=(e,t)=>new io({innerType:e,typeName:E.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...H(t)});var Si=class extends ee{_parse(t){if(this._getType(t)!==C.nan){let o=this._getOrReturnCtx(t);return A(o,{code:T.invalid_type,expected:C.nan,received:o.parsedType}),F}return{status:"valid",value:t.data}}};Si.create=e=>new Si({typeName:E.ZodNaN,...H(e)});var X2=Symbol("zod_brand"),Ka=class extends ee{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Ba=class e extends ee{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?F:i.status==="dirty"?(r.dirty(),Kn(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?F:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:E.ZodPipeline})}},so=class extends ee{_parse(t){let r=this._def.innerType._parse(t),o=n=>(hn(n)&&(n.value=Object.freeze(n.value)),n);return hi(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};so.create=(e,t)=>new so({innerType:e,typeName:E.ZodReadonly,...H(t)});var eZ={object:zt.lazycreate},E;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(E||(E={}));var tZ=Hn.create,rZ=gi.create,nZ=Si.create,oZ=_i.create,iZ=vi.create,sZ=yi.create,aZ=bi.create,cZ=Jn.create,uZ=Qn.create,lZ=wi.create,dZ=Cr.create,pZ=sr.create,fZ=$i.create,mZ=Dr.create,yv=zt.create,hZ=zt.strictCreate,gZ=Yn.create,_Z=Bd.create,vZ=Xn.create,yZ=yr.create,bZ=Jd.create,wZ=ki.create,$Z=xi.create,kZ=Qd.create,xZ=eo.create,SZ=to.create,TZ=ro.create,PZ=no.create,zZ=gn.create,EZ=Wt.create,IZ=Pt.create,NZ=br.create,OZ=Wt.createWithPreprocess,RZ=Ba.create;var Kt={};mn(Kt,{$ZodAny:()=>jc,$ZodArray:()=>ho,$ZodAsyncError:()=>ar,$ZodBase64:()=>xc,$ZodBase64URL:()=>Sc,$ZodBigInt:()=>Di,$ZodBigIntFormat:()=>Ic,$ZodBoolean:()=>mo,$ZodCIDRv4:()=>$c,$ZodCIDRv6:()=>kc,$ZodCUID:()=>hc,$ZodCUID2:()=>gc,$ZodCatch:()=>Yc,$ZodCheck:()=>De,$ZodCheckBigIntFormat:()=>Up,$ZodCheckEndsWith:()=>Yp,$ZodCheckGreaterThan:()=>sc,$ZodCheckIncludes:()=>Jp,$ZodCheckLengthEquals:()=>Gp,$ZodCheckLessThan:()=>ic,$ZodCheckLowerCase:()=>Bp,$ZodCheckMaxLength:()=>Fp,$ZodCheckMaxSize:()=>Lp,$ZodCheckMimeType:()=>ef,$ZodCheckMinLength:()=>Wp,$ZodCheckMinSize:()=>Zp,$ZodCheckMultipleOf:()=>qp,$ZodCheckNumberFormat:()=>Mp,$ZodCheckOverwrite:()=>tf,$ZodCheckProperty:()=>Xp,$ZodCheckRegex:()=>Kp,$ZodCheckSizeEquals:()=>Vp,$ZodCheckStartsWith:()=>Qp,$ZodCheckStringFormat:()=>fo,$ZodCheckUpperCase:()=>Hp,$ZodCustom:()=>ou,$ZodCustomStringFormat:()=>zc,$ZodDate:()=>Dc,$ZodDefault:()=>Bc,$ZodDiscriminatedUnion:()=>qc,$ZodE164:()=>Tc,$ZodEmail:()=>dc,$ZodEmoji:()=>fc,$ZodEnum:()=>Vc,$ZodError:()=>ji,$ZodFile:()=>Wc,$ZodFunction:()=>Ru,$ZodGUID:()=>uc,$ZodIPv4:()=>bc,$ZodIPv6:()=>wc,$ZodISODate:()=>sf,$ZodISODateTime:()=>of,$ZodISODuration:()=>cf,$ZodISOTime:()=>af,$ZodIntersection:()=>Mc,$ZodJWT:()=>Pc,$ZodKSUID:()=>yc,$ZodLazy:()=>nu,$ZodLiteral:()=>Fc,$ZodMap:()=>Lc,$ZodNaN:()=>Xc,$ZodNanoID:()=>mc,$ZodNever:()=>Ac,$ZodNonOptional:()=>Jc,$ZodNull:()=>Rc,$ZodNullable:()=>Kc,$ZodNumber:()=>Ci,$ZodNumberFormat:()=>Ec,$ZodObject:()=>qi,$ZodOptional:()=>Gc,$ZodPipe:()=>_o,$ZodPrefault:()=>Hc,$ZodPromise:()=>ru,$ZodReadonly:()=>eu,$ZodRealError:()=>uo,$ZodRecord:()=>Uc,$ZodRegistry:()=>yo,$ZodSet:()=>Zc,$ZodString:()=>Zr,$ZodStringFormat:()=>ke,$ZodSuccess:()=>Qc,$ZodSymbol:()=>Nc,$ZodTemplateLiteral:()=>tu,$ZodTransform:()=>go,$ZodTuple:()=>Vr,$ZodType:()=>G,$ZodULID:()=>_c,$ZodURL:()=>pc,$ZodUUID:()=>lc,$ZodUndefined:()=>Oc,$ZodUnion:()=>Mi,$ZodUnknown:()=>$n,$ZodVoid:()=>Cc,$ZodXID:()=>vc,$brand:()=>Ja,$constructor:()=>v,$input:()=>au,$output:()=>su,Doc:()=>Ai,JSONSchema:()=>zy,JSONSchemaGenerator:()=>ws,NEVER:()=>Ha,TimePrecision:()=>uu,_any:()=>ku,_array:()=>bs,_base64:()=>os,_base64url:()=>is,_bigint:()=>_u,_boolean:()=>gu,_catch:()=>ez,_cidrv4:()=>rs,_cidrv6:()=>ns,_coercedBigint:()=>_f,_coercedBoolean:()=>gf,_coercedDate:()=>vf,_coercedNumber:()=>hf,_coercedString:()=>lf,_cuid:()=>Hi,_cuid2:()=>Ji,_custom:()=>Eu,_date:()=>Tu,_default:()=>QP,_discriminatedUnion:()=>UP,_e164:()=>ss,_email:()=>Li,_emoji:()=>Ki,_endsWith:()=>ms,_enum:()=>WP,_file:()=>zu,_float32:()=>pu,_float64:()=>fu,_gt:()=>kr,_gte:()=>_t,_guid:()=>bo,_includes:()=>ps,_int:()=>du,_int32:()=>mu,_int64:()=>vu,_intersection:()=>LP,_ipv4:()=>es,_ipv6:()=>ts,_isoDate:()=>pf,_isoDateTime:()=>df,_isoDuration:()=>mf,_isoTime:()=>ff,_jwt:()=>as,_ksuid:()=>Xi,_lazy:()=>oz,_length:()=>ko,_literal:()=>KP,_lowercase:()=>ls,_lt:()=>$r,_lte:()=>Ot,_map:()=>VP,_max:()=>Ot,_maxLength:()=>$o,_maxSize:()=>wo,_mime:()=>hs,_min:()=>_t,_minLength:()=>Fr,_minSize:()=>Sn,_multipleOf:()=>xn,_nan:()=>Pu,_nanoid:()=>Bi,_nativeEnum:()=>GP,_negative:()=>bf,_never:()=>xu,_nonnegative:()=>$f,_nonoptional:()=>YP,_nonpositive:()=>wf,_normalize:()=>gs,_null:()=>$u,_nullable:()=>JP,_number:()=>lu,_optional:()=>HP,_overwrite:()=>xr,_parse:()=>ec,_parseAsync:()=>tc,_pipe:()=>tz,_positive:()=>yf,_promise:()=>iz,_property:()=>kf,_readonly:()=>rz,_record:()=>ZP,_refine:()=>Iu,_regex:()=>us,_safeParse:()=>rc,_safeParseAsync:()=>nc,_set:()=>FP,_size:()=>cs,_startsWith:()=>fs,_string:()=>cu,_stringFormat:()=>Ou,_stringbool:()=>Nu,_success:()=>XP,_symbol:()=>bu,_templateLiteral:()=>nz,_toLowerCase:()=>vs,_toUpperCase:()=>ys,_transform:()=>BP,_trim:()=>_s,_tuple:()=>xf,_uint32:()=>hu,_uint64:()=>yu,_ulid:()=>Qi,_undefined:()=>wu,_union:()=>MP,_unknown:()=>kn,_uppercase:()=>ds,_url:()=>Gi,_uuid:()=>Zi,_uuidv4:()=>Vi,_uuidv6:()=>Fi,_uuidv7:()=>Wi,_void:()=>Su,_xid:()=>Yi,clone:()=>tt,config:()=>Le,flattenError:()=>lo,formatError:()=>po,function:()=>ju,globalConfig:()=>Ti,globalRegistry:()=>Gt,isValidBase64:()=>uf,isValidBase64URL:()=>Mv,isValidJWT:()=>Uv,locales:()=>vo,parse:()=>yn,parseAsync:()=>bn,prettifyError:()=>Xa,regexes:()=>Lr,registry:()=>Ui,safeParse:()=>Mr,safeParseAsync:()=>Ur,toDotPath:()=>wv,toJSONSchema:()=>xo,treeifyError:()=>Ya,util:()=>R,version:()=>rf});var Ha=Object.freeze({status:"aborted"});function v(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let l in s.prototype)l in a||Object.defineProperty(a,l,{value:s.prototype[l].bind(a)});a._zod.constr=s,a._zod.def=c}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Ja=Symbol("zod_brand"),ar=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ti={};function Le(e){return e&&Object.assign(Ti,e),Ti}var R={};mn(R,{BIGINT_FORMAT_RANGES:()=>ap,Class:()=>Xd,NUMBER_FORMAT_RANGES:()=>sp,aborted:()=>vn,allowsEval:()=>np,assert:()=>PT,assertEqual:()=>kT,assertIs:()=>ST,assertNever:()=>TT,assertNotEqual:()=>xT,assignProp:()=>rp,cached:()=>Ei,captureStackTrace:()=>Qa,cleanEnum:()=>UT,cleanRegex:()=>Ii,clone:()=>tt,createTransparentProxy:()=>RT,defineLazy:()=>ve,esc:()=>_n,escapeRegex:()=>wr,extend:()=>CT,finalizeIssue:()=>Et,floatSafeRemainder:()=>tp,getElementAtPath:()=>zT,getEnumValues:()=>zi,getLengthableOrigin:()=>Ri,getParsedType:()=>OT,getSizableOrigin:()=>Oi,isObject:()=>ao,isPlainObject:()=>co,issue:()=>cp,joinValues:()=>x,jsonStringifyReplacer:()=>ep,merge:()=>DT,normalizeParams:()=>O,nullish:()=>qr,numKeys:()=>NT,omit:()=>AT,optionalKeys:()=>ip,partial:()=>qT,pick:()=>jT,prefixIssues:()=>gt,primitiveTypes:()=>op,promiseAllObject:()=>ET,propertyKeyTypes:()=>Ni,randomString:()=>IT,required:()=>MT,stringifyPrimitive:()=>j,unwrapMessage:()=>Pi});function kT(e){return e}function xT(e){return e}function ST(e){}function TT(e){throw new Error}function PT(e){}function zi(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function x(e,t="|"){return e.map(r=>j(r)).join(t)}function ep(e,t){return typeof t=="bigint"?t.toString():t}function Ei(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function qr(e){return e==null}function Ii(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function tp(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}function ve(e,t,r){Object.defineProperty(e,t,{get(){{let n=r();return e[t]=n,n}throw new Error("cached value already set")},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function rp(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function zT(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function ET(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function IT(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function _n(e){return JSON.stringify(e)}var Qa=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function ao(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var np=Ei(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function co(e){if(ao(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(ao(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function NT(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var OT=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Ni=new Set(["string","number","symbol"]),op=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tt(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function O(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function RT(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function j(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ip(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var sp={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]},ap={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function jT(e,t){let r={},o=e._zod.def;for(let n in t){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&(r[n]=o.shape[n])}return tt(e,{...e._zod.def,shape:r,checks:[]})}function AT(e,t){let r={...e._zod.def.shape},o=e._zod.def;for(let n in t){if(!(n in o.shape))throw new Error(`Unrecognized key: "${n}"`);t[n]&&delete r[n]}return tt(e,{...e._zod.def,shape:r,checks:[]})}function CT(e,t){if(!co(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return rp(this,"shape",o),o},checks:[]};return tt(e,r)}function DT(e,t){return tt(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return rp(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function qT(e,t,r){let o=t._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=e?new e({type:"optional",innerType:o[i]}):o[i])}else for(let i in o)n[i]=e?new e({type:"optional",innerType:o[i]}):o[i];return tt(t,{...t._zod.def,shape:n,checks:[]})}function MT(e,t,r){let o=t._zod.def.shape,n={...o};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(n[i]=new e({type:"nonoptional",innerType:o[i]}))}else for(let i in o)n[i]=new e({type:"nonoptional",innerType:o[i]});return tt(t,{...t._zod.def,shape:n,checks:[]})}function vn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function gt(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Pi(e){return typeof e=="string"?e:e?.message}function Et(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=Pi(e.inst?._zod.def?.error?.(e))??Pi(t?.error?.(e))??Pi(r.customError?.(e))??Pi(r.localeError?.(e))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Oi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ri(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function cp(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function UT(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Xd=class{constructor(...t){}};var bv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,ep,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ji=v("$ZodError",bv),uo=v("$ZodError",bv,{Parent:Error});function lo(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function po(e,t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)o._errors.push(r(s));else{let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return n(e),o}function Ya(e,t){let r=t||function(i){return i.message},o={errors:[]},n=(i,s=[])=>{var a,c;for(let u of i.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>n({issues:l},u.path));else if(u.code==="invalid_key")n({issues:u.issues},u.path);else if(u.code==="invalid_element")n({issues:u.issues},u.path);else{let l=[...s,...u.path];if(l.length===0){o.errors.push(r(u));continue}let d=o,h=0;for(;h<l.length;){let m=l[h],p=h===l.length-1;typeof m=="string"?(d.properties??(d.properties={}),(a=d.properties)[m]??(a[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(c=d.items)[m]??(c[m]={errors:[]}),d=d.items[m]),p&&d.errors.push(r(u)),h++}}};return n(e),o}function wv(e){let t=[];for(let r of e)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Xa(e){let t=[],r=[...e.issues].sort((o,n)=>o.path.length-n.path.length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${wv(o.path)}`);return t.join(`
|
|
17
17
|
`)}var ec=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new ar;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>Et(c,i,Le())));throw Qa(a,n?.callee),a}return s.value},yn=ec(uo),tc=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>Et(c,i,Le())));throw Qa(a,n?.callee),a}return s.value},bn=tc(uo),rc=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new ar;return i.issues.length?{success:!1,error:new(e??ji)(i.issues.map(s=>Et(s,n,Le())))}:{success:!0,data:i.value}},Mr=rc(uo),nc=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Et(s,n,Le())))}:{success:!0,data:i.value}},Ur=nc(uo);var Lr={};mn(Lr,{_emoji:()=>$v,base64:()=>kp,base64url:()=>oc,bigint:()=>Ip,boolean:()=>Rp,browserEmail:()=>HT,cidrv4:()=>wp,cidrv6:()=>$p,cuid:()=>up,cuid2:()=>lp,date:()=>Tp,datetime:()=>zp,domain:()=>JT,duration:()=>hp,e164:()=>Sp,email:()=>_p,emoji:()=>vp,extendedDuration:()=>ZT,guid:()=>gp,hostname:()=>xp,html5Email:()=>GT,integer:()=>Np,ipv4:()=>yp,ipv6:()=>bp,ksuid:()=>fp,lowercase:()=>Cp,nanoid:()=>mp,null:()=>jp,number:()=>Op,rfc5322Email:()=>KT,string:()=>Ep,time:()=>Pp,ulid:()=>dp,undefined:()=>Ap,unicodeEmail:()=>BT,uppercase:()=>Dp,uuid:()=>wn,uuid4:()=>VT,uuid6:()=>FT,uuid7:()=>WT,xid:()=>pp});var up=/^[cC][^\s-]{8,}$/,lp=/^[0-9a-z]+$/,dp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,pp=/^[0-9a-vA-V]{20}$/,fp=/^[A-Za-z0-9]{27}$/,mp=/^[a-zA-Z0-9_-]{21}$/,hp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ZT=/^[-+]?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)?)??$/,gp=/^([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})$/,wn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,VT=wn(4),FT=wn(6),WT=wn(7),_p=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,GT=/^[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])?)*$/,KT=/^(([^<>()\[\]\\.,;:\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,}))$/,BT=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,HT=/^[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])?)*$/,$v="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vp(){return new RegExp($v,"u")}var yp=/^(?:(?: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])$/,bp=/^(([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})$/,wp=/^((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])$/,$p=/^(([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])$/,kp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,oc=/^[A-Za-z0-9_-]*$/,xp=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,JT=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Sp=/^\+(?:[0-9]){6,14}[0-9]$/,kv="(?:(?:\\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])))",Tp=new RegExp(`^${kv}$`);function xv(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Pp(e){return new RegExp(`^${xv(e)}$`)}function zp(e){let t=xv({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${kv}T(?:${o})$`)}var Ep=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ip=/^\d+n?$/,Np=/^\d+$/,Op=/^-?\d+(?:\.\d+)?/i,Rp=/true|false/i,jp=/null/i;var Ap=/undefined/i;var Cp=/^[^A-Z]*$/,Dp=/^[^a-z]*$/;var De=v("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Tv={number:"number",bigint:"bigint",object:"date"},ic=v("$ZodCheckLessThan",(e,t)=>{De.init(e,t);let r=Tv[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),sc=v("$ZodCheckGreaterThan",(e,t)=>{De.init(e,t);let r=Tv[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qp=v("$ZodCheckMultipleOf",(e,t)=>{De.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):tp(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Mp=v("$ZodCheckNumberFormat",(e,t)=>{De.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=sp[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Np)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),Up=v("$ZodCheckBigIntFormat",(e,t)=>{De.init(e,t);let[r,o]=ap[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e})}}),Lp=v("$ZodCheckMaxSize",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Oi(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),Zp=v("$ZodCheckMinSize",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Oi(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),Vp=v("$ZodCheckSizeEquals",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Oi(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Fp=v("$ZodCheckMaxLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=Ri(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Wp=v("$ZodCheckMinLength",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=Ri(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Gp=v("$ZodCheckLengthEquals",(e,t)=>{var r;De.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!qr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=Ri(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),fo=v("$ZodCheckStringFormat",(e,t)=>{var r,o;De.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Kp=v("$ZodCheckRegex",(e,t)=>{fo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Bp=v("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Cp),fo.init(e,t)}),Hp=v("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Dp),fo.init(e,t)}),Jp=v("$ZodCheckIncludes",(e,t)=>{De.init(e,t);let r=wr(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Qp=v("$ZodCheckStartsWith",(e,t)=>{De.init(e,t);let r=new RegExp(`^${wr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Yp=v("$ZodCheckEndsWith",(e,t)=>{De.init(e,t);let r=new RegExp(`.*${wr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Sv(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues))}var Xp=v("$ZodCheckProperty",(e,t)=>{De.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Sv(n,r,t.property));Sv(o,r,t.property)}}),ef=v("$ZodCheckMimeType",(e,t)=>{De.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e})}}),tf=v("$ZodCheckOverwrite",(e,t)=>{De.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ai=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
|
|
18
18
|
`).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
|
|
19
19
|
`))}};var rf={major:4,minor:0,patch:0};var G=v("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rf;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(i,s,a)=>{let c=vn(i),u;for(let l of s){if(l._zod.def.when){if(!l._zod.def.when(i))continue}else if(c)continue;let d=i.issues.length,h=l._zod.check(i);if(h instanceof Promise&&a?.async===!1)throw new ar;if(u||h instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await h,i.issues.length!==d&&(c||(c=vn(i,d)))});else{if(i.issues.length===d)continue;c||(c=vn(i,d))}}return u?u.then(()=>i):i};e._zod.run=(i,s)=>{let a=e._zod.parse(i,s);if(a instanceof Promise){if(s.async===!1)throw new ar;return a.then(c=>n(c,o,s))}return n(a,o,s)}}e["~standard"]={validate:n=>{try{let i=Mr(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ur(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Zr=v("$ZodString",(e,t)=>{G.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ep(e._zod.bag),e._zod.parse=(r,o)=>{if(t.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:e}),r}}),ke=v("$ZodStringFormat",(e,t)=>{fo.init(e,t),Zr.init(e,t)}),uc=v("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gp),ke.init(e,t)}),lc=v("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=wn(o))}else t.pattern??(t.pattern=wn());ke.init(e,t)}),dc=v("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_p),ke.init(e,t)}),pc=v("$ZodURL",(e,t)=>{ke.init(e,t),e._zod.check=r=>{try{let o=r.value,n=new URL(o),i=n.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:xp.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!o.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),fc=v("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vp()),ke.init(e,t)}),mc=v("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=mp),ke.init(e,t)}),hc=v("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=up),ke.init(e,t)}),gc=v("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=lp),ke.init(e,t)}),_c=v("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dp),ke.init(e,t)}),vc=v("$ZodXID",(e,t)=>{t.pattern??(t.pattern=pp),ke.init(e,t)}),yc=v("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=fp),ke.init(e,t)}),of=v("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zp(t)),ke.init(e,t)}),sf=v("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Tp),ke.init(e,t)}),af=v("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Pp(t)),ke.init(e,t)}),cf=v("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=hp),ke.init(e,t)}),bc=v("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=yp),ke.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4"})}),wc=v("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=bp),ke.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),$c=v("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=wp),ke.init(e,t)}),kc=v("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=$p),ke.init(e,t),e._zod.check=r=>{let[o,n]=r.value.split("/");try{if(!n)throw new Error;let i=Number(n);if(`${i}`!==n)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function uf(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var xc=v("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=kp),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{uf(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Mv(e){if(!oc.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return uf(r)}var Sc=v("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=oc),ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{Mv(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Tc=v("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Sp),ke.init(e,t)});function Uv(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var Pc=v("$ZodJWT",(e,t)=>{ke.init(e,t),e._zod.check=r=>{Uv(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),zc=v("$ZodCustomStringFormat",(e,t)=>{ke.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Ci=v("$ZodNumber",(e,t)=>{G.init(e,t),e._zod.pattern=e._zod.bag.pattern??Op,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Ec=v("$ZodNumber",(e,t)=>{Mp.init(e,t),Ci.init(e,t)}),mo=v("$ZodBoolean",(e,t)=>{G.init(e,t),e._zod.pattern=Rp,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Di=v("$ZodBigInt",(e,t)=>{G.init(e,t),e._zod.pattern=Ip,e._zod.parse=(r,o)=>{if(t.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:e}),r}}),Ic=v("$ZodBigInt",(e,t)=>{Up.init(e,t),Di.init(e,t)}),Nc=v("$ZodSymbol",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Oc=v("$ZodUndefined",(e,t)=>{G.init(e,t),e._zod.pattern=Ap,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Rc=v("$ZodNull",(e,t)=>{G.init(e,t),e._zod.pattern=jp,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),jc=v("$ZodAny",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),$n=v("$ZodUnknown",(e,t)=>{G.init(e,t),e._zod.parse=r=>r}),Ac=v("$ZodNever",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Cc=v("$ZodVoid",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Dc=v("$ZodDate",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function zv(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues)),t.value[r]=e.value}var ho=v("$ZodArray",(e,t)=>{G.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>zv(u,r,s))):zv(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function ac(e,t,r){e.issues.length&&t.issues.push(...gt(r,e.issues)),t.value[r]=e.value}function Ev(e,t,r,o){e.issues.length?o[r]===void 0?r in o?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...gt(r,e.issues)):e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}var qi=v("$ZodObject",(e,t)=>{G.init(e,t);let r=Ei(()=>{let d=Object.keys(t.shape);for(let m of d)if(!(t.shape[m]instanceof G))throw new Error(`Invalid element at key "${m}": expected a Zod schema`);let h=ip(t.shape);return{shape:t.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(h)}});ve(e._zod,"propValues",()=>{let d=t.shape,h={};for(let m in d){let p=d[m]._zod;if(p.values){h[m]??(h[m]=new Set);for(let f of p.values)h[m].add(f)}}return h});let o=d=>{let h=new Ai(["shape","payload","ctx"]),m=r.value,p=$=>{let k=_n($);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};h.write("const input = payload.value;");let f=Object.create(null),_=0;for(let $ of m.keys)f[$]=`key_${_++}`;h.write("const newResult = {}");for(let $ of m.keys)if(m.optionalKeys.has($)){let k=f[$];h.write(`const ${k} = ${p($)};`);let N=_n($);h.write(`
|
|
@@ -360,25 +360,25 @@ On providers that have a **Not Tagged** filter option in the console, you can us
|
|
|
360
360
|
\`\`\`sql
|
|
361
361
|
(resources.provider = 'gcp' AND tags.name = NULL) OR (resources.provider = 'aws' AND tags.name = NULL)
|
|
362
362
|
\`\`\`
|
|
363
|
-
`,description:"Learn how to use VQL when querying Resource Reports in Vantage.",title:"VQL for Resource Reports"}]]));var x0="2.
|
|
363
|
+
`,description:"Learn how to use VQL when querying Resource Reports in Vantage.",title:"VQL for Resource Reports"}]]));var x0="2.7.0";var uv={name:"Vantage Cloud Costs Helper",version:x0};async function S0(e,t,r,o,n){t["User-Agent"]=`vantage-mcp-server/${uv.version}`;let i=new URL(n,e);o==="GET"?Object.entries(r).forEach(([u,l])=>{l!=null&&i.searchParams.append(u,Array.isArray(l)?l.join(","):String(l))}):t["Content-Type"]="application/json";let s={method:o,headers:t,body:o!=="GET"?JSON.stringify(r):void 0},a=await fetch(i.toString(),s);if(!a.ok){let u=await a.text();try{let l=JSON.parse(u);if(Array.isArray(l.errors))return{errors:l.errors,ok:!1}}catch{}return{errors:[{message:"Vantage API request failed",status:a.status,endpoint:n,details:u}],ok:!1}}return a.status===204?{data:void 0,ok:!0}:{data:await a.json(),ok:!0}}var z=class{constructor(t){this.exception=t}};var lv=new Map;function I(e){let t=(r,o)=>{r.registerTool(e.name,{title:e.title,description:e.description,inputSchema:e.args,outputSchema:e.outputSchema,annotations:{readOnlyHint:e.annotations.readOnly,openWorldHint:e.annotations.openWorld,destructiveHint:e.annotations.destructive}},async n=>{try{let i=await e.execute(n,o());return e.outputSchema?{structuredContent:i}:{content:[{type:"text",text:JSON.stringify(i,null,2)}],isError:!1}}catch(i){if(i instanceof z)return{content:[{type:"text",text:JSON.stringify(i.exception,null,2)}],isError:!0};throw i}})};if(lv.has(e.name))throw new Error(`Tool ${e.name} is already registered`);return lv.set(e.name,t),e}function T0(e,t){for(let r of lv.values())r(e,t)}var B4="Invalid date input, must be YYYY-MM-DD format and a reasonable date.";function H4(e){let t="2030-01-01",r="2010-01-01";if(!e||e===""||typeof e!="string"||e<r||e>t)return!1;let o=Date.parse(e);return!(Number.isNaN(o)||o<=Date.parse(r)||o>=Date.parse(t))}function we(e){return g.string().refine(H4,{error:B4}).describe(e)}var Ld=g.object({start_at:we("The start date of the period."),end_at:we("The end date of the period.").optional(),amount:g.number().min(0).describe("The amount of the period.")});var J4=`
|
|
364
364
|
Creates a budget based on the parameters specified. This is useful if you have been tasked with managing budgets
|
|
365
365
|
or you are building a cost report with budgets in mind.
|
|
366
|
-
`.trim(),UB=I({name:"create-budget",description:J4,annotations:{destructive:!
|
|
366
|
+
`.trim(),UB=I({name:"create-budget",title:"Create Budget",description:J4,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{name:g.string().min(1).describe("The name of the Budget."),workspace_token:g.string().optional().describe("The token of the Workspace to add the Budget to."),cost_report_token:g.string().optional().describe("The CostReport token. Ignored for hierarchical Budgets."),child_budget_tokens:g.array(g.string()).optional().describe("The tokens of any child Budgets when creating a hierarchical Budget."),periods:g.array(Ld).optional().describe("The periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.")},async execute(e,t){let r=await t.callVantageApi("/v2/budgets",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var E0=Ue(Ge());var YU=`
|
|
367
367
|
Deletes a Budget by its token. This action is irreversible.
|
|
368
|
-
`.trim(),q5=I({name:"delete-budget",description:YU,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{budget_token:g.string().describe("The token of the Budget to delete.")},async execute(e,t){let r=await t.callVantageApi(`/v2/budgets/${(0,E0.pathEncode)(e.budget_token)}`,{},"DELETE");if(!r.ok)throw new z({errors:r.errors});return{token:e.budget_token}}});var I0=Ue(Ge());var XU=`
|
|
368
|
+
`.trim(),q5=I({name:"delete-budget",title:"Delete Budget",description:YU,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{budget_token:g.string().describe("The token of the Budget to delete.")},async execute(e,t){let r=await t.callVantageApi(`/v2/budgets/${(0,E0.pathEncode)(e.budget_token)}`,{},"DELETE");if(!r.ok)throw new z({errors:r.errors});return{token:e.budget_token}}});var I0=Ue(Ge());var XU=`
|
|
369
369
|
Gets a specific Budget by its token. Optionally includes performance data showing actual spend vs. budget amounts by period.
|
|
370
370
|
The token of a budget can be used to link the user to the budget in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<BudgetToken>
|
|
371
|
-
`.trim(),V5=I({name:"get-budget",description:XU,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{budget_token:g.string().describe("The token of the Budget to retrieve."),include_performance:g.boolean().optional().describe("If true, includes performance data showing actual spend vs. budget amounts by period.")},async execute(e,t){let{budget_token:r,...o}=e,n=await t.callVantageApi(`/v2/budgets/${(0,I0.pathEncode)(r)}`,o,"GET");if(!n.ok)throw new z({errors:n.errors});return n.data}});function
|
|
371
|
+
`.trim(),V5=I({name:"get-budget",title:"Get Budget",description:XU,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{budget_token:g.string().describe("The token of the Budget to retrieve."),include_performance:g.boolean().optional().describe("If true, includes performance data showing actual spend vs. budget amounts by period.")},async execute(e,t){let{budget_token:r,...o}=e,n=await t.callVantageApi(`/v2/budgets/${(0,I0.pathEncode)(r)}`,o,"GET");if(!n.ok)throw new z({errors:n.errors});return n.data}});function eL(e){let r=new URL(e).searchParams.get("page");return r?Number.parseInt(r,10):0}var N0={nextPage:0,hasNextPage:!1};function Y(e){let t=e?.links?.next;if(!t)return N0;let r=eL(t);return r===0?N0:{nextPage:r,hasNextPage:!0}}var tL=`
|
|
372
372
|
List all budgets available in the Vantage account. Budgets help track spending against predefined limits.
|
|
373
373
|
Use the page value of 1 to start.
|
|
374
374
|
A budget is built against a Cost Report. The Budget objects returned by this tool will have a "cost_report_token" field that contains the token of the Cost Report. The Cost Report has the "filter" field to know what is the range of providers & services that the budget is tracking.
|
|
375
375
|
When a user is looking at a Cost Report for a specific date range, they can decide if the providers and services spend is higher than desired by looking at the budgets for that report and the date range of the budget.
|
|
376
376
|
The token of a budget can be used to link the user to the budget in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<BudgetToken>
|
|
377
|
-
`.trim(),
|
|
377
|
+
`.trim(),rL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},Q5=I({name:"list-budgets",title:"List Budgets",description:tL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:rL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/budgets",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{budgets:o.data.budgets,pagination:Y(o.data)}}});var O0=Ue(Ge());var nL=`
|
|
378
378
|
Updates an existing Budget. You can update the name, linked Cost Report, child Budget tokens for hierarchical budgets, or budget periods.
|
|
379
|
-
`.trim(),nH=I({name:"update-budget",description:
|
|
379
|
+
`.trim(),nH=I({name:"update-budget",title:"Update Budget",description:nL,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{budget_token:g.string().describe("The token of the Budget to update."),name:g.string().min(1).optional().describe("The updated name of the Budget."),cost_report_token:g.string().optional().describe("The updated CostReport token. Ignored for hierarchical Budgets."),child_budget_tokens:g.array(g.string()).optional().describe("The updated tokens of child Budgets for a hierarchical Budget."),periods:g.array(Ld).optional().describe("The updated periods for the Budget. The start_at and end_at must be iso8601 formatted e.g. YYYY-MM-DD. Ignored for hierarchical Budgets.")},async execute(e,t){let{budget_token:r,...o}=e,n=await t.callVantageApi(`/v2/budgets/${(0,O0.pathEncode)(r)}`,o,"PUT");if(!n.ok)throw new z({errors:n.errors});return n.data}});var oL=`
|
|
380
380
|
Creates a cost alert based on the parameters specified. Cost alerts notify you when spending on one or more cost reports exceeds a specified threshold over a given interval.
|
|
381
|
-
`.trim(),fH=I({name:"create-cost-alert",description:
|
|
381
|
+
`.trim(),fH=I({name:"create-cost-alert",title:"Create Cost Alert",description:oL,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).max(255).describe("The title of the cost alert."),interval:g.enum(["day","week","month","quarter"]).describe("The interval for the cost alert."),threshold:g.number().gt(0).describe("The threshold amount that triggers the alert. Must be greater than 0."),unit_type:g.enum(["currency","percentage"]).describe("The unit type for the threshold."),workspace_token:g.string().describe("The token of the Workspace to add the cost alert to."),report_tokens:g.array(g.string()).min(1).max(10).describe("The tokens of the cost reports to monitor. Between 1 and 10 report tokens."),email_recipients:g.array(g.string()).optional().describe("Email addresses to notify when the alert triggers."),slack_channels:g.array(g.string()).optional().describe("Slack channels to notify when the alert triggers."),teams_channels:g.array(g.string()).optional().describe("Microsoft Teams channels to notify when the alert triggers."),minimum_threshold:g.number().min(0).optional().describe("Minimum threshold amount. Only applicable for percentage unit_type.")},async execute(e,t){let r=await t.callVantageApi("/v2/cost_alerts",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var iL=`
|
|
382
382
|
Create a new Cost Report in Vantage.
|
|
383
383
|
|
|
384
384
|
Cost Reports are saved queries that can be used to track and analyze spending over time. They can be filtered using VQL (Vantage Query Language) and configured with various display options.
|
|
@@ -403,7 +403,7 @@ Tag Filtering:
|
|
|
403
403
|
- Multiple tag values: (costs.provider = 'aws' AND tags.name = 'environment' AND (tags.value = 'dev' OR tags.value = 'staging'))
|
|
404
404
|
|
|
405
405
|
Use get-myself to find available workspaces and list-cost-providers/list-cost-services to find valid provider and service names for your VQL queries.
|
|
406
|
-
`.trim(),
|
|
406
|
+
`.trim(),sL=g.object({business_metric_token:g.string().min(1).describe("The token of the BusinessMetric to attach to the CostReport."),unit_scale:g.enum(["per_unit","per_hundred","per_thousand","per_million","per_billion"]).default("per_unit").describe("Determines the scale of the BusinessMetric's values within the CostReport."),label_filter:g.array(g.string()).optional().describe("Include only values with these labels in the CostReport.")}),aL=g.object({include_credits:g.boolean().default(!1).describe("Report will include credits."),include_refunds:g.boolean().default(!1).describe("Report will include refunds."),include_discounts:g.boolean().default(!0).describe("Report will include discounts."),include_tax:g.boolean().default(!0).describe("Report will include tax."),amortize:g.boolean().default(!0).describe("Report will amortize."),unallocated:g.boolean().default(!1).describe("Report will show unallocated costs."),aggregate_by:g.enum(["cost","usage"]).default("cost").describe("Report will aggregate by cost or usage."),show_previous_period:g.boolean().default(!0).describe("Report will show previous period costs or usage comparison.")}),cL=["this_month","last_7_days","last_30_days","last_month","last_3_months","last_6_months","custom","last_12_months","last_24_months","last_36_months","next_month","next_3_months","next_6_months","next_12_months","year_to_date","last_3_days","last_14_days"],uL=["area","line","bar","multi_bar","pie"],lL=g.object({x_axis_dimension:g.array(g.string()).optional().describe("The dimension used to group or label data along the x-axis (e.g., by date, region, or service). NOTE: Only one value is allowed at this time. Defaults to ['date']."),y_axis_dimension:g.string().optional().describe("The metric or measure displayed on the chart\u2019s y-axis. Possible values: 'cost', 'usage'. Defaults to 'cost'.")}),yH=I({name:"create-cost-report",title:"Create Cost Report",description:iL,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).describe("Title for the new Cost Report"),workspace_token:g.string().optional().describe("The token of the Workspace to add the Cost Report to. Ignored if 'folder_token' is set. Required if the API token is associated with multiple Workspaces."),groupings:g.array(g.string()).optional().transform(e=>e?.join(",")).describe("Grouping values for aggregating costs on the report. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>."),filter:g.string().optional().describe("VQL filter to apply to the Cost Report"),saved_filter_tokens:g.array(g.string()).optional().describe("The tokens of the SavedFilters to apply to the CostReport."),business_metric_tokens_with_metadata:g.array(sL).optional().describe("The tokens for any BusinessMetrics to attach to the CostReport, and the unit scale."),folder_token:g.string().optional().describe("The token of the Folder to add the CostReport to. Determines the Workspace the report is assigned to."),settings:aL.optional().describe("Report settings."),previous_period_start_date:we("The previous period start date of the CostReport. ISO 8601 Formatted.").optional(),previous_period_end_date:we("The previous period end date of the CostReport. ISO 8601 Formatted.").optional(),start_date:we("The start date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter.").optional(),end_date:we("The end date of the CostReport. ISO 8601 Formatted. Incompatible with 'date_interval' parameter, required with 'start_date'.").optional(),date_interval:g.enum(cL).optional().describe("The date interval of the CostReport. Incompatible with 'start_date' and 'end_date' parameters. Defaults to 'this_month' if start_date and end_date are not provided."),chart_type:g.enum(uL).optional().describe("The chart type to use in the CostReport. Defaults to 'line' if not provided."),chart_settings:lL.optional().describe("Report chart settings.")},async execute(e,t){let r=await t.callVantageApi("/v2/cost_reports",{...e,previous_period_end_date:e.previous_period_end_date,end_date:e.end_date},"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var dL=`
|
|
407
407
|
Create a new Dashboard in Vantage.
|
|
408
408
|
|
|
409
409
|
Dashboards are collections of widgets that visualize cost data. You can optionally attach widgets (by
|
|
@@ -423,10 +423,10 @@ The list of supported widgets is:
|
|
|
423
423
|
|
|
424
424
|
The token returned in the response can be used to link to the Dashboard in the Vantage Web UI:
|
|
425
425
|
https://console.vantage.sh/go/<token>
|
|
426
|
-
`.trim(),
|
|
426
|
+
`.trim(),pL=["this_month","last_7_days","last_30_days","last_month","last_3_months","last_6_months","custom","last_12_months","last_24_months","last_36_months","next_month","next_3_months","next_6_months","next_12_months","year_to_date","last_3_days","last_14_days"],fL=g.object({widgetable_token:g.string().describe("The token of the represented Resource."),title:g.string().describe("The title of the Widget (defaults to the title of the Resource).").optional(),settings:g.object({display_type:g.enum(["table","chart"]).describe("The display type of the Widget.")}).optional()}),SH=I({name:"create-dashboard",title:"Create Dashboard",description:dL,args:{title:g.string().min(1).describe("The title of the dashboard"),workspace_token:g.string().min(1).describe("The token of the Workspace to add the Dashboard to."),widgets:g.array(fL).describe("The widgets to add to the dashboard").optional(),saved_filter_tokens:g.array(g.string()).describe("The tokens of the Saved Filters used in the Dashboard").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, allowed values: day, week, month"),start_date:we("The start date of the dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter.").optional(),end_date:we("The end date of the dashboard. ISO 8601 Formatted. Incompatible with 'date_interval' parameter, required with 'start_date'.").optional(),date_interval:g.enum(pL).optional().describe("The date interval of the dashboard. Incompatible with 'start_date' and 'end_date' parameters.")},annotations:{destructive:!0,openWorld:!1,readOnly:!1},async execute(e,t){let r=await t.callVantageApi("/v2/dashboards",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var mL=`
|
|
427
427
|
Create a Folder for organizing Cost Reports. Folders can be nested by specifying a parent_folder_token.
|
|
428
428
|
SavedFilters can be applied to the Folder so that any Cost Report within it inherits those filters.
|
|
429
|
-
`.trim(),IH=I({name:"create-folder",description:
|
|
429
|
+
`.trim(),IH=I({name:"create-folder",title:"Create Folder",description:mL,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{title:g.string().min(1).describe("The title of the Folder."),parent_folder_token:g.string().optional().describe("The token of the parent Folder to nest this Folder under."),saved_filter_tokens:g.array(g.string()).optional().describe("The tokens of SavedFilters to apply to any Cost Report contained within the Folder."),workspace_token:g.string().optional().describe("The token of the Workspace to add the Folder to. Ignored if 'parent_folder_token' is set. Required if the API token is associated with multiple Workspaces.")},async execute(e,t){let r=await t.callVantageApi("/v2/folders",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var hL=`
|
|
430
430
|
Create a Virtual Tag Config in Vantage.
|
|
431
431
|
|
|
432
432
|
Virtual Tag Configs define a derived (virtual) tag key and a set of values determined by VQL filters.
|
|
@@ -437,33 +437,33 @@ You can optionally:
|
|
|
437
437
|
- backfill_until: backfill the virtual tag values to an earliest month
|
|
438
438
|
- collapsed_tag_keys: collapse values for specific underlying tag keys (optionally scoped by provider)
|
|
439
439
|
- values: define named values via VQL filters, optionally linked to Business Metrics and/or cost metrics
|
|
440
|
-
`.trim(),
|
|
440
|
+
`.trim(),gL=g.object({key:g.string().describe("The tag key to collapse values for."),providers:g.array(g.string()).describe("The providers this collapsed tag key applies to.").optional()}),_L=g.object({filter:g.string().describe("The filter VQL for the Value."),name:g.string().describe("The name of the Value.").optional(),business_metric_token:g.string().describe("The token of the associated BusinessMetric.").optional(),cost_metric:g.object({filter:g.string().describe("The filter VQL for the cost metric."),aggregation:g.object({tag:g.string().describe("The tag to aggregate on.")})}).optional()}),CH=I({name:"create-virtual-tag-config",title:"Create Virtual Tag Config",description:hL,args:{key:g.string().min(1).describe("The key of the VirtualTagConfig"),overridable:g.boolean().describe("Whether the VirtualTagConfig can override a provider-supplied tag on a matching Cost."),backfill_until:we("The earliest month the VirtualTagConfig should be backfilled to. ISO 8601 Formatted.").optional(),collapsed_tag_keys:g.array(gL).optional(),values:g.array(_L).optional()},annotations:{destructive:!0,openWorld:!1,readOnly:!1},async execute(e,t){let r=await t.callVantageApi("/v2/virtual_tag_configs",e,"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var R0=Ue(Ge());var vL=`
|
|
441
441
|
Deletes a cost report by its token. This action is irreversible.
|
|
442
|
-
`.trim(),
|
|
442
|
+
`.trim(),yL={cost_report_token:g.string().describe("Token of the cost report to delete")},LH=I({name:"delete-cost-report",title:"Delete Cost Report",description:vL,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:yL,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_reports/${(0,R0.pathEncode)(e.cost_report_token)}`,{},"DELETE");if(!r.ok)throw new z({errors:r.errors});return{token:e.cost_report_token}}});var j0=Ue(Ge());var bL=`
|
|
443
443
|
Deletes a Folder. Cost Reports within the Folder will not be deleted.
|
|
444
|
-
`.trim(),GH=I({name:"delete-folder",description:
|
|
444
|
+
`.trim(),GH=I({name:"delete-folder",title:"Delete Folder",description:bL,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{folder_token:g.string().describe("The token of the folder to delete")},async execute(e,t){let r=await t.callVantageApi(`/v2/folders/${(0,j0.pathEncode)(e.folder_token)}`,{},"DELETE");if(!r.ok)throw new z({errors:r.errors});return{token:e.folder_token}}});var A0=Ue(Ge());var wL=`
|
|
445
445
|
Gets a specific anomaly alert by its token.
|
|
446
|
-
`.trim(),$
|
|
446
|
+
`.trim(),$L={anomaly_alert_token:g.string().describe("The anomaly alert token to retrieve")},QH=I({name:"get-anomaly",title:"Get Anomaly",description:wL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:$L,async execute(e,t){let r=await t.callVantageApi(`/v2/anomaly_alerts/${(0,A0.pathEncode)(e.anomaly_alert_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var C0=Ue(Ge());var kL=`
|
|
447
447
|
Gets a specific cost alert by its token.
|
|
448
|
-
`.trim(),
|
|
448
|
+
`.trim(),xL={cost_alert_token:g.string().describe("The cost alert token to retrieve")},rJ=I({name:"get-cost-alert",title:"Get Cost Alert",description:kL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:xL,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_alerts/${(0,C0.pathEncode)(e.cost_alert_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var SL=`
|
|
449
449
|
Get the list of Cost Provider Accounts that the current user has access to in their workspace and their names.
|
|
450
450
|
This is useful for mapping IDs you have gotten from other endpoints to human-readable names, or if you need to get the
|
|
451
451
|
ID of a Cost Provider Account to use in places. The account_id in this result can be passed as the account_id in VQL queries.
|
|
452
|
-
`.trim(),aJ=I({name:"get-cost-provider-accounts",description:
|
|
452
|
+
`.trim(),aJ=I({name:"get-cost-provider-accounts",title:"Get Cost Provider Accounts",description:SL,args:{workspace_token:g.string().describe("Workspace token to list cost provider accounts for"),account_id:g.string().optional().describe("Filter by a specific account ID"),provider:g.string().optional().describe("Provider to filter provider accounts to")},annotations:{destructive:!1,openWorld:!1,readOnly:!0},async execute(e,t){let r=await t.callVantageApi("/v2/cost_provider_accounts",{...e,provider:e.provider},"GET");if(!r.ok)throw new z({errors:r.errors});return{cost_provider_accounts:r.data.cost_provider_accounts}}});var D0=Ue(Ge());var TL=`
|
|
453
453
|
Given a Cost Report Token, Vantage can forecast the costs for a given time range. Vantage will return costs that are *predicted*, but have not yet been actually incurred.
|
|
454
454
|
If the user does not set a date, best to pick the next month as the default.
|
|
455
455
|
The report token can be used to link the user to the report in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<CostReportToken>
|
|
456
|
-
`.trim(),
|
|
456
|
+
`.trim(),PL={cost_report_token:g.string().min(1).describe("Cost report to limit costs to"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),provider:g.string().optional().describe("Provider to filter costs by, refer to the list-cost-providers tool"),service:g.string().optional().describe("Service to filter costs by, refer to the list-cost-services tool, must pass a provider when you pass a service")},hJ=I({name:"get-cost-report-forecast",title:"Get Cost Report Forecast",description:TL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:PL,async execute(e,t){let r={...e,limit:128,provider:e.provider},o=await t.callVantageApi(`/v2/cost_reports/${(0,D0.pathEncode)(e.cost_report_token)}/forecasted_costs`,r,"GET");if(!o.ok)throw new z({errors:o.errors});return{forecasted_costs:o.data.forecasted_costs,pagination:Y(o.data)}}});var q0=Ue(Ge());var zL=`
|
|
457
457
|
Gets a specific cost report by its token. The token of a report can be used to generate a link to the report in the Vantage Web UI: https://console.vantage.sh/go/<token>
|
|
458
458
|
The same token can be used with the get-cost-report-forecast tool to retrieve forecasted future costs for the report.
|
|
459
|
-
`.trim(),
|
|
459
|
+
`.trim(),EL={cost_report_token:g.string().describe("The cost report token to retrieve")},bJ=I({name:"get-cost-report",title:"Get Cost Report",description:zL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:EL,async execute(e,t){let r=await t.callVantageApi(`/v2/cost_reports/${(0,q0.pathEncode)(e.cost_report_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var M0=Ue(Ge());var IL=`
|
|
460
460
|
Gets a specific Folder by its token.
|
|
461
|
-
`.trim(),SJ=I({name:"get-folder",description:
|
|
461
|
+
`.trim(),SJ=I({name:"get-folder",title:"Get Folder",description:IL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{folder_token:g.string().describe("The token of the folder to retrieve")},async execute(e,t){let r=await t.callVantageApi(`/v2/folders/${(0,M0.pathEncode)(e.folder_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var NL=`
|
|
462
462
|
Get data that is available to the current auth token.
|
|
463
463
|
This includes the list of Workspaces they have access to.
|
|
464
464
|
|
|
465
465
|
default_workspace_token: The token of the workspace that is set as the default workspace for the user and can be used for queries unless told otherwise.
|
|
466
|
-
`.trim(),
|
|
466
|
+
`.trim(),OL={},EJ=I({name:"get-myself",title:"Get Current User",description:NL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:OL,async execute(e,t){let r=await t.callVantageApi("/v2/me",{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var U0=Ue(Ge());var RL=`
|
|
467
467
|
Get detailed information about a specific provider resource using its token or UUID.
|
|
468
468
|
|
|
469
469
|
This returns comprehensive details about the resource including:
|
|
@@ -475,7 +475,7 @@ This returns comprehensive details about the resource including:
|
|
|
475
475
|
|
|
476
476
|
The resource_token can be either a Vantage token (starting with prvdr_rsrc) or the resource's UUID/ARN from the cloud provider.
|
|
477
477
|
Set include_cost to true to get cost information broken down by category.
|
|
478
|
-
`.trim(),jJ=I({name:"get-provider-resource",description:
|
|
478
|
+
`.trim(),jJ=I({name:"get-provider-resource",title:"Get Provider Resource",description:RL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{resource_token:g.string().nonempty().describe("The resource token (prvdr_rsrc_*) or UUID/ARN of the resource"),include_cost:g.boolean().optional().default(!1).describe("Include cost information broken down by category")},async execute(e,t){let r=await t.callVantageApi(`/v2/resources/${(0,U0.pathEncode)(e.resource_token)}`,{include_cost:e.include_cost},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var L0=Ue(Ge());var jL=`
|
|
479
479
|
Get comprehensive details about a specific cost optimization recommendation using its unique token.
|
|
480
480
|
|
|
481
481
|
This tool provides in-depth information about a single recommendation including:
|
|
@@ -492,7 +492,7 @@ This tool provides in-depth information about a single recommendation including:
|
|
|
492
492
|
Use this tool after getting a recommendation token from list-recommendations to understand exactly what optimization is being suggested and the potential impact.
|
|
493
493
|
|
|
494
494
|
The recommendation token can also be used with get-recommendation-resources to see the specific infrastructure resources involved.
|
|
495
|
-
`.trim(),
|
|
495
|
+
`.trim(),AL={recommendation_token:g.string().min(1).describe("The token of the recommendation to get details for")},MJ=I({name:"get-recommendation-details",title:"Get Recommendation Details",description:jL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:AL,async execute(e,t){let r=await t.callVantageApi(`/v2/recommendations/${(0,L0.pathEncode)(e.recommendation_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var fv=Ue(Ge());var CL=`
|
|
496
496
|
Get comprehensive details about a specific infrastructure resource within a cost optimization recommendation, including the exact actions recommended for that resource.
|
|
497
497
|
|
|
498
498
|
This tool provides the deepest level of detail about a single resource that's part of a recommendation. The response includes:
|
|
@@ -514,7 +514,7 @@ Use this tool when you need to understand exactly what should be done with a spe
|
|
|
514
514
|
This is the most granular level of recommendation data available and is essential for making informed decisions about implementing specific optimizations.
|
|
515
515
|
|
|
516
516
|
You must have both the recommendation token (from list-recommendations) and the resource token (from get-recommendation-resources) to use this tool.
|
|
517
|
-
`.trim(),
|
|
517
|
+
`.trim(),DL={recommendation_token:g.string().min(1).describe("The token of the recommendation"),resource_token:g.string().min(1).describe("The token of the specific resource to get details for")},FJ=I({name:"get-recommendation-resource-details",title:"Get Recommendation Resource Details",description:CL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:DL,async execute(e,t){let r=await t.callVantageApi(`/v2/recommendations/${(0,fv.pathEncode)(e.recommendation_token)}/resources/${(0,fv.pathEncode)(e.resource_token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var Z0=Ue(Ge());var qL=`
|
|
518
518
|
Get a paginated list of all infrastructure resources affected by a specific cost optimization recommendation.
|
|
519
519
|
|
|
520
520
|
This tool returns the actual cloud resources (instances, volumes, load balancers, etc.) that are involved in a recommendation. Each resource entry includes:
|
|
@@ -533,16 +533,16 @@ Use this tool after getting recommendation details to see exactly which resource
|
|
|
533
533
|
Each resource has its own token that can be used with get-recommendation-resource-details to get comprehensive information about that specific resource and what actions are recommended.
|
|
534
534
|
|
|
535
535
|
Use pagination (page parameter) to navigate through large numbers of affected resources.
|
|
536
|
-
`.trim(),
|
|
536
|
+
`.trim(),ML={recommendation_token:g.string().min(1).describe("The token of the recommendation to get resources for"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},QJ=I({name:"get-recommendation-resources",title:"Get Recommendation Resources",description:qL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:ML,async execute(e,t){let r={page:e.page,limit:128},o=await t.callVantageApi(`/v2/recommendations/${(0,Z0.pathEncode)(e.recommendation_token)}/resources`,r,"GET");if(!o.ok)throw new z({errors:o.errors});return{resources:o.data.resources,pagination:Y(o.data)}}});var V0=Ue(Ge());var UL=`
|
|
537
537
|
Gets a specific team with its token.
|
|
538
|
-
`.trim(),
|
|
538
|
+
`.trim(),LL={token:g.string().describe("The team token to retrieve")},rQ=I({name:"get-team",title:"Get Team",description:UL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:LL,async execute(e,t){let r=await t.callVantageApi(`/v2/teams/${(0,V0.pathEncode)(e.token)}`,{},"GET");if(!r.ok)throw new z({errors:r.errors});return r.data}});var ZL=`
|
|
539
539
|
Return all Teams that the user has access to.
|
|
540
|
-
`.trim(),
|
|
540
|
+
`.trim(),VL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},uQ=I({name:"get-teams",title:"Get Teams",description:ZL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:VL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/teams",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{teams:o.data.teams,pagination:Y(o.data)}}});var FL=`
|
|
541
541
|
Return all Users that the user can see in the workspace.
|
|
542
|
-
`.trim(),
|
|
542
|
+
`.trim(),WL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},gQ=I({name:"get-users",title:"Get Users",description:FL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:WL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/users",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{users:o.data.users,pagination:Y(o.data)}}});var GL=`
|
|
543
543
|
Given a token of a Cost Report, look for anomalies in the report. You may optionally pass a Provider, like AWS to filter on. If you do pass a Provider, you can futher filter on a Service, like EC2 or S3.
|
|
544
544
|
The report token can be used to link the user to the report in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<CostReportToken>
|
|
545
|
-
`.trim(),
|
|
545
|
+
`.trim(),KL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),cost_report_token:g.string().optional().describe("Cost report to filter anomalies by"),service:g.string().optional().describe("Service to filter anomalies to"),provider:g.string().optional().describe("Provider to filter anomalies to"),cost_category:g.string().optional().describe("Cost category to filter anomalies to"),start_date:we("Start date to filter anomalies to").optional(),end_date:we("End date to filter anomalies to").optional()},xQ=I({name:"list-anomalies",title:"List Anomalies",description:GL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:KL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/anomaly_alerts",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{anomaly_alerts:o.data.anomaly_alerts,pagination:Y(o.data)}}});var BL=`
|
|
546
546
|
List audit logs for actions taken within the Vantage workspace. Audit logs are a chronological record of all changes and activities that occur in your workspace, providing a complete history of who did what, when, and what changed.
|
|
547
547
|
|
|
548
548
|
Audit logs track various types of actions including:
|
|
@@ -579,28 +579,28 @@ Common use cases for audit logs include:
|
|
|
579
579
|
- Change management (reviewing modifications to reports or configurations)
|
|
580
580
|
- Activity monitoring (understanding workspace usage patterns)
|
|
581
581
|
- Distinguishing between human actions and autonomous agent actions (via scoutAction field and finops_agent source filter)
|
|
582
|
-
`.trim(),
|
|
582
|
+
`.trim(),HL={page:g.number().optional().default(1).describe("The page of results to return, defaults to 1"),limit:g.number().int().min(1).max(1e3).optional().describe("The amount of results to return. The maximum is 1000. Defaults to 100."),user:g.number().int().optional().describe("Filter by personal or service API token that performed the action (user ID)"),workspace_token:g.string().optional().describe("Filter by workspace token"),action:g.string().optional().describe("Filter by action type (e.g., create, update, delete)"),object_name:g.string().optional().describe("Filter by object name"),source:g.string().optional().describe("Filter by source (e.g., console, api, developer, finops_agent). Use 'finops_agent' to filter for actions specifically taken by the Finops Agent."),object_type:g.string().optional().describe("Filter by object type (e.g., virtual_tag, cost_report, recommendation_commitment)."),token:g.string().optional().describe("Filter by audit log token"),object_token:g.string().optional().describe("Filter by object token (auditable_token)"),start_date:g.string().optional().describe("Filter by start date (ISO 8601 format) for the time period"),end_date:g.string().optional().describe("Filter by end date (ISO 8601 format) for the time period")},NQ=I({name:"list-audit-logs",title:"List Audit Logs",description:BL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:HL,async execute(e,t){let r={...e,limit:e.limit??128},o=await t.callVantageApi("/v2/audit_logs",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{audit_logs:o.data.audit_logs,pagination:Y(o.data)}}});var JL=`
|
|
583
583
|
List all cost alerts available in the Vantage account. Cost alerts notify you when spending exceeds a specified threshold for a given cost report.
|
|
584
584
|
Use the page value of 1 to start.
|
|
585
|
-
`.trim(),
|
|
585
|
+
`.trim(),QL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},qQ=I({name:"list-cost-alerts",title:"List Cost Alerts",description:JL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:QL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/cost_alerts",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{cost_alerts:o.data.cost_alerts,pagination:Y(o.data)}}});var YL=`
|
|
586
586
|
List all cost provider integrations available to provide costs data from and their associated accounts.
|
|
587
587
|
Integrations are the cost providers that Vantage is configured to connect to and pull cost data from.
|
|
588
588
|
If a user wants to see their providers in the Vantage Web UI, they can visit https://console.vantage.sh/settings/integrations
|
|
589
589
|
|
|
590
590
|
Note that when 'provider' is 'custom_provider', that has a special case. When doing a VQL query for custom provider, use the 'token' you get back. Here is an example, where the token of the custom provider is "accss_crdntl_07171984":
|
|
591
591
|
(costs.provider = 'custom_provider:accss_crdntl_07171984')
|
|
592
|
-
`.trim(),
|
|
592
|
+
`.trim(),XL={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},WQ=I({name:"list-cost-integrations",title:"List Cost Integrations",description:YL,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:XL,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/integrations",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{integrations:o.data.integrations,pagination:Y(o.data)}}});var e2=`
|
|
593
593
|
List of cost providers available to query for a given Workspace. Can be used to filter costs down to a specific provider in VQL queries.
|
|
594
|
-
`.trim(),
|
|
594
|
+
`.trim(),t2={workspace_token:g.string().describe("Workspace token to list cost providers for")},QQ=I({name:"list-cost-providers",title:"List Cost Providers",description:e2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:t2,async execute(e,t){let r=await t.callVantageApi("/v2/cost_providers",e,"GET");if(!r.ok)throw new z({errors:r.errors});return{providers:r.data.cost_providers,pagination:Y(r.data)}}});var r2=`
|
|
595
595
|
List all cost reports available. Cost reports are already created reports authored by a user in Vantage. If the user isn't asking about a specific report, it's better to use the query-costs tool.
|
|
596
596
|
When you first call this function, use the "Page" parameter of 1.
|
|
597
597
|
The 'Title' of a report is a good way to know what the report is about.
|
|
598
598
|
The 'filter' of a report also gives clues to the data it provides.
|
|
599
599
|
The 'token' of a report is a unique identifier for the report. It can be used to generate a link to the report in the Vantage Web UI. If a user wants to see a report, you can link them like this: https://console.vantage.sh/go/<token>
|
|
600
600
|
Vantage offers data related to a cost report: Forecasts. The same report token can be used on the get-cost-report-forecast tool and Vantage will forecast future costs.
|
|
601
|
-
`.trim(),
|
|
601
|
+
`.trim(),n2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},o7=I({name:"list-cost-reports",title:"List Cost Reports",description:r2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:n2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/cost_reports",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{cost_reports:o.data.cost_reports,pagination:Y(o.data)}}});var o2=`
|
|
602
602
|
List of cost services available to query for a given Workspace. Can be used to filter costs down to a specific service in VQL queries.
|
|
603
|
-
`.trim(),
|
|
603
|
+
`.trim(),i2={workspace_token:g.string().describe("Workspace token to list cost services for")},u7=I({name:"list-cost-services",title:"List Cost Services",description:o2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:i2,async execute(e,t){let r=await t.callVantageApi("/v2/cost_services",e,"GET");if(!r.ok)throw new z({errors:r.errors});return{cost_services:r.data.cost_services}}});var s2=`
|
|
604
604
|
List the cost items inside a report. The Token of a Report must be provided. Use the page value of 1 to start.
|
|
605
605
|
The report token can be used to link the user to the report in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<CostReportToken>
|
|
606
606
|
|
|
@@ -609,17 +609,17 @@ When DateBin=day you get a record for each service spend on that day. For DateBi
|
|
|
609
609
|
with the accrued_at field set to the first day of the week, but the spend item represents spend for a full week.
|
|
610
610
|
Same with DateBin=month, each record returned covers a month of data. This lets you get answers with processing fewer
|
|
611
611
|
records. Only use day/week if needed, otherwise DateBin=month is preferred, and month is the value set if you pass no value for DateBin.
|
|
612
|
-
`.trim(),
|
|
612
|
+
`.trim(),a2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),cost_report_token:g.string().describe("The workspace token to scope the query to"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),settings_include_credits:g.boolean().optional().default(!1).describe("Results will include credits, defaults to false"),settings_include_refunds:g.boolean().optional().default(!1).describe("Results will include refunds, defaults to false"),settings_include_discounts:g.boolean().optional().default(!0).describe("Results will include discounts, defaults to true"),settings_include_tax:g.boolean().optional().default(!0).describe("Results will include tax, defaults to true"),settings_amortize:g.boolean().optional().default(!0).describe("Results will amortize, defaults to true"),settings_unallocated:g.boolean().optional().default(!1).describe("Results will show unallocated costs, defaults to false"),settings_aggregate_by:g.enum(["cost","usage"]).optional().default("cost").describe("Results will aggregate by cost or usage, defaults to cost"),settings_show_previous_period:g.boolean().optional().default(!0).describe("Results will show previous period costs or usage comparison, defaults to true"),groupings:g.array(g.string()).default(["provider","service","account_id"]).describe("Group the results by specific field(s). Defaults to provider, service, account_id. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. Let Groupings default unless explicitly asked for.")},_7=I({name:"list-costs",title:"List Costs",description:s2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:a2,async execute(e,t){let r={limit:128};Object.keys(e).forEach(i=>{let s=i;if(i.startsWith("settings_")){let a=i.slice(9);r[`settings[${a}]`]=e[s]}else r[i]=e[s]});let o=await t.callVantageApi("/v2/costs",r,"GET");if(!o.ok)throw new z({errors:o.errors});let n;switch(e.date_bin){case"day":n="Costs records represent one day.";break;case"week":n="Costs records represent one week, the accrued_at field is the first day of the week. If your date range is less than one week, this record includes only data for that date range, not the full week.";break;case"month":n="Costs records represent one month, the accrued_at field is the first day of the month. If your date range is less than one month, this record includes only data for that date range, not the full month.";break;default:n="Costs records represent one day.";break}return{costs:o.data.costs,total_cost:o.data.total_cost,notes:n,pagination:Y(o.data)}}});var c2=`
|
|
613
613
|
List all dashboards available in the Vantage account. Dashboards provide visualizations of cost data.
|
|
614
614
|
Use the page value of 1 to start.
|
|
615
615
|
The token of a dashboard can be used to link the user to the dashboard in the Vantage Web UI. Build the link like this: https://console.vantage.sh/go/<token>
|
|
616
|
-
`.trim(),
|
|
616
|
+
`.trim(),u2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},k7=I({name:"list-dashboards",title:"List Dashboards",description:c2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:u2,async execute(e,t){let r={...e,limit:64},o=await t.callVantageApi("/v2/dashboards",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{dashboards:o.data.dashboards,pagination:Y(o.data)}}});var l2=`
|
|
617
617
|
List all Folders for organizing Cost Reports. Folders can be nested within other Folders via the parent_folder_token field.
|
|
618
618
|
When you first call this function, use the "page" parameter of 1.
|
|
619
619
|
The 'title' of a Folder describes its purpose.
|
|
620
620
|
The 'saved_filter_tokens' field contains tokens of SavedFilters applied to Cost Reports within the Folder.
|
|
621
621
|
The 'token' of a Folder can be used to generate a link in the Vantage Web UI: https://console.vantage.sh/go/<token>
|
|
622
|
-
`.trim(),
|
|
622
|
+
`.trim(),d2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},I7=I({name:"list-folders",title:"List Folders",description:l2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:d2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/folders",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{folders:o.data.folders,pagination:Y(o.data)}}});var p2=`
|
|
623
623
|
List infrastructure provider resources (instances, volumes, load balancers, etc.) from your cloud accounts.
|
|
624
624
|
Resources can be fetched either from a specific Resource Report or by using VQL filters.
|
|
625
625
|
|
|
@@ -696,7 +696,7 @@ Use the page parameter starting with 1 for pagination.
|
|
|
696
696
|
|
|
697
697
|
Resources include metadata specific to their type (EC2 instances show instance type, EBS volumes show size, etc.).
|
|
698
698
|
Each resource has a unique token that can be used to get more details or link to the Vantage Web UI.
|
|
699
|
-
`.trim(),
|
|
699
|
+
`.trim(),f2={aws_ec2_instance:"aws_instance",aws_rds_instance:"aws_db_instance",aws_rds_snapshot:"aws_db_snapshot",aws_ebs_snapshot:"aws_instance_snapshot"};function m2(e){for(let[t,r]of Object.entries(f2))e=e.replaceAll(t,r);return e}var C7=I({name:"list-provider-resources",title:"List Provider Resources",description:p2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:{page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),resource_report_token:g.string().optional().describe("The ResourceReport token to get resources from"),filter:g.string().optional().describe("VQL query to filter resources (requires workspace_token)"),workspace_token:g.string().optional().describe("The Workspace token to scope the query to (required when using filter)"),include_cost:g.boolean().optional().default(!1).describe("Include cost information broken down by category for each resource")},async execute(e,t){e.filter&&(e.filter=m2(e.filter));let r=await t.callVantageApi("/v2/resources",e,"GET");if(!r.ok)throw new z({errors:r.errors});return{resources:r.data.resources,pagination:Y(r.data)}}});var h2=["aws","gcp","azure","kubernetes","datadog"],Wa={aws:"aws",amazon:"aws","amazon web services":"aws",gcp:"gcp",google:"gcp","google cloud":"gcp",azure:"azure","microsoft azure":"azure",kubernetes:"kubernetes",k8s:"kubernetes",datadog:"datadog"},g2=Object.keys(Wa).sort((e,t)=>t.length-e.length),_2={az_compute_reserved_instances:"azure:compute:reserved-instances",az_compute_reserved_instances_app_service:"azure:app-service:reserved-instances",az_compute_reserved_instances_cosmos:"azure:cosmosdb:reserved-instances",az_compute_reserved_instances_sql:"azure:sqldb:reserved-instances",az_disks_unattached:"azure:disks:unattached",cloudfront_cloudflare:"aws:cloudfront:excessive-egress",cw_log_retention_policy:"aws:cloudwatch:log-retention",database_savings_plan:"aws:database:savings-plan",datadog_financial_commitments:"datadog:commitment:opportunity",ebs_compute_optimizer_recommender:"aws:ebs:rightsizing",ebs_gp2_to_gp3:"aws:ebs:gp2-to-gp3",ebs_unattached_volume:"aws:ebs:unattached-volume",ec2_compute_optimizer_recommender:"aws:ec2:co-rightsizing",ec2_generational_upgrades:"aws:ec2:generational-upgrade",ec2_rightsizing_recommender:"aws:ec2:rightsizing",ec2_snapshot_recommender:"aws:ec2:snapshot-cleanup",ecs_compute_optimizer_recommender:"aws:ecs:rightsizing",eks_approaching_extended_support_window:"aws:eks:nearing-extended-support",eks_in_extended_support_window:"aws:eks:in-extended-support",elastic_search_reserved_instances:"aws:opensearch:reserved-instances",elasticache_reserved_instances:"aws:elasticache:reserved-instances",es_generational_upgrades:"aws:opensearch:generational-upgrade",gcp_compute_commitment_recommender:"gcp:compute:commitment",gcp_compute_rightsizing_recommender:"gcp:compute:rightsizing",idle_compute_optimizer_recommender:"idle-resource",ip_unattached:"aws:elastic-ip:unattached",kubernetes_recommender:"kubernetes:workload:rightsizing",lambda_compute_optimizer_recommender:"aws:lambda:rightsizing",rds_approaching_extended_support_window:"aws:rds:nearing-extended-support",rds_compute_optimizer_recommender:"aws:rds:rightsizing",rds_generational_upgrades:"aws:rds:generational-upgrade",rds_in_extended_support_window:"aws:rds:in-extended-support",rds_reserved_instances:"aws:rds:reserved-instances",redshift_reserved_instances:"aws:redshift:reserved-instances",s3_bucket_glacier_instant_retrieval:"aws:s3:glacier-instant-retrieval",s3_bucket_intelligent_tiering:"aws:s3:intelligent-tiering",s3_cloudflare:"aws:s3:egress-cloudflare",savings_plan:"aws:compute:savings-plan",unused_financial_commitments:"aws:ec2:unused-reserved-instances",workspace_stranded:"aws:workspaces:stranded",workspace_unused:"aws:workspaces:unused",azure_blob_storage_reserved_instances_recommender:"azure:blob-storage:reserved-instances",azure_compute_savings_recommender:"azure:compute:savings-plan",azure_files_reserved_instances_recommender:"azure:files:reserved-instances",azure_rightsizing_recommender:"azure:vm:rightsizing",azure_sql_paas_db_reserved_instances_recommender:"azure:sql-paas-db:reserved-instances",datadog_metrics_unqueried:"datadog:metrics:unqueried",dynamodb_reserved_capacity_recommender:"aws:dynamodb:reserved-capacity"},v2=e=>{if(typeof e!="string")return e;let t=e.trim().toLowerCase();return Wa[t]??t},y2=e=>{if(typeof e!="string")return e;let t=e.trim().toLowerCase();if(t=t.replace(/\brecommendations?\b/g,"").trim(),t=t.replace(/\s*:\s*/g,":"),t=t.replace(/\s+/g," ").trim(),!t)return;let r=_2[t];if(r)return r;let o=Wa[t];if(o)return o;if(t.includes(":")){let[n,...i]=t.split(":"),s=Wa[n];if(s){let a=i.join(":").trim();return a?`${s}:${a}`:s}return t}for(let n of g2)if(t.startsWith(`${n} `))return Wa[n];return t||void 0},b2=`
|
|
700
700
|
List all cost optimization recommendations available in the Vantage account. Recommendations are AI-powered suggestions that help identify opportunities to reduce costs and optimize cloud spending across your infrastructure.
|
|
701
701
|
|
|
702
702
|
Use the page value of 1 to start pagination.
|
|
@@ -720,15 +720,15 @@ Recommendations can be filtered by status (open shows active recommendations, re
|
|
|
720
720
|
The token of each recommendation can be used with other recommendation tools to get detailed information and see specific resources affected.
|
|
721
721
|
|
|
722
722
|
For users to view and manage recommendations in the Vantage Web UI, they can visit https://console.vantage.sh/recommendations
|
|
723
|
-
`.trim(),
|
|
723
|
+
`.trim(),w2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),workspace_token:g.string().optional().describe("Filter recommendations to a specific workspace"),provider:g.preprocess(v2,g.enum(h2).optional()).optional().describe("Filter recommendations by cloud provider (aws, gcp, azure, kubernetes, datadog). Aliases like 'Amazon Web Services' and 'Google Cloud' are normalized."),provider_account_id:g.string().optional().describe("Filter recommendations by provider account ID"),type:g.preprocess(y2,g.string().max(255).optional()).optional().describe("Filter recommendations by type with case-insensitive fuzzy matching (e.g., aws, aws:ec2, aws:ec2:rightsizing). Natural language values like 'AWS recommendations' are normalized."),filter:g.enum(["open","resolved","dismissed"]).optional().describe("Filter recommendations by status: open (default), resolved, or dismissed")},V7=I({name:"list-recommendations",title:"List Recommendations",description:b2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:w2,async execute(e,t){let r={...e,limit:128,provider:e.provider},o=await t.callVantageApi("/v2/recommendations",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{recommendations:o.data.recommendations,pagination:Y(o.data)}}});var F0=Ue(Ge());var $2=`
|
|
724
724
|
Tags can have many values. Use this tool to find the values and service providers that are associated with a tag.
|
|
725
|
-
`.trim(),
|
|
725
|
+
`.trim(),k2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),key:g.string().min(1).describe("Tag key to list values for")},J7=I({name:"list-tag-values",title:"List Tag Values",description:$2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:k2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi(`/v2/tags/${(0,F0.pathEncode)(e.key)}/values`,r,"GET");if(!o.ok)throw new z({errors:o.errors});return{tag_values:o.data.tag_values,pagination:Y(o.data)}}});var x2=`
|
|
726
726
|
List tags that can be used to filter costs and cost reports.
|
|
727
727
|
Tags are associated with one or more Cost Providers.
|
|
728
728
|
Tags can be edited in the Vantage Web UI, or have further details displayed there. Link a user to the tag page like this: https://console.vantage.sh/settings/tags?search_query=<tag>
|
|
729
|
-
`.trim(),
|
|
729
|
+
`.trim(),S2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1")},n8=I({name:"list-tags",title:"List Tags",description:x2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:S2,async execute(e,t){let r={...e,limit:128},o=await t.callVantageApi("/v2/tags",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{tags:o.data.tags,pagination:Y(o.data)}}});var T2=`
|
|
730
730
|
Retrieve the unit costs for a given CostReport, with optional paging, date filters, and ordering.
|
|
731
|
-
`.trim(),
|
|
731
|
+
`.trim(),P2={cost_report_token:g.string().describe("CostReport token to list unit costs for"),page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),start_date:we("First date to filter unit costs from, format=YYYY-MM-DD").optional(),end_date:we("Last date to filter unit costs to, format=YYYY-MM-DD").optional(),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),order:g.enum(["asc","desc"]).optional().default("desc").describe("Order of the returned costs, defaults to desc")},l8=I({name:"list-unit-costs",title:"List Unit Costs",description:T2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:P2,async execute(e,t){let r={...e,limit:64},o=await t.callVantageApi("/v2/unit_costs",r,"GET");if(!o.ok)throw new z({errors:o.errors});return{unit_costs:o.data.unit_costs,pagination:Y(o.data)}}});var z2=`
|
|
732
732
|
Query for costs in a Vantage Account. These are independent of a cost reports.
|
|
733
733
|
Use Vantage VQL to structure a query.
|
|
734
734
|
Queries must be scoped to a Workspace. Use the get-myself tool to know about available workspaces, and the get-cost-integrations tool to know about available cost providers. If the user didn't tell you a workspace it is best to ask them than to guess it.
|
|
@@ -762,12 +762,12 @@ When DateBin=day you get a record for each service spend on that day. For DateBi
|
|
|
762
762
|
with the accrued_at field set to the first day of the week, but the spend item represents spend for a full week.
|
|
763
763
|
Same with DateBin=month, each record returned covers a month of data. This lets you get answers with processing fewer
|
|
764
764
|
records. Only use day/week if needed, otherwise DateBin=month is preferred, and month is the value set if you pass no value for DateBin.
|
|
765
|
-
`.trim(),
|
|
765
|
+
`.trim(),E2={page:g.number().optional().default(1).describe("The page number to return, defaults to 1"),filter:g.string().describe("A VQL query to run against your vantage account"),start_date:we("Start date to filter costs by, format=YYYY-MM-DD").optional(),end_date:we("End date to filter costs by, format=YYYY-MM-DD").optional(),workspace_token:g.string().min(1).describe("The workspace token to scope the query to"),date_bin:g.enum(["day","week","month"]).optional().describe("Date binning for returned costs, default to month unless user says otherwise, allowed values: day, week, month"),settings_include_credits:g.boolean().optional().default(!1).describe("Results will include credits, defaults to false"),settings_include_refunds:g.boolean().optional().default(!1).describe("Results will include refunds, defaults to false"),settings_include_discounts:g.boolean().optional().default(!0).describe("Results will include discounts, defaults to true"),settings_include_tax:g.boolean().optional().default(!0).describe("Results will include tax, defaults to true"),settings_amortize:g.boolean().optional().default(!0).describe("Results will amortize, defaults to true"),settings_unallocated:g.boolean().optional().default(!1).describe("Results will show unallocated costs, defaults to false"),settings_aggregate_by:g.enum(["cost","usage"]).optional().default("cost").describe("Results will aggregate by cost or usage, defaults to cost"),settings_show_previous_period:g.boolean().optional().default(!0).describe("Results will show previous period costs or usage comparison, defaults to true"),groupings:g.array(g.string()).default(["provider","service","region"]).describe("Group the results by specific field(s). Defaults to provider, service, account_id. Valid groupings: account_id, billing_account_id, charge_type, cost_category, cost_subcategory, provider, region, resource_id, service, tagged, tag:<tag_value>. Let Groupings default unless explicitly asked for.")},_8=I({name:"query-costs",title:"Query Costs",description:z2,annotations:{destructive:!1,openWorld:!1,readOnly:!0},args:E2,async execute(e,t){let r={limit:1e3};e.date_bin||(e.date_bin="month"),Object.keys(e).forEach(i=>{let s=i;if(i.startsWith("settings_")){let a=i.slice(9);r[`settings[${a}]`]=e[s]}else r[i]=e[s]});let o=await t.callVantageApi("/v2/costs",r,"GET");if(!o.ok)throw new z({errors:o.errors});let n;switch(e.date_bin){case"day":n="Costs records represent one day.";break;case"week":n="Costs records represent one week, the accrued_at field is the first day of the week. If your date range is less than one week, this record includes only data for that date range, not the full week.";break;case"month":n="Costs records represent one month, the accrued_at field is the first day of the month. If your date range is less than one month, this record includes only data for that date range, not the full month.";break;default:throw new Error("Invalid date bin value")}return{costs:o.data.costs,total_cost:o.data.total_cost,notes:n,pagination:Y(o.data)}}});var I2=`
|
|
766
766
|
Submit feedback on using the Vantage MCP Server. Ask the user if they'd like to provide feedback any time you sense they might be frustrated.
|
|
767
767
|
Stop suggesting if they say they're not interested in providing feedback.
|
|
768
|
-
`.trim(),
|
|
768
|
+
`.trim(),N2={message:g.string().describe("Feedback message regarding using the Vantage MCP Server")},$8=I({name:"submit-user-feedback",title:"Submit User Feedback",description:I2,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:N2,async execute(e,t){let r=await t.callVantageApi("/v2/user_feedback",{message:e.message},"POST");if(!r.ok)throw new z({errors:r.errors});return r.data}});var W0=Ue(Ge());var O2=`
|
|
769
769
|
Updates an existing anomaly alert by its token. Use this to change the status of an anomaly alert (e.g. to archive or ignore it) and optionally provide feedback.
|
|
770
|
-
`.trim(),P8=I({name:"update-anomaly",description:
|
|
770
|
+
`.trim(),P8=I({name:"update-anomaly",title:"Update Anomaly",description:O2,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{anomaly_alert_token:g.string().describe("The token of the anomaly alert to update."),status:g.enum(["active","archived","ignored"]).describe("The new status of the anomaly alert."),feedback:g.string().optional().describe("Optional comments explaining why the alert is being ignored or archived.")},async execute(e,t){let{anomaly_alert_token:r,...o}=e,n=await t.callVantageApi(`/v2/anomaly_alerts/${(0,W0.pathEncode)(r)}`,o,"PUT");if(!n.ok)throw new z({errors:n.errors});return n.data}});var G0=Ue(Ge());var R2=`
|
|
771
771
|
Updates a Folder for organizing Cost Reports. You can update its title, move it to a different parent Folder, or change its SavedFilter tokens.
|
|
772
|
-
`.trim(),O8=I({name:"update-folder",description:
|
|
772
|
+
`.trim(),O8=I({name:"update-folder",title:"Update Folder",description:R2,annotations:{destructive:!0,openWorld:!1,readOnly:!1},args:{folder_token:g.string().describe("The token of the folder to update"),title:g.string().optional().describe("Updated title for the Folder"),parent_folder_token:g.string().optional().describe("Updated parent folder token for nesting"),saved_filter_tokens:g.array(g.string()).optional().describe("Updated tokens of SavedFilters to apply to any Cost Report contained within the Folder")},async execute(e,t){let{folder_token:r,...o}=e,n=await t.callVantageApi(`/v2/folders/${(0,G0.pathEncode)(r)}`,o,"PUT");if(!n.ok)throw new z({errors:n.errors});return n.data}});async function j2(){if(!process.env.VANTAGE_TOKEN)throw new Error("VANTAGE_TOKEN environment variable is required.");let e={callVantageApi:async(o,n,i)=>{let s={Authorization:`Bearer ${process.env.VANTAGE_TOKEN}`};return S0(process.env.VANTAGE_API_HOST||"https://api.vantage.sh",s,n,i,o)}},t=new Ud,r=new qd(uv);T0(r,()=>e),k0(r),await r.connect(t)}j2().catch(e=>{console.error(e),process.exit(1)});
|
|
773
773
|
//# sourceMappingURL=index.js.map
|