@anov/cic-standard-sdk 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class ys{config;constructor(t){this.config=t}getConfig(){return this.config}findComponent(t){let r;return this.walkComponents(n=>n.id===t?(r=n,!1):!0),r}findPageByComponent(t){let r;return this.walkComponents((n,o)=>n.id===t?(r=o,!1):!0),r}getVariable(t,r){const n=this.config.variables;if(n){if(t.componentId&&n.component&&n.component[t.componentId]){const o=n.component[t.componentId][r];if(o)return o.value??o.default}if(t.pageId&&n.page&&n.page[t.pageId]){const o=n.page[t.pageId][r];if(o)return o.value??o.default}if(n.global&&n.global[r]){const o=n.global[r];return o.value??o.default}}}getVariableByRef(t){const r=t.match(/^(global|page|component)(?::([^\.]+))?\.(.+)$/);if(!r)return;const[,n,o,s]=r;if(n==="global")return this.getVariable({},s);if(n==="page")return this.getVariable({pageId:o},s);if(n==="component")return this.getVariable({componentId:o},s)}walkComponents(t){if(this.config.pages)for(const r of this.config.pages){const n=[];for(const s of r.components||[])n.push({node:s});let o=!1;for(;n.length>0&&!o;){const{node:s,parent:c}=n.pop();if(t(s,r,c)===!1){o=!0;break}if(s.children&&s.children.length>0)for(let u=s.children.length-1;u>=0;u--)n.push({node:s.children[u],parent:s})}if(o)break}}}function Nn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ze={exports:{}},Ut={},_e={},Ee={},Kt={},Jt={},Ht={},lr;function kt(){return lr||(lr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(a){if(super(),!e.IDENTIFIER.test(a))throw new Error("CodeGen: name must be a valid identifier");this.str=a}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(a){super(),this._items=typeof a=="string"?[a]:a}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const a=this._items[0];return a===""||a==='""'}get str(){var a;return(a=this._str)!==null&&a!==void 0?a:this._str=this._items.reduce((l,y)=>`${l}${y}`,"")}get names(){var a;return(a=this._names)!==null&&a!==void 0?a:this._names=this._items.reduce((l,y)=>(y instanceof r&&(l[y.str]=(l[y.str]||0)+1),l),{})}}e._Code=n,e.nil=new n("");function o(p,...a){const l=[p[0]];let y=0;for(;y<a.length;)i(l,a[y]),l.push(p[++y]);return new n(l)}e._=o;const s=new n("+");function c(p,...a){const l=[g(p[0])];let y=0;for(;y<a.length;)l.push(s),i(l,a[y]),l.push(s,g(p[++y]));return u(l),new n(l)}e.str=c;function i(p,a){a instanceof n?p.push(...a._items):a instanceof r?p.push(a):p.push(E(a))}e.addCodeArg=i;function u(p){let a=1;for(;a<p.length-1;){if(p[a]===s){const l=v(p[a-1],p[a+1]);if(l!==void 0){p.splice(a-1,3,l);continue}p[a++]="+"}a++}}function v(p,a){if(a==='""')return p;if(p==='""')return a;if(typeof p=="string")return a instanceof r||p[p.length-1]!=='"'?void 0:typeof a!="string"?`${p.slice(0,-1)}${a}"`:a[0]==='"'?p.slice(0,-1)+a.slice(1):void 0;if(typeof a=="string"&&a[0]==='"'&&!(p instanceof r))return`"${p}${a.slice(1)}`}function $(p,a){return a.emptyStr()?p:p.emptyStr()?a:c`${p}${a}`}e.strConcat=$;function E(p){return typeof p=="number"||typeof p=="boolean"||p===null?p:g(Array.isArray(p)?p.join(","):p)}function _(p){return new n(g(p))}e.stringify=_;function g(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=g;function b(p){return typeof p=="string"&&e.IDENTIFIER.test(p)?new n(`.${p}`):o`[${p}]`}e.getProperty=b;function w(p){if(typeof p=="string"&&e.IDENTIFIER.test(p))return new n(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}e.getEsmExportName=w;function f(p){return new n(p.toString())}e.regexpCode=f})(Ht)),Ht}var Gt={},fr;function pr(){return fr||(fr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=kt();class r extends Error{constructor(v){super(`CodeGen: "code" for ${v} not defined`),this.value=v.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:v,parent:$}={}){this._names={},this._prefixes=v,this._parent=$}toName(v){return v instanceof t.Name?v:this.name(v)}name(v){return new t.Name(this._newName(v))}_newName(v){const $=this._names[v]||this._nameGroup(v);return`${v}${$.index++}`}_nameGroup(v){var $,E;if(!((E=($=this._parent)===null||$===void 0?void 0:$._prefixes)===null||E===void 0)&&E.has(v)||this._prefixes&&!this._prefixes.has(v))throw new Error(`CodeGen: prefix "${v}" is not allowed in this scope`);return this._names[v]={prefix:v,index:0}}}e.Scope=o;class s extends t.Name{constructor(v,$){super($),this.prefix=v}setValue(v,{property:$,itemIndex:E}){this.value=v,this.scopePath=(0,t._)`.${new t.Name($)}[${E}]`}}e.ValueScopeName=s;const c=(0,t._)`\n`;class i extends o{constructor(v){super(v),this._values={},this._scope=v.scope,this.opts={...v,_n:v.lines?c:t.nil}}get(){return this._scope}name(v){return new s(v,this._newName(v))}value(v,$){var E;if($.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const _=this.toName(v),{prefix:g}=_,b=(E=$.key)!==null&&E!==void 0?E:$.ref;let w=this._values[g];if(w){const a=w.get(b);if(a)return a}else w=this._values[g]=new Map;w.set(b,_);const f=this._scope[g]||(this._scope[g]=[]),p=f.length;return f[p]=$.ref,_.setValue($,{property:g,itemIndex:p}),_}getValue(v,$){const E=this._values[v];if(E)return E.get($)}scopeRefs(v,$=this._values){return this._reduceValues($,E=>{if(E.scopePath===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return(0,t._)`${v}${E.scopePath}`})}scopeCode(v=this._values,$,E){return this._reduceValues(v,_=>{if(_.value===void 0)throw new Error(`CodeGen: name "${_}" has no value`);return _.value.code},$,E)}_reduceValues(v,$,E={},_){let g=t.nil;for(const b in v){const w=v[b];if(!w)continue;const f=E[b]=E[b]||new Map;w.forEach(p=>{if(f.has(p))return;f.set(p,n.Started);let a=$(p);if(a){const l=this.opts.es5?e.varKinds.var:e.varKinds.const;g=(0,t._)`${g}${l} ${p} = ${a};${this.opts._n}`}else if(a=_?.(p))g=(0,t._)`${g}${a}${this.opts._n}`;else throw new r(p);f.set(p,n.Completed)})}return g}}e.ValueScope=i})(Gt)),Gt}var mr;function G(){return mr||(mr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=kt(),r=pr();var n=kt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var o=pr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(m,S){return this}}class c extends s{constructor(m,S,N){super(),this.varKind=m,this.name=S,this.rhs=N}render({es5:m,_n:S}){const N=m?r.varKinds.var:this.varKind,U=this.rhs===void 0?"":` = ${this.rhs}`;return`${N} ${this.name}${U};`+S}optimizeNames(m,S){if(m[this.name.str])return this.rhs&&(this.rhs=F(this.rhs,m,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends s{constructor(m,S,N){super(),this.lhs=m,this.rhs=S,this.sideEffects=N}render({_n:m}){return`${this.lhs} = ${this.rhs};`+m}optimizeNames(m,S){if(!(this.lhs instanceof t.Name&&!m[this.lhs.str]&&!this.sideEffects))return this.rhs=F(this.rhs,m,S),this}get names(){const m=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(m,this.rhs)}}class u extends i{constructor(m,S,N,U){super(m,N,U),this.op=S}render({_n:m}){return`${this.lhs} ${this.op}= ${this.rhs};`+m}}class v extends s{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`${this.label}:`+m}}class $ extends s{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`break${this.label?` ${this.label}`:""};`+m}}class E extends s{constructor(m){super(),this.error=m}render({_n:m}){return`throw ${this.error};`+m}get names(){return this.error.names}}class _ extends s{constructor(m){super(),this.code=m}render({_n:m}){return`${this.code};`+m}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(m,S){return this.code=F(this.code,m,S),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class g extends s{constructor(m=[]){super(),this.nodes=m}render(m){return this.nodes.reduce((S,N)=>S+N.render(m),"")}optimizeNodes(){const{nodes:m}=this;let S=m.length;for(;S--;){const N=m[S].optimizeNodes();Array.isArray(N)?m.splice(S,1,...N):N?m[S]=N:m.splice(S,1)}return m.length>0?this:void 0}optimizeNames(m,S){const{nodes:N}=this;let U=N.length;for(;U--;){const J=N[U];J.optimizeNames(m,S)||(Q(m,J.names),N.splice(U,1))}return N.length>0?this:void 0}get names(){return this.nodes.reduce((m,S)=>V(m,S.names),{})}}class b extends g{render(m){return"{"+m._n+super.render(m)+"}"+m._n}}class w extends g{}class f extends b{}f.kind="else";class p extends b{constructor(m,S){super(S),this.condition=m}render(m){let S=`if(${this.condition})`+super.render(m);return this.else&&(S+="else "+this.else.render(m)),S}optimizeNodes(){super.optimizeNodes();const m=this.condition;if(m===!0)return this.nodes;let S=this.else;if(S){const N=S.optimizeNodes();S=this.else=Array.isArray(N)?new f(N):N}if(S)return m===!1?S instanceof p?S:S.nodes:this.nodes.length?this:new p(ie(m),S instanceof p?[S]:S.nodes);if(!(m===!1||!this.nodes.length))return this}optimizeNames(m,S){var N;if(this.else=(N=this.else)===null||N===void 0?void 0:N.optimizeNames(m,S),!!(super.optimizeNames(m,S)||this.else))return this.condition=F(this.condition,m,S),this}get names(){const m=super.names;return z(m,this.condition),this.else&&V(m,this.else.names),m}}p.kind="if";class a extends b{}a.kind="for";class l extends a{constructor(m){super(),this.iteration=m}render(m){return`for(${this.iteration})`+super.render(m)}optimizeNames(m,S){if(super.optimizeNames(m,S))return this.iteration=F(this.iteration,m,S),this}get names(){return V(super.names,this.iteration.names)}}class y extends a{constructor(m,S,N,U){super(),this.varKind=m,this.name=S,this.from=N,this.to=U}render(m){const S=m.es5?r.varKinds.var:this.varKind,{name:N,from:U,to:J}=this;return`for(${S} ${N}=${U}; ${N}<${J}; ${N}++)`+super.render(m)}get names(){const m=z(super.names,this.from);return z(m,this.to)}}class d extends a{constructor(m,S,N,U){super(),this.loop=m,this.varKind=S,this.name=N,this.iterable=U}render(m){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(m)}optimizeNames(m,S){if(super.optimizeNames(m,S))return this.iterable=F(this.iterable,m,S),this}get names(){return V(super.names,this.iterable.names)}}class h extends b{constructor(m,S,N){super(),this.name=m,this.args=S,this.async=N}render(m){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(m)}}h.kind="func";class P extends g{render(m){return"return "+super.render(m)}}P.kind="return";class I extends b{render(m){let S="try"+super.render(m);return this.catch&&(S+=this.catch.render(m)),this.finally&&(S+=this.finally.render(m)),S}optimizeNodes(){var m,S;return super.optimizeNodes(),(m=this.catch)===null||m===void 0||m.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(m,S){var N,U;return super.optimizeNames(m,S),(N=this.catch)===null||N===void 0||N.optimizeNames(m,S),(U=this.finally)===null||U===void 0||U.optimizeNames(m,S),this}get names(){const m=super.names;return this.catch&&V(m,this.catch.names),this.finally&&V(m,this.finally.names),m}}class T extends b{constructor(m){super(),this.error=m}render(m){return`catch(${this.error})`+super.render(m)}}T.kind="catch";class L extends b{render(m){return"finally"+super.render(m)}}L.kind="finally";class O{constructor(m,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.lines?`
2
- `:""},this._extScope=m,this._scope=new r.Scope({parent:m}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(m){return this._scope.name(m)}scopeName(m){return this._extScope.name(m)}scopeValue(m,S){const N=this._extScope.value(m,S);return(this._values[N.prefix]||(this._values[N.prefix]=new Set)).add(N),N}getScopeValue(m,S){return this._extScope.getValue(m,S)}scopeRefs(m){return this._extScope.scopeRefs(m,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(m,S,N,U){const J=this._scope.toName(S);return N!==void 0&&U&&(this._constants[J.str]=N),this._leafNode(new c(m,J,N)),J}const(m,S,N){return this._def(r.varKinds.const,m,S,N)}let(m,S,N){return this._def(r.varKinds.let,m,S,N)}var(m,S,N){return this._def(r.varKinds.var,m,S,N)}assign(m,S,N){return this._leafNode(new i(m,S,N))}add(m,S){return this._leafNode(new u(m,e.operators.ADD,S))}code(m){return typeof m=="function"?m():m!==t.nil&&this._leafNode(new _(m)),this}object(...m){const S=["{"];for(const[N,U]of m)S.length>1&&S.push(","),S.push(N),(N!==U||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,U));return S.push("}"),new t._Code(S)}if(m,S,N){if(this._blockNode(new p(m)),S&&N)this.code(S).else().code(N).endIf();else if(S)this.code(S).endIf();else if(N)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(m){return this._elseNode(new p(m))}else(){return this._elseNode(new f)}endIf(){return this._endBlockNode(p,f)}_for(m,S){return this._blockNode(m),S&&this.code(S).endFor(),this}for(m,S){return this._for(new l(m),S)}forRange(m,S,N,U,J=this.opts.es5?r.varKinds.var:r.varKinds.let){const Y=this._scope.toName(m);return this._for(new y(J,Y,S,N),()=>U(Y))}forOf(m,S,N,U=r.varKinds.const){const J=this._scope.toName(m);if(this.opts.es5){const Y=S instanceof t.Name?S:this.var("_arr",S);return this.forRange("_i",0,(0,t._)`${Y}.length`,W=>{this.var(J,(0,t._)`${Y}[${W}]`),N(J)})}return this._for(new d("of",U,J,S),()=>N(J))}forIn(m,S,N,U=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(m,(0,t._)`Object.keys(${S})`,N);const J=this._scope.toName(m);return this._for(new d("in",U,J,S),()=>N(J))}endFor(){return this._endBlockNode(a)}label(m){return this._leafNode(new v(m))}break(m){return this._leafNode(new $(m))}return(m){const S=new P;if(this._blockNode(S),this.code(m),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(m,S,N){if(!S&&!N)throw new Error('CodeGen: "try" without "catch" and "finally"');const U=new I;if(this._blockNode(U),this.code(m),S){const J=this.name("e");this._currNode=U.catch=new T(J),S(J)}return N&&(this._currNode=U.finally=new L,this.code(N)),this._endBlockNode(T,L)}throw(m){return this._leafNode(new E(m))}block(m,S){return this._blockStarts.push(this._nodes.length),m&&this.code(m).endBlock(S),this}endBlock(m){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const N=this._nodes.length-S;if(N<0||m!==void 0&&N!==m)throw new Error(`CodeGen: wrong number of nodes: ${N} vs ${m} expected`);return this._nodes.length=S,this}func(m,S=t.nil,N,U){return this._blockNode(new h(m,S,N)),U&&this.code(U).endFunc(),this}endFunc(){return this._endBlockNode(h)}optimize(m=1){for(;m-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(m){return this._currNode.nodes.push(m),this}_blockNode(m){this._currNode.nodes.push(m),this._nodes.push(m)}_endBlockNode(m,S){const N=this._currNode;if(N instanceof m||S&&N instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${m.kind}/${S.kind}`:m.kind}"`)}_elseNode(m){const S=this._currNode;if(!(S instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=m,this}get _root(){return this._nodes[0]}get _currNode(){const m=this._nodes;return m[m.length-1]}set _currNode(m){const S=this._nodes;S[S.length-1]=m}}e.CodeGen=O;function V(C,m){for(const S in m)C[S]=(C[S]||0)+(m[S]||0);return C}function z(C,m){return m instanceof t._CodeOrName?V(C,m.names):C}function F(C,m,S){if(C instanceof t.Name)return N(C);if(!U(C))return C;return new t._Code(C._items.reduce((J,Y)=>(Y instanceof t.Name&&(Y=N(Y)),Y instanceof t._Code?J.push(...Y._items):J.push(Y),J),[]));function N(J){const Y=S[J.str];return Y===void 0||m[J.str]!==1?J:(delete m[J.str],Y)}function U(J){return J instanceof t._Code&&J._items.some(Y=>Y instanceof t.Name&&m[Y.str]===1&&S[Y.str]!==void 0)}}function Q(C,m){for(const S in m)C[S]=(C[S]||0)-(m[S]||0)}function ie(C){return typeof C=="boolean"||typeof C=="number"||C===null?!C:(0,t._)`!${D(C)}`}e.not=ie;const oe=j(e.operators.AND);function X(...C){return C.reduce(oe)}e.and=X;const pe=j(e.operators.OR);function M(...C){return C.reduce(pe)}e.or=M;function j(C){return(m,S)=>m===t.nil?S:S===t.nil?m:(0,t._)`${D(m)} ${C} ${D(S)}`}function D(C){return C instanceof t.Name?C:(0,t._)`(${C})`}})(Jt)),Jt}var H={},hr;function B(){if(hr)return H;hr=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=G(),t=kt();function r(d){const h={};for(const P of d)h[P]=!0;return h}H.toHash=r;function n(d,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(o(d,h),!s(h,d.self.RULES.all))}H.alwaysValidSchema=n;function o(d,h=d.schema){const{opts:P,self:I}=d;if(!P.strictSchema||typeof h=="boolean")return;const T=I.RULES.keywords;for(const L in h)T[L]||y(d,`unknown keyword: "${L}"`)}H.checkUnknownRules=o;function s(d,h){if(typeof d=="boolean")return!d;for(const P in d)if(h[P])return!0;return!1}H.schemaHasRules=s;function c(d,h){if(typeof d=="boolean")return!d;for(const P in d)if(P!=="$ref"&&h.all[P])return!0;return!1}H.schemaHasRulesButRef=c;function i({topSchemaRef:d,schemaPath:h},P,I,T){if(!T){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,e._)`${P}`}return(0,e._)`${d}${h}${(0,e.getProperty)(I)}`}H.schemaRefOrVal=i;function u(d){return E(decodeURIComponent(d))}H.unescapeFragment=u;function v(d){return encodeURIComponent($(d))}H.escapeFragment=v;function $(d){return typeof d=="number"?`${d}`:d.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=$;function E(d){return d.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=E;function _(d,h){if(Array.isArray(d))for(const P of d)h(P);else h(d)}H.eachItem=_;function g({mergeNames:d,mergeToName:h,mergeValues:P,resultToName:I}){return(T,L,O,V)=>{const z=O===void 0?L:O instanceof e.Name?(L instanceof e.Name?d(T,L,O):h(T,L,O),O):L instanceof e.Name?(h(T,O,L),L):P(L,O);return V===e.Name&&!(z instanceof e.Name)?I(T,z):z}}H.mergeEvaluated={props:g({mergeNames:(d,h,P)=>d.if((0,e._)`${P} !== true && ${h} !== undefined`,()=>{d.if((0,e._)`${h} === true`,()=>d.assign(P,!0),()=>d.assign(P,(0,e._)`${P} || {}`).code((0,e._)`Object.assign(${P}, ${h})`))}),mergeToName:(d,h,P)=>d.if((0,e._)`${P} !== true`,()=>{h===!0?d.assign(P,!0):(d.assign(P,(0,e._)`${P} || {}`),w(d,P,h))}),mergeValues:(d,h)=>d===!0?!0:{...d,...h},resultToName:b}),items:g({mergeNames:(d,h,P)=>d.if((0,e._)`${P} !== true && ${h} !== undefined`,()=>d.assign(P,(0,e._)`${h} === true ? true : ${P} > ${h} ? ${P} : ${h}`)),mergeToName:(d,h,P)=>d.if((0,e._)`${P} !== true`,()=>d.assign(P,h===!0?!0:(0,e._)`${P} > ${h} ? ${P} : ${h}`)),mergeValues:(d,h)=>d===!0?!0:Math.max(d,h),resultToName:(d,h)=>d.var("items",h)})};function b(d,h){if(h===!0)return d.var("props",!0);const P=d.var("props",(0,e._)`{}`);return h!==void 0&&w(d,P,h),P}H.evaluatedPropsToName=b;function w(d,h,P){Object.keys(P).forEach(I=>d.assign((0,e._)`${h}${(0,e.getProperty)(I)}`,!0))}H.setEvaluated=w;const f={};function p(d,h){return d.scopeValue("func",{ref:h,code:f[h.code]||(f[h.code]=new t._Code(h.code))})}H.useFunc=p;var a;(function(d){d[d.Num=0]="Num",d[d.Str=1]="Str"})(a||(H.Type=a={}));function l(d,h,P){if(d instanceof e.Name){const I=h===a.Num;return P?I?(0,e._)`"[" + ${d} + "]"`:(0,e._)`"['" + ${d} + "']"`:I?(0,e._)`"/" + ${d}`:(0,e._)`"/" + ${d}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,e.getProperty)(d).toString():"/"+$(d)}H.getErrorPath=l;function y(d,h,P=d.opts.strictSchema){if(P){if(h=`strict mode: ${h}`,P===!0)throw new Error(h);d.self.logger.warn(h)}}return H.checkStrictMode=y,H}var Fe={},yr;function Se(){if(yr)return Fe;yr=1,Object.defineProperty(Fe,"__esModule",{value:!0});const e=G(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Fe.default=t,Fe}var gr;function Tt(){return gr||(gr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=G(),r=B(),n=Se();e.keywordError={message:({keyword:f})=>(0,t.str)`must pass "${f}" keyword validation`},e.keyword$DataError={message:({keyword:f,schemaType:p})=>p?(0,t.str)`"${f}" keyword must be ${p} ($data)`:(0,t.str)`"${f}" keyword is invalid ($data)`};function o(f,p=e.keywordError,a,l){const{it:y}=f,{gen:d,compositeRule:h,allErrors:P}=y,I=E(f,p,a);l??(h||P)?u(d,I):v(y,(0,t._)`[${I}]`)}e.reportError=o;function s(f,p=e.keywordError,a){const{it:l}=f,{gen:y,compositeRule:d,allErrors:h}=l,P=E(f,p,a);u(y,P),d||h||v(l,n.default.vErrors)}e.reportExtraError=s;function c(f,p){f.assign(n.default.errors,p),f.if((0,t._)`${n.default.vErrors} !== null`,()=>f.if(p,()=>f.assign((0,t._)`${n.default.vErrors}.length`,p),()=>f.assign(n.default.vErrors,null)))}e.resetErrorsCount=c;function i({gen:f,keyword:p,schemaValue:a,data:l,errsCount:y,it:d}){if(y===void 0)throw new Error("ajv implementation error");const h=f.name("err");f.forRange("i",y,n.default.errors,P=>{f.const(h,(0,t._)`${n.default.vErrors}[${P}]`),f.if((0,t._)`${h}.instancePath === undefined`,()=>f.assign((0,t._)`${h}.instancePath`,(0,t.strConcat)(n.default.instancePath,d.errorPath))),f.assign((0,t._)`${h}.schemaPath`,(0,t.str)`${d.errSchemaPath}/${p}`),d.opts.verbose&&(f.assign((0,t._)`${h}.schema`,a),f.assign((0,t._)`${h}.data`,l))})}e.extendErrors=i;function u(f,p){const a=f.const("err",p);f.if((0,t._)`${n.default.vErrors} === null`,()=>f.assign(n.default.vErrors,(0,t._)`[${a}]`),(0,t._)`${n.default.vErrors}.push(${a})`),f.code((0,t._)`${n.default.errors}++`)}function v(f,p){const{gen:a,validateName:l,schemaEnv:y}=f;y.$async?a.throw((0,t._)`new ${f.ValidationError}(${p})`):(a.assign((0,t._)`${l}.errors`,p),a.return(!1))}const $={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function E(f,p,a){const{createErrors:l}=f.it;return l===!1?(0,t._)`{}`:_(f,p,a)}function _(f,p,a={}){const{gen:l,it:y}=f,d=[g(y,a),b(f,a)];return w(f,p,d),l.object(...d)}function g({errorPath:f},{instancePath:p}){const a=p?(0,t.str)`${f}${(0,r.getErrorPath)(p,r.Type.Str)}`:f;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,a)]}function b({keyword:f,it:{errSchemaPath:p}},{schemaPath:a,parentSchema:l}){let y=l?p:(0,t.str)`${p}/${f}`;return a&&(y=(0,t.str)`${y}${(0,r.getErrorPath)(a,r.Type.Str)}`),[$.schemaPath,y]}function w(f,{params:p,message:a},l){const{keyword:y,data:d,schemaValue:h,it:P}=f,{opts:I,propertyName:T,topSchemaRef:L,schemaPath:O}=P;l.push([$.keyword,y],[$.params,typeof p=="function"?p(f):p||(0,t._)`{}`]),I.messages&&l.push([$.message,typeof a=="function"?a(f):a]),I.verbose&&l.push([$.schema,h],[$.parentSchema,(0,t._)`${L}${O}`],[n.default.data,d]),T&&l.push([$.propertyName,T])}})(Kt)),Kt}var vr;function gs(){if(vr)return Ee;vr=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.boolOrEmptySchema=Ee.topBoolOrEmptySchema=void 0;const e=Tt(),t=G(),r=Se(),n={message:"boolean schema is false"};function o(i){const{gen:u,schema:v,validateName:$}=i;v===!1?c(i,!1):typeof v=="object"&&v.$async===!0?u.return(r.default.data):(u.assign((0,t._)`${$}.errors`,null),u.return(!0))}Ee.topBoolOrEmptySchema=o;function s(i,u){const{gen:v,schema:$}=i;$===!1?(v.var(u,!1),c(i)):v.var(u,!0)}Ee.boolOrEmptySchema=s;function c(i,u){const{gen:v,data:$}=i,E={gen:v,keyword:"false schema",data:$,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(E,n,void 0,u)}return Ee}var se={},ke={},_r;function On(){if(_r)return ke;_r=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getRules=ke.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(o){return typeof o=="string"&&t.has(o)}ke.isJSONType=r;function n(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return ke.getRules=n,ke}var $e={},$r;function qn(){if($r)return $e;$r=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.shouldUseRule=$e.shouldUseGroup=$e.schemaHasRulesForType=void 0;function e({schema:n,self:o},s){const c=o.RULES.types[s];return c&&c!==!0&&t(n,c)}$e.schemaHasRulesForType=e;function t(n,o){return o.rules.some(s=>r(n,s))}$e.shouldUseGroup=t;function r(n,o){var s;return n[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(c=>n[c]!==void 0))}return $e.shouldUseRule=r,$e}var br;function jt(){if(br)return se;br=1,Object.defineProperty(se,"__esModule",{value:!0}),se.reportTypeError=se.checkDataTypes=se.checkDataType=se.coerceAndCheckDataType=se.getJSONTypes=se.getSchemaTypes=se.DataType=void 0;const e=On(),t=qn(),r=Tt(),n=G(),o=B();var s;(function(a){a[a.Correct=0]="Correct",a[a.Wrong=1]="Wrong"})(s||(se.DataType=s={}));function c(a){const l=i(a.type);if(l.includes("null")){if(a.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!l.length&&a.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');a.nullable===!0&&l.push("null")}return l}se.getSchemaTypes=c;function i(a){const l=Array.isArray(a)?a:a?[a]:[];if(l.every(e.isJSONType))return l;throw new Error("type must be JSONType or JSONType[]: "+l.join(","))}se.getJSONTypes=i;function u(a,l){const{gen:y,data:d,opts:h}=a,P=$(l,h.coerceTypes),I=l.length>0&&!(P.length===0&&l.length===1&&(0,t.schemaHasRulesForType)(a,l[0]));if(I){const T=b(l,d,h.strictNumbers,s.Wrong);y.if(T,()=>{P.length?E(a,l,P):f(a)})}return I}se.coerceAndCheckDataType=u;const v=new Set(["string","number","integer","boolean","null"]);function $(a,l){return l?a.filter(y=>v.has(y)||l==="array"&&y==="array"):[]}function E(a,l,y){const{gen:d,data:h,opts:P}=a,I=d.let("dataType",(0,n._)`typeof ${h}`),T=d.let("coerced",(0,n._)`undefined`);P.coerceTypes==="array"&&d.if((0,n._)`${I} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>d.assign(h,(0,n._)`${h}[0]`).assign(I,(0,n._)`typeof ${h}`).if(b(l,h,P.strictNumbers),()=>d.assign(T,h))),d.if((0,n._)`${T} !== undefined`);for(const O of y)(v.has(O)||O==="array"&&P.coerceTypes==="array")&&L(O);d.else(),f(a),d.endIf(),d.if((0,n._)`${T} !== undefined`,()=>{d.assign(h,T),_(a,T)});function L(O){switch(O){case"string":d.elseIf((0,n._)`${I} == "number" || ${I} == "boolean"`).assign(T,(0,n._)`"" + ${h}`).elseIf((0,n._)`${h} === null`).assign(T,(0,n._)`""`);return;case"number":d.elseIf((0,n._)`${I} == "boolean" || ${h} === null
3
- || (${I} == "string" && ${h} && ${h} == +${h})`).assign(T,(0,n._)`+${h}`);return;case"integer":d.elseIf((0,n._)`${I} === "boolean" || ${h} === null
4
- || (${I} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(T,(0,n._)`+${h}`);return;case"boolean":d.elseIf((0,n._)`${h} === "false" || ${h} === 0 || ${h} === null`).assign(T,!1).elseIf((0,n._)`${h} === "true" || ${h} === 1`).assign(T,!0);return;case"null":d.elseIf((0,n._)`${h} === "" || ${h} === 0 || ${h} === false`),d.assign(T,null);return;case"array":d.elseIf((0,n._)`${I} === "string" || ${I} === "number"
5
- || ${I} === "boolean" || ${h} === null`).assign(T,(0,n._)`[${h}]`)}}}function _({gen:a,parentData:l,parentDataProperty:y},d){a.if((0,n._)`${l} !== undefined`,()=>a.assign((0,n._)`${l}[${y}]`,d))}function g(a,l,y,d=s.Correct){const h=d===s.Correct?n.operators.EQ:n.operators.NEQ;let P;switch(a){case"null":return(0,n._)`${l} ${h} null`;case"array":P=(0,n._)`Array.isArray(${l})`;break;case"object":P=(0,n._)`${l} && typeof ${l} == "object" && !Array.isArray(${l})`;break;case"integer":P=I((0,n._)`!(${l} % 1) && !isNaN(${l})`);break;case"number":P=I();break;default:return(0,n._)`typeof ${l} ${h} ${a}`}return d===s.Correct?P:(0,n.not)(P);function I(T=n.nil){return(0,n.and)((0,n._)`typeof ${l} == "number"`,T,y?(0,n._)`isFinite(${l})`:n.nil)}}se.checkDataType=g;function b(a,l,y,d){if(a.length===1)return g(a[0],l,y,d);let h;const P=(0,o.toHash)(a);if(P.array&&P.object){const I=(0,n._)`typeof ${l} != "object"`;h=P.null?I:(0,n._)`!${l} || ${I}`,delete P.null,delete P.array,delete P.object}else h=n.nil;P.number&&delete P.integer;for(const I in P)h=(0,n.and)(h,g(I,l,y,d));return h}se.checkDataTypes=b;const w={message:({schema:a})=>`must be ${a}`,params:({schema:a,schemaValue:l})=>typeof a=="string"?(0,n._)`{type: ${a}}`:(0,n._)`{type: ${l}}`};function f(a){const l=p(a);(0,r.reportError)(l,w)}se.reportTypeError=f;function p(a){const{gen:l,data:y,schema:d}=a,h=(0,o.schemaRefOrVal)(a,d,"type");return{gen:l,keyword:"type",data:y,schema:d.type,schemaCode:h,schemaValue:h,parentSchema:d,params:{},it:a}}return se}var qe={},wr;function vs(){if(wr)return qe;wr=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.assignDefaults=void 0;const e=G(),t=B();function r(o,s){const{properties:c,items:i}=o.schema;if(s==="object"&&c)for(const u in c)n(o,u,c[u].default);else s==="array"&&Array.isArray(i)&&i.forEach((u,v)=>n(o,v,u.default))}qe.assignDefaults=r;function n(o,s,c){const{gen:i,compositeRule:u,data:v,opts:$}=o;if(c===void 0)return;const E=(0,e._)`${v}${(0,e.getProperty)(s)}`;if(u){(0,t.checkStrictMode)(o,`default is ignored for: ${E}`);return}let _=(0,e._)`${E} === undefined`;$.useDefaults==="empty"&&(_=(0,e._)`${_} || ${E} === null || ${E} === ""`),i.if(_,(0,e._)`${E} = ${(0,e.stringify)(c)}`)}return qe}var he={},Z={},Pr;function ge(){if(Pr)return Z;Pr=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.validateUnion=Z.validateArray=Z.usePattern=Z.callValidateCode=Z.schemaProperties=Z.allSchemaProperties=Z.noPropertyInData=Z.propertyInData=Z.isOwnProperty=Z.hasPropFunc=Z.reportMissingProp=Z.checkMissingProp=Z.checkReportMissingProp=void 0;const e=G(),t=B(),r=Se(),n=B();function o(a,l){const{gen:y,data:d,it:h}=a;y.if($(y,d,l,h.opts.ownProperties),()=>{a.setParams({missingProperty:(0,e._)`${l}`},!0),a.error()})}Z.checkReportMissingProp=o;function s({gen:a,data:l,it:{opts:y}},d,h){return(0,e.or)(...d.map(P=>(0,e.and)($(a,l,P,y.ownProperties),(0,e._)`${h} = ${P}`)))}Z.checkMissingProp=s;function c(a,l){a.setParams({missingProperty:l},!0),a.error()}Z.reportMissingProp=c;function i(a){return a.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Z.hasPropFunc=i;function u(a,l,y){return(0,e._)`${i(a)}.call(${l}, ${y})`}Z.isOwnProperty=u;function v(a,l,y,d){const h=(0,e._)`${l}${(0,e.getProperty)(y)} !== undefined`;return d?(0,e._)`${h} && ${u(a,l,y)}`:h}Z.propertyInData=v;function $(a,l,y,d){const h=(0,e._)`${l}${(0,e.getProperty)(y)} === undefined`;return d?(0,e.or)(h,(0,e.not)(u(a,l,y))):h}Z.noPropertyInData=$;function E(a){return a?Object.keys(a).filter(l=>l!=="__proto__"):[]}Z.allSchemaProperties=E;function _(a,l){return E(l).filter(y=>!(0,t.alwaysValidSchema)(a,l[y]))}Z.schemaProperties=_;function g({schemaCode:a,data:l,it:{gen:y,topSchemaRef:d,schemaPath:h,errorPath:P},it:I},T,L,O){const V=O?(0,e._)`${a}, ${l}, ${d}${h}`:l,z=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,P)],[r.default.parentData,I.parentData],[r.default.parentDataProperty,I.parentDataProperty],[r.default.rootData,r.default.rootData]];I.opts.dynamicRef&&z.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const F=(0,e._)`${V}, ${y.object(...z)}`;return L!==e.nil?(0,e._)`${T}.call(${L}, ${F})`:(0,e._)`${T}(${F})`}Z.callValidateCode=g;const b=(0,e._)`new RegExp`;function w({gen:a,it:{opts:l}},y){const d=l.unicodeRegExp?"u":"",{regExp:h}=l.code,P=h(y,d);return a.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,e._)`${h.code==="new RegExp"?b:(0,n.useFunc)(a,h)}(${y}, ${d})`})}Z.usePattern=w;function f(a){const{gen:l,data:y,keyword:d,it:h}=a,P=l.name("valid");if(h.allErrors){const T=l.let("valid",!0);return I(()=>l.assign(T,!1)),T}return l.var(P,!0),I(()=>l.break()),P;function I(T){const L=l.const("len",(0,e._)`${y}.length`);l.forRange("i",0,L,O=>{a.subschema({keyword:d,dataProp:O,dataPropType:t.Type.Num},P),l.if((0,e.not)(P),T)})}}Z.validateArray=f;function p(a){const{gen:l,schema:y,keyword:d,it:h}=a;if(!Array.isArray(y))throw new Error("ajv implementation error");if(y.some(L=>(0,t.alwaysValidSchema)(h,L))&&!h.opts.unevaluated)return;const I=l.let("valid",!1),T=l.name("_valid");l.block(()=>y.forEach((L,O)=>{const V=a.subschema({keyword:d,schemaProp:O,compositeRule:!0},T);l.assign(I,(0,e._)`${I} || ${T}`),a.mergeValidEvaluated(V,T)||l.if((0,e.not)(I))})),a.result(I,()=>a.reset(),()=>a.error(!0))}return Z.validateUnion=p,Z}var Sr;function _s(){if(Sr)return he;Sr=1,Object.defineProperty(he,"__esModule",{value:!0}),he.validateKeywordUsage=he.validSchemaType=he.funcKeywordCode=he.macroKeywordCode=void 0;const e=G(),t=Se(),r=ge(),n=Tt();function o(_,g){const{gen:b,keyword:w,schema:f,parentSchema:p,it:a}=_,l=g.macro.call(a.self,f,p,a),y=v(b,w,l);a.opts.validateSchema!==!1&&a.self.validateSchema(l,!0);const d=b.name("valid");_.subschema({schema:l,schemaPath:e.nil,errSchemaPath:`${a.errSchemaPath}/${w}`,topSchemaRef:y,compositeRule:!0},d),_.pass(d,()=>_.error(!0))}he.macroKeywordCode=o;function s(_,g){var b;const{gen:w,keyword:f,schema:p,parentSchema:a,$data:l,it:y}=_;u(y,g);const d=!l&&g.compile?g.compile.call(y.self,p,a,y):g.validate,h=v(w,f,d),P=w.let("valid");_.block$data(P,I),_.ok((b=g.valid)!==null&&b!==void 0?b:P);function I(){if(g.errors===!1)O(),g.modifying&&c(_),V(()=>_.error());else{const z=g.async?T():L();g.modifying&&c(_),V(()=>i(_,z))}}function T(){const z=w.let("ruleErrs",null);return w.try(()=>O((0,e._)`await `),F=>w.assign(P,!1).if((0,e._)`${F} instanceof ${y.ValidationError}`,()=>w.assign(z,(0,e._)`${F}.errors`),()=>w.throw(F))),z}function L(){const z=(0,e._)`${h}.errors`;return w.assign(z,null),O(e.nil),z}function O(z=g.async?(0,e._)`await `:e.nil){const F=y.opts.passContext?t.default.this:t.default.self,Q=!("compile"in g&&!l||g.schema===!1);w.assign(P,(0,e._)`${z}${(0,r.callValidateCode)(_,h,F,Q)}`,g.modifying)}function V(z){var F;w.if((0,e.not)((F=g.valid)!==null&&F!==void 0?F:P),z)}}he.funcKeywordCode=s;function c(_){const{gen:g,data:b,it:w}=_;g.if(w.parentData,()=>g.assign(b,(0,e._)`${w.parentData}[${w.parentDataProperty}]`))}function i(_,g){const{gen:b}=_;b.if((0,e._)`Array.isArray(${g})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${g} : ${t.default.vErrors}.concat(${g})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(_)},()=>_.error())}function u({schemaEnv:_},g){if(g.async&&!_.$async)throw new Error("async keyword in sync schema")}function v(_,g,b){if(b===void 0)throw new Error(`keyword "${g}" failed to compile`);return _.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function $(_,g,b=!1){return!g.length||g.some(w=>w==="array"?Array.isArray(_):w==="object"?_&&typeof _=="object"&&!Array.isArray(_):typeof _==w||b&&typeof _>"u")}he.validSchemaType=$;function E({schema:_,opts:g,self:b,errSchemaPath:w},f,p){if(Array.isArray(f.keyword)?!f.keyword.includes(p):f.keyword!==p)throw new Error("ajv implementation error");const a=f.dependencies;if(a?.some(l=>!Object.prototype.hasOwnProperty.call(_,l)))throw new Error(`parent schema must have dependencies of ${p}: ${a.join(",")}`);if(f.validateSchema&&!f.validateSchema(_[p])){const y=`keyword "${p}" value is invalid at path "${w}": `+b.errorsText(f.validateSchema.errors);if(g.validateSchema==="log")b.logger.error(y);else throw new Error(y)}}return he.validateKeywordUsage=E,he}var be={},Er;function $s(){if(Er)return be;Er=1,Object.defineProperty(be,"__esModule",{value:!0}),be.extendSubschemaMode=be.extendSubschemaData=be.getSubschema=void 0;const e=G(),t=B();function r(s,{keyword:c,schemaProp:i,schema:u,schemaPath:v,errSchemaPath:$,topSchemaRef:E}){if(c!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const _=s.schema[c];return i===void 0?{schema:_,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${c}`}:{schema:_[i],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(i)}`,errSchemaPath:`${s.errSchemaPath}/${c}/${(0,t.escapeFragment)(i)}`}}if(u!==void 0){if(v===void 0||$===void 0||E===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:v,topSchemaRef:E,errSchemaPath:$}}throw new Error('either "keyword" or "schema" must be passed')}be.getSubschema=r;function n(s,c,{dataProp:i,dataPropType:u,data:v,dataTypes:$,propertyName:E}){if(v!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:_}=c;if(i!==void 0){const{errorPath:b,dataPathArr:w,opts:f}=c,p=_.let("data",(0,e._)`${c.data}${(0,e.getProperty)(i)}`,!0);g(p),s.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(i,u,f.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${i}`,s.dataPathArr=[...w,s.parentDataProperty]}if(v!==void 0){const b=v instanceof e.Name?v:_.let("data",v,!0);g(b),E!==void 0&&(s.propertyName=E)}$&&(s.dataTypes=$);function g(b){s.data=b,s.dataLevel=c.dataLevel+1,s.dataTypes=[],c.definedProperties=new Set,s.parentData=c.data,s.dataNames=[...c.dataNames,b]}}be.extendSubschemaData=n;function o(s,{jtdDiscriminator:c,jtdMetadata:i,compositeRule:u,createErrors:v,allErrors:$}){u!==void 0&&(s.compositeRule=u),v!==void 0&&(s.createErrors=v),$!==void 0&&(s.allErrors=$),s.jtdDiscriminator=c,s.jtdMetadata=i}return be.extendSubschemaMode=o,be}var ae={},xt,kr;function Dn(){return kr||(kr=1,xt=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var c=s[o];if(!e(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}),xt}var Wt={exports:{}},jr;function bs(){if(jr)return Wt.exports;jr=1;var e=Wt.exports=function(n,o,s){typeof o=="function"&&(s=o,o={}),s=o.cb||s;var c=typeof s=="function"?s:s.pre||function(){},i=s.post||function(){};t(o,c,i,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,o,s,c,i,u,v,$,E,_){if(c&&typeof c=="object"&&!Array.isArray(c)){o(c,i,u,v,$,E,_);for(var g in c){var b=c[g];if(Array.isArray(b)){if(g in e.arrayKeywords)for(var w=0;w<b.length;w++)t(n,o,s,b[w],i+"/"+g+"/"+w,u,i,g,c,w)}else if(g in e.propsKeywords){if(b&&typeof b=="object")for(var f in b)t(n,o,s,b[f],i+"/"+g+"/"+r(f),u,i,g,c,f)}else(g in e.keywords||n.allKeys&&!(g in e.skipKeywords))&&t(n,o,s,b,i+"/"+g,u,i,g,c)}s(c,i,u,v,$,E,_)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Wt.exports}var Rr;function Mt(){if(Rr)return ae;Rr=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.getSchemaRefs=ae.resolveUrl=ae.normalizeId=ae._getFullPath=ae.getFullPath=ae.inlineRef=void 0;const e=B(),t=Dn(),r=bs(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(w,f=!0){return typeof w=="boolean"?!0:f===!0?!c(w):f?i(w)<=f:!1}ae.inlineRef=o;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(w){for(const f in w){if(s.has(f))return!0;const p=w[f];if(Array.isArray(p)&&p.some(c)||typeof p=="object"&&c(p))return!0}return!1}function i(w){let f=0;for(const p in w){if(p==="$ref")return 1/0;if(f++,!n.has(p)&&(typeof w[p]=="object"&&(0,e.eachItem)(w[p],a=>f+=i(a)),f===1/0))return 1/0}return f}function u(w,f="",p){p!==!1&&(f=E(f));const a=w.parse(f);return v(w,a)}ae.getFullPath=u;function v(w,f){return w.serialize(f).split("#")[0]+"#"}ae._getFullPath=v;const $=/#\/?$/;function E(w){return w?w.replace($,""):""}ae.normalizeId=E;function _(w,f,p){return p=E(p),w.resolve(f,p)}ae.resolveUrl=_;const g=/^[a-z_][-a-z0-9._]*$/i;function b(w,f){if(typeof w=="boolean")return{};const{schemaId:p,uriResolver:a}=this.opts,l=E(w[p]||f),y={"":l},d=u(a,l,!1),h={},P=new Set;return r(w,{allKeys:!0},(L,O,V,z)=>{if(z===void 0)return;const F=d+O;let Q=y[z];typeof L[p]=="string"&&(Q=ie.call(this,L[p])),oe.call(this,L.$anchor),oe.call(this,L.$dynamicAnchor),y[O]=Q;function ie(X){const pe=this.opts.uriResolver.resolve;if(X=E(Q?pe(Q,X):X),P.has(X))throw T(X);P.add(X);let M=this.refs[X];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?I(L,M.schema,X):X!==E(F)&&(X[0]==="#"?(I(L,h[X],X),h[X]=L):this.refs[X]=F),X}function oe(X){if(typeof X=="string"){if(!g.test(X))throw new Error(`invalid anchor "${X}"`);ie.call(this,`#${X}`)}}}),h;function I(L,O,V){if(O!==void 0&&!t(L,O))throw T(V)}function T(L){return new Error(`reference "${L}" resolves to more than one schema`)}}return ae.getSchemaRefs=b,ae}var Cr;function At(){if(Cr)return _e;Cr=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getData=_e.KeywordCxt=_e.validateFunctionCode=void 0;const e=gs(),t=jt(),r=qn(),n=jt(),o=vs(),s=_s(),c=$s(),i=G(),u=Se(),v=Mt(),$=B(),E=Tt();function _(k){if(d(k)&&(P(k),y(k))){f(k);return}g(k,()=>(0,e.topBoolOrEmptySchema)(k))}_e.validateFunctionCode=_;function g({gen:k,validateName:R,schema:q,schemaEnv:A,opts:K},x){K.code.es5?k.func(R,(0,i._)`${u.default.data}, ${u.default.valCxt}`,A.$async,()=>{k.code((0,i._)`"use strict"; ${a(q,K)}`),w(k,K),k.code(x)}):k.func(R,(0,i._)`${u.default.data}, ${b(K)}`,A.$async,()=>k.code(a(q,K)).code(x))}function b(k){return(0,i._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${k.dynamicRef?(0,i._)`, ${u.default.dynamicAnchors}={}`:i.nil}}={}`}function w(k,R){k.if(u.default.valCxt,()=>{k.var(u.default.instancePath,(0,i._)`${u.default.valCxt}.${u.default.instancePath}`),k.var(u.default.parentData,(0,i._)`${u.default.valCxt}.${u.default.parentData}`),k.var(u.default.parentDataProperty,(0,i._)`${u.default.valCxt}.${u.default.parentDataProperty}`),k.var(u.default.rootData,(0,i._)`${u.default.valCxt}.${u.default.rootData}`),R.dynamicRef&&k.var(u.default.dynamicAnchors,(0,i._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{k.var(u.default.instancePath,(0,i._)`""`),k.var(u.default.parentData,(0,i._)`undefined`),k.var(u.default.parentDataProperty,(0,i._)`undefined`),k.var(u.default.rootData,u.default.data),R.dynamicRef&&k.var(u.default.dynamicAnchors,(0,i._)`{}`)})}function f(k){const{schema:R,opts:q,gen:A}=k;g(k,()=>{q.$comment&&R.$comment&&z(k),L(k),A.let(u.default.vErrors,null),A.let(u.default.errors,0),q.unevaluated&&p(k),I(k),F(k)})}function p(k){const{gen:R,validateName:q}=k;k.evaluated=R.const("evaluated",(0,i._)`${q}.evaluated`),R.if((0,i._)`${k.evaluated}.dynamicProps`,()=>R.assign((0,i._)`${k.evaluated}.props`,(0,i._)`undefined`)),R.if((0,i._)`${k.evaluated}.dynamicItems`,()=>R.assign((0,i._)`${k.evaluated}.items`,(0,i._)`undefined`))}function a(k,R){const q=typeof k=="object"&&k[R.schemaId];return q&&(R.code.source||R.code.process)?(0,i._)`/*# sourceURL=${q} */`:i.nil}function l(k,R){if(d(k)&&(P(k),y(k))){h(k,R);return}(0,e.boolOrEmptySchema)(k,R)}function y({schema:k,self:R}){if(typeof k=="boolean")return!k;for(const q in k)if(R.RULES.all[q])return!0;return!1}function d(k){return typeof k.schema!="boolean"}function h(k,R){const{schema:q,gen:A,opts:K}=k;K.$comment&&q.$comment&&z(k),O(k),V(k);const x=A.const("_errs",u.default.errors);I(k,x),A.var(R,(0,i._)`${x} === ${u.default.errors}`)}function P(k){(0,$.checkUnknownRules)(k),T(k)}function I(k,R){if(k.opts.jtd)return ie(k,[],!1,R);const q=(0,t.getSchemaTypes)(k.schema),A=(0,t.coerceAndCheckDataType)(k,q);ie(k,q,!A,R)}function T(k){const{schema:R,errSchemaPath:q,opts:A,self:K}=k;R.$ref&&A.ignoreKeywordsWithRef&&(0,$.schemaHasRulesButRef)(R,K.RULES)&&K.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function L(k){const{schema:R,opts:q}=k;R.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,$.checkStrictMode)(k,"default is ignored in the schema root")}function O(k){const R=k.schema[k.opts.schemaId];R&&(k.baseId=(0,v.resolveUrl)(k.opts.uriResolver,k.baseId,R))}function V(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:k,schemaEnv:R,schema:q,errSchemaPath:A,opts:K}){const x=q.$comment;if(K.$comment===!0)k.code((0,i._)`${u.default.self}.logger.log(${x})`);else if(typeof K.$comment=="function"){const re=(0,i.str)`${A}/$comment`,me=k.scopeValue("root",{ref:R.root});k.code((0,i._)`${u.default.self}.opts.$comment(${x}, ${re}, ${me}.schema)`)}}function F(k){const{gen:R,schemaEnv:q,validateName:A,ValidationError:K,opts:x}=k;q.$async?R.if((0,i._)`${u.default.errors} === 0`,()=>R.return(u.default.data),()=>R.throw((0,i._)`new ${K}(${u.default.vErrors})`)):(R.assign((0,i._)`${A}.errors`,u.default.vErrors),x.unevaluated&&Q(k),R.return((0,i._)`${u.default.errors} === 0`))}function Q({gen:k,evaluated:R,props:q,items:A}){q instanceof i.Name&&k.assign((0,i._)`${R}.props`,q),A instanceof i.Name&&k.assign((0,i._)`${R}.items`,A)}function ie(k,R,q,A){const{gen:K,schema:x,data:re,allErrors:me,opts:ce,self:de}=k,{RULES:ne}=de;if(x.$ref&&(ce.ignoreKeywordsWithRef||!(0,$.schemaHasRulesButRef)(x,ne))){K.block(()=>U(k,"$ref",ne.all.$ref.definition));return}ce.jtd||X(k,R),K.block(()=>{for(const fe of ne.rules)Ce(fe);Ce(ne.post)});function Ce(fe){(0,r.shouldUseGroup)(x,fe)&&(fe.type?(K.if((0,n.checkDataType)(fe.type,re,ce.strictNumbers)),oe(k,fe),R.length===1&&R[0]===fe.type&&q&&(K.else(),(0,n.reportTypeError)(k)),K.endIf()):oe(k,fe),me||K.if((0,i._)`${u.default.errors} === ${A||0}`))}}function oe(k,R){const{gen:q,schema:A,opts:{useDefaults:K}}=k;K&&(0,o.assignDefaults)(k,R.type),q.block(()=>{for(const x of R.rules)(0,r.shouldUseRule)(A,x)&&U(k,x.keyword,x.definition,R.type)})}function X(k,R){k.schemaEnv.meta||!k.opts.strictTypes||(pe(k,R),k.opts.allowUnionTypes||M(k,R),j(k,k.dataTypes))}function pe(k,R){if(R.length){if(!k.dataTypes.length){k.dataTypes=R;return}R.forEach(q=>{C(k.dataTypes,q)||S(k,`type "${q}" not allowed by context "${k.dataTypes.join(",")}"`)}),m(k,R)}}function M(k,R){R.length>1&&!(R.length===2&&R.includes("null"))&&S(k,"use allowUnionTypes to allow union type keyword")}function j(k,R){const q=k.self.RULES.all;for(const A in q){const K=q[A];if(typeof K=="object"&&(0,r.shouldUseRule)(k.schema,K)){const{type:x}=K.definition;x.length&&!x.some(re=>D(R,re))&&S(k,`missing type "${x.join(",")}" for keyword "${A}"`)}}}function D(k,R){return k.includes(R)||R==="number"&&k.includes("integer")}function C(k,R){return k.includes(R)||R==="integer"&&k.includes("number")}function m(k,R){const q=[];for(const A of k.dataTypes)C(R,A)?q.push(A):R.includes("integer")&&A==="number"&&q.push("integer");k.dataTypes=q}function S(k,R){const q=k.schemaEnv.baseId+k.errSchemaPath;R+=` at "${q}" (strictTypes)`,(0,$.checkStrictMode)(k,R,k.opts.strictTypes)}class N{constructor(R,q,A){if((0,s.validateKeywordUsage)(R,q,A),this.gen=R.gen,this.allErrors=R.allErrors,this.keyword=A,this.data=R.data,this.schema=R.schema[A],this.$data=q.$data&&R.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$.schemaRefOrVal)(R,this.schema,A,this.$data),this.schemaType=q.schemaType,this.parentSchema=R.schema,this.params={},this.it=R,this.def=q,this.$data)this.schemaCode=R.gen.const("vSchema",W(this.$data,R));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${A} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=R.gen.const("_errs",u.default.errors))}result(R,q,A){this.failResult((0,i.not)(R),q,A)}failResult(R,q,A){this.gen.if(R),A?A():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(R,q){this.failResult((0,i.not)(R),void 0,q)}fail(R){if(R===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(R),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(R){if(!this.$data)return this.fail(R);const{schemaCode:q}=this;this.fail((0,i._)`${q} !== undefined && (${(0,i.or)(this.invalid$data(),R)})`)}error(R,q,A){if(q){this.setParams(q),this._error(R,A),this.setParams({});return}this._error(R,A)}_error(R,q){(R?E.reportExtraError:E.reportError)(this,this.def.error,q)}$dataError(){(0,E.reportError)(this,this.def.$dataError||E.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,E.resetErrorsCount)(this.gen,this.errsCount)}ok(R){this.allErrors||this.gen.if(R)}setParams(R,q){q?Object.assign(this.params,R):this.params=R}block$data(R,q,A=i.nil){this.gen.block(()=>{this.check$data(R,A),q()})}check$data(R=i.nil,q=i.nil){if(!this.$data)return;const{gen:A,schemaCode:K,schemaType:x,def:re}=this;A.if((0,i.or)((0,i._)`${K} === undefined`,q)),R!==i.nil&&A.assign(R,!0),(x.length||re.validateSchema)&&(A.elseIf(this.invalid$data()),this.$dataError(),R!==i.nil&&A.assign(R,!1)),A.else()}invalid$data(){const{gen:R,schemaCode:q,schemaType:A,def:K,it:x}=this;return(0,i.or)(re(),me());function re(){if(A.length){if(!(q instanceof i.Name))throw new Error("ajv implementation error");const ce=Array.isArray(A)?A:[A];return(0,i._)`${(0,n.checkDataTypes)(ce,q,x.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function me(){if(K.validateSchema){const ce=R.scopeValue("validate$data",{ref:K.validateSchema});return(0,i._)`!${ce}(${q})`}return i.nil}}subschema(R,q){const A=(0,c.getSubschema)(this.it,R);(0,c.extendSubschemaData)(A,this.it,R),(0,c.extendSubschemaMode)(A,R);const K={...this.it,...A,items:void 0,props:void 0};return l(K,q),K}mergeEvaluated(R,q){const{it:A,gen:K}=this;A.opts.unevaluated&&(A.props!==!0&&R.props!==void 0&&(A.props=$.mergeEvaluated.props(K,R.props,A.props,q)),A.items!==!0&&R.items!==void 0&&(A.items=$.mergeEvaluated.items(K,R.items,A.items,q)))}mergeValidEvaluated(R,q){const{it:A,gen:K}=this;if(A.opts.unevaluated&&(A.props!==!0||A.items!==!0))return K.if(q,()=>this.mergeEvaluated(R,i.Name)),!0}}_e.KeywordCxt=N;function U(k,R,q,A){const K=new N(k,q,R);"code"in q?q.code(K,A):K.$data&&q.validate?(0,s.funcKeywordCode)(K,q):"macro"in q?(0,s.macroKeywordCode)(K,q):(q.compile||q.validate)&&(0,s.funcKeywordCode)(K,q)}const J=/^\/(?:[^~]|~0|~1)*$/,Y=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function W(k,{dataLevel:R,dataNames:q,dataPathArr:A}){let K,x;if(k==="")return u.default.rootData;if(k[0]==="/"){if(!J.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);K=k,x=u.default.rootData}else{const de=Y.exec(k);if(!de)throw new Error(`Invalid JSON-pointer: ${k}`);const ne=+de[1];if(K=de[2],K==="#"){if(ne>=R)throw new Error(ce("property/index",ne));return A[R-ne]}if(ne>R)throw new Error(ce("data",ne));if(x=q[R-ne],!K)return x}let re=x;const me=K.split("/");for(const de of me)de&&(x=(0,i._)`${x}${(0,i.getProperty)((0,$.unescapeJsonPointer)(de))}`,re=(0,i._)`${re} && ${x}`);return re;function ce(de,ne){return`Cannot access ${de} ${ne} levels up, current level is ${R}`}}return _e.getData=W,_e}var Ue={},Ir;function rr(){if(Ir)return Ue;Ir=1,Object.defineProperty(Ue,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Ue.default=e,Ue}var Ke={},Nr;function Vt(){if(Nr)return Ke;Nr=1,Object.defineProperty(Ke,"__esModule",{value:!0});const e=Mt();class t extends Error{constructor(n,o,s,c){super(c||`can't resolve reference ${s} from id ${o}`),this.missingRef=(0,e.resolveUrl)(n,o,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Ke.default=t,Ke}var le={},Or;function nr(){if(Or)return le;Or=1,Object.defineProperty(le,"__esModule",{value:!0}),le.resolveSchema=le.getCompilingSchema=le.resolveRef=le.compileSchema=le.SchemaEnv=void 0;const e=G(),t=rr(),r=Se(),n=Mt(),o=B(),s=At();class c{constructor(p){var a;this.refs={},this.dynamicAnchors={};let l;typeof p.schema=="object"&&(l=p.schema),this.schema=p.schema,this.schemaId=p.schemaId,this.root=p.root||this,this.baseId=(a=p.baseId)!==null&&a!==void 0?a:(0,n.normalizeId)(l?.[p.schemaId||"$id"]),this.schemaPath=p.schemaPath,this.localRefs=p.localRefs,this.meta=p.meta,this.$async=l?.$async,this.refs={}}}le.SchemaEnv=c;function i(f){const p=$.call(this,f);if(p)return p;const a=(0,n.getFullPath)(this.opts.uriResolver,f.root.baseId),{es5:l,lines:y}=this.opts.code,{ownProperties:d}=this.opts,h=new e.CodeGen(this.scope,{es5:l,lines:y,ownProperties:d});let P;f.$async&&(P=h.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const I=h.scopeName("validate");f.validateName=I;const T={gen:h,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",this.opts.code.source===!0?{ref:f.schema,code:(0,e.stringify)(f.schema)}:{ref:f.schema}),validateName:I,ValidationError:P,schema:f.schema,schemaEnv:f,rootId:a,baseId:f.baseId||a,schemaPath:e.nil,errSchemaPath:f.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let L;try{this._compilations.add(f),(0,s.validateFunctionCode)(T),h.optimize(this.opts.code.optimize);const O=h.toString();L=`${h.scopeRefs(r.default.scope)}return ${O}`,this.opts.code.process&&(L=this.opts.code.process(L,f));const z=new Function(`${r.default.self}`,`${r.default.scope}`,L)(this,this.scope.get());if(this.scope.value(I,{ref:z}),z.errors=null,z.schema=f.schema,z.schemaEnv=f,f.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:I,validateCode:O,scopeValues:h._values}),this.opts.unevaluated){const{props:F,items:Q}=T;z.evaluated={props:F instanceof e.Name?void 0:F,items:Q instanceof e.Name?void 0:Q,dynamicProps:F instanceof e.Name,dynamicItems:Q instanceof e.Name},z.source&&(z.source.evaluated=(0,e.stringify)(z.evaluated))}return f.validate=z,f}catch(O){throw delete f.validate,delete f.validateName,L&&this.logger.error("Error compiling schema, function code:",L),O}finally{this._compilations.delete(f)}}le.compileSchema=i;function u(f,p,a){var l;a=(0,n.resolveUrl)(this.opts.uriResolver,p,a);const y=f.refs[a];if(y)return y;let d=_.call(this,f,a);if(d===void 0){const h=(l=f.localRefs)===null||l===void 0?void 0:l[a],{schemaId:P}=this.opts;h&&(d=new c({schema:h,schemaId:P,root:f,baseId:p}))}if(d!==void 0)return f.refs[a]=v.call(this,d)}le.resolveRef=u;function v(f){return(0,n.inlineRef)(f.schema,this.opts.inlineRefs)?f.schema:f.validate?f:i.call(this,f)}function $(f){for(const p of this._compilations)if(E(p,f))return p}le.getCompilingSchema=$;function E(f,p){return f.schema===p.schema&&f.root===p.root&&f.baseId===p.baseId}function _(f,p){let a;for(;typeof(a=this.refs[p])=="string";)p=a;return a||this.schemas[p]||g.call(this,f,p)}function g(f,p){const a=this.opts.uriResolver.parse(p),l=(0,n._getFullPath)(this.opts.uriResolver,a);let y=(0,n.getFullPath)(this.opts.uriResolver,f.baseId,void 0);if(Object.keys(f.schema).length>0&&l===y)return w.call(this,a,f);const d=(0,n.normalizeId)(l),h=this.refs[d]||this.schemas[d];if(typeof h=="string"){const P=g.call(this,f,h);return typeof P?.schema!="object"?void 0:w.call(this,a,P)}if(typeof h?.schema=="object"){if(h.validate||i.call(this,h),d===(0,n.normalizeId)(p)){const{schema:P}=h,{schemaId:I}=this.opts,T=P[I];return T&&(y=(0,n.resolveUrl)(this.opts.uriResolver,y,T)),new c({schema:P,schemaId:I,root:f,baseId:y})}return w.call(this,a,h)}}le.resolveSchema=g;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(f,{baseId:p,schema:a,root:l}){var y;if(((y=f.fragment)===null||y===void 0?void 0:y[0])!=="/")return;for(const P of f.fragment.slice(1).split("/")){if(typeof a=="boolean")return;const I=a[(0,o.unescapeFragment)(P)];if(I===void 0)return;a=I;const T=typeof a=="object"&&a[this.opts.schemaId];!b.has(P)&&T&&(p=(0,n.resolveUrl)(this.opts.uriResolver,p,T))}let d;if(typeof a!="boolean"&&a.$ref&&!(0,o.schemaHasRulesButRef)(a,this.RULES)){const P=(0,n.resolveUrl)(this.opts.uriResolver,p,a.$ref);d=g.call(this,l,P)}const{schemaId:h}=this.opts;if(d=d||new c({schema:a,schemaId:h,root:l,baseId:p}),d.schema!==d.root.schema)return d}return le}const ws="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Ps="Meta-schema for $data reference (JSON AnySchema extension proposal)",Ss="object",Es=["$data"],ks={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},js=!1,Rs={$id:ws,description:Ps,type:Ss,required:Es,properties:ks,additionalProperties:js};var Je={},De={exports:{}},Bt,qr;function Tn(){if(qr)return Bt;qr=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(_){let g="",b=0,w=0;for(w=0;w<_.length;w++)if(b=_[w].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";g+=_[w];break}for(w+=1;w<_.length;w++){if(b=_[w].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";g+=_[w]}return g}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function o(_){return _.length=0,!0}function s(_,g,b){if(_.length){const w=r(_);if(w!=="")g.push(w);else return b.error=!0,!1;_.length=0}return!0}function c(_){let g=0;const b={error:!1,address:"",zone:""},w=[],f=[];let p=!1,a=!1,l=s;for(let y=0;y<_.length;y++){const d=_[y];if(!(d==="["||d==="]"))if(d===":"){if(p===!0&&(a=!0),!l(f,w,b))break;if(++g>7){b.error=!0;break}y>0&&_[y-1]===":"&&(p=!0),w.push(":");continue}else if(d==="%"){if(!l(f,w,b))break;l=o}else{f.push(d);continue}}return f.length&&(l===o?b.zone=f.join(""):a?w.push(f.join("")):w.push(r(f))),b.address=w.join(""),b}function i(_){if(u(_,":")<2)return{host:_,isIPV6:!1};const g=c(_);if(g.error)return{host:_,isIPV6:!1};{let b=g.address,w=g.address;return g.zone&&(b+="%"+g.zone,w+="%25"+g.zone),{host:b,isIPV6:!0,escapedHost:w}}}function u(_,g){let b=0;for(let w=0;w<_.length;w++)_[w]===g&&b++;return b}function v(_){let g=_;const b=[];let w=-1,f=0;for(;f=g.length;){if(f===1){if(g===".")break;if(g==="/"){b.push("/");break}else{b.push(g);break}}else if(f===2){if(g[0]==="."){if(g[1]===".")break;if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&(g[1]==="."||g[1]==="/")){b.push("/");break}}else if(f===3&&g==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(g[0]==="."){if(g[1]==="."){if(g[2]==="/"){g=g.slice(3);continue}}else if(g[1]==="/"){g=g.slice(2);continue}}else if(g[0]==="/"&&g[1]==="."){if(g[2]==="/"){g=g.slice(2);continue}else if(g[2]==="."&&g[3]==="/"){g=g.slice(3),b.length!==0&&b.pop();continue}}if((w=g.indexOf("/",1))===-1){b.push(g);break}else b.push(g.slice(0,w)),g=g.slice(w)}return b.join("")}function $(_,g){const b=g!==!0?escape:unescape;return _.scheme!==void 0&&(_.scheme=b(_.scheme)),_.userinfo!==void 0&&(_.userinfo=b(_.userinfo)),_.host!==void 0&&(_.host=b(_.host)),_.path!==void 0&&(_.path=b(_.path)),_.query!==void 0&&(_.query=b(_.query)),_.fragment!==void 0&&(_.fragment=b(_.fragment)),_}function E(_){const g=[];if(_.userinfo!==void 0&&(g.push(_.userinfo),g.push("@")),_.host!==void 0){let b=unescape(_.host);if(!t(b)){const w=i(b);w.isIPV6===!0?b=`[${w.escapedHost}]`:b=_.host}g.push(b)}return(typeof _.port=="number"||typeof _.port=="string")&&(g.push(":"),g.push(String(_.port))),g.length?g.join(""):void 0}return Bt={nonSimpleDomain:n,recomposeAuthority:E,normalizeComponentEncoding:$,removeDotSegments:v,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},Bt}var Yt,Dr;function Cs(){if(Dr)return Yt;Dr=1;const{isUUID:e}=Tn(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(d){return r.indexOf(d)!==-1}function o(d){return d.secure===!0?!0:d.secure===!1?!1:d.scheme?d.scheme.length===3&&(d.scheme[0]==="w"||d.scheme[0]==="W")&&(d.scheme[1]==="s"||d.scheme[1]==="S")&&(d.scheme[2]==="s"||d.scheme[2]==="S"):!1}function s(d){return d.host||(d.error=d.error||"HTTP URIs must have a host."),d}function c(d){const h=String(d.scheme).toLowerCase()==="https";return(d.port===(h?443:80)||d.port==="")&&(d.port=void 0),d.path||(d.path="/"),d}function i(d){return d.secure=o(d),d.resourceName=(d.path||"/")+(d.query?"?"+d.query:""),d.path=void 0,d.query=void 0,d}function u(d){if((d.port===(o(d)?443:80)||d.port==="")&&(d.port=void 0),typeof d.secure=="boolean"&&(d.scheme=d.secure?"wss":"ws",d.secure=void 0),d.resourceName){const[h,P]=d.resourceName.split("?");d.path=h&&h!=="/"?h:void 0,d.query=P,d.resourceName=void 0}return d.fragment=void 0,d}function v(d,h){if(!d.path)return d.error="URN can not be parsed",d;const P=d.path.match(t);if(P){const I=h.scheme||d.scheme||"urn";d.nid=P[1].toLowerCase(),d.nss=P[2];const T=`${I}:${h.nid||d.nid}`,L=y(T);d.path=void 0,L&&(d=L.parse(d,h))}else d.error=d.error||"URN can not be parsed.";return d}function $(d,h){if(d.nid===void 0)throw new Error("URN without nid cannot be serialized");const P=h.scheme||d.scheme||"urn",I=d.nid.toLowerCase(),T=`${P}:${h.nid||I}`,L=y(T);L&&(d=L.serialize(d,h));const O=d,V=d.nss;return O.path=`${I||h.nid}:${V}`,h.skipEscape=!0,O}function E(d,h){const P=d;return P.uuid=P.nss,P.nss=void 0,!h.tolerant&&(!P.uuid||!e(P.uuid))&&(P.error=P.error||"UUID is not valid."),P}function _(d){const h=d;return h.nss=(d.uuid||"").toLowerCase(),h}const g={scheme:"http",domainHost:!0,parse:s,serialize:c},b={scheme:"https",domainHost:g.domainHost,parse:s,serialize:c},w={scheme:"ws",domainHost:!0,parse:i,serialize:u},f={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},l={http:g,https:b,ws:w,wss:f,urn:{scheme:"urn",parse:v,serialize:$,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:E,serialize:_,skipNormalize:!0}};Object.setPrototypeOf(l,null);function y(d){return d&&(l[d]||l[d.toLowerCase()])||void 0}return Yt={wsIsSecure:o,SCHEMES:l,isValidSchemeName:n,getSchemeHandler:y},Yt}var Tr;function Is(){if(Tr)return De.exports;Tr=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:s}=Tn(),{SCHEMES:c,getSchemeHandler:i}=Cs();function u(f,p){return typeof f=="string"?f=_(b(f,p),p):typeof f=="object"&&(f=b(_(f,p),p)),f}function v(f,p,a){const l=a?Object.assign({scheme:"null"},a):{scheme:"null"},y=$(b(f,l),b(p,l),l,!0);return l.skipEscape=!0,_(y,l)}function $(f,p,a,l){const y={};return l||(f=b(_(f,a),a),p=b(_(p,a),a)),a=a||{},!a.tolerant&&p.scheme?(y.scheme=p.scheme,y.userinfo=p.userinfo,y.host=p.host,y.port=p.port,y.path=t(p.path||""),y.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(y.userinfo=p.userinfo,y.host=p.host,y.port=p.port,y.path=t(p.path||""),y.query=p.query):(p.path?(p.path[0]==="/"?y.path=t(p.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?y.path="/"+p.path:f.path?y.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+p.path:y.path=p.path,y.path=t(y.path)),y.query=p.query):(y.path=f.path,p.query!==void 0?y.query=p.query:y.query=f.query),y.userinfo=f.userinfo,y.host=f.host,y.port=f.port),y.scheme=f.scheme),y.fragment=p.fragment,y}function E(f,p,a){return typeof f=="string"?(f=unescape(f),f=_(n(b(f,a),!0),{...a,skipEscape:!0})):typeof f=="object"&&(f=_(n(f,!0),{...a,skipEscape:!0})),typeof p=="string"?(p=unescape(p),p=_(n(b(p,a),!0),{...a,skipEscape:!0})):typeof p=="object"&&(p=_(n(p,!0),{...a,skipEscape:!0})),f.toLowerCase()===p.toLowerCase()}function _(f,p){const a={host:f.host,scheme:f.scheme,userinfo:f.userinfo,port:f.port,path:f.path,query:f.query,nid:f.nid,nss:f.nss,uuid:f.uuid,fragment:f.fragment,reference:f.reference,resourceName:f.resourceName,secure:f.secure,error:""},l=Object.assign({},p),y=[],d=i(l.scheme||a.scheme);d&&d.serialize&&d.serialize(a,l),a.path!==void 0&&(l.skipEscape?a.path=unescape(a.path):(a.path=escape(a.path),a.scheme!==void 0&&(a.path=a.path.split("%3A").join(":")))),l.reference!=="suffix"&&a.scheme&&y.push(a.scheme,":");const h=r(a);if(h!==void 0&&(l.reference!=="suffix"&&y.push("//"),y.push(h),a.path&&a.path[0]!=="/"&&y.push("/")),a.path!==void 0){let P=a.path;!l.absolutePath&&(!d||!d.absolutePath)&&(P=t(P)),h===void 0&&P[0]==="/"&&P[1]==="/"&&(P="/%2F"+P.slice(2)),y.push(P)}return a.query!==void 0&&y.push("?",a.query),a.fragment!==void 0&&y.push("#",a.fragment),y.join("")}const g=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(f,p){const a=Object.assign({},p),l={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let y=!1;a.reference==="suffix"&&(a.scheme?f=a.scheme+":"+f:f="//"+f);const d=f.match(g);if(d){if(l.scheme=d[1],l.userinfo=d[3],l.host=d[4],l.port=parseInt(d[5],10),l.path=d[6]||"",l.query=d[7],l.fragment=d[8],isNaN(l.port)&&(l.port=d[5]),l.host)if(o(l.host)===!1){const I=e(l.host);l.host=I.host.toLowerCase(),y=I.isIPV6}else y=!0;l.scheme===void 0&&l.userinfo===void 0&&l.host===void 0&&l.port===void 0&&l.query===void 0&&!l.path?l.reference="same-document":l.scheme===void 0?l.reference="relative":l.fragment===void 0?l.reference="absolute":l.reference="uri",a.reference&&a.reference!=="suffix"&&a.reference!==l.reference&&(l.error=l.error||"URI is not a "+a.reference+" reference.");const h=i(a.scheme||l.scheme);if(!a.unicodeSupport&&(!h||!h.unicodeSupport)&&l.host&&(a.domainHost||h&&h.domainHost)&&y===!1&&s(l.host))try{l.host=URL.domainToASCII(l.host.toLowerCase())}catch(P){l.error=l.error||"Host's domain name can not be converted to ASCII: "+P}(!h||h&&!h.skipNormalize)&&(f.indexOf("%")!==-1&&(l.scheme!==void 0&&(l.scheme=unescape(l.scheme)),l.host!==void 0&&(l.host=unescape(l.host))),l.path&&(l.path=escape(unescape(l.path))),l.fragment&&(l.fragment=encodeURI(decodeURIComponent(l.fragment)))),h&&h.parse&&h.parse(l,a)}else l.error=l.error||"URI can not be parsed.";return l}const w={SCHEMES:c,normalize:u,resolve:v,resolveComponent:$,equal:E,serialize:_,parse:b};return De.exports=w,De.exports.default=w,De.exports.fastUri=w,De.exports}var Mr;function Ns(){if(Mr)return Je;Mr=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=Is();return e.code='require("ajv/dist/runtime/uri").default',Je.default=e,Je}var Ar;function Os(){return Ar||(Ar=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=At();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=G();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=rr(),o=Vt(),s=On(),c=nr(),i=G(),u=Mt(),v=jt(),$=B(),E=Rs,_=Ns(),g=(M,j)=>new RegExp(M,j);g.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),f={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."},p={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},a=200;function l(M){var j,D,C,m,S,N,U,J,Y,W,k,R,q,A,K,x,re,me,ce,de,ne,Ce,fe,Lt,zt;const Oe=M.strict,Ft=(j=M.code)===null||j===void 0?void 0:j.optimize,dr=Ft===!0||Ft===void 0?1:Ft||0,ur=(C=(D=M.code)===null||D===void 0?void 0:D.regExp)!==null&&C!==void 0?C:g,hs=(m=M.uriResolver)!==null&&m!==void 0?m:_.default;return{strictSchema:(N=(S=M.strictSchema)!==null&&S!==void 0?S:Oe)!==null&&N!==void 0?N:!0,strictNumbers:(J=(U=M.strictNumbers)!==null&&U!==void 0?U:Oe)!==null&&J!==void 0?J:!0,strictTypes:(W=(Y=M.strictTypes)!==null&&Y!==void 0?Y:Oe)!==null&&W!==void 0?W:"log",strictTuples:(R=(k=M.strictTuples)!==null&&k!==void 0?k:Oe)!==null&&R!==void 0?R:"log",strictRequired:(A=(q=M.strictRequired)!==null&&q!==void 0?q:Oe)!==null&&A!==void 0?A:!1,code:M.code?{...M.code,optimize:dr,regExp:ur}:{optimize:dr,regExp:ur},loopRequired:(K=M.loopRequired)!==null&&K!==void 0?K:a,loopEnum:(x=M.loopEnum)!==null&&x!==void 0?x:a,meta:(re=M.meta)!==null&&re!==void 0?re:!0,messages:(me=M.messages)!==null&&me!==void 0?me:!0,inlineRefs:(ce=M.inlineRefs)!==null&&ce!==void 0?ce:!0,schemaId:(de=M.schemaId)!==null&&de!==void 0?de:"$id",addUsedSchema:(ne=M.addUsedSchema)!==null&&ne!==void 0?ne:!0,validateSchema:(Ce=M.validateSchema)!==null&&Ce!==void 0?Ce:!0,validateFormats:(fe=M.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(Lt=M.unicodeRegExp)!==null&&Lt!==void 0?Lt:!0,int32range:(zt=M.int32range)!==null&&zt!==void 0?zt:!0,uriResolver:hs}}class y{constructor(j={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...l(j)};const{es5:D,lines:C}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:w,es5:D,lines:C}),this.logger=V(j.logger);const m=j.validateFormats;j.validateFormats=!1,this.RULES=(0,s.getRules)(),d.call(this,f,j,"NOT SUPPORTED"),d.call(this,p,j,"DEPRECATED","warn"),this._metaOpts=L.call(this),j.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&T.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),P.call(this),j.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:D,schemaId:C}=this.opts;let m=E;C==="id"&&(m={...E},m.id=m.$id,delete m.$id),D&&j&&this.addMetaSchema(m,m[C],!1)}defaultMeta(){const{meta:j,schemaId:D}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[D]||j:void 0}validate(j,D){let C;if(typeof j=="string"){if(C=this.getSchema(j),!C)throw new Error(`no schema with key or ref "${j}"`)}else C=this.compile(j);const m=C(D);return"$async"in C||(this.errors=C.errors),m}compile(j,D){const C=this._addSchema(j,D);return C.validate||this._compileSchemaEnv(C)}compileAsync(j,D){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:C}=this.opts;return m.call(this,j,D);async function m(W,k){await S.call(this,W.$schema);const R=this._addSchema(W,k);return R.validate||N.call(this,R)}async function S(W){W&&!this.getSchema(W)&&await m.call(this,{$ref:W},!0)}async function N(W){try{return this._compileSchemaEnv(W)}catch(k){if(!(k instanceof o.default))throw k;return U.call(this,k),await J.call(this,k.missingSchema),N.call(this,W)}}function U({missingSchema:W,missingRef:k}){if(this.refs[W])throw new Error(`AnySchema ${W} is loaded but ${k} cannot be resolved`)}async function J(W){const k=await Y.call(this,W);this.refs[W]||await S.call(this,k.$schema),this.refs[W]||this.addSchema(k,W,D)}async function Y(W){const k=this._loading[W];if(k)return k;try{return await(this._loading[W]=C(W))}finally{delete this._loading[W]}}}addSchema(j,D,C,m=this.opts.validateSchema){if(Array.isArray(j)){for(const N of j)this.addSchema(N,void 0,C,m);return this}let S;if(typeof j=="object"){const{schemaId:N}=this.opts;if(S=j[N],S!==void 0&&typeof S!="string")throw new Error(`schema ${N} must be string`)}return D=(0,u.normalizeId)(D||S),this._checkUnique(D),this.schemas[D]=this._addSchema(j,C,D,m,!0),this}addMetaSchema(j,D,C=this.opts.validateSchema){return this.addSchema(j,D,!0,C),this}validateSchema(j,D){if(typeof j=="boolean")return!0;let C;if(C=j.$schema,C!==void 0&&typeof C!="string")throw new Error("$schema must be a string");if(C=C||this.opts.defaultMeta||this.defaultMeta(),!C)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const m=this.validate(C,j);if(!m&&D){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return m}getSchema(j){let D;for(;typeof(D=h.call(this,j))=="string";)j=D;if(D===void 0){const{schemaId:C}=this.opts,m=new c.SchemaEnv({schema:{},schemaId:C});if(D=c.resolveSchema.call(this,m,j),!D)return;this.refs[j]=D}return D.validate||this._compileSchemaEnv(D)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const D=h.call(this,j);return typeof D=="object"&&this._cache.delete(D.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const D=j;this._cache.delete(D);let C=j[this.opts.schemaId];return C&&(C=(0,u.normalizeId)(C),delete this.schemas[C],delete this.refs[C]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const D of j)this.addKeyword(D);return this}addKeyword(j,D){let C;if(typeof j=="string")C=j,typeof D=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),D.keyword=C);else if(typeof j=="object"&&D===void 0){if(D=j,C=D.keyword,Array.isArray(C)&&!C.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(F.call(this,C,D),!D)return(0,$.eachItem)(C,S=>Q.call(this,S)),this;oe.call(this,D);const m={...D,type:(0,v.getJSONTypes)(D.type),schemaType:(0,v.getJSONTypes)(D.schemaType)};return(0,$.eachItem)(C,m.type.length===0?S=>Q.call(this,S,m):S=>m.type.forEach(N=>Q.call(this,S,m,N))),this}getKeyword(j){const D=this.RULES.all[j];return typeof D=="object"?D.definition:!!D}removeKeyword(j){const{RULES:D}=this;delete D.keywords[j],delete D.all[j];for(const C of D.rules){const m=C.rules.findIndex(S=>S.keyword===j);m>=0&&C.rules.splice(m,1)}return this}addFormat(j,D){return typeof D=="string"&&(D=new RegExp(D)),this.formats[j]=D,this}errorsText(j=this.errors,{separator:D=", ",dataVar:C="data"}={}){return!j||j.length===0?"No errors":j.map(m=>`${C}${m.instancePath} ${m.message}`).reduce((m,S)=>m+D+S)}$dataMetaSchema(j,D){const C=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const m of D){const S=m.split("/").slice(1);let N=j;for(const U of S)N=N[U];for(const U in C){const J=C[U];if(typeof J!="object")continue;const{$data:Y}=J.definition,W=N[U];Y&&W&&(N[U]=pe(W))}}return j}_removeAllSchemas(j,D){for(const C in j){const m=j[C];(!D||D.test(C))&&(typeof m=="string"?delete j[C]:m&&!m.meta&&(this._cache.delete(m.schema),delete j[C]))}}_addSchema(j,D,C,m=this.opts.validateSchema,S=this.opts.addUsedSchema){let N;const{schemaId:U}=this.opts;if(typeof j=="object")N=j[U];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let J=this._cache.get(j);if(J!==void 0)return J;C=(0,u.normalizeId)(N||C);const Y=u.getSchemaRefs.call(this,j,C);return J=new c.SchemaEnv({schema:j,schemaId:U,meta:D,baseId:C,localRefs:Y}),this._cache.set(J.schema,J),S&&!C.startsWith("#")&&(C&&this._checkUnique(C),this.refs[C]=J),m&&this.validateSchema(j,!0),J}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):c.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const D=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,j)}finally{this.opts=D}}}y.ValidationError=n.default,y.MissingRefError=o.default,e.default=y;function d(M,j,D,C="error"){for(const m in M){const S=m;S in j&&this.logger[C](`${D}: option ${m}. ${M[S]}`)}}function h(M){return M=(0,u.normalizeId)(M),this.schemas[M]||this.refs[M]}function P(){const M=this.opts.schemas;if(M)if(Array.isArray(M))this.addSchema(M);else for(const j in M)this.addSchema(M[j],j)}function I(){for(const M in this.opts.formats){const j=this.opts.formats[M];j&&this.addFormat(M,j)}}function T(M){if(Array.isArray(M)){this.addVocabulary(M);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in M){const D=M[j];D.keyword||(D.keyword=j),this.addKeyword(D)}}function L(){const M={...this.opts};for(const j of b)delete M[j];return M}const O={log(){},warn(){},error(){}};function V(M){if(M===!1)return O;if(M===void 0)return console;if(M.log&&M.warn&&M.error)return M;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function F(M,j){const{RULES:D}=this;if((0,$.eachItem)(M,C=>{if(D.keywords[C])throw new Error(`Keyword ${C} is already defined`);if(!z.test(C))throw new Error(`Keyword ${C} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function Q(M,j,D){var C;const m=j?.post;if(D&&m)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let N=m?S.post:S.rules.find(({type:J})=>J===D);if(N||(N={type:D,rules:[]},S.rules.push(N)),S.keywords[M]=!0,!j)return;const U={keyword:M,definition:{...j,type:(0,v.getJSONTypes)(j.type),schemaType:(0,v.getJSONTypes)(j.schemaType)}};j.before?ie.call(this,N,U,j.before):N.rules.push(U),S.all[M]=U,(C=j.implements)===null||C===void 0||C.forEach(J=>this.addKeyword(J))}function ie(M,j,D){const C=M.rules.findIndex(m=>m.keyword===D);C>=0?M.rules.splice(C,0,j):(M.rules.push(j),this.logger.warn(`rule ${D} is not defined`))}function oe(M){let{metaSchema:j}=M;j!==void 0&&(M.$data&&this.opts.$data&&(j=pe(j)),M.validateSchema=this.compile(j,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pe(M){return{anyOf:[M,X]}}})(Ut)),Ut}var He={},Ge={},xe={},Vr;function qs(){if(Vr)return xe;Vr=1,Object.defineProperty(xe,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return xe.default=e,xe}var we={},Lr;function Ds(){if(Lr)return we;Lr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.callRef=we.getValidate=void 0;const e=Vt(),t=ge(),r=G(),n=Se(),o=nr(),s=B(),c={keyword:"$ref",schemaType:"string",code(v){const{gen:$,schema:E,it:_}=v,{baseId:g,schemaEnv:b,validateName:w,opts:f,self:p}=_,{root:a}=b;if((E==="#"||E==="#/")&&g===a.baseId)return y();const l=o.resolveRef.call(p,a,g,E);if(l===void 0)throw new e.default(_.opts.uriResolver,g,E);if(l instanceof o.SchemaEnv)return d(l);return h(l);function y(){if(b===a)return u(v,w,b,b.$async);const P=$.scopeValue("root",{ref:a});return u(v,(0,r._)`${P}.validate`,a,a.$async)}function d(P){const I=i(v,P);u(v,I,P,P.$async)}function h(P){const I=$.scopeValue("schema",f.code.source===!0?{ref:P,code:(0,r.stringify)(P)}:{ref:P}),T=$.name("valid"),L=v.subschema({schema:P,dataTypes:[],schemaPath:r.nil,topSchemaRef:I,errSchemaPath:E},T);v.mergeEvaluated(L),v.ok(T)}}};function i(v,$){const{gen:E}=v;return $.validate?E.scopeValue("validate",{ref:$.validate}):(0,r._)`${E.scopeValue("wrapper",{ref:$})}.validate`}we.getValidate=i;function u(v,$,E,_){const{gen:g,it:b}=v,{allErrors:w,schemaEnv:f,opts:p}=b,a=p.passContext?n.default.this:r.nil;_?l():y();function l(){if(!f.$async)throw new Error("async schema referenced by sync schema");const P=g.let("valid");g.try(()=>{g.code((0,r._)`await ${(0,t.callValidateCode)(v,$,a)}`),h($),w||g.assign(P,!0)},I=>{g.if((0,r._)`!(${I} instanceof ${b.ValidationError})`,()=>g.throw(I)),d(I),w||g.assign(P,!1)}),v.ok(P)}function y(){v.result((0,t.callValidateCode)(v,$,a),()=>h($),()=>d($))}function d(P){const I=(0,r._)`${P}.errors`;g.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${I} : ${n.default.vErrors}.concat(${I})`),g.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function h(P){var I;if(!b.opts.unevaluated)return;const T=(I=E?.validate)===null||I===void 0?void 0:I.evaluated;if(b.props!==!0)if(T&&!T.dynamicProps)T.props!==void 0&&(b.props=s.mergeEvaluated.props(g,T.props,b.props));else{const L=g.var("props",(0,r._)`${P}.evaluated.props`);b.props=s.mergeEvaluated.props(g,L,b.props,r.Name)}if(b.items!==!0)if(T&&!T.dynamicItems)T.items!==void 0&&(b.items=s.mergeEvaluated.items(g,T.items,b.items));else{const L=g.var("items",(0,r._)`${P}.evaluated.items`);b.items=s.mergeEvaluated.items(g,L,b.items,r.Name)}}}return we.callRef=u,we.default=c,we}var zr;function Ts(){if(zr)return Ge;zr=1,Object.defineProperty(Ge,"__esModule",{value:!0});const e=qs(),t=Ds(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ge.default=r,Ge}var We={},Be={},Fr;function Ms(){if(Fr)return Be;Fr=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=G(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:s,schemaCode:c})=>(0,e.str)`must be ${r[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${c}}`},o={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:c,data:i,schemaCode:u}=s;s.fail$data((0,e._)`${i} ${r[c].fail} ${u} || isNaN(${i})`)}};return Be.default=o,Be}var Ye={},Ur;function As(){if(Ur)return Ye;Ur=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=G(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:o,data:s,schemaCode:c,it:i}=n,u=i.opts.multipleOfPrecision,v=o.let("res"),$=u?(0,e._)`Math.abs(Math.round(${v}) - ${v}) > 1e-${u}`:(0,e._)`${v} !== parseInt(${v})`;n.fail$data((0,e._)`(${c} === 0 || (${v} = ${s}/${c}, ${$}))`)}};return Ye.default=r,Ye}var Qe={},Ze={},Kr;function Vs(){if(Kr)return Ze;Kr=1,Object.defineProperty(Ze,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,o=0,s;for(;o<r;)n++,s=t.charCodeAt(o++),s>=55296&&s<=56319&&o<r&&(s=t.charCodeAt(o),(s&64512)===56320&&o++);return n}return Ze.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ze}var Jr;function Ls(){if(Jr)return Qe;Jr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=G(),t=B(),r=Vs(),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:c}){const i=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${c} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:c,data:i,schemaCode:u,it:v}=s,$=c==="maxLength"?e.operators.GT:e.operators.LT,E=v.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${i})`;s.fail$data((0,e._)`${E} ${$} ${u}`)}};return Qe.default=o,Qe}var Xe={},Hr;function zs(){if(Hr)return Xe;Hr=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=ge(),t=G(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,t.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,t._)`{pattern: ${o}}`},code(o){const{data:s,$data:c,schema:i,schemaCode:u,it:v}=o,$=v.opts.unicodeRegExp?"u":"",E=c?(0,t._)`(new RegExp(${u}, ${$}))`:(0,e.usePattern)(o,i);o.fail$data((0,t._)`!${E}.test(${s})`)}};return Xe.default=n,Xe}var et={},Gr;function Fs(){if(Gr)return et;Gr=1,Object.defineProperty(et,"__esModule",{value:!0});const e=G(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:o}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:o,data:s,schemaCode:c}=n,i=o==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${i} ${c}`)}};return et.default=r,et}var tt={},xr;function Us(){if(xr)return tt;xr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=ge(),t=G(),r=B(),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:c,schema:i,schemaCode:u,data:v,$data:$,it:E}=s,{opts:_}=E;if(!$&&i.length===0)return;const g=i.length>=_.loopRequired;if(E.allErrors?b():w(),_.strictRequired){const a=s.parentSchema.properties,{definedProperties:l}=s.it;for(const y of i)if(a?.[y]===void 0&&!l.has(y)){const d=E.schemaEnv.baseId+E.errSchemaPath,h=`required property "${y}" is not defined at "${d}" (strictRequired)`;(0,r.checkStrictMode)(E,h,E.opts.strictRequired)}}function b(){if(g||$)s.block$data(t.nil,f);else for(const a of i)(0,e.checkReportMissingProp)(s,a)}function w(){const a=c.let("missing");if(g||$){const l=c.let("valid",!0);s.block$data(l,()=>p(a,l)),s.ok(l)}else c.if((0,e.checkMissingProp)(s,i,a)),(0,e.reportMissingProp)(s,a),c.else()}function f(){c.forOf("prop",u,a=>{s.setParams({missingProperty:a}),c.if((0,e.noPropertyInData)(c,v,a,_.ownProperties),()=>s.error())})}function p(a,l){s.setParams({missingProperty:a}),c.forOf(a,u,()=>{c.assign(l,(0,e.propertyInData)(c,v,a,_.ownProperties)),c.if((0,t.not)(l),()=>{s.error(),c.break()})},t.nil)}}};return tt.default=o,tt}var rt={},Wr;function Ks(){if(Wr)return rt;Wr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=G(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:o}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${o} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:o,data:s,schemaCode:c}=n,i=o==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${s}.length ${i} ${c}`)}};return rt.default=r,rt}var nt={},st={},Br;function sr(){if(Br)return st;Br=1,Object.defineProperty(st,"__esModule",{value:!0});const e=Dn();return e.code='require("ajv/dist/runtime/equal").default',st.default=e,st}var Yr;function Js(){if(Yr)return nt;Yr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=jt(),t=G(),r=B(),n=sr(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:i}})=>(0,t.str)`must NOT have duplicate items (items ## ${i} and ${c} are identical)`,params:({params:{i:c,j:i}})=>(0,t._)`{i: ${c}, j: ${i}}`},code(c){const{gen:i,data:u,$data:v,schema:$,parentSchema:E,schemaCode:_,it:g}=c;if(!v&&!$)return;const b=i.let("valid"),w=E.items?(0,e.getSchemaTypes)(E.items):[];c.block$data(b,f,(0,t._)`${_} === false`),c.ok(b);function f(){const y=i.let("i",(0,t._)`${u}.length`),d=i.let("j");c.setParams({i:y,j:d}),i.assign(b,!0),i.if((0,t._)`${y} > 1`,()=>(p()?a:l)(y,d))}function p(){return w.length>0&&!w.some(y=>y==="object"||y==="array")}function a(y,d){const h=i.name("item"),P=(0,e.checkDataTypes)(w,h,g.opts.strictNumbers,e.DataType.Wrong),I=i.const("indices",(0,t._)`{}`);i.for((0,t._)`;${y}--;`,()=>{i.let(h,(0,t._)`${u}[${y}]`),i.if(P,(0,t._)`continue`),w.length>1&&i.if((0,t._)`typeof ${h} == "string"`,(0,t._)`${h} += "_"`),i.if((0,t._)`typeof ${I}[${h}] == "number"`,()=>{i.assign(d,(0,t._)`${I}[${h}]`),c.error(),i.assign(b,!1).break()}).code((0,t._)`${I}[${h}] = ${y}`)})}function l(y,d){const h=(0,r.useFunc)(i,n.default),P=i.name("outer");i.label(P).for((0,t._)`;${y}--;`,()=>i.for((0,t._)`${d} = ${y}; ${d}--;`,()=>i.if((0,t._)`${h}(${u}[${y}], ${u}[${d}])`,()=>{c.error(),i.assign(b,!1).break(P)})))}}};return nt.default=s,nt}var it={},Qr;function Hs(){if(Qr)return it;Qr=1,Object.defineProperty(it,"__esModule",{value:!0});const e=G(),t=B(),r=sr(),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:c,data:i,$data:u,schemaCode:v,schema:$}=s;u||$&&typeof $=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(c,r.default)}(${i}, ${v})`):s.fail((0,e._)`${$} !== ${i}`)}};return it.default=o,it}var ot={},Zr;function Gs(){if(Zr)return ot;Zr=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=G(),t=B(),r=sr(),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:c,data:i,$data:u,schema:v,schemaCode:$,it:E}=s;if(!u&&v.length===0)throw new Error("enum must have non-empty array");const _=v.length>=E.opts.loopEnum;let g;const b=()=>g??(g=(0,t.useFunc)(c,r.default));let w;if(_||u)w=c.let("valid"),s.block$data(w,f);else{if(!Array.isArray(v))throw new Error("ajv implementation error");const a=c.const("vSchema",$);w=(0,e.or)(...v.map((l,y)=>p(a,y)))}s.pass(w);function f(){c.assign(w,!1),c.forOf("v",$,a=>c.if((0,e._)`${b()}(${i}, ${a})`,()=>c.assign(w,!0).break()))}function p(a,l){const y=v[l];return typeof y=="object"&&y!==null?(0,e._)`${b()}(${i}, ${a}[${l}])`:(0,e._)`${i} === ${y}`}}};return ot.default=o,ot}var Xr;function xs(){if(Xr)return We;Xr=1,Object.defineProperty(We,"__esModule",{value:!0});const e=Ms(),t=As(),r=Ls(),n=zs(),o=Fs(),s=Us(),c=Ks(),i=Js(),u=Hs(),v=Gs(),$=[e.default,t.default,r.default,n.default,o.default,s.default,c.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,v.default];return We.default=$,We}var at={},Ie={},en;function Mn(){if(en)return Ie;en=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.validateAdditionalItems=void 0;const e=G(),t=B(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:c,it:i}=s,{items:u}=c;if(!Array.isArray(u)){(0,t.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(s,u)}};function o(s,c){const{gen:i,schema:u,data:v,keyword:$,it:E}=s;E.items=!0;const _=i.const("len",(0,e._)`${v}.length`);if(u===!1)s.setParams({len:c.length}),s.pass((0,e._)`${_} <= ${c.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(E,u)){const b=i.var("valid",(0,e._)`${_} <= ${c.length}`);i.if((0,e.not)(b),()=>g(b)),s.ok(b)}function g(b){i.forRange("i",c.length,_,w=>{s.subschema({keyword:$,dataProp:w,dataPropType:t.Type.Num},b),E.allErrors||i.if((0,e.not)(b),()=>i.break())})}}return Ie.validateAdditionalItems=o,Ie.default=n,Ie}var ct={},Ne={},tn;function An(){if(tn)return Ne;tn=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.validateTuple=void 0;const e=G(),t=B(),r=ge(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:c,it:i}=s;if(Array.isArray(c))return o(s,"additionalItems",c);i.items=!0,!(0,t.alwaysValidSchema)(i,c)&&s.ok((0,r.validateArray)(s))}};function o(s,c,i=s.schema){const{gen:u,parentSchema:v,data:$,keyword:E,it:_}=s;w(v),_.opts.unevaluated&&i.length&&_.items!==!0&&(_.items=t.mergeEvaluated.items(u,i.length,_.items));const g=u.name("valid"),b=u.const("len",(0,e._)`${$}.length`);i.forEach((f,p)=>{(0,t.alwaysValidSchema)(_,f)||(u.if((0,e._)`${b} > ${p}`,()=>s.subschema({keyword:E,schemaProp:p,dataProp:p},g)),s.ok(g))});function w(f){const{opts:p,errSchemaPath:a}=_,l=i.length,y=l===f.minItems&&(l===f.maxItems||f[c]===!1);if(p.strictTuples&&!y){const d=`"${E}" is ${l}-tuple, but minItems or maxItems/${c} are not specified or different at path "${a}"`;(0,t.checkStrictMode)(_,d,p.strictTuples)}}}return Ne.validateTuple=o,Ne.default=n,Ne}var rn;function Ws(){if(rn)return ct;rn=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=An(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return ct.default=t,ct}var dt={},nn;function Bs(){if(nn)return dt;nn=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=G(),t=B(),r=ge(),n=Mn(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:i,parentSchema:u,it:v}=c,{prefixItems:$}=u;v.items=!0,!(0,t.alwaysValidSchema)(v,i)&&($?(0,n.validateAdditionalItems)(c,$):c.ok((0,r.validateArray)(c)))}};return dt.default=s,dt}var ut={},sn;function Ys(){if(sn)return ut;sn=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=G(),t=B(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:o,max:s}})=>s===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${s} valid item(s)`,params:({params:{min:o,max:s}})=>s===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${s}}`},code(o){const{gen:s,schema:c,parentSchema:i,data:u,it:v}=o;let $,E;const{minContains:_,maxContains:g}=i;v.opts.next?($=_===void 0?1:_,E=g):$=1;const b=s.const("len",(0,e._)`${u}.length`);if(o.setParams({min:$,max:E}),E===void 0&&$===0){(0,t.checkStrictMode)(v,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(E!==void 0&&$>E){(0,t.checkStrictMode)(v,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,t.alwaysValidSchema)(v,c)){let l=(0,e._)`${b} >= ${$}`;E!==void 0&&(l=(0,e._)`${l} && ${b} <= ${E}`),o.pass(l);return}v.items=!0;const w=s.name("valid");E===void 0&&$===1?p(w,()=>s.if(w,()=>s.break())):$===0?(s.let(w,!0),E!==void 0&&s.if((0,e._)`${u}.length > 0`,f)):(s.let(w,!1),f()),o.result(w,()=>o.reset());function f(){const l=s.name("_valid"),y=s.let("count",0);p(l,()=>s.if(l,()=>a(y)))}function p(l,y){s.forRange("i",0,b,d=>{o.subschema({keyword:"contains",dataProp:d,dataPropType:t.Type.Num,compositeRule:!0},l),y()})}function a(l){s.code((0,e._)`${l}++`),E===void 0?s.if((0,e._)`${l} >= ${$}`,()=>s.assign(w,!0).break()):(s.if((0,e._)`${l} > ${E}`,()=>s.assign(w,!1).break()),$===1?s.assign(w,!0):s.if((0,e._)`${l} >= ${$}`,()=>s.assign(w,!0)))}}};return ut.default=n,ut}var Qt={},on;function Qs(){return on||(on=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=G(),r=B(),n=ge();e.error={message:({params:{property:u,depsCount:v,deps:$}})=>{const E=v===1?"property":"properties";return(0,t.str)`must have ${E} ${$} when property ${u} is present`},params:({params:{property:u,depsCount:v,deps:$,missingProperty:E}})=>(0,t._)`{property: ${u},
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class $s{config;constructor(t){this.config=t}getConfig(){return this.config}findComponent(t){let r;return this.walkComponents(n=>n.id===t?(r=n,!1):!0),r}findPageByComponent(t){let r;return this.walkComponents((n,i)=>n.id===t?(r=i,!1):!0),r}getVariable(t,r){const n=this.config.variables;if(n){if(t.componentId&&n.component&&n.component[t.componentId]){const i=n.component[t.componentId][r];if(i)return i.value??i.default}if(t.pageId&&n.page&&n.page[t.pageId]){const i=n.page[t.pageId][r];if(i)return i.value??i.default}if(n.global&&n.global[r]){const i=n.global[r];return i.value??i.default}}}getVariableByRef(t){const r=t.match(/^(global|page|component)(?::([^\.]+))?\.(.+)$/);if(!r)return;const[,n,i,s]=r;if(n==="global")return this.getVariable({},s);if(n==="page")return this.getVariable({pageId:i},s);if(n==="component")return this.getVariable({componentId:i},s)}walkComponents(t){if(this.config.pages)for(const r of this.config.pages){const n=[];for(const s of r.components||[])n.push({node:s});let i=!1;for(;n.length>0&&!i;){const{node:s,parent:c}=n.pop();if(t(s,r,c)===!1){i=!0;break}if(s.children&&s.children.length>0)for(let f=s.children.length-1;f>=0;f--)n.push({node:s.children[f],parent:s})}if(i)break}}}function qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue={exports:{}},Kt={},_e={},Ee={},Jt={},Ht={},xt={},pr;function jt(){return pr||(pr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(a){if(super(),!e.IDENTIFIER.test(a))throw new Error("CodeGen: name must be a valid identifier");this.str=a}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(a){super(),this._items=typeof a=="string"?[a]:a}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const a=this._items[0];return a===""||a==='""'}get str(){var a;return(a=this._str)!==null&&a!==void 0?a:this._str=this._items.reduce((l,y)=>`${l}${y}`,"")}get names(){var a;return(a=this._names)!==null&&a!==void 0?a:this._names=this._items.reduce((l,y)=>(y instanceof r&&(l[y.str]=(l[y.str]||0)+1),l),{})}}e._Code=n,e.nil=new n("");function i(p,...a){const l=[p[0]];let y=0;for(;y<a.length;)o(l,a[y]),l.push(p[++y]);return new n(l)}e._=i;const s=new n("+");function c(p,...a){const l=[v(p[0])];let y=0;for(;y<a.length;)l.push(s),o(l,a[y]),l.push(s,v(p[++y]));return f(l),new n(l)}e.str=c;function o(p,a){a instanceof n?p.push(...a._items):a instanceof r?p.push(a):p.push(E(a))}e.addCodeArg=o;function f(p){let a=1;for(;a<p.length-1;){if(p[a]===s){const l=_(p[a-1],p[a+1]);if(l!==void 0){p.splice(a-1,3,l);continue}p[a++]="+"}a++}}function _(p,a){if(a==='""')return p;if(p==='""')return a;if(typeof p=="string")return a instanceof r||p[p.length-1]!=='"'?void 0:typeof a!="string"?`${p.slice(0,-1)}${a}"`:a[0]==='"'?p.slice(0,-1)+a.slice(1):void 0;if(typeof a=="string"&&a[0]==='"'&&!(p instanceof r))return`"${p}${a.slice(1)}`}function $(p,a){return a.emptyStr()?p:p.emptyStr()?a:c`${p}${a}`}e.strConcat=$;function E(p){return typeof p=="number"||typeof p=="boolean"||p===null?p:v(Array.isArray(p)?p.join(","):p)}function m(p){return new n(v(p))}e.stringify=m;function v(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function b(p){return typeof p=="string"&&e.IDENTIFIER.test(p)?new n(`.${p}`):i`[${p}]`}e.getProperty=b;function w(p){if(typeof p=="string"&&e.IDENTIFIER.test(p))return new n(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}e.getEsmExportName=w;function d(p){return new n(p.toString())}e.regexpCode=d})(xt)),xt}var Wt={},mr;function hr(){return mr||(mr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=jt();class r extends Error{constructor(_){super(`CodeGen: "code" for ${_} not defined`),this.value=_.value}}var n;(function(f){f[f.Started=0]="Started",f[f.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:_,parent:$}={}){this._names={},this._prefixes=_,this._parent=$}toName(_){return _ instanceof t.Name?_:this.name(_)}name(_){return new t.Name(this._newName(_))}_newName(_){const $=this._names[_]||this._nameGroup(_);return`${_}${$.index++}`}_nameGroup(_){var $,E;if(!((E=($=this._parent)===null||$===void 0?void 0:$._prefixes)===null||E===void 0)&&E.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=i;class s extends t.Name{constructor(_,$){super($),this.prefix=_}setValue(_,{property:$,itemIndex:E}){this.value=_,this.scopePath=(0,t._)`.${new t.Name($)}[${E}]`}}e.ValueScopeName=s;const c=(0,t._)`\n`;class o extends i{constructor(_){super(_),this._values={},this._scope=_.scope,this.opts={..._,_n:_.lines?c:t.nil}}get(){return this._scope}name(_){return new s(_,this._newName(_))}value(_,$){var E;if($.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(_),{prefix:v}=m,b=(E=$.key)!==null&&E!==void 0?E:$.ref;let w=this._values[v];if(w){const a=w.get(b);if(a)return a}else w=this._values[v]=new Map;w.set(b,m);const d=this._scope[v]||(this._scope[v]=[]),p=d.length;return d[p]=$.ref,m.setValue($,{property:v,itemIndex:p}),m}getValue(_,$){const E=this._values[_];if(E)return E.get($)}scopeRefs(_,$=this._values){return this._reduceValues($,E=>{if(E.scopePath===void 0)throw new Error(`CodeGen: name "${E}" has no value`);return(0,t._)`${_}${E.scopePath}`})}scopeCode(_=this._values,$,E){return this._reduceValues(_,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},$,E)}_reduceValues(_,$,E={},m){let v=t.nil;for(const b in _){const w=_[b];if(!w)continue;const d=E[b]=E[b]||new Map;w.forEach(p=>{if(d.has(p))return;d.set(p,n.Started);let a=$(p);if(a){const l=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${l} ${p} = ${a};${this.opts._n}`}else if(a=m?.(p))v=(0,t._)`${v}${a}${this.opts._n}`;else throw new r(p);d.set(p,n.Completed)})}return v}}e.ValueScope=o})(Wt)),Wt}var yr;function x(){return yr||(yr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=jt(),r=hr();var n=jt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=hr();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(h,P){return this}}class c extends s{constructor(h,P,I){super(),this.varKind=h,this.name=P,this.rhs=I}render({es5:h,_n:P}){const I=h?r.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${I} ${this.name}${F};`+P}optimizeNames(h,P){if(h[this.name.str])return this.rhs&&(this.rhs=U(this.rhs,h,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(h,P,I){super(),this.lhs=h,this.rhs=P,this.sideEffects=I}render({_n:h}){return`${this.lhs} = ${this.rhs};`+h}optimizeNames(h,P){if(!(this.lhs instanceof t.Name&&!h[this.lhs.str]&&!this.sideEffects))return this.rhs=U(this.rhs,h,P),this}get names(){const h=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(h,this.rhs)}}class f extends o{constructor(h,P,I,F){super(h,I,F),this.op=P}render({_n:h}){return`${this.lhs} ${this.op}= ${this.rhs};`+h}}class _ extends s{constructor(h){super(),this.label=h,this.names={}}render({_n:h}){return`${this.label}:`+h}}class $ extends s{constructor(h){super(),this.label=h,this.names={}}render({_n:h}){return`break${this.label?` ${this.label}`:""};`+h}}class E extends s{constructor(h){super(),this.error=h}render({_n:h}){return`throw ${this.error};`+h}get names(){return this.error.names}}class m extends s{constructor(h){super(),this.code=h}render({_n:h}){return`${this.code};`+h}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(h,P){return this.code=U(this.code,h,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(h=[]){super(),this.nodes=h}render(h){return this.nodes.reduce((P,I)=>P+I.render(h),"")}optimizeNodes(){const{nodes:h}=this;let P=h.length;for(;P--;){const I=h[P].optimizeNodes();Array.isArray(I)?h.splice(P,1,...I):I?h[P]=I:h.splice(P,1)}return h.length>0?this:void 0}optimizeNames(h,P){const{nodes:I}=this;let F=I.length;for(;F--;){const J=I[F];J.optimizeNames(h,P)||(Q(h,J.names),I.splice(F,1))}return I.length>0?this:void 0}get names(){return this.nodes.reduce((h,P)=>V(h,P.names),{})}}class b extends v{render(h){return"{"+h._n+super.render(h)+"}"+h._n}}class w extends v{}class d extends b{}d.kind="else";class p extends b{constructor(h,P){super(P),this.condition=h}render(h){let P=`if(${this.condition})`+super.render(h);return this.else&&(P+="else "+this.else.render(h)),P}optimizeNodes(){super.optimizeNodes();const h=this.condition;if(h===!0)return this.nodes;let P=this.else;if(P){const I=P.optimizeNodes();P=this.else=Array.isArray(I)?new d(I):I}if(P)return h===!1?P instanceof p?P:P.nodes:this.nodes.length?this:new p(ie(h),P instanceof p?[P]:P.nodes);if(!(h===!1||!this.nodes.length))return this}optimizeNames(h,P){var I;if(this.else=(I=this.else)===null||I===void 0?void 0:I.optimizeNames(h,P),!!(super.optimizeNames(h,P)||this.else))return this.condition=U(this.condition,h,P),this}get names(){const h=super.names;return z(h,this.condition),this.else&&V(h,this.else.names),h}}p.kind="if";class a extends b{}a.kind="for";class l extends a{constructor(h){super(),this.iteration=h}render(h){return`for(${this.iteration})`+super.render(h)}optimizeNames(h,P){if(super.optimizeNames(h,P))return this.iteration=U(this.iteration,h,P),this}get names(){return V(super.names,this.iteration.names)}}class y extends a{constructor(h,P,I,F){super(),this.varKind=h,this.name=P,this.from=I,this.to=F}render(h){const P=h.es5?r.varKinds.var:this.varKind,{name:I,from:F,to:J}=this;return`for(${P} ${I}=${F}; ${I}<${J}; ${I}++)`+super.render(h)}get names(){const h=z(super.names,this.from);return z(h,this.to)}}class u extends a{constructor(h,P,I,F){super(),this.loop=h,this.varKind=P,this.name=I,this.iterable=F}render(h){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(h)}optimizeNames(h,P){if(super.optimizeNames(h,P))return this.iterable=U(this.iterable,h,P),this}get names(){return V(super.names,this.iterable.names)}}class g extends b{constructor(h,P,I){super(),this.name=h,this.args=P,this.async=I}render(h){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(h)}}g.kind="func";class S extends v{render(h){return"return "+super.render(h)}}S.kind="return";class C extends b{render(h){let P="try"+super.render(h);return this.catch&&(P+=this.catch.render(h)),this.finally&&(P+=this.finally.render(h)),P}optimizeNodes(){var h,P;return super.optimizeNodes(),(h=this.catch)===null||h===void 0||h.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(h,P){var I,F;return super.optimizeNames(h,P),(I=this.catch)===null||I===void 0||I.optimizeNames(h,P),(F=this.finally)===null||F===void 0||F.optimizeNames(h,P),this}get names(){const h=super.names;return this.catch&&V(h,this.catch.names),this.finally&&V(h,this.finally.names),h}}class T extends b{constructor(h){super(),this.error=h}render(h){return`catch(${this.error})`+super.render(h)}}T.kind="catch";class L extends b{render(h){return"finally"+super.render(h)}}L.kind="finally";class O{constructor(h,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
2
+ `:""},this._extScope=h,this._scope=new r.Scope({parent:h}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(h){return this._scope.name(h)}scopeName(h){return this._extScope.name(h)}scopeValue(h,P){const I=this._extScope.value(h,P);return(this._values[I.prefix]||(this._values[I.prefix]=new Set)).add(I),I}getScopeValue(h,P){return this._extScope.getValue(h,P)}scopeRefs(h){return this._extScope.scopeRefs(h,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(h,P,I,F){const J=this._scope.toName(P);return I!==void 0&&F&&(this._constants[J.str]=I),this._leafNode(new c(h,J,I)),J}const(h,P,I){return this._def(r.varKinds.const,h,P,I)}let(h,P,I){return this._def(r.varKinds.let,h,P,I)}var(h,P,I){return this._def(r.varKinds.var,h,P,I)}assign(h,P,I){return this._leafNode(new o(h,P,I))}add(h,P){return this._leafNode(new f(h,e.operators.ADD,P))}code(h){return typeof h=="function"?h():h!==t.nil&&this._leafNode(new m(h)),this}object(...h){const P=["{"];for(const[I,F]of h)P.length>1&&P.push(","),P.push(I),(I!==F||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,F));return P.push("}"),new t._Code(P)}if(h,P,I){if(this._blockNode(new p(h)),P&&I)this.code(P).else().code(I).endIf();else if(P)this.code(P).endIf();else if(I)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(h){return this._elseNode(new p(h))}else(){return this._elseNode(new d)}endIf(){return this._endBlockNode(p,d)}_for(h,P){return this._blockNode(h),P&&this.code(P).endFor(),this}for(h,P){return this._for(new l(h),P)}forRange(h,P,I,F,J=this.opts.es5?r.varKinds.var:r.varKinds.let){const Y=this._scope.toName(h);return this._for(new y(J,Y,P,I),()=>F(Y))}forOf(h,P,I,F=r.varKinds.const){const J=this._scope.toName(h);if(this.opts.es5){const Y=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${Y}.length`,G=>{this.var(J,(0,t._)`${Y}[${G}]`),I(J)})}return this._for(new u("of",F,J,P),()=>I(J))}forIn(h,P,I,F=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(h,(0,t._)`Object.keys(${P})`,I);const J=this._scope.toName(h);return this._for(new u("in",F,J,P),()=>I(J))}endFor(){return this._endBlockNode(a)}label(h){return this._leafNode(new _(h))}break(h){return this._leafNode(new $(h))}return(h){const P=new S;if(this._blockNode(P),this.code(h),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(h,P,I){if(!P&&!I)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new C;if(this._blockNode(F),this.code(h),P){const J=this.name("e");this._currNode=F.catch=new T(J),P(J)}return I&&(this._currNode=F.finally=new L,this.code(I)),this._endBlockNode(T,L)}throw(h){return this._leafNode(new E(h))}block(h,P){return this._blockStarts.push(this._nodes.length),h&&this.code(h).endBlock(P),this}endBlock(h){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const I=this._nodes.length-P;if(I<0||h!==void 0&&I!==h)throw new Error(`CodeGen: wrong number of nodes: ${I} vs ${h} expected`);return this._nodes.length=P,this}func(h,P=t.nil,I,F){return this._blockNode(new g(h,P,I)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(h=1){for(;h-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(h){return this._currNode.nodes.push(h),this}_blockNode(h){this._currNode.nodes.push(h),this._nodes.push(h)}_endBlockNode(h,P){const I=this._currNode;if(I instanceof h||P&&I instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${h.kind}/${P.kind}`:h.kind}"`)}_elseNode(h){const P=this._currNode;if(!(P instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=h,this}get _root(){return this._nodes[0]}get _currNode(){const h=this._nodes;return h[h.length-1]}set _currNode(h){const P=this._nodes;P[P.length-1]=h}}e.CodeGen=O;function V(N,h){for(const P in h)N[P]=(N[P]||0)+(h[P]||0);return N}function z(N,h){return h instanceof t._CodeOrName?V(N,h.names):N}function U(N,h,P){if(N instanceof t.Name)return I(N);if(!F(N))return N;return new t._Code(N._items.reduce((J,Y)=>(Y instanceof t.Name&&(Y=I(Y)),Y instanceof t._Code?J.push(...Y._items):J.push(Y),J),[]));function I(J){const Y=P[J.str];return Y===void 0||h[J.str]!==1?J:(delete h[J.str],Y)}function F(J){return J instanceof t._Code&&J._items.some(Y=>Y instanceof t.Name&&h[Y.str]===1&&P[Y.str]!==void 0)}}function Q(N,h){for(const P in h)N[P]=(N[P]||0)-(h[P]||0)}function ie(N){return typeof N=="boolean"||typeof N=="number"||N===null?!N:(0,t._)`!${q(N)}`}e.not=ie;const oe=j(e.operators.AND);function X(...N){return N.reduce(oe)}e.and=X;const pe=j(e.operators.OR);function M(...N){return N.reduce(pe)}e.or=M;function j(N){return(h,P)=>h===t.nil?P:P===t.nil?h:(0,t._)`${q(h)} ${N} ${q(P)}`}function q(N){return N instanceof t.Name?N:(0,t._)`(${N})`}})(Ht)),Ht}var H={},gr;function B(){if(gr)return H;gr=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=x(),t=jt();function r(u){const g={};for(const S of u)g[S]=!0;return g}H.toHash=r;function n(u,g){return typeof g=="boolean"?g:Object.keys(g).length===0?!0:(i(u,g),!s(g,u.self.RULES.all))}H.alwaysValidSchema=n;function i(u,g=u.schema){const{opts:S,self:C}=u;if(!S.strictSchema||typeof g=="boolean")return;const T=C.RULES.keywords;for(const L in g)T[L]||y(u,`unknown keyword: "${L}"`)}H.checkUnknownRules=i;function s(u,g){if(typeof u=="boolean")return!u;for(const S in u)if(g[S])return!0;return!1}H.schemaHasRules=s;function c(u,g){if(typeof u=="boolean")return!u;for(const S in u)if(S!=="$ref"&&g.all[S])return!0;return!1}H.schemaHasRulesButRef=c;function o({topSchemaRef:u,schemaPath:g},S,C,T){if(!T){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${u}${g}${(0,e.getProperty)(C)}`}H.schemaRefOrVal=o;function f(u){return E(decodeURIComponent(u))}H.unescapeFragment=f;function _(u){return encodeURIComponent($(u))}H.escapeFragment=_;function $(u){return typeof u=="number"?`${u}`:u.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=$;function E(u){return u.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=E;function m(u,g){if(Array.isArray(u))for(const S of u)g(S);else g(u)}H.eachItem=m;function v({mergeNames:u,mergeToName:g,mergeValues:S,resultToName:C}){return(T,L,O,V)=>{const z=O===void 0?L:O instanceof e.Name?(L instanceof e.Name?u(T,L,O):g(T,L,O),O):L instanceof e.Name?(g(T,O,L),L):S(L,O);return V===e.Name&&!(z instanceof e.Name)?C(T,z):z}}H.mergeEvaluated={props:v({mergeNames:(u,g,S)=>u.if((0,e._)`${S} !== true && ${g} !== undefined`,()=>{u.if((0,e._)`${g} === true`,()=>u.assign(S,!0),()=>u.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${g})`))}),mergeToName:(u,g,S)=>u.if((0,e._)`${S} !== true`,()=>{g===!0?u.assign(S,!0):(u.assign(S,(0,e._)`${S} || {}`),w(u,S,g))}),mergeValues:(u,g)=>u===!0?!0:{...u,...g},resultToName:b}),items:v({mergeNames:(u,g,S)=>u.if((0,e._)`${S} !== true && ${g} !== undefined`,()=>u.assign(S,(0,e._)`${g} === true ? true : ${S} > ${g} ? ${S} : ${g}`)),mergeToName:(u,g,S)=>u.if((0,e._)`${S} !== true`,()=>u.assign(S,g===!0?!0:(0,e._)`${S} > ${g} ? ${S} : ${g}`)),mergeValues:(u,g)=>u===!0?!0:Math.max(u,g),resultToName:(u,g)=>u.var("items",g)})};function b(u,g){if(g===!0)return u.var("props",!0);const S=u.var("props",(0,e._)`{}`);return g!==void 0&&w(u,S,g),S}H.evaluatedPropsToName=b;function w(u,g,S){Object.keys(S).forEach(C=>u.assign((0,e._)`${g}${(0,e.getProperty)(C)}`,!0))}H.setEvaluated=w;const d={};function p(u,g){return u.scopeValue("func",{ref:g,code:d[g.code]||(d[g.code]=new t._Code(g.code))})}H.useFunc=p;var a;(function(u){u[u.Num=0]="Num",u[u.Str=1]="Str"})(a||(H.Type=a={}));function l(u,g,S){if(u instanceof e.Name){const C=g===a.Num;return S?C?(0,e._)`"[" + ${u} + "]"`:(0,e._)`"['" + ${u} + "']"`:C?(0,e._)`"/" + ${u}`:(0,e._)`"/" + ${u}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(u).toString():"/"+$(u)}H.getErrorPath=l;function y(u,g,S=u.opts.strictSchema){if(S){if(g=`strict mode: ${g}`,S===!0)throw new Error(g);u.self.logger.warn(g)}}return H.checkStrictMode=y,H}var Fe={},vr;function Pe(){if(vr)return Fe;vr=1,Object.defineProperty(Fe,"__esModule",{value:!0});const e=x(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Fe.default=t,Fe}var _r;function Mt(){return _r||(_r=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=x(),r=B(),n=Pe();e.keywordError={message:({keyword:d})=>(0,t.str)`must pass "${d}" keyword validation`},e.keyword$DataError={message:({keyword:d,schemaType:p})=>p?(0,t.str)`"${d}" keyword must be ${p} ($data)`:(0,t.str)`"${d}" keyword is invalid ($data)`};function i(d,p=e.keywordError,a,l){const{it:y}=d,{gen:u,compositeRule:g,allErrors:S}=y,C=E(d,p,a);l??(g||S)?f(u,C):_(y,(0,t._)`[${C}]`)}e.reportError=i;function s(d,p=e.keywordError,a){const{it:l}=d,{gen:y,compositeRule:u,allErrors:g}=l,S=E(d,p,a);f(y,S),u||g||_(l,n.default.vErrors)}e.reportExtraError=s;function c(d,p){d.assign(n.default.errors,p),d.if((0,t._)`${n.default.vErrors} !== null`,()=>d.if(p,()=>d.assign((0,t._)`${n.default.vErrors}.length`,p),()=>d.assign(n.default.vErrors,null)))}e.resetErrorsCount=c;function o({gen:d,keyword:p,schemaValue:a,data:l,errsCount:y,it:u}){if(y===void 0)throw new Error("ajv implementation error");const g=d.name("err");d.forRange("i",y,n.default.errors,S=>{d.const(g,(0,t._)`${n.default.vErrors}[${S}]`),d.if((0,t._)`${g}.instancePath === undefined`,()=>d.assign((0,t._)`${g}.instancePath`,(0,t.strConcat)(n.default.instancePath,u.errorPath))),d.assign((0,t._)`${g}.schemaPath`,(0,t.str)`${u.errSchemaPath}/${p}`),u.opts.verbose&&(d.assign((0,t._)`${g}.schema`,a),d.assign((0,t._)`${g}.data`,l))})}e.extendErrors=o;function f(d,p){const a=d.const("err",p);d.if((0,t._)`${n.default.vErrors} === null`,()=>d.assign(n.default.vErrors,(0,t._)`[${a}]`),(0,t._)`${n.default.vErrors}.push(${a})`),d.code((0,t._)`${n.default.errors}++`)}function _(d,p){const{gen:a,validateName:l,schemaEnv:y}=d;y.$async?a.throw((0,t._)`new ${d.ValidationError}(${p})`):(a.assign((0,t._)`${l}.errors`,p),a.return(!1))}const $={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function E(d,p,a){const{createErrors:l}=d.it;return l===!1?(0,t._)`{}`:m(d,p,a)}function m(d,p,a={}){const{gen:l,it:y}=d,u=[v(y,a),b(d,a)];return w(d,p,u),l.object(...u)}function v({errorPath:d},{instancePath:p}){const a=p?(0,t.str)`${d}${(0,r.getErrorPath)(p,r.Type.Str)}`:d;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,a)]}function b({keyword:d,it:{errSchemaPath:p}},{schemaPath:a,parentSchema:l}){let y=l?p:(0,t.str)`${p}/${d}`;return a&&(y=(0,t.str)`${y}${(0,r.getErrorPath)(a,r.Type.Str)}`),[$.schemaPath,y]}function w(d,{params:p,message:a},l){const{keyword:y,data:u,schemaValue:g,it:S}=d,{opts:C,propertyName:T,topSchemaRef:L,schemaPath:O}=S;l.push([$.keyword,y],[$.params,typeof p=="function"?p(d):p||(0,t._)`{}`]),C.messages&&l.push([$.message,typeof a=="function"?a(d):a]),C.verbose&&l.push([$.schema,g],[$.parentSchema,(0,t._)`${L}${O}`],[n.default.data,u]),T&&l.push([$.propertyName,T])}})(Jt)),Jt}var $r;function bs(){if($r)return Ee;$r=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.boolOrEmptySchema=Ee.topBoolOrEmptySchema=void 0;const e=Mt(),t=x(),r=Pe(),n={message:"boolean schema is false"};function i(o){const{gen:f,schema:_,validateName:$}=o;_===!1?c(o,!1):typeof _=="object"&&_.$async===!0?f.return(r.default.data):(f.assign((0,t._)`${$}.errors`,null),f.return(!0))}Ee.topBoolOrEmptySchema=i;function s(o,f){const{gen:_,schema:$}=o;$===!1?(_.var(f,!1),c(o)):_.var(f,!0)}Ee.boolOrEmptySchema=s;function c(o,f){const{gen:_,data:$}=o,E={gen:_,keyword:"false schema",data:$,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)(E,n,void 0,f)}return Ee}var se={},ke={},br;function Tn(){if(br)return ke;br=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getRules=ke.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}ke.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return ke.getRules=n,ke}var $e={},wr;function Mn(){if(wr)return $e;wr=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.shouldUseRule=$e.shouldUseGroup=$e.schemaHasRulesForType=void 0;function e({schema:n,self:i},s){const c=i.RULES.types[s];return c&&c!==!0&&t(n,c)}$e.schemaHasRulesForType=e;function t(n,i){return i.rules.some(s=>r(n,s))}$e.shouldUseGroup=t;function r(n,i){var s;return n[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(c=>n[c]!==void 0))}return $e.shouldUseRule=r,$e}var Sr;function Rt(){if(Sr)return se;Sr=1,Object.defineProperty(se,"__esModule",{value:!0}),se.reportTypeError=se.checkDataTypes=se.checkDataType=se.coerceAndCheckDataType=se.getJSONTypes=se.getSchemaTypes=se.DataType=void 0;const e=Tn(),t=Mn(),r=Mt(),n=x(),i=B();var s;(function(a){a[a.Correct=0]="Correct",a[a.Wrong=1]="Wrong"})(s||(se.DataType=s={}));function c(a){const l=o(a.type);if(l.includes("null")){if(a.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!l.length&&a.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');a.nullable===!0&&l.push("null")}return l}se.getSchemaTypes=c;function o(a){const l=Array.isArray(a)?a:a?[a]:[];if(l.every(e.isJSONType))return l;throw new Error("type must be JSONType or JSONType[]: "+l.join(","))}se.getJSONTypes=o;function f(a,l){const{gen:y,data:u,opts:g}=a,S=$(l,g.coerceTypes),C=l.length>0&&!(S.length===0&&l.length===1&&(0,t.schemaHasRulesForType)(a,l[0]));if(C){const T=b(l,u,g.strictNumbers,s.Wrong);y.if(T,()=>{S.length?E(a,l,S):d(a)})}return C}se.coerceAndCheckDataType=f;const _=new Set(["string","number","integer","boolean","null"]);function $(a,l){return l?a.filter(y=>_.has(y)||l==="array"&&y==="array"):[]}function E(a,l,y){const{gen:u,data:g,opts:S}=a,C=u.let("dataType",(0,n._)`typeof ${g}`),T=u.let("coerced",(0,n._)`undefined`);S.coerceTypes==="array"&&u.if((0,n._)`${C} == 'object' && Array.isArray(${g}) && ${g}.length == 1`,()=>u.assign(g,(0,n._)`${g}[0]`).assign(C,(0,n._)`typeof ${g}`).if(b(l,g,S.strictNumbers),()=>u.assign(T,g))),u.if((0,n._)`${T} !== undefined`);for(const O of y)(_.has(O)||O==="array"&&S.coerceTypes==="array")&&L(O);u.else(),d(a),u.endIf(),u.if((0,n._)`${T} !== undefined`,()=>{u.assign(g,T),m(a,T)});function L(O){switch(O){case"string":u.elseIf((0,n._)`${C} == "number" || ${C} == "boolean"`).assign(T,(0,n._)`"" + ${g}`).elseIf((0,n._)`${g} === null`).assign(T,(0,n._)`""`);return;case"number":u.elseIf((0,n._)`${C} == "boolean" || ${g} === null
3
+ || (${C} == "string" && ${g} && ${g} == +${g})`).assign(T,(0,n._)`+${g}`);return;case"integer":u.elseIf((0,n._)`${C} === "boolean" || ${g} === null
4
+ || (${C} === "string" && ${g} && ${g} == +${g} && !(${g} % 1))`).assign(T,(0,n._)`+${g}`);return;case"boolean":u.elseIf((0,n._)`${g} === "false" || ${g} === 0 || ${g} === null`).assign(T,!1).elseIf((0,n._)`${g} === "true" || ${g} === 1`).assign(T,!0);return;case"null":u.elseIf((0,n._)`${g} === "" || ${g} === 0 || ${g} === false`),u.assign(T,null);return;case"array":u.elseIf((0,n._)`${C} === "string" || ${C} === "number"
5
+ || ${C} === "boolean" || ${g} === null`).assign(T,(0,n._)`[${g}]`)}}}function m({gen:a,parentData:l,parentDataProperty:y},u){a.if((0,n._)`${l} !== undefined`,()=>a.assign((0,n._)`${l}[${y}]`,u))}function v(a,l,y,u=s.Correct){const g=u===s.Correct?n.operators.EQ:n.operators.NEQ;let S;switch(a){case"null":return(0,n._)`${l} ${g} null`;case"array":S=(0,n._)`Array.isArray(${l})`;break;case"object":S=(0,n._)`${l} && typeof ${l} == "object" && !Array.isArray(${l})`;break;case"integer":S=C((0,n._)`!(${l} % 1) && !isNaN(${l})`);break;case"number":S=C();break;default:return(0,n._)`typeof ${l} ${g} ${a}`}return u===s.Correct?S:(0,n.not)(S);function C(T=n.nil){return(0,n.and)((0,n._)`typeof ${l} == "number"`,T,y?(0,n._)`isFinite(${l})`:n.nil)}}se.checkDataType=v;function b(a,l,y,u){if(a.length===1)return v(a[0],l,y,u);let g;const S=(0,i.toHash)(a);if(S.array&&S.object){const C=(0,n._)`typeof ${l} != "object"`;g=S.null?C:(0,n._)`!${l} || ${C}`,delete S.null,delete S.array,delete S.object}else g=n.nil;S.number&&delete S.integer;for(const C in S)g=(0,n.and)(g,v(C,l,y,u));return g}se.checkDataTypes=b;const w={message:({schema:a})=>`must be ${a}`,params:({schema:a,schemaValue:l})=>typeof a=="string"?(0,n._)`{type: ${a}}`:(0,n._)`{type: ${l}}`};function d(a){const l=p(a);(0,r.reportError)(l,w)}se.reportTypeError=d;function p(a){const{gen:l,data:y,schema:u}=a,g=(0,i.schemaRefOrVal)(a,u,"type");return{gen:l,keyword:"type",data:y,schema:u.type,schemaCode:g,schemaValue:g,parentSchema:u,params:{},it:a}}return se}var De={},Pr;function ws(){if(Pr)return De;Pr=1,Object.defineProperty(De,"__esModule",{value:!0}),De.assignDefaults=void 0;const e=x(),t=B();function r(i,s){const{properties:c,items:o}=i.schema;if(s==="object"&&c)for(const f in c)n(i,f,c[f].default);else s==="array"&&Array.isArray(o)&&o.forEach((f,_)=>n(i,_,f.default))}De.assignDefaults=r;function n(i,s,c){const{gen:o,compositeRule:f,data:_,opts:$}=i;if(c===void 0)return;const E=(0,e._)`${_}${(0,e.getProperty)(s)}`;if(f){(0,t.checkStrictMode)(i,`default is ignored for: ${E}`);return}let m=(0,e._)`${E} === undefined`;$.useDefaults==="empty"&&(m=(0,e._)`${m} || ${E} === null || ${E} === ""`),o.if(m,(0,e._)`${E} = ${(0,e.stringify)(c)}`)}return De}var he={},Z={},Er;function ge(){if(Er)return Z;Er=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.validateUnion=Z.validateArray=Z.usePattern=Z.callValidateCode=Z.schemaProperties=Z.allSchemaProperties=Z.noPropertyInData=Z.propertyInData=Z.isOwnProperty=Z.hasPropFunc=Z.reportMissingProp=Z.checkMissingProp=Z.checkReportMissingProp=void 0;const e=x(),t=B(),r=Pe(),n=B();function i(a,l){const{gen:y,data:u,it:g}=a;y.if($(y,u,l,g.opts.ownProperties),()=>{a.setParams({missingProperty:(0,e._)`${l}`},!0),a.error()})}Z.checkReportMissingProp=i;function s({gen:a,data:l,it:{opts:y}},u,g){return(0,e.or)(...u.map(S=>(0,e.and)($(a,l,S,y.ownProperties),(0,e._)`${g} = ${S}`)))}Z.checkMissingProp=s;function c(a,l){a.setParams({missingProperty:l},!0),a.error()}Z.reportMissingProp=c;function o(a){return a.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Z.hasPropFunc=o;function f(a,l,y){return(0,e._)`${o(a)}.call(${l}, ${y})`}Z.isOwnProperty=f;function _(a,l,y,u){const g=(0,e._)`${l}${(0,e.getProperty)(y)} !== undefined`;return u?(0,e._)`${g} && ${f(a,l,y)}`:g}Z.propertyInData=_;function $(a,l,y,u){const g=(0,e._)`${l}${(0,e.getProperty)(y)} === undefined`;return u?(0,e.or)(g,(0,e.not)(f(a,l,y))):g}Z.noPropertyInData=$;function E(a){return a?Object.keys(a).filter(l=>l!=="__proto__"):[]}Z.allSchemaProperties=E;function m(a,l){return E(l).filter(y=>!(0,t.alwaysValidSchema)(a,l[y]))}Z.schemaProperties=m;function v({schemaCode:a,data:l,it:{gen:y,topSchemaRef:u,schemaPath:g,errorPath:S},it:C},T,L,O){const V=O?(0,e._)`${a}, ${l}, ${u}${g}`:l,z=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,S)],[r.default.parentData,C.parentData],[r.default.parentDataProperty,C.parentDataProperty],[r.default.rootData,r.default.rootData]];C.opts.dynamicRef&&z.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const U=(0,e._)`${V}, ${y.object(...z)}`;return L!==e.nil?(0,e._)`${T}.call(${L}, ${U})`:(0,e._)`${T}(${U})`}Z.callValidateCode=v;const b=(0,e._)`new RegExp`;function w({gen:a,it:{opts:l}},y){const u=l.unicodeRegExp?"u":"",{regExp:g}=l.code,S=g(y,u);return a.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${g.code==="new RegExp"?b:(0,n.useFunc)(a,g)}(${y}, ${u})`})}Z.usePattern=w;function d(a){const{gen:l,data:y,keyword:u,it:g}=a,S=l.name("valid");if(g.allErrors){const T=l.let("valid",!0);return C(()=>l.assign(T,!1)),T}return l.var(S,!0),C(()=>l.break()),S;function C(T){const L=l.const("len",(0,e._)`${y}.length`);l.forRange("i",0,L,O=>{a.subschema({keyword:u,dataProp:O,dataPropType:t.Type.Num},S),l.if((0,e.not)(S),T)})}}Z.validateArray=d;function p(a){const{gen:l,schema:y,keyword:u,it:g}=a;if(!Array.isArray(y))throw new Error("ajv implementation error");if(y.some(L=>(0,t.alwaysValidSchema)(g,L))&&!g.opts.unevaluated)return;const C=l.let("valid",!1),T=l.name("_valid");l.block(()=>y.forEach((L,O)=>{const V=a.subschema({keyword:u,schemaProp:O,compositeRule:!0},T);l.assign(C,(0,e._)`${C} || ${T}`),a.mergeValidEvaluated(V,T)||l.if((0,e.not)(C))})),a.result(C,()=>a.reset(),()=>a.error(!0))}return Z.validateUnion=p,Z}var kr;function Ss(){if(kr)return he;kr=1,Object.defineProperty(he,"__esModule",{value:!0}),he.validateKeywordUsage=he.validSchemaType=he.funcKeywordCode=he.macroKeywordCode=void 0;const e=x(),t=Pe(),r=ge(),n=Mt();function i(m,v){const{gen:b,keyword:w,schema:d,parentSchema:p,it:a}=m,l=v.macro.call(a.self,d,p,a),y=_(b,w,l);a.opts.validateSchema!==!1&&a.self.validateSchema(l,!0);const u=b.name("valid");m.subschema({schema:l,schemaPath:e.nil,errSchemaPath:`${a.errSchemaPath}/${w}`,topSchemaRef:y,compositeRule:!0},u),m.pass(u,()=>m.error(!0))}he.macroKeywordCode=i;function s(m,v){var b;const{gen:w,keyword:d,schema:p,parentSchema:a,$data:l,it:y}=m;f(y,v);const u=!l&&v.compile?v.compile.call(y.self,p,a,y):v.validate,g=_(w,d,u),S=w.let("valid");m.block$data(S,C),m.ok((b=v.valid)!==null&&b!==void 0?b:S);function C(){if(v.errors===!1)O(),v.modifying&&c(m),V(()=>m.error());else{const z=v.async?T():L();v.modifying&&c(m),V(()=>o(m,z))}}function T(){const z=w.let("ruleErrs",null);return w.try(()=>O((0,e._)`await `),U=>w.assign(S,!1).if((0,e._)`${U} instanceof ${y.ValidationError}`,()=>w.assign(z,(0,e._)`${U}.errors`),()=>w.throw(U))),z}function L(){const z=(0,e._)`${g}.errors`;return w.assign(z,null),O(e.nil),z}function O(z=v.async?(0,e._)`await `:e.nil){const U=y.opts.passContext?t.default.this:t.default.self,Q=!("compile"in v&&!l||v.schema===!1);w.assign(S,(0,e._)`${z}${(0,r.callValidateCode)(m,g,U,Q)}`,v.modifying)}function V(z){var U;w.if((0,e.not)((U=v.valid)!==null&&U!==void 0?U:S),z)}}he.funcKeywordCode=s;function c(m){const{gen:v,data:b,it:w}=m;v.if(w.parentData,()=>v.assign(b,(0,e._)`${w.parentData}[${w.parentDataProperty}]`))}function o(m,v){const{gen:b}=m;b.if((0,e._)`Array.isArray(${v})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(m)},()=>m.error())}function f({schemaEnv:m},v){if(v.async&&!m.$async)throw new Error("async keyword in sync schema")}function _(m,v,b){if(b===void 0)throw new Error(`keyword "${v}" failed to compile`);return m.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function $(m,v,b=!1){return!v.length||v.some(w=>w==="array"?Array.isArray(m):w==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==w||b&&typeof m>"u")}he.validSchemaType=$;function E({schema:m,opts:v,self:b,errSchemaPath:w},d,p){if(Array.isArray(d.keyword)?!d.keyword.includes(p):d.keyword!==p)throw new Error("ajv implementation error");const a=d.dependencies;if(a?.some(l=>!Object.prototype.hasOwnProperty.call(m,l)))throw new Error(`parent schema must have dependencies of ${p}: ${a.join(",")}`);if(d.validateSchema&&!d.validateSchema(m[p])){const y=`keyword "${p}" value is invalid at path "${w}": `+b.errorsText(d.validateSchema.errors);if(v.validateSchema==="log")b.logger.error(y);else throw new Error(y)}}return he.validateKeywordUsage=E,he}var be={},jr;function Ps(){if(jr)return be;jr=1,Object.defineProperty(be,"__esModule",{value:!0}),be.extendSubschemaMode=be.extendSubschemaData=be.getSubschema=void 0;const e=x(),t=B();function r(s,{keyword:c,schemaProp:o,schema:f,schemaPath:_,errSchemaPath:$,topSchemaRef:E}){if(c!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const m=s.schema[c];return o===void 0?{schema:m,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${c}`}:{schema:m[o],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${c}/${(0,t.escapeFragment)(o)}`}}if(f!==void 0){if(_===void 0||$===void 0||E===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:_,topSchemaRef:E,errSchemaPath:$}}throw new Error('either "keyword" or "schema" must be passed')}be.getSubschema=r;function n(s,c,{dataProp:o,dataPropType:f,data:_,dataTypes:$,propertyName:E}){if(_!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=c;if(o!==void 0){const{errorPath:b,dataPathArr:w,opts:d}=c,p=m.let("data",(0,e._)`${c.data}${(0,e.getProperty)(o)}`,!0);v(p),s.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(o,f,d.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${o}`,s.dataPathArr=[...w,s.parentDataProperty]}if(_!==void 0){const b=_ instanceof e.Name?_:m.let("data",_,!0);v(b),E!==void 0&&(s.propertyName=E)}$&&(s.dataTypes=$);function v(b){s.data=b,s.dataLevel=c.dataLevel+1,s.dataTypes=[],c.definedProperties=new Set,s.parentData=c.data,s.dataNames=[...c.dataNames,b]}}be.extendSubschemaData=n;function i(s,{jtdDiscriminator:c,jtdMetadata:o,compositeRule:f,createErrors:_,allErrors:$}){f!==void 0&&(s.compositeRule=f),_!==void 0&&(s.createErrors=_),$!==void 0&&(s.allErrors=$),s.jtdDiscriminator=c,s.jtdMetadata=o}return be.extendSubschemaMode=i,be}var ae={},Gt,Rr;function An(){return Rr||(Rr=1,Gt=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var c=s[i];if(!e(t[c],r[c]))return!1}return!0}return t!==t&&r!==r}),Gt}var Bt={exports:{}},Nr;function Es(){if(Nr)return Bt.exports;Nr=1;var e=Bt.exports=function(n,i,s){typeof i=="function"&&(s=i,i={}),s=i.cb||s;var c=typeof s=="function"?s:s.pre||function(){},o=s.post||function(){};t(i,c,o,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,i,s,c,o,f,_,$,E,m){if(c&&typeof c=="object"&&!Array.isArray(c)){i(c,o,f,_,$,E,m);for(var v in c){var b=c[v];if(Array.isArray(b)){if(v in e.arrayKeywords)for(var w=0;w<b.length;w++)t(n,i,s,b[w],o+"/"+v+"/"+w,f,o,v,c,w)}else if(v in e.propsKeywords){if(b&&typeof b=="object")for(var d in b)t(n,i,s,b[d],o+"/"+v+"/"+r(d),f,o,v,c,d)}else(v in e.keywords||n.allKeys&&!(v in e.skipKeywords))&&t(n,i,s,b,o+"/"+v,f,o,v,c)}s(c,o,f,_,$,E,m)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Bt.exports}var Cr;function At(){if(Cr)return ae;Cr=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.getSchemaRefs=ae.resolveUrl=ae.normalizeId=ae._getFullPath=ae.getFullPath=ae.inlineRef=void 0;const e=B(),t=An(),r=Es(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(w,d=!0){return typeof w=="boolean"?!0:d===!0?!c(w):d?o(w)<=d:!1}ae.inlineRef=i;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(w){for(const d in w){if(s.has(d))return!0;const p=w[d];if(Array.isArray(p)&&p.some(c)||typeof p=="object"&&c(p))return!0}return!1}function o(w){let d=0;for(const p in w){if(p==="$ref")return 1/0;if(d++,!n.has(p)&&(typeof w[p]=="object"&&(0,e.eachItem)(w[p],a=>d+=o(a)),d===1/0))return 1/0}return d}function f(w,d="",p){p!==!1&&(d=E(d));const a=w.parse(d);return _(w,a)}ae.getFullPath=f;function _(w,d){return w.serialize(d).split("#")[0]+"#"}ae._getFullPath=_;const $=/#\/?$/;function E(w){return w?w.replace($,""):""}ae.normalizeId=E;function m(w,d,p){return p=E(p),w.resolve(d,p)}ae.resolveUrl=m;const v=/^[a-z_][-a-z0-9._]*$/i;function b(w,d){if(typeof w=="boolean")return{};const{schemaId:p,uriResolver:a}=this.opts,l=E(w[p]||d),y={"":l},u=f(a,l,!1),g={},S=new Set;return r(w,{allKeys:!0},(L,O,V,z)=>{if(z===void 0)return;const U=u+O;let Q=y[z];typeof L[p]=="string"&&(Q=ie.call(this,L[p])),oe.call(this,L.$anchor),oe.call(this,L.$dynamicAnchor),y[O]=Q;function ie(X){const pe=this.opts.uriResolver.resolve;if(X=E(Q?pe(Q,X):X),S.has(X))throw T(X);S.add(X);let M=this.refs[X];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?C(L,M.schema,X):X!==E(U)&&(X[0]==="#"?(C(L,g[X],X),g[X]=L):this.refs[X]=U),X}function oe(X){if(typeof X=="string"){if(!v.test(X))throw new Error(`invalid anchor "${X}"`);ie.call(this,`#${X}`)}}}),g;function C(L,O,V){if(O!==void 0&&!t(L,O))throw T(V)}function T(L){return new Error(`reference "${L}" resolves to more than one schema`)}}return ae.getSchemaRefs=b,ae}var Ir;function Vt(){if(Ir)return _e;Ir=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getData=_e.KeywordCxt=_e.validateFunctionCode=void 0;const e=bs(),t=Rt(),r=Mn(),n=Rt(),i=ws(),s=Ss(),c=Ps(),o=x(),f=Pe(),_=At(),$=B(),E=Mt();function m(k){if(u(k)&&(S(k),y(k))){d(k);return}v(k,()=>(0,e.topBoolOrEmptySchema)(k))}_e.validateFunctionCode=m;function v({gen:k,validateName:R,schema:D,schemaEnv:A,opts:K},W){K.code.es5?k.func(R,(0,o._)`${f.default.data}, ${f.default.valCxt}`,A.$async,()=>{k.code((0,o._)`"use strict"; ${a(D,K)}`),w(k,K),k.code(W)}):k.func(R,(0,o._)`${f.default.data}, ${b(K)}`,A.$async,()=>k.code(a(D,K)).code(W))}function b(k){return(0,o._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${k.dynamicRef?(0,o._)`, ${f.default.dynamicAnchors}={}`:o.nil}}={}`}function w(k,R){k.if(f.default.valCxt,()=>{k.var(f.default.instancePath,(0,o._)`${f.default.valCxt}.${f.default.instancePath}`),k.var(f.default.parentData,(0,o._)`${f.default.valCxt}.${f.default.parentData}`),k.var(f.default.parentDataProperty,(0,o._)`${f.default.valCxt}.${f.default.parentDataProperty}`),k.var(f.default.rootData,(0,o._)`${f.default.valCxt}.${f.default.rootData}`),R.dynamicRef&&k.var(f.default.dynamicAnchors,(0,o._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{k.var(f.default.instancePath,(0,o._)`""`),k.var(f.default.parentData,(0,o._)`undefined`),k.var(f.default.parentDataProperty,(0,o._)`undefined`),k.var(f.default.rootData,f.default.data),R.dynamicRef&&k.var(f.default.dynamicAnchors,(0,o._)`{}`)})}function d(k){const{schema:R,opts:D,gen:A}=k;v(k,()=>{D.$comment&&R.$comment&&z(k),L(k),A.let(f.default.vErrors,null),A.let(f.default.errors,0),D.unevaluated&&p(k),C(k),U(k)})}function p(k){const{gen:R,validateName:D}=k;k.evaluated=R.const("evaluated",(0,o._)`${D}.evaluated`),R.if((0,o._)`${k.evaluated}.dynamicProps`,()=>R.assign((0,o._)`${k.evaluated}.props`,(0,o._)`undefined`)),R.if((0,o._)`${k.evaluated}.dynamicItems`,()=>R.assign((0,o._)`${k.evaluated}.items`,(0,o._)`undefined`))}function a(k,R){const D=typeof k=="object"&&k[R.schemaId];return D&&(R.code.source||R.code.process)?(0,o._)`/*# sourceURL=${D} */`:o.nil}function l(k,R){if(u(k)&&(S(k),y(k))){g(k,R);return}(0,e.boolOrEmptySchema)(k,R)}function y({schema:k,self:R}){if(typeof k=="boolean")return!k;for(const D in k)if(R.RULES.all[D])return!0;return!1}function u(k){return typeof k.schema!="boolean"}function g(k,R){const{schema:D,gen:A,opts:K}=k;K.$comment&&D.$comment&&z(k),O(k),V(k);const W=A.const("_errs",f.default.errors);C(k,W),A.var(R,(0,o._)`${W} === ${f.default.errors}`)}function S(k){(0,$.checkUnknownRules)(k),T(k)}function C(k,R){if(k.opts.jtd)return ie(k,[],!1,R);const D=(0,t.getSchemaTypes)(k.schema),A=(0,t.coerceAndCheckDataType)(k,D);ie(k,D,!A,R)}function T(k){const{schema:R,errSchemaPath:D,opts:A,self:K}=k;R.$ref&&A.ignoreKeywordsWithRef&&(0,$.schemaHasRulesButRef)(R,K.RULES)&&K.logger.warn(`$ref: keywords ignored in schema at path "${D}"`)}function L(k){const{schema:R,opts:D}=k;R.default!==void 0&&D.useDefaults&&D.strictSchema&&(0,$.checkStrictMode)(k,"default is ignored in the schema root")}function O(k){const R=k.schema[k.opts.schemaId];R&&(k.baseId=(0,_.resolveUrl)(k.opts.uriResolver,k.baseId,R))}function V(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:k,schemaEnv:R,schema:D,errSchemaPath:A,opts:K}){const W=D.$comment;if(K.$comment===!0)k.code((0,o._)`${f.default.self}.logger.log(${W})`);else if(typeof K.$comment=="function"){const re=(0,o.str)`${A}/$comment`,me=k.scopeValue("root",{ref:R.root});k.code((0,o._)`${f.default.self}.opts.$comment(${W}, ${re}, ${me}.schema)`)}}function U(k){const{gen:R,schemaEnv:D,validateName:A,ValidationError:K,opts:W}=k;D.$async?R.if((0,o._)`${f.default.errors} === 0`,()=>R.return(f.default.data),()=>R.throw((0,o._)`new ${K}(${f.default.vErrors})`)):(R.assign((0,o._)`${A}.errors`,f.default.vErrors),W.unevaluated&&Q(k),R.return((0,o._)`${f.default.errors} === 0`))}function Q({gen:k,evaluated:R,props:D,items:A}){D instanceof o.Name&&k.assign((0,o._)`${R}.props`,D),A instanceof o.Name&&k.assign((0,o._)`${R}.items`,A)}function ie(k,R,D,A){const{gen:K,schema:W,data:re,allErrors:me,opts:ce,self:de}=k,{RULES:ne}=de;if(W.$ref&&(ce.ignoreKeywordsWithRef||!(0,$.schemaHasRulesButRef)(W,ne))){K.block(()=>F(k,"$ref",ne.all.$ref.definition));return}ce.jtd||X(k,R),K.block(()=>{for(const fe of ne.rules)Ne(fe);Ne(ne.post)});function Ne(fe){(0,r.shouldUseGroup)(W,fe)&&(fe.type?(K.if((0,n.checkDataType)(fe.type,re,ce.strictNumbers)),oe(k,fe),R.length===1&&R[0]===fe.type&&D&&(K.else(),(0,n.reportTypeError)(k)),K.endIf()):oe(k,fe),me||K.if((0,o._)`${f.default.errors} === ${A||0}`))}}function oe(k,R){const{gen:D,schema:A,opts:{useDefaults:K}}=k;K&&(0,i.assignDefaults)(k,R.type),D.block(()=>{for(const W of R.rules)(0,r.shouldUseRule)(A,W)&&F(k,W.keyword,W.definition,R.type)})}function X(k,R){k.schemaEnv.meta||!k.opts.strictTypes||(pe(k,R),k.opts.allowUnionTypes||M(k,R),j(k,k.dataTypes))}function pe(k,R){if(R.length){if(!k.dataTypes.length){k.dataTypes=R;return}R.forEach(D=>{N(k.dataTypes,D)||P(k,`type "${D}" not allowed by context "${k.dataTypes.join(",")}"`)}),h(k,R)}}function M(k,R){R.length>1&&!(R.length===2&&R.includes("null"))&&P(k,"use allowUnionTypes to allow union type keyword")}function j(k,R){const D=k.self.RULES.all;for(const A in D){const K=D[A];if(typeof K=="object"&&(0,r.shouldUseRule)(k.schema,K)){const{type:W}=K.definition;W.length&&!W.some(re=>q(R,re))&&P(k,`missing type "${W.join(",")}" for keyword "${A}"`)}}}function q(k,R){return k.includes(R)||R==="number"&&k.includes("integer")}function N(k,R){return k.includes(R)||R==="integer"&&k.includes("number")}function h(k,R){const D=[];for(const A of k.dataTypes)N(R,A)?D.push(A):R.includes("integer")&&A==="number"&&D.push("integer");k.dataTypes=D}function P(k,R){const D=k.schemaEnv.baseId+k.errSchemaPath;R+=` at "${D}" (strictTypes)`,(0,$.checkStrictMode)(k,R,k.opts.strictTypes)}class I{constructor(R,D,A){if((0,s.validateKeywordUsage)(R,D,A),this.gen=R.gen,this.allErrors=R.allErrors,this.keyword=A,this.data=R.data,this.schema=R.schema[A],this.$data=D.$data&&R.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$.schemaRefOrVal)(R,this.schema,A,this.$data),this.schemaType=D.schemaType,this.parentSchema=R.schema,this.params={},this.it=R,this.def=D,this.$data)this.schemaCode=R.gen.const("vSchema",G(this.$data,R));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${A} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=R.gen.const("_errs",f.default.errors))}result(R,D,A){this.failResult((0,o.not)(R),D,A)}failResult(R,D,A){this.gen.if(R),A?A():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(R,D){this.failResult((0,o.not)(R),void 0,D)}fail(R){if(R===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(R),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(R){if(!this.$data)return this.fail(R);const{schemaCode:D}=this;this.fail((0,o._)`${D} !== undefined && (${(0,o.or)(this.invalid$data(),R)})`)}error(R,D,A){if(D){this.setParams(D),this._error(R,A),this.setParams({});return}this._error(R,A)}_error(R,D){(R?E.reportExtraError:E.reportError)(this,this.def.error,D)}$dataError(){(0,E.reportError)(this,this.def.$dataError||E.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,E.resetErrorsCount)(this.gen,this.errsCount)}ok(R){this.allErrors||this.gen.if(R)}setParams(R,D){D?Object.assign(this.params,R):this.params=R}block$data(R,D,A=o.nil){this.gen.block(()=>{this.check$data(R,A),D()})}check$data(R=o.nil,D=o.nil){if(!this.$data)return;const{gen:A,schemaCode:K,schemaType:W,def:re}=this;A.if((0,o.or)((0,o._)`${K} === undefined`,D)),R!==o.nil&&A.assign(R,!0),(W.length||re.validateSchema)&&(A.elseIf(this.invalid$data()),this.$dataError(),R!==o.nil&&A.assign(R,!1)),A.else()}invalid$data(){const{gen:R,schemaCode:D,schemaType:A,def:K,it:W}=this;return(0,o.or)(re(),me());function re(){if(A.length){if(!(D instanceof o.Name))throw new Error("ajv implementation error");const ce=Array.isArray(A)?A:[A];return(0,o._)`${(0,n.checkDataTypes)(ce,D,W.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}function me(){if(K.validateSchema){const ce=R.scopeValue("validate$data",{ref:K.validateSchema});return(0,o._)`!${ce}(${D})`}return o.nil}}subschema(R,D){const A=(0,c.getSubschema)(this.it,R);(0,c.extendSubschemaData)(A,this.it,R),(0,c.extendSubschemaMode)(A,R);const K={...this.it,...A,items:void 0,props:void 0};return l(K,D),K}mergeEvaluated(R,D){const{it:A,gen:K}=this;A.opts.unevaluated&&(A.props!==!0&&R.props!==void 0&&(A.props=$.mergeEvaluated.props(K,R.props,A.props,D)),A.items!==!0&&R.items!==void 0&&(A.items=$.mergeEvaluated.items(K,R.items,A.items,D)))}mergeValidEvaluated(R,D){const{it:A,gen:K}=this;if(A.opts.unevaluated&&(A.props!==!0||A.items!==!0))return K.if(D,()=>this.mergeEvaluated(R,o.Name)),!0}}_e.KeywordCxt=I;function F(k,R,D,A){const K=new I(k,D,R);"code"in D?D.code(K,A):K.$data&&D.validate?(0,s.funcKeywordCode)(K,D):"macro"in D?(0,s.macroKeywordCode)(K,D):(D.compile||D.validate)&&(0,s.funcKeywordCode)(K,D)}const J=/^\/(?:[^~]|~0|~1)*$/,Y=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function G(k,{dataLevel:R,dataNames:D,dataPathArr:A}){let K,W;if(k==="")return f.default.rootData;if(k[0]==="/"){if(!J.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);K=k,W=f.default.rootData}else{const de=Y.exec(k);if(!de)throw new Error(`Invalid JSON-pointer: ${k}`);const ne=+de[1];if(K=de[2],K==="#"){if(ne>=R)throw new Error(ce("property/index",ne));return A[R-ne]}if(ne>R)throw new Error(ce("data",ne));if(W=D[R-ne],!K)return W}let re=W;const me=K.split("/");for(const de of me)de&&(W=(0,o._)`${W}${(0,o.getProperty)((0,$.unescapeJsonPointer)(de))}`,re=(0,o._)`${re} && ${W}`);return re;function ce(de,ne){return`Cannot access ${de} ${ne} levels up, current level is ${R}`}}return _e.getData=G,_e}var Ke={},Or;function sr(){if(Or)return Ke;Or=1,Object.defineProperty(Ke,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Ke.default=e,Ke}var Je={},Dr;function Lt(){if(Dr)return Je;Dr=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=At();class t extends Error{constructor(n,i,s,c){super(c||`can't resolve reference ${s} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Je.default=t,Je}var le={},qr;function ir(){if(qr)return le;qr=1,Object.defineProperty(le,"__esModule",{value:!0}),le.resolveSchema=le.getCompilingSchema=le.resolveRef=le.compileSchema=le.SchemaEnv=void 0;const e=x(),t=sr(),r=Pe(),n=At(),i=B(),s=Vt();class c{constructor(p){var a;this.refs={},this.dynamicAnchors={};let l;typeof p.schema=="object"&&(l=p.schema),this.schema=p.schema,this.schemaId=p.schemaId,this.root=p.root||this,this.baseId=(a=p.baseId)!==null&&a!==void 0?a:(0,n.normalizeId)(l?.[p.schemaId||"$id"]),this.schemaPath=p.schemaPath,this.localRefs=p.localRefs,this.meta=p.meta,this.$async=l?.$async,this.refs={}}}le.SchemaEnv=c;function o(d){const p=$.call(this,d);if(p)return p;const a=(0,n.getFullPath)(this.opts.uriResolver,d.root.baseId),{es5:l,lines:y}=this.opts.code,{ownProperties:u}=this.opts,g=new e.CodeGen(this.scope,{es5:l,lines:y,ownProperties:u});let S;d.$async&&(S=g.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const C=g.scopeName("validate");d.validateName=C;const T={gen:g,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:g.scopeValue("schema",this.opts.code.source===!0?{ref:d.schema,code:(0,e.stringify)(d.schema)}:{ref:d.schema}),validateName:C,ValidationError:S,schema:d.schema,schemaEnv:d,rootId:a,baseId:d.baseId||a,schemaPath:e.nil,errSchemaPath:d.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let L;try{this._compilations.add(d),(0,s.validateFunctionCode)(T),g.optimize(this.opts.code.optimize);const O=g.toString();L=`${g.scopeRefs(r.default.scope)}return ${O}`,this.opts.code.process&&(L=this.opts.code.process(L,d));const z=new Function(`${r.default.self}`,`${r.default.scope}`,L)(this,this.scope.get());if(this.scope.value(C,{ref:z}),z.errors=null,z.schema=d.schema,z.schemaEnv=d,d.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:C,validateCode:O,scopeValues:g._values}),this.opts.unevaluated){const{props:U,items:Q}=T;z.evaluated={props:U instanceof e.Name?void 0:U,items:Q instanceof e.Name?void 0:Q,dynamicProps:U instanceof e.Name,dynamicItems:Q instanceof e.Name},z.source&&(z.source.evaluated=(0,e.stringify)(z.evaluated))}return d.validate=z,d}catch(O){throw delete d.validate,delete d.validateName,L&&this.logger.error("Error compiling schema, function code:",L),O}finally{this._compilations.delete(d)}}le.compileSchema=o;function f(d,p,a){var l;a=(0,n.resolveUrl)(this.opts.uriResolver,p,a);const y=d.refs[a];if(y)return y;let u=m.call(this,d,a);if(u===void 0){const g=(l=d.localRefs)===null||l===void 0?void 0:l[a],{schemaId:S}=this.opts;g&&(u=new c({schema:g,schemaId:S,root:d,baseId:p}))}if(u!==void 0)return d.refs[a]=_.call(this,u)}le.resolveRef=f;function _(d){return(0,n.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:o.call(this,d)}function $(d){for(const p of this._compilations)if(E(p,d))return p}le.getCompilingSchema=$;function E(d,p){return d.schema===p.schema&&d.root===p.root&&d.baseId===p.baseId}function m(d,p){let a;for(;typeof(a=this.refs[p])=="string";)p=a;return a||this.schemas[p]||v.call(this,d,p)}function v(d,p){const a=this.opts.uriResolver.parse(p),l=(0,n._getFullPath)(this.opts.uriResolver,a);let y=(0,n.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&l===y)return w.call(this,a,d);const u=(0,n.normalizeId)(l),g=this.refs[u]||this.schemas[u];if(typeof g=="string"){const S=v.call(this,d,g);return typeof S?.schema!="object"?void 0:w.call(this,a,S)}if(typeof g?.schema=="object"){if(g.validate||o.call(this,g),u===(0,n.normalizeId)(p)){const{schema:S}=g,{schemaId:C}=this.opts,T=S[C];return T&&(y=(0,n.resolveUrl)(this.opts.uriResolver,y,T)),new c({schema:S,schemaId:C,root:d,baseId:y})}return w.call(this,a,g)}}le.resolveSchema=v;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(d,{baseId:p,schema:a,root:l}){var y;if(((y=d.fragment)===null||y===void 0?void 0:y[0])!=="/")return;for(const S of d.fragment.slice(1).split("/")){if(typeof a=="boolean")return;const C=a[(0,i.unescapeFragment)(S)];if(C===void 0)return;a=C;const T=typeof a=="object"&&a[this.opts.schemaId];!b.has(S)&&T&&(p=(0,n.resolveUrl)(this.opts.uriResolver,p,T))}let u;if(typeof a!="boolean"&&a.$ref&&!(0,i.schemaHasRulesButRef)(a,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,p,a.$ref);u=v.call(this,l,S)}const{schemaId:g}=this.opts;if(u=u||new c({schema:a,schemaId:g,root:l,baseId:p}),u.schema!==u.root.schema)return u}return le}const ks="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",js="Meta-schema for $data reference (JSON AnySchema extension proposal)",Rs="object",Ns=["$data"],Cs={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Is=!1,Os={$id:ks,description:js,type:Rs,required:Ns,properties:Cs,additionalProperties:Is};var He={},qe={exports:{}},Yt,Tr;function Vn(){if(Tr)return Yt;Tr=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(m){let v="",b=0,w=0;for(w=0;w<m.length;w++)if(b=m[w].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";v+=m[w];break}for(w+=1;w<m.length;w++){if(b=m[w].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";v+=m[w]}return v}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(m){return m.length=0,!0}function s(m,v,b){if(m.length){const w=r(m);if(w!=="")v.push(w);else return b.error=!0,!1;m.length=0}return!0}function c(m){let v=0;const b={error:!1,address:"",zone:""},w=[],d=[];let p=!1,a=!1,l=s;for(let y=0;y<m.length;y++){const u=m[y];if(!(u==="["||u==="]"))if(u===":"){if(p===!0&&(a=!0),!l(d,w,b))break;if(++v>7){b.error=!0;break}y>0&&m[y-1]===":"&&(p=!0),w.push(":");continue}else if(u==="%"){if(!l(d,w,b))break;l=i}else{d.push(u);continue}}return d.length&&(l===i?b.zone=d.join(""):a?w.push(d.join("")):w.push(r(d))),b.address=w.join(""),b}function o(m){if(f(m,":")<2)return{host:m,isIPV6:!1};const v=c(m);if(v.error)return{host:m,isIPV6:!1};{let b=v.address,w=v.address;return v.zone&&(b+="%"+v.zone,w+="%25"+v.zone),{host:b,isIPV6:!0,escapedHost:w}}}function f(m,v){let b=0;for(let w=0;w<m.length;w++)m[w]===v&&b++;return b}function _(m){let v=m;const b=[];let w=-1,d=0;for(;d=v.length;){if(d===1){if(v===".")break;if(v==="/"){b.push("/");break}else{b.push(v);break}}else if(d===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){b.push("/");break}}else if(d===3&&v==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),b.length!==0&&b.pop();continue}}if((w=v.indexOf("/",1))===-1){b.push(v);break}else b.push(v.slice(0,w)),v=v.slice(w)}return b.join("")}function $(m,v){const b=v!==!0?escape:unescape;return m.scheme!==void 0&&(m.scheme=b(m.scheme)),m.userinfo!==void 0&&(m.userinfo=b(m.userinfo)),m.host!==void 0&&(m.host=b(m.host)),m.path!==void 0&&(m.path=b(m.path)),m.query!==void 0&&(m.query=b(m.query)),m.fragment!==void 0&&(m.fragment=b(m.fragment)),m}function E(m){const v=[];if(m.userinfo!==void 0&&(v.push(m.userinfo),v.push("@")),m.host!==void 0){let b=unescape(m.host);if(!t(b)){const w=o(b);w.isIPV6===!0?b=`[${w.escapedHost}]`:b=m.host}v.push(b)}return(typeof m.port=="number"||typeof m.port=="string")&&(v.push(":"),v.push(String(m.port))),v.length?v.join(""):void 0}return Yt={nonSimpleDomain:n,recomposeAuthority:E,normalizeComponentEncoding:$,removeDotSegments:_,isIPv4:t,isUUID:e,normalizeIPv6:o,stringArrayToHexStripped:r},Yt}var Qt,Mr;function Ds(){if(Mr)return Qt;Mr=1;const{isUUID:e}=Vn(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(u){return r.indexOf(u)!==-1}function i(u){return u.secure===!0?!0:u.secure===!1?!1:u.scheme?u.scheme.length===3&&(u.scheme[0]==="w"||u.scheme[0]==="W")&&(u.scheme[1]==="s"||u.scheme[1]==="S")&&(u.scheme[2]==="s"||u.scheme[2]==="S"):!1}function s(u){return u.host||(u.error=u.error||"HTTP URIs must have a host."),u}function c(u){const g=String(u.scheme).toLowerCase()==="https";return(u.port===(g?443:80)||u.port==="")&&(u.port=void 0),u.path||(u.path="/"),u}function o(u){return u.secure=i(u),u.resourceName=(u.path||"/")+(u.query?"?"+u.query:""),u.path=void 0,u.query=void 0,u}function f(u){if((u.port===(i(u)?443:80)||u.port==="")&&(u.port=void 0),typeof u.secure=="boolean"&&(u.scheme=u.secure?"wss":"ws",u.secure=void 0),u.resourceName){const[g,S]=u.resourceName.split("?");u.path=g&&g!=="/"?g:void 0,u.query=S,u.resourceName=void 0}return u.fragment=void 0,u}function _(u,g){if(!u.path)return u.error="URN can not be parsed",u;const S=u.path.match(t);if(S){const C=g.scheme||u.scheme||"urn";u.nid=S[1].toLowerCase(),u.nss=S[2];const T=`${C}:${g.nid||u.nid}`,L=y(T);u.path=void 0,L&&(u=L.parse(u,g))}else u.error=u.error||"URN can not be parsed.";return u}function $(u,g){if(u.nid===void 0)throw new Error("URN without nid cannot be serialized");const S=g.scheme||u.scheme||"urn",C=u.nid.toLowerCase(),T=`${S}:${g.nid||C}`,L=y(T);L&&(u=L.serialize(u,g));const O=u,V=u.nss;return O.path=`${C||g.nid}:${V}`,g.skipEscape=!0,O}function E(u,g){const S=u;return S.uuid=S.nss,S.nss=void 0,!g.tolerant&&(!S.uuid||!e(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function m(u){const g=u;return g.nss=(u.uuid||"").toLowerCase(),g}const v={scheme:"http",domainHost:!0,parse:s,serialize:c},b={scheme:"https",domainHost:v.domainHost,parse:s,serialize:c},w={scheme:"ws",domainHost:!0,parse:o,serialize:f},d={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},l={http:v,https:b,ws:w,wss:d,urn:{scheme:"urn",parse:_,serialize:$,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:E,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(l,null);function y(u){return u&&(l[u]||l[u.toLowerCase()])||void 0}return Qt={wsIsSecure:i,SCHEMES:l,isValidSchemeName:n,getSchemeHandler:y},Qt}var Ar;function qs(){if(Ar)return qe.exports;Ar=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:i,nonSimpleDomain:s}=Vn(),{SCHEMES:c,getSchemeHandler:o}=Ds();function f(d,p){return typeof d=="string"?d=m(b(d,p),p):typeof d=="object"&&(d=b(m(d,p),p)),d}function _(d,p,a){const l=a?Object.assign({scheme:"null"},a):{scheme:"null"},y=$(b(d,l),b(p,l),l,!0);return l.skipEscape=!0,m(y,l)}function $(d,p,a,l){const y={};return l||(d=b(m(d,a),a),p=b(m(p,a),a)),a=a||{},!a.tolerant&&p.scheme?(y.scheme=p.scheme,y.userinfo=p.userinfo,y.host=p.host,y.port=p.port,y.path=t(p.path||""),y.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(y.userinfo=p.userinfo,y.host=p.host,y.port=p.port,y.path=t(p.path||""),y.query=p.query):(p.path?(p.path[0]==="/"?y.path=t(p.path):((d.userinfo!==void 0||d.host!==void 0||d.port!==void 0)&&!d.path?y.path="/"+p.path:d.path?y.path=d.path.slice(0,d.path.lastIndexOf("/")+1)+p.path:y.path=p.path,y.path=t(y.path)),y.query=p.query):(y.path=d.path,p.query!==void 0?y.query=p.query:y.query=d.query),y.userinfo=d.userinfo,y.host=d.host,y.port=d.port),y.scheme=d.scheme),y.fragment=p.fragment,y}function E(d,p,a){return typeof d=="string"?(d=unescape(d),d=m(n(b(d,a),!0),{...a,skipEscape:!0})):typeof d=="object"&&(d=m(n(d,!0),{...a,skipEscape:!0})),typeof p=="string"?(p=unescape(p),p=m(n(b(p,a),!0),{...a,skipEscape:!0})):typeof p=="object"&&(p=m(n(p,!0),{...a,skipEscape:!0})),d.toLowerCase()===p.toLowerCase()}function m(d,p){const a={host:d.host,scheme:d.scheme,userinfo:d.userinfo,port:d.port,path:d.path,query:d.query,nid:d.nid,nss:d.nss,uuid:d.uuid,fragment:d.fragment,reference:d.reference,resourceName:d.resourceName,secure:d.secure,error:""},l=Object.assign({},p),y=[],u=o(l.scheme||a.scheme);u&&u.serialize&&u.serialize(a,l),a.path!==void 0&&(l.skipEscape?a.path=unescape(a.path):(a.path=escape(a.path),a.scheme!==void 0&&(a.path=a.path.split("%3A").join(":")))),l.reference!=="suffix"&&a.scheme&&y.push(a.scheme,":");const g=r(a);if(g!==void 0&&(l.reference!=="suffix"&&y.push("//"),y.push(g),a.path&&a.path[0]!=="/"&&y.push("/")),a.path!==void 0){let S=a.path;!l.absolutePath&&(!u||!u.absolutePath)&&(S=t(S)),g===void 0&&S[0]==="/"&&S[1]==="/"&&(S="/%2F"+S.slice(2)),y.push(S)}return a.query!==void 0&&y.push("?",a.query),a.fragment!==void 0&&y.push("#",a.fragment),y.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(d,p){const a=Object.assign({},p),l={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let y=!1;a.reference==="suffix"&&(a.scheme?d=a.scheme+":"+d:d="//"+d);const u=d.match(v);if(u){if(l.scheme=u[1],l.userinfo=u[3],l.host=u[4],l.port=parseInt(u[5],10),l.path=u[6]||"",l.query=u[7],l.fragment=u[8],isNaN(l.port)&&(l.port=u[5]),l.host)if(i(l.host)===!1){const C=e(l.host);l.host=C.host.toLowerCase(),y=C.isIPV6}else y=!0;l.scheme===void 0&&l.userinfo===void 0&&l.host===void 0&&l.port===void 0&&l.query===void 0&&!l.path?l.reference="same-document":l.scheme===void 0?l.reference="relative":l.fragment===void 0?l.reference="absolute":l.reference="uri",a.reference&&a.reference!=="suffix"&&a.reference!==l.reference&&(l.error=l.error||"URI is not a "+a.reference+" reference.");const g=o(a.scheme||l.scheme);if(!a.unicodeSupport&&(!g||!g.unicodeSupport)&&l.host&&(a.domainHost||g&&g.domainHost)&&y===!1&&s(l.host))try{l.host=URL.domainToASCII(l.host.toLowerCase())}catch(S){l.error=l.error||"Host's domain name can not be converted to ASCII: "+S}(!g||g&&!g.skipNormalize)&&(d.indexOf("%")!==-1&&(l.scheme!==void 0&&(l.scheme=unescape(l.scheme)),l.host!==void 0&&(l.host=unescape(l.host))),l.path&&(l.path=escape(unescape(l.path))),l.fragment&&(l.fragment=encodeURI(decodeURIComponent(l.fragment)))),g&&g.parse&&g.parse(l,a)}else l.error=l.error||"URI can not be parsed.";return l}const w={SCHEMES:c,normalize:f,resolve:_,resolveComponent:$,equal:E,serialize:m,parse:b};return qe.exports=w,qe.exports.default=w,qe.exports.fastUri=w,qe.exports}var Vr;function Ts(){if(Vr)return He;Vr=1,Object.defineProperty(He,"__esModule",{value:!0});const e=qs();return e.code='require("ajv/dist/runtime/uri").default',He.default=e,He}var Lr;function Ms(){return Lr||(Lr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Vt();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=x();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=sr(),i=Lt(),s=Tn(),c=ir(),o=x(),f=At(),_=Rt(),$=B(),E=Os,m=Ts(),v=(M,j)=>new RegExp(M,j);v.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),d={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."},p={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},a=200;function l(M){var j,q,N,h,P,I,F,J,Y,G,k,R,D,A,K,W,re,me,ce,de,ne,Ne,fe,zt,Ut;const Oe=M.strict,Ft=(j=M.code)===null||j===void 0?void 0:j.optimize,lr=Ft===!0||Ft===void 0?1:Ft||0,fr=(N=(q=M.code)===null||q===void 0?void 0:q.regExp)!==null&&N!==void 0?N:v,_s=(h=M.uriResolver)!==null&&h!==void 0?h:m.default;return{strictSchema:(I=(P=M.strictSchema)!==null&&P!==void 0?P:Oe)!==null&&I!==void 0?I:!0,strictNumbers:(J=(F=M.strictNumbers)!==null&&F!==void 0?F:Oe)!==null&&J!==void 0?J:!0,strictTypes:(G=(Y=M.strictTypes)!==null&&Y!==void 0?Y:Oe)!==null&&G!==void 0?G:"log",strictTuples:(R=(k=M.strictTuples)!==null&&k!==void 0?k:Oe)!==null&&R!==void 0?R:"log",strictRequired:(A=(D=M.strictRequired)!==null&&D!==void 0?D:Oe)!==null&&A!==void 0?A:!1,code:M.code?{...M.code,optimize:lr,regExp:fr}:{optimize:lr,regExp:fr},loopRequired:(K=M.loopRequired)!==null&&K!==void 0?K:a,loopEnum:(W=M.loopEnum)!==null&&W!==void 0?W:a,meta:(re=M.meta)!==null&&re!==void 0?re:!0,messages:(me=M.messages)!==null&&me!==void 0?me:!0,inlineRefs:(ce=M.inlineRefs)!==null&&ce!==void 0?ce:!0,schemaId:(de=M.schemaId)!==null&&de!==void 0?de:"$id",addUsedSchema:(ne=M.addUsedSchema)!==null&&ne!==void 0?ne:!0,validateSchema:(Ne=M.validateSchema)!==null&&Ne!==void 0?Ne:!0,validateFormats:(fe=M.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(zt=M.unicodeRegExp)!==null&&zt!==void 0?zt:!0,int32range:(Ut=M.int32range)!==null&&Ut!==void 0?Ut:!0,uriResolver:_s}}class y{constructor(j={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...l(j)};const{es5:q,lines:N}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:w,es5:q,lines:N}),this.logger=V(j.logger);const h=j.validateFormats;j.validateFormats=!1,this.RULES=(0,s.getRules)(),u.call(this,d,j,"NOT SUPPORTED"),u.call(this,p,j,"DEPRECATED","warn"),this._metaOpts=L.call(this),j.formats&&C.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&T.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),S.call(this),j.validateFormats=h}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:q,schemaId:N}=this.opts;let h=E;N==="id"&&(h={...E},h.id=h.$id,delete h.$id),q&&j&&this.addMetaSchema(h,h[N],!1)}defaultMeta(){const{meta:j,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[q]||j:void 0}validate(j,q){let N;if(typeof j=="string"){if(N=this.getSchema(j),!N)throw new Error(`no schema with key or ref "${j}"`)}else N=this.compile(j);const h=N(q);return"$async"in N||(this.errors=N.errors),h}compile(j,q){const N=this._addSchema(j,q);return N.validate||this._compileSchemaEnv(N)}compileAsync(j,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:N}=this.opts;return h.call(this,j,q);async function h(G,k){await P.call(this,G.$schema);const R=this._addSchema(G,k);return R.validate||I.call(this,R)}async function P(G){G&&!this.getSchema(G)&&await h.call(this,{$ref:G},!0)}async function I(G){try{return this._compileSchemaEnv(G)}catch(k){if(!(k instanceof i.default))throw k;return F.call(this,k),await J.call(this,k.missingSchema),I.call(this,G)}}function F({missingSchema:G,missingRef:k}){if(this.refs[G])throw new Error(`AnySchema ${G} is loaded but ${k} cannot be resolved`)}async function J(G){const k=await Y.call(this,G);this.refs[G]||await P.call(this,k.$schema),this.refs[G]||this.addSchema(k,G,q)}async function Y(G){const k=this._loading[G];if(k)return k;try{return await(this._loading[G]=N(G))}finally{delete this._loading[G]}}}addSchema(j,q,N,h=this.opts.validateSchema){if(Array.isArray(j)){for(const I of j)this.addSchema(I,void 0,N,h);return this}let P;if(typeof j=="object"){const{schemaId:I}=this.opts;if(P=j[I],P!==void 0&&typeof P!="string")throw new Error(`schema ${I} must be string`)}return q=(0,f.normalizeId)(q||P),this._checkUnique(q),this.schemas[q]=this._addSchema(j,N,q,h,!0),this}addMetaSchema(j,q,N=this.opts.validateSchema){return this.addSchema(j,q,!0,N),this}validateSchema(j,q){if(typeof j=="boolean")return!0;let N;if(N=j.$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 h=this.validate(N,j);if(!h&&q){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return h}getSchema(j){let q;for(;typeof(q=g.call(this,j))=="string";)j=q;if(q===void 0){const{schemaId:N}=this.opts,h=new c.SchemaEnv({schema:{},schemaId:N});if(q=c.resolveSchema.call(this,h,j),!q)return;this.refs[j]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=g.call(this,j);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const q=j;this._cache.delete(q);let N=j[this.opts.schemaId];return N&&(N=(0,f.normalizeId)(N),delete this.schemas[N],delete this.refs[N]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const q of j)this.addKeyword(q);return this}addKeyword(j,q){let N;if(typeof j=="string")N=j,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=N);else if(typeof j=="object"&&q===void 0){if(q=j,N=q.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(U.call(this,N,q),!q)return(0,$.eachItem)(N,P=>Q.call(this,P)),this;oe.call(this,q);const h={...q,type:(0,_.getJSONTypes)(q.type),schemaType:(0,_.getJSONTypes)(q.schemaType)};return(0,$.eachItem)(N,h.type.length===0?P=>Q.call(this,P,h):P=>h.type.forEach(I=>Q.call(this,P,h,I))),this}getKeyword(j){const q=this.RULES.all[j];return typeof q=="object"?q.definition:!!q}removeKeyword(j){const{RULES:q}=this;delete q.keywords[j],delete q.all[j];for(const N of q.rules){const h=N.rules.findIndex(P=>P.keyword===j);h>=0&&N.rules.splice(h,1)}return this}addFormat(j,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[j]=q,this}errorsText(j=this.errors,{separator:q=", ",dataVar:N="data"}={}){return!j||j.length===0?"No errors":j.map(h=>`${N}${h.instancePath} ${h.message}`).reduce((h,P)=>h+q+P)}$dataMetaSchema(j,q){const N=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const h of q){const P=h.split("/").slice(1);let I=j;for(const F of P)I=I[F];for(const F in N){const J=N[F];if(typeof J!="object")continue;const{$data:Y}=J.definition,G=I[F];Y&&G&&(I[F]=pe(G))}}return j}_removeAllSchemas(j,q){for(const N in j){const h=j[N];(!q||q.test(N))&&(typeof h=="string"?delete j[N]:h&&!h.meta&&(this._cache.delete(h.schema),delete j[N]))}}_addSchema(j,q,N,h=this.opts.validateSchema,P=this.opts.addUsedSchema){let I;const{schemaId:F}=this.opts;if(typeof j=="object")I=j[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let J=this._cache.get(j);if(J!==void 0)return J;N=(0,f.normalizeId)(I||N);const Y=f.getSchemaRefs.call(this,j,N);return J=new c.SchemaEnv({schema:j,schemaId:F,meta:q,baseId:N,localRefs:Y}),this._cache.set(J.schema,J),P&&!N.startsWith("#")&&(N&&this._checkUnique(N),this.refs[N]=J),h&&this.validateSchema(j,!0),J}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):c.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const q=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,j)}finally{this.opts=q}}}y.ValidationError=n.default,y.MissingRefError=i.default,e.default=y;function u(M,j,q,N="error"){for(const h in M){const P=h;P in j&&this.logger[N](`${q}: option ${h}. ${M[P]}`)}}function g(M){return M=(0,f.normalizeId)(M),this.schemas[M]||this.refs[M]}function S(){const M=this.opts.schemas;if(M)if(Array.isArray(M))this.addSchema(M);else for(const j in M)this.addSchema(M[j],j)}function C(){for(const M in this.opts.formats){const j=this.opts.formats[M];j&&this.addFormat(M,j)}}function T(M){if(Array.isArray(M)){this.addVocabulary(M);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in M){const q=M[j];q.keyword||(q.keyword=j),this.addKeyword(q)}}function L(){const M={...this.opts};for(const j of b)delete M[j];return M}const O={log(){},warn(){},error(){}};function V(M){if(M===!1)return O;if(M===void 0)return console;if(M.log&&M.warn&&M.error)return M;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function U(M,j){const{RULES:q}=this;if((0,$.eachItem)(M,N=>{if(q.keywords[N])throw new Error(`Keyword ${N} is already defined`);if(!z.test(N))throw new Error(`Keyword ${N} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function Q(M,j,q){var N;const h=j?.post;if(q&&h)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let I=h?P.post:P.rules.find(({type:J})=>J===q);if(I||(I={type:q,rules:[]},P.rules.push(I)),P.keywords[M]=!0,!j)return;const F={keyword:M,definition:{...j,type:(0,_.getJSONTypes)(j.type),schemaType:(0,_.getJSONTypes)(j.schemaType)}};j.before?ie.call(this,I,F,j.before):I.rules.push(F),P.all[M]=F,(N=j.implements)===null||N===void 0||N.forEach(J=>this.addKeyword(J))}function ie(M,j,q){const N=M.rules.findIndex(h=>h.keyword===q);N>=0?M.rules.splice(N,0,j):(M.rules.push(j),this.logger.warn(`rule ${q} is not defined`))}function oe(M){let{metaSchema:j}=M;j!==void 0&&(M.$data&&this.opts.$data&&(j=pe(j)),M.validateSchema=this.compile(j,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pe(M){return{anyOf:[M,X]}}})(Kt)),Kt}var xe={},We={},Ge={},zr;function As(){if(zr)return Ge;zr=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 we={},Ur;function Vs(){if(Ur)return we;Ur=1,Object.defineProperty(we,"__esModule",{value:!0}),we.callRef=we.getValidate=void 0;const e=Lt(),t=ge(),r=x(),n=Pe(),i=ir(),s=B(),c={keyword:"$ref",schemaType:"string",code(_){const{gen:$,schema:E,it:m}=_,{baseId:v,schemaEnv:b,validateName:w,opts:d,self:p}=m,{root:a}=b;if((E==="#"||E==="#/")&&v===a.baseId)return y();const l=i.resolveRef.call(p,a,v,E);if(l===void 0)throw new e.default(m.opts.uriResolver,v,E);if(l instanceof i.SchemaEnv)return u(l);return g(l);function y(){if(b===a)return f(_,w,b,b.$async);const S=$.scopeValue("root",{ref:a});return f(_,(0,r._)`${S}.validate`,a,a.$async)}function u(S){const C=o(_,S);f(_,C,S,S.$async)}function g(S){const C=$.scopeValue("schema",d.code.source===!0?{ref:S,code:(0,r.stringify)(S)}:{ref:S}),T=$.name("valid"),L=_.subschema({schema:S,dataTypes:[],schemaPath:r.nil,topSchemaRef:C,errSchemaPath:E},T);_.mergeEvaluated(L),_.ok(T)}}};function o(_,$){const{gen:E}=_;return $.validate?E.scopeValue("validate",{ref:$.validate}):(0,r._)`${E.scopeValue("wrapper",{ref:$})}.validate`}we.getValidate=o;function f(_,$,E,m){const{gen:v,it:b}=_,{allErrors:w,schemaEnv:d,opts:p}=b,a=p.passContext?n.default.this:r.nil;m?l():y();function l(){if(!d.$async)throw new Error("async schema referenced by sync schema");const S=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(_,$,a)}`),g($),w||v.assign(S,!0)},C=>{v.if((0,r._)`!(${C} instanceof ${b.ValidationError})`,()=>v.throw(C)),u(C),w||v.assign(S,!1)}),_.ok(S)}function y(){_.result((0,t.callValidateCode)(_,$,a),()=>g($),()=>u($))}function u(S){const C=(0,r._)`${S}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${C} : ${n.default.vErrors}.concat(${C})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function g(S){var C;if(!b.opts.unevaluated)return;const T=(C=E?.validate)===null||C===void 0?void 0:C.evaluated;if(b.props!==!0)if(T&&!T.dynamicProps)T.props!==void 0&&(b.props=s.mergeEvaluated.props(v,T.props,b.props));else{const L=v.var("props",(0,r._)`${S}.evaluated.props`);b.props=s.mergeEvaluated.props(v,L,b.props,r.Name)}if(b.items!==!0)if(T&&!T.dynamicItems)T.items!==void 0&&(b.items=s.mergeEvaluated.items(v,T.items,b.items));else{const L=v.var("items",(0,r._)`${S}.evaluated.items`);b.items=s.mergeEvaluated.items(v,L,b.items,r.Name)}}}return we.callRef=f,we.default=c,we}var Fr;function Ls(){if(Fr)return We;Fr=1,Object.defineProperty(We,"__esModule",{value:!0});const e=As(),t=Vs(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return We.default=r,We}var Be={},Ye={},Kr;function zs(){if(Kr)return Ye;Kr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=x(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:s,schemaCode:c})=>(0,e.str)`must be ${r[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${c}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:c,data:o,schemaCode:f}=s;s.fail$data((0,e._)`${o} ${r[c].fail} ${f} || isNaN(${o})`)}};return Ye.default=i,Ye}var Qe={},Jr;function Us(){if(Jr)return Qe;Jr=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=x(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:s,schemaCode:c,it:o}=n,f=o.opts.multipleOfPrecision,_=i.let("res"),$=f?(0,e._)`Math.abs(Math.round(${_}) - ${_}) > 1e-${f}`:(0,e._)`${_} !== parseInt(${_})`;n.fail$data((0,e._)`(${c} === 0 || (${_} = ${s}/${c}, ${$}))`)}};return Qe.default=r,Qe}var Ze={},Xe={},Hr;function Fs(){if(Hr)return Xe;Hr=1,Object.defineProperty(Xe,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,s;for(;i<r;)n++,s=t.charCodeAt(i++),s>=55296&&s<=56319&&i<r&&(s=t.charCodeAt(i),(s&64512)===56320&&i++);return n}return Xe.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Xe}var xr;function Ks(){if(xr)return Ze;xr=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=x(),t=B(),r=Fs(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:c}){const o=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${c} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:c,data:o,schemaCode:f,it:_}=s,$=c==="maxLength"?e.operators.GT:e.operators.LT,E=_.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${o})`;s.fail$data((0,e._)`${E} ${$} ${f}`)}};return Ze.default=i,Ze}var et={},Wr;function Js(){if(Wr)return et;Wr=1,Object.defineProperty(et,"__esModule",{value:!0});const e=ge(),t=x(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:s,$data:c,schema:o,schemaCode:f,it:_}=i,$=_.opts.unicodeRegExp?"u":"",E=c?(0,t._)`(new RegExp(${f}, ${$}))`:(0,e.usePattern)(i,o);i.fail$data((0,t._)`!${E}.test(${s})`)}};return et.default=n,et}var tt={},Gr;function Hs(){if(Gr)return tt;Gr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=x(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:c}=n,o=i==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${o} ${c}`)}};return tt.default=r,tt}var rt={},Br;function xs(){if(Br)return rt;Br=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=ge(),t=x(),r=B(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:c,schema:o,schemaCode:f,data:_,$data:$,it:E}=s,{opts:m}=E;if(!$&&o.length===0)return;const v=o.length>=m.loopRequired;if(E.allErrors?b():w(),m.strictRequired){const a=s.parentSchema.properties,{definedProperties:l}=s.it;for(const y of o)if(a?.[y]===void 0&&!l.has(y)){const u=E.schemaEnv.baseId+E.errSchemaPath,g=`required property "${y}" is not defined at "${u}" (strictRequired)`;(0,r.checkStrictMode)(E,g,E.opts.strictRequired)}}function b(){if(v||$)s.block$data(t.nil,d);else for(const a of o)(0,e.checkReportMissingProp)(s,a)}function w(){const a=c.let("missing");if(v||$){const l=c.let("valid",!0);s.block$data(l,()=>p(a,l)),s.ok(l)}else c.if((0,e.checkMissingProp)(s,o,a)),(0,e.reportMissingProp)(s,a),c.else()}function d(){c.forOf("prop",f,a=>{s.setParams({missingProperty:a}),c.if((0,e.noPropertyInData)(c,_,a,m.ownProperties),()=>s.error())})}function p(a,l){s.setParams({missingProperty:a}),c.forOf(a,f,()=>{c.assign(l,(0,e.propertyInData)(c,_,a,m.ownProperties)),c.if((0,t.not)(l),()=>{s.error(),c.break()})},t.nil)}}};return rt.default=i,rt}var nt={},Yr;function Ws(){if(Yr)return nt;Yr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=x(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:c}=n,o=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${s}.length ${o} ${c}`)}};return nt.default=r,nt}var st={},it={},Qr;function or(){if(Qr)return it;Qr=1,Object.defineProperty(it,"__esModule",{value:!0});const e=An();return e.code='require("ajv/dist/runtime/equal").default',it.default=e,it}var Zr;function Gs(){if(Zr)return st;Zr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=Rt(),t=x(),r=B(),n=or(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:o}})=>(0,t.str)`must NOT have duplicate items (items ## ${o} and ${c} are identical)`,params:({params:{i:c,j:o}})=>(0,t._)`{i: ${c}, j: ${o}}`},code(c){const{gen:o,data:f,$data:_,schema:$,parentSchema:E,schemaCode:m,it:v}=c;if(!_&&!$)return;const b=o.let("valid"),w=E.items?(0,e.getSchemaTypes)(E.items):[];c.block$data(b,d,(0,t._)`${m} === false`),c.ok(b);function d(){const y=o.let("i",(0,t._)`${f}.length`),u=o.let("j");c.setParams({i:y,j:u}),o.assign(b,!0),o.if((0,t._)`${y} > 1`,()=>(p()?a:l)(y,u))}function p(){return w.length>0&&!w.some(y=>y==="object"||y==="array")}function a(y,u){const g=o.name("item"),S=(0,e.checkDataTypes)(w,g,v.opts.strictNumbers,e.DataType.Wrong),C=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${y}--;`,()=>{o.let(g,(0,t._)`${f}[${y}]`),o.if(S,(0,t._)`continue`),w.length>1&&o.if((0,t._)`typeof ${g} == "string"`,(0,t._)`${g} += "_"`),o.if((0,t._)`typeof ${C}[${g}] == "number"`,()=>{o.assign(u,(0,t._)`${C}[${g}]`),c.error(),o.assign(b,!1).break()}).code((0,t._)`${C}[${g}] = ${y}`)})}function l(y,u){const g=(0,r.useFunc)(o,n.default),S=o.name("outer");o.label(S).for((0,t._)`;${y}--;`,()=>o.for((0,t._)`${u} = ${y}; ${u}--;`,()=>o.if((0,t._)`${g}(${f}[${y}], ${f}[${u}])`,()=>{c.error(),o.assign(b,!1).break(S)})))}}};return st.default=s,st}var ot={},Xr;function Bs(){if(Xr)return ot;Xr=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=x(),t=B(),r=or(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:c,data:o,$data:f,schemaCode:_,schema:$}=s;f||$&&typeof $=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(c,r.default)}(${o}, ${_})`):s.fail((0,e._)`${$} !== ${o}`)}};return ot.default=i,ot}var at={},en;function Ys(){if(en)return at;en=1,Object.defineProperty(at,"__esModule",{value:!0});const e=x(),t=B(),r=or(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:c,data:o,$data:f,schema:_,schemaCode:$,it:E}=s;if(!f&&_.length===0)throw new Error("enum must have non-empty array");const m=_.length>=E.opts.loopEnum;let v;const b=()=>v??(v=(0,t.useFunc)(c,r.default));let w;if(m||f)w=c.let("valid"),s.block$data(w,d);else{if(!Array.isArray(_))throw new Error("ajv implementation error");const a=c.const("vSchema",$);w=(0,e.or)(..._.map((l,y)=>p(a,y)))}s.pass(w);function d(){c.assign(w,!1),c.forOf("v",$,a=>c.if((0,e._)`${b()}(${o}, ${a})`,()=>c.assign(w,!0).break()))}function p(a,l){const y=_[l];return typeof y=="object"&&y!==null?(0,e._)`${b()}(${o}, ${a}[${l}])`:(0,e._)`${o} === ${y}`}}};return at.default=i,at}var tn;function Qs(){if(tn)return Be;tn=1,Object.defineProperty(Be,"__esModule",{value:!0});const e=zs(),t=Us(),r=Ks(),n=Js(),i=Hs(),s=xs(),c=Ws(),o=Gs(),f=Bs(),_=Ys(),$=[e.default,t.default,r.default,n.default,i.default,s.default,c.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,_.default];return Be.default=$,Be}var ct={},Ce={},rn;function Ln(){if(rn)return Ce;rn=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.validateAdditionalItems=void 0;const e=x(),t=B(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:c,it:o}=s,{items:f}=c;if(!Array.isArray(f)){(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(s,f)}};function i(s,c){const{gen:o,schema:f,data:_,keyword:$,it:E}=s;E.items=!0;const m=o.const("len",(0,e._)`${_}.length`);if(f===!1)s.setParams({len:c.length}),s.pass((0,e._)`${m} <= ${c.length}`);else if(typeof f=="object"&&!(0,t.alwaysValidSchema)(E,f)){const b=o.var("valid",(0,e._)`${m} <= ${c.length}`);o.if((0,e.not)(b),()=>v(b)),s.ok(b)}function v(b){o.forRange("i",c.length,m,w=>{s.subschema({keyword:$,dataProp:w,dataPropType:t.Type.Num},b),E.allErrors||o.if((0,e.not)(b),()=>o.break())})}}return Ce.validateAdditionalItems=i,Ce.default=n,Ce}var dt={},Ie={},nn;function zn(){if(nn)return Ie;nn=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.validateTuple=void 0;const e=x(),t=B(),r=ge(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:c,it:o}=s;if(Array.isArray(c))return i(s,"additionalItems",c);o.items=!0,!(0,t.alwaysValidSchema)(o,c)&&s.ok((0,r.validateArray)(s))}};function i(s,c,o=s.schema){const{gen:f,parentSchema:_,data:$,keyword:E,it:m}=s;w(_),m.opts.unevaluated&&o.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(f,o.length,m.items));const v=f.name("valid"),b=f.const("len",(0,e._)`${$}.length`);o.forEach((d,p)=>{(0,t.alwaysValidSchema)(m,d)||(f.if((0,e._)`${b} > ${p}`,()=>s.subschema({keyword:E,schemaProp:p,dataProp:p},v)),s.ok(v))});function w(d){const{opts:p,errSchemaPath:a}=m,l=o.length,y=l===d.minItems&&(l===d.maxItems||d[c]===!1);if(p.strictTuples&&!y){const u=`"${E}" is ${l}-tuple, but minItems or maxItems/${c} are not specified or different at path "${a}"`;(0,t.checkStrictMode)(m,u,p.strictTuples)}}}return Ie.validateTuple=i,Ie.default=n,Ie}var sn;function Zs(){if(sn)return dt;sn=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=zn(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return dt.default=t,dt}var ut={},on;function Xs(){if(on)return ut;on=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=x(),t=B(),r=ge(),n=Ln(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:o,parentSchema:f,it:_}=c,{prefixItems:$}=f;_.items=!0,!(0,t.alwaysValidSchema)(_,o)&&($?(0,n.validateAdditionalItems)(c,$):c.ok((0,r.validateArray)(c)))}};return ut.default=s,ut}var lt={},an;function ei(){if(an)return lt;an=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=x(),t=B(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:s}})=>s===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${s} valid item(s)`,params:({params:{min:i,max:s}})=>s===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${s}}`},code(i){const{gen:s,schema:c,parentSchema:o,data:f,it:_}=i;let $,E;const{minContains:m,maxContains:v}=o;_.opts.next?($=m===void 0?1:m,E=v):$=1;const b=s.const("len",(0,e._)`${f}.length`);if(i.setParams({min:$,max:E}),E===void 0&&$===0){(0,t.checkStrictMode)(_,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(E!==void 0&&$>E){(0,t.checkStrictMode)(_,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(_,c)){let l=(0,e._)`${b} >= ${$}`;E!==void 0&&(l=(0,e._)`${l} && ${b} <= ${E}`),i.pass(l);return}_.items=!0;const w=s.name("valid");E===void 0&&$===1?p(w,()=>s.if(w,()=>s.break())):$===0?(s.let(w,!0),E!==void 0&&s.if((0,e._)`${f}.length > 0`,d)):(s.let(w,!1),d()),i.result(w,()=>i.reset());function d(){const l=s.name("_valid"),y=s.let("count",0);p(l,()=>s.if(l,()=>a(y)))}function p(l,y){s.forRange("i",0,b,u=>{i.subschema({keyword:"contains",dataProp:u,dataPropType:t.Type.Num,compositeRule:!0},l),y()})}function a(l){s.code((0,e._)`${l}++`),E===void 0?s.if((0,e._)`${l} >= ${$}`,()=>s.assign(w,!0).break()):(s.if((0,e._)`${l} > ${E}`,()=>s.assign(w,!1).break()),$===1?s.assign(w,!0):s.if((0,e._)`${l} >= ${$}`,()=>s.assign(w,!0)))}}};return lt.default=n,lt}var Zt={},cn;function ti(){return cn||(cn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=x(),r=B(),n=ge();e.error={message:({params:{property:f,depsCount:_,deps:$}})=>{const E=_===1?"property":"properties";return(0,t.str)`must have ${E} ${$} when property ${f} is present`},params:({params:{property:f,depsCount:_,deps:$,missingProperty:E}})=>(0,t._)`{property: ${f},
6
6
  missingProperty: ${E},
7
- depsCount: ${v},
8
- deps: ${$}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[v,$]=s(u);c(u,v),i(u,$)}};function s({schema:u}){const v={},$={};for(const E in u){if(E==="__proto__")continue;const _=Array.isArray(u[E])?v:$;_[E]=u[E]}return[v,$]}function c(u,v=u.schema){const{gen:$,data:E,it:_}=u;if(Object.keys(v).length===0)return;const g=$.let("missing");for(const b in v){const w=v[b];if(w.length===0)continue;const f=(0,n.propertyInData)($,E,b,_.opts.ownProperties);u.setParams({property:b,depsCount:w.length,deps:w.join(", ")}),_.allErrors?$.if(f,()=>{for(const p of w)(0,n.checkReportMissingProp)(u,p)}):($.if((0,t._)`${f} && (${(0,n.checkMissingProp)(u,w,g)})`),(0,n.reportMissingProp)(u,g),$.else())}}e.validatePropertyDeps=c;function i(u,v=u.schema){const{gen:$,data:E,keyword:_,it:g}=u,b=$.name("valid");for(const w in v)(0,r.alwaysValidSchema)(g,v[w])||($.if((0,n.propertyInData)($,E,w,g.opts.ownProperties),()=>{const f=u.subschema({keyword:_,schemaProp:w},b);u.mergeValidEvaluated(f,b)},()=>$.var(b,!0)),u.ok(b))}e.validateSchemaDeps=i,e.default=o})(Qt)),Qt}var lt={},an;function Zs(){if(an)return lt;an=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=G(),t=B(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:c,data:i,it:u}=o;if((0,t.alwaysValidSchema)(u,c))return;const v=s.name("valid");s.forIn("key",i,$=>{o.setParams({propertyName:$}),o.subschema({keyword:"propertyNames",data:$,dataTypes:["string"],propertyName:$,compositeRule:!0},v),s.if((0,e.not)(v),()=>{o.error(!0),u.allErrors||s.break()})}),o.ok(v)}};return lt.default=n,lt}var ft={},cn;function Vn(){if(cn)return ft;cn=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=ge(),t=G(),r=Se(),n=B(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:i,schema:u,parentSchema:v,data:$,errsCount:E,it:_}=c;if(!E)throw new Error("ajv implementation error");const{allErrors:g,opts:b}=_;if(_.props=!0,b.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(_,u))return;const w=(0,e.allSchemaProperties)(v.properties),f=(0,e.allSchemaProperties)(v.patternProperties);p(),c.ok((0,t._)`${E} === ${r.default.errors}`);function p(){i.forIn("key",$,h=>{!w.length&&!f.length?y(h):i.if(a(h),()=>y(h))})}function a(h){let P;if(w.length>8){const I=(0,n.schemaRefOrVal)(_,v.properties,"properties");P=(0,e.isOwnProperty)(i,I,h)}else w.length?P=(0,t.or)(...w.map(I=>(0,t._)`${h} === ${I}`)):P=t.nil;return f.length&&(P=(0,t.or)(P,...f.map(I=>(0,t._)`${(0,e.usePattern)(c,I)}.test(${h})`))),(0,t.not)(P)}function l(h){i.code((0,t._)`delete ${$}[${h}]`)}function y(h){if(b.removeAdditional==="all"||b.removeAdditional&&u===!1){l(h);return}if(u===!1){c.setParams({additionalProperty:h}),c.error(),g||i.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(_,u)){const P=i.name("valid");b.removeAdditional==="failing"?(d(h,P,!1),i.if((0,t.not)(P),()=>{c.reset(),l(h)})):(d(h,P),g||i.if((0,t.not)(P),()=>i.break()))}}function d(h,P,I){const T={keyword:"additionalProperties",dataProp:h,dataPropType:n.Type.Str};I===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(T,P)}}};return ft.default=s,ft}var pt={},dn;function Xs(){if(dn)return pt;dn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=At(),t=ge(),r=B(),n=Vn(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:c,schema:i,parentSchema:u,data:v,it:$}=s;$.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new e.KeywordCxt($,n.default,"additionalProperties"));const E=(0,t.allSchemaProperties)(i);for(const f of E)$.definedProperties.add(f);$.opts.unevaluated&&E.length&&$.props!==!0&&($.props=r.mergeEvaluated.props(c,(0,r.toHash)(E),$.props));const _=E.filter(f=>!(0,r.alwaysValidSchema)($,i[f]));if(_.length===0)return;const g=c.name("valid");for(const f of _)b(f)?w(f):(c.if((0,t.propertyInData)(c,v,f,$.opts.ownProperties)),w(f),$.allErrors||c.else().var(g,!0),c.endIf()),s.it.definedProperties.add(f),s.ok(g);function b(f){return $.opts.useDefaults&&!$.compositeRule&&i[f].default!==void 0}function w(f){s.subschema({keyword:"properties",schemaProp:f,dataProp:f},g)}}};return pt.default=o,pt}var mt={},un;function ei(){if(un)return mt;un=1,Object.defineProperty(mt,"__esModule",{value:!0});const e=ge(),t=G(),r=B(),n=B(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:c,schema:i,data:u,parentSchema:v,it:$}=s,{opts:E}=$,_=(0,e.allSchemaProperties)(i),g=_.filter(y=>(0,r.alwaysValidSchema)($,i[y]));if(_.length===0||g.length===_.length&&(!$.opts.unevaluated||$.props===!0))return;const b=E.strictSchema&&!E.allowMatchingProperties&&v.properties,w=c.name("valid");$.props!==!0&&!($.props instanceof t.Name)&&($.props=(0,n.evaluatedPropsToName)(c,$.props));const{props:f}=$;p();function p(){for(const y of _)b&&a(y),$.allErrors?l(y):(c.var(w,!0),l(y),c.if(w))}function a(y){for(const d in b)new RegExp(y).test(d)&&(0,r.checkStrictMode)($,`property ${d} matches pattern ${y} (use allowMatchingProperties)`)}function l(y){c.forIn("key",u,d=>{c.if((0,t._)`${(0,e.usePattern)(s,y)}.test(${d})`,()=>{const h=g.includes(y);h||s.subschema({keyword:"patternProperties",schemaProp:y,dataProp:d,dataPropType:n.Type.Str},w),$.opts.unevaluated&&f!==!0?c.assign((0,t._)`${f}[${d}]`,!0):!h&&!$.allErrors&&c.if((0,t.not)(w),()=>c.break())})})}}};return mt.default=o,mt}var ht={},ln;function ti(){if(ln)return ht;ln=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=B(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:o,it:s}=r;if((0,e.alwaysValidSchema)(s,o)){r.fail();return}const c=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),r.failResult(c,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return ht.default=t,ht}var yt={},fn;function ri(){if(fn)return yt;fn=1,Object.defineProperty(yt,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ge().validateUnion,error:{message:"must match a schema in anyOf"}};return yt.default=t,yt}var gt={},pn;function ni(){if(pn)return gt;pn=1,Object.defineProperty(gt,"__esModule",{value:!0});const e=G(),t=B(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:c,parentSchema:i,it:u}=o;if(!Array.isArray(c))throw new Error("ajv implementation error");if(u.opts.discriminator&&i.discriminator)return;const v=c,$=s.let("valid",!1),E=s.let("passing",null),_=s.name("_valid");o.setParams({passing:E}),s.block(g),o.result($,()=>o.reset(),()=>o.error(!0));function g(){v.forEach((b,w)=>{let f;(0,t.alwaysValidSchema)(u,b)?s.var(_,!0):f=o.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},_),w>0&&s.if((0,e._)`${_} && ${$}`).assign($,!1).assign(E,(0,e._)`[${E}, ${w}]`).else(),s.if(_,()=>{s.assign($,!0),s.assign(E,w),f&&o.mergeEvaluated(f,e.Name)})})}}};return gt.default=n,gt}var vt={},mn;function si(){if(mn)return vt;mn=1,Object.defineProperty(vt,"__esModule",{value:!0});const e=B(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:o,it:s}=r;if(!Array.isArray(o))throw new Error("ajv implementation error");const c=n.name("valid");o.forEach((i,u)=>{if((0,e.alwaysValidSchema)(s,i))return;const v=r.subschema({keyword:"allOf",schemaProp:u},c);r.ok(c),r.mergeEvaluated(v)})}};return vt.default=t,vt}var _t={},hn;function ii(){if(hn)return _t;hn=1,Object.defineProperty(_t,"__esModule",{value:!0});const e=G(),t=B(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:c,parentSchema:i,it:u}=s;i.then===void 0&&i.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const v=o(u,"then"),$=o(u,"else");if(!v&&!$)return;const E=c.let("valid",!0),_=c.name("_valid");if(g(),s.reset(),v&&$){const w=c.let("ifClause");s.setParams({ifClause:w}),c.if(_,b("then",w),b("else",w))}else v?c.if(_,b("then")):c.if((0,e.not)(_),b("else"));s.pass(E,()=>s.error(!0));function g(){const w=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},_);s.mergeEvaluated(w)}function b(w,f){return()=>{const p=s.subschema({keyword:w},_);c.assign(E,_),s.mergeValidEvaluated(p,E),f?c.assign(f,(0,e._)`${w}`):s.setParams({ifClause:w})}}}};function o(s,c){const i=s.schema[c];return i!==void 0&&!(0,t.alwaysValidSchema)(s,i)}return _t.default=n,_t}var $t={},yn;function oi(){if(yn)return $t;yn=1,Object.defineProperty($t,"__esModule",{value:!0});const e=B(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:o}){n.if===void 0&&(0,e.checkStrictMode)(o,`"${r}" without "if" is ignored`)}};return $t.default=t,$t}var gn;function ai(){if(gn)return at;gn=1,Object.defineProperty(at,"__esModule",{value:!0});const e=Mn(),t=Ws(),r=An(),n=Bs(),o=Ys(),s=Qs(),c=Zs(),i=Vn(),u=Xs(),v=ei(),$=ti(),E=ri(),_=ni(),g=si(),b=ii(),w=oi();function f(p=!1){const a=[$.default,E.default,_.default,g.default,b.default,w.default,c.default,i.default,s.default,u.default,v.default];return p?a.push(t.default,n.default):a.push(e.default,r.default),a.push(o.default),a}return at.default=f,at}var bt={},wt={},vn;function ci(){if(vn)return wt;vn=1,Object.defineProperty(wt,"__esModule",{value:!0});const e=G(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,o){const{gen:s,data:c,$data:i,schema:u,schemaCode:v,it:$}=n,{opts:E,errSchemaPath:_,schemaEnv:g,self:b}=$;if(!E.validateFormats)return;i?w():f();function w(){const p=s.scopeValue("formats",{ref:b.formats,code:E.code.formats}),a=s.const("fDef",(0,e._)`${p}[${v}]`),l=s.let("fType"),y=s.let("format");s.if((0,e._)`typeof ${a} == "object" && !(${a} instanceof RegExp)`,()=>s.assign(l,(0,e._)`${a}.type || "string"`).assign(y,(0,e._)`${a}.validate`),()=>s.assign(l,(0,e._)`"string"`).assign(y,a)),n.fail$data((0,e.or)(d(),h()));function d(){return E.strictSchema===!1?e.nil:(0,e._)`${v} && !${y}`}function h(){const P=g.$async?(0,e._)`(${a}.async ? await ${y}(${c}) : ${y}(${c}))`:(0,e._)`${y}(${c})`,I=(0,e._)`(typeof ${y} == "function" ? ${P} : ${y}.test(${c}))`;return(0,e._)`${y} && ${y} !== true && ${l} === ${o} && !${I}`}}function f(){const p=b.formats[u];if(!p){d();return}if(p===!0)return;const[a,l,y]=h(p);a===o&&n.pass(P());function d(){if(E.strictSchema===!1){b.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${u}" ignored in schema at path "${_}"`}}function h(I){const T=I instanceof RegExp?(0,e.regexpCode)(I):E.code.formats?(0,e._)`${E.code.formats}${(0,e.getProperty)(u)}`:void 0,L=s.scopeValue("formats",{key:u,ref:I,code:T});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,e._)`${L}.validate`]:["string",I,L]}function P(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!g.$async)throw new Error("async format in sync schema");return(0,e._)`await ${y}(${c})`}return typeof l=="function"?(0,e._)`${y}(${c})`:(0,e._)`${y}.test(${c})`}}}};return wt.default=r,wt}var _n;function di(){if(_n)return bt;_n=1,Object.defineProperty(bt,"__esModule",{value:!0});const t=[ci().default];return bt.default=t,bt}var je={},$n;function ui(){return $n||($n=1,Object.defineProperty(je,"__esModule",{value:!0}),je.contentVocabulary=je.metadataVocabulary=void 0,je.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],je.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),je}var bn;function li(){if(bn)return He;bn=1,Object.defineProperty(He,"__esModule",{value:!0});const e=Ts(),t=xs(),r=ai(),n=di(),o=ui(),s=[e.default,t.default,(0,r.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return He.default=s,He}var Pt={},Te={},wn;function fi(){if(wn)return Te;wn=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Te.DiscrError=e={})),Te}var Pn;function pi(){if(Pn)return Pt;Pn=1,Object.defineProperty(Pt,"__esModule",{value:!0});const e=G(),t=fi(),r=nr(),n=Vt(),o=B(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:i,tagName:u}})=>i===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:i,tag:u,tagName:v}})=>(0,e._)`{error: ${i}, tag: ${v}, tagValue: ${u}}`},code(i){const{gen:u,data:v,schema:$,parentSchema:E,it:_}=i,{oneOf:g}=E;if(!_.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=$.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if($.mapping)throw new Error("discriminator: mapping is not supported");if(!g)throw new Error("discriminator: requires oneOf keyword");const w=u.let("valid",!1),f=u.const("tag",(0,e._)`${v}${(0,e.getProperty)(b)}`);u.if((0,e._)`typeof ${f} == "string"`,()=>p(),()=>i.error(!1,{discrError:t.DiscrError.Tag,tag:f,tagName:b})),i.ok(w);function p(){const y=l();u.if(!1);for(const d in y)u.elseIf((0,e._)`${f} === ${d}`),u.assign(w,a(y[d]));u.else(),i.error(!1,{discrError:t.DiscrError.Mapping,tag:f,tagName:b}),u.endIf()}function a(y){const d=u.name("valid"),h=i.subschema({keyword:"oneOf",schemaProp:y},d);return i.mergeEvaluated(h,e.Name),d}function l(){var y;const d={},h=I(E);let P=!0;for(let O=0;O<g.length;O++){let V=g[O];if(V?.$ref&&!(0,o.schemaHasRulesButRef)(V,_.self.RULES)){const F=V.$ref;if(V=r.resolveRef.call(_.self,_.schemaEnv.root,_.baseId,F),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(_.opts.uriResolver,_.baseId,F)}const z=(y=V?.properties)===null||y===void 0?void 0:y[b];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);P=P&&(h||I(V)),T(z,O)}if(!P)throw new Error(`discriminator: "${b}" must be required`);return d;function I({required:O}){return Array.isArray(O)&&O.includes(b)}function T(O,V){if(O.const)L(O.const,V);else if(O.enum)for(const z of O.enum)L(z,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function L(O,V){if(typeof O!="string"||O in d)throw new Error(`discriminator: "${b}" values must be unique strings`);d[O]=V}}}};return Pt.default=c,Pt}const mi="http://json-schema.org/draft-07/schema#",hi="http://json-schema.org/draft-07/schema#",yi="Core schema meta-schema",gi={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:[]}},vi=["object","boolean"],_i={$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:"#"}},$i={$schema:mi,$id:hi,title:yi,definitions:gi,type:vi,properties:_i,default:!0};var Sn;function Ln(){return Sn||(Sn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Os(),n=li(),o=pi(),s=$i,c=["/properties"],i="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(s,c):s;this.addMetaSchema(b,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var v=At();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return v.KeywordCxt}});var $=G();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return $._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return $.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return $.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return $.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return $.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return $.CodeGen}});var E=rr();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return E.default}});var _=Vt();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(ze,ze.exports)),ze.exports}var bi=Ln();const wi=Nn(bi);var St={exports:{}},Zt={},En;function Pi(){return En||(En=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(O,V){return{validate:O,compare:V}}e.fullFormats={date:t(s,c),time:t(u(!0),v),"date-time":t(_(!0),g),"iso-time":t(u(),$),"iso-date-time":t(_(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:L,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:l,int32:{type:"number",validate:h},int64:{type:"number",validate:P},float:{type:"number",validate:I},double:{type:"number",validate:I},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,g),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,$),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(O){return O%4===0&&(O%100!==0||O%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(O){const V=n.exec(O);if(!V)return!1;const z=+V[1],F=+V[2],Q=+V[3];return F>=1&&F<=12&&Q>=1&&Q<=(F===2&&r(z)?29:o[F])}function c(O,V){if(O&&V)return O>V?1:O<V?-1:0}const i=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(O){return function(z){const F=i.exec(z);if(!F)return!1;const Q=+F[1],ie=+F[2],oe=+F[3],X=F[4],pe=F[5]==="-"?-1:1,M=+(F[6]||0),j=+(F[7]||0);if(M>23||j>59||O&&!X)return!1;if(Q<=23&&ie<=59&&oe<60)return!0;const D=ie-j*pe,C=Q-M*pe-(D<0?1:0);return(C===23||C===-1)&&(D===59||D===-1)&&oe<61}}function v(O,V){if(!(O&&V))return;const z=new Date("2020-01-01T"+O).valueOf(),F=new Date("2020-01-01T"+V).valueOf();if(z&&F)return z-F}function $(O,V){if(!(O&&V))return;const z=i.exec(O),F=i.exec(V);if(z&&F)return O=z[1]+z[2]+z[3],V=F[1]+F[2]+F[3],O>V?1:O<V?-1:0}const E=/t|\s/i;function _(O){const V=u(O);return function(F){const Q=F.split(E);return Q.length===2&&s(Q[0])&&V(Q[1])}}function g(O,V){if(!(O&&V))return;const z=new Date(O).valueOf(),F=new Date(V).valueOf();if(z&&F)return z-F}function b(O,V){if(!(O&&V))return;const[z,F]=O.split(E),[Q,ie]=V.split(E),oe=c(z,Q);if(oe!==void 0)return oe||v(F,ie)}const w=/\/|:/,f=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p(O){return w.test(O)&&f.test(O)}const a=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function l(O){return a.lastIndex=0,a.test(O)}const y=-2147483648,d=2**31-1;function h(O){return Number.isInteger(O)&&O<=d&&O>=y}function P(O){return Number.isInteger(O)}function I(){return!0}const T=/[^\\]\\Z/;function L(O){if(T.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}})(Zt)),Zt}var Xt={},kn;function Si(){return kn||(kn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Ln(),r=G(),n=r.operators,o={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:i,schemaCode:u})=>(0,r.str)`should be ${o[i].okStr} ${u}`,params:({keyword:i,schemaCode:u})=>(0,r._)`{comparison: ${o[i].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(o),type:"string",schemaType:"string",$data:!0,error:s,code(i){const{gen:u,data:v,schemaCode:$,keyword:E,it:_}=i,{opts:g,self:b}=_;if(!g.validateFormats)return;const w=new t.KeywordCxt(_,b.RULES.all.format.definition,"format");w.$data?f():p();function f(){const l=u.scopeValue("formats",{ref:b.formats,code:g.code.formats}),y=u.const("fmt",(0,r._)`${l}[${w.schemaCode}]`);i.fail$data((0,r.or)((0,r._)`typeof ${y} != "object"`,(0,r._)`${y} instanceof RegExp`,(0,r._)`typeof ${y}.compare != "function"`,a(y)))}function p(){const l=w.schema,y=b.formats[l];if(!y||y===!0)return;if(typeof y!="object"||y instanceof RegExp||typeof y.compare!="function")throw new Error(`"${E}": format "${l}" does not define "compare" function`);const d=u.scopeValue("formats",{key:l,ref:y,code:g.code.formats?(0,r._)`${g.code.formats}${(0,r.getProperty)(l)}`:void 0});i.fail$data(a(d))}function a(l){return(0,r._)`${l}.compare(${v}, ${$}) ${o[E].fail} 0`}},dependencies:["format"]};const c=i=>(i.addKeyword(e.formatLimitDefinition),i);e.default=c})(Xt)),Xt}var jn;function Ei(){return jn||(jn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=Pi(),n=Si(),o=G(),s=new o.Name("fullFormats"),c=new o.Name("fastFormats"),i=(v,$={keywords:!0})=>{if(Array.isArray($))return u(v,$,r.fullFormats,s),v;const[E,_]=$.mode==="fast"?[r.fastFormats,c]:[r.fullFormats,s],g=$.formats||r.formatNames;return u(v,g,E,_),$.keywords&&(0,n.default)(v),v};i.get=(v,$="full")=>{const _=($==="fast"?r.fastFormats:r.fullFormats)[v];if(!_)throw new Error(`Unknown format "${v}"`);return _};function u(v,$,E,_){var g,b;(g=(b=v.opts.code).formats)!==null&&g!==void 0||(b.formats=(0,o._)`require("ajv-formats/dist/formats").${_}`);for(const w of $)v.addFormat(w,E[w])}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i})(St,St.exports)),St.exports}var ki=Ei();const ji=Nn(ki),Ri="http://json-schema.org/draft-07/schema#",Ci="#/definitions/CICConfig",Ii=JSON.parse('{"CICConfig":{"type":"object","properties":{"version":{"type":"string"},"meta":{"$ref":"#/definitions/Meta"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"layout":{"$ref":"#/definitions/Layout"},"components":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}},"dataSources":{"type":"array","items":{"$ref":"#/definitions/DataSourceItem"}},"extensions":{"type":"object"}},"required":["id","path"],"additionalProperties":false,"description":"CIC 页面定义 说明:定义了 CIC 中页面的结构,包含页面 ID、名称、路径、布局、组件等。"}},"registry":{"$ref":"#/definitions/Registry"},"variables":{"$ref":"#/definitions/Variables"},"deps":{"type":"array","items":{"$ref":"#/definitions/Dependency"}},"extensions":{"type":"object"}},"required":["version","meta","pages"],"additionalProperties":false,"description":"CIC 配置定义 说明:定义了 CIC 项目的全局配置,包含版本、元数据、页面、组件、变量、依赖等。"},"Meta":{"type":"object","properties":{"projectId":{"type":"string","description":"项目唯一标识符"},"projectName":{"type":"string","description":"项目名称"},"description":{"type":"string","description":"项目描述"},"layout":{"$ref":"#/definitions/Layout","description":"布局配置"},"language":{"type":"string","description":"语言代码 (e.g. zh-CN, en-US)"},"createTime":{"type":"string","description":"创建时间 (ISO 8601)","format":"date-time"},"updateTime":{"type":"string","description":"更新时间 (ISO 8601)","format":"date-time"},"author":{"type":"string","description":"作者"},"extensions":{"type":"object","description":"扩展字段"}},"additionalProperties":false,"description":"项目元信息 包含项目的基本信息、布局配置、语言、创建时间、更新时间、作者和扩展信息。"},"Layout":{"type":"object","properties":{"type":{"type":"string","enum":["free","grid"],"description":"布局类型: free(自由布局) 或 grid(网格布局)"},"config":{"type":"object","properties":{"width":{"type":"number","description":"设计稿宽度","minimum":1,"default":1920},"height":{"type":"number","description":"设计稿高度","minimum":1,"default":1080},"scaleMode":{"type":"string","enum":["aspectFit","fill"],"description":"缩放模式","default":"aspectFit"}},"required":["width","height","scaleMode"],"additionalProperties":false}},"required":["type","config"],"additionalProperties":false,"description":"布局配置"},"ComponentInstance":{"anyOf":[{"$ref":"#/definitions/ViewComponentInstance"},{"$ref":"#/definitions/ContainerComponentInstance"},{"$ref":"#/definitions/LogicComponentInstanceRef"}],"description":"组件实例(view/container/logic 类型)"},"ViewComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"view"},"component":{"$ref":"#/definitions/ComponentRef"}},"required":["component","id","role"],"additionalProperties":false},"StyleValue":{"anyOf":[{"type":"string"},{"type":"number"},{"$ref":"#/definitions/Expr"}],"description":"样式值可以是静态或表达式"},"Expr":{"type":"string","description":"通用表达式(用于条件、模板等)"},"CICEventMap":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/CICEventWithMeta"}},"description":"某组件的所有事件 说明:定义了 CIC 项目中组件的所有事件,包含事件类型、动作、参数、调度顺序、延迟时间和条件。 (key: 事件名, value: 处理逻辑数组)"},"CICEventWithMeta":{"anyOf":[{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"vars"},"action":{"$ref":"#/definitions/VarsAction"},"params":{"$ref":"#/definitions/VarsParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"internal"},"params":{"$ref":"#/definitions/NavigateInternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"external"},"params":{"$ref":"#/definitions/NavigateExternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"comp"},"action":{"$ref":"#/definitions/CompAction"},"params":{"$ref":"#/definitions/CompParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"toggle"},"action":{"type":"string","const":"visibility"},"params":{"$ref":"#/definitions/ToggleParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"camera"},"action":{"type":"string","const":"focus"},"params":{"$ref":"#/definitions/CameraFocusParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"material"},"action":{"type":"string","const":"change"},"params":{"$ref":"#/definitions/MaterialChangeParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"local"},"params":{"$ref":"#/definitions/CustomLocalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"remote"},"params":{"$ref":"#/definitions/CustomRemoteParams"}},"required":["action","order","params","type"]}],"description":"带调度信息"},"EventCondition":{"anyOf":[{"$ref":"#/definitions/KeyCondition"},{"type":"array","items":{"$ref":"#/definitions/KeyCondition"}},{"$ref":"#/definitions/ExpressionCondition"}],"description":"多条件(AND) + 表达式"},"KeyCondition":{"type":"object","properties":{"key":{"type":"string"},"op":{"$ref":"#/definitions/ConditionOperator"},"value":{}},"required":["key"],"additionalProperties":false},"ConditionOperator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not-in","exists","not-exists"]},"ExpressionCondition":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"],"additionalProperties":false,"description":"表达式条件:支持如 \\"ctx.id === 5 && ctx.level > 1\\""},"VarsAction":{"type":"string","enum":["add","update","delete"],"description":"变量事件动作"},"VarsParams":{"type":"object","properties":{"key":{"type":"string"},"value":{},"exclude":{"type":"array","items":{"type":"string"}}},"required":["key","value"],"additionalProperties":false},"NavigateInternalParams":{"type":"object","properties":{"name":{"type":"string"},"params":{"type":"object"}},"required":["name"],"additionalProperties":false},"NavigateExternalParams":{"type":"object","properties":{"url":{"type":"string"},"openNewTab":{"type":"boolean"}},"required":["url"],"additionalProperties":false},"CompAction":{"type":"string","enum":["add","update","delete"],"description":"组件事件动作"},"CompParams":{"type":"object","properties":{"comps":{"type":"array","items":{"type":"string"}},"props":{"type":"object"}},"required":["comps"],"additionalProperties":false},"ToggleParams":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"CameraFocusParams":{"type":"object","properties":{"target":{"type":["string","number"]},"duration":{"type":"number"}},"required":["target"],"additionalProperties":false},"MaterialChangeParams":{"type":"object","properties":{"target":{"type":"string"},"materials":{"type":"string"}},"required":["target","materials"],"additionalProperties":false},"CustomLocalParams":{"type":"object","properties":{"code":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["code"],"additionalProperties":false},"CustomRemoteParams":{"type":"object","properties":{"url":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false},"Data":{"type":"object","properties":{"id":{"type":"string","description":"数据ID"},"mapping":{"$ref":"#/definitions/IMapping","description":"字段映射配置"},"converse":{"$ref":"#/definitions/IConverse","description":"转换规则配置"}},"required":["id"],"additionalProperties":false,"description":"数据配置"},"IMapping":{"type":"object","properties":{"use":{"type":"boolean"},"mapFields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"源字段名"},"mapField":{"type":"string","description":"目标字段名"},"value":{"description":"映射值或公式"},"type":{"type":"string","enum":["copy","const","formula"],"description":"映射类型:默认(普通映射)、copy(复制) const(常量)、formula(公式)"},"description":{"type":"string","description":"描述"}},"required":["field","mapField"],"additionalProperties":false}}},"required":["use","mapFields"],"additionalProperties":false,"description":"字段映射配置"},"IConverse":{"type":"object","properties":{"use":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string","description":"转换代码"},"depeedVars":{"type":"array","items":{"type":"string"},"description":"依赖变量列表(用于响应式重执行)"}},"required":["code"],"additionalProperties":false}}},"required":["use","data"],"additionalProperties":false,"description":"转换规则配置"},"ComponentRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","const":"id"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}],"description":"component 引用:字符串或 object 描述"},"ContainerComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"container"},"children":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}}},"required":["children","id","role"],"additionalProperties":false},"LogicComponentInstanceRef":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"logic"},"component":{"$ref":"#/definitions/LogicRef"}},"required":["component","id","role"],"additionalProperties":false},"LogicRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["url","code"]},"value":{"type":"string"},"format":{"$ref":"#/definitions/JSFormat"}},"required":["type","value"],"additionalProperties":false}]},"JSFormat":{"type":"string","enum":["esm","umd","iife","cjs"],"description":"JS 格式"},"DataSourceItem":{"anyOf":[{"$ref":"#/definitions/DataSourceRest"},{"$ref":"#/definitions/DataSourceWebSocket"},{"$ref":"#/definitions/DataSourceStatic"},{"$ref":"#/definitions/DataSourceFunction"}],"description":"数据源项(rest/websocket/static/function 类型)"},"DataSourceRest":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"rest"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"extensions":{"type":"object"},"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"params":{"type":"object"},"body":{},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["id","method","type","url"],"additionalProperties":false},"Milliseconds":{"type":"number"},"DataSourceWebSocket":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"websocket"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"extensions":{"type":"object"},"url":{"type":"string"},"protocols":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subscribeMessage":{},"heartbeat":{"type":"object","properties":{"interval":{"$ref":"#/definitions/Milliseconds"},"message":{}},"required":["interval","message"],"additionalProperties":false}},"required":["id","type","url"],"additionalProperties":false},"DataSourceStatic":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"static"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"extensions":{"type":"object"},"value":{}},"required":["id","type","value"],"additionalProperties":false},"DataSourceFunction":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"extensions":{"type":"object"},"code":{"type":"string"},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["code","id","type"],"additionalProperties":false},"Registry":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/definitions/RegistryComponents"}},"plugins":{"type":"object","description":"插件后期可扩展"}},"additionalProperties":false,"description":"注册表"},"RegistryComponents":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"author":{"type":"string"},"defaultProps":{"type":"object"},"data":{},"deps":{"type":"array","items":{"type":"string"}}},"required":["id"],"additionalProperties":false,"description":"注册中心组件项 说明:定义了 CIC 项目中组件注册中心的组件项,包含组件 ID、类型和配置。"},"Variables":{"type":"object","properties":{"global":{"$ref":"#/definitions/VariablesMap","description":"全局变量,对所有页面和组件均生效。"},"page":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"页面级变量,键为页面 ID,值为该页面的变量映射。"},"component":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"组件级变量,键为组件 ID,值为该组件的变量映射。"}},"additionalProperties":false,"description":"变量集合,按作用域组织:global/page/component。"},"VariablesMap":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"},"description":"变量映射,键为变量名,值为变量定义。"},"Variable":{"anyOf":[{"$ref":"#/definitions/StringVariable"},{"$ref":"#/definitions/NumberVariable"},{"$ref":"#/definitions/BooleanVariable"},{"$ref":"#/definitions/ArrayVariable"},{"$ref":"#/definitions/FunctionVariable"},{"$ref":"#/definitions/ObjectVariable"}],"description":"变量联合类型,涵盖五类变量定义。"},"StringVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"string"},"value":{"type":"string"},"default":{"type":"string"}},"required":["type","value","default"],"additionalProperties":false,"description":"字符串变量,包含当前值与默认值,可选描述。"},"NumberVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"number"},"value":{"type":"number"},"default":{"type":"number"}},"required":["type","value","default"],"additionalProperties":false,"description":"数字变量,包含当前值与默认值,可选描述。"},"BooleanVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"boolean"},"value":{"type":"boolean"},"default":{"type":"boolean"}},"required":["type","value","default"],"additionalProperties":false,"description":"布尔变量,包含当前值与默认值,可选描述。"},"ArrayVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"array"},"value":{"type":"array","items":{}},"default":{"type":"array","items":{}}},"required":["type","value","default"],"additionalProperties":false,"description":"数组变量,元素类型不做限制,包含当前值与默认值,可选描述。"},"FunctionVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"function"},"value":{"type":"string"},"default":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}},"required":["type","value","default"],"additionalProperties":false,"description":"函数变量,以字符串保存函数实现;支持 `args` 指定入参名列表。"},"ObjectVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"object"},"value":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}},"default":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}}},"required":["type","value","default"],"additionalProperties":false,"description":"对象变量,键到变量的映射;支持递归嵌套。"},"Dependency":{"anyOf":[{"$ref":"#/definitions/JSDependency"},{"$ref":"#/definitions/CSSDependency"},{"$ref":"#/definitions/FontDependency"},{"$ref":"#/definitions/ImageDependency"},{"$ref":"#/definitions/JSONDependency"},{"$ref":"#/definitions/WasmDependency"},{"$ref":"#/definitions/OtherDependency"}],"description":"依赖项"},"JSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"js"},"format":{"$ref":"#/definitions/JSFormat"},"crossOrigin":{"type":"string","enum":["anonymous","use-credentials"]},"module":{"type":"boolean"}},"required":["format","id","type"],"additionalProperties":false,"description":"JS 资源"},"CSSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"css"},"media":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"CSS"},"FontDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"font"},"family":{"type":"string"},"weight":{"type":["number","string"]},"style":{"type":"string","enum":["normal","italic"]}},"required":["id","type"],"additionalProperties":false,"description":"字体"},"ImageDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"image"},"mime":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"图片"},"JSONDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"json"}},"required":["id","type"],"additionalProperties":false,"description":"JSON"},"WasmDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"wasm"},"init":{"type":"string","enum":["async","sync"]}},"required":["id","type"],"additionalProperties":false,"description":"WASM"},"OtherDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"other"},"kind":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"其他"}}'),Ve={$schema:Ri,$ref:Ci,definitions:Ii},ue={REQUIRED:"required",TYPE:"type",ENUM:"enum",CONST:"const",ADDITIONAL:"additionalProperties",ANY_OF:"anyOf"},Le={TYPE:"/type",VALUE:"/value",DEFAULT:"/default",ARGS:"/args"},Re={missing:e=>`缺少必填字段:${e}`,type:e=>`类型必须为:${e}`,enum:e=>`取值必须为枚举之一:${e.join(", ")}`,const:e=>`取值必须为:${JSON.stringify(e)}`,additionalProp:e=>`不允许额外字段:${e}`,constDefault:"必须等于常量"},Ni=[{rootPattern:/(\/|^)components\/\d+/,discriminator:"role",keepRequired:["role","id"]},{rootPattern:/(\/|^)global\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)page\/[^\/]+\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)component\/[^\/]+\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)dataSources\/\d+/,discriminator:"type",keepRequired:["type","id"]}];function Oi(e){const t=e.instancePath||e.path||"",r=e.keyword,n=e.params||{};let o=e.message||"";switch(r){case ue.REQUIRED:n.missingProperty&&(o=Re.missing(n.missingProperty));break;case ue.TYPE:e.schema&&(o=Re.type(e.schema));break;case ue.ENUM:Array.isArray(n.allowedValues)&&(o=Re.enum(n.allowedValues));break;case ue.CONST:o=n.allowedValue!==void 0?Re.const(n.allowedValue):Re.constDefault;break;case ue.ADDITIONAL:n.additionalProperty&&(o=Re.additionalProp(n.additionalProperty));break}return{path:t,message:o,keyword:r,params:n}}function qi(e){return e.map(Oi)}function Di(e){const t=[],r=new Map,n=new Set;for(const o of e)if(o.keyword===ue.CONST&&o.path.endsWith(Le.TYPE)){const c=o.path,i=r.get(c)||{path:o.path,values:[]},u=o.params?.allowedValue;u!==void 0&&!i.values.includes(u)&&i.values.push(u),r.set(c,i)}else t.push(o);for(const[,o]of r)if(o.values.length!==0)if(o.values.length===1)t.push({path:o.path,keyword:ue.CONST,params:{allowedValue:o.values[0]},message:Re.const(o.values[0])});else{const s=o.path.replace(new RegExp(`${Le.TYPE}$`),"");n.add(s)}return{merged:t,multiConstRoots:n}}function Ti(e){return`${e.keyword}|${e.path}|${JSON.stringify(e.params??{})}`}function Mi(e){const t=new Set,r=[];for(const n of e){const o=Ti(n);t.has(o)||(t.add(o),r.push(n))}return r}function Ai(e){if(!e)return"";const t=Object.values(Le).join("|"),r=new RegExp(`^(.*?)(?:${t})(?:$|\\/)`),n=e.match(r);return n?n[1]:e}function Vi(e){const t=new Map;for(const r of e){const n=Ai(r.path),o=t.get(n)||[];o.push(r),t.set(n,o)}return t}function Li(e,t){return e.keyword===ue.REQUIRED&&t.keepRequired.includes(e.params?.missingProperty)}function zi(e,t){const r=e.keyword===ue.TYPE,n=e.path===`${t}${Le.VALUE}`||e.path===`${t}${Le.DEFAULT}`;return r&&n}function Fi(e,t){return e.keyword===ue.ADDITIONAL&&e.path===t}function Ui(e,t){const r=[];for(const[n,o]of e.entries()){const s=Ni.find(i=>i.rootPattern.test(n));if(s&&o.some(u=>u.keyword===ue.REQUIRED&&u.params?.missingProperty===s.discriminator)){for(const u of o)Li(u,s)&&r.push(u);continue}if(!t.has(n)){r.push(...o);continue}for(const i of o)zi(i,n)||Fi(i,n)||r.push(i)}return r}function Ki(e){return e.some(r=>r.keyword!==ue.ANY_OF)?e.filter(r=>r.keyword!==ue.ANY_OF):e}function Rn(e){if(e.keyword===ue.REQUIRED){const t=e.params?.missingProperty;return t==="type"||t==="role"?0:t==="id"?1:2}return 3}function Ji(e){return e.sort((t,r)=>Rn(t)-Rn(r))}function ee(e){if(!Array.isArray(e)||e.length===0)return[];const t=qi(e),{merged:r,multiConstRoots:n}=Di(t),o=Mi(r),s=Vi(o),c=Ui(s,n),i=Ki(c);return Ji(i)}function Pe(e,t){return t?.length?t.map(r=>({...r,path:`${e}${r.path?`.${r.path}`:""}`})):[]}let Et=null;const zn=()=>(Et||(Et=new wi({allErrors:!0,strict:!1}),ji(Et)),Et),Cn=new Map,Hi=JSON.stringify(Ve),Gi={CICPage:["#/definitions/CICPage","#/$defs/CICPage","#/properties/pages/items","#/definitions/CICConfig/properties/pages/items"],Meta:["#/definitions/Meta","#/$defs/Meta","#/properties/meta"],Layout:["#/definitions/Layout","#/$defs/Layout","#/properties/meta/properties/layout"],ComponentInstance:["#/definitions/ComponentInstance","#/$defs/ComponentInstance"],ViewComponentInstance:["#/definitions/ViewComponentInstance","#/$defs/ViewComponentInstance"],ContainerComponentInstance:["#/definitions/ContainerComponentInstance","#/$defs/ContainerComponentInstance"],LogicComponentInstanceRef:["#/definitions/LogicComponentInstanceRef","#/$defs/LogicComponentInstanceRef"],DataSourceItem:["#/definitions/DataSourceItem","#/$defs/DataSourceItem"],DataSourceRest:["#/definitions/DataSourceRest","#/$defs/DataSourceRest"],DataSourceWebSocket:["#/definitions/DataSourceWebSocket","#/$defs/DataSourceWebSocket"],DataSourceStatic:["#/definitions/DataSourceStatic","#/$defs/DataSourceStatic"],DataSourceFunction:["#/definitions/DataSourceFunction","#/$defs/DataSourceFunction"],RegistryComponents:["#/definitions/RegistryComponents","#/$defs/RegistryComponents"],Variables:["#/definitions/Variables","#/$defs/Variables","#/properties/variables"],Dependency:["#/definitions/Dependency","#/$defs/Dependency"],JSDependency:["#/definitions/JSDependency","#/$defs/JSDependency"],CSSDependency:["#/definitions/CSSDependency","#/$defs/CSSDependency"],FontDependency:["#/definitions/FontDependency","#/$defs/FontDependency"],ImageDependency:["#/definitions/ImageDependency","#/$defs/ImageDependency"],JSONDependency:["#/definitions/JSONDependency","#/$defs/JSONDependency"],WasmDependency:["#/definitions/WasmDependency","#/$defs/WasmDependency"],OtherDependency:["#/definitions/OtherDependency","#/$defs/OtherDependency"],LayoutConfig:["#/definitions/Layout","#/properties/meta/properties/layout"]},xi=(e,t)=>e.compile({$ref:t,definitions:Ve.definitions,properties:Ve.properties}),te=e=>{const t=zn(),r=`type:${e}::${Hi}`,n=Cn.get(r);if(n)return n;const o=Gi[e]||[`#/definitions/${e}`,`#/$defs/${e}`];for(const s of o)try{const c=xi(t,s);return Cn.set(r,c),c}catch{}throw new Error(`VALIDATOR_REF_NOT_FOUND:${e}`)},Me=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,ir=()=>{const e=globalThis;if(e?.crypto?.randomUUID)return e.crypto.randomUUID();if(e?.crypto?.getRandomValues){const t=new Uint8Array(16);e.crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=Array.from(t,n=>n.toString(16).padStart(2,"0"));return`${r.slice(0,4).join("")}-${r.slice(4,6).join("")}-${r.slice(6,8).join("")}-${r.slice(8,10).join("")}-${r.slice(10).join("")}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})},ye=(e,t)=>{if(!t||typeof t!="object")return e;const r=e??{};for(const n of Object.keys(t))(!(n in r)||r[n]===void 0)&&(r[n]=t[n]);return r},tr=e=>{try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,errors:[{path:"",keyword:"type",message:`JSON 解析失败:${t?.message??String(t)}`}]}}},Wi=e=>e.map(t=>({path:"",keyword:"required",params:{missingProperty:t},message:`缺少必填字段:${t}`})),Fn=({input:e,normalize:t,base:r,branches:n,key:o,missingKeys:s,onSuccess:c})=>{const i=t?t(e):e,u=i;if(u&&typeof u=="object"&&typeof u[o]=="string"){const v=n[u[o]];if(v)return v(u)?c(u):{ok:!1,errors:ee(v.errors)}}return r(i)?c(i):!u||typeof u[o]!="string"?{ok:!1,errors:Wi(s)}:{ok:!1,errors:ee(r.errors)}},or=(e,t,r,n)=>Fn({input:e,base:t,branches:r,key:n,missingKeys:[n,"id"],onSuccess:()=>({ok:!0,value:null})}),ar=(e,t,r,n,o,s,c=[s,"id"])=>Fn({input:e,normalize:i=>r(i,t),base:n,branches:o,key:s,missingKeys:c,onSuccess:i=>({ok:!0,value:i})}),Un=te("DataSourceItem"),Kn=te("DataSourceRest"),Jn=te("DataSourceWebSocket"),Hn=te("DataSourceStatic"),Gn=te("DataSourceFunction"),Bi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=ir()),r.type&&(r.type==="rest"?(t?.strict||("pollInterval"in r&&Me(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),"timeout"in r&&Me(r.timeout)&&(r.timeout=Math.round(r.timeout))),ye(r,t?.defaults)):r.type==="websocket"?(r.heartbeat&&typeof r.heartbeat=="object"&&(t?.strict||"interval"in r.heartbeat&&Me(r.heartbeat.interval)&&(r.heartbeat.interval=Math.round(r.heartbeat.interval))),t?.strict||"pollInterval"in r&&Me(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),ye(r,t?.defaults)):r.type==="static"?t?.strict||ye(r,t?.defaults):r.type==="function"&&(t?.strict||"timeout"in r&&Me(r.timeout)&&(r.timeout=Math.round(r.timeout)),t?.strict||ye(r,t?.defaults))),r},Yi=e=>or(e,Un,{rest:Kn,websocket:Jn,static:Hn,function:Gn},"type"),xn=(e,t)=>ar(e,t,Bi,Un,{rest:Kn,websocket:Jn,static:Hn,function:Gn},"type",["type","id"]),Wn=te("ComponentInstance"),Bn=te("ViewComponentInstance"),Yn=te("ContainerComponentInstance"),Qn=te("LogicComponentInstanceRef"),Qi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=ir()),t?.strict||(r.role==="view"?delete r.children:r.role==="container"?delete r.component:r.role==="logic"&&delete r.children),ye(r,t?.defaults),r},Zi=e=>or(e,Wn,{view:Bn,container:Yn,logic:Qn},"role"),Zn=(e,t)=>ar(e,t,Qi,Wn,{view:Bn,container:Yn,logic:Qn},"role",["role","id"]),Rt=te("CICPage"),Xi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=ir()),t?.strict||ye(r,t?.defaults),r},eo=e=>Rt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Rt.errors||[])},Xn=(e,t)=>{const r=Xi(e,t);return Rt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Rt.errors||[])}},Ct=te("Meta"),It=te("Layout"),to=e=>Ct(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Ct.errors||[])},ro=e=>It(e)?{ok:!0,value:null}:{ok:!1,errors:ee(It.errors||[])},es=(e,t)=>{const r=t?.strict?e:ye(e,t?.defaults);return Ct(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Ct.errors||[])}},ts=(e,t)=>{const r=t?.strict?e:ye(e,t?.defaults);return It(r)?{ok:!0,value:r}:{ok:!1,errors:ee(It.errors||[])}},Nt=te("Variables"),no=e=>Nt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Nt.errors||[])},rs=(e,t)=>{const r=t?.strict?e:ye(e,t?.defaults);return Nt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Nt.errors||[])}},ns=te("Dependency"),ss=te("JSDependency"),is=te("CSSDependency"),os=te("FontDependency"),as=te("ImageDependency"),cs=te("JSONDependency"),ds=te("WasmDependency"),us=te("OtherDependency"),so=e=>or(e,ns,{js:ss,css:is,font:os,image:as,json:cs,wasm:ds,other:us},"type"),ls=(e,t)=>ar(e,t,(n,o)=>o?.strict?n:ye(n,o?.defaults),ns,{js:ss,css:is,font:os,image:as,json:cs,wasm:ds,other:us},"type",["type","id"]),Ot=te("RegistryComponents"),io=e=>Ot(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Ot.errors||[])},fs=(e,t)=>{const r=t?.strict?e:ye(e,t?.defaults);return Ot(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Ot.errors||[])}},oo=e=>typeof e=="number"?`[${e}]`:`/${e}`,ao=()=>{const e=new Map,t=[],r=(...s)=>s.reduce((c,i,u)=>{const v=oo(i);return u===0&&typeof i=="string"&&!i.startsWith("/")?`/${i}`:`${c}${v}`},"");return{pathJoin:r,ensureUnique:(s,c)=>{const i=e.get(s)||new Set;return i.has(c)?(e.set(s,i),!0):(i.add(c),e.set(s,i),!1)},pushError:(s,c,i,u="error")=>{const v={path:r(...s),message:c,keyword:"rule",params:{ruleId:i,level:u}};return t.push(v),v},errors:t}},co=(e,t)=>{const r=ao();for(const n of t){const o=n.validate(e,r);Array.isArray(o)&&o.length&&r.errors.push(...o)}return{ok:r.errors.length===0,errors:r.errors}},uo=(e,t)=>{const r=co(e,t);return r.ok?{ok:!0,value:null}:{ok:!1,errors:ee(r.errors)}},lo={id:"components.id.unique",scope:"component",path:"pages[].components[].id",title:"组件 id 必须唯一",description:"组件 id 不允许重复",example:"comp_01",level:"error",validate:(e,t)=>{const r=[],n=Array.isArray(e.pages)?e.pages:[];for(let o=0;o<n.length;o++){const s=Array.isArray(n[o]?.components)?n[o].components:[];for(let c=0;c<s.length;c++){const i=s[c]?.id;if(typeof i!="string")continue;if(t.ensureUnique("components.id",i.trim())){const v=t.pushError(["pages",o,"components",c,"id"],`组件 id 重复:"${i.trim()}"`,"components.id.unique","error");r.push(v)}}}return r}},fo={id:"datasources.id.unique",scope:"dataSource",path:"pages[].dataSources[].id",title:"数据源 id 必须唯一",description:"数据源 id 不允许重复",example:"ds_user_list",level:"error",validate:(e,t)=>{const r=[],n=Array.isArray(e.pages)?e.pages:[];for(let o=0;o<n.length;o++){const s=Array.isArray(n[o]?.dataSources)?n[o].dataSources:[];for(let c=0;c<s.length;c++){const i=s[c]?.id;if(typeof i!="string")continue;if(t.ensureUnique("dataSources.id",i.trim())){const v=t.pushError(["pages",o,"dataSources",c,"id"],`数据源 id 重复:"${i.trim()}"`,"datasources.id.unique","error");r.push(v)}}}return r}},po={id:"pages.name.unique",scope:"page",path:"pages[].name",title:"页面 name 必须唯一",description:"页面 name 不允许重复",example:"首页",level:"error",validate:(e,t)=>{const r=[],n=Array.isArray(e.pages)?e.pages:[];for(let o=0;o<n.length;o++){const s=n[o]?.name;if(typeof s!="string")continue;const c=s.trim();if(!c)continue;if(t.ensureUnique("pages.name",c)){const u=t.pushError(["pages",o,"name"],`页面name重复:"${c}"`,"pages.name.unique","error");r.push(u)}}return r}},mo={id:"pages.path.unique",scope:"page",path:"pages[].path",title:"页面 path 必须唯一",description:"页面 path 不允许重复",example:"/home",level:"error",validate:(e,t)=>{const r=[],n=Array.isArray(e.pages)?e.pages:[];for(let o=0;o<n.length;o++){const s=n[o]?.path;if(typeof s!="string")continue;const c=s.trim();if(!c)continue;if(t.ensureUnique("pages.path",c)){const u=t.pushError(["pages",o,"path"],`页面path重复:"${c}"`,"pages.path.unique","error");r.push(u)}}return r}},ho=[po,mo,lo,fo];let qt,In;const yo=()=>{const e=zn(),t=JSON.stringify(Ve);(!qt||In!==t)&&(qt=e.compile(Ve),In=t)},Dt=e=>{try{return yo(),qt(e)?uo(e,ho):{ok:!1,errors:ee(qt.errors||[])}}catch(t){return{ok:!1,errors:ee([{path:"",message:t?.message||String(t),keyword:"anyOf",params:{}}])}}},go=(e,t)=>{if(e&&typeof e=="object")return Ae(e,t);const r=(e||"").trim();if(!(r.startsWith("{")||r.startsWith("[")))return{ok:!1,errors:ee([{path:"",message:"非 JSON 字符串输入,请使用 importCICAsync(pathOrUrl) 进行路径/URL 导入",keyword:"type",params:{}}])};const o=tr(r);return o.ok?Ae(o.value,t):{ok:!1,errors:o.errors}},vo=async(e,t)=>{if(e&&typeof e=="object")return Ae(e,t);const r=(e||"").trim();if(r.startsWith("{")||r.startsWith("[")){const s=tr(r);return s.ok?Ae(s.value,t):{ok:!1,errors:s.errors}}if(!(typeof globalThis.fetch=="function"))return{ok:!1,errors:ee([{path:"",message:"当前环境不支持路径/URL 导入(缺少 fetch),请传入 JSON 字符串或对象",keyword:"type",params:{}}])};if(/^file:\/\//i.test(r))return{ok:!1,errors:ee([{path:"",message:"不支持 file:// 方案,请使用 http(s) 或相对/绝对路径(同源)",keyword:"type",params:{}}])};try{const s=await globalThis.fetch(r);if(!s||!s.ok){const u=[{path:"",message:`网络或资源错误:${s?.status} ${s?.statusText||""}`.trim(),keyword:"type",params:{}}];return{ok:!1,errors:ee(u)}}const c=await s.text(),i=tr(c);return i.ok?Ae(i.value,t):{ok:!1,errors:i.errors}}catch(s){const c=[{path:"",message:`请求失败:${s?.message||s}`,keyword:"type",params:{}}];return{ok:!1,errors:ee(c)}}},_o=e=>{const t=Dt(e);if(!t.ok)return{ok:!1,errors:t.errors};const r={version:e.version,meta:e.meta,pages:e.pages,registry:e.registry,variables:e.variables,deps:e.deps,extensions:e.extensions};return{ok:!0,value:JSON.stringify(r,null,2)}},Ae=(e,t)=>{const r=typeof e=="object"?{...e}:e,n=[];if(!r||typeof r!="object")return n.push({path:"",message:"配置必须为对象",keyword:"type",params:{schema:"object"}}),{ok:!1,errors:ee(n)};if(r.version||n.push({path:"/version",message:"缺少必填字段:version",keyword:"required",params:{missingProperty:"version"}}),r.meta||n.push({path:"/meta",message:"缺少必填字段:meta",keyword:"required",params:{missingProperty:"meta"}}),r.pages||n.push({path:"/pages",message:"缺少必填字段:pages",keyword:"required",params:{missingProperty:"pages"}}),n.length)return{ok:!1,errors:ee(n)};const o=es(r.meta,t?.meta);if(o.ok||n.push(...Pe("/meta",o.errors)),r.meta?.layout){const c=ts(r.meta.layout,t?.layout);c.ok?r.meta.layout=c.value:n.push(...Pe("/meta/layout",c.errors))}if(o.ok&&(r.meta=o.value),r.variables){const c=rs(r.variables,t?.variables);c.ok?r.variables=c.value:n.push(...Pe("/variables",c.errors))}if(r.registry?.components){const c=[];for(let i=0;i<r.registry.components.length;i++){const u=fs(r.registry.components[i],t?.registry);u.ok?c.push(u.value):n.push(...Pe(`/registry/components[${i}]`,u.errors))}r.registry.components=c}if(r.deps){const c=[];for(let i=0;i<r.deps.length;i++){const u=ls(r.deps[i],t?.dependency);u.ok?c.push(u.value):n.push(...Pe(`/deps[${i}]`,u.errors))}r.deps=c}if(Array.isArray(r.pages)){const c=[];for(let i=0;i<r.pages.length;i++){const u=r.pages[i],v=Xn(u,t?.page);if(!v.ok){n.push(...Pe(`/pages[${i}]`,v.errors));continue}const $=v.value;if(Array.isArray(u.components)){const E=[];for(let _=0;_<u.components.length;_++){const g=Zn(u.components[_],t?.component);g.ok?E.push(g.value):n.push(...Pe(`/pages[${i}]/components[${_}]`,g.errors))}$.components=E}if(Array.isArray(u.dataSources)){const E=[];for(let _=0;_<u.dataSources.length;_++){const g=xn(u.dataSources[_],t?.dataSource);g.ok?E.push(g.value):n.push(...Pe(`/pages[${i}]/dataSources[${_}]`,g.errors))}$.dataSources=E}c.push($)}r.pages=c}if(n.length)return{ok:!1,errors:ee(n)};const s=Dt(r);return s.ok?{ok:!0,value:r}:{ok:!1,errors:s.errors}};var ve=(e=>(e.Pending="pending",e.Loading="loading",e.Loaded="loaded",e.Failed="failed",e))(ve||{});function $o(e,t){return Promise.race([e,new Promise((r,n)=>setTimeout(()=>n(new Error("Load timeout")),t))])}function bo(e){return new Promise(t=>setTimeout(t,e))}function wo(e){try{return new Function("return "+e)()}catch{return!1}}function Po(e){const t=new Map;return e.forEach(r=>{const n=r.group||"default";t.has(n)||t.set(n,[]),t.get(n).push(r)}),t}class ps{cache=new Map;loaders=new Map;loading=new Map;options;dependencies=new Map;constructor(t={}){this.options={timeout:3e4,retry:3,concurrency:6,esmMode:"script",mapping:{},scopes:{},baseURL:"",onBeforeLoad:()=>{},onAfterLoad:()=>{},onProgress:()=>{},...t}}registerLoader(t,r){return this.loaders.set(t,r),this}registerDependencies(t){return t.forEach(r=>{this.dependencies.set(r.id,r)}),this}async load(t,r){const n={...this.options,...r};if(this.dependencies.set(t.id,t),this.cache.has(t.id)){const s=this.cache.get(t.id);if(s.status===ve.Loaded)return s}if(this.loading.has(t.id))return this.loading.get(t.id);if(t.strategy?.when&&!wo(t.strategy.when))return{id:t.id,status:ve.Loaded,data:null};const o=this.doLoad(t,n);this.loading.set(t.id,o);try{const s=await o;return this.cache.set(t.id,s),s}finally{this.loading.delete(t.id)}}async doLoad(t,r){const n=globalThis.performance?.now?()=>globalThis.performance.now():()=>Date.now(),o=n();let s;await r.onBeforeLoad(t);const c=this.loaders.get(t.type);if(!c)throw new Error(`No loader found for type: ${t.type}`);if(t.format==="cjs"&&typeof window<"u")throw new Error("CJS format is not supported on web platform");for(let u=0;u<=r.retry;u++)try{const v=await $o(c.load(t,r),r.timeout);return v.duration=n()-o,await r.onAfterLoad(v),v}catch(v){s=v,u<r.retry&&await bo(Math.pow(2,u)*1e3)}const i={id:t.id,status:ve.Failed,error:s,duration:n()-o};return await r.onAfterLoad(i),i}async loadAll(t,r){const n={...this.options,...r},o=[];let s=0;this.registerDependencies(t);const c=Po(t);for(const[,i]of c){const u=await this.loadConcurrent(i,n.concurrency,n);o.push(...u),s+=i.length,n.onProgress(s,t.length)}return o}async loadConcurrent(t,r,n){const o=[],s=[...t],c=Array.from({length:Math.min(r,t.length)},async()=>{for(;s.length>0;){const i=s.shift();if(i){const u=await this.load(i,n);o.push(u)}}});return await Promise.all(c),o}async preload(t){const r=t.filter(n=>n.strategy?.preload||n.strategy?.prefetch);await this.loadAll(r,{...this.options,retry:1})}async unload(t){if(!this.cache.get(t))return;const n=this.dependencies.get(t);if(!n)return;const o=this.loaders.get(n.type);o?.unload&&await o.unload(n),this.cache.delete(t)}clear(){this.cache.clear(),this.loading.clear()}getStatus(t){return this.cache.get(t)?.status??ve.Pending}getResult(t){return this.cache.get(t)}getAllResults(){return new Map(this.cache)}}class So{resolveURL(t,r){const n=r?.resolveUrl?.(t);if(n)return n;const o=t.url||t.localPath||"";if(!o)return o;if(r?.scopes){for(const s of Object.keys(r.scopes))if(o.startsWith(s)){const c=r.scopes[s]||{},i=c[t.id]||c[o];if(i)return i}}if(r?.mapping){for(const s of Object.keys(r.mapping)){const c=r.mapping[s];if(o.startsWith(s))return o.replace(s,c)}if(r.mapping[t.id])return r.mapping[t.id]}if(r?.baseURL&&/^\.{0,2}\//.test(o)){const s=r.baseURL.replace(/\/+$/,""),c=o.replace(/^\/+/,"");return`${s}/${c}`}return o}async load(t,r){return(t.module||t.format==="esm")&&r?.esmMode==="import"?import(this.resolveURL(t,r)).then(o=>({id:t.id,status:ve.Loaded,data:o})).catch(()=>{throw new Error(`Failed to import ESM: ${t.url||t.localPath}`)}):new Promise((n,o)=>{const s=document.createElement("script");s.id=t.id,s.src=this.resolveURL(t,r),(t.module||t.format==="esm")&&(s.type="module"),t.strategy?.async&&(s.async=!0),t.crossOrigin&&(s.crossOrigin=t.crossOrigin),s.onload=()=>{n({id:t.id,status:ve.Loaded,data:window[t.name||t.id]})},s.onerror=()=>{o(new Error(`Failed to load JS: ${t.url||t.localPath}`))},document.head.appendChild(s)})}async unload(t){const r=document.getElementById(t.id);r&&r.remove(),t.name&&window[t.name]&&delete window[t.name]}}class Eo{async load(t){return new Promise((r,n)=>{const o=document.createElement("link");o.id=t.id,o.rel="stylesheet",o.href=t.url||t.localPath||"",t.media&&(o.media=t.media),o.onload=()=>{r({id:t.id,status:ve.Loaded})},o.onerror=()=>{n(new Error(`Failed to load CSS: ${t.url||t.localPath}`))},document.head.appendChild(o)})}async unload(t){const r=document.getElementById(t.id);r&&r.remove()}}class ko{async load(t){return new Promise((r,n)=>{const o=new Image;o.onload=()=>{r({id:t.id,status:ve.Loaded,data:o})},o.onerror=()=>{n(new Error(`Failed to load image: ${t.url||t.localPath}`))},o.src=t.url||t.localPath||""})}}class jo{async load(t){try{const r=await fetch(t.url||t.localPath||"");if(!r.ok)throw new Error(`HTTP ${r.status}: ${r.statusText}`);const n=await r.json();return{id:t.id,status:ve.Loaded,data:n}}catch{throw new Error(`Failed to load JSON: ${t.url||t.localPath}`)}}}function ms(e){const t=new ps(e);return t.registerLoader("js",new So),t.registerLoader("css",new Eo),t.registerLoader("image",new ko),t.registerLoader("json",new jo),t}function Ro(e){return new ps(e)}let er=null;function Co(e){return er||(er=ms(e)),er}class Io{config;manifest;adapter;constructor(t,r,n){this.config=t,this.manifest=r,this.adapter=n}async render(t){if(this.adapter.validate){const n=this.adapter.validate(this.config,this.manifest);if(!n.valid)throw new Error(`配置验证失败: ${n.errors?.join(", ")}`)}if(!this.adapter.supports(this.manifest.engine))throw new Error(`Adapter ${this.adapter.id} 不支持引擎 ${this.manifest.engine.runtime}`);const r=await this.adapter.createContext({config:this.config,manifest:this.manifest,container:t.container,resolvedComponents:t.resolvedComponents||[],loadedModules:t.loadedModules});this.adapter.prepare&&await this.adapter.prepare(r,this.config,this.manifest),await this.adapter.register(r,this.config,this.manifest),this.adapter.render(r,this.config,this.manifest)}}const No={version:"1.0.0",engine:{platform:"web",runtime:"vue3",version:"^3.4.0"},modules:{strategy:"hybrid",importMap:{imports:{vue:"./anov-dev-runtime/deps/vue.esm-browser.js","vue-router":"./anov-dev-runtime/deps/vue-router.esm-browser.js",pinia:"./anov-dev-runtime/deps/pinia.esm-browser.js","@arco-design/web-vue":"./anov-dev-runtime/deps/arco-vue.esm.js","lodash-es":"https://cdn.jsdelivr.net/npm/lodash-es@4/lodash.js",axios:"./anov-dev-runtime/deps/axios.js","@anov/core":"./anov-dev-runtime/deps/anov-core.js","@anov/charts":"./anov-dev-runtime/deps/anov-charts.js","deps/":"./anov-dev-runtime/deps/"},scopes:{"./components/":{vue:"./vendor/vue.js"}}},externals:[{id:"vue",provide:"import",version:"^3.0.0",required:!0},{id:"echarts",provide:"cdn",url:"https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js",version:"^5.0.0",required:!1}],fallback:{strategy:"global",mapping:{vue:"window.Vue"}},baseURL:"./",preload:["vue","vue-router","pinia"]},components:{strategy:"global",adapters:[{match:"*",kind:"component"},{match:"@arco-design/web-vue",kind:"plugin",required:!0,dependencies:["vue"]},{match:"echarts",kind:"global",globalName:"echarts"},{match:"@anov/charts",kind:"module",register:{method:"init",options:{theme:"dark",locale:"zh-CN"}},async:!0},{match:"@acme/hidden-component",kind:"component",instanceInit:{when:"mounted",method:"init"}}]},export:{excludeDeps:["vue","vue-router","pinia"],reason:"由宿主统一注入"},extensions:{}},Oo={version:"1.0.0",engine:{platform:"web",runtime:"vue3"},modules:{strategy:"importmap",importMap:{imports:{vue:"./deps/vue.esm-browser.js","vue-router":"./deps/vue-router.esm-browser.js"}}}},qo={version:"1.0.0",engine:{platform:"web",runtime:"react",version:"^18.0.0"},modules:{strategy:"importmap",importMap:{imports:{react:"./deps/react.production.min.js","react-dom":"./deps/react-dom.production.min.js","react-router-dom":"./deps/react-router-dom.min.js"}},externals:[{id:"react",provide:"global",global:"window.React",required:!0},{id:"react-dom",provide:"global",global:"window.ReactDOM",required:!0}]},components:{strategy:"local",adapters:[{match:"antd",kind:"module",register:{method:"default"}}]}},Do={version:"1.0.0",engine:{platform:"mini-program",runtime:"wechat",version:"2.0.0"},modules:{strategy:"global",externals:[{id:"wx",provide:"global",global:"wx",required:!0}]},components:{strategy:"local"},extensions:{wechat:{appId:"wx1234567890",pages:["pages/index/index","pages/detail/detail"],window:{navigationBarTitleText:"CIC 小程序"}}}};class cr extends ys{constructor(t){const r=Dt(t);if(!r.ok)throw new Error(`Invalid CIC Configuration: ${JSON.stringify(r.errors)}`);super(t)}static getValueByPath(t,r,n){if(t==null||!r)return n;const o=[];r.replace(/\[(\d+)\]/g,".$1").split(".").forEach(c=>{c.trim()&&o.push(c.trim())});let s=t;for(const c of o){if(s==null)return n;s=s[c]}return s===void 0?n:s}static traverseTree(t,r,n){const o=Array.isArray(t)?t:[t];for(const s of o)r(s,n)!==!1&&s.children&&s.children.length>0&&cr.traverseTree(s.children,r,s)}static createDataSource=xn;static validateDataSource=Yi;static createComponent=Zn;static validateComponent=Zi;static createPage=Xn;static validatePage=eo;static createMeta=es;static createLayout=ts;static validateMeta=to;static validateLayout=ro;static createVariables=rs;static validateVariables=no;static createDependency=ls;static validateDependency=so;static createRegistryComponent=fs;static validateRegistryComponent=io;static importCIC=go;static exportCIC=_o;static validateCIC=Dt;static importCICAsync=vo;static createDependencyLoader=ms;static createBareLoader=Ro;static getDependencyLoaderSingleton=Co;static Render=Io}exports.CICManifestExample=No;exports.CICManifestMiniProgram=Do;exports.CICManifestMinimal=Oo;exports.CICManifestReact=qo;exports.CICSDK=cr;
7
+ depsCount: ${_},
8
+ deps: ${$}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[_,$]=s(f);c(f,_),o(f,$)}};function s({schema:f}){const _={},$={};for(const E in f){if(E==="__proto__")continue;const m=Array.isArray(f[E])?_:$;m[E]=f[E]}return[_,$]}function c(f,_=f.schema){const{gen:$,data:E,it:m}=f;if(Object.keys(_).length===0)return;const v=$.let("missing");for(const b in _){const w=_[b];if(w.length===0)continue;const d=(0,n.propertyInData)($,E,b,m.opts.ownProperties);f.setParams({property:b,depsCount:w.length,deps:w.join(", ")}),m.allErrors?$.if(d,()=>{for(const p of w)(0,n.checkReportMissingProp)(f,p)}):($.if((0,t._)`${d} && (${(0,n.checkMissingProp)(f,w,v)})`),(0,n.reportMissingProp)(f,v),$.else())}}e.validatePropertyDeps=c;function o(f,_=f.schema){const{gen:$,data:E,keyword:m,it:v}=f,b=$.name("valid");for(const w in _)(0,r.alwaysValidSchema)(v,_[w])||($.if((0,n.propertyInData)($,E,w,v.opts.ownProperties),()=>{const d=f.subschema({keyword:m,schemaProp:w},b);f.mergeValidEvaluated(d,b)},()=>$.var(b,!0)),f.ok(b))}e.validateSchemaDeps=o,e.default=i})(Zt)),Zt}var ft={},dn;function ri(){if(dn)return ft;dn=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=x(),t=B(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:c,data:o,it:f}=i;if((0,t.alwaysValidSchema)(f,c))return;const _=s.name("valid");s.forIn("key",o,$=>{i.setParams({propertyName:$}),i.subschema({keyword:"propertyNames",data:$,dataTypes:["string"],propertyName:$,compositeRule:!0},_),s.if((0,e.not)(_),()=>{i.error(!0),f.allErrors||s.break()})}),i.ok(_)}};return ft.default=n,ft}var pt={},un;function Un(){if(un)return pt;un=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=ge(),t=x(),r=Pe(),n=B(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:o,schema:f,parentSchema:_,data:$,errsCount:E,it:m}=c;if(!E)throw new Error("ajv implementation error");const{allErrors:v,opts:b}=m;if(m.props=!0,b.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(m,f))return;const w=(0,e.allSchemaProperties)(_.properties),d=(0,e.allSchemaProperties)(_.patternProperties);p(),c.ok((0,t._)`${E} === ${r.default.errors}`);function p(){o.forIn("key",$,g=>{!w.length&&!d.length?y(g):o.if(a(g),()=>y(g))})}function a(g){let S;if(w.length>8){const C=(0,n.schemaRefOrVal)(m,_.properties,"properties");S=(0,e.isOwnProperty)(o,C,g)}else w.length?S=(0,t.or)(...w.map(C=>(0,t._)`${g} === ${C}`)):S=t.nil;return d.length&&(S=(0,t.or)(S,...d.map(C=>(0,t._)`${(0,e.usePattern)(c,C)}.test(${g})`))),(0,t.not)(S)}function l(g){o.code((0,t._)`delete ${$}[${g}]`)}function y(g){if(b.removeAdditional==="all"||b.removeAdditional&&f===!1){l(g);return}if(f===!1){c.setParams({additionalProperty:g}),c.error(),v||o.break();return}if(typeof f=="object"&&!(0,n.alwaysValidSchema)(m,f)){const S=o.name("valid");b.removeAdditional==="failing"?(u(g,S,!1),o.if((0,t.not)(S),()=>{c.reset(),l(g)})):(u(g,S),v||o.if((0,t.not)(S),()=>o.break()))}}function u(g,S,C){const T={keyword:"additionalProperties",dataProp:g,dataPropType:n.Type.Str};C===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(T,S)}}};return pt.default=s,pt}var mt={},ln;function ni(){if(ln)return mt;ln=1,Object.defineProperty(mt,"__esModule",{value:!0});const e=Vt(),t=ge(),r=B(),n=Un(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:c,schema:o,parentSchema:f,data:_,it:$}=s;$.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&n.default.code(new e.KeywordCxt($,n.default,"additionalProperties"));const E=(0,t.allSchemaProperties)(o);for(const d of E)$.definedProperties.add(d);$.opts.unevaluated&&E.length&&$.props!==!0&&($.props=r.mergeEvaluated.props(c,(0,r.toHash)(E),$.props));const m=E.filter(d=>!(0,r.alwaysValidSchema)($,o[d]));if(m.length===0)return;const v=c.name("valid");for(const d of m)b(d)?w(d):(c.if((0,t.propertyInData)(c,_,d,$.opts.ownProperties)),w(d),$.allErrors||c.else().var(v,!0),c.endIf()),s.it.definedProperties.add(d),s.ok(v);function b(d){return $.opts.useDefaults&&!$.compositeRule&&o[d].default!==void 0}function w(d){s.subschema({keyword:"properties",schemaProp:d,dataProp:d},v)}}};return mt.default=i,mt}var ht={},fn;function si(){if(fn)return ht;fn=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=ge(),t=x(),r=B(),n=B(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:c,schema:o,data:f,parentSchema:_,it:$}=s,{opts:E}=$,m=(0,e.allSchemaProperties)(o),v=m.filter(y=>(0,r.alwaysValidSchema)($,o[y]));if(m.length===0||v.length===m.length&&(!$.opts.unevaluated||$.props===!0))return;const b=E.strictSchema&&!E.allowMatchingProperties&&_.properties,w=c.name("valid");$.props!==!0&&!($.props instanceof t.Name)&&($.props=(0,n.evaluatedPropsToName)(c,$.props));const{props:d}=$;p();function p(){for(const y of m)b&&a(y),$.allErrors?l(y):(c.var(w,!0),l(y),c.if(w))}function a(y){for(const u in b)new RegExp(y).test(u)&&(0,r.checkStrictMode)($,`property ${u} matches pattern ${y} (use allowMatchingProperties)`)}function l(y){c.forIn("key",f,u=>{c.if((0,t._)`${(0,e.usePattern)(s,y)}.test(${u})`,()=>{const g=v.includes(y);g||s.subschema({keyword:"patternProperties",schemaProp:y,dataProp:u,dataPropType:n.Type.Str},w),$.opts.unevaluated&&d!==!0?c.assign((0,t._)`${d}[${u}]`,!0):!g&&!$.allErrors&&c.if((0,t.not)(w),()=>c.break())})})}}};return ht.default=i,ht}var yt={},pn;function ii(){if(pn)return yt;pn=1,Object.defineProperty(yt,"__esModule",{value:!0});const e=B(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:s}=r;if((0,e.alwaysValidSchema)(s,i)){r.fail();return}const c=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),r.failResult(c,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return yt.default=t,yt}var gt={},mn;function oi(){if(mn)return gt;mn=1,Object.defineProperty(gt,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ge().validateUnion,error:{message:"must match a schema in anyOf"}};return gt.default=t,gt}var vt={},hn;function ai(){if(hn)return vt;hn=1,Object.defineProperty(vt,"__esModule",{value:!0});const e=x(),t=B(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:c,parentSchema:o,it:f}=i;if(!Array.isArray(c))throw new Error("ajv implementation error");if(f.opts.discriminator&&o.discriminator)return;const _=c,$=s.let("valid",!1),E=s.let("passing",null),m=s.name("_valid");i.setParams({passing:E}),s.block(v),i.result($,()=>i.reset(),()=>i.error(!0));function v(){_.forEach((b,w)=>{let d;(0,t.alwaysValidSchema)(f,b)?s.var(m,!0):d=i.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},m),w>0&&s.if((0,e._)`${m} && ${$}`).assign($,!1).assign(E,(0,e._)`[${E}, ${w}]`).else(),s.if(m,()=>{s.assign($,!0),s.assign(E,w),d&&i.mergeEvaluated(d,e.Name)})})}}};return vt.default=n,vt}var _t={},yn;function ci(){if(yn)return _t;yn=1,Object.defineProperty(_t,"__esModule",{value:!0});const e=B(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:s}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const c=n.name("valid");i.forEach((o,f)=>{if((0,e.alwaysValidSchema)(s,o))return;const _=r.subschema({keyword:"allOf",schemaProp:f},c);r.ok(c),r.mergeEvaluated(_)})}};return _t.default=t,_t}var $t={},gn;function di(){if(gn)return $t;gn=1,Object.defineProperty($t,"__esModule",{value:!0});const e=x(),t=B(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:c,parentSchema:o,it:f}=s;o.then===void 0&&o.else===void 0&&(0,t.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const _=i(f,"then"),$=i(f,"else");if(!_&&!$)return;const E=c.let("valid",!0),m=c.name("_valid");if(v(),s.reset(),_&&$){const w=c.let("ifClause");s.setParams({ifClause:w}),c.if(m,b("then",w),b("else",w))}else _?c.if(m,b("then")):c.if((0,e.not)(m),b("else"));s.pass(E,()=>s.error(!0));function v(){const w=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);s.mergeEvaluated(w)}function b(w,d){return()=>{const p=s.subschema({keyword:w},m);c.assign(E,m),s.mergeValidEvaluated(p,E),d?c.assign(d,(0,e._)`${w}`):s.setParams({ifClause:w})}}}};function i(s,c){const o=s.schema[c];return o!==void 0&&!(0,t.alwaysValidSchema)(s,o)}return $t.default=n,$t}var bt={},vn;function ui(){if(vn)return bt;vn=1,Object.defineProperty(bt,"__esModule",{value:!0});const e=B(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return bt.default=t,bt}var _n;function li(){if(_n)return ct;_n=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=Ln(),t=Zs(),r=zn(),n=Xs(),i=ei(),s=ti(),c=ri(),o=Un(),f=ni(),_=si(),$=ii(),E=oi(),m=ai(),v=ci(),b=di(),w=ui();function d(p=!1){const a=[$.default,E.default,m.default,v.default,b.default,w.default,c.default,o.default,s.default,f.default,_.default];return p?a.push(t.default,n.default):a.push(e.default,r.default),a.push(i.default),a}return ct.default=d,ct}var wt={},St={},$n;function fi(){if($n)return St;$n=1,Object.defineProperty(St,"__esModule",{value:!0});const e=x(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:s,data:c,$data:o,schema:f,schemaCode:_,it:$}=n,{opts:E,errSchemaPath:m,schemaEnv:v,self:b}=$;if(!E.validateFormats)return;o?w():d();function w(){const p=s.scopeValue("formats",{ref:b.formats,code:E.code.formats}),a=s.const("fDef",(0,e._)`${p}[${_}]`),l=s.let("fType"),y=s.let("format");s.if((0,e._)`typeof ${a} == "object" && !(${a} instanceof RegExp)`,()=>s.assign(l,(0,e._)`${a}.type || "string"`).assign(y,(0,e._)`${a}.validate`),()=>s.assign(l,(0,e._)`"string"`).assign(y,a)),n.fail$data((0,e.or)(u(),g()));function u(){return E.strictSchema===!1?e.nil:(0,e._)`${_} && !${y}`}function g(){const S=v.$async?(0,e._)`(${a}.async ? await ${y}(${c}) : ${y}(${c}))`:(0,e._)`${y}(${c})`,C=(0,e._)`(typeof ${y} == "function" ? ${S} : ${y}.test(${c}))`;return(0,e._)`${y} && ${y} !== true && ${l} === ${i} && !${C}`}}function d(){const p=b.formats[f];if(!p){u();return}if(p===!0)return;const[a,l,y]=g(p);a===i&&n.pass(S());function u(){if(E.strictSchema===!1){b.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${f}" ignored in schema at path "${m}"`}}function g(C){const T=C instanceof RegExp?(0,e.regexpCode)(C):E.code.formats?(0,e._)`${E.code.formats}${(0,e.getProperty)(f)}`:void 0,L=s.scopeValue("formats",{key:f,ref:C,code:T});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,e._)`${L}.validate`]:["string",C,L]}function S(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${y}(${c})`}return typeof l=="function"?(0,e._)`${y}(${c})`:(0,e._)`${y}.test(${c})`}}}};return St.default=r,St}var bn;function pi(){if(bn)return wt;bn=1,Object.defineProperty(wt,"__esModule",{value:!0});const t=[fi().default];return wt.default=t,wt}var je={},wn;function mi(){return wn||(wn=1,Object.defineProperty(je,"__esModule",{value:!0}),je.contentVocabulary=je.metadataVocabulary=void 0,je.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],je.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),je}var Sn;function hi(){if(Sn)return xe;Sn=1,Object.defineProperty(xe,"__esModule",{value:!0});const e=Ls(),t=Qs(),r=li(),n=pi(),i=mi(),s=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return xe.default=s,xe}var Pt={},Te={},Pn;function yi(){if(Pn)return Te;Pn=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Te.DiscrError=e={})),Te}var En;function gi(){if(En)return Pt;En=1,Object.defineProperty(Pt,"__esModule",{value:!0});const e=x(),t=yi(),r=ir(),n=Lt(),i=B(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:o,tagName:f}})=>o===t.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:o,tag:f,tagName:_}})=>(0,e._)`{error: ${o}, tag: ${_}, tagValue: ${f}}`},code(o){const{gen:f,data:_,schema:$,parentSchema:E,it:m}=o,{oneOf:v}=E;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=$.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if($.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const w=f.let("valid",!1),d=f.const("tag",(0,e._)`${_}${(0,e.getProperty)(b)}`);f.if((0,e._)`typeof ${d} == "string"`,()=>p(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:d,tagName:b})),o.ok(w);function p(){const y=l();f.if(!1);for(const u in y)f.elseIf((0,e._)`${d} === ${u}`),f.assign(w,a(y[u]));f.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:d,tagName:b}),f.endIf()}function a(y){const u=f.name("valid"),g=o.subschema({keyword:"oneOf",schemaProp:y},u);return o.mergeEvaluated(g,e.Name),u}function l(){var y;const u={},g=C(E);let S=!0;for(let O=0;O<v.length;O++){let V=v[O];if(V?.$ref&&!(0,i.schemaHasRulesButRef)(V,m.self.RULES)){const U=V.$ref;if(V=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,U),V instanceof r.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(m.opts.uriResolver,m.baseId,U)}const z=(y=V?.properties)===null||y===void 0?void 0:y[b];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);S=S&&(g||C(V)),T(z,O)}if(!S)throw new Error(`discriminator: "${b}" must be required`);return u;function C({required:O}){return Array.isArray(O)&&O.includes(b)}function T(O,V){if(O.const)L(O.const,V);else if(O.enum)for(const z of O.enum)L(z,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function L(O,V){if(typeof O!="string"||O in u)throw new Error(`discriminator: "${b}" values must be unique strings`);u[O]=V}}}};return Pt.default=c,Pt}const vi="http://json-schema.org/draft-07/schema#",_i="http://json-schema.org/draft-07/schema#",$i="Core schema meta-schema",bi={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:[]}},wi=["object","boolean"],Si={$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:"#"}},Pi={$schema:vi,$id:_i,title:$i,definitions:bi,type:wi,properties:Si,default:!0};var kn;function Fn(){return kn||(kn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Ms(),n=hi(),i=gi(),s=Pi,c=["/properties"],o="http://json-schema.org/draft-07/schema";class f extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(s,c):s;this.addMetaSchema(b,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv=f,e.exports=t=f,e.exports.Ajv=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var _=Vt();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var $=x();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return $._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return $.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return $.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return $.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return $.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return $.CodeGen}});var E=sr();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return E.default}});var m=Lt();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Ue,Ue.exports)),Ue.exports}var Ei=Fn();const ki=qn(Ei);var Et={exports:{}},Xt={},jn;function ji(){return jn||(jn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(O,V){return{validate:O,compare:V}}e.fullFormats={date:t(s,c),time:t(f(!0),_),"date-time":t(m(!0),v),"iso-time":t(f(),$),"iso-date-time":t(m(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:L,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:l,int32:{type:"number",validate:g},int64:{type:"number",validate:S},float:{type:"number",validate:C},double:{type:"number",validate:C},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,_),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,$),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(O){return O%4===0&&(O%100!==0||O%400===0)}const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(O){const V=n.exec(O);if(!V)return!1;const z=+V[1],U=+V[2],Q=+V[3];return U>=1&&U<=12&&Q>=1&&Q<=(U===2&&r(z)?29:i[U])}function c(O,V){if(O&&V)return O>V?1:O<V?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function f(O){return function(z){const U=o.exec(z);if(!U)return!1;const Q=+U[1],ie=+U[2],oe=+U[3],X=U[4],pe=U[5]==="-"?-1:1,M=+(U[6]||0),j=+(U[7]||0);if(M>23||j>59||O&&!X)return!1;if(Q<=23&&ie<=59&&oe<60)return!0;const q=ie-j*pe,N=Q-M*pe-(q<0?1:0);return(N===23||N===-1)&&(q===59||q===-1)&&oe<61}}function _(O,V){if(!(O&&V))return;const z=new Date("2020-01-01T"+O).valueOf(),U=new Date("2020-01-01T"+V).valueOf();if(z&&U)return z-U}function $(O,V){if(!(O&&V))return;const z=o.exec(O),U=o.exec(V);if(z&&U)return O=z[1]+z[2]+z[3],V=U[1]+U[2]+U[3],O>V?1:O<V?-1:0}const E=/t|\s/i;function m(O){const V=f(O);return function(U){const Q=U.split(E);return Q.length===2&&s(Q[0])&&V(Q[1])}}function v(O,V){if(!(O&&V))return;const z=new Date(O).valueOf(),U=new Date(V).valueOf();if(z&&U)return z-U}function b(O,V){if(!(O&&V))return;const[z,U]=O.split(E),[Q,ie]=V.split(E),oe=c(z,Q);if(oe!==void 0)return oe||_(U,ie)}const w=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p(O){return w.test(O)&&d.test(O)}const a=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function l(O){return a.lastIndex=0,a.test(O)}const y=-2147483648,u=2**31-1;function g(O){return Number.isInteger(O)&&O<=u&&O>=y}function S(O){return Number.isInteger(O)}function C(){return!0}const T=/[^\\]\\Z/;function L(O){if(T.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}})(Xt)),Xt}var er={},Rn;function Ri(){return Rn||(Rn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Fn(),r=x(),n=r.operators,i={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},s={message:({keyword:o,schemaCode:f})=>(0,r.str)`should be ${i[o].okStr} ${f}`,params:({keyword:o,schemaCode:f})=>(0,r._)`{comparison: ${i[o].okStr}, limit: ${f}}`};e.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(o){const{gen:f,data:_,schemaCode:$,keyword:E,it:m}=o,{opts:v,self:b}=m;if(!v.validateFormats)return;const w=new t.KeywordCxt(m,b.RULES.all.format.definition,"format");w.$data?d():p();function d(){const l=f.scopeValue("formats",{ref:b.formats,code:v.code.formats}),y=f.const("fmt",(0,r._)`${l}[${w.schemaCode}]`);o.fail$data((0,r.or)((0,r._)`typeof ${y} != "object"`,(0,r._)`${y} instanceof RegExp`,(0,r._)`typeof ${y}.compare != "function"`,a(y)))}function p(){const l=w.schema,y=b.formats[l];if(!y||y===!0)return;if(typeof y!="object"||y instanceof RegExp||typeof y.compare!="function")throw new Error(`"${E}": format "${l}" does not define "compare" function`);const u=f.scopeValue("formats",{key:l,ref:y,code:v.code.formats?(0,r._)`${v.code.formats}${(0,r.getProperty)(l)}`:void 0});o.fail$data(a(u))}function a(l){return(0,r._)`${l}.compare(${_}, ${$}) ${i[E].fail} 0`}},dependencies:["format"]};const c=o=>(o.addKeyword(e.formatLimitDefinition),o);e.default=c})(er)),er}var Nn;function Ni(){return Nn||(Nn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=ji(),n=Ri(),i=x(),s=new i.Name("fullFormats"),c=new i.Name("fastFormats"),o=(_,$={keywords:!0})=>{if(Array.isArray($))return f(_,$,r.fullFormats,s),_;const[E,m]=$.mode==="fast"?[r.fastFormats,c]:[r.fullFormats,s],v=$.formats||r.formatNames;return f(_,v,E,m),$.keywords&&(0,n.default)(_),_};o.get=(_,$="full")=>{const m=($==="fast"?r.fastFormats:r.fullFormats)[_];if(!m)throw new Error(`Unknown format "${_}"`);return m};function f(_,$,E,m){var v,b;(v=(b=_.opts.code).formats)!==null&&v!==void 0||(b.formats=(0,i._)`require("ajv-formats/dist/formats").${m}`);for(const w of $)_.addFormat(w,E[w])}e.exports=t=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o})(Et,Et.exports)),Et.exports}var Ci=Ni();const Ii=qn(Ci),Oi="http://json-schema.org/draft-07/schema#",Di="#/definitions/CICConfig",qi=JSON.parse('{"CICConfig":{"type":"object","properties":{"version":{"type":"string"},"meta":{"$ref":"#/definitions/Meta"},"pages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"},"layout":{"$ref":"#/definitions/Layout"},"components":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}},"dataSources":{"type":"array","items":{"$ref":"#/definitions/DataSourceItem"}},"extensions":{"type":"object"}},"required":["id","path"],"additionalProperties":false,"description":"CIC 页面定义 说明:定义了 CIC 中页面的结构,包含页面 ID、名称、路径、布局、组件等。"}},"registry":{"$ref":"#/definitions/Registry"},"variables":{"$ref":"#/definitions/Variables"},"deps":{"type":"array","items":{"$ref":"#/definitions/Dependency"}},"extensions":{"type":"object"}},"required":["version","meta","pages"],"additionalProperties":false,"description":"CIC 配置定义 说明:定义了 CIC 项目的全局配置,包含版本、元数据、页面、组件、变量、依赖等。"},"Meta":{"type":"object","properties":{"projectId":{"type":"string","description":"项目唯一标识符"},"projectName":{"type":"string","description":"项目名称"},"description":{"type":"string","description":"项目描述"},"layout":{"$ref":"#/definitions/Layout","description":"布局配置"},"language":{"type":"string","description":"语言代码 (e.g. zh-CN, en-US)"},"createTime":{"type":"string","description":"创建时间 (ISO 8601)","format":"date-time"},"updateTime":{"type":"string","description":"更新时间 (ISO 8601)","format":"date-time"},"author":{"type":"string","description":"作者"},"extensions":{"type":"object","description":"扩展字段"}},"additionalProperties":false,"description":"项目元信息 包含项目的基本信息、布局配置、语言、创建时间、更新时间、作者和扩展信息。"},"Layout":{"type":"object","properties":{"type":{"type":"string","enum":["free","grid"],"description":"布局类型: free(自由布局) 或 grid(网格布局)"},"config":{"type":"object","properties":{"width":{"type":"number","description":"设计稿宽度","minimum":1,"default":1920},"height":{"type":"number","description":"设计稿高度","minimum":1,"default":1080},"scaleMode":{"type":"string","enum":["aspectFit","fill"],"description":"缩放模式","default":"aspectFit"}},"required":["width","height","scaleMode"],"additionalProperties":false}},"required":["type","config"],"additionalProperties":false,"description":"布局配置"},"ComponentInstance":{"anyOf":[{"$ref":"#/definitions/ViewComponentInstance"},{"$ref":"#/definitions/ContainerComponentInstance"},{"$ref":"#/definitions/LogicComponentInstanceRef"}],"description":"组件实例(view/container/logic 类型)"},"ViewComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"view"},"component":{"$ref":"#/definitions/ComponentRef"}},"required":["component","id","role"],"additionalProperties":false},"StyleValue":{"description":"样式值"},"CICEventMap":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/CICEventWithMeta"}},"description":"某组件的所有事件 说明:定义了 CIC 项目中组件的所有事件,包含事件类型、动作、参数、调度顺序、延迟时间和条件。 (key: 事件名, value: 处理逻辑数组)"},"CICEventWithMeta":{"anyOf":[{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"vars"},"action":{"$ref":"#/definitions/VarsAction"},"params":{"$ref":"#/definitions/VarsParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"internal"},"params":{"$ref":"#/definitions/NavigateInternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"navigate"},"action":{"type":"string","const":"external"},"params":{"$ref":"#/definitions/NavigateExternalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"comp"},"action":{"$ref":"#/definitions/CompAction"},"params":{"$ref":"#/definitions/CompParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"toggle"},"action":{"type":"string","const":"visibility"},"params":{"$ref":"#/definitions/ToggleParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"camera"},"action":{"type":"string","const":"focus"},"params":{"$ref":"#/definitions/CameraFocusParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"material"},"action":{"type":"string","const":"change"},"params":{"$ref":"#/definitions/MaterialChangeParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"local"},"params":{"$ref":"#/definitions/CustomLocalParams"}},"required":["action","order","params","type"]},{"type":"object","additionalProperties":false,"properties":{"order":{"type":"number"},"delay":{"type":"number"},"condition":{"$ref":"#/definitions/EventCondition"},"type":{"type":"string","const":"custom"},"action":{"type":"string","const":"remote"},"params":{"$ref":"#/definitions/CustomRemoteParams"}},"required":["action","order","params","type"]}],"description":"带调度信息"},"EventCondition":{"anyOf":[{"$ref":"#/definitions/KeyCondition"},{"type":"array","items":{"$ref":"#/definitions/KeyCondition"}},{"$ref":"#/definitions/ExpressionCondition"}],"description":"多条件(AND) + 表达式"},"KeyCondition":{"type":"object","properties":{"key":{"type":"string"},"op":{"$ref":"#/definitions/ConditionOperator"},"value":{}},"required":["key"],"additionalProperties":false},"ConditionOperator":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","not-in","exists","not-exists"]},"ExpressionCondition":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"],"additionalProperties":false,"description":"表达式条件:支持如 \\"ctx.id === 5 && ctx.level > 1\\""},"VarsAction":{"type":"string","enum":["add","update","delete"],"description":"变量事件动作"},"VarsParams":{"type":"object","properties":{"key":{"type":"string"},"value":{},"exclude":{"type":"array","items":{"type":"string"}}},"required":["key","value"],"additionalProperties":false},"NavigateInternalParams":{"type":"object","properties":{"name":{"type":"string"},"params":{"type":"object"}},"required":["name"],"additionalProperties":false},"NavigateExternalParams":{"type":"object","properties":{"url":{"type":"string"},"openNewTab":{"type":"boolean"}},"required":["url"],"additionalProperties":false},"CompAction":{"type":"string","enum":["add","update","delete"],"description":"组件事件动作"},"CompParams":{"type":"object","properties":{"comps":{"type":"array","items":{"type":"string"}},"props":{"type":"object"}},"required":["comps"],"additionalProperties":false},"ToggleParams":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"CameraFocusParams":{"type":"object","properties":{"target":{"type":["string","number"]},"duration":{"type":"number"}},"required":["target"],"additionalProperties":false},"MaterialChangeParams":{"type":"object","properties":{"target":{"type":"string"},"materials":{"type":"string"}},"required":["target","materials"],"additionalProperties":false},"CustomLocalParams":{"type":"object","properties":{"code":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["code"],"additionalProperties":false},"CustomRemoteParams":{"type":"object","properties":{"url":{"type":"string"},"depends":{"type":"array","items":{"type":"string"}}},"required":["url"],"additionalProperties":false},"Data":{"type":"object","properties":{"id":{"type":"string","description":"数据ID"},"mapping":{"$ref":"#/definitions/IMapping","description":"字段映射配置"},"converse":{"$ref":"#/definitions/IConverse","description":"转换规则配置"}},"required":["id"],"additionalProperties":false,"description":"数据配置"},"IMapping":{"type":"object","properties":{"use":{"type":"boolean"},"mapFields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"源字段名"},"mapField":{"type":"string","description":"目标字段名"},"value":{"description":"映射值或公式"},"type":{"type":"string","enum":["copy","const","formula"],"description":"映射类型:默认(普通映射)、copy(复制) const(常量)、formula(公式)"},"description":{"type":"string","description":"描述"}},"required":["field","mapField"],"additionalProperties":false}}},"required":["use","mapFields"],"additionalProperties":false,"description":"字段映射配置"},"IConverse":{"type":"object","properties":{"use":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string","description":"转换代码"},"depeedVars":{"type":"array","items":{"type":"string"},"description":"依赖变量列表(用于响应式重执行)"}},"required":["code"],"additionalProperties":false}}},"required":["use","data"],"additionalProperties":false,"description":"转换规则配置"},"ComponentRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","const":"id"},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false}],"description":"component 引用:字符串或 object 描述"},"ContainerComponentInstance":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"container"},"children":{"type":"array","items":{"$ref":"#/definitions/ComponentInstance"}}},"required":["children","id","role"],"additionalProperties":false},"LogicComponentInstanceRef":{"type":"object","properties":{"id":{"type":"string"},"props":{"type":"object"},"style":{"type":"object","additionalProperties":{"$ref":"#/definitions/StyleValue"}},"events":{"$ref":"#/definitions/CICEventMap"},"data":{"$ref":"#/definitions/Data"},"deps":{"type":"array","items":{"type":"string"}},"extensions":{"type":"object"},"role":{"type":"string","const":"logic"},"component":{"$ref":"#/definitions/LogicRef"}},"required":["component","id","role"],"additionalProperties":false},"LogicRef":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string","enum":["url","code"]},"value":{"type":"string"},"format":{"$ref":"#/definitions/JSFormat"}},"required":["type","value"],"additionalProperties":false}]},"JSFormat":{"type":"string","enum":["esm","umd","iife","cjs"],"description":"JS 格式"},"DataSourceItem":{"anyOf":[{"$ref":"#/definitions/DataSourceRest"},{"$ref":"#/definitions/DataSourceWebSocket"},{"$ref":"#/definitions/DataSourceStatic"},{"$ref":"#/definitions/DataSourceFunction"}],"description":"数据源项(rest/websocket/static/function 类型)"},"DataSourceRest":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"rest"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"extensions":{"type":"object"},"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"params":{"type":"object"},"body":{},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["id","method","type","url"],"additionalProperties":false},"Milliseconds":{"type":"number"},"DataSourceWebSocket":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"websocket"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"extensions":{"type":"object"},"url":{"type":"string"},"protocols":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subscribeMessage":{},"heartbeat":{"type":"object","properties":{"interval":{"$ref":"#/definitions/Milliseconds"},"message":{}},"required":["interval","message"],"additionalProperties":false}},"required":["id","type","url"],"additionalProperties":false},"DataSourceStatic":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"static"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"extensions":{"type":"object"},"value":{}},"required":["id","type","value"],"additionalProperties":false},"DataSourceFunction":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"order":{"type":"number"},"pollInterval":{"$ref":"#/definitions/Milliseconds"},"transform":{"anyOf":[{"type":"string"},{"$comment":"(res: any) => any","type":"object","properties":{"namedArgs":{"type":"object","properties":{"res":{}},"required":["res"],"additionalProperties":false}}}]},"extensions":{"type":"object"},"code":{"type":"string"},"timeout":{"$ref":"#/definitions/Milliseconds"}},"required":["code","id","type"],"additionalProperties":false},"Registry":{"type":"object","properties":{"components":{"type":"array","items":{"$ref":"#/definitions/RegistryComponents"}},"plugins":{"type":"object","description":"插件后期可扩展"}},"additionalProperties":false,"description":"注册表"},"RegistryComponents":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"author":{"type":"string"},"defaultProps":{"type":"object"},"data":{},"deps":{"type":"array","items":{"type":"string"}}},"required":["id"],"additionalProperties":false,"description":"注册中心组件项 说明:定义了 CIC 项目中组件注册中心的组件项,包含组件 ID、类型和配置。"},"Variables":{"type":"object","properties":{"global":{"$ref":"#/definitions/VariablesMap","description":"全局变量,对所有页面和组件均生效。"},"page":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"页面级变量,键为页面 ID,值为该页面的变量映射。"},"component":{"type":"object","additionalProperties":{"$ref":"#/definitions/VariablesMap"},"description":"组件级变量,键为组件 ID,值为该组件的变量映射。"}},"additionalProperties":false,"description":"变量集合,按作用域组织:global/page/component。"},"VariablesMap":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"},"description":"变量映射,键为变量名,值为变量定义。"},"Variable":{"anyOf":[{"$ref":"#/definitions/StringVariable"},{"$ref":"#/definitions/NumberVariable"},{"$ref":"#/definitions/BooleanVariable"},{"$ref":"#/definitions/ArrayVariable"},{"$ref":"#/definitions/FunctionVariable"},{"$ref":"#/definitions/ObjectVariable"}],"description":"变量联合类型,涵盖五类变量定义。"},"StringVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"string"},"value":{"type":"string"},"default":{"type":"string"}},"required":["type","value","default"],"additionalProperties":false,"description":"字符串变量,包含当前值与默认值,可选描述。"},"NumberVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"number"},"value":{"type":"number"},"default":{"type":"number"}},"required":["type","value","default"],"additionalProperties":false,"description":"数字变量,包含当前值与默认值,可选描述。"},"BooleanVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"boolean"},"value":{"type":"boolean"},"default":{"type":"boolean"}},"required":["type","value","default"],"additionalProperties":false,"description":"布尔变量,包含当前值与默认值,可选描述。"},"ArrayVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"array"},"value":{"type":"array","items":{}},"default":{"type":"array","items":{}}},"required":["type","value","default"],"additionalProperties":false,"description":"数组变量,元素类型不做限制,包含当前值与默认值,可选描述。"},"FunctionVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"function"},"value":{"type":"string"},"default":{"type":"string"},"args":{"type":"array","items":{"type":"string"}}},"required":["type","value","default"],"additionalProperties":false,"description":"函数变量,以字符串保存函数实现;支持 `args` 指定入参名列表。"},"ObjectVariable":{"type":"object","properties":{"description":{"type":"string"},"extensions":{"type":"object","additionalProperties":{}},"type":{"type":"string","const":"object"},"value":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}},"default":{"type":"object","additionalProperties":{"$ref":"#/definitions/Variable"}}},"required":["type","value","default"],"additionalProperties":false,"description":"对象变量,键到变量的映射;支持递归嵌套。"},"Dependency":{"anyOf":[{"$ref":"#/definitions/JSDependency"},{"$ref":"#/definitions/CSSDependency"},{"$ref":"#/definitions/FontDependency"},{"$ref":"#/definitions/ImageDependency"},{"$ref":"#/definitions/JSONDependency"},{"$ref":"#/definitions/WasmDependency"},{"$ref":"#/definitions/OtherDependency"}],"description":"依赖项"},"JSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"js"},"format":{"$ref":"#/definitions/JSFormat"},"crossOrigin":{"type":"string","enum":["anonymous","use-credentials"]},"module":{"type":"boolean"}},"required":["format","id","type"],"additionalProperties":false,"description":"JS 资源"},"CSSDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"css"},"media":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"CSS"},"FontDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"font"},"family":{"type":"string"},"weight":{"type":["number","string"]},"style":{"type":"string","enum":["normal","italic"]}},"required":["id","type"],"additionalProperties":false,"description":"字体"},"ImageDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"image"},"mime":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"图片"},"JSONDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"json"}},"required":["id","type"],"additionalProperties":false,"description":"JSON"},"WasmDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"wasm"},"init":{"type":"string","enum":["async","sync"]}},"required":["id","type"],"additionalProperties":false,"description":"WASM"},"OtherDependency":{"type":"object","properties":{"id":{"type":"string","description":"全局唯一 ID,用于运行时索引"},"name":{"type":"string","description":"可选:人类可读名称(展示用)"},"version":{"type":"string","description":"版本号(语义化版本 / 字体权重皆可)"},"url":{"type":"string","description":"资源 URL,服务器或CDN地址"},"localPath":{"type":"string","description":"本地路径(构建后使用)"},"group":{"type":"string","description":"分组:方便批量加载"},"strategy":{"type":"object","properties":{"preload":{"type":"boolean","description":"预加载/预取"},"prefetch":{"type":"boolean"},"async":{"type":"boolean","description":"是否异步加载"},"when":{"type":"string","description":"仅在某些条件下加载(如主题)"}},"additionalProperties":false,"description":"加载策略"},"extensions":{"type":"object"},"type":{"type":"string","const":"other"},"kind":{"type":"string"}},"required":["id","type"],"additionalProperties":false,"description":"其他"}}'),Le={$schema:Oi,$ref:Di,definitions:qi},ue={REQUIRED:"required",TYPE:"type",ENUM:"enum",CONST:"const",ADDITIONAL:"additionalProperties",ANY_OF:"anyOf"},ze={TYPE:"/type",VALUE:"/value",DEFAULT:"/default",ARGS:"/args"},Re={missing:e=>`缺少必填字段:${e}`,type:e=>`类型必须为:${e}`,enum:e=>`取值必须为枚举之一:${e.join(", ")}`,const:e=>`取值必须为:${JSON.stringify(e)}`,additionalProp:e=>`不允许额外字段:${e}`,constDefault:"必须等于常量"},Ti=[{rootPattern:/(\/|^)components\/\d+/,discriminator:"role",keepRequired:["role","id"]},{rootPattern:/(\/|^)global\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)page\/[^\/]+\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)component\/[^\/]+\/[^\/]+$/,discriminator:"type",keepRequired:["type"]},{rootPattern:/(\/|^)dataSources\/\d+/,discriminator:"type",keepRequired:["type","id"]}];function Mi(e){const t=e.instancePath||e.path||"",r=e.keyword,n=e.params||{};let i=e.message||"";switch(r){case ue.REQUIRED:n.missingProperty&&(i=Re.missing(n.missingProperty));break;case ue.TYPE:e.schema&&(i=Re.type(e.schema));break;case ue.ENUM:Array.isArray(n.allowedValues)&&(i=Re.enum(n.allowedValues));break;case ue.CONST:i=n.allowedValue!==void 0?Re.const(n.allowedValue):Re.constDefault;break;case ue.ADDITIONAL:n.additionalProperty&&(i=Re.additionalProp(n.additionalProperty));break}return{path:t,message:i,keyword:r,params:n}}function Ai(e){return e.map(Mi)}function Vi(e){const t=[],r=new Map,n=new Set;for(const i of e)if(i.keyword===ue.CONST&&i.path.endsWith(ze.TYPE)){const c=i.path,o=r.get(c)||{path:i.path,values:[]},f=i.params?.allowedValue;f!==void 0&&!o.values.includes(f)&&o.values.push(f),r.set(c,o)}else t.push(i);for(const[,i]of r)if(i.values.length!==0)if(i.values.length===1)t.push({path:i.path,keyword:ue.CONST,params:{allowedValue:i.values[0]},message:Re.const(i.values[0])});else{const s=i.path.replace(new RegExp(`${ze.TYPE}$`),"");n.add(s)}return{merged:t,multiConstRoots:n}}function Li(e){return`${e.keyword}|${e.path}|${JSON.stringify(e.params??{})}`}function zi(e){const t=new Set,r=[];for(const n of e){const i=Li(n);t.has(i)||(t.add(i),r.push(n))}return r}function Ui(e){if(!e)return"";const t=Object.values(ze).join("|"),r=new RegExp(`^(.*?)(?:${t})(?:$|\\/)`),n=e.match(r);return n?n[1]:e}function Fi(e){const t=new Map;for(const r of e){const n=Ui(r.path),i=t.get(n)||[];i.push(r),t.set(n,i)}return t}function Ki(e,t){return e.keyword===ue.REQUIRED&&t.keepRequired.includes(e.params?.missingProperty)}function Ji(e,t){const r=e.keyword===ue.TYPE,n=e.path===`${t}${ze.VALUE}`||e.path===`${t}${ze.DEFAULT}`;return r&&n}function Hi(e,t){return e.keyword===ue.ADDITIONAL&&e.path===t}function xi(e,t){const r=[];for(const[n,i]of e.entries()){const s=Ti.find(o=>o.rootPattern.test(n));if(s&&i.some(f=>f.keyword===ue.REQUIRED&&f.params?.missingProperty===s.discriminator)){for(const f of i)Ki(f,s)&&r.push(f);continue}if(!t.has(n)){r.push(...i);continue}for(const o of i)Ji(o,n)||Hi(o,n)||r.push(o)}return r}function Wi(e){return e.some(r=>r.keyword!==ue.ANY_OF)?e.filter(r=>r.keyword!==ue.ANY_OF):e}function Cn(e){if(e.keyword===ue.REQUIRED){const t=e.params?.missingProperty;return t==="type"||t==="role"?0:t==="id"?1:2}return 3}function Gi(e){return e.sort((t,r)=>Cn(t)-Cn(r))}function ee(e){if(!Array.isArray(e)||e.length===0)return[];const t=Ai(e),{merged:r,multiConstRoots:n}=Vi(t),i=zi(r),s=Fi(i),c=xi(s,n),o=Wi(c);return Gi(o)}function Se(e,t){return t?.length?t.map(r=>({...r,path:`${e}${r.path?`.${r.path}`:""}`})):[]}let kt=null;const Kn=()=>(kt||(kt=new ki({allErrors:!0,strict:!1}),Ii(kt)),kt),In=new Map,Bi=JSON.stringify(Le),Yi={CICPage:["#/definitions/CICPage","#/$defs/CICPage","#/properties/pages/items","#/definitions/CICConfig/properties/pages/items"],Meta:["#/definitions/Meta","#/$defs/Meta","#/properties/meta"],Layout:["#/definitions/Layout","#/$defs/Layout","#/properties/meta/properties/layout"],ComponentInstance:["#/definitions/ComponentInstance","#/$defs/ComponentInstance"],ViewComponentInstance:["#/definitions/ViewComponentInstance","#/$defs/ViewComponentInstance"],ContainerComponentInstance:["#/definitions/ContainerComponentInstance","#/$defs/ContainerComponentInstance"],LogicComponentInstanceRef:["#/definitions/LogicComponentInstanceRef","#/$defs/LogicComponentInstanceRef"],DataSourceItem:["#/definitions/DataSourceItem","#/$defs/DataSourceItem"],DataSourceRest:["#/definitions/DataSourceRest","#/$defs/DataSourceRest"],DataSourceWebSocket:["#/definitions/DataSourceWebSocket","#/$defs/DataSourceWebSocket"],DataSourceStatic:["#/definitions/DataSourceStatic","#/$defs/DataSourceStatic"],DataSourceFunction:["#/definitions/DataSourceFunction","#/$defs/DataSourceFunction"],RegistryComponents:["#/definitions/RegistryComponents","#/$defs/RegistryComponents"],Variables:["#/definitions/Variables","#/$defs/Variables","#/properties/variables"],Dependency:["#/definitions/Dependency","#/$defs/Dependency"],JSDependency:["#/definitions/JSDependency","#/$defs/JSDependency"],CSSDependency:["#/definitions/CSSDependency","#/$defs/CSSDependency"],FontDependency:["#/definitions/FontDependency","#/$defs/FontDependency"],ImageDependency:["#/definitions/ImageDependency","#/$defs/ImageDependency"],JSONDependency:["#/definitions/JSONDependency","#/$defs/JSONDependency"],WasmDependency:["#/definitions/WasmDependency","#/$defs/WasmDependency"],OtherDependency:["#/definitions/OtherDependency","#/$defs/OtherDependency"],LayoutConfig:["#/definitions/Layout","#/properties/meta/properties/layout"]},Qi=(e,t)=>e.compile({$ref:t,definitions:Le.definitions,properties:Le.properties}),te=e=>{const t=Kn(),r=`type:${e}::${Bi}`,n=In.get(r);if(n)return n;const i=Yi[e]||[`#/definitions/${e}`,`#/$defs/${e}`];for(const s of i)try{const c=Qi(t,s);return In.set(r,c),c}catch{}throw new Error(`VALIDATOR_REF_NOT_FOUND:${e}`)},Me=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,ar=()=>{const e=globalThis;if(e?.crypto?.randomUUID)return e.crypto.randomUUID();if(e?.crypto?.getRandomValues){const t=new Uint8Array(16);e.crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;const r=Array.from(t,n=>n.toString(16).padStart(2,"0"));return`${r.slice(0,4).join("")}-${r.slice(4,6).join("")}-${r.slice(6,8).join("")}-${r.slice(8,10).join("")}-${r.slice(10).join("")}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=Math.random()*16|0;return(t==="x"?r:r&3|8).toString(16)})},ye=(e,t)=>{if(!t||typeof t!="object")return e;const r=e??{};for(const n of Object.keys(t))(!(n in r)||r[n]===void 0)&&(r[n]=t[n]);return r},nr=e=>{try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,errors:[{path:"",keyword:"type",message:`JSON 解析失败:${t?.message??String(t)}`}]}}},Zi=e=>e.map(t=>({path:"",keyword:"required",params:{missingProperty:t},message:`缺少必填字段:${t}`})),Jn=({input:e,normalize:t,base:r,branches:n,key:i,missingKeys:s,onSuccess:c})=>{const o=t?t(e):e,f=o;if(f&&typeof f=="object"&&typeof f[i]=="string"){const _=n[f[i]];if(_)return _(f)?c(f):{ok:!1,errors:ee(_.errors)}}return r(o)?c(o):!f||typeof f[i]!="string"?{ok:!1,errors:Zi(s)}:{ok:!1,errors:ee(r.errors)}},cr=(e,t,r,n)=>Jn({input:e,base:t,branches:r,key:n,missingKeys:[n,"id"],onSuccess:()=>({ok:!0,value:null})}),dr=(e,t,r,n,i,s,c=[s,"id"])=>Jn({input:e,normalize:o=>r(o,t),base:n,branches:i,key:s,missingKeys:c,onSuccess:o=>({ok:!0,value:o})}),Hn=te("DataSourceItem"),xn=te("DataSourceRest"),Wn=te("DataSourceWebSocket"),Gn=te("DataSourceStatic"),Bn=te("DataSourceFunction"),Xi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=ar()),r.type&&(r.type==="rest"?(t?.strict||("pollInterval"in r&&Me(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),"timeout"in r&&Me(r.timeout)&&(r.timeout=Math.round(r.timeout))),ye(r,t?.defaults)):r.type==="websocket"?(r.heartbeat&&typeof r.heartbeat=="object"&&(t?.strict||"interval"in r.heartbeat&&Me(r.heartbeat.interval)&&(r.heartbeat.interval=Math.round(r.heartbeat.interval))),t?.strict||"pollInterval"in r&&Me(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),ye(r,t?.defaults)):r.type==="static"?t?.strict||ye(r,t?.defaults):r.type==="function"&&(t?.strict||"timeout"in r&&Me(r.timeout)&&(r.timeout=Math.round(r.timeout)),t?.strict||ye(r,t?.defaults))),r},eo=e=>cr(e,Hn,{rest:xn,websocket:Wn,static:Gn,function:Bn},"type"),Yn=(e,t)=>dr(e,t,Xi,Hn,{rest:xn,websocket:Wn,static:Gn,function:Bn},"type",["type","id"]),Qn=te("ComponentInstance"),Zn=te("ViewComponentInstance"),Xn=te("ContainerComponentInstance"),es=te("LogicComponentInstanceRef"),to=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=ar()),t?.strict||(r.role==="view"?delete r.children:r.role==="container"?delete r.component:r.role==="logic"&&delete r.children),ye(r,t?.defaults),r},ro=e=>cr(e,Qn,{view:Zn,container:Xn,logic:es},"role"),ts=(e,t)=>dr(e,t,to,Qn,{view:Zn,container:Xn,logic:es},"role",["role","id"]),Nt=te("CICPage"),no=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=ar()),t?.strict||ye(r,t?.defaults),r},so=e=>Nt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Nt.errors||[])},rs=(e,t)=>{const r=no(e,t);return Nt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Nt.errors||[])}},Ct=te("Meta"),It=te("Layout"),io=e=>Ct(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Ct.errors||[])},oo=e=>It(e)?{ok:!0,value:null}:{ok:!1,errors:ee(It.errors||[])},ns=(e,t)=>{const r=t?.strict?e:ye(e,t?.defaults);return Ct(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Ct.errors||[])}},ss=(e,t)=>{const r=t?.strict?e:ye(e,t?.defaults);return It(r)?{ok:!0,value:r}:{ok:!1,errors:ee(It.errors||[])}},Ot=te("Variables"),ao=e=>Ot(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Ot.errors||[])},is=(e,t)=>{const r=t?.strict?e:ye(e,t?.defaults);return Ot(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Ot.errors||[])}},os=te("Dependency"),as=te("JSDependency"),cs=te("CSSDependency"),ds=te("FontDependency"),us=te("ImageDependency"),ls=te("JSONDependency"),fs=te("WasmDependency"),ps=te("OtherDependency"),co=e=>cr(e,os,{js:as,css:cs,font:ds,image:us,json:ls,wasm:fs,other:ps},"type"),ms=(e,t)=>dr(e,t,(n,i)=>i?.strict?n:ye(n,i?.defaults),os,{js:as,css:cs,font:ds,image:us,json:ls,wasm:fs,other:ps},"type",["type","id"]),Dt=te("RegistryComponents"),uo=e=>Dt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Dt.errors||[])},hs=(e,t)=>{const r=t?.strict?e:ye(e,t?.defaults);return Dt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Dt.errors||[])}},lo=e=>typeof e=="number"?`[${e}]`:`/${e}`,fo=()=>{const e=new Map,t=[],r=(...s)=>s.reduce((c,o,f)=>{const _=lo(o);return f===0&&typeof o=="string"&&!o.startsWith("/")?`/${o}`:`${c}${_}`},"");return{pathJoin:r,ensureUnique:(s,c)=>{const o=e.get(s)||new Set;return o.has(c)?(e.set(s,o),!0):(o.add(c),e.set(s,o),!1)},pushError:(s,c,o,f="error")=>{const _={path:r(...s),message:c,keyword:"rule",params:{ruleId:o,level:f}};return t.push(_),_},errors:t}},po=(e,t)=>{const r=fo();for(const n of t){const i=n.validate(e,r);Array.isArray(i)&&i.length&&r.errors.push(...i)}return{ok:r.errors.length===0,errors:r.errors}},mo=(e,t)=>{const r=po(e,t);return r.ok?{ok:!0,value:null}:{ok:!1,errors:ee(r.errors)}},ho={id:"components.id.unique",scope:"component",path:"pages[].components[].id",title:"组件 id 必须唯一",description:"组件 id 不允许重复",example:"comp_01",level:"error",validate:(e,t)=>{const r=[],n=Array.isArray(e.pages)?e.pages:[];for(let i=0;i<n.length;i++){const s=Array.isArray(n[i]?.components)?n[i].components:[];for(let c=0;c<s.length;c++){const o=s[c]?.id;if(typeof o!="string")continue;if(t.ensureUnique("components.id",o.trim())){const _=t.pushError(["pages",i,"components",c,"id"],`组件 id 重复:"${o.trim()}"`,"components.id.unique","error");r.push(_)}}}return r}},yo={id:"datasources.id.unique",scope:"dataSource",path:"pages[].dataSources[].id",title:"数据源 id 必须唯一",description:"数据源 id 不允许重复",example:"ds_user_list",level:"error",validate:(e,t)=>{const r=[],n=Array.isArray(e.pages)?e.pages:[];for(let i=0;i<n.length;i++){const s=Array.isArray(n[i]?.dataSources)?n[i].dataSources:[];for(let c=0;c<s.length;c++){const o=s[c]?.id;if(typeof o!="string")continue;if(t.ensureUnique("dataSources.id",o.trim())){const _=t.pushError(["pages",i,"dataSources",c,"id"],`数据源 id 重复:"${o.trim()}"`,"datasources.id.unique","error");r.push(_)}}}return r}},go={id:"pages.name.unique",scope:"page",path:"pages[].name",title:"页面 name 必须唯一",description:"页面 name 不允许重复",example:"首页",level:"error",validate:(e,t)=>{const r=[],n=Array.isArray(e.pages)?e.pages:[];for(let i=0;i<n.length;i++){const s=n[i]?.name;if(typeof s!="string")continue;const c=s.trim();if(!c)continue;if(t.ensureUnique("pages.name",c)){const f=t.pushError(["pages",i,"name"],`页面name重复:"${c}"`,"pages.name.unique","error");r.push(f)}}return r}},vo={id:"pages.path.unique",scope:"page",path:"pages[].path",title:"页面 path 必须唯一",description:"页面 path 不允许重复",example:"/home",level:"error",validate:(e,t)=>{const r=[],n=Array.isArray(e.pages)?e.pages:[];for(let i=0;i<n.length;i++){const s=n[i]?.path;if(typeof s!="string")continue;const c=s.trim();if(!c)continue;if(t.ensureUnique("pages.path",c)){const f=t.pushError(["pages",i,"path"],`页面path重复:"${c}"`,"pages.path.unique","error");r.push(f)}}return r}},_o=[go,vo,ho,yo];let qt,On;const $o=()=>{const e=Kn(),t=JSON.stringify(Le);(!qt||On!==t)&&(qt=e.compile(Le),On=t)},Tt=e=>{try{return $o(),qt(e)?mo(e,_o):{ok:!1,errors:ee(qt.errors||[])}}catch(t){return{ok:!1,errors:ee([{path:"",message:t?.message||String(t),keyword:"anyOf",params:{}}])}}},bo=(e,t)=>{if(e&&typeof e=="object")return Ve(e,t);const r=(e||"").trim();if(!(r.startsWith("{")||r.startsWith("[")))return{ok:!1,errors:ee([{path:"",message:"非 JSON 字符串输入,请使用 importCICAsync(pathOrUrl) 进行路径/URL 导入",keyword:"type",params:{}}])};const i=nr(r);return i.ok?Ve(i.value,t):{ok:!1,errors:i.errors}},wo=async(e,t)=>{if(e&&typeof e=="object")return Ve(e,t);const r=(e||"").trim();if(r.startsWith("{")||r.startsWith("[")){const s=nr(r);return s.ok?Ve(s.value,t):{ok:!1,errors:s.errors}}if(!(typeof globalThis.fetch=="function"))return{ok:!1,errors:ee([{path:"",message:"当前环境不支持路径/URL 导入(缺少 fetch),请传入 JSON 字符串或对象",keyword:"type",params:{}}])};if(/^file:\/\//i.test(r))return{ok:!1,errors:ee([{path:"",message:"不支持 file:// 方案,请使用 http(s) 或相对/绝对路径(同源)",keyword:"type",params:{}}])};try{const s=await globalThis.fetch(r);if(!s||!s.ok){const f=[{path:"",message:`网络或资源错误:${s?.status} ${s?.statusText||""}`.trim(),keyword:"type",params:{}}];return{ok:!1,errors:ee(f)}}const c=await s.text(),o=nr(c);return o.ok?Ve(o.value,t):{ok:!1,errors:o.errors}}catch(s){const c=[{path:"",message:`请求失败:${s?.message||s}`,keyword:"type",params:{}}];return{ok:!1,errors:ee(c)}}},So=e=>{const t=Tt(e);if(!t.ok)return{ok:!1,errors:t.errors};const r={version:e.version,meta:e.meta,pages:e.pages,registry:e.registry,variables:e.variables,deps:e.deps,extensions:e.extensions};return{ok:!0,value:JSON.stringify(r,null,2)}},Ve=(e,t)=>{const r=typeof e=="object"?{...e}:e,n=[];if(!r||typeof r!="object")return n.push({path:"",message:"配置必须为对象",keyword:"type",params:{schema:"object"}}),{ok:!1,errors:ee(n)};if(r.version||n.push({path:"/version",message:"缺少必填字段:version",keyword:"required",params:{missingProperty:"version"}}),r.meta||n.push({path:"/meta",message:"缺少必填字段:meta",keyword:"required",params:{missingProperty:"meta"}}),r.pages||n.push({path:"/pages",message:"缺少必填字段:pages",keyword:"required",params:{missingProperty:"pages"}}),n.length)return{ok:!1,errors:ee(n)};const i=ns(r.meta,t?.meta);if(i.ok||n.push(...Se("/meta",i.errors)),r.meta?.layout){const c=ss(r.meta.layout,t?.layout);c.ok?r.meta.layout=c.value:n.push(...Se("/meta/layout",c.errors))}if(i.ok&&(r.meta=i.value),r.variables){const c=is(r.variables,t?.variables);c.ok?r.variables=c.value:n.push(...Se("/variables",c.errors))}if(r.registry?.components){const c=[];for(let o=0;o<r.registry.components.length;o++){const f=hs(r.registry.components[o],t?.registry);f.ok?c.push(f.value):n.push(...Se(`/registry/components[${o}]`,f.errors))}r.registry.components=c}if(r.deps){const c=[];for(let o=0;o<r.deps.length;o++){const f=ms(r.deps[o],t?.dependency);f.ok?c.push(f.value):n.push(...Se(`/deps[${o}]`,f.errors))}r.deps=c}if(Array.isArray(r.pages)){const c=[];for(let o=0;o<r.pages.length;o++){const f=r.pages[o],_=rs(f,t?.page);if(!_.ok){n.push(...Se(`/pages[${o}]`,_.errors));continue}const $=_.value;if(Array.isArray(f.components)){const E=[];for(let m=0;m<f.components.length;m++){const v=ts(f.components[m],t?.component);v.ok?E.push(v.value):n.push(...Se(`/pages[${o}]/components[${m}]`,v.errors))}$.components=E}if(Array.isArray(f.dataSources)){const E=[];for(let m=0;m<f.dataSources.length;m++){const v=Yn(f.dataSources[m],t?.dataSource);v.ok?E.push(v.value):n.push(...Se(`/pages[${o}]/dataSources[${m}]`,v.errors))}$.dataSources=E}c.push($)}r.pages=c}if(n.length)return{ok:!1,errors:ee(n)};const s=Tt(r);return s.ok?{ok:!0,value:r}:{ok:!1,errors:s.errors}};var ve=(e=>(e.Pending="pending",e.Loading="loading",e.Loaded="loaded",e.Failed="failed",e))(ve||{});function Po(e,t){return Promise.race([e,new Promise((r,n)=>setTimeout(()=>n(new Error("Load timeout")),t))])}function Eo(e){return new Promise(t=>setTimeout(t,e))}function ko(e){try{return new Function("return "+e)()}catch{return!1}}function jo(e){const t=new Map;return e.forEach(r=>{const n=r.group||"default";t.has(n)||t.set(n,[]),t.get(n).push(r)}),t}class ys{cache=new Map;loaders=new Map;loading=new Map;options;dependencies=new Map;constructor(t={}){this.options={timeout:3e4,retry:3,concurrency:6,esmMode:"script",mapping:{},scopes:{},baseURL:"",onBeforeLoad:()=>{},onAfterLoad:()=>{},onProgress:()=>{},...t}}registerLoader(t,r){return this.loaders.set(t,r),this}registerDependencies(t){return t.forEach(r=>{this.dependencies.set(r.id,r)}),this}async load(t,r){const n={...this.options,...r};if(this.dependencies.set(t.id,t),this.cache.has(t.id)){const s=this.cache.get(t.id);if(s.status===ve.Loaded)return s}if(this.loading.has(t.id))return this.loading.get(t.id);if(t.strategy?.when&&!ko(t.strategy.when))return{id:t.id,status:ve.Loaded,data:null};const i=this.doLoad(t,n);this.loading.set(t.id,i);try{const s=await i;return this.cache.set(t.id,s),s}finally{this.loading.delete(t.id)}}async doLoad(t,r){const n=globalThis.performance?.now?()=>globalThis.performance.now():()=>Date.now(),i=n();let s;await r.onBeforeLoad(t);const c=this.loaders.get(t.type);if(!c)throw new Error(`No loader found for type: ${t.type}`);if(t.format==="cjs"&&typeof window<"u")throw new Error("CJS format is not supported on web platform");for(let f=0;f<=r.retry;f++)try{const _=await Po(c.load(t,r),r.timeout);return _.duration=n()-i,await r.onAfterLoad(_),_}catch(_){s=_,f<r.retry&&await Eo(Math.pow(2,f)*1e3)}const o={id:t.id,status:ve.Failed,error:s,duration:n()-i};return await r.onAfterLoad(o),o}async loadAll(t,r){const n={...this.options,...r},i=[];let s=0;this.registerDependencies(t);const c=jo(t);for(const[,o]of c){const f=await this.loadConcurrent(o,n.concurrency,n);i.push(...f),s+=o.length,n.onProgress(s,t.length)}return i}async loadConcurrent(t,r,n){const i=[],s=[...t],c=Array.from({length:Math.min(r,t.length)},async()=>{for(;s.length>0;){const o=s.shift();if(o){const f=await this.load(o,n);i.push(f)}}});return await Promise.all(c),i}async preload(t){const r=t.filter(n=>n.strategy?.preload||n.strategy?.prefetch);await this.loadAll(r,{...this.options,retry:1})}async unload(t){if(!this.cache.get(t))return;const n=this.dependencies.get(t);if(!n)return;const i=this.loaders.get(n.type);i?.unload&&await i.unload(n),this.cache.delete(t)}clear(){this.cache.clear(),this.loading.clear()}getStatus(t){return this.cache.get(t)?.status??ve.Pending}getResult(t){return this.cache.get(t)}getAllResults(){return new Map(this.cache)}}class Ro{resolveURL(t,r){const n=r?.resolveUrl?.(t);if(n)return n;const i=t.url||t.localPath||"";if(!i)return i;if(r?.scopes){for(const s of Object.keys(r.scopes))if(i.startsWith(s)){const c=r.scopes[s]||{},o=c[t.id]||c[i];if(o)return o}}if(r?.mapping){for(const s of Object.keys(r.mapping)){const c=r.mapping[s];if(i.startsWith(s))return i.replace(s,c)}if(r.mapping[t.id])return r.mapping[t.id]}if(r?.baseURL&&/^\.{0,2}\//.test(i)){const s=r.baseURL.replace(/\/+$/,""),c=i.replace(/^\/+/,"");return`${s}/${c}`}return i}async load(t,r){return(t.module||t.format==="esm")&&r?.esmMode==="import"?import(this.resolveURL(t,r)).then(i=>({id:t.id,status:ve.Loaded,data:i})).catch(()=>{throw new Error(`Failed to import ESM: ${t.url||t.localPath}`)}):new Promise((n,i)=>{const s=document.createElement("script");s.id=t.id,s.src=this.resolveURL(t,r),(t.module||t.format==="esm")&&(s.type="module"),t.strategy?.async&&(s.async=!0),t.crossOrigin&&(s.crossOrigin=t.crossOrigin),s.onload=()=>{n({id:t.id,status:ve.Loaded,data:window[t.name||t.id]})},s.onerror=()=>{i(new Error(`Failed to load JS: ${t.url||t.localPath}`))},document.head.appendChild(s)})}async unload(t){const r=document.getElementById(t.id);r&&r.remove(),t.name&&window[t.name]&&delete window[t.name]}}class No{async load(t){return new Promise((r,n)=>{const i=document.createElement("link");i.id=t.id,i.rel="stylesheet",i.href=t.url||t.localPath||"",t.media&&(i.media=t.media),i.onload=()=>{r({id:t.id,status:ve.Loaded})},i.onerror=()=>{n(new Error(`Failed to load CSS: ${t.url||t.localPath}`))},document.head.appendChild(i)})}async unload(t){const r=document.getElementById(t.id);r&&r.remove()}}class Co{async load(t){return new Promise((r,n)=>{const i=new Image;i.onload=()=>{r({id:t.id,status:ve.Loaded,data:i})},i.onerror=()=>{n(new Error(`Failed to load image: ${t.url||t.localPath}`))},i.src=t.url||t.localPath||""})}}class Io{async load(t){try{const r=await fetch(t.url||t.localPath||"");if(!r.ok)throw new Error(`HTTP ${r.status}: ${r.statusText}`);const n=await r.json();return{id:t.id,status:ve.Loaded,data:n}}catch{throw new Error(`Failed to load JSON: ${t.url||t.localPath}`)}}}function gs(e){const t=new ys(e);return t.registerLoader("js",new Ro),t.registerLoader("css",new No),t.registerLoader("image",new Co),t.registerLoader("json",new Io),t}function Oo(e){return new ys(e)}let tr=null;function Do(e){return tr||(tr=gs(e)),tr}class qo{manifest;adapter;constructor(t,r){this.manifest=t,this.adapter=r}async render(t){if(!this.adapter.supports(this.manifest))throw new Error("Adapter does not support current manifest");const r=this.adapter.createContext(this.manifest,t);this.adapter.prepare&&await this.adapter.prepare(r),await this.adapter.register(r),this.adapter.mount&&await this.adapter.mount(r)}}function rr(e,t){const r=c=>c.split("-")[0].split(".").map(o=>Number(o)),n=r(e),i=r(t);if(n.some(Number.isNaN)||i.some(Number.isNaN)||n.length<1||i.length<1)return;const s=Math.max(n.length,i.length);for(let c=0;c<s;c++){const o=n[c]??0,f=i[c]??0;if(o>f)return 1;if(o<f)return-1}return 0}function To(e,t){if(!t||!e)return"unknown";if(t.startsWith("^")){const n=t.slice(1),i=rr(e,n);if(i===void 0)return"unknown";const s=e.split(".")[0],c=n.split(".")[0];return s===c&&i>=0?"yes":"no"}if(t.startsWith("~")){const n=t.slice(1),i=rr(e,n);if(i===void 0)return"unknown";const[s,c]=e.split("."),[o,f]=n.split(".");return s===o&&c===f&&i>=0?"yes":"no"}const r=rr(e,t);return r===void 0?"unknown":r===0?"yes":"no"}function Mo(e){const t=globalThis;return e.split(".").reduce((r,n)=>r?.[n],t)}function Ao(e){return e==="importmap"?"esm":e==="global"?"global":"both"}function Ae(e,t){if(e==="development")return t.src;if(t.prodSrc!==null)return t.prodSrc??t.src}function Vo(e,t){if(!e&&!t)return;const r={...e||{}};for(const[n,i]of Object.entries(t||{}))r[n]={...r[n]||{},...i};return r}function Lo(e){return`data:text/javascript;charset=utf-8,${encodeURIComponent(e)}`}function Dn(e,t,r){const n=[`const __m = (globalThis as any)['${e}']`];return r&&n.push("export default __m"),t.length>0&&n.push(`export const { ${t.join(", ")} } = __m`),Lo(n.join(`
9
+ `))}function zo(e){if(!e)return{};const t={};for(const[r,n]of Object.entries(e)){if(!r.endsWith("/"))throw new Error(`Alias "${r}" 必须以 "/" 结尾`);t[r]=n}return t}function Uo(e,t,r){return{id:e,strategy:"skipped",providedVersion:t,requiredVersion:r,versionSatisfied:To(t,r),warnings:[]}}function vs(e,t){const r=e.importMap?.imports||{},n=e.importMap?.scopes,i={},s=zo(t.modules.alias),c=[],o=t.modules.requires||[];for(const m of o){const v=m.required??!0,b=m.consume??Ao(t.modules.strategy),w=e.provides[m.id],d=Uo(m.id,w?.version,m.version);if(!w){const l=m.global||m.id;if(Mo(l)!==void 0){d.strategy="host-injected",d.finalWindowKey=l,d.versionSatisfied="unknown",d.warnings.push(`依赖 ${m.id} 未在 runtime.provides 中声明,按 host-injected 处理`),c.push(d);continue}if(v)throw new Error(`依赖 ${m.id} 未提供且宿主未注入`);d.strategy="skipped",d.finalWindowKey=l,d.warnings.push(`依赖 ${m.id} 未提供,已跳过`),c.push(d);continue}if(d.versionSatisfied==="no"){if(v)throw new Error(`依赖 ${m.id} 版本不满足要求:need ${m.version}, got ${w.version}`);d.strategy="skipped",d.warnings.push(`依赖 ${m.id} 版本不满足要求,已跳过`),c.push(d);continue}const p=w.bindings.esm,a=w.bindings.global;if(b==="esm"){if(p){const l=m.specifier||p.specifier||m.id,y=Ae(e.engine.mode,p);y&&(i[l]=y),d.strategy="direct-esm",d.finalSpecifier=l,d.finalUrl=y}else if(a){const l=m.specifier||m.id,y=m.global||a.window||m.id,u=Dn(y,w.exports?.named||[],w.exports?.default??!0);i[l]=u,d.strategy="shimB",d.finalSpecifier=l,d.finalWindowKey=y,d.finalUrl=u}else throw new Error(`依赖 ${m.id} 无法满足 esm 消费`);c.push(d);continue}if(b==="global"){if(a){const l=Ae(e.engine.mode,a);d.strategy="direct-global",d.finalWindowKey=m.global||a.window||m.id,d.finalUrl=l}else if(p){const l=Ae(e.engine.mode,p);d.strategy="shimA",d.finalWindowKey=m.global||m.id,d.finalSpecifier=m.specifier||p.specifier||m.id,d.finalUrl=l}else throw new Error(`依赖 ${m.id} 无法满足 global 消费`);c.push(d);continue}if(a&&p){const l=m.specifier||p.specifier||m.id,y=Ae(e.engine.mode,p);y&&(i[l]=y),d.strategy="direct-esm",d.finalSpecifier=l,d.finalWindowKey=m.global||a.window||m.id,d.finalUrl=y}else if(a){const l=m.specifier||m.id,y=m.global||a.window||m.id,u=Dn(y,w.exports?.named||[],w.exports?.default??!0);i[l]=u,d.strategy="shimB",d.finalSpecifier=l,d.finalWindowKey=y,d.finalUrl=u}else if(p){const l=m.specifier||p.specifier||m.id,y=Ae(e.engine.mode,p);y&&(i[l]=y),d.strategy="shimA",d.finalSpecifier=l,d.finalWindowKey=m.global||m.id,d.finalUrl=y}else throw new Error(`依赖 ${m.id} 无法满足 both 消费`);c.push(d)}const f={imports:{...r,...i,...s,...t.modules.importMap?.imports||{}},scopes:Vo(n,t.modules.importMap?.scopes)},_={...e.env||{},...t.env||{}},$=new Set([...e.preload||[],...t.modules.preload||[]]),E={timestamp:new Date().toISOString(),mode:e.engine.mode||"development",entries:c,importMapSize:Object.keys(f.imports).length,preloadCount:$.size};return{runtime:e,cic:t,importMap:f,env:_,report:E}}function Fo(e={}){const t=e.runtimeUrl||"./runtime.manifest.json",r=e.cicUrl||"./cic.manifest.json";return{async load(){const[n,i]=await Promise.all([fetch(t),fetch(r)]);if(!n.ok)throw new Error(`Failed to load runtime manifest: ${n.status}`);if(!i.ok)throw new Error(`Failed to load cic manifest: ${i.status}`);const s=await n.json(),c=await i.json(),o=vs(s,c);return globalThis.__MANIFEST__=o,globalThis.__ENV__=o.env,globalThis.__manifestReady=Promise.resolve(o),o}}}const Ko={version:"2.0.0",engine:{platform:"web",runtime:"vue3",version:"^3.4.0"},modules:{strategy:"hybrid",importMap:{imports:{"vue-router":"/app/deps/vue-router.esm-browser.js",pinia:"/app/deps/pinia.esm-browser.js"},scopes:{"/pages/admin/":{vue:"/vendor/vue.compat.esm.js"}}},requires:[{id:"vue",version:"^3.0.0",required:!0,consume:"both",specifier:"vue",global:"Vue"},{id:"echarts",version:"^5.0.0",required:!1,consume:"global",global:"echarts"},{id:"@anov/charts",version:"^1.2.0",required:!0,consume:"esm",specifier:"@anov/charts",dependencies:["vue"]}],baseURL:"/app/",alias:{"@/":"/src/","cdn/":"/anov-prod/mgt/ui/"},preload:["/app/chunks/vendor.js","/app/chunks/core.js"],fallback:{strategy:"global",mapping:{vue:"window.Vue"}}},components:{strategy:"local",adapters:[{match:"@arco-design/web-vue",kind:"plugin",register:{method:"use",target:"app"},required:!0,dependencies:["vue"]},{match:"echarts",kind:"global",globalName:"echarts"},{match:"@anov/charts",kind:"module",register:{method:"init",options:{theme:"dark"}},async:!0}],prefix:"Cic",naming:"PascalCase",registry:{DataTable:"@/components/DataTable/index.ts",SmartForm:"@/components/SmartForm/index.ts"},conflictPolicy:"warn"},export:{excludeDeps:["vue","vue-router","pinia"],reason:"由宿主统一注入,避免重复打包"},env:{NODE_ENV:"development",ENABLE_MOCK:!0},extensions:{tenant:"default",locale:"zh-CN"}},Jo={version:"2.0.0",engine:{platform:"web",runtime:"vue3",version:"3.4.21",mode:"development",devServerURL:"http://localhost:5173"},provides:{vue:{version:"3.4.21",exports:{named:["ref","reactive","computed","watch","onMounted"],default:!0},bindings:{esm:{specifier:"vue",src:"/anov-dev-runtime/deps/vue.esm-browser.js",prodSrc:"/anov-prod-runtime/deps/vue.esm-browser.js",format:"esm",loadMode:"import"},global:{window:"Vue",src:"/anov-dev-runtime/deps/vue.global.js",prodSrc:"/anov-prod-runtime/deps/vue.global.js",format:"umd",loadMode:"script"}}},"@anov/charts":{version:"1.2.0",exports:{named:["init","setTheme"],default:!0},bindings:{esm:{specifier:"@anov/charts",src:"/anov-dev-runtime/deps/anov-charts.esm.js",prodSrc:"/anov-prod-runtime/deps/anov-charts.esm.js",format:"esm",loadMode:"import"}}},echarts:{version:"5.5.0",exports:{named:["init","connect","disconnect"],default:!0},bindings:{global:{window:"echarts",src:"https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js",prodSrc:null,format:"umd",loadMode:"script"}}}},importMap:{imports:{"cdn/":"/anov-prod/mgt/ui/","@/":"/src/"},scopes:{"/components/":{vue:"/vendor/vue.esm-browser.js"}}},env:{NODE_ENV:"development",APP_NAME:"CIC Runtime",ENABLE_DEVTOOLS:!0},preload:["/anov-dev-runtime/chunks/vendor.js","/anov-dev-runtime/chunks/libs.js"],entry:"/anov-dev-runtime/entry/index.js",extensions:{region:"cn",tenant:"default"}};class ur extends $s{constructor(t){const r=Tt(t);if(!r.ok)throw new Error(`Invalid CIC Configuration: ${JSON.stringify(r.errors)}`);super(t)}static getValueByPath(t,r,n){if(t==null||!r)return n;const i=[];r.replace(/\[(\d+)\]/g,".$1").split(".").forEach(c=>{c.trim()&&i.push(c.trim())});let s=t;for(const c of i){if(s==null)return n;s=s[c]}return s===void 0?n:s}static traverseTree(t,r,n){const i=Array.isArray(t)?t:[t];for(const s of i)r(s,n)!==!1&&s.children&&s.children.length>0&&ur.traverseTree(s.children,r,s)}static createDataSource=Yn;static validateDataSource=eo;static createComponent=ts;static validateComponent=ro;static createPage=rs;static validatePage=so;static createMeta=ns;static createLayout=ss;static validateMeta=io;static validateLayout=oo;static createVariables=is;static validateVariables=ao;static createDependency=ms;static validateDependency=co;static createRegistryComponent=hs;static validateRegistryComponent=uo;static importCIC=bo;static exportCIC=So;static validateCIC=Tt;static importCICAsync=wo;static createDependencyLoader=gs;static createBareLoader=Oo;static getDependencyLoaderSingleton=Do;static Render=qo;static resolveManifest=vs;static createManifestLoader=Fo}exports.CICManifestExample=Ko;exports.CICSDK=ur;exports.RuntimeManifestExample=Jo;