@skaldapp/runtime 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -1,12 +1,14 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head> <script type="importmap">{"imports":{"vue":"./assets/vue.esm-browser.prod-3.5.27.js","vue-router":"./assets/vue-router.esm-browser.prod-4.6.4.js","@skaldapp/loader-sfc":"./assets/loader-sfc.esm-browser.prod-2.4.13.js"}}</script>
4
- <script type="module" crossorigin src="./assets/index-B3ae_0Hk.js"></script>
5
- <link rel="modulepreload" crossorigin href="./assets/katex-UTpUfKgT.js">
6
- <link rel="modulepreload" crossorigin href="./assets/markdown-Da270S7l.js">
7
- <link rel="modulepreload" crossorigin href="./assets/ajv-DNdj0JsY.js">
8
- <link rel="modulepreload" crossorigin href="./assets/unocss-BUOYBbde.js">
9
- <link rel="stylesheet" crossorigin href="./assets/index-Dj5fPfJC.css">
4
+ <script type="module" crossorigin src="./assets/index-CWbWSw7p.js"></script>
5
+ <link rel="modulepreload" crossorigin href="./assets/ajv-EW6k27gv.js">
6
+ <link rel="modulepreload" crossorigin href="./assets/highlightjs-CHQLGffK.js">
7
+ <link rel="modulepreload" crossorigin href="./assets/markdown-iRWnE1KL.js">
8
+ <link rel="modulepreload" crossorigin href="./assets/mdit-CCNhQMns.js">
9
+ <link rel="modulepreload" crossorigin href="./assets/unocss-Djq20TtY.js">
10
+ <link rel="stylesheet" crossorigin href="./assets/highlightjs-5H1Zuzjk.css">
11
+ <link rel="stylesheet" crossorigin href="./assets/index-D7DlMhRI.css">
10
12
  <link as="fetch" crossorigin href="./docs/index.json" rel="preload">
11
13
 
12
14
  <link crossorigin href="./assets/vue.esm-browser.prod-3.5.27.js" rel="modulepreload">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package",
3
3
  "name": "@skaldapp/runtime",
4
- "version": "3.0.6",
4
+ "version": "3.0.7",
5
5
  "description": "Vue.js-based runtime for skald applications with dynamic loading, SEO optimization, and intersection observer tracking.",
