From 3b10b112ed4f826696a6a587009221df63724732 Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Thu, 28 Jul 2022 17:25:24 +0300 Subject: [PATCH] chore: update demo bundle for v2.0.0-rc.74 --- redoc-demo.bundle.js | 520 ++++++++++++++++++++++--------------------- 1 file changed, 264 insertions(+), 256 deletions(-) diff --git a/redoc-demo.bundle.js b/redoc-demo.bundle.js index 3370a6bc..77da0826 100644 --- a/redoc-demo.bundle.js +++ b/redoc-demo.bundle.js @@ -1,25 +1,25 @@ /*! For license information please see redoc-demo.bundle.js.LICENSE.txt */ -(()=>{var e={5499:(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;const n=r(3325),o=r(6479),i=r(5522),a=r(4137),s=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=r(1321);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var p=r(4475);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}})},4667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(4667),o=r(7791);var i=r(4667);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var a=r(7791);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?o.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=R(this.rhs,e,t),this}get names(){return C(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class p extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=R(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(j(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>A(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class v extends g{}v.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(T(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=R(this.condition,e,t),this}get names(){const e=super.names;return C(e,this.condition),this.else&&A(e,this.else.names),e}}b.kind="if";class w extends g{}w.kind="for";class x extends w{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=R(this.iteration,e,t),this}get names(){return A(super.names,this.iteration.names)}}class k extends w{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=C(super.names,this.from);return C(e,this.to)}}class O extends w{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=R(this.iterable,e,t),this}get names(){return A(super.names,this.iterable.names)}}class _ extends g{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}_.kind="func";class S extends m{render(e){return"return "+super.render(e)}}S.kind="return";class E extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&A(e,this.catch.names),this.finally&&A(e,this.finally.names),e}}class P extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class $ extends g{render(e){return"finally"+super.render(e)}}function A(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function C(e,t){return t instanceof n._CodeOrName?A(e,t.names):e}function R(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function j(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function T(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${D(e)}`}$.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new l(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),n.addCodeArg(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new b(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new x(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const a=this._scope.toName(e);return this._for(new k(i,a,t,r),(()=>n(a)))}forOf(e,t,r,i=o.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(a,n._`${e}[${t}]`),r(a)}))}return this._for(new O("of",i,a,t),(()=>r(a)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new O("in",i,a,t),(()=>r(a)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new p(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new S;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new E;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new $,this.code(r)),this._endBlockNode(P,$)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,o){return this._blockNode(new _(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(_)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=T;const I=L(t.operators.AND);t.and=function(...e){return e.reduce(I)};const N=L(t.operators.OR);function L(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${D(t)} ${e} ${D(r)}`}function D(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(N)}},7791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(4667);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=a;class s extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=s;const l=n._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:n.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let a=this._values[o];if(a){const e=a.get(i);if(e)return e}else a=this._values[o]=new Map;a.set(i,n);const s=this._scope[o]||(this._scope[o]=[]),l=s.length;return s[l]=t.ref,n.setValue(t,{property:o,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,a={},s){let l=n.nil;for(const c in e){const u=e[c];if(!u)continue;const p=a[c]=a[c]||new Map;u.forEach((e=>{if(p.has(e))return;p.set(e,i.Started);let a=r(e);if(a){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;l=n._`${l}${r} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==s?void 0:s(e)))throw new o(e);l=n._`${l}${a}${this.opts._n}`}p.set(e,i.Completed)}))}return l}}},1885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(4475),o=r(6124),i=r(5018);function a(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function s(e,t){const{gen:r,validateName:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`should pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,o,i){const{it:l}=e,{gen:u,compositeRule:p,allErrors:d}=l,f=c(e,r,o);(null!=i?i:p||d)?a(u,f):s(l,n._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:l,compositeRule:u,allErrors:p}=o;a(l,c(e,r,n)),u||p||s(o,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:a,it:s}){if(void 0===a)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",a,i.default.errors,(a=>{e.const(l,n._`${i.default.vErrors}[${a}]`),e.if(n._`${l}.instancePath === undefined`,(()=>e.assign(n._`${l}.instancePath`,n.strConcat(i.default.instancePath,s.errorPath)))),e.assign(n._`${l}.schemaPath`,n.str`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign(n._`${l}.schema`,r),e.assign(n._`${l}.data`,o))}))};const l={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:a}=e,s=[u(a,r),p(e,r)];return function(e,{params:t,message:r},o){const{keyword:a,data:s,schemaValue:c,it:u}=e,{opts:p,propertyName:d,topSchemaRef:f,schemaPath:h}=u;o.push([l.keyword,a],[l.params,"function"==typeof t?t(e):t||n._`{}`]),p.messages&&o.push([l.message,"function"==typeof r?r(e):r]),p.verbose&&o.push([l.schema,c],[l.parentSchema,n._`${f}${h}`],[i.default.data,s]),d&&o.push([l.propertyName,d])}(e,t,s),o.object(...s)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${o.getErrorPath(t,o.Type.Str)}`:e;return[i.default.instancePath,n.strConcat(i.default.instancePath,r)]}function p({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let a=i?t:n.str`${t}/${e}`;return r&&(a=n.str`${a}${o.getErrorPath(r,o.Type.Str)}`),[l.schemaPath,a]}},7805:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(4475),o=r(8451),i=r(5018),a=r(9826),s=r(6124),l=r(1321),c=r(540);class u{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:a.normalizeId(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function p(e){const t=f.call(this,e);if(t)return t;const r=a.getFullPath(e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:u}=this.opts,p=new n.CodeGen(this.scope,{es5:s,lines:c,ownProperties:u});let d;e.$async&&(d=p.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=p.scopeName("validate");e.validateName=h;const m={gen:p,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:n.stringify(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),l.validateFunctionCode(m),p.optimize(this.opts.code.optimize);const t=p.toString();g=`const visitedNodesForRef = new WeakMap(); ${p.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const r=new Function(`${i.default.self}`,`${i.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=n.stringify(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),t}finally{this._compilations.delete(e)}}function d(e){return a.inlineRef(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:p.call(this,e)}function f(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){const r=c.parse(t),n=a._getFullPath(r);let o=a.getFullPath(e.baseId);if(Object.keys(e.schema).length>0&&n===o)return y.call(this,r,e);const i=a.normalizeId(n),s=this.refs[i]||this.schemas[i];if("string"==typeof s){const t=m.call(this,e,s);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==s?void 0:s.schema)){if(s.validate||p.call(this,s),i===a.normalizeId(t)){const{schema:t}=s,{schemaId:r}=this.opts,n=t[r];return n&&(o=a.resolveUrl(o,n)),new u({schema:t,schemaId:r,root:e,baseId:o})}return y.call(this,r,s)}}t.SchemaEnv=u,t.compileSchema=p,t.resolveRef=function(e,t,r){var n;const o=a.resolveUrl(t,r),i=e.refs[o];if(i)return i;let s=h.call(this,e,o);if(void 0===s){const r=null===(n=e.localRefs)||void 0===n?void 0:n[o],{schemaId:i}=this.opts;r&&(s=new u({schema:r,schemaId:i,root:e,baseId:t}))}if(void 0===s&&this.opts.loadSchemaSync){const n=this.opts.loadSchemaSync(t,r,o);!n||this.refs[o]||this.schemas[o]||(this.addSchema(n,o,void 0),s=h.call(this,e,o))}return void 0!==s?e.refs[o]=d.call(this,s):void 0},t.getCompilingSchema=f,t.resolveSchema=m;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;if(void 0===(r=r[s.unescapeFragment(n)]))return;const e="object"==typeof r&&r[this.opts.schemaId];!g.has(n)&&e&&(t=a.resolveUrl(t,e))}let i;if("boolean"!=typeof r&&r.$ref&&!s.schemaHasRulesButRef(r,this.RULES)){const e=a.resolveUrl(t,r.$ref);i=m.call(this,n,e)}const{schemaId:l}=this.opts;return i=i||new u({schema:r,schemaId:l,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}},5018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=o},4143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9826);class o extends Error{constructor(e,t,r){super(r||`can't resolve reference ${t} from id ${e}`),this.missingRef=n.resolveUrl(e,t),this.missingSchema=n.normalizeId(n.getFullPath(this.missingRef))}}t.default=o},9826:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(6124),o=r(4063),i=r(4029),a=r(540),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&u(e)<=t)};const l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(l.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function u(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&n.eachItem(e[r],(e=>t+=u(e))),t===1/0))return 1/0}return t}function p(e="",t){return!1!==t&&(e=h(e)),d(a.parse(e))}function d(e){return a.serialize(e).split("#")[0]+"#"}t.getFullPath=p,t._getFullPath=d;const f=/#\/?$/;function h(e){return e?e.replace(f,""):""}t.normalizeId=h,t.resolveUrl=function(e,t){return t=h(t),a.resolve(e,t)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e){if("boolean"==typeof e)return{};const{schemaId:t}=this.opts,r=h(e[t]),n={"":r},s=p(r,!1),l={},c=new Set;return i(e,{allKeys:!0},((e,r,o,i)=>{if(void 0===i)return;const p=s+r;let f=n[i];function g(t){if(t=h(f?a.resolve(f,t):t),c.has(t))throw d(t);c.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?u(e,r.schema,t):t!==h(p)&&("#"===t[0]?(u(e,l[t],t),l[t]=e):this.refs[t]=p),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);g.call(this,`#${e}`)}}"string"==typeof e[t]&&(f=g.call(this,e[t])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),n[r]=f})),l;function u(e,t,r){if(void 0!==t&&!o(e,t))throw d(r)}function d(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3664:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},6124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(4475),o=r(4667);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||h(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(i,a,s,l)=>{const c=void 0===s?a:s instanceof n.Name?(a instanceof n.Name?e(i,a,s):t(i,a,s),s):a instanceof n.Name?(t(i,s,a),a):r(a,s);return l!==n.Name||c instanceof n.Name?c:o(i,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${n.getProperty(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(i(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${n.getProperty(o)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(s(e))},t.escapeJsonPointer=s,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),p(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=p;const d={};var f;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===f.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?n.getProperty(e).toString():"/"+s(e)},t.checkStrictMode=h},4566:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},7627:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(1885),o=r(4475),i=r(5018),a={message:"boolean schema is false"};function s(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};n.reportError(i,a,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?s(e,!1):"object"==typeof r&&!0===r.$async?t.return(i.default.data):(t.assign(o._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),s(e)):r.var(t,!0)}},7927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(3664),o=r(4566),i=r(1885),a=r(4475),s=r(6124);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:i}=e,s=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),c=t.length>0&&!(0===s.length&&1===t.length&&o.schemaHasRulesForType(e,t[0]));if(c){const o=d(t,n,i.strictNumbers,l.Wrong);r.if(o,(()=>{s.length?function(e,t,r){const{gen:n,data:o,opts:i}=e,s=n.let("dataType",a._`typeof ${o}`),l=n.let("coerced",a._`undefined`);"array"===i.coerceTypes&&n.if(a._`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>n.assign(o,a._`${o}[0]`).assign(s,a._`typeof ${o}`).if(d(t,o,i.strictNumbers),(()=>n.assign(l,o))))),n.if(a._`${l} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===i.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void n.elseIf(a._`${s} == "number" || ${s} == "boolean"`).assign(l,a._`"" + ${o}`).elseIf(a._`${o} === null`).assign(l,a._`""`);case"number":return void n.elseIf(a._`${s} == "boolean" || ${o} === null +(()=>{var e={5499:(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;const n=r(3325),o=r(6479),i=r(5522),a=r(1603),s=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=r(1321);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var p=r(4475);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}})},4667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(4667),o=r(7791);var i=r(4667);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var a=r(7791);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?o.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=R(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=R(this.rhs,e,t),this}get names(){return A(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class p extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class f extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=R(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(j(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>C(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class v extends g{}v.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(T(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=R(this.condition,e,t),this}get names(){const e=super.names;return A(e,this.condition),this.else&&C(e,this.else.names),e}}b.kind="if";class w extends g{}w.kind="for";class x extends w{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=R(this.iteration,e,t),this}get names(){return C(super.names,this.iteration.names)}}class k extends w{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=A(super.names,this.from);return A(e,this.to)}}class O extends w{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=R(this.iterable,e,t),this}get names(){return C(super.names,this.iterable.names)}}class S extends g{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}S.kind="func";class _ extends m{render(e){return"return "+super.render(e)}}_.kind="return";class E extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&C(e,this.catch.names),this.finally&&C(e,this.finally.names),e}}class P extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class $ extends g{render(e){return"finally"+super.render(e)}}function C(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function A(e,t){return t instanceof n._CodeOrName?C(e,t.names):e}function R(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function j(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function T(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${D(e)}`}$.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new l(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),n.addCodeArg(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new b(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(b,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new x(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const a=this._scope.toName(e);return this._for(new k(i,a,t,r),(()=>n(a)))}forOf(e,t,r,i=o.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(a,n._`${e}[${t}]`),r(a)}))}return this._for(new O("of",i,a,t),(()=>r(a)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new O("in",i,a,t),(()=>r(a)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new p(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new _;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new E;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new $,this.code(r)),this._endBlockNode(P,$)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,o){return this._blockNode(new S(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof b))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=T;const I=L(t.operators.AND);t.and=function(...e){return e.reduce(I)};const N=L(t.operators.OR);function L(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${D(t)} ${e} ${D(r)}`}function D(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(N)}},7791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(4667);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=a;class s extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=s;const l=n._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:n.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let a=this._values[o];if(a){const e=a.get(i);if(e)return e}else a=this._values[o]=new Map;a.set(i,n);const s=this._scope[o]||(this._scope[o]=[]),l=s.length;return s[l]=t.ref,n.setValue(t,{property:o,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,a={},s){let l=n.nil;for(const c in e){const u=e[c];if(!u)continue;const p=a[c]=a[c]||new Map;u.forEach((e=>{if(p.has(e))return;p.set(e,i.Started);let a=r(e);if(a){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;l=n._`${l}${r} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==s?void 0:s(e)))throw new o(e);l=n._`${l}${a}${this.opts._n}`}p.set(e,i.Completed)}))}return l}}},1885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(4475),o=r(6124),i=r(5018);function a(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function s(e,t){const{gen:r,validateName:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`should pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,o,i){const{it:l}=e,{gen:u,compositeRule:p,allErrors:d}=l,f=c(e,r,o);(null!=i?i:p||d)?a(u,f):s(l,n._`[${f}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:l,compositeRule:u,allErrors:p}=o;a(l,c(e,r,n)),u||p||s(o,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:a,it:s}){if(void 0===a)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",a,i.default.errors,(a=>{e.const(l,n._`${i.default.vErrors}[${a}]`),e.if(n._`${l}.instancePath === undefined`,(()=>e.assign(n._`${l}.instancePath`,n.strConcat(i.default.instancePath,s.errorPath)))),e.assign(n._`${l}.schemaPath`,n.str`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign(n._`${l}.schema`,r),e.assign(n._`${l}.data`,o))}))};const l={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:a}=e,s=[u(a,r),p(e,r)];return function(e,{params:t,message:r},o){const{keyword:a,data:s,schemaValue:c,it:u}=e,{opts:p,propertyName:d,topSchemaRef:f,schemaPath:h}=u;o.push([l.keyword,a],[l.params,"function"==typeof t?t(e):t||n._`{}`]),p.messages&&o.push([l.message,"function"==typeof r?r(e):r]),p.verbose&&o.push([l.schema,c],[l.parentSchema,n._`${f}${h}`],[i.default.data,s]),d&&o.push([l.propertyName,d])}(e,t,s),o.object(...s)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${o.getErrorPath(t,o.Type.Str)}`:e;return[i.default.instancePath,n.strConcat(i.default.instancePath,r)]}function p({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let a=i?t:n.str`${t}/${e}`;return r&&(a=n.str`${a}${o.getErrorPath(r,o.Type.Str)}`),[l.schemaPath,a]}},7805:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(4475),o=r(8451),i=r(5018),a=r(9826),s=r(6124),l=r(1321),c=r(540);class u{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:a.normalizeId(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function p(e){const t=f.call(this,e);if(t)return t;const r=a.getFullPath(e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:u}=this.opts,p=new n.CodeGen(this.scope,{es5:s,lines:c,ownProperties:u});let d;e.$async&&(d=p.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=p.scopeName("validate");e.validateName=h;const m={gen:p,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:n.stringify(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),l.validateFunctionCode(m),p.optimize(this.opts.code.optimize);const t=p.toString();g=`const visitedNodesForRef = new WeakMap(); ${p.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const r=new Function(`${i.default.self}`,`${i.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=n.stringify(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),t}finally{this._compilations.delete(e)}}function d(e){return a.inlineRef(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:p.call(this,e)}function f(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){const r=c.parse(t),n=a._getFullPath(r);let o=a.getFullPath(e.baseId);if(Object.keys(e.schema).length>0&&n===o)return y.call(this,r,e);const i=a.normalizeId(n),s=this.refs[i]||this.schemas[i];if("string"==typeof s){const t=m.call(this,e,s);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==s?void 0:s.schema)){if(s.validate||p.call(this,s),i===a.normalizeId(t)){const{schema:t}=s,{schemaId:r}=this.opts,n=t[r];return n&&(o=a.resolveUrl(o,n)),new u({schema:t,schemaId:r,root:e,baseId:o})}return y.call(this,r,s)}}t.SchemaEnv=u,t.compileSchema=p,t.resolveRef=function(e,t,r){var n;const o=a.resolveUrl(t,r),i=e.refs[o];if(i)return i;let s=h.call(this,e,o);if(void 0===s){const r=null===(n=e.localRefs)||void 0===n?void 0:n[o],{schemaId:i}=this.opts;r&&(s=new u({schema:r,schemaId:i,root:e,baseId:t}))}if(void 0===s&&this.opts.loadSchemaSync){const n=this.opts.loadSchemaSync(t,r,o);!n||this.refs[o]||this.schemas[o]||(this.addSchema(n,o,void 0),s=h.call(this,e,o))}return void 0!==s?e.refs[o]=d.call(this,s):void 0},t.getCompilingSchema=f,t.resolveSchema=m;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;if(void 0===(r=r[s.unescapeFragment(n)]))return;const e="object"==typeof r&&r[this.opts.schemaId];!g.has(n)&&e&&(t=a.resolveUrl(t,e))}let i;if("boolean"!=typeof r&&r.$ref&&!s.schemaHasRulesButRef(r,this.RULES)){const e=a.resolveUrl(t,r.$ref);i=m.call(this,n,e)}const{schemaId:l}=this.opts;return i=i||new u({schema:r,schemaId:l,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}},5018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=o},4143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9826);class o extends Error{constructor(e,t,r){super(r||`can't resolve reference ${t} from id ${e}`),this.missingRef=n.resolveUrl(e,t),this.missingSchema=n.normalizeId(n.getFullPath(this.missingRef))}}t.default=o},9826:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(6124),o=r(4063),i=r(4029),a=r(540),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&u(e)<=t)};const l=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(l.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function u(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&n.eachItem(e[r],(e=>t+=u(e))),t===1/0))return 1/0}return t}function p(e="",t){return!1!==t&&(e=h(e)),d(a.parse(e))}function d(e){return a.serialize(e).split("#")[0]+"#"}t.getFullPath=p,t._getFullPath=d;const f=/#\/?$/;function h(e){return e?e.replace(f,""):""}t.normalizeId=h,t.resolveUrl=function(e,t){return t=h(t),a.resolve(e,t)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e){if("boolean"==typeof e)return{};const{schemaId:t}=this.opts,r=h(e[t]),n={"":r},s=p(r,!1),l={},c=new Set;return i(e,{allKeys:!0},((e,r,o,i)=>{if(void 0===i)return;const p=s+r;let f=n[i];function g(t){if(t=h(f?a.resolve(f,t):t),c.has(t))throw d(t);c.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?u(e,r.schema,t):t!==h(p)&&("#"===t[0]?(u(e,l[t],t),l[t]=e):this.refs[t]=p),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);g.call(this,`#${e}`)}}"string"==typeof e[t]&&(f=g.call(this,e[t])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),n[r]=f})),l;function u(e,t,r){if(void 0!==t&&!o(e,t))throw d(r)}function d(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},3664:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},6124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(4475),o=r(4667);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||h(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(i,a,s,l)=>{const c=void 0===s?a:s instanceof n.Name?(a instanceof n.Name?e(i,a,s):t(i,a,s),s):a instanceof n.Name?(t(i,s,a),a):r(a,s);return l!==n.Name||c instanceof n.Name?c:o(i,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&p(e,r,t),r}function p(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${n.getProperty(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(i(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${n.getProperty(o)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(s(e))},t.escapeJsonPointer=s,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),p(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=p;const d={};var f;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(f=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===f.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?n.getProperty(e).toString():"/"+s(e)},t.checkStrictMode=h},4566:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},7627:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(1885),o=r(4475),i=r(5018),a={message:"boolean schema is false"};function s(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};n.reportError(i,a,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?s(e,!1):"object"==typeof r&&!0===r.$async?t.return(i.default.data):(t.assign(o._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),s(e)):r.var(t,!0)}},7927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(3664),o=r(4566),i=r(1885),a=r(4475),s=r(6124);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:i}=e,s=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),c=t.length>0&&!(0===s.length&&1===t.length&&o.schemaHasRulesForType(e,t[0]));if(c){const o=d(t,n,i.strictNumbers,l.Wrong);r.if(o,(()=>{s.length?function(e,t,r){const{gen:n,data:o,opts:i}=e,s=n.let("dataType",a._`typeof ${o}`),l=n.let("coerced",a._`undefined`);"array"===i.coerceTypes&&n.if(a._`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>n.assign(o,a._`${o}[0]`).assign(s,a._`typeof ${o}`).if(d(t,o,i.strictNumbers),(()=>n.assign(l,o))))),n.if(a._`${l} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===i.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void n.elseIf(a._`${s} == "number" || ${s} == "boolean"`).assign(l,a._`"" + ${o}`).elseIf(a._`${o} === null`).assign(l,a._`""`);case"number":return void n.elseIf(a._`${s} == "boolean" || ${o} === null || (${s} == "string" && ${o} && ${o} == +${o})`).assign(l,a._`+${o}`);case"integer":return void n.elseIf(a._`${s} === "boolean" || ${o} === null || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,a._`+${o}`);case"boolean":return void n.elseIf(a._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf(a._`${o} === "true" || ${o} === 1`).assign(l,!0);case"null":return n.elseIf(a._`${o} === "" || ${o} === 0 || ${o} === false`),void n.assign(l,null);case"array":n.elseIf(a._`${s} === "string" || ${s} === "number" - || ${s} === "boolean" || ${o} === null`).assign(l,a._`[${o}]`)}}n.else(),h(e),n.endIf(),n.if(a._`${l} !== undefined`,(()=>{n.assign(o,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${r}]`,n)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function p(e,t,r,n=l.Correct){const o=n===l.Correct?a.operators.EQ:a.operators.NEQ;let i;switch(e){case"null":return a._`${t} ${o} null`;case"array":i=a._`Array.isArray(${t})`;break;case"object":i=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return a._`typeof ${t} ${o} ${e}`}return n===l.Correct?i:a.not(i);function s(e=a.nil){return a.and(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function d(e,t,r,n){if(1===e.length)return p(e[0],t,r,n);let o;const i=s.toHash(e);if(i.array&&i.object){const e=a._`typeof ${t} != "object"`;o=i.null?e:a._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=a.nil;i.number&&delete i.integer;for(const e in i)o=a.and(o,p(e,t,r,n));return o}t.checkDataType=p,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=s.schemaRefOrVal(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);i.reportError(t,f)}t.reportTypeError=h},2537:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(4475),o=r(6124);function i(e,t,r){const{gen:i,compositeRule:a,data:s,opts:l}=e;if(void 0===r)return;const c=n._`${s}${n.getProperty(t)}`;if(a)return void o.checkStrictMode(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===l.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),i.if(u,n._`${c} = ${n.stringify(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},1321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(7627),o=r(7927),i=r(4566),a=r(7927),s=r(2537),l=r(6488),c=r(4688),u=r(4475),p=r(5018),d=r(9826),f=r(6124),h=r(1885);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,u._`${p.default.data}, ${p.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${g(r,o)}`),function(e,t){e.if(p.default.valCxt,(()=>{e.var(p.default.instancePath,u._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,u._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,u._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,u._`${p.default.valCxt}.${p.default.rootData}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`${p.default.valCxt}.${p.default.dynamicAnchors}`)}),(()=>{e.var(p.default.instancePath,u._`""`),e.var(p.default.parentData,u._`undefined`),e.var(p.default.parentDataProperty,u._`undefined`),e.var(p.default.rootData,p.default.data),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`{}`)}))}(e,o),e.code(i)})):e.func(t,u._`${p.default.data}, ${function(e){return u._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?u._`, ${p.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,n.$async,(()=>e.code(g(r,o)).code(i)))}function g(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function b(e){f.checkUnknownRules(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&f.schemaHasRulesButRef(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return k(e,[],!1,t);const r=o.getSchemaTypes(e.schema);k(e,r,!o.coerceAndCheckDataType(e,r),t)}function x({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(u._`${p.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=u.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${p.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function k(e,t,r,n){const{gen:o,schema:s,data:l,allErrors:c,opts:d,self:h}=e,{RULES:m}=h;function g(f){i.shouldUseGroup(s,f)&&(f.type?(o.if(a.checkDataType(f.type,l,d.strictNumbers)),O(e,f),1===t.length&&t[0]===f.type&&r&&(o.else(),a.reportTypeError(e)),o.endIf()):O(e,f),c||o.if(u._`${p.default.errors} === ${n||0}`))}!s.$ref||!d.ignoreKeywordsWithRef&&f.schemaHasRulesButRef(s,m)?(d.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{_(e.dataTypes,t)||S(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>_(t,e)))):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&S(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&i.shouldUseRule(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&S(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):o.block((()=>P(e,"$ref",m.all.$ref.definition)))}function O(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&s.assignDefaults(e,t.type),r.block((()=>{for(const r of t.rules)i.shouldUseRule(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function _(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function S(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,f.checkStrictMode(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(b(e),y(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&x(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&f.checkStrictMode(e,"default is ignored in the schema root")}(e),n.let(p.default.vErrors,null),n.let(p.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(u._`${p.default.errors} === 0`,(()=>t.return(p.default.data)),(()=>t.throw(u._`new ${o}(${p.default.vErrors})`))):(t.assign(u._`${n}.errors`,p.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${p.default.errors} === 0`))}(e)}))}(e):m(e,(()=>n.topBoolOrEmptySchema(e)))};class E{constructor(e,t,r){if(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=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",C(this.$data,e));else if(this.schemaCode=this.schemaValue,!l.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",p.default.errors))}result(e,t,r){this.gen.if(u.not(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.result(e,void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${u.or(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){h.reportError(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');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=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if(u.or(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return u.or(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${a.checkDataTypes(e,t,o.opts.strictNumbers,a.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=c.getSubschema(this.it,e);c.extendSubschemaData(r,this.it,e),c.extendSubschemaMode(r,e);const o={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(b(e),y(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&x(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=d.resolveUrl(e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",p.default.errors);w(e,i),n.var(t,u._`${i} === ${p.default.errors}`)}(e,t):n.boolOrEmptySchema(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function P(e,t,r,n){const o=new E(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?l.funcKeywordCode(o,r):"macro"in r?l.macroKeywordCode(o,r):(r.compile||r.validate)&&l.funcKeywordCode(o,r)}t.KeywordCxt=E;const $=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return p.default.rootData;if("/"===e[0]){if(!$.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=p.default.rootData}else{const a=A.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+a[1];if(o=a[2],"#"===o){if(s>=t)throw new Error(l("property/index",s));return n[t-s]}if(s>t)throw new Error(l("data",s));if(i=r[t-s],!o)return i}let a=i;const s=o.split("/");for(const e of s)e&&(i=u._`${i}${u.getProperty(f.unescapeJsonPointer(e))}`,a=u._`${a} && ${i}`);return a;function l(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=C},6488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(4475),o=r(5018),i=r(8619),a=r(1885);function s(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function l(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:n.stringify(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:i,parentSchema:a,it:s}=e,c=t.macro.call(s.self,i,a,s),u=l(r,o,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const p=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},p),e.pass(p,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:u,schema:p,parentSchema:d,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,p,d,h):t.validate,g=l(c,u,m),y=c.let("valid");function v(r=(t.async?n._`await `:n.nil)){const a=h.opts.passContext?o.default.this:o.default.self,s=!("compile"in t&&!f||!1===t.schema);c.assign(y,n._`${r}${i.callValidateCode(e,g,a,s)}`,t.modifying)}function b(e){var r;c.if(n.not(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&s(e),b((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(n._`await `)),(t=>c.assign(y,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${g}.errors`;return c.assign(e,null),v(n.nil),e}();t.modifying&&s(e),b((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),a.extendErrors(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?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:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const a=o.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},4688:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(4475),o=r(6124);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:a,errSchemaPath:s,topSchemaRef:l}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${n.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${n.getProperty(t)}${n.getProperty(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${o.escapeFragment(r)}`}}if(void 0!==i){if(void 0===a||void 0===s||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:a,topSchemaRef:l,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:a,dataTypes:s,propertyName:l}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:a,dataPathArr:s,opts:l}=t;u(c.let("data",n._`${t.data}${n.getProperty(r)}`,!0)),e.errorPath=n.str`${a}${o.getErrorPath(r,i,l.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...s,e.parentDataProperty]}function u(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!==a&&(u(a instanceof n.Name?a:c.let("data",a,!0)),void 0!==l&&(e.propertyName=l)),s&&(e.dataTypes=s)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},3325:(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 n=r(1321);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=r(4475);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(8451),a=r(4143),s=r(3664),l=r(7805),c=r(4475),u=r(9826),p=r(7927),d=r(6124),f=r(5449),h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,r,n,o,i,a,s,l,c,u,p,d,f,h,m,g,y,v,b,w,x,k;const O=e.strict,_=null===(t=e.code)||void 0===t?void 0:t.optimize,S=!0===_||void 0===_?1:_||0;return{strictSchema:null===(n=null!==(r=e.strictSchema)&&void 0!==r?r:O)||void 0===n||n,strictNumbers:null===(i=null!==(o=e.strictNumbers)&&void 0!==o?o:O)||void 0===i||i,strictTypes:null!==(s=null!==(a=e.strictTypes)&&void 0!==a?a:O)&&void 0!==s?s:"log",strictTuples:null!==(c=null!==(l=e.strictTuples)&&void 0!==l?l:O)&&void 0!==c?c:"log",strictRequired:null!==(p=null!==(u=e.strictRequired)&&void 0!==u?u:O)&&void 0!==p&&p,code:e.code?{...e.code,optimize:S}:{optimize:S},loopRequired:null!==(d=e.loopRequired)&&void 0!==d?d:200,loopEnum:null!==(f=e.loopEnum)&&void 0!==f?f:200,meta:null===(h=e.meta)||void 0===h||h,messages:null===(m=e.messages)||void 0===m||m,inlineRefs:null===(g=e.inlineRefs)||void 0===g||g,schemaId:null!==(y=e.schemaId)&&void 0!==y?y:"$id",addUsedSchema:null===(v=e.addUsedSchema)||void 0===v||v,validateSchema:null===(b=e.validateSchema)||void 0===b||b,validateFormats:null===(w=e.validateFormats)||void 0===w||w,unicodeRegExp:null===(x=e.unicodeRegExp)||void 0===x||x,int32range:null===(k=e.int32range)||void 0===k||k}}class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return E;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=s.getRules(),w.call(this,g,e,"NOT SUPPORTED"),w.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&_.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),k.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=f;"id"===r&&(n={...f},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{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),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await l.call(this,t.missingSchema),i.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const 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,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=u.normalizeId(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=x.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new l.SchemaEnv({schema:{},schemaId:r});if(t=l.resolveSchema.call(this,n,e),!t)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":{const t=x.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=u.normalizeId(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const 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)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if($.call(this,r,t),!t)return d.eachItem(r,(e=>A.call(this,e))),this;R.call(this,t);const n={...t,type:p.getJSONTypes(t.type),schemaType:p.getJSONTypes(t.schemaType)};return d.eachItem(r,0===n.type.length?e=>A.call(this,e,n):e=>n.type.forEach((t=>A.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const 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){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=T(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:a}=this.opts;if("object"==typeof e)i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;const c=u.getSchemaRefs.call(this,e);return r=u.normalizeId(i||r),s=new l.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:c}),this._cache.set(s.schema,s),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=s),n&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function w(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function x(e){return e=u.normalizeId(e),this.schemas[e]||this.refs[e]}function k(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function O(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function _(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function S(){const e={...this.opts};for(const t of h)delete e[t];return e}t.default=b,b.ValidationError=i.default,b.MissingRefError=a.default;const E={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function $(e,t){const{RULES:r}=this;if(d.eachItem(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function A(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let a=o?i.post:i.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:p.getJSONTypes(t.type),schemaType:p.getJSONTypes(t.schemaType)}};t.before?C.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function C(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,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=T(t)),e.validateSchema=this.compile(t,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function T(e){return{anyOf:[e,j]}}},5449: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}')},4137: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}')},412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4063);n.code='require("ajv/dist/runtime/equal").default',t.default=n},5872:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o=55296&&r<=56319&&o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},3074:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(4475),o=r(6124),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?a(e,n):o.checkStrictMode(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:r,schema:i,data:a,keyword:s,it:l}=e;l.items=!0;const c=r.const("len",n._`${a}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof i&&!o.alwaysValidSchema(l,i)){const i=r.var("valid",n._`${c} <= ${t.length}`);r.if(n.not(i),(()=>function(i){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:o.Type.Num},i),l.allErrors||r.if(n.not(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=a,t.default=i},1422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8619),o=r(4475),i=r(5018),a=r(6124),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,parentSchema:r,data:s,errsCount:l,it:c}=e,{schema:u=c.opts.defaultAdditionalProperties}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:p,opts:d}=c;if(c.props=!0,"all"!==d.removeAdditional&&a.alwaysValidSchema(c,u))return;const f=n.allSchemaProperties(r.properties),h=n.allSchemaProperties(r.patternProperties);function m(e){t.code(o._`delete ${s}[${e}]`)}function g(r){if("all"===d.removeAdditional||d.removeAdditional&&!1===u)m(r);else{if(!1===u)return e.setParams({additionalProperty:r}),e.error(),void(p||t.break());if("object"==typeof u&&!a.alwaysValidSchema(c,u)){const n=t.name("valid");"failing"===d.removeAdditional?(y(r,n,!1),t.if(o.not(n),(()=>{e.reset(),m(r)}))):(y(r,n),p||t.if(o.not(n),(()=>t.break())))}}}function y(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",s,(i=>{f.length||h.length?t.if(function(i){let s;if(f.length>8){const e=a.schemaRefOrVal(c,r.properties,"properties");s=n.isOwnProperty(t,e,i)}else s=f.length?o.or(...f.map((e=>o._`${i} === ${e}`))):o.nil;return h.length&&(s=o.or(s,...h.map((t=>o._`${n.usePattern(e,t)}.test(${i})`)))),o.not(s)}(i),(()=>g(i))):g(i)})),e.ok(o._`${l} === ${i.default.errors}`)}};t.default=s},5716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6124),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if(n.alwaysValidSchema(o,t))return;const a=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(a)}))}};t.default=o},1668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(8619).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},9564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:a,it:s}=e;let l,c;const{minContains:u,maxContains:p}=i;s.opts.next?(l=void 0===u?1:u,c=p):l=1;const d=t.const("len",n._`${a}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void o.checkStrictMode(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return o.checkStrictMode(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if(o.alwaysValidSchema(s,r)){let t=n._`${d} >= ${l}`;return void 0!==c&&(t=n._`${t} && ${d} <= ${c}`),void e.pass(t)}s.items=!0;const f=t.name("valid");if(void 0===c&&1===l)h(f,(()=>t.if(f,(()=>t.break()))));else{t.let(f,!1);const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${l}`,(()=>t.assign(f,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(f,!1).break())),1===l?t.assign(f,!0):t.if(n._`${e} >= ${l}`,(()=>t.assign(f,!0))))}(r)))))}function h(r,n){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}e.result(f,(()=>e.reset()))}};t.default=i},1117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(4475),o=r(6124),i=r(8619);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e}, + || ${s} === "boolean" || ${o} === null`).assign(l,a._`[${o}]`)}}n.else(),h(e),n.endIf(),n.if(a._`${l} !== undefined`,(()=>{n.assign(o,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${r}]`,n)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function p(e,t,r,n=l.Correct){const o=n===l.Correct?a.operators.EQ:a.operators.NEQ;let i;switch(e){case"null":return a._`${t} ${o} null`;case"array":i=a._`Array.isArray(${t})`;break;case"object":i=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return a._`typeof ${t} ${o} ${e}`}return n===l.Correct?i:a.not(i);function s(e=a.nil){return a.and(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function d(e,t,r,n){if(1===e.length)return p(e[0],t,r,n);let o;const i=s.toHash(e);if(i.array&&i.object){const e=a._`typeof ${t} != "object"`;o=i.null?e:a._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=a.nil;i.number&&delete i.integer;for(const e in i)o=a.and(o,p(e,t,r,n));return o}t.checkDataType=p,t.checkDataTypes=d;const f={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=s.schemaRefOrVal(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);i.reportError(t,f)}t.reportTypeError=h},2537:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(4475),o=r(6124);function i(e,t,r){const{gen:i,compositeRule:a,data:s,opts:l}=e;if(void 0===r)return;const c=n._`${s}${n.getProperty(t)}`;if(a)return void o.checkStrictMode(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===l.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),i.if(u,n._`${c} = ${n.stringify(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},1321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(7627),o=r(7927),i=r(4566),a=r(7927),s=r(2537),l=r(6488),c=r(4688),u=r(4475),p=r(5018),d=r(9826),f=r(6124),h=r(1885);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,u._`${p.default.data}, ${p.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${g(r,o)}`),function(e,t){e.if(p.default.valCxt,(()=>{e.var(p.default.instancePath,u._`${p.default.valCxt}.${p.default.instancePath}`),e.var(p.default.parentData,u._`${p.default.valCxt}.${p.default.parentData}`),e.var(p.default.parentDataProperty,u._`${p.default.valCxt}.${p.default.parentDataProperty}`),e.var(p.default.rootData,u._`${p.default.valCxt}.${p.default.rootData}`),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`${p.default.valCxt}.${p.default.dynamicAnchors}`)}),(()=>{e.var(p.default.instancePath,u._`""`),e.var(p.default.parentData,u._`undefined`),e.var(p.default.parentDataProperty,u._`undefined`),e.var(p.default.rootData,p.default.data),t.dynamicRef&&e.var(p.default.dynamicAnchors,u._`{}`)}))}(e,o),e.code(i)})):e.func(t,u._`${p.default.data}, ${function(e){return u._`{${p.default.instancePath}="", ${p.default.parentData}, ${p.default.parentDataProperty}, ${p.default.rootData}=${p.default.data}${e.dynamicRef?u._`, ${p.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,n.$async,(()=>e.code(g(r,o)).code(i)))}function g(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function b(e){f.checkUnknownRules(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&f.schemaHasRulesButRef(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return k(e,[],!1,t);const r=o.getSchemaTypes(e.schema);k(e,r,!o.coerceAndCheckDataType(e,r),t)}function x({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(u._`${p.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=u.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${p.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function k(e,t,r,n){const{gen:o,schema:s,data:l,allErrors:c,opts:d,self:h}=e,{RULES:m}=h;function g(f){i.shouldUseGroup(s,f)&&(f.type?(o.if(a.checkDataType(f.type,l,d.strictNumbers)),O(e,f),1===t.length&&t[0]===f.type&&r&&(o.else(),a.reportTypeError(e)),o.endIf()):O(e,f),c||o.if(u._`${p.default.errors} === ${n||0}`))}!s.$ref||!d.ignoreKeywordsWithRef&&f.schemaHasRulesButRef(s,m)?(d.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{S(e.dataTypes,t)||_(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),e.dataTypes=e.dataTypes.filter((e=>S(t,e)))):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&_(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&i.shouldUseRule(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&_(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):o.block((()=>P(e,"$ref",m.all.$ref.definition)))}function O(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&s.assignDefaults(e,t.type),r.block((()=>{for(const r of t.rules)i.shouldUseRule(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function _(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,f.checkStrictMode(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(b(e),y(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&x(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&f.checkStrictMode(e,"default is ignored in the schema root")}(e),n.let(p.default.vErrors,null),n.let(p.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(u._`${p.default.errors} === 0`,(()=>t.return(p.default.data)),(()=>t.throw(u._`new ${o}(${p.default.vErrors})`))):(t.assign(u._`${n}.errors`,p.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${p.default.errors} === 0`))}(e)}))}(e):m(e,(()=>n.topBoolOrEmptySchema(e)))};class E{constructor(e,t,r){if(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=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",A(this.$data,e));else if(this.schemaCode=this.schemaValue,!l.validSchemaType(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",p.default.errors))}result(e,t,r){this.gen.if(u.not(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.result(e,void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${u.or(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){h.reportError(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');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=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if(u.or(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return u.or(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${a.checkDataTypes(e,t,o.opts.strictNumbers,a.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=c.getSubschema(this.it,e);c.extendSubschemaData(r,this.it,e),c.extendSubschemaMode(r,e);const o={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(b(e),y(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&x(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=d.resolveUrl(e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",p.default.errors);w(e,i),n.var(t,u._`${i} === ${p.default.errors}`)}(e,t):n.boolOrEmptySchema(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=f.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=f.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function P(e,t,r,n){const o=new E(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?l.funcKeywordCode(o,r):"macro"in r?l.macroKeywordCode(o,r):(r.compile||r.validate)&&l.funcKeywordCode(o,r)}t.KeywordCxt=E;const $=/^\/(?:[^~]|~0|~1)*$/,C=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return p.default.rootData;if("/"===e[0]){if(!$.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=p.default.rootData}else{const a=C.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+a[1];if(o=a[2],"#"===o){if(s>=t)throw new Error(l("property/index",s));return n[t-s]}if(s>t)throw new Error(l("data",s));if(i=r[t-s],!o)return i}let a=i;const s=o.split("/");for(const e of s)e&&(i=u._`${i}${u.getProperty(f.unescapeJsonPointer(e))}`,a=u._`${a} && ${i}`);return a;function l(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=A},6488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(4475),o=r(5018),i=r(8619),a=r(1885);function s(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function l(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:n.stringify(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:i,parentSchema:a,it:s}=e,c=t.macro.call(s.self,i,a,s),u=l(r,o,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const p=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},p),e.pass(p,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:u,schema:p,parentSchema:d,$data:f,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!f&&t.compile?t.compile.call(h.self,p,d,h):t.validate,g=l(c,u,m),y=c.let("valid");function v(r=(t.async?n._`await `:n.nil)){const a=h.opts.passContext?o.default.this:o.default.self,s=!("compile"in t&&!f||!1===t.schema);c.assign(y,n._`${r}${i.callValidateCode(e,g,a,s)}`,t.modifying)}function b(e){var r;c.if(n.not(null!==(r=t.valid)&&void 0!==r?r:y),e)}e.block$data(y,(function(){if(!1===t.errors)v(),t.modifying&&s(e),b((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(n._`await `)),(t=>c.assign(y,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${g}.errors`;return c.assign(e,null),v(n.nil),e}();t.modifying&&s(e),b((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),a.extendErrors(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?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:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const a=o.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},4688:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(4475),o=r(6124);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:a,errSchemaPath:s,topSchemaRef:l}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${n.getProperty(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${n.getProperty(t)}${n.getProperty(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${o.escapeFragment(r)}`}}if(void 0!==i){if(void 0===a||void 0===s||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:a,topSchemaRef:l,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:a,dataTypes:s,propertyName:l}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:a,dataPathArr:s,opts:l}=t;u(c.let("data",n._`${t.data}${n.getProperty(r)}`,!0)),e.errorPath=n.str`${a}${o.getErrorPath(r,i,l.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...s,e.parentDataProperty]}function u(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!==a&&(u(a instanceof n.Name?a:c.let("data",a,!0)),void 0!==l&&(e.propertyName=l)),s&&(e.dataTypes=s)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},3325:(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 n=r(1321);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=r(4475);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(8451),a=r(4143),s=r(3664),l=r(7805),c=r(4475),u=r(9826),p=r(7927),d=r(6124),f=r(425),h=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function v(e){var t,r,n,o,i,a,s,l,c,u,p,d,f,h,m,g,y,v,b,w,x,k;const O=e.strict,S=null===(t=e.code)||void 0===t?void 0:t.optimize,_=!0===S||void 0===S?1:S||0;return{strictSchema:null===(n=null!==(r=e.strictSchema)&&void 0!==r?r:O)||void 0===n||n,strictNumbers:null===(i=null!==(o=e.strictNumbers)&&void 0!==o?o:O)||void 0===i||i,strictTypes:null!==(s=null!==(a=e.strictTypes)&&void 0!==a?a:O)&&void 0!==s?s:"log",strictTuples:null!==(c=null!==(l=e.strictTuples)&&void 0!==l?l:O)&&void 0!==c?c:"log",strictRequired:null!==(p=null!==(u=e.strictRequired)&&void 0!==u?u:O)&&void 0!==p&&p,code:e.code?{...e.code,optimize:_}:{optimize:_},loopRequired:null!==(d=e.loopRequired)&&void 0!==d?d:200,loopEnum:null!==(f=e.loopEnum)&&void 0!==f?f:200,meta:null===(h=e.meta)||void 0===h||h,messages:null===(m=e.messages)||void 0===m||m,inlineRefs:null===(g=e.inlineRefs)||void 0===g||g,schemaId:null!==(y=e.schemaId)&&void 0!==y?y:"$id",addUsedSchema:null===(v=e.addUsedSchema)||void 0===v||v,validateSchema:null===(b=e.validateSchema)||void 0===b||b,validateFormats:null===(w=e.validateFormats)||void 0===w||w,unicodeRegExp:null===(x=e.unicodeRegExp)||void 0===x||x,int32range:null===(k=e.int32range)||void 0===k||k}}class b{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...v(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return E;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=s.getRules(),w.call(this,g,e,"NOT SUPPORTED"),w.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=_.call(this),e.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),k.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=f;"id"===r&&(n={...f},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{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),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await l.call(this,t.missingSchema),i.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const 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,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=u.normalizeId(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=x.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new l.SchemaEnv({schema:{},schemaId:r});if(t=l.resolveSchema.call(this,n,e),!t)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":{const t=x.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=u.normalizeId(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const 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)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if($.call(this,r,t),!t)return d.eachItem(r,(e=>C.call(this,e))),this;R.call(this,t);const n={...t,type:p.getJSONTypes(t.type),schemaType:p.getJSONTypes(t.schemaType)};return d.eachItem(r,0===n.type.length?e=>C.call(this,e,n):e=>n.type.forEach((t=>C.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const 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){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=T(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:a}=this.opts;if("object"==typeof e)i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;const c=u.getSchemaRefs.call(this,e);return r=u.normalizeId(i||r),s=new l.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:c}),this._cache.set(s.schema,s),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=s),n&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function w(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function x(e){return e=u.normalizeId(e),this.schemas[e]||this.refs[e]}function k(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function O(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function _(){const e={...this.opts};for(const t of h)delete e[t];return e}t.default=b,b.ValidationError=i.default,b.MissingRefError=a.default;const E={log(){},warn(){},error(){}},P=/^[a-z_$][a-z0-9_$:-]*$/i;function $(e,t){const{RULES:r}=this;if(d.eachItem(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function C(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let a=o?i.post:i.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:p.getJSONTypes(t.type),schemaType:p.getJSONTypes(t.schemaType)}};t.before?A.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function A(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,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=T(t)),e.validateSchema=this.compile(t,!0))}const j={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function T(e){return{anyOf:[e,j]}}},412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4063);n.code='require("ajv/dist/runtime/equal").default',t.default=n},5872:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o=55296&&r<=56319&&o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},3074:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(4475),o=r(6124),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?a(e,n):o.checkStrictMode(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:r,schema:i,data:a,keyword:s,it:l}=e;l.items=!0;const c=r.const("len",n._`${a}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof i&&!o.alwaysValidSchema(l,i)){const i=r.var("valid",n._`${c} <= ${t.length}`);r.if(n.not(i),(()=>function(i){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:o.Type.Num},i),l.allErrors||r.if(n.not(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=a,t.default=i},1422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8619),o=r(4475),i=r(5018),a=r(6124),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,parentSchema:r,data:s,errsCount:l,it:c}=e,{schema:u=c.opts.defaultAdditionalProperties}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:p,opts:d}=c;if(c.props=!0,"all"!==d.removeAdditional&&a.alwaysValidSchema(c,u))return;const f=n.allSchemaProperties(r.properties),h=n.allSchemaProperties(r.patternProperties);function m(e){t.code(o._`delete ${s}[${e}]`)}function g(r){if("all"===d.removeAdditional||d.removeAdditional&&!1===u)m(r);else{if(!1===u)return e.setParams({additionalProperty:r}),e.error(),void(p||t.break());if("object"==typeof u&&!a.alwaysValidSchema(c,u)){const n=t.name("valid");"failing"===d.removeAdditional?(y(r,n,!1),t.if(o.not(n),(()=>{e.reset(),m(r)}))):(y(r,n),p||t.if(o.not(n),(()=>t.break())))}}}function y(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",s,(i=>{f.length||h.length?t.if(function(i){let s;if(f.length>8){const e=a.schemaRefOrVal(c,r.properties,"properties");s=n.isOwnProperty(t,e,i)}else s=f.length?o.or(...f.map((e=>o._`${i} === ${e}`))):o.nil;return h.length&&(s=o.or(s,...h.map((t=>o._`${n.usePattern(e,t)}.test(${i})`)))),o.not(s)}(i),(()=>g(i))):g(i)})),e.ok(o._`${l} === ${i.default.errors}`)}};t.default=s},5716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6124),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if(n.alwaysValidSchema(o,t))return;const a=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(a)}))}};t.default=o},1668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(8619).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},9564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:a,it:s}=e;let l,c;const{minContains:u,maxContains:p}=i;s.opts.next?(l=void 0===u?1:u,c=p):l=1;const d=t.const("len",n._`${a}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void o.checkStrictMode(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return o.checkStrictMode(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if(o.alwaysValidSchema(s,r)){let t=n._`${d} >= ${l}`;return void 0!==c&&(t=n._`${t} && ${d} <= ${c}`),void e.pass(t)}s.items=!0;const f=t.name("valid");if(void 0===c&&1===l)h(f,(()=>t.if(f,(()=>t.break()))));else{t.let(f,!1);const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${l}`,(()=>t.assign(f,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(f,!1).break())),1===l?t.assign(f,!0):t.if(n._`${e} >= ${l}`,(()=>t.assign(f,!0))))}(r)))))}function h(r,n){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}e.result(f,(()=>e.reset()))}};t.default=i},1117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(4475),o=r(6124),i=r(8619);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e}, missingProperty: ${o}, depsCount: ${t}, - deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);s(e,t),l(e,r)}};function s(e,t=e.schema){const{gen:r,data:o,it:a}=e;if(0===Object.keys(t).length)return;const s=r.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=i.propertyInData(r,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?r.if(u,(()=>{for(const t of c)i.checkReportMissingProp(e,t)})):(r.if(n._`${u} && (${i.checkMissingProp(e,c,s)})`),i.reportMissingProp(e,s),r.else())}}function l(e,t=e.schema){const{gen:r,data:n,keyword:a,it:s}=e,l=r.name("valid");for(const c in t)o.alwaysValidSchema(s,t[c])||(r.if(i.propertyInData(r,n,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>r.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=a},5184:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&o.checkStrictMode(i,'"if" without "then" and "else" is ignored');const s=a(i,"then"),l=a(i,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,p("then",r),p("else",r))}else s?t.if(u,p("then")):t.if(n.not(u),p("else"));function p(r,o){return()=>{const i=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(i,c),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const r=e.schema[t];return void 0!==r&&!o.alwaysValidSchema(e,r)}t.default=i},9616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3074),o=r(6988),i=r(6348),a=r(9822),s=r(9564),l=r(1117),c=r(4002),u=r(1422),p=r(9690),d=r(9883),f=r(8435),h=r(1668),m=r(9684),g=r(5716),y=r(5184),v=r(5642);t.default=function(e=!1){const t=[f.default,h.default,m.default,g.default,y.default,v.default,c.default,u.default,l.default,p.default,d.default];return e?t.push(o.default,a.default):t.push(n.default,i.default),t.push(s.default),t}},6348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(4475),o=r(6124),i=r(8619),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,o.alwaysValidSchema(r,t)||e.ok(i.validateArray(e))}};function s(e,t,r=e.schema){const{gen:i,parentSchema:a,data:s,keyword:l,it:c}=e;!function(e){const{opts:n,errSchemaPath:i}=c,a=r.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!s){const e=`"${l}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;o.checkStrictMode(c,e,n.strictTuples)}}(a),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,r.length,c.items));const u=i.name("valid"),p=i.const("len",n._`${s}.length`);r.forEach(((t,r)=>{o.alwaysValidSchema(c,t)||(i.if(n._`${p} > ${r}`,(()=>e.subschema({keyword:l,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=s,t.default=a},9822:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i=r(8619),a=r(3074),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,o.alwaysValidSchema(n,t)||(s?a.validateAdditionalItems(e,s):e.ok(i.validateArray(e)))}};t.default=s},8435:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6124),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if(n.alwaysValidSchema(o,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.result(i,(()=>e.error()),(()=>e.reset()))},error:{message:"must NOT be valid"}};t.default=o},9684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:i,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&i.discriminator)return;const s=r,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((r,i)=>{let s;o.alwaysValidSchema(a,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},u),i>0&&t.if(n._`${u} && ${l}`).assign(l,!1).assign(c,n._`[${c}, ${i}]`).else(),t.if(u,(()=>{t.assign(l,!0),t.assign(c,i),s&&e.mergeEvaluated(s,n.Name)}))}))})),e.result(l,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},9883:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8619),o=r(4475),i=r(6124),a=r(6124),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:l,it:c}=e,{opts:u}=c,p=n.allSchemaProperties(r),d=p.filter((e=>i.alwaysValidSchema(c,r[e])));if(0===p.length||d.length===p.length&&(!c.opts.unevaluated||!0===c.props))return;const f=u.strictSchema&&!u.allowMatchingProperties&&l.properties,h=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=a.evaluatedPropsToName(t,c.props));const{props:m}=c;function g(e){for(const t in f)new RegExp(e).test(t)&&i.checkStrictMode(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(r){t.forIn("key",s,(i=>{t.if(o._`${n.usePattern(e,r)}.test(${i})`,(()=>{const n=d.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:a.Type.Str},h),c.opts.unevaluated&&!0!==m?t.assign(o._`${m}[${i}]`,!0):n||c.allErrors||t.if(o.not(h),(()=>t.break()))}))}))}!function(){for(const e of p)f&&g(e),c.allErrors?y(e):(t.var(h,!0),y(e),t.if(h))}()}};t.default=s},6988:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6348),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>n.validateTuple(e,"items")};t.default=o},9690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1321),o=r(8619),i=r(6124),a=r(1422),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:l,it:c}=e;("all"===c.opts.removeAdditional&&void 0===s.additionalProperties||!1===c.opts.defaultAdditionalProperties)&&a.default.code(new n.KeywordCxt(c,a.default,"additionalProperties"));const u=o.allSchemaProperties(r);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(t,i.toHash(u),c.props));const p=u.filter((e=>!i.alwaysValidSchema(c,r[e])));if(0===p.length)return;const d=t.name("valid");for(const r of p)f(r)?h(r):(t.if(o.propertyInData(t,l,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(d,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(d);function f(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},d)}}};t.default=s},4002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:i,it:a}=e;if(o.alwaysValidSchema(a,r))return;const s=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if(n.not(s),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(s)}};t.default=i},5642:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6124),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&n.checkStrictMode(r,`"${e}" without "if" is ignored`)}};t.default=o},8619:(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;const n=r(4475),o=r(6124),i=r(5018);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function s(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function l(e,t,r,o){const i=n._`${t}${n.getProperty(r)} === undefined`;return o?n.or(i,n.not(s(e,t,r))):i}function c(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(l(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return n.or(...o.map((o=>n.and(l(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=s,t.propertyInData=function(e,t,r,o){const i=n._`${t}${n.getProperty(r)} !== undefined`;return o?n._`${i} && ${s(e,t,r)}`:i},t.noPropertyInData=l,t.allSchemaProperties=c,t.schemaProperties=function(e,t){return c(t).filter((r=>!o.alwaysValidSchema(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:a,errorPath:s},it:l},c,u,p){const d=p?n._`${e}, ${t}, ${o}${a}`:t,f=[[i.default.instancePath,n.strConcat(i.default.instancePath,s)],[i.default.parentData,l.parentData],[i.default.parentDataProperty,l.parentDataProperty],[i.default.rootData,i.default.rootData]];l.opts.dynamicRef&&f.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const h=n._`${d}, ${r.object(...f)}`;return u!==n.nil?n._`${c}.call(${u}, ${h})`:n._`${c}(${h})`},t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"";return e.scopeValue("pattern",{key:r,ref:new RegExp(r,o),code:n._`new RegExp(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:a}=e,s=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return l((()=>t.assign(e,!1))),e}return t.var(s,!0),l((()=>t.break())),s;function l(a){const l=t.const("len",n._`${r}.length`);t.forRange("i",0,l,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},s),t.if(n.not(s),a)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>o.alwaysValidSchema(a,e)))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const a=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},l);t.assign(s,n._`${s} || ${l}`),e.mergeValidEvaluated(a,l)||t.if(n.not(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},5060:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},8223:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5060),o=r(4028),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=i},4028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(4143),o=r(8619),i=r(4475),a=r(5018),s=r(7805),l=r(6124),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:a,schemaEnv:l,validateName:c,opts:d,self:f}=o,{root:h}=l;if(("#"===r||"#/"===r)&&a===h.baseId)return function(){if(l===h)return p(e,c,l,l.$async);const r=t.scopeValue("root",{ref:h});return p(e,i._`${r}.validate`,h,h.$async)}();const m=s.resolveRef.call(f,h,a,r);if(void 0===m)throw new n.default(a,r);return m instanceof s.SchemaEnv?function(t){const r=u(e,t);p(e,r,t,t.$async)}(m):function(n){const o=t.scopeValue("schema",!0===d.code.source?{ref:n,code:i.stringify(n)}:{ref:n}),a=t.name("valid"),s=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},a);e.mergeEvaluated(s),e.ok(a)}(m)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function p(e,t,r,n){const{gen:s,it:c}=e,{allErrors:u,schemaEnv:p,opts:d}=c,f=d.passContext?a.default.this:i.nil;function h(e){const t=i._`${e}.errors`;s.assign(a.default.vErrors,i._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),s.assign(a.default.errors,i._`${a.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=l.mergeEvaluated.props(s,n.props,c.props));else{const t=s.var("props",i._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(s,t,c.props,i.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=l.mergeEvaluated.items(s,n.items,c.items));else{const t=s.var("items",i._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(s,t,c.items,i.Name)}}n?function(){if(!p.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(i._`await ${o.callValidateCode(e,t,f)}`),m(t),u||s.assign(r,!0)}),(e=>{s.if(i._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),u||s.assign(r,!1)})),e.ok(r)}():function(){const r=s.name("visitedNodes");s.code(i._`const ${r} = visitedNodesForRef.get(${t}) || new Set()`),s.if(i._`!${r}.has(${e.data})`,(()=>{s.code(i._`visitedNodesForRef.set(${t}, ${r})`),s.code(i._`const dataNode = ${e.data}`),s.code(i._`${r}.add(dataNode)`);const n=e.result(o.callValidateCode(e,t,f),(()=>m(t)),(()=>h(t)));return s.code(i._`${r}.delete(dataNode)`),n}))}()}t.getValidate=u,t.callRef=p,t.default=c},5522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6545),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:i,parentSchema:a,it:s}=e,{oneOf:l}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const c=i.propertyName;if("string"!=typeof c)throw new Error("discriminator: requires propertyName");if(!l)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),p=t.const("tag",n._`${r}${n.getProperty(c)}`);function d(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}function f(e){return e.hasOwnProperty("$ref")}t.if(n._`typeof ${p} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(a);let n=!0;for(let t=0;te.error(!1,{discrError:o.DiscrError.Tag,tag:p,tagName:c}))),e.ok(u)}};t.default=i},6545:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},6479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8223),o=r(3799),i=r(9616),a=r(3815),s=r(4826),l=[n.default,o.default,i.default(),a.default,s.metadataVocabulary,s.contentVocabulary];t.default=l},157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:o,$data:i,schema:a,schemaCode:s,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:p,self:d}=l;c.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),a=r.const("fDef",n._`${i}[${s}]`),l=r.let("fType"),u=r.let("format");r.if(n._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>r.assign(l,n._`${a}.type || "string"`).assign(u,n._`${a}.validate`)),(()=>r.assign(l,n._`"string"`).assign(u,a))),e.fail$data(n.or(!1===c.strictSchema?n.nil:n._`${s} && !${u}`,function(){const e=p.$async?n._`(${a}.async ? await ${u}(${o}) : ${u}(${o}))`:n._`${u}(${o})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return n._`${u} && ${u} !== true && ${l} === ${t} && !${r}`}()))}():function(){const i=d.formats[a];if(!i)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${u}"`}d.logger.warn(e())}();if(!0===i)return;const[s,l,f]=function(e){const t=e instanceof RegExp?n.regexpCode(e):c.code.formats?n._`${c.code.formats}${n.getProperty(a)}`:void 0,o=r.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.validate`]}(i);s===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!p.$async)throw new Error("async format in sync schema");return n._`await ${f}(${o})`}return"function"==typeof l?n._`${f}(${o})`:n._`${f}.test(${o})`}())}())}};t.default=o},3815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(157).default];t.default=n},4826:(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"]},7535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i=r(412),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:a,schemaCode:s,schema:l}=e;a||l&&"object"==typeof l?e.fail$data(n._`!${o.useFunc(t,i.default)}(${r}, ${s})`):e.fail(n._`${l} !== ${r}`)}};t.default=a},4147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i=r(412),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:a,schema:s,schemaCode:l,it:c}=e;if(!a&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=c.opts.loopEnum,p=o.useFunc(t,i.default);let d;if(u||a)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",l,(e=>t.if(n._`${p}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",l);d=n.or(...s.map(((t,o)=>function(e,t){const o=s[t];return"object"==typeof o&&null!==o?n._`${p}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(d)}};t.default=a},3799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9640),o=r(7692),i=r(3765),a=r(8582),s=r(6711),l=r(7835),c=r(8950),u=r(7326),p=r(7535),d=r(4147),f=[n.default,o.default,i.default,a.default,s.default,l.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},p.default,d.default];t.default=f},8950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},3765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=r(6124),i=r(5872),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:a,it:s}=e,l="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===s.opts.unicode?n._`${r}.length`:n._`${o.useFunc(e.gen,i.default)}(${r})`;e.fail$data(n._`${c} ${l} ${a}`)}};t.default=a},9640:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || isNaN(${r})`)}};t.default=s},6711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},7692:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4475),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:o,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),l=a?n._`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:n._`${s} !== parseInt(${s})`;e.fail$data(n._`(${o} === 0 || (${s} = ${r}/${o}, ${l}))`)}};t.default=o},8582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8619),o=r(4475),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:a,it:s}=e,l=s.opts.unicodeRegExp?"u":"",c=r?o._`(new RegExp(${a}, ${l}))`:n.usePattern(e,i);e.fail$data(o._`!${c}.test(${t})`)}};t.default=i},7835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8619),o=r(4475),i=r(6124),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:a,data:s,$data:l,it:c}=e,{opts:u}=c;if(!l&&0===r.length)return;const p=r.length>=u.loopRequired;if(c.allErrors?function(){if(p||l)e.block$data(o.nil,d);else for(const t of r)n.checkReportMissingProp(e,t)}():function(){const i=t.let("missing");if(p||l){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,a,(()=>{t.assign(i,n.propertyInData(t,s,r,u.ownProperties)),t.if(o.not(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if(n.checkMissingProp(e,r,i)),n.reportMissingProp(e,i),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;i.checkStrictMode(c,t,c.opts.strictRequired)}}function d(){t.forOf("prop",a,(r=>{e.setParams({missingProperty:r}),t.if(n.noPropertyInData(t,s,r,u.ownProperties),(()=>e.error()))}))}}};t.default=a},7326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7927),o=r(4475),i=r(6124),a=r(412),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:s,schema:l,parentSchema:c,schemaCode:u,it:p}=e;if(!s&&!l)return;const d=t.let("valid"),f=c.items?n.getSchemaTypes(c.items):[];function h(i,a){const s=t.name("item"),l=n.checkDataTypes(f,s,p.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(s,o._`${r}[${i}]`),t.if(l,o._`continue`),f.length>1&&t.if(o._`typeof ${s} == "string"`,o._`${s} += "_"`),t.if(o._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(a,o._`${c}[${s}]`),e.error(),t.assign(d,!1).break()})).code(o._`${c}[${s}] = ${i}`)}))}function m(n,s){const l=i.useFunc(t,a.default),c=t.name("outer");t.label(c).for(o._`;${n}--;`,(()=>t.for(o._`${s} = ${n}; ${s}--;`,(()=>t.if(o._`${l}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(d,!1).break(c)}))))))}e.block$data(d,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(d,!0),t.if(o._`${n} > 1`,(()=>(f.length>0&&!f.some((e=>"object"===e||"array"===e))?h:m)(n,i)))}),o._`${u} === false`),e.ok(d)}};t.default=s},4029:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,o,i,a,s,l,c,u,p){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var d in n(i,a,s,l,c,u,p),i){var f=i[d];if(Array.isArray(f)){if(d in t.arrayKeywords)for(var h=0;hr.addProblemToIgnore(e))),fileDependencies:o.getFiles(),rootType:_.DefinitionRoot,refTypes:P.refTypes,visitorsData:P.visitorsData}}))}function k(e,t){switch(t){case d.OasMajorVersion.Version3:switch(e){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";default:return null}case d.OasMajorVersion.Version2:switch(e){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}}}function O(e,t,r,n,a){let s;const l={ref:{leave(o,s,l){if(!l.location||void 0===l.node)return void m.reportUnresolvedRef(l,s.report,s.location);if(l.location.source===n.source&&l.location.source===s.location.source&&"scalar"!==s.type.name&&!t)return;if(r&&y.isRedoclyRegistryURL(o.$ref))return;const p=k(s.type.name,e);p?t?(u(p,l,s),c(o,l,s)):(o.$ref=u(p,l,s),function(e,t,r){const o=i.makeRefId(r.location.source.absoluteRef,e.$ref);a.set(o,{document:n,isRemote:!1,node:t.node,nodePointer:e.$ref,resolved:!0})}(o,l,s)):c(o,l,s)}},DefinitionRoot:{enter(t){e===d.OasMajorVersion.Version3?s=t.components=t.components||{}:e===d.OasMajorVersion.Version2&&(s=t)}}};function c(e,t,r){g.isPlainObject(t.node)?(delete e.$ref,Object.assign(e,t.node)):r.parent[r.key]=t.node}function u(t,r,n){s[t]=s[t]||{};const o=function(e,t,r){const[n,o]=[e.location.source.absoluteRef,e.location.pointer],i=s[t];let a="";const l=o.slice(2).split("/").filter(Boolean);for(;l.length>0;)if(a=l.pop()+(a?`-${a}`:""),!i||!i[a]||p(i[a],e,r))return a;if(a=f.refBaseName(n)+(a?`_${a}`:""),!i[a]||p(i[a],e,r))return a;const c=a;let u=2;for(;i[a]&&!p(i[a],e,r);)a=`${c}-${u}`,u++;return i[a]||r.report({message:`Two schemas are referenced with the same name but different content. Renamed ${c} to ${a}.`,location:r.location,forceSeverity:"warn"}),a}(r,t,n);return s[t][o]=r.node,e===d.OasMajorVersion.Version3?`#/components/${t}/${o}`:`#/${t}/${o}`}function p(e,t,r){var n;return!(!f.isRef(e)||(null===(n=r.resolve(e).location)||void 0===n?void 0:n.absolutePointer)!==t.location.absolutePointer)||o(e,t.node)}return e===d.OasMajorVersion.Version3&&(l.DiscriminatorMapping={leave(r,n){for(const o of Object.keys(r)){const i=r[o],a=n.resolve({$ref:i});if(!a.location||void 0===a.node)return void m.reportUnresolvedRef(a,n.report,n.location.child(o));const s=k("Schema",e);t?u(s,a,n):r[o]=u(s,a,n)}}}),l}!function(e){e.Version2="oas2",e.Version3_0="oas3_0",e.Version3_1="oas3_1"}(w=t.OasVersion||(t.OasVersion={})),t.bundle=function(e){return n(this,void 0,void 0,(function*(){const{ref:t,doc:r,externalRefResolver:n=new i.BaseResolver(e.config.resolve),base:o=null}=e;if(!t&&!r)throw new Error("Document or reference is required.\n");const a=void 0!==r?r:yield n.resolveDocument(o,t,!0);if(a instanceof Error)throw a;return x(Object.assign(Object.assign({document:a},e),{config:e.config.lint,externalRefResolver:n}))}))},t.bundleDocument=x,t.mapTypeToComponent=k},6877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rules:{"info-description":"error","info-contact":"error","info-license":"error","info-license-url":"error","tag-description":"error","tags-alphabetical":"error","parameter-description":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-path-trailing-slash":"error","path-segment-plural":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error",assertions:"error","operation-operationId":"error","operation-summary":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-security-defined":"error","operation-singular-tag":"error","no-unresolved-refs":"error","no-enum-type-mismatch":"error","boolean-parameter-prefixes":"error","paths-kebab-case":"error","no-http-verbs-in-paths":"error","path-excludes-patterns":{severity:"error",patterns:[]},"request-mime-type":"error",spec:"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error"},oas3_0Rules:{"no-invalid-media-type-examples":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-servers-empty-enum":"error"},oas3_1Rules:{"no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-servers-empty-enum":"error"}}},6242:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultPlugin=t.builtInConfigs=void 0;const n=r(8057),o=r(6877),i=r(9016),a=r(226),s=r(7523),l=r(226),c=r(7523),u=r(1753),p=r(7060);t.builtInConfigs={recommended:n.default,minimal:i.default,all:o.default,"redocly-registry":{decorators:{"registry-dependencies":"on"}}},t.defaultPlugin={id:"",rules:{oas3:a.rules,oas2:s.rules},preprocessors:{oas3:l.preprocessors,oas2:c.preprocessors},decorators:{oas3:u.decorators,oas2:p.decorators},configs:t.builtInConfigs}},7040:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o{if(p.isString(e)&&s.isAbsoluteUrl(e))throw new Error(a.red("We don't support remote plugins yet."));const o=p.isString(e)?r(i.resolve(i.dirname(t),e)):e,l=o.id;if("string"!=typeof l)throw new Error(a.red(`Plugin must define \`id\` property in ${a.blue(e.toString())}.`));if(n.has(l)){const t=n.get(l);throw new Error(a.red(`Plugin "id" must be unique. Plugin ${a.blue(e.toString())} uses id "${a.blue(l)}" already seen in ${a.blue(t)}`))}n.set(l,e.toString());const c=Object.assign(Object.assign({id:l},o.configs?{configs:o.configs}:{}),o.typeExtension?{typeExtension:o.typeExtension}:{});if(o.rules){if(!o.rules.oas3&&!o.rules.oas2)throw new Error(`Plugin rules must have \`oas3\` or \`oas2\` rules "${e}.`);c.rules={},o.rules.oas3&&(c.rules.oas3=u.prefixRules(o.rules.oas3,l)),o.rules.oas2&&(c.rules.oas2=u.prefixRules(o.rules.oas2,l))}if(o.preprocessors){if(!o.preprocessors.oas3&&!o.preprocessors.oas2)throw new Error(`Plugin \`preprocessors\` must have \`oas3\` or \`oas2\` preprocessors "${e}.`);c.preprocessors={},o.preprocessors.oas3&&(c.preprocessors.oas3=u.prefixRules(o.preprocessors.oas3,l)),o.preprocessors.oas2&&(c.preprocessors.oas2=u.prefixRules(o.preprocessors.oas2,l))}if(o.decorators){if(!o.decorators.oas3&&!o.decorators.oas2)throw new Error(`Plugin \`decorators\` must have \`oas3\` or \`oas2\` decorators "${e}.`);c.decorators={},o.decorators.oas3&&(c.decorators.oas3=u.prefixRules(o.decorators.oas3,l)),o.decorators.oas2&&(c.decorators.oas2=u.prefixRules(o.decorators.oas2,l))}return c})).filter(p.notUndefined)}function h({rawConfig:e,configPath:t="",resolver:r}){var o,i;return n(this,void 0,void 0,(function*(){const{apis:n={},lint:a={}}=e;let s={};for(const[e,l]of Object.entries(n||{})){if(null===(i=null===(o=l.lint)||void 0===o?void 0:o.extends)||void 0===i?void 0:i.some(p.isNotString))throw new Error("Error configuration format not detected in extends value must contain strings");const n=v(a,l.lint),c=yield g({lintConfig:n,configPath:t,resolver:r});s[e]=Object.assign(Object.assign({},l),{lint:c})}return s}))}function m({lintConfig:e,configPath:t="",resolver:r=new l.BaseResolver},a=[],d=[]){var h,g,v;return n(this,void 0,void 0,(function*(){if(a.includes(t))throw new Error(`Circular dependency in config file: "${t}"`);const l=u.getUniquePlugins(f([...(null==e?void 0:e.plugins)||[],c.defaultPlugin],t)),b=null===(h=null==e?void 0:e.plugins)||void 0===h?void 0:h.filter(p.isString).map((e=>i.resolve(i.dirname(t),e))),w=s.isAbsoluteUrl(t)?t:t&&i.resolve(t),x=yield Promise.all((null===(g=null==e?void 0:e.extends)||void 0===g?void 0:g.map((e=>n(this,void 0,void 0,(function*(){if(!s.isAbsoluteUrl(e)&&!i.extname(e))return y(e,l);const o=s.isAbsoluteUrl(e)?e:s.isAbsoluteUrl(t)?new URL(e,t).href:i.resolve(i.dirname(t),e),c=yield function(e,t){return n(this,void 0,void 0,(function*(){try{const r=yield t.loadExternalRef(e),n=u.transformConfig(p.parseYaml(r.body));if(!n.lint)throw new Error(`Lint configuration format not detected: "${e}"`);return n.lint}catch(t){throw new Error(`Failed to load "${e}": ${t.message}`)}}))}(o,r);return yield m({lintConfig:c,configPath:o,resolver:r},[...a,w],d)})))))||[]),k=u.mergeExtends([...x,Object.assign(Object.assign({},e),{plugins:l,extends:void 0,extendPaths:[...a,w],pluginPaths:b})]),{plugins:O=[]}=k,_=o(k,["plugins"]);return Object.assign(Object.assign({},_),{extendPaths:null===(v=_.extendPaths)||void 0===v?void 0:v.filter((e=>e&&!s.isAbsoluteUrl(e))),plugins:u.getUniquePlugins(O),recommendedFallback:null==e?void 0:e.recommendedFallback,doNotResolveExamples:null==e?void 0:e.doNotResolveExamples})}))}function g(e,t=[],r=[]){return n(this,void 0,void 0,(function*(){const n=yield m(e,t,r);return Object.assign(Object.assign({},n),{rules:n.rules&&b(n.rules)})}))}function y(e,t){var r;const{pluginId:n,configName:o}=u.parsePresetName(e),i=t.find((e=>e.id===n));if(!i)throw new Error(`Invalid config ${a.red(e)}: plugin ${n} is not included.`);const s=null===(r=i.configs)||void 0===r?void 0:r[o];if(!s)throw new Error(n?`Invalid config ${a.red(e)}: plugin ${n} doesn't export config with name ${o}.`:`Invalid config ${a.red(e)}: there is no such built-in config.`);return s}function v(e,t){return Object.assign(Object.assign(Object.assign({},e),t),{rules:Object.assign(Object.assign({},null==e?void 0:e.rules),null==t?void 0:t.rules),oas2Rules:Object.assign(Object.assign({},null==e?void 0:e.oas2Rules),null==t?void 0:t.oas2Rules),oas3_0Rules:Object.assign(Object.assign({},null==e?void 0:e.oas3_0Rules),null==t?void 0:t.oas3_0Rules),oas3_1Rules:Object.assign(Object.assign({},null==e?void 0:e.oas3_1Rules),null==t?void 0:t.oas3_1Rules),preprocessors:Object.assign(Object.assign({},null==e?void 0:e.preprocessors),null==t?void 0:t.preprocessors),oas2Preprocessors:Object.assign(Object.assign({},null==e?void 0:e.oas2Preprocessors),null==t?void 0:t.oas2Preprocessors),oas3_0Preprocessors:Object.assign(Object.assign({},null==e?void 0:e.oas3_0Preprocessors),null==t?void 0:t.oas3_0Preprocessors),oas3_1Preprocessors:Object.assign(Object.assign({},null==e?void 0:e.oas3_1Preprocessors),null==t?void 0:t.oas3_1Preprocessors),decorators:Object.assign(Object.assign({},null==e?void 0:e.decorators),null==t?void 0:t.decorators),oas2Decorators:Object.assign(Object.assign({},null==e?void 0:e.oas2Decorators),null==t?void 0:t.oas2Decorators),oas3_0Decorators:Object.assign(Object.assign({},null==e?void 0:e.oas3_0Decorators),null==t?void 0:t.oas3_0Decorators),oas3_1Decorators:Object.assign(Object.assign({},null==e?void 0:e.oas3_1Decorators),null==t?void 0:t.oas3_1Decorators),recommendedFallback:!(null==t?void 0:t.extends)&&e.recommendedFallback})}function b(e){if(!e)return e;const t={},r=[];for(const[n,o]of Object.entries(e))if(n.startsWith("assert/")&&"object"==typeof o&&null!==o){const e=o;r.push(Object.assign(Object.assign({},e),{assertionId:n.replace("assert/","")}))}else t[n]=o;return r.length>0&&(t.assertions=r),t}t.resolveConfig=function(e,t){var r,o,i,a,s;return n(this,void 0,void 0,(function*(){if(null===(o=null===(r=e.lint)||void 0===r?void 0:r.extends)||void 0===o?void 0:o.some(p.isNotString))throw new Error("Error configuration format not detected in extends value must contain strings");const n=new l.BaseResolver(u.getResolveConfig(e.resolve)),c=null!==(a=null===(i=null==e?void 0:e.lint)||void 0===i?void 0:i.extends)&&void 0!==a?a:["recommended"],f=!(null===(s=null==e?void 0:e.lint)||void 0===s?void 0:s.extends),m=Object.assign(Object.assign({},null==e?void 0:e.lint),{extends:c,recommendedFallback:f}),y=yield h({rawConfig:Object.assign(Object.assign({},e),{lint:m}),configPath:t,resolver:n}),v=yield g({lintConfig:m,configPath:t,resolver:n});return new d.Config(Object.assign(Object.assign({},e),{apis:y,lint:v}),t)}))},t.resolvePlugins=f,t.resolveApis=h,t.resolveLint=g,t.resolvePreset=y},3777:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Config=t.LintConfig=t.AVAILABLE_REGIONS=t.DOMAINS=t.DEFAULT_REGION=t.IGNORE_FILE=t.env=void 0;const n=r(5101),o=r(6470),i=r(5273),a=r(771),s=r(1510),l=r(2565);t.env="undefined"!=typeof process&&{}||{},t.IGNORE_FILE=".redocly.lint-ignore.yaml",t.DEFAULT_REGION="us",t.DOMAINS=function(){const e={us:"redocly.com",eu:"eu.redocly.com"},r=t.env.REDOCLY_DOMAIN;return(null==r?void 0:r.endsWith(".redocly.host"))&&(e[r.split(".")[0]]=r),"redoc.online"===r&&(e[r]=r),e}(),t.AVAILABLE_REGIONS=Object.keys(t.DOMAINS);class c{constructor(e,r){this.rawConfig=e,this.configFile=r,this.ignore={},this._usedRules=new Set,this._usedVersions=new Set,this.plugins=e.plugins||[],this.doNotResolveExamples=!!e.doNotResolveExamples,this.recommendedFallback=e.recommendedFallback||!1,this.rules={[s.OasVersion.Version2]:Object.assign(Object.assign({},e.rules),e.oas2Rules),[s.OasVersion.Version3_0]:Object.assign(Object.assign({},e.rules),e.oas3_0Rules),[s.OasVersion.Version3_1]:Object.assign(Object.assign({},e.rules),e.oas3_1Rules)},this.preprocessors={[s.OasVersion.Version2]:Object.assign(Object.assign({},e.preprocessors),e.oas2Preprocessors),[s.OasVersion.Version3_0]:Object.assign(Object.assign({},e.preprocessors),e.oas3_0Preprocessors),[s.OasVersion.Version3_1]:Object.assign(Object.assign({},e.preprocessors),e.oas3_1Preprocessors)},this.decorators={[s.OasVersion.Version2]:Object.assign(Object.assign({},e.decorators),e.oas2Decorators),[s.OasVersion.Version3_0]:Object.assign(Object.assign({},e.decorators),e.oas3_0Decorators),[s.OasVersion.Version3_1]:Object.assign(Object.assign({},e.decorators),e.oas3_1Decorators)},this.extendPaths=e.extendPaths||[],this.pluginPaths=e.pluginPaths||[];const a=this.configFile?o.dirname(this.configFile):"undefined"!=typeof process&&process.cwd()||"",l=o.join(a,t.IGNORE_FILE);if(n.hasOwnProperty("existsSync")&&n.existsSync(l)){this.ignore=i.parseYaml(n.readFileSync(l,"utf-8"))||{};for(const e of Object.keys(this.ignore)){this.ignore[o.resolve(o.dirname(l),e)]=this.ignore[e];for(const t of Object.keys(this.ignore[e]))this.ignore[e][t]=new Set(this.ignore[e][t]);delete this.ignore[e]}}}saveIgnore(){const e=this.configFile?o.dirname(this.configFile):process.cwd(),r=o.join(e,t.IGNORE_FILE),s={};for(const t of Object.keys(this.ignore)){const r=s[a.slash(o.relative(e,t))]=this.ignore[t];for(const e of Object.keys(r))r[e]=Array.from(r[e])}n.writeFileSync(r,"# This file instructs Redocly's linter to ignore the rules contained for specific parts of your API.\n# See https://redoc.ly/docs/cli/ for more information.\n"+i.stringifyYaml(s))}addIgnore(e){const t=this.ignore,r=e.location[0];if(void 0===r.pointer)return;const n=t[r.source.absoluteRef]=t[r.source.absoluteRef]||{};(n[e.ruleId]=n[e.ruleId]||new Set).add(r.pointer)}addProblemToIgnore(e){const t=e.location[0];if(void 0===t.pointer)return e;const r=(this.ignore[t.source.absoluteRef]||{})[e.ruleId],n=r&&r.has(t.pointer);return n?Object.assign(Object.assign({},e),{ignored:n}):e}extendTypes(e,t){let r=e;for(const e of this.plugins)if(void 0!==e.typeExtension)switch(t){case s.OasVersion.Version3_0:case s.OasVersion.Version3_1:if(!e.typeExtension.oas3)continue;r=e.typeExtension.oas3(r,t);case s.OasVersion.Version2:if(!e.typeExtension.oas2)continue;r=e.typeExtension.oas2(r,t);default:throw new Error("Not implemented")}return r}getRuleSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const r=this.rules[t][e]||"off";return"string"==typeof r?{severity:r}:Object.assign({severity:"error"},r)}getPreprocessorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const r=this.preprocessors[t][e]||"off";return"string"==typeof r?{severity:"on"===r?"error":r}:Object.assign({severity:"error"},r)}getDecoratorSettings(e,t){this._usedRules.add(e),this._usedVersions.add(t);const r=this.decorators[t][e]||"off";return"string"==typeof r?{severity:"on"===r?"error":r}:Object.assign({severity:"error"},r)}getUnusedRules(){const e=[],t=[],r=[];for(const n of Array.from(this._usedVersions))e.push(...Object.keys(this.rules[n]).filter((e=>!this._usedRules.has(e)))),t.push(...Object.keys(this.decorators[n]).filter((e=>!this._usedRules.has(e)))),r.push(...Object.keys(this.preprocessors[n]).filter((e=>!this._usedRules.has(e))));return{rules:e,preprocessors:r,decorators:t}}getRulesForOasVersion(e){switch(e){case s.OasMajorVersion.Version3:const e=[];return this.plugins.forEach((t=>{var r;return(null===(r=t.preprocessors)||void 0===r?void 0:r.oas3)&&e.push(t.preprocessors.oas3)})),this.plugins.forEach((t=>{var r;return(null===(r=t.rules)||void 0===r?void 0:r.oas3)&&e.push(t.rules.oas3)})),this.plugins.forEach((t=>{var r;return(null===(r=t.decorators)||void 0===r?void 0:r.oas3)&&e.push(t.decorators.oas3)})),e;case s.OasMajorVersion.Version2:const t=[];return this.plugins.forEach((e=>{var r;return(null===(r=e.preprocessors)||void 0===r?void 0:r.oas2)&&t.push(e.preprocessors.oas2)})),this.plugins.forEach((e=>{var r;return(null===(r=e.rules)||void 0===r?void 0:r.oas2)&&t.push(e.rules.oas2)})),this.plugins.forEach((e=>{var r;return(null===(r=e.decorators)||void 0===r?void 0:r.oas2)&&t.push(e.decorators.oas2)})),t}}skipRules(e){for(const t of e||[])for(const e of Object.values(s.OasVersion))this.rules[e][t]&&(this.rules[e][t]="off")}skipPreprocessors(e){for(const t of e||[])for(const e of Object.values(s.OasVersion))this.preprocessors[e][t]&&(this.preprocessors[e][t]="off")}skipDecorators(e){for(const t of e||[])for(const e of Object.values(s.OasVersion))this.decorators[e][t]&&(this.decorators[e][t]="off")}}t.LintConfig=c,t.Config=class{constructor(e,t){this.rawConfig=e,this.configFile=t,this.apis=e.apis||{},this.lint=new c(e.lint||{},t),this["features.openapi"]=e["features.openapi"]||{},this["features.mockServer"]=e["features.mockServer"]||{},this.resolve=l.getResolveConfig(null==e?void 0:e.resolve),this.region=e.region,this.organization=e.organization}}},8698:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(3777),t),o(r(3865),t),o(r(5030),t),o(r(6242),t),o(r(9129),t),o(r(2565),t),o(r(7040),t)},9129:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getConfig=t.findConfig=t.CONFIG_FILE_NAMES=t.loadConfig=void 0;const o=r(5101),i=r(6470),a=r(1094),s=r(771),l=r(3777),c=r(2565),u=r(7040);function p(e){if(!o.hasOwnProperty("existsSync"))return;const r=t.CONFIG_FILE_NAMES.map((t=>e?i.resolve(e,t):t)).filter(o.existsSync);if(r.length>1)throw new Error(`\n Multiple configuration files are not allowed. \n Found the following files: ${r.join(", ")}. \n Please use 'redocly.yaml' instead.\n `);return r[0]}function d(e=p()){return n(this,void 0,void 0,(function*(){if(!e)return{};try{const t=(yield s.loadYaml(e))||{};return c.transformConfig(t)}catch(t){throw new Error(`Error parsing config file at '${e}': ${t.message}`)}}))}t.loadConfig=function(e=p(),t){var r;return n(this,void 0,void 0,(function*(){const n=yield d(e);void 0!==t?(n.lint=n.lint||{},n.lint.extends=t):s.isEmptyObject(n);const o=new a.RedoclyClient,i=yield o.getTokens();if(i.length){n.resolve||(n.resolve={}),n.resolve.http||(n.resolve.http={}),n.resolve.http.headers=[...null!==(r=n.resolve.http.headers)&&void 0!==r?r:[]];for(const e of i){const t=l.DOMAINS[e.region];n.resolve.http.headers.push({matches:`https://api.${t}/registry/**`,name:"Authorization",envVariable:void 0,value:e.token},..."us"===e.region?[{matches:"https://api.redoc.ly/registry/**",name:"Authorization",envVariable:void 0,value:e.token}]:[])}}return u.resolveConfig(n,e)}))},t.CONFIG_FILE_NAMES=["redocly.yaml","redocly.yml",".redocly.yaml",".redocly.yml"],t.findConfig=p,t.getConfig=d},9016:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rules:{"info-description":"warn","info-contact":"off","info-license":"off","info-license-url":"off","tag-description":"warn","tags-alphabetical":"off","parameter-description":"off","no-path-trailing-slash":"warn","no-identical-paths":"warn","no-ambiguous-paths":"warn","path-declaration-must-exist":"warn","path-not-include-query":"warn","path-parameters-defined":"warn","operation-description":"off","operation-2xx-response":"warn","operation-4xx-response":"off",assertions:"warn","operation-operationId":"warn","operation-summary":"warn","operation-operationId-unique":"warn","operation-parameters-unique":"warn","operation-tag-defined":"off","operation-security-defined":"warn","operation-operationId-url-safe":"warn","operation-singular-tag":"off","no-unresolved-refs":"error","no-enum-type-mismatch":"warn","boolean-parameter-prefixes":"off","paths-kebab-case":"off",spec:"error"},oas3_0Rules:{"no-invalid-media-type-examples":{severity:"warn",disallowAdditionalProperties:!0},"no-server-example.com":"warn","no-server-trailing-slash":"error","no-empty-servers":"warn","no-example-value-and-externalValue":"warn","no-unused-components":"warn","no-undefined-server-variable":"warn","no-servers-empty-enum":"error"},oas3_1Rules:{"no-server-example.com":"warn","no-server-trailing-slash":"error","no-empty-servers":"warn","no-example-value-and-externalValue":"warn","no-unused-components":"warn","no-undefined-server-variable":"warn","no-servers-empty-enum":"error"}}},8057:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rules:{"info-description":"warn","info-contact":"off","info-license":"warn","info-license-url":"warn","tag-description":"warn","tags-alphabetical":"off","parameter-description":"off","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"warn","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","operation-description":"off","operation-2xx-response":"warn",assertions:"warn","operation-4xx-response":"warn","operation-operationId":"warn","operation-summary":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-tag-defined":"off","operation-security-defined":"error","operation-singular-tag":"off","no-unresolved-refs":"error","no-enum-type-mismatch":"error","boolean-parameter-prefixes":"off","paths-kebab-case":"off",spec:"error"},oas3_0Rules:{"no-invalid-media-type-examples":{severity:"warn",disallowAdditionalProperties:!0},"no-server-example.com":"warn","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"warn","no-undefined-server-variable":"error","no-servers-empty-enum":"error"},oas3_1Rules:{"no-server-example.com":"warn","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"warn","no-undefined-server-variable":"error","no-servers-empty-enum":"error"}}},5030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initRules=void 0;const n=r(771);t.initRules=function(e,t,r,o){return e.flatMap((e=>Object.keys(e).map((n=>{const i=e[n],a="rules"===r?t.getRuleSettings(n,o):"preprocessors"===r?t.getPreprocessorSettings(n,o):t.getDecoratorSettings(n,o);if("off"===a.severity)return;const s=i(a);return Array.isArray(s)?s.map((e=>({severity:a.severity,ruleId:n,visitor:e}))):{severity:a.severity,ruleId:n,visitor:s}})))).flatMap((e=>e)).filter(n.notUndefined)}},3865:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2565:function(e,t,r){"use strict";var n=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o-1){const[t,r]=e.split("/");return{pluginId:t,configName:r}}return{pluginId:"",configName:e}},t.transformApiDefinitionsToApis=s,t.prefixRules=function(e,t){if(!t)return e;const r={};for(const n of Object.keys(e))r[`${t}/${n}`]=e[n];return r},t.mergeExtends=function(e){const t={rules:{},oas2Rules:{},oas3_0Rules:{},oas3_1Rules:{},preprocessors:{},oas2Preprocessors:{},oas3_0Preprocessors:{},oas3_1Preprocessors:{},decorators:{},oas2Decorators:{},oas3_0Decorators:{},oas3_1Decorators:{},plugins:[],pluginPaths:[],extendPaths:[]};for(let r of e){if(r.extends)throw new Error(`\`extends\` is not supported in shared configs yet: ${JSON.stringify(r,null,2)}.`);Object.assign(t.rules,r.rules),Object.assign(t.oas2Rules,r.oas2Rules),i.assignExisting(t.oas2Rules,r.rules||{}),Object.assign(t.oas3_0Rules,r.oas3_0Rules),i.assignExisting(t.oas3_0Rules,r.rules||{}),Object.assign(t.oas3_1Rules,r.oas3_1Rules),i.assignExisting(t.oas3_1Rules,r.rules||{}),Object.assign(t.preprocessors,r.preprocessors),Object.assign(t.oas2Preprocessors,r.oas2Preprocessors),i.assignExisting(t.oas2Preprocessors,r.preprocessors||{}),Object.assign(t.oas3_0Preprocessors,r.oas3_0Preprocessors),i.assignExisting(t.oas3_0Preprocessors,r.preprocessors||{}),Object.assign(t.oas3_1Preprocessors,r.oas3_1Preprocessors),i.assignExisting(t.oas3_1Preprocessors,r.preprocessors||{}),Object.assign(t.decorators,r.decorators),Object.assign(t.oas2Decorators,r.oas2Decorators),i.assignExisting(t.oas2Decorators,r.decorators||{}),Object.assign(t.oas3_0Decorators,r.oas3_0Decorators),i.assignExisting(t.oas3_0Decorators,r.decorators||{}),Object.assign(t.oas3_1Decorators,r.oas3_1Decorators),i.assignExisting(t.oas3_1Decorators,r.decorators||{}),t.plugins.push(...r.plugins||[]),t.pluginPaths.push(...r.pluginPaths||[]),t.extendPaths.push(...new Set(r.extendPaths))}return t},t.getMergedConfig=function(e,t){var r,n,o,i,s,l;const c=[...Object.values(e.apis).map((e=>{var t;return null===(t=null==e?void 0:e.lint)||void 0===t?void 0:t.extendPaths})),null===(n=null===(r=e.rawConfig)||void 0===r?void 0:r.lint)||void 0===n?void 0:n.extendPaths].flat().filter(Boolean),u=[...Object.values(e.apis).map((e=>{var t;return null===(t=null==e?void 0:e.lint)||void 0===t?void 0:t.pluginPaths})),null===(i=null===(o=e.rawConfig)||void 0===o?void 0:o.lint)||void 0===i?void 0:i.pluginPaths].flat().filter(Boolean);return t?new a.Config(Object.assign(Object.assign({},e.rawConfig),{lint:Object.assign(Object.assign({},e.apis[t]?e.apis[t].lint:e.rawConfig.lint),{extendPaths:c,pluginPaths:u}),"features.openapi":Object.assign(Object.assign({},e["features.openapi"]),null===(s=e.apis[t])||void 0===s?void 0:s["features.openapi"]),"features.mockServer":Object.assign(Object.assign({},e["features.mockServer"]),null===(l=e.apis[t])||void 0===l?void 0:l["features.mockServer"])}),e.configFile):e},t.transformConfig=function(e){if(e.apis&&e.apiDefinitions)throw new Error("Do not use 'apiDefinitions' field. Use 'apis' instead.\n");if(e["features.openapi"]&&e.referenceDocs)throw new Error("Do not use 'referenceDocs' field. Use 'features.openapi' instead.\n");const t=e,{apiDefinitions:r,referenceDocs:i}=t,a=n(t,["apiDefinitions","referenceDocs"]);return r&&process.stderr.write(`The ${o.yellow("apiDefinitions")} field is deprecated. Use ${o.green("apis")} instead. Read more about this change: https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties\n`),i&&process.stderr.write(`The ${o.yellow("referenceDocs")} field is deprecated. Use ${o.green("features.openapi")} instead. Read more about this change: https://redocly.com/docs/api-registry/guides/migration-guide-config-file/#changed-properties\n`),Object.assign({"features.openapi":i,apis:s(r)},a)},t.getResolveConfig=function(e){var t,r;return{http:{headers:null!==(r=null===(t=null==e?void 0:e.http)||void 0===t?void 0:t.headers)&&void 0!==r?r:[],customFetch:void 0}}},t.getUniquePlugins=function(e){const t=new Set,r=[];for(const n of e)t.has(n.id)?n.id&&process.stderr.write(`Duplicate plugin id "${o.yellow(n.id)}".\n`):(r.push(n),t.add(n.id));return r}},4555:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoDescriptionOverride=void 0;const n=r(771);t.InfoDescriptionOverride=({filePath:e})=>({Info:{leave(t,{report:r,location:o}){if(!e)throw new Error('Parameter "filePath" is not provided for "info-description-override" rule');try{t.description=n.readFileAsStringSync(e)}catch(e){r({message:`Failed to read markdown override file for "info.description".\n${e.message}`,location:o.child("description")})}}}})},7802:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationDescriptionOverride=void 0;const n=r(771);t.OperationDescriptionOverride=({operationIds:e})=>({Operation:{leave(t,{report:r,location:o}){if(!t.operationId)return;if(!e)throw new Error('Parameter "operationIds" is not provided for "operation-description-override" rule');const i=t.operationId;if(e[i])try{t.description=n.readFileAsStringSync(e[i])}catch(e){r({message:`Failed to read markdown override file for operation "${i}".\n${e.message}`,location:o.child("operationId").key()})}}}})},2287:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegistryDependencies=void 0;const n=r(1094);t.RegistryDependencies=()=>{let e=new Set;return{DefinitionRoot:{leave(t,r){r.getVisitorData().links=Array.from(e)}},ref(t){if(t.$ref){const r=t.$ref.split("#/")[0];n.isRedoclyRegistryURL(r)&&e.add(r)}}}}},5830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveXInternal=void 0;const n=r(771),o=r(7468);t.RemoveXInternal=({internalFlagProperty:e})=>{const t=e||"x-internal";return{any:{enter:(e,r)=>{!function(e,r){var i,a,s,l;const{parent:c,key:u}=r;let p=!1;if(Array.isArray(e))for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagDescriptionOverride=void 0;const n=r(771);t.TagDescriptionOverride=({tagNames:e})=>({Tag:{leave(t,{report:r}){if(!e)throw new Error('Parameter "tagNames" is not provided for "tag-description-override" rule');if(e[t.name])try{t.description=n.readFileAsStringSync(e[t.name])}catch(e){r({message:`Failed to read markdown override file for tag "${t.name}".\n${e.message}`})}}}})},7060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decorators=void 0;const n=r(2287),o=r(7802),i=r(423),a=r(4555),s=r(5830);t.decorators={"registry-dependencies":n.RegistryDependencies,"operation-description-override":o.OperationDescriptionOverride,"tag-description-override":i.TagDescriptionOverride,"info-description-override":a.InfoDescriptionOverride,"remove-x-internal":s.RemoveXInternal}},1753:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decorators=void 0;const n=r(2287),o=r(7802),i=r(423),a=r(4555),s=r(5830);t.decorators={"registry-dependencies":n.RegistryDependencies,"operation-description-override":o.OperationDescriptionOverride,"tag-description-override":i.TagDescriptionOverride,"info-description-override":a.InfoDescriptionOverride,"remove-x-internal":s.RemoveXInternal}},5273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyYaml=t.parseYaml=void 0;const n=r(3320),o=n.JSON_SCHEMA.extend({implicit:[n.types.merge],explicit:[n.types.binary,n.types.omap,n.types.pairs,n.types.set]});t.parseYaml=(e,t)=>n.load(e,Object.assign({schema:o},t)),t.stringifyYaml=(e,t)=>n.dump(e,t)},1510:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.openAPIMajor=t.detectOpenAPI=t.OasMajorVersion=t.OasVersion=void 0,function(e){e.Version2="oas2",e.Version3_0="oas3_0",e.Version3_1="oas3_1"}(r=t.OasVersion||(t.OasVersion={})),function(e){e.Version2="oas2",e.Version3="oas3"}(n=t.OasMajorVersion||(t.OasMajorVersion={})),t.detectOpenAPI=function(e){if("object"!=typeof e)throw new Error("Document must be JSON object, got "+typeof e);if(!e.openapi&&!e.swagger)throw new Error("This doesn’t look like an OpenAPI document.\n");if(e.openapi&&"string"!=typeof e.openapi)throw new Error(`Invalid OpenAPI version: should be a string but got "${typeof e.openapi}"`);if(e.openapi&&e.openapi.startsWith("3.0"))return r.Version3_0;if(e.openapi&&e.openapi.startsWith("3.1"))return r.Version3_1;if(e.swagger&&"2.0"===e.swagger)return r.Version2;throw new Error(`Unsupported OpenAPI Version: ${e.openapi||e.swagger}`)},t.openAPIMajor=function(e){return e===r.Version2?n.Version2:n.Version3}},1094:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.isRedoclyRegistryURL=t.RedoclyClient=void 0;const o=r(2116),i=r(6470),a=r(6918),s=r(7121),l=r(1390),c=r(3777),u=r(771),p=".redocly-config.json";t.RedoclyClient=class{constructor(e){this.accessTokens={},this.region=this.loadRegion(e),this.loadTokens(),this.domain=e?c.DOMAINS[e]:c.env.REDOCLY_DOMAIN||c.DOMAINS[c.DEFAULT_REGION],c.env.REDOCLY_DOMAIN=this.domain,this.registryApi=new l.RegistryApi(this.accessTokens,this.region)}loadRegion(e){if(e&&!c.DOMAINS[e])throw new Error(`Invalid argument: region in config file.\nGiven: ${s.green(e)}, choices: "us", "eu".`);return c.env.REDOCLY_DOMAIN?c.AVAILABLE_REGIONS.find((e=>c.DOMAINS[e]===c.env.REDOCLY_DOMAIN))||c.DEFAULT_REGION:e||c.DEFAULT_REGION}getRegion(){return this.region}hasTokens(){return u.isNotEmptyObject(this.accessTokens)}hasToken(){return!!this.accessTokens[this.region]}getAuthorizationHeader(){return n(this,void 0,void 0,(function*(){return this.accessTokens[this.region]}))}setAccessTokens(e){this.accessTokens=e}loadTokens(){const e=i.resolve(a.homedir(),p),t=this.readCredentialsFile(e);u.isNotEmptyObject(t)&&this.setAccessTokens(Object.assign(Object.assign({},t),t.token&&!t[this.region]&&{[this.region]:t.token})),c.env.REDOCLY_AUTHORIZATION&&this.setAccessTokens(Object.assign(Object.assign({},this.accessTokens),{[this.region]:c.env.REDOCLY_AUTHORIZATION}))}getAllTokens(){return Object.entries(this.accessTokens).filter((([e])=>c.AVAILABLE_REGIONS.includes(e))).map((([e,t])=>({region:e,token:t})))}getValidTokens(){return n(this,void 0,void 0,(function*(){const e=this.getAllTokens(),t=yield Promise.allSettled(e.map((({token:e,region:t})=>this.verifyToken(e,t))));return e.filter(((e,r)=>"fulfilled"===t[r].status)).map((({token:e,region:t})=>({token:e,region:t,valid:!0})))}))}getTokens(){return n(this,void 0,void 0,(function*(){return this.hasTokens()?yield this.getValidTokens():[]}))}isAuthorizedWithRedoclyByRegion(){return n(this,void 0,void 0,(function*(){if(!this.hasTokens())return!1;const e=this.accessTokens[this.region];if(!e)return!1;try{return yield this.verifyToken(e,this.region),!0}catch(e){return!1}}))}isAuthorizedWithRedocly(){return n(this,void 0,void 0,(function*(){return this.hasTokens()&&u.isNotEmptyObject(yield this.getValidTokens())}))}readCredentialsFile(e){return o.existsSync(e)?JSON.parse(o.readFileSync(e,"utf-8")):{}}verifyToken(e,t,r=!1){return n(this,void 0,void 0,(function*(){return this.registryApi.authStatus(e,t,r)}))}login(e,t=!1){return n(this,void 0,void 0,(function*(){const r=i.resolve(a.homedir(),p);try{yield this.verifyToken(e,this.region,t)}catch(e){throw new Error("Authorization failed. Please check if you entered a valid API key.")}const n=Object.assign(Object.assign({},this.readCredentialsFile(r)),{[this.region]:e,token:e});this.accessTokens=n,this.registryApi.setAccessTokens(n),o.writeFileSync(r,JSON.stringify(n,null,2))}))}logout(){const e=i.resolve(a.homedir(),p);o.existsSync(e)&&o.unlinkSync(e)}},t.isRedoclyRegistryURL=function(e){const t=c.env.REDOCLY_DOMAIN||c.DOMAINS[c.DEFAULT_REGION],r="redocly.com"===t?"redoc.ly":t;return!(!e.startsWith(`https://api.${t}/registry/`)&&!e.startsWith(`https://api.${r}/registry/`))}},1390:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RegistryApi=void 0;const o=r(7707),i=r(3777),a=r(771),s=r(337).i8;t.RegistryApi=class{constructor(e,t){this.accessTokens=e,this.region=t}get accessToken(){return a.isNotEmptyObject(this.accessTokens)&&this.accessTokens[this.region]}getBaseUrl(e=i.DEFAULT_REGION){return`https://api.${i.DOMAINS[e]}/registry`}setAccessTokens(e){return this.accessTokens=e,this}request(e="",t={},r){return n(this,void 0,void 0,(function*(){const n=Object.assign({},t.headers||{},{"x-redocly-cli-version":s});if(!n.hasOwnProperty("authorization"))throw new Error("Unauthorized");const i=yield o.default(`${this.getBaseUrl(r)}${e}`,Object.assign({},t,{headers:n}));if(401===i.status)throw new Error("Unauthorized");if(404===i.status){const e=yield i.json();throw new Error(e.code)}return i}))}authStatus(e,t,r=!1){return n(this,void 0,void 0,(function*(){try{const r=yield this.request("",{headers:{authorization:e}},t);return yield r.json()}catch(e){throw r&&console.log(e),e}}))}prepareFileUpload({organizationId:e,name:t,version:r,filesHash:o,filename:i,isUpsert:a}){return n(this,void 0,void 0,(function*(){const n=yield this.request(`/${e}/${t}/${r}/prepare-file-upload`,{method:"POST",headers:{"content-type":"application/json",authorization:this.accessToken},body:JSON.stringify({filesHash:o,filename:i,isUpsert:a})},this.region);if(n.ok)return n.json();throw new Error("Could not prepare file upload")}))}pushApi({organizationId:e,name:t,version:r,rootFilePath:o,filePaths:i,branch:a,isUpsert:s,isPublic:l}){return n(this,void 0,void 0,(function*(){if(!(yield this.request(`/${e}/${t}/${r}`,{method:"PUT",headers:{"content-type":"application/json",authorization:this.accessToken},body:JSON.stringify({rootFilePath:o,filePaths:i,branch:a,isUpsert:s,isPublic:l})},this.region)).ok)throw new Error("Could not push api")}))}}},7468:(e,t)=>{"use strict";function r(e,t){return""===e&&(e="#/"),"/"===e[e.length-1]?e+t:e+"/"+t}Object.defineProperty(t,"__esModule",{value:!0}),t.isMappingRef=t.isAbsoluteUrl=t.refBaseName=t.pointerBaseName=t.parsePointer=t.parseRef=t.escapePointer=t.unescapePointer=t.Location=t.isRef=t.joinPointer=void 0,t.joinPointer=r,t.isRef=function(e){return e&&"string"==typeof e.$ref};class n{constructor(e,t){this.source=e,this.pointer=t}child(e){return new n(this.source,r(this.pointer,(Array.isArray(e)?e:[e]).map(i).join("/")))}key(){return Object.assign(Object.assign({},this),{reportOnKey:!0})}get absolutePointer(){return this.source.absoluteRef+("#/"===this.pointer?"":this.pointer)}}function o(e){return decodeURIComponent(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function i(e){return"number"==typeof e?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}t.Location=n,t.unescapePointer=o,t.escapePointer=i,t.parseRef=function(e){const[t,r]=e.split("#/");return{uri:t||null,pointer:r?r.split("/").map(o).filter(Boolean):[]}},t.parsePointer=function(e){return e.substr(2).split("/").map(o)},t.pointerBaseName=function(e){const t=e.split("/");return t[t.length-1]},t.refBaseName=function(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")},t.isAbsoluteUrl=function(e){return e.startsWith("http://")||e.startsWith("https://")},t.isMappingRef=function(e){return e.startsWith("#")||e.startsWith("https://")||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1}},4182:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveDocument=t.BaseResolver=t.makeDocumentFromString=t.makeRefId=t.YamlParseError=t.ResolveError=t.Source=void 0;const o=r(3197),i=r(6470),a=r(7468),s=r(5220),l=r(771);class c{constructor(e,t,r){this.absoluteRef=e,this.body=t,this.mimeType=r}getAst(e){var t;return void 0===this._ast&&(this._ast=null!==(t=e(this.body,{filename:this.absoluteRef}))&&void 0!==t?t:void 0,this._ast&&0===this._ast.kind&&""===this._ast.value&&1!==this._ast.startPosition&&(this._ast.startPosition=1,this._ast.endPosition=1)),this._ast}getLines(){return void 0===this._lines&&(this._lines=this.body.split(/\r\n|[\n\r]/g)),this._lines}}t.Source=c;class u extends Error{constructor(e){super(e.message),this.originalError=e,Object.setPrototypeOf(this,u.prototype)}}t.ResolveError=u;const p=/\((\d+):(\d+)\)$/;class d extends Error{constructor(e,t){super(e.message.split("\n")[0]),this.originalError=e,this.source=t,Object.setPrototypeOf(this,d.prototype);const[,r,n]=this.message.match(p)||[];this.line=parseInt(r,10),this.col=parseInt(n,10)}}function f(e,t){return e+"::"+t}function h(e,t){return{prev:e,node:t}}t.YamlParseError=d,t.makeRefId=f,t.makeDocumentFromString=function(e,t){const r=new c(t,e);try{return{source:r,parsed:l.parseYaml(e,{filename:t})}}catch(e){throw new d(e,r)}},t.BaseResolver=class{constructor(e={http:{headers:[]}}){this.config=e,this.cache=new Map}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(e,t){return a.isAbsoluteUrl(t)?t:e&&a.isAbsoluteUrl(e)?new URL(t,e).href:i.resolve(e?i.dirname(e):process.cwd(),t)}loadExternalRef(e){return n(this,void 0,void 0,(function*(){try{if(a.isAbsoluteUrl(e)){const{body:t,mimeType:r}=yield l.readFileFromUrl(e,this.config.http);return new c(e,t,r)}return new c(e,yield o.promises.readFile(e,"utf-8"))}catch(e){throw new u(e)}}))}parseDocument(e,t=!1){var r;const n=e.absoluteRef.substr(e.absoluteRef.lastIndexOf("."));if(![".json",".json",".yml",".yaml"].includes(n)&&!(null===(r=e.mimeType)||void 0===r?void 0:r.match(/(json|yaml|openapi)/))&&!t)return{source:e,parsed:e.body};try{return{source:e,parsed:l.parseYaml(e.body,{filename:e.absoluteRef})}}catch(t){throw new d(t,e)}}resolveDocument(e,t,r=!1){return n(this,void 0,void 0,(function*(){const n=this.resolveExternalRef(e,t),o=this.cache.get(n);if(o)return o;const i=this.loadExternalRef(n).then((e=>this.parseDocument(e,r)));return this.cache.set(n,i),i}))}};const m={name:"unknown",properties:{}},g={name:"scalar",properties:{}};t.resolveDocument=function(e){return n(this,void 0,void 0,(function*(){const{rootDocument:t,externalRefResolver:r,rootType:o}=e,i=new Map,l=new Set,c=[];let u;!function e(t,o,u,p){function d(e,t,o){return n(this,void 0,void 0,(function*(){if(function(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}(o.prev,t))throw new Error("Self-referencing circular pointer");const{uri:n,pointer:s}=a.parseRef(t.$ref),l=null!==n;let c;try{c=l?yield r.resolveDocument(e.source.absoluteRef,n):e}catch(r){const n={resolved:!1,isRemote:l,document:void 0,error:r},o=f(e.source.absoluteRef,t.$ref);return i.set(o,n),n}let u={resolved:!0,document:c,isRemote:l,node:e.parsed,nodePointer:"#/"},p=c.parsed;const m=s;for(let e of m){if("object"!=typeof p){p=void 0;break}if(void 0!==p[e])p=p[e],u.nodePointer=a.joinPointer(u.nodePointer,a.escapePointer(e));else{if(!a.isRef(p)){p=void 0;break}if(u=yield d(c,p,h(o,p)),c=u.document||c,"object"!=typeof u.node){p=void 0;break}p=u.node[e],u.nodePointer=a.joinPointer(u.nodePointer,a.escapePointer(e))}}u.node=p,u.document=c;const g=f(e.source.absoluteRef,t.$ref);return u.document&&a.isRef(p)&&(u=yield d(u.document,p,h(o,p))),i.set(g,u),Object.assign({},u)}))}!function t(r,n,i){if("object"!=typeof r||null===r)return;const u=`${n.name}::${i}`;if(!l.has(u))if(l.add(u),Array.isArray(r)){const e=n.items;if(n!==m&&void 0===e)return;for(let n=0;n{t.resolved&&e(t.node,t.document,t.nodePointer,n)}));c.push(t)}}}(t,p,o.source.absoluteRef+u)}(t.parsed,t,"#/",o);do{u=yield Promise.all(c)}while(c.length!==u.length);return i}))}},7275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateJsonSchema=t.releaseAjvInstance=void 0;const n=r(5499),o=r(7468);let i=null;t.releaseAjvInstance=function(){i=null},t.validateJsonSchema=function(e,t,r,a,s,l){const c=function(e,t,r,o){const a=function(e,t){return i||(i=new n.default({schemaId:"$id",meta:!0,allErrors:!0,strictSchema:!1,inlineRefs:!1,validateSchema:!1,discriminator:!0,allowUnionTypes:!0,validateFormats:!1,defaultAdditionalProperties:!t,loadSchemaSync(t,r){const n=e({$ref:r},t.split("#")[0]);if(n&&n.location)return Object.assign({$id:n.location.absolutePointer},n.node)},logger:!1})),i}(r,o);return a.getSchema(t.absolutePointer)||a.addSchema(Object.assign({$id:t.absolutePointer},e),t.absolutePointer),a.getSchema(t.absolutePointer)}(t,r,s,l);return c?{valid:!!c(e,{instancePath:a,parentData:{fake:{}},parentDataProperty:"fake",rootData:{},dynamicAnchors:{}}),errors:(c.errors||[]).map((function(e){let t=e.message,r="enum"===e.keyword?e.params.allowedValues:void 0;r&&(t+=` ${r.map((e=>`"${e}"`)).join(", ")}`),"type"===e.keyword&&(t=`type ${t}`);const n=e.instancePath.substring(a.length+1),i=n.substring(n.lastIndexOf("/")+1);if(i&&(t=`\`${i}\` property ${t}`),"additionalProperties"===e.keyword){const r=e.params.additionalProperty;t=`${t} \`${r}\``,e.instancePath+="/"+o.escapePointer(r)}return Object.assign(Object.assign({},e),{message:t,suggest:r})}))}:{valid:!0,errors:[]}}},9740:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asserts=t.runOnValuesSet=t.runOnKeysSet=void 0;const n=r(5738);t.runOnKeysSet=new Set(["mutuallyExclusive","mutuallyRequired","enum","pattern","minLength","maxLength","casing","sortOrder","disallowed","required"]),t.runOnValuesSet=new Set(["pattern","enum","defined","undefined","nonEmpty","minLength","maxLength","casing","sortOrder"]),t.asserts={pattern:(e,t)=>{if(void 0===e)return!0;const r="string"==typeof e?[e]:e,n=t.match(/(\b\/\b)(.+)/g)||["/"];t=t.slice(1).replace(n[0],"");const o=new RegExp(t,n[0].slice(1));for(let e of r)if(!e.match(o))return!1;return!0},enum:(e,t)=>{if(void 0===e)return!0;const r="string"==typeof e?[e]:e;for(let e of r)if(!t.includes(e))return!1;return!0},defined:(e,t=!0)=>{const r=void 0!==e;return t?r:!r},required:(e,t)=>{for(const r of t)if(!e.includes(r))return!1;return!0},disallowed:(e,t)=>{if(void 0===e)return!0;const r="string"==typeof e?[e]:e;for(let e of r)if(t.includes(e))return!1;return!0},undefined:(e,t=!0)=>{const r=void 0===e;return t?r:!r},nonEmpty:(e,t=!0)=>{const r=null==e||""===e;return t?!r:r},minLength:(e,t)=>void 0===e||e.length>=t,maxLength:(e,t)=>void 0===e||e.length<=t,casing:(e,t)=>{if(void 0===e)return!0;const r="string"==typeof e?[e]:e;for(let e of r){let r=!1;switch(t){case"camelCase":r=!!e.match(/^[a-z][a-zA-Z0-9]+$/g);break;case"kebab-case":r=!!e.match(/^([a-z][a-z0-9]*)(-[a-z0-9]+)*$/g);break;case"snake_case":r=!!e.match(/^([a-z][a-z0-9]*)(_[a-z0-9]+)*$/g);break;case"PascalCase":r=!!e.match(/^[A-Z][a-zA-Z0-9]+$/g);break;case"MACRO_CASE":r=!!e.match(/^([A-Z][A-Z0-9]*)(_[A-Z0-9]+)*$/g);break;case"COBOL-CASE":r=!!e.match(/^([A-Z][A-Z0-9]*)(-[A-Z0-9]+)*$/g);break;case"flatcase":r=!!e.match(/^[a-z][a-z0-9]+$/g)}if(!r)return!1}return!0},sortOrder:(e,t)=>void 0===e||n.isOrdered(e,t),mutuallyExclusive:(e,t)=>n.getIntersectionLength(e,t)<2,mutuallyRequired:(e,t)=>!(n.getIntersectionLength(e,t)>0)||n.getIntersectionLength(e,t)===t.length}},4015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Assertions=void 0;const n=r(9740),o=r(5738);t.Assertions=e=>{let t=[];const r=Object.values(e).filter((e=>"object"==typeof e&&null!==e));for(const[e,i]of r.entries()){const r=i.assertionId&&`${i.assertionId} assertion`||`assertion #${e+1}`;if(!i.subject)throw new Error(`${r}: 'subject' is required`);const a=Array.isArray(i.subject)?i.subject:[i.subject],s=Object.keys(n.asserts).filter((e=>void 0!==i[e])).map((e=>({assertId:r,name:e,conditions:i[e],message:i.message,severity:i.severity||"error",suggest:i.suggest||[],runsOnKeys:n.runOnKeysSet.has(e),runsOnValues:n.runOnValuesSet.has(e)}))),l=s.find((e=>e.runsOnKeys&&!e.runsOnValues)),c=s.find((e=>e.runsOnValues&&!e.runsOnKeys));if(c&&!i.property)throw new Error(`${c.name} can't be used on all keys. Please provide a single property.`);if(l&&i.property)throw new Error(`${l.name} can't be used on a single property. Please use 'property'.`);for(const e of a){const r=o.buildSubjectVisitor(i.property,s,i.context),n=o.buildVisitorObject(e,i.context,r);t.push(n)}}return t}},5738:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isOrdered=t.getIntersectionLength=t.buildSubjectVisitor=t.buildVisitorObject=void 0;const n=r(7468),o=r(9740);function i(e,t,r,n){o.asserts[t.name](e,t.conditions)||n({message:t.message||`The ${t.assertId} doesn't meet required conditions`,location:r,forceSeverity:t.severity,suggest:t.suggest,ruleId:t.assertId})}t.buildVisitorObject=function(e,t,r){if(!t)return{[e]:r};let n={};const o=n;for(let r=0;ri?!i.includes(t):a?a.includes(t):void 0}:{},n=n[o.type]}return n[e]=r,o},t.buildSubjectVisitor=function(e,t,r){return function(o,{report:a,location:s,key:l,type:c,resolve:u}){var p;if(r){const e=r[r.length-1];if(e.type===c.name){const t=e.matchParentKeys,r=e.excludeParentKeys;if(t&&!t.includes(l))return;if(r&&r.includes(l))return}}e&&(e=Array.isArray(e)?e:[e]);for(const r of t)if(e)for(const t of e)i(n.isRef(o[t])?null===(p=u(o[t]))||void 0===p?void 0:p.node:o[t],r,s.child(t),a);else i(Object.keys(o),r,s.key(),a)}},t.getIntersectionLength=function(e,t){const r=new Set(t);let n=0;for(const t of e)r.has(t)&&n++;return n},t.isOrdered=function(e,t){const r=t.direction||t,n=t.property;for(let t=1;t=i:o<=i))return!1}return!0}},8265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoContact=void 0;const n=r(780);t.InfoContact=()=>({Info(e,{report:t,location:r}){e.contact||t({message:n.missingRequiredField("Info","contact"),location:r.child("contact").key()})}})},8675:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoDescription=void 0;const n=r(780);t.InfoDescription=()=>({Info(e,t){n.validateDefinedAndNonEmpty("description",e,t)}})},9622:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoLicense=void 0;const n=r(780);t.InfoLicense=()=>({Info(e,{report:t}){e.license||t({message:n.missingRequiredField("Info","license"),location:{reportOnKey:!0}})}})},476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfoLicenseUrl=void 0;const n=r(780);t.InfoLicenseUrl=()=>({License(e,t){n.validateDefinedAndNonEmpty("url",e,t)}})},3467:(e,t)=>{"use strict";function r(e,t){const r=e.split("/"),n=t.split("/");if(r.length!==n.length)return!1;let o=0,i=0,a=!0;for(let e=0;e({PathMap(e,{report:t,location:n}){const o=[];for(const i of Object.keys(e)){const e=o.find((e=>r(e,i)));e&&t({message:`Paths should resolve unambiguously. Found two ambiguous paths: \`${e}\` and \`${i}\`.`,location:n.child([i]).key()}),o.push(i)}}})},2319:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoEnumTypeMismatch=void 0;const n=r(780);t.NoEnumTypeMismatch=()=>({Schema(e,{report:t,location:r}){if(!e.enum||Array.isArray(e.enum)){if(e.enum&&e.type&&!Array.isArray(e.type)){const o=e.enum.filter((t=>!n.matchesJsonSchemaType(t,e.type,e.nullable)));for(const i of o)t({message:`All values of \`enum\` field must be of the same type as the \`type\` field: expected "${e.type}" but received "${n.oasTypeOf(i)}".`,location:r.child(["enum",e.enum.indexOf(i)])})}if(e.enum&&e.type&&Array.isArray(e.type)){const o={};for(const t of e.enum){o[t]=[];for(const r of e.type)n.matchesJsonSchemaType(t,r,e.nullable)||o[t].push(r);o[t].length!==e.type.length&&delete o[t]}for(const n of Object.keys(o))t({message:`Enum value \`${n}\` must be of one type. Allowed types: \`${e.type}\`.`,location:r.child(["enum",e.enum.indexOf(n)])})}}}})},525:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoHttpVerbsInPaths=void 0;const n=r(771),o=["get","head","post","put","patch","delete","options","trace"];t.NoHttpVerbsInPaths=({splitIntoWords:e})=>({PathItem(t,{key:r,report:i,location:a}){const s=r.toString();if(!s.startsWith("/"))return;const l=s.split("/");for(const t of l){if(!t||n.isPathParameter(t))continue;const r=r=>e?n.splitCamelCaseIntoWords(t).has(r):t.toLocaleLowerCase().includes(r);for(const e of o)r(e)&&i({message:`path \`${s}\` should not contain http verb ${e}`,location:a.key()})}}})},4628:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoIdenticalPaths=void 0,t.NoIdenticalPaths=()=>({PathMap(e,{report:t,location:r}){const n=new Map;for(const o of Object.keys(e)){const e=o.replace(/{.+?}/g,"{VARIABLE}"),i=n.get(e);i?t({message:`The path already exists which differs only by path parameter name(s): \`${i}\` and \`${o}\`.`,location:r.child([o]).key()}):n.set(e,o)}}})},1562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoInvalidParameterExamples=void 0;const n=r(780);t.NoInvalidParameterExamples=e=>{var t;const r=null===(t=e.disallowAdditionalProperties)||void 0===t||t;return{Parameter:{leave(e,t){if(e.example&&n.validateExample(e.example,e.schema,t.location.child("example"),t,r),e.examples)for(const[r,o]of Object.entries(e.examples))"value"in o&&n.validateExample(o.value,e.schema,t.location.child(["examples",r]),t,!1)}}}}},78:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoInvalidSchemaExamples=void 0;const n=r(780);t.NoInvalidSchemaExamples=e=>{var t;const r=null===(t=e.disallowAdditionalProperties)||void 0===t||t;return{Schema:{leave(e,t){if(e.examples)for(const o of e.examples)n.validateExample(o,e,t.location.child(["examples",e.examples.indexOf(o)]),t,r);e.example&&n.validateExample(e.example,e,t.location.child("example"),t,!1)}}}}},700:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoPathTrailingSlash=void 0,t.NoPathTrailingSlash=()=>({PathItem(e,{report:t,key:r,location:n}){r.endsWith("/")&&"/"!==r&&t({message:`\`${r}\` should not have a trailing slash.`,location:n.key()})}})},5946:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation2xxResponse=void 0,t.Operation2xxResponse=()=>({ResponsesMap(e,{report:t}){Object.keys(e).some((e=>"default"===e||/2[Xx0-9]{2}/.test(e)))||t({message:"Operation must have at least one `2xx` response.",location:{reportOnKey:!0}})}})},5281:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation4xxResponse=void 0,t.Operation4xxResponse=()=>({ResponsesMap(e,{report:t}){Object.keys(e).some((e=>/4[Xx0-9]{2}/.test(e)))||t({message:"Operation must have at least one `4xx` response.",location:{reportOnKey:!0}})}})},3408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationDescription=void 0;const n=r(780);t.OperationDescription=()=>({Operation(e,t){n.validateDefinedAndNonEmpty("description",e,t)}})},8742:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationIdUnique=void 0,t.OperationIdUnique=()=>{const e=new Set;return{Operation(t,{report:r,location:n}){t.operationId&&(e.has(t.operationId)&&r({message:"Every operation must have a unique `operationId`.",location:n.child([t.operationId])}),e.add(t.operationId))}}}},5064:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationIdUrlSafe=void 0;const r=/^[A-Za-z0-9-._~:/?#\[\]@!\$&'()*+,;=]*$/;t.OperationIdUrlSafe=()=>({Operation(e,{report:t,location:n}){e.operationId&&!r.test(e.operationId)&&t({message:"Operation `operationId` should not have URL invalid characters.",location:n.child(["operationId"])})}})},8786:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationOperationId=void 0;const n=r(780);t.OperationOperationId=()=>({DefinitionRoot:{PathItem:{Operation(e,t){n.validateDefinedAndNonEmpty("operationId",e,t)}}}})},4112:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationParametersUnique=void 0,t.OperationParametersUnique=()=>{let e,t;return{PathItem:{enter(){e=new Set},Parameter(t,{report:r,key:n,parentLocations:o}){const i=`${t.in}___${t.name}`;e.has(i)&&r({message:`Paths must have unique \`name\` + \`in\` parameters.\nRepeats of \`in:${t.in}\` + \`name:${t.name}\`.`,location:o.PathItem.child(["parameters",n])}),e.add(`${t.in}___${t.name}`)},Operation:{enter(){t=new Set},Parameter(e,{report:r,key:n,parentLocations:o}){const i=`${e.in}___${e.name}`;t.has(i)&&r({message:`Operations must have unique \`name\` + \`in\` parameters. Repeats of \`in:${e.in}\` + \`name:${e.name}\`.`,location:o.Operation.child(["parameters",n])}),t.add(i)}}}}}},7892:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationSecurityDefined=void 0,t.OperationSecurityDefined=()=>{let e=new Map;return{DefinitionRoot:{leave(t,{report:r}){for(const[t,n]of e.entries())if(!n.defined)for(const e of n.from)r({message:`There is no \`${t}\` security scheme defined.`,location:e.key()})}},SecurityScheme(t,{key:r}){e.set(r.toString(),{defined:!0,from:[]})},SecurityRequirement(t,{location:r}){for(const n of Object.keys(t)){const t=e.get(n),o=r.child([n]);t?t.from.push(o):e.set(n,{from:[o]})}}}}},8613:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationSingularTag=void 0,t.OperationSingularTag=()=>({Operation(e,{report:t,location:r}){e.tags&&e.tags.length>1&&t({message:"Operation `tags` object should have only one tag.",location:r.child(["tags"]).key()})}})},9578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationSummary=void 0;const n=r(780);t.OperationSummary=()=>({Operation(e,t){n.validateDefinedAndNonEmpty("summary",e,t)}})},5097:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationTagDefined=void 0,t.OperationTagDefined=()=>{let e;return{DefinitionRoot(t){var r;e=new Set((null!==(r=t.tags)&&void 0!==r?r:[]).map((e=>e.name)))},Operation(t,{report:r,location:n}){if(t.tags)for(let o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParameterDescription=void 0,t.ParameterDescription=()=>({Parameter(e,{report:t,location:r}){void 0===e.description?t({message:"Parameter object description must be present.",location:{reportOnKey:!0}}):e.description||t({message:"Parameter object description must be non-empty string.",location:r.child(["description"])})}})},7890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathDeclarationMustExist=void 0,t.PathDeclarationMustExist=()=>({PathItem(e,{report:t,key:r}){-1!==r.indexOf("{}")&&t({message:"Path parameter declarations must be non-empty. `{}` is invalid.",location:{reportOnKey:!0}})}})},3689:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathExcludesPatterns=void 0,t.PathExcludesPatterns=({patterns:e})=>({PathItem(t,{report:r,key:n,location:o}){if(!e)throw new Error('Parameter "patterns" is not provided for "path-excludes-patterns" rule');const i=n.toString();if(i.startsWith("/")){const t=e.filter((e=>i.match(e)));for(const e of t)r({message:`path \`${i}\` should not match regex pattern: \`${e}\``,location:o.key()})}}})},2332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathHttpVerbsOrder=void 0;const r=["get","head","post","put","patch","delete","options","trace"];t.PathHttpVerbsOrder=e=>{const t=e&&e.order||r;if(!Array.isArray(t))throw new Error("path-http-verbs-order `order` option must be an array");return{PathItem(e,{report:r,location:n}){const o=Object.keys(e).filter((e=>t.includes(e)));for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathNotIncludeQuery=void 0,t.PathNotIncludeQuery=()=>({PathMap:{PathItem(e,{report:t,key:r}){r.toString().includes("?")&&t({message:"Don't put query string items in the path, they belong in parameters with `in: query`.",location:{reportOnKey:!0}})}}})},7421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathParamsDefined=void 0;const r=/\{([a-zA-Z0-9_.-]+)\}+/g;t.PathParamsDefined=()=>{let e,t,n;return{PathItem:{enter(o,{key:i}){t=new Set,n=i,e=new Set(Array.from(i.toString().matchAll(r)).map((e=>e[1])))},Parameter(r,{report:o,location:i}){"path"===r.in&&r.name&&(t.add(r.name),e.has(r.name)||o({message:`Path parameter \`${r.name}\` is not used in the path \`${n}\`.`,location:i.child(["name"])}))},Operation:{leave(r,{report:o,location:i}){for(const r of Array.from(e.keys()))t.has(r)||o({message:`The operation does not define the path parameter \`{${r}}\` expected by path \`${n}\`.`,location:i.child(["parameters"]).key()})},Parameter(r,{report:o,location:i}){"path"===r.in&&r.name&&(t.add(r.name),e.has(r.name)||o({message:`Path parameter \`${r.name}\` is not used in the path \`${n}\`.`,location:i.child(["name"])}))}}}}}},3807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathSegmentPlural=void 0;const n=r(771);t.PathSegmentPlural=e=>{const{ignoreLastPathSegment:t,exceptions:r}=e;return{PathItem:{leave(e,{report:o,key:i,location:a}){const s=i.toString();if(s.startsWith("/")){const e=s.split("/");e.shift(),t&&e.length>1&&e.pop();for(const t of e)r&&r.includes(t)||!n.isPathParameter(t)&&n.isSingular(t)&&o({message:`path segment \`${t}\` should be plural.`,location:a.key()})}}}}}},9527:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathsKebabCase=void 0,t.PathsKebabCase=()=>({PathItem(e,{report:t,key:r}){r.substr(1).split("/").filter((e=>""!==e)).every((e=>/^{.+}$/.test(e)||/^[a-z0-9-.]+$/.test(e)))||t({message:`\`${r}\` does not use kebab-case.`,location:{reportOnKey:!0}})}})},6471:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OasSpec=void 0;const n=r(5220),o=r(780),i=r(7468),a=r(771);t.OasSpec=()=>({any(e,{report:t,type:r,location:s,key:l,resolve:c,ignoreNextVisitorsOnNode:u}){var p,d,f,h;const m=o.oasTypeOf(e);if(r.items)return void("array"!==m&&(t({message:`Expected type \`${r.name}\` (array) but got \`${m}\``}),u()));if("object"!==m)return t({message:`Expected type \`${r.name}\` (object) but got \`${m}\``}),void u();const g="function"==typeof r.required?r.required(e,l):r.required;for(let r of g||[])e.hasOwnProperty(r)||t({message:`The field \`${r}\` must be present on this level.`,location:[{reportOnKey:!0}]});const y=null===(p=r.allowed)||void 0===p?void 0:p.call(r,e);if(y&&a.isPlainObject(e))for(const n in e)y.includes(n)||r.extensionsPrefix&&n.startsWith(r.extensionsPrefix)||!Object.keys(r.properties).includes(n)||t({message:`The field \`${n}\` is not allowed here.`,location:s.child([n]).key()});const v=r.requiredOneOf||null;if(v){let n=!1;for(let t of v||[])e.hasOwnProperty(t)&&(n=!0);n||t({message:`Must contain at least one of the following fields: ${null===(d=r.requiredOneOf)||void 0===d?void 0:d.join(", ")}.`,location:[{reportOnKey:!0}]})}for(const a of Object.keys(e)){const l=s.child([a]);let u=e[a],p=r.properties[a];if(void 0===p&&(p=r.additionalProperties),"function"==typeof p&&(p=p(u,a)),n.isNamedType(p))continue;const d=p,m=o.oasTypeOf(u);if(void 0!==d){if(null!==d){if(!1!==d.resolvable&&i.isRef(u)&&(u=c(u).node),d.enum)d.enum.includes(u)||t({location:l,message:`\`${a}\` can be one of the following only: ${d.enum.map((e=>`"${e}"`)).join(", ")}.`,suggest:o.getSuggest(u,d.enum)});else if(d.type&&!o.matchesJsonSchemaType(u,d.type,!1))t({message:`Expected type \`${d.type}\` but got \`${m}\`.`,location:l});else if("array"===m&&(null===(f=d.items)||void 0===f?void 0:f.type)){const e=null===(h=d.items)||void 0===h?void 0:h.type;for(let r=0;re[a]&&t({message:`The value of the ${a} field must be greater than or equal to ${d.minimum}`,location:s.child([a])})}}else{if(a.startsWith("x-"))continue;t({message:`Property \`${a}\` is not expected here.`,suggest:o.getSuggest(a,Object.keys(r.properties)),location:l.key()})}}}})},7281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagDescription=void 0;const n=r(780);t.TagDescription=()=>({Tag(e,t){n.validateDefinedAndNonEmpty("description",e,t)}})},6855:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TagsAlphabetical=void 0,t.TagsAlphabetical=()=>({DefinitionRoot(e,{report:t,location:r}){if(e.tags)for(let n=0;ne.tags[n+1].name&&t({message:"The `tags` array should be in alphabetical order.",location:r.child(["tags",n])})}})},348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnresolvedRef=t.NoUnresolvedRefs=void 0;const n=r(4182);function o(e,t,r){var o;const i=e.error;i instanceof n.YamlParseError&&t({message:"Failed to parse: "+i.message,location:{source:i.source,pointer:void 0,start:{col:i.col,line:i.line}}});const a=null===(o=e.error)||void 0===o?void 0:o.message;t({location:r,message:"Can't resolve $ref"+(a?": "+a:"")})}t.NoUnresolvedRefs=()=>({ref:{leave(e,{report:t,location:r},n){void 0===n.node&&o(n,t,r)}},DiscriminatorMapping(e,{report:t,resolve:r,location:n}){for(const i of Object.keys(e)){const a=r({$ref:e[i]});if(void 0!==a.node)return;o(a,t,n.child(i))}}}),t.reportUnresolvedRef=o},9566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanParameterPrefixes=void 0,t.BooleanParameterPrefixes=e=>{const t=e.prefixes||["is","has"],r=new RegExp(`^(${t.join("|")})[A-Z-_]`),n=t.map((e=>`\`${e}\``)),o=1===n.length?n[0]:n.slice(0,-1).join(", ")+" or "+n[t.length-1];return{Parameter(e,{report:t,location:n}){"boolean"!==e.type||r.test(e.name)||t({message:`Boolean parameter \`${e.name}\` should have ${o} prefix.`,location:n.child("name")})}}}},7523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preprocessors=t.rules=void 0;const n=r(6471),o=r(78),i=r(1562),a=r(8675),s=r(8265),l=r(9622),c=r(476),u=r(9566),p=r(7281),d=r(6855),f=r(9527),h=r(2319),m=r(700),g=r(5946),y=r(5281),v=r(4015),b=r(8742),w=r(4112),x=r(7421),k=r(5097),O=r(7890),_=r(5064),S=r(3408),E=r(5023),P=r(3529),$=r(8613),A=r(7892),C=r(348),R=r(2332),j=r(4628),T=r(8786),I=r(9578),N=r(3467),L=r(525),D=r(3689),M=r(7028),F=r(1750),z=r(3807);t.rules={spec:n.OasSpec,"no-invalid-schema-examples":o.NoInvalidSchemaExamples,"no-invalid-parameter-examples":i.NoInvalidParameterExamples,"info-description":a.InfoDescription,"info-contact":s.InfoContact,"info-license":l.InfoLicense,"info-license-url":c.InfoLicenseUrl,"tag-description":p.TagDescription,"tags-alphabetical":d.TagsAlphabetical,"paths-kebab-case":f.PathsKebabCase,"no-enum-type-mismatch":h.NoEnumTypeMismatch,"boolean-parameter-prefixes":u.BooleanParameterPrefixes,"no-path-trailing-slash":m.NoPathTrailingSlash,"operation-2xx-response":g.Operation2xxResponse,"operation-4xx-response":y.Operation4xxResponse,assertions:v.Assertions,"operation-operationId-unique":b.OperationIdUnique,"operation-parameters-unique":w.OperationParametersUnique,"path-parameters-defined":x.PathParamsDefined,"operation-tag-defined":k.OperationTagDefined,"path-declaration-must-exist":O.PathDeclarationMustExist,"operation-operationId-url-safe":_.OperationIdUrlSafe,"operation-operationId":T.OperationOperationId,"operation-summary":I.OperationSummary,"operation-description":S.OperationDescription,"path-not-include-query":E.PathNotIncludeQuery,"path-params-defined":x.PathParamsDefined,"parameter-description":P.ParameterDescription,"operation-singular-tag":$.OperationSingularTag,"operation-security-defined":A.OperationSecurityDefined,"no-unresolved-refs":C.NoUnresolvedRefs,"no-identical-paths":j.NoIdenticalPaths,"no-ambiguous-paths":N.NoAmbiguousPaths,"path-http-verbs-order":R.PathHttpVerbsOrder,"no-http-verbs-in-paths":L.NoHttpVerbsInPaths,"path-excludes-patterns":D.PathExcludesPatterns,"request-mime-type":M.RequestMimeType,"response-mime-type":F.ResponseMimeType,"path-segment-plural":z.PathSegmentPlural},t.preprocessors={}},4508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const n=r(771);t.RemoveUnusedComponents=()=>{let e=new Map;function t(t,r,n){var o;e.set(t.absolutePointer,{used:(null===(o=e.get(t.absolutePointer))||void 0===o?void 0:o.used)||!1,componentType:r,name:n})}return{ref:{leave(t,{type:r,resolve:n,key:o}){if(["Schema","Parameter","Response","SecurityScheme"].includes(r.name)){const r=n(t);if(!r.location)return;e.set(r.location.absolutePointer,{used:!0,name:o.toString()})}}},DefinitionRoot:{leave(t,r){const o=r.getVisitorData();o.removedCount=0;let i=new Set;e.forEach((e=>{const{used:r,name:n,componentType:a}=e;!r&&a&&(i.add(a),delete t[a][n],o.removedCount++)}));for(const e of i)n.isEmptyObject(t[e])&&delete t[e]}},NamedSchemas:{Schema(e,{location:r,key:n}){e.allOf||t(r,"definitions",n.toString())}},NamedParameters:{Parameter(e,{location:r,key:n}){t(r,"parameters",n.toString())}},NamedResponses:{Response(e,{location:r,key:n}){t(r,"responses",n.toString())}},NamedSecuritySchemes:{SecurityScheme(e,{location:r,key:n}){t(r,"securityDefinitions",n.toString())}}}}},7028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMimeType=void 0;const n=r(771);t.RequestMimeType=({allowedValues:e})=>({DefinitionRoot(t,r){n.validateMimeType({type:"consumes",value:t},r,e)},Operation:{leave(t,r){n.validateMimeType({type:"consumes",value:t},r,e)}}})},1750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseMimeType=void 0;const n=r(771);t.ResponseMimeType=({allowedValues:e})=>({DefinitionRoot(t,r){n.validateMimeType({type:"produces",value:t},r,e)},Operation:{leave(t,r){n.validateMimeType({type:"produces",value:t},r,e)}}})},962:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanParameterPrefixes=void 0,t.BooleanParameterPrefixes=e=>{const t=e.prefixes||["is","has"],r=new RegExp(`^(${t.join("|")})[A-Z-_]`),n=t.map((e=>`\`${e}\``)),o=1===n.length?n[0]:n.slice(0,-1).join(", ")+" or "+n[t.length-1];return{Parameter:{Schema(e,{report:t,parentLocations:n},i){"boolean"!==e.type||r.test(i.Parameter.name)||t({message:`Boolean parameter \`${i.Parameter.name}\` should have ${o} prefix.`,location:n.Parameter.child(["name"])})}}}}},226:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preprocessors=t.rules=void 0;const n=r(6471),o=r(5946),i=r(5281),a=r(4015),s=r(8742),l=r(4112),c=r(7421),u=r(5097),p=r(1265),d=r(2319),f=r(700),h=r(7890),m=r(5064),g=r(6855),y=r(5486),v=r(2947),b=r(8675),w=r(7281),x=r(8265),k=r(9622),O=r(3408),_=r(897),S=r(5023),E=r(3529),P=r(8613),$=r(476),A=r(7892),C=r(348),R=r(962),j=r(9527),T=r(2332),I=r(7020),N=r(9336),L=r(4628),D=r(6208),M=r(8786),F=r(9578),z=r(3467),U=r(472),q=r(525),B=r(3736),V=r(503),W=r(3807),H=r(3689),Y=r(78),K=r(1562);t.rules={spec:n.OasSpec,"info-description":b.InfoDescription,"info-contact":x.InfoContact,"info-license":k.InfoLicense,"info-license-url":$.InfoLicenseUrl,"operation-2xx-response":o.Operation2xxResponse,"operation-4xx-response":i.Operation4xxResponse,assertions:a.Assertions,"operation-operationId-unique":s.OperationIdUnique,"operation-parameters-unique":l.OperationParametersUnique,"path-parameters-defined":c.PathParamsDefined,"operation-tag-defined":u.OperationTagDefined,"no-example-value-and-externalValue":p.NoExampleValueAndExternalValue,"no-enum-type-mismatch":d.NoEnumTypeMismatch,"no-path-trailing-slash":f.NoPathTrailingSlash,"no-empty-servers":I.NoEmptyServers,"path-declaration-must-exist":h.PathDeclarationMustExist,"operation-operationId-url-safe":m.OperationIdUrlSafe,"operation-operationId":M.OperationOperationId,"operation-summary":F.OperationSummary,"tags-alphabetical":g.TagsAlphabetical,"no-server-example.com":y.NoServerExample,"no-server-trailing-slash":v.NoServerTrailingSlash,"tag-description":w.TagDescription,"operation-description":O.OperationDescription,"no-unused-components":_.NoUnusedComponents,"path-not-include-query":S.PathNotIncludeQuery,"path-params-defined":c.PathParamsDefined,"parameter-description":E.ParameterDescription,"operation-singular-tag":P.OperationSingularTag,"operation-security-defined":A.OperationSecurityDefined,"no-unresolved-refs":C.NoUnresolvedRefs,"paths-kebab-case":j.PathsKebabCase,"boolean-parameter-prefixes":R.BooleanParameterPrefixes,"path-http-verbs-order":T.PathHttpVerbsOrder,"no-invalid-media-type-examples":N.ValidContentExamples,"no-identical-paths":L.NoIdenticalPaths,"no-ambiguous-paths":z.NoAmbiguousPaths,"no-undefined-server-variable":D.NoUndefinedServerVariable,"no-servers-empty-enum":U.NoEmptyEnumServers,"no-http-verbs-in-paths":q.NoHttpVerbsInPaths,"path-excludes-patterns":H.PathExcludesPatterns,"request-mime-type":B.RequestMimeType,"response-mime-type":V.ResponseMimeType,"path-segment-plural":W.PathSegmentPlural,"no-invalid-schema-examples":Y.NoInvalidSchemaExamples,"no-invalid-parameter-examples":K.NoInvalidParameterExamples},t.preprocessors={}},7020:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoEmptyServers=void 0,t.NoEmptyServers=()=>({DefinitionRoot(e,{report:t,location:r}){e.hasOwnProperty("servers")?Array.isArray(e.servers)&&0!==e.servers.length||t({message:"Servers must be a non-empty array.",location:r.child(["servers"]).key()}):t({message:"Servers must be present.",location:r.child(["openapi"]).key()})}})},1265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoExampleValueAndExternalValue=void 0,t.NoExampleValueAndExternalValue=()=>({Example(e,{report:t,location:r}){e.value&&e.externalValue&&t({message:"Example object can have either `value` or `externalValue` fields.",location:r.child(["value"]).key()})}})},9336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidContentExamples=void 0;const n=r(7468),o=r(780);t.ValidContentExamples=e=>{var t;const r=null===(t=e.disallowAdditionalProperties)||void 0===t||t;return{MediaType:{leave(e,t){const{location:i,resolve:a}=t;if(e.schema)if(e.example)s(e.example,i.child("example"));else if(e.examples)for(const t of Object.keys(e.examples))s(e.examples[t],i.child(["examples",t,"value"]),!0);function s(i,s,l){if(n.isRef(i)){const e=a(i);if(!e.location)return;s=l?e.location.child("value"):e.location,i=e.node}o.validateExample(l?i.value:i,e.schema,s,t,r)}}}}}},5486:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoServerExample=void 0,t.NoServerExample=()=>({Server(e,{report:t,location:r}){-1!==["example.com","localhost"].indexOf(e.url)&&t({message:"Server `url` should not point at example.com.",location:r.child(["url"])})}})},2947:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoServerTrailingSlash=void 0,t.NoServerTrailingSlash=()=>({Server(e,{report:t,location:r}){e.url&&e.url.endsWith("/")&&"/"!==e.url&&t({message:"Server `url` should not have a trailing slash.",location:r.child(["url"])})}})},472:(e,t)=>{"use strict";var r;function n(e){var t;if(e.variables&&0===Object.keys(e.variables).length)return;const n=[];for(var o in e.variables){const i=e.variables[o];if(!i.enum)continue;if(Array.isArray(i.enum)&&0===(null===(t=i.enum)||void 0===t?void 0:t.length)&&n.push(r.empty),!i.default)continue;const a=e.variables[o].default;i.enum&&!i.enum.includes(a)&&n.push(r.invalidDefaultValue)}return n.length?n:void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.NoEmptyEnumServers=void 0,function(e){e.empty="empty",e.invalidDefaultValue="invalidDefaultValue"}(r||(r={})),t.NoEmptyEnumServers=()=>({DefinitionRoot(e,{report:t,location:o}){if(!e.servers||0===e.servers.length)return;const i=[];if(Array.isArray(e.servers))for(const t of e.servers){const e=n(t);e&&i.push(...e)}else{const t=n(e.servers);if(!t)return;i.push(...t)}for(const e of i)e===r.empty&&t({message:"Server variable with `enum` must be a non-empty array.",location:o.child(["servers"]).key()}),e===r.invalidDefaultValue&&t({message:"Server variable define `enum` and `default`. `enum` must include default value",location:o.child(["servers"]).key()})}})},6208:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoUndefinedServerVariable=void 0,t.NoUndefinedServerVariable=()=>({Server(e,{report:t,location:r}){var n;if(!e.url)return;const o=(null===(n=e.url.match(/{[^}]+}/g))||void 0===n?void 0:n.map((e=>e.slice(1,e.length-1))))||[],i=(null==e?void 0:e.variables)&&Object.keys(e.variables)||[];for(const e of o)i.includes(e)||t({message:`The \`${e}\` variable is not defined in the \`variables\` objects.`,location:r.child(["url"])});for(const e of i)o.includes(e)||t({message:`The \`${e}\` variable is not used in the server's \`url\` field.`,location:r.child(["variables",e]).key(),from:r.child("url")})}})},897:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoUnusedComponents=void 0,t.NoUnusedComponents=()=>{let e=new Map;function t(t,r){var n;e.set(t.absolutePointer,{used:(null===(n=e.get(t.absolutePointer))||void 0===n?void 0:n.used)||!1,location:t,name:r})}return{ref(t,{type:r,resolve:n,key:o,location:i}){if(["Schema","Header","Parameter","Response","Example","RequestBody"].includes(r.name)){const r=n(t);if(!r.location)return;e.set(r.location.absolutePointer,{used:!0,name:o.toString(),location:i})}},DefinitionRoot:{leave(t,{report:r}){e.forEach((e=>{e.used||r({message:`Component: "${e.name}" is never used.`,location:e.location.key()})}))}},NamedSchemas:{Schema(e,{location:r,key:n}){e.allOf||t(r,n.toString())}},NamedParameters:{Parameter(e,{location:r,key:n}){t(r,n.toString())}},NamedResponses:{Response(e,{location:r,key:n}){t(r,n.toString())}},NamedExamples:{Example(e,{location:r,key:n}){t(r,n.toString())}},NamedRequestBodies:{RequestBody(e,{location:r,key:n}){t(r,n.toString())}},NamedHeaders:{Header(e,{location:r,key:n}){t(r,n.toString())}}}}},6350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveUnusedComponents=void 0;const n=r(771);t.RemoveUnusedComponents=()=>{let e=new Map;function t(t,r,n){var o;e.set(t.absolutePointer,{used:(null===(o=e.get(t.absolutePointer))||void 0===o?void 0:o.used)||!1,componentType:r,name:n})}return{ref:{leave(t,{type:r,resolve:n,key:o}){if(["Schema","Header","Parameter","Response","Example","RequestBody"].includes(r.name)){const r=n(t);if(!r.location)return;e.set(r.location.absolutePointer,{used:!0,name:o.toString()})}}},DefinitionRoot:{leave(t,r){const o=r.getVisitorData();o.removedCount=0,e.forEach((e=>{const{used:r,componentType:i,name:a}=e;if(!r&&i){let e=t.components[i];delete e[a],o.removedCount++,n.isEmptyObject(e)&&delete t.components[i]}})),n.isEmptyObject(t.components)&&delete t.components}},NamedSchemas:{Schema(e,{location:r,key:n}){e.allOf||t(r,"schemas",n.toString())}},NamedParameters:{Parameter(e,{location:r,key:n}){t(r,"parameters",n.toString())}},NamedResponses:{Response(e,{location:r,key:n}){t(r,"responses",n.toString())}},NamedExamples:{Example(e,{location:r,key:n}){t(r,"examples",n.toString())}},NamedRequestBodies:{RequestBody(e,{location:r,key:n}){t(r,"requestBodies",n.toString())}},NamedHeaders:{Header(e,{location:r,key:n}){t(r,"headers",n.toString())}}}}},3736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequestMimeType=void 0;const n=r(771);t.RequestMimeType=({allowedValues:e})=>({PathMap:{RequestBody:{leave(t,r){n.validateMimeTypeOAS3({type:"consumes",value:t},r,e)}},Callback:{RequestBody(){},Response:{leave(t,r){n.validateMimeTypeOAS3({type:"consumes",value:t},r,e)}}}},WebhooksMap:{Response:{leave(t,r){n.validateMimeTypeOAS3({type:"consumes",value:t},r,e)}}}})},503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseMimeType=void 0;const n=r(771);t.ResponseMimeType=({allowedValues:e})=>({PathMap:{Response:{leave(t,r){n.validateMimeTypeOAS3({type:"produces",value:t},r,e)}},Callback:{Response(){},RequestBody:{leave(t,r){n.validateMimeTypeOAS3({type:"produces",value:t},r,e)}}}},WebhooksMap:{RequestBody:{leave(t,r){n.validateMimeTypeOAS3({type:"produces",value:t},r,e)}}}})},780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateExample=t.getSuggest=t.validateDefinedAndNonEmpty=t.fieldNonEmpty=t.missingRequiredField=t.matchesJsonSchemaType=t.oasTypeOf=void 0;const n=r(9991),o=r(7468),i=r(7275);function a(e,t){return`${e} object should contain \`${t}\` field.`}function s(e,t){return`${e} object \`${t}\` must be non-empty string.`}t.oasTypeOf=function(e){return Array.isArray(e)?"array":null===e?"null":typeof e},t.matchesJsonSchemaType=function(e,t,r){if(r&&null===e)return null===e;switch(t){case"array":return Array.isArray(e);case"object":return"object"==typeof e&&null!==e&&!Array.isArray(e);case"null":return null===e;case"integer":return Number.isInteger(e);default:return typeof e===t}},t.missingRequiredField=a,t.fieldNonEmpty=s,t.validateDefinedAndNonEmpty=function(e,t,r){"object"==typeof t&&(void 0===t[e]?r.report({message:a(r.type.name,e),location:r.location.child([e]).key()}):t[e]||r.report({message:s(r.type.name,e),location:r.location.child([e]).key()}))},t.getSuggest=function(e,t){if("string"!=typeof e||!t.length)return[];const r=[];for(let o=0;oe.distance-t.distance)),r.map((e=>e.variant))},t.validateExample=function(e,t,r,{resolve:n,location:a,report:s},l){try{const{valid:c,errors:u}=i.validateJsonSchema(e,t,a.child("schema"),r.pointer,n,l);if(!c)for(let e of u)s({message:`Example value must conform to the schema: ${e.message}.`,location:Object.assign(Object.assign({},new o.Location(r.source,e.instancePath)),{reportOnKey:"additionalProperties"===e.keyword}),from:a,suggest:e.suggest})}catch(e){s({message:`Example validation errored: ${e.message}.`,location:a.child("schema"),from:a})}}},5220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNamedType=t.normalizeTypes=t.mapOf=t.listOf=void 0,t.listOf=function(e){return{name:`${e}List`,properties:{},items:e}},t.mapOf=function(e){return{name:`${e}Map`,properties:{},additionalProperties:()=>e}},t.normalizeTypes=function(e,t={}){const r={};for(const t of Object.keys(e))r[t]=Object.assign(Object.assign({},e[t]),{name:t});for(const e of Object.values(r))n(e);return r;function n(e){if(e.additionalProperties&&(e.additionalProperties=o(e.additionalProperties)),e.items&&(e.items=o(e.items)),e.properties){const r={};for(const[n,i]of Object.entries(e.properties))r[n]=o(i),t.doNotResolveExamples&&i&&i.isExample&&(r[n]=Object.assign(Object.assign({},i),{resolvable:!1}));e.properties=r}}function o(e){if("string"==typeof e){if(!r[e])throw new Error(`Unknown type name found: ${e}`);return r[e]}return"function"==typeof e?(t,r)=>o(e(t,r)):e&&e.name?(n(e=Object.assign({},e)),e):e&&e.directResolveAs?Object.assign(Object.assign({},e),{directResolveAs:o(e.directResolveAs)}):e}},t.isNamedType=function(e){return"string"==typeof(null==e?void 0:e.name)}},388:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas2Types=void 0;const n=r(5220),o=/^[0-9][0-9Xx]{2}$/,i={properties:{swagger:{type:"string"},info:"Info",host:{type:"string"},basePath:{type:"string"},schemes:{type:"array",items:{type:"string"}},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},paths:"PathMap",definitions:"NamedSchemas",parameters:"NamedParameters",responses:"NamedResponses",securityDefinitions:"NamedSecuritySchemes",security:n.listOf("SecurityRequirement"),tags:n.listOf("Tag"),externalDocs:"ExternalDocs"},required:["swagger","paths","info"]},a={properties:{$ref:{type:"string"},parameters:n.listOf("Parameter"),get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation"}},s={properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},consumes:{type:"array",items:{type:"string"}},produces:{type:"array",items:{type:"string"}},parameters:n.listOf("Parameter"),responses:"ResponsesMap",schemes:{type:"array",items:{type:"string"}},deprecated:{type:"boolean"},security:n.listOf("SecurityRequirement"),"x-codeSamples":n.listOf("XCodeSample"),"x-code-samples":n.listOf("XCodeSample")},required:["responses"]},l={properties:{default:"Response"},additionalProperties:(e,t)=>o.test(t)?"Response":void 0},c={properties:{description:{type:"string"},schema:"Schema",headers:n.mapOf("Header"),examples:"Examples"},required:["description"]},u={properties:{format:{type:"string"},title:{type:"string"},description:{type:"string"},default:null,multipleOf:{type:"number"},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"number"},minLength:{type:"number"},pattern:{type:"string"},maxItems:{type:"number"},minItems:{type:"number"},uniqueItems:{type:"boolean"},maxProperties:{type:"number"},minProperties:{type:"number"},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{type:"string",enum:["object","array","string","number","integer","boolean","null"]},items:e=>Array.isArray(e)?n.listOf("Schema"):"Schema",allOf:n.listOf("Schema"),properties:"SchemaProperties",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",discriminator:{type:"string"},readOnly:{type:"boolean"},xml:"Xml",externalDocs:"ExternalDocs",example:{isExample:!0}}},p={properties:{type:{enum:["basic","apiKey","oauth2"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header"]},flow:{enum:["implicit","password","application","accessCode"]},authorizationUrl:{type:"string"},tokenUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","scopes"];case"application":case"password":return["type","flow","tokenUrl","scopes"];default:return["type","flow","scopes"]}default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"basic":return["type","description"];case"apiKey":return["type","name","in","description"];case"oauth2":switch(null==e?void 0:e.flow){case"implicit":return["type","flow","authorizationUrl","description","scopes"];case"accessCode":return["type","flow","authorizationUrl","tokenUrl","description","scopes"];case"application":case"password":return["type","flow","tokenUrl","description","scopes"];default:return["type","flow","tokenUrl","authorizationUrl","description","scopes"]}default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas2Types={DefinitionRoot:i,Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs"},required:["name"]},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"]},SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},Info:{properties:{title:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License",version:{type:"string"}},required:["title","version"]},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}}},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"]},PathMap:{properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},PathItem:a,Parameter:{properties:{name:{type:"string"},in:{type:"string",enum:["query","header","path","formData","body"]},description:{type:"string"},required:{type:"boolean"},schema:"Schema",type:{type:"string",enum:["string","number","integer","boolean","array","file"]},format:{type:"string"},allowEmptyValue:{type:"boolean"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&e.in?"body"===e.in?["name","in","schema"]:"array"===e.type?["name","in","type","items"]:["name","in","type"]:["name","in"]},ParameterItems:{properties:{type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&"array"===e.type?["type","items"]:["type"]},Operation:s,Examples:{properties:{},additionalProperties:{isExample:!0}},Header:{properties:{description:{type:"string"},type:{type:"string",enum:["string","number","integer","boolean","array"]},format:{type:"string"},items:"ParameterItems",collectionFormat:{type:"string",enum:["csv","ssv","tsv","pipes","multi"]},default:null,maximum:{type:"integer"},exclusiveMaximum:{type:"boolean"},minimum:{type:"integer"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"integer"},minLength:{type:"integer"},pattern:{type:"string"},maxItems:{type:"integer"},minItems:{type:"integer"},uniqueItems:{type:"boolean"},enum:{type:"array"},multipleOf:{type:"number"}},required:e=>e&&"array"===e.type?["type","items"]:["type"]},ResponsesMap:l,Response:c,Schema:u,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}}},SchemaProperties:{properties:{},additionalProperties:"Schema"},NamedSchemas:n.mapOf("Schema"),NamedResponses:n.mapOf("Response"),NamedParameters:n.mapOf("Parameter"),NamedSecuritySchemes:n.mapOf("SecurityScheme"),SecurityScheme:p,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}}}},5241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3Types=void 0;const n=r(5220),o=r(7468),i=/^[0-9][0-9Xx]{2}$/,a={properties:{openapi:null,info:"Info",servers:n.listOf("Server"),security:n.listOf("SecurityRequirement"),tags:n.listOf("Tag"),externalDocs:"ExternalDocs",paths:"PathMap",components:"Components","x-webhooks":"WebhooksMap"},required:["openapi","paths","info"]},s={properties:{url:{type:"string"},description:{type:"string"},variables:n.mapOf("ServerVariable")},required:["url"]},l={properties:{$ref:{type:"string"},servers:n.listOf("Server"),parameters:n.listOf("Parameter"),summary:{type:"string"},description:{type:"string"},get:"Operation",put:"Operation",post:"Operation",delete:"Operation",options:"Operation",head:"Operation",patch:"Operation",trace:"Operation"}},c={properties:{name:{type:"string"},in:{enum:["query","header","path","cookie"]},description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:n.mapOf("Example"),content:"MediaTypeMap"},required:["name","in"],requiredOneOf:["schema","content"]},u={properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:n.listOf("Parameter"),security:n.listOf("SecurityRequirement"),servers:n.listOf("Server"),requestBody:"RequestBody",responses:"ResponsesMap",deprecated:{type:"boolean"},callbacks:n.mapOf("Callback"),"x-codeSamples":n.listOf("XCodeSample"),"x-code-samples":n.listOf("XCodeSample")},required:["responses"]},p={properties:{schema:"Schema",example:{isExample:!0},examples:n.mapOf("Example"),encoding:n.mapOf("Encoding")}},d={properties:{contentType:{type:"string"},headers:n.mapOf("Header"),style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"}}},f={properties:{description:{type:"string"},required:{type:"boolean"},deprecated:{type:"boolean"},allowEmptyValue:{type:"boolean"},style:{enum:["form","simple","label","matrix","spaceDelimited","pipeDelimited","deepObject"]},explode:{type:"boolean"},allowReserved:{type:"boolean"},schema:"Schema",example:{isExample:!0},examples:n.mapOf("Example"),content:"MediaTypeMap"}},h={properties:{default:"Response"},additionalProperties:(e,t)=>i.test(t)?"Response":void 0},m={properties:{description:{type:"string"},headers:n.mapOf("Header"),content:"MediaTypeMap",links:n.mapOf("Link")},required:["description"]},g={properties:{externalDocs:"ExternalDocs",discriminator:"Discriminator",title:{type:"string"},multipleOf:{type:"number",minimum:0},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"boolean"},exclusiveMinimum:{type:"boolean"},maxLength:{type:"number",minimum:0},minLength:{type:"number",minimum:0},pattern:{type:"string"},maxItems:{type:"number",minimum:0},minItems:{type:"number",minimum:0},uniqueItems:{type:"boolean"},maxProperties:{type:"number",minimum:0},minProperties:{type:"number",minimum:0},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:{enum:["object","array","string","number","integer","boolean","null"]},allOf:n.listOf("Schema"),anyOf:n.listOf("Schema"),oneOf:n.listOf("Schema"),not:"Schema",properties:"SchemaProperties",items:e=>Array.isArray(e)?n.listOf("Schema"):"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},default:null,nullable:{type:"boolean"},readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",example:{isExample:!0},deprecated:{type:"boolean"}}},y={properties:{},additionalProperties:e=>o.isMappingRef(e)?{type:"string",directResolveAs:"Schema"}:{type:"string"}},v={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"SecuritySchemeFlows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":return["type","flows","description"];case"openIdConnect":return["type","openIdConnectUrl","description"];default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3Types={DefinitionRoot:a,Tag:{properties:{name:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs"},required:["name"]},ExternalDocs:{properties:{description:{type:"string"},url:{type:"string"}},required:["url"]},Server:s,ServerVariable:{properties:{enum:{type:"array",items:{type:"string"}},default:{type:"string"},description:null},required:["default"]},SecurityRequirement:{properties:{},additionalProperties:{type:"array",items:{type:"string"}}},Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},contact:"Contact",license:"License"},required:["title","version"]},Contact:{properties:{name:{type:"string"},url:{type:"string"},email:{type:"string"}}},License:{properties:{name:{type:"string"},url:{type:"string"}},required:["name"]},PathMap:{properties:{},additionalProperties:(e,t)=>t.startsWith("/")?"PathItem":void 0},PathItem:l,Parameter:c,Operation:u,Callback:{properties:{},additionalProperties:"PathItem"},RequestBody:{properties:{description:{type:"string"},required:{type:"boolean"},content:"MediaTypeMap"},required:["content"]},MediaTypeMap:{properties:{},additionalProperties:"MediaType"},MediaType:p,Example:{properties:{value:{isExample:!0},summary:{type:"string"},description:{type:"string"},externalValue:{type:"string"}}},Encoding:d,Header:f,ResponsesMap:h,Response:m,Link:{properties:{operationRef:{type:"string"},operationId:{type:"string"},parameters:null,requestBody:null,description:{type:"string"},server:"Server"}},Schema:g,Xml:{properties:{name:{type:"string"},namespace:{type:"string"},prefix:{type:"string"},attribute:{type:"boolean"},wrapped:{type:"boolean"}}},SchemaProperties:{properties:{},additionalProperties:"Schema"},DiscriminatorMapping:y,Discriminator:{properties:{propertyName:{type:"string"},mapping:"DiscriminatorMapping"},required:["propertyName"]},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks"}},NamedSchemas:n.mapOf("Schema"),NamedResponses:n.mapOf("Response"),NamedParameters:n.mapOf("Parameter"),NamedExamples:n.mapOf("Example"),NamedRequestBodies:n.mapOf("RequestBody"),NamedHeaders:n.mapOf("Header"),NamedSecuritySchemes:n.mapOf("SecurityScheme"),NamedLinks:n.mapOf("Link"),NamedCallbacks:n.mapOf("PathItem"),ImplicitFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},authorizationUrl:{type:"string"}},required:["authorizationUrl","scopes"]},PasswordFlow:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"]},ClientCredentials:{properties:{refreshUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["tokenUrl","scopes"]},AuthorizationCode:{properties:{refreshUrl:{type:"string"},authorizationUrl:{type:"string"},scopes:{type:"object",additionalProperties:{type:"string"}},tokenUrl:{type:"string"}},required:["authorizationUrl","tokenUrl","scopes"]},SecuritySchemeFlows:{properties:{implicit:"ImplicitFlow",password:"PasswordFlow",clientCredentials:"ClientCredentials",authorizationCode:"AuthorizationCode"}},SecurityScheme:v,XCodeSample:{properties:{lang:{type:"string"},label:{type:"string"},source:{type:"string"}}},WebhooksMap:{properties:{},additionalProperties:()=>"PathItem"}}},2608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Oas3_1Types=void 0;const n=r(5220),o=r(5241),i={properties:{openapi:null,info:"Info",servers:n.listOf("Server"),security:n.listOf("SecurityRequirement"),tags:n.listOf("Tag"),externalDocs:"ExternalDocs",paths:"PathMap",webhooks:"WebhooksMap",components:"Components",jsonSchemaDialect:{type:"string"}},required:["openapi","info"],requiredOneOf:["paths","components","webhooks"]},a={properties:{tags:{type:"array",items:{type:"string"}},summary:{type:"string"},description:{type:"string"},externalDocs:"ExternalDocs",operationId:{type:"string"},parameters:n.listOf("Parameter"),security:n.listOf("SecurityRequirement"),servers:n.listOf("Server"),requestBody:"RequestBody",responses:"ResponsesMap",deprecated:{type:"boolean"},callbacks:n.mapOf("Callback"),"x-codeSamples":n.listOf("XCodeSample"),"x-code-samples":n.listOf("XCodeSample")}},s={properties:{$id:{type:"string"},id:{type:"string"},$schema:{type:"string"},definitions:"NamedSchemas",$defs:"NamedSchemas",$vocabulary:{type:"string"},externalDocs:"ExternalDocs",discriminator:"Discriminator",myArbitraryKeyword:{type:"boolean"},title:{type:"string"},multipleOf:{type:"number"},maximum:{type:"number"},minimum:{type:"number"},exclusiveMaximum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{type:"number"},minLength:{type:"number"},pattern:{type:"string"},maxItems:{type:"number"},minItems:{type:"number"},uniqueItems:{type:"boolean"},maxProperties:{type:"number"},minProperties:{type:"number"},required:{type:"array",items:{type:"string"}},enum:{type:"array"},type:e=>Array.isArray(e)?{type:"array",items:{enum:["object","array","string","number","integer","boolean","null"]}}:{enum:["object","array","string","number","integer","boolean","null"]},allOf:n.listOf("Schema"),anyOf:n.listOf("Schema"),oneOf:n.listOf("Schema"),not:"Schema",if:"Schema",then:"Schema",else:"Schema",dependentSchemas:n.listOf("Schema"),prefixItems:n.listOf("Schema"),contains:"Schema",patternProperties:{type:"object"},propertyNames:"Schema",unevaluatedItems:"Schema",unevaluatedProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",summary:{type:"string"},properties:"SchemaProperties",items:e=>Array.isArray(e)?n.listOf("Schema"):"boolean"==typeof e?{type:"boolean"}:"Schema",additionalProperties:e=>"boolean"==typeof e?{type:"boolean"}:"Schema",description:{type:"string"},format:{type:"string"},contentEncoding:{type:"string"},contentMediaType:{type:"string"},default:null,readOnly:{type:"boolean"},writeOnly:{type:"boolean"},xml:"Xml",examples:{type:"array"},example:{isExample:!0},deprecated:{type:"boolean"},const:null,$comment:{type:"string"}}},l={properties:{type:{enum:["apiKey","http","oauth2","openIdConnect","mutualTLS"]},description:{type:"string"},name:{type:"string"},in:{type:"string",enum:["query","header","cookie"]},scheme:{type:"string"},bearerFormat:{type:"string"},flows:"SecuritySchemeFlows",openIdConnectUrl:{type:"string"}},required(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in"];case"http":return["type","scheme"];case"oauth2":return["type","flows"];case"openIdConnect":return["type","openIdConnectUrl"];default:return["type"]}},allowed(e){switch(null==e?void 0:e.type){case"apiKey":return["type","name","in","description"];case"http":return["type","scheme","bearerFormat","description"];case"oauth2":switch(null==e?void 0:e.flows){case"implicit":return["type","flows","authorizationUrl","refreshUrl","description","scopes"];case"password":case"clientCredentials":return["type","flows","tokenUrl","refreshUrl","description","scopes"];case"authorizationCode":default:return["type","flows","authorizationUrl","refreshUrl","tokenUrl","description","scopes"]}case"openIdConnect":return["type","openIdConnectUrl","description"];case"mutualTLS":default:return["type","description"]}},extensionsPrefix:"x-"};t.Oas3_1Types=Object.assign(Object.assign({},o.Oas3Types),{Info:{properties:{title:{type:"string"},version:{type:"string"},description:{type:"string"},termsOfService:{type:"string"},summary:{type:"string"},contact:"Contact",license:"License"},required:["title","version"]},DefinitionRoot:i,Schema:s,License:{properties:{name:{type:"string"},url:{type:"string"},identifier:{type:"string"}},required:["name"]},Components:{properties:{parameters:"NamedParameters",schemas:"NamedSchemas",responses:"NamedResponses",examples:"NamedExamples",requestBodies:"NamedRequestBodies",headers:"NamedHeaders",securitySchemes:"NamedSecuritySchemes",links:"NamedLinks",callbacks:"NamedCallbacks",pathItems:"NamedPathItems"}},NamedPathItems:n.mapOf("PathItem"),SecurityScheme:l,Operation:a})},771:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.assignExisting=t.isNotString=t.isString=t.isNotEmptyObject=t.slash=t.isPathParameter=t.readFileAsStringSync=t.isSingular=t.validateMimeTypeOAS3=t.validateMimeType=t.splitCamelCaseIntoWords=t.omitObjectProps=t.pickObjectProps=t.readFileFromUrl=t.isEmptyArray=t.isEmptyObject=t.isPlainObject=t.notUndefined=t.loadYaml=t.popStack=t.pushStack=t.stringifyYaml=t.parseYaml=void 0;const o=r(3197),i=r(4099),a=r(7707),s=r(3450),l=r(5273),c=r(8698);var u=r(5273);function p(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function d(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),i(e,t)}function f(e){return"string"==typeof e}Object.defineProperty(t,"parseYaml",{enumerable:!0,get:function(){return u.parseYaml}}),Object.defineProperty(t,"stringifyYaml",{enumerable:!0,get:function(){return u.stringifyYaml}}),t.pushStack=function(e,t){return{prev:e,value:t}},t.popStack=function(e){var t;return null!==(t=null==e?void 0:e.prev)&&void 0!==t?t:null},t.loadYaml=function(e){return n(this,void 0,void 0,(function*(){const t=yield o.promises.readFile(e,"utf-8");return l.parseYaml(t)}))},t.notUndefined=function(e){return void 0!==e},t.isPlainObject=p,t.isEmptyObject=function(e){return p(e)&&0===Object.keys(e).length},t.isEmptyArray=function(e){return Array.isArray(e)&&0===e.length},t.readFileFromUrl=function(e,t){return n(this,void 0,void 0,(function*(){const r={};for(const n of t.headers)d(e,n.matches)&&(r[n.name]=void 0!==n.envVariable?c.env[n.envVariable]||"":n.value);const n=yield(t.customFetch||a.default)(e,{headers:r});if(!n.ok)throw new Error(`Failed to load ${e}: ${n.status} ${n.statusText}`);return{body:yield n.text(),mimeType:n.headers.get("content-type")}}))},t.pickObjectProps=function(e,t){return Object.fromEntries(t.filter((t=>t in e)).map((t=>[t,e[t]])))},t.omitObjectProps=function(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))},t.splitCamelCaseIntoWords=function(e){const t=e.split(/(?:[-._])|([A-Z][a-z]+)/).filter(Boolean).map((e=>e.toLocaleLowerCase())),r=e.split(/([A-Z]{2,})/).filter((e=>e&&e===e.toUpperCase())).map((e=>e.toLocaleLowerCase()));return new Set([...t,...r])},t.validateMimeType=function({type:e,value:t},{report:r,location:n},o){if(!o)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t[e])for(const i of t[e])o.includes(i)||r({message:`Mime type "${i}" is not allowed`,location:n.child(t[e].indexOf(i)).key()})},t.validateMimeTypeOAS3=function({type:e,value:t},{report:r,location:n},o){if(!o)throw new Error(`Parameter "allowedValues" is not provided for "${"consumes"===e?"request":"response"}-mime-type" rule`);if(t.content)for(const e of Object.keys(t.content))o.includes(e)||r({message:`Mime type "${e}" is not allowed`,location:n.child("content").child(e).key()})},t.isSingular=function(e){return s.isSingular(e)},t.readFileAsStringSync=function(e){return o.readFileSync(e,"utf-8")},t.isPathParameter=function(e){return e.startsWith("{")&&e.endsWith("}")},t.slash=function(e){return/^\\\\\?\\/.test(e)?e:e.replace(/\\/g,"/")},t.isNotEmptyObject=function(e){return!!e&&Object.keys(e).length>0},t.isString=f,t.isNotString=function(e){return!f(e)},t.assignExisting=function(e,t){for(let r of Object.keys(t))e.hasOwnProperty(r)&&(e[r]=t[r])}},8065:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVisitors=void 0,t.normalizeVisitors=function(e,t){const r={any:{enter:[],leave:[]}};for(const e of Object.keys(t))r[e]={enter:[],leave:[]};r.ref={enter:[],leave:[]};for(const{ruleId:t,severity:r,visitor:n}of e)o({ruleId:t,severity:r},n,null);for(const e of Object.keys(r))r[e].enter.sort(((e,t)=>t.depth-e.depth)),r[e].leave.sort(((e,t)=>e.depth-t.depth));return r;function n(e,t,o,i,a=[]){if(a.includes(t))return;a=[...a,t];const s=new Set;for(let r of Object.values(t.properties))r!==o?"object"==typeof r&&null!==r&&r.name&&s.add(r):l(e,a);t.additionalProperties&&"function"!=typeof t.additionalProperties&&(t.additionalProperties===o?l(e,a):void 0!==t.additionalProperties.name&&s.add(t.additionalProperties)),t.items&&(t.items===o?l(e,a):void 0!==t.items.name&&s.add(t.items));for(let t of Array.from(s.values()))n(e,t,o,i,a);function l(e,t){for(const n of t.slice(1))r[n.name]=r[n.name]||{enter:[],leave:[]},r[n.name].enter.push(Object.assign(Object.assign({},e),{visit:()=>{},depth:0,context:{isSkippedLevel:!0,seen:new Set,parent:i}}))}}function o(e,i,a,s=0){const l=Object.keys(t);if(0===s)l.push("any"),l.push("ref");else{if(i.any)throw new Error("any() is allowed only on top level");if(i.ref)throw new Error("ref() is allowed only on top level")}for(const c of l){const l=i[c],u=r[c];if(!l)continue;let p,d,f;const h="object"==typeof l;if("ref"===c&&h&&l.skip)throw new Error("ref() visitor does not support skip");"function"==typeof l?p=l:h&&(p=l.enter,d=l.leave,f=l.skip);const m={activatedOn:null,type:t[c],parent:a,isSkippedLevel:!1};if("object"==typeof l&&o(e,l,m,s+1),a&&n(e,a.type,t[c],a),p||h){if(p&&"function"!=typeof p)throw new Error("DEV: should be function");u.enter.push(Object.assign(Object.assign({},e),{visit:p||(()=>{}),skip:f,depth:s,context:m}))}if(d){if("function"!=typeof d)throw new Error("DEV: should be function");u.leave.push(Object.assign(Object.assign({},e),{visit:d,depth:s,context:m}))}}}}},9443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.walkDocument=void 0;const n=r(7468),o=r(4182),i=r(771),a=r(5220);function s(e){var t,r;const n={};for(;e.parent;)(null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.location)&&(n[e.parent.type.name]=null===(r=e.parent.activatedOn)||void 0===r?void 0:r.value.location),e=e.parent;return n}t.walkDocument=function(e){const{document:t,rootType:r,normalizedVisitors:l,resolvedRefMap:c,ctx:u}=e,p={},d=new Set;!function e(t,r,f,h,m){var g,y,v,b,w,x,k,O,_,S,E;let P=f;const{node:$,location:A,error:C}=T(t),R=new Set;if(n.isRef(t)){const e=l.ref.enter;for(const{visit:n,ruleId:o,severity:i,context:a}of e)if(!d.has(t)){R.add(a);n(t,{report:I.bind(void 0,o,i),resolve:T,location:f,type:r,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:N.bind(void 0,o)},{node:$,location:A,error:C}),(null==A?void 0:A.source.absoluteRef)&&u.refTypes&&u.refTypes.set(null==A?void 0:A.source.absoluteRef,r)}}if(void 0!==$&&A&&"scalar"!==r.name){P=A;const o=null===(y=null===(g=p[r.name])||void 0===g?void 0:g.has)||void 0===y?void 0:y.call(g,$);let s=!1;const c=l.any.enter.concat((null===(v=l[r.name])||void 0===v?void 0:v.enter)||[]),u=[];for(const{context:e,visit:n,skip:a,ruleId:l,severity:p}of c)if(e.isSkippedLevel)!e.parent.activatedOn||e.parent.activatedOn.value.nextLevelTypeActivated||e.seen.has(t)||(e.seen.add(t),s=!0,u.push(e));else if(e.parent&&e.parent.activatedOn&&(null===(b=e.activatedOn)||void 0===b?void 0:b.value.withParentNode)!==e.parent.activatedOn.value.node&&(null===(w=e.parent.activatedOn.value.nextLevelTypeActivated)||void 0===w?void 0:w.value)!==r||!e.parent&&!o){u.push(e);const t={node:$,location:A,nextLevelTypeActivated:null,withParentNode:null===(k=null===(x=e.parent)||void 0===x?void 0:x.activatedOn)||void 0===k?void 0:k.value.node,skipped:null!==(S=(null===(_=null===(O=e.parent)||void 0===O?void 0:O.activatedOn)||void 0===_?void 0:_.value.skipped)||(null==a?void 0:a($,m)))&&void 0!==S&&S};e.activatedOn=i.pushStack(e.activatedOn,t);let o=e.parent;for(;o;)o.activatedOn.value.nextLevelTypeActivated=i.pushStack(o.activatedOn.value.nextLevelTypeActivated,r),o=o.parent;if(!t.skipped){s=!0,R.add(e);const{ignoreNextVisitorsOnNode:t}=j(n,$,e,l,p);if(t)break}}if(s||!o)if(p[r.name]=p[r.name]||new Set,p[r.name].add($),Array.isArray($)){const t=r.items;if(void 0!==t)for(let r=0;r<$.length;r++)e($[r],t,A.child([r]),$,r)}else if("object"==typeof $&&null!==$){const o=Object.keys(r.properties);r.additionalProperties&&o.push(...Object.keys($).filter((e=>!o.includes(e)))),n.isRef(t)&&o.push(...Object.keys(t).filter((e=>"$ref"!==e&&!o.includes(e))));for(const i of o){let o=$[i],s=A;void 0===o&&(o=t[i],s=f);let l=r.properties[i];void 0===l&&(l=r.additionalProperties),"function"==typeof l&&(l=l(o,i)),!a.isNamedType(l)&&(null==l?void 0:l.directResolveAs)&&(l=l.directResolveAs,o={$ref:o}),l&&void 0===l.name&&!1!==l.resolvable&&(l={name:"scalar",properties:{}}),a.isNamedType(l)&&("scalar"!==l.name||n.isRef(o))&&e(o,l,s.child([i]),$,i)}}const d=l.any.leave,h=((null===(E=l[r.name])||void 0===E?void 0:E.leave)||[]).concat(d);for(const e of u.reverse())if(e.isSkippedLevel)e.seen.delete($);else if(e.activatedOn=i.popStack(e.activatedOn),e.parent){let t=e.parent;for(;t;)t.activatedOn.value.nextLevelTypeActivated=i.popStack(t.activatedOn.value.nextLevelTypeActivated),t=t.parent}for(const{context:e,visit:t,ruleId:r,severity:n}of h)!e.isSkippedLevel&&R.has(e)&&j(t,$,e,r,n)}if(P=f,n.isRef(t)){const e=l.ref.leave;for(const{visit:n,ruleId:o,severity:i,context:a}of e)if(R.has(a)){n(t,{report:I.bind(void 0,o,i),resolve:T,location:f,type:r,parent:h,key:m,parentLocations:{},oasVersion:u.oasVersion,getVisitorData:N.bind(void 0,o)},{node:$,location:A,error:C})}}function j(e,t,n,o,i){const a=I.bind(void 0,o,i);let l=!1;return e(t,{report:a,resolve:T,location:P,type:r,parent:h,key:m,parentLocations:s(n),oasVersion:u.oasVersion,ignoreNextVisitorsOnNode:()=>{l=!0},getVisitorData:N.bind(void 0,o)},function(e){var t;const r={};for(;e.parent;)r[e.parent.type.name]=null===(t=e.parent.activatedOn)||void 0===t?void 0:t.value.node,e=e.parent;return r}(n),n),{ignoreNextVisitorsOnNode:l}}function T(e,t=P.source.absoluteRef){if(!n.isRef(e))return{location:f,node:e};const r=o.makeRefId(t,e.$ref),i=c.get(r);if(!i)return{location:void 0,node:void 0};const{resolved:a,node:s,document:l,nodePointer:u,error:p}=i;return{location:a?new n.Location(l.source,u):p instanceof o.YamlParseError?new n.Location(p.source,""):void 0,node:s,error:p}}function I(e,t,r){const n=r.location?Array.isArray(r.location)?r.location:[r.location]:[Object.assign(Object.assign({},P),{reportOnKey:!1})];u.problems.push(Object.assign(Object.assign({ruleId:r.ruleId||e,severity:r.forceSeverity||t},r),{suggest:r.suggest||[],location:n.map((e=>Object.assign(Object.assign(Object.assign({},P),{reportOnKey:!1}),e)))}))}function N(e){return u.visitorsData[e]=u.visitorsData[e]||{},u.visitorsData[e]}}(t.parsed,r,new n.Location(t.source,"#/"),void 0,"")}},5019:(e,t,r)=>{var n=r(5623);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),g(function(e){return e.split("\\\\").join(o).split("\\{").join(i).split("\\}").join(a).split("\\,").join(s).split("\\.").join(l)}(e),!0).map(u)):[]};var o="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(o).join("\\").split(i).join("{").split(a).join("}").split(s).join(",").split(l).join(".")}function p(e){if(!e)return[""];var t=[],r=n("{","}",e);if(!r)return e.split(",");var o=r.pre,i=r.body,a=r.post,s=o.split(",");s[s.length-1]+="{"+i+"}";var l=p(a);return a.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l)),t.push.apply(t,s),t}function d(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function h(e,t){return e<=t}function m(e,t){return e>=t}function g(e,t){var r=[],o=n("{","}",e);if(!o)return[e];var i=o.pre,s=o.post.length?g(o.post,!1):[""];if(/\$$/.test(o.pre))for(var l=0;l=0;if(!x&&!k)return o.post.match(/,.*\}/)?g(e=o.pre+"{"+o.body+a+o.post):[e];if(x)y=o.body.split(/\.\./);else if(1===(y=p(o.body)).length&&1===(y=g(y[0],!1).map(d)).length)return s.map((function(e){return o.pre+y[0]+e}));if(x){var O=c(y[0]),_=c(y[1]),S=Math.max(y[0].length,y[1].length),E=3==y.length?Math.abs(c(y[2])):1,P=h;_0){var j=new Array(R+1).join("0");C=A<0?"-"+j+C.slice(1):j+C}}v.push(C)}}else{v=[];for(var T=0;T{const t="object"==typeof process&&process&&!1;e.exports=t?{sep:"\\"}:{sep:"/"}},4099:(e,t,r)=>{const n=e.exports=(e,t,r={})=>(g(t),!(!r.nocomment&&"#"===t.charAt(0))&&new v(t,r).match(e));e.exports=n;const o=r(5751);n.sep=o.sep;const i=Symbol("globstar **");n.GLOBSTAR=i;const a=r(5019),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},l="[^/]",c="[^/]*?",u=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),p=u("().*{}+?[]^$\\!"),d=u("[.("),f=/\/+/;n.filter=(e,t={})=>(r,o,i)=>n(r,e,t);const h=(e,t={})=>{const r={};return Object.keys(e).forEach((t=>r[t]=e[t])),Object.keys(t).forEach((e=>r[e]=t[e])),r};n.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return n;const t=n,r=(r,n,o)=>t(r,n,h(e,o));return(r.Minimatch=class extends t.Minimatch{constructor(t,r){super(t,h(e,r))}}).defaults=r=>t.defaults(h(e,r)).Minimatch,r.filter=(r,n)=>t.filter(r,h(e,n)),r.defaults=r=>t.defaults(h(e,r)),r.makeRe=(r,n)=>t.makeRe(r,h(e,n)),r.braceExpand=(r,n)=>t.braceExpand(r,h(e,n)),r.match=(r,n,o)=>t.match(r,n,h(e,o)),r},n.braceExpand=(e,t)=>m(e,t);const m=(e,t={})=>(g(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:a(e)),g=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},y=Symbol("subparse");n.makeRe=(e,t)=>new v(e,t||{}).makeRe(),n.match=(e,t,r={})=>{const n=new v(t,r);return e=e.filter((e=>n.match(e))),n.options.nonull&&!e.length&&e.push(t),e};class v{constructor(e,t){g(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let r=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,r),r=this.globParts=r.map((e=>e.split(f))),this.debug(this.pattern,r),r=r.map(((e,t,r)=>e.map(this.parse,this))),this.debug(this.pattern,r),r=r.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,r=0;for(let n=0;n>> no match, partial?",e,d,t,f),d!==s))}if("string"==typeof u?(c=p===u,this.debug("string match",u,p,c)):(c=p.match(u),this.debug("pattern match",u,p,c)),!c)return!1}if(o===s&&a===l)return!0;if(o===s)return r;if(a===l)return o===s-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return m(this.pattern,this.options)}parse(e,t){g(e);const r=this.options;if("**"===e){if(!r.noglobstar)return i;e="*"}if(""===e)return"";let n="",o=!!r.nocase,a=!1;const u=[],f=[];let h,m,v,b,w=!1,x=-1,k=-1;const O="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",_=()=>{if(h){switch(h){case"*":n+=c,o=!0;break;case"?":n+=l,o=!0;break;default:n+="\\"+h}this.debug("clearStateChar %j %j",h,n),h=!1}};for(let t,i=0;i(r||(r="\\"),t+t+r+"|"))),this.debug("tail=%j\n %s",e,e,v,n);const t="*"===v.type?c:"?"===v.type?l:"\\"+v.type;o=!0,n=n.slice(0,v.reStart)+t+"\\("+e}_(),a&&(n+="\\\\");const S=d[n.charAt(0)];for(let e=f.length-1;e>-1;e--){const r=f[e],o=n.slice(0,r.reStart),i=n.slice(r.reStart,r.reEnd-8);let a=n.slice(r.reEnd);const s=n.slice(r.reEnd-8,r.reEnd)+a,l=o.split("(").length-1;let c=a;for(let e=0;e((e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===i?i:e._src)).reduce(((e,t)=>(e[e.length-1]===i&&t===i||e.push(t),e)),[])).forEach(((t,n)=>{t===i&&e[n-1]!==i&&(0===n?e.length>1?e[n+1]="(?:\\/|"+r+"\\/)?"+e[n+1]:e[n]=r:n===e.length-1?e[n-1]+="(?:\\/|"+r+")?":(e[n-1]+="(?:\\/|\\/"+r+"\\/)"+e[n+1],e[n+1]=i))})),e.filter((e=>e!==i)).join("/")))).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,n)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const r=this.options;"/"!==o.sep&&(e=e.split(o.sep).join("/")),e=e.split(f),this.debug(this.pattern,"split",e);const n=this.set;let i;this.debug(this.pattern,"set",n);for(let t=e.length-1;t>=0&&(i=e[t],!i);t--);for(let o=0;o{"use strict";e.exports=JSON.parse('{"i8":"1.0.0-beta.97"}')},5623:e=>{"use strict";function t(e,t,o){e instanceof RegExp&&(e=r(e,o)),t instanceof RegExp&&(t=r(t,o));var i=n(e,t,o);return i&&{start:i[0],end:i[1],pre:o.slice(0,i[0]),body:o.slice(i[0]+e.length,i[1]),post:o.slice(i[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,o,i,a,s,l=r.indexOf(e),c=r.indexOf(t,l+1),u=l;if(l>=0&&c>0){if(e===t)return[l,c];for(n=[],i=r.length;u>=0&&!s;)u==l?(n.push(u),l=r.indexOf(e,u+1)):1==n.length?s=[n.pop(),c]:((o=n.pop())=0?l:c;n.length&&(s=[i,a])}return s}e.exports=t,t.range=n},4480:(e,t,r)=>{"use strict";var n=r.g.process&&process.nextTick||r.g.setImmediate||function(e){setTimeout(e,0)};e.exports=function(e,t){return e?void t.then((function(t){n((function(){e(null,t)}))}),(function(t){n((function(){e(t)}))})):t}},4184:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t{let r=!("NO_COLOR"in{})&&("FORCE_COLOR"in{}||!1);const n=(e,t,n,o)=>i=>r?e+(~(i+="").indexOf(t,4)?i.replace(n,o):i)+t:i,o=(e,t)=>n(`[${e}m`,`[${t}m`,new RegExp(`\\x1b\\[${t}m`,"g"),`[${e}m`);t.options=Object.defineProperty({},"enabled",{get:()=>r,set:e=>r=e}),t.reset=o(0,0),t.bold=n("","",/\x1b\[22m/g,""),t.dim=n("","",/\x1b\[22m/g,""),t.italic=o(3,23),t.underline=o(4,24),t.inverse=o(7,27),t.hidden=o(8,28),t.strikethrough=o(9,29),t.black=o(30,39),t.red=o(31,39),t.green=o(32,39),t.yellow=o(33,39),t.blue=o(34,39),t.magenta=o(35,39),t.cyan=o(36,39),t.white=o(37,39),t.gray=o(90,39),t.bgBlack=o(40,49),t.bgRed=o(41,49),t.bgGreen=o(42,49),t.bgYellow=o(43,49),t.bgBlue=o(44,49),t.bgMagenta=o(45,49),t.bgCyan=o(46,49),t.bgWhite=o(47,49),t.blackBright=o(90,39),t.redBright=o(91,39),t.greenBright=o(92,39),t.yellowBright=o(93,39),t.blueBright=o(94,39),t.magentaBright=o(95,39),t.cyanBright=o(96,39),t.whiteBright=o(97,39),t.bgBlackBright=o(100,49),t.bgRedBright=o(101,49),t.bgGreenBright=o(102,49),t.bgYellowBright=o(103,49),t.bgBlueBright=o(104,49),t.bgMagentaBright=o(105,49),t.bgCyanBright=o(106,49),t.bgWhiteBright=o(107,49)},9266:(e,t,r)=>{r(2222),r(1539),r(2526),r(2443),r(1817),r(2401),r(8722),r(2165),r(9007),r(6066),r(3510),r(1840),r(6982),r(2159),r(6649),r(9341),r(543),r(3706),r(408),r(1299);var n=r(857);e.exports=n.Symbol},3099:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},9670:(e,t,r)=>{var n=r(111);e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},1318:(e,t,r)=>{var n=r(5656),o=r(7466),i=r(1400),a=function(e){return function(t,r,a){var s,l=n(t),c=o(l.length),u=i(a,c);if(e&&r!=r){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:(e,t,r)=>{var n=r(9974),o=r(8361),i=r(7908),a=r(7466),s=r(5417),l=[].push,c=function(e){var t=1==e,r=2==e,c=3==e,u=4==e,p=6==e,d=7==e,f=5==e||p;return function(h,m,g,y){for(var v,b,w=i(h),x=o(w),k=n(m,g,3),O=a(x.length),_=0,S=y||s,E=t?S(h,O):r||d?S(h,0):void 0;O>_;_++)if((f||_ in x)&&(b=k(v=x[_],_,w),e))if(t)E[_]=b;else if(b)switch(e){case 3:return!0;case 5:return v;case 6:return _;case 2:l.call(E,v)}else switch(e){case 4:return!1;case 7:l.call(E,v)}return p?-1:c||u?u:E}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},1194:(e,t,r)=>{var n=r(7293),o=r(5112),i=r(7392),a=o("species");e.exports=function(e){return i>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},5417:(e,t,r)=>{var n=r(111),o=r(3157),i=r(5112)("species");e.exports=function(e,t){var r;return o(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!o(r.prototype)?n(r)&&null===(r=r[i])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)}},4326:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:(e,t,r)=>{var n=r(1694),o=r(4326),i=r(5112)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=n?o:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:a?o(t):"Object"==(n=o(t))&&"function"==typeof t.callee?"Arguments":n}},9920:(e,t,r)=>{var n=r(6656),o=r(3887),i=r(1236),a=r(3070);e.exports=function(e,t){for(var r=o(t),s=a.f,l=i.f,c=0;c{var n=r(9781),o=r(3070),i=r(9114);e.exports=n?function(e,t,r){return o.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},9114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:(e,t,r)=>{"use strict";var n=r(7593),o=r(3070),i=r(9114);e.exports=function(e,t,r){var a=n(t);a in e?o.f(e,a,i(0,r)):e[a]=r}},7235:(e,t,r)=>{var n=r(857),o=r(6656),i=r(6061),a=r(3070).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},9781:(e,t,r)=>{var n=r(7293);e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(e,t,r)=>{var n=r(7854),o=r(111),i=n.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},8113:(e,t,r)=>{var n=r(5005);e.exports=n("navigator","userAgent")||""},7392:(e,t,r)=>{var n,o,i=r(7854),a=r(8113),s=i.process,l=s&&s.versions,c=l&&l.v8;c?o=(n=c.split("."))[0]<4?1:n[0]+n[1]:a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=n[1]),e.exports=o&&+o},748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(e,t,r)=>{var n=r(7854),o=r(1236).f,i=r(8880),a=r(1320),s=r(3505),l=r(9920),c=r(4705);e.exports=function(e,t){var r,u,p,d,f,h=e.target,m=e.global,g=e.stat;if(r=m?n:g?n[h]||s(h,{}):(n[h]||{}).prototype)for(u in t){if(d=t[u],p=e.noTargetGet?(f=o(r,u))&&f.value:r[u],!c(m?u:h+(g?".":"#")+u,e.forced)&&void 0!==p){if(typeof d==typeof p)continue;l(d,p)}(e.sham||p&&p.sham)&&i(d,"sham",!0),a(r,u,d,e)}}},7293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},9974:(e,t,r)=>{var n=r(3099);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},5005:(e,t,r)=>{var n=r(857),o=r(7854),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e])||i(o[e]):n[e]&&n[e][t]||o[e]&&o[e][t]}},7854:(e,t,r)=>{var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},6656:(e,t,r)=>{var n=r(7908),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(n(e),t)}},3501:e=>{e.exports={}},490:(e,t,r)=>{var n=r(5005);e.exports=n("document","documentElement")},4664:(e,t,r)=>{var n=r(9781),o=r(7293),i=r(317);e.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(e,t,r)=>{var n=r(7293),o=r(4326),i="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},2788:(e,t,r)=>{var n=r(5465),o=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return o.call(e)}),e.exports=n.inspectSource},9909:(e,t,r)=>{var n,o,i,a=r(8536),s=r(7854),l=r(111),c=r(8880),u=r(6656),p=r(5465),d=r(6200),f=r(3501),h="Object already initialized",m=s.WeakMap;if(a||p.state){var g=p.state||(p.state=new m),y=g.get,v=g.has,b=g.set;n=function(e,t){if(v.call(g,e))throw new TypeError(h);return t.facade=e,b.call(g,e,t),t},o=function(e){return y.call(g,e)||{}},i=function(e){return v.call(g,e)}}else{var w=d("state");f[w]=!0,n=function(e,t){if(u(e,w))throw new TypeError(h);return t.facade=e,c(e,w,t),t},o=function(e){return u(e,w)?e[w]:{}},i=function(e){return u(e,w)}}e.exports={set:n,get:o,has:i,enforce:function(e){return i(e)?o(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}}},3157:(e,t,r)=>{var n=r(4326);e.exports=Array.isArray||function(e){return"Array"==n(e)}},4705:(e,t,r)=>{var n=r(7293),o=/#|\.prototype\./,i=function(e,t){var r=s[a(e)];return r==c||r!=l&&("function"==typeof t?n(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=i.data={},l=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},111:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:e=>{e.exports=!1},133:(e,t,r)=>{var n=r(7392),o=r(7293);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8536:(e,t,r)=>{var n=r(7854),o=r(2788),i=n.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},30:(e,t,r)=>{var n,o=r(9670),i=r(6048),a=r(748),s=r(3501),l=r(490),c=r(317),u=r(6200)("IE_PROTO"),p=function(){},d=function(e){return"