xmcp 0.6.8 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  || ${n} === "boolean" || ${i} === null`).assign(o,(0,l._)`[${i}]`)}}(e);s.else(),m(e),s.endIf(),s.if((0,l._)`${o} !== undefined`,()=>{s.assign(i,o),function({gen:e,parentData:t,parentDataProperty:r},s){e.if((0,l._)`${t} !== undefined`,()=>e.assign((0,l._)`${t}[${r}]`,s))}(e,o)})}(e,t,c):m(e)})}return p};let d=new Set(["string","number","integer","boolean","null"]);function p(e,t,r,i=s.Correct){let a,n=i===s.Correct?l.operators.EQ:l.operators.NEQ;switch(e){case"null":return(0,l._)`${t} ${n} null`;case"array":a=(0,l._)`Array.isArray(${t})`;break;case"object":a=(0,l._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=o((0,l._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=o();break;default:return(0,l._)`typeof ${t} ${n} ${e}`}return i===s.Correct?a:(0,l.not)(a);function o(e=l.nil){return(0,l.and)((0,l._)`typeof ${t} == "number"`,e,r?(0,l._)`isFinite(${t})`:l.nil)}}function f(e,t,r,s){let i;if(1===e.length)return p(e[0],t,r,s);let a=(0,u.toHash)(e);if(a.array&&a.object){let e=(0,l._)`typeof ${t} != "object"`;i=a.null?e:(0,l._)`!${t} || ${e}`,delete a.null,delete a.array,delete a.object}else i=l.nil;for(let e in a.number&&delete a.integer,a)i=(0,l.and)(i,p(e,t,r,s));return i}t.checkDataType=p,t.checkDataTypes=f;let h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,l._)`{type: ${e}}`:(0,l._)`{type: ${t}}`};function m(e){let t=function(e){let{gen:t,data:r,schema:s}=e,i=(0,u.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:i,schemaValue:i,parentSchema:s,params:{},it:e}}(e);(0,o.reportError)(t,h)}t.reportTypeError=m},6593(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;let s=r(8994),i=r(7218);function a(e,t,r){let{gen:a,compositeRule:n,data:o,opts:l}=e;if(void 0===r)return;let u=(0,s._)`${o}${(0,s.getProperty)(t)}`;if(n)return void(0,i.checkStrictMode)(e,`default is ignored for: ${u}`);let c=(0,s._)`${u} === undefined`;"empty"===l.useDefaults&&(c=(0,s._)`${c} || ${u} === null || ${u} === ""`),a.if(c,(0,s._)`${u} = ${(0,s.stringify)(r)}`)}t.assignDefaults=function(e,t){let{properties:r,items:s}=e.schema;if("object"===t&&r)for(let t in r)a(e,t,r[t].default);else"array"===t&&Array.isArray(s)&&s.forEach((t,r)=>a(e,r,t.default))}},6023(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;let s=r(564),i=r(6419),a=r(238),n=r(6419),o=r(6593),l=r(9820),u=r(3826),c=r(8994),d=r(6660),p=r(9008),f=r(7218),h=r(8425);function m({gen:e,validateName:t,schema:r,schemaEnv:s,opts:i},a){var n;i.code.es5?e.func(t,(0,c._)`${d.default.data}, ${d.default.valCxt}`,s.$async,()=>{var t,s;e.code((0,c._)`"use strict"; ${y(r,i)}`),t=e,s=i,t.if(d.default.valCxt,()=>{t.var(d.default.instancePath,(0,c._)`${d.default.valCxt}.${d.default.instancePath}`),t.var(d.default.parentData,(0,c._)`${d.default.valCxt}.${d.default.parentData}`),t.var(d.default.parentDataProperty,(0,c._)`${d.default.valCxt}.${d.default.parentDataProperty}`),t.var(d.default.rootData,(0,c._)`${d.default.valCxt}.${d.default.rootData}`),s.dynamicRef&&t.var(d.default.dynamicAnchors,(0,c._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{t.var(d.default.instancePath,(0,c._)`""`),t.var(d.default.parentData,(0,c._)`undefined`),t.var(d.default.parentDataProperty,(0,c._)`undefined`),t.var(d.default.rootData,d.default.data),s.dynamicRef&&t.var(d.default.dynamicAnchors,(0,c._)`{}`)}),e.code(a)}):e.func(t,(0,c._)`${d.default.data}, ${(n=i,(0,c._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${n.dynamicRef?(0,c._)`, ${d.default.dynamicAnchors}={}`:c.nil}}={}`)}`,s.$async,()=>e.code(y(r,i)).code(a))}function y(e,t){let r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${r} */`:c.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function _(e){(0,f.checkUnknownRules)(e),function(e){let{schema:t,errSchemaPath:r,opts:s,self:i}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,t){if(e.opts.jtd)return $(e,[],!1,t);let r=(0,i.getSchemaTypes)(e.schema),s=(0,i.coerceAndCheckDataType)(e,r);$(e,r,!s,t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:i}){let a=r.$comment;if(!0===i.$comment)e.code((0,c._)`${d.default.self}.logger.log(${a})`);else if("function"==typeof i.$comment){let r=(0,c.str)`${s}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,c._)`${d.default.self}.opts.$comment(${a}, ${r}, ${i}.schema)`)}}function $(e,t,r,s){var i,o,l,u;let{gen:p,schema:h,data:m,allErrors:y,opts:g,self:v}=e,{RULES:_}=v;if(h.$ref&&(g.ignoreKeywordsWithRef||!(0,f.schemaHasRulesButRef)(h,_)))return void p.block(()=>T(e,"$ref",_.all.$ref.definition));function b(i){(0,a.shouldUseGroup)(h,i)&&(i.type?(p.if((0,n.checkDataType)(i.type,m,g.strictNumbers)),E(e,i),1===t.length&&t[0]===i.type&&r&&(p.else(),(0,n.reportTypeError)(e)),p.endIf()):E(e,i),y||p.if((0,c._)`${d.default.errors} === ${s||0}`))}g.jtd||(i=e,o=t,!i.schemaEnv.meta&&i.opts.strictTypes&&(function(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{k(e.dataTypes,t)||x(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function(e,t){let r=[];for(let s of e.dataTypes)k(t,s)?r.push(s):t.includes("integer")&&"number"===s&&r.push("integer");e.dataTypes=r}(e,t)}}(i,o),i.opts.allowUnionTypes||(l=i,(u=o).length>1&&!(2===u.length&&u.includes("null"))&&x(l,"use allowUnionTypes to allow union type keyword")),function(e,t){let r=e.self.RULES.all;for(let s in r){let i=r[s];if("object"==typeof i&&(0,a.shouldUseRule)(e.schema,i)){let{type:r}=i.definition;r.length&&!r.some(e=>{var r,s;return r=t,s=e,r.includes(s)||"number"===s&&r.includes("integer")})&&x(e,`missing type "${r.join(",")}" for keyword "${s}"`)}}}(i,i.dataTypes))),p.block(()=>{for(let e of _.rules)b(e);b(_.post)})}function E(e,t){let{gen:r,schema:s,opts:{useDefaults:i}}=e;i&&(0,o.assignDefaults)(e,t.type),r.block(()=>{for(let r of t.rules)(0,a.shouldUseRule)(s,r)&&T(e,r.keyword,r.definition,t.type)})}function k(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function x(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,f.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(_(e),g(e))?function(e){let{schema:t,opts:r,gen:s}=e;m(e,()=>{r.$comment&&t.$comment&&w(e),function(e){let{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,f.checkStrictMode)(e,"default is ignored in the schema root")}(e),s.let(d.default.vErrors,null),s.let(d.default.errors,0),r.unevaluated&&function(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,c._)`${r}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}(e),b(e),function(e){let{gen:t,schemaEnv:r,validateName:s,ValidationError:i,opts:a}=e;r.$async?t.if((0,c._)`${d.default.errors} === 0`,()=>t.return(d.default.data),()=>t.throw((0,c._)`new ${i}(${d.default.vErrors})`)):(t.assign((0,c._)`${s}.errors`,d.default.vErrors),a.unevaluated&&function({gen:e,evaluated:t,props:r,items:s}){r instanceof c.Name&&e.assign((0,c._)`${t}.props`,r),s instanceof c.Name&&e.assign((0,c._)`${t}.items`,s)}(e),t.return((0,c._)`${d.default.errors} === 0`))}(e)})}(e):m(e,()=>(0,s.topBoolOrEmptySchema)(e))};class S{constructor(e,t,r){if((0,l.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",O(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,r){this.failResult((0,c.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t){this.setParams(t),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=c.nil){this.gen.block(()=>{this.check$data(e,r),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:r,schemaCode:s,schemaType:i,def:a}=this;r.if((0,c.or)((0,c._)`${s} === undefined`,t)),e!==c.nil&&r.assign(e,!0),(i.length||a.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:r,def:s,it:i}=this;return(0,c.or)(function(){if(r.length){if(!(t instanceof c.Name))throw Error("ajv implementation error");let e=Array.isArray(r)?r:[r];return(0,c._)`${(0,n.checkDataTypes)(e,t,i.opts.strictNumbers,n.DataType.Wrong)}`}return c.nil}(),function(){if(s.validateSchema){let r=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,c._)`!${r}(${t})`}return c.nil}())}subschema(e,t){let r=(0,u.getSubschema)(this.it,e);(0,u.extendSubschemaData)(r,this.it,e),(0,u.extendSubschemaMode)(r,e);let i={...this.it,...r,items:void 0,props:void 0};return!function(e,t){if(v(e)&&(_(e),g(e)))return function(e,t){var r;let s,{schema:i,gen:a,opts:n}=e;n.$comment&&i.$comment&&w(e),(s=(r=e).schema[r.opts.schemaId])&&(r.baseId=(0,p.resolveUrl)(r.opts.uriResolver,r.baseId,s)),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}(e);let o=a.const("_errs",d.default.errors);b(e,o),a.var(t,(0,c._)`${o} === ${d.default.errors}`)}(e,t);(0,s.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){let{it:r,gen:s}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(s,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(s,e.items,r.items,t)))}mergeValidEvaluated(e,t){let{it:r,gen:s}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return s.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}}function T(e,t,r,s){let i=new S(e,r,t);"code"in r?r.code(i,s):i.$data&&r.validate?(0,l.funcKeywordCode)(i,r):"macro"in r?(0,l.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,l.funcKeywordCode)(i,r)}t.KeywordCxt=S;let P=/^\/(?:[^~]|~0|~1)*$/,I=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function O(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let i,a;if(""===e)return d.default.rootData;if("/"===e[0]){if(!P.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=d.default.rootData}else{let n=I.exec(e);if(!n)throw Error(`Invalid JSON-pointer: ${e}`);let l=+n[1];if("#"===(i=n[2])){if(l>=t)throw Error(o("property/index",l));return s[t-l]}if(l>t)throw Error(o("data",l));if(a=r[t-l],!i)return a}let n=a;for(let e of i.split("/"))e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,f.unescapeJsonPointer)(e))}`,n=(0,c._)`${n} && ${a}`);return n;function o(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=O},9820(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;let s=r(8994),i=r(6660),a=r(4954),n=r(8425);function o(e){let{gen:t,data:r,it:i}=e;t.if(i.parentData,()=>t.assign(r,(0,s._)`${i.parentData}[${i.parentDataProperty}]`))}function l(e,t,r){if(void 0===r)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,s.stringify)(r)})}t.macroKeywordCode=function(e,t){let{gen:r,keyword:i,schema:a,parentSchema:n,it:o}=e,u=t.macro.call(o.self,a,n,o),c=l(r,i,u);!1!==o.opts.validateSchema&&o.self.validateSchema(u,!0);let d=r.name("valid");e.subschema({schema:u,schemaPath:s.nil,errSchemaPath:`${o.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},d),e.pass(d,()=>e.error(!0))},t.funcKeywordCode=function(e,t){var r;let{gen:u,keyword:c,schema:d,parentSchema:p,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}(h,t);let m=l(u,c,!f&&t.compile?t.compile.call(h.self,d,p,h):t.validate),y=u.let("valid");function g(r=t.async?(0,s._)`await `:s.nil){let n=h.opts.passContext?i.default.this:i.default.self,o=!("compile"in t&&!f||!1===t.schema);u.assign(y,(0,s._)`${r}${(0,a.callValidateCode)(e,m,n,o)}`,t.modifying)}function v(e){var r;u.if((0,s.not)(null!=(r=t.valid)?r:y),e)}e.block$data(y,function(){if(!1===t.errors)g(),t.modifying&&o(e),v(()=>e.error());else{let r,a,l=t.async?(r=u.let("ruleErrs",null),u.try(()=>g((0,s._)`await `),e=>u.assign(y,!1).if((0,s._)`${e} instanceof ${h.ValidationError}`,()=>u.assign(r,(0,s._)`${e}.errors`),()=>u.throw(e))),r):(a=(0,s._)`${m}.errors`,u.assign(a,null),g(s.nil),a);t.modifying&&o(e),v(()=>(function(e,t){let{gen:r}=e;r.if((0,s._)`Array.isArray(${t})`,()=>{r.assign(i.default.vErrors,(0,s._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,(0,s._)`${i.default.vErrors}.length`),(0,n.extendErrors)(e)},()=>e.error())})(e,l))}}),e.ok(null!=(r=t.valid)?r:y)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:s},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error("ajv implementation error");let n=i.dependencies;if(null==n?void 0:n.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${n.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${s}": `+r.errorsText(i.validateSchema.errors);if("log"===t.validateSchema)r.logger.error(e);else throw Error(e)}}},3826(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;let s=r(8994),i=r(7218);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:a,schemaPath:n,errSchemaPath:o,topSchemaRef:l}){if(void 0!==t&&void 0!==a)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){let a=e.schema[t];return void 0===r?{schema:a,schemaPath:(0,s._)`${e.schemaPath}${(0,s.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,s._)`${e.schemaPath}${(0,s.getProperty)(t)}${(0,s.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==a){if(void 0===n||void 0===o||void 0===l)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:n,topSchemaRef:l,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:a,data:n,dataTypes:o,propertyName:l}){if(void 0!==n&&void 0!==r)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:u}=t;if(void 0!==r){let{errorPath:n,dataPathArr:o,opts:l}=t;c(u.let("data",(0,s._)`${t.data}${(0,s.getProperty)(r)}`,!0)),e.errorPath=(0,s.str)`${n}${(0,i.getErrorPath)(r,a,l.jsPropertySyntax)}`,e.parentDataProperty=(0,s._)`${r}`,e.dataPathArr=[...o,e.parentDataProperty]}function c(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==n&&(c(n instanceof s.Name?n:u.let("data",n,!0)),void 0!==l&&(e.propertyName=l)),o&&(e.dataTypes=o)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:i,allErrors:a}){void 0!==s&&(e.compositeRule=s),void 0!==i&&(e.createErrors=i),void 0!==a&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}},1967(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var s=r(6023);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return s.KeywordCxt}});var i=r(8994);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});let a=r(4383),n=r(4220),o=r(6247),l=r(1688),u=r(8994),c=r(9008),d=r(6419),p=r(7218),f=r(114),h=r(8951),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";let y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={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."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...function(e){var t,r,s,i,a,n,o,l,u,c,d,p,f,y,g,v,_,b,w,$,E,k,x,S,T;let P=e.strict,I=null==(t=e.code)?void 0:t.optimize,O=!0===I||void 0===I?1:I||0,j=null!=(s=null==(r=e.code)?void 0:r.regExp)?s:m,R=null!=(i=e.uriResolver)?i:h.default;return{strictSchema:null==(n=null!=(a=e.strictSchema)?a:P)||n,strictNumbers:null==(l=null!=(o=e.strictNumbers)?o:P)||l,strictTypes:null!=(c=null!=(u=e.strictTypes)?u:P)?c:"log",strictTuples:null!=(p=null!=(d=e.strictTuples)?d:P)?p:"log",strictRequired:null!=(y=null!=(f=e.strictRequired)?f:P)&&y,code:e.code?{...e.code,optimize:O,regExp:j}:{optimize:O,regExp:j},loopRequired:null!=(g=e.loopRequired)?g:200,loopEnum:null!=(v=e.loopEnum)?v:200,meta:null==(_=e.meta)||_,messages:null==(b=e.messages)||b,inlineRefs:null==(w=e.inlineRefs)||w,schemaId:null!=($=e.schemaId)?$:"$id",addUsedSchema:null==(E=e.addUsedSchema)||E,validateSchema:null==(k=e.validateSchema)||k,validateFormats:null==(x=e.validateFormats)||x,unicodeRegExp:null==(S=e.unicodeRegExp)||S,int32range:null==(T=e.int32range)||T,uriResolver:R}}(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return T;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}(e.logger);const s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,o.getRules)(),w.call(this,v,e,"NOT SUPPORTED"),w.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&x.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:r}=this.opts,s=f;"id"===r&&((s={...f}).id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[r],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(!(r=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let s=r(t);return"$async"in r||(this.errors=r.errors),s}compile(e,t){let r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return s.call(this,e,t);async function s(e,t){await i.call(this,e.$schema);let r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await s.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof n.default))throw t;return o.call(this,t),await l.call(this,t.missingSchema),a.call(this,e)}}function o({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){let r=await u.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function u(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,s=this.opts.validateSchema){let i;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,r,s);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(i=e[t])&&"string"!=typeof i)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,s,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){let r;if("boolean"==typeof e)return!0;if(void 0!==(r=e.$schema)&&"string"!=typeof r)throw Error("$schema must be a string");if(!(r=r||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(r,e);if(!s&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return s}getSchema(e){let t;for(;"string"==typeof(t=$.call(this,e));)e=t;if(void 0===t){let{schemaId:r}=this.opts,s=new l.SchemaEnv({schema:{},schemaId:r});if(!(t=l.resolveSchema.call(this,s,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=$.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0,c.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else if("object"==typeof e&&void 0===t){if(Array.isArray(r=(t=e).keyword)&&!r.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(I.call(this,r,t),!t)return(0,p.eachItem)(r,e=>O.call(this,e)),this;R.call(this,t);let s={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===s.type.length?e=>O.call(this,e,s):e=>s.type.forEach(t=>O.call(this,e,s,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let r of(delete t.keywords[e],delete t.all[e],t.rules)){let t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){let r=this.RULES.all;for(let s of(e=JSON.parse(JSON.stringify(e)),t)){let t=s.split("/").slice(1),i=e;for(let e of t)i=i[e];for(let e in r){let t=r[e];if("object"!=typeof t)continue;let{$data:s}=t.definition,a=i[e];s&&a&&(i[e]=C(a))}}return e}_removeAllSchemas(e,t){for(let r in e){let s=e[r];(!t||t.test(r))&&("string"==typeof s?delete e[r]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[r]))}}_addSchema(e,t,r,s=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:n}=this.opts;if("object"==typeof e)a=e[n];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let o=this._cache.get(e);if(void 0!==o)return o;r=(0,c.normalizeId)(a||r);let u=c.getSchemaRefs.call(this,e,r);return o=new l.SchemaEnv({schema:e,schemaId:n,meta:t,baseId:r,localRefs:u}),this._cache.set(o.schema,o),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=o),s&&this.validateSchema(e,!0),o}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function w(e,t,r,s="error"){for(let i in e)i in t&&this.logger[s](`${r}: option ${i}. ${e[i]}`)}function $(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){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 k(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function x(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function S(){let e={...this.opts};for(let t of y)delete e[t];return e}b.ValidationError=a.default,b.MissingRefError=n.default,t.default=b;let T={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function I(e,t){let{RULES:r}=this;if((0,p.eachItem)(e,e=>{if(r.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!P.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function O(e,t,r){var s;let i=null==t?void 0:t.post;if(r&&i)throw Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,n=i?a.post:a.rules.find(({type:e})=>e===r);if(n||(n={type:r,rules:[]},a.rules.push(n)),a.keywords[e]=!0,!t)return;let o={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?j.call(this,n,o,t.before):n.rules.push(o),a.all[e]=o,null==(s=t.implements)||s.forEach(e=>this.addKeyword(e))}function j(e,t,r){let s=e.rules.findIndex(e=>e.keyword===r);s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function R(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=C(t)),e.validateSchema=this.compile(t,!0))}let N={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function C(e){return{anyOf:[e,N]}}},6013(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7371);s.code='require("ajv/dist/runtime/equal").default',t.default=s},5532(e,t){"use strict";function r(e){let t,r=e.length,s=0,i=0;for(;i<r;)s++,(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<r&&(64512&(t=e.charCodeAt(i)))==56320&&i++;return s}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},8951(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(5019);s.code='require("ajv/dist/runtime/uri").default',t.default=s},4383(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}},714(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;let s=r(8994),i=r(7218);function a(e,t){let{gen:r,schema:a,data:n,keyword:o,it:l}=e;l.items=!0;let u=r.const("len",(0,s._)`${n}.length`);if(!1===a)e.setParams({len:t.length}),e.pass((0,s._)`${u} <= ${t.length}`);else if("object"==typeof a&&!(0,i.alwaysValidSchema)(l,a)){let a=r.var("valid",(0,s._)`${u} <= ${t.length}`);r.if((0,s.not)(a),()=>{var n;return n=a,void r.forRange("i",t.length,u,t=>{e.subschema({keyword:o,dataProp:t,dataPropType:i.Type.Num},n),l.allErrors||r.if((0,s.not)(n),()=>r.break())})}),e.ok(a)}}t.validateAdditionalItems=a,t.default={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:s}=t;Array.isArray(s)?a(e,s):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}}},8401(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),a=r(6660),n=r(7218);t.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,i._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:t,schema:r,parentSchema:o,data:l,errsCount:u,it:c}=e;if(!u)throw Error("ajv implementation error");let{allErrors:d,opts:p}=c;if(c.props=!0,"all"!==p.removeAdditional&&(0,n.alwaysValidSchema)(c,r))return;let f=(0,s.allSchemaProperties)(o.properties),h=(0,s.allSchemaProperties)(o.patternProperties);function m(e){t.code((0,i._)`delete ${l}[${e}]`)}function y(s){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)return void m(s);if(!1===r){e.setParams({additionalProperty:s}),e.error(),d||t.break();return}if("object"==typeof r&&!(0,n.alwaysValidSchema)(c,r)){let r=t.name("valid");"failing"===p.removeAdditional?(g(s,r,!1),t.if((0,i.not)(r),()=>{e.reset(),m(s)})):(g(s,r),d||t.if((0,i.not)(r),()=>t.break()))}}function g(t,r,s){let i={keyword:"additionalProperties",dataProp:t,dataPropType:n.Type.Str};!1===s&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",l,r=>{f.length||h.length?t.if(function(r){let a;if(f.length>8){let e=(0,n.schemaRefOrVal)(c,o.properties,"properties");a=(0,s.isOwnProperty)(t,e,r)}else a=f.length?(0,i.or)(...f.map(e=>(0,i._)`${r} === ${e}`)):i.nil;return h.length&&(a=(0,i.or)(a,...h.map(t=>(0,i._)`${(0,s.usePattern)(e,t)}.test(${r})`))),(0,i.not)(a)}(r),()=>y(r)):y(r)}),e.ok((0,i._)`${u} === ${a.default.errors}`)}}},2003(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw Error("ajv implementation error");let a=t.name("valid");r.forEach((t,r)=>{if((0,s.alwaysValidSchema)(i,t))return;let n=e.subschema({keyword:"allOf",schemaProp:r},a);e.ok(a),e.mergeEvaluated(n)})}}},1070(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(4954).validateUnion,error:{message:"must match a schema in anyOf"}}},2692(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?(0,s.str)`must contain at least ${e} valid item(s)`:(0,s.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?(0,s._)`{minContains: ${e}}`:(0,s._)`{minContains: ${e}, maxContains: ${t}}`},code(e){let t,r,{gen:a,schema:n,parentSchema:o,data:l,it:u}=e,{minContains:c,maxContains:d}=o;u.opts.next?(t=void 0===c?1:c,r=d):t=1;let p=a.const("len",(0,s._)`${l}.length`);if(e.setParams({min:t,max:r}),void 0===r&&0===t)return void(0,i.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==r&&t>r){(0,i.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,i.alwaysValidSchema)(u,n)){let i=(0,s._)`${p} >= ${t}`;void 0!==r&&(i=(0,s._)`${i} && ${p} <= ${r}`),e.pass(i);return}u.items=!0;let f=a.name("valid");function h(){let e=a.name("_valid"),i=a.let("count",0);m(e,()=>a.if(e,()=>{var e;return e=i,void(a.code((0,s._)`${e}++`),void 0===r?a.if((0,s._)`${e} >= ${t}`,()=>a.assign(f,!0).break()):(a.if((0,s._)`${e} > ${r}`,()=>a.assign(f,!1).break()),1===t?a.assign(f,!0):a.if((0,s._)`${e} >= ${t}`,()=>a.assign(f,!0))))}))}function m(t,r){a.forRange("i",0,p,s=>{e.subschema({keyword:"contains",dataProp:s,dataPropType:i.Type.Num,compositeRule:!0},t),r()})}void 0===r&&1===t?m(f,()=>a.if(f,()=>a.break())):0===t?(a.let(f,!0),void 0!==r&&a.if((0,s._)`${l}.length > 0`,h)):(a.let(f,!1),h()),e.result(f,()=>e.reset())}}},5860(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;let s=r(8994),i=r(7218),a=r(4954);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>(0,s.str)`must have ${1===t?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>(0,s._)`{property: ${e},
5
5
  missingProperty: ${i},
6
6
  depsCount: ${t},
7
- deps: ${r}}`};let n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let s in e)"__proto__"!==s&&((Array.isArray(e[s])?t:r)[s]=e[s]);return[t,r]}(e);o(e,t),l(e,r)}};function o(e,t=e.schema){let{gen:r,data:i,it:n}=e;if(0===Object.keys(t).length)return;let l=r.let("missing");for(let o in t){let u=t[o];if(0===u.length)continue;let c=(0,a.propertyInData)(r,i,o,n.opts.ownProperties);e.setParams({property:o,depsCount:u.length,deps:u.join(", ")}),n.allErrors?r.if(c,()=>{for(let t of u)(0,a.checkReportMissingProp)(e,t)}):(r.if((0,s._)`${c} && (${(0,a.checkMissingProp)(e,u,l)})`),(0,a.reportMissingProp)(e,l),r.else())}}function l(e,t=e.schema){let{gen:r,data:s,keyword:n,it:o}=e,u=r.name("valid");for(let l in t)(0,i.alwaysValidSchema)(o,t[l])||(r.if((0,a.propertyInData)(r,s,l,o.opts.ownProperties),()=>{let t=e.subschema({keyword:n,schemaProp:l},u);e.mergeValidEvaluated(t,u)},()=>r.var(u,!0)),e.ok(u))}t.validatePropertyDeps=o,t.validateSchemaDeps=l,t.default=n},8102(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);function a(e,t){let r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,s.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,s._)`{failingKeyword: ${e.ifClause}}`},code(e){let t,{gen:r,parentSchema:n,it:o}=e;void 0===n.then&&void 0===n.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let l=a(o,"then"),u=a(o,"else");if(!l&&!u)return;let c=r.let("valid",!0),d=r.name("_valid");if(t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d),e.mergeEvaluated(t),e.reset(),l&&u){let t=r.let("ifClause");e.setParams({ifClause:t}),r.if(d,p("then",t),p("else",t))}else l?r.if(d,p("then")):r.if((0,s.not)(d),p("else"));function p(t,i){return()=>{let a=e.subschema({keyword:t},d);r.assign(c,d),e.mergeValidEvaluated(a,c),i?r.assign(i,(0,s._)`${t}`):e.setParams({ifClause:t})}}e.pass(c,()=>e.error(!0))}}},8313(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(714),i=r(1997),a=r(3665),n=r(5153),o=r(2692),l=r(5860),u=r(374),c=r(8401),d=r(3252),p=r(6398),f=r(4948),h=r(1070),m=r(5368),y=r(2003),g=r(8102),v=r(1871);t.default=function(e=!1){let t=[f.default,h.default,m.default,y.default,g.default,v.default,u.default,c.default,l.default,d.default,p.default];return e?t.push(i.default,n.default):t.push(s.default,a.default),t.push(o.default),t}},3665(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;let s=r(8994),i=r(7218),a=r(4954);function n(e,t,r=e.schema){let{gen:a,parentSchema:o,data:l,keyword:u,it:c}=e;(function(e){let{opts:s,errSchemaPath:a}=c,n=r.length,o=n===e.minItems&&(n===e.maxItems||!1===e[t]);if(s.strictTuples&&!o){let e=`"${u}" is ${n}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`;(0,i.checkStrictMode)(c,e,s.strictTuples)}})(o),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(a,r.length,c.items));let d=a.name("valid"),p=a.const("len",(0,s._)`${l}.length`);r.forEach((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(a.if((0,s._)`${p} > ${r}`,()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},d)),e.ok(d))})}t.validateTuple=n,t.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return n(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,a.validateArray)(e))}}},5153(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),a=r(4954),n=r(714);t.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:r,it:s}=e,{prefixItems:o}=r;s.items=!0,(0,i.alwaysValidSchema)(s,t)||(o?(0,n.validateAdditionalItems)(e,o):e.ok((0,a.validateArray)(e)))}}},4948(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:i}=e;if((0,s.alwaysValidSchema)(i,r))return void e.fail();let a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}},5368(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,s._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:t,schema:r,parentSchema:a,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(n.opts.discriminator&&a.discriminator)return;let o=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block(function(){r.forEach((r,a)=>{let c;(0,i.alwaysValidSchema)(n,r)?t.var(u,!0):c=e.subschema({keyword:"oneOf",schemaProp:a,compositeRule:!0},u),a>0&&t.if((0,s._)`${u} && ${o}`).assign(o,!1).assign(l,(0,s._)`[${l}, ${a}]`).else(),t.if(u,()=>{t.assign(o,!0),t.assign(l,a),c&&e.mergeEvaluated(c,s.Name)})})}),e.result(o,()=>e.reset(),()=>e.error(!0))}}},6398(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),a=r(7218),n=r(7218);t.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:l,it:u}=e,{opts:c}=u,d=(0,s.allSchemaProperties)(r),p=d.filter(e=>(0,a.alwaysValidSchema)(u,r[e]));if(0===d.length||p.length===d.length&&(!u.opts.unevaluated||!0===u.props))return;let f=c.strictSchema&&!c.allowMatchingProperties&&l.properties,h=t.name("valid");!0===u.props||u.props instanceof i.Name||(u.props=(0,n.evaluatedPropsToName)(t,u.props));let{props:m}=u;for(let e of d)f&&function(e){for(let t in f)new RegExp(e).test(t)&&(0,a.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),u.allErrors?y(e):(t.var(h,!0),y(e),t.if(h));function y(r){t.forIn("key",o,a=>{t.if((0,i._)`${(0,s.usePattern)(e,r)}.test(${a})`,()=>{let s=p.includes(r);s||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:a,dataPropType:n.Type.Str},h),u.opts.unevaluated&&!0!==m?t.assign((0,i._)`${m}[${a}]`,!0):s||u.allErrors||t.if((0,i.not)(h),()=>t.break())})})}}}},1997(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(3665);t.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,s.validateTuple)(e,"items")}},3252(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(6023),i=r(4954),a=r(7218),n=r(8401);t.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:l,it:u}=e;"all"===u.opts.removeAdditional&&void 0===o.additionalProperties&&n.default.code(new s.KeywordCxt(u,n.default,"additionalProperties"));let c=(0,i.allSchemaProperties)(r);for(let e of c)u.definedProperties.add(e);u.opts.unevaluated&&c.length&&!0!==u.props&&(u.props=a.mergeEvaluated.props(t,(0,a.toHash)(c),u.props));let d=c.filter(e=>!(0,a.alwaysValidSchema)(u,r[e]));if(0===d.length)return;let p=t.name("valid");for(let s of d){var f;(f=s,u.opts.useDefaults&&!u.compositeRule&&void 0!==r[f].default)?h(s):(t.if((0,i.propertyInData)(t,l,s,u.opts.ownProperties)),h(s),u.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(s),e.ok(p)}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}}},374(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,s._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:t,schema:r,data:a,it:n}=e;if((0,i.alwaysValidSchema)(n,r))return;let o=t.name("valid");t.forIn("key",a,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},o),t.if((0,s.not)(o),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(o)}}},1871(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,s.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}},4954(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;let s=r(8994),i=r(7218),a=r(6660),n=r(7218);function o(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,s._)`Object.prototype.hasOwnProperty`})}function l(e,t,r){return(0,s._)`${o(e)}.call(${t}, ${r})`}function u(e,t,r,i){let a=(0,s._)`${t}${(0,s.getProperty)(r)} === undefined`;return i?(0,s.or)(a,(0,s.not)(l(e,t,r))):a}function c(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){let{gen:r,data:i,it:a}=e;r.if(u(r,i,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,s._)`${t}`},!0),e.error()})},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,a){return(0,s.or)(...i.map(i=>(0,s.and)(u(e,t,i,r.ownProperties),(0,s._)`${a} = ${i}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=o,t.isOwnProperty=l,t.propertyInData=function(e,t,r,i){let a=(0,s._)`${t}${(0,s.getProperty)(r)} !== undefined`;return i?(0,s._)`${a} && ${l(e,t,r)}`:a},t.noPropertyInData=u,t.allSchemaProperties=c,t.schemaProperties=function(e,t){return c(t).filter(r=>!(0,i.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:n,errorPath:o},it:l},u,c,d){let p=d?(0,s._)`${e}, ${t}, ${i}${n}`:t,f=[[a.default.instancePath,(0,s.strConcat)(a.default.instancePath,o)],[a.default.parentData,l.parentData],[a.default.parentDataProperty,l.parentDataProperty],[a.default.rootData,a.default.rootData]];l.opts.dynamicRef&&f.push([a.default.dynamicAnchors,a.default.dynamicAnchors]);let h=(0,s._)`${p}, ${r.object(...f)}`;return c!==s.nil?(0,s._)`${u}.call(${c}, ${h})`:(0,s._)`${u}(${h})`};let d=(0,s._)`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){let i=t.unicodeRegExp?"u":"",{regExp:a}=t.code,o=a(r,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,s._)`${"new RegExp"===a.code?d:(0,n.useFunc)(e,a)}(${r}, ${i})`})},t.validateArray=function(e){let{gen:t,data:r,keyword:a,it:n}=e,o=t.name("valid");if(n.allErrors){let e=t.let("valid",!0);return l(()=>t.assign(e,!1)),e}return t.var(o,!0),l(()=>t.break()),o;function l(n){let l=t.const("len",(0,s._)`${r}.length`);t.forRange("i",0,l,r=>{e.subschema({keyword:a,dataProp:r,dataPropType:i.Type.Num},o),t.if((0,s.not)(o),n)})}},t.validateUnion=function(e){let{gen:t,schema:r,keyword:a,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some(e=>(0,i.alwaysValidSchema)(n,e))&&!n.opts.unevaluated)return;let o=t.let("valid",!1),l=t.name("_valid");t.block(()=>r.forEach((r,i)=>{let n=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},l);t.assign(o,(0,s._)`${o} || ${l}`),e.mergeValidEvaluated(n,l)||t.if((0,s.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}},3330(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},8119(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(3330),i=r(930);t.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",s.default,i.default]},930(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;let s=r(4220),i=r(4954),a=r(8994),n=r(6660),o=r(1688),l=r(7218);function u(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,a._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function c(e,t,r,s){let{gen:o,it:u}=e,{allErrors:c,schemaEnv:d,opts:p}=u,f=p.passContext?n.default.this:a.nil;function h(e){let t=(0,a._)`${e}.errors`;o.assign(n.default.vErrors,(0,a._)`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),o.assign(n.default.errors,(0,a._)`${n.default.vErrors}.length`)}function m(e){var t;if(!u.opts.unevaluated)return;let s=null==(t=null==r?void 0:r.validate)?void 0:t.evaluated;if(!0!==u.props)if(s&&!s.dynamicProps)void 0!==s.props&&(u.props=l.mergeEvaluated.props(o,s.props,u.props));else{let t=o.var("props",(0,a._)`${e}.evaluated.props`);u.props=l.mergeEvaluated.props(o,t,u.props,a.Name)}if(!0!==u.items)if(s&&!s.dynamicItems)void 0!==s.items&&(u.items=l.mergeEvaluated.items(o,s.items,u.items));else{let t=o.var("items",(0,a._)`${e}.evaluated.items`);u.items=l.mergeEvaluated.items(o,t,u.items,a.Name)}}s?function(){if(!d.$async)throw Error("async schema referenced by sync schema");let r=o.let("valid");o.try(()=>{o.code((0,a._)`await ${(0,i.callValidateCode)(e,t,f)}`),m(t),c||o.assign(r,!0)},e=>{o.if((0,a._)`!(${e} instanceof ${u.ValidationError})`,()=>o.throw(e)),h(e),c||o.assign(r,!1)}),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,f),()=>m(t),()=>h(t))}t.getValidate=u,t.callRef=c,t.default={keyword:"$ref",schemaType:"string",code(e){var t,r;let i,n,l,d,{gen:p,schema:f,it:h}=e,{baseId:m,schemaEnv:y,validateName:g,opts:v,self:_}=h,{root:b}=y;if(("#"===f||"#/"===f)&&m===b.baseId){if(y===b)return c(e,g,y,y.$async);let t=p.scopeValue("root",{ref:b});return c(e,(0,a._)`${t}.validate`,b,b.$async)}let w=o.resolveRef.call(_,b,m,f);if(void 0===w)throw new s.default(h.opts.uriResolver,m,f);return w instanceof o.SchemaEnv?(i=u(e,t=w),void c(e,i,t,t.$async)):(r=w,n=p.scopeValue("schema",!0===v.code.source?{ref:r,code:(0,a.stringify)(r)}:{ref:r}),l=p.name("valid"),d=e.subschema({schema:r,dataTypes:[],schemaPath:a.nil,topSchemaRef:n,errSchemaPath:f},l),void(e.mergeEvaluated(d),e.ok(l)))}}},9376(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(5141),a=r(1688),n=r(4220),o=r(7218);t.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,s._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){let{gen:t,data:r,schema:l,parentSchema:u,it:c}=e,{oneOf:d}=u;if(!c.opts.discriminator)throw Error("discriminator: requires discriminator option");let p=l.propertyName;if("string"!=typeof p)throw Error("discriminator: requires propertyName");if(l.mapping)throw Error("discriminator: mapping is not supported");if(!d)throw Error("discriminator: requires oneOf keyword");let f=t.let("valid",!1),h=t.const("tag",(0,s._)`${r}${(0,s.getProperty)(p)}`);t.if((0,s._)`typeof ${h} == "string"`,()=>(function(){let r=function(){var e;let t={},r=i(u),s=!0;for(let t=0;t<d.length;t++){let u=d[t];if((null==u?void 0:u.$ref)&&!(0,o.schemaHasRulesButRef)(u,c.self.RULES)){let e=u.$ref;if((u=a.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,e))instanceof a.SchemaEnv&&(u=u.schema),void 0===u)throw new n.default(c.opts.uriResolver,c.baseId,e)}let f=null==(e=null==u?void 0:u.properties)?void 0:e[p];if("object"!=typeof f)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);s=s&&(r||i(u)),function(e,t){if(e.const)l(e.const,t);else if(e.enum)for(let r of e.enum)l(r,t);else throw Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}(f,t)}if(!s)throw Error(`discriminator: "${p}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(p)}function l(e,r){if("string"!=typeof e||e in t)throw Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();for(let i in t.if(!1),r)t.elseIf((0,s._)`${h} === ${i}`),t.assign(f,function(r){let i=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(a,s.Name),i}(r[i]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:h,tagName:p}),t.endIf()})(),()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:h,tagName:p})),e.ok(f)}}},5141(e,t){"use strict";var r,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(s=r||(t.DiscrError=r={})).Tag="tag",s.Mapping="mapping"},3959(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8119),i=r(659),a=r(8313),n=r(8563),o=r(4618);t.default=[s.default,i.default,(0,a.default)(),n.default,o.metadataVocabulary,o.contentVocabulary]},424(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,s._)`{format: ${e}}`},code(e,t){let r,i,a,n,o,l,{gen:u,data:c,$data:d,schema:p,schemaCode:f,it:h}=e,{opts:m,errSchemaPath:y,schemaEnv:g,self:v}=h;m.validateFormats&&(d?(r=u.scopeValue("formats",{ref:v.formats,code:m.code.formats}),i=u.const("fDef",(0,s._)`${r}[${f}]`),a=u.let("fType"),n=u.let("format"),u.if((0,s._)`typeof ${i} == "object" && !(${i} instanceof RegExp)`,()=>u.assign(a,(0,s._)`${i}.type || "string"`).assign(n,(0,s._)`${i}.validate`),()=>u.assign(a,(0,s._)`"string"`).assign(n,i)),e.fail$data((0,s.or)(!1===m.strictSchema?s.nil:(0,s._)`${f} && !${n}`,(o=g.$async?(0,s._)`(${i}.async ? await ${n}(${c}) : ${n}(${c}))`:(0,s._)`${n}(${c})`,l=(0,s._)`(typeof ${n} == "function" ? ${o} : ${n}.test(${c}))`,(0,s._)`${n} && ${n} !== true && ${a} === ${t} && !${l}`)))):function(){var r;let i,a,n=v.formats[p];if(!n){if(!1===m.strictSchema)return v.logger.warn(o());throw Error(o());function o(){return`unknown format "${p}" ignored in schema at path "${y}"`}}if(!0===n)return;let[l,d,f]=(i=(r=n)instanceof RegExp?(0,s.regexpCode)(r):m.code.formats?(0,s._)`${m.code.formats}${(0,s.getProperty)(p)}`:void 0,a=u.scopeValue("formats",{key:p,ref:r,code:i}),"object"!=typeof r||r instanceof RegExp?["string",r,a]:[r.type||"string",r.validate,(0,s._)`${a}.validate`]);l===t&&e.pass(function(){if("object"==typeof n&&!(n instanceof RegExp)&&n.async){if(!g.$async)throw Error("async format in sync schema");return(0,s._)`await ${f}(${c})`}return"function"==typeof d?(0,s._)`${f}(${c})`:(0,s._)`${f}.test(${c})`}())}())}}},8563(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[r(424).default]},4618(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},7080(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),a=r(6013);t.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,s._)`{allowedValue: ${e}}`},code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:l}=e;n||l&&"object"==typeof l?e.fail$data((0,s._)`!${(0,i.useFunc)(t,a.default)}(${r}, ${o})`):e.fail((0,s._)`${l} !== ${r}`)}}},5358(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),a=r(6013);t.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,s._)`{allowedValues: ${e}}`},code(e){let t,r,{gen:n,data:o,$data:l,schema:u,schemaCode:c,it:d}=e;if(!l&&0===u.length)throw Error("enum must have non-empty array");let p=u.length>=d.opts.loopEnum,f=()=>null!=t?t:t=(0,i.useFunc)(n,a.default);if(p||l)r=n.let("valid"),e.block$data(r,function(){n.assign(r,!1),n.forOf("v",c,e=>n.if((0,s._)`${f()}(${o}, ${e})`,()=>n.assign(r,!0).break()))});else{if(!Array.isArray(u))throw Error("ajv implementation error");let e=n.const("vSchema",c);r=(0,s.or)(...u.map((t,r)=>{var i,a;let n;return i=e,"object"==typeof(n=u[a=r])&&null!==n?(0,s._)`${f()}(${o}, ${i}[${a}])`:(0,s._)`${o} === ${n}`}))}e.pass(r)}}},659(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8997),i=r(9190),a=r(4280),n=r(8805),o=r(2189),l=r(3138),u=r(8870),c=r(1858),d=r(7080),p=r(5358);t.default=[s.default,i.default,a.default,n.default,o.default,l.default,u.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default]},8870(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,a="maxItems"===t?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`${r}.length ${a} ${i}`)}}},4280(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),a=r(5532);t.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,l="maxLength"===t?s.operators.GT:s.operators.LT,u=!1===o.opts.unicode?(0,s._)`${r}.length`:(0,s._)`${(0,i.useFunc)(e.gen,a.default)}(${r})`;e.fail$data((0,s._)`${u} ${l} ${n}`)}}},8997(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=s.operators,a={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};t.default={keyword:Object.keys(a),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,s._)`{comparison: ${a[e].okStr}, limit: ${t}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,s._)`${r} ${a[t].fail} ${i} || isNaN(${r})`)}}},2189(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,a="maxProperties"===t?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`Object.keys(${r}).length ${a} ${i}`)}}},9190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,s._)`{multipleOf: ${e}}`},code(e){let{gen:t,data:r,schemaCode:i,it:a}=e,n=a.opts.multipleOfPrecision,o=t.let("res"),l=n?(0,s._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${n}`:(0,s._)`${o} !== parseInt(${o})`;e.fail$data((0,s._)`(${i} === 0 || (${o} = ${r}/${i}, ${l}))`)}}},8805(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(7218),a=r(8994);t.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,a.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,a._)`{pattern: ${e}}`},code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:l,it:u}=e,c=u.opts.unicodeRegExp?"u":"";if(n){let{regExp:s}=u.opts.code,n="new RegExp"===s.code?(0,a._)`new RegExp`:(0,i.useFunc)(t,s),o=t.let("valid");t.try(()=>t.assign(o,(0,a._)`${n}(${l}, ${c}).test(${r})`),()=>t.assign(o,!1)),e.fail$data((0,a._)`!${o}`)}else{let t=(0,s.usePattern)(e,o);e.fail$data((0,a._)`!${t}.test(${r})`)}}}},3138(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),a=r(7218);t.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,i.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,i._)`{missingProperty: ${e}}`},code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:l,it:u}=e,{opts:c}=u;if(!l&&0===r.length)return;let d=r.length>=c.loopRequired;if(u.allErrors?function(){if(d||l)e.block$data(i.nil,p);else for(let t of r)(0,s.checkReportMissingProp)(e,t)}():function(){let a=t.let("missing");if(d||l){let r=t.let("valid",!0);e.block$data(r,()=>{var l,u;return l=a,u=r,void(e.setParams({missingProperty:l}),t.forOf(l,n,()=>{t.assign(u,(0,s.propertyInData)(t,o,l,c.ownProperties)),t.if((0,i.not)(u),()=>{e.error(),t.break()})},i.nil))}),e.ok(r)}else t.if((0,s.checkMissingProp)(e,r,a)),(0,s.reportMissingProp)(e,a),t.else()}(),c.strictRequired){let t=e.parentSchema.properties,{definedProperties:s}=e.it;for(let e of r)if((null==t?void 0:t[e])===void 0&&!s.has(e)){let t=u.schemaEnv.baseId+u.errSchemaPath,r=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,a.checkStrictMode)(u,r,u.opts.strictRequired)}}function p(){t.forOf("prop",n,r=>{e.setParams({missingProperty:r}),t.if((0,s.noPropertyInData)(t,o,r,c.ownProperties),()=>e.error())})}}}},1858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(6419),i=r(8994),a=r(7218),n=r(6013);t.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,i.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,i._)`{i: ${e}, j: ${t}}`},code(e){let{gen:t,data:r,$data:o,schema:l,parentSchema:u,schemaCode:c,it:d}=e;if(!o&&!l)return;let p=t.let("valid"),f=u.items?(0,s.getSchemaTypes)(u.items):[];e.block$data(p,function(){let o=t.let("i",(0,i._)`${r}.length`),l=t.let("j");e.setParams({i:o,j:l}),t.assign(p,!0),t.if((0,i._)`${o} > 1`,()=>(f.length>0&&!f.some(e=>"object"===e||"array"===e)?function(a,n){let o=t.name("item"),l=(0,s.checkDataTypes)(f,o,d.opts.strictNumbers,s.DataType.Wrong),u=t.const("indices",(0,i._)`{}`);t.for((0,i._)`;${a}--;`,()=>{t.let(o,(0,i._)`${r}[${a}]`),t.if(l,(0,i._)`continue`),f.length>1&&t.if((0,i._)`typeof ${o} == "string"`,(0,i._)`${o} += "_"`),t.if((0,i._)`typeof ${u}[${o}] == "number"`,()=>{t.assign(n,(0,i._)`${u}[${o}]`),e.error(),t.assign(p,!1).break()}).code((0,i._)`${u}[${o}] = ${a}`)})}:function(s,o){let l=(0,a.useFunc)(t,n.default),u=t.name("outer");t.label(u).for((0,i._)`;${s}--;`,()=>t.for((0,i._)`${o} = ${s}; ${o}--;`,()=>t.if((0,i._)`${l}(${r}[${s}], ${r}[${o}])`,()=>{e.error(),t.assign(p,!1).break(u)})))})(o,l))},(0,i._)`${c} === false`),e.ok(p)}}},9454(e,t,r){"use strict";var s=r(181).Buffer,i=r(181).SlowBuffer;function a(e,t){if(!s.isBuffer(e)||!s.isBuffer(t)||e.length!==t.length)return!1;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 0===r}e.exports=a,a.install=function(){s.prototype.equal=i.prototype.equal=function(e){return a(this,e)}};var n=s.prototype.equal,o=i.prototype.equal;a.restore=function(){s.prototype.equal=n,i.prototype.equal=o}},6507(e,t,r){"use strict";let s=r(5317),i=r(8388),a=r(442);function n(e,t,r){let n=i(e,t,r),o=s.spawn(n.command,n.args,n.options);return a.hookChildProcess(o,n),o}e.exports=n,e.exports.spawn=n,e.exports.sync=function(e,t,r){let n=i(e,t,r),o=s.spawnSync(n.command,n.args,n.options);return o.error=o.error||a.verifyENOENTSync(o.status,n),o},e.exports._parse=i,e.exports._enoent=a},442(e){"use strict";let t="win32"===process.platform;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function s(e,s){return t&&1===e&&!s.file?r(s.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;let i=e.emit;e.emit=function(t,a){if("exit"===t){let t=s(a,r);if(t)return i.call(e,"error",t)}return i.apply(e,arguments)}},verifyENOENT:s,verifyENOENTSync:function(e,s){return t&&1===e&&!s.file?r(s.original,"spawnSync"):null},notFoundError:r}},8388(e,t,r){"use strict";let s=r(6928),i=r(3803),a=r(2077),n=r(1880),o="win32"===process.platform,l=/\.(?:com|exe)$/i,u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);let c={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?c:function(e){let t;if(!o)return e;let r=(e.file=i(e),(t=e.file&&n(e.file))?(e.args.unshift(e.file),e.command=t,i(e)):e.file),c=!l.test(r);if(e.options.forceShell||c){let t=u.test(r);e.command=s.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,t));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(c)}},2077(e){"use strict";let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},1880(e,t,r){"use strict";let s=r(9896),i=r(600);e.exports=function(e){let t,r=Buffer.alloc(150);try{t=s.openSync(e,"r"),s.readSync(t,r,0,150,0),s.closeSync(t)}catch(e){}return i(r.toString())}},3803(e,t,r){"use strict";let s=r(6928),i=r(1905),a=r(9695);function n(e,t){let r,n=e.options.env||process.env,o=process.cwd(),l=null!=e.options.cwd,u=l&&void 0!==process.chdir&&!process.chdir.disabled;if(u)try{process.chdir(e.options.cwd)}catch(e){}try{r=i.sync(e.command,{path:n[a({env:n})],pathExt:t?s.delimiter:void 0})}catch(e){}finally{u&&process.chdir(o)}return r&&(r=s.resolve(l?e.options.cwd:"",r)),r}e.exports=function(e){return n(e)||n(e,!0)}},8583(e,t,r){let s=r(9896),i=r(6928),a=r(857),n=r(6982),o=r(4519).version,l=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function u(e){console.log(`[dotenv@${o}][DEBUG] ${e}`)}function c(e){console.log(`[dotenv@${o}] ${e}`)}function d(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function p(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)s.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=i.resolve(process.cwd(),".env.vault");return s.existsSync(t)?t:null}function f(e){return"~"===e[0]?i.join(a.homedir(),e.slice(1)):e}let h={configDotenv:function(e){let t,r=i.resolve(process.cwd(),".env"),a="utf8",n=!!(e&&e.debug),o=!e||!("quiet"in e)||e.quiet;e&&e.encoding?a=e.encoding:n&&u("No encoding is specified. UTF-8 is used by default");let l=[r];if(e&&e.path)if(Array.isArray(e.path))for(let t of(l=[],e.path))l.push(f(t));else l=[f(e.path)];let d={};for(let r of l)try{let t=h.parse(s.readFileSync(r,{encoding:a}));h.populate(d,t,e)}catch(e){n&&u(`Failed to load ${r} ${e.message}`),t=e}let p=process.env;if(e&&null!=e.processEnv&&(p=e.processEnv),h.populate(p,d,e),n||!o){let e=Object.keys(d).length,r=[];for(let e of l)try{let t=i.relative(process.cwd(),e);r.push(t)}catch(r){n&&u(`Failed to load ${e} ${r.message}`),t=r}c(`injecting env (${e}) from ${r.join(",")}`)}return t?{parsed:d,error:t}:{parsed:d}},_configVault:function(e){let t=!!(e&&e.debug),r=!e||!("quiet"in e)||e.quiet;(t||!r)&&c("Loading env from encrypted .env.vault");let s=h._parseVault(e),i=process.env;return e&&null!=e.processEnv&&(i=e.processEnv),h.populate(i,s,e),{parsed:s}},_parseVault:function(e){let t,r=p(e=e||{});e.path=r;let s=h.configDotenv(e);if(!s.parsed){let e=Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw e.code="MISSING_DATA",e}let i=d(e).split(","),a=i.length;for(let e=0;e<a;e++)try{let r=i[e].trim(),a=function(e,t){let r;try{r=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){let e=Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}let s=r.password;if(!s){let e=Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}let i=r.searchParams.get("environment");if(!i){let e=Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}let a=`DOTENV_VAULT_${i.toUpperCase()}`,n=e.parsed[a];if(!n){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:n,key:s}}(s,r);t=h.decrypt(a.ciphertext,a.key);break}catch(t){if(e+1>=a)throw t}return h.parse(t)},config:function(e){if(0===d(e).length)return h.configDotenv(e);let t=p(e);if(!t){var r;return r=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${o}][WARN] ${r}`),h.configDotenv(e)}return h._configVault(e)},decrypt:function(e,t){let r=Buffer.from(t.slice(-64),"hex"),s=Buffer.from(e,"base64"),i=s.subarray(0,12),a=s.subarray(-16);s=s.subarray(12,-16);try{let e=n.createDecipheriv("aes-256-gcm",r,i);return e.setAuthTag(a),`${e.update(s)}${e.final()}`}catch(s){let e=s instanceof RangeError,t="Invalid key length"===s.message,r="Unsupported state or unable to authenticate data"===s.message;if(e||t){let e=Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){let e=Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw s}},parse:function(e){let t,r={},s=e.toString();for(s=s.replace(/\r\n?/mg,"\n");null!=(t=l.exec(s));){let e=t[1],s=t[2]||"",i=(s=s.trim())[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),'"'===i&&(s=(s=s.replace(/\\n/g,"\n")).replace(/\\r/g,"\r")),r[e]=s}return r},populate:function(e,t,r={}){let s=!!(r&&r.debug),i=!!(r&&r.override);if("object"!=typeof t){let e=Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(let r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(!0===i&&(e[r]=t[r]),s&&(!0===i?u(`"${r}" is already defined and WAS overwritten`):u(`"${r}" is already defined and was NOT overwritten`))):e[r]=t[r]}};e.exports.configDotenv=h.configDotenv,e.exports._configVault=h._configVault,e.exports._parseVault=h._parseVault,e.exports.config=h.config,e.exports.decrypt=h.decrypt,e.exports.parse=h.parse,e.exports.populate=h.populate,e.exports=h},9053(e,t,r){"use strict";var s=r(6608).Buffer,i=r(2188);function a(e){if(s.isBuffer(e))return e;if("string"==typeof e)return s.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function n(e,t,r){for(var s=0;t+s<r&&0===e[t+s];)++s;return e[t+s]>=128&&--s,s}e.exports={derToJose:function(e,t){e=a(e);var r=i(t),n=r+1,o=e.length,l=0;if(48!==e[l++])throw Error('Could not find expected "seq"');var u=e[l++];if(129===u&&(u=e[l++]),o-l<u)throw Error('"seq" specified length of "'+u+'", only "'+(o-l)+'" remaining');if(2!==e[l++])throw Error('Could not find expected "int" for "r"');var c=e[l++];if(o-l-2<c)throw Error('"r" specified length of "'+c+'", only "'+(o-l-2)+'" available');if(n<c)throw Error('"r" specified length of "'+c+'", max of "'+n+'" is acceptable');var d=l;if(l+=c,2!==e[l++])throw Error('Could not find expected "int" for "s"');var p=e[l++];if(o-l!==p)throw Error('"s" specified length of "'+p+'", expected "'+(o-l)+'"');if(n<p)throw Error('"s" specified length of "'+p+'", max of "'+n+'" is acceptable');var f=l;if((l+=p)!==o)throw Error('Expected to consume entire buffer, but "'+(o-l)+'" bytes remain');var h=r-c,m=r-p,y=s.allocUnsafe(h+c+m+p);for(l=0;l<h;++l)y[l]=0;e.copy(y,l,d+Math.max(-h,0),d+c),l=r;for(var g=l;l<g+m;++l)y[l]=0;return e.copy(y,l,f+Math.max(-m,0),f+p),y=(y=y.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,t){e=a(e);var r=i(t),o=e.length;if(o!==2*r)throw TypeError('"'+t+'" signatures must be "'+2*r+'" bytes, saw "'+o+'"');var l=n(e,0,r),u=n(e,r,e.length),c=r-l,d=r-u,p=2+c+1+1+d,f=p<128,h=s.allocUnsafe((f?2:3)+p),m=0;return h[m++]=48,f?h[m++]=p:(h[m++]=129,h[m++]=255&p),h[m++]=2,h[m++]=c,l<0?(h[m++]=0,m+=e.copy(h,m,0,r)):m+=e.copy(h,m,l,r),h[m++]=2,h[m++]=d,u<0?(h[m++]=0,e.copy(h,m,r)):e.copy(h,m,r+u),h}}},2188(e){"use strict";function t(e){return(e/8|0)+ +(e%8!=0)}var r={ES256:t(256),ES384:t(384),ES512:t(521)};e.exports=function(e){var t=r[e];if(t)return t;throw Error('Unknown algorithm "'+e+'"')}},7371(e){"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((s=t.length)!=r.length)return!1;for(i=s;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((s=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=s;0!=i--;){var s,i,a,n=a[i];if(!e(t[n],r[n]))return!1}return!0}return t!=t&&r!=r}},9344(e,t,r){var s;function i(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(r,s){i(e,t||{},function(e,t){e?s(e):r(t)})})}s(e,t||{},function(e,s){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,s=!1),r(e,s)})}r(9896),s="win32"===process.platform||global.TESTING_WINDOWS?r(8541):r(709),e.exports=i,i.sync=function(e,t){try{return s.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},709(e,t,r){e.exports=i,i.sync=function(e,t){return a(s.statSync(e),t)};var s=r(9896);function i(e,t,r){s.stat(e,function(e,s){r(e,!e&&a(s,t))})}function a(e,t){var r,s,i,a,n,o,l,u,c;return e.isFile()&&(r=e,s=t,i=r.mode,a=r.uid,n=r.gid,o=void 0!==s.uid?s.uid:process.getuid&&process.getuid(),l=void 0!==s.gid?s.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),i&parseInt("001",8)||i&c&&n===l||i&u&&a===o||i&(u|c)&&0===o)}},8541(e,t,r){e.exports=a,a.sync=function(e,t){return i(s.statSync(e),e,t)};var s=r(9896);function i(e,t,r){if(!e.isSymbolicLink()&&!e.isFile())return!1;var s=void 0!==r.pathExt?r.pathExt:process.env.PATHEXT;if(!s||-1!==(s=s.split(";")).indexOf(""))return!0;for(var i=0;i<s.length;i++){var a=s[i].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a)return!0}return!1}function a(e,t,r){s.stat(e,function(s,a){r(s,!s&&i(a,e,t))})}},205(e){"use strict";var t=e.exports=function(e,r,s){"function"==typeof r&&(s=r,r={});var i="function"==typeof(s=r.cb||s)?s:s.pre||function(){};!function e(r,s,i,a,n,o,l,u,c,d){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var p in s(a,n,o,l,u,c,d),a){var f=a[p];if(Array.isArray(f)){if(p in t.arrayKeywords)for(var h=0;h<f.length;h++)e(r,s,i,f[h],n+"/"+p+"/"+h,o,n,p,a,h)}else if(p in t.propsKeywords){if(f&&"object"==typeof f)for(var m in f)e(r,s,i,f[m],n+"/"+p+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),o,n,p,a,m)}else(p in t.keywords||r.allKeys&&!(p in t.skipKeywords))&&e(r,s,i,f,n+"/"+p,o,n,p,a)}i(a,n,o,l,u,c,d)}}(r,i,s.post||function(){},e,"",e)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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}},2548(e,t,r){var s=r(3263);e.exports=function(e,t){t=t||{};var r=s.decode(e,t);if(!r)return null;var i=r.payload;if("string"==typeof i)try{var a=JSON.parse(i);null!==a&&"object"==typeof a&&(i=a)}catch(e){}return!0===t.complete?{header:r.header,payload:i,signature:r.signature}:i}},8400(e,t,r){e.exports={decode:r(2548),verify:r(6467),sign:r(9147),JsonWebTokenError:r(1957),NotBeforeError:r(4470),TokenExpiredError:r(7788)}},1957(e){var t=function(e,t){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,t&&(this.inner=t)};t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,e.exports=t},4470(e,t,r){var s=r(1957),i=function(e,t){s.call(this,e),this.name="NotBeforeError",this.date=t};i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i},7788(e,t,r){var s=r(1957),i=function(e,t){s.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i},5841(e,t,r){e.exports=r(3895).satisfies(process.version,">=15.7.0")},953(e,t,r){e.exports=r(3895).satisfies(process.version,"^6.12.0 || >=8.0.0")},455(e,t,r){e.exports=r(3895).satisfies(process.version,">=16.9.0")},4559(e,t,r){var s=r(3866);e.exports=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var i=s(e);if(void 0===i)return;return Math.floor(r+i/1e3)}if("number"==typeof e)return r+e}},723(e,t,r){let s=r(5841),i=r(455),a={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},n={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,t){if(!e||!t)return;let r=t.asymmetricKeyType;if(!r)return;let o=a[r];if(!o)throw Error(`Unknown key type "${r}".`);if(!o.includes(e))throw Error(`"alg" parameter for "${r}" key type must be one of: ${o.join(", ")}.`);if(s)switch(r){case"ec":let l=t.asymmetricKeyDetails.namedCurve,u=n[e];if(l!==u)throw Error(`"alg" parameter "${e}" requires curve "${u}".`);break;case"rsa-pss":if(i){let r=parseInt(e.slice(-3),10),{hashAlgorithm:s,mgf1HashAlgorithm:i,saltLength:a}=t.asymmetricKeyDetails;if(s!==`sha${r}`||i!==s)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==a&&a>r>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},9147(e,t,r){let s=r(4559),i=r(953),a=r(723),n=r(3263),o=r(5357),l=r(6782),u=r(5250),c=r(8094),d=r(6052),p=r(1251),f=r(8430),{KeyObject:h,createSecretKey:m,createPrivateKey:y}=r(6982),g=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];i&&g.splice(3,0,"PS256","PS384","PS512");let v={expiresIn:{isValid:function(e){return u(e)||p(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return u(e)||p(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return p(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:o.bind(null,g),message:'"algorithm" must be a valid string enum value'},header:{isValid:d,message:'"header" must be an object'},encoding:{isValid:p,message:'"encoding" must be a string'},issuer:{isValid:p,message:'"issuer" must be a string'},subject:{isValid:p,message:'"subject" must be a string'},jwtid:{isValid:p,message:'"jwtid" must be a string'},noTimestamp:{isValid:l,message:'"noTimestamp" must be a boolean'},keyid:{isValid:p,message:'"keyid" must be a string'},mutatePayload:{isValid:l,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:l,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:l,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},_={iat:{isValid:c,message:'"iat" should be a number of seconds'},exp:{isValid:c,message:'"exp" should be a number of seconds'},nbf:{isValid:c,message:'"nbf" should be a number of seconds'}};function b(e,t,r,s){if(!d(r))throw Error('Expected "'+s+'" to be a plain object.');Object.keys(r).forEach(function(i){let a=e[i];if(!a){if(!t)throw Error('"'+i+'" is not allowed in "'+s+'"');return}if(!a.isValid(r[i]))throw Error(a.message)})}let w={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},$=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,t,r,i){var o,l;"function"==typeof r?(i=r,r={}):r=r||{};let u="object"==typeof e&&!Buffer.isBuffer(e),c=Object.assign({alg:r.algorithm||"HS256",typ:u?"JWT":void 0,kid:r.keyid},r.header);function d(e){if(i)return i(e);throw e}if(!t&&"none"!==r.algorithm)return d(Error("secretOrPrivateKey must have a value"));if(null!=t&&!(t instanceof h))try{t=y(t)}catch(e){try{t=m("string"==typeof t?Buffer.from(t):t)}catch(e){return d(Error("secretOrPrivateKey is not valid key material"))}}if(c.alg.startsWith("HS")&&"secret"!==t.type)return d(Error(`secretOrPrivateKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)){if("private"!==t.type)return d(Error(`secretOrPrivateKey must be an asymmetric key when using ${c.alg}`));if(!r.allowInsecureKeySizes&&!c.alg.startsWith("ES")&&void 0!==t.asymmetricKeyDetails&&t.asymmetricKeyDetails.modulusLength<2048)return d(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`))}if(void 0===e)return d(Error("payload is required"));if(u){try{o=e,b(_,!0,o,"payload")}catch(e){return d(e)}r.mutatePayload||(e=Object.assign({},e))}else{let t=$.filter(function(e){return void 0!==r[e]});if(t.length>0)return d(Error("invalid "+t.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return d(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return d(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{l=r,b(v,!1,l,"options")}catch(e){return d(e)}if(!r.allowInvalidAsymmetricKeyTypes)try{a(c.alg,t)}catch(e){return d(e)}let p=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:u&&(e.iat=p),void 0!==r.notBefore){try{e.nbf=s(r.notBefore,p)}catch(e){return d(e)}if(void 0===e.nbf)return d(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=s(r.expiresIn,p)}catch(e){return d(e)}if(void 0===e.exp)return d(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(w).forEach(function(t){let s=w[t];if(void 0!==r[t]){if(void 0!==e[s])return d(Error('Bad "options.'+t+'" option. The payload already has an "'+s+'" property.'));e[s]=r[t]}});let g=r.encoding||"utf8";if("function"==typeof i)i=i&&f(i),n.createSign({header:c,privateKey:t,payload:e,encoding:g}).once("error",i).once("done",function(e){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&e.length<256)return i(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`));i(null,e)});else{let s=n.sign({header:c,payload:e,secret:t,encoding:g});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&s.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`);return s}}},6467(e,t,r){let s=r(1957),i=r(4470),a=r(7788),n=r(2548),o=r(4559),l=r(723),u=r(953),c=r(3263),{KeyObject:d,createSecretKey:p,createPublicKey:f}=r(6982),h=["RS256","RS384","RS512"],m=["ES256","ES384","ES512"],y=["RS256","RS384","RS512"],g=["HS256","HS384","HS512"];u&&(h.splice(h.length,0,"PS256","PS384","PS512"),y.splice(y.length,0,"PS256","PS384","PS512")),e.exports=function(e,t,r,u){let v,_,b;if("function"!=typeof r||u||(u=r,r={}),r||(r={}),r=Object.assign({},r),v=u||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return v(new s("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return v(new s("nonce must be a non-empty string"));if(void 0!==r.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof r.allowInvalidAsymmetricKeyTypes)return v(new s("allowInvalidAsymmetricKeyTypes must be a boolean"));let w=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return v(new s("jwt must be provided"));if("string"!=typeof e)return v(new s("jwt must be a string"));let $=e.split(".");if(3!==$.length)return v(new s("jwt malformed"));try{_=n(e,{complete:!0})}catch(e){return v(e)}if(!_)return v(new s("invalid token"));let E=_.header;if("function"==typeof t){if(!u)return v(new s("verify must be called asynchronous if secret or public key is provided as a callback"));b=t}else b=function(e,r){return r(null,t)};return b(E,function(t,n){let u;if(t)return v(new s("error in secret or public key callback: "+t.message));let b=""!==$[2].trim();if(!b&&n)return v(new s("jwt signature is required"));if(b&&!n)return v(new s("secret or public key must be provided"));if(!b&&!r.algorithms)return v(new s('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=n&&!(n instanceof d))try{n=f(n)}catch(e){try{n=p("string"==typeof n?Buffer.from(n):n)}catch(e){return v(new s("secretOrPublicKey is not valid key material"))}}if(r.algorithms||("secret"===n.type?r.algorithms=g:["rsa","rsa-pss"].includes(n.asymmetricKeyType)?r.algorithms=y:"ec"===n.asymmetricKeyType?r.algorithms=m:r.algorithms=h),-1===r.algorithms.indexOf(_.header.alg))return v(new s("invalid algorithm"));if(E.alg.startsWith("HS")&&"secret"!==n.type)return v(new s(`secretOrPublicKey must be a symmetric key when using ${E.alg}`));if(/^(?:RS|PS|ES)/.test(E.alg)&&"public"!==n.type)return v(new s(`secretOrPublicKey must be an asymmetric key when using ${E.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{l(E.alg,n)}catch(e){return v(e)}try{u=c.verify(e,_.header.alg,n)}catch(e){return v(e)}if(!u)return v(new s("invalid signature"));let k=_.payload;if(void 0!==k.nbf&&!r.ignoreNotBefore){if("number"!=typeof k.nbf)return v(new s("invalid nbf value"));if(k.nbf>w+(r.clockTolerance||0))return v(new i("jwt not active",new Date(1e3*k.nbf)))}if(void 0!==k.exp&&!r.ignoreExpiration){if("number"!=typeof k.exp)return v(new s("invalid exp value"));if(w>=k.exp+(r.clockTolerance||0))return v(new a("jwt expired",new Date(1e3*k.exp)))}if(r.audience){let e=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(k.aud)?k.aud:[k.aud]).some(function(t){return e.some(function(e){return e instanceof RegExp?e.test(t):e===t})}))return v(new s("jwt audience invalid. expected: "+e.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&k.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(k.iss)))return v(new s("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&k.sub!==r.subject)return v(new s("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&k.jti!==r.jwtid)return v(new s("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&k.nonce!==r.nonce)return v(new s("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof k.iat)return v(new s("iat required when maxAge is specified"));let e=o(r.maxAge,k.iat);if(void 0===e)return v(new s('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(w>=e+(r.clockTolerance||0))return v(new a("maxAge exceeded",new Date(1e3*e)))}return!0===r.complete?v(null,{header:E,payload:k,signature:_.signature}):v(null,k)})}},2357(e,t,r){var s,i=r(6608).Buffer,a=r(6982),n=r(9053),o=r(9023),l="secret must be a string or buffer",u="key must be a string or a buffer",c="function"==typeof a.createPublicKey;function d(e){if(!i.isBuffer(e)&&"string"!=typeof e&&(!c||"object"!=typeof e||"string"!=typeof e.type||"string"!=typeof e.asymmetricKeyType||"function"!=typeof e.export))throw m(u)}function p(e){if(!i.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw m("key must be a string, a buffer or an object")}function f(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function h(e){var t=4-(e=e.toString()).length%4;if(4!==t)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function m(e){var t=[].slice.call(arguments,1);return TypeError(o.format.bind(o,e).apply(null,t))}function y(e){var t;return t=e,i.isBuffer(t)||"string"==typeof t||(e=JSON.stringify(e)),e}function g(e){return function(t,r){!function(e){if(!i.isBuffer(e)){if("string"!=typeof e){if(!c||"object"!=typeof e||"secret"!==e.type||"function"!=typeof e.export)throw m(l)}}}(r),t=y(t);var s=a.createHmac("sha"+e,r);return f((s.update(t),s.digest("base64")))}}c&&(u+=" or a KeyObject",l+="or a KeyObject");var v="timingSafeEqual"in a?function(e,t){return e.byteLength===t.byteLength&&a.timingSafeEqual(e,t)}:function(e,t){return s||(s=r(9454)),s(e,t)};function _(e){return function(t,r,s){var a=g(e)(t,s);return v(i.from(r),i.from(a))}}function b(e){return function(t,r){p(r),t=y(t);var s=a.createSign("RSA-SHA"+e);return f((s.update(t),s.sign(r,"base64")))}}function w(e){return function(t,r,s){d(s),t=y(t),r=h(r);var i=a.createVerify("RSA-SHA"+e);return i.update(t),i.verify(s,r,"base64")}}function $(e){return function(t,r){p(r),t=y(t);var s=a.createSign("RSA-SHA"+e);return f((s.update(t),s.sign({key:r,padding:a.constants.RSA_PKCS1_PSS_PADDING,saltLength:a.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function E(e){return function(t,r,s){d(s),t=y(t),r=h(r);var i=a.createVerify("RSA-SHA"+e);return i.update(t),i.verify({key:s,padding:a.constants.RSA_PKCS1_PSS_PADDING,saltLength:a.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function k(e){var t=b(e);return function(){var r=t.apply(null,arguments);return n.derToJose(r,"ES"+e)}}function x(e){var t=w(e);return function(r,s,i){return t(r,s=n.joseToDer(s,"ES"+e).toString("base64"),i)}}function S(){return function(){return""}}function T(){return function(e,t){return""===t}}e.exports=function(e){var t=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!t)throw m('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);var r=(t[1]||t[3]).toLowerCase(),s=t[2];return{sign:({hs:g,rs:b,ps:$,es:k,none:S})[r](s),verify:({hs:_,rs:w,ps:E,es:x,none:T})[r](s)}}},3263(e,t,r){var s=r(9615),i=r(6747);t.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],t.sign=s.sign,t.verify=i.verify,t.decode=i.decode,t.isValid=i.isValid,t.createSign=function(e){return new s(e)},t.createVerify=function(e){return new i(e)}},6360(e,t,r){var s=r(6608).Buffer,i=r(2203);function a(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=s.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=s.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick((function(){this.emit("end",e),this.readable=!1,this.emit("close")}).bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}r(9023).inherits(a,i),a.prototype.write=function(e){this.buffer=s.concat([this.buffer,s.from(e)]),this.emit("data",e)},a.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},e.exports=a},9615(e,t,r){var s=r(6608).Buffer,i=r(6360),a=r(2357),n=r(2203),o=r(5911),l=r(9023);function u(e,t){return s.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function c(e){var t,r,s,i=e.header,n=e.payload,c=e.secret||e.privateKey,d=e.encoding,p=a(i.alg),f=(t=(t=d)||"utf8",r=u(o(i),"binary"),s=u(o(n),t),l.format("%s.%s",r,s)),h=p.sign(f,c);return l.format("%s.%s",f,h)}function d(e){var t=e.secret;if(t=null==(t=null==t?e.privateKey:t)?e.key:t,!0===/^hs/i.test(e.header.alg)&&null==t)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new i(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new i(e.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}l.inherits(d,n),d.prototype.sign=function(){try{var e=c({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},d.sign=c,e.exports=d},5911(e,t,r){var s=r(181).Buffer;e.exports=function(e){return"string"==typeof e?e:"number"==typeof e||s.isBuffer(e)?e.toString():JSON.stringify(e)}},6747(e,t,r){var s=r(6608).Buffer,i=r(6360),a=r(2357),n=r(2203),o=r(5911),l=r(9023),u=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function c(e){var t=e.split(".",1)[0],r=s.from(t,"base64").toString("binary");if("[object Object]"===Object.prototype.toString.call(r))return r;try{return JSON.parse(r)}catch(e){return}}function d(e){return e.split(".")[2]}function p(e){return u.test(e)&&!!c(e)}function f(e,t,r){if(!t){var s=Error("Missing algorithm parameter for jws.verify");throw s.code="MISSING_ALGORITHM",s}var i=d(e=o(e)),n=e.split(".",2).join(".");return a(t).verify(n,i,r)}function h(e,t){if(t=t||{},!p(e=o(e)))return null;var r,i,a=c(e);if(!a)return null;var n=(r=r||"utf8",i=e.split(".")[1],s.from(i,"base64").toString(r));return("JWT"===a.typ||t.json)&&(n=JSON.parse(n,t.encoding)),{header:a,payload:n,signature:d(e)}}function m(e){var t=(e=e||{}).secret;if(t=null==(t=null==t?e.publicKey:t)?e.key:t,!0===/^hs/i.test(e.algorithm)&&null==t)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new i(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new i(e.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}l.inherits(m,n),m.prototype.verify=function(){try{var e=f(this.signature.buffer,this.algorithm,this.key.buffer),t=h(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},m.decode=h,m.isValid=p,m.verify=f,e.exports=m},5357(e){var t,r,s=1/0,i=0/0,a=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=/^(?:0|[1-9]\d*)$/,c=parseInt;function d(e){return e!=e}var p=Object.prototype,f=p.hasOwnProperty,h=p.toString,m=p.propertyIsEnumerable,y=(t=Object.keys,r=Object,function(e){return t(r(e))}),g=Math.max,v=Array.isArray;function _(e){var t,r,s;return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=0x1fffffffffffff&&"[object Function]"!=(s=b(r=e)?h.call(r):"")&&"[object GeneratorFunction]"!=s}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){return!!e&&"object"==typeof e}e.exports=function(e,t,r,$){e=_(e)?e:function(e){return e?function(e,t){for(var r=-1,s=e?e.length:0,i=Array(s);++r<s;)i[r]=t(e[r],r,e);return i}(_(e)?function(e,t){var r,s,i,a,n=v(e)||w(s=r=e)&&_(s)&&f.call(r,"callee")&&(!m.call(r,"callee")||"[object Arguments]"==h.call(r))?function(e,t){for(var r=-1,s=Array(e);++r<e;)s[r]=t(r);return s}(e.length,String):[],o=n.length,l=!!o;for(var c in e){f.call(e,c)&&!(l&&("length"==c||(i=c,(a=null==(a=o)?0x1fffffffffffff:a)&&("number"==typeof i||u.test(i))&&i>-1&&i%1==0&&i<a)))&&n.push(c)}return n}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||p))return y(e);var t,r,s=[];for(var i in Object(e))f.call(e,i)&&"constructor"!=i&&s.push(i);return s}(e),function(t){return e[t]}):[]}(e),r=r&&!$?(x=(k=(E=r)?(E=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||w(t)&&"[object Symbol]"==h.call(t))return i;if(b(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=b(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var s=o.test(e);return s||l.test(e)?c(e.slice(2),s?2:8):n.test(e)?i:+e}(E))===s||E===-s?(E<0?-1:1)*17976931348623157e292:E==E?E:0:0===E?E:0)%1,k==k?x?k-x:k:0):0;var E,k,x,S,T=e.length;return r<0&&(r=g(T+r,0)),"string"==typeof(S=e)||!v(S)&&w(S)&&"[object String]"==h.call(S)?r<=T&&e.indexOf(t,r)>-1:!!T&&function(e,t,r){if(t!=t){for(var s=e.length,i=r+-1;++i<s;)if(d(e[i],i,e))return i;return -1}for(var a=r-1,n=e.length;++a<n;)if(e[a]===t)return a;return -1}(e,t,r)>-1}},6782(e){var t=Object.prototype.toString;e.exports=function(e){var r;return!0===e||!1===e||!!(r=e)&&"object"==typeof r&&"[object Boolean]"==t.call(e)}},5250(e){var t=1/0,r=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,n=/^0o[0-7]+$/i,o=parseInt,l=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){var c,d,p;return"number"==typeof e&&e==(p=(d=(c=e)?(c=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==l.call(t))return r;if(u(e)){var t,c="function"==typeof e.valueOf?e.valueOf():e;e=u(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var d=a.test(e);return d||n.test(e)?o(e.slice(2),d?2:8):i.test(e)?r:+e}(c))===t||c===-t?(c<0?-1:1)*17976931348623157e292:c==c?c:0:0===c?c:0)%1,d==d?p?d-p:d:0)}},8094(e){var t=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"==t.call(e)}},6052(e){var t,r,s=Object.prototype,i=Function.prototype.toString,a=s.hasOwnProperty,n=i.call(Object),o=s.toString,l=(t=Object.getPrototypeOf,r=Object,function(e){return t(r(e))});e.exports=function(e){if(!(e&&"object"==typeof e)||"[object Object]"!=o.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=l(e);if(null===t)return!0;var r=a.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&i.call(r)==n}},1251(e){var t=Object.prototype.toString,r=Array.isArray;e.exports=function(e){var s;return"string"==typeof e||!r(e)&&!!(s=e)&&"object"==typeof s&&"[object String]"==t.call(e)}},8430(e){var t=1/0,r=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,n=/^0o[0-7]+$/i,o=parseInt,l=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){var c,d,p,f,h=2,m=e;if("function"!=typeof m)throw TypeError("Expected a function");return p=(d=(c=h)?(c=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==l.call(t))return r;if(u(e)){var t,c="function"==typeof e.valueOf?e.valueOf():e;e=u(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var d=a.test(e);return d||n.test(e)?o(e.slice(2),d?2:8):i.test(e)?r:+e}(c))===t||c===-t?(c<0?-1:1)*17976931348623157e292:c==c?c:0:0===c?c:0)%1,h=d==d?p?d-p:d:0,function(){return--h>0&&(f=m.apply(this,arguments)),h<=1&&(m=void 0),f}}},3866(e){function t(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}e.exports=function(e,r){r=r||{};var s,i,a,n,o=typeof e;if("string"===o&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(u){var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return 864e5*c;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*c;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*c;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:break}}}return}if("number"===o&&isFinite(e)){return r.long?(i=Math.abs(s=e))>=864e5?t(s,i,864e5,"day"):i>=36e5?t(s,i,36e5,"hour"):i>=6e4?t(s,i,6e4,"minute"):i>=1e3?t(s,i,1e3,"second"):s+" ms":(n=Math.abs(a=e))>=864e5?Math.round(a/864e5)+"d":n>=36e5?Math.round(a/36e5)+"h":n>=6e4?Math.round(a/6e4)+"m":n>=1e3?Math.round(a/1e3)+"s":a+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9695(e){"use strict";let t=(e={})=>{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},6608(e,t,r){var s=r(181),i=s.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function n(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=s:(a(s,t),t.Buffer=n),n.prototype=Object.create(i.prototype),a(i,n),n.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},n.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var s=i(e);return void 0!==t?"string"==typeof r?s.fill(t,r):s.fill(t):s.fill(0),s},n.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},n.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return s.SlowBuffer(e)}},8610(e,t,r){"use strict";let s=Symbol("SemVer ANY");class i{static get ANY(){return s}constructor(e,t){if(t=a(t),e instanceof i)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===s?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?n[o.COMPARATORLOOSE]:n[o.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=s}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===s||e===s)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=i;let a=r(4621),{safeRe:n,t:o}=r(152),l=r(5461),u=r(674),c=r(2398),d=r(2069)},2069(e,t,r){"use strict";let s=/\s+/g;class i{constructor(e,t){if(t=n(t),e instanceof i)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new i(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(s," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!g(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&m)|(this.options.loose&&y))+":"+e,r=a.get(t);if(r)return r;let s=this.options.loose,i=s?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(i,O(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],f)),l("caret trim",e=e.replace(c[d.CARETTRIM],h));let n=e.split(" ").map(e=>b(e,this.options)).join(" ").split(/\s+/).map(e=>I(e,this.options));s&&(n=n.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",n);let u=new Map;for(let e of n.map(e=>new o(e,this.options))){if(g(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof i))throw TypeError("a Range is required");return this.set.some(r=>_(r,t)&&e.set.some(e=>_(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(j(this.set[t],e,this.options))return!0;return!1}}e.exports=i;let a=new(r(2044)),n=r(4621),o=r(8610),l=r(674),u=r(2398),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:h}=r(152),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(5076),g=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,_=(e,t)=>{let r=!0,s=e.slice(),i=s.pop();for(;r&&s.length;)r=s.every(e=>i.intersects(e,t)),i=s.pop();return r},b=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=k(e,t)),l("tildes",e=$(e,t)),l("xrange",e=S(e,t)),l("stars",e=P(e,t)),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,$=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,s,i,a)=>{let n;return l("tilde",e,t,r,s,i,a),w(r)?n="":w(s)?n=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?n=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(l("replaceTilde pr",a),n=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):n=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,l("tilde return",n),n})},k=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,a,n)=>{let o;return l("caret",e,t,r,i,a,n),w(r)?o="":w(i)?o=`>=${r}.0.0${s} <${+r+1}.0.0-0`:w(a)?o="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:n?(l("replaceCaret pr",n),o="0"===r?"0"===i?`>=${r}.${i}.${a}-${n} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${n} <${+r+1}.0.0-0`):(l("no pr"),o="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),l("caret return",o),o})},S=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>T(e,t)).join(" ")),T=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,s,i,a,n,o)=>{l("xRange",e,r,s,i,a,n,o);let u=w(i),c=u||w(a),d=c||w(n);return"="===s&&d&&(s=""),o=t.includePrerelease?"-0":"",u?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&d?(c&&(a=0),n=0,">"===s?(s=">=",c?(i=+i+1,a=0):a=+a+1,n=0):"<="===s&&(s="<",c?i=+i+1:a=+a+1),"<"===s&&(o="-0"),r=`${s+i}.${a}.${n}${o}`):c?r=`>=${i}.0.0${o} <${+i+1}.0.0-0`:d&&(r=`>=${i}.${a}.0${o} <${i}.${+a+1}.0-0`),l("xRange return",r),r})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),O=e=>(t,r,s,i,a,n,o,l,u,c,d,p)=>(r=w(s)?"":w(i)?`>=${s}.0.0${e?"-0":""}`:w(a)?`>=${s}.${i}.0${e?"-0":""}`:n?`>=${r}`:`>=${r}${e?"-0":""}`,l=w(u)?"":w(c)?`<${+u+1}.0.0-0`:w(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),j=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){let s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}},2398(e,t,r){"use strict";let s=r(674),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=r(5076),{safeRe:n,t:o}=r(152),l=r(4621),{compareIdentifiers:u}=r(9101);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw TypeError(`version is longer than ${i} characters`);s("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?n[o.LOOSE]:n[o.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(s("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(s("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(s("build compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?n[o.PRERELEASELOOSE]:n[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},5608(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},5461(e,t,r){"use strict";let s=r(8271),i=r(733),a=r(1686),n=r(6479),o=r(7257),l=r(5850);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return i(e,r,u);case">":return a(e,r,u);case">=":return n(e,r,u);case"<":return o(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},7771(e,t,r){"use strict";let s=r(2398),i=r(6802),{safeRe:a,t:n}=r(152);e.exports=(e,t)=>{if(e instanceof s)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let s,i=t.includePrerelease?a[n.COERCERTLFULL]:a[n.COERCERTL];for(;(s=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&s.index+s[0].length===r.index+r[0].length||(r=s),i.lastIndex=s.index+s[1].length+s[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?a[n.COERCEFULL]:a[n.COERCE]);if(null===r)return null;let o=r[2],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${o}.${l}.${u}${c}${d}`,t)}},8767(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r)=>{let i=new s(e,r),a=new s(t,r);return i.compare(a)||i.compareBuild(a)}},6293(e,t,r){"use strict";let s=r(6958);e.exports=(e,t)=>s(e,t,!0)},6958(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r)=>new s(e,r).compare(new s(t,r))},3086(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,null,!0),i=s(t,null,!0),a=r.compare(i);if(0===a)return null;let n=a>0,o=n?r:i,l=n?i:r,u=!!o.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}let c=u?"pre":"";return r.major!==i.major?c+"major":r.minor!==i.minor?c+"minor":r.patch!==i.patch?c+"patch":"prerelease"}},8271(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0===s(e,t,r)},1686(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(e,t,r)>0},6479(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(e,t,r)>=0},3625(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r,i,a)=>{"string"==typeof r&&(a=i,i=r,r=void 0);try{return new s(e instanceof s?e.version:e,r).inc(t,i,a).version}catch(e){return null}}},7257(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0>s(e,t,r)},5850(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0>=s(e,t,r)},7744(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).major},4812(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).minor},733(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0!==s(e,t,r)},6802(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r=!1)=>{if(e instanceof s)return e;try{return new s(e,t)}catch(e){if(!r)return null;throw e}}},8643(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).patch},9283(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,t);return r&&r.prerelease.length?r.prerelease:null}},7032(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(t,e,r)},9839(e,t,r){"use strict";let s=r(8767);e.exports=(e,t)=>e.sort((e,r)=>s(r,e,t))},4056(e,t,r){"use strict";let s=r(2069);e.exports=(e,t,r)=>{try{t=new s(t,r)}catch(e){return!1}return t.test(e)}},7697(e,t,r){"use strict";let s=r(8767);e.exports=(e,t)=>e.sort((e,r)=>s(e,r,t))},6807(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,t);return r?r.version:null}},3895(e,t,r){"use strict";let s=r(152),i=r(5076),a=r(2398),n=r(9101),o=r(6802),l=r(6807),u=r(5608),c=r(3625),d=r(3086),p=r(7744),f=r(4812),h=r(8643),m=r(9283),y=r(6958),g=r(7032),v=r(6293),_=r(8767),b=r(7697),w=r(9839),$=r(1686),E=r(7257),k=r(8271),x=r(733),S=r(6479),T=r(5850),P=r(5461),I=r(7771),O=r(8610),j=r(2069),R=r(4056),N=r(6613),C=r(7114),A=r(1008),z=r(203),M=r(5372),D=r(4713),L=r(4497),q=r(9272),U=r(3490);e.exports={parse:o,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:v,compareBuild:_,sort:b,rsort:w,gt:$,lt:E,eq:k,neq:x,gte:S,lte:T,cmp:P,coerce:I,Comparator:O,Range:j,satisfies:R,toComparators:N,maxSatisfying:C,minSatisfying:A,minVersion:z,validRange:M,outside:D,gtr:L,ltr:q,intersects:U,simplifyRange:r(4039),subset:r(22),SemVer:a,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers}},5076(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},674(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},9101(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let s=t.test(e),i=t.test(r);return s&&i&&(e*=1,r*=1),e===r?0:s&&!i?-1:i&&!s?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},2044(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},4621(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},152(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:a}=r(5076),n=r(674),o=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",a],[f,i]],m=(e,t,r)=>{let s=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;n(e,i,t),d[e]=i,u[i]=t,c[i]=s,o[i]=new RegExp(t,r?"g":void 0),l[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},4497(e,t,r){"use strict";let s=r(4713);e.exports=(e,t,r)=>s(e,t,">",r)},3490(e,t,r){"use strict";let s=r(2069);e.exports=(e,t,r)=>(e=new s(e,r),t=new s(t,r),e.intersects(t,r))},9272(e,t,r){"use strict";let s=r(4713);e.exports=(e,t,r)=>s(e,t,"<",r)},7114(e,t,r){"use strict";let s=r(2398),i=r(2069);e.exports=(e,t,r)=>{let a=null,n=null,o=null;try{o=new i(t,r)}catch(e){return null}return e.forEach(e=>{o.test(e)&&(!a||-1===n.compare(e))&&(n=new s(a=e,r))}),a}},1008(e,t,r){"use strict";let s=r(2398),i=r(2069);e.exports=(e,t,r)=>{let a=null,n=null,o=null;try{o=new i(t,r)}catch(e){return null}return e.forEach(e=>{o.test(e)&&(!a||1===n.compare(e))&&(n=new s(a=e,r))}),a}},203(e,t,r){"use strict";let s=r(2398),i=r(2069),a=r(1686);e.exports=(e,t)=>{e=new i(e,t);let r=new s("0.0.0");if(e.test(r)||(r=new s("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let i=e.set[t],n=null;i.forEach(e=>{let t=new s(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||a(t,n))&&(n=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),n&&(!r||a(r,n))&&(r=n)}return r&&e.test(r)?r:null}},4713(e,t,r){"use strict";let s=r(2398),i=r(8610),{ANY:a}=i,n=r(2069),o=r(4056),l=r(1686),u=r(7257),c=r(5850),d=r(6479);e.exports=(e,t,r,p)=>{let f,h,m,y,g;switch(e=new s(e,p),t=new n(t,p),r){case">":f=l,h=c,m=u,y=">",g=">=";break;case"<":f=u,h=d,m=l,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,p))return!1;for(let r=0;r<t.set.length;++r){let s=t.set[r],n=null,o=null;if(s.forEach(e=>{e.semver===a&&(e=new i(">=0.0.0")),n=n||e,o=o||e,f(e.semver,n.semver,p)?n=e:m(e.semver,o.semver,p)&&(o=e)}),n.operator===y||n.operator===g||(!o.operator||o.operator===y)&&h(e,o.semver)||o.operator===g&&m(e,o.semver))return!1}return!0}},4039(e,t,r){"use strict";let s=r(4056),i=r(6958);e.exports=(e,t,r)=>{let a=[],n=null,o=null,l=e.sort((e,t)=>i(e,t,r));for(let e of l)s(e,t,r)?(o=e,n||(n=e)):(o&&a.push([n,o]),o=null,n=null);n&&a.push([n,null]);let u=[];for(let[e,t]of a)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},22(e,t,r){"use strict";let s=r(2069),i=r(8610),{ANY:a}=i,n=r(4056),o=r(6958),l=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],c=(e,t,r)=>{let s,i,c,f,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===a)if(1===t.length&&t[0].semver===a)return!0;else e=r.includePrerelease?l:u;if(1===t.length&&t[0].semver===a)if(r.includePrerelease)return!0;else t=u;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?s=d(s,t,r):"<"===t.operator||"<="===t.operator?i=p(i,t,r):g.add(t.semver);if(g.size>1)return null;if(s&&i&&((c=o(s.semver,i.semver,r))>0||0===c&&(">="!==s.operator||"<="!==i.operator)))return null;for(let e of g){if(s&&!n(e,String(s),r)||i&&!n(e,String(i),r))return null;for(let s of t)if(!n(e,String(s),r))return!1;return!0}let v=!!i&&!r.includePrerelease&&!!i.semver.prerelease.length&&i.semver,_=!!s&&!r.includePrerelease&&!!s.semver.prerelease.length&&s.semver;for(let e of(v&&1===v.prerelease.length&&"<"===i.operator&&0===v.prerelease[0]&&(v=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,s){if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),">"===e.operator||">="===e.operator){if((f=d(s,e,r))===e&&f!==s)return!1}else if(">="===s.operator&&!n(s.semver,String(e),r))return!1}if(i){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if((h=p(i,e,r))===e&&h!==i)return!1}else if("<="===i.operator&&!n(i.semver,String(e),r))return!1}if(!e.operator&&(i||s)&&0!==c)return!1}return(!s||!m||!!i||0===c)&&(!i||!y||!!s||0===c)&&!_&&!v&&!0},d=(e,t,r)=>{if(!e)return t;let s=o(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;let s=o(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new s(e,r),t=new s(t,r);let i=!1;e:for(let s of e.set){for(let e of t.set){let t=c(s,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},6613(e,t,r){"use strict";let s=r(2069);e.exports=(e,t)=>new s(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},5372(e,t,r){"use strict";let s=r(2069);e.exports=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}}},600(e,t,r){"use strict";let s=r(9638);e.exports=(e="")=>{let t=e.match(s);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,"").split(" "),a=r.split("/").pop();return"env"===a?i:i?`${a} ${i}`:a}},9638(e){"use strict";e.exports=/^#!(.*)/},1905(e,t,r){let s="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,i=r(6928),a=s?";":":",n=r(9344),o=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),l=(e,t)=>{let r=t.colon||a,i=e.match(/\//)||s&&e.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],n=s?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=s?n.split(r):[""];return s&&-1!==e.indexOf(".")&&""!==o[0]&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:n}},u=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});let{pathEnv:s,pathExt:a,pathExtExe:u}=l(e,t),c=[],d=r=>new Promise((a,n)=>{if(r===s.length)return t.all&&c.length?a(c):n(o(e));let l=s[r],u=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(u,e);a(p(!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,r,0))}),p=(e,r,s)=>new Promise((i,o)=>{if(s===a.length)return i(d(r+1));let l=a[s];n(e+l,{pathExt:u},(a,n)=>{if(!a&&n)if(!t.all)return i(e+l);else c.push(e+l);return i(p(e,r,s+1))})});return r?d(0).then(e=>r(null,e),r):d(0)};e.exports=u,u.sync=(e,t)=>{let{pathEnv:r,pathExt:s,pathExtExe:a}=l(e,t=t||{}),u=[];for(let o=0;o<r.length;o++){let l=r[o],c=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<s.length;e++){let r=p+s[e];try{if(n.sync(r,{pathExt:a}))if(!t.all)return r;else u.push(r)}catch(e){}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw o(e)}},181(e){"use strict";e.exports=require("buffer")},5317(e){"use strict";e.exports=require("child_process")},6982(e){"use strict";e.exports=require("crypto")},9896(e){"use strict";e.exports=require("fs")},7598(e){"use strict";e.exports=require("node:crypto")},857(e){"use strict";e.exports=require("os")},6928(e){"use strict";e.exports=require("path")},2203(e){"use strict";e.exports=require("stream")},9023(e){"use strict";e.exports=require("util")},5019(e,t,r){"use strict";let{normalizeIPv6:s,removeDotSegments:i,recomposeAuthority:a,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:l}=r(6214),{SCHEMES:u,getSchemeHandler:c}=r(1528);function d(e,t,r,s){let a={};return s||(e=h(p(e,r),r),t=h(p(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=i(t.path||""),a.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=i(t.path||""),a.query=t.query):(t.path?("/"===t.path[0]?a.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:a.path=t.path:a.path="/"+t.path,a.path=i(a.path)),a.query=t.query):(a.path=e.path,void 0!==t.query?a.query=t.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function p(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},t),n=[],o=c(s.scheme||r.scheme);o&&o.serialize&&o.serialize(r,s),void 0!==r.path&&(s.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==s.reference&&r.scheme&&n.push(r.scheme,":");let l=a(r);if(void 0!==l&&("suffix"!==s.reference&&n.push("//"),n.push(l),r.path&&"/"!==r.path[0]&&n.push("/")),void 0!==r.path){let e=r.path;s.absolutePath||o&&o.absolutePath||(e=i(e)),void 0===l&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),n.push(e)}return void 0!==r.query&&n.push("?",r.query),void 0!==r.fragment&&n.push("#",r.fragment),n.join("")}let f=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function h(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=!1;"suffix"===r.reference&&(e=r.scheme?r.scheme+":"+e:"//"+e);let n=e.match(f);if(n){if(i.scheme=n[1],i.userinfo=n[3],i.host=n[4],i.port=parseInt(n[5],10),i.path=n[6]||"",i.query=n[7],i.fragment=n[8],isNaN(i.port)&&(i.port=n[5]),i.host)if(!1===o(i.host)){let e=s(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");let t=c(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&!1===a&&l(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=unescape(i.host))),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}let m={SCHEMES:u,normalize:function(e,t){return"string"==typeof e?e=p(h(e,t),t):"object"==typeof e&&(e=h(p(e,t),t)),e},resolve:function(e,t,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=d(h(e,s),h(t,s),s,!0);return s.skipEscape=!0,p(i,s)},resolveComponent:d,equal:function(e,t,r){return"string"==typeof e?e=p(n(h(e=unescape(e),r),!0),{...r,skipEscape:!0}):"object"==typeof e&&(e=p(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?t=p(n(h(t=unescape(t),r),!0),{...r,skipEscape:!0}):"object"==typeof t&&(t=p(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:p,parse:h};e.exports=m,e.exports.default=m,e.exports.fastUri=m},1528(e,t,r){"use strict";let{isUUID:s}=r(6214),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,a=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function l(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let u={scheme:"http",domainHost:!0,parse:o,serialize:l},c={scheme:"https",domainHost:u.domainHost,parse:o,serialize:l},d={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:d.domainHost,parse:d.parse,serialize:d.serialize},f={http:u,https:c,ws:d,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r){let s=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=h(`${s}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",s=e.nid.toLowerCase(),i=h(`${r}:${t.nid||s}`);i&&(e=i.serialize(e,t));let a=e,n=e.nss;return a.path=`${s||t.nid}:${n}`,t.skipEscape=!0,a},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&s(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function h(e){return e&&(f[e]||f[e.toLowerCase()])||void 0}Object.setPrototypeOf(f,null),e.exports={wsIsSecure:n,SCHEMES:f,isValidSchemeName:function(e){return -1!==a.indexOf(e)},getSchemeHandler:h}},6214(e){"use strict";let t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function s(e){let t="",r=0,s=0;for(s=0;s<e.length;s++)if(48!==(r=e[s].charCodeAt(0))){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s];break}for(s+=1;s<e.length;s++){if(!((r=e[s].charCodeAt(0))>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s]}return t}function i(e){return e.length=0,!0}function a(e,t,r){if(e.length){let i=s(e);if(""===i)return r.error=!0,!1;t.push(i),e.length=0}return!0}function n(e){if(2>function(e,t){let r=0;for(let t=0;t<e.length;t++)":"===e[t]&&r++;return r}(e,":"))return{host:e,isIPV6:!1};let t=function(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],l=!1,u=!1,c=a;for(let s=0;s<e.length;s++){let a=e[s];if("["!==a&&"]"!==a)if(":"===a){if(!0===l&&(u=!0),!c(o,n,r))break;if(++t>7){r.error=!0;break}s>0&&":"===e[s-1]&&(l=!0),n.push(":");continue}else if("%"===a){if(!c(o,n,r))break;c=i}else{o.push(a);continue}}return o.length&&(c===i?r.zone=o.join(""):u?n.push(o.join("")):n.push(s(o))),r.address=n.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}e.exports={nonSimpleDomain:RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let s=unescape(e.host);if(!r(s)){let t=n(s);s=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(s)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){let r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e,r=[],s=-1,i=0;for(;i=t.length;){if(1===i)if("."===t)break;else if("/"===t){r.push("/");break}else{r.push(t);break}if(2===i){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===i&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(s=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,s)),t=t.slice(s)}return r.join("")},isIPv4:r,isUUID:t,normalizeIPv6:n,stringArrayToHexStripped:s}},114(e){"use strict";e.exports=JSON.parse('{"$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":false}')},7456(e){"use strict";e.exports=JSON.parse('{"$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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')},4519(e){"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.6.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},8330(e){"use strict";e.exports=JSON.parse('{"name":"xmcp","description":"The MCP framework","version":"0.6.8","author":{"name":"xmcp","email":"support@xmcp.dev","url":"https://xmcp.dev"},"contributors":[{"name":"Valentina Bearzotti","email":"valebearzotti1@gmail.com","url":"https://github.com/valebearzotti"},{"name":"Jose Rago","email":"jose@basement.studio","url":"https://github.com/ragojose"}],"license":"MIT","keywords":["mcp","modelcontextprotocol","http","stdio"],"repository":{"type":"git","url":"https://github.com/basementstudio/xmcp"},"homepage":"https://xmcp.dev","type":"commonjs","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"xmcp":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js","default":"./dist/index.js"},"./host-bridge":{"types":"./dist/host-bridge.d.ts","import":"./dist/host-bridge.js","require":"./dist/host-bridge.js","default":"./dist/host-bridge.js"},"./headers":{"types":"./dist/runtime/headers.d.ts","require":"./dist/runtime/headers.js","default":"./dist/runtime/headers.js"},"./cloudflare":{"types":"./dist/cloudflare.d.ts","import":"./dist/cloudflare.js","require":"./dist/cloudflare.js","default":"./dist/cloudflare.js"},"./package.json":"./package.json"},"typesVersions":{"*":{"host-bridge":["dist/host-bridge.d.ts"],"headers":["dist/runtime/headers.d.ts"],"cloudflare":["dist/cloudflare.d.ts"]}},"files":["dist","src"],"scripts":{"dev":"cross-env NODE_ENV=development tsx --watch --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","build":"cross-env NODE_ENV=production tsx --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","analyze":"cross-env GENERATE_STATS=true pnpm build && pnpm tsx scripts/analyze-rspack-stats.ts","test:config":"node --import tsx --test src/compiler/config/__tests__/*.test.ts"},"dependencies":{"@modelcontextprotocol/sdk":"^1.26.0","@rspack/core":"^1.6.7","jose":"^6.1.3","postcss-loader":"^8.2.0","ts-checker-rspack-plugin":"^1.2.1","typescript":"^5.9.3"},"devDependencies":{"@nestjs/common":"^11.1.12","@types/async-retry":"^1.4.9","@types/content-type":"^1.1.9","@types/express":"^5.0.6","@types/fs-extra":"^11.0.4","@types/jsonwebtoken":"^9.0.10","@types/node":"^22.19.2","@types/react":"^19.2.7","@types/react-dom":"^19.2.3","async-retry":"^1.3.3","chalk":"^5.6.2","chokidar":"^3.6.0","ci-info":"^4.3.1","commander":"^11.1.0","content-type":"^1.0.5","cross-env":"^7.0.3","del":"^7.1.0","dotenv":"^16.6.1","express":"^4.22.1","fs-extra":"^11.3.2","glob":"^11.1.0","is-docker":"^4.0.0","is-wsl":"^3.1.0","json5":"^2.2.3","jsonwebtoken":"^9.0.3","memfs":"^4.51.1","raw-body":"^3.0.2","reflect-metadata":"^0.2.2","rxjs":"^7.8.2","tsx":"^4.21.0"},"peerDependencies":{"react":">=19.0.0","react-dom":">=19.0.0","zod":"^3.25.76 || ^4.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}}}')}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var a=s[e]={exports:{}};return r[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,s){if(1&s&&(r=this(r)),8&s||"object"==typeof r&&r&&(4&s&&r.__esModule||16&s&&"function"==typeof r.then))return r;var a=Object.create(null);i.r(a);var n={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&r;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>{n[e]=()=>r[e]});return n.default=()=>r,i.d(a,n),a},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";let e,t,r,s,n;i.r(a),i.d(a,{createHTTPClient:()=>lO,HOST_CONTEXT_CHANGED_METHOD:()=>lK,UPDATE_MODEL_CONTEXT_METHOD:()=>lU,UrlElicitationRequiredError:()=>ou,isEnvHeader:()=>lx,createSTDIOClient:()=>lj,jwtAuthMiddleware:()=>eQ,listSTDIOClientTools:()=>lR,createMcpHostBridge:()=>lW,SIZE_CHANGED_METHOD:()=>lH,INITIALIZE_METHOD:()=>lM,LOG_MESSAGE_METHOD:()=>lV,INITIALIZED_METHOD:()=>lD,OPEN_LINK_METHOD:()=>lq,REQUEST_DISPLAY_MODE_METHOD:()=>lL,disconnectSTDIOClient:()=>lC,RESOURCES_READ_METHOD:()=>lF,createContext:()=>e9,callSTDIOClientTool:()=>lN,headersToRecord:()=>lS,MCP_APPS_PROTOCOL_VERSION:()=>lz,extractToolNamesFromRequest:()=>lA,UI_MESSAGE_METHOD:()=>lZ,apiKeyAuthMiddleware:()=>eJ,completable:()=>e6});var o,l,u,c,d,p,f,h,m,y,g,v,_,b,w,$,E,k=i(8583),x=i.n(k);(o=y||(y={})).assertEqual=e=>{},o.assertIs=function(e){},o.assertNever=function(e){throw Error()},o.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},o.getValidEnumValues=e=>{let t=o.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let s of t)r[s]=e[s];return o.objectValues(r)},o.objectValues=e=>o.objectKeys(e).map(function(t){return e[t]}),o.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},o.find=(e,t)=>{for(let r of e)if(t(r))return r},o.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,o.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},o.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(g||(g={})).mergeShapes=(e,t)=>({...e,...t});let S=y.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),T=e=>{switch(typeof e){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(e)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":if(Array.isArray(e))return S.array;if(null===e)return S.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return S.promise;if("undefined"!=typeof Map&&e instanceof Map)return S.map;if("undefined"!=typeof Set&&e instanceof Set)return S.set;if("undefined"!=typeof Date&&e instanceof Date)return S.date;return S.object;default:return S.unknown}},P=y.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"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},s=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(s);else if("invalid_return_type"===i.code)s(i.returnTypeError);else if("invalid_arguments"===i.code)s(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,s=0;for(;s<i.path.length;){let r=i.path[s];s===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],s++}}};return s(this),r}static assert(e){if(!(e instanceof I))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,y.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t=Object.create(null),r=[];for(let s of this.issues)if(s.path.length>0){let r=s.path[0];t[r]=t[r]||[],t[r].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=e=>new I(e);let O=(e,t)=>{let r;switch(e.code){case P.invalid_type:r=e.received===S.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case P.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,y.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:r=`Unrecognized key(s) in object: ${y.joinValues(e.keys,", ")}`;break;case P.invalid_union:r="Invalid input";break;case P.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${y.joinValues(e.options)}`;break;case P.invalid_enum_value:r=`Invalid enum value. Expected ${y.joinValues(e.options)}, received '${e.received}'`;break;case P.invalid_arguments:r="Invalid function arguments";break;case P.invalid_return_type:r="Invalid function return type";break;case P.invalid_date:r="Invalid date";break;case P.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(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}"`:y.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case P.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case P.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case P.custom:r="Invalid input";break;case P.invalid_intersection_types:r="Intersection results could not be merged";break;case P.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case P.not_finite:r="Number must be finite";break;default:r=t.defaultError,y.assertNever(e)}return{message:r}},j=e=>{let{data:t,path:r,errorMaps:s,issueData:i}=e,a=[...r,...i.path||[]],n={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";for(let e of s.filter(e=>!!e).slice().reverse())o=e(n,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function R(e,t){let r=j({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,O,void 0].filter(e=>!!e)});e.common.issues.push(r)}class N{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let s of t){if("aborted"===s.status)return C;"dirty"===s.status&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,s=await e.value;r.push({key:t,value:s})}return N.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let s of t){let{key:t,value:i}=s;if("aborted"===t.status||"aborted"===i.status)return C;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||s.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let C=Object.freeze({status:"aborted"}),A=e=>({status:"dirty",value:e}),z=e=>({status:"valid",value:e}),M=e=>"undefined"!=typeof Promise&&e instanceof Promise;(l=v||(v={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},l.toString=e=>"string"==typeof e?e:e?.message;class D{constructor(e,t,r,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=s}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}}let L=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new I(e.common.issues);return this._error=t,this._error}}};function q(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:s,description:i}=e;if(t&&(r||s))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return"invalid_enum_value"===t.code?{message:a??i.defaultError}:void 0===i.data?{message:a??s??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:a??r??i.defaultError}},description:i}}class U{get description(){return this._def.description}_getType(e){return T(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new N,ctx:{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(M(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},s=this._parseSync({data:e,path:r.path,parent:r});return L(r,s)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return"valid"===r.status?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},s=this._parse({data:e,path:r.path,parent:r});return L(r,await (M(s)?s:Promise.resolve(s)))}refine(e,t){return this._refinement((r,s)=>{let i=e(r),a=()=>s.addIssue({code:P.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,s)=>!!e(r)||(s.addIssue("function"==typeof t?t(r,s):t),!1))}_refinement(e){return new eC({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eA.create(this,this._def)}nullable(){return ez.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eg.create(this)}promise(){return eN.create(this,this._def)}or(e){return e_.create([this,e],this._def)}and(e){return e$.create(this,e,this._def)}transform(e){return new eC({...q(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eM({...q(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:_.ZodDefault})}brand(){return new eq({typeName:_.ZodBranded,type:this,...q(this._def)})}catch(e){return new eD({...q(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:_.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eU.create(this,e)}readonly(){return eZ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let Z=/^c[^\s-]{8,}$/i,V=/^[0-9a-z]+$/,F=/^[0-9A-HJKMNP-TV-Z]{26}$/i,K=/^[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,H=/^[a-z0-9_-]{21}$/i,G=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,B=/^[-+]?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)?)??$/,W=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,J=/^(?:(?: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])$/,X=/^(?:(?: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])$/,Y=/^(([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]))$/,Q=/^(([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])$/,ee=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,et=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,er="((\\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])))",es=RegExp(`^${er}$`);function ei(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}class ea extends U{_parse(t){var r,s,i,a;let n;if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==S.string){let e=this._getOrReturnCtx(t);return R(e,{code:P.invalid_type,expected:S.string,received:e.parsedType}),C}let o=new N;for(let l of this._def.checks)if("min"===l.kind)t.data.length<l.value&&(R(n=this._getOrReturnCtx(t,n),{code:P.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("max"===l.kind)t.data.length>l.value&&(R(n=this._getOrReturnCtx(t,n),{code:P.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("length"===l.kind){let e=t.data.length>l.value,r=t.data.length<l.value;(e||r)&&(n=this._getOrReturnCtx(t,n),e?R(n,{code:P.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):r&&R(n,{code:P.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if("email"===l.kind)W.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"email",code:P.invalid_string,message:l.message}),o.dirty());else if("emoji"===l.kind)e||(e=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),e.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"emoji",code:P.invalid_string,message:l.message}),o.dirty());else if("uuid"===l.kind)K.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"uuid",code:P.invalid_string,message:l.message}),o.dirty());else if("nanoid"===l.kind)H.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"nanoid",code:P.invalid_string,message:l.message}),o.dirty());else if("cuid"===l.kind)Z.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"cuid",code:P.invalid_string,message:l.message}),o.dirty());else if("cuid2"===l.kind)V.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"cuid2",code:P.invalid_string,message:l.message}),o.dirty());else if("ulid"===l.kind)F.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"ulid",code:P.invalid_string,message:l.message}),o.dirty());else if("url"===l.kind)try{new URL(t.data)}catch{R(n=this._getOrReturnCtx(t,n),{validation:"url",code:P.invalid_string,message:l.message}),o.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"regex",code:P.invalid_string,message:l.message}),o.dirty())):"trim"===l.kind?t.data=t.data.trim():"includes"===l.kind?t.data.includes(l.value,l.position)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):"toLowerCase"===l.kind?t.data=t.data.toLowerCase():"toUpperCase"===l.kind?t.data=t.data.toUpperCase():"startsWith"===l.kind?t.data.startsWith(l.value)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):"endsWith"===l.kind?t.data.endsWith(l.value)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):"datetime"===l.kind?(function(e){let t=`${er}T${ei(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)})(l).test(t.data)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:"datetime",message:l.message}),o.dirty()):"date"===l.kind?es.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:"date",message:l.message}),o.dirty()):"time"===l.kind?RegExp(`^${ei(l)}$`).test(t.data)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:"time",message:l.message}),o.dirty()):"duration"===l.kind?B.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"duration",code:P.invalid_string,message:l.message}),o.dirty()):"ip"===l.kind?(r=t.data,!(("v4"===(s=l.version)||!s)&&J.test(r)||("v6"===s||!s)&&Y.test(r))&&1&&(R(n=this._getOrReturnCtx(t,n),{validation:"ip",code:P.invalid_string,message:l.message}),o.dirty())):"jwt"===l.kind?!function(e,t){if(!G.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(s));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(t.data,l.alg)&&(R(n=this._getOrReturnCtx(t,n),{validation:"jwt",code:P.invalid_string,message:l.message}),o.dirty()):"cidr"===l.kind?(i=t.data,!(("v4"===(a=l.version)||!a)&&X.test(i)||("v6"===a||!a)&&Q.test(i))&&1&&(R(n=this._getOrReturnCtx(t,n),{validation:"cidr",code:P.invalid_string,message:l.message}),o.dirty())):"base64"===l.kind?ee.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"base64",code:P.invalid_string,message:l.message}),o.dirty()):"base64url"===l.kind?et.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"base64url",code:P.invalid_string,message:l.message}),o.dirty()):y.assertNever(l);return{status:o.value,value:t.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:P.invalid_string,...v.errToObj(r)})}_addCheck(e){return new ea({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...v.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...v.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...v.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...v.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...v.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...v.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...v.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...v.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...v.errToObj(t)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new ea({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ea({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ea({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ea.create=e=>new ea({checks:[],typeName:_.ZodString,coerce:e?.coerce??!1,...q(e)});class en extends U{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==S.number){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.number,received:t.parsedType}),C}let r=new N;for(let s of this._def.checks)"int"===s.kind?y.isInteger(e.data)||(R(t=this._getOrReturnCtx(e,t),{code:P.invalid_type,expected:"integer",received:"float",message:s.message}),r.dirty()):"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):"multipleOf"===s.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,i=r>s?r:s;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(R(t=this._getOrReturnCtx(e,t),{code:P.not_finite,message:s.message}),r.dirty()):y.assertNever(s);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,r,s){return new en({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:v.toString(s)}]})}_addCheck(e){return new en({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&y.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}en.create=e=>new en({checks:[],typeName:_.ZodNumber,coerce:e?.coerce||!1,...q(e)});class eo extends U{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==S.bigint)return this._getInvalidInput(e);let r=new N;for(let s of this._def.checks)"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(R(t=this._getOrReturnCtx(e,t),{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):y.assertNever(s);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.bigint,received:t.parsedType}),C}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,r,s){return new eo({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:v.toString(s)}]})}_addCheck(e){return new eo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}eo.create=e=>new eo({checks:[],typeName:_.ZodBigInt,coerce:e?.coerce??!1,...q(e)});class el extends U{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==S.boolean){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.boolean,received:t.parsedType}),C}return z(e.data)}}el.create=e=>new el({typeName:_.ZodBoolean,coerce:e?.coerce||!1,...q(e)});class eu extends U{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==S.date){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.date,received:t.parsedType}),C}if(Number.isNaN(e.data.getTime()))return R(this._getOrReturnCtx(e),{code:P.invalid_date}),C;let r=new N;for(let s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):y.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new eu({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:v.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}eu.create=e=>new eu({checks:[],coerce:e?.coerce||!1,typeName:_.ZodDate,...q(e)});class ec extends U{_parse(e){if(this._getType(e)!==S.symbol){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.symbol,received:t.parsedType}),C}return z(e.data)}}ec.create=e=>new ec({typeName:_.ZodSymbol,...q(e)});class ed extends U{_parse(e){if(this._getType(e)!==S.undefined){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.undefined,received:t.parsedType}),C}return z(e.data)}}ed.create=e=>new ed({typeName:_.ZodUndefined,...q(e)});class ep extends U{_parse(e){if(this._getType(e)!==S.null){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.null,received:t.parsedType}),C}return z(e.data)}}ep.create=e=>new ep({typeName:_.ZodNull,...q(e)});class ef extends U{constructor(){super(...arguments),this._any=!0}_parse(e){return z(e.data)}}ef.create=e=>new ef({typeName:_.ZodAny,...q(e)});class eh extends U{constructor(){super(...arguments),this._unknown=!0}_parse(e){return z(e.data)}}eh.create=e=>new eh({typeName:_.ZodUnknown,...q(e)});class em extends U{_parse(e){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.never,received:t.parsedType}),C}}em.create=e=>new em({typeName:_.ZodNever,...q(e)});class ey extends U{_parse(e){if(this._getType(e)!==S.undefined){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.void,received:t.parsedType}),C}return z(e.data)}}ey.create=e=>new ey({typeName:_.ZodVoid,...q(e)});class eg extends U{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),s=this._def;if(t.parsedType!==S.array)return R(t,{code:P.invalid_type,expected:S.array,received:t.parsedType}),C;if(null!==s.exactLength){let e=t.data.length>s.exactLength.value,i=t.data.length<s.exactLength.value;(e||i)&&(R(t,{code:e?P.too_big:P.too_small,minimum:i?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(R(t,{code:P.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(R(t,{code:P.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>s.type._parseAsync(new D(t,e,t.path,r)))).then(e=>N.mergeArray(r,e));let i=[...t.data].map((e,r)=>s.type._parseSync(new D(t,e,t.path,r)));return N.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new eg({...this._def,minLength:{value:e,message:v.toString(t)}})}max(e,t){return new eg({...this._def,maxLength:{value:e,message:v.toString(t)}})}length(e,t){return new eg({...this._def,exactLength:{value:e,message:v.toString(t)}})}nonempty(e){return this.min(1,e)}}eg.create=(e,t)=>new eg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...q(t)});class ev extends U{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=y.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==S.object){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.object,received:t.parsedType}),C}let{status:t,ctx:r}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof em&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||a.push(e);let n=[];for(let e of i){let t=s[e],i=r.data[e];n.push({key:{status:"valid",value:e},value:t._parse(new D(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof em){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)n.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(R(r,{code:P.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let s=r.data[t];n.push({key:{status:"valid",value:t},value:e._parse(new D(r,s,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of n){let r=await t.key,s=await t.value;e.push({key:r,value:s,alwaysSet:t.alwaysSet})}return e}).then(e=>N.mergeObjectSync(t,e)):N.mergeObjectSync(t,n)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new ev({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let s=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:v.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ev({...this._def,unknownKeys:"strip"})}passthrough(){return new ev({...this._def,unknownKeys:"passthrough"})}extend(e){return new ev({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ev({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ev({...this._def,catchall:e})}pick(e){let t={};for(let r of y.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new ev({...this._def,shape:()=>t})}omit(e){let t={};for(let r of y.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new ev({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ev){let r={};for(let s in t.shape){let i=t.shape[s];r[s]=eA.create(e(i))}return new ev({...t._def,shape:()=>r})}if(t instanceof eg)return new eg({...t._def,type:e(t.element)});if(t instanceof eA)return eA.create(e(t.unwrap()));if(t instanceof ez)return ez.create(e(t.unwrap()));if(t instanceof eE)return eE.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of y.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?t[r]=s:t[r]=s.optional()}return new ev({...this._def,shape:()=>t})}required(e){let t={};for(let r of y.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eA;)e=e._def.innerType;t[r]=e}return new ev({...this._def,shape:()=>t})}keyof(){return eO(y.objectKeys(this.shape))}}ev.create=(e,t)=>new ev({shape:()=>e,unknownKeys:"strip",catchall:em.create(),typeName:_.ZodObject,...q(t)}),ev.strictCreate=(e,t)=>new ev({shape:()=>e,unknownKeys:"strict",catchall:em.create(),typeName:_.ZodObject,...q(t)}),ev.lazycreate=(e,t)=>new ev({shape:e,unknownKeys:"strip",catchall:em.create(),typeName:_.ZodObject,...q(t)});class e_ extends U{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new I(e.ctx.common.issues));return R(t,{code:P.invalid_union,unionErrors:r}),C});{let e,s=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:r}),r.common.issues.length&&s.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=s.map(e=>new I(e));return R(t,{code:P.invalid_union,unionErrors:i}),C}}get options(){return this._def.options}}e_.create=(e,t)=>new e_({options:e,typeName:_.ZodUnion,...q(t)});let eb=e=>{if(e instanceof eP)return eb(e.schema);if(e instanceof eC)return eb(e.innerType());if(e instanceof eI)return[e.value];if(e instanceof ej)return e.options;if(e instanceof eR)return y.objectValues(e.enum);else if(e instanceof eM)return eb(e._def.innerType);else if(e instanceof ed)return[void 0];else if(e instanceof ep)return[null];else if(e instanceof eA)return[void 0,...eb(e.unwrap())];else if(e instanceof ez)return[null,...eb(e.unwrap())];else if(e instanceof eq)return eb(e.unwrap());else if(e instanceof eZ)return eb(e.unwrap());else if(e instanceof eD)return eb(e._def.innerType);else return[]};class ew extends U{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.object)return R(t,{code:P.invalid_type,expected:S.object,received:t.parsedType}),C;let r=this.discriminator,s=t.data[r],i=this.optionsMap.get(s);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(R(t,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),C)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let s=new Map;for(let r of t){let t=eb(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(s.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);s.set(i,r)}}return new ew({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...q(r)})}}class e$ extends U{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),s=(e,s)=>{if("aborted"===e.status||"aborted"===s.status)return C;let i=function e(t,r){let s=T(t),i=T(r);if(t===r)return{valid:!0,data:t};if(s===S.object&&i===S.object){let s=y.objectKeys(r),i=y.objectKeys(t).filter(e=>-1!==s.indexOf(e)),a={...t,...r};for(let s of i){let i=e(t[s],r[s]);if(!i.valid)return{valid:!1};a[s]=i.data}return{valid:!0,data:a}}if(s===S.array&&i===S.array){if(t.length!==r.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1};s.push(a.data)}return{valid:!0,data:s}}if(s===S.date&&i===S.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,s.value);return i.valid?(("dirty"===e.status||"dirty"===s.status)&&t.dirty(),{status:t.value,value:i.data}):(R(r,{code:P.invalid_intersection_types}),C)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>s(e,t)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}e$.create=(e,t,r)=>new e$({left:e,right:t,typeName:_.ZodIntersection,...q(r)});class eE extends U{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.array)return R(r,{code:P.invalid_type,expected:S.array,received:r.parsedType}),C;if(r.data.length<this._def.items.length)return R(r,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),C;!this._def.rest&&r.data.length>this._def.items.length&&(R(r,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...r.data].map((e,t)=>{let s=this._def.items[t]||this._def.rest;return s?s._parse(new D(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(s).then(e=>N.mergeArray(t,e)):N.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new eE({...this._def,rest:e})}}eE.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eE({items:e,typeName:_.ZodTuple,rest:null,...q(t)})};class ek extends U{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.object)return R(r,{code:P.invalid_type,expected:S.object,received:r.parsedType}),C;let s=[],i=this._def.keyType,a=this._def.valueType;for(let e in r.data)s.push({key:i._parse(new D(r,e,r.path,e)),value:a._parse(new D(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?N.mergeObjectAsync(t,s):N.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,r){return new ek(t instanceof U?{keyType:e,valueType:t,typeName:_.ZodRecord,...q(r)}:{keyType:ea.create(),valueType:e,typeName:_.ZodRecord,...q(t)})}}class ex extends U{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.map)return R(r,{code:P.invalid_type,expected:S.map,received:r.parsedType}),C;let s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:s._parse(new D(r,e,r.path,[a,"key"])),value:i._parse(new D(r,t,r.path,[a,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let s=await r.key,i=await r.value;if("aborted"===s.status||"aborted"===i.status)return C;("dirty"===s.status||"dirty"===i.status)&&t.dirty(),e.set(s.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let s=r.key,i=r.value;if("aborted"===s.status||"aborted"===i.status)return C;("dirty"===s.status||"dirty"===i.status)&&t.dirty(),e.set(s.value,i.value)}return{status:t.value,value:e}}}}ex.create=(e,t,r)=>new ex({valueType:t,keyType:e,typeName:_.ZodMap,...q(r)});class eS extends U{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.set)return R(r,{code:P.invalid_type,expected:S.set,received:r.parsedType}),C;let s=this._def;null!==s.minSize&&r.data.size<s.minSize.value&&(R(r,{code:P.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&r.data.size>s.maxSize.value&&(R(r,{code:P.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let r=new Set;for(let s of e){if("aborted"===s.status)return C;"dirty"===s.status&&t.dirty(),r.add(s.value)}return{status:t.value,value:r}}let n=[...r.data.values()].map((e,t)=>i._parse(new D(r,e,r.path,t)));return r.common.async?Promise.all(n).then(e=>a(e)):a(n)}min(e,t){return new eS({...this._def,minSize:{value:e,message:v.toString(t)}})}max(e,t){return new eS({...this._def,maxSize:{value:e,message:v.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eS.create=(e,t)=>new eS({valueType:e,minSize:null,maxSize:null,typeName:_.ZodSet,...q(t)});class eT extends U{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.function)return R(t,{code:P.invalid_type,expected:S.function,received:t.parsedType}),C;function r(e,r){return j({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,O,O].filter(e=>!!e),issueData:{code:P.invalid_arguments,argumentsError:r}})}function s(e,r){return j({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,O,O].filter(e=>!!e),issueData:{code:P.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof eN){let e=this;return z(async function(...t){let n=new I([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw n.addIssue(r(t,e)),n}),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw n.addIssue(s(l,e)),n})})}{let e=this;return z(function(...t){let n=e._def.args.safeParse(t,i);if(!n.success)throw new I([r(t,n.error)]);let o=Reflect.apply(a,this,n.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new I([s(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eT({...this._def,args:eE.create(e).rest(eh.create())})}returns(e){return new eT({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eT({args:e||eE.create([]).rest(eh.create()),returns:t||eh.create(),typeName:_.ZodFunction,...q(r)})}}class eP extends U{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eP.create=(e,t)=>new eP({getter:e,typeName:_.ZodLazy,...q(t)});class eI extends U{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return R(t,{received:t.data,code:P.invalid_literal,expected:this._def.value}),C}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eO(e,t){return new ej({values:e,typeName:_.ZodEnum,...q(t)})}eI.create=(e,t)=>new eI({value:e,typeName:_.ZodLiteral,...q(t)});class ej extends U{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return R(t,{expected:y.joinValues(r),received:t.parsedType,code:P.invalid_type}),C}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return R(t,{received:t.data,code:P.invalid_enum_value,options:r}),C}return z(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ej.create(e,{...this._def,...t})}exclude(e,t=this._def){return ej.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ej.create=eO;class eR extends U{_parse(e){let t=y.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==S.string&&r.parsedType!==S.number){let e=y.objectValues(t);return R(r,{expected:y.joinValues(e),received:r.parsedType,code:P.invalid_type}),C}if(this._cache||(this._cache=new Set(y.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=y.objectValues(t);return R(r,{received:r.data,code:P.invalid_enum_value,options:e}),C}return z(e.data)}get enum(){return this._def.values}}eR.create=(e,t)=>new eR({values:e,typeName:_.ZodNativeEnum,...q(t)});class eN extends U{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==S.promise&&!1===t.common.async?(R(t,{code:P.invalid_type,expected:S.promise,received:t.parsedType}),C):z((t.parsedType===S.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eN.create=(e,t)=>new eN({type:e,typeName:_.ZodPromise,...q(t)});class eC extends U{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:e=>{R(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===s.type){let e=s.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return C;let s=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===s.status?C:"dirty"===s.status||"dirty"===t.value?A(s.value):s});{if("aborted"===t.value)return C;let s=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===s.status?C:"dirty"===s.status||"dirty"===t.value?A(s.value):s}}if("refinement"===s.type){let e=e=>{let t=s.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?C:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===s.status?C:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}}if("transform"===s.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>"valid"!==e.status?C:Promise.resolve(s.transform(e.value,i)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if("valid"!==e.status)return C;let a=s.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}y.assertNever(s)}}eC.create=(e,t,r)=>new eC({schema:e,typeName:_.ZodEffects,effect:t,...q(r)}),eC.createWithPreprocess=(e,t,r)=>new eC({schema:t,effect:{type:"preprocess",transform:e},typeName:_.ZodEffects,...q(r)});class eA extends U{_parse(e){return this._getType(e)===S.undefined?z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eA.create=(e,t)=>new eA({innerType:e,typeName:_.ZodOptional,...q(t)});class ez extends U{_parse(e){return this._getType(e)===S.null?z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ez.create=(e,t)=>new ez({innerType:e,typeName:_.ZodNullable,...q(t)});class eM extends U{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===S.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eM.create=(e,t)=>new eM({innerType:e,typeName:_.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...q(t)});class eD extends U{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return M(s)?s.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eD.create=(e,t)=>new eD({innerType:e,typeName:_.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...q(t)});class eL extends U{_parse(e){if(this._getType(e)!==S.nan){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.nan,received:t.parsedType}),C}return{status:"valid",value:e.data}}}eL.create=e=>new eL({typeName:_.ZodNaN,...q(e)}),Symbol("zod_brand");class eq extends U{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eU extends U{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?C:"dirty"===e.status?(t.dirty(),A(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?C:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eU({in:e,out:t,typeName:_.ZodPipeline})}}class eZ extends U{_parse(e){let t=this._def.innerType._parse(e),r=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return M(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}eZ.create=(e,t)=>new eZ({innerType:e,typeName:_.ZodReadonly,...q(t)}),ev.lazycreate,(u=_||(_={})).ZodString="ZodString",u.ZodNumber="ZodNumber",u.ZodNaN="ZodNaN",u.ZodBigInt="ZodBigInt",u.ZodBoolean="ZodBoolean",u.ZodDate="ZodDate",u.ZodSymbol="ZodSymbol",u.ZodUndefined="ZodUndefined",u.ZodNull="ZodNull",u.ZodAny="ZodAny",u.ZodUnknown="ZodUnknown",u.ZodNever="ZodNever",u.ZodVoid="ZodVoid",u.ZodArray="ZodArray",u.ZodObject="ZodObject",u.ZodUnion="ZodUnion",u.ZodDiscriminatedUnion="ZodDiscriminatedUnion",u.ZodIntersection="ZodIntersection",u.ZodTuple="ZodTuple",u.ZodRecord="ZodRecord",u.ZodMap="ZodMap",u.ZodSet="ZodSet",u.ZodFunction="ZodFunction",u.ZodLazy="ZodLazy",u.ZodLiteral="ZodLiteral",u.ZodEnum="ZodEnum",u.ZodEffects="ZodEffects",u.ZodNativeEnum="ZodNativeEnum",u.ZodOptional="ZodOptional",u.ZodNullable="ZodNullable",u.ZodDefault="ZodDefault",u.ZodCatch="ZodCatch",u.ZodPromise="ZodPromise",u.ZodBranded="ZodBranded",u.ZodPipeline="ZodPipeline",u.ZodReadonly="ZodReadonly";let eV=ea.create;en.create,eL.create,eo.create;let eF=el.create;eu.create,ec.create,ed.create,ep.create,ef.create,eh.create,em.create,ey.create,eg.create;let eK=ev.create;ev.strictCreate,e_.create,ew.create,e$.create,eE.create,ek.create,ex.create,eS.create;let eH=eT.create;eP.create,eI.create,ej.create,eR.create;let eG=eN.create;eC.create,eA.create,ez.create,eC.createWithPreprocess,eU.create;let eB=eK({apiKey:eV().optional(),headerName:eV().optional(),validateApiKey:eH().args(eV()).returns(eG(eF())).optional()}).strict().refine(e=>void 0!==e.apiKey||void 0!==e.validateApiKey,{message:"Either 'apiKey' or 'validateApiKey' must be provided"}).refine(e=>void 0===e.apiKey||void 0===e.validateApiKey,{message:"'apiKey' and 'validateApiKey' are mutually exclusive - provide only one"}),eW="Unauthorized: Missing or invalid API key";function eJ(e){let t=eB.safeParse(e);if(!t.success){let r="apiKey"in e,s="validateApiKey"in e;if(r&&s)throw Error("'apiKey' and 'validateApiKey' are mutually exclusive - provide only one");if(r||s)throw Error(`Invalid configuration: ${t.error.message}`);throw Error("Either 'apiKey' or 'validateApiKey' must be provided")}let r=e.headerName??"x-api-key",s="apiKey"in e?e.apiKey:void 0,i="validateApiKey"in e?e.validateApiKey:void 0;return async(t,a,n)=>{let o=t.header(r);!o||"apiKey"in e&&o!==s||i&&!await i(o)?a.status(401).json({error:eW}):n()}}var eX=i(8400),eY=i.n(eX);function eQ(e){return(t,r,s)=>{let i=t.header("Authorization");if(!i||!i.startsWith("Bearer "))return void r.status(401).json({error:"Unauthorized: Missing or malformed Authorization header"});let a=i.slice(7).trim();if(!a)return void r.status(401).json({error:"Unauthorized: Missing access token"});try{let{secret:r,...i}=e;t.user=eY().verify(a,r,i),s()}catch(e){r.status(401).json({error:"Unauthorized: Invalid or expired token"})}}}let e0=require("async_hooks"),e1=(e,t)=>{globalThis[e]=t},e2=e=>globalThis[e];function e9({name:e}){let t=Symbol.for(`xmcp-context-${e}`),r=Symbol.for(`xmcp-context-${e}-fallback-store`);if(e2(t))return e2(t);let s=new e0.AsyncLocalStorage,i=globalThis[r]??{current:null};e1(r,i);let a={provider:(e,t)=>(i.current=e,s.run(e,t)),getContext:()=>{let t=s.getStore();if(t)return t;if(i.current)return i.current;throw Error(`getContext() can only be used within the ${e} context.`)},setContext:t=>{let r=s.getStore()??i.current;if(!r)throw Error(`setContext() can only be used within the ${e} context.`);Object.assign(r,t)}};return e1(t,a),a}let e4=Symbol.for("mcp.completable");function e6(e,t){return Object.defineProperty(e,e4,{value:{complete:t},enumerable:!1,writable:!1,configurable:!1}),e}(b||(b={})).Completable="McpCompletable";let e5=Object.freeze({status:"aborted"});function e8(e,t,r){function s(r,s){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:s,constr:n,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,s);let i=n.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in r||(r[t]=i[t].bind(r))}}let i=r?.Parent??Object;class a extends i{}function n(e){var t;let i=r?.Parent?new a:this;for(let r of(s(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))r();return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(n,"init",{value:s}),Object.defineProperty(n,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(n,"name",{value:e}),n}Symbol("zod_brand");class e3 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e7 extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}let te={};function tt(e){return e&&Object.assign(te,e),te}function tr(e,t="|"){return e.map(e=>tb(e)).join(t)}function ts(e,t){return"bigint"==typeof t?t.toString():t}function ti(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ta(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let tn=Symbol("evaluating");function to(e,t,r){let s;Object.defineProperty(e,t,{get(){if(s!==tn)return void 0===s&&(s=tn,s=r()),s},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function tl(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function tu(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function tc(e){return JSON.stringify(e)}let td="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function tp(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let tf=ti(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function th(e){if(!1===tp(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==tp(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function tm(e){return th(e)?{...e}:Array.isArray(e)?[...e]:e}let ty=new Set(["string","number","symbol"]);function tg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tv(e,t,r){let s=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(s._zod.parent=e),s}function t_(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function tb(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let tw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function t$(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function tE(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function tk(e){return"string"==typeof e?e:e?.message}function tx(e,t,r){let s={...e,path:e.path??[]};return e.message||(s.message=tk(e.inst?._zod.def?.error?.(e))??tk(t?.error?.(e))??tk(r.customError?.(e))??tk(r.localeError?.(e))??"Invalid input"),delete s.inst,delete s.continue,t?.reportInput||delete s.input,s}function tS(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function tT(...e){let[t,r,s]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:s}:{...t}}let tP=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ts,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tI=e8("$ZodError",tP),tO=e8("$ZodError",tP,{Parent:Error}),tj=e=>(t,r,s,i)=>{let a=s?Object.assign(s,{async:!1}):{async:!1},n=t._zod.run({value:r,issues:[]},a);if(n instanceof Promise)throw new e3;if(n.issues.length){let t=new(i?.Err??e)(n.issues.map(e=>tx(e,a,tt())));throw td(t,i?.callee),t}return n.value},tR=e=>async(t,r,s,i)=>{let a=s?Object.assign(s,{async:!0}):{async:!0},n=t._zod.run({value:r,issues:[]},a);if(n instanceof Promise&&(n=await n),n.issues.length){let t=new(i?.Err??e)(n.issues.map(e=>tx(e,a,tt())));throw td(t,i?.callee),t}return n.value},tN=e=>(t,r,s)=>{let i=s?{...s,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new e3;return a.issues.length?{success:!1,error:new(e??tI)(a.issues.map(e=>tx(e,i,tt())))}:{success:!0,data:a.value}},tC=tN(tO),tA=e=>async(t,r,s)=>{let i=s?Object.assign(s,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>tx(e,i,tt())))}:{success:!0,data:a.value}},tz=tA(tO),tM=/^[cC][^\s-]{8,}$/,tD=/^[0-9a-z]+$/,tL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,tq=/^[0-9a-vA-V]{20}$/,tU=/^[A-Za-z0-9]{27}$/,tZ=/^[a-zA-Z0-9_-]{21}$/,tV=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tF=/^([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})$/,tK=e=>e?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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,tH=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tG=/^(?:(?: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])$/,tB=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tW=/^((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])$/,tJ=/^(([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])$/,tX=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tY=/^[A-Za-z0-9_-]*$/,tQ=/^\+(?:[0-9]){6,14}[0-9]$/,t0="(?:(?:\\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])))",t1=RegExp(`^${t0}$`);function t2(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let t9=/^-?\d+n?$/,t4=/^-?\d+$/,t6=/^-?\d+(?:\.\d+)?/,t5=/^(?:true|false)$/i,t8=/^null$/i,t3=/^[^A-Z]*$/,t7=/^[^a-z]*$/,re=e8("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rt={number:"number",bigint:"bigint",object:"date"},rr=e8("$ZodCheckLessThan",(e,t)=>{re.init(e,t);let r=rt[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:r,code:"too_big",maximum:t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rs=e8("$ZodCheckGreaterThan",(e,t)=>{re.init(e,t);let r=rt[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:r,code:"too_small",minimum:t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ri=e8("$ZodCheckMultipleOf",(e,t)=>{re.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0===function(e,t){let r=(e.toString().split(".")[1]||"").length,s=t.toString(),i=(s.split(".")[1]||"").length;if(0===i&&/\d?e-\d?/.test(s)){let e=s.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=r>i?r:i;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/10**a}(r.value,t.value))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ra=e8("$ZodCheckNumberFormat",(e,t)=>{re.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),s=r?"int":"number",[i,a]=tw[t.format];e._zod.onattach.push(e=>{let s=e._zod.bag;s.format=t.format,s.minimum=i,s.maximum=a,r&&(s.pattern=t4)}),e._zod.check=n=>{let o=n.value;if(r){if(!Number.isInteger(o))return void n.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});if(!Number.isSafeInteger(o))return void(o>0?n.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,continue:!t.abort}):n.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,continue:!t.abort}))}o<i&&n.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>a&&n.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inst:e})}}),rn=e8("$ZodCheckMaxLength",(e,t)=>{var r;re.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let s=r.value;if(s.length<=t.maximum)return;let i=tS(s);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ro=e8("$ZodCheckMinLength",(e,t)=>{var r;re.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let s=r.value;if(s.length>=t.minimum)return;let i=tS(s);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),rl=e8("$ZodCheckLengthEquals",(e,t)=>{var r;re.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let s=r.value,i=s.length;if(i===t.length)return;let a=tS(s),n=i>t.length;r.issues.push({origin:a,...n?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ru=e8("$ZodCheckStringFormat",(e,t)=>{var r,s;re.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),rc=e8("$ZodCheckRegex",(e,t)=>{ru.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})}}),rd=e8("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=t3),ru.init(e,t)}),rp=e8("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=t7),ru.init(e,t)}),rf=e8("$ZodCheckIncludes",(e,t)=>{re.init(e,t);let r=tg(t.includes),s=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=s,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(s)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),rh=e8("$ZodCheckStartsWith",(e,t)=>{re.init(e,t);let r=RegExp(`^${tg(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),rm=e8("$ZodCheckEndsWith",(e,t)=>{re.init(e,t);let r=RegExp(`.*${tg(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),ry=e8("$ZodCheckOverwrite",(e,t)=>{re.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class rg{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}let rv={major:4,minor:1,patch:13},r_=e8("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rv;let s=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&s.unshift(e),s))for(let r of t._zod.onattach)r(e);if(0===s.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let s,i=t$(e);for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,n=a._zod.check(e);if(n instanceof Promise&&r?.async===!1)throw new e3;if(s||n instanceof Promise)s=(s??Promise.resolve()).then(async()=>{await n,e.issues.length!==t&&(i||(i=t$(e,t)))});else{if(e.issues.length===t)continue;i||(i=t$(e,t))}}return s?s.then(()=>e):e},r=(r,i,a)=>{if(t$(r))return r.aborted=!0,r;let n=t(i,s,a);if(n instanceof Promise){if(!1===a.async)throw new e3;return n.then(t=>e._zod.parse(t,a))}return e._zod.parse(n,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if("backward"===a.direction){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,i,a)):r(t,i,a)}let n=e._zod.parse(i,a);if(n instanceof Promise){if(!1===a.async)throw new e3;return n.then(e=>t(e,s,a))}return t(n,s,a)}}e["~standard"]={validate:t=>{try{let r=tC(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return tz(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),rb=e8("$ZodString",(e,t)=>{var r;let s;r_.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(s=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${s}$`)),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rw=e8("$ZodStringFormat",(e,t)=>{ru.init(e,t),rb.init(e,t)}),r$=e8("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=tF),rw.init(e,t)}),rE=e8("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tK(e))}else t.pattern??(t.pattern=tK());rw.init(e,t)}),rk=e8("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=tH),rw.init(e,t)}),rx=e8("$ZodURL",(e,t)=>{rw.init(e,t),e._zod.check=r=>{try{let s=r.value.trim(),i=new URL(s);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=s;return}catch(s){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),rS=e8("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rw.init(e,t)}),rT=e8("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=tZ),rw.init(e,t)}),rP=e8("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tM),rw.init(e,t)}),rI=e8("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tD),rw.init(e,t)}),rO=e8("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tL),rw.init(e,t)}),rj=e8("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tq),rw.init(e,t)}),rR=e8("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tU),rw.init(e,t)}),rN=e8("$ZodISODateTime",(e,t)=>{let r,s,i;t.pattern??(r=t2({precision:t.precision}),s=["Z"],t.local&&s.push(""),t.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),i=`${r}(?:${s.join("|")})`,t.pattern=RegExp(`^${t0}T(?:${i})$`)),rw.init(e,t)}),rC=e8("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=t1),rw.init(e,t)}),rA=e8("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${t2(t)}$`)),rw.init(e,t)}),rz=e8("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tV),rw.init(e,t)}),rM=e8("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tG),rw.init(e,t),e._zod.bag.format="ipv4"}),rD=e8("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tB),rw.init(e,t),e._zod.bag.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})}}}),rL=e8("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tW),rw.init(e,t)}),rq=e8("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tJ),rw.init(e,t),e._zod.check=r=>{let s=r.value.split("/");try{if(2!==s.length)throw Error();let[e,t]=s;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function rU(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rZ=e8("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=tX),rw.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{rU(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),rV=e8("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tY),rw.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!tY.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rU(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rF=e8("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tQ),rw.init(e,t)}),rK=e8("$ZodJWT",(e,t)=>{rw.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[s]=r;if(!s)return!1;let i=JSON.parse(atob(s));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rH=e8("$ZodNumber",(e,t)=>{r_.init(e,t),e._zod.pattern=e._zod.bag.pattern??t6,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let i=r.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return r;let a="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...a?{received:a}:{}}),r}}),rG=e8("$ZodNumberFormat",(e,t)=>{ra.init(e,t),rH.init(e,t)}),rB=e8("$ZodBoolean",(e,t)=>{r_.init(e,t),e._zod.pattern=t5,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let i=r.value;return"boolean"==typeof i||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),rW=((e,t)=>{r_.init(e,t),e._zod.pattern=t9,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch(e){}return"bigint"==typeof r.value||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}},e8("$ZodNull",(e,t)=>{r_.init(e,t),e._zod.pattern=t8,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let s=t.value;return null===s||t.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),t}})),rJ=e8("$ZodAny",(e,t)=>{r_.init(e,t),e._zod.parse=e=>e}),rX=e8("$ZodUnknown",(e,t)=>{r_.init(e,t),e._zod.parse=e=>e}),rY=e8("$ZodNever",(e,t)=>{r_.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function rQ(e,t,r){e.issues.length&&t.issues.push(...tE(r,e.issues)),t.value[r]=e.value}(e,t)=>{r_.init(e,t),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=new Date(r.value)}catch(e){}let i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:e}),r}};let r0=e8("$ZodArray",(e,t)=>{r_.init(e,t),e._zod.parse=(r,s)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let n=i[e],o=t.element._zod.run({value:n,issues:[]},s);o instanceof Promise?a.push(o.then(t=>rQ(t,r,e))):rQ(o,r,e)}return a.length?Promise.all(a).then(()=>r):r}});function r1(e,t,r,s){e.issues.length&&t.issues.push(...tE(r,e.issues)),void 0===e.value?r in s&&(t.value[r]=void 0):t.value[r]=e.value}function r2(e){var t;let r=Object.keys(e.shape);for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let s=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(s)}}function r9(e,t,r,s,i,a){let n=[],o=i.keySet,l=i.catchall._zod,u=l.def.type;for(let i in t){if(o.has(i))continue;if("never"===u){n.push(i);continue}let a=l.run({value:t[i],issues:[]},s);a instanceof Promise?e.push(a.then(e=>r1(e,r,i,t))):r1(a,r,i,t)}return(n.length&&r.issues.push({code:"unrecognized_keys",keys:n,input:t,inst:a}),e.length)?Promise.all(e).then(()=>r):r}let r4=e8("$ZodObject",(e,t)=>{let r;r_.init(e,t);let s=Object.getOwnPropertyDescriptor(t,"shape");if(!s?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let i=ti(()=>r2(t));to(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let s=e[t]._zod;if(s.values)for(let e of(r[t]??(r[t]=new Set),s.values))r[t].add(e)}return r});let a=t.catchall;e._zod.parse=(t,s)=>{r??(r=i.value);let n=t.value;if(!tp(n))return t.issues.push({expected:"object",code:"invalid_type",input:n,inst:e}),t;t.value={};let o=[],l=r.shape;for(let e of r.keys){let r=l[e]._zod.run({value:n[e],issues:[]},s);r instanceof Promise?o.push(r.then(r=>r1(r,t,e,n))):r1(r,t,e,n)}return a?r9(o,n,t,s,i.value,e):o.length?Promise.all(o).then(()=>t):t}}),r6=e8("$ZodObjectJIT",(e,t)=>{let r,s;r4.init(e,t);let i=e._zod.parse,a=ti(()=>r2(t)),n=!te.jitless,o=n&&tf.value,l=t.catchall;e._zod.parse=(u,c)=>{s??(s=a.value);let d=u.value;return tp(d)?n&&o&&c?.async===!1&&!0!==c.jitless?(r||(r=(e=>{let t=new rg(["shape","payload","ctx"]),r=a.value,s=e=>{let t=tc(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let i=Object.create(null),n=0;for(let e of r.keys)i[e]=`key_${n++}`;for(let e of(t.write("const newResult = {};"),r.keys)){let r=i[e],a=tc(e);t.write(`const ${r} = ${s(e)};`),t.write(`
7
+ deps: ${r}}`};let n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){let[t,r]=function({schema:e}){let t={},r={};for(let s in e)"__proto__"!==s&&((Array.isArray(e[s])?t:r)[s]=e[s]);return[t,r]}(e);o(e,t),l(e,r)}};function o(e,t=e.schema){let{gen:r,data:i,it:n}=e;if(0===Object.keys(t).length)return;let l=r.let("missing");for(let o in t){let u=t[o];if(0===u.length)continue;let c=(0,a.propertyInData)(r,i,o,n.opts.ownProperties);e.setParams({property:o,depsCount:u.length,deps:u.join(", ")}),n.allErrors?r.if(c,()=>{for(let t of u)(0,a.checkReportMissingProp)(e,t)}):(r.if((0,s._)`${c} && (${(0,a.checkMissingProp)(e,u,l)})`),(0,a.reportMissingProp)(e,l),r.else())}}function l(e,t=e.schema){let{gen:r,data:s,keyword:n,it:o}=e,u=r.name("valid");for(let l in t)(0,i.alwaysValidSchema)(o,t[l])||(r.if((0,a.propertyInData)(r,s,l,o.opts.ownProperties),()=>{let t=e.subschema({keyword:n,schemaProp:l},u);e.mergeValidEvaluated(t,u)},()=>r.var(u,!0)),e.ok(u))}t.validatePropertyDeps=o,t.validateSchemaDeps=l,t.default=n},8102(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);function a(e,t){let r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,s.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,s._)`{failingKeyword: ${e.ifClause}}`},code(e){let t,{gen:r,parentSchema:n,it:o}=e;void 0===n.then&&void 0===n.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let l=a(o,"then"),u=a(o,"else");if(!l&&!u)return;let c=r.let("valid",!0),d=r.name("_valid");if(t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d),e.mergeEvaluated(t),e.reset(),l&&u){let t=r.let("ifClause");e.setParams({ifClause:t}),r.if(d,p("then",t),p("else",t))}else l?r.if(d,p("then")):r.if((0,s.not)(d),p("else"));function p(t,i){return()=>{let a=e.subschema({keyword:t},d);r.assign(c,d),e.mergeValidEvaluated(a,c),i?r.assign(i,(0,s._)`${t}`):e.setParams({ifClause:t})}}e.pass(c,()=>e.error(!0))}}},8313(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(714),i=r(1997),a=r(3665),n=r(5153),o=r(2692),l=r(5860),u=r(374),c=r(8401),d=r(3252),p=r(6398),f=r(4948),h=r(1070),m=r(5368),y=r(2003),g=r(8102),v=r(1871);t.default=function(e=!1){let t=[f.default,h.default,m.default,y.default,g.default,v.default,u.default,c.default,l.default,d.default,p.default];return e?t.push(i.default,n.default):t.push(s.default,a.default),t.push(o.default),t}},3665(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;let s=r(8994),i=r(7218),a=r(4954);function n(e,t,r=e.schema){let{gen:a,parentSchema:o,data:l,keyword:u,it:c}=e;(function(e){let{opts:s,errSchemaPath:a}=c,n=r.length,o=n===e.minItems&&(n===e.maxItems||!1===e[t]);if(s.strictTuples&&!o){let e=`"${u}" is ${n}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`;(0,i.checkStrictMode)(c,e,s.strictTuples)}})(o),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(a,r.length,c.items));let d=a.name("valid"),p=a.const("len",(0,s._)`${l}.length`);r.forEach((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(a.if((0,s._)`${p} > ${r}`,()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},d)),e.ok(d))})}t.validateTuple=n,t.default={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return n(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,a.validateArray)(e))}}},5153(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),a=r(4954),n=r(714);t.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,s.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,s._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:r,it:s}=e,{prefixItems:o}=r;s.items=!0,(0,i.alwaysValidSchema)(s,t)||(o?(0,n.validateAdditionalItems)(e,o):e.ok((0,a.validateArray)(e)))}}},4948(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:i}=e;if((0,s.alwaysValidSchema)(i,r))return void e.fail();let a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}},5368(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,s._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:t,schema:r,parentSchema:a,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(n.opts.discriminator&&a.discriminator)return;let o=t.let("valid",!1),l=t.let("passing",null),u=t.name("_valid");e.setParams({passing:l}),t.block(function(){r.forEach((r,a)=>{let c;(0,i.alwaysValidSchema)(n,r)?t.var(u,!0):c=e.subschema({keyword:"oneOf",schemaProp:a,compositeRule:!0},u),a>0&&t.if((0,s._)`${u} && ${o}`).assign(o,!1).assign(l,(0,s._)`[${l}, ${a}]`).else(),t.if(u,()=>{t.assign(o,!0),t.assign(l,a),c&&e.mergeEvaluated(c,s.Name)})})}),e.result(o,()=>e.reset(),()=>e.error(!0))}}},6398(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),a=r(7218),n=r(7218);t.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:l,it:u}=e,{opts:c}=u,d=(0,s.allSchemaProperties)(r),p=d.filter(e=>(0,a.alwaysValidSchema)(u,r[e]));if(0===d.length||p.length===d.length&&(!u.opts.unevaluated||!0===u.props))return;let f=c.strictSchema&&!c.allowMatchingProperties&&l.properties,h=t.name("valid");!0===u.props||u.props instanceof i.Name||(u.props=(0,n.evaluatedPropsToName)(t,u.props));let{props:m}=u;for(let e of d)f&&function(e){for(let t in f)new RegExp(e).test(t)&&(0,a.checkStrictMode)(u,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}(e),u.allErrors?y(e):(t.var(h,!0),y(e),t.if(h));function y(r){t.forIn("key",o,a=>{t.if((0,i._)`${(0,s.usePattern)(e,r)}.test(${a})`,()=>{let s=p.includes(r);s||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:a,dataPropType:n.Type.Str},h),u.opts.unevaluated&&!0!==m?t.assign((0,i._)`${m}[${a}]`,!0):s||u.allErrors||t.if((0,i.not)(h),()=>t.break())})})}}}},1997(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(3665);t.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,s.validateTuple)(e,"items")}},3252(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(6023),i=r(4954),a=r(7218),n=r(8401);t.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:l,it:u}=e;"all"===u.opts.removeAdditional&&void 0===o.additionalProperties&&n.default.code(new s.KeywordCxt(u,n.default,"additionalProperties"));let c=(0,i.allSchemaProperties)(r);for(let e of c)u.definedProperties.add(e);u.opts.unevaluated&&c.length&&!0!==u.props&&(u.props=a.mergeEvaluated.props(t,(0,a.toHash)(c),u.props));let d=c.filter(e=>!(0,a.alwaysValidSchema)(u,r[e]));if(0===d.length)return;let p=t.name("valid");for(let s of d){var f;(f=s,u.opts.useDefaults&&!u.compositeRule&&void 0!==r[f].default)?h(s):(t.if((0,i.propertyInData)(t,l,s,u.opts.ownProperties)),h(s),u.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(s),e.ok(p)}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}}},374(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218);t.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,s._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:t,schema:r,data:a,it:n}=e;if((0,i.alwaysValidSchema)(n,r))return;let o=t.name("valid");t.forIn("key",a,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},o),t.if((0,s.not)(o),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(o)}}},1871(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(7218);t.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,s.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}},4954(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;let s=r(8994),i=r(7218),a=r(6660),n=r(7218);function o(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,s._)`Object.prototype.hasOwnProperty`})}function l(e,t,r){return(0,s._)`${o(e)}.call(${t}, ${r})`}function u(e,t,r,i){let a=(0,s._)`${t}${(0,s.getProperty)(r)} === undefined`;return i?(0,s.or)(a,(0,s.not)(l(e,t,r))):a}function c(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){let{gen:r,data:i,it:a}=e;r.if(u(r,i,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,s._)`${t}`},!0),e.error()})},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,a){return(0,s.or)(...i.map(i=>(0,s.and)(u(e,t,i,r.ownProperties),(0,s._)`${a} = ${i}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=o,t.isOwnProperty=l,t.propertyInData=function(e,t,r,i){let a=(0,s._)`${t}${(0,s.getProperty)(r)} !== undefined`;return i?(0,s._)`${a} && ${l(e,t,r)}`:a},t.noPropertyInData=u,t.allSchemaProperties=c,t.schemaProperties=function(e,t){return c(t).filter(r=>!(0,i.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:n,errorPath:o},it:l},u,c,d){let p=d?(0,s._)`${e}, ${t}, ${i}${n}`:t,f=[[a.default.instancePath,(0,s.strConcat)(a.default.instancePath,o)],[a.default.parentData,l.parentData],[a.default.parentDataProperty,l.parentDataProperty],[a.default.rootData,a.default.rootData]];l.opts.dynamicRef&&f.push([a.default.dynamicAnchors,a.default.dynamicAnchors]);let h=(0,s._)`${p}, ${r.object(...f)}`;return c!==s.nil?(0,s._)`${u}.call(${c}, ${h})`:(0,s._)`${u}(${h})`};let d=(0,s._)`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){let i=t.unicodeRegExp?"u":"",{regExp:a}=t.code,o=a(r,i);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,s._)`${"new RegExp"===a.code?d:(0,n.useFunc)(e,a)}(${r}, ${i})`})},t.validateArray=function(e){let{gen:t,data:r,keyword:a,it:n}=e,o=t.name("valid");if(n.allErrors){let e=t.let("valid",!0);return l(()=>t.assign(e,!1)),e}return t.var(o,!0),l(()=>t.break()),o;function l(n){let l=t.const("len",(0,s._)`${r}.length`);t.forRange("i",0,l,r=>{e.subschema({keyword:a,dataProp:r,dataPropType:i.Type.Num},o),t.if((0,s.not)(o),n)})}},t.validateUnion=function(e){let{gen:t,schema:r,keyword:a,it:n}=e;if(!Array.isArray(r))throw Error("ajv implementation error");if(r.some(e=>(0,i.alwaysValidSchema)(n,e))&&!n.opts.unevaluated)return;let o=t.let("valid",!1),l=t.name("_valid");t.block(()=>r.forEach((r,i)=>{let n=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},l);t.assign(o,(0,s._)`${o} || ${l}`),e.mergeValidEvaluated(n,l)||t.if((0,s.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}},3330(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},8119(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(3330),i=r(930);t.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",s.default,i.default]},930(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;let s=r(4220),i=r(4954),a=r(8994),n=r(6660),o=r(1688),l=r(7218);function u(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,a._)`${r.scopeValue("wrapper",{ref:t})}.validate`}function c(e,t,r,s){let{gen:o,it:u}=e,{allErrors:c,schemaEnv:d,opts:p}=u,f=p.passContext?n.default.this:a.nil;function h(e){let t=(0,a._)`${e}.errors`;o.assign(n.default.vErrors,(0,a._)`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`),o.assign(n.default.errors,(0,a._)`${n.default.vErrors}.length`)}function m(e){var t;if(!u.opts.unevaluated)return;let s=null==(t=null==r?void 0:r.validate)?void 0:t.evaluated;if(!0!==u.props)if(s&&!s.dynamicProps)void 0!==s.props&&(u.props=l.mergeEvaluated.props(o,s.props,u.props));else{let t=o.var("props",(0,a._)`${e}.evaluated.props`);u.props=l.mergeEvaluated.props(o,t,u.props,a.Name)}if(!0!==u.items)if(s&&!s.dynamicItems)void 0!==s.items&&(u.items=l.mergeEvaluated.items(o,s.items,u.items));else{let t=o.var("items",(0,a._)`${e}.evaluated.items`);u.items=l.mergeEvaluated.items(o,t,u.items,a.Name)}}s?function(){if(!d.$async)throw Error("async schema referenced by sync schema");let r=o.let("valid");o.try(()=>{o.code((0,a._)`await ${(0,i.callValidateCode)(e,t,f)}`),m(t),c||o.assign(r,!0)},e=>{o.if((0,a._)`!(${e} instanceof ${u.ValidationError})`,()=>o.throw(e)),h(e),c||o.assign(r,!1)}),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,f),()=>m(t),()=>h(t))}t.getValidate=u,t.callRef=c,t.default={keyword:"$ref",schemaType:"string",code(e){var t,r;let i,n,l,d,{gen:p,schema:f,it:h}=e,{baseId:m,schemaEnv:y,validateName:g,opts:v,self:_}=h,{root:b}=y;if(("#"===f||"#/"===f)&&m===b.baseId){if(y===b)return c(e,g,y,y.$async);let t=p.scopeValue("root",{ref:b});return c(e,(0,a._)`${t}.validate`,b,b.$async)}let w=o.resolveRef.call(_,b,m,f);if(void 0===w)throw new s.default(h.opts.uriResolver,m,f);return w instanceof o.SchemaEnv?(i=u(e,t=w),void c(e,i,t,t.$async)):(r=w,n=p.scopeValue("schema",!0===v.code.source?{ref:r,code:(0,a.stringify)(r)}:{ref:r}),l=p.name("valid"),d=e.subschema({schema:r,dataTypes:[],schemaPath:a.nil,topSchemaRef:n,errSchemaPath:f},l),void(e.mergeEvaluated(d),e.ok(l)))}}},9376(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(5141),a=r(1688),n=r(4220),o=r(7218);t.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,s._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){let{gen:t,data:r,schema:l,parentSchema:u,it:c}=e,{oneOf:d}=u;if(!c.opts.discriminator)throw Error("discriminator: requires discriminator option");let p=l.propertyName;if("string"!=typeof p)throw Error("discriminator: requires propertyName");if(l.mapping)throw Error("discriminator: mapping is not supported");if(!d)throw Error("discriminator: requires oneOf keyword");let f=t.let("valid",!1),h=t.const("tag",(0,s._)`${r}${(0,s.getProperty)(p)}`);t.if((0,s._)`typeof ${h} == "string"`,()=>(function(){let r=function(){var e;let t={},r=i(u),s=!0;for(let t=0;t<d.length;t++){let u=d[t];if((null==u?void 0:u.$ref)&&!(0,o.schemaHasRulesButRef)(u,c.self.RULES)){let e=u.$ref;if((u=a.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,e))instanceof a.SchemaEnv&&(u=u.schema),void 0===u)throw new n.default(c.opts.uriResolver,c.baseId,e)}let f=null==(e=null==u?void 0:u.properties)?void 0:e[p];if("object"!=typeof f)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${p}"`);s=s&&(r||i(u)),function(e,t){if(e.const)l(e.const,t);else if(e.enum)for(let r of e.enum)l(r,t);else throw Error(`discriminator: "properties/${p}" must have "const" or "enum"`)}(f,t)}if(!s)throw Error(`discriminator: "${p}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(p)}function l(e,r){if("string"!=typeof e||e in t)throw Error(`discriminator: "${p}" values must be unique strings`);t[e]=r}}();for(let i in t.if(!1),r)t.elseIf((0,s._)`${h} === ${i}`),t.assign(f,function(r){let i=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(a,s.Name),i}(r[i]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:h,tagName:p}),t.endIf()})(),()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:h,tagName:p})),e.ok(f)}}},5141(e,t){"use strict";var r,s;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(s=r||(t.DiscrError=r={})).Tag="tag",s.Mapping="mapping"},3959(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8119),i=r(659),a=r(8313),n=r(8563),o=r(4618);t.default=[s.default,i.default,(0,a.default)(),n.default,o.metadataVocabulary,o.contentVocabulary]},424(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,s._)`{format: ${e}}`},code(e,t){let r,i,a,n,o,l,{gen:u,data:c,$data:d,schema:p,schemaCode:f,it:h}=e,{opts:m,errSchemaPath:y,schemaEnv:g,self:v}=h;m.validateFormats&&(d?(r=u.scopeValue("formats",{ref:v.formats,code:m.code.formats}),i=u.const("fDef",(0,s._)`${r}[${f}]`),a=u.let("fType"),n=u.let("format"),u.if((0,s._)`typeof ${i} == "object" && !(${i} instanceof RegExp)`,()=>u.assign(a,(0,s._)`${i}.type || "string"`).assign(n,(0,s._)`${i}.validate`),()=>u.assign(a,(0,s._)`"string"`).assign(n,i)),e.fail$data((0,s.or)(!1===m.strictSchema?s.nil:(0,s._)`${f} && !${n}`,(o=g.$async?(0,s._)`(${i}.async ? await ${n}(${c}) : ${n}(${c}))`:(0,s._)`${n}(${c})`,l=(0,s._)`(typeof ${n} == "function" ? ${o} : ${n}.test(${c}))`,(0,s._)`${n} && ${n} !== true && ${a} === ${t} && !${l}`)))):function(){var r;let i,a,n=v.formats[p];if(!n){if(!1===m.strictSchema)return v.logger.warn(o());throw Error(o());function o(){return`unknown format "${p}" ignored in schema at path "${y}"`}}if(!0===n)return;let[l,d,f]=(i=(r=n)instanceof RegExp?(0,s.regexpCode)(r):m.code.formats?(0,s._)`${m.code.formats}${(0,s.getProperty)(p)}`:void 0,a=u.scopeValue("formats",{key:p,ref:r,code:i}),"object"!=typeof r||r instanceof RegExp?["string",r,a]:[r.type||"string",r.validate,(0,s._)`${a}.validate`]);l===t&&e.pass(function(){if("object"==typeof n&&!(n instanceof RegExp)&&n.async){if(!g.$async)throw Error("async format in sync schema");return(0,s._)`await ${f}(${c})`}return"function"==typeof d?(0,s._)`${f}(${c})`:(0,s._)`${f}.test(${c})`}())}())}}},8563(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[r(424).default]},4618(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},7080(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),a=r(6013);t.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,s._)`{allowedValue: ${e}}`},code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:l}=e;n||l&&"object"==typeof l?e.fail$data((0,s._)`!${(0,i.useFunc)(t,a.default)}(${r}, ${o})`):e.fail((0,s._)`${l} !== ${r}`)}}},5358(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),a=r(6013);t.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,s._)`{allowedValues: ${e}}`},code(e){let t,r,{gen:n,data:o,$data:l,schema:u,schemaCode:c,it:d}=e;if(!l&&0===u.length)throw Error("enum must have non-empty array");let p=u.length>=d.opts.loopEnum,f=()=>null!=t?t:t=(0,i.useFunc)(n,a.default);if(p||l)r=n.let("valid"),e.block$data(r,function(){n.assign(r,!1),n.forOf("v",c,e=>n.if((0,s._)`${f()}(${o}, ${e})`,()=>n.assign(r,!0).break()))});else{if(!Array.isArray(u))throw Error("ajv implementation error");let e=n.const("vSchema",c);r=(0,s.or)(...u.map((t,r)=>{var i,a;let n;return i=e,"object"==typeof(n=u[a=r])&&null!==n?(0,s._)`${f()}(${o}, ${i}[${a}])`:(0,s._)`${o} === ${n}`}))}e.pass(r)}}},659(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8997),i=r(9190),a=r(4280),n=r(8805),o=r(2189),l=r(3138),u=r(8870),c=r(1858),d=r(7080),p=r(5358);t.default=[s.default,i.default,a.default,n.default,o.default,l.default,u.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default]},8870(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,a="maxItems"===t?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`${r}.length ${a} ${i}`)}}},4280(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=r(7218),a=r(5532);t.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,l="maxLength"===t?s.operators.GT:s.operators.LT,u=!1===o.opts.unicode?(0,s._)`${r}.length`:(0,s._)`${(0,i.useFunc)(e.gen,a.default)}(${r})`;e.fail$data((0,s._)`${u} ${l} ${n}`)}}},8997(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994),i=s.operators,a={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}};t.default={keyword:Object.keys(a),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,s._)`{comparison: ${a[e].okStr}, limit: ${t}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e;e.fail$data((0,s._)`${r} ${a[t].fail} ${i} || isNaN(${r})`)}}},2189(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>(0,s.str)`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>(0,s._)`{limit: ${e}}`},code(e){let{keyword:t,data:r,schemaCode:i}=e,a="maxProperties"===t?s.operators.GT:s.operators.LT;e.fail$data((0,s._)`Object.keys(${r}).length ${a} ${i}`)}}},9190(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(8994);t.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,s._)`{multipleOf: ${e}}`},code(e){let{gen:t,data:r,schemaCode:i,it:a}=e,n=a.opts.multipleOfPrecision,o=t.let("res"),l=n?(0,s._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${n}`:(0,s._)`${o} !== parseInt(${o})`;e.fail$data((0,s._)`(${i} === 0 || (${o} = ${r}/${i}, ${l}))`)}}},8805(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(7218),a=r(8994);t.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,a.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,a._)`{pattern: ${e}}`},code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:l,it:u}=e,c=u.opts.unicodeRegExp?"u":"";if(n){let{regExp:s}=u.opts.code,n="new RegExp"===s.code?(0,a._)`new RegExp`:(0,i.useFunc)(t,s),o=t.let("valid");t.try(()=>t.assign(o,(0,a._)`${n}(${l}, ${c}).test(${r})`),()=>t.assign(o,!1)),e.fail$data((0,a._)`!${o}`)}else{let t=(0,s.usePattern)(e,o);e.fail$data((0,a._)`!${t}.test(${r})`)}}}},3138(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(4954),i=r(8994),a=r(7218);t.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,i.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,i._)`{missingProperty: ${e}}`},code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:l,it:u}=e,{opts:c}=u;if(!l&&0===r.length)return;let d=r.length>=c.loopRequired;if(u.allErrors?function(){if(d||l)e.block$data(i.nil,p);else for(let t of r)(0,s.checkReportMissingProp)(e,t)}():function(){let a=t.let("missing");if(d||l){let r=t.let("valid",!0);e.block$data(r,()=>{var l,u;return l=a,u=r,void(e.setParams({missingProperty:l}),t.forOf(l,n,()=>{t.assign(u,(0,s.propertyInData)(t,o,l,c.ownProperties)),t.if((0,i.not)(u),()=>{e.error(),t.break()})},i.nil))}),e.ok(r)}else t.if((0,s.checkMissingProp)(e,r,a)),(0,s.reportMissingProp)(e,a),t.else()}(),c.strictRequired){let t=e.parentSchema.properties,{definedProperties:s}=e.it;for(let e of r)if((null==t?void 0:t[e])===void 0&&!s.has(e)){let t=u.schemaEnv.baseId+u.errSchemaPath,r=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,a.checkStrictMode)(u,r,u.opts.strictRequired)}}function p(){t.forOf("prop",n,r=>{e.setParams({missingProperty:r}),t.if((0,s.noPropertyInData)(t,o,r,c.ownProperties),()=>e.error())})}}}},1858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let s=r(6419),i=r(8994),a=r(7218),n=r(6013);t.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,i.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,i._)`{i: ${e}, j: ${t}}`},code(e){let{gen:t,data:r,$data:o,schema:l,parentSchema:u,schemaCode:c,it:d}=e;if(!o&&!l)return;let p=t.let("valid"),f=u.items?(0,s.getSchemaTypes)(u.items):[];e.block$data(p,function(){let o=t.let("i",(0,i._)`${r}.length`),l=t.let("j");e.setParams({i:o,j:l}),t.assign(p,!0),t.if((0,i._)`${o} > 1`,()=>(f.length>0&&!f.some(e=>"object"===e||"array"===e)?function(a,n){let o=t.name("item"),l=(0,s.checkDataTypes)(f,o,d.opts.strictNumbers,s.DataType.Wrong),u=t.const("indices",(0,i._)`{}`);t.for((0,i._)`;${a}--;`,()=>{t.let(o,(0,i._)`${r}[${a}]`),t.if(l,(0,i._)`continue`),f.length>1&&t.if((0,i._)`typeof ${o} == "string"`,(0,i._)`${o} += "_"`),t.if((0,i._)`typeof ${u}[${o}] == "number"`,()=>{t.assign(n,(0,i._)`${u}[${o}]`),e.error(),t.assign(p,!1).break()}).code((0,i._)`${u}[${o}] = ${a}`)})}:function(s,o){let l=(0,a.useFunc)(t,n.default),u=t.name("outer");t.label(u).for((0,i._)`;${s}--;`,()=>t.for((0,i._)`${o} = ${s}; ${o}--;`,()=>t.if((0,i._)`${l}(${r}[${s}], ${r}[${o}])`,()=>{e.error(),t.assign(p,!1).break(u)})))})(o,l))},(0,i._)`${c} === false`),e.ok(p)}}},9454(e,t,r){"use strict";var s=r(181).Buffer,i=r(181).SlowBuffer;function a(e,t){if(!s.isBuffer(e)||!s.isBuffer(t)||e.length!==t.length)return!1;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 0===r}e.exports=a,a.install=function(){s.prototype.equal=i.prototype.equal=function(e){return a(this,e)}};var n=s.prototype.equal,o=i.prototype.equal;a.restore=function(){s.prototype.equal=n,i.prototype.equal=o}},6507(e,t,r){"use strict";let s=r(5317),i=r(8388),a=r(442);function n(e,t,r){let n=i(e,t,r),o=s.spawn(n.command,n.args,n.options);return a.hookChildProcess(o,n),o}e.exports=n,e.exports.spawn=n,e.exports.sync=function(e,t,r){let n=i(e,t,r),o=s.spawnSync(n.command,n.args,n.options);return o.error=o.error||a.verifyENOENTSync(o.status,n),o},e.exports._parse=i,e.exports._enoent=a},442(e){"use strict";let t="win32"===process.platform;function r(e,t){return Object.assign(Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function s(e,s){return t&&1===e&&!s.file?r(s.original,"spawn"):null}e.exports={hookChildProcess:function(e,r){if(!t)return;let i=e.emit;e.emit=function(t,a){if("exit"===t){let t=s(a,r);if(t)return i.call(e,"error",t)}return i.apply(e,arguments)}},verifyENOENT:s,verifyENOENTSync:function(e,s){return t&&1===e&&!s.file?r(s.original,"spawnSync"):null},notFoundError:r}},8388(e,t,r){"use strict";let s=r(6928),i=r(3803),a=r(2077),n=r(1880),o="win32"===process.platform,l=/\.(?:com|exe)$/i,u=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;e.exports=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);let c={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?c:function(e){let t;if(!o)return e;let r=(e.file=i(e),(t=e.file&&n(e.file))?(e.args.unshift(e.file),e.command=t,i(e)):e.file),c=!l.test(r);if(e.options.forceShell||c){let t=u.test(r);e.command=s.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,t));let i=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${i}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(c)}},2077(e){"use strict";let t=/([()\][%!^"`<>&|;, *?])/g;e.exports.command=function(e){return e.replace(t,"^$1")},e.exports.argument=function(e,r){return e=(e=(e=`${e}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1"),e=(e=`"${e}"`).replace(t,"^$1"),r&&(e=e.replace(t,"^$1")),e}},1880(e,t,r){"use strict";let s=r(9896),i=r(600);e.exports=function(e){let t,r=Buffer.alloc(150);try{t=s.openSync(e,"r"),s.readSync(t,r,0,150,0),s.closeSync(t)}catch(e){}return i(r.toString())}},3803(e,t,r){"use strict";let s=r(6928),i=r(1905),a=r(9695);function n(e,t){let r,n=e.options.env||process.env,o=process.cwd(),l=null!=e.options.cwd,u=l&&void 0!==process.chdir&&!process.chdir.disabled;if(u)try{process.chdir(e.options.cwd)}catch(e){}try{r=i.sync(e.command,{path:n[a({env:n})],pathExt:t?s.delimiter:void 0})}catch(e){}finally{u&&process.chdir(o)}return r&&(r=s.resolve(l?e.options.cwd:"",r)),r}e.exports=function(e){return n(e)||n(e,!0)}},8583(e,t,r){let s=r(9896),i=r(6928),a=r(857),n=r(6982),o=r(4519).version,l=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function u(e){console.log(`[dotenv@${o}][DEBUG] ${e}`)}function c(e){console.log(`[dotenv@${o}] ${e}`)}function d(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function p(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)s.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=i.resolve(process.cwd(),".env.vault");return s.existsSync(t)?t:null}function f(e){return"~"===e[0]?i.join(a.homedir(),e.slice(1)):e}let h={configDotenv:function(e){let t,r=i.resolve(process.cwd(),".env"),a="utf8",n=!!(e&&e.debug),o=!e||!("quiet"in e)||e.quiet;e&&e.encoding?a=e.encoding:n&&u("No encoding is specified. UTF-8 is used by default");let l=[r];if(e&&e.path)if(Array.isArray(e.path))for(let t of(l=[],e.path))l.push(f(t));else l=[f(e.path)];let d={};for(let r of l)try{let t=h.parse(s.readFileSync(r,{encoding:a}));h.populate(d,t,e)}catch(e){n&&u(`Failed to load ${r} ${e.message}`),t=e}let p=process.env;if(e&&null!=e.processEnv&&(p=e.processEnv),h.populate(p,d,e),n||!o){let e=Object.keys(d).length,r=[];for(let e of l)try{let t=i.relative(process.cwd(),e);r.push(t)}catch(r){n&&u(`Failed to load ${e} ${r.message}`),t=r}c(`injecting env (${e}) from ${r.join(",")}`)}return t?{parsed:d,error:t}:{parsed:d}},_configVault:function(e){let t=!!(e&&e.debug),r=!e||!("quiet"in e)||e.quiet;(t||!r)&&c("Loading env from encrypted .env.vault");let s=h._parseVault(e),i=process.env;return e&&null!=e.processEnv&&(i=e.processEnv),h.populate(i,s,e),{parsed:s}},_parseVault:function(e){let t,r=p(e=e||{});e.path=r;let s=h.configDotenv(e);if(!s.parsed){let e=Error(`MISSING_DATA: Cannot parse ${r} for an unknown reason`);throw e.code="MISSING_DATA",e}let i=d(e).split(","),a=i.length;for(let e=0;e<a;e++)try{let r=i[e].trim(),a=function(e,t){let r;try{r=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){let e=Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}let s=r.password;if(!s){let e=Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}let i=r.searchParams.get("environment");if(!i){let e=Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}let a=`DOTENV_VAULT_${i.toUpperCase()}`,n=e.parsed[a];if(!n){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:n,key:s}}(s,r);t=h.decrypt(a.ciphertext,a.key);break}catch(t){if(e+1>=a)throw t}return h.parse(t)},config:function(e){if(0===d(e).length)return h.configDotenv(e);let t=p(e);if(!t){var r;return r=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${o}][WARN] ${r}`),h.configDotenv(e)}return h._configVault(e)},decrypt:function(e,t){let r=Buffer.from(t.slice(-64),"hex"),s=Buffer.from(e,"base64"),i=s.subarray(0,12),a=s.subarray(-16);s=s.subarray(12,-16);try{let e=n.createDecipheriv("aes-256-gcm",r,i);return e.setAuthTag(a),`${e.update(s)}${e.final()}`}catch(s){let e=s instanceof RangeError,t="Invalid key length"===s.message,r="Unsupported state or unable to authenticate data"===s.message;if(e||t){let e=Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){let e=Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw s}},parse:function(e){let t,r={},s=e.toString();for(s=s.replace(/\r\n?/mg,"\n");null!=(t=l.exec(s));){let e=t[1],s=t[2]||"",i=(s=s.trim())[0];s=s.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),'"'===i&&(s=(s=s.replace(/\\n/g,"\n")).replace(/\\r/g,"\r")),r[e]=s}return r},populate:function(e,t,r={}){let s=!!(r&&r.debug),i=!!(r&&r.override);if("object"!=typeof t){let e=Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(let r of Object.keys(t))Object.prototype.hasOwnProperty.call(e,r)?(!0===i&&(e[r]=t[r]),s&&(!0===i?u(`"${r}" is already defined and WAS overwritten`):u(`"${r}" is already defined and was NOT overwritten`))):e[r]=t[r]}};e.exports.configDotenv=h.configDotenv,e.exports._configVault=h._configVault,e.exports._parseVault=h._parseVault,e.exports.config=h.config,e.exports.decrypt=h.decrypt,e.exports.parse=h.parse,e.exports.populate=h.populate,e.exports=h},9053(e,t,r){"use strict";var s=r(6608).Buffer,i=r(2188);function a(e){if(s.isBuffer(e))return e;if("string"==typeof e)return s.from(e,"base64");throw TypeError("ECDSA signature must be a Base64 string or a Buffer")}function n(e,t,r){for(var s=0;t+s<r&&0===e[t+s];)++s;return e[t+s]>=128&&--s,s}e.exports={derToJose:function(e,t){e=a(e);var r=i(t),n=r+1,o=e.length,l=0;if(48!==e[l++])throw Error('Could not find expected "seq"');var u=e[l++];if(129===u&&(u=e[l++]),o-l<u)throw Error('"seq" specified length of "'+u+'", only "'+(o-l)+'" remaining');if(2!==e[l++])throw Error('Could not find expected "int" for "r"');var c=e[l++];if(o-l-2<c)throw Error('"r" specified length of "'+c+'", only "'+(o-l-2)+'" available');if(n<c)throw Error('"r" specified length of "'+c+'", max of "'+n+'" is acceptable');var d=l;if(l+=c,2!==e[l++])throw Error('Could not find expected "int" for "s"');var p=e[l++];if(o-l!==p)throw Error('"s" specified length of "'+p+'", expected "'+(o-l)+'"');if(n<p)throw Error('"s" specified length of "'+p+'", max of "'+n+'" is acceptable');var f=l;if((l+=p)!==o)throw Error('Expected to consume entire buffer, but "'+(o-l)+'" bytes remain');var h=r-c,m=r-p,y=s.allocUnsafe(h+c+m+p);for(l=0;l<h;++l)y[l]=0;e.copy(y,l,d+Math.max(-h,0),d+c),l=r;for(var g=l;l<g+m;++l)y[l]=0;return e.copy(y,l,f+Math.max(-m,0),f+p),y=(y=y.toString("base64")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},joseToDer:function(e,t){e=a(e);var r=i(t),o=e.length;if(o!==2*r)throw TypeError('"'+t+'" signatures must be "'+2*r+'" bytes, saw "'+o+'"');var l=n(e,0,r),u=n(e,r,e.length),c=r-l,d=r-u,p=2+c+1+1+d,f=p<128,h=s.allocUnsafe((f?2:3)+p),m=0;return h[m++]=48,f?h[m++]=p:(h[m++]=129,h[m++]=255&p),h[m++]=2,h[m++]=c,l<0?(h[m++]=0,m+=e.copy(h,m,0,r)):m+=e.copy(h,m,l,r),h[m++]=2,h[m++]=d,u<0?(h[m++]=0,e.copy(h,m,r)):e.copy(h,m,r+u),h}}},2188(e){"use strict";function t(e){return(e/8|0)+ +(e%8!=0)}var r={ES256:t(256),ES384:t(384),ES512:t(521)};e.exports=function(e){var t=r[e];if(t)return t;throw Error('Unknown algorithm "'+e+'"')}},7371(e){"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)){if((s=t.length)!=r.length)return!1;for(i=s;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((s=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=s;0!=i--;){var s,i,a,n=a[i];if(!e(t[n],r[n]))return!1}return!0}return t!=t&&r!=r}},9344(e,t,r){var s;function i(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(r,s){i(e,t||{},function(e,t){e?s(e):r(t)})})}s(e,t||{},function(e,s){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,s=!1),r(e,s)})}r(9896),s="win32"===process.platform||global.TESTING_WINDOWS?r(8541):r(709),e.exports=i,i.sync=function(e,t){try{return s.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}}},709(e,t,r){e.exports=i,i.sync=function(e,t){return a(s.statSync(e),t)};var s=r(9896);function i(e,t,r){s.stat(e,function(e,s){r(e,!e&&a(s,t))})}function a(e,t){var r,s,i,a,n,o,l,u,c;return e.isFile()&&(r=e,s=t,i=r.mode,a=r.uid,n=r.gid,o=void 0!==s.uid?s.uid:process.getuid&&process.getuid(),l=void 0!==s.gid?s.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),i&parseInt("001",8)||i&c&&n===l||i&u&&a===o||i&(u|c)&&0===o)}},8541(e,t,r){e.exports=a,a.sync=function(e,t){return i(s.statSync(e),e,t)};var s=r(9896);function i(e,t,r){if(!e.isSymbolicLink()&&!e.isFile())return!1;var s=void 0!==r.pathExt?r.pathExt:process.env.PATHEXT;if(!s||-1!==(s=s.split(";")).indexOf(""))return!0;for(var i=0;i<s.length;i++){var a=s[i].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a)return!0}return!1}function a(e,t,r){s.stat(e,function(s,a){r(s,!s&&i(a,e,t))})}},205(e){"use strict";var t=e.exports=function(e,r,s){"function"==typeof r&&(s=r,r={});var i="function"==typeof(s=r.cb||s)?s:s.pre||function(){};!function e(r,s,i,a,n,o,l,u,c,d){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var p in s(a,n,o,l,u,c,d),a){var f=a[p];if(Array.isArray(f)){if(p in t.arrayKeywords)for(var h=0;h<f.length;h++)e(r,s,i,f[h],n+"/"+p+"/"+h,o,n,p,a,h)}else if(p in t.propsKeywords){if(f&&"object"==typeof f)for(var m in f)e(r,s,i,f[m],n+"/"+p+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),o,n,p,a,m)}else(p in t.keywords||r.allKeys&&!(p in t.skipKeywords))&&e(r,s,i,f,n+"/"+p,o,n,p,a)}i(a,n,o,l,u,c,d)}}(r,i,s.post||function(){},e,"",e)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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}},2548(e,t,r){var s=r(3263);e.exports=function(e,t){t=t||{};var r=s.decode(e,t);if(!r)return null;var i=r.payload;if("string"==typeof i)try{var a=JSON.parse(i);null!==a&&"object"==typeof a&&(i=a)}catch(e){}return!0===t.complete?{header:r.header,payload:i,signature:r.signature}:i}},8400(e,t,r){e.exports={decode:r(2548),verify:r(6467),sign:r(9147),JsonWebTokenError:r(1957),NotBeforeError:r(4470),TokenExpiredError:r(7788)}},1957(e){var t=function(e,t){Error.call(this,e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="JsonWebTokenError",this.message=e,t&&(this.inner=t)};t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,e.exports=t},4470(e,t,r){var s=r(1957),i=function(e,t){s.call(this,e),this.name="NotBeforeError",this.date=t};i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i},7788(e,t,r){var s=r(1957),i=function(e,t){s.call(this,e),this.name="TokenExpiredError",this.expiredAt=t};i.prototype=Object.create(s.prototype),i.prototype.constructor=i,e.exports=i},5841(e,t,r){e.exports=r(3895).satisfies(process.version,">=15.7.0")},953(e,t,r){e.exports=r(3895).satisfies(process.version,"^6.12.0 || >=8.0.0")},455(e,t,r){e.exports=r(3895).satisfies(process.version,">=16.9.0")},4559(e,t,r){var s=r(3866);e.exports=function(e,t){var r=t||Math.floor(Date.now()/1e3);if("string"==typeof e){var i=s(e);if(void 0===i)return;return Math.floor(r+i/1e3)}if("number"==typeof e)return r+e}},723(e,t,r){let s=r(5841),i=r(455),a={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},n={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};e.exports=function(e,t){if(!e||!t)return;let r=t.asymmetricKeyType;if(!r)return;let o=a[r];if(!o)throw Error(`Unknown key type "${r}".`);if(!o.includes(e))throw Error(`"alg" parameter for "${r}" key type must be one of: ${o.join(", ")}.`);if(s)switch(r){case"ec":let l=t.asymmetricKeyDetails.namedCurve,u=n[e];if(l!==u)throw Error(`"alg" parameter "${e}" requires curve "${u}".`);break;case"rsa-pss":if(i){let r=parseInt(e.slice(-3),10),{hashAlgorithm:s,mgf1HashAlgorithm:i,saltLength:a}=t.asymmetricKeyDetails;if(s!==`sha${r}`||i!==s)throw Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}.`);if(void 0!==a&&a>r>>3)throw Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}.`)}}}},9147(e,t,r){let s=r(4559),i=r(953),a=r(723),n=r(3263),o=r(5357),l=r(6782),u=r(5250),c=r(8094),d=r(6052),p=r(1251),f=r(8430),{KeyObject:h,createSecretKey:m,createPrivateKey:y}=r(6982),g=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];i&&g.splice(3,0,"PS256","PS384","PS512");let v={expiresIn:{isValid:function(e){return u(e)||p(e)&&e},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(e){return u(e)||p(e)&&e},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(e){return p(e)||Array.isArray(e)},message:'"audience" must be a string or array'},algorithm:{isValid:o.bind(null,g),message:'"algorithm" must be a valid string enum value'},header:{isValid:d,message:'"header" must be an object'},encoding:{isValid:p,message:'"encoding" must be a string'},issuer:{isValid:p,message:'"issuer" must be a string'},subject:{isValid:p,message:'"subject" must be a string'},jwtid:{isValid:p,message:'"jwtid" must be a string'},noTimestamp:{isValid:l,message:'"noTimestamp" must be a boolean'},keyid:{isValid:p,message:'"keyid" must be a string'},mutatePayload:{isValid:l,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:l,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:l,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},_={iat:{isValid:c,message:'"iat" should be a number of seconds'},exp:{isValid:c,message:'"exp" should be a number of seconds'},nbf:{isValid:c,message:'"nbf" should be a number of seconds'}};function b(e,t,r,s){if(!d(r))throw Error('Expected "'+s+'" to be a plain object.');Object.keys(r).forEach(function(i){let a=e[i];if(!a){if(!t)throw Error('"'+i+'" is not allowed in "'+s+'"');return}if(!a.isValid(r[i]))throw Error(a.message)})}let w={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},$=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];e.exports=function(e,t,r,i){var o,l;"function"==typeof r?(i=r,r={}):r=r||{};let u="object"==typeof e&&!Buffer.isBuffer(e),c=Object.assign({alg:r.algorithm||"HS256",typ:u?"JWT":void 0,kid:r.keyid},r.header);function d(e){if(i)return i(e);throw e}if(!t&&"none"!==r.algorithm)return d(Error("secretOrPrivateKey must have a value"));if(null!=t&&!(t instanceof h))try{t=y(t)}catch(e){try{t=m("string"==typeof t?Buffer.from(t):t)}catch(e){return d(Error("secretOrPrivateKey is not valid key material"))}}if(c.alg.startsWith("HS")&&"secret"!==t.type)return d(Error(`secretOrPrivateKey must be a symmetric key when using ${c.alg}`));if(/^(?:RS|PS|ES)/.test(c.alg)){if("private"!==t.type)return d(Error(`secretOrPrivateKey must be an asymmetric key when using ${c.alg}`));if(!r.allowInsecureKeySizes&&!c.alg.startsWith("ES")&&void 0!==t.asymmetricKeyDetails&&t.asymmetricKeyDetails.modulusLength<2048)return d(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`))}if(void 0===e)return d(Error("payload is required"));if(u){try{o=e,b(_,!0,o,"payload")}catch(e){return d(e)}r.mutatePayload||(e=Object.assign({},e))}else{let t=$.filter(function(e){return void 0!==r[e]});if(t.length>0)return d(Error("invalid "+t.join(",")+" option for "+typeof e+" payload"))}if(void 0!==e.exp&&void 0!==r.expiresIn)return d(Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==e.nbf&&void 0!==r.notBefore)return d(Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{l=r,b(v,!1,l,"options")}catch(e){return d(e)}if(!r.allowInvalidAsymmetricKeyTypes)try{a(c.alg,t)}catch(e){return d(e)}let p=e.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete e.iat:u&&(e.iat=p),void 0!==r.notBefore){try{e.nbf=s(r.notBefore,p)}catch(e){return d(e)}if(void 0===e.nbf)return d(Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof e){try{e.exp=s(r.expiresIn,p)}catch(e){return d(e)}if(void 0===e.exp)return d(Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(w).forEach(function(t){let s=w[t];if(void 0!==r[t]){if(void 0!==e[s])return d(Error('Bad "options.'+t+'" option. The payload already has an "'+s+'" property.'));e[s]=r[t]}});let g=r.encoding||"utf8";if("function"==typeof i)i=i&&f(i),n.createSign({header:c,privateKey:t,payload:e,encoding:g}).once("error",i).once("done",function(e){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&e.length<256)return i(Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`));i(null,e)});else{let s=n.sign({header:c,payload:e,secret:t,encoding:g});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(c.alg)&&s.length<256)throw Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${c.alg}`);return s}}},6467(e,t,r){let s=r(1957),i=r(4470),a=r(7788),n=r(2548),o=r(4559),l=r(723),u=r(953),c=r(3263),{KeyObject:d,createSecretKey:p,createPublicKey:f}=r(6982),h=["RS256","RS384","RS512"],m=["ES256","ES384","ES512"],y=["RS256","RS384","RS512"],g=["HS256","HS384","HS512"];u&&(h.splice(h.length,0,"PS256","PS384","PS512"),y.splice(y.length,0,"PS256","PS384","PS512")),e.exports=function(e,t,r,u){let v,_,b;if("function"!=typeof r||u||(u=r,r={}),r||(r={}),r=Object.assign({},r),v=u||function(e,t){if(e)throw e;return t},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return v(new s("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return v(new s("nonce must be a non-empty string"));if(void 0!==r.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof r.allowInvalidAsymmetricKeyTypes)return v(new s("allowInvalidAsymmetricKeyTypes must be a boolean"));let w=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!e)return v(new s("jwt must be provided"));if("string"!=typeof e)return v(new s("jwt must be a string"));let $=e.split(".");if(3!==$.length)return v(new s("jwt malformed"));try{_=n(e,{complete:!0})}catch(e){return v(e)}if(!_)return v(new s("invalid token"));let E=_.header;if("function"==typeof t){if(!u)return v(new s("verify must be called asynchronous if secret or public key is provided as a callback"));b=t}else b=function(e,r){return r(null,t)};return b(E,function(t,n){let u;if(t)return v(new s("error in secret or public key callback: "+t.message));let b=""!==$[2].trim();if(!b&&n)return v(new s("jwt signature is required"));if(b&&!n)return v(new s("secret or public key must be provided"));if(!b&&!r.algorithms)return v(new s('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=n&&!(n instanceof d))try{n=f(n)}catch(e){try{n=p("string"==typeof n?Buffer.from(n):n)}catch(e){return v(new s("secretOrPublicKey is not valid key material"))}}if(r.algorithms||("secret"===n.type?r.algorithms=g:["rsa","rsa-pss"].includes(n.asymmetricKeyType)?r.algorithms=y:"ec"===n.asymmetricKeyType?r.algorithms=m:r.algorithms=h),-1===r.algorithms.indexOf(_.header.alg))return v(new s("invalid algorithm"));if(E.alg.startsWith("HS")&&"secret"!==n.type)return v(new s(`secretOrPublicKey must be a symmetric key when using ${E.alg}`));if(/^(?:RS|PS|ES)/.test(E.alg)&&"public"!==n.type)return v(new s(`secretOrPublicKey must be an asymmetric key when using ${E.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{l(E.alg,n)}catch(e){return v(e)}try{u=c.verify(e,_.header.alg,n)}catch(e){return v(e)}if(!u)return v(new s("invalid signature"));let k=_.payload;if(void 0!==k.nbf&&!r.ignoreNotBefore){if("number"!=typeof k.nbf)return v(new s("invalid nbf value"));if(k.nbf>w+(r.clockTolerance||0))return v(new i("jwt not active",new Date(1e3*k.nbf)))}if(void 0!==k.exp&&!r.ignoreExpiration){if("number"!=typeof k.exp)return v(new s("invalid exp value"));if(w>=k.exp+(r.clockTolerance||0))return v(new a("jwt expired",new Date(1e3*k.exp)))}if(r.audience){let e=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(k.aud)?k.aud:[k.aud]).some(function(t){return e.some(function(e){return e instanceof RegExp?e.test(t):e===t})}))return v(new s("jwt audience invalid. expected: "+e.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&k.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(k.iss)))return v(new s("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&k.sub!==r.subject)return v(new s("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&k.jti!==r.jwtid)return v(new s("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&k.nonce!==r.nonce)return v(new s("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof k.iat)return v(new s("iat required when maxAge is specified"));let e=o(r.maxAge,k.iat);if(void 0===e)return v(new s('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(w>=e+(r.clockTolerance||0))return v(new a("maxAge exceeded",new Date(1e3*e)))}return!0===r.complete?v(null,{header:E,payload:k,signature:_.signature}):v(null,k)})}},2357(e,t,r){var s,i=r(6608).Buffer,a=r(6982),n=r(9053),o=r(9023),l="secret must be a string or buffer",u="key must be a string or a buffer",c="function"==typeof a.createPublicKey;function d(e){if(!i.isBuffer(e)&&"string"!=typeof e&&(!c||"object"!=typeof e||"string"!=typeof e.type||"string"!=typeof e.asymmetricKeyType||"function"!=typeof e.export))throw m(u)}function p(e){if(!i.isBuffer(e)&&"string"!=typeof e&&"object"!=typeof e)throw m("key must be a string, a buffer or an object")}function f(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function h(e){var t=4-(e=e.toString()).length%4;if(4!==t)for(var r=0;r<t;++r)e+="=";return e.replace(/\-/g,"+").replace(/_/g,"/")}function m(e){var t=[].slice.call(arguments,1);return TypeError(o.format.bind(o,e).apply(null,t))}function y(e){var t;return t=e,i.isBuffer(t)||"string"==typeof t||(e=JSON.stringify(e)),e}function g(e){return function(t,r){!function(e){if(!i.isBuffer(e)){if("string"!=typeof e){if(!c||"object"!=typeof e||"secret"!==e.type||"function"!=typeof e.export)throw m(l)}}}(r),t=y(t);var s=a.createHmac("sha"+e,r);return f((s.update(t),s.digest("base64")))}}c&&(u+=" or a KeyObject",l+="or a KeyObject");var v="timingSafeEqual"in a?function(e,t){return e.byteLength===t.byteLength&&a.timingSafeEqual(e,t)}:function(e,t){return s||(s=r(9454)),s(e,t)};function _(e){return function(t,r,s){var a=g(e)(t,s);return v(i.from(r),i.from(a))}}function b(e){return function(t,r){p(r),t=y(t);var s=a.createSign("RSA-SHA"+e);return f((s.update(t),s.sign(r,"base64")))}}function w(e){return function(t,r,s){d(s),t=y(t),r=h(r);var i=a.createVerify("RSA-SHA"+e);return i.update(t),i.verify(s,r,"base64")}}function $(e){return function(t,r){p(r),t=y(t);var s=a.createSign("RSA-SHA"+e);return f((s.update(t),s.sign({key:r,padding:a.constants.RSA_PKCS1_PSS_PADDING,saltLength:a.constants.RSA_PSS_SALTLEN_DIGEST},"base64")))}}function E(e){return function(t,r,s){d(s),t=y(t),r=h(r);var i=a.createVerify("RSA-SHA"+e);return i.update(t),i.verify({key:s,padding:a.constants.RSA_PKCS1_PSS_PADDING,saltLength:a.constants.RSA_PSS_SALTLEN_DIGEST},r,"base64")}}function k(e){var t=b(e);return function(){var r=t.apply(null,arguments);return n.derToJose(r,"ES"+e)}}function x(e){var t=w(e);return function(r,s,i){return t(r,s=n.joseToDer(s,"ES"+e).toString("base64"),i)}}function S(){return function(){return""}}function T(){return function(e,t){return""===t}}e.exports=function(e){var t=e.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/);if(!t)throw m('"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".',e);var r=(t[1]||t[3]).toLowerCase(),s=t[2];return{sign:({hs:g,rs:b,ps:$,es:k,none:S})[r](s),verify:({hs:_,rs:w,ps:E,es:x,none:T})[r](s)}}},3263(e,t,r){var s=r(9615),i=r(6747);t.ALGORITHMS=["HS256","HS384","HS512","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"],t.sign=s.sign,t.verify=i.verify,t.decode=i.decode,t.isValid=i.isValid,t.createSign=function(e){return new s(e)},t.createVerify=function(e){return new i(e)}},6360(e,t,r){var s=r(6608).Buffer,i=r(2203);function a(e){if(this.buffer=null,this.writable=!0,this.readable=!0,!e)return this.buffer=s.alloc(0),this;if("function"==typeof e.pipe)return this.buffer=s.alloc(0),e.pipe(this),this;if(e.length||"object"==typeof e)return this.buffer=e,this.writable=!1,process.nextTick((function(){this.emit("end",e),this.readable=!1,this.emit("close")}).bind(this)),this;throw TypeError("Unexpected data type ("+typeof e+")")}r(9023).inherits(a,i),a.prototype.write=function(e){this.buffer=s.concat([this.buffer,s.from(e)]),this.emit("data",e)},a.prototype.end=function(e){e&&this.write(e),this.emit("end",e),this.emit("close"),this.writable=!1,this.readable=!1},e.exports=a},9615(e,t,r){var s=r(6608).Buffer,i=r(6360),a=r(2357),n=r(2203),o=r(5911),l=r(9023);function u(e,t){return s.from(e,t).toString("base64").replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function c(e){var t,r,s,i=e.header,n=e.payload,c=e.secret||e.privateKey,d=e.encoding,p=a(i.alg),f=(t=(t=d)||"utf8",r=u(o(i),"binary"),s=u(o(n),t),l.format("%s.%s",r,s)),h=p.sign(f,c);return l.format("%s.%s",f,h)}function d(e){var t=e.secret;if(t=null==(t=null==t?e.privateKey:t)?e.key:t,!0===/^hs/i.test(e.header.alg)&&null==t)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new i(t);this.readable=!0,this.header=e.header,this.encoding=e.encoding,this.secret=this.privateKey=this.key=r,this.payload=new i(e.payload),this.secret.once("close",(function(){!this.payload.writable&&this.readable&&this.sign()}).bind(this)),this.payload.once("close",(function(){!this.secret.writable&&this.readable&&this.sign()}).bind(this))}l.inherits(d,n),d.prototype.sign=function(){try{var e=c({header:this.header,payload:this.payload.buffer,secret:this.secret.buffer,encoding:this.encoding});return this.emit("done",e),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},d.sign=c,e.exports=d},5911(e,t,r){var s=r(181).Buffer;e.exports=function(e){return"string"==typeof e?e:"number"==typeof e||s.isBuffer(e)?e.toString():JSON.stringify(e)}},6747(e,t,r){var s=r(6608).Buffer,i=r(6360),a=r(2357),n=r(2203),o=r(5911),l=r(9023),u=/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;function c(e){var t=e.split(".",1)[0],r=s.from(t,"base64").toString("binary");if("[object Object]"===Object.prototype.toString.call(r))return r;try{return JSON.parse(r)}catch(e){return}}function d(e){return e.split(".")[2]}function p(e){return u.test(e)&&!!c(e)}function f(e,t,r){if(!t){var s=Error("Missing algorithm parameter for jws.verify");throw s.code="MISSING_ALGORITHM",s}var i=d(e=o(e)),n=e.split(".",2).join(".");return a(t).verify(n,i,r)}function h(e,t){if(t=t||{},!p(e=o(e)))return null;var r,i,a=c(e);if(!a)return null;var n=(r=r||"utf8",i=e.split(".")[1],s.from(i,"base64").toString(r));return("JWT"===a.typ||t.json)&&(n=JSON.parse(n,t.encoding)),{header:a,payload:n,signature:d(e)}}function m(e){var t=(e=e||{}).secret;if(t=null==(t=null==t?e.publicKey:t)?e.key:t,!0===/^hs/i.test(e.algorithm)&&null==t)throw TypeError("secret must be a string or buffer or a KeyObject");var r=new i(t);this.readable=!0,this.algorithm=e.algorithm,this.encoding=e.encoding,this.secret=this.publicKey=this.key=r,this.signature=new i(e.signature),this.secret.once("close",(function(){!this.signature.writable&&this.readable&&this.verify()}).bind(this)),this.signature.once("close",(function(){!this.secret.writable&&this.readable&&this.verify()}).bind(this))}l.inherits(m,n),m.prototype.verify=function(){try{var e=f(this.signature.buffer,this.algorithm,this.key.buffer),t=h(this.signature.buffer,this.encoding);return this.emit("done",e,t),this.emit("data",e),this.emit("end"),this.readable=!1,e}catch(e){this.readable=!1,this.emit("error",e),this.emit("close")}},m.decode=h,m.isValid=p,m.verify=f,e.exports=m},5357(e){var t,r,s=1/0,i=0/0,a=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=/^(?:0|[1-9]\d*)$/,c=parseInt;function d(e){return e!=e}var p=Object.prototype,f=p.hasOwnProperty,h=p.toString,m=p.propertyIsEnumerable,y=(t=Object.keys,r=Object,function(e){return t(r(e))}),g=Math.max,v=Array.isArray;function _(e){var t,r,s;return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=0x1fffffffffffff&&"[object Function]"!=(s=b(r=e)?h.call(r):"")&&"[object GeneratorFunction]"!=s}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){return!!e&&"object"==typeof e}e.exports=function(e,t,r,$){e=_(e)?e:function(e){return e?function(e,t){for(var r=-1,s=e?e.length:0,i=Array(s);++r<s;)i[r]=t(e[r],r,e);return i}(_(e)?function(e,t){var r,s,i,a,n=v(e)||w(s=r=e)&&_(s)&&f.call(r,"callee")&&(!m.call(r,"callee")||"[object Arguments]"==h.call(r))?function(e,t){for(var r=-1,s=Array(e);++r<e;)s[r]=t(r);return s}(e.length,String):[],o=n.length,l=!!o;for(var c in e){f.call(e,c)&&!(l&&("length"==c||(i=c,(a=null==(a=o)?0x1fffffffffffff:a)&&("number"==typeof i||u.test(i))&&i>-1&&i%1==0&&i<a)))&&n.push(c)}return n}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||p))return y(e);var t,r,s=[];for(var i in Object(e))f.call(e,i)&&"constructor"!=i&&s.push(i);return s}(e),function(t){return e[t]}):[]}(e),r=r&&!$?(x=(k=(E=r)?(E=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||w(t)&&"[object Symbol]"==h.call(t))return i;if(b(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=b(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var s=o.test(e);return s||l.test(e)?c(e.slice(2),s?2:8):n.test(e)?i:+e}(E))===s||E===-s?(E<0?-1:1)*17976931348623157e292:E==E?E:0:0===E?E:0)%1,k==k?x?k-x:k:0):0;var E,k,x,S,T=e.length;return r<0&&(r=g(T+r,0)),"string"==typeof(S=e)||!v(S)&&w(S)&&"[object String]"==h.call(S)?r<=T&&e.indexOf(t,r)>-1:!!T&&function(e,t,r){if(t!=t){for(var s=e.length,i=r+-1;++i<s;)if(d(e[i],i,e))return i;return -1}for(var a=r-1,n=e.length;++a<n;)if(e[a]===t)return a;return -1}(e,t,r)>-1}},6782(e){var t=Object.prototype.toString;e.exports=function(e){var r;return!0===e||!1===e||!!(r=e)&&"object"==typeof r&&"[object Boolean]"==t.call(e)}},5250(e){var t=1/0,r=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,n=/^0o[0-7]+$/i,o=parseInt,l=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){var c,d,p;return"number"==typeof e&&e==(p=(d=(c=e)?(c=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==l.call(t))return r;if(u(e)){var t,c="function"==typeof e.valueOf?e.valueOf():e;e=u(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var d=a.test(e);return d||n.test(e)?o(e.slice(2),d?2:8):i.test(e)?r:+e}(c))===t||c===-t?(c<0?-1:1)*17976931348623157e292:c==c?c:0:0===c?c:0)%1,d==d?p?d-p:d:0)}},8094(e){var t=Object.prototype.toString;e.exports=function(e){return"number"==typeof e||!!e&&"object"==typeof e&&"[object Number]"==t.call(e)}},6052(e){var t,r,s=Object.prototype,i=Function.prototype.toString,a=s.hasOwnProperty,n=i.call(Object),o=s.toString,l=(t=Object.getPrototypeOf,r=Object,function(e){return t(r(e))});e.exports=function(e){if(!(e&&"object"==typeof e)||"[object Object]"!=o.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=l(e);if(null===t)return!0;var r=a.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&i.call(r)==n}},1251(e){var t=Object.prototype.toString,r=Array.isArray;e.exports=function(e){var s;return"string"==typeof e||!r(e)&&!!(s=e)&&"object"==typeof s&&"[object String]"==t.call(e)}},8430(e){var t=1/0,r=0/0,s=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,n=/^0o[0-7]+$/i,o=parseInt,l=Object.prototype.toString;function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){var c,d,p,f,h=2,m=e;if("function"!=typeof m)throw TypeError("Expected a function");return p=(d=(c=h)?(c=function(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||t&&"object"==typeof t&&"[object Symbol]"==l.call(t))return r;if(u(e)){var t,c="function"==typeof e.valueOf?e.valueOf():e;e=u(c)?c+"":c}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var d=a.test(e);return d||n.test(e)?o(e.slice(2),d?2:8):i.test(e)?r:+e}(c))===t||c===-t?(c<0?-1:1)*17976931348623157e292:c==c?c:0:0===c?c:0)%1,h=d==d?p?d-p:d:0,function(){return--h>0&&(f=m.apply(this,arguments)),h<=1&&(m=void 0),f}}},3866(e){function t(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}e.exports=function(e,r){r=r||{};var s,i,a,n,o=typeof e;if("string"===o&&e.length>0){var l=e;if(!((l=String(l)).length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(u){var c=parseFloat(u[1]);switch((u[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*c;case"weeks":case"week":case"w":return 6048e5*c;case"days":case"day":case"d":return 864e5*c;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*c;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*c;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*c;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:break}}}return}if("number"===o&&isFinite(e)){return r.long?(i=Math.abs(s=e))>=864e5?t(s,i,864e5,"day"):i>=36e5?t(s,i,36e5,"hour"):i>=6e4?t(s,i,6e4,"minute"):i>=1e3?t(s,i,1e3,"second"):s+" ms":(n=Math.abs(a=e))>=864e5?Math.round(a/864e5)+"d":n>=36e5?Math.round(a/36e5)+"h":n>=6e4?Math.round(a/6e4)+"m":n>=1e3?Math.round(a/1e3)+"s":a+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9695(e){"use strict";let t=(e={})=>{let t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find(e=>"PATH"===e.toUpperCase())||"Path"};e.exports=t,e.exports.default=t},6608(e,t,r){var s=r(181),i=s.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function n(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=s:(a(s,t),t.Buffer=n),n.prototype=Object.create(i.prototype),a(i,n),n.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},n.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var s=i(e);return void 0!==t?"string"==typeof r?s.fill(t,r):s.fill(t):s.fill(0),s},n.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},n.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return s.SlowBuffer(e)}},8610(e,t,r){"use strict";let s=Symbol("SemVer ANY");class i{static get ANY(){return s}constructor(e,t){if(t=a(t),e instanceof i)if(!!t.loose===e.loose)return e;else e=e.value;u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===s?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?n[o.COMPARATORLOOSE]:n[o.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=s}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===s||e===s)return!0;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=a(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||l(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||l(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=i;let a=r(4621),{safeRe:n,t:o}=r(152),l=r(5461),u=r(674),c=r(2398),d=r(2069)},2069(e,t,r){"use strict";let s=/\s+/g;class i{constructor(e,t){if(t=n(t),e instanceof i)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else return new i(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(s," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!g(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&m)|(this.options.loose&&y))+":"+e,r=a.get(t);if(r)return r;let s=this.options.loose,i=s?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];l("hyphen replace",e=e.replace(i,O(this.options.includePrerelease))),l("comparator trim",e=e.replace(c[d.COMPARATORTRIM],p)),l("tilde trim",e=e.replace(c[d.TILDETRIM],f)),l("caret trim",e=e.replace(c[d.CARETTRIM],h));let n=e.split(" ").map(e=>b(e,this.options)).join(" ").split(/\s+/).map(e=>I(e,this.options));s&&(n=n.filter(e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE])))),l("range list",n);let u=new Map;for(let e of n.map(e=>new o(e,this.options))){if(g(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let v=[...u.values()];return a.set(t,v),v}intersects(e,t){if(!(e instanceof i))throw TypeError("a Range is required");return this.set.some(r=>_(r,t)&&e.set.some(e=>_(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(j(this.set[t],e,this.options))return!0;return!1}}e.exports=i;let a=new(r(2044)),n=r(4621),o=r(8610),l=r(674),u=r(2398),{safeRe:c,t:d,comparatorTrimReplace:p,tildeTrimReplace:f,caretTrimReplace:h}=r(152),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:y}=r(5076),g=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,_=(e,t)=>{let r=!0,s=e.slice(),i=s.pop();for(;r&&s.length;)r=s.every(e=>i.intersects(e,t)),i=s.pop();return r},b=(e,t)=>(l("comp",e=e.replace(c[d.BUILD],""),t),l("caret",e=k(e,t)),l("tildes",e=$(e,t)),l("xrange",e=S(e,t)),l("stars",e=P(e,t)),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,$=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{let r=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(r,(t,r,s,i,a)=>{let n;return l("tilde",e,t,r,s,i,a),w(r)?n="":w(s)?n=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?n=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(l("replaceTilde pr",a),n=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):n=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,l("tilde return",n),n})},k=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{l("caret",e,t);let r=t.loose?c[d.CARETLOOSE]:c[d.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,a,n)=>{let o;return l("caret",e,t,r,i,a,n),w(r)?o="":w(i)?o=`>=${r}.0.0${s} <${+r+1}.0.0-0`:w(a)?o="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:n?(l("replaceCaret pr",n),o="0"===r?"0"===i?`>=${r}.${i}.${a}-${n} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${n} <${+r+1}.0.0-0`):(l("no pr"),o="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),l("caret return",o),o})},S=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map(e=>T(e,t)).join(" ")),T=(e,t)=>{e=e.trim();let r=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(r,(r,s,i,a,n,o)=>{l("xRange",e,r,s,i,a,n,o);let u=w(i),c=u||w(a),d=c||w(n);return"="===s&&d&&(s=""),o=t.includePrerelease?"-0":"",u?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&d?(c&&(a=0),n=0,">"===s?(s=">=",c?(i=+i+1,a=0):a=+a+1,n=0):"<="===s&&(s="<",c?i=+i+1:a=+a+1),"<"===s&&(o="-0"),r=`${s+i}.${a}.${n}${o}`):c?r=`>=${i}.0.0${o} <${+i+1}.0.0-0`:d&&(r=`>=${i}.${a}.0${o} <${i}.${+a+1}.0-0`),l("xRange return",r),r})},P=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),I=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),O=e=>(t,r,s,i,a,n,o,l,u,c,d,p)=>(r=w(s)?"":w(i)?`>=${s}.0.0${e?"-0":""}`:w(a)?`>=${s}.${i}.0${e?"-0":""}`:n?`>=${r}`:`>=${r}${e?"-0":""}`,l=w(u)?"":w(c)?`<${+u+1}.0.0-0`:w(d)?`<${u}.${+c+1}.0-0`:p?`<=${u}.${c}.${d}-${p}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`,`${r} ${l}`.trim()),j=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(l(e[r].semver),e[r].semver!==o.ANY&&e[r].semver.prerelease.length>0){let s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}},2398(e,t,r){"use strict";let s=r(674),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=r(5076),{safeRe:n,t:o}=r(152),l=r(4621),{compareIdentifiers:u}=r(9101);class c{constructor(e,t){if(t=l(t),e instanceof c)if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;else e=e.version;else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw TypeError(`version is longer than ${i} characters`);s("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?n[o.LOOSE]:n[o.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(s("SemVer.compare",this.version,this.options,e),!(e instanceof c)){if("string"==typeof e&&e===this.version)return 0;e=new c(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return(e instanceof c||(e=new c(e,this.options)),this.major<e.major)?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:+(this.patch>e.patch)}comparePre(e){if(e instanceof c||(e=new c(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(s("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}compareBuild(e){e instanceof c||(e=new c(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(s("build compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;else if(r===i)continue;else return u(r,i)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(t){let e=`-${t}`.match(this.options.loose?n[o.PRERELEASELOOSE]:n[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let e=+!!Number(r);if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=c},5608(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},5461(e,t,r){"use strict";let s=r(8271),i=r(733),a=r(1686),n=r(6479),o=r(7257),l=r(5850);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return s(e,r,u);case"!=":return i(e,r,u);case">":return a(e,r,u);case">=":return n(e,r,u);case"<":return o(e,r,u);case"<=":return l(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},7771(e,t,r){"use strict";let s=r(2398),i=r(6802),{safeRe:a,t:n}=r(152);e.exports=(e,t)=>{if(e instanceof s)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let s,i=t.includePrerelease?a[n.COERCERTLFULL]:a[n.COERCERTL];for(;(s=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&s.index+s[0].length===r.index+r[0].length||(r=s),i.lastIndex=s.index+s[1].length+s[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?a[n.COERCEFULL]:a[n.COERCE]);if(null===r)return null;let o=r[2],l=r[3]||"0",u=r[4]||"0",c=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${o}.${l}.${u}${c}${d}`,t)}},8767(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r)=>{let i=new s(e,r),a=new s(t,r);return i.compare(a)||i.compareBuild(a)}},6293(e,t,r){"use strict";let s=r(6958);e.exports=(e,t)=>s(e,t,!0)},6958(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r)=>new s(e,r).compare(new s(t,r))},3086(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,null,!0),i=s(t,null,!0),a=r.compare(i);if(0===a)return null;let n=a>0,o=n?r:i,l=n?i:r,u=!!o.prerelease.length;if(l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(o))return l.minor&&!l.patch?"minor":"patch"}let c=u?"pre":"";return r.major!==i.major?c+"major":r.minor!==i.minor?c+"minor":r.patch!==i.patch?c+"patch":"prerelease"}},8271(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0===s(e,t,r)},1686(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(e,t,r)>0},6479(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(e,t,r)>=0},3625(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r,i,a)=>{"string"==typeof r&&(a=i,i=r,r=void 0);try{return new s(e instanceof s?e.version:e,r).inc(t,i,a).version}catch(e){return null}}},7257(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0>s(e,t,r)},5850(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0>=s(e,t,r)},7744(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).major},4812(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).minor},733(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>0!==s(e,t,r)},6802(e,t,r){"use strict";let s=r(2398);e.exports=(e,t,r=!1)=>{if(e instanceof s)return e;try{return new s(e,t)}catch(e){if(!r)return null;throw e}}},8643(e,t,r){"use strict";let s=r(2398);e.exports=(e,t)=>new s(e,t).patch},9283(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,t);return r&&r.prerelease.length?r.prerelease:null}},7032(e,t,r){"use strict";let s=r(6958);e.exports=(e,t,r)=>s(t,e,r)},9839(e,t,r){"use strict";let s=r(8767);e.exports=(e,t)=>e.sort((e,r)=>s(r,e,t))},4056(e,t,r){"use strict";let s=r(2069);e.exports=(e,t,r)=>{try{t=new s(t,r)}catch(e){return!1}return t.test(e)}},7697(e,t,r){"use strict";let s=r(8767);e.exports=(e,t)=>e.sort((e,r)=>s(e,r,t))},6807(e,t,r){"use strict";let s=r(6802);e.exports=(e,t)=>{let r=s(e,t);return r?r.version:null}},3895(e,t,r){"use strict";let s=r(152),i=r(5076),a=r(2398),n=r(9101),o=r(6802),l=r(6807),u=r(5608),c=r(3625),d=r(3086),p=r(7744),f=r(4812),h=r(8643),m=r(9283),y=r(6958),g=r(7032),v=r(6293),_=r(8767),b=r(7697),w=r(9839),$=r(1686),E=r(7257),k=r(8271),x=r(733),S=r(6479),T=r(5850),P=r(5461),I=r(7771),O=r(8610),j=r(2069),R=r(4056),N=r(6613),C=r(7114),A=r(1008),z=r(203),M=r(5372),D=r(4713),L=r(4497),q=r(9272),U=r(3490);e.exports={parse:o,valid:l,clean:u,inc:c,diff:d,major:p,minor:f,patch:h,prerelease:m,compare:y,rcompare:g,compareLoose:v,compareBuild:_,sort:b,rsort:w,gt:$,lt:E,eq:k,neq:x,gte:S,lte:T,cmp:P,coerce:I,Comparator:O,Range:j,satisfies:R,toComparators:N,maxSatisfying:C,minSatisfying:A,minVersion:z,validRange:M,outside:D,gtr:L,ltr:q,intersects:U,simplifyRange:r(4039),subset:r(22),SemVer:a,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers}},5076(e){"use strict";e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||0x1fffffffffffff,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},674(e){"use strict";e.exports="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{}},9101(e){"use strict";let t=/^[0-9]+$/,r=(e,r)=>{if("number"==typeof e&&"number"==typeof r)return e===r?0:e<r?-1:1;let s=t.test(e),i=t.test(r);return s&&i&&(e*=1,r*=1),e===r?0:s&&!i?-1:i&&!s?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},2044(e){"use strict";e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},4621(e){"use strict";let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},152(e,t,r){"use strict";let{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:a}=r(5076),n=r(674),o=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={},p=0,f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",a],[f,i]],m=(e,t,r)=>{let s=(e=>{for(let[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;n(e,i,t),d[e]=i,u[i]=t,c[i]=s,o[i]=new RegExp(t,r?"g":void 0),l[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NONNUMERICIDENTIFIER]}|${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${f}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},4497(e,t,r){"use strict";let s=r(4713);e.exports=(e,t,r)=>s(e,t,">",r)},3490(e,t,r){"use strict";let s=r(2069);e.exports=(e,t,r)=>(e=new s(e,r),t=new s(t,r),e.intersects(t,r))},9272(e,t,r){"use strict";let s=r(4713);e.exports=(e,t,r)=>s(e,t,"<",r)},7114(e,t,r){"use strict";let s=r(2398),i=r(2069);e.exports=(e,t,r)=>{let a=null,n=null,o=null;try{o=new i(t,r)}catch(e){return null}return e.forEach(e=>{o.test(e)&&(!a||-1===n.compare(e))&&(n=new s(a=e,r))}),a}},1008(e,t,r){"use strict";let s=r(2398),i=r(2069);e.exports=(e,t,r)=>{let a=null,n=null,o=null;try{o=new i(t,r)}catch(e){return null}return e.forEach(e=>{o.test(e)&&(!a||1===n.compare(e))&&(n=new s(a=e,r))}),a}},203(e,t,r){"use strict";let s=r(2398),i=r(2069),a=r(1686);e.exports=(e,t)=>{e=new i(e,t);let r=new s("0.0.0");if(e.test(r)||(r=new s("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let i=e.set[t],n=null;i.forEach(e=>{let t=new s(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||a(t,n))&&(n=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),n&&(!r||a(r,n))&&(r=n)}return r&&e.test(r)?r:null}},4713(e,t,r){"use strict";let s=r(2398),i=r(8610),{ANY:a}=i,n=r(2069),o=r(4056),l=r(1686),u=r(7257),c=r(5850),d=r(6479);e.exports=(e,t,r,p)=>{let f,h,m,y,g;switch(e=new s(e,p),t=new n(t,p),r){case">":f=l,h=c,m=u,y=">",g=">=";break;case"<":f=u,h=d,m=l,y="<",g="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(o(e,t,p))return!1;for(let r=0;r<t.set.length;++r){let s=t.set[r],n=null,o=null;if(s.forEach(e=>{e.semver===a&&(e=new i(">=0.0.0")),n=n||e,o=o||e,f(e.semver,n.semver,p)?n=e:m(e.semver,o.semver,p)&&(o=e)}),n.operator===y||n.operator===g||(!o.operator||o.operator===y)&&h(e,o.semver)||o.operator===g&&m(e,o.semver))return!1}return!0}},4039(e,t,r){"use strict";let s=r(4056),i=r(6958);e.exports=(e,t,r)=>{let a=[],n=null,o=null,l=e.sort((e,t)=>i(e,t,r));for(let e of l)s(e,t,r)?(o=e,n||(n=e)):(o&&a.push([n,o]),o=null,n=null);n&&a.push([n,null]);let u=[];for(let[e,t]of a)e===t?u.push(e):t||e!==l[0]?t?e===l[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let c=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},22(e,t,r){"use strict";let s=r(2069),i=r(8610),{ANY:a}=i,n=r(4056),o=r(6958),l=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],c=(e,t,r)=>{let s,i,c,f,h,m,y;if(e===t)return!0;if(1===e.length&&e[0].semver===a)if(1===t.length&&t[0].semver===a)return!0;else e=r.includePrerelease?l:u;if(1===t.length&&t[0].semver===a)if(r.includePrerelease)return!0;else t=u;let g=new Set;for(let t of e)">"===t.operator||">="===t.operator?s=d(s,t,r):"<"===t.operator||"<="===t.operator?i=p(i,t,r):g.add(t.semver);if(g.size>1)return null;if(s&&i&&((c=o(s.semver,i.semver,r))>0||0===c&&(">="!==s.operator||"<="!==i.operator)))return null;for(let e of g){if(s&&!n(e,String(s),r)||i&&!n(e,String(i),r))return null;for(let s of t)if(!n(e,String(s),r))return!1;return!0}let v=!!i&&!r.includePrerelease&&!!i.semver.prerelease.length&&i.semver,_=!!s&&!r.includePrerelease&&!!s.semver.prerelease.length&&s.semver;for(let e of(v&&1===v.prerelease.length&&"<"===i.operator&&0===v.prerelease[0]&&(v=!1),t)){if(y=y||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,s){if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),">"===e.operator||">="===e.operator){if((f=d(s,e,r))===e&&f!==s)return!1}else if(">="===s.operator&&!n(s.semver,String(e),r))return!1}if(i){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if((h=p(i,e,r))===e&&h!==i)return!1}else if("<="===i.operator&&!n(i.semver,String(e),r))return!1}if(!e.operator&&(i||s)&&0!==c)return!1}return(!s||!m||!!i||0===c)&&(!i||!y||!!s||0===c)&&!_&&!v&&!0},d=(e,t,r)=>{if(!e)return t;let s=o(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;let s=o(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new s(e,r),t=new s(t,r);let i=!1;e:for(let s of e.set){for(let e of t.set){let t=c(s,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},6613(e,t,r){"use strict";let s=r(2069);e.exports=(e,t)=>new s(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},5372(e,t,r){"use strict";let s=r(2069);e.exports=(e,t)=>{try{return new s(e,t).range||"*"}catch(e){return null}}},600(e,t,r){"use strict";let s=r(9638);e.exports=(e="")=>{let t=e.match(s);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,"").split(" "),a=r.split("/").pop();return"env"===a?i:i?`${a} ${i}`:a}},9638(e){"use strict";e.exports=/^#!(.*)/},1905(e,t,r){let s="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,i=r(6928),a=s?";":":",n=r(9344),o=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),l=(e,t)=>{let r=t.colon||a,i=e.match(/\//)||s&&e.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],n=s?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=s?n.split(r):[""];return s&&-1!==e.indexOf(".")&&""!==o[0]&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:n}},u=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});let{pathEnv:s,pathExt:a,pathExtExe:u}=l(e,t),c=[],d=r=>new Promise((a,n)=>{if(r===s.length)return t.all&&c.length?a(c):n(o(e));let l=s[r],u=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(u,e);a(p(!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d,r,0))}),p=(e,r,s)=>new Promise((i,o)=>{if(s===a.length)return i(d(r+1));let l=a[s];n(e+l,{pathExt:u},(a,n)=>{if(!a&&n)if(!t.all)return i(e+l);else c.push(e+l);return i(p(e,r,s+1))})});return r?d(0).then(e=>r(null,e),r):d(0)};e.exports=u,u.sync=(e,t)=>{let{pathEnv:r,pathExt:s,pathExtExe:a}=l(e,t=t||{}),u=[];for(let o=0;o<r.length;o++){let l=r[o],c=/^".*"$/.test(l)?l.slice(1,-1):l,d=i.join(c,e),p=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<s.length;e++){let r=p+s[e];try{if(n.sync(r,{pathExt:a}))if(!t.all)return r;else u.push(r)}catch(e){}}}if(t.all&&u.length)return u;if(t.nothrow)return null;throw o(e)}},181(e){"use strict";e.exports=require("buffer")},5317(e){"use strict";e.exports=require("child_process")},6982(e){"use strict";e.exports=require("crypto")},9896(e){"use strict";e.exports=require("fs")},7598(e){"use strict";e.exports=require("node:crypto")},857(e){"use strict";e.exports=require("os")},6928(e){"use strict";e.exports=require("path")},2203(e){"use strict";e.exports=require("stream")},9023(e){"use strict";e.exports=require("util")},5019(e,t,r){"use strict";let{normalizeIPv6:s,removeDotSegments:i,recomposeAuthority:a,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:l}=r(6214),{SCHEMES:u,getSchemeHandler:c}=r(1528);function d(e,t,r,s){let a={};return s||(e=h(p(e,r),r),t=h(p(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=i(t.path||""),a.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=i(t.path||""),a.query=t.query):(t.path?("/"===t.path[0]?a.path=i(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:a.path=t.path:a.path="/"+t.path,a.path=i(a.path)),a.query=t.query):(a.path=e.path,void 0!==t.query?a.query=t.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function p(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},t),n=[],o=c(s.scheme||r.scheme);o&&o.serialize&&o.serialize(r,s),void 0!==r.path&&(s.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),void 0!==r.scheme&&(r.path=r.path.split("%3A").join(":")))),"suffix"!==s.reference&&r.scheme&&n.push(r.scheme,":");let l=a(r);if(void 0!==l&&("suffix"!==s.reference&&n.push("//"),n.push(l),r.path&&"/"!==r.path[0]&&n.push("/")),void 0!==r.path){let e=r.path;s.absolutePath||o&&o.absolutePath||(e=i(e)),void 0===l&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),n.push(e)}return void 0!==r.query&&n.push("?",r.query),void 0!==r.fragment&&n.push("#",r.fragment),n.join("")}let f=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function h(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=!1;"suffix"===r.reference&&(e=r.scheme?r.scheme+":"+e:"//"+e);let n=e.match(f);if(n){if(i.scheme=n[1],i.userinfo=n[3],i.host=n[4],i.port=parseInt(n[5],10),i.path=n[6]||"",i.query=n[7],i.fragment=n[8],isNaN(i.port)&&(i.port=n[5]),i.host)if(!1===o(i.host)){let e=s(i.host);i.host=e.host.toLowerCase(),a=e.isIPV6}else a=!0;void 0!==i.scheme||void 0!==i.userinfo||void 0!==i.host||void 0!==i.port||void 0!==i.query||i.path?void 0===i.scheme?i.reference="relative":void 0===i.fragment?i.reference="absolute":i.reference="uri":i.reference="same-document",r.reference&&"suffix"!==r.reference&&r.reference!==i.reference&&(i.error=i.error||"URI is not a "+r.reference+" reference.");let t=c(r.scheme||i.scheme);if(!r.unicodeSupport&&(!t||!t.unicodeSupport)&&i.host&&(r.domainHost||t&&t.domainHost)&&!1===a&&l(i.host))try{i.host=URL.domainToASCII(i.host.toLowerCase())}catch(e){i.error=i.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==i.scheme&&(i.scheme=unescape(i.scheme)),void 0!==i.host&&(i.host=unescape(i.host))),i.path&&(i.path=escape(unescape(i.path))),i.fragment&&(i.fragment=encodeURI(decodeURIComponent(i.fragment)))),t&&t.parse&&t.parse(i,r)}else i.error=i.error||"URI can not be parsed.";return i}let m={SCHEMES:u,normalize:function(e,t){return"string"==typeof e?e=p(h(e,t),t):"object"==typeof e&&(e=h(p(e,t),t)),e},resolve:function(e,t,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=d(h(e,s),h(t,s),s,!0);return s.skipEscape=!0,p(i,s)},resolveComponent:d,equal:function(e,t,r){return"string"==typeof e?e=p(n(h(e=unescape(e),r),!0),{...r,skipEscape:!0}):"object"==typeof e&&(e=p(n(e,!0),{...r,skipEscape:!0})),"string"==typeof t?t=p(n(h(t=unescape(t),r),!0),{...r,skipEscape:!0}):"object"==typeof t&&(t=p(n(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:p,parse:h};e.exports=m,e.exports.default=m,e.exports.fastUri=m},1528(e,t,r){"use strict";let{isUUID:s}=r(6214),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,a=["http","https","ws","wss","urn","urn:uuid"];function n(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function o(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function l(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}let u={scheme:"http",domainHost:!0,parse:o,serialize:l},c={scheme:"https",domainHost:u.domainHost,parse:o,serialize:l},d={scheme:"ws",domainHost:!0,parse:function(e){return e.secure=n(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function(e){if((e.port===(n(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}},p={scheme:"wss",domainHost:d.domainHost,parse:d.parse,serialize:d.serialize},f={http:u,https:c,ws:d,wss:p,urn:{scheme:"urn",parse:function(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(i);if(r){let s=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let i=h(`${s}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",s=e.nid.toLowerCase(),i=h(`${r}:${t.nid||s}`);i&&(e=i.serialize(e,t));let a=e,n=e.nss;return a.path=`${s||t.nid}:${n}`,t.skipEscape=!0,a},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function(e,t){return e.uuid=e.nss,e.nss=void 0,t.tolerant||e.uuid&&s(e.uuid)||(e.error=e.error||"UUID is not valid."),e},serialize:function(e){return e.nss=(e.uuid||"").toLowerCase(),e},skipNormalize:!0}};function h(e){return e&&(f[e]||f[e.toLowerCase()])||void 0}Object.setPrototypeOf(f,null),e.exports={wsIsSecure:n,SCHEMES:f,isValidSchemeName:function(e){return -1!==a.indexOf(e)},getSchemeHandler:h}},6214(e){"use strict";let t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function s(e){let t="",r=0,s=0;for(s=0;s<e.length;s++)if(48!==(r=e[s].charCodeAt(0))){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s];break}for(s+=1;s<e.length;s++){if(!((r=e[s].charCodeAt(0))>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[s]}return t}function i(e){return e.length=0,!0}function a(e,t,r){if(e.length){let i=s(e);if(""===i)return r.error=!0,!1;t.push(i),e.length=0}return!0}function n(e){if(2>function(e,t){let r=0;for(let t=0;t<e.length;t++)":"===e[t]&&r++;return r}(e,":"))return{host:e,isIPV6:!1};let t=function(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],l=!1,u=!1,c=a;for(let s=0;s<e.length;s++){let a=e[s];if("["!==a&&"]"!==a)if(":"===a){if(!0===l&&(u=!0),!c(o,n,r))break;if(++t>7){r.error=!0;break}s>0&&":"===e[s-1]&&(l=!0),n.push(":");continue}else if("%"===a){if(!c(o,n,r))break;c=i}else{o.push(a);continue}}return o.length&&(c===i?r.zone=o.join(""):u?n.push(o.join("")):n.push(s(o))),r.address=n.join(""),r}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,r=t.address;return t.zone&&(e+="%"+t.zone,r+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:r}}}e.exports={nonSimpleDomain:RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),recomposeAuthority:function(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let s=unescape(e.host);if(!r(s)){let t=n(s);s=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(s)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function(e,t){let r=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=r(e.scheme)),void 0!==e.userinfo&&(e.userinfo=r(e.userinfo)),void 0!==e.host&&(e.host=r(e.host)),void 0!==e.path&&(e.path=r(e.path)),void 0!==e.query&&(e.query=r(e.query)),void 0!==e.fragment&&(e.fragment=r(e.fragment)),e},removeDotSegments:function(e){let t=e,r=[],s=-1,i=0;for(;i=t.length;){if(1===i)if("."===t)break;else if("/"===t){r.push("/");break}else{r.push(t);break}if(2===i){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){r.push("/");break}}else if(3===i&&"/.."===t){0!==r.length&&r.pop(),r.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==r.length&&r.pop();continue}}if(-1===(s=t.indexOf("/",1))){r.push(t);break}r.push(t.slice(0,s)),t=t.slice(s)}return r.join("")},isIPv4:r,isUUID:t,normalizeIPv6:n,stringArrayToHexStripped:s}},114(e){"use strict";e.exports=JSON.parse('{"$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":false}')},7456(e){"use strict";e.exports=JSON.parse('{"$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":true,"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":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"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":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"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":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"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":true}')},4519(e){"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.6.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},8330(e){"use strict";e.exports=JSON.parse('{"name":"xmcp","description":"The MCP framework","version":"0.6.9","author":{"name":"xmcp","email":"support@xmcp.dev","url":"https://xmcp.dev"},"contributors":[{"name":"Valentina Bearzotti","email":"valebearzotti1@gmail.com","url":"https://github.com/valebearzotti"},{"name":"Jose Rago","email":"jose@basement.studio","url":"https://github.com/ragojose"}],"license":"MIT","keywords":["mcp","modelcontextprotocol","http","stdio"],"repository":{"type":"git","url":"https://github.com/basementstudio/xmcp"},"homepage":"https://xmcp.dev","type":"commonjs","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"xmcp":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.js","default":"./dist/index.js"},"./host-bridge":{"types":"./dist/host-bridge.d.ts","import":"./dist/host-bridge.js","require":"./dist/host-bridge.js","default":"./dist/host-bridge.js"},"./headers":{"types":"./dist/runtime/headers.d.ts","require":"./dist/runtime/headers.js","default":"./dist/runtime/headers.js"},"./cloudflare":{"types":"./dist/cloudflare.d.ts","import":"./dist/cloudflare.js","require":"./dist/cloudflare.js","default":"./dist/cloudflare.js"},"./package.json":"./package.json"},"typesVersions":{"*":{"host-bridge":["dist/host-bridge.d.ts"],"headers":["dist/runtime/headers.d.ts"],"cloudflare":["dist/cloudflare.d.ts"]}},"files":["dist","src"],"scripts":{"dev":"cross-env NODE_ENV=development tsx --watch --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","build":"cross-env NODE_ENV=production tsx --tsconfig ./bundler.tsconfig.json ./bundler/index.ts","analyze":"cross-env GENERATE_STATS=true pnpm build && pnpm tsx scripts/analyze-rspack-stats.ts","test:config":"node --import tsx --test src/compiler/config/__tests__/*.test.ts"},"dependencies":{"@modelcontextprotocol/sdk":"^1.26.0","@rspack/core":"^1.6.7","jose":"^6.1.3","postcss-loader":"^8.2.0","ts-checker-rspack-plugin":"^1.2.1","typescript":"^5.9.3"},"devDependencies":{"@nestjs/common":"^11.1.12","@types/async-retry":"^1.4.9","@types/content-type":"^1.1.9","@types/express":"^5.0.6","@types/fs-extra":"^11.0.4","@types/jsonwebtoken":"^9.0.10","@types/node":"^22.19.2","@types/react":"^19.2.7","@types/react-dom":"^19.2.3","async-retry":"^1.3.3","chalk":"^5.6.2","chokidar":"^3.6.0","ci-info":"^4.3.1","commander":"^11.1.0","content-type":"^1.0.5","cross-env":"^7.0.3","del":"^7.1.0","dotenv":"^16.6.1","express":"^4.22.1","fs-extra":"^11.3.2","glob":"^11.1.0","is-docker":"^4.0.0","is-wsl":"^3.1.0","json5":"^2.2.3","jsonwebtoken":"^9.0.3","memfs":"^4.51.1","raw-body":"^3.0.2","reflect-metadata":"^0.2.2","rxjs":"^7.8.2","tsx":"^4.21.0"},"peerDependencies":{"react":">=19.0.0","react-dom":">=19.0.0","zod":"^3.25.76 || ^4.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"react-dom":{"optional":true}}}')}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var a=s[e]={exports:{}};return r[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(r,s){if(1&s&&(r=this(r)),8&s||"object"==typeof r&&r&&(4&s&&r.__esModule||16&s&&"function"==typeof r.then))return r;var a=Object.create(null);i.r(a);var n={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&r;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>{n[e]=()=>r[e]});return n.default=()=>r,i.d(a,n),a},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";let e,t,r,s,n;i.r(a),i.d(a,{createHTTPClient:()=>lO,HOST_CONTEXT_CHANGED_METHOD:()=>lK,UPDATE_MODEL_CONTEXT_METHOD:()=>lU,UrlElicitationRequiredError:()=>ou,isEnvHeader:()=>lx,createSTDIOClient:()=>lj,jwtAuthMiddleware:()=>eQ,listSTDIOClientTools:()=>lR,createMcpHostBridge:()=>lW,SIZE_CHANGED_METHOD:()=>lH,INITIALIZE_METHOD:()=>lM,LOG_MESSAGE_METHOD:()=>lV,INITIALIZED_METHOD:()=>lD,OPEN_LINK_METHOD:()=>lq,REQUEST_DISPLAY_MODE_METHOD:()=>lL,disconnectSTDIOClient:()=>lC,RESOURCES_READ_METHOD:()=>lF,createContext:()=>e9,callSTDIOClientTool:()=>lN,headersToRecord:()=>lS,MCP_APPS_PROTOCOL_VERSION:()=>lz,extractToolNamesFromRequest:()=>lA,UI_MESSAGE_METHOD:()=>lZ,apiKeyAuthMiddleware:()=>eJ,completable:()=>e6});var o,l,u,c,d,p,f,h,m,y,g,v,_,b,w,$,E,k=i(8583),x=i.n(k);(o=y||(y={})).assertEqual=e=>{},o.assertIs=function(e){},o.assertNever=function(e){throw Error()},o.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},o.getValidEnumValues=e=>{let t=o.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let s of t)r[s]=e[s];return o.objectValues(r)},o.objectValues=e=>o.objectKeys(e).map(function(t){return e[t]}),o.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},o.find=(e,t)=>{for(let r of e)if(t(r))return r},o.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,o.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},o.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(g||(g={})).mergeShapes=(e,t)=>({...e,...t});let S=y.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),T=e=>{switch(typeof e){case"undefined":return S.undefined;case"string":return S.string;case"number":return Number.isNaN(e)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":if(Array.isArray(e))return S.array;if(null===e)return S.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return S.promise;if("undefined"!=typeof Map&&e instanceof Map)return S.map;if("undefined"!=typeof Set&&e instanceof Set)return S.set;if("undefined"!=typeof Date&&e instanceof Date)return S.date;return S.object;default:return S.unknown}},P=y.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"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},s=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(s);else if("invalid_return_type"===i.code)s(i.returnTypeError);else if("invalid_arguments"===i.code)s(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,s=0;for(;s<i.path.length;){let r=i.path[s];s===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],s++}}};return s(this),r}static assert(e){if(!(e instanceof I))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,y.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t=Object.create(null),r=[];for(let s of this.issues)if(s.path.length>0){let r=s.path[0];t[r]=t[r]||[],t[r].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=e=>new I(e);let O=(e,t)=>{let r;switch(e.code){case P.invalid_type:r=e.received===S.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case P.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,y.jsonStringifyReplacer)}`;break;case P.unrecognized_keys:r=`Unrecognized key(s) in object: ${y.joinValues(e.keys,", ")}`;break;case P.invalid_union:r="Invalid input";break;case P.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${y.joinValues(e.options)}`;break;case P.invalid_enum_value:r=`Invalid enum value. Expected ${y.joinValues(e.options)}, received '${e.received}'`;break;case P.invalid_arguments:r="Invalid function arguments";break;case P.invalid_return_type:r="Invalid function return type";break;case P.invalid_date:r="Invalid date";break;case P.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(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}"`:y.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case P.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case P.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case P.custom:r="Invalid input";break;case P.invalid_intersection_types:r="Intersection results could not be merged";break;case P.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case P.not_finite:r="Number must be finite";break;default:r=t.defaultError,y.assertNever(e)}return{message:r}},j=e=>{let{data:t,path:r,errorMaps:s,issueData:i}=e,a=[...r,...i.path||[]],n={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let o="";for(let e of s.filter(e=>!!e).slice().reverse())o=e(n,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function R(e,t){let r=j({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,O,void 0].filter(e=>!!e)});e.common.issues.push(r)}class N{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let s of t){if("aborted"===s.status)return C;"dirty"===s.status&&e.dirty(),r.push(s.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,s=await e.value;r.push({key:t,value:s})}return N.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let s of t){let{key:t,value:i}=s;if("aborted"===t.status||"aborted"===i.status)return C;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||s.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let C=Object.freeze({status:"aborted"}),A=e=>({status:"dirty",value:e}),z=e=>({status:"valid",value:e}),M=e=>"undefined"!=typeof Promise&&e instanceof Promise;(l=v||(v={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},l.toString=e=>"string"==typeof e?e:e?.message;class D{constructor(e,t,r,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=s}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}}let L=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new I(e.common.issues);return this._error=t,this._error}}};function q(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:s,description:i}=e;if(t&&(r||s))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return"invalid_enum_value"===t.code?{message:a??i.defaultError}:void 0===i.data?{message:a??s??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:a??r??i.defaultError}},description:i}}class U{get description(){return this._def.description}_getType(e){return T(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new N,ctx:{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(M(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},s=this._parseSync({data:e,path:r.path,parent:r});return L(r,s)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return"valid"===r.status?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},s=this._parse({data:e,path:r.path,parent:r});return L(r,await (M(s)?s:Promise.resolve(s)))}refine(e,t){return this._refinement((r,s)=>{let i=e(r),a=()=>s.addIssue({code:P.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,s)=>!!e(r)||(s.addIssue("function"==typeof t?t(r,s):t),!1))}_refinement(e){return new eC({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eA.create(this,this._def)}nullable(){return ez.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eg.create(this)}promise(){return eN.create(this,this._def)}or(e){return e_.create([this,e],this._def)}and(e){return e$.create(this,e,this._def)}transform(e){return new eC({...q(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eM({...q(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:_.ZodDefault})}brand(){return new eq({typeName:_.ZodBranded,type:this,...q(this._def)})}catch(e){return new eD({...q(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:_.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eU.create(this,e)}readonly(){return eZ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let Z=/^c[^\s-]{8,}$/i,V=/^[0-9a-z]+$/,F=/^[0-9A-HJKMNP-TV-Z]{26}$/i,K=/^[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,H=/^[a-z0-9_-]{21}$/i,G=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,B=/^[-+]?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)?)??$/,W=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,J=/^(?:(?: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])$/,X=/^(?:(?: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])$/,Y=/^(([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]))$/,Q=/^(([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])$/,ee=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,et=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,er="((\\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])))",es=RegExp(`^${er}$`);function ei(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}class ea extends U{_parse(t){var r,s,i,a;let n;if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==S.string){let e=this._getOrReturnCtx(t);return R(e,{code:P.invalid_type,expected:S.string,received:e.parsedType}),C}let o=new N;for(let l of this._def.checks)if("min"===l.kind)t.data.length<l.value&&(R(n=this._getOrReturnCtx(t,n),{code:P.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("max"===l.kind)t.data.length>l.value&&(R(n=this._getOrReturnCtx(t,n),{code:P.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("length"===l.kind){let e=t.data.length>l.value,r=t.data.length<l.value;(e||r)&&(n=this._getOrReturnCtx(t,n),e?R(n,{code:P.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):r&&R(n,{code:P.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if("email"===l.kind)W.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"email",code:P.invalid_string,message:l.message}),o.dirty());else if("emoji"===l.kind)e||(e=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),e.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"emoji",code:P.invalid_string,message:l.message}),o.dirty());else if("uuid"===l.kind)K.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"uuid",code:P.invalid_string,message:l.message}),o.dirty());else if("nanoid"===l.kind)H.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"nanoid",code:P.invalid_string,message:l.message}),o.dirty());else if("cuid"===l.kind)Z.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"cuid",code:P.invalid_string,message:l.message}),o.dirty());else if("cuid2"===l.kind)V.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"cuid2",code:P.invalid_string,message:l.message}),o.dirty());else if("ulid"===l.kind)F.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"ulid",code:P.invalid_string,message:l.message}),o.dirty());else if("url"===l.kind)try{new URL(t.data)}catch{R(n=this._getOrReturnCtx(t,n),{validation:"url",code:P.invalid_string,message:l.message}),o.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"regex",code:P.invalid_string,message:l.message}),o.dirty())):"trim"===l.kind?t.data=t.data.trim():"includes"===l.kind?t.data.includes(l.value,l.position)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):"toLowerCase"===l.kind?t.data=t.data.toLowerCase():"toUpperCase"===l.kind?t.data=t.data.toUpperCase():"startsWith"===l.kind?t.data.startsWith(l.value)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):"endsWith"===l.kind?t.data.endsWith(l.value)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):"datetime"===l.kind?(function(e){let t=`${er}T${ei(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)})(l).test(t.data)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:"datetime",message:l.message}),o.dirty()):"date"===l.kind?es.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:"date",message:l.message}),o.dirty()):"time"===l.kind?RegExp(`^${ei(l)}$`).test(t.data)||(R(n=this._getOrReturnCtx(t,n),{code:P.invalid_string,validation:"time",message:l.message}),o.dirty()):"duration"===l.kind?B.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"duration",code:P.invalid_string,message:l.message}),o.dirty()):"ip"===l.kind?(r=t.data,!(("v4"===(s=l.version)||!s)&&J.test(r)||("v6"===s||!s)&&Y.test(r))&&1&&(R(n=this._getOrReturnCtx(t,n),{validation:"ip",code:P.invalid_string,message:l.message}),o.dirty())):"jwt"===l.kind?!function(e,t){if(!G.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(s));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(t.data,l.alg)&&(R(n=this._getOrReturnCtx(t,n),{validation:"jwt",code:P.invalid_string,message:l.message}),o.dirty()):"cidr"===l.kind?(i=t.data,!(("v4"===(a=l.version)||!a)&&X.test(i)||("v6"===a||!a)&&Q.test(i))&&1&&(R(n=this._getOrReturnCtx(t,n),{validation:"cidr",code:P.invalid_string,message:l.message}),o.dirty())):"base64"===l.kind?ee.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"base64",code:P.invalid_string,message:l.message}),o.dirty()):"base64url"===l.kind?et.test(t.data)||(R(n=this._getOrReturnCtx(t,n),{validation:"base64url",code:P.invalid_string,message:l.message}),o.dirty()):y.assertNever(l);return{status:o.value,value:t.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:P.invalid_string,...v.errToObj(r)})}_addCheck(e){return new ea({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...v.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...v.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...v.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...v.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...v.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...v.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...v.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...v.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...v.errToObj(t)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new ea({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ea({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ea({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ea.create=e=>new ea({checks:[],typeName:_.ZodString,coerce:e?.coerce??!1,...q(e)});class en extends U{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==S.number){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.number,received:t.parsedType}),C}let r=new N;for(let s of this._def.checks)"int"===s.kind?y.isInteger(e.data)||(R(t=this._getOrReturnCtx(e,t),{code:P.invalid_type,expected:"integer",received:"float",message:s.message}),r.dirty()):"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),r.dirty()):"multipleOf"===s.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,i=r>s?r:s;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(R(t=this._getOrReturnCtx(e,t),{code:P.not_finite,message:s.message}),r.dirty()):y.assertNever(s);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,r,s){return new en({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:v.toString(s)}]})}_addCheck(e){return new en({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&y.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}en.create=e=>new en({checks:[],typeName:_.ZodNumber,coerce:e?.coerce||!1,...q(e)});class eo extends U{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==S.bigint)return this._getInvalidInput(e);let r=new N;for(let s of this._def.checks)"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(R(t=this._getOrReturnCtx(e,t),{code:P.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):y.assertNever(s);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.bigint,received:t.parsedType}),C}gte(e,t){return this.setLimit("min",e,!0,v.toString(t))}gt(e,t){return this.setLimit("min",e,!1,v.toString(t))}lte(e,t){return this.setLimit("max",e,!0,v.toString(t))}lt(e,t){return this.setLimit("max",e,!1,v.toString(t))}setLimit(e,t,r,s){return new eo({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:v.toString(s)}]})}_addCheck(e){return new eo({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}eo.create=e=>new eo({checks:[],typeName:_.ZodBigInt,coerce:e?.coerce??!1,...q(e)});class el extends U{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==S.boolean){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.boolean,received:t.parsedType}),C}return z(e.data)}}el.create=e=>new el({typeName:_.ZodBoolean,coerce:e?.coerce||!1,...q(e)});class eu extends U{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==S.date){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.date,received:t.parsedType}),C}if(Number.isNaN(e.data.getTime()))return R(this._getOrReturnCtx(e),{code:P.invalid_date}),C;let r=new N;for(let s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(R(t=this._getOrReturnCtx(e,t),{code:P.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):y.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new eu({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:v.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}eu.create=e=>new eu({checks:[],coerce:e?.coerce||!1,typeName:_.ZodDate,...q(e)});class ec extends U{_parse(e){if(this._getType(e)!==S.symbol){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.symbol,received:t.parsedType}),C}return z(e.data)}}ec.create=e=>new ec({typeName:_.ZodSymbol,...q(e)});class ed extends U{_parse(e){if(this._getType(e)!==S.undefined){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.undefined,received:t.parsedType}),C}return z(e.data)}}ed.create=e=>new ed({typeName:_.ZodUndefined,...q(e)});class ep extends U{_parse(e){if(this._getType(e)!==S.null){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.null,received:t.parsedType}),C}return z(e.data)}}ep.create=e=>new ep({typeName:_.ZodNull,...q(e)});class ef extends U{constructor(){super(...arguments),this._any=!0}_parse(e){return z(e.data)}}ef.create=e=>new ef({typeName:_.ZodAny,...q(e)});class eh extends U{constructor(){super(...arguments),this._unknown=!0}_parse(e){return z(e.data)}}eh.create=e=>new eh({typeName:_.ZodUnknown,...q(e)});class em extends U{_parse(e){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.never,received:t.parsedType}),C}}em.create=e=>new em({typeName:_.ZodNever,...q(e)});class ey extends U{_parse(e){if(this._getType(e)!==S.undefined){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.void,received:t.parsedType}),C}return z(e.data)}}ey.create=e=>new ey({typeName:_.ZodVoid,...q(e)});class eg extends U{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),s=this._def;if(t.parsedType!==S.array)return R(t,{code:P.invalid_type,expected:S.array,received:t.parsedType}),C;if(null!==s.exactLength){let e=t.data.length>s.exactLength.value,i=t.data.length<s.exactLength.value;(e||i)&&(R(t,{code:e?P.too_big:P.too_small,minimum:i?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(R(t,{code:P.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(R(t,{code:P.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>s.type._parseAsync(new D(t,e,t.path,r)))).then(e=>N.mergeArray(r,e));let i=[...t.data].map((e,r)=>s.type._parseSync(new D(t,e,t.path,r)));return N.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new eg({...this._def,minLength:{value:e,message:v.toString(t)}})}max(e,t){return new eg({...this._def,maxLength:{value:e,message:v.toString(t)}})}length(e,t){return new eg({...this._def,exactLength:{value:e,message:v.toString(t)}})}nonempty(e){return this.min(1,e)}}eg.create=(e,t)=>new eg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...q(t)});class ev extends U{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=y.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==S.object){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.object,received:t.parsedType}),C}let{status:t,ctx:r}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof em&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||a.push(e);let n=[];for(let e of i){let t=s[e],i=r.data[e];n.push({key:{status:"valid",value:e},value:t._parse(new D(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof em){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)n.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(R(r,{code:P.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let s=r.data[t];n.push({key:{status:"valid",value:t},value:e._parse(new D(r,s,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of n){let r=await t.key,s=await t.value;e.push({key:r,value:s,alwaysSet:t.alwaysSet})}return e}).then(e=>N.mergeObjectSync(t,e)):N.mergeObjectSync(t,n)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new ev({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let s=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:v.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ev({...this._def,unknownKeys:"strip"})}passthrough(){return new ev({...this._def,unknownKeys:"passthrough"})}extend(e){return new ev({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ev({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ev({...this._def,catchall:e})}pick(e){let t={};for(let r of y.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new ev({...this._def,shape:()=>t})}omit(e){let t={};for(let r of y.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new ev({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ev){let r={};for(let s in t.shape){let i=t.shape[s];r[s]=eA.create(e(i))}return new ev({...t._def,shape:()=>r})}if(t instanceof eg)return new eg({...t._def,type:e(t.element)});if(t instanceof eA)return eA.create(e(t.unwrap()));if(t instanceof ez)return ez.create(e(t.unwrap()));if(t instanceof eE)return eE.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of y.objectKeys(this.shape)){let s=this.shape[r];e&&!e[r]?t[r]=s:t[r]=s.optional()}return new ev({...this._def,shape:()=>t})}required(e){let t={};for(let r of y.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eA;)e=e._def.innerType;t[r]=e}return new ev({...this._def,shape:()=>t})}keyof(){return eO(y.objectKeys(this.shape))}}ev.create=(e,t)=>new ev({shape:()=>e,unknownKeys:"strip",catchall:em.create(),typeName:_.ZodObject,...q(t)}),ev.strictCreate=(e,t)=>new ev({shape:()=>e,unknownKeys:"strict",catchall:em.create(),typeName:_.ZodObject,...q(t)}),ev.lazycreate=(e,t)=>new ev({shape:e,unknownKeys:"strip",catchall:em.create(),typeName:_.ZodObject,...q(t)});class e_ extends U{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new I(e.ctx.common.issues));return R(t,{code:P.invalid_union,unionErrors:r}),C});{let e,s=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:r}),r.common.issues.length&&s.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=s.map(e=>new I(e));return R(t,{code:P.invalid_union,unionErrors:i}),C}}get options(){return this._def.options}}e_.create=(e,t)=>new e_({options:e,typeName:_.ZodUnion,...q(t)});let eb=e=>{if(e instanceof eP)return eb(e.schema);if(e instanceof eC)return eb(e.innerType());if(e instanceof eI)return[e.value];if(e instanceof ej)return e.options;if(e instanceof eR)return y.objectValues(e.enum);else if(e instanceof eM)return eb(e._def.innerType);else if(e instanceof ed)return[void 0];else if(e instanceof ep)return[null];else if(e instanceof eA)return[void 0,...eb(e.unwrap())];else if(e instanceof ez)return[null,...eb(e.unwrap())];else if(e instanceof eq)return eb(e.unwrap());else if(e instanceof eZ)return eb(e.unwrap());else if(e instanceof eD)return eb(e._def.innerType);else return[]};class ew extends U{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.object)return R(t,{code:P.invalid_type,expected:S.object,received:t.parsedType}),C;let r=this.discriminator,s=t.data[r],i=this.optionsMap.get(s);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(R(t,{code:P.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),C)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let s=new Map;for(let r of t){let t=eb(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(s.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);s.set(i,r)}}return new ew({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...q(r)})}}class e$ extends U{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),s=(e,s)=>{if("aborted"===e.status||"aborted"===s.status)return C;let i=function e(t,r){let s=T(t),i=T(r);if(t===r)return{valid:!0,data:t};if(s===S.object&&i===S.object){let s=y.objectKeys(r),i=y.objectKeys(t).filter(e=>-1!==s.indexOf(e)),a={...t,...r};for(let s of i){let i=e(t[s],r[s]);if(!i.valid)return{valid:!1};a[s]=i.data}return{valid:!0,data:a}}if(s===S.array&&i===S.array){if(t.length!==r.length)return{valid:!1};let s=[];for(let i=0;i<t.length;i++){let a=e(t[i],r[i]);if(!a.valid)return{valid:!1};s.push(a.data)}return{valid:!0,data:s}}if(s===S.date&&i===S.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,s.value);return i.valid?(("dirty"===e.status||"dirty"===s.status)&&t.dirty(),{status:t.value,value:i.data}):(R(r,{code:P.invalid_intersection_types}),C)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>s(e,t)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}e$.create=(e,t,r)=>new e$({left:e,right:t,typeName:_.ZodIntersection,...q(r)});class eE extends U{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.array)return R(r,{code:P.invalid_type,expected:S.array,received:r.parsedType}),C;if(r.data.length<this._def.items.length)return R(r,{code:P.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),C;!this._def.rest&&r.data.length>this._def.items.length&&(R(r,{code:P.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...r.data].map((e,t)=>{let s=this._def.items[t]||this._def.rest;return s?s._parse(new D(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(s).then(e=>N.mergeArray(t,e)):N.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new eE({...this._def,rest:e})}}eE.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eE({items:e,typeName:_.ZodTuple,rest:null,...q(t)})};class ek extends U{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.object)return R(r,{code:P.invalid_type,expected:S.object,received:r.parsedType}),C;let s=[],i=this._def.keyType,a=this._def.valueType;for(let e in r.data)s.push({key:i._parse(new D(r,e,r.path,e)),value:a._parse(new D(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?N.mergeObjectAsync(t,s):N.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,r){return new ek(t instanceof U?{keyType:e,valueType:t,typeName:_.ZodRecord,...q(r)}:{keyType:ea.create(),valueType:e,typeName:_.ZodRecord,...q(t)})}}class ex extends U{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.map)return R(r,{code:P.invalid_type,expected:S.map,received:r.parsedType}),C;let s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:s._parse(new D(r,e,r.path,[a,"key"])),value:i._parse(new D(r,t,r.path,[a,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let s=await r.key,i=await r.value;if("aborted"===s.status||"aborted"===i.status)return C;("dirty"===s.status||"dirty"===i.status)&&t.dirty(),e.set(s.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let s=r.key,i=r.value;if("aborted"===s.status||"aborted"===i.status)return C;("dirty"===s.status||"dirty"===i.status)&&t.dirty(),e.set(s.value,i.value)}return{status:t.value,value:e}}}}ex.create=(e,t,r)=>new ex({valueType:t,keyType:e,typeName:_.ZodMap,...q(r)});class eS extends U{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==S.set)return R(r,{code:P.invalid_type,expected:S.set,received:r.parsedType}),C;let s=this._def;null!==s.minSize&&r.data.size<s.minSize.value&&(R(r,{code:P.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&r.data.size>s.maxSize.value&&(R(r,{code:P.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let r=new Set;for(let s of e){if("aborted"===s.status)return C;"dirty"===s.status&&t.dirty(),r.add(s.value)}return{status:t.value,value:r}}let n=[...r.data.values()].map((e,t)=>i._parse(new D(r,e,r.path,t)));return r.common.async?Promise.all(n).then(e=>a(e)):a(n)}min(e,t){return new eS({...this._def,minSize:{value:e,message:v.toString(t)}})}max(e,t){return new eS({...this._def,maxSize:{value:e,message:v.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eS.create=(e,t)=>new eS({valueType:e,minSize:null,maxSize:null,typeName:_.ZodSet,...q(t)});class eT extends U{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==S.function)return R(t,{code:P.invalid_type,expected:S.function,received:t.parsedType}),C;function r(e,r){return j({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,O,O].filter(e=>!!e),issueData:{code:P.invalid_arguments,argumentsError:r}})}function s(e,r){return j({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,O,O].filter(e=>!!e),issueData:{code:P.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof eN){let e=this;return z(async function(...t){let n=new I([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw n.addIssue(r(t,e)),n}),l=await Reflect.apply(a,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw n.addIssue(s(l,e)),n})})}{let e=this;return z(function(...t){let n=e._def.args.safeParse(t,i);if(!n.success)throw new I([r(t,n.error)]);let o=Reflect.apply(a,this,n.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new I([s(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eT({...this._def,args:eE.create(e).rest(eh.create())})}returns(e){return new eT({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eT({args:e||eE.create([]).rest(eh.create()),returns:t||eh.create(),typeName:_.ZodFunction,...q(r)})}}class eP extends U{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eP.create=(e,t)=>new eP({getter:e,typeName:_.ZodLazy,...q(t)});class eI extends U{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return R(t,{received:t.data,code:P.invalid_literal,expected:this._def.value}),C}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eO(e,t){return new ej({values:e,typeName:_.ZodEnum,...q(t)})}eI.create=(e,t)=>new eI({value:e,typeName:_.ZodLiteral,...q(t)});class ej extends U{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return R(t,{expected:y.joinValues(r),received:t.parsedType,code:P.invalid_type}),C}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return R(t,{received:t.data,code:P.invalid_enum_value,options:r}),C}return z(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ej.create(e,{...this._def,...t})}exclude(e,t=this._def){return ej.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ej.create=eO;class eR extends U{_parse(e){let t=y.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==S.string&&r.parsedType!==S.number){let e=y.objectValues(t);return R(r,{expected:y.joinValues(e),received:r.parsedType,code:P.invalid_type}),C}if(this._cache||(this._cache=new Set(y.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=y.objectValues(t);return R(r,{received:r.data,code:P.invalid_enum_value,options:e}),C}return z(e.data)}get enum(){return this._def.values}}eR.create=(e,t)=>new eR({values:e,typeName:_.ZodNativeEnum,...q(t)});class eN extends U{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==S.promise&&!1===t.common.async?(R(t,{code:P.invalid_type,expected:S.promise,received:t.parsedType}),C):z((t.parsedType===S.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eN.create=(e,t)=>new eN({type:e,typeName:_.ZodPromise,...q(t)});class eC extends U{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),s=this._def.effect||null,i={addIssue:e=>{R(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===s.type){let e=s.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return C;let s=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===s.status?C:"dirty"===s.status||"dirty"===t.value?A(s.value):s});{if("aborted"===t.value)return C;let s=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===s.status?C:"dirty"===s.status||"dirty"===t.value?A(s.value):s}}if("refinement"===s.type){let e=e=>{let t=s.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?C:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===s.status?C:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}}if("transform"===s.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>"valid"!==e.status?C:Promise.resolve(s.transform(e.value,i)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if("valid"!==e.status)return C;let a=s.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}y.assertNever(s)}}eC.create=(e,t,r)=>new eC({schema:e,typeName:_.ZodEffects,effect:t,...q(r)}),eC.createWithPreprocess=(e,t,r)=>new eC({schema:t,effect:{type:"preprocess",transform:e},typeName:_.ZodEffects,...q(r)});class eA extends U{_parse(e){return this._getType(e)===S.undefined?z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eA.create=(e,t)=>new eA({innerType:e,typeName:_.ZodOptional,...q(t)});class ez extends U{_parse(e){return this._getType(e)===S.null?z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ez.create=(e,t)=>new ez({innerType:e,typeName:_.ZodNullable,...q(t)});class eM extends U{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===S.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eM.create=(e,t)=>new eM({innerType:e,typeName:_.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...q(t)});class eD extends U{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return M(s)?s.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eD.create=(e,t)=>new eD({innerType:e,typeName:_.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...q(t)});class eL extends U{_parse(e){if(this._getType(e)!==S.nan){let t=this._getOrReturnCtx(e);return R(t,{code:P.invalid_type,expected:S.nan,received:t.parsedType}),C}return{status:"valid",value:e.data}}}eL.create=e=>new eL({typeName:_.ZodNaN,...q(e)}),Symbol("zod_brand");class eq extends U{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eU extends U{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?C:"dirty"===e.status?(t.dirty(),A(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?C:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eU({in:e,out:t,typeName:_.ZodPipeline})}}class eZ extends U{_parse(e){let t=this._def.innerType._parse(e),r=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return M(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}eZ.create=(e,t)=>new eZ({innerType:e,typeName:_.ZodReadonly,...q(t)}),ev.lazycreate,(u=_||(_={})).ZodString="ZodString",u.ZodNumber="ZodNumber",u.ZodNaN="ZodNaN",u.ZodBigInt="ZodBigInt",u.ZodBoolean="ZodBoolean",u.ZodDate="ZodDate",u.ZodSymbol="ZodSymbol",u.ZodUndefined="ZodUndefined",u.ZodNull="ZodNull",u.ZodAny="ZodAny",u.ZodUnknown="ZodUnknown",u.ZodNever="ZodNever",u.ZodVoid="ZodVoid",u.ZodArray="ZodArray",u.ZodObject="ZodObject",u.ZodUnion="ZodUnion",u.ZodDiscriminatedUnion="ZodDiscriminatedUnion",u.ZodIntersection="ZodIntersection",u.ZodTuple="ZodTuple",u.ZodRecord="ZodRecord",u.ZodMap="ZodMap",u.ZodSet="ZodSet",u.ZodFunction="ZodFunction",u.ZodLazy="ZodLazy",u.ZodLiteral="ZodLiteral",u.ZodEnum="ZodEnum",u.ZodEffects="ZodEffects",u.ZodNativeEnum="ZodNativeEnum",u.ZodOptional="ZodOptional",u.ZodNullable="ZodNullable",u.ZodDefault="ZodDefault",u.ZodCatch="ZodCatch",u.ZodPromise="ZodPromise",u.ZodBranded="ZodBranded",u.ZodPipeline="ZodPipeline",u.ZodReadonly="ZodReadonly";let eV=ea.create;en.create,eL.create,eo.create;let eF=el.create;eu.create,ec.create,ed.create,ep.create,ef.create,eh.create,em.create,ey.create,eg.create;let eK=ev.create;ev.strictCreate,e_.create,ew.create,e$.create,eE.create,ek.create,ex.create,eS.create;let eH=eT.create;eP.create,eI.create,ej.create,eR.create;let eG=eN.create;eC.create,eA.create,ez.create,eC.createWithPreprocess,eU.create;let eB=eK({apiKey:eV().optional(),headerName:eV().optional(),validateApiKey:eH().args(eV()).returns(eG(eF())).optional()}).strict().refine(e=>void 0!==e.apiKey||void 0!==e.validateApiKey,{message:"Either 'apiKey' or 'validateApiKey' must be provided"}).refine(e=>void 0===e.apiKey||void 0===e.validateApiKey,{message:"'apiKey' and 'validateApiKey' are mutually exclusive - provide only one"}),eW="Unauthorized: Missing or invalid API key";function eJ(e){let t=eB.safeParse(e);if(!t.success){let r="apiKey"in e,s="validateApiKey"in e;if(r&&s)throw Error("'apiKey' and 'validateApiKey' are mutually exclusive - provide only one");if(r||s)throw Error(`Invalid configuration: ${t.error.message}`);throw Error("Either 'apiKey' or 'validateApiKey' must be provided")}let r=e.headerName??"x-api-key",s="apiKey"in e?e.apiKey:void 0,i="validateApiKey"in e?e.validateApiKey:void 0;return async(t,a,n)=>{let o=t.header(r);!o||"apiKey"in e&&o!==s||i&&!await i(o)?a.status(401).json({error:eW}):n()}}var eX=i(8400),eY=i.n(eX);function eQ(e){return(t,r,s)=>{let i=t.header("Authorization");if(!i||!i.startsWith("Bearer "))return void r.status(401).json({error:"Unauthorized: Missing or malformed Authorization header"});let a=i.slice(7).trim();if(!a)return void r.status(401).json({error:"Unauthorized: Missing access token"});try{let{secret:r,...i}=e;t.user=eY().verify(a,r,i),s()}catch(e){r.status(401).json({error:"Unauthorized: Invalid or expired token"})}}}let e0=require("async_hooks"),e1=(e,t)=>{globalThis[e]=t},e2=e=>globalThis[e];function e9({name:e}){let t=Symbol.for(`xmcp-context-${e}`),r=Symbol.for(`xmcp-context-${e}-fallback-store`);if(e2(t))return e2(t);let s=new e0.AsyncLocalStorage,i=globalThis[r]??{current:null};e1(r,i);let a={provider:(e,t)=>(i.current=e,s.run(e,t)),getContext:()=>{let t=s.getStore();if(t)return t;if(i.current)return i.current;throw Error(`getContext() can only be used within the ${e} context.`)},setContext:t=>{let r=s.getStore()??i.current;if(!r)throw Error(`setContext() can only be used within the ${e} context.`);Object.assign(r,t)}};return e1(t,a),a}let e4=Symbol.for("mcp.completable");function e6(e,t){return Object.defineProperty(e,e4,{value:{complete:t},enumerable:!1,writable:!1,configurable:!1}),e}(b||(b={})).Completable="McpCompletable";let e5=Object.freeze({status:"aborted"});function e8(e,t,r){function s(r,s){if(r._zod||Object.defineProperty(r,"_zod",{value:{def:s,constr:n,traits:new Set},enumerable:!1}),r._zod.traits.has(e))return;r._zod.traits.add(e),t(r,s);let i=n.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in r||(r[t]=i[t].bind(r))}}let i=r?.Parent??Object;class a extends i{}function n(e){var t;let i=r?.Parent?new a:this;for(let r of(s(i,e),(t=i._zod).deferred??(t.deferred=[]),i._zod.deferred))r();return i}return Object.defineProperty(a,"name",{value:e}),Object.defineProperty(n,"init",{value:s}),Object.defineProperty(n,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(n,"name",{value:e}),n}Symbol("zod_brand");class e3 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e7 extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}let te={};function tt(e){return e&&Object.assign(te,e),te}function tr(e,t="|"){return e.map(e=>tb(e)).join(t)}function ts(e,t){return"bigint"==typeof t?t.toString():t}function ti(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function ta(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}let tn=Symbol("evaluating");function to(e,t,r){let s;Object.defineProperty(e,t,{get(){if(s!==tn)return void 0===s&&(s=tn,s=r()),s},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function tl(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function tu(...e){let t={};for(let r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function tc(e){return JSON.stringify(e)}let td="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function tp(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let tf=ti(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function th(e){if(!1===tp(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let r=t.prototype;return!1!==tp(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}function tm(e){return th(e)?{...e}:Array.isArray(e)?[...e]:e}let ty=new Set(["string","number","symbol"]);function tg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tv(e,t,r){let s=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(s._zod.parent=e),s}function t_(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function tb(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let tw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function t$(e,t=0){if(!0===e.aborted)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function tE(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))}function tk(e){return"string"==typeof e?e:e?.message}function tx(e,t,r){let s={...e,path:e.path??[]};return e.message||(s.message=tk(e.inst?._zod.def?.error?.(e))??tk(t?.error?.(e))??tk(r.customError?.(e))??tk(r.localeError?.(e))??"Invalid input"),delete s.inst,delete s.continue,t?.reportInput||delete s.input,s}function tS(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function tT(...e){let[t,r,s]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:s}:{...t}}let tP=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ts,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tI=e8("$ZodError",tP),tO=e8("$ZodError",tP,{Parent:Error}),tj=e=>(t,r,s,i)=>{let a=s?Object.assign(s,{async:!1}):{async:!1},n=t._zod.run({value:r,issues:[]},a);if(n instanceof Promise)throw new e3;if(n.issues.length){let t=new(i?.Err??e)(n.issues.map(e=>tx(e,a,tt())));throw td(t,i?.callee),t}return n.value},tR=e=>async(t,r,s,i)=>{let a=s?Object.assign(s,{async:!0}):{async:!0},n=t._zod.run({value:r,issues:[]},a);if(n instanceof Promise&&(n=await n),n.issues.length){let t=new(i?.Err??e)(n.issues.map(e=>tx(e,a,tt())));throw td(t,i?.callee),t}return n.value},tN=e=>(t,r,s)=>{let i=s?{...s,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new e3;return a.issues.length?{success:!1,error:new(e??tI)(a.issues.map(e=>tx(e,i,tt())))}:{success:!0,data:a.value}},tC=tN(tO),tA=e=>async(t,r,s)=>{let i=s?Object.assign(s,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>tx(e,i,tt())))}:{success:!0,data:a.value}},tz=tA(tO),tM=/^[cC][^\s-]{8,}$/,tD=/^[0-9a-z]+$/,tL=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,tq=/^[0-9a-vA-V]{20}$/,tU=/^[A-Za-z0-9]{27}$/,tZ=/^[a-zA-Z0-9_-]{21}$/,tV=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tF=/^([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})$/,tK=e=>e?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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,tH=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tG=/^(?:(?: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])$/,tB=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tW=/^((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])$/,tJ=/^(([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])$/,tX=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,tY=/^[A-Za-z0-9_-]*$/,tQ=/^\+(?:[0-9]){6,14}[0-9]$/,t0="(?:(?:\\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])))",t1=RegExp(`^${t0}$`);function t2(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}let t9=/^-?\d+n?$/,t4=/^-?\d+$/,t6=/^-?\d+(?:\.\d+)?/,t5=/^(?:true|false)$/i,t8=/^null$/i,t3=/^[^A-Z]*$/,t7=/^[^a-z]*$/,re=e8("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rt={number:"number",bigint:"bigint",object:"date"},rr=e8("$ZodCheckLessThan",(e,t)=>{re.init(e,t);let r=rt[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??1/0;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:r,code:"too_big",maximum:t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rs=e8("$ZodCheckGreaterThan",(e,t)=>{re.init(e,t);let r=rt[typeof t.value];e._zod.onattach.push(e=>{let r=e._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??-1/0;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:r,code:"too_small",minimum:t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ri=e8("$ZodCheckMultipleOf",(e,t)=>{re.init(e,t),e._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof r.value?r.value%t.value===BigInt(0):0===function(e,t){let r=(e.toString().split(".")[1]||"").length,s=t.toString(),i=(s.split(".")[1]||"").length;if(0===i&&/\d?e-\d?/.test(s)){let e=s.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=r>i?r:i;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/10**a}(r.value,t.value))||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),ra=e8("$ZodCheckNumberFormat",(e,t)=>{re.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),s=r?"int":"number",[i,a]=tw[t.format];e._zod.onattach.push(e=>{let s=e._zod.bag;s.format=t.format,s.minimum=i,s.maximum=a,r&&(s.pattern=t4)}),e._zod.check=n=>{let o=n.value;if(r){if(!Number.isInteger(o))return void n.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});if(!Number.isSafeInteger(o))return void(o>0?n.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,continue:!t.abort}):n.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,continue:!t.abort}))}o<i&&n.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),o>a&&n.issues.push({origin:"number",input:o,code:"too_big",maximum:a,inst:e})}}),rn=e8("$ZodCheckMaxLength",(e,t)=>{var r;re.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.maximum??1/0;t.maximum<r&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let s=r.value;if(s.length<=t.maximum)return;let i=tS(s);r.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),ro=e8("$ZodCheckMinLength",(e,t)=>{var r;re.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag.minimum??-1/0;t.minimum>r&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let s=r.value;if(s.length>=t.minimum)return;let i=tS(s);r.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),rl=e8("$ZodCheckLengthEquals",(e,t)=>{var r;re.init(e,t),(r=e._zod.def).when??(r.when=e=>{let t=e.value;return null!=t&&void 0!==t.length}),e._zod.onattach.push(e=>{let r=e._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=r=>{let s=r.value,i=s.length;if(i===t.length)return;let a=tS(s),n=i>t.length;r.issues.push({origin:a,...n?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ru=e8("$ZodCheckStringFormat",(e,t)=>{var r,s;re.init(e,t),e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,t.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=r=>{t.pattern.lastIndex=0,t.pattern.test(r.value)||r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),rc=e8("$ZodCheckRegex",(e,t)=>{ru.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})}}),rd=e8("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=t3),ru.init(e,t)}),rp=e8("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=t7),ru.init(e,t)}),rf=e8("$ZodCheckIncludes",(e,t)=>{re.init(e,t);let r=tg(t.includes),s=new RegExp("number"==typeof t.position?`^.{${t.position}}${r}`:r);t.pattern=s,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(s)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),rh=e8("$ZodCheckStartsWith",(e,t)=>{re.init(e,t);let r=RegExp(`^${tg(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),rm=e8("$ZodCheckEndsWith",(e,t)=>{re.init(e,t);let r=RegExp(`.*${tg(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(r)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),ry=e8("$ZodCheckOverwrite",(e,t)=>{re.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class rg{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split("\n").filter(e=>e),r=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(r)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}let rv={major:4,minor:1,patch:13},r_=e8("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rv;let s=[...e._zod.def.checks??[]];for(let t of(e._zod.traits.has("$ZodCheck")&&s.unshift(e),s))for(let r of t._zod.onattach)r(e);if(0===s.length)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,r)=>{let s,i=t$(e);for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(i)continue;let t=e.issues.length,n=a._zod.check(e);if(n instanceof Promise&&r?.async===!1)throw new e3;if(s||n instanceof Promise)s=(s??Promise.resolve()).then(async()=>{await n,e.issues.length!==t&&(i||(i=t$(e,t)))});else{if(e.issues.length===t)continue;i||(i=t$(e,t))}}return s?s.then(()=>e):e},r=(r,i,a)=>{if(t$(r))return r.aborted=!0,r;let n=t(i,s,a);if(n instanceof Promise){if(!1===a.async)throw new e3;return n.then(t=>e._zod.parse(t,a))}return e._zod.parse(n,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if("backward"===a.direction){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>r(e,i,a)):r(t,i,a)}let n=e._zod.parse(i,a);if(n instanceof Promise){if(!1===a.async)throw new e3;return n.then(e=>t(e,s,a))}return t(n,s,a)}}e["~standard"]={validate:t=>{try{let r=tC(e,t);return r.success?{value:r.data}:{issues:r.error?.issues}}catch(r){return tz(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),rb=e8("$ZodString",(e,t)=>{var r;let s;r_.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(s=(r=e._zod.bag)?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*",RegExp(`^${s}$`)),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=String(r.value)}catch(e){}return"string"==typeof r.value||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),rw=e8("$ZodStringFormat",(e,t)=>{ru.init(e,t),rb.init(e,t)}),r$=e8("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=tF),rw.init(e,t)}),rE=e8("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tK(e))}else t.pattern??(t.pattern=tK());rw.init(e,t)}),rk=e8("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=tH),rw.init(e,t)}),rx=e8("$ZodURL",(e,t)=>{rw.init(e,t),e._zod.check=r=>{try{let s=r.value.trim(),i=new URL(s);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=s;return}catch(s){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),rS=e8("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),rw.init(e,t)}),rT=e8("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=tZ),rw.init(e,t)}),rP=e8("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=tM),rw.init(e,t)}),rI=e8("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tD),rw.init(e,t)}),rO=e8("$ZodULID",(e,t)=>{t.pattern??(t.pattern=tL),rw.init(e,t)}),rj=e8("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tq),rw.init(e,t)}),rR=e8("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tU),rw.init(e,t)}),rN=e8("$ZodISODateTime",(e,t)=>{let r,s,i;t.pattern??(r=t2({precision:t.precision}),s=["Z"],t.local&&s.push(""),t.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)"),i=`${r}(?:${s.join("|")})`,t.pattern=RegExp(`^${t0}T(?:${i})$`)),rw.init(e,t)}),rC=e8("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=t1),rw.init(e,t)}),rA=e8("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${t2(t)}$`)),rw.init(e,t)}),rz=e8("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=tV),rw.init(e,t)}),rM=e8("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tG),rw.init(e,t),e._zod.bag.format="ipv4"}),rD=e8("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tB),rw.init(e,t),e._zod.bag.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})}}}),rL=e8("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=tW),rw.init(e,t)}),rq=e8("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=tJ),rw.init(e,t),e._zod.check=r=>{let s=r.value.split("/");try{if(2!==s.length)throw Error();let[e,t]=s;if(!t)throw Error();let r=Number(t);if(`${r}`!==t||r<0||r>128)throw Error();new URL(`http://[${e}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function rU(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}let rZ=e8("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=tX),rw.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{rU(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),rV=e8("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=tY),rw.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{!function(e){if(!tY.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return rU(t.padEnd(4*Math.ceil(t.length/4),"="))}(r.value)&&r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),rF=e8("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tQ),rw.init(e,t)}),rK=e8("$ZodJWT",(e,t)=>{rw.init(e,t),e._zod.check=r=>{!function(e,t=null){try{let r=e.split(".");if(3!==r.length)return!1;let[s]=r;if(!s)return!1;let i=JSON.parse(atob(s));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(r.value,t.alg)&&r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rH=e8("$ZodNumber",(e,t)=>{r_.init(e,t),e._zod.pattern=e._zod.bag.pattern??t6,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=Number(r.value)}catch(e){}let i=r.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return r;let a="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...a?{received:a}:{}}),r}}),rG=e8("$ZodNumberFormat",(e,t)=>{ra.init(e,t),rH.init(e,t)}),rB=e8("$ZodBoolean",(e,t)=>{r_.init(e,t),e._zod.pattern=t5,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=!!r.value}catch(e){}let i=r.value;return"boolean"==typeof i||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),rW=((e,t)=>{r_.init(e,t),e._zod.pattern=t9,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch(e){}return"bigint"==typeof r.value||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}},e8("$ZodNull",(e,t)=>{r_.init(e,t),e._zod.pattern=t8,e._zod.values=new Set([null]),e._zod.parse=(t,r)=>{let s=t.value;return null===s||t.issues.push({expected:"null",code:"invalid_type",input:s,inst:e}),t}})),rJ=e8("$ZodAny",(e,t)=>{r_.init(e,t),e._zod.parse=e=>e}),rX=e8("$ZodUnknown",(e,t)=>{r_.init(e,t),e._zod.parse=e=>e}),rY=e8("$ZodNever",(e,t)=>{r_.init(e,t),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function rQ(e,t,r){e.issues.length&&t.issues.push(...tE(r,e.issues)),t.value[r]=e.value}(e,t)=>{r_.init(e,t),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=new Date(r.value)}catch(e){}let i=r.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...a?{received:"Invalid Date"}:{},inst:e}),r}};let r0=e8("$ZodArray",(e,t)=>{r_.init(e,t),e._zod.parse=(r,s)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let n=i[e],o=t.element._zod.run({value:n,issues:[]},s);o instanceof Promise?a.push(o.then(t=>rQ(t,r,e))):rQ(o,r,e)}return a.length?Promise.all(a).then(()=>r):r}});function r1(e,t,r,s){e.issues.length&&t.issues.push(...tE(r,e.issues)),void 0===e.value?r in s&&(t.value[r]=void 0):t.value[r]=e.value}function r2(e){var t;let r=Object.keys(e.shape);for(let t of r)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let s=Object.keys(t=e.shape).filter(e=>"optional"===t[e]._zod.optin&&"optional"===t[e]._zod.optout);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(s)}}function r9(e,t,r,s,i,a){let n=[],o=i.keySet,l=i.catchall._zod,u=l.def.type;for(let i in t){if(o.has(i))continue;if("never"===u){n.push(i);continue}let a=l.run({value:t[i],issues:[]},s);a instanceof Promise?e.push(a.then(e=>r1(e,r,i,t))):r1(a,r,i,t)}return(n.length&&r.issues.push({code:"unrecognized_keys",keys:n,input:t,inst:a}),e.length)?Promise.all(e).then(()=>r):r}let r4=e8("$ZodObject",(e,t)=>{let r;r_.init(e,t);let s=Object.getOwnPropertyDescriptor(t,"shape");if(!s?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let r={...e};return Object.defineProperty(t,"shape",{value:r}),r}})}let i=ti(()=>r2(t));to(e._zod,"propValues",()=>{let e=t.shape,r={};for(let t in e){let s=e[t]._zod;if(s.values)for(let e of(r[t]??(r[t]=new Set),s.values))r[t].add(e)}return r});let a=t.catchall;e._zod.parse=(t,s)=>{r??(r=i.value);let n=t.value;if(!tp(n))return t.issues.push({expected:"object",code:"invalid_type",input:n,inst:e}),t;t.value={};let o=[],l=r.shape;for(let e of r.keys){let r=l[e]._zod.run({value:n[e],issues:[]},s);r instanceof Promise?o.push(r.then(r=>r1(r,t,e,n))):r1(r,t,e,n)}return a?r9(o,n,t,s,i.value,e):o.length?Promise.all(o).then(()=>t):t}}),r6=e8("$ZodObjectJIT",(e,t)=>{let r,s;r4.init(e,t);let i=e._zod.parse,a=ti(()=>r2(t)),n=!te.jitless,o=n&&tf.value,l=t.catchall;e._zod.parse=(u,c)=>{s??(s=a.value);let d=u.value;return tp(d)?n&&o&&c?.async===!1&&!0!==c.jitless?(r||(r=(e=>{let t=new rg(["shape","payload","ctx"]),r=a.value,s=e=>{let t=tc(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");let i=Object.create(null),n=0;for(let e of r.keys)i[e]=`key_${n++}`;for(let e of(t.write("const newResult = {};"),r.keys)){let r=i[e],a=tc(e);t.write(`const ${r} = ${s(e)};`),t.write(`
8
8
  if (${r}.issues.length) {
9
9
  payload.issues = payload.issues.concat(${r}.issues.map(iss => ({
10
10
  ...iss,