@graffiti-garden/api 1.0.4 → 1.0.5
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/browser/ajv-Z3ABRV2J.js +9 -0
- package/dist/browser/ajv-Z3ABRV2J.js.map +7 -0
- package/dist/browser/chunk-YVLJX3HV.js +2 -0
- package/dist/browser/chunk-YVLJX3HV.js.map +7 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/cjs/1-api.js +26 -0
- package/dist/cjs/1-api.js.map +7 -0
- package/dist/cjs/2-types.js +41 -0
- package/dist/cjs/2-types.js.map +7 -0
- package/dist/cjs/3-errors.js +71 -0
- package/dist/cjs/3-errors.js.map +7 -0
- package/dist/cjs/4-utilities.js +84 -0
- package/dist/cjs/4-utilities.js.map +7 -0
- package/dist/cjs/5-runtime-types.js +181 -0
- package/dist/cjs/5-runtime-types.js.map +7 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/esm/1-api.js +6 -0
- package/dist/esm/1-api.js.map +7 -0
- package/dist/esm/2-types.js +21 -0
- package/dist/esm/2-types.js.map +7 -0
- package/dist/esm/3-errors.js +51 -0
- package/dist/esm/3-errors.js.map +7 -0
- package/dist/esm/4-utilities.js +54 -0
- package/dist/esm/4-utilities.js.map +7 -0
- package/dist/esm/5-runtime-types.js +174 -0
- package/dist/esm/5-runtime-types.js.map +7 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/src/1-api.d.ts +1 -1
- package/dist/src/1-api.d.ts.map +1 -1
- package/dist/src/4-utilities.d.ts +3 -1
- package/dist/src/4-utilities.d.ts.map +1 -1
- package/dist/src/5-runtime-types.d.ts +55 -0
- package/dist/src/5-runtime-types.d.ts.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/tests/discover.d.ts.map +1 -1
- package/dist/tests/utils.d.ts +1 -0
- package/dist/tests/utils.d.ts.map +1 -1
- package/dist/tests.mjs +11 -7
- package/dist/tests.mjs.map +2 -2
- package/package.json +10 -7
- package/src/1-api.ts +1 -1
- package/src/4-utilities.ts +28 -0
- package/src/5-runtime-types.ts +205 -0
- package/src/index.ts +1 -0
- package/tests/crud.ts +4 -4
- package/tests/discover.ts +4 -3
- package/tests/media.ts +2 -2
- package/tests/utils.ts +3 -0
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -7
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -7
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as g}from"./chunk-YVLJX3HV.js";var We=g(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.regexpCode=O.getEsmExportName=O.getProperty=O.safeStringify=O.stringify=O.strConcat=O.addCodeArg=O.str=O._=O.nil=O._Code=O.Name=O.IDENTIFIER=O._CodeOrName=void 0;var Ge=class{};O._CodeOrName=Ge;O.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var we=class extends Ge{constructor(e){if(super(),!O.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};O.Name=we;var Q=class extends Ge{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,s)=>(s instanceof we&&(r[s.str]=(r[s.str]||0)+1),r),{})}};O._Code=Q;O.nil=new Q("");function xs(t,...e){let r=[t[0]],s=0;for(;s<e.length;)or(r,e[s]),r.push(t[++s]);return new Q(r)}O._=xs;var nr=new Q("+");function Hs(t,...e){let r=[Je(t[0])],s=0;for(;s<e.length;)r.push(nr),or(r,e[s]),r.push(nr,Je(t[++s]));return $a(r),new Q(r)}O.str=Hs;function or(t,e){e instanceof Q?t.push(...e._items):e instanceof we?t.push(e):t.push(ba(e))}O.addCodeArg=or;function $a(t){let e=1;for(;e<t.length-1;){if(t[e]===nr){let r=va(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function va(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof we||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof we))return`"${t}${e.slice(1)}`}function wa(t,e){return e.emptyStr()?t:t.emptyStr()?e:Hs`${t}${e}`}O.strConcat=wa;function ba(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Je(Array.isArray(t)?t.join(","):t)}function Ea(t){return new Q(Je(t))}O.stringify=Ea;function Je(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}O.safeStringify=Je;function Sa(t){return typeof t=="string"&&O.IDENTIFIER.test(t)?new Q(`.${t}`):xs`[${t}]`}O.getProperty=Sa;function Pa(t){if(typeof t=="string"&&O.IDENTIFIER.test(t))return new Q(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}O.getEsmExportName=Pa;function Na(t){return new Q(t.toString())}O.regexpCode=Na});var ur=g(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.ValueScope=G.ValueScopeName=G.Scope=G.varKinds=G.UsedValueState=void 0;var H=We(),ar=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},vt;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(vt||(G.UsedValueState=vt={}));G.varKinds={const:new H.Name("const"),let:new H.Name("let"),var:new H.Name("var")};var wt=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof H.Name?e:this.name(e)}name(e){return new H.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};G.Scope=wt;var bt=class extends H.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:s}){this.value=e,this.scopePath=(0,H._)`.${new H.Name(r)}[${s}]`}};G.ValueScopeName=bt;var ka=(0,H._)`\n`,ir=class extends wt{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?ka:H.nil}}get(){return this._scope}name(e){return new bt(e,this._newName(e))}value(e,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,a=(s=r.key)!==null&&s!==void 0?s:r.ref,i=this._values[o];if(i){let c=i.get(a);if(c)return c}else i=this._values[o]=new Map;i.set(a,n);let u=this._scope[o]||(this._scope[o]=[]),l=u.length;return u[l]=r.ref,n.setValue(r,{property:o,itemIndex:l}),n}getValue(e,r){let s=this._values[e];if(s)return s.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,H._)`${e}${s.scopePath}`})}scopeCode(e=this._values,r,s){return this._reduceValues(e,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(e,r,s={},n){let o=H.nil;for(let a in e){let i=e[a];if(!i)continue;let u=s[a]=s[a]||new Map;i.forEach(l=>{if(u.has(l))return;u.set(l,vt.Started);let c=r(l);if(c){let d=this.opts.es5?G.varKinds.var:G.varKinds.const;o=(0,H._)`${o}${d} ${l} = ${c};${this.opts._n}`}else if(c=n?.(l))o=(0,H._)`${o}${c}${this.opts._n}`;else throw new ar(l);u.set(l,vt.Completed)})}return o}};G.ValueScope=ir});var S=g(E=>{"use strict";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;var k=We(),Z=ur(),pe=We();Object.defineProperty(E,"_",{enumerable:!0,get:function(){return pe._}});Object.defineProperty(E,"str",{enumerable:!0,get:function(){return pe.str}});Object.defineProperty(E,"strConcat",{enumerable:!0,get:function(){return pe.strConcat}});Object.defineProperty(E,"nil",{enumerable:!0,get:function(){return pe.nil}});Object.defineProperty(E,"getProperty",{enumerable:!0,get:function(){return pe.getProperty}});Object.defineProperty(E,"stringify",{enumerable:!0,get:function(){return pe.stringify}});Object.defineProperty(E,"regexpCode",{enumerable:!0,get:function(){return pe.regexpCode}});Object.defineProperty(E,"Name",{enumerable:!0,get:function(){return pe.Name}});var Nt=ur();Object.defineProperty(E,"Scope",{enumerable:!0,get:function(){return Nt.Scope}});Object.defineProperty(E,"ValueScope",{enumerable:!0,get:function(){return Nt.ValueScope}});Object.defineProperty(E,"ValueScopeName",{enumerable:!0,get:function(){return Nt.ValueScopeName}});Object.defineProperty(E,"varKinds",{enumerable:!0,get:function(){return Nt.varKinds}});E.operators={GT:new k._Code(">"),GTE:new k._Code(">="),LT:new k._Code("<"),LTE:new k._Code("<="),EQ:new k._Code("==="),NEQ:new k._Code("!=="),NOT:new k._Code("!"),OR:new k._Code("||"),AND:new k._Code("&&"),ADD:new k._Code("+")};var ce=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},cr=class extends ce{constructor(e,r,s){super(),this.varKind=e,this.name=r,this.rhs=s}render({es5:e,_n:r}){let s=e?Z.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Re(this.rhs,e,r)),this}get names(){return this.rhs instanceof k._CodeOrName?this.rhs.names:{}}},Et=class extends ce{constructor(e,r,s){super(),this.lhs=e,this.rhs=r,this.sideEffects=s}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof k.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Re(this.rhs,e,r),this}get names(){let e=this.lhs instanceof k.Name?{}:{...this.lhs.names};return Pt(e,this.rhs)}},lr=class extends Et{constructor(e,r,s,n){super(e,s,n),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},dr=class extends ce{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},fr=class extends ce{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},hr=class extends ce{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},pr=class extends ce{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Re(this.code,e,r),this}get names(){return this.code instanceof k._CodeOrName?this.code.names:{}}},Qe=class extends ce{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,s)=>r+s.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let s=e[r].optimizeNodes();Array.isArray(s)?e.splice(r,1,...s):s?e[r]=s:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:s}=this,n=s.length;for(;n--;){let o=s[n];o.optimizeNames(e,r)||(qa(e,o.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Se(e,r.names),{})}},le=class extends Qe{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},mr=class extends Qe{},Ie=class extends le{};Ie.kind="else";var be=class t extends le{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new Ie(s):s}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Gs(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Re(this.condition,e,r),this}get names(){let e=super.names;return Pt(e,this.condition),this.else&&Se(e,this.else.names),e}};be.kind="if";var Ee=class extends le{};Ee.kind="for";var yr=class extends Ee{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Re(this.iteration,e,r),this}get names(){return Se(super.names,this.iteration.names)}},_r=class extends Ee{constructor(e,r,s,n){super(),this.varKind=e,this.name=r,this.from=s,this.to=n}render(e){let r=e.es5?Z.varKinds.var:this.varKind,{name:s,from:n,to:o}=this;return`for(${r} ${s}=${n}; ${s}<${o}; ${s}++)`+super.render(e)}get names(){let e=Pt(super.names,this.from);return Pt(e,this.to)}},St=class extends Ee{constructor(e,r,s,n){super(),this.loop=e,this.varKind=r,this.name=s,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Re(this.iterable,e,r),this}get names(){return Se(super.names,this.iterable.names)}},Be=class extends le{constructor(e,r,s){super(),this.name=e,this.args=r,this.async=s}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Be.kind="func";var Xe=class extends Qe{render(e){return"return "+super.render(e)}};Xe.kind="return";var gr=class extends le{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var s,n;return super.optimizeNames(e,r),(s=this.catch)===null||s===void 0||s.optimizeNames(e,r),(n=this.finally)===null||n===void 0||n.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Se(e,this.catch.names),this.finally&&Se(e,this.finally.names),e}},Ye=class extends le{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ye.kind="catch";var Ze=class extends le{render(e){return"finally"+super.render(e)}};Ze.kind="finally";var $r=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
2
|
+
`:""},this._extScope=e,this._scope=new Z.Scope({parent:e}),this._nodes=[new mr]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let s=this._extScope.value(e,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,s,n){let o=this._scope.toName(r);return s!==void 0&&n&&(this._constants[o.str]=s),this._leafNode(new cr(e,o,s)),o}const(e,r,s){return this._def(Z.varKinds.const,e,r,s)}let(e,r,s){return this._def(Z.varKinds.let,e,r,s)}var(e,r,s){return this._def(Z.varKinds.var,e,r,s)}assign(e,r,s){return this._leafNode(new Et(e,r,s))}add(e,r){return this._leafNode(new lr(e,E.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==k.nil&&this._leafNode(new pr(e)),this}object(...e){let r=["{"];for(let[s,n]of e)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,k.addCodeArg)(r,n));return r.push("}"),new k._Code(r)}if(e,r,s){if(this._blockNode(new be(e)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new be(e))}else(){return this._elseNode(new Ie)}endIf(){return this._endBlockNode(be,Ie)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new yr(e),r)}forRange(e,r,s,n,o=this.opts.es5?Z.varKinds.var:Z.varKinds.let){let a=this._scope.toName(e);return this._for(new _r(o,a,r,s),()=>n(a))}forOf(e,r,s,n=Z.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof k.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,k._)`${a}.length`,i=>{this.var(o,(0,k._)`${a}[${i}]`),s(o)})}return this._for(new St("of",n,o,r),()=>s(o))}forIn(e,r,s,n=this.opts.es5?Z.varKinds.var:Z.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,k._)`Object.keys(${r})`,s);let o=this._scope.toName(e);return this._for(new St("in",n,o,r),()=>s(o))}endFor(){return this._endBlockNode(Ee)}label(e){return this._leafNode(new dr(e))}break(e){return this._leafNode(new fr(e))}return(e){let r=new Xe;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Xe)}try(e,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new gr;if(this._blockNode(n),this.code(e),r){let o=this.name("e");this._currNode=n.catch=new Ye(o),r(o)}return s&&(this._currNode=n.finally=new Ze,this.code(s)),this._endBlockNode(Ye,Ze)}throw(e){return this._leafNode(new hr(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||e!==void 0&&s!==e)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=k.nil,s,n){return this._blockNode(new Be(e,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(Be)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let s=this._currNode;if(s instanceof e||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof be))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};E.CodeGen=$r;function Se(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function Pt(t,e){return e instanceof k._CodeOrName?Se(t,e.names):t}function Re(t,e,r){if(t instanceof k.Name)return s(t);if(!n(t))return t;return new k._Code(t._items.reduce((o,a)=>(a instanceof k.Name&&(a=s(a)),a instanceof k._Code?o.push(...a._items):o.push(a),o),[]));function s(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function n(o){return o instanceof k._Code&&o._items.some(a=>a instanceof k.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function qa(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Gs(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,k._)`!${vr(t)}`}E.not=Gs;var ja=Js(E.operators.AND);function Oa(...t){return t.reduce(ja)}E.and=Oa;var Ia=Js(E.operators.OR);function Ra(...t){return t.reduce(Ia)}E.or=Ra;function Js(t){return(e,r)=>e===k.nil?r:r===k.nil?e:(0,k._)`${vr(e)} ${t} ${vr(r)}`}function vr(t){return t instanceof k.Name?t:(0,k._)`(${t})`}});var I=g(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.checkStrictMode=P.getErrorPath=P.Type=P.useFunc=P.setEvaluated=P.evaluatedPropsToName=P.mergeEvaluated=P.eachItem=P.unescapeJsonPointer=P.escapeJsonPointer=P.escapeFragment=P.unescapeFragment=P.schemaRefOrVal=P.schemaHasRulesButRef=P.schemaHasRules=P.checkUnknownRules=P.alwaysValidSchema=P.toHash=void 0;var T=S(),Ta=We();function Ca(t){let e={};for(let r of t)e[r]=!0;return e}P.toHash=Ca;function Ma(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Bs(t,e),!Xs(e,t.self.RULES.all))}P.alwaysValidSchema=Ma;function Bs(t,e=t.schema){let{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;let n=s.RULES.keywords;for(let o in e)n[o]||en(t,`unknown keyword: "${o}"`)}P.checkUnknownRules=Bs;function Xs(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}P.schemaHasRules=Xs;function Aa(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}P.schemaHasRulesButRef=Aa;function Da({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,T._)`${r}`}return(0,T._)`${t}${e}${(0,T.getProperty)(s)}`}P.schemaRefOrVal=Da;function Va(t){return Ys(decodeURIComponent(t))}P.unescapeFragment=Va;function za(t){return encodeURIComponent(br(t))}P.escapeFragment=za;function br(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}P.escapeJsonPointer=br;function Ys(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}P.unescapeJsonPointer=Ys;function Ua(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}P.eachItem=Ua;function Ws({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,o,a,i)=>{let u=a===void 0?o:a instanceof T.Name?(o instanceof T.Name?t(n,o,a):e(n,o,a),a):o instanceof T.Name?(e(n,a,o),o):r(o,a);return i===T.Name&&!(u instanceof T.Name)?s(n,u):u}}P.mergeEvaluated={props:Ws({mergeNames:(t,e,r)=>t.if((0,T._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,T._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,T._)`${r} || {}`).code((0,T._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,T._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,T._)`${r} || {}`),Er(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Zs}),items:Ws({mergeNames:(t,e,r)=>t.if((0,T._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,T._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,T._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,T._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Zs(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,T._)`{}`);return e!==void 0&&Er(t,r,e),r}P.evaluatedPropsToName=Zs;function Er(t,e,r){Object.keys(r).forEach(s=>t.assign((0,T._)`${e}${(0,T.getProperty)(s)}`,!0))}P.setEvaluated=Er;var Qs={};function Ka(t,e){return t.scopeValue("func",{ref:e,code:Qs[e.code]||(Qs[e.code]=new Ta._Code(e.code))})}P.useFunc=Ka;var wr;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(wr||(P.Type=wr={}));function Fa(t,e,r){if(t instanceof T.Name){let s=e===wr.Num;return r?s?(0,T._)`"[" + ${t} + "]"`:(0,T._)`"['" + ${t} + "']"`:s?(0,T._)`"/" + ${t}`:(0,T._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,T.getProperty)(t).toString():"/"+br(t)}P.getErrorPath=Fa;function en(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}P.checkStrictMode=en});var de=g(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});var U=S(),La={data:new U.Name("data"),valCxt:new U.Name("valCxt"),instancePath:new U.Name("instancePath"),parentData:new U.Name("parentData"),parentDataProperty:new U.Name("parentDataProperty"),rootData:new U.Name("rootData"),dynamicAnchors:new U.Name("dynamicAnchors"),vErrors:new U.Name("vErrors"),errors:new U.Name("errors"),this:new U.Name("this"),self:new U.Name("self"),scope:new U.Name("scope"),json:new U.Name("json"),jsonPos:new U.Name("jsonPos"),jsonLen:new U.Name("jsonLen"),jsonPart:new U.Name("jsonPart")};Sr.default=La});var et=g(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.extendErrors=K.resetErrorsCount=K.reportExtraError=K.reportError=K.keyword$DataError=K.keywordError=void 0;var j=S(),kt=I(),L=de();K.keywordError={message:({keyword:t})=>(0,j.str)`must pass "${t}" keyword validation`};K.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,j.str)`"${t}" keyword must be ${e} ($data)`:(0,j.str)`"${t}" keyword is invalid ($data)`};function xa(t,e=K.keywordError,r,s){let{it:n}=t,{gen:o,compositeRule:a,allErrors:i}=n,u=sn(t,e,r);s??(a||i)?tn(o,u):rn(n,(0,j._)`[${u}]`)}K.reportError=xa;function Ha(t,e=K.keywordError,r){let{it:s}=t,{gen:n,compositeRule:o,allErrors:a}=s,i=sn(t,e,r);tn(n,i),o||a||rn(s,L.default.vErrors)}K.reportExtraError=Ha;function Ga(t,e){t.assign(L.default.errors,e),t.if((0,j._)`${L.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,j._)`${L.default.vErrors}.length`,e),()=>t.assign(L.default.vErrors,null)))}K.resetErrorsCount=Ga;function Ja({gen:t,keyword:e,schemaValue:r,data:s,errsCount:n,it:o}){if(n===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",n,L.default.errors,i=>{t.const(a,(0,j._)`${L.default.vErrors}[${i}]`),t.if((0,j._)`${a}.instancePath === undefined`,()=>t.assign((0,j._)`${a}.instancePath`,(0,j.strConcat)(L.default.instancePath,o.errorPath))),t.assign((0,j._)`${a}.schemaPath`,(0,j.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,j._)`${a}.schema`,r),t.assign((0,j._)`${a}.data`,s))})}K.extendErrors=Ja;function tn(t,e){let r=t.const("err",e);t.if((0,j._)`${L.default.vErrors} === null`,()=>t.assign(L.default.vErrors,(0,j._)`[${r}]`),(0,j._)`${L.default.vErrors}.push(${r})`),t.code((0,j._)`${L.default.errors}++`)}function rn(t,e){let{gen:r,validateName:s,schemaEnv:n}=t;n.$async?r.throw((0,j._)`new ${t.ValidationError}(${e})`):(r.assign((0,j._)`${s}.errors`,e),r.return(!1))}var Pe={keyword:new j.Name("keyword"),schemaPath:new j.Name("schemaPath"),params:new j.Name("params"),propertyName:new j.Name("propertyName"),message:new j.Name("message"),schema:new j.Name("schema"),parentSchema:new j.Name("parentSchema")};function sn(t,e,r){let{createErrors:s}=t.it;return s===!1?(0,j._)`{}`:Wa(t,e,r)}function Wa(t,e,r={}){let{gen:s,it:n}=t,o=[Qa(n,r),Ba(t,r)];return Xa(t,e,o),s.object(...o)}function Qa({errorPath:t},{instancePath:e}){let r=e?(0,j.str)`${t}${(0,kt.getErrorPath)(e,kt.Type.Str)}`:t;return[L.default.instancePath,(0,j.strConcat)(L.default.instancePath,r)]}function Ba({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:s}){let n=s?e:(0,j.str)`${e}/${t}`;return r&&(n=(0,j.str)`${n}${(0,kt.getErrorPath)(r,kt.Type.Str)}`),[Pe.schemaPath,n]}function Xa(t,{params:e,message:r},s){let{keyword:n,data:o,schemaValue:a,it:i}=t,{opts:u,propertyName:l,topSchemaRef:c,schemaPath:d}=i;s.push([Pe.keyword,n],[Pe.params,typeof e=="function"?e(t):e||(0,j._)`{}`]),u.messages&&s.push([Pe.message,typeof r=="function"?r(t):r]),u.verbose&&s.push([Pe.schema,a],[Pe.parentSchema,(0,j._)`${c}${d}`],[L.default.data,o]),l&&s.push([Pe.propertyName,l])}});var on=g(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.boolOrEmptySchema=Te.topBoolOrEmptySchema=void 0;var Ya=et(),Za=S(),ei=de(),ti={message:"boolean schema is false"};function ri(t){let{gen:e,schema:r,validateName:s}=t;r===!1?nn(t,!1):typeof r=="object"&&r.$async===!0?e.return(ei.default.data):(e.assign((0,Za._)`${s}.errors`,null),e.return(!0))}Te.topBoolOrEmptySchema=ri;function si(t,e){let{gen:r,schema:s}=t;s===!1?(r.var(e,!1),nn(t)):r.var(e,!0)}Te.boolOrEmptySchema=si;function nn(t,e){let{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Ya.reportError)(n,ti,void 0,e)}});var Pr=g(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.getRules=Ce.isJSONType=void 0;var ni=["string","number","integer","boolean","null","object","array"],oi=new Set(ni);function ai(t){return typeof t=="string"&&oi.has(t)}Ce.isJSONType=ai;function ii(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Ce.getRules=ii});var Nr=g(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.shouldUseRule=me.shouldUseGroup=me.schemaHasRulesForType=void 0;function ui({schema:t,self:e},r){let s=e.RULES.types[r];return s&&s!==!0&&an(t,s)}me.schemaHasRulesForType=ui;function an(t,e){return e.rules.some(r=>un(t,r))}me.shouldUseGroup=an;function un(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}me.shouldUseRule=un});var tt=g(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.reportTypeError=F.checkDataTypes=F.checkDataType=F.coerceAndCheckDataType=F.getJSONTypes=F.getSchemaTypes=F.DataType=void 0;var ci=Pr(),li=Nr(),di=et(),b=S(),cn=I(),Me;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Me||(F.DataType=Me={}));function fi(t){let e=ln(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}F.getSchemaTypes=fi;function ln(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(ci.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}F.getJSONTypes=ln;function hi(t,e){let{gen:r,data:s,opts:n}=t,o=pi(e,n.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,li.schemaHasRulesForType)(t,e[0]));if(a){let i=qr(e,s,n.strictNumbers,Me.Wrong);r.if(i,()=>{o.length?mi(t,e,o):jr(t)})}return a}F.coerceAndCheckDataType=hi;var dn=new Set(["string","number","integer","boolean","null"]);function pi(t,e){return e?t.filter(r=>dn.has(r)||e==="array"&&r==="array"):[]}function mi(t,e,r){let{gen:s,data:n,opts:o}=t,a=s.let("dataType",(0,b._)`typeof ${n}`),i=s.let("coerced",(0,b._)`undefined`);o.coerceTypes==="array"&&s.if((0,b._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,b._)`${n}[0]`).assign(a,(0,b._)`typeof ${n}`).if(qr(e,n,o.strictNumbers),()=>s.assign(i,n))),s.if((0,b._)`${i} !== undefined`);for(let l of r)(dn.has(l)||l==="array"&&o.coerceTypes==="array")&&u(l);s.else(),jr(t),s.endIf(),s.if((0,b._)`${i} !== undefined`,()=>{s.assign(n,i),yi(t,i)});function u(l){switch(l){case"string":s.elseIf((0,b._)`${a} == "number" || ${a} == "boolean"`).assign(i,(0,b._)`"" + ${n}`).elseIf((0,b._)`${n} === null`).assign(i,(0,b._)`""`);return;case"number":s.elseIf((0,b._)`${a} == "boolean" || ${n} === null
|
|
3
|
+
|| (${a} == "string" && ${n} && ${n} == +${n})`).assign(i,(0,b._)`+${n}`);return;case"integer":s.elseIf((0,b._)`${a} === "boolean" || ${n} === null
|
|
4
|
+
|| (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(i,(0,b._)`+${n}`);return;case"boolean":s.elseIf((0,b._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(i,!1).elseIf((0,b._)`${n} === "true" || ${n} === 1`).assign(i,!0);return;case"null":s.elseIf((0,b._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(i,null);return;case"array":s.elseIf((0,b._)`${a} === "string" || ${a} === "number"
|
|
5
|
+
|| ${a} === "boolean" || ${n} === null`).assign(i,(0,b._)`[${n}]`)}}}function yi({gen:t,parentData:e,parentDataProperty:r},s){t.if((0,b._)`${e} !== undefined`,()=>t.assign((0,b._)`${e}[${r}]`,s))}function kr(t,e,r,s=Me.Correct){let n=s===Me.Correct?b.operators.EQ:b.operators.NEQ,o;switch(t){case"null":return(0,b._)`${e} ${n} null`;case"array":o=(0,b._)`Array.isArray(${e})`;break;case"object":o=(0,b._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,b._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,b._)`typeof ${e} ${n} ${t}`}return s===Me.Correct?o:(0,b.not)(o);function a(i=b.nil){return(0,b.and)((0,b._)`typeof ${e} == "number"`,i,r?(0,b._)`isFinite(${e})`:b.nil)}}F.checkDataType=kr;function qr(t,e,r,s){if(t.length===1)return kr(t[0],e,r,s);let n,o=(0,cn.toHash)(t);if(o.array&&o.object){let a=(0,b._)`typeof ${e} != "object"`;n=o.null?a:(0,b._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else n=b.nil;o.number&&delete o.integer;for(let a in o)n=(0,b.and)(n,kr(a,e,r,s));return n}F.checkDataTypes=qr;var _i={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,b._)`{type: ${t}}`:(0,b._)`{type: ${e}}`};function jr(t){let e=gi(t);(0,di.reportError)(e,_i)}F.reportTypeError=jr;function gi(t){let{gen:e,data:r,schema:s}=t,n=(0,cn.schemaRefOrVal)(t,s,"type");return{gen:e,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:t}}});var hn=g(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.assignDefaults=void 0;var Ae=S(),$i=I();function vi(t,e){let{properties:r,items:s}=t.schema;if(e==="object"&&r)for(let n in r)fn(t,n,r[n].default);else e==="array"&&Array.isArray(s)&&s.forEach((n,o)=>fn(t,o,n.default))}qt.assignDefaults=vi;function fn(t,e,r){let{gen:s,compositeRule:n,data:o,opts:a}=t;if(r===void 0)return;let i=(0,Ae._)`${o}${(0,Ae.getProperty)(e)}`;if(n){(0,$i.checkStrictMode)(t,`default is ignored for: ${i}`);return}let u=(0,Ae._)`${i} === undefined`;a.useDefaults==="empty"&&(u=(0,Ae._)`${u} || ${i} === null || ${i} === ""`),s.if(u,(0,Ae._)`${i} = ${(0,Ae.stringify)(r)}`)}});var B=g(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.validateUnion=R.validateArray=R.usePattern=R.callValidateCode=R.schemaProperties=R.allSchemaProperties=R.noPropertyInData=R.propertyInData=R.isOwnProperty=R.hasPropFunc=R.reportMissingProp=R.checkMissingProp=R.checkReportMissingProp=void 0;var M=S(),Or=I(),ye=de(),wi=I();function bi(t,e){let{gen:r,data:s,it:n}=t;r.if(Rr(r,s,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,M._)`${e}`},!0),t.error()})}R.checkReportMissingProp=bi;function Ei({gen:t,data:e,it:{opts:r}},s,n){return(0,M.or)(...s.map(o=>(0,M.and)(Rr(t,e,o,r.ownProperties),(0,M._)`${n} = ${o}`)))}R.checkMissingProp=Ei;function Si(t,e){t.setParams({missingProperty:e},!0),t.error()}R.reportMissingProp=Si;function pn(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,M._)`Object.prototype.hasOwnProperty`})}R.hasPropFunc=pn;function Ir(t,e,r){return(0,M._)`${pn(t)}.call(${e}, ${r})`}R.isOwnProperty=Ir;function Pi(t,e,r,s){let n=(0,M._)`${e}${(0,M.getProperty)(r)} !== undefined`;return s?(0,M._)`${n} && ${Ir(t,e,r)}`:n}R.propertyInData=Pi;function Rr(t,e,r,s){let n=(0,M._)`${e}${(0,M.getProperty)(r)} === undefined`;return s?(0,M.or)(n,(0,M.not)(Ir(t,e,r))):n}R.noPropertyInData=Rr;function mn(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}R.allSchemaProperties=mn;function Ni(t,e){return mn(e).filter(r=>!(0,Or.alwaysValidSchema)(t,e[r]))}R.schemaProperties=Ni;function ki({schemaCode:t,data:e,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:o},it:a},i,u,l){let c=l?(0,M._)`${t}, ${e}, ${s}${n}`:e,d=[[ye.default.instancePath,(0,M.strConcat)(ye.default.instancePath,o)],[ye.default.parentData,a.parentData],[ye.default.parentDataProperty,a.parentDataProperty],[ye.default.rootData,ye.default.rootData]];a.opts.dynamicRef&&d.push([ye.default.dynamicAnchors,ye.default.dynamicAnchors]);let y=(0,M._)`${c}, ${r.object(...d)}`;return u!==M.nil?(0,M._)`${i}.call(${u}, ${y})`:(0,M._)`${i}(${y})`}R.callValidateCode=ki;var qi=(0,M._)`new RegExp`;function ji({gen:t,it:{opts:e}},r){let s=e.unicodeRegExp?"u":"",{regExp:n}=e.code,o=n(r,s);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,M._)`${n.code==="new RegExp"?qi:(0,wi.useFunc)(t,n)}(${r}, ${s})`})}R.usePattern=ji;function Oi(t){let{gen:e,data:r,keyword:s,it:n}=t,o=e.name("valid");if(n.allErrors){let i=e.let("valid",!0);return a(()=>e.assign(i,!1)),i}return e.var(o,!0),a(()=>e.break()),o;function a(i){let u=e.const("len",(0,M._)`${r}.length`);e.forRange("i",0,u,l=>{t.subschema({keyword:s,dataProp:l,dataPropType:Or.Type.Num},o),e.if((0,M.not)(o),i)})}}R.validateArray=Oi;function Ii(t){let{gen:e,schema:r,keyword:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,Or.alwaysValidSchema)(n,u))&&!n.opts.unevaluated)return;let a=e.let("valid",!1),i=e.name("_valid");e.block(()=>r.forEach((u,l)=>{let c=t.subschema({keyword:s,schemaProp:l,compositeRule:!0},i);e.assign(a,(0,M._)`${a} || ${i}`),t.mergeValidEvaluated(c,i)||e.if((0,M.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}R.validateUnion=Ii});var gn=g(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.validateKeywordUsage=ne.validSchemaType=ne.funcKeywordCode=ne.macroKeywordCode=void 0;var x=S(),Ne=de(),Ri=B(),Ti=et();function Ci(t,e){let{gen:r,keyword:s,schema:n,parentSchema:o,it:a}=t,i=e.macro.call(a.self,n,o,a),u=_n(r,s,i);a.opts.validateSchema!==!1&&a.self.validateSchema(i,!0);let l=r.name("valid");t.subschema({schema:i,schemaPath:x.nil,errSchemaPath:`${a.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}ne.macroKeywordCode=Ci;function Mi(t,e){var r;let{gen:s,keyword:n,schema:o,parentSchema:a,$data:i,it:u}=t;Di(u,e);let l=!i&&e.compile?e.compile.call(u.self,o,a,u):e.validate,c=_n(s,n,l),d=s.let("valid");t.block$data(d,y),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function y(){if(e.errors===!1)f(),e.modifying&&yn(t),p(()=>t.error());else{let _=e.async?m():h();e.modifying&&yn(t),p(()=>Ai(t,_))}}function m(){let _=s.let("ruleErrs",null);return s.try(()=>f((0,x._)`await `),q=>s.assign(d,!1).if((0,x._)`${q} instanceof ${u.ValidationError}`,()=>s.assign(_,(0,x._)`${q}.errors`),()=>s.throw(q))),_}function h(){let _=(0,x._)`${c}.errors`;return s.assign(_,null),f(x.nil),_}function f(_=e.async?(0,x._)`await `:x.nil){let q=u.opts.passContext?Ne.default.this:Ne.default.self,N=!("compile"in e&&!i||e.schema===!1);s.assign(d,(0,x._)`${_}${(0,Ri.callValidateCode)(t,c,q,N)}`,e.modifying)}function p(_){var q;s.if((0,x.not)((q=e.valid)!==null&&q!==void 0?q:d),_)}}ne.funcKeywordCode=Mi;function yn(t){let{gen:e,data:r,it:s}=t;e.if(s.parentData,()=>e.assign(r,(0,x._)`${s.parentData}[${s.parentDataProperty}]`))}function Ai(t,e){let{gen:r}=t;r.if((0,x._)`Array.isArray(${e})`,()=>{r.assign(Ne.default.vErrors,(0,x._)`${Ne.default.vErrors} === null ? ${e} : ${Ne.default.vErrors}.concat(${e})`).assign(Ne.default.errors,(0,x._)`${Ne.default.vErrors}.length`),(0,Ti.extendErrors)(t)},()=>t.error())}function Di({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function _n(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,x.stringify)(r)})}function Vi(t,e,r=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(t):s==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==s||r&&typeof t>"u")}ne.validSchemaType=Vi;function zi({schema:t,opts:e,self:r,errSchemaPath:s},n,o){if(Array.isArray(n.keyword)?!n.keyword.includes(o):n.keyword!==o)throw new Error("ajv implementation error");let a=n.dependencies;if(a?.some(i=>!Object.prototype.hasOwnProperty.call(t,i)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[o])){let u=`keyword "${o}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}ne.validateKeywordUsage=zi});var vn=g(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.extendSubschemaMode=_e.extendSubschemaData=_e.getSubschema=void 0;var oe=S(),$n=I();function Ui(t,{keyword:e,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let i=t.schema[e];return r===void 0?{schema:i,schemaPath:(0,oe._)`${t.schemaPath}${(0,oe.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:i[r],schemaPath:(0,oe._)`${t.schemaPath}${(0,oe.getProperty)(e)}${(0,oe.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,$n.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}_e.getSubschema=Ui;function Ki(t,e,{dataProp:r,dataPropType:s,data:n,dataTypes:o,propertyName:a}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:i}=e;if(r!==void 0){let{errorPath:l,dataPathArr:c,opts:d}=e,y=i.let("data",(0,oe._)`${e.data}${(0,oe.getProperty)(r)}`,!0);u(y),t.errorPath=(0,oe.str)`${l}${(0,$n.getErrorPath)(r,s,d.jsPropertySyntax)}`,t.parentDataProperty=(0,oe._)`${r}`,t.dataPathArr=[...c,t.parentDataProperty]}if(n!==void 0){let l=n instanceof oe.Name?n:i.let("data",n,!0);u(l),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function u(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}_e.extendSubschemaData=Ki;function Fi(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:o}){s!==void 0&&(t.compositeRule=s),n!==void 0&&(t.createErrors=n),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}_e.extendSubschemaMode=Fi});var Tr=g((of,wn)=>{"use strict";wn.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var s,n,o;if(Array.isArray(e)){if(s=e.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),s=o.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=s;n--!==0;){var a=o[n];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}});var En=g((af,bn)=>{"use strict";var ge=bn.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};jt(e,s,n,t,"",t)};ge.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};ge.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};ge.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};ge.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 jt(t,e,r,s,n,o,a,i,u,l){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,o,a,i,u,l);for(var c in s){var d=s[c];if(Array.isArray(d)){if(c in ge.arrayKeywords)for(var y=0;y<d.length;y++)jt(t,e,r,d[y],n+"/"+c+"/"+y,o,n,c,s,y)}else if(c in ge.propsKeywords){if(d&&typeof d=="object")for(var m in d)jt(t,e,r,d[m],n+"/"+c+"/"+Li(m),o,n,c,s,m)}else(c in ge.keywords||t.allKeys&&!(c in ge.skipKeywords))&&jt(t,e,r,d,n+"/"+c,o,n,c,s)}r(s,n,o,a,i,u,l)}}function Li(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var rt=g(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.getSchemaRefs=J.resolveUrl=J.normalizeId=J._getFullPath=J.getFullPath=J.inlineRef=void 0;var xi=I(),Hi=Tr(),Gi=En(),Ji=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Wi(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Cr(t):e?Sn(t)<=e:!1}J.inlineRef=Wi;var Qi=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Cr(t){for(let e in t){if(Qi.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Cr)||typeof r=="object"&&Cr(r))return!0}return!1}function Sn(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Ji.has(r)&&(typeof t[r]=="object"&&(0,xi.eachItem)(t[r],s=>e+=Sn(s)),e===1/0))return 1/0}return e}function Pn(t,e="",r){r!==!1&&(e=De(e));let s=t.parse(e);return Nn(t,s)}J.getFullPath=Pn;function Nn(t,e){return t.serialize(e).split("#")[0]+"#"}J._getFullPath=Nn;var Bi=/#\/?$/;function De(t){return t?t.replace(Bi,""):""}J.normalizeId=De;function Xi(t,e,r){return r=De(r),t.resolve(e,r)}J.resolveUrl=Xi;var Yi=/^[a-z_][-a-z0-9._]*$/i;function Zi(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:s}=this.opts,n=De(t[r]||e),o={"":n},a=Pn(s,n,!1),i={},u=new Set;return Gi(t,{allKeys:!0},(d,y,m,h)=>{if(h===void 0)return;let f=a+y,p=o[h];typeof d[r]=="string"&&(p=_.call(this,d[r])),q.call(this,d.$anchor),q.call(this,d.$dynamicAnchor),o[y]=p;function _(N){let C=this.opts.uriResolver.resolve;if(N=De(p?C(p,N):N),u.has(N))throw c(N);u.add(N);let w=this.refs[N];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?l(d,w.schema,N):N!==De(f)&&(N[0]==="#"?(l(d,i[N],N),i[N]=d):this.refs[N]=f),N}function q(N){if(typeof N=="string"){if(!Yi.test(N))throw new Error(`invalid anchor "${N}"`);_.call(this,`#${N}`)}}}),i;function l(d,y,m){if(y!==void 0&&!Hi(d,y))throw c(m)}function c(d){return new Error(`reference "${d}" resolves to more than one schema`)}}J.getSchemaRefs=Zi});var ot=g($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.getData=$e.KeywordCxt=$e.validateFunctionCode=void 0;var In=on(),kn=tt(),Ar=Nr(),Ot=tt(),eu=hn(),nt=gn(),Mr=vn(),$=S(),v=de(),tu=rt(),fe=I(),st=et();function ru(t){if(Cn(t)&&(Mn(t),Tn(t))){ou(t);return}Rn(t,()=>(0,In.topBoolOrEmptySchema)(t))}$e.validateFunctionCode=ru;function Rn({gen:t,validateName:e,schema:r,schemaEnv:s,opts:n},o){n.code.es5?t.func(e,(0,$._)`${v.default.data}, ${v.default.valCxt}`,s.$async,()=>{t.code((0,$._)`"use strict"; ${qn(r,n)}`),nu(t,n),t.code(o)}):t.func(e,(0,$._)`${v.default.data}, ${su(n)}`,s.$async,()=>t.code(qn(r,n)).code(o))}function su(t){return(0,$._)`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${t.dynamicRef?(0,$._)`, ${v.default.dynamicAnchors}={}`:$.nil}}={}`}function nu(t,e){t.if(v.default.valCxt,()=>{t.var(v.default.instancePath,(0,$._)`${v.default.valCxt}.${v.default.instancePath}`),t.var(v.default.parentData,(0,$._)`${v.default.valCxt}.${v.default.parentData}`),t.var(v.default.parentDataProperty,(0,$._)`${v.default.valCxt}.${v.default.parentDataProperty}`),t.var(v.default.rootData,(0,$._)`${v.default.valCxt}.${v.default.rootData}`),e.dynamicRef&&t.var(v.default.dynamicAnchors,(0,$._)`${v.default.valCxt}.${v.default.dynamicAnchors}`)},()=>{t.var(v.default.instancePath,(0,$._)`""`),t.var(v.default.parentData,(0,$._)`undefined`),t.var(v.default.parentDataProperty,(0,$._)`undefined`),t.var(v.default.rootData,v.default.data),e.dynamicRef&&t.var(v.default.dynamicAnchors,(0,$._)`{}`)})}function ou(t){let{schema:e,opts:r,gen:s}=t;Rn(t,()=>{r.$comment&&e.$comment&&Dn(t),lu(t),s.let(v.default.vErrors,null),s.let(v.default.errors,0),r.unevaluated&&au(t),An(t),hu(t)})}function au(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,$._)`${r}.evaluated`),e.if((0,$._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,$._)`${t.evaluated}.props`,(0,$._)`undefined`)),e.if((0,$._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,$._)`${t.evaluated}.items`,(0,$._)`undefined`))}function qn(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,$._)`/*# sourceURL=${r} */`:$.nil}function iu(t,e){if(Cn(t)&&(Mn(t),Tn(t))){uu(t,e);return}(0,In.boolOrEmptySchema)(t,e)}function Tn({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function Cn(t){return typeof t.schema!="boolean"}function uu(t,e){let{schema:r,gen:s,opts:n}=t;n.$comment&&r.$comment&&Dn(t),du(t),fu(t);let o=s.const("_errs",v.default.errors);An(t,o),s.var(e,(0,$._)`${o} === ${v.default.errors}`)}function Mn(t){(0,fe.checkUnknownRules)(t),cu(t)}function An(t,e){if(t.opts.jtd)return jn(t,[],!1,e);let r=(0,kn.getSchemaTypes)(t.schema),s=(0,kn.coerceAndCheckDataType)(t,r);jn(t,r,!s,e)}function cu(t){let{schema:e,errSchemaPath:r,opts:s,self:n}=t;e.$ref&&s.ignoreKeywordsWithRef&&(0,fe.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function lu(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,fe.checkStrictMode)(t,"default is ignored in the schema root")}function du(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,tu.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function fu(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Dn({gen:t,schemaEnv:e,schema:r,errSchemaPath:s,opts:n}){let o=r.$comment;if(n.$comment===!0)t.code((0,$._)`${v.default.self}.logger.log(${o})`);else if(typeof n.$comment=="function"){let a=(0,$.str)`${s}/$comment`,i=t.scopeValue("root",{ref:e.root});t.code((0,$._)`${v.default.self}.opts.$comment(${o}, ${a}, ${i}.schema)`)}}function hu(t){let{gen:e,schemaEnv:r,validateName:s,ValidationError:n,opts:o}=t;r.$async?e.if((0,$._)`${v.default.errors} === 0`,()=>e.return(v.default.data),()=>e.throw((0,$._)`new ${n}(${v.default.vErrors})`)):(e.assign((0,$._)`${s}.errors`,v.default.vErrors),o.unevaluated&&pu(t),e.return((0,$._)`${v.default.errors} === 0`))}function pu({gen:t,evaluated:e,props:r,items:s}){r instanceof $.Name&&t.assign((0,$._)`${e}.props`,r),s instanceof $.Name&&t.assign((0,$._)`${e}.items`,s)}function jn(t,e,r,s){let{gen:n,schema:o,data:a,allErrors:i,opts:u,self:l}=t,{RULES:c}=l;if(o.$ref&&(u.ignoreKeywordsWithRef||!(0,fe.schemaHasRulesButRef)(o,c))){n.block(()=>zn(t,"$ref",c.all.$ref.definition));return}u.jtd||mu(t,e),n.block(()=>{for(let y of c.rules)d(y);d(c.post)});function d(y){(0,Ar.shouldUseGroup)(o,y)&&(y.type?(n.if((0,Ot.checkDataType)(y.type,a,u.strictNumbers)),On(t,y),e.length===1&&e[0]===y.type&&r&&(n.else(),(0,Ot.reportTypeError)(t)),n.endIf()):On(t,y),i||n.if((0,$._)`${v.default.errors} === ${s||0}`))}}function On(t,e){let{gen:r,schema:s,opts:{useDefaults:n}}=t;n&&(0,eu.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Ar.shouldUseRule)(s,o)&&zn(t,o.keyword,o.definition,e.type)})}function mu(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(yu(t,e),t.opts.allowUnionTypes||_u(t,e),gu(t,t.dataTypes))}function yu(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Vn(t.dataTypes,r)||Dr(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),vu(t,e)}}function _u(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Dr(t,"use allowUnionTypes to allow union type keyword")}function gu(t,e){let r=t.self.RULES.all;for(let s in r){let n=r[s];if(typeof n=="object"&&(0,Ar.shouldUseRule)(t.schema,n)){let{type:o}=n.definition;o.length&&!o.some(a=>$u(e,a))&&Dr(t,`missing type "${o.join(",")}" for keyword "${s}"`)}}}function $u(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Vn(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function vu(t,e){let r=[];for(let s of t.dataTypes)Vn(e,s)?r.push(s):e.includes("integer")&&s==="number"&&r.push("integer");t.dataTypes=r}function Dr(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,fe.checkStrictMode)(t,e,t.opts.strictTypes)}var It=class{constructor(e,r,s){if((0,nt.validateKeywordUsage)(e,r,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,fe.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Un(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,nt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",v.default.errors))}result(e,r,s){this.failResult((0,$.not)(e),r,s)}failResult(e,r,s){this.gen.if(e),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,$.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0,$._)`${r} !== undefined && (${(0,$.or)(this.invalid$data(),e)})`)}error(e,r,s){if(r){this.setParams(r),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,r){(e?st.reportExtraError:st.reportError)(this,this.def.error,r)}$dataError(){(0,st.reportError)(this,this.def.$dataError||st.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,st.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,s=$.nil){this.gen.block(()=>{this.check$data(e,s),r()})}check$data(e=$.nil,r=$.nil){if(!this.$data)return;let{gen:s,schemaCode:n,schemaType:o,def:a}=this;s.if((0,$.or)((0,$._)`${n} === undefined`,r)),e!==$.nil&&s.assign(e,!0),(o.length||a.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==$.nil&&s.assign(e,!1)),s.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:s,def:n,it:o}=this;return(0,$.or)(a(),i());function a(){if(s.length){if(!(r instanceof $.Name))throw new Error("ajv implementation error");let u=Array.isArray(s)?s:[s];return(0,$._)`${(0,Ot.checkDataTypes)(u,r,o.opts.strictNumbers,Ot.DataType.Wrong)}`}return $.nil}function i(){if(n.validateSchema){let u=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,$._)`!${u}(${r})`}return $.nil}}subschema(e,r){let s=(0,Mr.getSubschema)(this.it,e);(0,Mr.extendSubschemaData)(s,this.it,e),(0,Mr.extendSubschemaMode)(s,e);let n={...this.it,...s,items:void 0,props:void 0};return iu(n,r),n}mergeEvaluated(e,r){let{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=fe.mergeEvaluated.props(n,e.props,s.props,r)),s.items!==!0&&e.items!==void 0&&(s.items=fe.mergeEvaluated.items(n,e.items,s.items,r)))}mergeValidEvaluated(e,r){let{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,$.Name)),!0}};$e.KeywordCxt=It;function zn(t,e,r,s){let n=new It(t,r,e);"code"in r?r.code(n,s):n.$data&&r.validate?(0,nt.funcKeywordCode)(n,r):"macro"in r?(0,nt.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,nt.funcKeywordCode)(n,r)}var wu=/^\/(?:[^~]|~0|~1)*$/,bu=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Un(t,{dataLevel:e,dataNames:r,dataPathArr:s}){let n,o;if(t==="")return v.default.rootData;if(t[0]==="/"){if(!wu.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,o=v.default.rootData}else{let l=bu.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let c=+l[1];if(n=l[2],n==="#"){if(c>=e)throw new Error(u("property/index",c));return s[e-c]}if(c>e)throw new Error(u("data",c));if(o=r[e-c],!n)return o}let a=o,i=n.split("/");for(let l of i)l&&(o=(0,$._)`${o}${(0,$.getProperty)((0,fe.unescapeJsonPointer)(l))}`,a=(0,$._)`${a} && ${o}`);return a;function u(l,c){return`Cannot access ${l} ${c} levels up, current level is ${e}`}}$e.getData=Un});var Rt=g(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});var Vr=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};zr.default=Vr});var at=g(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});var Ur=rt(),Kr=class extends Error{constructor(e,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,Ur.resolveUrl)(e,r,s),this.missingSchema=(0,Ur.normalizeId)((0,Ur.getFullPath)(e,this.missingRef))}};Fr.default=Kr});var Ct=g(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.resolveSchema=X.getCompilingSchema=X.resolveRef=X.compileSchema=X.SchemaEnv=void 0;var ee=S(),Eu=Rt(),ke=de(),te=rt(),Kn=I(),Su=ot(),Ve=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,te.normalizeId)(s?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s?.$async,this.refs={}}};X.SchemaEnv=Ve;function xr(t){let e=Fn.call(this,t);if(e)return e;let r=(0,te.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:o}=this.opts,a=new ee.CodeGen(this.scope,{es5:s,lines:n,ownProperties:o}),i;t.$async&&(i=a.scopeValue("Error",{ref:Eu.default,code:(0,ee._)`require("ajv/dist/runtime/validation_error").default`}));let u=a.scopeName("validate");t.validateName=u;let l={gen:a,allErrors:this.opts.allErrors,data:ke.default.data,parentData:ke.default.parentData,parentDataProperty:ke.default.parentDataProperty,dataNames:[ke.default.data],dataPathArr:[ee.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,ee.stringify)(t.schema)}:{ref:t.schema}),validateName:u,ValidationError:i,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ee.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ee._)`""`,opts:this.opts,self:this},c;try{this._compilations.add(t),(0,Su.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let d=a.toString();c=`${a.scopeRefs(ke.default.scope)}return ${d}`,this.opts.code.process&&(c=this.opts.code.process(c,t));let m=new Function(`${ke.default.self}`,`${ke.default.scope}`,c)(this,this.scope.get());if(this.scope.value(u,{ref:m}),m.errors=null,m.schema=t.schema,m.schemaEnv=t,t.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:u,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:h,items:f}=l;m.evaluated={props:h instanceof ee.Name?void 0:h,items:f instanceof ee.Name?void 0:f,dynamicProps:h instanceof ee.Name,dynamicItems:f instanceof ee.Name},m.source&&(m.source.evaluated=(0,ee.stringify)(m.evaluated))}return t.validate=m,t}catch(d){throw delete t.validate,delete t.validateName,c&&this.logger.error("Error compiling schema, function code:",c),d}finally{this._compilations.delete(t)}}X.compileSchema=xr;function Pu(t,e,r){var s;r=(0,te.resolveUrl)(this.opts.uriResolver,e,r);let n=t.refs[r];if(n)return n;let o=qu.call(this,t,r);if(o===void 0){let a=(s=t.localRefs)===null||s===void 0?void 0:s[r],{schemaId:i}=this.opts;a&&(o=new Ve({schema:a,schemaId:i,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=Nu.call(this,o)}X.resolveRef=Pu;function Nu(t){return(0,te.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:xr.call(this,t)}function Fn(t){for(let e of this._compilations)if(ku(e,t))return e}X.getCompilingSchema=Fn;function ku(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function qu(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||Tt.call(this,t,e)}function Tt(t,e){let r=this.opts.uriResolver.parse(e),s=(0,te._getFullPath)(this.opts.uriResolver,r),n=(0,te.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&s===n)return Lr.call(this,r,t);let o=(0,te.normalizeId)(s),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let i=Tt.call(this,t,a);return typeof i?.schema!="object"?void 0:Lr.call(this,r,i)}if(typeof a?.schema=="object"){if(a.validate||xr.call(this,a),o===(0,te.normalizeId)(e)){let{schema:i}=a,{schemaId:u}=this.opts,l=i[u];return l&&(n=(0,te.resolveUrl)(this.opts.uriResolver,n,l)),new Ve({schema:i,schemaId:u,root:t,baseId:n})}return Lr.call(this,r,a)}}X.resolveSchema=Tt;var ju=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Lr(t,{baseId:e,schema:r,root:s}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let i of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,Kn.unescapeFragment)(i)];if(u===void 0)return;r=u;let l=typeof r=="object"&&r[this.opts.schemaId];!ju.has(i)&&l&&(e=(0,te.resolveUrl)(this.opts.uriResolver,e,l))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,Kn.schemaHasRulesButRef)(r,this.RULES)){let i=(0,te.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=Tt.call(this,s,i)}let{schemaId:a}=this.opts;if(o=o||new Ve({schema:r,schemaId:a,root:s,baseId:e}),o.schema!==o.root.schema)return o}});var Ln=g((hf,Ou)=>{Ou.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Gr=g((pf,Jn)=>{"use strict";var Iu=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Hn=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 Hr(t){let e="",r=0,s=0;for(s=0;s<t.length;s++)if(r=t[s].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[s];break}for(s+=1;s<t.length;s++){if(r=t[s].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[s]}return e}var Ru=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function xn(t){return t.length=0,!0}function Tu(t,e,r){if(t.length){let s=Hr(t);if(s!=="")e.push(s);else return r.error=!0,!1;t.length=0}return!0}function Cu(t){let e=0,r={error:!1,address:"",zone:""},s=[],n=[],o=!1,a=!1,i=Tu;for(let u=0;u<t.length;u++){let l=t[u];if(!(l==="["||l==="]"))if(l===":"){if(o===!0&&(a=!0),!i(n,s,r))break;if(++e>7){r.error=!0;break}u>0&&t[u-1]===":"&&(o=!0),s.push(":");continue}else if(l==="%"){if(!i(n,s,r))break;i=xn}else{n.push(l);continue}}return n.length&&(i===xn?r.zone=n.join(""):a?s.push(n.join("")):s.push(Hr(n))),r.address=s.join(""),r}function Gn(t){if(Mu(t,":")<2)return{host:t,isIPV6:!1};let e=Cu(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,s=e.address;return e.zone&&(r+="%"+e.zone,s+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:s}}}function Mu(t,e){let r=0;for(let s=0;s<t.length;s++)t[s]===e&&r++;return r}function Au(t){let e=t,r=[],s=-1,n=0;for(;n=e.length;){if(n===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(n===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(n===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((s=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,s)),e=e.slice(s)}return r.join("")}function Du(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function Vu(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Hn(r)){let s=Gn(r);s.isIPV6===!0?r=`[${s.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Jn.exports={nonSimpleDomain:Ru,recomposeAuthority:Vu,normalizeComponentEncoding:Du,removeDotSegments:Au,isIPv4:Hn,isUUID:Iu,normalizeIPv6:Gn,stringArrayToHexStripped:Hr}});var Yn=g((mf,Xn)=>{"use strict";var{isUUID:zu}=Gr(),Uu=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Ku=["http","https","ws","wss","urn","urn:uuid"];function Fu(t){return Ku.indexOf(t)!==-1}function Jr(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function Wn(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Qn(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function Lu(t){return t.secure=Jr(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function xu(t){if((t.port===(Jr(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function Hu(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Uu);if(r){let s=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let n=`${s}:${e.nid||t.nid}`,o=Wr(n);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Gu(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",s=t.nid.toLowerCase(),n=`${r}:${e.nid||s}`,o=Wr(n);o&&(t=o.serialize(t,e));let a=t,i=t.nss;return a.path=`${s||e.nid}:${i}`,e.skipEscape=!0,a}function Ju(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!zu(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Wu(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Bn={scheme:"http",domainHost:!0,parse:Wn,serialize:Qn},Qu={scheme:"https",domainHost:Bn.domainHost,parse:Wn,serialize:Qn},Mt={scheme:"ws",domainHost:!0,parse:Lu,serialize:xu},Bu={scheme:"wss",domainHost:Mt.domainHost,parse:Mt.parse,serialize:Mt.serialize},Xu={scheme:"urn",parse:Hu,serialize:Gu,skipNormalize:!0},Yu={scheme:"urn:uuid",parse:Ju,serialize:Wu,skipNormalize:!0},At={http:Bn,https:Qu,ws:Mt,wss:Bu,urn:Xu,"urn:uuid":Yu};Object.setPrototypeOf(At,null);function Wr(t){return t&&(At[t]||At[t.toLowerCase()])||void 0}Xn.exports={wsIsSecure:Jr,SCHEMES:At,isValidSchemeName:Fu,getSchemeHandler:Wr}});var to=g((yf,Vt)=>{"use strict";var{normalizeIPv6:Zu,removeDotSegments:it,recomposeAuthority:ec,normalizeComponentEncoding:Dt,isIPv4:tc,nonSimpleDomain:rc}=Gr(),{SCHEMES:sc,getSchemeHandler:Zn}=Yn();function nc(t,e){return typeof t=="string"?t=ae(he(t,e),e):typeof t=="object"&&(t=he(ae(t,e),e)),t}function oc(t,e,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=eo(he(t,s),he(e,s),s,!0);return s.skipEscape=!0,ae(n,s)}function eo(t,e,r,s){let n={};return s||(t=he(ae(t,r),r),e=he(ae(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(n.scheme=e.scheme,n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=it(e.path||""),n.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=it(e.path||""),n.query=e.query):(e.path?(e.path[0]==="/"?n.path=it(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?n.path="/"+e.path:t.path?n.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:n.path=e.path,n.path=it(n.path)),n.query=e.query):(n.path=t.path,e.query!==void 0?n.query=e.query:n.query=t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=e.fragment,n}function ac(t,e,r){return typeof t=="string"?(t=unescape(t),t=ae(Dt(he(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=ae(Dt(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=ae(Dt(he(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=ae(Dt(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function ae(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},s=Object.assign({},e),n=[],o=Zn(s.scheme||r.scheme);o&&o.serialize&&o.serialize(r,s),r.path!==void 0&&(s.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),s.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");let a=ec(r);if(a!==void 0&&(s.reference!=="suffix"&&n.push("//"),n.push(a),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let i=r.path;!s.absolutePath&&(!o||!o.absolutePath)&&(i=it(i)),a===void 0&&i[0]==="/"&&i[1]==="/"&&(i="/%2F"+i.slice(2)),n.push(i)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}var ic=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function he(t,e){let r=Object.assign({},e),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let o=t.match(ic);if(o){if(s.scheme=o[1],s.userinfo=o[3],s.host=o[4],s.port=parseInt(o[5],10),s.path=o[6]||"",s.query=o[7],s.fragment=o[8],isNaN(s.port)&&(s.port=o[5]),s.host)if(tc(s.host)===!1){let u=Zu(s.host);s.host=u.host.toLowerCase(),n=u.isIPV6}else n=!0;s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&s.query===void 0&&!s.path?s.reference="same-document":s.scheme===void 0?s.reference="relative":s.fragment===void 0?s.reference="absolute":s.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");let a=Zn(r.scheme||s.scheme);if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&s.host&&(r.domainHost||a&&a.domainHost)&&n===!1&&rc(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(i){s.error=s.error||"Host's domain name can not be converted to ASCII: "+i}(!a||a&&!a.skipNormalize)&&(t.indexOf("%")!==-1&&(s.scheme!==void 0&&(s.scheme=unescape(s.scheme)),s.host!==void 0&&(s.host=unescape(s.host))),s.path&&(s.path=escape(unescape(s.path))),s.fragment&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),a&&a.parse&&a.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return s}var Qr={SCHEMES:sc,normalize:nc,resolve:oc,resolveComponent:eo,equal:ac,serialize:ae,parse:he};Vt.exports=Qr;Vt.exports.default=Qr;Vt.exports.fastUri=Qr});var so=g(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});var ro=to();ro.code='require("ajv/dist/runtime/uri").default';Br.default=ro});var fo=g(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.CodeGen=V.Name=V.nil=V.stringify=V.str=V._=V.KeywordCxt=void 0;var uc=ot();Object.defineProperty(V,"KeywordCxt",{enumerable:!0,get:function(){return uc.KeywordCxt}});var ze=S();Object.defineProperty(V,"_",{enumerable:!0,get:function(){return ze._}});Object.defineProperty(V,"str",{enumerable:!0,get:function(){return ze.str}});Object.defineProperty(V,"stringify",{enumerable:!0,get:function(){return ze.stringify}});Object.defineProperty(V,"nil",{enumerable:!0,get:function(){return ze.nil}});Object.defineProperty(V,"Name",{enumerable:!0,get:function(){return ze.Name}});Object.defineProperty(V,"CodeGen",{enumerable:!0,get:function(){return ze.CodeGen}});var cc=Rt(),uo=at(),lc=Pr(),ut=Ct(),dc=S(),ct=rt(),zt=tt(),Yr=I(),no=Ln(),fc=so(),co=(t,e)=>new RegExp(t,e);co.code="new RegExp";var hc=["removeAdditional","useDefaults","coerceTypes"],pc=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),mc={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."},yc={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},oo=200;function _c(t){var e,r,s,n,o,a,i,u,l,c,d,y,m,h,f,p,_,q,N,C,w,se,ue,tr,rr;let He=t.strict,sr=(e=t.code)===null||e===void 0?void 0:e.optimize,Fs=sr===!0||sr===void 0?1:sr||0,Ls=(s=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:co,ga=(n=t.uriResolver)!==null&&n!==void 0?n:fc.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:He)!==null&&a!==void 0?a:!0,strictNumbers:(u=(i=t.strictNumbers)!==null&&i!==void 0?i:He)!==null&&u!==void 0?u:!0,strictTypes:(c=(l=t.strictTypes)!==null&&l!==void 0?l:He)!==null&&c!==void 0?c:"log",strictTuples:(y=(d=t.strictTuples)!==null&&d!==void 0?d:He)!==null&&y!==void 0?y:"log",strictRequired:(h=(m=t.strictRequired)!==null&&m!==void 0?m:He)!==null&&h!==void 0?h:!1,code:t.code?{...t.code,optimize:Fs,regExp:Ls}:{optimize:Fs,regExp:Ls},loopRequired:(f=t.loopRequired)!==null&&f!==void 0?f:oo,loopEnum:(p=t.loopEnum)!==null&&p!==void 0?p:oo,meta:(_=t.meta)!==null&&_!==void 0?_:!0,messages:(q=t.messages)!==null&&q!==void 0?q:!0,inlineRefs:(N=t.inlineRefs)!==null&&N!==void 0?N:!0,schemaId:(C=t.schemaId)!==null&&C!==void 0?C:"$id",addUsedSchema:(w=t.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(se=t.validateSchema)!==null&&se!==void 0?se:!0,validateFormats:(ue=t.validateFormats)!==null&&ue!==void 0?ue:!0,unicodeRegExp:(tr=t.unicodeRegExp)!==null&&tr!==void 0?tr:!0,int32range:(rr=t.int32range)!==null&&rr!==void 0?rr:!0,uriResolver:ga}}var lt=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._c(e)};let{es5:r,lines:s}=this.opts.code;this.scope=new dc.ValueScope({scope:{},prefixes:pc,es5:r,lines:s}),this.logger=Ec(e.logger);let n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,lc.getRules)(),ao.call(this,mc,e,"NOT SUPPORTED"),ao.call(this,yc,e,"DEPRECATED","warn"),this._metaOpts=wc.call(this),e.formats&&$c.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&vc.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),gc.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:s}=this.opts,n=no;s==="id"&&(n={...no},n.id=n.$id,delete n.$id),r&&e&&this.addMetaSchema(n,n[s],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let s;if(typeof e=="string"){if(s=this.getSchema(e),!s)throw new Error(`no schema with key or ref "${e}"`)}else s=this.compile(e);let n=s(r);return"$async"in s||(this.errors=s.errors),n}compile(e,r){let s=this._addSchema(e,r);return s.validate||this._compileSchemaEnv(s)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:s}=this.opts;return n.call(this,e,r);async function n(c,d){await o.call(this,c.$schema);let y=this._addSchema(c,d);return y.validate||a.call(this,y)}async function o(c){c&&!this.getSchema(c)&&await n.call(this,{$ref:c},!0)}async function a(c){try{return this._compileSchemaEnv(c)}catch(d){if(!(d instanceof uo.default))throw d;return i.call(this,d),await u.call(this,d.missingSchema),a.call(this,c)}}function i({missingSchema:c,missingRef:d}){if(this.refs[c])throw new Error(`AnySchema ${c} is loaded but ${d} cannot be resolved`)}async function u(c){let d=await l.call(this,c);this.refs[c]||await o.call(this,d.$schema),this.refs[c]||this.addSchema(d,c,r)}async function l(c){let d=this._loading[c];if(d)return d;try{return await(this._loading[c]=s(c))}finally{delete this._loading[c]}}}addSchema(e,r,s,n=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,s,n);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,ct.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,s,r,n,!0),this}addMetaSchema(e,r,s=this.opts.validateSchema){return this.addSchema(e,r,!0,s),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let s;if(s=e.$schema,s!==void 0&&typeof s!="string")throw new Error("$schema must be a string");if(s=s||this.opts.defaultMeta||this.defaultMeta(),!s)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(s,e);if(!n&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return n}getSchema(e){let r;for(;typeof(r=io.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:s}=this.opts,n=new ut.SchemaEnv({schema:{},schemaId:s});if(r=ut.resolveSchema.call(this,n,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=io.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let s=e[this.opts.schemaId];return s&&(s=(0,ct.normalizeId)(s),delete this.schemas[s],delete this.refs[s]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let s;if(typeof e=="string")s=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=s);else if(typeof e=="object"&&r===void 0){if(r=e,s=r.keyword,Array.isArray(s)&&!s.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Pc.call(this,s,r),!r)return(0,Yr.eachItem)(s,o=>Xr.call(this,o)),this;kc.call(this,r);let n={...r,type:(0,zt.getJSONTypes)(r.type),schemaType:(0,zt.getJSONTypes)(r.schemaType)};return(0,Yr.eachItem)(s,n.type.length===0?o=>Xr.call(this,o,n):o=>n.type.forEach(a=>Xr.call(this,o,n,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let s of r.rules){let n=s.rules.findIndex(o=>o.keyword===e);n>=0&&s.rules.splice(n,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:s="data"}={}){return!e||e.length===0?"No errors":e.map(n=>`${s}${n.instancePath} ${n.message}`).reduce((n,o)=>n+r+o)}$dataMetaSchema(e,r){let s=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of r){let o=n.split("/").slice(1),a=e;for(let i of o)a=a[i];for(let i in s){let u=s[i];if(typeof u!="object")continue;let{$data:l}=u.definition,c=a[i];l&&c&&(a[i]=lo(c))}}return e}_removeAllSchemas(e,r){for(let s in e){let n=e[s];(!r||r.test(s))&&(typeof n=="string"?delete e[s]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[s]))}}_addSchema(e,r,s,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:i}=this.opts;if(typeof e=="object")a=e[i];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(e);if(u!==void 0)return u;s=(0,ct.normalizeId)(a||s);let l=ct.getSchemaRefs.call(this,e,s);return u=new ut.SchemaEnv({schema:e,schemaId:i,meta:r,baseId:s,localRefs:l}),this._cache.set(u.schema,u),o&&!s.startsWith("#")&&(s&&this._checkUnique(s),this.refs[s]=u),n&&this.validateSchema(e,!0),u}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):ut.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{ut.compileSchema.call(this,e)}finally{this.opts=r}}};lt.ValidationError=cc.default;lt.MissingRefError=uo.default;V.default=lt;function ao(t,e,r,s="error"){for(let n in t){let o=n;o in e&&this.logger[s](`${r}: option ${n}. ${t[o]}`)}}function io(t){return t=(0,ct.normalizeId)(t),this.schemas[t]||this.refs[t]}function gc(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function $c(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function vc(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function wc(){let t={...this.opts};for(let e of hc)delete t[e];return t}var bc={log(){},warn(){},error(){}};function Ec(t){if(t===!1)return bc;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Sc=/^[a-z_$][a-z0-9_$:-]*$/i;function Pc(t,e){let{RULES:r}=this;if((0,Yr.eachItem)(t,s=>{if(r.keywords[s])throw new Error(`Keyword ${s} is already defined`);if(!Sc.test(s))throw new Error(`Keyword ${s} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Xr(t,e,r){var s;let n=e?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=n?o.post:o.rules.find(({type:u})=>u===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let i={keyword:t,definition:{...e,type:(0,zt.getJSONTypes)(e.type),schemaType:(0,zt.getJSONTypes)(e.schemaType)}};e.before?Nc.call(this,a,i,e.before):a.rules.push(i),o.all[t]=i,(s=e.implements)===null||s===void 0||s.forEach(u=>this.addKeyword(u))}function Nc(t,e,r){let s=t.rules.findIndex(n=>n.keyword===r);s>=0?t.rules.splice(s,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function kc(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=lo(e)),t.validateSchema=this.compile(e,!0))}var qc={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function lo(t){return{anyOf:[t,qc]}}});var ho=g(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});var jc={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Zr.default=jc});var _o=g(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.callRef=qe.getValidate=void 0;var Oc=at(),po=B(),W=S(),Ue=de(),mo=Ct(),Ut=I(),Ic={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:s}=t,{baseId:n,schemaEnv:o,validateName:a,opts:i,self:u}=s,{root:l}=o;if((r==="#"||r==="#/")&&n===l.baseId)return d();let c=mo.resolveRef.call(u,l,n,r);if(c===void 0)throw new Oc.default(s.opts.uriResolver,n,r);if(c instanceof mo.SchemaEnv)return y(c);return m(c);function d(){if(o===l)return Kt(t,a,o,o.$async);let h=e.scopeValue("root",{ref:l});return Kt(t,(0,W._)`${h}.validate`,l,l.$async)}function y(h){let f=yo(t,h);Kt(t,f,h,h.$async)}function m(h){let f=e.scopeValue("schema",i.code.source===!0?{ref:h,code:(0,W.stringify)(h)}:{ref:h}),p=e.name("valid"),_=t.subschema({schema:h,dataTypes:[],schemaPath:W.nil,topSchemaRef:f,errSchemaPath:r},p);t.mergeEvaluated(_),t.ok(p)}}};function yo(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,W._)`${r.scopeValue("wrapper",{ref:e})}.validate`}qe.getValidate=yo;function Kt(t,e,r,s){let{gen:n,it:o}=t,{allErrors:a,schemaEnv:i,opts:u}=o,l=u.passContext?Ue.default.this:W.nil;s?c():d();function c(){if(!i.$async)throw new Error("async schema referenced by sync schema");let h=n.let("valid");n.try(()=>{n.code((0,W._)`await ${(0,po.callValidateCode)(t,e,l)}`),m(e),a||n.assign(h,!0)},f=>{n.if((0,W._)`!(${f} instanceof ${o.ValidationError})`,()=>n.throw(f)),y(f),a||n.assign(h,!1)}),t.ok(h)}function d(){t.result((0,po.callValidateCode)(t,e,l),()=>m(e),()=>y(e))}function y(h){let f=(0,W._)`${h}.errors`;n.assign(Ue.default.vErrors,(0,W._)`${Ue.default.vErrors} === null ? ${f} : ${Ue.default.vErrors}.concat(${f})`),n.assign(Ue.default.errors,(0,W._)`${Ue.default.vErrors}.length`)}function m(h){var f;if(!o.opts.unevaluated)return;let p=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(o.props!==!0)if(p&&!p.dynamicProps)p.props!==void 0&&(o.props=Ut.mergeEvaluated.props(n,p.props,o.props));else{let _=n.var("props",(0,W._)`${h}.evaluated.props`);o.props=Ut.mergeEvaluated.props(n,_,o.props,W.Name)}if(o.items!==!0)if(p&&!p.dynamicItems)p.items!==void 0&&(o.items=Ut.mergeEvaluated.items(n,p.items,o.items));else{let _=n.var("items",(0,W._)`${h}.evaluated.items`);o.items=Ut.mergeEvaluated.items(n,_,o.items,W.Name)}}}qe.callRef=Kt;qe.default=Ic});var go=g(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});var Rc=ho(),Tc=_o(),Cc=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Rc.default,Tc.default];es.default=Cc});var $o=g(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var Ft=S(),ve=Ft.operators,Lt={maximum:{okStr:"<=",ok:ve.LTE,fail:ve.GT},minimum:{okStr:">=",ok:ve.GTE,fail:ve.LT},exclusiveMaximum:{okStr:"<",ok:ve.LT,fail:ve.GTE},exclusiveMinimum:{okStr:">",ok:ve.GT,fail:ve.LTE}},Mc={message:({keyword:t,schemaCode:e})=>(0,Ft.str)`must be ${Lt[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ft._)`{comparison: ${Lt[t].okStr}, limit: ${e}}`},Ac={keyword:Object.keys(Lt),type:"number",schemaType:"number",$data:!0,error:Mc,code(t){let{keyword:e,data:r,schemaCode:s}=t;t.fail$data((0,Ft._)`${r} ${Lt[e].fail} ${s} || isNaN(${r})`)}};ts.default=Ac});var vo=g(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});var dt=S(),Dc={message:({schemaCode:t})=>(0,dt.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,dt._)`{multipleOf: ${t}}`},Vc={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Dc,code(t){let{gen:e,data:r,schemaCode:s,it:n}=t,o=n.opts.multipleOfPrecision,a=e.let("res"),i=o?(0,dt._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,dt._)`${a} !== parseInt(${a})`;t.fail$data((0,dt._)`(${s} === 0 || (${a} = ${r}/${s}, ${i}))`)}};rs.default=Vc});var bo=g(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});function wo(t){let e=t.length,r=0,s=0,n;for(;s<e;)r++,n=t.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=t.charCodeAt(s),(n&64512)===56320&&s++);return r}ss.default=wo;wo.code='require("ajv/dist/runtime/ucs2length").default'});var Eo=g(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});var je=S(),zc=I(),Uc=bo(),Kc={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,je.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,je._)`{limit: ${t}}`},Fc={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Kc,code(t){let{keyword:e,data:r,schemaCode:s,it:n}=t,o=e==="maxLength"?je.operators.GT:je.operators.LT,a=n.opts.unicode===!1?(0,je._)`${r}.length`:(0,je._)`${(0,zc.useFunc)(t.gen,Uc.default)}(${r})`;t.fail$data((0,je._)`${a} ${o} ${s}`)}};ns.default=Fc});var So=g(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});var Lc=B(),xt=S(),xc={message:({schemaCode:t})=>(0,xt.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,xt._)`{pattern: ${t}}`},Hc={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:xc,code(t){let{data:e,$data:r,schema:s,schemaCode:n,it:o}=t,a=o.opts.unicodeRegExp?"u":"",i=r?(0,xt._)`(new RegExp(${n}, ${a}))`:(0,Lc.usePattern)(t,s);t.fail$data((0,xt._)`!${i}.test(${e})`)}};os.default=Hc});var Po=g(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var ft=S(),Gc={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,ft.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,ft._)`{limit: ${t}}`},Jc={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Gc,code(t){let{keyword:e,data:r,schemaCode:s}=t,n=e==="maxProperties"?ft.operators.GT:ft.operators.LT;t.fail$data((0,ft._)`Object.keys(${r}).length ${n} ${s}`)}};as.default=Jc});var No=g(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var ht=B(),pt=S(),Wc=I(),Qc={message:({params:{missingProperty:t}})=>(0,pt.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,pt._)`{missingProperty: ${t}}`},Bc={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Qc,code(t){let{gen:e,schema:r,schemaCode:s,data:n,$data:o,it:a}=t,{opts:i}=a;if(!o&&r.length===0)return;let u=r.length>=i.loopRequired;if(a.allErrors?l():c(),i.strictRequired){let m=t.parentSchema.properties,{definedProperties:h}=t.it;for(let f of r)if(m?.[f]===void 0&&!h.has(f)){let p=a.schemaEnv.baseId+a.errSchemaPath,_=`required property "${f}" is not defined at "${p}" (strictRequired)`;(0,Wc.checkStrictMode)(a,_,a.opts.strictRequired)}}function l(){if(u||o)t.block$data(pt.nil,d);else for(let m of r)(0,ht.checkReportMissingProp)(t,m)}function c(){let m=e.let("missing");if(u||o){let h=e.let("valid",!0);t.block$data(h,()=>y(m,h)),t.ok(h)}else e.if((0,ht.checkMissingProp)(t,r,m)),(0,ht.reportMissingProp)(t,m),e.else()}function d(){e.forOf("prop",s,m=>{t.setParams({missingProperty:m}),e.if((0,ht.noPropertyInData)(e,n,m,i.ownProperties),()=>t.error())})}function y(m,h){t.setParams({missingProperty:m}),e.forOf(m,s,()=>{e.assign(h,(0,ht.propertyInData)(e,n,m,i.ownProperties)),e.if((0,pt.not)(h),()=>{t.error(),e.break()})},pt.nil)}}};is.default=Bc});var ko=g(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var mt=S(),Xc={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,mt.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,mt._)`{limit: ${t}}`},Yc={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Xc,code(t){let{keyword:e,data:r,schemaCode:s}=t,n=e==="maxItems"?mt.operators.GT:mt.operators.LT;t.fail$data((0,mt._)`${r}.length ${n} ${s}`)}};us.default=Yc});var Ht=g(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});var qo=Tr();qo.code='require("ajv/dist/runtime/equal").default';cs.default=qo});var jo=g(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var ls=tt(),z=S(),Zc=I(),el=Ht(),tl={message:({params:{i:t,j:e}})=>(0,z.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,z._)`{i: ${t}, j: ${e}}`},rl={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:tl,code(t){let{gen:e,data:r,$data:s,schema:n,parentSchema:o,schemaCode:a,it:i}=t;if(!s&&!n)return;let u=e.let("valid"),l=o.items?(0,ls.getSchemaTypes)(o.items):[];t.block$data(u,c,(0,z._)`${a} === false`),t.ok(u);function c(){let h=e.let("i",(0,z._)`${r}.length`),f=e.let("j");t.setParams({i:h,j:f}),e.assign(u,!0),e.if((0,z._)`${h} > 1`,()=>(d()?y:m)(h,f))}function d(){return l.length>0&&!l.some(h=>h==="object"||h==="array")}function y(h,f){let p=e.name("item"),_=(0,ls.checkDataTypes)(l,p,i.opts.strictNumbers,ls.DataType.Wrong),q=e.const("indices",(0,z._)`{}`);e.for((0,z._)`;${h}--;`,()=>{e.let(p,(0,z._)`${r}[${h}]`),e.if(_,(0,z._)`continue`),l.length>1&&e.if((0,z._)`typeof ${p} == "string"`,(0,z._)`${p} += "_"`),e.if((0,z._)`typeof ${q}[${p}] == "number"`,()=>{e.assign(f,(0,z._)`${q}[${p}]`),t.error(),e.assign(u,!1).break()}).code((0,z._)`${q}[${p}] = ${h}`)})}function m(h,f){let p=(0,Zc.useFunc)(e,el.default),_=e.name("outer");e.label(_).for((0,z._)`;${h}--;`,()=>e.for((0,z._)`${f} = ${h}; ${f}--;`,()=>e.if((0,z._)`${p}(${r}[${h}], ${r}[${f}])`,()=>{t.error(),e.assign(u,!1).break(_)})))}}};ds.default=rl});var Oo=g(hs=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});var fs=S(),sl=I(),nl=Ht(),ol={message:"must be equal to constant",params:({schemaCode:t})=>(0,fs._)`{allowedValue: ${t}}`},al={keyword:"const",$data:!0,error:ol,code(t){let{gen:e,data:r,$data:s,schemaCode:n,schema:o}=t;s||o&&typeof o=="object"?t.fail$data((0,fs._)`!${(0,sl.useFunc)(e,nl.default)}(${r}, ${n})`):t.fail((0,fs._)`${o} !== ${r}`)}};hs.default=al});var Io=g(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});var yt=S(),il=I(),ul=Ht(),cl={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,yt._)`{allowedValues: ${t}}`},ll={keyword:"enum",schemaType:"array",$data:!0,error:cl,code(t){let{gen:e,data:r,$data:s,schema:n,schemaCode:o,it:a}=t;if(!s&&n.length===0)throw new Error("enum must have non-empty array");let i=n.length>=a.opts.loopEnum,u,l=()=>u??(u=(0,il.useFunc)(e,ul.default)),c;if(i||s)c=e.let("valid"),t.block$data(c,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let m=e.const("vSchema",o);c=(0,yt.or)(...n.map((h,f)=>y(m,f)))}t.pass(c);function d(){e.assign(c,!1),e.forOf("v",o,m=>e.if((0,yt._)`${l()}(${r}, ${m})`,()=>e.assign(c,!0).break()))}function y(m,h){let f=n[h];return typeof f=="object"&&f!==null?(0,yt._)`${l()}(${r}, ${m}[${h}])`:(0,yt._)`${r} === ${f}`}}};ps.default=ll});var Ro=g(ms=>{"use strict";Object.defineProperty(ms,"__esModule",{value:!0});var dl=$o(),fl=vo(),hl=Eo(),pl=So(),ml=Po(),yl=No(),_l=ko(),gl=jo(),$l=Oo(),vl=Io(),wl=[dl.default,fl.default,hl.default,pl.default,ml.default,yl.default,_l.default,gl.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},$l.default,vl.default];ms.default=wl});var _s=g(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.validateAdditionalItems=void 0;var Oe=S(),ys=I(),bl={message:({params:{len:t}})=>(0,Oe.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Oe._)`{limit: ${t}}`},El={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:bl,code(t){let{parentSchema:e,it:r}=t,{items:s}=e;if(!Array.isArray(s)){(0,ys.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}To(t,s)}};function To(t,e){let{gen:r,schema:s,data:n,keyword:o,it:a}=t;a.items=!0;let i=r.const("len",(0,Oe._)`${n}.length`);if(s===!1)t.setParams({len:e.length}),t.pass((0,Oe._)`${i} <= ${e.length}`);else if(typeof s=="object"&&!(0,ys.alwaysValidSchema)(a,s)){let l=r.var("valid",(0,Oe._)`${i} <= ${e.length}`);r.if((0,Oe.not)(l),()=>u(l)),t.ok(l)}function u(l){r.forRange("i",e.length,i,c=>{t.subschema({keyword:o,dataProp:c,dataPropType:ys.Type.Num},l),a.allErrors||r.if((0,Oe.not)(l),()=>r.break())})}}_t.validateAdditionalItems=To;_t.default=El});var gs=g(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.validateTuple=void 0;var Co=S(),Gt=I(),Sl=B(),Pl={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Mo(t,"additionalItems",e);r.items=!0,!(0,Gt.alwaysValidSchema)(r,e)&&t.ok((0,Sl.validateArray)(t))}};function Mo(t,e,r=t.schema){let{gen:s,parentSchema:n,data:o,keyword:a,it:i}=t;c(n),i.opts.unevaluated&&r.length&&i.items!==!0&&(i.items=Gt.mergeEvaluated.items(s,r.length,i.items));let u=s.name("valid"),l=s.const("len",(0,Co._)`${o}.length`);r.forEach((d,y)=>{(0,Gt.alwaysValidSchema)(i,d)||(s.if((0,Co._)`${l} > ${y}`,()=>t.subschema({keyword:a,schemaProp:y,dataProp:y},u)),t.ok(u))});function c(d){let{opts:y,errSchemaPath:m}=i,h=r.length,f=h===d.minItems&&(h===d.maxItems||d[e]===!1);if(y.strictTuples&&!f){let p=`"${a}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${m}"`;(0,Gt.checkStrictMode)(i,p,y.strictTuples)}}}gt.validateTuple=Mo;gt.default=Pl});var Ao=g($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Nl=gs(),kl={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Nl.validateTuple)(t,"items")};$s.default=kl});var Vo=g(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});var Do=S(),ql=I(),jl=B(),Ol=_s(),Il={message:({params:{len:t}})=>(0,Do.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Do._)`{limit: ${t}}`},Rl={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Il,code(t){let{schema:e,parentSchema:r,it:s}=t,{prefixItems:n}=r;s.items=!0,!(0,ql.alwaysValidSchema)(s,e)&&(n?(0,Ol.validateAdditionalItems)(t,n):t.ok((0,jl.validateArray)(t)))}};vs.default=Rl});var zo=g(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});var Y=S(),Jt=I(),Tl={message:({params:{min:t,max:e}})=>e===void 0?(0,Y.str)`must contain at least ${t} valid item(s)`:(0,Y.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Y._)`{minContains: ${t}}`:(0,Y._)`{minContains: ${t}, maxContains: ${e}}`},Cl={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Tl,code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:o}=t,a,i,{minContains:u,maxContains:l}=s;o.opts.next?(a=u===void 0?1:u,i=l):a=1;let c=e.const("len",(0,Y._)`${n}.length`);if(t.setParams({min:a,max:i}),i===void 0&&a===0){(0,Jt.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(i!==void 0&&a>i){(0,Jt.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Jt.alwaysValidSchema)(o,r)){let f=(0,Y._)`${c} >= ${a}`;i!==void 0&&(f=(0,Y._)`${f} && ${c} <= ${i}`),t.pass(f);return}o.items=!0;let d=e.name("valid");i===void 0&&a===1?m(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),i!==void 0&&e.if((0,Y._)`${n}.length > 0`,y)):(e.let(d,!1),y()),t.result(d,()=>t.reset());function y(){let f=e.name("_valid"),p=e.let("count",0);m(f,()=>e.if(f,()=>h(p)))}function m(f,p){e.forRange("i",0,c,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:Jt.Type.Num,compositeRule:!0},f),p()})}function h(f){e.code((0,Y._)`${f}++`),i===void 0?e.if((0,Y._)`${f} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,Y._)`${f} > ${i}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,Y._)`${f} >= ${a}`,()=>e.assign(d,!0)))}}};ws.default=Cl});var Fo=g(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.validateSchemaDeps=ie.validatePropertyDeps=ie.error=void 0;var bs=S(),Ml=I(),$t=B();ie.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let s=e===1?"property":"properties";return(0,bs.str)`must have ${s} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:s}})=>(0,bs._)`{property: ${t},
|
|
6
|
+
missingProperty: ${s},
|
|
7
|
+
depsCount: ${e},
|
|
8
|
+
deps: ${r}}`};var Al={keyword:"dependencies",type:"object",schemaType:"object",error:ie.error,code(t){let[e,r]=Dl(t);Uo(t,e),Ko(t,r)}};function Dl({schema:t}){let e={},r={};for(let s in t){if(s==="__proto__")continue;let n=Array.isArray(t[s])?e:r;n[s]=t[s]}return[e,r]}function Uo(t,e=t.schema){let{gen:r,data:s,it:n}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let i=e[a];if(i.length===0)continue;let u=(0,$t.propertyInData)(r,s,a,n.opts.ownProperties);t.setParams({property:a,depsCount:i.length,deps:i.join(", ")}),n.allErrors?r.if(u,()=>{for(let l of i)(0,$t.checkReportMissingProp)(t,l)}):(r.if((0,bs._)`${u} && (${(0,$t.checkMissingProp)(t,i,o)})`),(0,$t.reportMissingProp)(t,o),r.else())}}ie.validatePropertyDeps=Uo;function Ko(t,e=t.schema){let{gen:r,data:s,keyword:n,it:o}=t,a=r.name("valid");for(let i in e)(0,Ml.alwaysValidSchema)(o,e[i])||(r.if((0,$t.propertyInData)(r,s,i,o.opts.ownProperties),()=>{let u=t.subschema({keyword:n,schemaProp:i},a);t.mergeValidEvaluated(u,a)},()=>r.var(a,!0)),t.ok(a))}ie.validateSchemaDeps=Ko;ie.default=Al});var xo=g(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});var Lo=S(),Vl=I(),zl={message:"property name must be valid",params:({params:t})=>(0,Lo._)`{propertyName: ${t.propertyName}}`},Ul={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:zl,code(t){let{gen:e,schema:r,data:s,it:n}=t;if((0,Vl.alwaysValidSchema)(n,r))return;let o=e.name("valid");e.forIn("key",s,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,Lo.not)(o),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(o)}};Es.default=Ul});var Ps=g(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});var Wt=B(),re=S(),Kl=de(),Qt=I(),Fl={message:"must NOT have additional properties",params:({params:t})=>(0,re._)`{additionalProperty: ${t.additionalProperty}}`},Ll={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Fl,code(t){let{gen:e,schema:r,parentSchema:s,data:n,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:i,opts:u}=a;if(a.props=!0,u.removeAdditional!=="all"&&(0,Qt.alwaysValidSchema)(a,r))return;let l=(0,Wt.allSchemaProperties)(s.properties),c=(0,Wt.allSchemaProperties)(s.patternProperties);d(),t.ok((0,re._)`${o} === ${Kl.default.errors}`);function d(){e.forIn("key",n,p=>{!l.length&&!c.length?h(p):e.if(y(p),()=>h(p))})}function y(p){let _;if(l.length>8){let q=(0,Qt.schemaRefOrVal)(a,s.properties,"properties");_=(0,Wt.isOwnProperty)(e,q,p)}else l.length?_=(0,re.or)(...l.map(q=>(0,re._)`${p} === ${q}`)):_=re.nil;return c.length&&(_=(0,re.or)(_,...c.map(q=>(0,re._)`${(0,Wt.usePattern)(t,q)}.test(${p})`))),(0,re.not)(_)}function m(p){e.code((0,re._)`delete ${n}[${p}]`)}function h(p){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){m(p);return}if(r===!1){t.setParams({additionalProperty:p}),t.error(),i||e.break();return}if(typeof r=="object"&&!(0,Qt.alwaysValidSchema)(a,r)){let _=e.name("valid");u.removeAdditional==="failing"?(f(p,_,!1),e.if((0,re.not)(_),()=>{t.reset(),m(p)})):(f(p,_),i||e.if((0,re.not)(_),()=>e.break()))}}function f(p,_,q){let N={keyword:"additionalProperties",dataProp:p,dataPropType:Qt.Type.Str};q===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(N,_)}}};Ss.default=Ll});var Jo=g(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var xl=ot(),Ho=B(),Ns=I(),Go=Ps(),Hl={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:o}=t;o.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Go.default.code(new xl.KeywordCxt(o,Go.default,"additionalProperties"));let a=(0,Ho.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=Ns.mergeEvaluated.props(e,(0,Ns.toHash)(a),o.props));let i=a.filter(d=>!(0,Ns.alwaysValidSchema)(o,r[d]));if(i.length===0)return;let u=e.name("valid");for(let d of i)l(d)?c(d):(e.if((0,Ho.propertyInData)(e,n,d,o.opts.ownProperties)),c(d),o.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(u);function l(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function c(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},u)}}};ks.default=Hl});var Xo=g(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});var Wo=B(),Bt=S(),Qo=I(),Bo=I(),Gl={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:s,parentSchema:n,it:o}=t,{opts:a}=o,i=(0,Wo.allSchemaProperties)(r),u=i.filter(f=>(0,Qo.alwaysValidSchema)(o,r[f]));if(i.length===0||u.length===i.length&&(!o.opts.unevaluated||o.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&n.properties,c=e.name("valid");o.props!==!0&&!(o.props instanceof Bt.Name)&&(o.props=(0,Bo.evaluatedPropsToName)(e,o.props));let{props:d}=o;y();function y(){for(let f of i)l&&m(f),o.allErrors?h(f):(e.var(c,!0),h(f),e.if(c))}function m(f){for(let p in l)new RegExp(f).test(p)&&(0,Qo.checkStrictMode)(o,`property ${p} matches pattern ${f} (use allowMatchingProperties)`)}function h(f){e.forIn("key",s,p=>{e.if((0,Bt._)`${(0,Wo.usePattern)(t,f)}.test(${p})`,()=>{let _=u.includes(f);_||t.subschema({keyword:"patternProperties",schemaProp:f,dataProp:p,dataPropType:Bo.Type.Str},c),o.opts.unevaluated&&d!==!0?e.assign((0,Bt._)`${d}[${p}]`,!0):!_&&!o.allErrors&&e.if((0,Bt.not)(c),()=>e.break())})})}}};qs.default=Gl});var Yo=g(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});var Jl=I(),Wl={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:s}=t;if((0,Jl.alwaysValidSchema)(s,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};js.default=Wl});var Zo=g(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var Ql=B(),Bl={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ql.validateUnion,error:{message:"must match a schema in anyOf"}};Os.default=Bl});var ea=g(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var Xt=S(),Xl=I(),Yl={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Xt._)`{passingSchemas: ${t.passing}}`},Zl={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Yl,code(t){let{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let o=r,a=e.let("valid",!1),i=e.let("passing",null),u=e.name("_valid");t.setParams({passing:i}),e.block(l),t.result(a,()=>t.reset(),()=>t.error(!0));function l(){o.forEach((c,d)=>{let y;(0,Xl.alwaysValidSchema)(n,c)?e.var(u,!0):y=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},u),d>0&&e.if((0,Xt._)`${u} && ${a}`).assign(a,!1).assign(i,(0,Xt._)`[${i}, ${d}]`).else(),e.if(u,()=>{e.assign(a,!0),e.assign(i,d),y&&t.mergeEvaluated(y,Xt.Name)})})}}};Is.default=Zl});var ta=g(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});var ed=I(),td={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((o,a)=>{if((0,ed.alwaysValidSchema)(s,o))return;let i=t.subschema({keyword:"allOf",schemaProp:a},n);t.ok(n),t.mergeEvaluated(i)})}};Rs.default=td});var na=g(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});var Yt=S(),sa=I(),rd={message:({params:t})=>(0,Yt.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Yt._)`{failingKeyword: ${t.ifClause}}`},sd={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:rd,code(t){let{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,sa.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=ra(s,"then"),o=ra(s,"else");if(!n&&!o)return;let a=e.let("valid",!0),i=e.name("_valid");if(u(),t.reset(),n&&o){let c=e.let("ifClause");t.setParams({ifClause:c}),e.if(i,l("then",c),l("else",c))}else n?e.if(i,l("then")):e.if((0,Yt.not)(i),l("else"));t.pass(a,()=>t.error(!0));function u(){let c=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);t.mergeEvaluated(c)}function l(c,d){return()=>{let y=t.subschema({keyword:c},i);e.assign(a,i),t.mergeValidEvaluated(y,a),d?e.assign(d,(0,Yt._)`${c}`):t.setParams({ifClause:c})}}}};function ra(t,e){let r=t.schema[e];return r!==void 0&&!(0,sa.alwaysValidSchema)(t,r)}Ts.default=sd});var oa=g(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var nd=I(),od={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,nd.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};Cs.default=od});var aa=g(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});var ad=_s(),id=Ao(),ud=gs(),cd=Vo(),ld=zo(),dd=Fo(),fd=xo(),hd=Ps(),pd=Jo(),md=Xo(),yd=Yo(),_d=Zo(),gd=ea(),$d=ta(),vd=na(),wd=oa();function bd(t=!1){let e=[yd.default,_d.default,gd.default,$d.default,vd.default,wd.default,fd.default,hd.default,dd.default,pd.default,md.default];return t?e.push(id.default,cd.default):e.push(ad.default,ud.default),e.push(ld.default),e}Ms.default=bd});var ia=g(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var D=S(),Ed={message:({schemaCode:t})=>(0,D.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,D._)`{format: ${t}}`},Sd={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Ed,code(t,e){let{gen:r,data:s,$data:n,schema:o,schemaCode:a,it:i}=t,{opts:u,errSchemaPath:l,schemaEnv:c,self:d}=i;if(!u.validateFormats)return;n?y():m();function y(){let h=r.scopeValue("formats",{ref:d.formats,code:u.code.formats}),f=r.const("fDef",(0,D._)`${h}[${a}]`),p=r.let("fType"),_=r.let("format");r.if((0,D._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(p,(0,D._)`${f}.type || "string"`).assign(_,(0,D._)`${f}.validate`),()=>r.assign(p,(0,D._)`"string"`).assign(_,f)),t.fail$data((0,D.or)(q(),N()));function q(){return u.strictSchema===!1?D.nil:(0,D._)`${a} && !${_}`}function N(){let C=c.$async?(0,D._)`(${f}.async ? await ${_}(${s}) : ${_}(${s}))`:(0,D._)`${_}(${s})`,w=(0,D._)`(typeof ${_} == "function" ? ${C} : ${_}.test(${s}))`;return(0,D._)`${_} && ${_} !== true && ${p} === ${e} && !${w}`}}function m(){let h=d.formats[o];if(!h){q();return}if(h===!0)return;let[f,p,_]=N(h);f===e&&t.pass(C());function q(){if(u.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${l}"`}}function N(w){let se=w instanceof RegExp?(0,D.regexpCode)(w):u.code.formats?(0,D._)`${u.code.formats}${(0,D.getProperty)(o)}`:void 0,ue=r.scopeValue("formats",{key:o,ref:w,code:se});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,D._)`${ue}.validate`]:["string",w,ue]}function C(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!c.$async)throw new Error("async format in sync schema");return(0,D._)`await ${_}(${s})`}return typeof p=="function"?(0,D._)`${_}(${s})`:(0,D._)`${_}.test(${s})`}}}};As.default=Sd});var ua=g(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});var Pd=ia(),Nd=[Pd.default];Ds.default=Nd});var ca=g(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.contentVocabulary=Ke.metadataVocabulary=void 0;Ke.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ke.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var da=g(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var kd=go(),qd=Ro(),jd=aa(),Od=ua(),la=ca(),Id=[kd.default,qd.default,(0,jd.default)(),Od.default,la.metadataVocabulary,la.contentVocabulary];Vs.default=Id});var ha=g(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.DiscrError=void 0;var fa;(function(t){t.Tag="tag",t.Mapping="mapping"})(fa||(Zt.DiscrError=fa={}))});var ma=g(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});var Fe=S(),zs=ha(),pa=Ct(),Rd=at(),Td=I(),Cd={message:({params:{discrError:t,tagName:e}})=>t===zs.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Fe._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Md={keyword:"discriminator",type:"object",schemaType:"object",error:Cd,code(t){let{gen:e,data:r,schema:s,parentSchema:n,it:o}=t,{oneOf:a}=n;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let i=s.propertyName;if(typeof i!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let u=e.let("valid",!1),l=e.const("tag",(0,Fe._)`${r}${(0,Fe.getProperty)(i)}`);e.if((0,Fe._)`typeof ${l} == "string"`,()=>c(),()=>t.error(!1,{discrError:zs.DiscrError.Tag,tag:l,tagName:i})),t.ok(u);function c(){let m=y();e.if(!1);for(let h in m)e.elseIf((0,Fe._)`${l} === ${h}`),e.assign(u,d(m[h]));e.else(),t.error(!1,{discrError:zs.DiscrError.Mapping,tag:l,tagName:i}),e.endIf()}function d(m){let h=e.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:m},h);return t.mergeEvaluated(f,Fe.Name),h}function y(){var m;let h={},f=_(n),p=!0;for(let C=0;C<a.length;C++){let w=a[C];if(w?.$ref&&!(0,Td.schemaHasRulesButRef)(w,o.self.RULES)){let ue=w.$ref;if(w=pa.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,ue),w instanceof pa.SchemaEnv&&(w=w.schema),w===void 0)throw new Rd.default(o.opts.uriResolver,o.baseId,ue)}let se=(m=w?.properties)===null||m===void 0?void 0:m[i];if(typeof se!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);p=p&&(f||_(w)),q(se,C)}if(!p)throw new Error(`discriminator: "${i}" must be required`);return h;function _({required:C}){return Array.isArray(C)&&C.includes(i)}function q(C,w){if(C.const)N(C.const,w);else if(C.enum)for(let se of C.enum)N(se,w);else throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`)}function N(C,w){if(typeof C!="string"||C in h)throw new Error(`discriminator: "${i}" values must be unique strings`);h[C]=w}}}};Us.default=Md});var ya=g((nh,Ad)=>{Ad.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var xd=g((A,Ks)=>{Object.defineProperty(A,"__esModule",{value:!0});A.MissingRefError=A.ValidationError=A.CodeGen=A.Name=A.nil=A.stringify=A.str=A._=A.KeywordCxt=A.Ajv=void 0;var Dd=fo(),Vd=da(),zd=ma(),_a=ya(),Ud=["/properties"],er="http://json-schema.org/draft-07/schema",Le=class extends Dd.default{_addVocabularies(){super._addVocabularies(),Vd.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(zd.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(_a,Ud):_a;this.addMetaSchema(e,er,!1),this.refs["http://json-schema.org/schema"]=er}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(er)?er:void 0)}};A.Ajv=Le;Ks.exports=A=Le;Ks.exports.Ajv=Le;Object.defineProperty(A,"__esModule",{value:!0});A.default=Le;var Kd=ot();Object.defineProperty(A,"KeywordCxt",{enumerable:!0,get:function(){return Kd.KeywordCxt}});var xe=S();Object.defineProperty(A,"_",{enumerable:!0,get:function(){return xe._}});Object.defineProperty(A,"str",{enumerable:!0,get:function(){return xe.str}});Object.defineProperty(A,"stringify",{enumerable:!0,get:function(){return xe.stringify}});Object.defineProperty(A,"nil",{enumerable:!0,get:function(){return xe.nil}});Object.defineProperty(A,"Name",{enumerable:!0,get:function(){return xe.Name}});Object.defineProperty(A,"CodeGen",{enumerable:!0,get:function(){return xe.CodeGen}});var Fd=Rt();Object.defineProperty(A,"ValidationError",{enumerable:!0,get:function(){return Fd.default}});var Ld=at();Object.defineProperty(A,"MissingRefError",{enumerable:!0,get:function(){return Ld.default}})});export default xd();
|
|
9
|
+
//# sourceMappingURL=ajv-Z3ABRV2J.js.map
|