@vuebro/runtime 1.1.21 → 1.1.23

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.
@@ -0,0 +1,8 @@
1
+ import{isRef as Et,reactive as _e,unref as vn,getCurrentScope as In,onScopeDispose as qn,onMounted as gn,nextTick as Cn,watch as je,getCurrentInstance as _n,toValue as ae,computed as we,shallowRef as De,isReactive as Dn}from"vue";function Jt(e){return In()?(qn(e),!0):!1}function Zt(e){if(!Et(e))return _e(e);const r=new Proxy({},{get(y,i,g){return vn(Reflect.get(e.value,i,g))},set(y,i,g){return Et(e.value[i])&&!Et(g)?e.value[i].value=g:e.value[i]=g,!0},deleteProperty(y,i){return Reflect.deleteProperty(e.value,i)},has(y,i){return Reflect.has(e.value,i)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return _e(r)}const Mn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $n=e=>e!=null,An=Object.prototype.toString,Vn=e=>An.call(e)==="[object Object]",ge=()=>{};function wn(e,r){function y(...i){return new Promise((g,o)=>{Promise.resolve(e(()=>r.apply(this,i),{fn:r,thisArg:this,args:i})).then(g).catch(o)})}return y}function Un(e,r={}){let y,i,g=ge;const o=d=>{clearTimeout(d),g(),g=ge};let h;return d=>{const _=ae(e),c=ae(r.maxWait);return y&&o(y),_<=0||c!==void 0&&c<=0?(i&&(o(i),i=void 0),Promise.resolve(d())):new Promise((b,P)=>{g=r.rejectOnCancel?P:b,h=d,c&&!i&&(i=setTimeout(()=>{y&&o(y),i=void 0,b(h())},c)),y=setTimeout(()=>{i&&o(i),i=void 0,b(d())},_)})}}function Ln(...e){let r=0,y,i=!0,g=ge,o,h,u,d,_;!Et(e[0])&&typeof e[0]=="object"?{delay:h,trailing:u=!0,leading:d=!0,rejectOnCancel:_=!1}=e[0]:[h,u=!0,d=!0,_=!1]=e;const c=()=>{y&&(clearTimeout(y),y=void 0,g(),g=ge)};return P=>{const w=ae(h),$=Date.now()-r,l=()=>o=P();return c(),w<=0?(r=Date.now(),l()):($>w&&(d||!i)?(r=Date.now(),l()):u&&(o=new Promise((s,n)=>{g=_?n:s,y=setTimeout(()=>{r=Date.now(),i=!0,s(l()),c()},Math.max(0,w-$))})),!d&&!y&&(y=setTimeout(()=>i=!0,w)),i=!1,o)}}function Me(e){return Array.isArray(e)?e:[e]}function Fn(e){return _n()}function zn(e,r=200,y={}){return wn(Un(r,y),e)}function Kn(e,r=200,y=!1,i=!0,g=!1){return wn(Ln(r,y,i,g),e)}function Hn(e,r=!0,y){Fn()?gn(e,y):r?e():Cn(e)}function Gn(e,r,y){return je(e,r,{...y,immediate:!0})}const jt=Mn?window:void 0;function Te(e){var r;const y=ae(e);return(r=y?.$el)!=null?r:y}function xt(...e){const r=[],y=()=>{r.forEach(u=>u()),r.length=0},i=(u,d,_,c)=>(u.addEventListener(d,_,c),()=>u.removeEventListener(d,_,c)),g=we(()=>{const u=Me(ae(e[0])).filter(d=>d!=null);return u.every(d=>typeof d!="string")?u:void 0}),o=Gn(()=>{var u,d;return[(d=(u=g.value)==null?void 0:u.map(_=>Te(_)))!=null?d:[jt].filter(_=>_!=null),Me(ae(g.value?e[1]:e[0])),Me(vn(g.value?e[2]:e[1])),ae(g.value?e[3]:e[2])]},([u,d,_,c])=>{if(y(),!u?.length||!d?.length||!_?.length)return;const b=Vn(c)?{...c}:c;r.push(...u.flatMap(P=>d.flatMap(w=>_.map($=>i(P,w,$,b)))))},{flush:"post"}),h=()=>{o(),y()};return Jt(y),h}function Jn(){const e=De(!1),r=_n();return r&&gn(()=>{e.value=!0},r),e}function bn(e){const r=Jn();return we(()=>(r.value,!!e()))}function Wn(e,r,y={}){const{window:i=jt,...g}=y;let o;const h=bn(()=>i&&"MutationObserver"in i),u=()=>{o&&(o.disconnect(),o=void 0)},d=we(()=>{const P=ae(e),w=Me(P).map(Te).filter($n);return new Set(w)}),_=je(d,P=>{u(),h.value&&P.size&&(o=new MutationObserver(r),P.forEach(w=>o.observe(w,g)))},{immediate:!0,flush:"post"}),c=()=>o?.takeRecords(),b=()=>{_(),u()};return Jt(b),{isSupported:h,stop:b,takeRecords:c}}function ka(e,r,y={}){const{root:i,rootMargin:g="0px",threshold:o=0,window:h=jt,immediate:u=!0}=y,d=bn(()=>h&&"IntersectionObserver"in h),_=we(()=>{const $=ae(e);return Me($).map(Te).filter($n)});let c=ge;const b=De(u),P=d.value?je(()=>[_.value,Te(i),b.value],([$,l])=>{if(c(),!b.value||!$.length)return;const s=new IntersectionObserver(r,{root:Te(l),rootMargin:g,threshold:o});$.forEach(n=>n&&s.observe(n)),c=()=>{s.disconnect(),c=ge}},{immediate:u,flush:"post"}):ge,w=()=>{c(),P(),b.value=!1};return Jt(w),{isSupported:d,isActive:b,pause(){c(),b.value=!1},resume(){b.value=!0},stop:w}}const er=1;function Ia(e,r={}){const{throttle:y=0,idle:i=200,onStop:g=ge,onScroll:o=ge,offset:h={left:0,right:0,top:0,bottom:0},observe:u={mutation:!1},eventListenerOptions:d={capture:!1,passive:!0},behavior:_="auto",window:c=jt,onError:b=k=>{console.error(k)}}=r,P=typeof u=="boolean"?{mutation:u}:u,w=De(0),$=De(0),l=we({get(){return w.value},set(k){n(k,void 0)}}),s=we({get(){return $.value},set(k){n(void 0,k)}});function n(k,A){var V,K,z,G;if(!c)return;const Y=ae(e);if(!Y)return;(z=Y instanceof Document?c.document.body:Y)==null||z.scrollTo({top:(V=ae(A))!=null?V:s.value,left:(K=ae(k))!=null?K:l.value,behavior:ae(_)});const ee=((G=Y?.document)==null?void 0:G.documentElement)||Y?.documentElement||Y;l!=null&&(w.value=ee.scrollLeft),s!=null&&($.value=ee.scrollTop)}const t=De(!1),a=_e({left:!0,right:!1,top:!0,bottom:!1}),p=_e({left:!1,right:!1,top:!1,bottom:!1}),v=k=>{t.value&&(t.value=!1,p.left=!1,p.right=!1,p.top=!1,p.bottom=!1,g(k))},m=zn(v,y+i),E=k=>{var A;if(!c)return;const V=((A=k?.document)==null?void 0:A.documentElement)||k?.documentElement||Te(k),{display:K,flexDirection:z,direction:G}=getComputedStyle(V),Y=G==="rtl"?-1:1,ee=V.scrollLeft;p.left=ee<w.value,p.right=ee>w.value;const le=Math.abs(ee*Y)<=(h.left||0),Z=Math.abs(ee*Y)+V.clientWidth>=V.scrollWidth-(h.right||0)-er;K==="flex"&&z==="row-reverse"?(a.left=Z,a.right=le):(a.left=le,a.right=Z),w.value=ee;let se=V.scrollTop;k===c.document&&!se&&(se=c.document.body.scrollTop),p.top=se<$.value,p.bottom=se>$.value;const D=Math.abs(se)<=(h.top||0),R=Math.abs(se)+V.clientHeight>=V.scrollHeight-(h.bottom||0)-er;K==="flex"&&z==="column-reverse"?(a.top=R,a.bottom=D):(a.top=D,a.bottom=R),$.value=se},T=k=>{var A;if(!c)return;const V=(A=k.target.documentElement)!=null?A:k.target;E(V),t.value=!0,m(k),o(k)};return xt(e,"scroll",y?Kn(T,y,!0,!1):T,d),Hn(()=>{try{const k=ae(e);if(!k)return;E(k)}catch(k){b(k)}}),P?.mutation&&e!=null&&e!==c&&e!==document&&Wn(e,()=>{const k=ae(e);k&&E(k)},{attributes:!0,childList:!0,subtree:!0}),xt(e,"scrollend",v,d),{x:l,y:s,isScrolling:t,arrivedState:a,directions:p,measure(){const k=ae(e);c&&k&&E(k)}}}const Bn=(e,{branch:r="branch",children:y="children",id:i="id",index:g="index",next:o="next",parent:h="parent",prev:u="prev",siblings:d="siblings"}={})=>{const _={[r]:{get(){const w=[this];for(;w[0]?.[h];)w.unshift(w[0][h]);return w}},[g]:{get(){return this[d].findIndex(w=>this[i]===w[i])}},[o]:{get(){return this[d][this[g]+1]}},[u]:{get(){return this[d][this[g]-1]}}},c=(w,$={})=>w.value.flatMap(l=>(Object.defineProperties(l,{..._,[h]:$,[d]:w}),[l,...c({configurable:!0,value:l[y]??[]},{configurable:!0,value:l})])),b=we(()=>c({value:Dn(e)?e:_e(e)})),P=Zt(we(()=>Object.fromEntries(b.value.map(w=>[w[i],w]))));return{add:w=>{const $=P[w];if($){const l=$[y],s=URL.createObjectURL(new Blob),n=s.split("/").pop()??crypto.randomUUID(),t=$[g],a=$[d];switch(URL.revokeObjectURL(s),!0){case!!$[h]:a.splice(t+1,0,{[i]:n});break;case!!l:l.unshift({[i]:n});break;default:a.splice(t+1,0,{[i]:n});break}return n}},arrLeaves:Zt(b),down:w=>{const $=P[w];if($){const l=$[g],s=l+1,n=$[d];l<n.length-1&&n[l]&&n[s]&&([n[l],n[s]]=[n[s],n[l]])}},leaves:b,left:w=>{const $=P[w];if($){const l=$[h];if(l?.[h]){const s=l[y]??[];return l[d].splice(l[g]+1,0,...s.splice($[g],1)),l[i]}}},objLeaves:P,remove:w=>{const $=P[w];if($){const l=$[h];if(l){const[s]=b.value,n=$[o],t=$[u],a=n?.[i]??t?.[i]??l[i]??s?.[i];return $[d].splice($[g],1),a}}},right:w=>{const $=P[w];if($){const l=$[u];if(l){const s=l[y]??[],n=l[i],t=$[d];return l[y]=[...s,...t.splice($[g],1)],n}}},up:w=>{const $=P[w];if($){const l=$[g],s=l-1,n=$[d];l&&n[l]&&n[s]&&([n[s],n[l]]=[n[l],n[s]])}}}};function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ve={exports:{}},Ct={},me={},Ee={},Dt={},Mt={},At={},tr;function St(){return tr||(tr=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 r{}e._CodeOrName=r,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class y extends r{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=y;class i extends r{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((a,p)=>`${a}${p}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((a,p)=>(p instanceof y&&(a[p.str]=(a[p.str]||0)+1),a),{})}}e._Code=i,e.nil=new i("");function g(n,...t){const a=[n[0]];let p=0;for(;p<t.length;)u(a,t[p]),a.push(n[++p]);return new i(a)}e._=g;const o=new i("+");function h(n,...t){const a=[w(n[0])];let p=0;for(;p<t.length;)a.push(o),u(a,t[p]),a.push(o,w(n[++p]));return d(a),new i(a)}e.str=h;function u(n,t){t instanceof i?n.push(...t._items):t instanceof y?n.push(t):n.push(b(t))}e.addCodeArg=u;function d(n){let t=1;for(;t<n.length-1;){if(n[t]===o){const a=_(n[t-1],n[t+1]);if(a!==void 0){n.splice(t-1,3,a);continue}n[t++]="+"}t++}}function _(n,t){if(t==='""')return n;if(n==='""')return t;if(typeof n=="string")return t instanceof y||n[n.length-1]!=='"'?void 0:typeof t!="string"?`${n.slice(0,-1)}${t}"`:t[0]==='"'?n.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(n instanceof y))return`"${n}${t.slice(1)}`}function c(n,t){return t.emptyStr()?n:n.emptyStr()?t:h`${n}${t}`}e.strConcat=c;function b(n){return typeof n=="number"||typeof n=="boolean"||n===null?n:w(Array.isArray(n)?n.join(","):n)}function P(n){return new i(w(n))}e.stringify=P;function w(n){return JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=w;function $(n){return typeof n=="string"&&e.IDENTIFIER.test(n)?new i(`.${n}`):g`[${n}]`}e.getProperty=$;function l(n){if(typeof n=="string"&&e.IDENTIFIER.test(n))return new i(`${n}`);throw new Error(`CodeGen: invalid export name: ${n}, use explicit $id name mapping`)}e.getEsmExportName=l;function s(n){return new i(n.toString())}e.regexpCode=s})(At)),At}var Vt={},rr;function nr(){return rr||(rr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const r=St();class y extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var i;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new r.Name("const"),let:new r.Name("let"),var:new r.Name("var")};class g{constructor({prefixes:_,parent:c}={}){this._names={},this._prefixes=_,this._parent=c}toName(_){return _ instanceof r.Name?_:this.name(_)}name(_){return new r.Name(this._newName(_))}_newName(_){const c=this._names[_]||this._nameGroup(_);return`${_}${c.index++}`}_nameGroup(_){var c,b;if(!((b=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||b===void 0)&&b.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=g;class o extends r.Name{constructor(_,c){super(c),this.prefix=_}setValue(_,{property:c,itemIndex:b}){this.value=_,this.scopePath=(0,r._)`.${new r.Name(c)}[${b}]`}}e.ValueScopeName=o;const h=(0,r._)`\n`;class u extends g{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?h:r.nil}}get(){return this._scope}name(_){return new o(_,this._newName(_))}value(_,c){var b;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const P=this.toName(_),{prefix:w}=P,$=(b=c.key)!==null&&b!==void 0?b:c.ref;let l=this._values[w];if(l){const t=l.get($);if(t)return t}else l=this._values[w]=new Map;l.set($,P);const s=this._scope[w]||(this._scope[w]=[]),n=s.length;return s[n]=c.ref,P.setValue(c,{property:w,itemIndex:n}),P}getValue(_,c){const b=this._values[_];if(b)return b.get(c)}scopeRefs(_,c=this._values){return this._reduceValues(c,b=>{if(b.scopePath===void 0)throw new Error(`CodeGen: name "${b}" has no value`);return(0,r._)`${_}${b.scopePath}`})}scopeCode(_=this._values,c,b){return this._reduceValues(_,P=>{if(P.value===void 0)throw new Error(`CodeGen: name "${P}" has no value`);return P.value.code},c,b)}_reduceValues(_,c,b={},P){let w=r.nil;for(const $ in _){const l=_[$];if(!l)continue;const s=b[$]=b[$]||new Map;l.forEach(n=>{if(s.has(n))return;s.set(n,i.Started);let t=c(n);if(t){const a=this.opts.es5?e.varKinds.var:e.varKinds.const;w=(0,r._)`${w}${a} ${n} = ${t};${this.opts._n}`}else if(t=P?.(n))w=(0,r._)`${w}${t}${this.opts._n}`;else throw new y(n);s.set(n,i.Completed)})}return w}}e.ValueScope=u})(Vt)),Vt}var sr;function W(){return sr||(sr=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 r=St(),y=nr();var i=St();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 g=nr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return g.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return g.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return g.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return g.varKinds}}),e.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class o{optimizeNodes(){return this}optimizeNames(f,S){return this}}class h extends o{constructor(f,S,I){super(),this.varKind=f,this.name=S,this.rhs=I}render({es5:f,_n:S}){const I=f?y.varKinds.var:this.varKind,U=this.rhs===void 0?"":` = ${this.rhs}`;return`${I} ${this.name}${U};`+S}optimizeNames(f,S){if(f[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,f,S)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class u extends o{constructor(f,S,I){super(),this.lhs=f,this.rhs=S,this.sideEffects=I}render({_n:f}){return`${this.lhs} = ${this.rhs};`+f}optimizeNames(f,S){if(!(this.lhs instanceof r.Name&&!f[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,f,S),this}get names(){const f=this.lhs instanceof r.Name?{}:{...this.lhs.names};return z(f,this.rhs)}}class d extends u{constructor(f,S,I,U){super(f,I,U),this.op=S}render({_n:f}){return`${this.lhs} ${this.op}= ${this.rhs};`+f}}class _ extends o{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`${this.label}:`+f}}class c extends o{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`break${this.label?` ${this.label}`:""};`+f}}class b extends o{constructor(f){super(),this.error=f}render({_n:f}){return`throw ${this.error};`+f}get names(){return this.error.names}}class P extends o{constructor(f){super(),this.code=f}render({_n:f}){return`${this.code};`+f}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(f,S){return this.code=G(this.code,f,S),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class w extends o{constructor(f=[]){super(),this.nodes=f}render(f){return this.nodes.reduce((S,I)=>S+I.render(f),"")}optimizeNodes(){const{nodes:f}=this;let S=f.length;for(;S--;){const I=f[S].optimizeNodes();Array.isArray(I)?f.splice(S,1,...I):I?f[S]=I:f.splice(S,1)}return f.length>0?this:void 0}optimizeNames(f,S){const{nodes:I}=this;let U=I.length;for(;U--;){const F=I[U];F.optimizeNames(f,S)||(Y(f,F.names),I.splice(U,1))}return I.length>0?this:void 0}get names(){return this.nodes.reduce((f,S)=>K(f,S.names),{})}}class $ extends w{render(f){return"{"+f._n+super.render(f)+"}"+f._n}}class l extends w{}class s extends ${}s.kind="else";class n extends ${constructor(f,S){super(S),this.condition=f}render(f){let S=`if(${this.condition})`+super.render(f);return this.else&&(S+="else "+this.else.render(f)),S}optimizeNodes(){super.optimizeNodes();const f=this.condition;if(f===!0)return this.nodes;let S=this.else;if(S){const I=S.optimizeNodes();S=this.else=Array.isArray(I)?new s(I):I}if(S)return f===!1?S instanceof n?S:S.nodes:this.nodes.length?this:new n(ee(f),S instanceof n?[S]:S.nodes);if(!(f===!1||!this.nodes.length))return this}optimizeNames(f,S){var I;if(this.else=(I=this.else)===null||I===void 0?void 0:I.optimizeNames(f,S),!!(super.optimizeNames(f,S)||this.else))return this.condition=G(this.condition,f,S),this}get names(){const f=super.names;return z(f,this.condition),this.else&&K(f,this.else.names),f}}n.kind="if";class t extends ${}t.kind="for";class a extends t{constructor(f){super(),this.iteration=f}render(f){return`for(${this.iteration})`+super.render(f)}optimizeNames(f,S){if(super.optimizeNames(f,S))return this.iteration=G(this.iteration,f,S),this}get names(){return K(super.names,this.iteration.names)}}class p extends t{constructor(f,S,I,U){super(),this.varKind=f,this.name=S,this.from=I,this.to=U}render(f){const S=f.es5?y.varKinds.var:this.varKind,{name:I,from:U,to:F}=this;return`for(${S} ${I}=${U}; ${I}<${F}; ${I}++)`+super.render(f)}get names(){const f=z(super.names,this.from);return z(f,this.to)}}class v extends t{constructor(f,S,I,U){super(),this.loop=f,this.varKind=S,this.name=I,this.iterable=U}render(f){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(f)}optimizeNames(f,S){if(super.optimizeNames(f,S))return this.iterable=G(this.iterable,f,S),this}get names(){return K(super.names,this.iterable.names)}}class m extends ${constructor(f,S,I){super(),this.name=f,this.args=S,this.async=I}render(f){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(f)}}m.kind="func";class E extends w{render(f){return"return "+super.render(f)}}E.kind="return";class T extends ${render(f){let S="try"+super.render(f);return this.catch&&(S+=this.catch.render(f)),this.finally&&(S+=this.finally.render(f)),S}optimizeNodes(){var f,S;return super.optimizeNodes(),(f=this.catch)===null||f===void 0||f.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(f,S){var I,U;return super.optimizeNames(f,S),(I=this.catch)===null||I===void 0||I.optimizeNames(f,S),(U=this.finally)===null||U===void 0||U.optimizeNames(f,S),this}get names(){const f=super.names;return this.catch&&K(f,this.catch.names),this.finally&&K(f,this.finally.names),f}}class k extends ${constructor(f){super(),this.error=f}render(f){return`catch(${this.error})`+super.render(f)}}k.kind="catch";class A extends ${render(f){return"finally"+super.render(f)}}A.kind="finally";class V{constructor(f,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
2
+ `:""},this._extScope=f,this._scope=new y.Scope({parent:f}),this._nodes=[new l]}toString(){return this._root.render(this.opts)}name(f){return this._scope.name(f)}scopeName(f){return this._extScope.name(f)}scopeValue(f,S){const I=this._extScope.value(f,S);return(this._values[I.prefix]||(this._values[I.prefix]=new Set)).add(I),I}getScopeValue(f,S){return this._extScope.getValue(f,S)}scopeRefs(f){return this._extScope.scopeRefs(f,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(f,S,I,U){const F=this._scope.toName(S);return I!==void 0&&U&&(this._constants[F.str]=I),this._leafNode(new h(f,F,I)),F}const(f,S,I){return this._def(y.varKinds.const,f,S,I)}let(f,S,I){return this._def(y.varKinds.let,f,S,I)}var(f,S,I){return this._def(y.varKinds.var,f,S,I)}assign(f,S,I){return this._leafNode(new u(f,S,I))}add(f,S){return this._leafNode(new d(f,e.operators.ADD,S))}code(f){return typeof f=="function"?f():f!==r.nil&&this._leafNode(new P(f)),this}object(...f){const S=["{"];for(const[I,U]of f)S.length>1&&S.push(","),S.push(I),(I!==U||this.opts.es5)&&(S.push(":"),(0,r.addCodeArg)(S,U));return S.push("}"),new r._Code(S)}if(f,S,I){if(this._blockNode(new n(f)),S&&I)this.code(S).else().code(I).endIf();else if(S)this.code(S).endIf();else if(I)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(f){return this._elseNode(new n(f))}else(){return this._elseNode(new s)}endIf(){return this._endBlockNode(n,s)}_for(f,S){return this._blockNode(f),S&&this.code(S).endFor(),this}for(f,S){return this._for(new a(f),S)}forRange(f,S,I,U,F=this.opts.es5?y.varKinds.var:y.varKinds.let){const Q=this._scope.toName(f);return this._for(new p(F,Q,S,I),()=>U(Q))}forOf(f,S,I,U=y.varKinds.const){const F=this._scope.toName(f);if(this.opts.es5){const Q=S instanceof r.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,r._)`${Q}.length`,B=>{this.var(F,(0,r._)`${Q}[${B}]`),I(F)})}return this._for(new v("of",U,F,S),()=>I(F))}forIn(f,S,I,U=this.opts.es5?y.varKinds.var:y.varKinds.const){if(this.opts.ownProperties)return this.forOf(f,(0,r._)`Object.keys(${S})`,I);const F=this._scope.toName(f);return this._for(new v("in",U,F,S),()=>I(F))}endFor(){return this._endBlockNode(t)}label(f){return this._leafNode(new _(f))}break(f){return this._leafNode(new c(f))}return(f){const S=new E;if(this._blockNode(S),this.code(f),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(f,S,I){if(!S&&!I)throw new Error('CodeGen: "try" without "catch" and "finally"');const U=new T;if(this._blockNode(U),this.code(f),S){const F=this.name("e");this._currNode=U.catch=new k(F),S(F)}return I&&(this._currNode=U.finally=new A,this.code(I)),this._endBlockNode(k,A)}throw(f){return this._leafNode(new b(f))}block(f,S){return this._blockStarts.push(this._nodes.length),f&&this.code(f).endBlock(S),this}endBlock(f){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const I=this._nodes.length-S;if(I<0||f!==void 0&&I!==f)throw new Error(`CodeGen: wrong number of nodes: ${I} vs ${f} expected`);return this._nodes.length=S,this}func(f,S=r.nil,I,U){return this._blockNode(new m(f,S,I)),U&&this.code(U).endFunc(),this}endFunc(){return this._endBlockNode(m)}optimize(f=1){for(;f-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(f){return this._currNode.nodes.push(f),this}_blockNode(f){this._currNode.nodes.push(f),this._nodes.push(f)}_endBlockNode(f,S){const I=this._currNode;if(I instanceof f||S&&I instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${f.kind}/${S.kind}`:f.kind}"`)}_elseNode(f){const S=this._currNode;if(!(S instanceof n))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=f,this}get _root(){return this._nodes[0]}get _currNode(){const f=this._nodes;return f[f.length-1]}set _currNode(f){const S=this._nodes;S[S.length-1]=f}}e.CodeGen=V;function K(N,f){for(const S in f)N[S]=(N[S]||0)+(f[S]||0);return N}function z(N,f){return f instanceof r._CodeOrName?K(N,f.names):N}function G(N,f,S){if(N instanceof r.Name)return I(N);if(!U(N))return N;return new r._Code(N._items.reduce((F,Q)=>(Q instanceof r.Name&&(Q=I(Q)),Q instanceof r._Code?F.push(...Q._items):F.push(Q),F),[]));function I(F){const Q=S[F.str];return Q===void 0||f[F.str]!==1?F:(delete f[F.str],Q)}function U(F){return F instanceof r._Code&&F._items.some(Q=>Q instanceof r.Name&&f[Q.str]===1&&S[Q.str]!==void 0)}}function Y(N,f){for(const S in f)N[S]=(N[S]||0)-(f[S]||0)}function ee(N){return typeof N=="boolean"||typeof N=="number"||N===null?!N:(0,r._)`!${C(N)}`}e.not=ee;const le=R(e.operators.AND);function Z(...N){return N.reduce(le)}e.and=Z;const se=R(e.operators.OR);function D(...N){return N.reduce(se)}e.or=D;function R(N){return(f,S)=>f===r.nil?S:S===r.nil?f:(0,r._)`${C(f)} ${N} ${C(S)}`}function C(N){return N instanceof r.Name?N:(0,r._)`(${N})`}})(Mt)),Mt}var H={},ar;function X(){if(ar)return H;ar=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=W(),r=St();function y(v){const m={};for(const E of v)m[E]=!0;return m}H.toHash=y;function i(v,m){return typeof m=="boolean"?m:Object.keys(m).length===0?!0:(g(v,m),!o(m,v.self.RULES.all))}H.alwaysValidSchema=i;function g(v,m=v.schema){const{opts:E,self:T}=v;if(!E.strictSchema||typeof m=="boolean")return;const k=T.RULES.keywords;for(const A in m)k[A]||p(v,`unknown keyword: "${A}"`)}H.checkUnknownRules=g;function o(v,m){if(typeof v=="boolean")return!v;for(const E in v)if(m[E])return!0;return!1}H.schemaHasRules=o;function h(v,m){if(typeof v=="boolean")return!v;for(const E in v)if(E!=="$ref"&&m.all[E])return!0;return!1}H.schemaHasRulesButRef=h;function u({topSchemaRef:v,schemaPath:m},E,T,k){if(!k){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,e._)`${E}`}return(0,e._)`${v}${m}${(0,e.getProperty)(T)}`}H.schemaRefOrVal=u;function d(v){return b(decodeURIComponent(v))}H.unescapeFragment=d;function _(v){return encodeURIComponent(c(v))}H.escapeFragment=_;function c(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=c;function b(v){return v.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=b;function P(v,m){if(Array.isArray(v))for(const E of v)m(E);else m(v)}H.eachItem=P;function w({mergeNames:v,mergeToName:m,mergeValues:E,resultToName:T}){return(k,A,V,K)=>{const z=V===void 0?A:V instanceof e.Name?(A instanceof e.Name?v(k,A,V):m(k,A,V),V):A instanceof e.Name?(m(k,V,A),A):E(A,V);return K===e.Name&&!(z instanceof e.Name)?T(k,z):z}}H.mergeEvaluated={props:w({mergeNames:(v,m,E)=>v.if((0,e._)`${E} !== true && ${m} !== undefined`,()=>{v.if((0,e._)`${m} === true`,()=>v.assign(E,!0),()=>v.assign(E,(0,e._)`${E} || {}`).code((0,e._)`Object.assign(${E}, ${m})`))}),mergeToName:(v,m,E)=>v.if((0,e._)`${E} !== true`,()=>{m===!0?v.assign(E,!0):(v.assign(E,(0,e._)`${E} || {}`),l(v,E,m))}),mergeValues:(v,m)=>v===!0?!0:{...v,...m},resultToName:$}),items:w({mergeNames:(v,m,E)=>v.if((0,e._)`${E} !== true && ${m} !== undefined`,()=>v.assign(E,(0,e._)`${m} === true ? true : ${E} > ${m} ? ${E} : ${m}`)),mergeToName:(v,m,E)=>v.if((0,e._)`${E} !== true`,()=>v.assign(E,m===!0?!0:(0,e._)`${E} > ${m} ? ${E} : ${m}`)),mergeValues:(v,m)=>v===!0?!0:Math.max(v,m),resultToName:(v,m)=>v.var("items",m)})};function $(v,m){if(m===!0)return v.var("props",!0);const E=v.var("props",(0,e._)`{}`);return m!==void 0&&l(v,E,m),E}H.evaluatedPropsToName=$;function l(v,m,E){Object.keys(E).forEach(T=>v.assign((0,e._)`${m}${(0,e.getProperty)(T)}`,!0))}H.setEvaluated=l;const s={};function n(v,m){return v.scopeValue("func",{ref:m,code:s[m.code]||(s[m.code]=new r._Code(m.code))})}H.useFunc=n;var t;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(t||(H.Type=t={}));function a(v,m,E){if(v instanceof e.Name){const T=m===t.Num;return E?T?(0,e._)`"[" + ${v} + "]"`:(0,e._)`"['" + ${v} + "']"`:T?(0,e._)`"/" + ${v}`:(0,e._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,e.getProperty)(v).toString():"/"+c(v)}H.getErrorPath=a;function p(v,m,E=v.opts.strictSchema){if(E){if(m=`strict mode: ${m}`,E===!0)throw new Error(m);v.self.logger.warn(m)}}return H.checkStrictMode=p,H}var Ue={},or;function be(){if(or)return Ue;or=1,Object.defineProperty(Ue,"__esModule",{value:!0});const e=W(),r={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 Ue.default=r,Ue}var ir;function Rt(){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 r=W(),y=X(),i=be();e.keywordError={message:({keyword:s})=>(0,r.str)`must pass "${s}" keyword validation`},e.keyword$DataError={message:({keyword:s,schemaType:n})=>n?(0,r.str)`"${s}" keyword must be ${n} ($data)`:(0,r.str)`"${s}" keyword is invalid ($data)`};function g(s,n=e.keywordError,t,a){const{it:p}=s,{gen:v,compositeRule:m,allErrors:E}=p,T=b(s,n,t);a??(m||E)?d(v,T):_(p,(0,r._)`[${T}]`)}e.reportError=g;function o(s,n=e.keywordError,t){const{it:a}=s,{gen:p,compositeRule:v,allErrors:m}=a,E=b(s,n,t);d(p,E),v||m||_(a,i.default.vErrors)}e.reportExtraError=o;function h(s,n){s.assign(i.default.errors,n),s.if((0,r._)`${i.default.vErrors} !== null`,()=>s.if(n,()=>s.assign((0,r._)`${i.default.vErrors}.length`,n),()=>s.assign(i.default.vErrors,null)))}e.resetErrorsCount=h;function u({gen:s,keyword:n,schemaValue:t,data:a,errsCount:p,it:v}){if(p===void 0)throw new Error("ajv implementation error");const m=s.name("err");s.forRange("i",p,i.default.errors,E=>{s.const(m,(0,r._)`${i.default.vErrors}[${E}]`),s.if((0,r._)`${m}.instancePath === undefined`,()=>s.assign((0,r._)`${m}.instancePath`,(0,r.strConcat)(i.default.instancePath,v.errorPath))),s.assign((0,r._)`${m}.schemaPath`,(0,r.str)`${v.errSchemaPath}/${n}`),v.opts.verbose&&(s.assign((0,r._)`${m}.schema`,t),s.assign((0,r._)`${m}.data`,a))})}e.extendErrors=u;function d(s,n){const t=s.const("err",n);s.if((0,r._)`${i.default.vErrors} === null`,()=>s.assign(i.default.vErrors,(0,r._)`[${t}]`),(0,r._)`${i.default.vErrors}.push(${t})`),s.code((0,r._)`${i.default.errors}++`)}function _(s,n){const{gen:t,validateName:a,schemaEnv:p}=s;p.$async?t.throw((0,r._)`new ${s.ValidationError}(${n})`):(t.assign((0,r._)`${a}.errors`,n),t.return(!1))}const c={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function b(s,n,t){const{createErrors:a}=s.it;return a===!1?(0,r._)`{}`:P(s,n,t)}function P(s,n,t={}){const{gen:a,it:p}=s,v=[w(p,t),$(s,t)];return l(s,n,v),a.object(...v)}function w({errorPath:s},{instancePath:n}){const t=n?(0,r.str)`${s}${(0,y.getErrorPath)(n,y.Type.Str)}`:s;return[i.default.instancePath,(0,r.strConcat)(i.default.instancePath,t)]}function $({keyword:s,it:{errSchemaPath:n}},{schemaPath:t,parentSchema:a}){let p=a?n:(0,r.str)`${n}/${s}`;return t&&(p=(0,r.str)`${p}${(0,y.getErrorPath)(t,y.Type.Str)}`),[c.schemaPath,p]}function l(s,{params:n,message:t},a){const{keyword:p,data:v,schemaValue:m,it:E}=s,{opts:T,propertyName:k,topSchemaRef:A,schemaPath:V}=E;a.push([c.keyword,p],[c.params,typeof n=="function"?n(s):n||(0,r._)`{}`]),T.messages&&a.push([c.message,typeof t=="function"?t(s):t]),T.verbose&&a.push([c.schema,m],[c.parentSchema,(0,r._)`${A}${V}`],[i.default.data,v]),k&&a.push([c.propertyName,k])}})(Dt)),Dt}var ur;function Xn(){if(ur)return Ee;ur=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.boolOrEmptySchema=Ee.topBoolOrEmptySchema=void 0;const e=Rt(),r=W(),y=be(),i={message:"boolean schema is false"};function g(u){const{gen:d,schema:_,validateName:c}=u;_===!1?h(u,!1):typeof _=="object"&&_.$async===!0?d.return(y.default.data):(d.assign((0,r._)`${c}.errors`,null),d.return(!0))}Ee.topBoolOrEmptySchema=g;function o(u,d){const{gen:_,schema:c}=u;c===!1?(_.var(d,!1),h(u)):_.var(d,!0)}Ee.boolOrEmptySchema=o;function h(u,d){const{gen:_,data:c}=u,b={gen:_,keyword:"false schema",data:c,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,e.reportError)(b,i,void 0,d)}return Ee}var ne={},Se={},cr;function Sn(){if(cr)return Se;cr=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.getRules=Se.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function y(g){return typeof g=="string"&&r.has(g)}Se.isJSONType=y;function i(){const g={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...g,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},g.number,g.string,g.array,g.object],post:{rules:[]},all:{},keywords:{}}}return Se.getRules=i,Se}var ye={},lr;function Pn(){if(lr)return ye;lr=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.shouldUseRule=ye.shouldUseGroup=ye.schemaHasRulesForType=void 0;function e({schema:i,self:g},o){const h=g.RULES.types[o];return h&&h!==!0&&r(i,h)}ye.schemaHasRulesForType=e;function r(i,g){return g.rules.some(o=>y(i,o))}ye.shouldUseGroup=r;function y(i,g){var o;return i[g.keyword]!==void 0||((o=g.definition.implements)===null||o===void 0?void 0:o.some(h=>i[h]!==void 0))}return ye.shouldUseRule=y,ye}var dr;function Pt(){if(dr)return ne;dr=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.reportTypeError=ne.checkDataTypes=ne.checkDataType=ne.coerceAndCheckDataType=ne.getJSONTypes=ne.getSchemaTypes=ne.DataType=void 0;const e=Sn(),r=Pn(),y=Rt(),i=W(),g=X();var o;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(o||(ne.DataType=o={}));function h(t){const a=u(t.type);if(a.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!a.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&a.push("null")}return a}ne.getSchemaTypes=h;function u(t){const a=Array.isArray(t)?t:t?[t]:[];if(a.every(e.isJSONType))return a;throw new Error("type must be JSONType or JSONType[]: "+a.join(","))}ne.getJSONTypes=u;function d(t,a){const{gen:p,data:v,opts:m}=t,E=c(a,m.coerceTypes),T=a.length>0&&!(E.length===0&&a.length===1&&(0,r.schemaHasRulesForType)(t,a[0]));if(T){const k=$(a,v,m.strictNumbers,o.Wrong);p.if(k,()=>{E.length?b(t,a,E):s(t)})}return T}ne.coerceAndCheckDataType=d;const _=new Set(["string","number","integer","boolean","null"]);function c(t,a){return a?t.filter(p=>_.has(p)||a==="array"&&p==="array"):[]}function b(t,a,p){const{gen:v,data:m,opts:E}=t,T=v.let("dataType",(0,i._)`typeof ${m}`),k=v.let("coerced",(0,i._)`undefined`);E.coerceTypes==="array"&&v.if((0,i._)`${T} == 'object' && Array.isArray(${m}) && ${m}.length == 1`,()=>v.assign(m,(0,i._)`${m}[0]`).assign(T,(0,i._)`typeof ${m}`).if($(a,m,E.strictNumbers),()=>v.assign(k,m))),v.if((0,i._)`${k} !== undefined`);for(const V of p)(_.has(V)||V==="array"&&E.coerceTypes==="array")&&A(V);v.else(),s(t),v.endIf(),v.if((0,i._)`${k} !== undefined`,()=>{v.assign(m,k),P(t,k)});function A(V){switch(V){case"string":v.elseIf((0,i._)`${T} == "number" || ${T} == "boolean"`).assign(k,(0,i._)`"" + ${m}`).elseIf((0,i._)`${m} === null`).assign(k,(0,i._)`""`);return;case"number":v.elseIf((0,i._)`${T} == "boolean" || ${m} === null
3
+ || (${T} == "string" && ${m} && ${m} == +${m})`).assign(k,(0,i._)`+${m}`);return;case"integer":v.elseIf((0,i._)`${T} === "boolean" || ${m} === null
4
+ || (${T} === "string" && ${m} && ${m} == +${m} && !(${m} % 1))`).assign(k,(0,i._)`+${m}`);return;case"boolean":v.elseIf((0,i._)`${m} === "false" || ${m} === 0 || ${m} === null`).assign(k,!1).elseIf((0,i._)`${m} === "true" || ${m} === 1`).assign(k,!0);return;case"null":v.elseIf((0,i._)`${m} === "" || ${m} === 0 || ${m} === false`),v.assign(k,null);return;case"array":v.elseIf((0,i._)`${T} === "string" || ${T} === "number"
5
+ || ${T} === "boolean" || ${m} === null`).assign(k,(0,i._)`[${m}]`)}}}function P({gen:t,parentData:a,parentDataProperty:p},v){t.if((0,i._)`${a} !== undefined`,()=>t.assign((0,i._)`${a}[${p}]`,v))}function w(t,a,p,v=o.Correct){const m=v===o.Correct?i.operators.EQ:i.operators.NEQ;let E;switch(t){case"null":return(0,i._)`${a} ${m} 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=T((0,i._)`!(${a} % 1) && !isNaN(${a})`);break;case"number":E=T();break;default:return(0,i._)`typeof ${a} ${m} ${t}`}return v===o.Correct?E:(0,i.not)(E);function T(k=i.nil){return(0,i.and)((0,i._)`typeof ${a} == "number"`,k,p?(0,i._)`isFinite(${a})`:i.nil)}}ne.checkDataType=w;function $(t,a,p,v){if(t.length===1)return w(t[0],a,p,v);let m;const E=(0,g.toHash)(t);if(E.array&&E.object){const T=(0,i._)`typeof ${a} != "object"`;m=E.null?T:(0,i._)`!${a} || ${T}`,delete E.null,delete E.array,delete E.object}else m=i.nil;E.number&&delete E.integer;for(const T in E)m=(0,i.and)(m,w(T,a,p,v));return m}ne.checkDataTypes=$;const l={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:a})=>typeof t=="string"?(0,i._)`{type: ${t}}`:(0,i._)`{type: ${a}}`};function s(t){const a=n(t);(0,y.reportError)(a,l)}ne.reportTypeError=s;function n(t){const{gen:a,data:p,schema:v}=t,m=(0,g.schemaRefOrVal)(t,v,"type");return{gen:a,keyword:"type",data:p,schema:v.type,schemaCode:m,schemaValue:m,parentSchema:v,params:{},it:t}}return ne}var Ie={},fr;function Qn(){if(fr)return Ie;fr=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.assignDefaults=void 0;const e=W(),r=X();function y(g,o){const{properties:h,items:u}=g.schema;if(o==="object"&&h)for(const d in h)i(g,d,h[d].default);else o==="array"&&Array.isArray(u)&&u.forEach((d,_)=>i(g,_,d.default))}Ie.assignDefaults=y;function i(g,o,h){const{gen:u,compositeRule:d,data:_,opts:c}=g;if(h===void 0)return;const b=(0,e._)`${_}${(0,e.getProperty)(o)}`;if(d){(0,r.checkStrictMode)(g,`default is ignored for: ${b}`);return}let P=(0,e._)`${b} === undefined`;c.useDefaults==="empty"&&(P=(0,e._)`${P} || ${b} === null || ${b} === ""`),u.if(P,(0,e._)`${b} = ${(0,e.stringify)(h)}`)}return Ie}var he={},x={},hr;function pe(){if(hr)return x;hr=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=W(),r=X(),y=be(),i=X();function g(t,a){const{gen:p,data:v,it:m}=t;p.if(c(p,v,a,m.opts.ownProperties),()=>{t.setParams({missingProperty:(0,e._)`${a}`},!0),t.error()})}x.checkReportMissingProp=g;function o({gen:t,data:a,it:{opts:p}},v,m){return(0,e.or)(...v.map(E=>(0,e.and)(c(t,a,E,p.ownProperties),(0,e._)`${m} = ${E}`)))}x.checkMissingProp=o;function h(t,a){t.setParams({missingProperty:a},!0),t.error()}x.reportMissingProp=h;function u(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}x.hasPropFunc=u;function d(t,a,p){return(0,e._)`${u(t)}.call(${a}, ${p})`}x.isOwnProperty=d;function _(t,a,p,v){const m=(0,e._)`${a}${(0,e.getProperty)(p)} !== undefined`;return v?(0,e._)`${m} && ${d(t,a,p)}`:m}x.propertyInData=_;function c(t,a,p,v){const m=(0,e._)`${a}${(0,e.getProperty)(p)} === undefined`;return v?(0,e.or)(m,(0,e.not)(d(t,a,p))):m}x.noPropertyInData=c;function b(t){return t?Object.keys(t).filter(a=>a!=="__proto__"):[]}x.allSchemaProperties=b;function P(t,a){return b(a).filter(p=>!(0,r.alwaysValidSchema)(t,a[p]))}x.schemaProperties=P;function w({schemaCode:t,data:a,it:{gen:p,topSchemaRef:v,schemaPath:m,errorPath:E},it:T},k,A,V){const K=V?(0,e._)`${t}, ${a}, ${v}${m}`:a,z=[[y.default.instancePath,(0,e.strConcat)(y.default.instancePath,E)],[y.default.parentData,T.parentData],[y.default.parentDataProperty,T.parentDataProperty],[y.default.rootData,y.default.rootData]];T.opts.dynamicRef&&z.push([y.default.dynamicAnchors,y.default.dynamicAnchors]);const G=(0,e._)`${K}, ${p.object(...z)}`;return A!==e.nil?(0,e._)`${k}.call(${A}, ${G})`:(0,e._)`${k}(${G})`}x.callValidateCode=w;const $=(0,e._)`new RegExp`;function l({gen:t,it:{opts:a}},p){const v=a.unicodeRegExp?"u":"",{regExp:m}=a.code,E=m(p,v);return t.scopeValue("pattern",{key:E.toString(),ref:E,code:(0,e._)`${m.code==="new RegExp"?$:(0,i.useFunc)(t,m)}(${p}, ${v})`})}x.usePattern=l;function s(t){const{gen:a,data:p,keyword:v,it:m}=t,E=a.name("valid");if(m.allErrors){const k=a.let("valid",!0);return T(()=>a.assign(k,!1)),k}return a.var(E,!0),T(()=>a.break()),E;function T(k){const A=a.const("len",(0,e._)`${p}.length`);a.forRange("i",0,A,V=>{t.subschema({keyword:v,dataProp:V,dataPropType:r.Type.Num},E),a.if((0,e.not)(E),k)})}}x.validateArray=s;function n(t){const{gen:a,schema:p,keyword:v,it:m}=t;if(!Array.isArray(p))throw new Error("ajv implementation error");if(p.some(A=>(0,r.alwaysValidSchema)(m,A))&&!m.opts.unevaluated)return;const T=a.let("valid",!1),k=a.name("_valid");a.block(()=>p.forEach((A,V)=>{const K=t.subschema({keyword:v,schemaProp:V,compositeRule:!0},k);a.assign(T,(0,e._)`${T} || ${k}`),t.mergeValidEvaluated(K,k)||a.if((0,e.not)(T))})),t.result(T,()=>t.reset(),()=>t.error(!0))}return x.validateUnion=n,x}var pr;function Yn(){if(pr)return he;pr=1,Object.defineProperty(he,"__esModule",{value:!0}),he.validateKeywordUsage=he.validSchemaType=he.funcKeywordCode=he.macroKeywordCode=void 0;const e=W(),r=be(),y=pe(),i=Rt();function g(P,w){const{gen:$,keyword:l,schema:s,parentSchema:n,it:t}=P,a=w.macro.call(t.self,s,n,t),p=_($,l,a);t.opts.validateSchema!==!1&&t.self.validateSchema(a,!0);const v=$.name("valid");P.subschema({schema:a,schemaPath:e.nil,errSchemaPath:`${t.errSchemaPath}/${l}`,topSchemaRef:p,compositeRule:!0},v),P.pass(v,()=>P.error(!0))}he.macroKeywordCode=g;function o(P,w){var $;const{gen:l,keyword:s,schema:n,parentSchema:t,$data:a,it:p}=P;d(p,w);const v=!a&&w.compile?w.compile.call(p.self,n,t,p):w.validate,m=_(l,s,v),E=l.let("valid");P.block$data(E,T),P.ok(($=w.valid)!==null&&$!==void 0?$:E);function T(){if(w.errors===!1)V(),w.modifying&&h(P),K(()=>P.error());else{const z=w.async?k():A();w.modifying&&h(P),K(()=>u(P,z))}}function k(){const z=l.let("ruleErrs",null);return l.try(()=>V((0,e._)`await `),G=>l.assign(E,!1).if((0,e._)`${G} instanceof ${p.ValidationError}`,()=>l.assign(z,(0,e._)`${G}.errors`),()=>l.throw(G))),z}function A(){const z=(0,e._)`${m}.errors`;return l.assign(z,null),V(e.nil),z}function V(z=w.async?(0,e._)`await `:e.nil){const G=p.opts.passContext?r.default.this:r.default.self,Y=!("compile"in w&&!a||w.schema===!1);l.assign(E,(0,e._)`${z}${(0,y.callValidateCode)(P,m,G,Y)}`,w.modifying)}function K(z){var G;l.if((0,e.not)((G=w.valid)!==null&&G!==void 0?G:E),z)}}he.funcKeywordCode=o;function h(P){const{gen:w,data:$,it:l}=P;w.if(l.parentData,()=>w.assign($,(0,e._)`${l.parentData}[${l.parentDataProperty}]`))}function u(P,w){const{gen:$}=P;$.if((0,e._)`Array.isArray(${w})`,()=>{$.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${w} : ${r.default.vErrors}.concat(${w})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,i.extendErrors)(P)},()=>P.error())}function d({schemaEnv:P},w){if(w.async&&!P.$async)throw new Error("async keyword in sync schema")}function _(P,w,$){if($===void 0)throw new Error(`keyword "${w}" failed to compile`);return P.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,e.stringify)($)})}function c(P,w,$=!1){return!w.length||w.some(l=>l==="array"?Array.isArray(P):l==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==l||$&&typeof P>"u")}he.validSchemaType=c;function b({schema:P,opts:w,self:$,errSchemaPath:l},s,n){if(Array.isArray(s.keyword)?!s.keyword.includes(n):s.keyword!==n)throw new Error("ajv implementation error");const t=s.dependencies;if(t?.some(a=>!Object.prototype.hasOwnProperty.call(P,a)))throw new Error(`parent schema must have dependencies of ${n}: ${t.join(",")}`);if(s.validateSchema&&!s.validateSchema(P[n])){const p=`keyword "${n}" value is invalid at path "${l}": `+$.errorsText(s.validateSchema.errors);if(w.validateSchema==="log")$.logger.error(p);else throw new Error(p)}}return he.validateKeywordUsage=b,he}var ve={},mr;function Zn(){if(mr)return ve;mr=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.extendSubschemaMode=ve.extendSubschemaData=ve.getSubschema=void 0;const e=W(),r=X();function y(o,{keyword:h,schemaProp:u,schema:d,schemaPath:_,errSchemaPath:c,topSchemaRef:b}){if(h!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(h!==void 0){const P=o.schema[h];return u===void 0?{schema:P,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(h)}`,errSchemaPath:`${o.errSchemaPath}/${h}`}:{schema:P[u],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(h)}${(0,e.getProperty)(u)}`,errSchemaPath:`${o.errSchemaPath}/${h}/${(0,r.escapeFragment)(u)}`}}if(d!==void 0){if(_===void 0||c===void 0||b===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:_,topSchemaRef:b,errSchemaPath:c}}throw new Error('either "keyword" or "schema" must be passed')}ve.getSubschema=y;function i(o,h,{dataProp:u,dataPropType:d,data:_,dataTypes:c,propertyName:b}){if(_!==void 0&&u!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=h;if(u!==void 0){const{errorPath:$,dataPathArr:l,opts:s}=h,n=P.let("data",(0,e._)`${h.data}${(0,e.getProperty)(u)}`,!0);w(n),o.errorPath=(0,e.str)`${$}${(0,r.getErrorPath)(u,d,s.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${u}`,o.dataPathArr=[...l,o.parentDataProperty]}if(_!==void 0){const $=_ instanceof e.Name?_:P.let("data",_,!0);w($),b!==void 0&&(o.propertyName=b)}c&&(o.dataTypes=c);function w($){o.data=$,o.dataLevel=h.dataLevel+1,o.dataTypes=[],h.definedProperties=new Set,o.parentData=h.data,o.dataNames=[...h.dataNames,$]}}ve.extendSubschemaData=i;function g(o,{jtdDiscriminator:h,jtdMetadata:u,compositeRule:d,createErrors:_,allErrors:c}){d!==void 0&&(o.compositeRule=d),_!==void 0&&(o.createErrors=_),c!==void 0&&(o.allErrors=c),o.jtdDiscriminator=h,o.jtdMetadata=u}return ve.extendSubschemaMode=g,ve}var oe={},Ut,yr;function jn(){return yr||(yr=1,Ut=function e(r,y){if(r===y)return!0;if(r&&y&&typeof r=="object"&&typeof y=="object"){if(r.constructor!==y.constructor)return!1;var i,g,o;if(Array.isArray(r)){if(i=r.length,i!=y.length)return!1;for(g=i;g--!==0;)if(!e(r[g],y[g]))return!1;return!0}if(r.constructor===RegExp)return r.source===y.source&&r.flags===y.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===y.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===y.toString();if(o=Object.keys(r),i=o.length,i!==Object.keys(y).length)return!1;for(g=i;g--!==0;)if(!Object.prototype.hasOwnProperty.call(y,o[g]))return!1;for(g=i;g--!==0;){var h=o[g];if(!e(r[h],y[h]))return!1}return!0}return r!==r&&y!==y}),Ut}var Lt={exports:{}},vr;function xn(){if(vr)return Lt.exports;vr=1;var e=Lt.exports=function(i,g,o){typeof g=="function"&&(o=g,g={}),o=g.cb||o;var h=typeof o=="function"?o:o.pre||function(){},u=o.post||function(){};r(g,h,u,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 r(i,g,o,h,u,d,_,c,b,P){if(h&&typeof h=="object"&&!Array.isArray(h)){g(h,u,d,_,c,b,P);for(var w in h){var $=h[w];if(Array.isArray($)){if(w in e.arrayKeywords)for(var l=0;l<$.length;l++)r(i,g,o,$[l],u+"/"+w+"/"+l,d,u,w,h,l)}else if(w in e.propsKeywords){if($&&typeof $=="object")for(var s in $)r(i,g,o,$[s],u+"/"+w+"/"+y(s),d,u,w,h,s)}else(w in e.keywords||i.allKeys&&!(w in e.skipKeywords))&&r(i,g,o,$,u+"/"+w,d,u,w,h)}o(h,u,d,_,c,b,P)}}function y(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return Lt.exports}var gr;function Ot(){if(gr)return oe;gr=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.getSchemaRefs=oe.resolveUrl=oe.normalizeId=oe._getFullPath=oe.getFullPath=oe.inlineRef=void 0;const e=X(),r=jn(),y=xn(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function g(l,s=!0){return typeof l=="boolean"?!0:s===!0?!h(l):s?u(l)<=s:!1}oe.inlineRef=g;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function h(l){for(const s in l){if(o.has(s))return!0;const n=l[s];if(Array.isArray(n)&&n.some(h)||typeof n=="object"&&h(n))return!0}return!1}function u(l){let s=0;for(const n in l){if(n==="$ref")return 1/0;if(s++,!i.has(n)&&(typeof l[n]=="object"&&(0,e.eachItem)(l[n],t=>s+=u(t)),s===1/0))return 1/0}return s}function d(l,s="",n){n!==!1&&(s=b(s));const t=l.parse(s);return _(l,t)}oe.getFullPath=d;function _(l,s){return l.serialize(s).split("#")[0]+"#"}oe._getFullPath=_;const c=/#\/?$/;function b(l){return l?l.replace(c,""):""}oe.normalizeId=b;function P(l,s,n){return n=b(n),l.resolve(s,n)}oe.resolveUrl=P;const w=/^[a-z_][-a-z0-9._]*$/i;function $(l,s){if(typeof l=="boolean")return{};const{schemaId:n,uriResolver:t}=this.opts,a=b(l[n]||s),p={"":a},v=d(t,a,!1),m={},E=new Set;return y(l,{allKeys:!0},(A,V,K,z)=>{if(z===void 0)return;const G=v+V;let Y=p[z];typeof A[n]=="string"&&(Y=ee.call(this,A[n])),le.call(this,A.$anchor),le.call(this,A.$dynamicAnchor),p[V]=Y;function ee(Z){const se=this.opts.uriResolver.resolve;if(Z=b(Y?se(Y,Z):Z),E.has(Z))throw k(Z);E.add(Z);let D=this.refs[Z];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?T(A,D.schema,Z):Z!==b(G)&&(Z[0]==="#"?(T(A,m[Z],Z),m[Z]=A):this.refs[Z]=G),Z}function le(Z){if(typeof Z=="string"){if(!w.test(Z))throw new Error(`invalid anchor "${Z}"`);ee.call(this,`#${Z}`)}}}),m;function T(A,V,K){if(V!==void 0&&!r(A,V))throw k(K)}function k(A){return new Error(`reference "${A}" resolves to more than one schema`)}}return oe.getSchemaRefs=$,oe}var _r;function Nt(){if(_r)return me;_r=1,Object.defineProperty(me,"__esModule",{value:!0}),me.getData=me.KeywordCxt=me.validateFunctionCode=void 0;const e=Xn(),r=Pt(),y=Pn(),i=Pt(),g=Qn(),o=Yn(),h=Zn(),u=W(),d=be(),_=Ot(),c=X(),b=Rt();function P(j){if(v(j)&&(E(j),p(j))){s(j);return}w(j,()=>(0,e.topBoolOrEmptySchema)(j))}me.validateFunctionCode=P;function w({gen:j,validateName:O,schema:q,schemaEnv:M,opts:L},J){L.code.es5?j.func(O,(0,u._)`${d.default.data}, ${d.default.valCxt}`,M.$async,()=>{j.code((0,u._)`"use strict"; ${t(q,L)}`),l(j,L),j.code(J)}):j.func(O,(0,u._)`${d.default.data}, ${$(L)}`,M.$async,()=>j.code(t(q,L)).code(J))}function $(j){return(0,u._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${j.dynamicRef?(0,u._)`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}function l(j,O){j.if(d.default.valCxt,()=>{j.var(d.default.instancePath,(0,u._)`${d.default.valCxt}.${d.default.instancePath}`),j.var(d.default.parentData,(0,u._)`${d.default.valCxt}.${d.default.parentData}`),j.var(d.default.parentDataProperty,(0,u._)`${d.default.valCxt}.${d.default.parentDataProperty}`),j.var(d.default.rootData,(0,u._)`${d.default.valCxt}.${d.default.rootData}`),O.dynamicRef&&j.var(d.default.dynamicAnchors,(0,u._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{j.var(d.default.instancePath,(0,u._)`""`),j.var(d.default.parentData,(0,u._)`undefined`),j.var(d.default.parentDataProperty,(0,u._)`undefined`),j.var(d.default.rootData,d.default.data),O.dynamicRef&&j.var(d.default.dynamicAnchors,(0,u._)`{}`)})}function s(j){const{schema:O,opts:q,gen:M}=j;w(j,()=>{q.$comment&&O.$comment&&z(j),A(j),M.let(d.default.vErrors,null),M.let(d.default.errors,0),q.unevaluated&&n(j),T(j),G(j)})}function n(j){const{gen:O,validateName:q}=j;j.evaluated=O.const("evaluated",(0,u._)`${q}.evaluated`),O.if((0,u._)`${j.evaluated}.dynamicProps`,()=>O.assign((0,u._)`${j.evaluated}.props`,(0,u._)`undefined`)),O.if((0,u._)`${j.evaluated}.dynamicItems`,()=>O.assign((0,u._)`${j.evaluated}.items`,(0,u._)`undefined`))}function t(j,O){const q=typeof j=="object"&&j[O.schemaId];return q&&(O.code.source||O.code.process)?(0,u._)`/*# sourceURL=${q} */`:u.nil}function a(j,O){if(v(j)&&(E(j),p(j))){m(j,O);return}(0,e.boolOrEmptySchema)(j,O)}function p({schema:j,self:O}){if(typeof j=="boolean")return!j;for(const q in j)if(O.RULES.all[q])return!0;return!1}function v(j){return typeof j.schema!="boolean"}function m(j,O){const{schema:q,gen:M,opts:L}=j;L.$comment&&q.$comment&&z(j),V(j),K(j);const J=M.const("_errs",d.default.errors);T(j,J),M.var(O,(0,u._)`${J} === ${d.default.errors}`)}function E(j){(0,c.checkUnknownRules)(j),k(j)}function T(j,O){if(j.opts.jtd)return ee(j,[],!1,O);const q=(0,r.getSchemaTypes)(j.schema),M=(0,r.coerceAndCheckDataType)(j,q);ee(j,q,!M,O)}function k(j){const{schema:O,errSchemaPath:q,opts:M,self:L}=j;O.$ref&&M.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(O,L.RULES)&&L.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function A(j){const{schema:O,opts:q}=j;O.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,c.checkStrictMode)(j,"default is ignored in the schema root")}function V(j){const O=j.schema[j.opts.schemaId];O&&(j.baseId=(0,_.resolveUrl)(j.opts.uriResolver,j.baseId,O))}function K(j){if(j.schema.$async&&!j.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:j,schemaEnv:O,schema:q,errSchemaPath:M,opts:L}){const J=q.$comment;if(L.$comment===!0)j.code((0,u._)`${d.default.self}.logger.log(${J})`);else if(typeof L.$comment=="function"){const te=(0,u.str)`${M}/$comment`,fe=j.scopeValue("root",{ref:O.root});j.code((0,u._)`${d.default.self}.opts.$comment(${J}, ${te}, ${fe}.schema)`)}}function G(j){const{gen:O,schemaEnv:q,validateName:M,ValidationError:L,opts:J}=j;q.$async?O.if((0,u._)`${d.default.errors} === 0`,()=>O.return(d.default.data),()=>O.throw((0,u._)`new ${L}(${d.default.vErrors})`)):(O.assign((0,u._)`${M}.errors`,d.default.vErrors),J.unevaluated&&Y(j),O.return((0,u._)`${d.default.errors} === 0`))}function Y({gen:j,evaluated:O,props:q,items:M}){q instanceof u.Name&&j.assign((0,u._)`${O}.props`,q),M instanceof u.Name&&j.assign((0,u._)`${O}.items`,M)}function ee(j,O,q,M){const{gen:L,schema:J,data:te,allErrors:fe,opts:ie,self:ue}=j,{RULES:re}=ue;if(J.$ref&&(ie.ignoreKeywordsWithRef||!(0,c.schemaHasRulesButRef)(J,re))){L.block(()=>U(j,"$ref",re.all.$ref.definition));return}ie.jtd||Z(j,O),L.block(()=>{for(const de of re.rules)Re(de);Re(re.post)});function Re(de){(0,y.shouldUseGroup)(J,de)&&(de.type?(L.if((0,i.checkDataType)(de.type,te,ie.strictNumbers)),le(j,de),O.length===1&&O[0]===de.type&&q&&(L.else(),(0,i.reportTypeError)(j)),L.endIf()):le(j,de),fe||L.if((0,u._)`${d.default.errors} === ${M||0}`))}}function le(j,O){const{gen:q,schema:M,opts:{useDefaults:L}}=j;L&&(0,g.assignDefaults)(j,O.type),q.block(()=>{for(const J of O.rules)(0,y.shouldUseRule)(M,J)&&U(j,J.keyword,J.definition,O.type)})}function Z(j,O){j.schemaEnv.meta||!j.opts.strictTypes||(se(j,O),j.opts.allowUnionTypes||D(j,O),R(j,j.dataTypes))}function se(j,O){if(O.length){if(!j.dataTypes.length){j.dataTypes=O;return}O.forEach(q=>{N(j.dataTypes,q)||S(j,`type "${q}" not allowed by context "${j.dataTypes.join(",")}"`)}),f(j,O)}}function D(j,O){O.length>1&&!(O.length===2&&O.includes("null"))&&S(j,"use allowUnionTypes to allow union type keyword")}function R(j,O){const q=j.self.RULES.all;for(const M in q){const L=q[M];if(typeof L=="object"&&(0,y.shouldUseRule)(j.schema,L)){const{type:J}=L.definition;J.length&&!J.some(te=>C(O,te))&&S(j,`missing type "${J.join(",")}" for keyword "${M}"`)}}}function C(j,O){return j.includes(O)||O==="number"&&j.includes("integer")}function N(j,O){return j.includes(O)||O==="integer"&&j.includes("number")}function f(j,O){const q=[];for(const M of j.dataTypes)N(O,M)?q.push(M):O.includes("integer")&&M==="number"&&q.push("integer");j.dataTypes=q}function S(j,O){const q=j.schemaEnv.baseId+j.errSchemaPath;O+=` at "${q}" (strictTypes)`,(0,c.checkStrictMode)(j,O,j.opts.strictTypes)}class I{constructor(O,q,M){if((0,o.validateKeywordUsage)(O,q,M),this.gen=O.gen,this.allErrors=O.allErrors,this.keyword=M,this.data=O.data,this.schema=O.schema[M],this.$data=q.$data&&O.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(O,this.schema,M,this.$data),this.schemaType=q.schemaType,this.parentSchema=O.schema,this.params={},this.it=O,this.def=q,this.$data)this.schemaCode=O.gen.const("vSchema",B(this.$data,O));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${M} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=O.gen.const("_errs",d.default.errors))}result(O,q,M){this.failResult((0,u.not)(O),q,M)}failResult(O,q,M){this.gen.if(O),M?M():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(O,q){this.failResult((0,u.not)(O),void 0,q)}fail(O){if(O===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(O),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(O){if(!this.$data)return this.fail(O);const{schemaCode:q}=this;this.fail((0,u._)`${q} !== undefined && (${(0,u.or)(this.invalid$data(),O)})`)}error(O,q,M){if(q){this.setParams(q),this._error(O,M),this.setParams({});return}this._error(O,M)}_error(O,q){(O?b.reportExtraError:b.reportError)(this,this.def.error,q)}$dataError(){(0,b.reportError)(this,this.def.$dataError||b.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,b.resetErrorsCount)(this.gen,this.errsCount)}ok(O){this.allErrors||this.gen.if(O)}setParams(O,q){q?Object.assign(this.params,O):this.params=O}block$data(O,q,M=u.nil){this.gen.block(()=>{this.check$data(O,M),q()})}check$data(O=u.nil,q=u.nil){if(!this.$data)return;const{gen:M,schemaCode:L,schemaType:J,def:te}=this;M.if((0,u.or)((0,u._)`${L} === undefined`,q)),O!==u.nil&&M.assign(O,!0),(J.length||te.validateSchema)&&(M.elseIf(this.invalid$data()),this.$dataError(),O!==u.nil&&M.assign(O,!1)),M.else()}invalid$data(){const{gen:O,schemaCode:q,schemaType:M,def:L,it:J}=this;return(0,u.or)(te(),fe());function te(){if(M.length){if(!(q instanceof u.Name))throw new Error("ajv implementation error");const ie=Array.isArray(M)?M:[M];return(0,u._)`${(0,i.checkDataTypes)(ie,q,J.opts.strictNumbers,i.DataType.Wrong)}`}return u.nil}function fe(){if(L.validateSchema){const ie=O.scopeValue("validate$data",{ref:L.validateSchema});return(0,u._)`!${ie}(${q})`}return u.nil}}subschema(O,q){const M=(0,h.getSubschema)(this.it,O);(0,h.extendSubschemaData)(M,this.it,O),(0,h.extendSubschemaMode)(M,O);const L={...this.it,...M,items:void 0,props:void 0};return a(L,q),L}mergeEvaluated(O,q){const{it:M,gen:L}=this;M.opts.unevaluated&&(M.props!==!0&&O.props!==void 0&&(M.props=c.mergeEvaluated.props(L,O.props,M.props,q)),M.items!==!0&&O.items!==void 0&&(M.items=c.mergeEvaluated.items(L,O.items,M.items,q)))}mergeValidEvaluated(O,q){const{it:M,gen:L}=this;if(M.opts.unevaluated&&(M.props!==!0||M.items!==!0))return L.if(q,()=>this.mergeEvaluated(O,u.Name)),!0}}me.KeywordCxt=I;function U(j,O,q,M){const L=new I(j,q,O);"code"in q?q.code(L,M):L.$data&&q.validate?(0,o.funcKeywordCode)(L,q):"macro"in q?(0,o.macroKeywordCode)(L,q):(q.compile||q.validate)&&(0,o.funcKeywordCode)(L,q)}const F=/^\/(?:[^~]|~0|~1)*$/,Q=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function B(j,{dataLevel:O,dataNames:q,dataPathArr:M}){let L,J;if(j==="")return d.default.rootData;if(j[0]==="/"){if(!F.test(j))throw new Error(`Invalid JSON-pointer: ${j}`);L=j,J=d.default.rootData}else{const ue=Q.exec(j);if(!ue)throw new Error(`Invalid JSON-pointer: ${j}`);const re=+ue[1];if(L=ue[2],L==="#"){if(re>=O)throw new Error(ie("property/index",re));return M[O-re]}if(re>O)throw new Error(ie("data",re));if(J=q[O-re],!L)return J}let te=J;const fe=L.split("/");for(const ue of fe)ue&&(J=(0,u._)`${J}${(0,u.getProperty)((0,c.unescapeJsonPointer)(ue))}`,te=(0,u._)`${te} && ${J}`);return te;function ie(ue,re){return`Cannot access ${ue} ${re} levels up, current level is ${O}`}}return me.getData=B,me}var Le={},$r;function Wt(){if($r)return Le;$r=1,Object.defineProperty(Le,"__esModule",{value:!0});class e extends Error{constructor(y){super("validation failed"),this.errors=y,this.ajv=this.validation=!0}}return Le.default=e,Le}var Fe={},wr;function Tt(){if(wr)return Fe;wr=1,Object.defineProperty(Fe,"__esModule",{value:!0});const e=Ot();class r extends Error{constructor(i,g,o,h){super(h||`can't resolve reference ${o} from id ${g}`),this.missingRef=(0,e.resolveUrl)(i,g,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return Fe.default=r,Fe}var ce={},br;function Bt(){if(br)return ce;br=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.resolveSchema=ce.getCompilingSchema=ce.resolveRef=ce.compileSchema=ce.SchemaEnv=void 0;const e=W(),r=Wt(),y=be(),i=Ot(),g=X(),o=Nt();class h{constructor(n){var t;this.refs={},this.dynamicAnchors={};let a;typeof n.schema=="object"&&(a=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=(t=n.baseId)!==null&&t!==void 0?t:(0,i.normalizeId)(a?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=a?.$async,this.refs={}}}ce.SchemaEnv=h;function u(s){const n=c.call(this,s);if(n)return n;const t=(0,i.getFullPath)(this.opts.uriResolver,s.root.baseId),{es5:a,lines:p}=this.opts.code,{ownProperties:v}=this.opts,m=new e.CodeGen(this.scope,{es5:a,lines:p,ownProperties:v});let E;s.$async&&(E=m.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const T=m.scopeName("validate");s.validateName=T;const k={gen:m,allErrors:this.opts.allErrors,data:y.default.data,parentData:y.default.parentData,parentDataProperty:y.default.parentDataProperty,dataNames:[y.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:m.scopeValue("schema",this.opts.code.source===!0?{ref:s.schema,code:(0,e.stringify)(s.schema)}:{ref:s.schema}),validateName:T,ValidationError:E,schema:s.schema,schemaEnv:s,rootId:t,baseId:s.baseId||t,schemaPath:e.nil,errSchemaPath:s.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let A;try{this._compilations.add(s),(0,o.validateFunctionCode)(k),m.optimize(this.opts.code.optimize);const V=m.toString();A=`${m.scopeRefs(y.default.scope)}return ${V}`,this.opts.code.process&&(A=this.opts.code.process(A,s));const z=new Function(`${y.default.self}`,`${y.default.scope}`,A)(this,this.scope.get());if(this.scope.value(T,{ref:z}),z.errors=null,z.schema=s.schema,z.schemaEnv=s,s.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:T,validateCode:V,scopeValues:m._values}),this.opts.unevaluated){const{props:G,items:Y}=k;z.evaluated={props:G instanceof e.Name?void 0:G,items:Y instanceof e.Name?void 0:Y,dynamicProps:G instanceof e.Name,dynamicItems:Y instanceof e.Name},z.source&&(z.source.evaluated=(0,e.stringify)(z.evaluated))}return s.validate=z,s}catch(V){throw delete s.validate,delete s.validateName,A&&this.logger.error("Error compiling schema, function code:",A),V}finally{this._compilations.delete(s)}}ce.compileSchema=u;function d(s,n,t){var a;t=(0,i.resolveUrl)(this.opts.uriResolver,n,t);const p=s.refs[t];if(p)return p;let v=P.call(this,s,t);if(v===void 0){const m=(a=s.localRefs)===null||a===void 0?void 0:a[t],{schemaId:E}=this.opts;m&&(v=new h({schema:m,schemaId:E,root:s,baseId:n}))}if(v!==void 0)return s.refs[t]=_.call(this,v)}ce.resolveRef=d;function _(s){return(0,i.inlineRef)(s.schema,this.opts.inlineRefs)?s.schema:s.validate?s:u.call(this,s)}function c(s){for(const n of this._compilations)if(b(n,s))return n}ce.getCompilingSchema=c;function b(s,n){return s.schema===n.schema&&s.root===n.root&&s.baseId===n.baseId}function P(s,n){let t;for(;typeof(t=this.refs[n])=="string";)n=t;return t||this.schemas[n]||w.call(this,s,n)}function w(s,n){const t=this.opts.uriResolver.parse(n),a=(0,i._getFullPath)(this.opts.uriResolver,t);let p=(0,i.getFullPath)(this.opts.uriResolver,s.baseId,void 0);if(Object.keys(s.schema).length>0&&a===p)return l.call(this,t,s);const v=(0,i.normalizeId)(a),m=this.refs[v]||this.schemas[v];if(typeof m=="string"){const E=w.call(this,s,m);return typeof E?.schema!="object"?void 0:l.call(this,t,E)}if(typeof m?.schema=="object"){if(m.validate||u.call(this,m),v===(0,i.normalizeId)(n)){const{schema:E}=m,{schemaId:T}=this.opts,k=E[T];return k&&(p=(0,i.resolveUrl)(this.opts.uriResolver,p,k)),new h({schema:E,schemaId:T,root:s,baseId:p})}return l.call(this,t,m)}}ce.resolveSchema=w;const $=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function l(s,{baseId:n,schema:t,root:a}){var p;if(((p=s.fragment)===null||p===void 0?void 0:p[0])!=="/")return;for(const E of s.fragment.slice(1).split("/")){if(typeof t=="boolean")return;const T=t[(0,g.unescapeFragment)(E)];if(T===void 0)return;t=T;const k=typeof t=="object"&&t[this.opts.schemaId];!$.has(E)&&k&&(n=(0,i.resolveUrl)(this.opts.uriResolver,n,k))}let v;if(typeof t!="boolean"&&t.$ref&&!(0,g.schemaHasRulesButRef)(t,this.RULES)){const E=(0,i.resolveUrl)(this.opts.uriResolver,n,t.$ref);v=w.call(this,a,E)}const{schemaId:m}=this.opts;if(v=v||new h({schema:t,schemaId:m,root:a,baseId:n}),v.schema!==v.root.schema)return v}return ce}const es="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",ts="Meta-schema for $data reference (JSON AnySchema extension proposal)",rs="object",ns=["$data"],ss={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},as=!1,os={$id:es,description:ts,type:rs,required:ns,properties:ss,additionalProperties:as};var ze={},qe={exports:{}},Ft,Er;function is(){return Er||(Er=1,Ft={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),Ft}var zt,Sr;function us(){if(Sr)return zt;Sr=1;const{HEX:e}=is(),r=/^(?:(?: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 y(l){if(u(l,".")<3)return{host:l,isIPV4:!1};const s=l.match(r)||[],[n]=s;return n?{host:h(n,"."),isIPV4:!0}:{host:l,isIPV4:!1}}function i(l,s=!1){let n="",t=!0;for(const a of l){if(e[a]===void 0)return;a!=="0"&&t===!0&&(t=!1),t||(n+=a)}return s&&n.length===0&&(n="0"),n}function g(l){let s=0;const n={error:!1,address:"",zone:""},t=[],a=[];let p=!1,v=!1,m=!1;function E(){if(a.length){if(p===!1){const T=i(a);if(T!==void 0)t.push(T);else return n.error=!0,!1}a.length=0}return!0}for(let T=0;T<l.length;T++){const k=l[T];if(!(k==="["||k==="]"))if(k===":"){if(v===!0&&(m=!0),!E())break;if(s++,t.push(":"),s>7){n.error=!0;break}T-1>=0&&l[T-1]===":"&&(v=!0);continue}else if(k==="%"){if(!E())break;p=!0}else{a.push(k);continue}}return a.length&&(p?n.zone=a.join(""):m?t.push(a.join("")):t.push(i(a))),n.address=t.join(""),n}function o(l){if(u(l,":")<2)return{host:l,isIPV6:!1};const s=g(l);if(s.error)return{host:l,isIPV6:!1};{let n=s.address,t=s.address;return s.zone&&(n+="%"+s.zone,t+="%25"+s.zone),{host:n,escapedHost:t,isIPV6:!0}}}function h(l,s){let n="",t=!0;const a=l.length;for(let p=0;p<a;p++){const v=l[p];v==="0"&&t?(p+1<=a&&l[p+1]===s||p+1===a)&&(n+=v,t=!1):(v===s?t=!0:t=!1,n+=v)}return n}function u(l,s){let n=0;for(let t=0;t<l.length;t++)l[t]===s&&n++;return n}const d=/^\.\.?\//u,_=/^\/\.(?:\/|$)/u,c=/^\/\.\.(?:\/|$)/u,b=/^\/?(?:.|\n)*?(?=\/|$)/u;function P(l){const s=[];for(;l.length;)if(l.match(d))l=l.replace(d,"");else if(l.match(_))l=l.replace(_,"/");else if(l.match(c))l=l.replace(c,"/"),s.pop();else if(l==="."||l==="..")l="";else{const n=l.match(b);if(n){const t=n[0];l=l.slice(t.length),s.push(t)}else throw new Error("Unexpected dot segment condition")}return s.join("")}function w(l,s){const n=s!==!0?escape:unescape;return l.scheme!==void 0&&(l.scheme=n(l.scheme)),l.userinfo!==void 0&&(l.userinfo=n(l.userinfo)),l.host!==void 0&&(l.host=n(l.host)),l.path!==void 0&&(l.path=n(l.path)),l.query!==void 0&&(l.query=n(l.query)),l.fragment!==void 0&&(l.fragment=n(l.fragment)),l}function $(l){const s=[];if(l.userinfo!==void 0&&(s.push(l.userinfo),s.push("@")),l.host!==void 0){let n=unescape(l.host);const t=y(n);if(t.isIPV4)n=t.host;else{const a=o(t.host);a.isIPV6===!0?n=`[${a.escapedHost}]`:n=l.host}s.push(n)}return(typeof l.port=="number"||typeof l.port=="string")&&(s.push(":"),s.push(String(l.port))),s.length?s.join(""):void 0}return zt={recomposeAuthority:$,normalizeComponentEncoding:w,removeDotSegments:P,normalizeIPv4:y,normalizeIPv6:o,stringArrayToHexStripped:i},zt}var Kt,Pr;function cs(){if(Pr)return Kt;Pr=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function y(t){return typeof t.secure=="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}function i(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function g(t){const a=String(t.scheme).toLowerCase()==="https";return(t.port===(a?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function o(t){return t.secure=y(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function h(t){if((t.port===(y(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){const[a,p]=t.resourceName.split("?");t.path=a&&a!=="/"?a:void 0,t.query=p,t.resourceName=void 0}return t.fragment=void 0,t}function u(t,a){if(!t.path)return t.error="URN can not be parsed",t;const p=t.path.match(r);if(p){const v=a.scheme||t.scheme||"urn";t.nid=p[1].toLowerCase(),t.nss=p[2];const m=`${v}:${a.nid||t.nid}`,E=n[m];t.path=void 0,E&&(t=E.parse(t,a))}else t.error=t.error||"URN can not be parsed.";return t}function d(t,a){const p=a.scheme||t.scheme||"urn",v=t.nid.toLowerCase(),m=`${p}:${a.nid||v}`,E=n[m];E&&(t=E.serialize(t,a));const T=t,k=t.nss;return T.path=`${v||a.nid}:${k}`,a.skipEscape=!0,T}function _(t,a){const p=t;return p.uuid=p.nss,p.nss=void 0,!a.tolerant&&(!p.uuid||!e.test(p.uuid))&&(p.error=p.error||"UUID is not valid."),p}function c(t){const a=t;return a.nss=(t.uuid||"").toLowerCase(),a}const b={scheme:"http",domainHost:!0,parse:i,serialize:g},P={scheme:"https",domainHost:b.domainHost,parse:i,serialize:g},w={scheme:"ws",domainHost:!0,parse:o,serialize:h},$={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},n={http:b,https:P,ws:w,wss:$,urn:{scheme:"urn",parse:u,serialize:d,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:_,serialize:c,skipNormalize:!0}};return Kt=n,Kt}var jr;function ls(){if(jr)return qe.exports;jr=1;const{normalizeIPv6:e,normalizeIPv4:r,removeDotSegments:y,recomposeAuthority:i,normalizeComponentEncoding:g}=us(),o=cs();function h(s,n){return typeof s=="string"?s=c($(s,n),n):typeof s=="object"&&(s=$(c(s,n),n)),s}function u(s,n,t){const a=Object.assign({scheme:"null"},t),p=d($(s,a),$(n,a),a,!0);return c(p,{...a,skipEscape:!0})}function d(s,n,t,a){const p={};return a||(s=$(c(s,t),t),n=$(c(n,t),t)),t=t||{},!t.tolerant&&n.scheme?(p.scheme=n.scheme,p.userinfo=n.userinfo,p.host=n.host,p.port=n.port,p.path=y(n.path||""),p.query=n.query):(n.userinfo!==void 0||n.host!==void 0||n.port!==void 0?(p.userinfo=n.userinfo,p.host=n.host,p.port=n.port,p.path=y(n.path||""),p.query=n.query):(n.path?(n.path.charAt(0)==="/"?p.path=y(n.path):((s.userinfo!==void 0||s.host!==void 0||s.port!==void 0)&&!s.path?p.path="/"+n.path:s.path?p.path=s.path.slice(0,s.path.lastIndexOf("/")+1)+n.path:p.path=n.path,p.path=y(p.path)),p.query=n.query):(p.path=s.path,n.query!==void 0?p.query=n.query:p.query=s.query),p.userinfo=s.userinfo,p.host=s.host,p.port=s.port),p.scheme=s.scheme),p.fragment=n.fragment,p}function _(s,n,t){return typeof s=="string"?(s=unescape(s),s=c(g($(s,t),!0),{...t,skipEscape:!0})):typeof s=="object"&&(s=c(g(s,!0),{...t,skipEscape:!0})),typeof n=="string"?(n=unescape(n),n=c(g($(n,t),!0),{...t,skipEscape:!0})):typeof n=="object"&&(n=c(g(n,!0),{...t,skipEscape:!0})),s.toLowerCase()===n.toLowerCase()}function c(s,n){const t={host:s.host,scheme:s.scheme,userinfo:s.userinfo,port:s.port,path:s.path,query:s.query,nid:s.nid,nss:s.nss,uuid:s.uuid,fragment:s.fragment,reference:s.reference,resourceName:s.resourceName,secure:s.secure,error:""},a=Object.assign({},n),p=[],v=o[(a.scheme||t.scheme||"").toLowerCase()];v&&v.serialize&&v.serialize(t,a),t.path!==void 0&&(a.skipEscape?t.path=unescape(t.path):(t.path=escape(t.path),t.scheme!==void 0&&(t.path=t.path.split("%3A").join(":")))),a.reference!=="suffix"&&t.scheme&&p.push(t.scheme,":");const m=i(t);if(m!==void 0&&(a.reference!=="suffix"&&p.push("//"),p.push(m),t.path&&t.path.charAt(0)!=="/"&&p.push("/")),t.path!==void 0){let E=t.path;!a.absolutePath&&(!v||!v.absolutePath)&&(E=y(E)),m===void 0&&(E=E.replace(/^\/\//u,"/%2F")),p.push(E)}return t.query!==void 0&&p.push("?",t.query),t.fragment!==void 0&&p.push("#",t.fragment),p.join("")}const b=Array.from({length:127},(s,n)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(n)));function P(s){let n=0;for(let t=0,a=s.length;t<a;++t)if(n=s.charCodeAt(t),n>126||b[n])return!0;return!1}const w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function $(s,n){const t=Object.assign({},n),a={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},p=s.indexOf("%")!==-1;let v=!1;t.reference==="suffix"&&(s=(t.scheme?t.scheme+":":"")+"//"+s);const m=s.match(w);if(m){if(a.scheme=m[1],a.userinfo=m[3],a.host=m[4],a.port=parseInt(m[5],10),a.path=m[6]||"",a.query=m[7],a.fragment=m[8],isNaN(a.port)&&(a.port=m[5]),a.host){const T=r(a.host);if(T.isIPV4===!1){const k=e(T.host);a.host=k.host.toLowerCase(),v=k.isIPV6}else a.host=T.host,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",t.reference&&t.reference!=="suffix"&&t.reference!==a.reference&&(a.error=a.error||"URI is not a "+t.reference+" reference.");const E=o[(t.scheme||a.scheme||"").toLowerCase()];if(!t.unicodeSupport&&(!E||!E.unicodeSupport)&&a.host&&(t.domainHost||E&&E.domainHost)&&v===!1&&P(a.host))try{a.host=URL.domainToASCII(a.host.toLowerCase())}catch(T){a.error=a.error||"Host's domain name can not be converted to ASCII: "+T}(!E||E&&!E.skipNormalize)&&(p&&a.scheme!==void 0&&(a.scheme=unescape(a.scheme)),p&&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)))),E&&E.parse&&E.parse(a,t)}else a.error=a.error||"URI can not be parsed.";return a}const l={SCHEMES:o,normalize:h,resolve:u,resolveComponents:d,equal:_,serialize:c,parse:$};return qe.exports=l,qe.exports.default=l,qe.exports.fastUri=l,qe.exports}var Rr;function ds(){if(Rr)return ze;Rr=1,Object.defineProperty(ze,"__esModule",{value:!0});const e=ls();return e.code='require("ajv/dist/runtime/uri").default',ze.default=e,ze}var Or;function fs(){return Or||(Or=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 r=Nt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var y=W();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});const i=Wt(),g=Tt(),o=Sn(),h=Bt(),u=W(),d=Ot(),_=Pt(),c=X(),b=os,P=ds(),w=(D,R)=>new RegExp(D,R);w.code="new RegExp";const $=["removeAdditional","useDefaults","coerceTypes"],l=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),s={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},n={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},t=200;function a(D){var R,C,N,f,S,I,U,F,Q,B,j,O,q,M,L,J,te,fe,ie,ue,re,Re,de,kt,It;const ke=D.strict,qt=(R=D.code)===null||R===void 0?void 0:R.optimize,Qt=qt===!0||qt===void 0?1:qt||0,Yt=(N=(C=D.code)===null||C===void 0?void 0:C.regExp)!==null&&N!==void 0?N:w,kn=(f=D.uriResolver)!==null&&f!==void 0?f:P.default;return{strictSchema:(I=(S=D.strictSchema)!==null&&S!==void 0?S:ke)!==null&&I!==void 0?I:!0,strictNumbers:(F=(U=D.strictNumbers)!==null&&U!==void 0?U:ke)!==null&&F!==void 0?F:!0,strictTypes:(B=(Q=D.strictTypes)!==null&&Q!==void 0?Q:ke)!==null&&B!==void 0?B:"log",strictTuples:(O=(j=D.strictTuples)!==null&&j!==void 0?j:ke)!==null&&O!==void 0?O:"log",strictRequired:(M=(q=D.strictRequired)!==null&&q!==void 0?q:ke)!==null&&M!==void 0?M:!1,code:D.code?{...D.code,optimize:Qt,regExp:Yt}:{optimize:Qt,regExp:Yt},loopRequired:(L=D.loopRequired)!==null&&L!==void 0?L:t,loopEnum:(J=D.loopEnum)!==null&&J!==void 0?J:t,meta:(te=D.meta)!==null&&te!==void 0?te:!0,messages:(fe=D.messages)!==null&&fe!==void 0?fe:!0,inlineRefs:(ie=D.inlineRefs)!==null&&ie!==void 0?ie:!0,schemaId:(ue=D.schemaId)!==null&&ue!==void 0?ue:"$id",addUsedSchema:(re=D.addUsedSchema)!==null&&re!==void 0?re:!0,validateSchema:(Re=D.validateSchema)!==null&&Re!==void 0?Re:!0,validateFormats:(de=D.validateFormats)!==null&&de!==void 0?de:!0,unicodeRegExp:(kt=D.unicodeRegExp)!==null&&kt!==void 0?kt:!0,int32range:(It=D.int32range)!==null&&It!==void 0?It:!0,uriResolver:kn}}class p{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:C,lines:N}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:l,es5:C,lines:N}),this.logger=K(R.logger);const f=R.validateFormats;R.validateFormats=!1,this.RULES=(0,o.getRules)(),v.call(this,s,R,"NOT SUPPORTED"),v.call(this,n,R,"DEPRECATED","warn"),this._metaOpts=A.call(this),R.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),R.keywords&&k.call(this,R.keywords),typeof R.meta=="object"&&this.addMetaSchema(R.meta),E.call(this),R.validateFormats=f}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:R,meta:C,schemaId:N}=this.opts;let f=b;N==="id"&&(f={...b},f.id=f.$id,delete f.$id),C&&R&&this.addMetaSchema(f,f[N],!1)}defaultMeta(){const{meta:R,schemaId:C}=this.opts;return this.opts.defaultMeta=typeof R=="object"?R[C]||R:void 0}validate(R,C){let N;if(typeof R=="string"){if(N=this.getSchema(R),!N)throw new Error(`no schema with key or ref "${R}"`)}else N=this.compile(R);const f=N(C);return"$async"in N||(this.errors=N.errors),f}compile(R,C){const N=this._addSchema(R,C);return N.validate||this._compileSchemaEnv(N)}compileAsync(R,C){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:N}=this.opts;return f.call(this,R,C);async function f(B,j){await S.call(this,B.$schema);const O=this._addSchema(B,j);return O.validate||I.call(this,O)}async function S(B){B&&!this.getSchema(B)&&await f.call(this,{$ref:B},!0)}async function I(B){try{return this._compileSchemaEnv(B)}catch(j){if(!(j instanceof g.default))throw j;return U.call(this,j),await F.call(this,j.missingSchema),I.call(this,B)}}function U({missingSchema:B,missingRef:j}){if(this.refs[B])throw new Error(`AnySchema ${B} is loaded but ${j} cannot be resolved`)}async function F(B){const j=await Q.call(this,B);this.refs[B]||await S.call(this,j.$schema),this.refs[B]||this.addSchema(j,B,C)}async function Q(B){const j=this._loading[B];if(j)return j;try{return await(this._loading[B]=N(B))}finally{delete this._loading[B]}}}addSchema(R,C,N,f=this.opts.validateSchema){if(Array.isArray(R)){for(const I of R)this.addSchema(I,void 0,N,f);return this}let S;if(typeof R=="object"){const{schemaId:I}=this.opts;if(S=R[I],S!==void 0&&typeof S!="string")throw new Error(`schema ${I} must be string`)}return C=(0,d.normalizeId)(C||S),this._checkUnique(C),this.schemas[C]=this._addSchema(R,N,C,f,!0),this}addMetaSchema(R,C,N=this.opts.validateSchema){return this.addSchema(R,C,!0,N),this}validateSchema(R,C){if(typeof R=="boolean")return!0;let N;if(N=R.$schema,N!==void 0&&typeof N!="string")throw new Error("$schema must be a string");if(N=N||this.opts.defaultMeta||this.defaultMeta(),!N)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const f=this.validate(N,R);if(!f&&C){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return f}getSchema(R){let C;for(;typeof(C=m.call(this,R))=="string";)R=C;if(C===void 0){const{schemaId:N}=this.opts,f=new h.SchemaEnv({schema:{},schemaId:N});if(C=h.resolveSchema.call(this,f,R),!C)return;this.refs[R]=C}return C.validate||this._compileSchemaEnv(C)}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 C=m.call(this,R);return typeof C=="object"&&this._cache.delete(C.schema),delete this.schemas[R],delete this.refs[R],this}case"object":{const C=R;this._cache.delete(C);let N=R[this.opts.schemaId];return N&&(N=(0,d.normalizeId)(N),delete this.schemas[N],delete this.refs[N]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(R){for(const C of R)this.addKeyword(C);return this}addKeyword(R,C){let N;if(typeof R=="string")N=R,typeof C=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),C.keyword=N);else if(typeof R=="object"&&C===void 0){if(C=R,N=C.keyword,Array.isArray(N)&&!N.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,N,C),!C)return(0,c.eachItem)(N,S=>Y.call(this,S)),this;le.call(this,C);const f={...C,type:(0,_.getJSONTypes)(C.type),schemaType:(0,_.getJSONTypes)(C.schemaType)};return(0,c.eachItem)(N,f.type.length===0?S=>Y.call(this,S,f):S=>f.type.forEach(I=>Y.call(this,S,f,I))),this}getKeyword(R){const C=this.RULES.all[R];return typeof C=="object"?C.definition:!!C}removeKeyword(R){const{RULES:C}=this;delete C.keywords[R],delete C.all[R];for(const N of C.rules){const f=N.rules.findIndex(S=>S.keyword===R);f>=0&&N.rules.splice(f,1)}return this}addFormat(R,C){return typeof C=="string"&&(C=new RegExp(C)),this.formats[R]=C,this}errorsText(R=this.errors,{separator:C=", ",dataVar:N="data"}={}){return!R||R.length===0?"No errors":R.map(f=>`${N}${f.instancePath} ${f.message}`).reduce((f,S)=>f+C+S)}$dataMetaSchema(R,C){const N=this.RULES.all;R=JSON.parse(JSON.stringify(R));for(const f of C){const S=f.split("/").slice(1);let I=R;for(const U of S)I=I[U];for(const U in N){const F=N[U];if(typeof F!="object")continue;const{$data:Q}=F.definition,B=I[U];Q&&B&&(I[U]=se(B))}}return R}_removeAllSchemas(R,C){for(const N in R){const f=R[N];(!C||C.test(N))&&(typeof f=="string"?delete R[N]:f&&!f.meta&&(this._cache.delete(f.schema),delete R[N]))}}_addSchema(R,C,N,f=this.opts.validateSchema,S=this.opts.addUsedSchema){let I;const{schemaId:U}=this.opts;if(typeof R=="object")I=R[U];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof R!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(R);if(F!==void 0)return F;N=(0,d.normalizeId)(I||N);const Q=d.getSchemaRefs.call(this,R,N);return F=new h.SchemaEnv({schema:R,schemaId:U,meta:C,baseId:N,localRefs:Q}),this._cache.set(F.schema,F),S&&!N.startsWith("#")&&(N&&this._checkUnique(N),this.refs[N]=F),f&&this.validateSchema(R,!0),F}_checkUnique(R){if(this.schemas[R]||this.refs[R])throw new Error(`schema with key or id "${R}" already exists`)}_compileSchemaEnv(R){if(R.meta?this._compileMetaSchema(R):h.compileSchema.call(this,R),!R.validate)throw new Error("ajv implementation error");return R.validate}_compileMetaSchema(R){const C=this.opts;this.opts=this._metaOpts;try{h.compileSchema.call(this,R)}finally{this.opts=C}}}p.ValidationError=i.default,p.MissingRefError=g.default,e.default=p;function v(D,R,C,N="error"){for(const f in D){const S=f;S in R&&this.logger[N](`${C}: option ${f}. ${D[S]}`)}}function m(D){return D=(0,d.normalizeId)(D),this.schemas[D]||this.refs[D]}function E(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const R in D)this.addSchema(D[R],R)}function T(){for(const D in this.opts.formats){const R=this.opts.formats[D];R&&this.addFormat(D,R)}}function k(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const R in D){const C=D[R];C.keyword||(C.keyword=R),this.addKeyword(C)}}function A(){const D={...this.opts};for(const R of $)delete D[R];return D}const V={log(){},warn(){},error(){}};function K(D){if(D===!1)return V;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function G(D,R){const{RULES:C}=this;if((0,c.eachItem)(D,N=>{if(C.keywords[N])throw new Error(`Keyword ${N} is already defined`);if(!z.test(N))throw new Error(`Keyword ${N} has invalid name`)}),!!R&&R.$data&&!("code"in R||"validate"in R))throw new Error('$data keyword must have "code" or "validate" function')}function Y(D,R,C){var N;const f=R?.post;if(C&&f)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let I=f?S.post:S.rules.find(({type:F})=>F===C);if(I||(I={type:C,rules:[]},S.rules.push(I)),S.keywords[D]=!0,!R)return;const U={keyword:D,definition:{...R,type:(0,_.getJSONTypes)(R.type),schemaType:(0,_.getJSONTypes)(R.schemaType)}};R.before?ee.call(this,I,U,R.before):I.rules.push(U),S.all[D]=U,(N=R.implements)===null||N===void 0||N.forEach(F=>this.addKeyword(F))}function ee(D,R,C){const N=D.rules.findIndex(f=>f.keyword===C);N>=0?D.rules.splice(N,0,R):(D.rules.push(R),this.logger.warn(`rule ${C} is not defined`))}function le(D){let{metaSchema:R}=D;R!==void 0&&(D.$data&&this.opts.$data&&(R=se(R)),D.validateSchema=this.compile(R,!0))}const Z={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(D){return{anyOf:[D,Z]}}})(Ct)),Ct}var Ke={},He={},Ge={},Nr;function hs(){if(Nr)return Ge;Nr=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Ge.default=e,Ge}var $e={},Tr;function ps(){if(Tr)return $e;Tr=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.callRef=$e.getValidate=void 0;const e=Tt(),r=pe(),y=W(),i=be(),g=Bt(),o=X(),h={keyword:"$ref",schemaType:"string",code(_){const{gen:c,schema:b,it:P}=_,{baseId:w,schemaEnv:$,validateName:l,opts:s,self:n}=P,{root:t}=$;if((b==="#"||b==="#/")&&w===t.baseId)return p();const a=g.resolveRef.call(n,t,w,b);if(a===void 0)throw new e.default(P.opts.uriResolver,w,b);if(a instanceof g.SchemaEnv)return v(a);return m(a);function p(){if($===t)return d(_,l,$,$.$async);const E=c.scopeValue("root",{ref:t});return d(_,(0,y._)`${E}.validate`,t,t.$async)}function v(E){const T=u(_,E);d(_,T,E,E.$async)}function m(E){const T=c.scopeValue("schema",s.code.source===!0?{ref:E,code:(0,y.stringify)(E)}:{ref:E}),k=c.name("valid"),A=_.subschema({schema:E,dataTypes:[],schemaPath:y.nil,topSchemaRef:T,errSchemaPath:b},k);_.mergeEvaluated(A),_.ok(k)}}};function u(_,c){const{gen:b}=_;return c.validate?b.scopeValue("validate",{ref:c.validate}):(0,y._)`${b.scopeValue("wrapper",{ref:c})}.validate`}$e.getValidate=u;function d(_,c,b,P){const{gen:w,it:$}=_,{allErrors:l,schemaEnv:s,opts:n}=$,t=n.passContext?i.default.this:y.nil;P?a():p();function a(){if(!s.$async)throw new Error("async schema referenced by sync schema");const E=w.let("valid");w.try(()=>{w.code((0,y._)`await ${(0,r.callValidateCode)(_,c,t)}`),m(c),l||w.assign(E,!0)},T=>{w.if((0,y._)`!(${T} instanceof ${$.ValidationError})`,()=>w.throw(T)),v(T),l||w.assign(E,!1)}),_.ok(E)}function p(){_.result((0,r.callValidateCode)(_,c,t),()=>m(c),()=>v(c))}function v(E){const T=(0,y._)`${E}.errors`;w.assign(i.default.vErrors,(0,y._)`${i.default.vErrors} === null ? ${T} : ${i.default.vErrors}.concat(${T})`),w.assign(i.default.errors,(0,y._)`${i.default.vErrors}.length`)}function m(E){var T;if(!$.opts.unevaluated)return;const k=(T=b?.validate)===null||T===void 0?void 0:T.evaluated;if($.props!==!0)if(k&&!k.dynamicProps)k.props!==void 0&&($.props=o.mergeEvaluated.props(w,k.props,$.props));else{const A=w.var("props",(0,y._)`${E}.evaluated.props`);$.props=o.mergeEvaluated.props(w,A,$.props,y.Name)}if($.items!==!0)if(k&&!k.dynamicItems)k.items!==void 0&&($.items=o.mergeEvaluated.items(w,k.items,$.items));else{const A=w.var("items",(0,y._)`${E}.evaluated.items`);$.items=o.mergeEvaluated.items(w,A,$.items,y.Name)}}}return $e.callRef=d,$e.default=h,$e}var kr;function ms(){if(kr)return He;kr=1,Object.defineProperty(He,"__esModule",{value:!0});const e=hs(),r=ps(),y=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];return He.default=y,He}var Je={},We={},Ir;function ys(){if(Ir)return We;Ir=1,Object.defineProperty(We,"__esModule",{value:!0});const e=W(),r=e.operators,y={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},i={message:({keyword:o,schemaCode:h})=>(0,e.str)`must be ${y[o].okStr} ${h}`,params:({keyword:o,schemaCode:h})=>(0,e._)`{comparison: ${y[o].okStr}, limit: ${h}}`},g={keyword:Object.keys(y),type:"number",schemaType:"number",$data:!0,error:i,code(o){const{keyword:h,data:u,schemaCode:d}=o;o.fail$data((0,e._)`${u} ${y[h].fail} ${d} || isNaN(${u})`)}};return We.default=g,We}var Be={},qr;function vs(){if(qr)return Be;qr=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=W(),y={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:g,data:o,schemaCode:h,it:u}=i,d=u.opts.multipleOfPrecision,_=g.let("res"),c=d?(0,e._)`Math.abs(Math.round(${_}) - ${_}) > 1e-${d}`:(0,e._)`${_} !== parseInt(${_})`;i.fail$data((0,e._)`(${h} === 0 || (${_} = ${o}/${h}, ${c}))`)}};return Be.default=y,Be}var Xe={},Qe={},Cr;function gs(){if(Cr)return Qe;Cr=1,Object.defineProperty(Qe,"__esModule",{value:!0});function e(r){const y=r.length;let i=0,g=0,o;for(;g<y;)i++,o=r.charCodeAt(g++),o>=55296&&o<=56319&&g<y&&(o=r.charCodeAt(g),(o&64512)===56320&&g++);return i}return Qe.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Qe}var Dr;function _s(){if(Dr)return Xe;Dr=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=W(),r=X(),y=gs(),g={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:h}){const u=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${h} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:h,data:u,schemaCode:d,it:_}=o,c=h==="maxLength"?e.operators.GT:e.operators.LT,b=_.opts.unicode===!1?(0,e._)`${u}.length`:(0,e._)`${(0,r.useFunc)(o.gen,y.default)}(${u})`;o.fail$data((0,e._)`${b} ${c} ${d}`)}};return Xe.default=g,Xe}var Ye={},Mr;function $s(){if(Mr)return Ye;Mr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=pe(),r=W(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:g})=>(0,r.str)`must match pattern "${g}"`,params:({schemaCode:g})=>(0,r._)`{pattern: ${g}}`},code(g){const{data:o,$data:h,schema:u,schemaCode:d,it:_}=g,c=_.opts.unicodeRegExp?"u":"",b=h?(0,r._)`(new RegExp(${d}, ${c}))`:(0,e.usePattern)(g,u);g.fail$data((0,r._)`!${b}.test(${o})`)}};return Ye.default=i,Ye}var Ze={},Ar;function ws(){if(Ar)return Ze;Ar=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=W(),y={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:g}){const o=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${g} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:g,data:o,schemaCode:h}=i,u=g==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${o}).length ${u} ${h}`)}};return Ze.default=y,Ze}var xe={},Vr;function bs(){if(Vr)return xe;Vr=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=pe(),r=W(),y=X(),g={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,r.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,r._)`{missingProperty: ${o}}`},code(o){const{gen:h,schema:u,schemaCode:d,data:_,$data:c,it:b}=o,{opts:P}=b;if(!c&&u.length===0)return;const w=u.length>=P.loopRequired;if(b.allErrors?$():l(),P.strictRequired){const t=o.parentSchema.properties,{definedProperties:a}=o.it;for(const p of u)if(t?.[p]===void 0&&!a.has(p)){const v=b.schemaEnv.baseId+b.errSchemaPath,m=`required property "${p}" is not defined at "${v}" (strictRequired)`;(0,y.checkStrictMode)(b,m,b.opts.strictRequired)}}function $(){if(w||c)o.block$data(r.nil,s);else for(const t of u)(0,e.checkReportMissingProp)(o,t)}function l(){const t=h.let("missing");if(w||c){const a=h.let("valid",!0);o.block$data(a,()=>n(t,a)),o.ok(a)}else h.if((0,e.checkMissingProp)(o,u,t)),(0,e.reportMissingProp)(o,t),h.else()}function s(){h.forOf("prop",d,t=>{o.setParams({missingProperty:t}),h.if((0,e.noPropertyInData)(h,_,t,P.ownProperties),()=>o.error())})}function n(t,a){o.setParams({missingProperty:t}),h.forOf(t,d,()=>{h.assign(a,(0,e.propertyInData)(h,_,t,P.ownProperties)),h.if((0,r.not)(a),()=>{o.error(),h.break()})},r.nil)}}};return xe.default=g,xe}var et={},Ur;function Es(){if(Ur)return et;Ur=1,Object.defineProperty(et,"__esModule",{value:!0});const e=W(),y={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:g}){const o=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${g} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:g,data:o,schemaCode:h}=i,u=g==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${o}.length ${u} ${h}`)}};return et.default=y,et}var tt={},rt={},Lr;function Xt(){if(Lr)return rt;Lr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=jn();return e.code='require("ajv/dist/runtime/equal").default',rt.default=e,rt}var Fr;function Ss(){if(Fr)return tt;Fr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=Pt(),r=W(),y=X(),i=Xt(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:h,j:u}})=>(0,r.str)`must NOT have duplicate items (items ## ${u} and ${h} are identical)`,params:({params:{i:h,j:u}})=>(0,r._)`{i: ${h}, j: ${u}}`},code(h){const{gen:u,data:d,$data:_,schema:c,parentSchema:b,schemaCode:P,it:w}=h;if(!_&&!c)return;const $=u.let("valid"),l=b.items?(0,e.getSchemaTypes)(b.items):[];h.block$data($,s,(0,r._)`${P} === false`),h.ok($);function s(){const p=u.let("i",(0,r._)`${d}.length`),v=u.let("j");h.setParams({i:p,j:v}),u.assign($,!0),u.if((0,r._)`${p} > 1`,()=>(n()?t:a)(p,v))}function n(){return l.length>0&&!l.some(p=>p==="object"||p==="array")}function t(p,v){const m=u.name("item"),E=(0,e.checkDataTypes)(l,m,w.opts.strictNumbers,e.DataType.Wrong),T=u.const("indices",(0,r._)`{}`);u.for((0,r._)`;${p}--;`,()=>{u.let(m,(0,r._)`${d}[${p}]`),u.if(E,(0,r._)`continue`),l.length>1&&u.if((0,r._)`typeof ${m} == "string"`,(0,r._)`${m} += "_"`),u.if((0,r._)`typeof ${T}[${m}] == "number"`,()=>{u.assign(v,(0,r._)`${T}[${m}]`),h.error(),u.assign($,!1).break()}).code((0,r._)`${T}[${m}] = ${p}`)})}function a(p,v){const m=(0,y.useFunc)(u,i.default),E=u.name("outer");u.label(E).for((0,r._)`;${p}--;`,()=>u.for((0,r._)`${v} = ${p}; ${v}--;`,()=>u.if((0,r._)`${m}(${d}[${p}], ${d}[${v}])`,()=>{h.error(),u.assign($,!1).break(E)})))}}};return tt.default=o,tt}var nt={},zr;function Ps(){if(zr)return nt;zr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=W(),r=X(),y=Xt(),g={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:h,data:u,$data:d,schemaCode:_,schema:c}=o;d||c&&typeof c=="object"?o.fail$data((0,e._)`!${(0,r.useFunc)(h,y.default)}(${u}, ${_})`):o.fail((0,e._)`${c} !== ${u}`)}};return nt.default=g,nt}var st={},Kr;function js(){if(Kr)return st;Kr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=W(),r=X(),y=Xt(),g={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:h,data:u,$data:d,schema:_,schemaCode:c,it:b}=o;if(!d&&_.length===0)throw new Error("enum must have non-empty array");const P=_.length>=b.opts.loopEnum;let w;const $=()=>w??(w=(0,r.useFunc)(h,y.default));let l;if(P||d)l=h.let("valid"),o.block$data(l,s);else{if(!Array.isArray(_))throw new Error("ajv implementation error");const t=h.const("vSchema",c);l=(0,e.or)(..._.map((a,p)=>n(t,p)))}o.pass(l);function s(){h.assign(l,!1),h.forOf("v",c,t=>h.if((0,e._)`${$()}(${u}, ${t})`,()=>h.assign(l,!0).break()))}function n(t,a){const p=_[a];return typeof p=="object"&&p!==null?(0,e._)`${$()}(${u}, ${t}[${a}])`:(0,e._)`${u} === ${p}`}}};return st.default=g,st}var Hr;function Rs(){if(Hr)return Je;Hr=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=ys(),r=vs(),y=_s(),i=$s(),g=ws(),o=bs(),h=Es(),u=Ss(),d=Ps(),_=js(),c=[e.default,r.default,y.default,i.default,g.default,o.default,h.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,_.default];return Je.default=c,Je}var at={},Oe={},Gr;function Rn(){if(Gr)return Oe;Gr=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.validateAdditionalItems=void 0;const e=W(),r=X(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:h,it:u}=o,{items:d}=h;if(!Array.isArray(d)){(0,r.checkStrictMode)(u,'"additionalItems" is ignored when "items" is not an array of schemas');return}g(o,d)}};function g(o,h){const{gen:u,schema:d,data:_,keyword:c,it:b}=o;b.items=!0;const P=u.const("len",(0,e._)`${_}.length`);if(d===!1)o.setParams({len:h.length}),o.pass((0,e._)`${P} <= ${h.length}`);else if(typeof d=="object"&&!(0,r.alwaysValidSchema)(b,d)){const $=u.var("valid",(0,e._)`${P} <= ${h.length}`);u.if((0,e.not)($),()=>w($)),o.ok($)}function w($){u.forRange("i",h.length,P,l=>{o.subschema({keyword:c,dataProp:l,dataPropType:r.Type.Num},$),b.allErrors||u.if((0,e.not)($),()=>u.break())})}}return Oe.validateAdditionalItems=g,Oe.default=i,Oe}var ot={},Ne={},Jr;function On(){if(Jr)return Ne;Jr=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.validateTuple=void 0;const e=W(),r=X(),y=pe(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:h,it:u}=o;if(Array.isArray(h))return g(o,"additionalItems",h);u.items=!0,!(0,r.alwaysValidSchema)(u,h)&&o.ok((0,y.validateArray)(o))}};function g(o,h,u=o.schema){const{gen:d,parentSchema:_,data:c,keyword:b,it:P}=o;l(_),P.opts.unevaluated&&u.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(d,u.length,P.items));const w=d.name("valid"),$=d.const("len",(0,e._)`${c}.length`);u.forEach((s,n)=>{(0,r.alwaysValidSchema)(P,s)||(d.if((0,e._)`${$} > ${n}`,()=>o.subschema({keyword:b,schemaProp:n,dataProp:n},w)),o.ok(w))});function l(s){const{opts:n,errSchemaPath:t}=P,a=u.length,p=a===s.minItems&&(a===s.maxItems||s[h]===!1);if(n.strictTuples&&!p){const v=`"${b}" is ${a}-tuple, but minItems or maxItems/${h} are not specified or different at path "${t}"`;(0,r.checkStrictMode)(P,v,n.strictTuples)}}}return Ne.validateTuple=g,Ne.default=i,Ne}var Wr;function Os(){if(Wr)return ot;Wr=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=On(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:y=>(0,e.validateTuple)(y,"items")};return ot.default=r,ot}var it={},Br;function Ns(){if(Br)return it;Br=1,Object.defineProperty(it,"__esModule",{value:!0});const e=W(),r=X(),y=pe(),i=Rn(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:h}})=>(0,e.str)`must NOT have more than ${h} items`,params:({params:{len:h}})=>(0,e._)`{limit: ${h}}`},code(h){const{schema:u,parentSchema:d,it:_}=h,{prefixItems:c}=d;_.items=!0,!(0,r.alwaysValidSchema)(_,u)&&(c?(0,i.validateAdditionalItems)(h,c):h.ok((0,y.validateArray)(h)))}};return it.default=o,it}var ut={},Xr;function Ts(){if(Xr)return ut;Xr=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=W(),r=X(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:g,max:o}})=>o===void 0?(0,e.str)`must contain at least ${g} valid item(s)`:(0,e.str)`must contain at least ${g} and no more than ${o} valid item(s)`,params:({params:{min:g,max:o}})=>o===void 0?(0,e._)`{minContains: ${g}}`:(0,e._)`{minContains: ${g}, maxContains: ${o}}`},code(g){const{gen:o,schema:h,parentSchema:u,data:d,it:_}=g;let c,b;const{minContains:P,maxContains:w}=u;_.opts.next?(c=P===void 0?1:P,b=w):c=1;const $=o.const("len",(0,e._)`${d}.length`);if(g.setParams({min:c,max:b}),b===void 0&&c===0){(0,r.checkStrictMode)(_,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(b!==void 0&&c>b){(0,r.checkStrictMode)(_,'"minContains" > "maxContains" is always invalid'),g.fail();return}if((0,r.alwaysValidSchema)(_,h)){let a=(0,e._)`${$} >= ${c}`;b!==void 0&&(a=(0,e._)`${a} && ${$} <= ${b}`),g.pass(a);return}_.items=!0;const l=o.name("valid");b===void 0&&c===1?n(l,()=>o.if(l,()=>o.break())):c===0?(o.let(l,!0),b!==void 0&&o.if((0,e._)`${d}.length > 0`,s)):(o.let(l,!1),s()),g.result(l,()=>g.reset());function s(){const a=o.name("_valid"),p=o.let("count",0);n(a,()=>o.if(a,()=>t(p)))}function n(a,p){o.forRange("i",0,$,v=>{g.subschema({keyword:"contains",dataProp:v,dataPropType:r.Type.Num,compositeRule:!0},a),p()})}function t(a){o.code((0,e._)`${a}++`),b===void 0?o.if((0,e._)`${a} >= ${c}`,()=>o.assign(l,!0).break()):(o.if((0,e._)`${a} > ${b}`,()=>o.assign(l,!1).break()),c===1?o.assign(l,!0):o.if((0,e._)`${a} >= ${c}`,()=>o.assign(l,!0)))}}};return ut.default=i,ut}var Ht={},Qr;function ks(){return Qr||(Qr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const r=W(),y=X(),i=pe();e.error={message:({params:{property:d,depsCount:_,deps:c}})=>{const b=_===1?"property":"properties";return(0,r.str)`must have ${b} ${c} when property ${d} is present`},params:({params:{property:d,depsCount:_,deps:c,missingProperty:b}})=>(0,r._)`{property: ${d},
6
+ missingProperty: ${b},
7
+ depsCount: ${_},
8
+ deps: ${c}}`};const g={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[_,c]=o(d);h(d,_),u(d,c)}};function o({schema:d}){const _={},c={};for(const b in d){if(b==="__proto__")continue;const P=Array.isArray(d[b])?_:c;P[b]=d[b]}return[_,c]}function h(d,_=d.schema){const{gen:c,data:b,it:P}=d;if(Object.keys(_).length===0)return;const w=c.let("missing");for(const $ in _){const l=_[$];if(l.length===0)continue;const s=(0,i.propertyInData)(c,b,$,P.opts.ownProperties);d.setParams({property:$,depsCount:l.length,deps:l.join(", ")}),P.allErrors?c.if(s,()=>{for(const n of l)(0,i.checkReportMissingProp)(d,n)}):(c.if((0,r._)`${s} && (${(0,i.checkMissingProp)(d,l,w)})`),(0,i.reportMissingProp)(d,w),c.else())}}e.validatePropertyDeps=h;function u(d,_=d.schema){const{gen:c,data:b,keyword:P,it:w}=d,$=c.name("valid");for(const l in _)(0,y.alwaysValidSchema)(w,_[l])||(c.if((0,i.propertyInData)(c,b,l,w.opts.ownProperties),()=>{const s=d.subschema({keyword:P,schemaProp:l},$);d.mergeValidEvaluated(s,$)},()=>c.var($,!0)),d.ok($))}e.validateSchemaDeps=u,e.default=g})(Ht)),Ht}var ct={},Yr;function Is(){if(Yr)return ct;Yr=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=W(),r=X(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:g})=>(0,e._)`{propertyName: ${g.propertyName}}`},code(g){const{gen:o,schema:h,data:u,it:d}=g;if((0,r.alwaysValidSchema)(d,h))return;const _=o.name("valid");o.forIn("key",u,c=>{g.setParams({propertyName:c}),g.subschema({keyword:"propertyNames",data:c,dataTypes:["string"],propertyName:c,compositeRule:!0},_),o.if((0,e.not)(_),()=>{g.error(!0),d.allErrors||o.break()})}),g.ok(_)}};return ct.default=i,ct}var lt={},Zr;function Nn(){if(Zr)return lt;Zr=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=pe(),r=W(),y=be(),i=X(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:h})=>(0,r._)`{additionalProperty: ${h.additionalProperty}}`},code(h){const{gen:u,schema:d,parentSchema:_,data:c,errsCount:b,it:P}=h;if(!b)throw new Error("ajv implementation error");const{allErrors:w,opts:$}=P;if(P.props=!0,$.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(P,d))return;const l=(0,e.allSchemaProperties)(_.properties),s=(0,e.allSchemaProperties)(_.patternProperties);n(),h.ok((0,r._)`${b} === ${y.default.errors}`);function n(){u.forIn("key",c,m=>{!l.length&&!s.length?p(m):u.if(t(m),()=>p(m))})}function t(m){let E;if(l.length>8){const T=(0,i.schemaRefOrVal)(P,_.properties,"properties");E=(0,e.isOwnProperty)(u,T,m)}else l.length?E=(0,r.or)(...l.map(T=>(0,r._)`${m} === ${T}`)):E=r.nil;return s.length&&(E=(0,r.or)(E,...s.map(T=>(0,r._)`${(0,e.usePattern)(h,T)}.test(${m})`))),(0,r.not)(E)}function a(m){u.code((0,r._)`delete ${c}[${m}]`)}function p(m){if($.removeAdditional==="all"||$.removeAdditional&&d===!1){a(m);return}if(d===!1){h.setParams({additionalProperty:m}),h.error(),w||u.break();return}if(typeof d=="object"&&!(0,i.alwaysValidSchema)(P,d)){const E=u.name("valid");$.removeAdditional==="failing"?(v(m,E,!1),u.if((0,r.not)(E),()=>{h.reset(),a(m)})):(v(m,E),w||u.if((0,r.not)(E),()=>u.break()))}}function v(m,E,T){const k={keyword:"additionalProperties",dataProp:m,dataPropType:i.Type.Str};T===!1&&Object.assign(k,{compositeRule:!0,createErrors:!1,allErrors:!1}),h.subschema(k,E)}}};return lt.default=o,lt}var dt={},xr;function qs(){if(xr)return dt;xr=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=Nt(),r=pe(),y=X(),i=Nn(),g={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:h,schema:u,parentSchema:d,data:_,it:c}=o;c.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(c,i.default,"additionalProperties"));const b=(0,r.allSchemaProperties)(u);for(const s of b)c.definedProperties.add(s);c.opts.unevaluated&&b.length&&c.props!==!0&&(c.props=y.mergeEvaluated.props(h,(0,y.toHash)(b),c.props));const P=b.filter(s=>!(0,y.alwaysValidSchema)(c,u[s]));if(P.length===0)return;const w=h.name("valid");for(const s of P)$(s)?l(s):(h.if((0,r.propertyInData)(h,_,s,c.opts.ownProperties)),l(s),c.allErrors||h.else().var(w,!0),h.endIf()),o.it.definedProperties.add(s),o.ok(w);function $(s){return c.opts.useDefaults&&!c.compositeRule&&u[s].default!==void 0}function l(s){o.subschema({keyword:"properties",schemaProp:s,dataProp:s},w)}}};return dt.default=g,dt}var ft={},en;function Cs(){if(en)return ft;en=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=pe(),r=W(),y=X(),i=X(),g={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:h,schema:u,data:d,parentSchema:_,it:c}=o,{opts:b}=c,P=(0,e.allSchemaProperties)(u),w=P.filter(p=>(0,y.alwaysValidSchema)(c,u[p]));if(P.length===0||w.length===P.length&&(!c.opts.unevaluated||c.props===!0))return;const $=b.strictSchema&&!b.allowMatchingProperties&&_.properties,l=h.name("valid");c.props!==!0&&!(c.props instanceof r.Name)&&(c.props=(0,i.evaluatedPropsToName)(h,c.props));const{props:s}=c;n();function n(){for(const p of P)$&&t(p),c.allErrors?a(p):(h.var(l,!0),a(p),h.if(l))}function t(p){for(const v in $)new RegExp(p).test(v)&&(0,y.checkStrictMode)(c,`property ${v} matches pattern ${p} (use allowMatchingProperties)`)}function a(p){h.forIn("key",d,v=>{h.if((0,r._)`${(0,e.usePattern)(o,p)}.test(${v})`,()=>{const m=w.includes(p);m||o.subschema({keyword:"patternProperties",schemaProp:p,dataProp:v,dataPropType:i.Type.Str},l),c.opts.unevaluated&&s!==!0?h.assign((0,r._)`${s}[${v}]`,!0):!m&&!c.allErrors&&h.if((0,r.not)(l),()=>h.break())})})}}};return ft.default=g,ft}var ht={},tn;function Ds(){if(tn)return ht;tn=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=X(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(y){const{gen:i,schema:g,it:o}=y;if((0,e.alwaysValidSchema)(o,g)){y.fail();return}const h=i.name("valid");y.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},h),y.failResult(h,()=>y.reset(),()=>y.error())},error:{message:"must NOT be valid"}};return ht.default=r,ht}var pt={},rn;function Ms(){if(rn)return pt;rn=1,Object.defineProperty(pt,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:pe().validateUnion,error:{message:"must match a schema in anyOf"}};return pt.default=r,pt}var mt={},nn;function As(){if(nn)return mt;nn=1,Object.defineProperty(mt,"__esModule",{value:!0});const e=W(),r=X(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:g})=>(0,e._)`{passingSchemas: ${g.passing}}`},code(g){const{gen:o,schema:h,parentSchema:u,it:d}=g;if(!Array.isArray(h))throw new Error("ajv implementation error");if(d.opts.discriminator&&u.discriminator)return;const _=h,c=o.let("valid",!1),b=o.let("passing",null),P=o.name("_valid");g.setParams({passing:b}),o.block(w),g.result(c,()=>g.reset(),()=>g.error(!0));function w(){_.forEach(($,l)=>{let s;(0,r.alwaysValidSchema)(d,$)?o.var(P,!0):s=g.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},P),l>0&&o.if((0,e._)`${P} && ${c}`).assign(c,!1).assign(b,(0,e._)`[${b}, ${l}]`).else(),o.if(P,()=>{o.assign(c,!0),o.assign(b,l),s&&g.mergeEvaluated(s,e.Name)})})}}};return mt.default=i,mt}var yt={},sn;function Vs(){if(sn)return yt;sn=1,Object.defineProperty(yt,"__esModule",{value:!0});const e=X(),r={keyword:"allOf",schemaType:"array",code(y){const{gen:i,schema:g,it:o}=y;if(!Array.isArray(g))throw new Error("ajv implementation error");const h=i.name("valid");g.forEach((u,d)=>{if((0,e.alwaysValidSchema)(o,u))return;const _=y.subschema({keyword:"allOf",schemaProp:d},h);y.ok(h),y.mergeEvaluated(_)})}};return yt.default=r,yt}var vt={},an;function Us(){if(an)return vt;an=1,Object.defineProperty(vt,"__esModule",{value:!0});const e=W(),r=X(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:h,parentSchema:u,it:d}=o;u.then===void 0&&u.else===void 0&&(0,r.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const _=g(d,"then"),c=g(d,"else");if(!_&&!c)return;const b=h.let("valid",!0),P=h.name("_valid");if(w(),o.reset(),_&&c){const l=h.let("ifClause");o.setParams({ifClause:l}),h.if(P,$("then",l),$("else",l))}else _?h.if(P,$("then")):h.if((0,e.not)(P),$("else"));o.pass(b,()=>o.error(!0));function w(){const l=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);o.mergeEvaluated(l)}function $(l,s){return()=>{const n=o.subschema({keyword:l},P);h.assign(b,P),o.mergeValidEvaluated(n,b),s?h.assign(s,(0,e._)`${l}`):o.setParams({ifClause:l})}}}};function g(o,h){const u=o.schema[h];return u!==void 0&&!(0,r.alwaysValidSchema)(o,u)}return vt.default=i,vt}var gt={},on;function Ls(){if(on)return gt;on=1,Object.defineProperty(gt,"__esModule",{value:!0});const e=X(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:y,parentSchema:i,it:g}){i.if===void 0&&(0,e.checkStrictMode)(g,`"${y}" without "if" is ignored`)}};return gt.default=r,gt}var un;function Fs(){if(un)return at;un=1,Object.defineProperty(at,"__esModule",{value:!0});const e=Rn(),r=Os(),y=On(),i=Ns(),g=Ts(),o=ks(),h=Is(),u=Nn(),d=qs(),_=Cs(),c=Ds(),b=Ms(),P=As(),w=Vs(),$=Us(),l=Ls();function s(n=!1){const t=[c.default,b.default,P.default,w.default,$.default,l.default,h.default,u.default,o.default,d.default,_.default];return n?t.push(r.default,i.default):t.push(e.default,y.default),t.push(g.default),t}return at.default=s,at}var _t={},$t={},cn;function zs(){if(cn)return $t;cn=1,Object.defineProperty($t,"__esModule",{value:!0});const e=W(),y={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,g){const{gen:o,data:h,$data:u,schema:d,schemaCode:_,it:c}=i,{opts:b,errSchemaPath:P,schemaEnv:w,self:$}=c;if(!b.validateFormats)return;u?l():s();function l(){const n=o.scopeValue("formats",{ref:$.formats,code:b.code.formats}),t=o.const("fDef",(0,e._)`${n}[${_}]`),a=o.let("fType"),p=o.let("format");o.if((0,e._)`typeof ${t} == "object" && !(${t} instanceof RegExp)`,()=>o.assign(a,(0,e._)`${t}.type || "string"`).assign(p,(0,e._)`${t}.validate`),()=>o.assign(a,(0,e._)`"string"`).assign(p,t)),i.fail$data((0,e.or)(v(),m()));function v(){return b.strictSchema===!1?e.nil:(0,e._)`${_} && !${p}`}function m(){const E=w.$async?(0,e._)`(${t}.async ? await ${p}(${h}) : ${p}(${h}))`:(0,e._)`${p}(${h})`,T=(0,e._)`(typeof ${p} == "function" ? ${E} : ${p}.test(${h}))`;return(0,e._)`${p} && ${p} !== true && ${a} === ${g} && !${T}`}}function s(){const n=$.formats[d];if(!n){v();return}if(n===!0)return;const[t,a,p]=m(n);t===g&&i.pass(E());function v(){if(b.strictSchema===!1){$.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${d}" ignored in schema at path "${P}"`}}function m(T){const k=T instanceof RegExp?(0,e.regexpCode)(T):b.code.formats?(0,e._)`${b.code.formats}${(0,e.getProperty)(d)}`:void 0,A=o.scopeValue("formats",{key:d,ref:T,code:k});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,e._)`${A}.validate`]:["string",T,A]}function E(){if(typeof n=="object"&&!(n instanceof RegExp)&&n.async){if(!w.$async)throw new Error("async format in sync schema");return(0,e._)`await ${p}(${h})`}return typeof a=="function"?(0,e._)`${p}(${h})`:(0,e._)`${p}.test(${h})`}}}};return $t.default=y,$t}var ln;function Ks(){if(ln)return _t;ln=1,Object.defineProperty(_t,"__esModule",{value:!0});const r=[zs().default];return _t.default=r,_t}var Pe={},dn;function Hs(){return dn||(dn=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.contentVocabulary=Pe.metadataVocabulary=void 0,Pe.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Pe.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Pe}var fn;function Gs(){if(fn)return Ke;fn=1,Object.defineProperty(Ke,"__esModule",{value:!0});const e=ms(),r=Rs(),y=Fs(),i=Ks(),g=Hs(),o=[e.default,r.default,(0,y.default)(),i.default,g.metadataVocabulary,g.contentVocabulary];return Ke.default=o,Ke}var wt={},Ce={},hn;function Js(){if(hn)return Ce;hn=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.DiscrError=void 0;var e;return(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(Ce.DiscrError=e={})),Ce}var pn;function Ws(){if(pn)return wt;pn=1,Object.defineProperty(wt,"__esModule",{value:!0});const e=W(),r=Js(),y=Bt(),i=Tt(),g=X(),h={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:u,tagName:d}})=>u===r.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:u,tag:d,tagName:_}})=>(0,e._)`{error: ${u}, tag: ${_}, tagValue: ${d}}`},code(u){const{gen:d,data:_,schema:c,parentSchema:b,it:P}=u,{oneOf:w}=b;if(!P.opts.discriminator)throw new Error("discriminator: requires discriminator option");const $=c.propertyName;if(typeof $!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!w)throw new Error("discriminator: requires oneOf keyword");const l=d.let("valid",!1),s=d.const("tag",(0,e._)`${_}${(0,e.getProperty)($)}`);d.if((0,e._)`typeof ${s} == "string"`,()=>n(),()=>u.error(!1,{discrError:r.DiscrError.Tag,tag:s,tagName:$})),u.ok(l);function n(){const p=a();d.if(!1);for(const v in p)d.elseIf((0,e._)`${s} === ${v}`),d.assign(l,t(p[v]));d.else(),u.error(!1,{discrError:r.DiscrError.Mapping,tag:s,tagName:$}),d.endIf()}function t(p){const v=d.name("valid"),m=u.subschema({keyword:"oneOf",schemaProp:p},v);return u.mergeEvaluated(m,e.Name),v}function a(){var p;const v={},m=T(b);let E=!0;for(let V=0;V<w.length;V++){let K=w[V];if(K?.$ref&&!(0,g.schemaHasRulesButRef)(K,P.self.RULES)){const G=K.$ref;if(K=y.resolveRef.call(P.self,P.schemaEnv.root,P.baseId,G),K instanceof y.SchemaEnv&&(K=K.schema),K===void 0)throw new i.default(P.opts.uriResolver,P.baseId,G)}const z=(p=K?.properties)===null||p===void 0?void 0:p[$];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${$}"`);E=E&&(m||T(K)),k(z,V)}if(!E)throw new Error(`discriminator: "${$}" must be required`);return v;function T({required:V}){return Array.isArray(V)&&V.includes($)}function k(V,K){if(V.const)A(V.const,K);else if(V.enum)for(const z of V.enum)A(z,K);else throw new Error(`discriminator: "properties/${$}" must have "const" or "enum"`)}function A(V,K){if(typeof V!="string"||V in v)throw new Error(`discriminator: "${$}" values must be unique strings`);v[V]=K}}}};return wt.default=h,wt}const Bs="http://json-schema.org/draft-07/schema#",Xs="http://json-schema.org/draft-07/schema#",Qs="Core schema meta-schema",Ys={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:[]}},Zs=["object","boolean"],xs={$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:"#"}},ea={$schema:Bs,$id:Xs,title:Qs,definitions:Ys,type:Zs,properties:xs,default:!0};var mn;function ta(){return mn||(mn=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.MissingRefError=r.ValidationError=r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=r.Ajv=void 0;const y=fs(),i=Gs(),g=Ws(),o=ea,h=["/properties"],u="http://json-schema.org/draft-07/schema";class d extends y.default{_addVocabularies(){super._addVocabularies(),i.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(g.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(o,h):o;this.addMetaSchema($,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}r.Ajv=d,e.exports=r=d,e.exports.Ajv=d,Object.defineProperty(r,"__esModule",{value:!0}),r.default=d;var _=Nt();Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var c=W();Object.defineProperty(r,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var b=Wt();Object.defineProperty(r,"ValidationError",{enumerable:!0,get:function(){return b.default}});var P=Tt();Object.defineProperty(r,"MissingRefError",{enumerable:!0,get:function(){return P.default}})})(Ve,Ve.exports)),Ve.exports}var ra=ta();const na=En(ra);var bt={exports:{}},yn;function sa(){return yn||(yn=1,(function(e,r){Object.defineProperty(r,"__esModule",{value:!0});const y={},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:c=>{var b;const P=(b=c?.max)!==null&&b!==void 0?b:2;return()=>Math.floor(Math.random()*P)},seq:c=>{var b;const P=(b=c?.name)!==null&&b!==void 0?b:"";return y[P]||(y[P]=0),()=>y[P]++}},g=Object.assign(o,{DEFAULTS:i});function o(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(c,b,P){if(!P.opts.useDefaults||P.compositeRule)return()=>!0;const w={};for(const l in c)w[l]=h(c[l]);const $=P.opts.useDefaults==="empty";return l=>{for(const s in c)(l[s]===void 0||$&&(l[s]===null||l[s]===""))&&(l[s]=w[s]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function h(c){return typeof c=="object"?u(c):d(c)}function u({func:c,args:b}){const P=i[c];return _(c,P),P(b)}function d(c=""){const b=i[c];return _(c,b),b()}function _(c,b){if(!b)throw new Error(`invalid "dynamicDefaults" keyword property value: ${c}`)}r.default=g,e.exports=g})(bt,bt.exports)),bt.exports}var aa=sa();const Tn=En(aa),oa={$id:"urn:jsonschema: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"},ia={$id:"urn:jsonschema:data",items:{$ref:"urn:jsonschema:page"},type:"array"},ua={$id:"urn:jsonschema: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"},ca={$id:"urn:jsonschema:fonts",items:{type:"string"},type:"array"},la={$id:"urn:jsonschema:importmap",additionalProperties:!1,properties:{imports:{additionalProperties:{type:"string"},default:{},description:"The Imports field",type:"object"},scopes:{additionalProperties:{additionalProperties:{type:"string"},type:"object"},description:"The Scopes field",type:"object"}},title:"JSON schema for Import Maps files",type:"object"},da={$id:"urn:jsonschema: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:{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"},fa=()=>{const e=URL.createObjectURL(new Blob),r=e.split("/").pop()??crypto.randomUUID();return URL.revokeObjectURL(e),r};Tn.DEFAULTS.uuid=()=>fa;const ha={get(){return this.children.filter(({enabled:e})=>e)}},pa={get(){return this.$siblings.findIndex(({id:e})=>this.id===e)}},ma={get(){return this.$siblings[this.$index+1]}},ya={get(){return this.$siblings[this.$index-1]}},va={get(){return this.siblings.filter(({enabled:e})=>e)}},Ae=new na({code:{esm:!0},coerceTypes:!0,keywords:[Tn()],removeAdditional:!0,schemas:[oa,ia,da,la,ua,ca],useDefaults:!0}),qa=e=>{window.console.error(e)},Ca=async e=>(await fetch(e)).text(),ga=_e({}),_a=_e([]),Da=e=>Object.fromEntries(e.map(r=>[r.toLowerCase().replaceAll(" ","_"),r])),$a={get(){return this.icon&&`i-${this.icon}`}},wa=_e({}),Gt=_e([]),ba={get(){const e=this.branch.slice(1);return e.some(({name:r})=>!r)?void 0:e.map(({name:r})=>r).join("/").replaceAll(" ","_")}},Ea={get(){return["",void 0].includes(this.header)?this.name??"":this.header}},Sa={get(){return this.path?.replace(/^\/?/,"/").replace(/\/?$/,"/")}};Ae.getSchema("urn:jsonschema:credentials");const Pa=Ae.getSchema("urn:jsonschema:data"),ja=Ae.getSchema("urn:jsonschema:feed"),Ra=Ae.getSchema("urn:jsonschema:fonts"),Oa=Ae.getSchema("urn:jsonschema:importmap"),{leaves:Na,objLeaves:Ma}=Bn(Gt);je(ga,async e=>{await ja?.(e)});je(_a,async e=>{await Ra?.(e)});je(wa,async e=>{await Oa?.(e)});je(Na,async e=>{await Pa?.(e)?e.forEach(r=>{Object.defineProperties(r,{$children:ha,$index:pa,$next:ma,$prev:ya,$siblings:va,i:$a,path:ba,title:Ea,to:Sa})}):(Gt.length=0,Gt.push({}))});export{Ma as a,Da as b,Ca as c,qa as d,ka as e,_a as f,En as g,Ia as h,Gt as n,Na as p,fa as u};