@vuebro/runtime 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +0,0 @@
1
- import{computed as Zt,toRef as vn,toRefs as In,reactive as $n,ref as Cn,watch as wn}from"vue";import{o as An}from"./unocss-BKXTr99u.js";function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mn(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var p=function i(){var m=!1;try{m=this instanceof i}catch{}return m?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};p.prototype=t.prototype}else p={};return Object.defineProperty(p,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var m=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(p,i,m.get?m:{enumerable:!0,get:function(){return e[i]}})}),p}function Dn(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Pt={exports:{}};const Vn={},Fn=Object.freeze(Object.defineProperty({__proto__:null,default:Vn},Symbol.toStringTag,{value:"Module"})),Ln=Mn(Fn);var Xt;function Un(){return Xt||(Xt=1,(function(e){(function(){var t,p=0,i=[],m;for(m=0;m<256;m++)i[m]=(m+256).toString(16).substr(1);h.BUFFER_SIZE=4096,h.bin=l,h.clearBuffer=function(){t=null,p=0},h.test=function(_){return typeof _=="string"?/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(_):!1};var s;typeof crypto<"u"?s=crypto:typeof window<"u"&&typeof window.msCrypto<"u"&&(s=window.msCrypto),typeof Dn=="function"?(s=s||Ln,e.exports=h):typeof window<"u"&&(window.uuid=h),h.randomBytes=(function(){if(s){if(s.randomBytes)return s.randomBytes;if(s.getRandomValues)return typeof Uint8Array.prototype.slice!="function"?function(_){var g=new Uint8Array(_);return s.getRandomValues(g),Array.from(g)}:function(_){var g=new Uint8Array(_);return s.getRandomValues(g),g}}return function(_){var g,P=[];for(g=0;g<_;g++)P.push(Math.floor(Math.random()*256));return P}})();function f(_){return(!t||p+_>h.BUFFER_SIZE)&&(p=0,t=h.randomBytes(h.BUFFER_SIZE)),t.slice(p,p+=_)}function l(){var _=f(16);return _[6]=_[6]&15|64,_[8]=_[8]&63|128,_}function h(){var _=l();return i[_[0]]+i[_[1]]+i[_[2]]+i[_[3]]+"-"+i[_[4]]+i[_[5]]+"-"+i[_[6]]+i[_[7]]+"-"+i[_[8]]+i[_[9]]+"-"+i[_[10]]+i[_[11]]+i[_[12]]+i[_[13]]+i[_[14]]+i[_[15]]}})()})(Pt)),Pt.exports}var zn=Un();const Ft=Ht(zn),Yt=!0,xt=(e,t)=>[...e].reverse().map(p=>({node:p,parent:t,siblings:e})),Kn=(e,{branch:t="branch",children:p="children",id:i="id",index:m="index",next:s="next",parent:f="parent",prev:l="prev",siblings:h="siblings"}={})=>{const _={[t]:{get(){const y=[this];for(;y[0]?.[f];)y.unshift(y[0][f]);return y}},[m]:{get(){return this[h].findIndex(y=>this[i]===y[i])}},[s]:{get(){return this[h][this[m]+1]}},[l]:{get(){return this[h][this[m]-1]}}},g=function*(y){const b=xt(y.value);for(;b.length;){const{node:o,parent:u,siblings:r}=b.pop()??{};o&&(o[f]!==u&&Object.defineProperty(o,f,{configurable:Yt,value:u}),o[h]!==r&&Object.defineProperty(o,h,{configurable:Yt,value:r}),Object.keys(_).some(a=>!(a in o))&&Object.defineProperties(o,_),yield o,b.push(...xt(o[p]??[],o)))}},P=Zt(()=>[...g(vn(e))]),$=Zt(()=>Object.fromEntries(P.value.map(y=>[y[i],y]))),w=(y,b)=>{const o=$.value[y];if(o){const[u]=P.value,r=o[m],a=o[s],v=r+1,n=o[f],d=o[l],E=r-1,O=o[h];switch(b){case"add":{const C=Ft();return O.splice(v,0,{[i]:C}),C}case"addChild":{const C=Ft();return Array.isArray(o[p])||(o[p]=[]),o[p].unshift({[i]:C}),C}case"down":r<O.length-1&&O[r]&&O[v]&&([O[r],O[v]]=[O[v],O[r]]);break;case"left":if(n?.[f])return n[h].splice(n[m]+1,0,...O.splice(r,1)),n[i];break;case"remove":{const C=a?.[i]??d?.[i]??n?.[i]??u?.[i];return O.splice(r,1),C}case"right":if(d){const C=d[p]??[],D=d[i];return d[p]=[...C,...O.splice(r,1)],D}break;case"up":r&&O[r]&&O[E]&&([O[E],O[r]]=[O[r],O[E]]);break}}};return{add:y=>w(y,"add"),addChild:y=>w(y,"addChild"),down:y=>w(y,"down"),kvNodes:$,left:y=>w(y,"left"),nodes:P,remove:y=>w(y,"remove"),right:y=>w(y,"right"),up:y=>w(y,"up")}};var Te={exports:{}},jt={},me={},we={},Rt={},Nt={},Ot={},er;function yt(){return er||(er=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class p extends t{constructor(r){if(super(),!e.IDENTIFIER.test(r))throw new Error("CodeGen: name must be a valid identifier");this.str=r}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=p;class i extends t{constructor(r){super(),this._items=typeof r=="string"?[r]:r}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const r=this._items[0];return r===""||r==='""'}get str(){var r;return(r=this._str)!==null&&r!==void 0?r:this._str=this._items.reduce((a,v)=>`${a}${v}`,"")}get names(){var r;return(r=this._names)!==null&&r!==void 0?r:this._names=this._items.reduce((a,v)=>(v instanceof p&&(a[v.str]=(a[v.str]||0)+1),a),{})}}e._Code=i,e.nil=new i("");function m(u,...r){const a=[u[0]];let v=0;for(;v<r.length;)l(a,r[v]),a.push(u[++v]);return new i(a)}e._=m;const s=new i("+");function f(u,...r){const a=[w(u[0])];let v=0;for(;v<r.length;)a.push(s),l(a,r[v]),a.push(s,w(u[++v]));return h(a),new i(a)}e.str=f;function l(u,r){r instanceof i?u.push(...r._items):r instanceof p?u.push(r):u.push(P(r))}e.addCodeArg=l;function h(u){let r=1;for(;r<u.length-1;){if(u[r]===s){const a=_(u[r-1],u[r+1]);if(a!==void 0){u.splice(r-1,3,a);continue}u[r++]="+"}r++}}function _(u,r){if(r==='""')return u;if(u==='""')return r;if(typeof u=="string")return r instanceof p||u[u.length-1]!=='"'?void 0:typeof r!="string"?`${u.slice(0,-1)}${r}"`:r[0]==='"'?u.slice(0,-1)+r.slice(1):void 0;if(typeof r=="string"&&r[0]==='"'&&!(u instanceof p))return`"${u}${r.slice(1)}`}function g(u,r){return r.emptyStr()?u:u.emptyStr()?r:f`${u}${r}`}e.strConcat=g;function P(u){return typeof u=="number"||typeof u=="boolean"||u===null?u:w(Array.isArray(u)?u.join(","):u)}function $(u){return new i(w(u))}e.stringify=$;function w(u){return JSON.stringify(u).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=w;function y(u){return typeof u=="string"&&e.IDENTIFIER.test(u)?new i(`.${u}`):m`[${u}]`}e.getProperty=y;function b(u){if(typeof u=="string"&&e.IDENTIFIER.test(u))return new i(`${u}`);throw new Error(`CodeGen: invalid export name: ${u}, use explicit $id name mapping`)}e.getEsmExportName=b;function o(u){return new i(u.toString())}e.regexpCode=o})(Ot)),Ot}var kt={},tr;function rr(){return tr||(tr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=yt();class p extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var i;(function(h){h[h.Started=0]="Started",h[h.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class m{constructor({prefixes:_,parent:g}={}){this._names={},this._prefixes=_,this._parent=g}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const g=this._names[_]||this._nameGroup(_);return`${_}${g.index++}`}_nameGroup(_){var g,P;if(!((P=(g=this._parent)===null||g===void 0?void 0:g._prefixes)===null||P===void 0)&&P.has(_)||this._prefixes&&!this._prefixes.has(_))throw new Error(`CodeGen: prefix "${_}" is not allowed in this scope`);return this._names[_]={prefix:_,index:0}}}e.Scope=m;class s extends t.Name{constructor(_,g){super(g),this.prefix=_}setValue(_,{property:g,itemIndex:P}){this.value=_,this.scopePath=(0,t._)`.${new t.Name(g)}[${P}]`}}e.ValueScopeName=s;const f=(0,t._)`\n`;class l extends m{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?f:t.nil}}get(){return this._scope}name(_){return new s(_,this._newName(_))}value(_,g){var P;if(g.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(_),{prefix:w}=$,y=(P=g.key)!==null&&P!==void 0?P:g.ref;let b=this._values[w];if(b){const r=b.get(y);if(r)return r}else b=this._values[w]=new Map;b.set(y,$);const o=this._scope[w]||(this._scope[w]=[]),u=o.length;return o[u]=g.ref,$.setValue(g,{property:w,itemIndex:u}),$}getValue(_,g){const P=this._values[_];if(P)return P.get(g)}scopeRefs(_,g=this._values){return this._reduceValues(g,P=>{if(P.scopePath===void 0)throw new Error(`CodeGen: name "${P}" has no value`);return(0,t._)`${_}${P.scopePath}`})}scopeCode(_=this._values,g,P){return this._reduceValues(_,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},g,P)}_reduceValues(_,g,P={},$){let w=t.nil;for(const y in _){const b=_[y];if(!b)continue;const o=P[y]=P[y]||new Map;b.forEach(u=>{if(o.has(u))return;o.set(u,i.Started);let r=g(u);if(r){const a=this.opts.es5?e.varKinds.var:e.varKinds.const;w=(0,t._)`${w}${a} ${u} = ${r};${this.opts._n}`}else if(r=$?.(u))w=(0,t._)`${w}${r}${this.opts._n}`;else throw new p(u);o.set(u,i.Completed)})}return w}}e.ValueScope=l})(kt)),kt}var nr;function J(){return nr||(nr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=yt(),p=rr();var i=yt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var m=rr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return m.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return m.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return m.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return m.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(c,S){return this}}class f extends s{constructor(c,S,T){super(),this.varKind=c,this.name=S,this.rhs=T}render({es5:c,_n:S}){const T=c?p.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${T} ${this.name}${F};`+S}optimizeNames(c,S){if(c[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,c,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class l extends s{constructor(c,S,T){super(),this.lhs=c,this.rhs=S,this.sideEffects=T}render({_n:c}){return`${this.lhs} = ${this.rhs};`+c}optimizeNames(c,S){if(!(this.lhs instanceof t.Name&&!c[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,c,S),this}get names(){const c=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(c,this.rhs)}}class h extends l{constructor(c,S,T,F){super(c,T,F),this.op=S}render({_n:c}){return`${this.lhs} ${this.op}= ${this.rhs};`+c}}class _ extends s{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`${this.label}:`+c}}class g extends s{constructor(c){super(),this.label=c,this.names={}}render({_n:c}){return`break${this.label?` ${this.label}`:""};`+c}}class P extends s{constructor(c){super(),this.error=c}render({_n:c}){return`throw ${this.error};`+c}get names(){return this.error.names}}class $ extends s{constructor(c){super(),this.code=c}render({_n:c}){return`${this.code};`+c}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(c,S){return this.code=W(this.code,c,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class w extends s{constructor(c=[]){super(),this.nodes=c}render(c){return this.nodes.reduce((S,T)=>S+T.render(c),"")}optimizeNodes(){const{nodes:c}=this;let S=c.length;for(;S--;){const T=c[S].optimizeNodes();Array.isArray(T)?c.splice(S,1,...T):T?c[S]=T:c.splice(S,1)}return c.length>0?this:void 0}optimizeNames(c,S){const{nodes:T}=this;let F=T.length;for(;F--;){const U=T[F];U.optimizeNames(c,S)||(x(c,U.names),T.splice(F,1))}return T.length>0?this:void 0}get names(){return this.nodes.reduce((c,S)=>K(c,S.names),{})}}class y extends w{render(c){return"{"+c._n+super.render(c)+"}"+c._n}}class b extends w{}class o extends y{}o.kind="else";class u extends y{constructor(c,S){super(S),this.condition=c}render(c){let S=`if(${this.condition})`+super.render(c);return this.else&&(S+="else "+this.else.render(c)),S}optimizeNodes(){super.optimizeNodes();const c=this.condition;if(c===!0)return this.nodes;let S=this.else;if(S){const T=S.optimizeNodes();S=this.else=Array.isArray(T)?new o(T):T}if(S)return c===!1?S instanceof u?S:S.nodes:this.nodes.length?this:new u(he(c),S instanceof u?[S]:S.nodes);if(!(c===!1||!this.nodes.length))return this}optimizeNames(c,S){var T;if(this.else=(T=this.else)===null||T===void 0?void 0:T.optimizeNames(c,S),!!(super.optimizeNames(c,S)||this.else))return this.condition=W(this.condition,c,S),this}get names(){const c=super.names;return z(c,this.condition),this.else&&K(c,this.else.names),c}}u.kind="if";class r extends y{}r.kind="for";class a extends r{constructor(c){super(),this.iteration=c}render(c){return`for(${this.iteration})`+super.render(c)}optimizeNames(c,S){if(super.optimizeNames(c,S))return this.iteration=W(this.iteration,c,S),this}get names(){return K(super.names,this.iteration.names)}}class v extends r{constructor(c,S,T,F){super(),this.varKind=c,this.name=S,this.from=T,this.to=F}render(c){const S=c.es5?p.varKinds.var:this.varKind,{name:T,from:F,to:U}=this;return`for(${S} ${T}=${F}; ${T}<${U}; ${T}++)`+super.render(c)}get names(){const c=z(super.names,this.from);return z(c,this.to)}}class n extends r{constructor(c,S,T,F){super(),this.loop=c,this.varKind=S,this.name=T,this.iterable=F}render(c){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(c)}optimizeNames(c,S){if(super.optimizeNames(c,S))return this.iterable=W(this.iterable,c,S),this}get names(){return K(super.names,this.iterable.names)}}class d extends y{constructor(c,S,T){super(),this.name=c,this.args=S,this.async=T}render(c){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(c)}}d.kind="func";class E extends w{render(c){return"return "+super.render(c)}}E.kind="return";class O extends y{render(c){let S="try"+super.render(c);return this.catch&&(S+=this.catch.render(c)),this.finally&&(S+=this.finally.render(c)),S}optimizeNodes(){var c,S;return super.optimizeNodes(),(c=this.catch)===null||c===void 0||c.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(c,S){var T,F;return super.optimizeNames(c,S),(T=this.catch)===null||T===void 0||T.optimizeNames(c,S),(F=this.finally)===null||F===void 0||F.optimizeNames(c,S),this}get names(){const c=super.names;return this.catch&&K(c,this.catch.names),this.finally&&K(c,this.finally.names),c}}class C extends y{constructor(c){super(),this.error=c}render(c){return`catch(${this.error})`+super.render(c)}}C.kind="catch";class D extends y{render(c){return"finally"+super.render(c)}}D.kind="finally";class V{constructor(c,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
2
- `:""},this._extScope=c,this._scope=new p.Scope({parent:c}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(c){return this._scope.name(c)}scopeName(c){return this._extScope.name(c)}scopeValue(c,S){const T=this._extScope.value(c,S);return(this._values[T.prefix]||(this._values[T.prefix]=new Set)).add(T),T}getScopeValue(c,S){return this._extScope.getValue(c,S)}scopeRefs(c){return this._extScope.scopeRefs(c,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(c,S,T,F){const U=this._scope.toName(S);return T!==void 0&&F&&(this._constants[U.str]=T),this._leafNode(new f(c,U,T)),U}const(c,S,T){return this._def(p.varKinds.const,c,S,T)}let(c,S,T){return this._def(p.varKinds.let,c,S,T)}var(c,S,T){return this._def(p.varKinds.var,c,S,T)}assign(c,S,T){return this._leafNode(new l(c,S,T))}add(c,S){return this._leafNode(new h(c,e.operators.ADD,S))}code(c){return typeof c=="function"?c():c!==t.nil&&this._leafNode(new $(c)),this}object(...c){const S=["{"];for(const[T,F]of c)S.length>1&&S.push(","),S.push(T),(T!==F||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,F));return S.push("}"),new t._Code(S)}if(c,S,T){if(this._blockNode(new u(c)),S&&T)this.code(S).else().code(T).endIf();else if(S)this.code(S).endIf();else if(T)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(c){return this._elseNode(new u(c))}else(){return this._elseNode(new o)}endIf(){return this._endBlockNode(u,o)}_for(c,S){return this._blockNode(c),S&&this.code(S).endFor(),this}for(c,S){return this._for(new a(c),S)}forRange(c,S,T,F,U=this.opts.es5?p.varKinds.var:p.varKinds.let){const Z=this._scope.toName(c);return this._for(new v(U,Z,S,T),()=>F(Z))}forOf(c,S,T,F=p.varKinds.const){const U=this._scope.toName(c);if(this.opts.es5){const Z=S instanceof t.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,t._)`${Z}.length`,B=>{this.var(U,(0,t._)`${Z}[${B}]`),T(U)})}return this._for(new n("of",F,U,S),()=>T(U))}forIn(c,S,T,F=this.opts.es5?p.varKinds.var:p.varKinds.const){if(this.opts.ownProperties)return this.forOf(c,(0,t._)`Object.keys(${S})`,T);const U=this._scope.toName(c);return this._for(new n("in",F,U,S),()=>T(U))}endFor(){return this._endBlockNode(r)}label(c){return this._leafNode(new _(c))}break(c){return this._leafNode(new g(c))}return(c){const S=new E;if(this._blockNode(S),this.code(c),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(c,S,T){if(!S&&!T)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new O;if(this._blockNode(F),this.code(c),S){const U=this.name("e");this._currNode=F.catch=new C(U),S(U)}return T&&(this._currNode=F.finally=new D,this.code(T)),this._endBlockNode(C,D)}throw(c){return this._leafNode(new P(c))}block(c,S){return this._blockStarts.push(this._nodes.length),c&&this.code(c).endBlock(S),this}endBlock(c){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const T=this._nodes.length-S;if(T<0||c!==void 0&&T!==c)throw new Error(`CodeGen: wrong number of nodes: ${T} vs ${c} expected`);return this._nodes.length=S,this}func(c,S=t.nil,T,F){return this._blockNode(new d(c,S,T)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode(d)}optimize(c=1){for(;c-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(c){return this._currNode.nodes.push(c),this}_blockNode(c){this._currNode.nodes.push(c),this._nodes.push(c)}_endBlockNode(c,S){const T=this._currNode;if(T instanceof c||S&&T instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${c.kind}/${S.kind}`:c.kind}"`)}_elseNode(c){const S=this._currNode;if(!(S instanceof u))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=c,this}get _root(){return this._nodes[0]}get _currNode(){const c=this._nodes;return c[c.length-1]}set _currNode(c){const S=this._nodes;S[S.length-1]=c}}e.CodeGen=V;function K(k,c){for(const S in c)k[S]=(k[S]||0)+(c[S]||0);return k}function z(k,c){return c instanceof t._CodeOrName?K(k,c.names):k}function W(k,c,S){if(k instanceof t.Name)return T(k);if(!F(k))return k;return new t._Code(k._items.reduce((U,Z)=>(Z instanceof t.Name&&(Z=T(Z)),Z instanceof t._Code?U.push(...Z._items):U.push(Z),U),[]));function T(U){const Z=S[U.str];return Z===void 0||c[U.str]!==1?U:(delete c[U.str],Z)}function F(U){return U instanceof t._Code&&U._items.some(Z=>Z instanceof t.Name&&c[Z.str]===1&&S[Z.str]!==void 0)}}function x(k,c){for(const S in c)k[S]=(k[S]||0)-(c[S]||0)}function he(k){return typeof k=="boolean"||typeof k=="number"||k===null?!k:(0,t._)`!${I(k)}`}e.not=he;const pe=R(e.operators.AND);function Y(...k){return k.reduce(pe)}e.and=Y;const _e=R(e.operators.OR);function A(...k){return k.reduce(_e)}e.or=A;function R(k){return(c,S)=>c===t.nil?S:S===t.nil?c:(0,t._)`${I(c)} ${k} ${I(S)}`}function I(k){return k instanceof t.Name?k:(0,t._)`(${k})`}})(Nt)),Nt}var H={},sr;function Q(){if(sr)return H;sr=1,Object.defineProperty(H,"__esModule",{value:!0}),H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;const e=J(),t=yt();function p(n){const d={};for(const E of n)d[E]=!0;return d}H.toHash=p;function i(n,d){return typeof d=="boolean"?d:Object.keys(d).length===0?!0:(m(n,d),!s(d,n.self.RULES.all))}H.alwaysValidSchema=i;function m(n,d=n.schema){const{opts:E,self:O}=n;if(!E.strictSchema||typeof d=="boolean")return;const C=O.RULES.keywords;for(const D in d)C[D]||v(n,`unknown keyword: "${D}"`)}H.checkUnknownRules=m;function s(n,d){if(typeof n=="boolean")return!n;for(const E in n)if(d[E])return!0;return!1}H.schemaHasRules=s;function f(n,d){if(typeof n=="boolean")return!n;for(const E in n)if(E!=="$ref"&&d.all[E])return!0;return!1}H.schemaHasRulesButRef=f;function l({topSchemaRef:n,schemaPath:d},E,O,C){if(!C){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${n}${d}${(0,e.getProperty)(O)}`}H.schemaRefOrVal=l;function h(n){return P(decodeURIComponent(n))}H.unescapeFragment=h;function _(n){return encodeURIComponent(g(n))}H.escapeFragment=_;function g(n){return typeof n=="number"?`${n}`:n.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=g;function P(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=P;function $(n,d){if(Array.isArray(n))for(const E of n)d(E);else d(n)}H.eachItem=$;function w({mergeNames:n,mergeToName:d,mergeValues:E,resultToName:O}){return(C,D,V,K)=>{const z=V===void 0?D:V instanceof e.Name?(D instanceof e.Name?n(C,D,V):d(C,D,V),V):D instanceof e.Name?(d(C,V,D),D):E(D,V);return K===e.Name&&!(z instanceof e.Name)?O(C,z):z}}H.mergeEvaluated={props:w({mergeNames:(n,d,E)=>n.if((0,e._)`${E} !== true && ${d} !== undefined`,()=>{n.if((0,e._)`${d} === true`,()=>n.assign(E,!0),()=>n.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${d})`))}),mergeToName:(n,d,E)=>n.if((0,e._)`${E} !== true`,()=>{d===!0?n.assign(E,!0):(n.assign(E,(0,e._)`${E} || {}`),b(n,E,d))}),mergeValues:(n,d)=>n===!0?!0:{...n,...d},resultToName:y}),items:w({mergeNames:(n,d,E)=>n.if((0,e._)`${E} !== true && ${d} !== undefined`,()=>n.assign(E,(0,e._)`${d} === true ? true : ${E} > ${d} ? ${E} : ${d}`)),mergeToName:(n,d,E)=>n.if((0,e._)`${E} !== true`,()=>n.assign(E,d===!0?!0:(0,e._)`${E} > ${d} ? ${E} : ${d}`)),mergeValues:(n,d)=>n===!0?!0:Math.max(n,d),resultToName:(n,d)=>n.var("items",d)})};function y(n,d){if(d===!0)return n.var("props",!0);const E=n.var("props",(0,e._)`{}`);return d!==void 0&&b(n,E,d),E}H.evaluatedPropsToName=y;function b(n,d,E){Object.keys(E).forEach(O=>n.assign((0,e._)`${d}${(0,e.getProperty)(O)}`,!0))}H.setEvaluated=b;const o={};function u(n,d){return n.scopeValue("func",{ref:d,code:o[d.code]||(o[d.code]=new t._Code(d.code))})}H.useFunc=u;var r;(function(n){n[n.Num=0]="Num",n[n.Str=1]="Str"})(r||(H.Type=r={}));function a(n,d,E){if(n instanceof e.Name){const O=d===r.Num;return E?O?(0,e._)`"[" + ${n} + "]"`:(0,e._)`"['" + ${n} + "']"`:O?(0,e._)`"/" + ${n}`:(0,e._)`"/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(n).toString():"/"+g(n)}H.getErrorPath=a;function v(n,d,E=n.opts.strictSchema){if(E){if(d=`strict mode: ${d}`,E===!0)throw new Error(d);n.self.logger.warn(d)}}return H.checkStrictMode=v,H}var qe={},or;function $e(){if(or)return qe;or=1,Object.defineProperty(qe,"__esModule",{value:!0});const e=J(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return qe.default=t,qe}var ir;function _t(){return ir||(ir=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=J(),p=Q(),i=$e();e.keywordError={message:({keyword:o})=>(0,t.str)`must pass "${o}" keyword validation`},e.keyword$DataError={message:({keyword:o,schemaType:u})=>u?(0,t.str)`"${o}" keyword must be ${u} ($data)`:(0,t.str)`"${o}" keyword is invalid ($data)`};function m(o,u=e.keywordError,r,a){const{it:v}=o,{gen:n,compositeRule:d,allErrors:E}=v,O=P(o,u,r);a??(d||E)?h(n,O):_(v,(0,t._)`[${O}]`)}e.reportError=m;function s(o,u=e.keywordError,r){const{it:a}=o,{gen:v,compositeRule:n,allErrors:d}=a,E=P(o,u,r);h(v,E),n||d||_(a,i.default.vErrors)}e.reportExtraError=s;function f(o,u){o.assign(i.default.errors,u),o.if((0,t._)`${i.default.vErrors} !== null`,()=>o.if(u,()=>o.assign((0,t._)`${i.default.vErrors}.length`,u),()=>o.assign(i.default.vErrors,null)))}e.resetErrorsCount=f;function l({gen:o,keyword:u,schemaValue:r,data:a,errsCount:v,it:n}){if(v===void 0)throw new Error("ajv implementation error");const d=o.name("err");o.forRange("i",v,i.default.errors,E=>{o.const(d,(0,t._)`${i.default.vErrors}[${E}]`),o.if((0,t._)`${d}.instancePath === undefined`,()=>o.assign((0,t._)`${d}.instancePath`,(0,t.strConcat)(i.default.instancePath,n.errorPath))),o.assign((0,t._)`${d}.schemaPath`,(0,t.str)`${n.errSchemaPath}/${u}`),n.opts.verbose&&(o.assign((0,t._)`${d}.schema`,r),o.assign((0,t._)`${d}.data`,a))})}e.extendErrors=l;function h(o,u){const r=o.const("err",u);o.if((0,t._)`${i.default.vErrors} === null`,()=>o.assign(i.default.vErrors,(0,t._)`[${r}]`),(0,t._)`${i.default.vErrors}.push(${r})`),o.code((0,t._)`${i.default.errors}++`)}function _(o,u){const{gen:r,validateName:a,schemaEnv:v}=o;v.$async?r.throw((0,t._)`new ${o.ValidationError}(${u})`):(r.assign((0,t._)`${a}.errors`,u),r.return(!1))}const g={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function P(o,u,r){const{createErrors:a}=o.it;return a===!1?(0,t._)`{}`:$(o,u,r)}function $(o,u,r={}){const{gen:a,it:v}=o,n=[w(v,r),y(o,r)];return b(o,u,n),a.object(...n)}function w({errorPath:o},{instancePath:u}){const r=u?(0,t.str)`${o}${(0,p.getErrorPath)(u,p.Type.Str)}`:o;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,r)]}function y({keyword:o,it:{errSchemaPath:u}},{schemaPath:r,parentSchema:a}){let v=a?u:(0,t.str)`${u}/${o}`;return r&&(v=(0,t.str)`${v}${(0,p.getErrorPath)(r,p.Type.Str)}`),[g.schemaPath,v]}function b(o,{params:u,message:r},a){const{keyword:v,data:n,schemaValue:d,it:E}=o,{opts:O,propertyName:C,topSchemaRef:D,schemaPath:V}=E;a.push([g.keyword,v],[g.params,typeof u=="function"?u(o):u||(0,t._)`{}`]),O.messages&&a.push([g.message,typeof r=="function"?r(o):r]),O.verbose&&a.push([g.schema,d],[g.parentSchema,(0,t._)`${D}${V}`],[i.default.data,n]),C&&a.push([g.propertyName,C])}})(Rt)),Rt}var ar;function Hn(){if(ar)return we;ar=1,Object.defineProperty(we,"__esModule",{value:!0}),we.boolOrEmptySchema=we.topBoolOrEmptySchema=void 0;const e=_t(),t=J(),p=$e(),i={message:"boolean schema is false"};function m(l){const{gen:h,schema:_,validateName:g}=l;_===!1?f(l,!1):typeof _=="object"&&_.$async===!0?h.return(p.default.data):(h.assign((0,t._)`${g}.errors`,null),h.return(!0))}we.topBoolOrEmptySchema=m;function s(l,h){const{gen:_,schema:g}=l;g===!1?(_.var(h,!1),f(l)):_.var(h,!0)}we.boolOrEmptySchema=s;function f(l,h){const{gen:_,data:g}=l,P={gen:_,keyword:"false schema",data:g,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,e.reportError)(P,i,void 0,h)}return we}var re={},be={},ur;function bn(){if(ur)return be;ur=1,Object.defineProperty(be,"__esModule",{value:!0}),be.getRules=be.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function p(m){return typeof m=="string"&&t.has(m)}be.isJSONType=p;function i(){const m={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...m,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},m.number,m.string,m.array,m.object],post:{rules:[]},all:{},keywords:{}}}return be.getRules=i,be}var ye={},cr;function En(){if(cr)return ye;cr=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.shouldUseRule=ye.shouldUseGroup=ye.schemaHasRulesForType=void 0;function e({schema:i,self:m},s){const f=m.RULES.types[s];return f&&f!==!0&&t(i,f)}ye.schemaHasRulesForType=e;function t(i,m){return m.rules.some(s=>p(i,s))}ye.shouldUseGroup=t;function p(i,m){var s;return i[m.keyword]!==void 0||((s=m.definition.implements)===null||s===void 0?void 0:s.some(f=>i[f]!==void 0))}return ye.shouldUseRule=p,ye}var lr;function gt(){if(lr)return re;lr=1,Object.defineProperty(re,"__esModule",{value:!0}),re.reportTypeError=re.checkDataTypes=re.checkDataType=re.coerceAndCheckDataType=re.getJSONTypes=re.getSchemaTypes=re.DataType=void 0;const e=bn(),t=En(),p=_t(),i=J(),m=Q();var s;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(s||(re.DataType=s={}));function f(r){const a=l(r.type);if(a.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!a.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&a.push("null")}return a}re.getSchemaTypes=f;function l(r){const a=Array.isArray(r)?r:r?[r]:[];if(a.every(e.isJSONType))return a;throw new Error("type must be JSONType or JSONType[]: "+a.join(","))}re.getJSONTypes=l;function h(r,a){const{gen:v,data:n,opts:d}=r,E=g(a,d.coerceTypes),O=a.length>0&&!(E.length===0&&a.length===1&&(0,t.schemaHasRulesForType)(r,a[0]));if(O){const C=y(a,n,d.strictNumbers,s.Wrong);v.if(C,()=>{E.length?P(r,a,E):o(r)})}return O}re.coerceAndCheckDataType=h;const _=new Set(["string","number","integer","boolean","null"]);function g(r,a){return a?r.filter(v=>_.has(v)||a==="array"&&v==="array"):[]}function P(r,a,v){const{gen:n,data:d,opts:E}=r,O=n.let("dataType",(0,i._)`typeof ${d}`),C=n.let("coerced",(0,i._)`undefined`);E.coerceTypes==="array"&&n.if((0,i._)`${O} == 'object' && Array.isArray(${d}) && ${d}.length == 1`,()=>n.assign(d,(0,i._)`${d}[0]`).assign(O,(0,i._)`typeof ${d}`).if(y(a,d,E.strictNumbers),()=>n.assign(C,d))),n.if((0,i._)`${C} !== undefined`);for(const V of v)(_.has(V)||V==="array"&&E.coerceTypes==="array")&&D(V);n.else(),o(r),n.endIf(),n.if((0,i._)`${C} !== undefined`,()=>{n.assign(d,C),$(r,C)});function D(V){switch(V){case"string":n.elseIf((0,i._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,i._)`"" + ${d}`).elseIf((0,i._)`${d} === null`).assign(C,(0,i._)`""`);return;case"number":n.elseIf((0,i._)`${O} == "boolean" || ${d} === null
3
- || (${O} == "string" && ${d} && ${d} == +${d})`).assign(C,(0,i._)`+${d}`);return;case"integer":n.elseIf((0,i._)`${O} === "boolean" || ${d} === null
4
- || (${O} === "string" && ${d} && ${d} == +${d} && !(${d} % 1))`).assign(C,(0,i._)`+${d}`);return;case"boolean":n.elseIf((0,i._)`${d} === "false" || ${d} === 0 || ${d} === null`).assign(C,!1).elseIf((0,i._)`${d} === "true" || ${d} === 1`).assign(C,!0);return;case"null":n.elseIf((0,i._)`${d} === "" || ${d} === 0 || ${d} === false`),n.assign(C,null);return;case"array":n.elseIf((0,i._)`${O} === "string" || ${O} === "number"
5
- || ${O} === "boolean" || ${d} === null`).assign(C,(0,i._)`[${d}]`)}}}function $({gen:r,parentData:a,parentDataProperty:v},n){r.if((0,i._)`${a} !== undefined`,()=>r.assign((0,i._)`${a}[${v}]`,n))}function w(r,a,v,n=s.Correct){const d=n===s.Correct?i.operators.EQ:i.operators.NEQ;let E;switch(r){case"null":return(0,i._)`${a} ${d} null`;case"array":E=(0,i._)`Array.isArray(${a})`;break;case"object":E=(0,i._)`${a} && typeof ${a} == "object" && !Array.isArray(${a})`;break;case"integer":E=O((0,i._)`!(${a} % 1) && !isNaN(${a})`);break;case"number":E=O();break;default:return(0,i._)`typeof ${a} ${d} ${r}`}return n===s.Correct?E:(0,i.not)(E);function O(C=i.nil){return(0,i.and)((0,i._)`typeof ${a} == "number"`,C,v?(0,i._)`isFinite(${a})`:i.nil)}}re.checkDataType=w;function y(r,a,v,n){if(r.length===1)return w(r[0],a,v,n);let d;const E=(0,m.toHash)(r);if(E.array&&E.object){const O=(0,i._)`typeof ${a} != "object"`;d=E.null?O:(0,i._)`!${a} || ${O}`,delete E.null,delete E.array,delete E.object}else d=i.nil;E.number&&delete E.integer;for(const O in E)d=(0,i.and)(d,w(O,a,v,n));return d}re.checkDataTypes=y;const b={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:a})=>typeof r=="string"?(0,i._)`{type: ${r}}`:(0,i._)`{type: ${a}}`};function o(r){const a=u(r);(0,p.reportError)(a,b)}re.reportTypeError=o;function u(r){const{gen:a,data:v,schema:n}=r,d=(0,m.schemaRefOrVal)(r,n,"type");return{gen:a,keyword:"type",data:v,schema:n.type,schemaCode:d,schemaValue:d,parentSchema:n,params:{},it:r}}return re}var Ne={},dr;function Gn(){if(dr)return Ne;dr=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.assignDefaults=void 0;const e=J(),t=Q();function p(m,s){const{properties:f,items:l}=m.schema;if(s==="object"&&f)for(const h in f)i(m,h,f[h].default);else s==="array"&&Array.isArray(l)&&l.forEach((h,_)=>i(m,_,h.default))}Ne.assignDefaults=p;function i(m,s,f){const{gen:l,compositeRule:h,data:_,opts:g}=m;if(f===void 0)return;const P=(0,e._)`${_}${(0,e.getProperty)(s)}`;if(h){(0,t.checkStrictMode)(m,`default is ignored for: ${P}`);return}let $=(0,e._)`${P} === undefined`;g.useDefaults==="empty"&&($=(0,e._)`${$} || ${P} === null || ${P} === ""`),l.if($,(0,e._)`${P} = ${(0,e.stringify)(f)}`)}return Ne}var de={},X={},fr;function fe(){if(fr)return X;fr=1,Object.defineProperty(X,"__esModule",{value:!0}),X.validateUnion=X.validateArray=X.usePattern=X.callValidateCode=X.schemaProperties=X.allSchemaProperties=X.noPropertyInData=X.propertyInData=X.isOwnProperty=X.hasPropFunc=X.reportMissingProp=X.checkMissingProp=X.checkReportMissingProp=void 0;const e=J(),t=Q(),p=$e(),i=Q();function m(r,a){const{gen:v,data:n,it:d}=r;v.if(g(v,n,a,d.opts.ownProperties),()=>{r.setParams({missingProperty:(0,e._)`${a}`},!0),r.error()})}X.checkReportMissingProp=m;function s({gen:r,data:a,it:{opts:v}},n,d){return(0,e.or)(...n.map(E=>(0,e.and)(g(r,a,E,v.ownProperties),(0,e._)`${d} = ${E}`)))}X.checkMissingProp=s;function f(r,a){r.setParams({missingProperty:a},!0),r.error()}X.reportMissingProp=f;function l(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}X.hasPropFunc=l;function h(r,a,v){return(0,e._)`${l(r)}.call(${a}, ${v})`}X.isOwnProperty=h;function _(r,a,v,n){const d=(0,e._)`${a}${(0,e.getProperty)(v)} !== undefined`;return n?(0,e._)`${d} && ${h(r,a,v)}`:d}X.propertyInData=_;function g(r,a,v,n){const d=(0,e._)`${a}${(0,e.getProperty)(v)} === undefined`;return n?(0,e.or)(d,(0,e.not)(h(r,a,v))):d}X.noPropertyInData=g;function P(r){return r?Object.keys(r).filter(a=>a!=="__proto__"):[]}X.allSchemaProperties=P;function $(r,a){return P(a).filter(v=>!(0,t.alwaysValidSchema)(r,a[v]))}X.schemaProperties=$;function w({schemaCode:r,data:a,it:{gen:v,topSchemaRef:n,schemaPath:d,errorPath:E},it:O},C,D,V){const K=V?(0,e._)`${r}, ${a}, ${n}${d}`:a,z=[[p.default.instancePath,(0,e.strConcat)(p.default.instancePath,E)],[p.default.parentData,O.parentData],[p.default.parentDataProperty,O.parentDataProperty],[p.default.rootData,p.default.rootData]];O.opts.dynamicRef&&z.push([p.default.dynamicAnchors,p.default.dynamicAnchors]);const W=(0,e._)`${K}, ${v.object(...z)}`;return D!==e.nil?(0,e._)`${C}.call(${D}, ${W})`:(0,e._)`${C}(${W})`}X.callValidateCode=w;const y=(0,e._)`new RegExp`;function b({gen:r,it:{opts:a}},v){const n=a.unicodeRegExp?"u":"",{regExp:d}=a.code,E=d(v,n);return r.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${d.code==="new RegExp"?y:(0,i.useFunc)(r,d)}(${v}, ${n})`})}X.usePattern=b;function o(r){const{gen:a,data:v,keyword:n,it:d}=r,E=a.name("valid");if(d.allErrors){const C=a.let("valid",!0);return O(()=>a.assign(C,!1)),C}return a.var(E,!0),O(()=>a.break()),E;function O(C){const D=a.const("len",(0,e._)`${v}.length`);a.forRange("i",0,D,V=>{r.subschema({keyword:n,dataProp:V,dataPropType:t.Type.Num},E),a.if((0,e.not)(E),C)})}}X.validateArray=o;function u(r){const{gen:a,schema:v,keyword:n,it:d}=r;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(D=>(0,t.alwaysValidSchema)(d,D))&&!d.opts.unevaluated)return;const O=a.let("valid",!1),C=a.name("_valid");a.block(()=>v.forEach((D,V)=>{const K=r.subschema({keyword:n,schemaProp:V,compositeRule:!0},C);a.assign(O,(0,e._)`${O} || ${C}`),r.mergeValidEvaluated(K,C)||a.if((0,e.not)(O))})),r.result(O,()=>r.reset(),()=>r.error(!0))}return X.validateUnion=u,X}var hr;function Jn(){if(hr)return de;hr=1,Object.defineProperty(de,"__esModule",{value:!0}),de.validateKeywordUsage=de.validSchemaType=de.funcKeywordCode=de.macroKeywordCode=void 0;const e=J(),t=$e(),p=fe(),i=_t();function m($,w){const{gen:y,keyword:b,schema:o,parentSchema:u,it:r}=$,a=w.macro.call(r.self,o,u,r),v=_(y,b,a);r.opts.validateSchema!==!1&&r.self.validateSchema(a,!0);const n=y.name("valid");$.subschema({schema:a,schemaPath:e.nil,errSchemaPath:`${r.errSchemaPath}/${b}`,topSchemaRef:v,compositeRule:!0},n),$.pass(n,()=>$.error(!0))}de.macroKeywordCode=m;function s($,w){var y;const{gen:b,keyword:o,schema:u,parentSchema:r,$data:a,it:v}=$;h(v,w);const n=!a&&w.compile?w.compile.call(v.self,u,r,v):w.validate,d=_(b,o,n),E=b.let("valid");$.block$data(E,O),$.ok((y=w.valid)!==null&&y!==void 0?y:E);function O(){if(w.errors===!1)V(),w.modifying&&f($),K(()=>$.error());else{const z=w.async?C():D();w.modifying&&f($),K(()=>l($,z))}}function C(){const z=b.let("ruleErrs",null);return b.try(()=>V((0,e._)`await `),W=>b.assign(E,!1).if((0,e._)`${W} instanceof ${v.ValidationError}`,()=>b.assign(z,(0,e._)`${W}.errors`),()=>b.throw(W))),z}function D(){const z=(0,e._)`${d}.errors`;return b.assign(z,null),V(e.nil),z}function V(z=w.async?(0,e._)`await `:e.nil){const W=v.opts.passContext?t.default.this:t.default.self,x=!("compile"in w&&!a||w.schema===!1);b.assign(E,(0,e._)`${z}${(0,p.callValidateCode)($,d,W,x)}`,w.modifying)}function K(z){var W;b.if((0,e.not)((W=w.valid)!==null&&W!==void 0?W:E),z)}}de.funcKeywordCode=s;function f($){const{gen:w,data:y,it:b}=$;w.if(b.parentData,()=>w.assign(y,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function l($,w){const{gen:y}=$;y.if((0,e._)`Array.isArray(${w})`,()=>{y.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${w} : ${t.default.vErrors}.concat(${w})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)($)},()=>$.error())}function h({schemaEnv:$},w){if(w.async&&!$.$async)throw new Error("async keyword in sync schema")}function _($,w,y){if(y===void 0)throw new Error(`keyword "${w}" failed to compile`);return $.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,e.stringify)(y)})}function g($,w,y=!1){return!w.length||w.some(b=>b==="array"?Array.isArray($):b==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==b||y&&typeof $>"u")}de.validSchemaType=g;function P({schema:$,opts:w,self:y,errSchemaPath:b},o,u){if(Array.isArray(o.keyword)?!o.keyword.includes(u):o.keyword!==u)throw new Error("ajv implementation error");const r=o.dependencies;if(r?.some(a=>!Object.prototype.hasOwnProperty.call($,a)))throw new Error(`parent schema must have dependencies of ${u}: ${r.join(",")}`);if(o.validateSchema&&!o.validateSchema($[u])){const v=`keyword "${u}" value is invalid at path "${b}": `+y.errorsText(o.validateSchema.errors);if(w.validateSchema==="log")y.logger.error(v);else throw new Error(v)}}return de.validateKeywordUsage=P,de}var ge={},pr;function Bn(){if(pr)return ge;pr=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.extendSubschemaMode=ge.extendSubschemaData=ge.getSubschema=void 0;const e=J(),t=Q();function p(s,{keyword:f,schemaProp:l,schema:h,schemaPath:_,errSchemaPath:g,topSchemaRef:P}){if(f!==void 0&&h!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(f!==void 0){const $=s.schema[f];return l===void 0?{schema:$,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(f)}`,errSchemaPath:`${s.errSchemaPath}/${f}`}:{schema:$[l],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(f)}${(0,e.getProperty)(l)}`,errSchemaPath:`${s.errSchemaPath}/${f}/${(0,t.escapeFragment)(l)}`}}if(h!==void 0){if(_===void 0||g===void 0||P===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:h,schemaPath:_,topSchemaRef:P,errSchemaPath:g}}throw new Error('either "keyword" or "schema" must be passed')}ge.getSubschema=p;function i(s,f,{dataProp:l,dataPropType:h,data:_,dataTypes:g,propertyName:P}){if(_!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:$}=f;if(l!==void 0){const{errorPath:y,dataPathArr:b,opts:o}=f,u=$.let("data",(0,e._)`${f.data}${(0,e.getProperty)(l)}`,!0);w(u),s.errorPath=(0,e.str)`${y}${(0,t.getErrorPath)(l,h,o.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${l}`,s.dataPathArr=[...b,s.parentDataProperty]}if(_!==void 0){const y=_ instanceof e.Name?_:$.let("data",_,!0);w(y),P!==void 0&&(s.propertyName=P)}g&&(s.dataTypes=g);function w(y){s.data=y,s.dataLevel=f.dataLevel+1,s.dataTypes=[],f.definedProperties=new Set,s.parentData=f.data,s.dataNames=[...f.dataNames,y]}}ge.extendSubschemaData=i;function m(s,{jtdDiscriminator:f,jtdMetadata:l,compositeRule:h,createErrors:_,allErrors:g}){h!==void 0&&(s.compositeRule=h),_!==void 0&&(s.createErrors=_),g!==void 0&&(s.allErrors=g),s.jtdDiscriminator=f,s.jtdMetadata=l}return ge.extendSubschemaMode=m,ge}var se={},Tt,mr;function Sn(){return mr||(mr=1,Tt=function e(t,p){if(t===p)return!0;if(t&&p&&typeof t=="object"&&typeof p=="object"){if(t.constructor!==p.constructor)return!1;var i,m,s;if(Array.isArray(t)){if(i=t.length,i!=p.length)return!1;for(m=i;m--!==0;)if(!e(t[m],p[m]))return!1;return!0}if(t.constructor===RegExp)return t.source===p.source&&t.flags===p.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===p.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===p.toString();if(s=Object.keys(t),i=s.length,i!==Object.keys(p).length)return!1;for(m=i;m--!==0;)if(!Object.prototype.hasOwnProperty.call(p,s[m]))return!1;for(m=i;m--!==0;){var f=s[m];if(!e(t[f],p[f]))return!1}return!0}return t!==t&&p!==p}),Tt}var qt={exports:{}},yr;function Wn(){if(yr)return qt.exports;yr=1;var e=qt.exports=function(i,m,s){typeof m=="function"&&(s=m,m={}),s=m.cb||s;var f=typeof s=="function"?s:s.pre||function(){},l=s.post||function(){};t(m,f,l,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,m,s,f,l,h,_,g,P,$){if(f&&typeof f=="object"&&!Array.isArray(f)){m(f,l,h,_,g,P,$);for(var w in f){var y=f[w];if(Array.isArray(y)){if(w in e.arrayKeywords)for(var b=0;b<y.length;b++)t(i,m,s,y[b],l+"/"+w+"/"+b,h,l,w,f,b)}else if(w in e.propsKeywords){if(y&&typeof y=="object")for(var o in y)t(i,m,s,y[o],l+"/"+w+"/"+p(o),h,l,w,f,o)}else(w in e.keywords||i.allKeys&&!(w in e.skipKeywords))&&t(i,m,s,y,l+"/"+w,h,l,w,f)}s(f,l,h,_,g,P,$)}}function p(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return qt.exports}var gr;function vt(){if(gr)return se;gr=1,Object.defineProperty(se,"__esModule",{value:!0}),se.getSchemaRefs=se.resolveUrl=se.normalizeId=se._getFullPath=se.getFullPath=se.inlineRef=void 0;const e=Q(),t=Sn(),p=Wn(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function m(b,o=!0){return typeof b=="boolean"?!0:o===!0?!f(b):o?l(b)<=o:!1}se.inlineRef=m;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function f(b){for(const o in b){if(s.has(o))return!0;const u=b[o];if(Array.isArray(u)&&u.some(f)||typeof u=="object"&&f(u))return!0}return!1}function l(b){let o=0;for(const u in b){if(u==="$ref")return 1/0;if(o++,!i.has(u)&&(typeof b[u]=="object"&&(0,e.eachItem)(b[u],r=>o+=l(r)),o===1/0))return 1/0}return o}function h(b,o="",u){u!==!1&&(o=P(o));const r=b.parse(o);return _(b,r)}se.getFullPath=h;function _(b,o){return b.serialize(o).split("#")[0]+"#"}se._getFullPath=_;const g=/#\/?$/;function P(b){return b?b.replace(g,""):""}se.normalizeId=P;function $(b,o,u){return u=P(u),b.resolve(o,u)}se.resolveUrl=$;const w=/^[a-z_][-a-z0-9._]*$/i;function y(b,o){if(typeof b=="boolean")return{};const{schemaId:u,uriResolver:r}=this.opts,a=P(b[u]||o),v={"":a},n=h(r,a,!1),d={},E=new Set;return p(b,{allKeys:!0},(D,V,K,z)=>{if(z===void 0)return;const W=n+V;let x=v[z];typeof D[u]=="string"&&(x=he.call(this,D[u])),pe.call(this,D.$anchor),pe.call(this,D.$dynamicAnchor),v[V]=x;function he(Y){const _e=this.opts.uriResolver.resolve;if(Y=P(x?_e(x,Y):Y),E.has(Y))throw C(Y);E.add(Y);let A=this.refs[Y];return typeof A=="string"&&(A=this.refs[A]),typeof A=="object"?O(D,A.schema,Y):Y!==P(W)&&(Y[0]==="#"?(O(D,d[Y],Y),d[Y]=D):this.refs[Y]=W),Y}function pe(Y){if(typeof Y=="string"){if(!w.test(Y))throw new Error(`invalid anchor "${Y}"`);he.call(this,`#${Y}`)}}}),d;function O(D,V,K){if(V!==void 0&&!t(D,V))throw C(K)}function C(D){return new Error(`reference "${D}" resolves to more than one schema`)}}return se.getSchemaRefs=y,se}var _r;function $t(){if(_r)return me;_r=1,Object.defineProperty(me,"__esModule",{value:!0}),me.getData=me.KeywordCxt=me.validateFunctionCode=void 0;const e=Hn(),t=gt(),p=En(),i=gt(),m=Gn(),s=Jn(),f=Bn(),l=J(),h=$e(),_=vt(),g=Q(),P=_t();function $(j){if(n(j)&&(E(j),v(j))){o(j);return}w(j,()=>(0,e.topBoolOrEmptySchema)(j))}me.validateFunctionCode=$;function w({gen:j,validateName:N,schema:q,schemaEnv:M,opts:L},G){L.code.es5?j.func(N,(0,l._)`${h.default.data}, ${h.default.valCxt}`,M.$async,()=>{j.code((0,l._)`"use strict"; ${r(q,L)}`),b(j,L),j.code(G)}):j.func(N,(0,l._)`${h.default.data}, ${y(L)}`,M.$async,()=>j.code(r(q,L)).code(G))}function y(j){return(0,l._)`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${j.dynamicRef?(0,l._)`, ${h.default.dynamicAnchors}={}`:l.nil}}={}`}function b(j,N){j.if(h.default.valCxt,()=>{j.var(h.default.instancePath,(0,l._)`${h.default.valCxt}.${h.default.instancePath}`),j.var(h.default.parentData,(0,l._)`${h.default.valCxt}.${h.default.parentData}`),j.var(h.default.parentDataProperty,(0,l._)`${h.default.valCxt}.${h.default.parentDataProperty}`),j.var(h.default.rootData,(0,l._)`${h.default.valCxt}.${h.default.rootData}`),N.dynamicRef&&j.var(h.default.dynamicAnchors,(0,l._)`${h.default.valCxt}.${h.default.dynamicAnchors}`)},()=>{j.var(h.default.instancePath,(0,l._)`""`),j.var(h.default.parentData,(0,l._)`undefined`),j.var(h.default.parentDataProperty,(0,l._)`undefined`),j.var(h.default.rootData,h.default.data),N.dynamicRef&&j.var(h.default.dynamicAnchors,(0,l._)`{}`)})}function o(j){const{schema:N,opts:q,gen:M}=j;w(j,()=>{q.$comment&&N.$comment&&z(j),D(j),M.let(h.default.vErrors,null),M.let(h.default.errors,0),q.unevaluated&&u(j),O(j),W(j)})}function u(j){const{gen:N,validateName:q}=j;j.evaluated=N.const("evaluated",(0,l._)`${q}.evaluated`),N.if((0,l._)`${j.evaluated}.dynamicProps`,()=>N.assign((0,l._)`${j.evaluated}.props`,(0,l._)`undefined`)),N.if((0,l._)`${j.evaluated}.dynamicItems`,()=>N.assign((0,l._)`${j.evaluated}.items`,(0,l._)`undefined`))}function r(j,N){const q=typeof j=="object"&&j[N.schemaId];return q&&(N.code.source||N.code.process)?(0,l._)`/*# sourceURL=${q} */`:l.nil}function a(j,N){if(n(j)&&(E(j),v(j))){d(j,N);return}(0,e.boolOrEmptySchema)(j,N)}function v({schema:j,self:N}){if(typeof j=="boolean")return!j;for(const q in j)if(N.RULES.all[q])return!0;return!1}function n(j){return typeof j.schema!="boolean"}function d(j,N){const{schema:q,gen:M,opts:L}=j;L.$comment&&q.$comment&&z(j),V(j),K(j);const G=M.const("_errs",h.default.errors);O(j,G),M.var(N,(0,l._)`${G} === ${h.default.errors}`)}function E(j){(0,g.checkUnknownRules)(j),C(j)}function O(j,N){if(j.opts.jtd)return he(j,[],!1,N);const q=(0,t.getSchemaTypes)(j.schema),M=(0,t.coerceAndCheckDataType)(j,q);he(j,q,!M,N)}function C(j){const{schema:N,errSchemaPath:q,opts:M,self:L}=j;N.$ref&&M.ignoreKeywordsWithRef&&(0,g.schemaHasRulesButRef)(N,L.RULES)&&L.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function D(j){const{schema:N,opts:q}=j;N.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,g.checkStrictMode)(j,"default is ignored in the schema root")}function V(j){const N=j.schema[j.opts.schemaId];N&&(j.baseId=(0,_.resolveUrl)(j.opts.uriResolver,j.baseId,N))}function K(j){if(j.schema.$async&&!j.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:j,schemaEnv:N,schema:q,errSchemaPath:M,opts:L}){const G=q.$comment;if(L.$comment===!0)j.code((0,l._)`${h.default.self}.logger.log(${G})`);else if(typeof L.$comment=="function"){const ee=(0,l.str)`${M}/$comment`,le=j.scopeValue("root",{ref:N.root});j.code((0,l._)`${h.default.self}.opts.$comment(${G}, ${ee}, ${le}.schema)`)}}function W(j){const{gen:N,schemaEnv:q,validateName:M,ValidationError:L,opts:G}=j;q.$async?N.if((0,l._)`${h.default.errors} === 0`,()=>N.return(h.default.data),()=>N.throw((0,l._)`new ${L}(${h.default.vErrors})`)):(N.assign((0,l._)`${M}.errors`,h.default.vErrors),G.unevaluated&&x(j),N.return((0,l._)`${h.default.errors} === 0`))}function x({gen:j,evaluated:N,props:q,items:M}){q instanceof l.Name&&j.assign((0,l._)`${N}.props`,q),M instanceof l.Name&&j.assign((0,l._)`${N}.items`,M)}function he(j,N,q,M){const{gen:L,schema:G,data:ee,allErrors:le,opts:oe,self:ie}=j,{RULES:te}=ie;if(G.$ref&&(oe.ignoreKeywordsWithRef||!(0,g.schemaHasRulesButRef)(G,te))){L.block(()=>F(j,"$ref",te.all.$ref.definition));return}oe.jtd||Y(j,N),L.block(()=>{for(const ce of te.rules)Se(ce);Se(te.post)});function Se(ce){(0,p.shouldUseGroup)(G,ce)&&(ce.type?(L.if((0,i.checkDataType)(ce.type,ee,oe.strictNumbers)),pe(j,ce),N.length===1&&N[0]===ce.type&&q&&(L.else(),(0,i.reportTypeError)(j)),L.endIf()):pe(j,ce),le||L.if((0,l._)`${h.default.errors} === ${M||0}`))}}function pe(j,N){const{gen:q,schema:M,opts:{useDefaults:L}}=j;L&&(0,m.assignDefaults)(j,N.type),q.block(()=>{for(const G of N.rules)(0,p.shouldUseRule)(M,G)&&F(j,G.keyword,G.definition,N.type)})}function Y(j,N){j.schemaEnv.meta||!j.opts.strictTypes||(_e(j,N),j.opts.allowUnionTypes||A(j,N),R(j,j.dataTypes))}function _e(j,N){if(N.length){if(!j.dataTypes.length){j.dataTypes=N;return}N.forEach(q=>{k(j.dataTypes,q)||S(j,`type "${q}" not allowed by context "${j.dataTypes.join(",")}"`)}),c(j,N)}}function A(j,N){N.length>1&&!(N.length===2&&N.includes("null"))&&S(j,"use allowUnionTypes to allow union type keyword")}function R(j,N){const q=j.self.RULES.all;for(const M in q){const L=q[M];if(typeof L=="object"&&(0,p.shouldUseRule)(j.schema,L)){const{type:G}=L.definition;G.length&&!G.some(ee=>I(N,ee))&&S(j,`missing type "${G.join(",")}" for keyword "${M}"`)}}}function I(j,N){return j.includes(N)||N==="number"&&j.includes("integer")}function k(j,N){return j.includes(N)||N==="integer"&&j.includes("number")}function c(j,N){const q=[];for(const M of j.dataTypes)k(N,M)?q.push(M):N.includes("integer")&&M==="number"&&q.push("integer");j.dataTypes=q}function S(j,N){const q=j.schemaEnv.baseId+j.errSchemaPath;N+=` at "${q}" (strictTypes)`,(0,g.checkStrictMode)(j,N,j.opts.strictTypes)}class T{constructor(N,q,M){if((0,s.validateKeywordUsage)(N,q,M),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=M,this.data=N.data,this.schema=N.schema[M],this.$data=q.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,g.schemaRefOrVal)(N,this.schema,M,this.$data),this.schemaType=q.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=q,this.$data)this.schemaCode=N.gen.const("vSchema",B(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${M} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=N.gen.const("_errs",h.default.errors))}result(N,q,M){this.failResult((0,l.not)(N),q,M)}failResult(N,q,M){this.gen.if(N),M?M():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(N,q){this.failResult((0,l.not)(N),void 0,q)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:q}=this;this.fail((0,l._)`${q} !== undefined && (${(0,l.or)(this.invalid$data(),N)})`)}error(N,q,M){if(q){this.setParams(q),this._error(N,M),this.setParams({});return}this._error(N,M)}_error(N,q){(N?P.reportExtraError:P.reportError)(this,this.def.error,q)}$dataError(){(0,P.reportError)(this,this.def.$dataError||P.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,P.resetErrorsCount)(this.gen,this.errsCount)}ok(N){this.allErrors||this.gen.if(N)}setParams(N,q){q?Object.assign(this.params,N):this.params=N}block$data(N,q,M=l.nil){this.gen.block(()=>{this.check$data(N,M),q()})}check$data(N=l.nil,q=l.nil){if(!this.$data)return;const{gen:M,schemaCode:L,schemaType:G,def:ee}=this;M.if((0,l.or)((0,l._)`${L} === undefined`,q)),N!==l.nil&&M.assign(N,!0),(G.length||ee.validateSchema)&&(M.elseIf(this.invalid$data()),this.$dataError(),N!==l.nil&&M.assign(N,!1)),M.else()}invalid$data(){const{gen:N,schemaCode:q,schemaType:M,def:L,it:G}=this;return(0,l.or)(ee(),le());function ee(){if(M.length){if(!(q instanceof l.Name))throw new Error("ajv implementation error");const oe=Array.isArray(M)?M:[M];return(0,l._)`${(0,i.checkDataTypes)(oe,q,G.opts.strictNumbers,i.DataType.Wrong)}`}return l.nil}function le(){if(L.validateSchema){const oe=N.scopeValue("validate$data",{ref:L.validateSchema});return(0,l._)`!${oe}(${q})`}return l.nil}}subschema(N,q){const M=(0,f.getSubschema)(this.it,N);(0,f.extendSubschemaData)(M,this.it,N),(0,f.extendSubschemaMode)(M,N);const L={...this.it,...M,items:void 0,props:void 0};return a(L,q),L}mergeEvaluated(N,q){const{it:M,gen:L}=this;M.opts.unevaluated&&(M.props!==!0&&N.props!==void 0&&(M.props=g.mergeEvaluated.props(L,N.props,M.props,q)),M.items!==!0&&N.items!==void 0&&(M.items=g.mergeEvaluated.items(L,N.items,M.items,q)))}mergeValidEvaluated(N,q){const{it:M,gen:L}=this;if(M.opts.unevaluated&&(M.props!==!0||M.items!==!0))return L.if(q,()=>this.mergeEvaluated(N,l.Name)),!0}}me.KeywordCxt=T;function F(j,N,q,M){const L=new T(j,q,N);"code"in q?q.code(L,M):L.$data&&q.validate?(0,s.funcKeywordCode)(L,q):"macro"in q?(0,s.macroKeywordCode)(L,q):(q.compile||q.validate)&&(0,s.funcKeywordCode)(L,q)}const U=/^\/(?:[^~]|~0|~1)*$/,Z=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(j,{dataLevel:N,dataNames:q,dataPathArr:M}){let L,G;if(j==="")return h.default.rootData;if(j[0]==="/"){if(!U.test(j))throw new Error(`Invalid JSON-pointer: ${j}`);L=j,G=h.default.rootData}else{const ie=Z.exec(j);if(!ie)throw new Error(`Invalid JSON-pointer: ${j}`);const te=+ie[1];if(L=ie[2],L==="#"){if(te>=N)throw new Error(oe("property/index",te));return M[N-te]}if(te>N)throw new Error(oe("data",te));if(G=q[N-te],!L)return G}let ee=G;const le=L.split("/");for(const ie of le)ie&&(G=(0,l._)`${G}${(0,l.getProperty)((0,g.unescapeJsonPointer)(ie))}`,ee=(0,l._)`${ee} && ${G}`);return ee;function oe(ie,te){return`Cannot access ${ie} ${te} levels up, current level is ${N}`}}return me.getData=B,me}var Ie={},vr;function Gt(){if(vr)return Ie;vr=1,Object.defineProperty(Ie,"__esModule",{value:!0});class e extends Error{constructor(p){super("validation failed"),this.errors=p,this.ajv=this.validation=!0}}return Ie.default=e,Ie}var Ce={},$r;function wt(){if($r)return Ce;$r=1,Object.defineProperty(Ce,"__esModule",{value:!0});const e=vt();class t extends Error{constructor(i,m,s,f){super(f||`can't resolve reference ${s} from id ${m}`),this.missingRef=(0,e.resolveUrl)(i,m,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return Ce.default=t,Ce}var ae={},wr;function Jt(){if(wr)return ae;wr=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.resolveSchema=ae.getCompilingSchema=ae.resolveRef=ae.compileSchema=ae.SchemaEnv=void 0;const e=J(),t=Gt(),p=$e(),i=vt(),m=Q(),s=$t();class f{constructor(u){var r;this.refs={},this.dynamicAnchors={};let a;typeof u.schema=="object"&&(a=u.schema),this.schema=u.schema,this.schemaId=u.schemaId,this.root=u.root||this,this.baseId=(r=u.baseId)!==null&&r!==void 0?r:(0,i.normalizeId)(a?.[u.schemaId||"$id"]),this.schemaPath=u.schemaPath,this.localRefs=u.localRefs,this.meta=u.meta,this.$async=a?.$async,this.refs={}}}ae.SchemaEnv=f;function l(o){const u=g.call(this,o);if(u)return u;const r=(0,i.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:a,lines:v}=this.opts.code,{ownProperties:n}=this.opts,d=new e.CodeGen(this.scope,{es5:a,lines:v,ownProperties:n});let E;o.$async&&(E=d.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=d.scopeName("validate");o.validateName=O;const C={gen:d,allErrors:this.opts.allErrors,data:p.default.data,parentData:p.default.parentData,parentDataProperty:p.default.parentDataProperty,dataNames:[p.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:E,schema:o.schema,schemaEnv:o,rootId:r,baseId:o.baseId||r,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let D;try{this._compilations.add(o),(0,s.validateFunctionCode)(C),d.optimize(this.opts.code.optimize);const V=d.toString();D=`${d.scopeRefs(p.default.scope)}return ${V}`,this.opts.code.process&&(D=this.opts.code.process(D,o));const z=new Function(`${p.default.self}`,`${p.default.scope}`,D)(this,this.scope.get());if(this.scope.value(O,{ref:z}),z.errors=null,z.schema=o.schema,z.schemaEnv=o,o.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:O,validateCode:V,scopeValues:d._values}),this.opts.unevaluated){const{props:W,items:x}=C;z.evaluated={props:W instanceof e.Name?void 0:W,items:x instanceof e.Name?void 0:x,dynamicProps:W instanceof e.Name,dynamicItems:x instanceof e.Name},z.source&&(z.source.evaluated=(0,e.stringify)(z.evaluated))}return o.validate=z,o}catch(V){throw delete o.validate,delete o.validateName,D&&this.logger.error("Error compiling schema, function code:",D),V}finally{this._compilations.delete(o)}}ae.compileSchema=l;function h(o,u,r){var a;r=(0,i.resolveUrl)(this.opts.uriResolver,u,r);const v=o.refs[r];if(v)return v;let n=$.call(this,o,r);if(n===void 0){const d=(a=o.localRefs)===null||a===void 0?void 0:a[r],{schemaId:E}=this.opts;d&&(n=new f({schema:d,schemaId:E,root:o,baseId:u}))}if(n!==void 0)return o.refs[r]=_.call(this,n)}ae.resolveRef=h;function _(o){return(0,i.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:l.call(this,o)}function g(o){for(const u of this._compilations)if(P(u,o))return u}ae.getCompilingSchema=g;function P(o,u){return o.schema===u.schema&&o.root===u.root&&o.baseId===u.baseId}function $(o,u){let r;for(;typeof(r=this.refs[u])=="string";)u=r;return r||this.schemas[u]||w.call(this,o,u)}function w(o,u){const r=this.opts.uriResolver.parse(u),a=(0,i._getFullPath)(this.opts.uriResolver,r);let v=(0,i.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&a===v)return b.call(this,r,o);const n=(0,i.normalizeId)(a),d=this.refs[n]||this.schemas[n];if(typeof d=="string"){const E=w.call(this,o,d);return typeof E?.schema!="object"?void 0:b.call(this,r,E)}if(typeof d?.schema=="object"){if(d.validate||l.call(this,d),n===(0,i.normalizeId)(u)){const{schema:E}=d,{schemaId:O}=this.opts,C=E[O];return C&&(v=(0,i.resolveUrl)(this.opts.uriResolver,v,C)),new f({schema:E,schemaId:O,root:o,baseId:v})}return b.call(this,r,d)}}ae.resolveSchema=w;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(o,{baseId:u,schema:r,root:a}){var v;if(((v=o.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const E of o.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const O=r[(0,m.unescapeFragment)(E)];if(O===void 0)return;r=O;const C=typeof r=="object"&&r[this.opts.schemaId];!y.has(E)&&C&&(u=(0,i.resolveUrl)(this.opts.uriResolver,u,C))}let n;if(typeof r!="boolean"&&r.$ref&&!(0,m.schemaHasRulesButRef)(r,this.RULES)){const E=(0,i.resolveUrl)(this.opts.uriResolver,u,r.$ref);n=w.call(this,a,E)}const{schemaId:d}=this.opts;if(n=n||new f({schema:r,schemaId:d,root:a,baseId:u}),n.schema!==n.root.schema)return n}return ae}const Qn="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Zn="Meta-schema for $data reference (JSON AnySchema extension proposal)",Xn="object",Yn=["$data"],xn={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},es=!1,ts={$id:Qn,description:Zn,type:Xn,required:Yn,properties:xn,additionalProperties:es};var Ae={},Oe={exports:{}},It,br;function Pn(){if(br)return It;br=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=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 p($){let w="",y=0,b=0;for(b=0;b<$.length;b++)if(y=$[b].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";w+=$[b];break}for(b+=1;b<$.length;b++){if(y=$[b].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";w+=$[b]}return w}const i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function m($){return $.length=0,!0}function s($,w,y){if($.length){const b=p($);if(b!=="")w.push(b);else return y.error=!0,!1;$.length=0}return!0}function f($){let w=0;const y={error:!1,address:"",zone:""},b=[],o=[];let u=!1,r=!1,a=s;for(let v=0;v<$.length;v++){const n=$[v];if(!(n==="["||n==="]"))if(n===":"){if(u===!0&&(r=!0),!a(o,b,y))break;if(++w>7){y.error=!0;break}v>0&&$[v-1]===":"&&(u=!0),b.push(":");continue}else if(n==="%"){if(!a(o,b,y))break;a=m}else{o.push(n);continue}}return o.length&&(a===m?y.zone=o.join(""):r?b.push(o.join("")):b.push(p(o))),y.address=b.join(""),y}function l($){if(h($,":")<2)return{host:$,isIPV6:!1};const w=f($);if(w.error)return{host:$,isIPV6:!1};{let y=w.address,b=w.address;return w.zone&&(y+="%"+w.zone,b+="%25"+w.zone),{host:y,isIPV6:!0,escapedHost:b}}}function h($,w){let y=0;for(let b=0;b<$.length;b++)$[b]===w&&y++;return y}function _($){let w=$;const y=[];let b=-1,o=0;for(;o=w.length;){if(o===1){if(w===".")break;if(w==="/"){y.push("/");break}else{y.push(w);break}}else if(o===2){if(w[0]==="."){if(w[1]===".")break;if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&(w[1]==="."||w[1]==="/")){y.push("/");break}}else if(o===3&&w==="/.."){y.length!==0&&y.pop(),y.push("/");break}if(w[0]==="."){if(w[1]==="."){if(w[2]==="/"){w=w.slice(3);continue}}else if(w[1]==="/"){w=w.slice(2);continue}}else if(w[0]==="/"&&w[1]==="."){if(w[2]==="/"){w=w.slice(2);continue}else if(w[2]==="."&&w[3]==="/"){w=w.slice(3),y.length!==0&&y.pop();continue}}if((b=w.indexOf("/",1))===-1){y.push(w);break}else y.push(w.slice(0,b)),w=w.slice(b)}return y.join("")}function g($,w){const y=w!==!0?escape:unescape;return $.scheme!==void 0&&($.scheme=y($.scheme)),$.userinfo!==void 0&&($.userinfo=y($.userinfo)),$.host!==void 0&&($.host=y($.host)),$.path!==void 0&&($.path=y($.path)),$.query!==void 0&&($.query=y($.query)),$.fragment!==void 0&&($.fragment=y($.fragment)),$}function P($){const w=[];if($.userinfo!==void 0&&(w.push($.userinfo),w.push("@")),$.host!==void 0){let y=unescape($.host);if(!t(y)){const b=l(y);b.isIPV6===!0?y=`[${b.escapedHost}]`:y=$.host}w.push(y)}return(typeof $.port=="number"||typeof $.port=="string")&&(w.push(":"),w.push(String($.port))),w.length?w.join(""):void 0}return It={nonSimpleDomain:i,recomposeAuthority:P,normalizeComponentEncoding:g,removeDotSegments:_,isIPv4:t,isUUID:e,normalizeIPv6:l,stringArrayToHexStripped:p},It}var Ct,Er;function rs(){if(Er)return Ct;Er=1;const{isUUID:e}=Pn(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,p=["http","https","ws","wss","urn","urn:uuid"];function i(n){return p.indexOf(n)!==-1}function m(n){return n.secure===!0?!0:n.secure===!1?!1:n.scheme?n.scheme.length===3&&(n.scheme[0]==="w"||n.scheme[0]==="W")&&(n.scheme[1]==="s"||n.scheme[1]==="S")&&(n.scheme[2]==="s"||n.scheme[2]==="S"):!1}function s(n){return n.host||(n.error=n.error||"HTTP URIs must have a host."),n}function f(n){const d=String(n.scheme).toLowerCase()==="https";return(n.port===(d?443:80)||n.port==="")&&(n.port=void 0),n.path||(n.path="/"),n}function l(n){return n.secure=m(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n}function h(n){if((n.port===(m(n)?443:80)||n.port==="")&&(n.port=void 0),typeof n.secure=="boolean"&&(n.scheme=n.secure?"wss":"ws",n.secure=void 0),n.resourceName){const[d,E]=n.resourceName.split("?");n.path=d&&d!=="/"?d:void 0,n.query=E,n.resourceName=void 0}return n.fragment=void 0,n}function _(n,d){if(!n.path)return n.error="URN can not be parsed",n;const E=n.path.match(t);if(E){const O=d.scheme||n.scheme||"urn";n.nid=E[1].toLowerCase(),n.nss=E[2];const C=`${O}:${d.nid||n.nid}`,D=v(C);n.path=void 0,D&&(n=D.parse(n,d))}else n.error=n.error||"URN can not be parsed.";return n}function g(n,d){if(n.nid===void 0)throw new Error("URN without nid cannot be serialized");const E=d.scheme||n.scheme||"urn",O=n.nid.toLowerCase(),C=`${E}:${d.nid||O}`,D=v(C);D&&(n=D.serialize(n,d));const V=n,K=n.nss;return V.path=`${O||d.nid}:${K}`,d.skipEscape=!0,V}function P(n,d){const E=n;return E.uuid=E.nss,E.nss=void 0,!d.tolerant&&(!E.uuid||!e(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function $(n){const d=n;return d.nss=(n.uuid||"").toLowerCase(),d}const w={scheme:"http",domainHost:!0,parse:s,serialize:f},y={scheme:"https",domainHost:w.domainHost,parse:s,serialize:f},b={scheme:"ws",domainHost:!0,parse:l,serialize:h},o={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},a={http:w,https:y,ws:b,wss:o,urn:{scheme:"urn",parse:_,serialize:g,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:P,serialize:$,skipNormalize:!0}};Object.setPrototypeOf(a,null);function v(n){return n&&(a[n]||a[n.toLowerCase()])||void 0}return Ct={wsIsSecure:m,SCHEMES:a,isValidSchemeName:i,getSchemeHandler:v},Ct}var Sr;function ns(){if(Sr)return Oe.exports;Sr=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:p,normalizeComponentEncoding:i,isIPv4:m,nonSimpleDomain:s}=Pn(),{SCHEMES:f,getSchemeHandler:l}=rs();function h(o,u){return typeof o=="string"?o=$(y(o,u),u):typeof o=="object"&&(o=y($(o,u),u)),o}function _(o,u,r){const a=r?Object.assign({scheme:"null"},r):{scheme:"null"},v=g(y(o,a),y(u,a),a,!0);return a.skipEscape=!0,$(v,a)}function g(o,u,r,a){const v={};return a||(o=y($(o,r),r),u=y($(u,r),r)),r=r||{},!r.tolerant&&u.scheme?(v.scheme=u.scheme,v.userinfo=u.userinfo,v.host=u.host,v.port=u.port,v.path=t(u.path||""),v.query=u.query):(u.userinfo!==void 0||u.host!==void 0||u.port!==void 0?(v.userinfo=u.userinfo,v.host=u.host,v.port=u.port,v.path=t(u.path||""),v.query=u.query):(u.path?(u.path[0]==="/"?v.path=t(u.path):((o.userinfo!==void 0||o.host!==void 0||o.port!==void 0)&&!o.path?v.path="/"+u.path:o.path?v.path=o.path.slice(0,o.path.lastIndexOf("/")+1)+u.path:v.path=u.path,v.path=t(v.path)),v.query=u.query):(v.path=o.path,u.query!==void 0?v.query=u.query:v.query=o.query),v.userinfo=o.userinfo,v.host=o.host,v.port=o.port),v.scheme=o.scheme),v.fragment=u.fragment,v}function P(o,u,r){return typeof o=="string"?(o=unescape(o),o=$(i(y(o,r),!0),{...r,skipEscape:!0})):typeof o=="object"&&(o=$(i(o,!0),{...r,skipEscape:!0})),typeof u=="string"?(u=unescape(u),u=$(i(y(u,r),!0),{...r,skipEscape:!0})):typeof u=="object"&&(u=$(i(u,!0),{...r,skipEscape:!0})),o.toLowerCase()===u.toLowerCase()}function $(o,u){const r={host:o.host,scheme:o.scheme,userinfo:o.userinfo,port:o.port,path:o.path,query:o.query,nid:o.nid,nss:o.nss,uuid:o.uuid,fragment:o.fragment,reference:o.reference,resourceName:o.resourceName,secure:o.secure,error:""},a=Object.assign({},u),v=[],n=l(a.scheme||r.scheme);n&&n.serialize&&n.serialize(r,a),r.path!==void 0&&(a.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),a.reference!=="suffix"&&r.scheme&&v.push(r.scheme,":");const d=p(r);if(d!==void 0&&(a.reference!=="suffix"&&v.push("//"),v.push(d),r.path&&r.path[0]!=="/"&&v.push("/")),r.path!==void 0){let E=r.path;!a.absolutePath&&(!n||!n.absolutePath)&&(E=t(E)),d===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),v.push(E)}return r.query!==void 0&&v.push("?",r.query),r.fragment!==void 0&&v.push("#",r.fragment),v.join("")}const w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(o,u){const r=Object.assign({},u),a={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let v=!1;r.reference==="suffix"&&(r.scheme?o=r.scheme+":"+o:o="//"+o);const n=o.match(w);if(n){if(a.scheme=n[1],a.userinfo=n[3],a.host=n[4],a.port=parseInt(n[5],10),a.path=n[6]||"",a.query=n[7],a.fragment=n[8],isNaN(a.port)&&(a.port=n[5]),a.host)if(m(a.host)===!1){const O=e(a.host);a.host=O.host.toLowerCase(),v=O.isIPV6}else v=!0;a.scheme===void 0&&a.userinfo===void 0&&a.host===void 0&&a.port===void 0&&a.query===void 0&&!a.path?a.reference="same-document":a.scheme===void 0?a.reference="relative":a.fragment===void 0?a.reference="absolute":a.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==a.reference&&(a.error=a.error||"URI is not a "+r.reference+" reference.");const d=l(r.scheme||a.scheme);if(!r.unicodeSupport&&(!d||!d.unicodeSupport)&&a.host&&(r.domainHost||d&&d.domainHost)&&v===!1&&s(a.host))try{a.host=URL.domainToASCII(a.host.toLowerCase())}catch(E){a.error=a.error||"Host's domain name can not be converted to ASCII: "+E}(!d||d&&!d.skipNormalize)&&(o.indexOf("%")!==-1&&(a.scheme!==void 0&&(a.scheme=unescape(a.scheme)),a.host!==void 0&&(a.host=unescape(a.host))),a.path&&(a.path=escape(unescape(a.path))),a.fragment&&(a.fragment=encodeURI(decodeURIComponent(a.fragment)))),d&&d.parse&&d.parse(a,r)}else a.error=a.error||"URI can not be parsed.";return a}const b={SCHEMES:f,normalize:h,resolve:_,resolveComponent:g,equal:P,serialize:$,parse:y};return Oe.exports=b,Oe.exports.default=b,Oe.exports.fastUri=b,Oe.exports}var Pr;function ss(){if(Pr)return Ae;Pr=1,Object.defineProperty(Ae,"__esModule",{value:!0});const e=ns();return e.code='require("ajv/dist/runtime/uri").default',Ae.default=e,Ae}var jr;function os(){return jr||(jr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=$t();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var p=J();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});const i=Gt(),m=wt(),s=bn(),f=Jt(),l=J(),h=vt(),_=gt(),g=Q(),P=ts,$=ss(),w=(A,R)=>new RegExp(A,R);w.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),o={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."},u={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},r=200;function a(A){var R,I,k,c,S,T,F,U,Z,B,j,N,q,M,L,G,ee,le,oe,ie,te,Se,ce,bt,Et;const Re=A.strict,St=(R=A.code)===null||R===void 0?void 0:R.optimize,Wt=St===!0||St===void 0?1:St||0,Qt=(k=(I=A.code)===null||I===void 0?void 0:I.regExp)!==null&&k!==void 0?k:w,qn=(c=A.uriResolver)!==null&&c!==void 0?c:$.default;return{strictSchema:(T=(S=A.strictSchema)!==null&&S!==void 0?S:Re)!==null&&T!==void 0?T:!0,strictNumbers:(U=(F=A.strictNumbers)!==null&&F!==void 0?F:Re)!==null&&U!==void 0?U:!0,strictTypes:(B=(Z=A.strictTypes)!==null&&Z!==void 0?Z:Re)!==null&&B!==void 0?B:"log",strictTuples:(N=(j=A.strictTuples)!==null&&j!==void 0?j:Re)!==null&&N!==void 0?N:"log",strictRequired:(M=(q=A.strictRequired)!==null&&q!==void 0?q:Re)!==null&&M!==void 0?M:!1,code:A.code?{...A.code,optimize:Wt,regExp:Qt}:{optimize:Wt,regExp:Qt},loopRequired:(L=A.loopRequired)!==null&&L!==void 0?L:r,loopEnum:(G=A.loopEnum)!==null&&G!==void 0?G:r,meta:(ee=A.meta)!==null&&ee!==void 0?ee:!0,messages:(le=A.messages)!==null&&le!==void 0?le:!0,inlineRefs:(oe=A.inlineRefs)!==null&&oe!==void 0?oe:!0,schemaId:(ie=A.schemaId)!==null&&ie!==void 0?ie:"$id",addUsedSchema:(te=A.addUsedSchema)!==null&&te!==void 0?te:!0,validateSchema:(Se=A.validateSchema)!==null&&Se!==void 0?Se:!0,validateFormats:(ce=A.validateFormats)!==null&&ce!==void 0?ce:!0,unicodeRegExp:(bt=A.unicodeRegExp)!==null&&bt!==void 0?bt:!0,int32range:(Et=A.int32range)!==null&&Et!==void 0?Et:!0,uriResolver:qn}}class v{constructor(R={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,R=this.opts={...R,...a(R)};const{es5:I,lines:k}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:b,es5:I,lines:k}),this.logger=K(R.logger);const c=R.validateFormats;R.validateFormats=!1,this.RULES=(0,s.getRules)(),n.call(this,o,R,"NOT SUPPORTED"),n.call(this,u,R,"DEPRECATED","warn"),this._metaOpts=D.call(this),R.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),R.keywords&&C.call(this,R.keywords),typeof R.meta=="object"&&this.addMetaSchema(R.meta),E.call(this),R.validateFormats=c}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:R,meta:I,schemaId:k}=this.opts;let c=P;k==="id"&&(c={...P},c.id=c.$id,delete c.$id),I&&R&&this.addMetaSchema(c,c[k],!1)}defaultMeta(){const{meta:R,schemaId:I}=this.opts;return this.opts.defaultMeta=typeof R=="object"?R[I]||R:void 0}validate(R,I){let k;if(typeof R=="string"){if(k=this.getSchema(R),!k)throw new Error(`no schema with key or ref "${R}"`)}else k=this.compile(R);const c=k(I);return"$async"in k||(this.errors=k.errors),c}compile(R,I){const k=this._addSchema(R,I);return k.validate||this._compileSchemaEnv(k)}compileAsync(R,I){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:k}=this.opts;return c.call(this,R,I);async function c(B,j){await S.call(this,B.$schema);const N=this._addSchema(B,j);return N.validate||T.call(this,N)}async function S(B){B&&!this.getSchema(B)&&await c.call(this,{$ref:B},!0)}async function T(B){try{return this._compileSchemaEnv(B)}catch(j){if(!(j instanceof m.default))throw j;return F.call(this,j),await U.call(this,j.missingSchema),T.call(this,B)}}function F({missingSchema:B,missingRef:j}){if(this.refs[B])throw new Error(`AnySchema ${B} is loaded but ${j} cannot be resolved`)}async function U(B){const j=await Z.call(this,B);this.refs[B]||await S.call(this,j.$schema),this.refs[B]||this.addSchema(j,B,I)}async function Z(B){const j=this._loading[B];if(j)return j;try{return await(this._loading[B]=k(B))}finally{delete this._loading[B]}}}addSchema(R,I,k,c=this.opts.validateSchema){if(Array.isArray(R)){for(const T of R)this.addSchema(T,void 0,k,c);return this}let S;if(typeof R=="object"){const{schemaId:T}=this.opts;if(S=R[T],S!==void 0&&typeof S!="string")throw new Error(`schema ${T} must be string`)}return I=(0,h.normalizeId)(I||S),this._checkUnique(I),this.schemas[I]=this._addSchema(R,k,I,c,!0),this}addMetaSchema(R,I,k=this.opts.validateSchema){return this.addSchema(R,I,!0,k),this}validateSchema(R,I){if(typeof R=="boolean")return!0;let k;if(k=R.$schema,k!==void 0&&typeof k!="string")throw new Error("$schema must be a string");if(k=k||this.opts.defaultMeta||this.defaultMeta(),!k)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const c=this.validate(k,R);if(!c&&I){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return c}getSchema(R){let I;for(;typeof(I=d.call(this,R))=="string";)R=I;if(I===void 0){const{schemaId:k}=this.opts,c=new f.SchemaEnv({schema:{},schemaId:k});if(I=f.resolveSchema.call(this,c,R),!I)return;this.refs[R]=I}return I.validate||this._compileSchemaEnv(I)}removeSchema(R){if(R instanceof RegExp)return this._removeAllSchemas(this.schemas,R),this._removeAllSchemas(this.refs,R),this;switch(typeof R){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const I=d.call(this,R);return typeof I=="object"&&this._cache.delete(I.schema),delete this.schemas[R],delete this.refs[R],this}case"object":{const I=R;this._cache.delete(I);let k=R[this.opts.schemaId];return k&&(k=(0,h.normalizeId)(k),delete this.schemas[k],delete this.refs[k]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(R){for(const I of R)this.addKeyword(I);return this}addKeyword(R,I){let k;if(typeof R=="string")k=R,typeof I=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),I.keyword=k);else if(typeof R=="object"&&I===void 0){if(I=R,k=I.keyword,Array.isArray(k)&&!k.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,k,I),!I)return(0,g.eachItem)(k,S=>x.call(this,S)),this;pe.call(this,I);const c={...I,type:(0,_.getJSONTypes)(I.type),schemaType:(0,_.getJSONTypes)(I.schemaType)};return(0,g.eachItem)(k,c.type.length===0?S=>x.call(this,S,c):S=>c.type.forEach(T=>x.call(this,S,c,T))),this}getKeyword(R){const I=this.RULES.all[R];return typeof I=="object"?I.definition:!!I}removeKeyword(R){const{RULES:I}=this;delete I.keywords[R],delete I.all[R];for(const k of I.rules){const c=k.rules.findIndex(S=>S.keyword===R);c>=0&&k.rules.splice(c,1)}return this}addFormat(R,I){return typeof I=="string"&&(I=new RegExp(I)),this.formats[R]=I,this}errorsText(R=this.errors,{separator:I=", ",dataVar:k="data"}={}){return!R||R.length===0?"No errors":R.map(c=>`${k}${c.instancePath} ${c.message}`).reduce((c,S)=>c+I+S)}$dataMetaSchema(R,I){const k=this.RULES.all;R=JSON.parse(JSON.stringify(R));for(const c of I){const S=c.split("/").slice(1);let T=R;for(const F of S)T=T[F];for(const F in k){const U=k[F];if(typeof U!="object")continue;const{$data:Z}=U.definition,B=T[F];Z&&B&&(T[F]=_e(B))}}return R}_removeAllSchemas(R,I){for(const k in R){const c=R[k];(!I||I.test(k))&&(typeof c=="string"?delete R[k]:c&&!c.meta&&(this._cache.delete(c.schema),delete R[k]))}}_addSchema(R,I,k,c=this.opts.validateSchema,S=this.opts.addUsedSchema){let T;const{schemaId:F}=this.opts;if(typeof R=="object")T=R[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof R!="boolean")throw new Error("schema must be object or boolean")}let U=this._cache.get(R);if(U!==void 0)return U;k=(0,h.normalizeId)(T||k);const Z=h.getSchemaRefs.call(this,R,k);return U=new f.SchemaEnv({schema:R,schemaId:F,meta:I,baseId:k,localRefs:Z}),this._cache.set(U.schema,U),S&&!k.startsWith("#")&&(k&&this._checkUnique(k),this.refs[k]=U),c&&this.validateSchema(R,!0),U}_checkUnique(R){if(this.schemas[R]||this.refs[R])throw new Error(`schema with key or id "${R}" already exists`)}_compileSchemaEnv(R){if(R.meta?this._compileMetaSchema(R):f.compileSchema.call(this,R),!R.validate)throw new Error("ajv implementation error");return R.validate}_compileMetaSchema(R){const I=this.opts;this.opts=this._metaOpts;try{f.compileSchema.call(this,R)}finally{this.opts=I}}}v.ValidationError=i.default,v.MissingRefError=m.default,e.default=v;function n(A,R,I,k="error"){for(const c in A){const S=c;S in R&&this.logger[k](`${I}: option ${c}. ${A[S]}`)}}function d(A){return A=(0,h.normalizeId)(A),this.schemas[A]||this.refs[A]}function E(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const R in A)this.addSchema(A[R],R)}function O(){for(const A in this.opts.formats){const R=this.opts.formats[A];R&&this.addFormat(A,R)}}function C(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const R in A){const I=A[R];I.keyword||(I.keyword=R),this.addKeyword(I)}}function D(){const A={...this.opts};for(const R of y)delete A[R];return A}const V={log(){},warn(){},error(){}};function K(A){if(A===!1)return V;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function W(A,R){const{RULES:I}=this;if((0,g.eachItem)(A,k=>{if(I.keywords[k])throw new Error(`Keyword ${k} is already defined`);if(!z.test(k))throw new Error(`Keyword ${k} has invalid name`)}),!!R&&R.$data&&!("code"in R||"validate"in R))throw new Error('$data keyword must have "code" or "validate" function')}function x(A,R,I){var k;const c=R?.post;if(I&&c)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let T=c?S.post:S.rules.find(({type:U})=>U===I);if(T||(T={type:I,rules:[]},S.rules.push(T)),S.keywords[A]=!0,!R)return;const F={keyword:A,definition:{...R,type:(0,_.getJSONTypes)(R.type),schemaType:(0,_.getJSONTypes)(R.schemaType)}};R.before?he.call(this,T,F,R.before):T.rules.push(F),S.all[A]=F,(k=R.implements)===null||k===void 0||k.forEach(U=>this.addKeyword(U))}function he(A,R,I){const k=A.rules.findIndex(c=>c.keyword===I);k>=0?A.rules.splice(k,0,R):(A.rules.push(R),this.logger.warn(`rule ${I} is not defined`))}function pe(A){let{metaSchema:R}=A;R!==void 0&&(A.$data&&this.opts.$data&&(R=_e(R)),A.validateSchema=this.compile(R,!0))}const Y={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function _e(A){return{anyOf:[A,Y]}}})(jt)),jt}var Me={},De={},Ve={},Rr;function is(){if(Rr)return Ve;Rr=1,Object.defineProperty(Ve,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Ve.default=e,Ve}var ve={},Nr;function as(){if(Nr)return ve;Nr=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.callRef=ve.getValidate=void 0;const e=wt(),t=fe(),p=J(),i=$e(),m=Jt(),s=Q(),f={keyword:"$ref",schemaType:"string",code(_){const{gen:g,schema:P,it:$}=_,{baseId:w,schemaEnv:y,validateName:b,opts:o,self:u}=$,{root:r}=y;if((P==="#"||P==="#/")&&w===r.baseId)return v();const a=m.resolveRef.call(u,r,w,P);if(a===void 0)throw new e.default($.opts.uriResolver,w,P);if(a instanceof m.SchemaEnv)return n(a);return d(a);function v(){if(y===r)return h(_,b,y,y.$async);const E=g.scopeValue("root",{ref:r});return h(_,(0,p._)`${E}.validate`,r,r.$async)}function n(E){const O=l(_,E);h(_,O,E,E.$async)}function d(E){const O=g.scopeValue("schema",o.code.source===!0?{ref:E,code:(0,p.stringify)(E)}:{ref:E}),C=g.name("valid"),D=_.subschema({schema:E,dataTypes:[],schemaPath:p.nil,topSchemaRef:O,errSchemaPath:P},C);_.mergeEvaluated(D),_.ok(C)}}};function l(_,g){const{gen:P}=_;return g.validate?P.scopeValue("validate",{ref:g.validate}):(0,p._)`${P.scopeValue("wrapper",{ref:g})}.validate`}ve.getValidate=l;function h(_,g,P,$){const{gen:w,it:y}=_,{allErrors:b,schemaEnv:o,opts:u}=y,r=u.passContext?i.default.this:p.nil;$?a():v();function a(){if(!o.$async)throw new Error("async schema referenced by sync schema");const E=w.let("valid");w.try(()=>{w.code((0,p._)`await ${(0,t.callValidateCode)(_,g,r)}`),d(g),b||w.assign(E,!0)},O=>{w.if((0,p._)`!(${O} instanceof ${y.ValidationError})`,()=>w.throw(O)),n(O),b||w.assign(E,!1)}),_.ok(E)}function v(){_.result((0,t.callValidateCode)(_,g,r),()=>d(g),()=>n(g))}function n(E){const O=(0,p._)`${E}.errors`;w.assign(i.default.vErrors,(0,p._)`${i.default.vErrors} === null ? ${O} : ${i.default.vErrors}.concat(${O})`),w.assign(i.default.errors,(0,p._)`${i.default.vErrors}.length`)}function d(E){var O;if(!y.opts.unevaluated)return;const C=(O=P?.validate)===null||O===void 0?void 0:O.evaluated;if(y.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(y.props=s.mergeEvaluated.props(w,C.props,y.props));else{const D=w.var("props",(0,p._)`${E}.evaluated.props`);y.props=s.mergeEvaluated.props(w,D,y.props,p.Name)}if(y.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(y.items=s.mergeEvaluated.items(w,C.items,y.items));else{const D=w.var("items",(0,p._)`${E}.evaluated.items`);y.items=s.mergeEvaluated.items(w,D,y.items,p.Name)}}}return ve.callRef=h,ve.default=f,ve}var Or;function us(){if(Or)return De;Or=1,Object.defineProperty(De,"__esModule",{value:!0});const e=is(),t=as(),p=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return De.default=p,De}var Fe={},Le={},kr;function cs(){if(kr)return Le;kr=1,Object.defineProperty(Le,"__esModule",{value:!0});const e=J(),t=e.operators,p={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:s,schemaCode:f})=>(0,e.str)`must be ${p[s].okStr} ${f}`,params:({keyword:s,schemaCode:f})=>(0,e._)`{comparison: ${p[s].okStr}, limit: ${f}}`},m={keyword:Object.keys(p),type:"number",schemaType:"number",$data:!0,error:i,code(s){const{keyword:f,data:l,schemaCode:h}=s;s.fail$data((0,e._)`${l} ${p[f].fail} ${h} || isNaN(${l})`)}};return Le.default=m,Le}var Ue={},Tr;function ls(){if(Tr)return Ue;Tr=1,Object.defineProperty(Ue,"__esModule",{value:!0});const e=J(),p={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:m,data:s,schemaCode:f,it:l}=i,h=l.opts.multipleOfPrecision,_=m.let("res"),g=h?(0,e._)`Math.abs(Math.round(${_}) - ${_}) > 1e-${h}`:(0,e._)`${_} !== parseInt(${_})`;i.fail$data((0,e._)`(${f} === 0 || (${_} = ${s}/${f}, ${g}))`)}};return Ue.default=p,Ue}var ze={},Ke={},qr;function ds(){if(qr)return Ke;qr=1,Object.defineProperty(Ke,"__esModule",{value:!0});function e(t){const p=t.length;let i=0,m=0,s;for(;m<p;)i++,s=t.charCodeAt(m++),s>=55296&&s<=56319&&m<p&&(s=t.charCodeAt(m),(s&64512)===56320&&m++);return i}return Ke.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ke}var Ir;function fs(){if(Ir)return ze;Ir=1,Object.defineProperty(ze,"__esModule",{value:!0});const e=J(),t=Q(),p=ds(),m={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:f}){const l=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${l} than ${f} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:f,data:l,schemaCode:h,it:_}=s,g=f==="maxLength"?e.operators.GT:e.operators.LT,P=_.opts.unicode===!1?(0,e._)`${l}.length`:(0,e._)`${(0,t.useFunc)(s.gen,p.default)}(${l})`;s.fail$data((0,e._)`${P} ${g} ${h}`)}};return ze.default=m,ze}var He={},Cr;function hs(){if(Cr)return He;Cr=1,Object.defineProperty(He,"__esModule",{value:!0});const e=fe(),t=J(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:m})=>(0,t.str)`must match pattern "${m}"`,params:({schemaCode:m})=>(0,t._)`{pattern: ${m}}`},code(m){const{data:s,$data:f,schema:l,schemaCode:h,it:_}=m,g=_.opts.unicodeRegExp?"u":"",P=f?(0,t._)`(new RegExp(${h}, ${g}))`:(0,e.usePattern)(m,l);m.fail$data((0,t._)`!${P}.test(${s})`)}};return He.default=i,He}var Ge={},Ar;function ps(){if(Ar)return Ge;Ar=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e=J(),p={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:m}){const s=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${m} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:m,data:s,schemaCode:f}=i,l=m==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${s}).length ${l} ${f}`)}};return Ge.default=p,Ge}var Je={},Mr;function ms(){if(Mr)return Je;Mr=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=fe(),t=J(),p=Q(),m={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:f,schema:l,schemaCode:h,data:_,$data:g,it:P}=s,{opts:$}=P;if(!g&&l.length===0)return;const w=l.length>=$.loopRequired;if(P.allErrors?y():b(),$.strictRequired){const r=s.parentSchema.properties,{definedProperties:a}=s.it;for(const v of l)if(r?.[v]===void 0&&!a.has(v)){const n=P.schemaEnv.baseId+P.errSchemaPath,d=`required property "${v}" is not defined at "${n}" (strictRequired)`;(0,p.checkStrictMode)(P,d,P.opts.strictRequired)}}function y(){if(w||g)s.block$data(t.nil,o);else for(const r of l)(0,e.checkReportMissingProp)(s,r)}function b(){const r=f.let("missing");if(w||g){const a=f.let("valid",!0);s.block$data(a,()=>u(r,a)),s.ok(a)}else f.if((0,e.checkMissingProp)(s,l,r)),(0,e.reportMissingProp)(s,r),f.else()}function o(){f.forOf("prop",h,r=>{s.setParams({missingProperty:r}),f.if((0,e.noPropertyInData)(f,_,r,$.ownProperties),()=>s.error())})}function u(r,a){s.setParams({missingProperty:r}),f.forOf(r,h,()=>{f.assign(a,(0,e.propertyInData)(f,_,r,$.ownProperties)),f.if((0,t.not)(a),()=>{s.error(),f.break()})},t.nil)}}};return Je.default=m,Je}var Be={},Dr;function ys(){if(Dr)return Be;Dr=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=J(),p={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:m}){const s=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${m} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:m,data:s,schemaCode:f}=i,l=m==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${s}.length ${l} ${f}`)}};return Be.default=p,Be}var We={},Qe={},Vr;function Bt(){if(Vr)return Qe;Vr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=Sn();return e.code='require("ajv/dist/runtime/equal").default',Qe.default=e,Qe}var Fr;function gs(){if(Fr)return We;Fr=1,Object.defineProperty(We,"__esModule",{value:!0});const e=gt(),t=J(),p=Q(),i=Bt(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:f,j:l}})=>(0,t.str)`must NOT have duplicate items (items ## ${l} and ${f} are identical)`,params:({params:{i:f,j:l}})=>(0,t._)`{i: ${f}, j: ${l}}`},code(f){const{gen:l,data:h,$data:_,schema:g,parentSchema:P,schemaCode:$,it:w}=f;if(!_&&!g)return;const y=l.let("valid"),b=P.items?(0,e.getSchemaTypes)(P.items):[];f.block$data(y,o,(0,t._)`${$} === false`),f.ok(y);function o(){const v=l.let("i",(0,t._)`${h}.length`),n=l.let("j");f.setParams({i:v,j:n}),l.assign(y,!0),l.if((0,t._)`${v} > 1`,()=>(u()?r:a)(v,n))}function u(){return b.length>0&&!b.some(v=>v==="object"||v==="array")}function r(v,n){const d=l.name("item"),E=(0,e.checkDataTypes)(b,d,w.opts.strictNumbers,e.DataType.Wrong),O=l.const("indices",(0,t._)`{}`);l.for((0,t._)`;${v}--;`,()=>{l.let(d,(0,t._)`${h}[${v}]`),l.if(E,(0,t._)`continue`),b.length>1&&l.if((0,t._)`typeof ${d} == "string"`,(0,t._)`${d} += "_"`),l.if((0,t._)`typeof ${O}[${d}] == "number"`,()=>{l.assign(n,(0,t._)`${O}[${d}]`),f.error(),l.assign(y,!1).break()}).code((0,t._)`${O}[${d}] = ${v}`)})}function a(v,n){const d=(0,p.useFunc)(l,i.default),E=l.name("outer");l.label(E).for((0,t._)`;${v}--;`,()=>l.for((0,t._)`${n} = ${v}; ${n}--;`,()=>l.if((0,t._)`${d}(${h}[${v}], ${h}[${n}])`,()=>{f.error(),l.assign(y,!1).break(E)})))}}};return We.default=s,We}var Ze={},Lr;function _s(){if(Lr)return Ze;Lr=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=J(),t=Q(),p=Bt(),m={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:f,data:l,$data:h,schemaCode:_,schema:g}=s;h||g&&typeof g=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(f,p.default)}(${l}, ${_})`):s.fail((0,e._)`${g} !== ${l}`)}};return Ze.default=m,Ze}var Xe={},Ur;function vs(){if(Ur)return Xe;Ur=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=J(),t=Q(),p=Bt(),m={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:f,data:l,$data:h,schema:_,schemaCode:g,it:P}=s;if(!h&&_.length===0)throw new Error("enum must have non-empty array");const $=_.length>=P.opts.loopEnum;let w;const y=()=>w??(w=(0,t.useFunc)(f,p.default));let b;if($||h)b=f.let("valid"),s.block$data(b,o);else{if(!Array.isArray(_))throw new Error("ajv implementation error");const r=f.const("vSchema",g);b=(0,e.or)(..._.map((a,v)=>u(r,v)))}s.pass(b);function o(){f.assign(b,!1),f.forOf("v",g,r=>f.if((0,e._)`${y()}(${l}, ${r})`,()=>f.assign(b,!0).break()))}function u(r,a){const v=_[a];return typeof v=="object"&&v!==null?(0,e._)`${y()}(${l}, ${r}[${a}])`:(0,e._)`${l} === ${v}`}}};return Xe.default=m,Xe}var zr;function $s(){if(zr)return Fe;zr=1,Object.defineProperty(Fe,"__esModule",{value:!0});const e=cs(),t=ls(),p=fs(),i=hs(),m=ps(),s=ms(),f=ys(),l=gs(),h=_s(),_=vs(),g=[e.default,t.default,p.default,i.default,m.default,s.default,f.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},h.default,_.default];return Fe.default=g,Fe}var Ye={},Pe={},Kr;function jn(){if(Kr)return Pe;Kr=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.validateAdditionalItems=void 0;const e=J(),t=Q(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:f,it:l}=s,{items:h}=f;if(!Array.isArray(h)){(0,t.checkStrictMode)(l,'"additionalItems" is ignored when "items" is not an array of schemas');return}m(s,h)}};function m(s,f){const{gen:l,schema:h,data:_,keyword:g,it:P}=s;P.items=!0;const $=l.const("len",(0,e._)`${_}.length`);if(h===!1)s.setParams({len:f.length}),s.pass((0,e._)`${$} <= ${f.length}`);else if(typeof h=="object"&&!(0,t.alwaysValidSchema)(P,h)){const y=l.var("valid",(0,e._)`${$} <= ${f.length}`);l.if((0,e.not)(y),()=>w(y)),s.ok(y)}function w(y){l.forRange("i",f.length,$,b=>{s.subschema({keyword:g,dataProp:b,dataPropType:t.Type.Num},y),P.allErrors||l.if((0,e.not)(y),()=>l.break())})}}return Pe.validateAdditionalItems=m,Pe.default=i,Pe}var xe={},je={},Hr;function Rn(){if(Hr)return je;Hr=1,Object.defineProperty(je,"__esModule",{value:!0}),je.validateTuple=void 0;const e=J(),t=Q(),p=fe(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:f,it:l}=s;if(Array.isArray(f))return m(s,"additionalItems",f);l.items=!0,!(0,t.alwaysValidSchema)(l,f)&&s.ok((0,p.validateArray)(s))}};function m(s,f,l=s.schema){const{gen:h,parentSchema:_,data:g,keyword:P,it:$}=s;b(_),$.opts.unevaluated&&l.length&&$.items!==!0&&($.items=t.mergeEvaluated.items(h,l.length,$.items));const w=h.name("valid"),y=h.const("len",(0,e._)`${g}.length`);l.forEach((o,u)=>{(0,t.alwaysValidSchema)($,o)||(h.if((0,e._)`${y} > ${u}`,()=>s.subschema({keyword:P,schemaProp:u,dataProp:u},w)),s.ok(w))});function b(o){const{opts:u,errSchemaPath:r}=$,a=l.length,v=a===o.minItems&&(a===o.maxItems||o[f]===!1);if(u.strictTuples&&!v){const n=`"${P}" is ${a}-tuple, but minItems or maxItems/${f} are not specified or different at path "${r}"`;(0,t.checkStrictMode)($,n,u.strictTuples)}}}return je.validateTuple=m,je.default=i,je}var Gr;function ws(){if(Gr)return xe;Gr=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=Rn(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:p=>(0,e.validateTuple)(p,"items")};return xe.default=t,xe}var et={},Jr;function bs(){if(Jr)return et;Jr=1,Object.defineProperty(et,"__esModule",{value:!0});const e=J(),t=Q(),p=fe(),i=jn(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:f}})=>(0,e.str)`must NOT have more than ${f} items`,params:({params:{len:f}})=>(0,e._)`{limit: ${f}}`},code(f){const{schema:l,parentSchema:h,it:_}=f,{prefixItems:g}=h;_.items=!0,!(0,t.alwaysValidSchema)(_,l)&&(g?(0,i.validateAdditionalItems)(f,g):f.ok((0,p.validateArray)(f)))}};return et.default=s,et}var tt={},Br;function Es(){if(Br)return tt;Br=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=J(),t=Q(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:m,max:s}})=>s===void 0?(0,e.str)`must contain at least ${m} valid item(s)`:(0,e.str)`must contain at least ${m} and no more than ${s} valid item(s)`,params:({params:{min:m,max:s}})=>s===void 0?(0,e._)`{minContains: ${m}}`:(0,e._)`{minContains: ${m}, maxContains: ${s}}`},code(m){const{gen:s,schema:f,parentSchema:l,data:h,it:_}=m;let g,P;const{minContains:$,maxContains:w}=l;_.opts.next?(g=$===void 0?1:$,P=w):g=1;const y=s.const("len",(0,e._)`${h}.length`);if(m.setParams({min:g,max:P}),P===void 0&&g===0){(0,t.checkStrictMode)(_,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(P!==void 0&&g>P){(0,t.checkStrictMode)(_,'"minContains" > "maxContains" is always invalid'),m.fail();return}if((0,t.alwaysValidSchema)(_,f)){let a=(0,e._)`${y} >= ${g}`;P!==void 0&&(a=(0,e._)`${a} && ${y} <= ${P}`),m.pass(a);return}_.items=!0;const b=s.name("valid");P===void 0&&g===1?u(b,()=>s.if(b,()=>s.break())):g===0?(s.let(b,!0),P!==void 0&&s.if((0,e._)`${h}.length > 0`,o)):(s.let(b,!1),o()),m.result(b,()=>m.reset());function o(){const a=s.name("_valid"),v=s.let("count",0);u(a,()=>s.if(a,()=>r(v)))}function u(a,v){s.forRange("i",0,y,n=>{m.subschema({keyword:"contains",dataProp:n,dataPropType:t.Type.Num,compositeRule:!0},a),v()})}function r(a){s.code((0,e._)`${a}++`),P===void 0?s.if((0,e._)`${a} >= ${g}`,()=>s.assign(b,!0).break()):(s.if((0,e._)`${a} > ${P}`,()=>s.assign(b,!1).break()),g===1?s.assign(b,!0):s.if((0,e._)`${a} >= ${g}`,()=>s.assign(b,!0)))}}};return tt.default=i,tt}var At={},Wr;function Ss(){return Wr||(Wr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=J(),p=Q(),i=fe();e.error={message:({params:{property:h,depsCount:_,deps:g}})=>{const P=_===1?"property":"properties";return(0,t.str)`must have ${P} ${g} when property ${h} is present`},params:({params:{property:h,depsCount:_,deps:g,missingProperty:P}})=>(0,t._)`{property: ${h},
6
- missingProperty: ${P},
7
- depsCount: ${_},
8
- deps: ${g}}`};const m={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(h){const[_,g]=s(h);f(h,_),l(h,g)}};function s({schema:h}){const _={},g={};for(const P in h){if(P==="__proto__")continue;const $=Array.isArray(h[P])?_:g;$[P]=h[P]}return[_,g]}function f(h,_=h.schema){const{gen:g,data:P,it:$}=h;if(Object.keys(_).length===0)return;const w=g.let("missing");for(const y in _){const b=_[y];if(b.length===0)continue;const o=(0,i.propertyInData)(g,P,y,$.opts.ownProperties);h.setParams({property:y,depsCount:b.length,deps:b.join(", ")}),$.allErrors?g.if(o,()=>{for(const u of b)(0,i.checkReportMissingProp)(h,u)}):(g.if((0,t._)`${o} && (${(0,i.checkMissingProp)(h,b,w)})`),(0,i.reportMissingProp)(h,w),g.else())}}e.validatePropertyDeps=f;function l(h,_=h.schema){const{gen:g,data:P,keyword:$,it:w}=h,y=g.name("valid");for(const b in _)(0,p.alwaysValidSchema)(w,_[b])||(g.if((0,i.propertyInData)(g,P,b,w.opts.ownProperties),()=>{const o=h.subschema({keyword:$,schemaProp:b},y);h.mergeValidEvaluated(o,y)},()=>g.var(y,!0)),h.ok(y))}e.validateSchemaDeps=l,e.default=m})(At)),At}var rt={},Qr;function Ps(){if(Qr)return rt;Qr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=J(),t=Q(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:m})=>(0,e._)`{propertyName: ${m.propertyName}}`},code(m){const{gen:s,schema:f,data:l,it:h}=m;if((0,t.alwaysValidSchema)(h,f))return;const _=s.name("valid");s.forIn("key",l,g=>{m.setParams({propertyName:g}),m.subschema({keyword:"propertyNames",data:g,dataTypes:["string"],propertyName:g,compositeRule:!0},_),s.if((0,e.not)(_),()=>{m.error(!0),h.allErrors||s.break()})}),m.ok(_)}};return rt.default=i,rt}var nt={},Zr;function Nn(){if(Zr)return nt;Zr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=fe(),t=J(),p=$e(),i=Q(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:f})=>(0,t._)`{additionalProperty: ${f.additionalProperty}}`},code(f){const{gen:l,schema:h,parentSchema:_,data:g,errsCount:P,it:$}=f;if(!P)throw new Error("ajv implementation error");const{allErrors:w,opts:y}=$;if($.props=!0,y.removeAdditional!=="all"&&(0,i.alwaysValidSchema)($,h))return;const b=(0,e.allSchemaProperties)(_.properties),o=(0,e.allSchemaProperties)(_.patternProperties);u(),f.ok((0,t._)`${P} === ${p.default.errors}`);function u(){l.forIn("key",g,d=>{!b.length&&!o.length?v(d):l.if(r(d),()=>v(d))})}function r(d){let E;if(b.length>8){const O=(0,i.schemaRefOrVal)($,_.properties,"properties");E=(0,e.isOwnProperty)(l,O,d)}else b.length?E=(0,t.or)(...b.map(O=>(0,t._)`${d} === ${O}`)):E=t.nil;return o.length&&(E=(0,t.or)(E,...o.map(O=>(0,t._)`${(0,e.usePattern)(f,O)}.test(${d})`))),(0,t.not)(E)}function a(d){l.code((0,t._)`delete ${g}[${d}]`)}function v(d){if(y.removeAdditional==="all"||y.removeAdditional&&h===!1){a(d);return}if(h===!1){f.setParams({additionalProperty:d}),f.error(),w||l.break();return}if(typeof h=="object"&&!(0,i.alwaysValidSchema)($,h)){const E=l.name("valid");y.removeAdditional==="failing"?(n(d,E,!1),l.if((0,t.not)(E),()=>{f.reset(),a(d)})):(n(d,E),w||l.if((0,t.not)(E),()=>l.break()))}}function n(d,E,O){const C={keyword:"additionalProperties",dataProp:d,dataPropType:i.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),f.subschema(C,E)}}};return nt.default=s,nt}var st={},Xr;function js(){if(Xr)return st;Xr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=$t(),t=fe(),p=Q(),i=Nn(),m={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:f,schema:l,parentSchema:h,data:_,it:g}=s;g.opts.removeAdditional==="all"&&h.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(g,i.default,"additionalProperties"));const P=(0,t.allSchemaProperties)(l);for(const o of P)g.definedProperties.add(o);g.opts.unevaluated&&P.length&&g.props!==!0&&(g.props=p.mergeEvaluated.props(f,(0,p.toHash)(P),g.props));const $=P.filter(o=>!(0,p.alwaysValidSchema)(g,l[o]));if($.length===0)return;const w=f.name("valid");for(const o of $)y(o)?b(o):(f.if((0,t.propertyInData)(f,_,o,g.opts.ownProperties)),b(o),g.allErrors||f.else().var(w,!0),f.endIf()),s.it.definedProperties.add(o),s.ok(w);function y(o){return g.opts.useDefaults&&!g.compositeRule&&l[o].default!==void 0}function b(o){s.subschema({keyword:"properties",schemaProp:o,dataProp:o},w)}}};return st.default=m,st}var ot={},Yr;function Rs(){if(Yr)return ot;Yr=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=fe(),t=J(),p=Q(),i=Q(),m={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:f,schema:l,data:h,parentSchema:_,it:g}=s,{opts:P}=g,$=(0,e.allSchemaProperties)(l),w=$.filter(v=>(0,p.alwaysValidSchema)(g,l[v]));if($.length===0||w.length===$.length&&(!g.opts.unevaluated||g.props===!0))return;const y=P.strictSchema&&!P.allowMatchingProperties&&_.properties,b=f.name("valid");g.props!==!0&&!(g.props instanceof t.Name)&&(g.props=(0,i.evaluatedPropsToName)(f,g.props));const{props:o}=g;u();function u(){for(const v of $)y&&r(v),g.allErrors?a(v):(f.var(b,!0),a(v),f.if(b))}function r(v){for(const n in y)new RegExp(v).test(n)&&(0,p.checkStrictMode)(g,`property ${n} matches pattern ${v} (use allowMatchingProperties)`)}function a(v){f.forIn("key",h,n=>{f.if((0,t._)`${(0,e.usePattern)(s,v)}.test(${n})`,()=>{const d=w.includes(v);d||s.subschema({keyword:"patternProperties",schemaProp:v,dataProp:n,dataPropType:i.Type.Str},b),g.opts.unevaluated&&o!==!0?f.assign((0,t._)`${o}[${n}]`,!0):!d&&!g.allErrors&&f.if((0,t.not)(b),()=>f.break())})})}}};return ot.default=m,ot}var it={},xr;function Ns(){if(xr)return it;xr=1,Object.defineProperty(it,"__esModule",{value:!0});const e=Q(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(p){const{gen:i,schema:m,it:s}=p;if((0,e.alwaysValidSchema)(s,m)){p.fail();return}const f=i.name("valid");p.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},f),p.failResult(f,()=>p.reset(),()=>p.error())},error:{message:"must NOT be valid"}};return it.default=t,it}var at={},en;function Os(){if(en)return at;en=1,Object.defineProperty(at,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:fe().validateUnion,error:{message:"must match a schema in anyOf"}};return at.default=t,at}var ut={},tn;function ks(){if(tn)return ut;tn=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=J(),t=Q(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:m})=>(0,e._)`{passingSchemas: ${m.passing}}`},code(m){const{gen:s,schema:f,parentSchema:l,it:h}=m;if(!Array.isArray(f))throw new Error("ajv implementation error");if(h.opts.discriminator&&l.discriminator)return;const _=f,g=s.let("valid",!1),P=s.let("passing",null),$=s.name("_valid");m.setParams({passing:P}),s.block(w),m.result(g,()=>m.reset(),()=>m.error(!0));function w(){_.forEach((y,b)=>{let o;(0,t.alwaysValidSchema)(h,y)?s.var($,!0):o=m.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},$),b>0&&s.if((0,e._)`${$} && ${g}`).assign(g,!1).assign(P,(0,e._)`[${P}, ${b}]`).else(),s.if($,()=>{s.assign(g,!0),s.assign(P,b),o&&m.mergeEvaluated(o,e.Name)})})}}};return ut.default=i,ut}var ct={},rn;function Ts(){if(rn)return ct;rn=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=Q(),t={keyword:"allOf",schemaType:"array",code(p){const{gen:i,schema:m,it:s}=p;if(!Array.isArray(m))throw new Error("ajv implementation error");const f=i.name("valid");m.forEach((l,h)=>{if((0,e.alwaysValidSchema)(s,l))return;const _=p.subschema({keyword:"allOf",schemaProp:h},f);p.ok(f),p.mergeEvaluated(_)})}};return ct.default=t,ct}var lt={},nn;function qs(){if(nn)return lt;nn=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=J(),t=Q(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:f,parentSchema:l,it:h}=s;l.then===void 0&&l.else===void 0&&(0,t.checkStrictMode)(h,'"if" without "then" and "else" is ignored');const _=m(h,"then"),g=m(h,"else");if(!_&&!g)return;const P=f.let("valid",!0),$=f.name("_valid");if(w(),s.reset(),_&&g){const b=f.let("ifClause");s.setParams({ifClause:b}),f.if($,y("then",b),y("else",b))}else _?f.if($,y("then")):f.if((0,e.not)($),y("else"));s.pass(P,()=>s.error(!0));function w(){const b=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},$);s.mergeEvaluated(b)}function y(b,o){return()=>{const u=s.subschema({keyword:b},$);f.assign(P,$),s.mergeValidEvaluated(u,P),o?f.assign(o,(0,e._)`${b}`):s.setParams({ifClause:b})}}}};function m(s,f){const l=s.schema[f];return l!==void 0&&!(0,t.alwaysValidSchema)(s,l)}return lt.default=i,lt}var dt={},sn;function Is(){if(sn)return dt;sn=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=Q(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:p,parentSchema:i,it:m}){i.if===void 0&&(0,e.checkStrictMode)(m,`"${p}" without "if" is ignored`)}};return dt.default=t,dt}var on;function Cs(){if(on)return Ye;on=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=jn(),t=ws(),p=Rn(),i=bs(),m=Es(),s=Ss(),f=Ps(),l=Nn(),h=js(),_=Rs(),g=Ns(),P=Os(),$=ks(),w=Ts(),y=qs(),b=Is();function o(u=!1){const r=[g.default,P.default,$.default,w.default,y.default,b.default,f.default,l.default,s.default,h.default,_.default];return u?r.push(t.default,i.default):r.push(e.default,p.default),r.push(m.default),r}return Ye.default=o,Ye}var ft={},ht={},an;function As(){if(an)return ht;an=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=J(),p={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,m){const{gen:s,data:f,$data:l,schema:h,schemaCode:_,it:g}=i,{opts:P,errSchemaPath:$,schemaEnv:w,self:y}=g;if(!P.validateFormats)return;l?b():o();function b(){const u=s.scopeValue("formats",{ref:y.formats,code:P.code.formats}),r=s.const("fDef",(0,e._)`${u}[${_}]`),a=s.let("fType"),v=s.let("format");s.if((0,e._)`typeof ${r} == "object" && !(${r} instanceof RegExp)`,()=>s.assign(a,(0,e._)`${r}.type || "string"`).assign(v,(0,e._)`${r}.validate`),()=>s.assign(a,(0,e._)`"string"`).assign(v,r)),i.fail$data((0,e.or)(n(),d()));function n(){return P.strictSchema===!1?e.nil:(0,e._)`${_} && !${v}`}function d(){const E=w.$async?(0,e._)`(${r}.async ? await ${v}(${f}) : ${v}(${f}))`:(0,e._)`${v}(${f})`,O=(0,e._)`(typeof ${v} == "function" ? ${E} : ${v}.test(${f}))`;return(0,e._)`${v} && ${v} !== true && ${a} === ${m} && !${O}`}}function o(){const u=y.formats[h];if(!u){n();return}if(u===!0)return;const[r,a,v]=d(u);r===m&&i.pass(E());function n(){if(P.strictSchema===!1){y.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${h}" ignored in schema at path "${$}"`}}function d(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):P.code.formats?(0,e._)`${P.code.formats}${(0,e.getProperty)(h)}`:void 0,D=s.scopeValue("formats",{key:h,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${D}.validate`]:["string",O,D]}function E(){if(typeof u=="object"&&!(u instanceof RegExp)&&u.async){if(!w.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${f})`}return typeof a=="function"?(0,e._)`${v}(${f})`:(0,e._)`${v}.test(${f})`}}}};return ht.default=p,ht}var un;function Ms(){if(un)return ft;un=1,Object.defineProperty(ft,"__esModule",{value:!0});const t=[As().default];return ft.default=t,ft}var Ee={},cn;function Ds(){return cn||(cn=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.contentVocabulary=Ee.metadataVocabulary=void 0,Ee.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ee.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ee}var ln;function Vs(){if(ln)return Me;ln=1,Object.defineProperty(Me,"__esModule",{value:!0});const e=us(),t=$s(),p=Cs(),i=Ms(),m=Ds(),s=[e.default,t.default,(0,p.default)(),i.default,m.metadataVocabulary,m.contentVocabulary];return Me.default=s,Me}var pt={},ke={},dn;function Fs(){if(dn)return ke;dn=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(ke.DiscrError=e={})),ke}var fn;function Ls(){if(fn)return pt;fn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=J(),t=Fs(),p=Jt(),i=wt(),m=Q(),f={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:h}})=>l===t.DiscrError.Tag?`tag "${h}" must be string`:`value of tag "${h}" must be in oneOf`,params:({params:{discrError:l,tag:h,tagName:_}})=>(0,e._)`{error: ${l}, tag: ${_}, tagValue: ${h}}`},code(l){const{gen:h,data:_,schema:g,parentSchema:P,it:$}=l,{oneOf:w}=P;if(!$.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=g.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(g.mapping)throw new Error("discriminator: mapping is not supported");if(!w)throw new Error("discriminator: requires oneOf keyword");const b=h.let("valid",!1),o=h.const("tag",(0,e._)`${_}${(0,e.getProperty)(y)}`);h.if((0,e._)`typeof ${o} == "string"`,()=>u(),()=>l.error(!1,{discrError:t.DiscrError.Tag,tag:o,tagName:y})),l.ok(b);function u(){const v=a();h.if(!1);for(const n in v)h.elseIf((0,e._)`${o} === ${n}`),h.assign(b,r(v[n]));h.else(),l.error(!1,{discrError:t.DiscrError.Mapping,tag:o,tagName:y}),h.endIf()}function r(v){const n=h.name("valid"),d=l.subschema({keyword:"oneOf",schemaProp:v},n);return l.mergeEvaluated(d,e.Name),n}function a(){var v;const n={},d=O(P);let E=!0;for(let V=0;V<w.length;V++){let K=w[V];if(K?.$ref&&!(0,m.schemaHasRulesButRef)(K,$.self.RULES)){const W=K.$ref;if(K=p.resolveRef.call($.self,$.schemaEnv.root,$.baseId,W),K instanceof p.SchemaEnv&&(K=K.schema),K===void 0)throw new i.default($.opts.uriResolver,$.baseId,W)}const z=(v=K?.properties)===null||v===void 0?void 0:v[y];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);E=E&&(d||O(K)),C(z,V)}if(!E)throw new Error(`discriminator: "${y}" must be required`);return n;function O({required:V}){return Array.isArray(V)&&V.includes(y)}function C(V,K){if(V.const)D(V.const,K);else if(V.enum)for(const z of V.enum)D(z,K);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function D(V,K){if(typeof V!="string"||V in n)throw new Error(`discriminator: "${y}" values must be unique strings`);n[V]=K}}}};return pt.default=f,pt}const Us="http://json-schema.org/draft-07/schema#",zs="http://json-schema.org/draft-07/schema#",Ks="Core schema meta-schema",Hs={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:[]}},Gs=["object","boolean"],Js={$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:"#"}},Bs={$schema:Us,$id:zs,title:Ks,definitions:Hs,type:Gs,properties:Js,default:!0};var hn;function Ws(){return hn||(hn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const p=os(),i=Vs(),m=Ls(),s=Bs,f=["/properties"],l="http://json-schema.org/draft-07/schema";class h extends p.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(m.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(s,f):s;this.addMetaSchema(y,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=h,e.exports=t=h,e.exports.Ajv=h,Object.defineProperty(t,"__esModule",{value:!0}),t.default=h;var _=$t();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var g=J();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}});var P=Gt();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return P.default}});var $=wt();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return $.default}})})(Te,Te.exports)),Te.exports}var Qs=Ws();const Zs=Ht(Qs);var mt={exports:{}},pn;function Xs(){return pn||(pn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const p={},i={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:g=>{var P;const $=(P=g?.max)!==null&&P!==void 0?P:2;return()=>Math.floor(Math.random()*$)},seq:g=>{var P;const $=(P=g?.name)!==null&&P!==void 0?P:"";return p[$]||(p[$]=0),()=>p[$]++}},m=Object.assign(s,{DEFAULTS:i});function s(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(g,P,$){if(!$.opts.useDefaults||$.compositeRule)return()=>!0;const w={};for(const b in g)w[b]=f(g[b]);const y=$.opts.useDefaults==="empty";return b=>{for(const o in g)(b[o]===void 0||y&&(b[o]===null||b[o]===""))&&(b[o]=w[o]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function f(g){return typeof g=="object"?l(g):h(g)}function l({func:g,args:P}){const $=i[g];return _(g,$),$(P)}function h(g=""){const P=i[g];return _(g,P),P()}function _(g,P){if(!P)throw new Error(`invalid "dynamicDefaults" keyword property value: ${g}`)}t.default=m,e.exports=m})(mt,mt.exports)),mt.exports}var Ys=Xs();const On=Ht(Ys),ue={fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},mn={silent:{level:-1},fatal:{level:ue.fatal},error:{level:ue.error},warn:{level:ue.warn},log:{level:ue.log},info:{level:ue.info},success:{level:ue.success},fail:{level:ue.fail},ready:{level:ue.info},start:{level:ue.info},box:{level:ue.info},debug:{level:ue.debug},trace:{level:ue.trace},verbose:{level:ue.verbose}};function Mt(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Lt(e,t,p=".",i){if(!Mt(t))return Lt(e,{},p);const m=Object.assign({},t);for(const s in e){if(s==="__proto__"||s==="constructor")continue;const f=e[s];f!=null&&(Array.isArray(f)&&Array.isArray(m[s])?m[s]=[...f,...m[s]]:Mt(f)&&Mt(m[s])?m[s]=Lt(f,m[s],(p?`${p}.`:"")+s.toString()):m[s]=f)}return m}function xs(e){return(...t)=>t.reduce((p,i)=>Lt(p,i,""),{})}const eo=xs();function to(e){return Object.prototype.toString.call(e)==="[object Object]"}function ro(e){return!(!to(e)||!e.message&&!e.args||e.stack)}let Dt=!1;const yn=[];class ne{options;_lastLog;_mockFn;constructor(t={}){const p=t.types||mn;this.options=eo({...t,defaults:{...t.defaults},level:Vt(t.level,p),reporters:[...t.reporters||[]]},{types:mn,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const i in p){const m={type:i,...this.options.defaults,...p[i]};this[i]=this._wrapLogFn(m),this[i].raw=this._wrapLogFn(m,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(t){this.options.level=Vt(t,this.options.types,this.options.level)}prompt(t,p){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(t,p)}create(t){const p=new ne({...this.options,...t});return this._mockFn&&p.mockTypes(this._mockFn),p}withDefaults(t){return this.create({...this.options,defaults:{...this.options.defaults,...t}})}withTag(t){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+t:t})}addReporter(t){return this.options.reporters.push(t),this}removeReporter(t){if(t){const p=this.options.reporters.indexOf(t);if(p!==-1)return this.options.reporters.splice(p,1)}else this.options.reporters.splice(0);return this}setReporters(t){return this.options.reporters=Array.isArray(t)?t:[t],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const t in this.options.types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}restoreConsole(){for(const t in this.options.types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(t,p){t&&(t.__write||(t.__write=t.write),t.write=i=>{this[p].raw(String(i).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}pauseLogs(){Dt=!0}resumeLogs(){Dt=!1;const t=yn.splice(0);for(const p of t)p[0]._logFn(p[1],p[2])}mockTypes(t){const p=t||this.options.mockFn;if(this._mockFn=p,typeof p=="function")for(const i in this.options.types)this[i]=p(i,this.options.types[i])||this[i],this[i].raw=this[i]}_wrapLogFn(t,p){return(...i)=>{if(Dt){yn.push([this,t,i,p]);return}return this._logFn(t,i,p)}}_logFn(t,p,i){if((t.level||0)>this.level)return!1;const m={date:new Date,args:[],...t,level:Vt(t.level,this.options.types)};!i&&p.length===1&&ro(p[0])?Object.assign(m,p[0]):m.args=[...p],m.message&&(m.args.unshift(m.message),delete m.message),m.additional&&(Array.isArray(m.additional)||(m.additional=m.additional.split(`
9
- `)),m.args.push(`
10
- `+m.additional.join(`
11
- `)),delete m.additional),m.type=typeof m.type=="string"?m.type.toLowerCase():"log",m.tag=typeof m.tag=="string"?m.tag:"";const s=(l=!1)=>{const h=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&h>0){const _=[...this._lastLog.object.args];h>1&&_.push(`(repeated ${h} times)`),this._log({...this._lastLog.object,args:_}),this._lastLog.count=1}l&&(this._lastLog.object=m,this._log(m))};clearTimeout(this._lastLog.timeout);const f=this._lastLog.time&&m.date?m.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=m.date,f<this.options.throttle)try{const l=JSON.stringify([m.type,m.tag,m.args]),h=this._lastLog.serialized===l;if(this._lastLog.serialized=l,h&&(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin)){this._lastLog.timeout=setTimeout(s,this.options.throttle);return}}catch{}s(!0)}_log(t){for(const p of this.options.reporters)p.log(t,{options:this.options})}}function Vt(e,t={},p=3){return e===void 0?p:typeof e=="number"?e:t[e]&&t[e].level!==void 0?t[e].level:p}ne.prototype.add=ne.prototype.addReporter;ne.prototype.remove=ne.prototype.removeReporter;ne.prototype.clear=ne.prototype.removeReporter;ne.prototype.withScope=ne.prototype.withTag;ne.prototype.mock=ne.prototype.mockTypes;ne.prototype.pause=ne.prototype.pauseLogs;ne.prototype.resume=ne.prototype.resumeLogs;function no(e={}){return new ne(e)}class so{options;defaultColor;levelColorMap;typeColorMap;constructor(t){this.options={...t},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(t){return t<1?console.__error||console.error:t===1?console.__warn||console.warn:console.__log||console.log}log(t){const p=this._getLogFn(t.level),i=t.type==="log"?"":t.type,m=t.tag||"",f=`
12
- background: ${this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor};
13
- border-radius: 0.5em;
14
- color: white;
15
- font-weight: bold;
16
- padding: 2px 0.5em;
17
- `,l=`%c${[m,i].filter(Boolean).join(":")}`;typeof t.args[0]=="string"?p(`${l}%c ${t.args[0]}`,f,"",...t.args.slice(1)):p(l,f,...t.args)}}function oo(e={}){return no({reporters:e.reporters||[new so({})],prompt(p,i={}){return i.type==="confirm"?Promise.resolve(confirm(p)):Promise.resolve(prompt(p))},...e})}const io=oo(),ao={$id:"credentials",additionalProperties:{properties:{accessKeyId:{default:null,nullable:!0,type:"string"},Bucket:{default:null,nullable:!0,type:"string"},endpoint:{default:null,nullable:!0,type:"string"},region:{default:null,nullable:!0,type:"string"},secretAccessKey:{default:null,nullable:!0,type:"string"}},type:"object"},type:"object"},uo={$id:"feed",additionalProperties:!1,properties:{feed_url:{type:"string"},home_page_url:{type:"string"},items:{default:[],items:{additionalProperties:!1,dynamicDefaults:{date_published:"datetime",id:"uuid"},properties:{attachments:{default:[],items:{additionalProperties:!1,properties:{mime_type:{default:"",type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},content_html:{default:"",type:"string"},date_published:{type:"string"},id:{type:"string"},title:{default:"",type:"string"},url:{type:"string"}},type:"object"},type:"array"},title:{default:"",type:"string"},version:{default:"https://jsonfeed.org/version/1",enum:["https://jsonfeed.org/version/1","https://jsonfeed.org/version/1.1"],type:"string"}},type:"object"},co={$id:"fonts",items:{type:"string"},type:"array"},lo={$id:"importmap",additionalProperties:!1,properties:{imports:{additionalProperties:{type:"string"},default:{},type:"object"},scopes:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},type:"object"}},type:"object"},fo={$id:"log",additionalProperties:!1,properties:{messages:{default:[],items:{additionalProperties:!1,properties:{content:{default:[],items:{additionalProperties:!1,properties:{text:{default:"",type:"string"},type:{default:"text",type:"string"}},type:"object"},type:"array"},role:{default:"user",enum:["user","assistant","system"],type:"string"}},type:"object"},type:"array"},system:{default:"",type:"string"}},type:"object"},ho={$id:"nodes",items:{$ref:"page"},type:"array"},po={$id:"page",additionalProperties:!1,dynamicDefaults:{id:"uuid"},properties:{changefreq:{default:null,enum:["always","hourly","daily","weekly","monthly","yearly","never",null],nullable:!0,type:"string"},children:{default:[],items:{type:"object"},type:"array"},class:{default:["prose","max-w-none"],description:"Классы",items:{type:"string"},type:"array"},description:{default:null,nullable:!0,type:"string"},enabled:{default:!0,type:"boolean"},flat:{default:!0,type:"boolean"},header:{type:"string"},icon:{type:"string"},id:{type:"string"},images:{default:[],items:{additionalProperties:!1,properties:{alt:{type:"string"},url:{default:"",type:"string"}},type:"object"},type:"array"},keywords:{default:[],items:{type:"string"},type:"array"},lastmod:{default:null,nullable:!0,type:"string"},loc:{default:null,nullable:!0,type:"string"},name:{default:null,nullable:!0,type:"string"},priority:{default:null,maximum:1,minimum:0,nullable:!0,type:"number"},type:{default:null,enum:["article","book","profile","website","music.song","music.album","music.playlist","music.radio_station","video.movie","video.episode","video.tv_show","video.other",null],nullable:!0,type:"string"}},type:"object"};On.DEFAULTS.uuid=()=>Ft;const kn=[ao,ho,po,lo,uo,co,fo],mo=new Zs({code:{esm:!0},coerceTypes:!0,keywords:[On()],removeAdditional:!0,schemas:kn,useDefaults:!0}),Ut=In($n({credentials:{},feed:{},fonts:[],importmap:{},log:{}})),Tn=!0,gn="nodes",_n={$children:{get(){return this.children.filter(({enabled:e})=>e)}},$index:{get(){return this.$siblings.findIndex(({id:e})=>this.id===e)}},$next:{get(){return this.$siblings[this.$index+1]}},$prev:{get(){return this.$siblings[this.$index-1]}},$siblings:{get(){return this.siblings.filter(({enabled:e})=>e)}},i:{get(){return this.icon&&`i-${this.icon}`}},path:{get(){const e=this.branch.slice(1);return e.some(({name:t})=>!t)?void 0:e.map(({name:t})=>t).join("/").replace(/ /g,"_")}},title:{get(){return["",void 0].includes(this.header)?this.name??"":this.header}},to:{get(){return this.path?.replace(/^\/?/,"/").replace(/\/?$/,"/")}}},zt=Cn([]),Kt=Object.fromEntries(kn.map(({$id:e})=>[e,mo.getSchema(e)])),vo=async e=>{try{return await An(e)}catch(t){io.error(t)}},yo=$n({...Ut,tree:zt,...Kn(zt)});Object.keys(Ut).forEach(e=>{Kt[e]&&wn(Ut[e],Kt[e],{immediate:Tn})});wn(vn(yo,gn),async e=>{await Kt[gn]?.(e)?e.forEach(t=>{Object.keys(_n).some(p=>!(p in t))&&Object.defineProperties(t,_n)}):zt.value=[{}]},{immediate:Tn});export{io as c,vo as f,Ht as g,yo as s};