6
6
  "keywords": [
7
7
  "vue",
@@ -70,6 +70,7 @@
70
70
  "magic-string": "^0.30.21",
71
71
  "markdown-it": "^14.1.0",
72
72
  "markdown-it-emoji": "^3.0.0",
73
+ "markdown-it-mdc": "^0.2.6",
73
74
  "twemoji": "^14.0.2",
74
75
  "unhead": "^2.1.2",
75
76
  "vue": "^3.5.27",
@@ -83,6 +84,7 @@
83
84
  "@types/node": "^25.0.9",
84
85
  "buffer": "^6.0.3",
85
86
  "eslint": "^9.39.2",
87
+ "terser": "^5.46.0",
86
88
  "unocss": "^66.6.0",
87
89
  "vite": "^7.3.1",
88
90
  "vite-plugin-static-copy": "^3.1.5"
@@ -1,8 +0,0 @@
1
- import"./markdown-Da270S7l.js";var ke={exports:{}},Et={},he={},ge={},St={},Pt={},Nt={},Vt;function mt(){return Vt||(Vt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class n{}e._CodeOrName=n,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class S extends n{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=S;class d extends n{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((o,p)=>`${o}${p}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((o,p)=>(p instanceof S&&(o[p.str]=(o[p.str]||0)+1),o),{})}}e._Code=d,e.nil=new d("");function b(i,...t){const o=[i[0]];let p=0;for(;p<t.length;)c(o,t[p]),o.push(i[++p]);return new d(o)}e._=b;const a=new d("+");function h(i,...t){const o=[_(i[0])];let p=0;for(;p<t.length;)o.push(a),c(o,t[p]),o.push(a,_(i[++p]));return m(o),new d(o)}e.str=h;function c(i,t){t instanceof d?i.push(...t._items):t instanceof S?i.push(t):i.push(P(t))}e.addCodeArg=c;function m(i){let t=1;for(;t<i.length-1;){if(i[t]===a){const o=$(i[t-1],i[t+1]);if(o!==void 0){i.splice(t-1,3,o);continue}i[t++]="+"}t++}}function $(i,t){if(t==='""')return i;if(i==='""')return t;if(typeof i=="string")return t instanceof S||i[i.length-1]!=='"'?void 0:typeof t!="string"?`${i.slice(0,-1)}${t}"`:t[0]==='"'?i.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(i instanceof S))return`"${i}${t.slice(1)}`}function f(i,t){return t.emptyStr()?i:i.emptyStr()?t:h`${i}${t}`}e.strConcat=f;function P(i){return typeof i=="number"||typeof i=="boolean"||i===null?i:_(Array.isArray(i)?i.join(","):i)}function y(i){return new d(_(i))}e.stringify=y;function _(i){return JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function v(i){return typeof i=="string"&&e.IDENTIFIER.test(i)?new d(`.${i}`):b`[${i}]`}e.getProperty=v;function g(i){if(typeof i=="string"&&e.IDENTIFIER.test(i))return new d(`${i}`);throw new Error(`CodeGen: invalid export name: ${i}, use explicit $id name mapping`)}e.getEsmExportName=g;function s(i){return new d(i.toString())}e.regexpCode=s})(Nt)),Nt}var Rt={},Ut;function zt(){return Ut||(Ut=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const n=mt();class S extends Error{constructor($){super(`CodeGen: "code" for ${$} not defined`),this.value=$.value}}var d;(function(m){m[m.Started=0]="Started",m[m.Completed=1]="Completed"})(d||(e.UsedValueState=d={})),e.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class b{constructor({prefixes:$,parent:f}={}){this._names={},this._prefixes=$,this._parent=f}toName($){return $ instanceof n.Name?$:this.name($)}name($){return new n.Name(this._newName($))}_newName($){const f=this._names[$]||this._nameGroup($);return`${$}${f.index++}`}_nameGroup($){var f,P;if(!((P=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||P===void 0)&&P.has($)||this._prefixes&&!this._prefixes.has($))throw new Error(`CodeGen: prefix "${$}" is not allowed in this scope`);return this._names[$]={prefix:$,index:0}}}e.Scope=b;class a extends n.Name{constructor($,f){super(f),this.prefix=$}setValue($,{property:f,itemIndex:P}){this.value=$,this.scopePath=(0,n._)`.${new n.Name(f)}[${P}]`}}e.ValueScopeName=a;const h=(0,n._)`\n`;class c extends b{constructor($){super($),this._values={},this._scope=$.scope,this.opts={...$,_n:$.lines?h:n.nil}}get(){return this._scope}name($){return new a($,this._newName($))}value($,f){var P;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName($),{prefix:_}=y,v=(P=f.key)!==null&&P!==void 0?P:f.ref;let g=this._values[_];if(g){const t=g.get(v);if(t)return t}else g=this._values[_]=new Map;g.set(v,y);const s=this._scope[_]||(this._scope[_]=[]),i=s.length;return s[i]=f.ref,y.setValue(f,{property:_,itemIndex:i}),y}getValue($,f){const P=this._values[$];if(P)return P.get(f)}scopeRefs($,f=this._values){return this._reduceValues(f,P=>{if(P.scopePath===void 0)throw new Error(`CodeGen: name "${P}" has no value`);return(0,n._)`${$}${P.scopePath}`})}scopeCode($=this._values,f,P){return this._reduceValues($,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},f,P)}_reduceValues($,f,P={},y){let _=n.nil;for(const v in $){const g=$[v];if(!g)continue;const s=P[v]=P[v]||new Map;g.forEach(i=>{if(s.has(i))return;s.set(i,d.Started);let t=f(i);if(t){const o=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,n._)`${_}${o} ${i} = ${t};${this.opts._n}`}else if(t=y?.(i))_=(0,n._)`${_}${t}${this.opts._n}`;else throw new S(i);s.set(i,d.Completed)})}return _}}e.ValueScope=c})(Rt)),Rt}var Ft;function J(){return Ft||(Ft=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const n=mt(),S=zt();var d=mt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return d.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return d.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return d.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}});var b=zt();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return b.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return b.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return b.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return b.varKinds}}),e.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 a{optimizeNodes(){return this}optimizeNames(u,E){return this}}class h extends a{constructor(u,E,I){super(),this.varKind=u,this.name=E,this.rhs=I}render({es5:u,_n:E}){const I=u?S.varKinds.var:this.varKind,U=this.rhs===void 0?"":` = ${this.rhs}`;return`${I} ${this.name}${U};`+E}optimizeNames(u,E){if(u[this.name.str])return this.rhs&&(this.rhs=B(this.rhs,u,E)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(u,E,I){super(),this.lhs=u,this.rhs=E,this.sideEffects=I}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,E){if(!(this.lhs instanceof n.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=B(this.rhs,u,E),this}get names(){const u=this.lhs instanceof n.Name?{}:{...this.lhs.names};return K(u,this.rhs)}}class m extends c{constructor(u,E,I,U){super(u,I,U),this.op=E}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}}class $ extends a{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}}class f extends a{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}}class P extends a{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}}class y extends a{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,E){return this.code=B(this.code,u,E),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class _ extends a{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((E,I)=>E+I.render(u),"")}optimizeNodes(){const{nodes:u}=this;let E=u.length;for(;E--;){const I=u[E].optimizeNodes();Array.isArray(I)?u.splice(E,1,...I):I?u[E]=I:u.splice(E,1)}return u.length>0?this:void 0}optimizeNames(u,E){const{nodes:I}=this;let U=I.length;for(;U--;){const F=I[U];F.optimizeNames(u,E)||(x(u,F.names),I.splice(U,1))}return I.length>0?this:void 0}get names(){return this.nodes.reduce((u,E)=>L(u,E.names),{})}}class v extends _{render(u){return"{"+u._n+super.render(u)+"}"+u._n}}class g extends _{}class s extends v{}s.kind="else";class i extends v{constructor(u,E){super(E),this.condition=u}render(u){let E=`if(${this.condition})`+super.render(u);return this.else&&(E+="else "+this.else.render(u)),E}optimizeNodes(){super.optimizeNodes();const u=this.condition;if(u===!0)return this.nodes;let E=this.else;if(E){const I=E.optimizeNodes();E=this.else=Array.isArray(I)?new s(I):I}if(E)return u===!1?E instanceof i?E:E.nodes:this.nodes.length?this:new i(de(u),E instanceof i?[E]:E.nodes);if(!(u===!1||!this.nodes.length))return this}optimizeNames(u,E){var I;if(this.else=(I=this.else)===null||I===void 0?void 0:I.optimizeNames(u,E),!!(super.optimizeNames(u,E)||this.else))return this.condition=B(this.condition,u,E),this}get names(){const u=super.names;return K(u,this.condition),this.else&&L(u,this.else.names),u}}i.kind="if";class t extends v{}t.kind="for";class o extends t{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,E){if(super.optimizeNames(u,E))return this.iteration=B(this.iteration,u,E),this}get names(){return L(super.names,this.iteration.names)}}class p extends t{constructor(u,E,I,U){super(),this.varKind=u,this.name=E,this.from=I,this.to=U}render(u){const E=u.es5?S.varKinds.var:this.varKind,{name:I,from:U,to:F}=this;return`for(${E} ${I}=${U}; ${I}<${F}; ${I}++)`+super.render(u)}get names(){const u=K(super.names,this.from);return K(u,this.to)}}class r extends t{constructor(u,E,I,U){super(),this.loop=u,this.varKind=E,this.name=I,this.iterable=U}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,E){if(super.optimizeNames(u,E))return this.iterable=B(this.iterable,u,E),this}get names(){return L(super.names,this.iterable.names)}}class l extends v{constructor(u,E,I){super(),this.name=u,this.args=E,this.async=I}render(u){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(u)}}l.kind="func";class w extends _{render(u){return"return "+super.render(u)}}w.kind="return";class j extends v{render(u){let E="try"+super.render(u);return this.catch&&(E+=this.catch.render(u)),this.finally&&(E+=this.finally.render(u)),E}optimizeNodes(){var u,E;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(E=this.finally)===null||E===void 0||E.optimizeNodes(),this}optimizeNames(u,E){var I,U;return super.optimizeNames(u,E),(I=this.catch)===null||I===void 0||I.optimizeNames(u,E),(U=this.finally)===null||U===void 0||U.optimizeNames(u,E),this}get names(){const u=super.names;return this.catch&&L(u,this.catch.names),this.finally&&L(u,this.finally.names),u}}class C extends v{constructor(u){super(),this.error=u}render(u){return`catch(${this.error})`+super.render(u)}}C.kind="catch";class A extends v{render(u){return"finally"+super.render(u)}}A.kind="finally";class V{constructor(u,E={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...E,_n:E.lines?`
2
- `:""},this._extScope=u,this._scope=new S.Scope({parent:u}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,E){const I=this._extScope.value(u,E);return(this._values[I.prefix]||(this._values[I.prefix]=new Set)).add(I),I}getScopeValue(u,E){return this._extScope.getValue(u,E)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,E,I,U){const F=this._scope.toName(E);return I!==void 0&&U&&(this._constants[F.str]=I),this._leafNode(new h(u,F,I)),F}const(u,E,I){return this._def(S.varKinds.const,u,E,I)}let(u,E,I){return this._def(S.varKinds.let,u,E,I)}var(u,E,I){return this._def(S.varKinds.var,u,E,I)}assign(u,E,I){return this._leafNode(new c(u,E,I))}add(u,E){return this._leafNode(new m(u,e.operators.ADD,E))}code(u){return typeof u=="function"?u():u!==n.nil&&this._leafNode(new y(u)),this}object(...u){const E=["{"];for(const[I,U]of u)E.length>1&&E.push(","),E.push(I),(I!==U||this.opts.es5)&&(E.push(":"),(0,n.addCodeArg)(E,U));return E.push("}"),new n._Code(E)}if(u,E,I){if(this._blockNode(new i(u)),E&&I)this.code(E).else().code(I).endIf();else if(E)this.code(E).endIf();else if(I)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new i(u))}else(){return this._elseNode(new s)}endIf(){return this._endBlockNode(i,s)}_for(u,E){return this._blockNode(u),E&&this.code(E).endFor(),this}for(u,E){return this._for(new o(u),E)}forRange(u,E,I,U,F=this.opts.es5?S.varKinds.var:S.varKinds.let){const X=this._scope.toName(u);return this._for(new p(F,X,E,I),()=>U(X))}forOf(u,E,I,U=S.varKinds.const){const F=this._scope.toName(u);if(this.opts.es5){const X=E instanceof n.Name?E:this.var("_arr",E);return this.forRange("_i",0,(0,n._)`${X}.length`,W=>{this.var(F,(0,n._)`${X}[${W}]`),I(F)})}return this._for(new r("of",U,F,E),()=>I(F))}forIn(u,E,I,U=this.opts.es5?S.varKinds.var:S.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,n._)`Object.keys(${E})`,I);const F=this._scope.toName(u);return this._for(new r("in",U,F,E),()=>I(F))}endFor(){return this._endBlockNode(t)}label(u){return this._leafNode(new $(u))}break(u){return this._leafNode(new f(u))}return(u){const E=new w;if(this._blockNode(E),this.code(u),E.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(w)}try(u,E,I){if(!E&&!I)throw new Error('CodeGen: "try" without "catch" and "finally"');const U=new j;if(this._blockNode(U),this.code(u),E){const F=this.name("e");this._currNode=U.catch=new C(F),E(F)}return I&&(this._currNode=U.finally=new A,this.code(I)),this._endBlockNode(C,A)}throw(u){return this._leafNode(new P(u))}block(u,E){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(E),this}endBlock(u){const E=this._blockStarts.pop();if(E===void 0)throw new Error("CodeGen: not in self-balancing block");const I=this._nodes.length-E;if(I<0||u!==void 0&&I!==u)throw new Error(`CodeGen: wrong number of nodes: ${I} vs ${u} expected`);return this._nodes.length=E,this}func(u,E=n.nil,I,U){return this._blockNode(new l(u,E,I)),U&&this.code(U).endFunc(),this}endFunc(){return this._endBlockNode(l)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,E){const I=this._currNode;if(I instanceof u||E&&I instanceof E)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${E?`${u.kind}/${E.kind}`:u.kind}"`)}_elseNode(u){const E=this._currNode;if(!(E instanceof i))throw new Error('CodeGen: "else" without "if"');return this._currNode=E.else=u,this}get _root(){return this._nodes[0]}get _currNode(){const u=this._nodes;return u[u.length-1]}set _currNode(u){const E=this._nodes;E[E.length-1]=u}}e.CodeGen=V;function L(k,u){for(const E in u)k[E]=(k[E]||0)+(u[E]||0);return k}function K(k,u){return u instanceof n._CodeOrName?L(k,u.names):k}function B(k,u,E){if(k instanceof n.Name)return I(k);if(!U(k))return k;return new n._Code(k._items.reduce((F,X)=>(X instanceof n.Name&&(X=I(X)),X instanceof n._Code?F.push(...X._items):F.push(X),F),[]));function I(F){const X=E[F.str];return X===void 0||u[F.str]!==1?F:(delete u[F.str],X)}function U(F){return F instanceof n._Code&&F._items.some(X=>X instanceof n.Name&&u[X.str]===1&&E[X.str]!==void 0)}}function x(k,u){for(const E in u)k[E]=(k[E]||0)-(u[E]||0)}function de(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,n._)`!${T(k)}`}e.not=de;const fe=R(e.operators.AND);function Z(...k){return k.reduce(fe)}e.and=Z;const ye=R(e.operators.OR);function D(...k){return k.reduce(ye)}e.or=D;function R(k){return(u,E)=>u===n.nil?E:E===n.nil?u:(0,n._)`${T(u)} ${k} ${T(E)}`}function T(k){return k instanceof n.Name?k:(0,n._)`(${k})`}})(Pt)),Pt}var H={},Kt;function Q(){if(Kt)return H;Kt=1,Object.defineProperty(H,"__esModule",{value:!0}),H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;const e=J(),n=mt();function S(r){const l={};for(const w of r)l[w]=!0;return l}H.toHash=S;function d(r,l){return typeof l=="boolean"?l:Object.keys(l).length===0?!0:(b(r,l),!a(l,r.self.RULES.all))}H.alwaysValidSchema=d;function b(r,l=r.schema){const{opts:w,self:j}=r;if(!w.strictSchema||typeof l=="boolean")return;const C=j.RULES.keywords;for(const A in l)C[A]||p(r,`unknown keyword: "${A}"`)}H.checkUnknownRules=b;function a(r,l){if(typeof r=="boolean")return!r;for(const w in r)if(l[w])return!0;return!1}H.schemaHasRules=a;function h(r,l){if(typeof r=="boolean")return!r;for(const w in r)if(w!=="$ref"&&l.all[w])return!0;return!1}H.schemaHasRulesButRef=h;function c({topSchemaRef:r,schemaPath:l},w,j,C){if(!C){if(typeof w=="number"||typeof w=="boolean")return w;if(typeof w=="string")return(0,e._)`${w}`}return(0,e._)`${r}${l}${(0,e.getProperty)(j)}`}H.schemaRefOrVal=c;function m(r){return P(decodeURIComponent(r))}H.unescapeFragment=m;function $(r){return encodeURIComponent(f(r))}H.escapeFragment=$;function f(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=f;function P(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=P;function y(r,l){if(Array.isArray(r))for(const w of r)l(w);else l(r)}H.eachItem=y;function _({mergeNames:r,mergeToName:l,mergeValues:w,resultToName:j}){return(C,A,V,L)=>{const K=V===void 0?A:V instanceof e.Name?(A instanceof e.Name?r(C,A,V):l(C,A,V),V):A instanceof e.Name?(l(C,V,A),A):w(A,V);return L===e.Name&&!(K instanceof e.Name)?j(C,K):K}}H.mergeEvaluated={props:_({mergeNames:(r,l,w)=>r.if((0,e._)`${w} !== true && ${l} !== undefined`,()=>{r.if((0,e._)`${l} === true`,()=>r.assign(w,!0),()=>r.assign(w,(0,e._)`${w} || {}`).code((0,e._)`Object.assign(${w}, ${l})`))}),mergeToName:(r,l,w)=>r.if((0,e._)`${w} !== true`,()=>{l===!0?r.assign(w,!0):(r.assign(w,(0,e._)`${w} || {}`),g(r,w,l))}),mergeValues:(r,l)=>r===!0?!0:{...r,...l},resultToName:v}),items:_({mergeNames:(r,l,w)=>r.if((0,e._)`${w} !== true && ${l} !== undefined`,()=>r.assign(w,(0,e._)`${l} === true ? true : ${w} > ${l} ? ${w} : ${l}`)),mergeToName:(r,l,w)=>r.if((0,e._)`${w} !== true`,()=>r.assign(w,l===!0?!0:(0,e._)`${w} > ${l} ? ${w} : ${l}`)),mergeValues:(r,l)=>r===!0?!0:Math.max(r,l),resultToName:(r,l)=>r.var("items",l)})};function v(r,l){if(l===!0)return r.var("props",!0);const w=r.var("props",(0,e._)`{}`);return l!==void 0&&g(r,w,l),w}H.evaluatedPropsToName=v;function g(r,l,w){Object.keys(w).forEach(j=>r.assign((0,e._)`${l}${(0,e.getProperty)(j)}`,!0))}H.setEvaluated=g;const s={};function i(r,l){return r.scopeValue("func",{ref:l,code:s[l.code]||(s[l.code]=new n._Code(l.code))})}H.useFunc=i;var t;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(t||(H.Type=t={}));function o(r,l,w){if(r instanceof e.Name){const j=l===t.Num;return w?j?(0,e._)`"[" + ${r} + "]"`:(0,e._)`"['" + ${r} + "']"`:j?(0,e._)`"/" + ${r}`:(0,e._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return w?(0,e.getProperty)(r).toString():"/"+f(r)}H.getErrorPath=o;function p(r,l,w=r.opts.strictSchema){if(w){if(l=`strict mode: ${l}`,w===!0)throw new Error(l);r.self.logger.warn(l)}}return H.checkStrictMode=p,H}var je={},Lt;function _e(){if(Lt)return je;Lt=1,Object.defineProperty(je,"__esModule",{value:!0});const e=J(),n={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return je.default=n,je}var Ht;function yt(){return Ht||(Ht=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const n=J(),S=Q(),d=_e();e.keywordError={message:({keyword:s})=>(0,n.str)`must pass "${s}" keyword validation`},e.keyword$DataError={message:({keyword:s,schemaType:i})=>i?(0,n.str)`"${s}" keyword must be ${i} ($data)`:(0,n.str)`"${s}" keyword is invalid ($data)`};function b(s,i=e.keywordError,t,o){const{it:p}=s,{gen:r,compositeRule:l,allErrors:w}=p,j=P(s,i,t);o??(l||w)?m(r,j):$(p,(0,n._)`[${j}]`)}e.reportError=b;function a(s,i=e.keywordError,t){const{it:o}=s,{gen:p,compositeRule:r,allErrors:l}=o,w=P(s,i,t);m(p,w),r||l||$(o,d.default.vErrors)}e.reportExtraError=a;function h(s,i){s.assign(d.default.errors,i),s.if((0,n._)`${d.default.vErrors} !== null`,()=>s.if(i,()=>s.assign((0,n._)`${d.default.vErrors}.length`,i),()=>s.assign(d.default.vErrors,null)))}e.resetErrorsCount=h;function c({gen:s,keyword:i,schemaValue:t,data:o,errsCount:p,it:r}){if(p===void 0)throw new Error("ajv implementation error");const l=s.name("err");s.forRange("i",p,d.default.errors,w=>{s.const(l,(0,n._)`${d.default.vErrors}[${w}]`),s.if((0,n._)`${l}.instancePath === undefined`,()=>s.assign((0,n._)`${l}.instancePath`,(0,n.strConcat)(d.default.instancePath,r.errorPath))),s.assign((0,n._)`${l}.schemaPath`,(0,n.str)`${r.errSchemaPath}/${i}`),r.opts.verbose&&(s.assign((0,n._)`${l}.schema`,t),s.assign((0,n._)`${l}.data`,o))})}e.extendErrors=c;function m(s,i){const t=s.const("err",i);s.if((0,n._)`${d.default.vErrors} === null`,()=>s.assign(d.default.vErrors,(0,n._)`[${t}]`),(0,n._)`${d.default.vErrors}.push(${t})`),s.code((0,n._)`${d.default.errors}++`)}function $(s,i){const{gen:t,validateName:o,schemaEnv:p}=s;p.$async?t.throw((0,n._)`new ${s.ValidationError}(${i})`):(t.assign((0,n._)`${o}.errors`,i),t.return(!1))}const f={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 P(s,i,t){const{createErrors:o}=s.it;return o===!1?(0,n._)`{}`:y(s,i,t)}function y(s,i,t={}){const{gen:o,it:p}=s,r=[_(p,t),v(s,t)];return g(s,i,r),o.object(...r)}function _({errorPath:s},{instancePath:i}){const t=i?(0,n.str)`${s}${(0,S.getErrorPath)(i,S.Type.Str)}`:s;return[d.default.instancePath,(0,n.strConcat)(d.default.instancePath,t)]}function v({keyword:s,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:o}){let p=o?i:(0,n.str)`${i}/${s}`;return t&&(p=(0,n.str)`${p}${(0,S.getErrorPath)(t,S.Type.Str)}`),[f.schemaPath,p]}function g(s,{params:i,message:t},o){const{keyword:p,data:r,schemaValue:l,it:w}=s,{opts:j,propertyName:C,topSchemaRef:A,schemaPath:V}=w;o.push([f.keyword,p],[f.params,typeof i=="function"?i(s):i||(0,n._)`{}`]),j.messages&&o.push([f.message,typeof t=="function"?t(s):t]),j.verbose&&o.push([f.schema,l],[f.parentSchema,(0,n._)`${A}${V}`],[d.default.data,r]),C&&o.push([f.propertyName,C])}})(St)),St}var Gt;function on(){if(Gt)return ge;Gt=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.boolOrEmptySchema=ge.topBoolOrEmptySchema=void 0;const e=yt(),n=J(),S=_e(),d={message:"boolean schema is false"};function b(c){const{gen:m,schema:$,validateName:f}=c;$===!1?h(c,!1):typeof $=="object"&&$.$async===!0?m.return(S.default.data):(m.assign((0,n._)`${f}.errors`,null),m.return(!0))}ge.topBoolOrEmptySchema=b;function a(c,m){const{gen:$,schema:f}=c;f===!1?($.var(m,!1),h(c)):$.var(m,!0)}ge.boolOrEmptySchema=a;function h(c,m){const{gen:$,data:f}=c,P={gen:$,keyword:"false schema",data:f,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(P,d,void 0,m)}return ge}var re={},$e={},Jt;function Zr(){if(Jt)return $e;Jt=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.getRules=$e.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],n=new Set(e);function S(b){return typeof b=="string"&&n.has(b)}$e.isJSONType=S;function d(){const b={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...b,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},b.number,b.string,b.array,b.object],post:{rules:[]},all:{},keywords:{}}}return $e.getRules=d,$e}var me={},Wt;function xr(){if(Wt)return me;Wt=1,Object.defineProperty(me,"__esModule",{value:!0}),me.shouldUseRule=me.shouldUseGroup=me.schemaHasRulesForType=void 0;function e({schema:d,self:b},a){const h=b.RULES.types[a];return h&&h!==!0&&n(d,h)}me.schemaHasRulesForType=e;function n(d,b){return b.rules.some(a=>S(d,a))}me.shouldUseGroup=n;function S(d,b){var a;return d[b.keyword]!==void 0||((a=b.definition.implements)===null||a===void 0?void 0:a.some(h=>d[h]!==void 0))}return me.shouldUseRule=S,me}var Bt;function pt(){if(Bt)return re;Bt=1,Object.defineProperty(re,"__esModule",{value:!0}),re.reportTypeError=re.checkDataTypes=re.checkDataType=re.coerceAndCheckDataType=re.getJSONTypes=re.getSchemaTypes=re.DataType=void 0;const e=Zr(),n=xr(),S=yt(),d=J(),b=Q();var a;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(a||(re.DataType=a={}));function h(t){const o=c(t.type);if(o.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!o.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&o.push("null")}return o}re.getSchemaTypes=h;function c(t){const o=Array.isArray(t)?t:t?[t]:[];if(o.every(e.isJSONType))return o;throw new Error("type must be JSONType or JSONType[]: "+o.join(","))}re.getJSONTypes=c;function m(t,o){const{gen:p,data:r,opts:l}=t,w=f(o,l.coerceTypes),j=o.length>0&&!(w.length===0&&o.length===1&&(0,n.schemaHasRulesForType)(t,o[0]));if(j){const C=v(o,r,l.strictNumbers,a.Wrong);p.if(C,()=>{w.length?P(t,o,w):s(t)})}return j}re.coerceAndCheckDataType=m;const $=new Set(["string","number","integer","boolean","null"]);function f(t,o){return o?t.filter(p=>$.has(p)||o==="array"&&p==="array"):[]}function P(t,o,p){const{gen:r,data:l,opts:w}=t,j=r.let("dataType",(0,d._)`typeof ${l}`),C=r.let("coerced",(0,d._)`undefined`);w.coerceTypes==="array"&&r.if((0,d._)`${j} == 'object' && Array.isArray(${l}) && ${l}.length == 1`,()=>r.assign(l,(0,d._)`${l}[0]`).assign(j,(0,d._)`typeof ${l}`).if(v(o,l,w.strictNumbers),()=>r.assign(C,l))),r.if((0,d._)`${C} !== undefined`);for(const V of p)($.has(V)||V==="array"&&w.coerceTypes==="array")&&A(V);r.else(),s(t),r.endIf(),r.if((0,d._)`${C} !== undefined`,()=>{r.assign(l,C),y(t,C)});function A(V){switch(V){case"string":r.elseIf((0,d._)`${j} == "number" || ${j} == "boolean"`).assign(C,(0,d._)`"" + ${l}`).elseIf((0,d._)`${l} === null`).assign(C,(0,d._)`""`);return;case"number":r.elseIf((0,d._)`${j} == "boolean" || ${l} === null
3
- || (${j} == "string" && ${l} && ${l} == +${l})`).assign(C,(0,d._)`+${l}`);return;case"integer":r.elseIf((0,d._)`${j} === "boolean" || ${l} === null
4
- || (${j} === "string" && ${l} && ${l} == +${l} && !(${l} % 1))`).assign(C,(0,d._)`+${l}`);return;case"boolean":r.elseIf((0,d._)`${l} === "false" || ${l} === 0 || ${l} === null`).assign(C,!1).elseIf((0,d._)`${l} === "true" || ${l} === 1`).assign(C,!0);return;case"null":r.elseIf((0,d._)`${l} === "" || ${l} === 0 || ${l} === false`),r.assign(C,null);return;case"array":r.elseIf((0,d._)`${j} === "string" || ${j} === "number"
5
- || ${j} === "boolean" || ${l} === null`).assign(C,(0,d._)`[${l}]`)}}}function y({gen:t,parentData:o,parentDataProperty:p},r){t.if((0,d._)`${o} !== undefined`,()=>t.assign((0,d._)`${o}[${p}]`,r))}function _(t,o,p,r=a.Correct){const l=r===a.Correct?d.operators.EQ:d.operators.NEQ;let w;switch(t){case"null":return(0,d._)`${o} ${l} null`;case"array":w=(0,d._)`Array.isArray(${o})`;break;case"object":w=(0,d._)`${o} && typeof ${o} == "object" && !Array.isArray(${o})`;break;case"integer":w=j((0,d._)`!(${o} % 1) && !isNaN(${o})`);break;case"number":w=j();break;default:return(0,d._)`typeof ${o} ${l} ${t}`}return r===a.Correct?w:(0,d.not)(w);function j(C=d.nil){return(0,d.and)((0,d._)`typeof ${o} == "number"`,C,p?(0,d._)`isFinite(${o})`:d.nil)}}re.checkDataType=_;function v(t,o,p,r){if(t.length===1)return _(t[0],o,p,r);let l;const w=(0,b.toHash)(t);if(w.array&&w.object){const j=(0,d._)`typeof ${o} != "object"`;l=w.null?j:(0,d._)`!${o} || ${j}`,delete w.null,delete w.array,delete w.object}else l=d.nil;w.number&&delete w.integer;for(const j in w)l=(0,d.and)(l,_(j,o,p,r));return l}re.checkDataTypes=v;const g={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:o})=>typeof t=="string"?(0,d._)`{type: ${t}}`:(0,d._)`{type: ${o}}`};function s(t){const o=i(t);(0,S.reportError)(o,g)}re.reportTypeError=s;function i(t){const{gen:o,data:p,schema:r}=t,l=(0,b.schemaRefOrVal)(t,r,"type");return{gen:o,keyword:"type",data:p,schema:r.type,schemaCode:l,schemaValue:l,parentSchema:r,params:{},it:t}}return re}var Ne={},Qt;function un(){if(Qt)return Ne;Qt=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.assignDefaults=void 0;const e=J(),n=Q();function S(b,a){const{properties:h,items:c}=b.schema;if(a==="object"&&h)for(const m in h)d(b,m,h[m].default);else a==="array"&&Array.isArray(c)&&c.forEach((m,$)=>d(b,$,m.default))}Ne.assignDefaults=S;function d(b,a,h){const{gen:c,compositeRule:m,data:$,opts:f}=b;if(h===void 0)return;const P=(0,e._)`${$}${(0,e.getProperty)(a)}`;if(m){(0,n.checkStrictMode)(b,`default is ignored for: ${P}`);return}let y=(0,e._)`${P} === undefined`;f.useDefaults==="empty"&&(y=(0,e._)`${y} || ${P} === null || ${P} === ""`),c.if(y,(0,e._)`${P} = ${(0,e.stringify)(h)}`)}return Ne}var ce={},Y={},Xt;function le(){if(Xt)return Y;Xt=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.validateUnion=Y.validateArray=Y.usePattern=Y.callValidateCode=Y.schemaProperties=Y.allSchemaProperties=Y.noPropertyInData=Y.propertyInData=Y.isOwnProperty=Y.hasPropFunc=Y.reportMissingProp=Y.checkMissingProp=Y.checkReportMissingProp=void 0;const e=J(),n=Q(),S=_e(),d=Q();function b(t,o){const{gen:p,data:r,it:l}=t;p.if(f(p,r,o,l.opts.ownProperties),()=>{t.setParams({missingProperty:(0,e._)`${o}`},!0),t.error()})}Y.checkReportMissingProp=b;function a({gen:t,data:o,it:{opts:p}},r,l){return(0,e.or)(...r.map(w=>(0,e.and)(f(t,o,w,p.ownProperties),(0,e._)`${l} = ${w}`)))}Y.checkMissingProp=a;function h(t,o){t.setParams({missingProperty:o},!0),t.error()}Y.reportMissingProp=h;function c(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Y.hasPropFunc=c;function m(t,o,p){return(0,e._)`${c(t)}.call(${o}, ${p})`}Y.isOwnProperty=m;function $(t,o,p,r){const l=(0,e._)`${o}${(0,e.getProperty)(p)} !== undefined`;return r?(0,e._)`${l} && ${m(t,o,p)}`:l}Y.propertyInData=$;function f(t,o,p,r){const l=(0,e._)`${o}${(0,e.getProperty)(p)} === undefined`;return r?(0,e.or)(l,(0,e.not)(m(t,o,p))):l}Y.noPropertyInData=f;function P(t){return t?Object.keys(t).filter(o=>o!=="__proto__"):[]}Y.allSchemaProperties=P;function y(t,o){return P(o).filter(p=>!(0,n.alwaysValidSchema)(t,o[p]))}Y.schemaProperties=y;function _({schemaCode:t,data:o,it:{gen:p,topSchemaRef:r,schemaPath:l,errorPath:w},it:j},C,A,V){const L=V?(0,e._)`${t}, ${o}, ${r}${l}`:o,K=[[S.default.instancePath,(0,e.strConcat)(S.default.instancePath,w)],[S.default.parentData,j.parentData],[S.default.parentDataProperty,j.parentDataProperty],[S.default.rootData,S.default.rootData]];j.opts.dynamicRef&&K.push([S.default.dynamicAnchors,S.default.dynamicAnchors]);const B=(0,e._)`${L}, ${p.object(...K)}`;return A!==e.nil?(0,e._)`${C}.call(${A}, ${B})`:(0,e._)`${C}(${B})`}Y.callValidateCode=_;const v=(0,e._)`new RegExp`;function g({gen:t,it:{opts:o}},p){const r=o.unicodeRegExp?"u":"",{regExp:l}=o.code,w=l(p,r);return t.scopeValue("pattern",{key:w.toString(),ref:w,code:(0,e._)`${l.code==="new RegExp"?v:(0,d.useFunc)(t,l)}(${p}, ${r})`})}Y.usePattern=g;function s(t){const{gen:o,data:p,keyword:r,it:l}=t,w=o.name("valid");if(l.allErrors){const C=o.let("valid",!0);return j(()=>o.assign(C,!1)),C}return o.var(w,!0),j(()=>o.break()),w;function j(C){const A=o.const("len",(0,e._)`${p}.length`);o.forRange("i",0,A,V=>{t.subschema({keyword:r,dataProp:V,dataPropType:n.Type.Num},w),o.if((0,e.not)(w),C)})}}Y.validateArray=s;function i(t){const{gen:o,schema:p,keyword:r,it:l}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");if(p.some(A=>(0,n.alwaysValidSchema)(l,A))&&!l.opts.unevaluated)return;const j=o.let("valid",!1),C=o.name("_valid");o.block(()=>p.forEach((A,V)=>{const L=t.subschema({keyword:r,schemaProp:V,compositeRule:!0},C);o.assign(j,(0,e._)`${j} || ${C}`),t.mergeValidEvaluated(L,C)||o.if((0,e.not)(j))})),t.result(j,()=>t.reset(),()=>t.error(!0))}return Y.validateUnion=i,Y}var Yt;function cn(){if(Yt)return ce;Yt=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.validateKeywordUsage=ce.validSchemaType=ce.funcKeywordCode=ce.macroKeywordCode=void 0;const e=J(),n=_e(),S=le(),d=yt();function b(y,_){const{gen:v,keyword:g,schema:s,parentSchema:i,it:t}=y,o=_.macro.call(t.self,s,i,t),p=$(v,g,o);t.opts.validateSchema!==!1&&t.self.validateSchema(o,!0);const r=v.name("valid");y.subschema({schema:o,schemaPath:e.nil,errSchemaPath:`${t.errSchemaPath}/${g}`,topSchemaRef:p,compositeRule:!0},r),y.pass(r,()=>y.error(!0))}ce.macroKeywordCode=b;function a(y,_){var v;const{gen:g,keyword:s,schema:i,parentSchema:t,$data:o,it:p}=y;m(p,_);const r=!o&&_.compile?_.compile.call(p.self,i,t,p):_.validate,l=$(g,s,r),w=g.let("valid");y.block$data(w,j),y.ok((v=_.valid)!==null&&v!==void 0?v:w);function j(){if(_.errors===!1)V(),_.modifying&&h(y),L(()=>y.error());else{const K=_.async?C():A();_.modifying&&h(y),L(()=>c(y,K))}}function C(){const K=g.let("ruleErrs",null);return g.try(()=>V((0,e._)`await `),B=>g.assign(w,!1).if((0,e._)`${B} instanceof ${p.ValidationError}`,()=>g.assign(K,(0,e._)`${B}.errors`),()=>g.throw(B))),K}function A(){const K=(0,e._)`${l}.errors`;return g.assign(K,null),V(e.nil),K}function V(K=_.async?(0,e._)`await `:e.nil){const B=p.opts.passContext?n.default.this:n.default.self,x=!("compile"in _&&!o||_.schema===!1);g.assign(w,(0,e._)`${K}${(0,S.callValidateCode)(y,l,B,x)}`,_.modifying)}function L(K){var B;g.if((0,e.not)((B=_.valid)!==null&&B!==void 0?B:w),K)}}ce.funcKeywordCode=a;function h(y){const{gen:_,data:v,it:g}=y;_.if(g.parentData,()=>_.assign(v,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function c(y,_){const{gen:v}=y;v.if((0,e._)`Array.isArray(${_})`,()=>{v.assign(n.default.vErrors,(0,e._)`${n.default.vErrors} === null ? ${_} : ${n.default.vErrors}.concat(${_})`).assign(n.default.errors,(0,e._)`${n.default.vErrors}.length`),(0,d.extendErrors)(y)},()=>y.error())}function m({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function $(y,_,v){if(v===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof v=="function"?{ref:v}:{ref:v,code:(0,e.stringify)(v)})}function f(y,_,v=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||v&&typeof y>"u")}ce.validSchemaType=f;function P({schema:y,opts:_,self:v,errSchemaPath:g},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const t=s.dependencies;if(t?.some(o=>!Object.prototype.hasOwnProperty.call(y,o)))throw new Error(`parent schema must have dependencies of ${i}: ${t.join(",")}`);if(s.validateSchema&&!s.validateSchema(y[i])){const p=`keyword "${i}" value is invalid at path "${g}": `+v.errorsText(s.validateSchema.errors);if(_.validateSchema==="log")v.logger.error(p);else throw new Error(p)}}return ce.validateKeywordUsage=P,ce}var pe={},Zt;function ln(){if(Zt)return pe;Zt=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.extendSubschemaMode=pe.extendSubschemaData=pe.getSubschema=void 0;const e=J(),n=Q();function S(a,{keyword:h,schemaProp:c,schema:m,schemaPath:$,errSchemaPath:f,topSchemaRef:P}){if(h!==void 0&&m!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(h!==void 0){const y=a.schema[h];return c===void 0?{schema:y,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(h)}`,errSchemaPath:`${a.errSchemaPath}/${h}`}:{schema:y[c],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(h)}${(0,e.getProperty)(c)}`,errSchemaPath:`${a.errSchemaPath}/${h}/${(0,n.escapeFragment)(c)}`}}if(m!==void 0){if($===void 0||f===void 0||P===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:m,schemaPath:$,topSchemaRef:P,errSchemaPath:f}}throw new Error('either "keyword" or "schema" must be passed')}pe.getSubschema=S;function d(a,h,{dataProp:c,dataPropType:m,data:$,dataTypes:f,propertyName:P}){if($!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=h;if(c!==void 0){const{errorPath:v,dataPathArr:g,opts:s}=h,i=y.let("data",(0,e._)`${h.data}${(0,e.getProperty)(c)}`,!0);_(i),a.errorPath=(0,e.str)`${v}${(0,n.getErrorPath)(c,m,s.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${c}`,a.dataPathArr=[...g,a.parentDataProperty]}if($!==void 0){const v=$ instanceof e.Name?$:y.let("data",$,!0);_(v),P!==void 0&&(a.propertyName=P)}f&&(a.dataTypes=f);function _(v){a.data=v,a.dataLevel=h.dataLevel+1,a.dataTypes=[],h.definedProperties=new Set,a.parentData=h.data,a.dataNames=[...h.dataNames,v]}}pe.extendSubschemaData=d;function b(a,{jtdDiscriminator:h,jtdMetadata:c,compositeRule:m,createErrors:$,allErrors:f}){m!==void 0&&(a.compositeRule=m),$!==void 0&&(a.createErrors=$),f!==void 0&&(a.allErrors=f),a.jtdDiscriminator=h,a.jtdMetadata=c}return pe.extendSubschemaMode=b,pe}var ne={},Ot,xt;function en(){return xt||(xt=1,Ot=function e(n,S){if(n===S)return!0;if(n&&S&&typeof n=="object"&&typeof S=="object"){if(n.constructor!==S.constructor)return!1;var d,b,a;if(Array.isArray(n)){if(d=n.length,d!=S.length)return!1;for(b=d;b--!==0;)if(!e(n[b],S[b]))return!1;return!0}if(n.constructor===RegExp)return n.source===S.source&&n.flags===S.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===S.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===S.toString();if(a=Object.keys(n),d=a.length,d!==Object.keys(S).length)return!1;for(b=d;b--!==0;)if(!Object.prototype.hasOwnProperty.call(S,a[b]))return!1;for(b=d;b--!==0;){var h=a[b];if(!e(n[h],S[h]))return!1}return!0}return n!==n&&S!==S}),Ot}var kt={exports:{}},er;function dn(){if(er)return kt.exports;er=1;var e=kt.exports=function(d,b,a){typeof b=="function"&&(a=b,b={}),a=b.cb||a;var h=typeof a=="function"?a:a.pre||function(){},c=a.post||function(){};n(b,h,c,d,"",d)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function n(d,b,a,h,c,m,$,f,P,y){if(h&&typeof h=="object"&&!Array.isArray(h)){b(h,c,m,$,f,P,y);for(var _ in h){var v=h[_];if(Array.isArray(v)){if(_ in e.arrayKeywords)for(var g=0;g<v.length;g++)n(d,b,a,v[g],c+"/"+_+"/"+g,m,c,_,h,g)}else if(_ in e.propsKeywords){if(v&&typeof v=="object")for(var s in v)n(d,b,a,v[s],c+"/"+_+"/"+S(s),m,c,_,h,s)}else(_ in e.keywords||d.allKeys&&!(_ in e.skipKeywords))&&n(d,b,a,v,c+"/"+_,m,c,_,h)}a(h,c,m,$,f,P,y)}}function S(d){return d.replace(/~/g,"~0").replace(/\//g,"~1")}return kt.exports}var tr;function vt(){if(tr)return ne;tr=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.getSchemaRefs=ne.resolveUrl=ne.normalizeId=ne._getFullPath=ne.getFullPath=ne.inlineRef=void 0;const e=Q(),n=en(),S=dn(),d=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function b(g,s=!0){return typeof g=="boolean"?!0:s===!0?!h(g):s?c(g)<=s:!1}ne.inlineRef=b;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function h(g){for(const s in g){if(a.has(s))return!0;const i=g[s];if(Array.isArray(i)&&i.some(h)||typeof i=="object"&&h(i))return!0}return!1}function c(g){let s=0;for(const i in g){if(i==="$ref")return 1/0;if(s++,!d.has(i)&&(typeof g[i]=="object"&&(0,e.eachItem)(g[i],t=>s+=c(t)),s===1/0))return 1/0}return s}function m(g,s="",i){i!==!1&&(s=P(s));const t=g.parse(s);return $(g,t)}ne.getFullPath=m;function $(g,s){return g.serialize(s).split("#")[0]+"#"}ne._getFullPath=$;const f=/#\/?$/;function P(g){return g?g.replace(f,""):""}ne.normalizeId=P;function y(g,s,i){return i=P(i),g.resolve(s,i)}ne.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function v(g,s){if(typeof g=="boolean")return{};const{schemaId:i,uriResolver:t}=this.opts,o=P(g[i]||s),p={"":o},r=m(t,o,!1),l={},w=new Set;return S(g,{allKeys:!0},(A,V,L,K)=>{if(K===void 0)return;const B=r+V;let x=p[K];typeof A[i]=="string"&&(x=de.call(this,A[i])),fe.call(this,A.$anchor),fe.call(this,A.$dynamicAnchor),p[V]=x;function de(Z){const ye=this.opts.uriResolver.resolve;if(Z=P(x?ye(x,Z):Z),w.has(Z))throw C(Z);w.add(Z);let D=this.refs[Z];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?j(A,D.schema,Z):Z!==P(B)&&(Z[0]==="#"?(j(A,l[Z],Z),l[Z]=A):this.refs[Z]=B),Z}function fe(Z){if(typeof Z=="string"){if(!_.test(Z))throw new Error(`invalid anchor "${Z}"`);de.call(this,`#${Z}`)}}}),l;function j(A,V,L){if(V!==void 0&&!n(A,V))throw C(L)}function C(A){return new Error(`reference "${A}" resolves to more than one schema`)}}return ne.getSchemaRefs=v,ne}var rr;function _t(){if(rr)return he;rr=1,Object.defineProperty(he,"__esModule",{value:!0}),he.getData=he.KeywordCxt=he.validateFunctionCode=void 0;const e=on(),n=pt(),S=xr(),d=pt(),b=un(),a=cn(),h=ln(),c=J(),m=_e(),$=vt(),f=Q(),P=yt();function y(N){if(r(N)&&(w(N),p(N))){s(N);return}_(N,()=>(0,e.topBoolOrEmptySchema)(N))}he.validateFunctionCode=y;function _({gen:N,validateName:O,schema:q,schemaEnv:M,opts:z},G){z.code.es5?N.func(O,(0,c._)`${m.default.data}, ${m.default.valCxt}`,M.$async,()=>{N.code((0,c._)`"use strict"; ${t(q,z)}`),g(N,z),N.code(G)}):N.func(O,(0,c._)`${m.default.data}, ${v(z)}`,M.$async,()=>N.code(t(q,z)).code(G))}function v(N){return(0,c._)`{${m.default.instancePath}="", ${m.default.parentData}, ${m.default.parentDataProperty}, ${m.default.rootData}=${m.default.data}${N.dynamicRef?(0,c._)`, ${m.default.dynamicAnchors}={}`:c.nil}}={}`}function g(N,O){N.if(m.default.valCxt,()=>{N.var(m.default.instancePath,(0,c._)`${m.default.valCxt}.${m.default.instancePath}`),N.var(m.default.parentData,(0,c._)`${m.default.valCxt}.${m.default.parentData}`),N.var(m.default.parentDataProperty,(0,c._)`${m.default.valCxt}.${m.default.parentDataProperty}`),N.var(m.default.rootData,(0,c._)`${m.default.valCxt}.${m.default.rootData}`),O.dynamicRef&&N.var(m.default.dynamicAnchors,(0,c._)`${m.default.valCxt}.${m.default.dynamicAnchors}`)},()=>{N.var(m.default.instancePath,(0,c._)`""`),N.var(m.default.parentData,(0,c._)`undefined`),N.var(m.default.parentDataProperty,(0,c._)`undefined`),N.var(m.default.rootData,m.default.data),O.dynamicRef&&N.var(m.default.dynamicAnchors,(0,c._)`{}`)})}function s(N){const{schema:O,opts:q,gen:M}=N;_(N,()=>{q.$comment&&O.$comment&&K(N),A(N),M.let(m.default.vErrors,null),M.let(m.default.errors,0),q.unevaluated&&i(N),j(N),B(N)})}function i(N){const{gen:O,validateName:q}=N;N.evaluated=O.const("evaluated",(0,c._)`${q}.evaluated`),O.if((0,c._)`${N.evaluated}.dynamicProps`,()=>O.assign((0,c._)`${N.evaluated}.props`,(0,c._)`undefined`)),O.if((0,c._)`${N.evaluated}.dynamicItems`,()=>O.assign((0,c._)`${N.evaluated}.items`,(0,c._)`undefined`))}function t(N,O){const q=typeof N=="object"&&N[O.schemaId];return q&&(O.code.source||O.code.process)?(0,c._)`/*# sourceURL=${q} */`:c.nil}function o(N,O){if(r(N)&&(w(N),p(N))){l(N,O);return}(0,e.boolOrEmptySchema)(N,O)}function p({schema:N,self:O}){if(typeof N=="boolean")return!N;for(const q in N)if(O.RULES.all[q])return!0;return!1}function r(N){return typeof N.schema!="boolean"}function l(N,O){const{schema:q,gen:M,opts:z}=N;z.$comment&&q.$comment&&K(N),V(N),L(N);const G=M.const("_errs",m.default.errors);j(N,G),M.var(O,(0,c._)`${G} === ${m.default.errors}`)}function w(N){(0,f.checkUnknownRules)(N),C(N)}function j(N,O){if(N.opts.jtd)return de(N,[],!1,O);const q=(0,n.getSchemaTypes)(N.schema),M=(0,n.coerceAndCheckDataType)(N,q);de(N,q,!M,O)}function C(N){const{schema:O,errSchemaPath:q,opts:M,self:z}=N;O.$ref&&M.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(O,z.RULES)&&z.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function A(N){const{schema:O,opts:q}=N;O.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,f.checkStrictMode)(N,"default is ignored in the schema root")}function V(N){const O=N.schema[N.opts.schemaId];O&&(N.baseId=(0,$.resolveUrl)(N.opts.uriResolver,N.baseId,O))}function L(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function K({gen:N,schemaEnv:O,schema:q,errSchemaPath:M,opts:z}){const G=q.$comment;if(z.$comment===!0)N.code((0,c._)`${m.default.self}.logger.log(${G})`);else if(typeof z.$comment=="function"){const ee=(0,c.str)`${M}/$comment`,ue=N.scopeValue("root",{ref:O.root});N.code((0,c._)`${m.default.self}.opts.$comment(${G}, ${ee}, ${ue}.schema)`)}}function B(N){const{gen:O,schemaEnv:q,validateName:M,ValidationError:z,opts:G}=N;q.$async?O.if((0,c._)`${m.default.errors} === 0`,()=>O.return(m.default.data),()=>O.throw((0,c._)`new ${z}(${m.default.vErrors})`)):(O.assign((0,c._)`${M}.errors`,m.default.vErrors),G.unevaluated&&x(N),O.return((0,c._)`${m.default.errors} === 0`))}function x({gen:N,evaluated:O,props:q,items:M}){q instanceof c.Name&&N.assign((0,c._)`${O}.props`,q),M instanceof c.Name&&N.assign((0,c._)`${O}.items`,M)}function de(N,O,q,M){const{gen:z,schema:G,data:ee,allErrors:ue,opts:se,self:ae}=N,{RULES:te}=ae;if(G.$ref&&(se.ignoreKeywordsWithRef||!(0,f.schemaHasRulesButRef)(G,te))){z.block(()=>U(N,"$ref",te.all.$ref.definition));return}se.jtd||Z(N,O),z.block(()=>{for(const ie of te.rules)be(ie);be(te.post)});function be(ie){(0,S.shouldUseGroup)(G,ie)&&(ie.type?(z.if((0,d.checkDataType)(ie.type,ee,se.strictNumbers)),fe(N,ie),O.length===1&&O[0]===ie.type&&q&&(z.else(),(0,d.reportTypeError)(N)),z.endIf()):fe(N,ie),ue||z.if((0,c._)`${m.default.errors} === ${M||0}`))}}function fe(N,O){const{gen:q,schema:M,opts:{useDefaults:z}}=N;z&&(0,b.assignDefaults)(N,O.type),q.block(()=>{for(const G of O.rules)(0,S.shouldUseRule)(M,G)&&U(N,G.keyword,G.definition,O.type)})}function Z(N,O){N.schemaEnv.meta||!N.opts.strictTypes||(ye(N,O),N.opts.allowUnionTypes||D(N,O),R(N,N.dataTypes))}function ye(N,O){if(O.length){if(!N.dataTypes.length){N.dataTypes=O;return}O.forEach(q=>{k(N.dataTypes,q)||E(N,`type "${q}" not allowed by context "${N.dataTypes.join(",")}"`)}),u(N,O)}}function D(N,O){O.length>1&&!(O.length===2&&O.includes("null"))&&E(N,"use allowUnionTypes to allow union type keyword")}function R(N,O){const q=N.self.RULES.all;for(const M in q){const z=q[M];if(typeof z=="object"&&(0,S.shouldUseRule)(N.schema,z)){const{type:G}=z.definition;G.length&&!G.some(ee=>T(O,ee))&&E(N,`missing type "${G.join(",")}" for keyword "${M}"`)}}}function T(N,O){return N.includes(O)||O==="number"&&N.includes("integer")}function k(N,O){return N.includes(O)||O==="integer"&&N.includes("number")}function u(N,O){const q=[];for(const M of N.dataTypes)k(O,M)?q.push(M):O.includes("integer")&&M==="number"&&q.push("integer");N.dataTypes=q}function E(N,O){const q=N.schemaEnv.baseId+N.errSchemaPath;O+=` at "${q}" (strictTypes)`,(0,f.checkStrictMode)(N,O,N.opts.strictTypes)}class I{constructor(O,q,M){if((0,a.validateKeywordUsage)(O,q,M),this.gen=O.gen,this.allErrors=O.allErrors,this.keyword=M,this.data=O.data,this.schema=O.schema[M],this.$data=q.$data&&O.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(O,this.schema,M,this.$data),this.schemaType=q.schemaType,this.parentSchema=O.schema,this.params={},this.it=O,this.def=q,this.$data)this.schemaCode=O.gen.const("vSchema",W(this.$data,O));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${M} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=O.gen.const("_errs",m.default.errors))}result(O,q,M){this.failResult((0,c.not)(O),q,M)}failResult(O,q,M){this.gen.if(O),M?M():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(O,q){this.failResult((0,c.not)(O),void 0,q)}fail(O){if(O===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(O),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(O){if(!this.$data)return this.fail(O);const{schemaCode:q}=this;this.fail((0,c._)`${q} !== undefined && (${(0,c.or)(this.invalid$data(),O)})`)}error(O,q,M){if(q){this.setParams(q),this._error(O,M),this.setParams({});return}this._error(O,M)}_error(O,q){(O?P.reportExtraError:P.reportError)(this,this.def.error,q)}$dataError(){(0,P.reportError)(this,this.def.$dataError||P.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,P.resetErrorsCount)(this.gen,this.errsCount)}ok(O){this.allErrors||this.gen.if(O)}setParams(O,q){q?Object.assign(this.params,O):this.params=O}block$data(O,q,M=c.nil){this.gen.block(()=>{this.check$data(O,M),q()})}check$data(O=c.nil,q=c.nil){if(!this.$data)return;const{gen:M,schemaCode:z,schemaType:G,def:ee}=this;M.if((0,c.or)((0,c._)`${z} === undefined`,q)),O!==c.nil&&M.assign(O,!0),(G.length||ee.validateSchema)&&(M.elseIf(this.invalid$data()),this.$dataError(),O!==c.nil&&M.assign(O,!1)),M.else()}invalid$data(){const{gen:O,schemaCode:q,schemaType:M,def:z,it:G}=this;return(0,c.or)(ee(),ue());function ee(){if(M.length){if(!(q instanceof c.Name))throw new Error("ajv implementation error");const se=Array.isArray(M)?M:[M];return(0,c._)`${(0,d.checkDataTypes)(se,q,G.opts.strictNumbers,d.DataType.Wrong)}`}return c.nil}function ue(){if(z.validateSchema){const se=O.scopeValue("validate$data",{ref:z.validateSchema});return(0,c._)`!${se}(${q})`}return c.nil}}subschema(O,q){const M=(0,h.getSubschema)(this.it,O);(0,h.extendSubschemaData)(M,this.it,O),(0,h.extendSubschemaMode)(M,O);const z={...this.it,...M,items:void 0,props:void 0};return o(z,q),z}mergeEvaluated(O,q){const{it:M,gen:z}=this;M.opts.unevaluated&&(M.props!==!0&&O.props!==void 0&&(M.props=f.mergeEvaluated.props(z,O.props,M.props,q)),M.items!==!0&&O.items!==void 0&&(M.items=f.mergeEvaluated.items(z,O.items,M.items,q)))}mergeValidEvaluated(O,q){const{it:M,gen:z}=this;if(M.opts.unevaluated&&(M.props!==!0||M.items!==!0))return z.if(q,()=>this.mergeEvaluated(O,c.Name)),!0}}he.KeywordCxt=I;function U(N,O,q,M){const z=new I(N,q,O);"code"in q?q.code(z,M):z.$data&&q.validate?(0,a.funcKeywordCode)(z,q):"macro"in q?(0,a.macroKeywordCode)(z,q):(q.compile||q.validate)&&(0,a.funcKeywordCode)(z,q)}const F=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(N,{dataLevel:O,dataNames:q,dataPathArr:M}){let z,G;if(N==="")return m.default.rootData;if(N[0]==="/"){if(!F.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);z=N,G=m.default.rootData}else{const ae=X.exec(N);if(!ae)throw new Error(`Invalid JSON-pointer: ${N}`);const te=+ae[1];if(z=ae[2],z==="#"){if(te>=O)throw new Error(se("property/index",te));return M[O-te]}if(te>O)throw new Error(se("data",te));if(G=q[O-te],!z)return G}let ee=G;const ue=z.split("/");for(const ae of ue)ae&&(G=(0,c._)`${G}${(0,c.getProperty)((0,f.unescapeJsonPointer)(ae))}`,ee=(0,c._)`${ee} && ${G}`);return ee;function se(ae,te){return`Cannot access ${ae} ${te} levels up, current level is ${O}`}}return he.getData=W,he}var Ie={},nr;function Tt(){if(nr)return Ie;nr=1,Object.defineProperty(Ie,"__esModule",{value:!0});class e extends Error{constructor(S){super("validation failed"),this.errors=S,this.ajv=this.validation=!0}}return Ie.default=e,Ie}var qe={},sr;function gt(){if(sr)return qe;sr=1,Object.defineProperty(qe,"__esModule",{value:!0});const e=vt();class n extends Error{constructor(d,b,a,h){super(h||`can't resolve reference ${a} from id ${b}`),this.missingRef=(0,e.resolveUrl)(d,b,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(d,this.missingRef))}}return qe.default=n,qe}var oe={},ar;function Ct(){if(ar)return oe;ar=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.resolveSchema=oe.getCompilingSchema=oe.resolveRef=oe.compileSchema=oe.SchemaEnv=void 0;const e=J(),n=Tt(),S=_e(),d=vt(),b=Q(),a=_t();class h{constructor(i){var t;this.refs={},this.dynamicAnchors={};let o;typeof i.schema=="object"&&(o=i.schema),this.schema=i.schema,this.schemaId=i.schemaId,this.root=i.root||this,this.baseId=(t=i.baseId)!==null&&t!==void 0?t:(0,d.normalizeId)(o?.[i.schemaId||"$id"]),this.schemaPath=i.schemaPath,this.localRefs=i.localRefs,this.meta=i.meta,this.$async=o?.$async,this.refs={}}}oe.SchemaEnv=h;function c(s){const i=f.call(this,s);if(i)return i;const t=(0,d.getFullPath)(this.opts.uriResolver,s.root.baseId),{es5:o,lines:p}=this.opts.code,{ownProperties:r}=this.opts,l=new e.CodeGen(this.scope,{es5:o,lines:p,ownProperties:r});let w;s.$async&&(w=l.scopeValue("Error",{ref:n.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=l.scopeName("validate");s.validateName=j;const C={gen:l,allErrors:this.opts.allErrors,data:S.default.data,parentData:S.default.parentData,parentDataProperty:S.default.parentDataProperty,dataNames:[S.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",this.opts.code.source===!0?{ref:s.schema,code:(0,e.stringify)(s.schema)}:{ref:s.schema}),validateName:j,ValidationError:w,schema:s.schema,schemaEnv:s,rootId:t,baseId:s.baseId||t,schemaPath:e.nil,errSchemaPath:s.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let A;try{this._compilations.add(s),(0,a.validateFunctionCode)(C),l.optimize(this.opts.code.optimize);const V=l.toString();A=`${l.scopeRefs(S.default.scope)}return ${V}`,this.opts.code.process&&(A=this.opts.code.process(A,s));const K=new Function(`${S.default.self}`,`${S.default.scope}`,A)(this,this.scope.get());if(this.scope.value(j,{ref:K}),K.errors=null,K.schema=s.schema,K.schemaEnv=s,s.$async&&(K.$async=!0),this.opts.code.source===!0&&(K.source={validateName:j,validateCode:V,scopeValues:l._values}),this.opts.unevaluated){const{props:B,items:x}=C;K.evaluated={props:B instanceof e.Name?void 0:B,items:x instanceof e.Name?void 0:x,dynamicProps:B instanceof e.Name,dynamicItems:x instanceof e.Name},K.source&&(K.source.evaluated=(0,e.stringify)(K.evaluated))}return s.validate=K,s}catch(V){throw delete s.validate,delete s.validateName,A&&this.logger.error("Error compiling schema, function code:",A),V}finally{this._compilations.delete(s)}}oe.compileSchema=c;function m(s,i,t){var o;t=(0,d.resolveUrl)(this.opts.uriResolver,i,t);const p=s.refs[t];if(p)return p;let r=y.call(this,s,t);if(r===void 0){const l=(o=s.localRefs)===null||o===void 0?void 0:o[t],{schemaId:w}=this.opts;l&&(r=new h({schema:l,schemaId:w,root:s,baseId:i}))}if(r!==void 0)return s.refs[t]=$.call(this,r)}oe.resolveRef=m;function $(s){return(0,d.inlineRef)(s.schema,this.opts.inlineRefs)?s.schema:s.validate?s:c.call(this,s)}function f(s){for(const i of this._compilations)if(P(i,s))return i}oe.getCompilingSchema=f;function P(s,i){return s.schema===i.schema&&s.root===i.root&&s.baseId===i.baseId}function y(s,i){let t;for(;typeof(t=this.refs[i])=="string";)i=t;return t||this.schemas[i]||_.call(this,s,i)}function _(s,i){const t=this.opts.uriResolver.parse(i),o=(0,d._getFullPath)(this.opts.uriResolver,t);let p=(0,d.getFullPath)(this.opts.uriResolver,s.baseId,void 0);if(Object.keys(s.schema).length>0&&o===p)return g.call(this,t,s);const r=(0,d.normalizeId)(o),l=this.refs[r]||this.schemas[r];if(typeof l=="string"){const w=_.call(this,s,l);return typeof w?.schema!="object"?void 0:g.call(this,t,w)}if(typeof l?.schema=="object"){if(l.validate||c.call(this,l),r===(0,d.normalizeId)(i)){const{schema:w}=l,{schemaId:j}=this.opts,C=w[j];return C&&(p=(0,d.resolveUrl)(this.opts.uriResolver,p,C)),new h({schema:w,schemaId:j,root:s,baseId:p})}return g.call(this,t,l)}}oe.resolveSchema=_;const v=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(s,{baseId:i,schema:t,root:o}){var p;if(((p=s.fragment)===null||p===void 0?void 0:p[0])!=="/")return;for(const w of s.fragment.slice(1).split("/")){if(typeof t=="boolean")return;const j=t[(0,b.unescapeFragment)(w)];if(j===void 0)return;t=j;const C=typeof t=="object"&&t[this.opts.schemaId];!v.has(w)&&C&&(i=(0,d.resolveUrl)(this.opts.uriResolver,i,C))}let r;if(typeof t!="boolean"&&t.$ref&&!(0,b.schemaHasRulesButRef)(t,this.RULES)){const w=(0,d.resolveUrl)(this.opts.uriResolver,i,t.$ref);r=_.call(this,o,w)}const{schemaId:l}=this.opts;if(r=r||new h({schema:t,schemaId:l,root:o,baseId:i}),r.schema!==r.root.schema)return r}return oe}const fn="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",hn="Meta-schema for $data reference (JSON AnySchema extension proposal)",mn="object",pn=["$data"],yn={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},vn=!1,_n={$id:fn,description:hn,type:mn,required:pn,properties:yn,additionalProperties:vn};var Te={},Re={exports:{}},jt,or;function tn(){if(or)return jt;or=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function S(y){let _="",v=0,g=0;for(g=0;g<y.length;g++)if(v=y[g].charCodeAt(0),v!==48){if(!(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102))return"";_+=y[g];break}for(g+=1;g<y.length;g++){if(v=y[g].charCodeAt(0),!(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102))return"";_+=y[g]}return _}const d=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function b(y){return y.length=0,!0}function a(y,_,v){if(y.length){const g=S(y);if(g!=="")_.push(g);else return v.error=!0,!1;y.length=0}return!0}function h(y){let _=0;const v={error:!1,address:"",zone:""},g=[],s=[];let i=!1,t=!1,o=a;for(let p=0;p<y.length;p++){const r=y[p];if(!(r==="["||r==="]"))if(r===":"){if(i===!0&&(t=!0),!o(s,g,v))break;if(++_>7){v.error=!0;break}p>0&&y[p-1]===":"&&(i=!0),g.push(":");continue}else if(r==="%"){if(!o(s,g,v))break;o=b}else{s.push(r);continue}}return s.length&&(o===b?v.zone=s.join(""):t?g.push(s.join("")):g.push(S(s))),v.address=g.join(""),v}function c(y){if(m(y,":")<2)return{host:y,isIPV6:!1};const _=h(y);if(_.error)return{host:y,isIPV6:!1};{let v=_.address,g=_.address;return _.zone&&(v+="%"+_.zone,g+="%25"+_.zone),{host:v,isIPV6:!0,escapedHost:g}}}function m(y,_){let v=0;for(let g=0;g<y.length;g++)y[g]===_&&v++;return v}function $(y){let _=y;const v=[];let g=-1,s=0;for(;s=_.length;){if(s===1){if(_===".")break;if(_==="/"){v.push("/");break}else{v.push(_);break}}else if(s===2){if(_[0]==="."){if(_[1]===".")break;if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&(_[1]==="."||_[1]==="/")){v.push("/");break}}else if(s===3&&_==="/.."){v.length!==0&&v.pop(),v.push("/");break}if(_[0]==="."){if(_[1]==="."){if(_[2]==="/"){_=_.slice(3);continue}}else if(_[1]==="/"){_=_.slice(2);continue}}else if(_[0]==="/"&&_[1]==="."){if(_[2]==="/"){_=_.slice(2);continue}else if(_[2]==="."&&_[3]==="/"){_=_.slice(3),v.length!==0&&v.pop();continue}}if((g=_.indexOf("/",1))===-1){v.push(_);break}else v.push(_.slice(0,g)),_=_.slice(g)}return v.join("")}function f(y,_){const v=_!==!0?escape:unescape;return y.scheme!==void 0&&(y.scheme=v(y.scheme)),y.userinfo!==void 0&&(y.userinfo=v(y.userinfo)),y.host!==void 0&&(y.host=v(y.host)),y.path!==void 0&&(y.path=v(y.path)),y.query!==void 0&&(y.query=v(y.query)),y.fragment!==void 0&&(y.fragment=v(y.fragment)),y}function P(y){const _=[];if(y.userinfo!==void 0&&(_.push(y.userinfo),_.push("@")),y.host!==void 0){let v=unescape(y.host);if(!n(v)){const g=c(v);g.isIPV6===!0?v=`[${g.escapedHost}]`:v=y.host}_.push(v)}return(typeof y.port=="number"||typeof y.port=="string")&&(_.push(":"),_.push(String(y.port))),_.length?_.join(""):void 0}return jt={nonSimpleDomain:d,recomposeAuthority:P,normalizeComponentEncoding:f,removeDotSegments:$,isIPv4:n,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:S},jt}var It,ir;function gn(){if(ir)return It;ir=1;const{isUUID:e}=tn(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,S=["http","https","ws","wss","urn","urn:uuid"];function d(r){return S.indexOf(r)!==-1}function b(r){return r.secure===!0?!0:r.secure===!1?!1:r.scheme?r.scheme.length===3&&(r.scheme[0]==="w"||r.scheme[0]==="W")&&(r.scheme[1]==="s"||r.scheme[1]==="S")&&(r.scheme[2]==="s"||r.scheme[2]==="S"):!1}function a(r){return r.host||(r.error=r.error||"HTTP URIs must have a host."),r}function h(r){const l=String(r.scheme).toLowerCase()==="https";return(r.port===(l?443:80)||r.port==="")&&(r.port=void 0),r.path||(r.path="/"),r}function c(r){return r.secure=b(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r}function m(r){if((r.port===(b(r)?443:80)||r.port==="")&&(r.port=void 0),typeof r.secure=="boolean"&&(r.scheme=r.secure?"wss":"ws",r.secure=void 0),r.resourceName){const[l,w]=r.resourceName.split("?");r.path=l&&l!=="/"?l:void 0,r.query=w,r.resourceName=void 0}return r.fragment=void 0,r}function $(r,l){if(!r.path)return r.error="URN can not be parsed",r;const w=r.path.match(n);if(w){const j=l.scheme||r.scheme||"urn";r.nid=w[1].toLowerCase(),r.nss=w[2];const C=`${j}:${l.nid||r.nid}`,A=p(C);r.path=void 0,A&&(r=A.parse(r,l))}else r.error=r.error||"URN can not be parsed.";return r}function f(r,l){if(r.nid===void 0)throw new Error("URN without nid cannot be serialized");const w=l.scheme||r.scheme||"urn",j=r.nid.toLowerCase(),C=`${w}:${l.nid||j}`,A=p(C);A&&(r=A.serialize(r,l));const V=r,L=r.nss;return V.path=`${j||l.nid}:${L}`,l.skipEscape=!0,V}function P(r,l){const w=r;return w.uuid=w.nss,w.nss=void 0,!l.tolerant&&(!w.uuid||!e(w.uuid))&&(w.error=w.error||"UUID is not valid."),w}function y(r){const l=r;return l.nss=(r.uuid||"").toLowerCase(),l}const _={scheme:"http",domainHost:!0,parse:a,serialize:h},v={scheme:"https",domainHost:_.domainHost,parse:a,serialize:h},g={scheme:"ws",domainHost:!0,parse:c,serialize:m},s={scheme:"wss",domainHost:g.domainHost,parse:g.parse,serialize:g.serialize},o={http:_,https:v,ws:g,wss:s,urn:{scheme:"urn",parse:$,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:P,serialize:y,skipNormalize:!0}};Object.setPrototypeOf(o,null);function p(r){return r&&(o[r]||o[r.toLowerCase()])||void 0}return It={wsIsSecure:b,SCHEMES:o,isValidSchemeName:d,getSchemeHandler:p},It}var ur;function $n(){if(ur)return Re.exports;ur=1;const{normalizeIPv6:e,removeDotSegments:n,recomposeAuthority:S,normalizeComponentEncoding:d,isIPv4:b,nonSimpleDomain:a}=tn(),{SCHEMES:h,getSchemeHandler:c}=gn();function m(s,i){return typeof s=="string"?s=y(v(s,i),i):typeof s=="object"&&(s=v(y(s,i),i)),s}function $(s,i,t){const o=t?Object.assign({scheme:"null"},t):{scheme:"null"},p=f(v(s,o),v(i,o),o,!0);return o.skipEscape=!0,y(p,o)}function f(s,i,t,o){const p={};return o||(s=v(y(s,t),t),i=v(y(i,t),t)),t=t||{},!t.tolerant&&i.scheme?(p.scheme=i.scheme,p.userinfo=i.userinfo,p.host=i.host,p.port=i.port,p.path=n(i.path||""),p.query=i.query):(i.userinfo!==void 0||i.host!==void 0||i.port!==void 0?(p.userinfo=i.userinfo,p.host=i.host,p.port=i.port,p.path=n(i.path||""),p.query=i.query):(i.path?(i.path[0]==="/"?p.path=n(i.path):((s.userinfo!==void 0||s.host!==void 0||s.port!==void 0)&&!s.path?p.path="/"+i.path:s.path?p.path=s.path.slice(0,s.path.lastIndexOf("/")+1)+i.path:p.path=i.path,p.path=n(p.path)),p.query=i.query):(p.path=s.path,i.query!==void 0?p.query=i.query:p.query=s.query),p.userinfo=s.userinfo,p.host=s.host,p.port=s.port),p.scheme=s.scheme),p.fragment=i.fragment,p}function P(s,i,t){return typeof s=="string"?(s=unescape(s),s=y(d(v(s,t),!0),{...t,skipEscape:!0})):typeof s=="object"&&(s=y(d(s,!0),{...t,skipEscape:!0})),typeof i=="string"?(i=unescape(i),i=y(d(v(i,t),!0),{...t,skipEscape:!0})):typeof i=="object"&&(i=y(d(i,!0),{...t,skipEscape:!0})),s.toLowerCase()===i.toLowerCase()}function y(s,i){const t={host:s.host,scheme:s.scheme,userinfo:s.userinfo,port:s.port,path:s.path,query:s.query,nid:s.nid,nss:s.nss,uuid:s.uuid,fragment:s.fragment,reference:s.reference,resourceName:s.resourceName,secure:s.secure,error:""},o=Object.assign({},i),p=[],r=c(o.scheme||t.scheme);r&&r.serialize&&r.serialize(t,o),t.path!==void 0&&(o.skipEscape?t.path=unescape(t.path):(t.path=escape(t.path),t.scheme!==void 0&&(t.path=t.path.split("%3A").join(":")))),o.reference!=="suffix"&&t.scheme&&p.push(t.scheme,":");const l=S(t);if(l!==void 0&&(o.reference!=="suffix"&&p.push("//"),p.push(l),t.path&&t.path[0]!=="/"&&p.push("/")),t.path!==void 0){let w=t.path;!o.absolutePath&&(!r||!r.absolutePath)&&(w=n(w)),l===void 0&&w[0]==="/"&&w[1]==="/"&&(w="/%2F"+w.slice(2)),p.push(w)}return t.query!==void 0&&p.push("?",t.query),t.fragment!==void 0&&p.push("#",t.fragment),p.join("")}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function v(s,i){const t=Object.assign({},i),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let p=!1;t.reference==="suffix"&&(t.scheme?s=t.scheme+":"+s:s="//"+s);const r=s.match(_);if(r){if(o.scheme=r[1],o.userinfo=r[3],o.host=r[4],o.port=parseInt(r[5],10),o.path=r[6]||"",o.query=r[7],o.fragment=r[8],isNaN(o.port)&&(o.port=r[5]),o.host)if(b(o.host)===!1){const j=e(o.host);o.host=j.host.toLowerCase(),p=j.isIPV6}else p=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",t.reference&&t.reference!=="suffix"&&t.reference!==o.reference&&(o.error=o.error||"URI is not a "+t.reference+" reference.");const l=c(t.scheme||o.scheme);if(!t.unicodeSupport&&(!l||!l.unicodeSupport)&&o.host&&(t.domainHost||l&&l.domainHost)&&p===!1&&a(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(w){o.error=o.error||"Host's domain name can not be converted to ASCII: "+w}(!l||l&&!l.skipNormalize)&&(s.indexOf("%")!==-1&&(o.scheme!==void 0&&(o.scheme=unescape(o.scheme)),o.host!==void 0&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),l&&l.parse&&l.parse(o,t)}else o.error=o.error||"URI can not be parsed.";return o}const g={SCHEMES:h,normalize:m,resolve:$,resolveComponent:f,equal:P,serialize:y,parse:v};return Re.exports=g,Re.exports.default=g,Re.exports.fastUri=g,Re.exports}var cr;function wn(){if(cr)return Te;cr=1,Object.defineProperty(Te,"__esModule",{value:!0});const e=$n();return e.code='require("ajv/dist/runtime/uri").default',Te.default=e,Te}var lr;function bn(){return lr||(lr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var n=_t();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var S=J();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return S._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return S.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return S.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return S.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return S.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return S.CodeGen}});const d=Tt(),b=gt(),a=Zr(),h=Ct(),c=J(),m=vt(),$=pt(),f=Q(),P=_n,y=wn(),_=(D,R)=>new RegExp(D,R);_.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),s={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."},i={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},t=200;function o(D){var R,T,k,u,E,I,U,F,X,W,N,O,q,M,z,G,ee,ue,se,ae,te,be,ie,$t,wt;const Pe=D.strict,bt=(R=D.code)===null||R===void 0?void 0:R.optimize,Mt=bt===!0||bt===void 0?1:bt||0,At=(k=(T=D.code)===null||T===void 0?void 0:T.regExp)!==null&&k!==void 0?k:_,an=(u=D.uriResolver)!==null&&u!==void 0?u:y.default;return{strictSchema:(I=(E=D.strictSchema)!==null&&E!==void 0?E:Pe)!==null&&I!==void 0?I:!0,strictNumbers:(F=(U=D.strictNumbers)!==null&&U!==void 0?U:Pe)!==null&&F!==void 0?F:!0,strictTypes:(W=(X=D.strictTypes)!==null&&X!==void 0?X:Pe)!==null&&W!==void 0?W:"log",strictTuples:(O=(N=D.strictTuples)!==null&&N!==void 0?N:Pe)!==null&&O!==void 0?O:"log",strictRequired:(M=(q=D.strictRequired)!==null&&q!==void 0?q:Pe)!==null&&M!==void 0?M:!1,code:D.code?{...D.code,optimize:Mt,regExp:At}:{optimize:Mt,regExp:At},loopRequired:(z=D.loopRequired)!==null&&z!==void 0?z:t,loopEnum:(G=D.loopEnum)!==null&&G!==void 0?G:t,meta:(ee=D.meta)!==null&&ee!==void 0?ee:!0,messages:(ue=D.messages)!==null&&ue!==void 0?ue:!0,inlineRefs:(se=D.inlineRefs)!==null&&se!==void 0?se:!0,schemaId:(ae=D.schemaId)!==null&&ae!==void 0?ae:"$id",addUsedSchema:(te=D.addUsedSchema)!==null&&te!==void 0?te:!0,validateSchema:(be=D.validateSchema)!==null&&be!==void 0?be:!0,validateFormats:(ie=D.validateFormats)!==null&&ie!==void 0?ie:!0,unicodeRegExp:($t=D.unicodeRegExp)!==null&&$t!==void 0?$t:!0,int32range:(wt=D.int32range)!==null&&wt!==void 0?wt:!0,uriResolver:an}}class p{constructor(R={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,R=this.opts={...R,...o(R)};const{es5:T,lines:k}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:g,es5:T,lines:k}),this.logger=L(R.logger);const u=R.validateFormats;R.validateFormats=!1,this.RULES=(0,a.getRules)(),r.call(this,s,R,"NOT SUPPORTED"),r.call(this,i,R,"DEPRECATED","warn"),this._metaOpts=A.call(this),R.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),R.keywords&&C.call(this,R.keywords),typeof R.meta=="object"&&this.addMetaSchema(R.meta),w.call(this),R.validateFormats=u}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:R,meta:T,schemaId:k}=this.opts;let u=P;k==="id"&&(u={...P},u.id=u.$id,delete u.$id),T&&R&&this.addMetaSchema(u,u[k],!1)}defaultMeta(){const{meta:R,schemaId:T}=this.opts;return this.opts.defaultMeta=typeof R=="object"?R[T]||R:void 0}validate(R,T){let k;if(typeof R=="string"){if(k=this.getSchema(R),!k)throw new Error(`no schema with key or ref "${R}"`)}else k=this.compile(R);const u=k(T);return"$async"in k||(this.errors=k.errors),u}compile(R,T){const k=this._addSchema(R,T);return k.validate||this._compileSchemaEnv(k)}compileAsync(R,T){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return u.call(this,R,T);async function u(W,N){await E.call(this,W.$schema);const O=this._addSchema(W,N);return O.validate||I.call(this,O)}async function E(W){W&&!this.getSchema(W)&&await u.call(this,{$ref:W},!0)}async function I(W){try{return this._compileSchemaEnv(W)}catch(N){if(!(N instanceof b.default))throw N;return U.call(this,N),await F.call(this,N.missingSchema),I.call(this,W)}}function U({missingSchema:W,missingRef:N}){if(this.refs[W])throw new Error(`AnySchema ${W} is loaded but ${N} cannot be resolved`)}async function F(W){const N=await X.call(this,W);this.refs[W]||await E.call(this,N.$schema),this.refs[W]||this.addSchema(N,W,T)}async function X(W){const N=this._loading[W];if(N)return N;try{return await(this._loading[W]=k(W))}finally{delete this._loading[W]}}}addSchema(R,T,k,u=this.opts.validateSchema){if(Array.isArray(R)){for(const I of R)this.addSchema(I,void 0,k,u);return this}let E;if(typeof R=="object"){const{schemaId:I}=this.opts;if(E=R[I],E!==void 0&&typeof E!="string")throw new Error(`schema ${I} must be string`)}return T=(0,m.normalizeId)(T||E),this._checkUnique(T),this.schemas[T]=this._addSchema(R,k,T,u,!0),this}addMetaSchema(R,T,k=this.opts.validateSchema){return this.addSchema(R,T,!0,k),this}validateSchema(R,T){if(typeof R=="boolean")return!0;let k;if(k=R.$schema,k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const u=this.validate(k,R);if(!u&&T){const E="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(E);else throw new Error(E)}return u}getSchema(R){let T;for(;typeof(T=l.call(this,R))=="string";)R=T;if(T===void 0){const{schemaId:k}=this.opts,u=new h.SchemaEnv({schema:{},schemaId:k});if(T=h.resolveSchema.call(this,u,R),!T)return;this.refs[R]=T}return T.validate||this._compileSchemaEnv(T)}removeSchema(R){if(R instanceof RegExp)return this._removeAllSchemas(this.schemas,R),this._removeAllSchemas(this.refs,R),this;switch(typeof R){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const T=l.call(this,R);return typeof T=="object"&&this._cache.delete(T.schema),delete this.schemas[R],delete this.refs[R],this}case"object":{const T=R;this._cache.delete(T);let k=R[this.opts.schemaId];return k&&(k=(0,m.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(R){for(const T of R)this.addKeyword(T);return this}addKeyword(R,T){let k;if(typeof R=="string")k=R,typeof T=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),T.keyword=k);else if(typeof R=="object"&&T===void 0){if(T=R,k=T.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(B.call(this,k,T),!T)return(0,f.eachItem)(k,E=>x.call(this,E)),this;fe.call(this,T);const u={...T,type:(0,$.getJSONTypes)(T.type),schemaType:(0,$.getJSONTypes)(T.schemaType)};return(0,f.eachItem)(k,u.type.length===0?E=>x.call(this,E,u):E=>u.type.forEach(I=>x.call(this,E,u,I))),this}getKeyword(R){const T=this.RULES.all[R];return typeof T=="object"?T.definition:!!T}removeKeyword(R){const{RULES:T}=this;delete T.keywords[R],delete T.all[R];for(const k of T.rules){const u=k.rules.findIndex(E=>E.keyword===R);u>=0&&k.rules.splice(u,1)}return this}addFormat(R,T){return typeof T=="string"&&(T=new RegExp(T)),this.formats[R]=T,this}errorsText(R=this.errors,{separator:T=", ",dataVar:k="data"}={}){return!R||R.length===0?"No errors":R.map(u=>`${k}${u.instancePath} ${u.message}`).reduce((u,E)=>u+T+E)}$dataMetaSchema(R,T){const k=this.RULES.all;R=JSON.parse(JSON.stringify(R));for(const u of T){const E=u.split("/").slice(1);let I=R;for(const U of E)I=I[U];for(const U in k){const F=k[U];if(typeof F!="object")continue;const{$data:X}=F.definition,W=I[U];X&&W&&(I[U]=ye(W))}}return R}_removeAllSchemas(R,T){for(const k in R){const u=R[k];(!T||T.test(k))&&(typeof u=="string"?delete R[k]:u&&!u.meta&&(this._cache.delete(u.schema),delete R[k]))}}_addSchema(R,T,k,u=this.opts.validateSchema,E=this.opts.addUsedSchema){let I;const{schemaId:U}=this.opts;if(typeof R=="object")I=R[U];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof R!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(R);if(F!==void 0)return F;k=(0,m.normalizeId)(I||k);const X=m.getSchemaRefs.call(this,R,k);return F=new h.SchemaEnv({schema:R,schemaId:U,meta:T,baseId:k,localRefs:X}),this._cache.set(F.schema,F),E&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=F),u&&this.validateSchema(R,!0),F}_checkUnique(R){if(this.schemas[R]||this.refs[R])throw new Error(`schema with key or id "${R}" already exists`)}_compileSchemaEnv(R){if(R.meta?this._compileMetaSchema(R):h.compileSchema.call(this,R),!R.validate)throw new Error("ajv implementation error");return R.validate}_compileMetaSchema(R){const T=this.opts;this.opts=this._metaOpts;try{h.compileSchema.call(this,R)}finally{this.opts=T}}}p.ValidationError=d.default,p.MissingRefError=b.default,e.default=p;function r(D,R,T,k="error"){for(const u in D){const E=u;E in R&&this.logger[k](`${T}: option ${u}. ${D[E]}`)}}function l(D){return D=(0,m.normalizeId)(D),this.schemas[D]||this.refs[D]}function w(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const R in D)this.addSchema(D[R],R)}function j(){for(const D in this.opts.formats){const R=this.opts.formats[D];R&&this.addFormat(D,R)}}function C(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const R in D){const T=D[R];T.keyword||(T.keyword=R),this.addKeyword(T)}}function A(){const D={...this.opts};for(const R of v)delete D[R];return D}const V={log(){},warn(){},error(){}};function L(D){if(D===!1)return V;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const K=/^[a-z_$][a-z0-9_$:-]*$/i;function B(D,R){const{RULES:T}=this;if((0,f.eachItem)(D,k=>{if(T.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!K.test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!R&&R.$data&&!("code"in R||"validate"in R))throw new Error('$data keyword must have "code" or "validate" function')}function x(D,R,T){var k;const u=R?.post;if(T&&u)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:E}=this;let I=u?E.post:E.rules.find(({type:F})=>F===T);if(I||(I={type:T,rules:[]},E.rules.push(I)),E.keywords[D]=!0,!R)return;const U={keyword:D,definition:{...R,type:(0,$.getJSONTypes)(R.type),schemaType:(0,$.getJSONTypes)(R.schemaType)}};R.before?de.call(this,I,U,R.before):I.rules.push(U),E.all[D]=U,(k=R.implements)===null||k===void 0||k.forEach(F=>this.addKeyword(F))}function de(D,R,T){const k=D.rules.findIndex(u=>u.keyword===T);k>=0?D.rules.splice(k,0,R):(D.rules.push(R),this.logger.warn(`rule ${T} is not defined`))}function fe(D){let{metaSchema:R}=D;R!==void 0&&(D.$data&&this.opts.$data&&(R=ye(R)),D.validateSchema=this.compile(R,!0))}const Z={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ye(D){return{anyOf:[D,Z]}}})(Et)),Et}var Ce={},De={},Me={},dr;function En(){if(dr)return Me;dr=1,Object.defineProperty(Me,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Me.default=e,Me}var ve={},fr;function Sn(){if(fr)return ve;fr=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.callRef=ve.getValidate=void 0;const e=gt(),n=le(),S=J(),d=_e(),b=Ct(),a=Q(),h={keyword:"$ref",schemaType:"string",code($){const{gen:f,schema:P,it:y}=$,{baseId:_,schemaEnv:v,validateName:g,opts:s,self:i}=y,{root:t}=v;if((P==="#"||P==="#/")&&_===t.baseId)return p();const o=b.resolveRef.call(i,t,_,P);if(o===void 0)throw new e.default(y.opts.uriResolver,_,P);if(o instanceof b.SchemaEnv)return r(o);return l(o);function p(){if(v===t)return m($,g,v,v.$async);const w=f.scopeValue("root",{ref:t});return m($,(0,S._)`${w}.validate`,t,t.$async)}function r(w){const j=c($,w);m($,j,w,w.$async)}function l(w){const j=f.scopeValue("schema",s.code.source===!0?{ref:w,code:(0,S.stringify)(w)}:{ref:w}),C=f.name("valid"),A=$.subschema({schema:w,dataTypes:[],schemaPath:S.nil,topSchemaRef:j,errSchemaPath:P},C);$.mergeEvaluated(A),$.ok(C)}}};function c($,f){const{gen:P}=$;return f.validate?P.scopeValue("validate",{ref:f.validate}):(0,S._)`${P.scopeValue("wrapper",{ref:f})}.validate`}ve.getValidate=c;function m($,f,P,y){const{gen:_,it:v}=$,{allErrors:g,schemaEnv:s,opts:i}=v,t=i.passContext?d.default.this:S.nil;y?o():p();function o(){if(!s.$async)throw new Error("async schema referenced by sync schema");const w=_.let("valid");_.try(()=>{_.code((0,S._)`await ${(0,n.callValidateCode)($,f,t)}`),l(f),g||_.assign(w,!0)},j=>{_.if((0,S._)`!(${j} instanceof ${v.ValidationError})`,()=>_.throw(j)),r(j),g||_.assign(w,!1)}),$.ok(w)}function p(){$.result((0,n.callValidateCode)($,f,t),()=>l(f),()=>r(f))}function r(w){const j=(0,S._)`${w}.errors`;_.assign(d.default.vErrors,(0,S._)`${d.default.vErrors} === null ? ${j} : ${d.default.vErrors}.concat(${j})`),_.assign(d.default.errors,(0,S._)`${d.default.vErrors}.length`)}function l(w){var j;if(!v.opts.unevaluated)return;const C=(j=P?.validate)===null||j===void 0?void 0:j.evaluated;if(v.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(v.props=a.mergeEvaluated.props(_,C.props,v.props));else{const A=_.var("props",(0,S._)`${w}.evaluated.props`);v.props=a.mergeEvaluated.props(_,A,v.props,S.Name)}if(v.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(v.items=a.mergeEvaluated.items(_,C.items,v.items));else{const A=_.var("items",(0,S._)`${w}.evaluated.items`);v.items=a.mergeEvaluated.items(_,A,v.items,S.Name)}}}return ve.callRef=m,ve.default=h,ve}var hr;function Pn(){if(hr)return De;hr=1,Object.defineProperty(De,"__esModule",{value:!0});const e=En(),n=Sn(),S=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,n.default];return De.default=S,De}var Ae={},Ve={},mr;function Nn(){if(mr)return Ve;mr=1,Object.defineProperty(Ve,"__esModule",{value:!0});const e=J(),n=e.operators,S={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},d={message:({keyword:a,schemaCode:h})=>(0,e.str)`must be ${S[a].okStr} ${h}`,params:({keyword:a,schemaCode:h})=>(0,e._)`{comparison: ${S[a].okStr}, limit: ${h}}`},b={keyword:Object.keys(S),type:"number",schemaType:"number",$data:!0,error:d,code(a){const{keyword:h,data:c,schemaCode:m}=a;a.fail$data((0,e._)`${c} ${S[h].fail} ${m} || isNaN(${c})`)}};return Ve.default=b,Ve}var Ue={},pr;function Rn(){if(pr)return Ue;pr=1,Object.defineProperty(Ue,"__esModule",{value:!0});const e=J(),S={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:d})=>(0,e.str)`must be multiple of ${d}`,params:({schemaCode:d})=>(0,e._)`{multipleOf: ${d}}`},code(d){const{gen:b,data:a,schemaCode:h,it:c}=d,m=c.opts.multipleOfPrecision,$=b.let("res"),f=m?(0,e._)`Math.abs(Math.round(${$}) - ${$}) > 1e-${m}`:(0,e._)`${$} !== parseInt(${$})`;d.fail$data((0,e._)`(${h} === 0 || (${$} = ${a}/${h}, ${f}))`)}};return Ue.default=S,Ue}var ze={},Fe={},yr;function On(){if(yr)return Fe;yr=1,Object.defineProperty(Fe,"__esModule",{value:!0});function e(n){const S=n.length;let d=0,b=0,a;for(;b<S;)d++,a=n.charCodeAt(b++),a>=55296&&a<=56319&&b<S&&(a=n.charCodeAt(b),(a&64512)===56320&&b++);return d}return Fe.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Fe}var vr;function kn(){if(vr)return ze;vr=1,Object.defineProperty(ze,"__esModule",{value:!0});const e=J(),n=Q(),S=On(),b={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:h}){const c=a==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${h} characters`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},code(a){const{keyword:h,data:c,schemaCode:m,it:$}=a,f=h==="maxLength"?e.operators.GT:e.operators.LT,P=$.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,n.useFunc)(a.gen,S.default)}(${c})`;a.fail$data((0,e._)`${P} ${f} ${m}`)}};return ze.default=b,ze}var Ke={},_r;function jn(){if(_r)return Ke;_r=1,Object.defineProperty(Ke,"__esModule",{value:!0});const e=le(),n=J(),d={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:b})=>(0,n.str)`must match pattern "${b}"`,params:({schemaCode:b})=>(0,n._)`{pattern: ${b}}`},code(b){const{data:a,$data:h,schema:c,schemaCode:m,it:$}=b,f=$.opts.unicodeRegExp?"u":"",P=h?(0,n._)`(new RegExp(${m}, ${f}))`:(0,e.usePattern)(b,c);b.fail$data((0,n._)`!${P}.test(${a})`)}};return Ke.default=d,Ke}var Le={},gr;function In(){if(gr)return Le;gr=1,Object.defineProperty(Le,"__esModule",{value:!0});const e=J(),S={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:d,schemaCode:b}){const a=d==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${b} properties`},params:({schemaCode:d})=>(0,e._)`{limit: ${d}}`},code(d){const{keyword:b,data:a,schemaCode:h}=d,c=b==="maxProperties"?e.operators.GT:e.operators.LT;d.fail$data((0,e._)`Object.keys(${a}).length ${c} ${h}`)}};return Le.default=S,Le}var He={},$r;function qn(){if($r)return He;$r=1,Object.defineProperty(He,"__esModule",{value:!0});const e=le(),n=J(),S=Q(),b={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:a}})=>(0,n.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,n._)`{missingProperty: ${a}}`},code(a){const{gen:h,schema:c,schemaCode:m,data:$,$data:f,it:P}=a,{opts:y}=P;if(!f&&c.length===0)return;const _=c.length>=y.loopRequired;if(P.allErrors?v():g(),y.strictRequired){const t=a.parentSchema.properties,{definedProperties:o}=a.it;for(const p of c)if(t?.[p]===void 0&&!o.has(p)){const r=P.schemaEnv.baseId+P.errSchemaPath,l=`required property "${p}" is not defined at "${r}" (strictRequired)`;(0,S.checkStrictMode)(P,l,P.opts.strictRequired)}}function v(){if(_||f)a.block$data(n.nil,s);else for(const t of c)(0,e.checkReportMissingProp)(a,t)}function g(){const t=h.let("missing");if(_||f){const o=h.let("valid",!0);a.block$data(o,()=>i(t,o)),a.ok(o)}else h.if((0,e.checkMissingProp)(a,c,t)),(0,e.reportMissingProp)(a,t),h.else()}function s(){h.forOf("prop",m,t=>{a.setParams({missingProperty:t}),h.if((0,e.noPropertyInData)(h,$,t,y.ownProperties),()=>a.error())})}function i(t,o){a.setParams({missingProperty:t}),h.forOf(t,m,()=>{h.assign(o,(0,e.propertyInData)(h,$,t,y.ownProperties)),h.if((0,n.not)(o),()=>{a.error(),h.break()})},n.nil)}}};return He.default=b,He}var Ge={},wr;function Tn(){if(wr)return Ge;wr=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e=J(),S={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:d,schemaCode:b}){const a=d==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${b} items`},params:({schemaCode:d})=>(0,e._)`{limit: ${d}}`},code(d){const{keyword:b,data:a,schemaCode:h}=d,c=b==="maxItems"?e.operators.GT:e.operators.LT;d.fail$data((0,e._)`${a}.length ${c} ${h}`)}};return Ge.default=S,Ge}var Je={},We={},br;function Dt(){if(br)return We;br=1,Object.defineProperty(We,"__esModule",{value:!0});const e=en();return e.code='require("ajv/dist/runtime/equal").default',We.default=e,We}var Er;function Cn(){if(Er)return Je;Er=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=pt(),n=J(),S=Q(),d=Dt(),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:h,j:c}})=>(0,n.str)`must NOT have duplicate items (items ## ${c} and ${h} are identical)`,params:({params:{i:h,j:c}})=>(0,n._)`{i: ${h}, j: ${c}}`},code(h){const{gen:c,data:m,$data:$,schema:f,parentSchema:P,schemaCode:y,it:_}=h;if(!$&&!f)return;const v=c.let("valid"),g=P.items?(0,e.getSchemaTypes)(P.items):[];h.block$data(v,s,(0,n._)`${y} === false`),h.ok(v);function s(){const p=c.let("i",(0,n._)`${m}.length`),r=c.let("j");h.setParams({i:p,j:r}),c.assign(v,!0),c.if((0,n._)`${p} > 1`,()=>(i()?t:o)(p,r))}function i(){return g.length>0&&!g.some(p=>p==="object"||p==="array")}function t(p,r){const l=c.name("item"),w=(0,e.checkDataTypes)(g,l,_.opts.strictNumbers,e.DataType.Wrong),j=c.const("indices",(0,n._)`{}`);c.for((0,n._)`;${p}--;`,()=>{c.let(l,(0,n._)`${m}[${p}]`),c.if(w,(0,n._)`continue`),g.length>1&&c.if((0,n._)`typeof ${l} == "string"`,(0,n._)`${l} += "_"`),c.if((0,n._)`typeof ${j}[${l}] == "number"`,()=>{c.assign(r,(0,n._)`${j}[${l}]`),h.error(),c.assign(v,!1).break()}).code((0,n._)`${j}[${l}] = ${p}`)})}function o(p,r){const l=(0,S.useFunc)(c,d.default),w=c.name("outer");c.label(w).for((0,n._)`;${p}--;`,()=>c.for((0,n._)`${r} = ${p}; ${r}--;`,()=>c.if((0,n._)`${l}(${m}[${p}], ${m}[${r}])`,()=>{h.error(),c.assign(v,!1).break(w)})))}}};return Je.default=a,Je}var Be={},Sr;function Dn(){if(Sr)return Be;Sr=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=J(),n=Q(),S=Dt(),b={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:a})=>(0,e._)`{allowedValue: ${a}}`},code(a){const{gen:h,data:c,$data:m,schemaCode:$,schema:f}=a;m||f&&typeof f=="object"?a.fail$data((0,e._)`!${(0,n.useFunc)(h,S.default)}(${c}, ${$})`):a.fail((0,e._)`${f} !== ${c}`)}};return Be.default=b,Be}var Qe={},Pr;function Mn(){if(Pr)return Qe;Pr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=J(),n=Q(),S=Dt(),b={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,e._)`{allowedValues: ${a}}`},code(a){const{gen:h,data:c,$data:m,schema:$,schemaCode:f,it:P}=a;if(!m&&$.length===0)throw new Error("enum must have non-empty array");const y=$.length>=P.opts.loopEnum;let _;const v=()=>_??(_=(0,n.useFunc)(h,S.default));let g;if(y||m)g=h.let("valid"),a.block$data(g,s);else{if(!Array.isArray($))throw new Error("ajv implementation error");const t=h.const("vSchema",f);g=(0,e.or)(...$.map((o,p)=>i(t,p)))}a.pass(g);function s(){h.assign(g,!1),h.forOf("v",f,t=>h.if((0,e._)`${v()}(${c}, ${t})`,()=>h.assign(g,!0).break()))}function i(t,o){const p=$[o];return typeof p=="object"&&p!==null?(0,e._)`${v()}(${c}, ${t}[${o}])`:(0,e._)`${c} === ${p}`}}};return Qe.default=b,Qe}var Nr;function An(){if(Nr)return Ae;Nr=1,Object.defineProperty(Ae,"__esModule",{value:!0});const e=Nn(),n=Rn(),S=kn(),d=jn(),b=In(),a=qn(),h=Tn(),c=Cn(),m=Dn(),$=Mn(),f=[e.default,n.default,S.default,d.default,b.default,a.default,h.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},m.default,$.default];return Ae.default=f,Ae}var Xe={},Ee={},Rr;function rn(){if(Rr)return Ee;Rr=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.validateAdditionalItems=void 0;const e=J(),n=Q(),d={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{parentSchema:h,it:c}=a,{items:m}=h;if(!Array.isArray(m)){(0,n.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}b(a,m)}};function b(a,h){const{gen:c,schema:m,data:$,keyword:f,it:P}=a;P.items=!0;const y=c.const("len",(0,e._)`${$}.length`);if(m===!1)a.setParams({len:h.length}),a.pass((0,e._)`${y} <= ${h.length}`);else if(typeof m=="object"&&!(0,n.alwaysValidSchema)(P,m)){const v=c.var("valid",(0,e._)`${y} <= ${h.length}`);c.if((0,e.not)(v),()=>_(v)),a.ok(v)}function _(v){c.forRange("i",h.length,y,g=>{a.subschema({keyword:f,dataProp:g,dataPropType:n.Type.Num},v),P.allErrors||c.if((0,e.not)(v),()=>c.break())})}}return Ee.validateAdditionalItems=b,Ee.default=d,Ee}var Ye={},Se={},Or;function nn(){if(Or)return Se;Or=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.validateTuple=void 0;const e=J(),n=Q(),S=le(),d={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:h,it:c}=a;if(Array.isArray(h))return b(a,"additionalItems",h);c.items=!0,!(0,n.alwaysValidSchema)(c,h)&&a.ok((0,S.validateArray)(a))}};function b(a,h,c=a.schema){const{gen:m,parentSchema:$,data:f,keyword:P,it:y}=a;g($),y.opts.unevaluated&&c.length&&y.items!==!0&&(y.items=n.mergeEvaluated.items(m,c.length,y.items));const _=m.name("valid"),v=m.const("len",(0,e._)`${f}.length`);c.forEach((s,i)=>{(0,n.alwaysValidSchema)(y,s)||(m.if((0,e._)`${v} > ${i}`,()=>a.subschema({keyword:P,schemaProp:i,dataProp:i},_)),a.ok(_))});function g(s){const{opts:i,errSchemaPath:t}=y,o=c.length,p=o===s.minItems&&(o===s.maxItems||s[h]===!1);if(i.strictTuples&&!p){const r=`"${P}" is ${o}-tuple, but minItems or maxItems/${h} are not specified or different at path "${t}"`;(0,n.checkStrictMode)(y,r,i.strictTuples)}}}return Se.validateTuple=b,Se.default=d,Se}var kr;function Vn(){if(kr)return Ye;kr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=nn(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:S=>(0,e.validateTuple)(S,"items")};return Ye.default=n,Ye}var Ze={},jr;function Un(){if(jr)return Ze;jr=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=J(),n=Q(),S=le(),d=rn(),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:h}})=>(0,e.str)`must NOT have more than ${h} items`,params:({params:{len:h}})=>(0,e._)`{limit: ${h}}`},code(h){const{schema:c,parentSchema:m,it:$}=h,{prefixItems:f}=m;$.items=!0,!(0,n.alwaysValidSchema)($,c)&&(f?(0,d.validateAdditionalItems)(h,f):h.ok((0,S.validateArray)(h)))}};return Ze.default=a,Ze}var xe={},Ir;function zn(){if(Ir)return xe;Ir=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=J(),n=Q(),d={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:b,max:a}})=>a===void 0?(0,e.str)`must contain at least ${b} valid item(s)`:(0,e.str)`must contain at least ${b} and no more than ${a} valid item(s)`,params:({params:{min:b,max:a}})=>a===void 0?(0,e._)`{minContains: ${b}}`:(0,e._)`{minContains: ${b}, maxContains: ${a}}`},code(b){const{gen:a,schema:h,parentSchema:c,data:m,it:$}=b;let f,P;const{minContains:y,maxContains:_}=c;$.opts.next?(f=y===void 0?1:y,P=_):f=1;const v=a.const("len",(0,e._)`${m}.length`);if(b.setParams({min:f,max:P}),P===void 0&&f===0){(0,n.checkStrictMode)($,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(P!==void 0&&f>P){(0,n.checkStrictMode)($,'"minContains" > "maxContains" is always invalid'),b.fail();return}if((0,n.alwaysValidSchema)($,h)){let o=(0,e._)`${v} >= ${f}`;P!==void 0&&(o=(0,e._)`${o} && ${v} <= ${P}`),b.pass(o);return}$.items=!0;const g=a.name("valid");P===void 0&&f===1?i(g,()=>a.if(g,()=>a.break())):f===0?(a.let(g,!0),P!==void 0&&a.if((0,e._)`${m}.length > 0`,s)):(a.let(g,!1),s()),b.result(g,()=>b.reset());function s(){const o=a.name("_valid"),p=a.let("count",0);i(o,()=>a.if(o,()=>t(p)))}function i(o,p){a.forRange("i",0,v,r=>{b.subschema({keyword:"contains",dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},o),p()})}function t(o){a.code((0,e._)`${o}++`),P===void 0?a.if((0,e._)`${o} >= ${f}`,()=>a.assign(g,!0).break()):(a.if((0,e._)`${o} > ${P}`,()=>a.assign(g,!1).break()),f===1?a.assign(g,!0):a.if((0,e._)`${o} >= ${f}`,()=>a.assign(g,!0)))}}};return xe.default=d,xe}var qt={},qr;function Fn(){return qr||(qr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const n=J(),S=Q(),d=le();e.error={message:({params:{property:m,depsCount:$,deps:f}})=>{const P=$===1?"property":"properties";return(0,n.str)`must have ${P} ${f} when property ${m} is present`},params:({params:{property:m,depsCount:$,deps:f,missingProperty:P}})=>(0,n._)`{property: ${m},
6
- missingProperty: ${P},
7
- depsCount: ${$},
8
- deps: ${f}}`};const b={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(m){const[$,f]=a(m);h(m,$),c(m,f)}};function a({schema:m}){const $={},f={};for(const P in m){if(P==="__proto__")continue;const y=Array.isArray(m[P])?$:f;y[P]=m[P]}return[$,f]}function h(m,$=m.schema){const{gen:f,data:P,it:y}=m;if(Object.keys($).length===0)return;const _=f.let("missing");for(const v in $){const g=$[v];if(g.length===0)continue;const s=(0,d.propertyInData)(f,P,v,y.opts.ownProperties);m.setParams({property:v,depsCount:g.length,deps:g.join(", ")}),y.allErrors?f.if(s,()=>{for(const i of g)(0,d.checkReportMissingProp)(m,i)}):(f.if((0,n._)`${s} && (${(0,d.checkMissingProp)(m,g,_)})`),(0,d.reportMissingProp)(m,_),f.else())}}e.validatePropertyDeps=h;function c(m,$=m.schema){const{gen:f,data:P,keyword:y,it:_}=m,v=f.name("valid");for(const g in $)(0,S.alwaysValidSchema)(_,$[g])||(f.if((0,d.propertyInData)(f,P,g,_.opts.ownProperties),()=>{const s=m.subschema({keyword:y,schemaProp:g},v);m.mergeValidEvaluated(s,v)},()=>f.var(v,!0)),m.ok(v))}e.validateSchemaDeps=c,e.default=b})(qt)),qt}var et={},Tr;function Kn(){if(Tr)return et;Tr=1,Object.defineProperty(et,"__esModule",{value:!0});const e=J(),n=Q(),d={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:b})=>(0,e._)`{propertyName: ${b.propertyName}}`},code(b){const{gen:a,schema:h,data:c,it:m}=b;if((0,n.alwaysValidSchema)(m,h))return;const $=a.name("valid");a.forIn("key",c,f=>{b.setParams({propertyName:f}),b.subschema({keyword:"propertyNames",data:f,dataTypes:["string"],propertyName:f,compositeRule:!0},$),a.if((0,e.not)($),()=>{b.error(!0),m.allErrors||a.break()})}),b.ok($)}};return et.default=d,et}var tt={},Cr;function sn(){if(Cr)return tt;Cr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=le(),n=J(),S=_e(),d=Q(),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:h})=>(0,n._)`{additionalProperty: ${h.additionalProperty}}`},code(h){const{gen:c,schema:m,parentSchema:$,data:f,errsCount:P,it:y}=h;if(!P)throw new Error("ajv implementation error");const{allErrors:_,opts:v}=y;if(y.props=!0,v.removeAdditional!=="all"&&(0,d.alwaysValidSchema)(y,m))return;const g=(0,e.allSchemaProperties)($.properties),s=(0,e.allSchemaProperties)($.patternProperties);i(),h.ok((0,n._)`${P} === ${S.default.errors}`);function i(){c.forIn("key",f,l=>{!g.length&&!s.length?p(l):c.if(t(l),()=>p(l))})}function t(l){let w;if(g.length>8){const j=(0,d.schemaRefOrVal)(y,$.properties,"properties");w=(0,e.isOwnProperty)(c,j,l)}else g.length?w=(0,n.or)(...g.map(j=>(0,n._)`${l} === ${j}`)):w=n.nil;return s.length&&(w=(0,n.or)(w,...s.map(j=>(0,n._)`${(0,e.usePattern)(h,j)}.test(${l})`))),(0,n.not)(w)}function o(l){c.code((0,n._)`delete ${f}[${l}]`)}function p(l){if(v.removeAdditional==="all"||v.removeAdditional&&m===!1){o(l);return}if(m===!1){h.setParams({additionalProperty:l}),h.error(),_||c.break();return}if(typeof m=="object"&&!(0,d.alwaysValidSchema)(y,m)){const w=c.name("valid");v.removeAdditional==="failing"?(r(l,w,!1),c.if((0,n.not)(w),()=>{h.reset(),o(l)})):(r(l,w),_||c.if((0,n.not)(w),()=>c.break()))}}function r(l,w,j){const C={keyword:"additionalProperties",dataProp:l,dataPropType:d.Type.Str};j===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),h.subschema(C,w)}}};return tt.default=a,tt}var rt={},Dr;function Ln(){if(Dr)return rt;Dr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=_t(),n=le(),S=Q(),d=sn(),b={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:h,schema:c,parentSchema:m,data:$,it:f}=a;f.opts.removeAdditional==="all"&&m.additionalProperties===void 0&&d.default.code(new e.KeywordCxt(f,d.default,"additionalProperties"));const P=(0,n.allSchemaProperties)(c);for(const s of P)f.definedProperties.add(s);f.opts.unevaluated&&P.length&&f.props!==!0&&(f.props=S.mergeEvaluated.props(h,(0,S.toHash)(P),f.props));const y=P.filter(s=>!(0,S.alwaysValidSchema)(f,c[s]));if(y.length===0)return;const _=h.name("valid");for(const s of y)v(s)?g(s):(h.if((0,n.propertyInData)(h,$,s,f.opts.ownProperties)),g(s),f.allErrors||h.else().var(_,!0),h.endIf()),a.it.definedProperties.add(s),a.ok(_);function v(s){return f.opts.useDefaults&&!f.compositeRule&&c[s].default!==void 0}function g(s){a.subschema({keyword:"properties",schemaProp:s,dataProp:s},_)}}};return rt.default=b,rt}var nt={},Mr;function Hn(){if(Mr)return nt;Mr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=le(),n=J(),S=Q(),d=Q(),b={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:h,schema:c,data:m,parentSchema:$,it:f}=a,{opts:P}=f,y=(0,e.allSchemaProperties)(c),_=y.filter(p=>(0,S.alwaysValidSchema)(f,c[p]));if(y.length===0||_.length===y.length&&(!f.opts.unevaluated||f.props===!0))return;const v=P.strictSchema&&!P.allowMatchingProperties&&$.properties,g=h.name("valid");f.props!==!0&&!(f.props instanceof n.Name)&&(f.props=(0,d.evaluatedPropsToName)(h,f.props));const{props:s}=f;i();function i(){for(const p of y)v&&t(p),f.allErrors?o(p):(h.var(g,!0),o(p),h.if(g))}function t(p){for(const r in v)new RegExp(p).test(r)&&(0,S.checkStrictMode)(f,`property ${r} matches pattern ${p} (use allowMatchingProperties)`)}function o(p){h.forIn("key",m,r=>{h.if((0,n._)`${(0,e.usePattern)(a,p)}.test(${r})`,()=>{const l=_.includes(p);l||a.subschema({keyword:"patternProperties",schemaProp:p,dataProp:r,dataPropType:d.Type.Str},g),f.opts.unevaluated&&s!==!0?h.assign((0,n._)`${s}[${r}]`,!0):!l&&!f.allErrors&&h.if((0,n.not)(g),()=>h.break())})})}}};return nt.default=b,nt}var st={},Ar;function Gn(){if(Ar)return st;Ar=1,Object.defineProperty(st,"__esModule",{value:!0});const e=Q(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(S){const{gen:d,schema:b,it:a}=S;if((0,e.alwaysValidSchema)(a,b)){S.fail();return}const h=d.name("valid");S.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},h),S.failResult(h,()=>S.reset(),()=>S.error())},error:{message:"must NOT be valid"}};return st.default=n,st}var at={},Vr;function Jn(){if(Vr)return at;Vr=1,Object.defineProperty(at,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:le().validateUnion,error:{message:"must match a schema in anyOf"}};return at.default=n,at}var ot={},Ur;function Wn(){if(Ur)return ot;Ur=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=J(),n=Q(),d={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:b})=>(0,e._)`{passingSchemas: ${b.passing}}`},code(b){const{gen:a,schema:h,parentSchema:c,it:m}=b;if(!Array.isArray(h))throw new Error("ajv implementation error");if(m.opts.discriminator&&c.discriminator)return;const $=h,f=a.let("valid",!1),P=a.let("passing",null),y=a.name("_valid");b.setParams({passing:P}),a.block(_),b.result(f,()=>b.reset(),()=>b.error(!0));function _(){$.forEach((v,g)=>{let s;(0,n.alwaysValidSchema)(m,v)?a.var(y,!0):s=b.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&a.if((0,e._)`${y} && ${f}`).assign(f,!1).assign(P,(0,e._)`[${P}, ${g}]`).else(),a.if(y,()=>{a.assign(f,!0),a.assign(P,g),s&&b.mergeEvaluated(s,e.Name)})})}}};return ot.default=d,ot}var it={},zr;function Bn(){if(zr)return it;zr=1,Object.defineProperty(it,"__esModule",{value:!0});const e=Q(),n={keyword:"allOf",schemaType:"array",code(S){const{gen:d,schema:b,it:a}=S;if(!Array.isArray(b))throw new Error("ajv implementation error");const h=d.name("valid");b.forEach((c,m)=>{if((0,e.alwaysValidSchema)(a,c))return;const $=S.subschema({keyword:"allOf",schemaProp:m},h);S.ok(h),S.mergeEvaluated($)})}};return it.default=n,it}var ut={},Fr;function Qn(){if(Fr)return ut;Fr=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=J(),n=Q(),d={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:a})=>(0,e.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,e._)`{failingKeyword: ${a.ifClause}}`},code(a){const{gen:h,parentSchema:c,it:m}=a;c.then===void 0&&c.else===void 0&&(0,n.checkStrictMode)(m,'"if" without "then" and "else" is ignored');const $=b(m,"then"),f=b(m,"else");if(!$&&!f)return;const P=h.let("valid",!0),y=h.name("_valid");if(_(),a.reset(),$&&f){const g=h.let("ifClause");a.setParams({ifClause:g}),h.if(y,v("then",g),v("else",g))}else $?h.if(y,v("then")):h.if((0,e.not)(y),v("else"));a.pass(P,()=>a.error(!0));function _(){const g=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);a.mergeEvaluated(g)}function v(g,s){return()=>{const i=a.subschema({keyword:g},y);h.assign(P,y),a.mergeValidEvaluated(i,P),s?h.assign(s,(0,e._)`${g}`):a.setParams({ifClause:g})}}}};function b(a,h){const c=a.schema[h];return c!==void 0&&!(0,n.alwaysValidSchema)(a,c)}return ut.default=d,ut}var ct={},Kr;function Xn(){if(Kr)return ct;Kr=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=Q(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:S,parentSchema:d,it:b}){d.if===void 0&&(0,e.checkStrictMode)(b,`"${S}" without "if" is ignored`)}};return ct.default=n,ct}var Lr;function Yn(){if(Lr)return Xe;Lr=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=rn(),n=Vn(),S=nn(),d=Un(),b=zn(),a=Fn(),h=Kn(),c=sn(),m=Ln(),$=Hn(),f=Gn(),P=Jn(),y=Wn(),_=Bn(),v=Qn(),g=Xn();function s(i=!1){const t=[f.default,P.default,y.default,_.default,v.default,g.default,h.default,c.default,a.default,m.default,$.default];return i?t.push(n.default,d.default):t.push(e.default,S.default),t.push(b.default),t}return Xe.default=s,Xe}var lt={},dt={},Hr;function Zn(){if(Hr)return dt;Hr=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=J(),S={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:d})=>(0,e.str)`must match format "${d}"`,params:({schemaCode:d})=>(0,e._)`{format: ${d}}`},code(d,b){const{gen:a,data:h,$data:c,schema:m,schemaCode:$,it:f}=d,{opts:P,errSchemaPath:y,schemaEnv:_,self:v}=f;if(!P.validateFormats)return;c?g():s();function g(){const i=a.scopeValue("formats",{ref:v.formats,code:P.code.formats}),t=a.const("fDef",(0,e._)`${i}[${$}]`),o=a.let("fType"),p=a.let("format");a.if((0,e._)`typeof ${t} == "object" && !(${t} instanceof RegExp)`,()=>a.assign(o,(0,e._)`${t}.type || "string"`).assign(p,(0,e._)`${t}.validate`),()=>a.assign(o,(0,e._)`"string"`).assign(p,t)),d.fail$data((0,e.or)(r(),l()));function r(){return P.strictSchema===!1?e.nil:(0,e._)`${$} && !${p}`}function l(){const w=_.$async?(0,e._)`(${t}.async ? await ${p}(${h}) : ${p}(${h}))`:(0,e._)`${p}(${h})`,j=(0,e._)`(typeof ${p} == "function" ? ${w} : ${p}.test(${h}))`;return(0,e._)`${p} && ${p} !== true && ${o} === ${b} && !${j}`}}function s(){const i=v.formats[m];if(!i){r();return}if(i===!0)return;const[t,o,p]=l(i);t===b&&d.pass(w());function r(){if(P.strictSchema===!1){v.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${m}" ignored in schema at path "${y}"`}}function l(j){const C=j instanceof RegExp?(0,e.regexpCode)(j):P.code.formats?(0,e._)`${P.code.formats}${(0,e.getProperty)(m)}`:void 0,A=a.scopeValue("formats",{key:m,ref:j,code:C});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${A}.validate`]:["string",j,A]}function w(){if(typeof i=="object"&&!(i instanceof RegExp)&&i.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${p}(${h})`}return typeof o=="function"?(0,e._)`${p}(${h})`:(0,e._)`${p}.test(${h})`}}}};return dt.default=S,dt}var Gr;function xn(){if(Gr)return lt;Gr=1,Object.defineProperty(lt,"__esModule",{value:!0});const n=[Zn().default];return lt.default=n,lt}var we={},Jr;function es(){return Jr||(Jr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.contentVocabulary=we.metadataVocabulary=void 0,we.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],we.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),we}var Wr;function ts(){if(Wr)return Ce;Wr=1,Object.defineProperty(Ce,"__esModule",{value:!0});const e=Pn(),n=An(),S=Yn(),d=xn(),b=es(),a=[e.default,n.default,(0,S.default)(),d.default,b.metadataVocabulary,b.contentVocabulary];return Ce.default=a,Ce}var ft={},Oe={},Br;function rs(){if(Br)return Oe;Br=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.DiscrError=void 0;var e;return(function(n){n.Tag="tag",n.Mapping="mapping"})(e||(Oe.DiscrError=e={})),Oe}var Qr;function ns(){if(Qr)return ft;Qr=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=J(),n=rs(),S=Ct(),d=gt(),b=Q(),h={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:m}})=>c===n.DiscrError.Tag?`tag "${m}" must be string`:`value of tag "${m}" must be in oneOf`,params:({params:{discrError:c,tag:m,tagName:$}})=>(0,e._)`{error: ${c}, tag: ${$}, tagValue: ${m}}`},code(c){const{gen:m,data:$,schema:f,parentSchema:P,it:y}=c,{oneOf:_}=P;if(!y.opts.discriminator)throw new Error("discriminator: requires discriminator option");const v=f.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(f.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=m.let("valid",!1),s=m.const("tag",(0,e._)`${$}${(0,e.getProperty)(v)}`);m.if((0,e._)`typeof ${s} == "string"`,()=>i(),()=>c.error(!1,{discrError:n.DiscrError.Tag,tag:s,tagName:v})),c.ok(g);function i(){const p=o();m.if(!1);for(const r in p)m.elseIf((0,e._)`${s} === ${r}`),m.assign(g,t(p[r]));m.else(),c.error(!1,{discrError:n.DiscrError.Mapping,tag:s,tagName:v}),m.endIf()}function t(p){const r=m.name("valid"),l=c.subschema({keyword:"oneOf",schemaProp:p},r);return c.mergeEvaluated(l,e.Name),r}function o(){var p;const r={},l=j(P);let w=!0;for(let V=0;V<_.length;V++){let L=_[V];if(L?.$ref&&!(0,b.schemaHasRulesButRef)(L,y.self.RULES)){const B=L.$ref;if(L=S.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,B),L instanceof S.SchemaEnv&&(L=L.schema),L===void 0)throw new d.default(y.opts.uriResolver,y.baseId,B)}const K=(p=L?.properties)===null||p===void 0?void 0:p[v];if(typeof K!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);w=w&&(l||j(L)),C(K,V)}if(!w)throw new Error(`discriminator: "${v}" must be required`);return r;function j({required:V}){return Array.isArray(V)&&V.includes(v)}function C(V,L){if(V.const)A(V.const,L);else if(V.enum)for(const K of V.enum)A(K,L);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function A(V,L){if(typeof V!="string"||V in r)throw new Error(`discriminator: "${v}" values must be unique strings`);r[V]=L}}}};return ft.default=h,ft}const ss="http://json-schema.org/draft-07/schema#",as="http://json-schema.org/draft-07/schema#",os="Core schema meta-schema",is={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},us=["object","boolean"],cs={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},ls={$schema:ss,$id:as,title:os,definitions:is,type:us,properties:cs,default:!0};var Xr;function fs(){return Xr||(Xr=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=n.Ajv=void 0;const S=bn(),d=ts(),b=ns(),a=ls,h=["/properties"],c="http://json-schema.org/draft-07/schema";class m extends S.default{_addVocabularies(){super._addVocabularies(),d.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(b.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const v=this.opts.$data?this.$dataMetaSchema(a,h):a;this.addMetaSchema(v,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}n.Ajv=m,e.exports=n=m,e.exports.Ajv=m,Object.defineProperty(n,"__esModule",{value:!0}),n.default=m;var $=_t();Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return $.KeywordCxt}});var f=J();Object.defineProperty(n,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var P=Tt();Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return P.default}});var y=gt();Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return y.default}})})(ke,ke.exports)),ke.exports}var ht={exports:{}},Yr;function hs(){return Yr||(Yr=1,(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const S={},d={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:f=>{var P;const y=(P=f?.max)!==null&&P!==void 0?P:2;return()=>Math.floor(Math.random()*y)},seq:f=>{var P;const y=(P=f?.name)!==null&&P!==void 0?P:"";return S[y]||(S[y]=0),()=>S[y]++}},b=Object.assign(a,{DEFAULTS:d});function a(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(f,P,y){if(!y.opts.useDefaults||y.compositeRule)return()=>!0;const _={};for(const g in f)_[g]=h(f[g]);const v=y.opts.useDefaults==="empty";return g=>{for(const s in f)(g[s]===void 0||v&&(g[s]===null||g[s]===""))&&(g[s]=_[s]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function h(f){return typeof f=="object"?c(f):m(f)}function c({func:f,args:P}){const y=d[f];return $(f,y),y(P)}function m(f=""){const P=d[f];return $(f,P),P()}function $(f,P){if(!P)throw new Error(`invalid "dynamicDefaults" keyword property value: ${f}`)}n.default=b,e.exports=b})(ht,ht.exports)),ht.exports}export{hs as a,fs as r};