UNPKG

@techdocs/cli

Version:

Utility CLI for managing TechDocs sites in Backstage.

5 lines • 118 kB
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[1902],{74011:(D,e,s)=>{var r,h=s(4293),$=s(78920);r={value:!0},e.A=void 0;var p=$(s(14041)),S=h(s(74044)),a=(0,S.default)(p.createElement("path",{d:"M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"}),"Cached");e.A=a},23127:(D,e,s)=>{var r,h=s(4293),$=s(78920);r={value:!0},e.A=void 0;var p=$(s(14041)),S=h(s(74044)),a=(0,S.default)(p.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language");e.A=a},86613:(D,e,s)=>{var r,h=s(4293),$=s(78920);r={value:!0},e.A=void 0;var p=$(s(14041)),S=h(s(74044)),a=(0,S.default)(p.createElement("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link");e.A=a},11601:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=s(65319),h=s(2431),$=s(11672),p=s(33928),S=["/properties"],a="http://json-schema.org/draft-07/schema";class g extends r.default{_addVocabularies(){super._addVocabularies(),h.default.forEach(N=>this.addVocabulary(N)),this.opts.discriminator&&this.addKeyword($.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const N=this.opts.$data?this.$dataMetaSchema(p,S):p;this.addMetaSchema(N,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.Ajv=g,D.exports=e=g,D.exports.Ajv=g,Object.defineProperty(e,"__esModule",{value:!0}),e.default=g;var i=s(96223);Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var d=s(17898);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var w=s(95031);Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return w.default}});var _=s(85748);Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return _.default}})},83277:(D,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 s{}e._CodeOrName=s,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends s{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=r;class h extends s{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((u,n)=>`${u}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((u,n)=>(n instanceof r&&(u[n.str]=(u[n.str]||0)+1),u),{})}}e._Code=h,e.nil=new h("");function $(c,...t){const u=[c[0]];let n=0;for(;n<t.length;)a(u,t[n]),u.push(c[++n]);return new h(u)}e._=$;const p=new h("+");function S(c,...t){const u=[P(c[0])];let n=0;for(;n<t.length;)u.push(p),a(u,t[n]),u.push(p,P(c[++n]));return g(u),new h(u)}e.str=S;function a(c,t){t instanceof h?c.push(...t._items):t instanceof r?c.push(t):c.push(w(t))}e.addCodeArg=a;function g(c){let t=1;for(;t<c.length-1;){if(c[t]===p){const u=i(c[t-1],c[t+1]);if(u!==void 0){c.splice(t-1,3,u);continue}c[t++]="+"}t++}}function i(c,t){if(t==='""')return c;if(c==='""')return t;if(typeof c=="string")return t instanceof r||c[c.length-1]!=='"'?void 0:typeof t!="string"?`${c.slice(0,-1)}${t}"`:t[0]==='"'?c.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(c instanceof r))return`"${c}${t.slice(1)}`}function d(c,t){return t.emptyStr()?c:c.emptyStr()?t:S`${c}${t}`}e.strConcat=d;function w(c){return typeof c=="number"||typeof c=="boolean"||c===null?c:P(Array.isArray(c)?c.join(","):c)}function _(c){return new h(P(c))}e.stringify=_;function P(c){return JSON.stringify(c).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=P;function N(c){return typeof c=="string"&&e.IDENTIFIER.test(c)?new h(`.${c}`):$`[${c}]`}e.getProperty=N;function R(c){if(typeof c=="string"&&e.IDENTIFIER.test(c))return new h(`${c}`);throw new Error(`CodeGen: invalid export name: ${c}, use explicit $id name mapping`)}e.getEsmExportName=R;function y(c){return new h(c.toString())}e.regexpCode=y},17898:(D,e,s)=>{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=s(83277),h=s(76930);var $=s(83277);Object.defineProperty(e,"_",{enumerable:!0,get:function(){return $._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return $.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return $.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return $.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return $.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return $.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return $.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return $.Name}});var p=s(76930);Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return p.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return p.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return p.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return p.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 S{optimizeNodes(){return this}optimizeNames(l,b){return this}}class a extends S{constructor(l,b,C){super(),this.varKind=l,this.name=b,this.rhs=C}render({es5:l,_n:b}){const C=l?h.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${L};`+b}optimizeNames(l,b){if(l[this.name.str])return this.rhs&&(this.rhs=J(this.rhs,l,b)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class g extends S{constructor(l,b,C){super(),this.lhs=l,this.rhs=b,this.sideEffects=C}render({_n:l}){return`${this.lhs} = ${this.rhs};`+l}optimizeNames(l,b){if(!(this.lhs instanceof r.Name&&!l[this.lhs.str]&&!this.sideEffects))return this.rhs=J(this.rhs,l,b),this}get names(){const l=this.lhs instanceof r.Name?{}:{...this.lhs.names};return W(l,this.rhs)}}class i extends g{constructor(l,b,C,L){super(l,C,L),this.op=b}render({_n:l}){return`${this.lhs} ${this.op}= ${this.rhs};`+l}}class d extends S{constructor(l){super(),this.label=l,this.names={}}render({_n:l}){return`${this.label}:`+l}}class w extends S{constructor(l){super(),this.label=l,this.names={}}render({_n:l}){return`break${this.label?` ${this.label}`:""};`+l}}class _ extends S{constructor(l){super(),this.error=l}render({_n:l}){return`throw ${this.error};`+l}get names(){return this.error.names}}class P extends S{constructor(l){super(),this.code=l}render({_n:l}){return`${this.code};`+l}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(l,b){return this.code=J(this.code,l,b),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class N extends S{constructor(l=[]){super(),this.nodes=l}render(l){return this.nodes.reduce((b,C)=>b+C.render(l),"")}optimizeNodes(){const{nodes:l}=this;let b=l.length;for(;b--;){const C=l[b].optimizeNodes();Array.isArray(C)?l.splice(b,1,...C):C?l[b]=C:l.splice(b,1)}return l.length>0?this:void 0}optimizeNames(l,b){const{nodes:C}=this;let L=C.length;for(;L--;){const H=C[L];H.optimizeNames(l,b)||(Y(l,H.names),C.splice(L,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((l,b)=>K(l,b.names),{})}}class R extends N{render(l){return"{"+l._n+super.render(l)+"}"+l._n}}class y extends N{}class c extends R{}c.kind="else";class t extends R{constructor(l,b){super(b),this.condition=l}render(l){let b=`if(${this.condition})`+super.render(l);return this.else&&(b+="else "+this.else.render(l)),b}optimizeNodes(){super.optimizeNodes();const l=this.condition;if(l===!0)return this.nodes;let b=this.else;if(b){const C=b.optimizeNodes();b=this.else=Array.isArray(C)?new c(C):C}if(b)return l===!1?b instanceof t?b:b.nodes:this.nodes.length?this:new t(x(l),b instanceof t?[b]:b.nodes);if(!(l===!1||!this.nodes.length))return this}optimizeNames(l,b){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(l,b),!!(super.optimizeNames(l,b)||this.else))return this.condition=J(this.condition,l,b),this}get names(){const l=super.names;return W(l,this.condition),this.else&&K(l,this.else.names),l}}t.kind="if";class u extends R{}u.kind="for";class n extends u{constructor(l){super(),this.iteration=l}render(l){return`for(${this.iteration})`+super.render(l)}optimizeNames(l,b){if(super.optimizeNames(l,b))return this.iteration=J(this.iteration,l,b),this}get names(){return K(super.names,this.iteration.names)}}class o extends u{constructor(l,b,C,L){super(),this.varKind=l,this.name=b,this.from=C,this.to=L}render(l){const b=l.es5?h.varKinds.var:this.varKind,{name:C,from:L,to:H}=this;return`for(${b} ${C}=${L}; ${C}<${H}; ${C}++)`+super.render(l)}get names(){const l=W(super.names,this.from);return W(l,this.to)}}class v extends u{constructor(l,b,C,L){super(),this.loop=l,this.varKind=b,this.name=C,this.iterable=L}render(l){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(l)}optimizeNames(l,b){if(super.optimizeNames(l,b))return this.iterable=J(this.iterable,l,b),this}get names(){return K(super.names,this.iterable.names)}}class m extends R{constructor(l,b,C){super(),this.name=l,this.args=b,this.async=C}render(l){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(l)}}m.kind="func";class f extends N{render(l){return"return "+super.render(l)}}f.kind="return";class E extends R{render(l){let b="try"+super.render(l);return this.catch&&(b+=this.catch.render(l)),this.finally&&(b+=this.finally.render(l)),b}optimizeNodes(){var l,b;return super.optimizeNodes(),(l=this.catch)===null||l===void 0||l.optimizeNodes(),(b=this.finally)===null||b===void 0||b.optimizeNodes(),this}optimizeNames(l,b){var C,L;return super.optimizeNames(l,b),(C=this.catch)===null||C===void 0||C.optimizeNames(l,b),(L=this.finally)===null||L===void 0||L.optimizeNames(l,b),this}get names(){const l=super.names;return this.catch&&K(l,this.catch.names),this.finally&&K(l,this.finally.names),l}}class k extends R{constructor(l){super(),this.error=l}render(l){return`catch(${this.error})`+super.render(l)}}k.kind="catch";class V extends R{render(l){return"finally"+super.render(l)}}V.kind="finally";class F{constructor(l,b={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...b,_n:b.lines?` `:""},this._extScope=l,this._scope=new h.Scope({parent:l}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(l){return this._scope.name(l)}scopeName(l){return this._extScope.name(l)}scopeValue(l,b){const C=this._extScope.value(l,b);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(l,b){return this._extScope.getValue(l,b)}scopeRefs(l){return this._extScope.scopeRefs(l,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(l,b,C,L){const H=this._scope.toName(b);return C!==void 0&&L&&(this._constants[H.str]=C),this._leafNode(new a(l,H,C)),H}const(l,b,C){return this._def(h.varKinds.const,l,b,C)}let(l,b,C){return this._def(h.varKinds.let,l,b,C)}var(l,b,C){return this._def(h.varKinds.var,l,b,C)}assign(l,b,C){return this._leafNode(new g(l,b,C))}add(l,b){return this._leafNode(new i(l,e.operators.ADD,b))}code(l){return typeof l=="function"?l():l!==r.nil&&this._leafNode(new P(l)),this}object(...l){const b=["{"];for(const[C,L]of l)b.length>1&&b.push(","),b.push(C),(C!==L||this.opts.es5)&&(b.push(":"),(0,r.addCodeArg)(b,L));return b.push("}"),new r._Code(b)}if(l,b,C){if(this._blockNode(new t(l)),b&&C)this.code(b).else().code(C).endIf();else if(b)this.code(b).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(l){return this._elseNode(new t(l))}else(){return this._elseNode(new c)}endIf(){return this._endBlockNode(t,c)}_for(l,b){return this._blockNode(l),b&&this.code(b).endFor(),this}for(l,b){return this._for(new n(l),b)}forRange(l,b,C,L,H=this.opts.es5?h.varKinds.var:h.varKinds.let){const X=this._scope.toName(l);return this._for(new o(H,X,b,C),()=>L(X))}forOf(l,b,C,L=h.varKinds.const){const H=this._scope.toName(l);if(this.opts.es5){const X=b instanceof r.Name?b:this.var("_arr",b);return this.forRange("_i",0,(0,r._)`${X}.length`,Q=>{this.var(H,(0,r._)`${X}[${Q}]`),C(H)})}return this._for(new v("of",L,H,b),()=>C(H))}forIn(l,b,C,L=this.opts.es5?h.varKinds.var:h.varKinds.const){if(this.opts.ownProperties)return this.forOf(l,(0,r._)`Object.keys(${b})`,C);const H=this._scope.toName(l);return this._for(new v("in",L,H,b),()=>C(H))}endFor(){return this._endBlockNode(u)}label(l){return this._leafNode(new d(l))}break(l){return this._leafNode(new w(l))}return(l){const b=new f;if(this._blockNode(b),this.code(l),b.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(f)}try(l,b,C){if(!b&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new E;if(this._blockNode(L),this.code(l),b){const H=this.name("e");this._currNode=L.catch=new k(H),b(H)}return C&&(this._currNode=L.finally=new V,this.code(C)),this._endBlockNode(k,V)}throw(l){return this._leafNode(new _(l))}block(l,b){return this._blockStarts.push(this._nodes.length),l&&this.code(l).endBlock(b),this}endBlock(l){const b=this._blockStarts.pop();if(b===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-b;if(C<0||l!==void 0&&C!==l)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${l} expected`);return this._nodes.length=b,this}func(l,b=r.nil,C,L){return this._blockNode(new m(l,b,C)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(m)}optimize(l=1){for(;l-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(l){return this._currNode.nodes.push(l),this}_blockNode(l){this._currNode.nodes.push(l),this._nodes.push(l)}_endBlockNode(l,b){const C=this._currNode;if(C instanceof l||b&&C instanceof b)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${b?`${l.kind}/${b.kind}`:l.kind}"`)}_elseNode(l){const b=this._currNode;if(!(b instanceof t))throw new Error('CodeGen: "else" without "if"');return this._currNode=b.else=l,this}get _root(){return this._nodes[0]}get _currNode(){const l=this._nodes;return l[l.length-1]}set _currNode(l){const b=this._nodes;b[b.length-1]=l}}e.CodeGen=F;function K(T,l){for(const b in l)T[b]=(T[b]||0)+(l[b]||0);return T}function W(T,l){return l instanceof r._CodeOrName?K(T,l.names):T}function J(T,l,b){if(T instanceof r.Name)return C(T);if(!L(T))return T;return new r._Code(T._items.reduce((H,X)=>(X instanceof r.Name&&(X=C(X)),X instanceof r._Code?H.push(...X._items):H.push(X),H),[]));function C(H){const X=b[H.str];return X===void 0||l[H.str]!==1?H:(delete l[H.str],X)}function L(H){return H instanceof r._Code&&H._items.some(X=>X instanceof r.Name&&l[X.str]===1&&b[X.str]!==void 0)}}function Y(T,l){for(const b in l)T[b]=(T[b]||0)-(l[b]||0)}function x(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,r._)`!${A(T)}`}e.not=x;const oe=O(e.operators.AND);function ie(...T){return T.reduce(oe)}e.and=ie;const Z=O(e.operators.OR);function U(...T){return T.reduce(Z)}e.or=U;function O(T){return(l,b)=>l===r.nil?b:b===r.nil?l:(0,r._)`${A(l)} ${T} ${A(b)}`}function A(T){return T instanceof r.Name?T:(0,r._)`(${T})`}},76930:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const r=s(83277);class h extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var $;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})($||(e.UsedValueState=$={})),e.varKinds={const:new r.Name("const"),let:new r.Name("let"),var:new r.Name("var")};class p{constructor({prefixes:d,parent:w}={}){this._names={},this._prefixes=d,this._parent=w}toName(d){return d instanceof r.Name?d:this.name(d)}name(d){return new r.Name(this._newName(d))}_newName(d){const w=this._names[d]||this._nameGroup(d);return`${d}${w.index++}`}_nameGroup(d){var w,_;if(!((_=(w=this._parent)===null||w===void 0?void 0:w._prefixes)===null||_===void 0)&&_.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=p;class S extends r.Name{constructor(d,w){super(w),this.prefix=d}setValue(d,{property:w,itemIndex:_}){this.value=d,this.scopePath=(0,r._)`.${new r.Name(w)}[${_}]`}}e.ValueScopeName=S;const a=(0,r._)`\n`;class g extends p{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?a:r.nil}}get(){return this._scope}name(d){return new S(d,this._newName(d))}value(d,w){var _;if(w.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const P=this.toName(d),{prefix:N}=P,R=(_=w.key)!==null&&_!==void 0?_:w.ref;let y=this._values[N];if(y){const u=y.get(R);if(u)return u}else y=this._values[N]=new Map;y.set(R,P);const c=this._scope[N]||(this._scope[N]=[]),t=c.length;return c[t]=w.ref,P.setValue(w,{property:N,itemIndex:t}),P}getValue(d,w){const _=this._values[d];if(_)return _.get(w)}scopeRefs(d,w=this._values){return this._reduceValues(w,_=>{if(_.scopePath===void 0)throw new Error(`CodeGen: name "${_}" has no value`);return(0,r._)`${d}${_.scopePath}`})}scopeCode(d=this._values,w,_){return this._reduceValues(d,P=>{if(P.value===void 0)throw new Error(`CodeGen: name "${P}" has no value`);return P.value.code},w,_)}_reduceValues(d,w,_={},P){let N=r.nil;for(const R in d){const y=d[R];if(!y)continue;const c=_[R]=_[R]||new Map;y.forEach(t=>{if(c.has(t))return;c.set(t,$.Started);let u=w(t);if(u){const n=this.opts.es5?e.varKinds.var:e.varKinds.const;N=(0,r._)`${N}${n} ${t} = ${u};${this.opts._n}`}else if(u=P?.(t))N=(0,r._)`${N}${u}${this.opts._n}`;else throw new h(t);c.set(t,$.Completed)})}return N}}e.ValueScope=g},49409:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const r=s(17898),h=s(50458),$=s(63036);e.keywordError={message:({keyword:c})=>(0,r.str)`must pass "${c}" keyword validation`},e.keyword$DataError={message:({keyword:c,schemaType:t})=>t?(0,r.str)`"${c}" keyword must be ${t} ($data)`:(0,r.str)`"${c}" keyword is invalid ($data)`};function p(c,t=e.keywordError,u,n){const{it:o}=c,{gen:v,compositeRule:m,allErrors:f}=o,E=_(c,t,u);n??(m||f)?i(v,E):d(o,(0,r._)`[${E}]`)}e.reportError=p;function S(c,t=e.keywordError,u){const{it:n}=c,{gen:o,compositeRule:v,allErrors:m}=n,f=_(c,t,u);i(o,f),v||m||d(n,$.default.vErrors)}e.reportExtraError=S;function a(c,t){c.assign($.default.errors,t),c.if((0,r._)`${$.default.vErrors} !== null`,()=>c.if(t,()=>c.assign((0,r._)`${$.default.vErrors}.length`,t),()=>c.assign($.default.vErrors,null)))}e.resetErrorsCount=a;function g({gen:c,keyword:t,schemaValue:u,data:n,errsCount:o,it:v}){if(o===void 0)throw new Error("ajv implementation error");const m=c.name("err");c.forRange("i",o,$.default.errors,f=>{c.const(m,(0,r._)`${$.default.vErrors}[${f}]`),c.if((0,r._)`${m}.instancePath === undefined`,()=>c.assign((0,r._)`${m}.instancePath`,(0,r.strConcat)($.default.instancePath,v.errorPath))),c.assign((0,r._)`${m}.schemaPath`,(0,r.str)`${v.errSchemaPath}/${t}`),v.opts.verbose&&(c.assign((0,r._)`${m}.schema`,u),c.assign((0,r._)`${m}.data`,n))})}e.extendErrors=g;function i(c,t){const u=c.const("err",t);c.if((0,r._)`${$.default.vErrors} === null`,()=>c.assign($.default.vErrors,(0,r._)`[${u}]`),(0,r._)`${$.default.vErrors}.push(${u})`),c.code((0,r._)`${$.default.errors}++`)}function d(c,t){const{gen:u,validateName:n,schemaEnv:o}=c;o.$async?u.throw((0,r._)`new ${c.ValidationError}(${t})`):(u.assign((0,r._)`${n}.errors`,t),u.return(!1))}const w={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 _(c,t,u){const{createErrors:n}=c.it;return n===!1?(0,r._)`{}`:P(c,t,u)}function P(c,t,u={}){const{gen:n,it:o}=c,v=[N(o,u),R(c,u)];return y(c,t,v),n.object(...v)}function N({errorPath:c},{instancePath:t}){const u=t?(0,r.str)`${c}${(0,h.getErrorPath)(t,h.Type.Str)}`:c;return[$.default.instancePath,(0,r.strConcat)($.default.instancePath,u)]}function R({keyword:c,it:{errSchemaPath:t}},{schemaPath:u,parentSchema:n}){let o=n?t:(0,r.str)`${t}/${c}`;return u&&(o=(0,r.str)`${o}${(0,h.getErrorPath)(u,h.Type.Str)}`),[w.schemaPath,o]}function y(c,{params:t,message:u},n){const{keyword:o,data:v,schemaValue:m,it:f}=c,{opts:E,propertyName:k,topSchemaRef:V,schemaPath:F}=f;n.push([w.keyword,o],[w.params,typeof t=="function"?t(c):t||(0,r._)`{}`]),E.messages&&n.push([w.message,typeof u=="function"?u(c):u]),E.verbose&&n.push([w.schema,m],[w.parentSchema,(0,r._)`${V}${F}`],[$.default.data,v]),k&&n.push([w.propertyName,k])}},49392:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;const r=s(17898),h=s(95031),$=s(63036),p=s(14856),S=s(50458),a=s(96223);class g{constructor(u){var n;this.refs={},this.dynamicAnchors={};let o;typeof u.schema=="object"&&(o=u.schema),this.schema=u.schema,this.schemaId=u.schemaId,this.root=u.root||this,this.baseId=(n=u.baseId)!==null&&n!==void 0?n:(0,p.normalizeId)(o?.[u.schemaId||"$id"]),this.schemaPath=u.schemaPath,this.localRefs=u.localRefs,this.meta=u.meta,this.$async=o?.$async,this.refs={}}}e.SchemaEnv=g;function i(t){const u=_.call(this,t);if(u)return u;const n=(0,p.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:o,lines:v}=this.opts.code,{ownProperties:m}=this.opts,f=new r.CodeGen(this.scope,{es5:o,lines:v,ownProperties:m});let E;t.$async&&(E=f.scopeValue("Error",{ref:h.default,code:(0,r._)`require("ajv/dist/runtime/validation_error").default`}));const k=f.scopeName("validate");t.validateName=k;const V={gen:f,allErrors:this.opts.allErrors,data:$.default.data,parentData:$.default.parentData,parentDataProperty:$.default.parentDataProperty,dataNames:[$.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,r.stringify)(t.schema)}:{ref:t.schema}),validateName:k,ValidationError:E,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:r.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,r._)`""`,opts:this.opts,self:this};let F;try{this._compilations.add(t),(0,a.validateFunctionCode)(V),f.optimize(this.opts.code.optimize);const K=f.toString();F=`${f.scopeRefs($.default.scope)}return ${K}`,this.opts.code.process&&(F=this.opts.code.process(F,t));const J=new Function(`${$.default.self}`,`${$.default.scope}`,F)(this,this.scope.get());if(this.scope.value(k,{ref:J}),J.errors=null,J.schema=t.schema,J.schemaEnv=t,t.$async&&(J.$async=!0),this.opts.code.source===!0&&(J.source={validateName:k,validateCode:K,scopeValues:f._values}),this.opts.unevaluated){const{props:Y,items:x}=V;J.evaluated={props:Y instanceof r.Name?void 0:Y,items:x instanceof r.Name?void 0:x,dynamicProps:Y instanceof r.Name,dynamicItems:x instanceof r.Name},J.source&&(J.source.evaluated=(0,r.stringify)(J.evaluated))}return t.validate=J,t}catch(K){throw delete t.validate,delete t.validateName,F&&this.logger.error("Error compiling schema, function code:",F),K}finally{this._compilations.delete(t)}}e.compileSchema=i;function d(t,u,n){var o;n=(0,p.resolveUrl)(this.opts.uriResolver,u,n);const v=t.refs[n];if(v)return v;let m=N.call(this,t,n);if(m===void 0){const f=(o=t.localRefs)===null||o===void 0?void 0:o[n],{schemaId:E}=this.opts;f&&(m=new g({schema:f,schemaId:E,root:t,baseId:u}))}if(m!==void 0)return t.refs[n]=w.call(this,m)}e.resolveRef=d;function w(t){return(0,p.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:i.call(this,t)}function _(t){for(const u of this._compilations)if(P(u,t))return u}e.getCompilingSchema=_;function P(t,u){return t.schema===u.schema&&t.root===u.root&&t.baseId===u.baseId}function N(t,u){let n;for(;typeof(n=this.refs[u])=="string";)u=n;return n||this.schemas[u]||R.call(this,t,u)}function R(t,u){const n=this.opts.uriResolver.parse(u),o=(0,p._getFullPath)(this.opts.uriResolver,n);let v=(0,p.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&o===v)return c.call(this,n,t);const m=(0,p.normalizeId)(o),f=this.refs[m]||this.schemas[m];if(typeof f=="string"){const E=R.call(this,t,f);return typeof E?.schema!="object"?void 0:c.call(this,n,E)}if(typeof f?.schema=="object"){if(f.validate||i.call(this,f),m===(0,p.normalizeId)(u)){const{schema:E}=f,{schemaId:k}=this.opts,V=E[k];return V&&(v=(0,p.resolveUrl)(this.opts.uriResolver,v,V)),new g({schema:E,schemaId:k,root:t,baseId:v})}return c.call(this,n,f)}}e.resolveSchema=R;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function c(t,{baseId:u,schema:n,root:o}){var v;if(((v=t.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const E of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const k=n[(0,S.unescapeFragment)(E)];if(k===void 0)return;n=k;const V=typeof n=="object"&&n[this.opts.schemaId];!y.has(E)&&V&&(u=(0,p.resolveUrl)(this.opts.uriResolver,u,V))}let m;if(typeof n!="boolean"&&n.$ref&&!(0,S.schemaHasRulesButRef)(n,this.RULES)){const E=(0,p.resolveUrl)(this.opts.uriResolver,u,n.$ref);m=R.call(this,o,E)}const{schemaId:f}=this.opts;if(m=m||new g({schema:n,schemaId:f,root:o,baseId:u}),m.schema!==m.root.schema)return m}},63036:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0});const r=s(17898),h={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};e.default=h},85748:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0});const r=s(14856);class h extends Error{constructor(p,S,a,g){super(g||`can't resolve reference ${a} from id ${S}`),this.missingRef=(0,r.resolveUrl)(p,S,a),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(p,this.missingRef))}}e.default=h},14856:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;const r=s(50458),h=s(38792),$=s(1645),p=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function S(c,t=!0){return typeof c=="boolean"?!0:t===!0?!g(c):t?i(c)<=t:!1}e.inlineRef=S;const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function g(c){for(const t in c){if(a.has(t))return!0;const u=c[t];if(Array.isArray(u)&&u.some(g)||typeof u=="object"&&g(u))return!0}return!1}function i(c){let t=0;for(const u in c){if(u==="$ref")return 1/0;if(t++,!p.has(u)&&(typeof c[u]=="object"&&(0,r.eachItem)(c[u],n=>t+=i(n)),t===1/0))return 1/0}return t}function d(c,t="",u){u!==!1&&(t=P(t));const n=c.parse(t);return w(c,n)}e.getFullPath=d;function w(c,t){return c.serialize(t).split("#")[0]+"#"}e._getFullPath=w;const _=/#\/?$/;function P(c){return c?c.replace(_,""):""}e.normalizeId=P;function N(c,t,u){return u=P(u),c.resolve(t,u)}e.resolveUrl=N;const R=/^[a-z_][-a-z0-9._]*$/i;function y(c,t){if(typeof c=="boolean")return{};const{schemaId:u,uriResolver:n}=this.opts,o=P(c[u]||t),v={"":o},m=d(n,o,!1),f={},E=new Set;return $(c,{allKeys:!0},(F,K,W,J)=>{if(J===void 0)return;const Y=m+K;let x=v[J];typeof F[u]=="string"&&(x=oe.call(this,F[u])),ie.call(this,F.$anchor),ie.call(this,F.$dynamicAnchor),v[K]=x;function oe(Z){const U=this.opts.uriResolver.resolve;if(Z=P(x?U(x,Z):Z),E.has(Z))throw V(Z);E.add(Z);let O=this.refs[Z];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?k(F,O.schema,Z):Z!==P(Y)&&(Z[0]==="#"?(k(F,f[Z],Z),f[Z]=F):this.refs[Z]=Y),Z}function ie(Z){if(typeof Z=="string"){if(!R.test(Z))throw new Error(`invalid anchor "${Z}"`);oe.call(this,`#${Z}`)}}}),f;function k(F,K,W){if(K!==void 0&&!h(F,K))throw V(W)}function V(F){return new Error(`reference "${F}" resolves to more than one schema`)}}e.getSchemaRefs=y},90383:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;const s=["string","number","integer","boolean","null","object","array"],r=new Set(s);function h(p){return typeof p=="string"&&r.has(p)}e.isJSONType=h;function $(){const p={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...p,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},p.number,p.string,p.array,p.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=$},50458:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const r=s(17898),h=s(83277);function $(m){const f={};for(const E of m)f[E]=!0;return f}e.toHash=$;function p(m,f){return typeof f=="boolean"?f:Object.keys(f).length===0?!0:(S(m,f),!a(f,m.self.RULES.all))}e.alwaysValidSchema=p;function S(m,f=m.schema){const{opts:E,self:k}=m;if(!E.strictSchema||typeof f=="boolean")return;const V=k.RULES.keywords;for(const F in f)V[F]||v(m,`unknown keyword: "${F}"`)}e.checkUnknownRules=S;function a(m,f){if(typeof m=="boolean")return!m;for(const E in m)if(f[E])return!0;return!1}e.schemaHasRules=a;function g(m,f){if(typeof m=="boolean")return!m;for(const E in m)if(E!=="$ref"&&f.all[E])return!0;return!1}e.schemaHasRulesButRef=g;function i({topSchemaRef:m,schemaPath:f},E,k,V){if(!V){if(typeof E=="number"||typeof E=="boolean")return E;if(typeof E=="string")return(0,r._)`${E}`}return(0,r._)`${m}${f}${(0,r.getProperty)(k)}`}e.schemaRefOrVal=i;function d(m){return P(decodeURIComponent(m))}e.unescapeFragment=d;function w(m){return encodeURIComponent(_(m))}e.escapeFragment=w;function _(m){return typeof m=="number"?`${m}`:m.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=_;function P(m){return m.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=P;function N(m,f){if(Array.isArray(m))for(const E of m)f(E);else f(m)}e.eachItem=N;function R({mergeNames:m,mergeToName:f,mergeValues:E,resultToName:k}){return(V,F,K,W)=>{const J=K===void 0?F:K instanceof r.Name?(F instanceof r.Name?m(V,F,K):f(V,F,K),K):F instanceof r.Name?(f(V,K,F),F):E(F,K);return W===r.Name&&!(J instanceof r.Name)?k(V,J):J}}e.mergeEvaluated={props:R({mergeNames:(m,f,E)=>m.if((0,r._)`${E} !== true && ${f} !== undefined`,()=>{m.if((0,r._)`${f} === true`,()=>m.assign(E,!0),()=>m.assign(E,(0,r._)`${E} || {}`).code((0,r._)`Object.assign(${E}, ${f})`))}),mergeToName:(m,f,E)=>m.if((0,r._)`${E} !== true`,()=>{f===!0?m.assign(E,!0):(m.assign(E,(0,r._)`${E} || {}`),c(m,E,f))}),mergeValues:(m,f)=>m===!0?!0:{...m,...f},resultToName:y}),items:R({mergeNames:(m,f,E)=>m.if((0,r._)`${E} !== true && ${f} !== undefined`,()=>m.assign(E,(0,r._)`${f} === true ? true : ${E} > ${f} ? ${E} : ${f}`)),mergeToName:(m,f,E)=>m.if((0,r._)`${E} !== true`,()=>m.assign(E,f===!0?!0:(0,r._)`${E} > ${f} ? ${E} : ${f}`)),mergeValues:(m,f)=>m===!0?!0:Math.max(m,f),resultToName:(m,f)=>m.var("items",f)})};function y(m,f){if(f===!0)return m.var("props",!0);const E=m.var("props",(0,r._)`{}`);return f!==void 0&&c(m,E,f),E}e.evaluatedPropsToName=y;function c(m,f,E){Object.keys(E).forEach(k=>m.assign((0,r._)`${f}${(0,r.getProperty)(k)}`,!0))}e.setEvaluated=c;const t={};function u(m,f){return m.scopeValue("func",{ref:f,code:t[f.code]||(t[f.code]=new h._Code(f.code))})}e.useFunc=u;var n;(function(m){m[m.Num=0]="Num",m[m.Str=1]="Str"})(n||(e.Type=n={}));function o(m,f,E){if(m instanceof r.Name){const k=f===n.Num;return E?k?(0,r._)`"[" + ${m} + "]"`:(0,r._)`"['" + ${m} + "']"`:k?(0,r._)`"/" + ${m}`:(0,r._)`"/" + ${m}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return E?(0,r.getProperty)(m).toString():"/"+_(m)}e.getErrorPath=o;function v(m,f,E=m.opts.strictSchema){if(E){if(f=`strict mode: ${f}`,E===!0)throw new Error(f);m.self.logger.warn(f)}}e.checkStrictMode=v},74758:(D,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function s({schema:$,self:p},S){const a=p.RULES.types[S];return a&&a!==!0&&r($,a)}e.schemaHasRulesForType=s;function r($,p){return p.rules.some(S=>h($,S))}e.shouldUseGroup=r;function h($,p){var S;return $[p.keyword]!==void 0||((S=p.definition.implements)===null||S===void 0?void 0:S.some(a=>$[a]!==void 0))}e.shouldUseRule=h},15948:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;const r=s(49409),h=s(17898),$=s(63036),p={message:"boolean schema is false"};function S(i){const{gen:d,schema:w,validateName:_}=i;w===!1?g(i,!1):typeof w=="object"&&w.$async===!0?d.return($.default.data):(d.assign((0,h._)`${_}.errors`,null),d.return(!0))}e.topBoolOrEmptySchema=S;function a(i,d){const{gen:w,schema:_}=i;_===!1?(w.var(d,!1),g(i)):w.var(d,!0)}e.boolOrEmptySchema=a;function g(i,d){const{gen:w,data:_}=i,P={gen:w,keyword:"false schema",data:_,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,r.reportError)(P,p,void 0,d)}},69003:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const r=s(90383),h=s(74758),$=s(49409),p=s(17898),S=s(50458);var a;(function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"})(a||(e.DataType=a={}));function g(n){const o=i(n.type);if(o.includes("null")){if(n.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!o.length&&n.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');n.nullable===!0&&o.push("null")}return o}e.getSchemaTypes=g;function i(n){const o=Array.isArray(n)?n:n?[n]:[];if(o.every(r.isJSONType))return o;throw new Error("type must be JSONType or JSONType[]: "+o.join(","))}e.getJSONTypes=i;function d(n,o){const{gen:v,data:m,opts:f}=n,E=_(o,f.coerceTypes),k=o.length>0&&!(E.length===0&&o.length===1&&(0,h.schemaHasRulesForType)(n,o[0]));if(k){const V=y(o,m,f.strictNumbers,a.Wrong);v.if(V,()=>{E.length?P(n,o,E):t(n)})}return k}e.coerceAndCheckDataType=d;const w=new Set(["string","number","integer","boolean","null"]);function _(n,o){return o?n.filter(v=>w.has(v)||o==="array"&&v==="array"):[]}function P(n,o,v){const{gen:m,data:f,opts:E}=n,k=m.let("dataType",(0,p._)`typeof ${f}`),V=m.let("coerced",(0,p._)`undefined`);E.coerceTypes==="array"&&m.if((0,p._)`${k} == 'object' && Array.isArray(${f}) && ${f}.length == 1`,()=>m.assign(f,(0,p._)`${f}[0]`).assign(k,(0,p._)`typeof ${f}`).if(y(o,f,E.strictNumbers),()=>m.assign(V,f))),m.if((0,p._)`${V} !== undefined`);for(const K of v)(w.has(K)||K==="array"&&E.coerceTypes==="array")&&F(K);m.else(),t(n),m.endIf(),m.if((0,p._)`${V} !== undefined`,()=>{m.assign(f,V),N(n,V)});function F(K){switch(K){case"string":m.elseIf((0,p._)`${k} == "number" || ${k} == "boolean"`).assign(V,(0,p._)`"" + ${f}`).elseIf((0,p._)`${f} === null`).assign(V,(0,p._)`""`);return;case"number":m.elseIf((0,p._)`${k} == "boolean" || ${f} === null || (${k} == "string" && ${f} && ${f} == +${f})`).assign(V,(0,p._)`+${f}`);return;case"integer":m.elseIf((0,p._)`${k} === "boolean" || ${f} === null || (${k} === "string" && ${f} && ${f} == +${f} && !(${f} % 1))`).assign(V,(0,p._)`+${f}`);return;case"boolean":m.elseIf((0,p._)`${f} === "false" || ${f} === 0 || ${f} === null`).assign(V,!1).elseIf((0,p._)`${f} === "true" || ${f} === 1`).assign(V,!0);return;case"null":m.elseIf((0,p._)`${f} === "" || ${f} === 0 || ${f} === false`),m.assign(V,null);return;case"array":m.elseIf((0,p._)`${k} === "string" || ${k} === "number" || ${k} === "boolean" || ${f} === null`).assign(V,(0,p._)`[${f}]`)}}}function N({gen:n,parentData:o,parentDataProperty:v},m){n.if((0,p._)`${o} !== undefined`,()=>n.assign((0,p._)`${o}[${v}]`,m))}function R(n,o,v,m=a.Correct){const f=m===a.Correct?p.operators.EQ:p.operators.NEQ;let E;switch(n){case"null":return(0,p._)`${o} ${f} null`;case"array":E=(0,p._)`Array.isArray(${o})`;break;case"object":E=(0,p._)`${o} && typeof ${o} == "object" && !Array.isArray(${o})`;break;case"integer":E=k((0,p._)`!(${o} % 1) && !isNaN(${o})`);break;case"number":E=k();break;default:return(0,p._)`typeof ${o} ${f} ${n}`}return m===a.Correct?E:(0,p.not)(E);function k(V=p.nil){return(0,p.and)((0,p._)`typeof ${o} == "number"`,V,v?(0,p._)`isFinite(${o})`:p.nil)}}e.checkDataType=R;function y(n,o,v,m){if(n.length===1)return R(n[0],o,v,m);let f;const E=(0,S.toHash)(n);if(E.array&&E.object){const k=(0,p._)`typeof ${o} != "object"`;f=E.null?k:(0,p._)`!${o} || ${k}`,delete E.null,delete E.array,delete E.object}else f=p.nil;E.number&&delete E.integer;for(const k in E)f=(0,p.and)(f,R(k,o,v,m));return f}e.checkDataTypes=y;const c={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:o})=>typeof n=="string"?(0,p._)`{type: ${n}}`:(0,p._)`{type: ${o}}`};function t(n){const o=u(n);(0,$.reportError)(o,c)}e.reportTypeError=t;function u(n){const{gen:o,data:v,schema:m}=n,f=(0,S.schemaRefOrVal)(n,m,"type");return{gen:o,keyword:"type",data:v,schema:m.type,schemaCode:f,schemaValue:f,parentSchema:m,params:{},it:n}}},96841:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;const r=s(17898),h=s(50458);function $(S,a){const{properties:g,items:i}=S.schema;if(a==="object"&&g)for(const d in g)p(S,d,g[d].default);else a==="array"&&Array.isArray(i)&&i.forEach((d,w)=>p(S,w,d.default))}e.assignDefaults=$;function p(S,a,g){const{gen:i,compositeRule:d,data:w,opts:_}=S;if(g===void 0)return;const P=(0,r._)`${w}${(0,r.getProperty)(a)}`;if(d){(0,h.checkStrictMode)(S,`default is ignored for: ${P}`);return}let N=(0,r._)`${P} === undefined`;_.useDefaults==="empty"&&(N=(0,r._)`${N} || ${P} === null || ${P} === ""`),i.if(N,(0,r._)`${P} = ${(0,r.stringify)(g)}`)}},96223:(D,e,s)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;const r=s(15948),h=s(69003),$=s(74758),p=s(69003),S=s(96841),a=s(49348),g=s(53322),i=s(17898),d=s(63036),w=s(14856),_=s(50458),P=s(49409);function N(j){if(m(j)&&(E(j),v(j))){t(j);return}R(j,()=>(0,r.topBoolOrEmptySchema)(j))}e.validateFunctionCode=N;function R({gen:j,validateName:I,schema:M,schemaEnv:z,opts:G},B){G.code.es5?j.func(I,(0,i._)`${d.default.data}, ${d.default.valCxt}`,z.$async,()=>{j.code((0,i._)`"use strict"; ${n(M,G)}`),c(j,G),j.code(B)}):j.func(I,(0,i._)`${d.default.data}, ${y(G)}`,z.$async,()=>j.code(n(M,G)).code(B))}function y(j){return(0,i._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${j.dynamicRef?(0,i._)`, ${d.default.dynamicAnchors}={}`:i.nil}}={}`}function c(j,I){j.if(d.default.valCxt,()=>{j.var(d.default.instancePath,(0,i._)`${d.default.valCxt}.${d.default.instancePath}`),j.var(d.default.parentData,(0,i._)`${d.default.valCxt}.${d.default.parentData}`),j.var(d.default.parentDataProperty,(0,i._)`${d.default.valCxt}.${d.default.parentDataProperty}`),j.var(d.default.rootData,(0,i._)`${d.default.valCxt}.${d.default.rootData}`),I.dynamicRef&&j.var(d.default.dynamicAnchors,(0,i._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{j.var(d.default.instancePath,(0,i._)`""`),j.var(d.default.parentData,(0,i._)`undefined`),j.var(d.default.parentDataProperty,(0,i._)`undefined`),j.var(d.default.rootData,d.default.data),I.dynamicRef&&j.var(d.default.dynamicAnchors,(0,i._)`{}`)})}function t(j){const{schema:I,opts:M,gen:z}=j;R(j,()=>{M.$comment&&I.$comment&&J(j),F(j),z.let(d.default.vErrors,null),z.let(d.default.errors,0),M.unevaluated&&u(j),k(j),Y(j)})}function u(j){const{gen:I,validateName:M}=j;j.evaluated=I.const("evaluated",(0,i._)`${M}.evaluated`),I.if((0,i._)`${j.evaluated}.dynamicProps`,()=>I.assign((0,i._)`${j.evaluated}.props`,(0,i._)`undefined`)),I.if((0,i._)`${j.evaluated}.dynamicItems`,()=>I.assign((0,i._)`${j.evaluated}.items`,(0,i._)`undefined`))}function n(j,I){const M=typeof j=="object"&&j[I.schemaId];return M&&(I.code.source||I.code.process)?(0,i._)`/*# sourceURL=${M} */`:i.nil}function o(j,I){if(m(j)&&(E(j),v(j))){f(j,I);return}(0,r.boolOrEmptySchema)(j,I)}function v({schema:j,self:I}){if(typeof j=="boolean")return!j;for(const M in j)if(I.RULES.all[M])return!0;return!1}function m(j){return typeof j.schema!="boolean"}function f(j,I){const{schema:M,gen:z,opts:G}=j;G.$comment&&M.$comment&&J(j),K(j),W(j);const B=z.const("_errs",d.default.errors);k(j,B),z.var(I,(0,i._)`${B} === ${d.default.errors}`)}function E(j){(0,_.checkUnknownRules)(j),V(j)}function k(j,I){if(j.opts.jtd)return oe(j,[],!1,I);const M=(0,h.getSchemaTypes)(j.schema),z=(0,h.coerceAndCheckDataType)(j,M);oe(j,M,!z,I)}function V(j){const{schema:I,errSchemaPath:M,opts:z,self:G}=j;I.$ref&&z.ignoreKeywordsWithRef&&(0,_.schemaHasRulesButRef)(I,G.RULES)&&G.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function F(j){const{schema:I,opts:M}=j;I.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,_.checkStrictMode)(j,"default is ignored in the schema root")}function K(j){const I=j.schema[j.opts.schemaId];I&&(j.baseId=(0,w.resolveUrl)(j.opts.uriResolver,j.baseId,I))}function W(j){if(j.schema.$async&&!j.schemaEnv.$async)throw new Error("async schema in sync schema")}function J({gen:j,schemaEnv:I,schema:M,errSchemaPath:z,opts:G}){const B=M.$comment;if(G.$comment===!0)j.code((0,i._)`${d.default.self}.logger.log(${B})`);else if(typeof G.$comment=="function"){const ee=(0,i.str)`${z}/$comment`,ae=j.scopeValue("root",{ref:I.root});j.code((0,i._)`${d.default.self}.opts.$comment(${B}, ${ee}, ${ae}.schema)`)}}function Y(j){const{gen:I,schemaEnv:M,validateName:z,ValidationError:G,opts:B}=j;M.$async?I.if((0,i._)`${d.default.errors} === 0`,()=>I.return(d.default.data),()=>I.throw((0,i._)`new ${G}(${d.default.vErrors})`)):(I.assign((0,i._)`${z}.errors`,d.default.vErrors),B.unevaluated&&x(j),I.return((0,i._)`${d.default.errors} === 0`))}function x({gen:j,evaluated:I,props:M,items:z}){M instanceof i.Name&&j.assign((0,i._)`${I}.props`,M),z instanceof i.Name&&j.assign((0,i._)`${I}.items`,z)}function oe(j,I,M,z){const{gen:G,schema:B,data:ee,allErrors:ae,opts:re,self:ne}=j,{RULES:te}=ne;if(B.$ref&&(re.ignoreKeywordsWithRef||!(0,_.schemaHasRulesButRef)(B,te))){G.block(()=>H(j,"$ref",te.all.$ref.definition));return}re.jtd||Z(j,I),G.block(()=>{for(const se of te.rules)ce(se);ce(te.post)});function ce(se){(0,$.shouldUseGroup)(B,se)&&(se.type?(G.if((0,p.checkDataType)(se.type,ee,re.strictNumbers)),ie(j,se),I.length===1&&I[0]===se.type&&M&&(G.else(),(0,p.reportTypeError)(j)),G.endIf()):ie(j,se),ae||G.if((0,i._)`${d.default.errors} === ${z||0}`))}}function ie(j,I){const{gen:M,schema:z,opts:{useDefaults:G}}=j;G&&(0,S.assignDefaults)(j,I.type),M.block(()=>{for(const B of I.rules)(0,$.shouldUseRule)(z,B)&&H(j,B.keyword,B.definition,I.type)})}function Z(j,I){j.schemaEnv.meta||!j.opts.strictTypes||(U(j,I),j.opts.allowUnionTypes||O(j,I),A(j,j.dataTypes))}function U(j,I){if(I.length){if(!j.dataTypes.length){j.dataTypes=I;return}I.forEach(M=>{l(j.dataTypes,M)||C(j,`type "${M}" not allowed by context "${j.dataTypes.join(",")}"`)}),b(j,I)}}function O(j,I){I.length>1&&!(I.length===2&&I.includes("null"))&&C(j,"use allowUnionTypes to allow union type keyword")}function A(j,I){const M=j.self.RULES.all;for(const z in M){const G=M[z];if(typeof G=="object"&&(0,$.shouldUseRule)(j.schema,G)){const{type:B}=G.definition;B.length&&!B.some(ee=>T(I,ee))&&C(j,`missing type "${B.join(",")}" for keyword "${z}"`)}}}function T(j,I){return j.includes(I)||I==="number"&&j.includes("integer")}function l(j,I){return j.includes(I)||I==="integer"&&j.includes("number")}function b(j,I){const M=[];for(const z of j.dataTypes)l(I,z)?M.push(z):I.includes("integer")&&z==="number"&&M.push("integer");j.dataTypes=M}function C(j,I){const M=j.schemaEnv.baseId+j.errSchemaPath;I+=` at "${M}" (strictTypes)`,(0,_.checkStrictMode)(j,I,j.opts.strictTypes)}class L{constructor(I,M,z){if((0,a.validateKeywordUsage)(I,M,z),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=z,this.data=I.data,this.schema=I.schema[z],this.$data=M.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,_.schemaRefOrVal)(I,this.schema,z,this.$data),this.schemaType=M.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=M,this.$data)this.schemaCode=I.gen.const("vSchema",q(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${z} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=I.gen.const("_errs",d.default.errors))}result(I,M,z){this.failResult((0,i.not)(I),M,z)}failResult(I,M,z){this.gen.if(I),z?z():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,M){this.failResult((0,i.not)(I),void 0,M)}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(I){if(!this.$data)return this.fail(I);const{schemaCode:M}=this;this.fail((0,i._)`${M} !== undefined && (${(0,i.or)(this.invalid$data(),I)})`)}error(I,M,z){if(M){this.setParams(M),this._error(I,z),this.setParams({});return}this._error(I,z)}_error(I,M){(I?P.reportExtraError:P.reportError)(this,this.def.error,M)}$dataError(){(0,P.reportError)(this,this.def.$dataError||P.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,P.resetErrorsCount)(this.gen,this.errsCount)}ok(I){this.allErrors||this.gen.if(I)}setParams(I,M){M?Object.assign(this.params,I):this.params=I}block$data(I,M,z=i.nil){this.gen.block(()=>{this.check$data(I,z),M()})}check$data(I=i.nil,M=i.nil){if(!this.$data)return;const{gen:z,schemaCode:G,schemaType:B,def:ee}=this;z.if((0,i.or)((0,i._)`${G} === undefined`,M)),I!==i.nil&&z.assign(I,!0),(B.length||ee.validateSchema)&&(z.elseIf(this.invalid$data()),this.$dataError(),I!==i.nil&&z.assign(I,!1)),z.else()}invalid$data(){const{gen:I,schemaCode:M,schemaType:z,def:G,it:B}=this;return(0,i.or)(ee(),ae());function ee(){if(z.length){if(!(M instanceof i.Name))throw new Error("ajv implementation error");const re=Array.isArray(z)?z:[z];return(0,i._)`${(0,p.checkDataTypes)(re,M,B.opts.strictNumbers,p.DataType.Wrong)}`}return i.nil}function ae(){if(G.validateSchema){const re=I.scopeValue("validate$data",{ref:G.validateSchema});return(0,i._)`!${re}(${M})`}return i.nil}}subschema(I,M){const z=(0,g.getSubschema)(this.it,I);(0,g.extendSubschemaData)(z,this.it,I),(0,g.extendSubschemaMode)(z,I);const G={...this.it,...z,items:void 0,props:void 0};return o(G,M),G}mergeEvaluated(I,M){const{it:z,gen:G}=this;z.opts.unevaluated&&(z.props!==!0&&I.props!==void 0&&(z.props=_.mergeEvaluated.props(G,I.props,z.props,M)),z.items!==!0&&I.items!==void 0&&(z.items=_.mergeEvaluated.items(G,I.items,z.items,M)))}mergeValidEvaluated(I,