@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.
- package/dist/cic-sdk.cjs.js +8 -7
- package/dist/cic-sdk.es.js +2731 -2461
- package/dist/cic-sdk.umd.js +8 -7
- package/dist/sdk/CICSDK.d.ts +5 -0
- package/dist/sdk/manifestLoader/index.d.ts +87 -0
- package/dist/sdk/render/index.d.ts +68 -6
- package/dist/types/components.d.ts +2 -4
- package/dist/types/index.d.ts +3 -3
- package/dist/types/manifest/adapter.d.ts +235 -0
- package/dist/types/manifest/cic.manifest.d.ts +476 -0
- package/dist/types/manifest/runtime.manifest.d.ts +549 -0
- package/package.json +1 -1
- package/dist/types/adapter.d.ts +0 -385
- package/dist/types/cic.manifest.d.ts +0 -367
- package/dist/types/runtime.manifest.d.ts +0 -265
package/dist/cic-sdk.umd.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
(function(ve,qe){typeof exports=="object"&&typeof module<"u"?qe(exports):typeof define=="function"&&define.amd?define(["exports"],qe):(ve=typeof globalThis<"u"?globalThis:ve||self,qe(ve.CICSDK={}))})(this,(function(ve){"use strict";class qe{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 lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue={exports:{}},Ft={},$e={},ke={},Ut={},Kt={},Jt={},fr;function Ke(){return fr||(fr=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})(Jt)),Jt}var Ht={},pr;function mr(){return pr||(pr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Ke();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})(Ht)),Ht}var hr;function H(){return hr||(hr=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=Ke(),r=mr();var n=Ke();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=mr();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(oe(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 oe(C){return typeof C=="boolean"||typeof C=="number"||C===null?!C:(0,t._)`!${D(C)}`}e.not=oe;const ae=j(e.operators.AND);function X(...C){return C.reduce(ae)}e.and=X;const ye=j(e.operators.OR);function M(...C){return C.reduce(ye)}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})`}})(Kt)),Kt}var G={},yr;function B(){if(yr)return G;yr=1,Object.defineProperty(G,"__esModule",{value:!0}),G.checkStrictMode=G.getErrorPath=G.Type=G.useFunc=G.setEvaluated=G.evaluatedPropsToName=G.mergeEvaluated=G.eachItem=G.unescapeJsonPointer=G.escapeJsonPointer=G.escapeFragment=G.unescapeFragment=G.schemaRefOrVal=G.schemaHasRulesButRef=G.schemaHasRules=G.checkUnknownRules=G.alwaysValidSchema=G.toHash=void 0;const e=H(),t=Ke();function r(d){const h={};for(const P of d)h[P]=!0;return h}G.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))}G.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}"`)}G.checkUnknownRules=o;function s(d,h){if(typeof d=="boolean")return!d;for(const P in d)if(h[P])return!0;return!1}G.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}G.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)}`}G.schemaRefOrVal=i;function u(d){return E(decodeURIComponent(d))}G.unescapeFragment=u;function v(d){return encodeURIComponent($(d))}G.escapeFragment=v;function $(d){return typeof d=="number"?`${d}`:d.replace(/~/g,"~0").replace(/\//g,"~1")}G.escapeJsonPointer=$;function E(d){return d.replace(/~1/g,"/").replace(/~0/g,"~")}G.unescapeJsonPointer=E;function _(d,h){if(Array.isArray(d))for(const P of d)h(P);else h(d)}G.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}}G.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}G.evaluatedPropsToName=b;function w(d,h,P){Object.keys(P).forEach(I=>d.assign((0,e._)`${h}${(0,e.getProperty)(I)}`,!0))}G.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))})}G.useFunc=p;var a;(function(d){d[d.Num=0]="Num",d[d.Str=1]="Str"})(a||(G.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)}G.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 G.checkStrictMode=y,G}var Je={},gr;function Pe(){if(gr)return Je;gr=1,Object.defineProperty(Je,"__esModule",{value:!0});const e=H(),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 Je.default=t,Je}var vr;function He(){return vr||(vr=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=H(),r=B(),n=Pe();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])}})(Ut)),Ut}var _r;function gs(){if(_r)return ke;_r=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.boolOrEmptySchema=ke.topBoolOrEmptySchema=void 0;const e=He(),t=H(),r=Pe(),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))}ke.topBoolOrEmptySchema=o;function s(i,u){const{gen:v,schema:$}=i;$===!1?(v.var(u,!1),c(i)):v.var(u,!0)}ke.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 ke}var re={},je={},$r;function br(){if($r)return je;$r=1,Object.defineProperty(je,"__esModule",{value:!0}),je.getRules=je.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)}je.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 je.getRules=n,je}var be={},wr;function Pr(){if(wr)return be;wr=1,Object.defineProperty(be,"__esModule",{value:!0}),be.shouldUseRule=be.shouldUseGroup=be.schemaHasRulesForType=void 0;function e({schema:n,self:o},s){const c=o.RULES.types[s];return c&&c!==!0&&t(n,c)}be.schemaHasRulesForType=e;function t(n,o){return o.rules.some(s=>r(n,s))}be.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 be.shouldUseRule=r,be}var Sr;function Ge(){if(Sr)return re;Sr=1,Object.defineProperty(re,"__esModule",{value:!0}),re.reportTypeError=re.checkDataTypes=re.checkDataType=re.coerceAndCheckDataType=re.getJSONTypes=re.getSchemaTypes=re.DataType=void 0;const e=br(),t=Pr(),r=He(),n=H(),o=B();var s;(function(a){a[a.Correct=0]="Correct",a[a.Wrong=1]="Wrong"})(s||(re.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}re.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(","))}re.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}re.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
|
-
|| (${
|
|
4
|
-
|| (${
|
|
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)}}re.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}re.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)}re.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 re}var De={},Er;function vs(){if(Er)return De;Er=1,Object.defineProperty(De,"__esModule",{value:!0}),De.assignDefaults=void 0;const e=H(),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))}De.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 De}var pe={},Z={},kr;function me(){if(kr)return Z;kr=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=H(),t=B(),r=Pe(),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 jr;function _s(){if(jr)return pe;jr=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.validateKeywordUsage=pe.validSchemaType=pe.funcKeywordCode=pe.macroKeywordCode=void 0;const e=H(),t=Pe(),r=me(),n=He();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))}pe.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)}}pe.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")}pe.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 pe.validateKeywordUsage=E,pe}var we={},Rr;function $s(){if(Rr)return we;Rr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.extendSubschemaMode=we.extendSubschemaData=we.getSubschema=void 0;const e=H(),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')}we.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]}}we.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 we.extendSubschemaMode=o,we}var ie={},Gt,Cr;function Ir(){return Cr||(Cr=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,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}),Gt}var xt={exports:{}},Nr;function bs(){if(Nr)return xt.exports;Nr=1;var e=xt.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 xt.exports}var Or;function xe(){if(Or)return ie;Or=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.getSchemaRefs=ie.resolveUrl=ie.normalizeId=ie._getFullPath=ie.getFullPath=ie.inlineRef=void 0;const e=B(),t=Ir(),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}ie.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)}ie.getFullPath=u;function v(w,f){return w.serialize(f).split("#")[0]+"#"}ie._getFullPath=v;const $=/#\/?$/;function E(w){return w?w.replace($,""):""}ie.normalizeId=E;function _(w,f,p){return p=E(p),w.resolve(f,p)}ie.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=oe.call(this,L[p])),ae.call(this,L.$anchor),ae.call(this,L.$dynamicAnchor),y[O]=Q;function oe(X){const ye=this.opts.uriResolver.resolve;if(X=E(Q?ye(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 ae(X){if(typeof X=="string"){if(!g.test(X))throw new Error(`invalid anchor "${X}"`);oe.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 ie.getSchemaRefs=b,ie}var qr;function We(){if(qr)return $e;qr=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.getData=$e.KeywordCxt=$e.validateFunctionCode=void 0;const e=gs(),t=Ge(),r=Pr(),n=Ge(),o=vs(),s=_s(),c=$s(),i=H(),u=Pe(),v=xe(),$=B(),E=He();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 oe(k,[],!1,R);const q=(0,t.getSchemaTypes)(k.schema),A=(0,t.coerceAndCheckDataType)(k,q);oe(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 ne=(0,i.str)`${A}/$comment`,ge=k.scopeValue("root",{ref:R.root});k.code((0,i._)`${u.default.self}.opts.$comment(${x}, ${ne}, ${ge}.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 oe(k,R,q,A){const{gen:K,schema:x,data:ne,allErrors:ge,opts:de,self:ue}=k,{RULES:se}=ue;if(x.$ref&&(de.ignoreKeywordsWithRef||!(0,$.schemaHasRulesButRef)(x,se))){K.block(()=>U(k,"$ref",se.all.$ref.definition));return}de.jtd||X(k,R),K.block(()=>{for(const fe of se.rules)Oe(fe);Oe(se.post)});function Oe(fe){(0,r.shouldUseGroup)(x,fe)&&(fe.type?(K.if((0,n.checkDataType)(fe.type,ne,de.strictNumbers)),ae(k,fe),R.length===1&&R[0]===fe.type&&q&&(K.else(),(0,n.reportTypeError)(k)),K.endIf()):ae(k,fe),ge||K.if((0,i._)`${u.default.errors} === ${A||0}`))}}function ae(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||(ye(k,R),k.opts.allowUnionTypes||M(k,R),j(k,k.dataTypes))}function ye(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(ne=>D(R,ne))&&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:ne}=this;A.if((0,i.or)((0,i._)`${K} === undefined`,q)),R!==i.nil&&A.assign(R,!0),(x.length||ne.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)(ne(),ge());function ne(){if(A.length){if(!(q instanceof i.Name))throw new Error("ajv implementation error");const de=Array.isArray(A)?A:[A];return(0,i._)`${(0,n.checkDataTypes)(de,q,x.opts.strictNumbers,n.DataType.Wrong)}`}return i.nil}function ge(){if(K.validateSchema){const de=R.scopeValue("validate$data",{ref:K.validateSchema});return(0,i._)`!${de}(${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 ue=Y.exec(k);if(!ue)throw new Error(`Invalid JSON-pointer: ${k}`);const se=+ue[1];if(K=ue[2],K==="#"){if(se>=R)throw new Error(de("property/index",se));return A[R-se]}if(se>R)throw new Error(de("data",se));if(x=q[R-se],!K)return x}let ne=x;const ge=K.split("/");for(const ue of ge)ue&&(x=(0,i._)`${x}${(0,i.getProperty)((0,$.unescapeJsonPointer)(ue))}`,ne=(0,i._)`${ne} && ${x}`);return ne;function de(ue,se){return`Cannot access ${ue} ${se} levels up, current level is ${R}`}}return $e.getData=W,$e}var Be={},Dr;function Wt(){if(Dr)return Be;Dr=1,Object.defineProperty(Be,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Be.default=e,Be}var Ye={},Tr;function Qe(){if(Tr)return Ye;Tr=1,Object.defineProperty(Ye,"__esModule",{value:!0});const e=xe();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 Ye.default=t,Ye}var le={},Mr;function Bt(){if(Mr)return le;Mr=1,Object.defineProperty(le,"__esModule",{value:!0}),le.resolveSchema=le.getCompilingSchema=le.resolveRef=le.compileSchema=le.SchemaEnv=void 0;const e=H(),t=Wt(),r=Pe(),n=xe(),o=B(),s=We();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={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Ze={},Te={exports:{}},Yt,Ar;function Vr(){if(Ar)return Yt;Ar=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 Yt={nonSimpleDomain:n,recomposeAuthority:E,normalizeComponentEncoding:$,removeDotSegments:v,isIPv4:t,isUUID:e,normalizeIPv6:i,stringArrayToHexStripped:r},Yt}var Qt,Lr;function Ps(){if(Lr)return Qt;Lr=1;const{isUUID:e}=Vr(),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 Qt={wsIsSecure:o,SCHEMES:l,isValidSchemeName:n,getSchemeHandler:y},Qt}var zr;function Ss(){if(zr)return Te.exports;zr=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:o,nonSimpleDomain:s}=Vr(),{SCHEMES:c,getSchemeHandler:i}=Ps();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 Te.exports=w,Te.exports.default=w,Te.exports.fastUri=w,Te.exports}var Fr;function Es(){if(Fr)return Ze;Fr=1,Object.defineProperty(Ze,"__esModule",{value:!0});const e=Ss();return e.code='require("ajv/dist/runtime/uri").default',Ze.default=e,Ze}var Ur;function ks(){return Ur||(Ur=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=We();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=H();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=Wt(),o=Qe(),s=br(),c=Bt(),i=H(),u=xe(),v=Ge(),$=B(),E=ws,_=Es(),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,ne,ge,de,ue,se,Oe,fe,cr,dr;const Fe=M.strict,ur=(j=M.code)===null||j===void 0?void 0:j.optimize,hs=ur===!0||ur===void 0?1:ur||0,ys=(C=(D=M.code)===null||D===void 0?void 0:D.regExp)!==null&&C!==void 0?C:g,yo=(m=M.uriResolver)!==null&&m!==void 0?m:_.default;return{strictSchema:(N=(S=M.strictSchema)!==null&&S!==void 0?S:Fe)!==null&&N!==void 0?N:!0,strictNumbers:(J=(U=M.strictNumbers)!==null&&U!==void 0?U:Fe)!==null&&J!==void 0?J:!0,strictTypes:(W=(Y=M.strictTypes)!==null&&Y!==void 0?Y:Fe)!==null&&W!==void 0?W:"log",strictTuples:(R=(k=M.strictTuples)!==null&&k!==void 0?k:Fe)!==null&&R!==void 0?R:"log",strictRequired:(A=(q=M.strictRequired)!==null&&q!==void 0?q:Fe)!==null&&A!==void 0?A:!1,code:M.code?{...M.code,optimize:hs,regExp:ys}:{optimize:hs,regExp:ys},loopRequired:(K=M.loopRequired)!==null&&K!==void 0?K:a,loopEnum:(x=M.loopEnum)!==null&&x!==void 0?x:a,meta:(ne=M.meta)!==null&&ne!==void 0?ne:!0,messages:(ge=M.messages)!==null&&ge!==void 0?ge:!0,inlineRefs:(de=M.inlineRefs)!==null&&de!==void 0?de:!0,schemaId:(ue=M.schemaId)!==null&&ue!==void 0?ue:"$id",addUsedSchema:(se=M.addUsedSchema)!==null&&se!==void 0?se:!0,validateSchema:(Oe=M.validateSchema)!==null&&Oe!==void 0?Oe:!0,validateFormats:(fe=M.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(cr=M.unicodeRegExp)!==null&&cr!==void 0?cr:!0,int32range:(dr=M.int32range)!==null&&dr!==void 0?dr:!0,uriResolver:yo}}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;ae.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]=ye(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?oe.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 oe(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 ae(M){let{metaSchema:j}=M;j!==void 0&&(M.$data&&this.opts.$data&&(j=ye(j)),M.validateSchema=this.compile(j,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ye(M){return{anyOf:[M,X]}}})(Ft)),Ft}var Xe={},et={},tt={},Kr;function js(){if(Kr)return tt;Kr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return tt.default=e,tt}var Se={},Jr;function Rs(){if(Jr)return Se;Jr=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.callRef=Se.getValidate=void 0;const e=Qe(),t=me(),r=H(),n=Pe(),o=Bt(),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`}Se.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 Se.callRef=u,Se.default=c,Se}var Hr;function Cs(){if(Hr)return et;Hr=1,Object.defineProperty(et,"__esModule",{value:!0});const e=js(),t=Rs(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return et.default=r,et}var rt={},nt={},Gr;function Is(){if(Gr)return nt;Gr=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=H(),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 nt.default=o,nt}var st={},xr;function Ns(){if(xr)return st;xr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=H(),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 st.default=r,st}var it={},ot={},Wr;function Os(){if(Wr)return ot;Wr=1,Object.defineProperty(ot,"__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 ot.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',ot}var Br;function qs(){if(Br)return it;Br=1,Object.defineProperty(it,"__esModule",{value:!0});const e=H(),t=B(),r=Os(),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 it.default=o,it}var at={},Yr;function Ds(){if(Yr)return at;Yr=1,Object.defineProperty(at,"__esModule",{value:!0});const e=me(),t=H(),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 at.default=n,at}var ct={},Qr;function Ts(){if(Qr)return ct;Qr=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=H(),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 ct.default=r,ct}var dt={},Zr;function Ms(){if(Zr)return dt;Zr=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=me(),t=H(),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 dt.default=o,dt}var ut={},Xr;function As(){if(Xr)return ut;Xr=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=H(),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 ut.default=r,ut}var lt={},ft={},en;function Zt(){if(en)return ft;en=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=Ir();return e.code='require("ajv/dist/runtime/equal").default',ft.default=e,ft}var tn;function Vs(){if(tn)return lt;tn=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=Ge(),t=H(),r=B(),n=Zt(),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 lt.default=s,lt}var pt={},rn;function Ls(){if(rn)return pt;rn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=H(),t=B(),r=Zt(),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 pt.default=o,pt}var mt={},nn;function zs(){if(nn)return mt;nn=1,Object.defineProperty(mt,"__esModule",{value:!0});const e=H(),t=B(),r=Zt(),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 mt.default=o,mt}var sn;function Fs(){if(sn)return rt;sn=1,Object.defineProperty(rt,"__esModule",{value:!0});const e=Is(),t=Ns(),r=qs(),n=Ds(),o=Ts(),s=Ms(),c=As(),i=Vs(),u=Ls(),v=zs(),$=[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 rt.default=$,rt}var ht={},Ie={},on;function an(){if(on)return Ie;on=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.validateAdditionalItems=void 0;const e=H(),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 yt={},Ne={},cn;function dn(){if(cn)return Ne;cn=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.validateTuple=void 0;const e=H(),t=B(),r=me(),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 un;function Us(){if(un)return yt;un=1,Object.defineProperty(yt,"__esModule",{value:!0});const e=dn(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return yt.default=t,yt}var gt={},ln;function Ks(){if(ln)return gt;ln=1,Object.defineProperty(gt,"__esModule",{value:!0});const e=H(),t=B(),r=me(),n=an(),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 gt.default=s,gt}var vt={},fn;function Js(){if(fn)return vt;fn=1,Object.defineProperty(vt,"__esModule",{value:!0});const e=H(),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 vt.default=n,vt}var Xt={},pn;function Hs(){return pn||(pn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=H(),r=B(),n=me();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
|
+
(function(we,qe){typeof exports=="object"&&typeof module<"u"?qe(exports):typeof define=="function"&&define.amd?define(["exports"],qe):(we=typeof globalThis<"u"?globalThis:we||self,qe(we.CICSDK={}))})(this,(function(we){"use strict";class qe{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 pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke={exports:{}},Ft={},_e={},ke={},Kt={},Jt={},Ht={},mr;function Je(){return mr||(mr=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})(Ht)),Ht}var xt={},hr;function yr(){return hr||(hr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Je();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})(xt)),xt}var gr;function H(){return gr||(gr=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=Je(),r=yr();var n=Je();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=yr();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,S){return this}}class c extends s{constructor(h,S,I){super(),this.varKind=h,this.name=S,this.rhs=I}render({es5:h,_n:S}){const I=h?r.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${I} ${this.name}${F};`+S}optimizeNames(h,S){if(h[this.name.str])return this.rhs&&(this.rhs=U(this.rhs,h,S)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(h,S,I){super(),this.lhs=h,this.rhs=S,this.sideEffects=I}render({_n:h}){return`${this.lhs} = ${this.rhs};`+h}optimizeNames(h,S){if(!(this.lhs instanceof t.Name&&!h[this.lhs.str]&&!this.sideEffects))return this.rhs=U(this.rhs,h,S),this}get names(){const h=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(h,this.rhs)}}class f extends o{constructor(h,S,I,F){super(h,I,F),this.op=S}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,S){return this.code=U(this.code,h,S),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((S,I)=>S+I.render(h),"")}optimizeNodes(){const{nodes:h}=this;let S=h.length;for(;S--;){const I=h[S].optimizeNodes();Array.isArray(I)?h.splice(S,1,...I):I?h[S]=I:h.splice(S,1)}return h.length>0?this:void 0}optimizeNames(h,S){const{nodes:I}=this;let F=I.length;for(;F--;){const J=I[F];J.optimizeNames(h,S)||(Q(h,J.names),I.splice(F,1))}return I.length>0?this:void 0}get names(){return this.nodes.reduce((h,S)=>V(h,S.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,S){super(S),this.condition=h}render(h){let S=`if(${this.condition})`+super.render(h);return this.else&&(S+="else "+this.else.render(h)),S}optimizeNodes(){super.optimizeNodes();const h=this.condition;if(h===!0)return this.nodes;let S=this.else;if(S){const I=S.optimizeNodes();S=this.else=Array.isArray(I)?new d(I):I}if(S)return h===!1?S instanceof p?S:S.nodes:this.nodes.length?this:new p(oe(h),S instanceof p?[S]:S.nodes);if(!(h===!1||!this.nodes.length))return this}optimizeNames(h,S){var I;if(this.else=(I=this.else)===null||I===void 0?void 0:I.optimizeNames(h,S),!!(super.optimizeNames(h,S)||this.else))return this.condition=U(this.condition,h,S),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,S){if(super.optimizeNames(h,S))return this.iteration=U(this.iteration,h,S),this}get names(){return V(super.names,this.iteration.names)}}class y extends a{constructor(h,S,I,F){super(),this.varKind=h,this.name=S,this.from=I,this.to=F}render(h){const S=h.es5?r.varKinds.var:this.varKind,{name:I,from:F,to:J}=this;return`for(${S} ${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,S,I,F){super(),this.loop=h,this.varKind=S,this.name=I,this.iterable=F}render(h){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(h)}optimizeNames(h,S){if(super.optimizeNames(h,S))return this.iterable=U(this.iterable,h,S),this}get names(){return V(super.names,this.iterable.names)}}class g extends b{constructor(h,S,I){super(),this.name=h,this.args=S,this.async=I}render(h){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(h)}}g.kind="func";class P extends v{render(h){return"return "+super.render(h)}}P.kind="return";class N extends b{render(h){let S="try"+super.render(h);return this.catch&&(S+=this.catch.render(h)),this.finally&&(S+=this.finally.render(h)),S}optimizeNodes(){var h,S;return super.optimizeNodes(),(h=this.catch)===null||h===void 0||h.optimizeNodes(),(S=this.finally)===null||S===void 0||S.optimizeNodes(),this}optimizeNames(h,S){var I,F;return super.optimizeNames(h,S),(I=this.catch)===null||I===void 0||I.optimizeNames(h,S),(F=this.finally)===null||F===void 0||F.optimizeNames(h,S),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,S={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...S,_n:S.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,S){const I=this._extScope.value(h,S);return(this._values[I.prefix]||(this._values[I.prefix]=new Set)).add(I),I}getScopeValue(h,S){return this._extScope.getValue(h,S)}scopeRefs(h){return this._extScope.scopeRefs(h,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(h,S,I,F){const J=this._scope.toName(S);return I!==void 0&&F&&(this._constants[J.str]=I),this._leafNode(new c(h,J,I)),J}const(h,S,I){return this._def(r.varKinds.const,h,S,I)}let(h,S,I){return this._def(r.varKinds.let,h,S,I)}var(h,S,I){return this._def(r.varKinds.var,h,S,I)}assign(h,S,I){return this._leafNode(new o(h,S,I))}add(h,S){return this._leafNode(new f(h,e.operators.ADD,S))}code(h){return typeof h=="function"?h():h!==t.nil&&this._leafNode(new m(h)),this}object(...h){const S=["{"];for(const[I,F]of h)S.length>1&&S.push(","),S.push(I),(I!==F||this.opts.es5)&&(S.push(":"),(0,t.addCodeArg)(S,F));return S.push("}"),new t._Code(S)}if(h,S,I){if(this._blockNode(new p(h)),S&&I)this.code(S).else().code(I).endIf();else if(S)this.code(S).endIf();else if(I)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(h){return this._elseNode(new p(h))}else(){return this._elseNode(new d)}endIf(){return this._endBlockNode(p,d)}_for(h,S){return this._blockNode(h),S&&this.code(S).endFor(),this}for(h,S){return this._for(new l(h),S)}forRange(h,S,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,S,I),()=>F(Y))}forOf(h,S,I,F=r.varKinds.const){const J=this._scope.toName(h);if(this.opts.es5){const Y=S instanceof t.Name?S:this.var("_arr",S);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,S),()=>I(J))}forIn(h,S,I,F=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(h,(0,t._)`Object.keys(${S})`,I);const J=this._scope.toName(h);return this._for(new u("in",F,J,S),()=>I(J))}endFor(){return this._endBlockNode(a)}label(h){return this._leafNode(new _(h))}break(h){return this._leafNode(new $(h))}return(h){const S=new P;if(this._blockNode(S),this.code(h),S.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(h,S,I){if(!S&&!I)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new N;if(this._blockNode(F),this.code(h),S){const J=this.name("e");this._currNode=F.catch=new T(J),S(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,S){return this._blockStarts.push(this._nodes.length),h&&this.code(h).endBlock(S),this}endBlock(h){const S=this._blockStarts.pop();if(S===void 0)throw new Error("CodeGen: not in self-balancing block");const I=this._nodes.length-S;if(I<0||h!==void 0&&I!==h)throw new Error(`CodeGen: wrong number of nodes: ${I} vs ${h} expected`);return this._nodes.length=S,this}func(h,S=t.nil,I,F){return this._blockNode(new g(h,S,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,S){const I=this._currNode;if(I instanceof h||S&&I instanceof S)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${S?`${h.kind}/${S.kind}`:h.kind}"`)}_elseNode(h){const S=this._currNode;if(!(S instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=S.else=h,this}get _root(){return this._nodes[0]}get _currNode(){const h=this._nodes;return h[h.length-1]}set _currNode(h){const S=this._nodes;S[S.length-1]=h}}e.CodeGen=O;function V(C,h){for(const S in h)C[S]=(C[S]||0)+(h[S]||0);return C}function z(C,h){return h instanceof t._CodeOrName?V(C,h.names):C}function U(C,h,S){if(C instanceof t.Name)return I(C);if(!F(C))return C;return new t._Code(C._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=S[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&&S[Y.str]!==void 0)}}function Q(C,h){for(const S in h)C[S]=(C[S]||0)-(h[S]||0)}function oe(C){return typeof C=="boolean"||typeof C=="number"||C===null?!C:(0,t._)`!${D(C)}`}e.not=oe;const ae=j(e.operators.AND);function X(...C){return C.reduce(ae)}e.and=X;const ye=j(e.operators.OR);function M(...C){return C.reduce(ye)}e.or=M;function j(C){return(h,S)=>h===t.nil?S:S===t.nil?h:(0,t._)`${D(h)} ${C} ${D(S)}`}function D(C){return C instanceof t.Name?C:(0,t._)`(${C})`}})(Jt)),Jt}var x={},vr;function B(){if(vr)return x;vr=1,Object.defineProperty(x,"__esModule",{value:!0}),x.checkStrictMode=x.getErrorPath=x.Type=x.useFunc=x.setEvaluated=x.evaluatedPropsToName=x.mergeEvaluated=x.eachItem=x.unescapeJsonPointer=x.escapeJsonPointer=x.escapeFragment=x.unescapeFragment=x.schemaRefOrVal=x.schemaHasRulesButRef=x.schemaHasRules=x.checkUnknownRules=x.alwaysValidSchema=x.toHash=void 0;const e=H(),t=Je();function r(u){const g={};for(const P of u)g[P]=!0;return g}x.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))}x.alwaysValidSchema=n;function i(u,g=u.schema){const{opts:P,self:N}=u;if(!P.strictSchema||typeof g=="boolean")return;const T=N.RULES.keywords;for(const L in g)T[L]||y(u,`unknown keyword: "${L}"`)}x.checkUnknownRules=i;function s(u,g){if(typeof u=="boolean")return!u;for(const P in u)if(g[P])return!0;return!1}x.schemaHasRules=s;function c(u,g){if(typeof u=="boolean")return!u;for(const P in u)if(P!=="$ref"&&g.all[P])return!0;return!1}x.schemaHasRulesButRef=c;function o({topSchemaRef:u,schemaPath:g},P,N,T){if(!T){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,e._)`${P}`}return(0,e._)`${u}${g}${(0,e.getProperty)(N)}`}x.schemaRefOrVal=o;function f(u){return E(decodeURIComponent(u))}x.unescapeFragment=f;function _(u){return encodeURIComponent($(u))}x.escapeFragment=_;function $(u){return typeof u=="number"?`${u}`:u.replace(/~/g,"~0").replace(/\//g,"~1")}x.escapeJsonPointer=$;function E(u){return u.replace(/~1/g,"/").replace(/~0/g,"~")}x.unescapeJsonPointer=E;function m(u,g){if(Array.isArray(u))for(const P of u)g(P);else g(u)}x.eachItem=m;function v({mergeNames:u,mergeToName:g,mergeValues:P,resultToName:N}){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):P(L,O);return V===e.Name&&!(z instanceof e.Name)?N(T,z):z}}x.mergeEvaluated={props:v({mergeNames:(u,g,P)=>u.if((0,e._)`${P} !== true && ${g} !== undefined`,()=>{u.if((0,e._)`${g} === true`,()=>u.assign(P,!0),()=>u.assign(P,(0,e._)`${P} || {}`).code((0,e._)`Object.assign(${P}, ${g})`))}),mergeToName:(u,g,P)=>u.if((0,e._)`${P} !== true`,()=>{g===!0?u.assign(P,!0):(u.assign(P,(0,e._)`${P} || {}`),w(u,P,g))}),mergeValues:(u,g)=>u===!0?!0:{...u,...g},resultToName:b}),items:v({mergeNames:(u,g,P)=>u.if((0,e._)`${P} !== true && ${g} !== undefined`,()=>u.assign(P,(0,e._)`${g} === true ? true : ${P} > ${g} ? ${P} : ${g}`)),mergeToName:(u,g,P)=>u.if((0,e._)`${P} !== true`,()=>u.assign(P,g===!0?!0:(0,e._)`${P} > ${g} ? ${P} : ${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 P=u.var("props",(0,e._)`{}`);return g!==void 0&&w(u,P,g),P}x.evaluatedPropsToName=b;function w(u,g,P){Object.keys(P).forEach(N=>u.assign((0,e._)`${g}${(0,e.getProperty)(N)}`,!0))}x.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))})}x.useFunc=p;var a;(function(u){u[u.Num=0]="Num",u[u.Str=1]="Str"})(a||(x.Type=a={}));function l(u,g,P){if(u instanceof e.Name){const N=g===a.Num;return P?N?(0,e._)`"[" + ${u} + "]"`:(0,e._)`"['" + ${u} + "']"`:N?(0,e._)`"/" + ${u}`:(0,e._)`"/" + ${u}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,e.getProperty)(u).toString():"/"+$(u)}x.getErrorPath=l;function y(u,g,P=u.opts.strictSchema){if(P){if(g=`strict mode: ${g}`,P===!0)throw new Error(g);u.self.logger.warn(g)}}return x.checkStrictMode=y,x}var He={},_r;function Pe(){if(_r)return He;_r=1,Object.defineProperty(He,"__esModule",{value:!0});const e=H(),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 He.default=t,He}var $r;function xe(){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=H(),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:P}=y,N=E(d,p,a);l??(g||P)?f(u,N):_(y,(0,t._)`[${N}]`)}e.reportError=i;function s(d,p=e.keywordError,a){const{it:l}=d,{gen:y,compositeRule:u,allErrors:g}=l,P=E(d,p,a);f(y,P),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,P=>{d.const(g,(0,t._)`${n.default.vErrors}[${P}]`),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:P}=d,{opts:N,propertyName:T,topSchemaRef:L,schemaPath:O}=P;l.push([$.keyword,y],[$.params,typeof p=="function"?p(d):p||(0,t._)`{}`]),N.messages&&l.push([$.message,typeof a=="function"?a(d):a]),N.verbose&&l.push([$.schema,g],[$.parentSchema,(0,t._)`${L}${O}`],[n.default.data,u]),T&&l.push([$.propertyName,T])}})(Kt)),Kt}var br;function bs(){if(br)return ke;br=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.boolOrEmptySchema=ke.topBoolOrEmptySchema=void 0;const e=xe(),t=H(),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))}ke.topBoolOrEmptySchema=i;function s(o,f){const{gen:_,schema:$}=o;$===!1?(_.var(f,!1),c(o)):_.var(f,!0)}ke.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 ke}var re={},je={},wr;function Pr(){if(wr)return je;wr=1,Object.defineProperty(je,"__esModule",{value:!0}),je.getRules=je.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)}je.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 je.getRules=n,je}var $e={},Sr;function Er(){if(Sr)return $e;Sr=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 kr;function We(){if(kr)return re;kr=1,Object.defineProperty(re,"__esModule",{value:!0}),re.reportTypeError=re.checkDataTypes=re.checkDataType=re.coerceAndCheckDataType=re.getJSONTypes=re.getSchemaTypes=re.DataType=void 0;const e=Pr(),t=Er(),r=xe(),n=H(),i=B();var s;(function(a){a[a.Correct=0]="Correct",a[a.Wrong=1]="Wrong"})(s||(re.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}re.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(","))}re.getJSONTypes=o;function f(a,l){const{gen:y,data:u,opts:g}=a,P=$(l,g.coerceTypes),N=l.length>0&&!(P.length===0&&l.length===1&&(0,t.schemaHasRulesForType)(a,l[0]));if(N){const T=b(l,u,g.strictNumbers,s.Wrong);y.if(T,()=>{P.length?E(a,l,P):d(a)})}return N}re.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:P}=a,N=u.let("dataType",(0,n._)`typeof ${g}`),T=u.let("coerced",(0,n._)`undefined`);P.coerceTypes==="array"&&u.if((0,n._)`${N} == 'object' && Array.isArray(${g}) && ${g}.length == 1`,()=>u.assign(g,(0,n._)`${g}[0]`).assign(N,(0,n._)`typeof ${g}`).if(b(l,g,P.strictNumbers),()=>u.assign(T,g))),u.if((0,n._)`${T} !== undefined`);for(const O of y)(_.has(O)||O==="array"&&P.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._)`${N} == "number" || ${N} == "boolean"`).assign(T,(0,n._)`"" + ${g}`).elseIf((0,n._)`${g} === null`).assign(T,(0,n._)`""`);return;case"number":u.elseIf((0,n._)`${N} == "boolean" || ${g} === null
|
|
3
|
+
|| (${N} == "string" && ${g} && ${g} == +${g})`).assign(T,(0,n._)`+${g}`);return;case"integer":u.elseIf((0,n._)`${N} === "boolean" || ${g} === null
|
|
4
|
+
|| (${N} === "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._)`${N} === "string" || ${N} === "number"
|
|
5
|
+
|| ${N} === "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 P;switch(a){case"null":return(0,n._)`${l} ${g} 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=N((0,n._)`!(${l} % 1) && !isNaN(${l})`);break;case"number":P=N();break;default:return(0,n._)`typeof ${l} ${g} ${a}`}return u===s.Correct?P:(0,n.not)(P);function N(T=n.nil){return(0,n.and)((0,n._)`typeof ${l} == "number"`,T,y?(0,n._)`isFinite(${l})`:n.nil)}}re.checkDataType=v;function b(a,l,y,u){if(a.length===1)return v(a[0],l,y,u);let g;const P=(0,i.toHash)(a);if(P.array&&P.object){const N=(0,n._)`typeof ${l} != "object"`;g=P.null?N:(0,n._)`!${l} || ${N}`,delete P.null,delete P.array,delete P.object}else g=n.nil;P.number&&delete P.integer;for(const N in P)g=(0,n.and)(g,v(N,l,y,u));return g}re.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)}re.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 re}var De={},jr;function ws(){if(jr)return De;jr=1,Object.defineProperty(De,"__esModule",{value:!0}),De.assignDefaults=void 0;const e=H(),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 pe={},Z={},Rr;function me(){if(Rr)return Z;Rr=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=H(),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(P=>(0,e.and)($(a,l,P,y.ownProperties),(0,e._)`${g} = ${P}`)))}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:P},it:N},T,L,O){const V=O?(0,e._)`${a}, ${l}, ${u}${g}`:l,z=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,P)],[r.default.parentData,N.parentData],[r.default.parentDataProperty,N.parentDataProperty],[r.default.rootData,r.default.rootData]];N.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,P=g(y,u);return a.scopeValue("pattern",{key:P.toString(),ref:P,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,P=l.name("valid");if(g.allErrors){const T=l.let("valid",!0);return N(()=>l.assign(T,!1)),T}return l.var(P,!0),N(()=>l.break()),P;function N(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},P),l.if((0,e.not)(P),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 N=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(N,(0,e._)`${N} || ${T}`),a.mergeValidEvaluated(V,T)||l.if((0,e.not)(N))})),a.result(N,()=>a.reset(),()=>a.error(!0))}return Z.validateUnion=p,Z}var Cr;function Ps(){if(Cr)return pe;Cr=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.validateKeywordUsage=pe.validSchemaType=pe.funcKeywordCode=pe.macroKeywordCode=void 0;const e=H(),t=Pe(),r=me(),n=xe();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))}pe.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),P=w.let("valid");m.block$data(P,N),m.ok((b=v.valid)!==null&&b!==void 0?b:P);function N(){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(P,!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(P,(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:P),z)}}pe.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")}pe.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 pe.validateKeywordUsage=E,pe}var be={},Nr;function Ss(){if(Nr)return be;Nr=1,Object.defineProperty(be,"__esModule",{value:!0}),be.extendSubschemaMode=be.extendSubschemaData=be.getSubschema=void 0;const e=H(),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 ie={},Wt,Ir;function Or(){return Ir||(Ir=1,Wt=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}),Wt}var Gt={exports:{}},qr;function Es(){if(qr)return Gt.exports;qr=1;var e=Gt.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 Gt.exports}var Dr;function Ge(){if(Dr)return ie;Dr=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.getSchemaRefs=ie.resolveUrl=ie.normalizeId=ie._getFullPath=ie.getFullPath=ie.inlineRef=void 0;const e=B(),t=Or(),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}ie.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)}ie.getFullPath=f;function _(w,d){return w.serialize(d).split("#")[0]+"#"}ie._getFullPath=_;const $=/#\/?$/;function E(w){return w?w.replace($,""):""}ie.normalizeId=E;function m(w,d,p){return p=E(p),w.resolve(d,p)}ie.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={},P=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=oe.call(this,L[p])),ae.call(this,L.$anchor),ae.call(this,L.$dynamicAnchor),y[O]=Q;function oe(X){const ye=this.opts.uriResolver.resolve;if(X=E(Q?ye(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"?N(L,M.schema,X):X!==E(U)&&(X[0]==="#"?(N(L,g[X],X),g[X]=L):this.refs[X]=U),X}function ae(X){if(typeof X=="string"){if(!v.test(X))throw new Error(`invalid anchor "${X}"`);oe.call(this,`#${X}`)}}}),g;function N(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 ie.getSchemaRefs=b,ie}var Tr;function Be(){if(Tr)return _e;Tr=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getData=_e.KeywordCxt=_e.validateFunctionCode=void 0;const e=bs(),t=We(),r=Er(),n=We(),i=ws(),s=Ps(),c=Ss(),o=H(),f=Pe(),_=Ge(),$=B(),E=xe();function m(k){if(u(k)&&(P(k),y(k))){d(k);return}v(k,()=>(0,e.topBoolOrEmptySchema)(k))}_e.validateFunctionCode=m;function v({gen:k,validateName:R,schema:q,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(q,K)}`),w(k,K),k.code(W)}):k.func(R,(0,o._)`${f.default.data}, ${b(K)}`,A.$async,()=>k.code(a(q,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:q,gen:A}=k;v(k,()=>{q.$comment&&R.$comment&&z(k),L(k),A.let(f.default.vErrors,null),A.let(f.default.errors,0),q.unevaluated&&p(k),N(k),U(k)})}function p(k){const{gen:R,validateName:q}=k;k.evaluated=R.const("evaluated",(0,o._)`${q}.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 q=typeof k=="object"&&k[R.schemaId];return q&&(R.code.source||R.code.process)?(0,o._)`/*# sourceURL=${q} */`:o.nil}function l(k,R){if(u(k)&&(P(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 q in k)if(R.RULES.all[q])return!0;return!1}function u(k){return typeof k.schema!="boolean"}function g(k,R){const{schema:q,gen:A,opts:K}=k;K.$comment&&q.$comment&&z(k),O(k),V(k);const W=A.const("_errs",f.default.errors);N(k,W),A.var(R,(0,o._)`${W} === ${f.default.errors}`)}function P(k){(0,$.checkUnknownRules)(k),T(k)}function N(k,R){if(k.opts.jtd)return oe(k,[],!1,R);const q=(0,t.getSchemaTypes)(k.schema),A=(0,t.coerceAndCheckDataType)(k,q);oe(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,_.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 W=q.$comment;if(K.$comment===!0)k.code((0,o._)`${f.default.self}.logger.log(${W})`);else if(typeof K.$comment=="function"){const ne=(0,o.str)`${A}/$comment`,ge=k.scopeValue("root",{ref:R.root});k.code((0,o._)`${f.default.self}.opts.$comment(${W}, ${ne}, ${ge}.schema)`)}}function U(k){const{gen:R,schemaEnv:q,validateName:A,ValidationError:K,opts:W}=k;q.$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:q,items:A}){q instanceof o.Name&&k.assign((0,o._)`${R}.props`,q),A instanceof o.Name&&k.assign((0,o._)`${R}.items`,A)}function oe(k,R,q,A){const{gen:K,schema:W,data:ne,allErrors:ge,opts:de,self:ue}=k,{RULES:se}=ue;if(W.$ref&&(de.ignoreKeywordsWithRef||!(0,$.schemaHasRulesButRef)(W,se))){K.block(()=>F(k,"$ref",se.all.$ref.definition));return}de.jtd||X(k,R),K.block(()=>{for(const fe of se.rules)Oe(fe);Oe(se.post)});function Oe(fe){(0,r.shouldUseGroup)(W,fe)&&(fe.type?(K.if((0,n.checkDataType)(fe.type,ne,de.strictNumbers)),ae(k,fe),R.length===1&&R[0]===fe.type&&q&&(K.else(),(0,n.reportTypeError)(k)),K.endIf()):ae(k,fe),ge||K.if((0,o._)`${f.default.errors} === ${A||0}`))}}function ae(k,R){const{gen:q,schema:A,opts:{useDefaults:K}}=k;K&&(0,i.assignDefaults)(k,R.type),q.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||(ye(k,R),k.opts.allowUnionTypes||M(k,R),j(k,k.dataTypes))}function ye(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(",")}"`)}),h(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:W}=K.definition;W.length&&!W.some(ne=>D(R,ne))&&S(k,`missing type "${W.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 h(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 I{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",G(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",f.default.errors))}result(R,q,A){this.failResult((0,o.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,o.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,o._)`${q} !== undefined && (${(0,o.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=o.nil){this.gen.block(()=>{this.check$data(R,A),q()})}check$data(R=o.nil,q=o.nil){if(!this.$data)return;const{gen:A,schemaCode:K,schemaType:W,def:ne}=this;A.if((0,o.or)((0,o._)`${K} === undefined`,q)),R!==o.nil&&A.assign(R,!0),(W.length||ne.validateSchema)&&(A.elseIf(this.invalid$data()),this.$dataError(),R!==o.nil&&A.assign(R,!1)),A.else()}invalid$data(){const{gen:R,schemaCode:q,schemaType:A,def:K,it:W}=this;return(0,o.or)(ne(),ge());function ne(){if(A.length){if(!(q instanceof o.Name))throw new Error("ajv implementation error");const de=Array.isArray(A)?A:[A];return(0,o._)`${(0,n.checkDataTypes)(de,q,W.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}function ge(){if(K.validateSchema){const de=R.scopeValue("validate$data",{ref:K.validateSchema});return(0,o._)`!${de}(${q})`}return o.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,o.Name)),!0}}_e.KeywordCxt=I;function F(k,R,q,A){const K=new I(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 G(k,{dataLevel:R,dataNames:q,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 ue=Y.exec(k);if(!ue)throw new Error(`Invalid JSON-pointer: ${k}`);const se=+ue[1];if(K=ue[2],K==="#"){if(se>=R)throw new Error(de("property/index",se));return A[R-se]}if(se>R)throw new Error(de("data",se));if(W=q[R-se],!K)return W}let ne=W;const ge=K.split("/");for(const ue of ge)ue&&(W=(0,o._)`${W}${(0,o.getProperty)((0,$.unescapeJsonPointer)(ue))}`,ne=(0,o._)`${ne} && ${W}`);return ne;function de(ue,se){return`Cannot access ${ue} ${se} levels up, current level is ${R}`}}return _e.getData=G,_e}var Ye={},Mr;function Bt(){if(Mr)return Ye;Mr=1,Object.defineProperty(Ye,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Ye.default=e,Ye}var Qe={},Ar;function Ze(){if(Ar)return Qe;Ar=1,Object.defineProperty(Qe,"__esModule",{value:!0});const e=Ge();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 Qe.default=t,Qe}var le={},Vr;function Yt(){if(Vr)return le;Vr=1,Object.defineProperty(le,"__esModule",{value:!0}),le.resolveSchema=le.getCompilingSchema=le.resolveRef=le.compileSchema=le.SchemaEnv=void 0;const e=H(),t=Bt(),r=Pe(),n=Ge(),i=B(),s=Be();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 P;d.$async&&(P=g.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const N=g.scopeName("validate");d.validateName=N;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:N,ValidationError:P,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(N,{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:N,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:P}=this.opts;g&&(u=new c({schema:g,schemaId:P,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 P=v.call(this,d,g);return typeof P?.schema!="object"?void 0:w.call(this,a,P)}if(typeof g?.schema=="object"){if(g.validate||o.call(this,g),u===(0,n.normalizeId)(p)){const{schema:P}=g,{schemaId:N}=this.opts,T=P[N];return T&&(y=(0,n.resolveUrl)(this.opts.uriResolver,y,T)),new c({schema:P,schemaId:N,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 P of d.fragment.slice(1).split("/")){if(typeof a=="boolean")return;const N=a[(0,i.unescapeFragment)(P)];if(N===void 0)return;a=N;const T=typeof a=="object"&&a[this.opts.schemaId];!b.has(P)&&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 P=(0,n.resolveUrl)(this.opts.uriResolver,p,a.$ref);u=v.call(this,l,P)}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={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Xe={},Te={exports:{}},Qt,Lr;function zr(){if(Lr)return Qt;Lr=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 Qt={nonSimpleDomain:n,recomposeAuthority:E,normalizeComponentEncoding:$,removeDotSegments:_,isIPv4:t,isUUID:e,normalizeIPv6:o,stringArrayToHexStripped:r},Qt}var Zt,Ur;function js(){if(Ur)return Zt;Ur=1;const{isUUID:e}=zr(),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,P]=u.resourceName.split("?");u.path=g&&g!=="/"?g:void 0,u.query=P,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 P=u.path.match(t);if(P){const N=g.scheme||u.scheme||"urn";u.nid=P[1].toLowerCase(),u.nss=P[2];const T=`${N}:${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 P=g.scheme||u.scheme||"urn",N=u.nid.toLowerCase(),T=`${P}:${g.nid||N}`,L=y(T);L&&(u=L.serialize(u,g));const O=u,V=u.nss;return O.path=`${N||g.nid}:${V}`,g.skipEscape=!0,O}function E(u,g){const P=u;return P.uuid=P.nss,P.nss=void 0,!g.tolerant&&(!P.uuid||!e(P.uuid))&&(P.error=P.error||"UUID is not valid."),P}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 Zt={wsIsSecure:i,SCHEMES:l,isValidSchemeName:n,getSchemeHandler:y},Zt}var Fr;function Rs(){if(Fr)return Te.exports;Fr=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:i,nonSimpleDomain:s}=zr(),{SCHEMES:c,getSchemeHandler:o}=js();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 P=a.path;!l.absolutePath&&(!u||!u.absolutePath)&&(P=t(P)),g===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 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 N=e(l.host);l.host=N.host.toLowerCase(),y=N.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(P){l.error=l.error||"Host's domain name can not be converted to ASCII: "+P}(!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 Te.exports=w,Te.exports.default=w,Te.exports.fastUri=w,Te.exports}var Kr;function Cs(){if(Kr)return Xe;Kr=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=Rs();return e.code='require("ajv/dist/runtime/uri").default',Xe.default=e,Xe}var Jr;function Ns(){return Jr||(Jr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Be();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=H();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=Bt(),i=Ze(),s=Pr(),c=Yt(),o=H(),f=Ge(),_=We(),$=B(),E=ks,m=Cs(),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,D,C,h,S,I,F,J,Y,G,k,R,q,A,K,W,ne,ge,de,ue,se,Oe,fe,ur,lr;const Fe=M.strict,fr=(j=M.code)===null||j===void 0?void 0:j.optimize,_s=fr===!0||fr===void 0?1:fr||0,$s=(C=(D=M.code)===null||D===void 0?void 0:D.regExp)!==null&&C!==void 0?C:v,ko=(h=M.uriResolver)!==null&&h!==void 0?h:m.default;return{strictSchema:(I=(S=M.strictSchema)!==null&&S!==void 0?S:Fe)!==null&&I!==void 0?I:!0,strictNumbers:(J=(F=M.strictNumbers)!==null&&F!==void 0?F:Fe)!==null&&J!==void 0?J:!0,strictTypes:(G=(Y=M.strictTypes)!==null&&Y!==void 0?Y:Fe)!==null&&G!==void 0?G:"log",strictTuples:(R=(k=M.strictTuples)!==null&&k!==void 0?k:Fe)!==null&&R!==void 0?R:"log",strictRequired:(A=(q=M.strictRequired)!==null&&q!==void 0?q:Fe)!==null&&A!==void 0?A:!1,code:M.code?{...M.code,optimize:_s,regExp:$s}:{optimize:_s,regExp:$s},loopRequired:(K=M.loopRequired)!==null&&K!==void 0?K:a,loopEnum:(W=M.loopEnum)!==null&&W!==void 0?W:a,meta:(ne=M.meta)!==null&&ne!==void 0?ne:!0,messages:(ge=M.messages)!==null&&ge!==void 0?ge:!0,inlineRefs:(de=M.inlineRefs)!==null&&de!==void 0?de:!0,schemaId:(ue=M.schemaId)!==null&&ue!==void 0?ue:"$id",addUsedSchema:(se=M.addUsedSchema)!==null&&se!==void 0?se:!0,validateSchema:(Oe=M.validateSchema)!==null&&Oe!==void 0?Oe:!0,validateFormats:(fe=M.validateFormats)!==null&&fe!==void 0?fe:!0,unicodeRegExp:(ur=M.unicodeRegExp)!==null&&ur!==void 0?ur:!0,int32range:(lr=M.int32range)!==null&&lr!==void 0?lr:!0,uriResolver:ko}}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 o.ValueScope({scope:{},prefixes:w,es5:D,lines:C}),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&&N.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=h}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:D,schemaId:C}=this.opts;let h=E;C==="id"&&(h={...E},h.id=h.$id,delete h.$id),D&&j&&this.addMetaSchema(h,h[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 h=C(D);return"$async"in C||(this.errors=C.errors),h}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 h.call(this,j,D);async function h(G,k){await S.call(this,G.$schema);const R=this._addSchema(G,k);return R.validate||I.call(this,R)}async function S(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 S.call(this,k.$schema),this.refs[G]||this.addSchema(k,G,D)}async function Y(G){const k=this._loading[G];if(k)return k;try{return await(this._loading[G]=C(G))}finally{delete this._loading[G]}}}addSchema(j,D,C,h=this.opts.validateSchema){if(Array.isArray(j)){for(const I of j)this.addSchema(I,void 0,C,h);return this}let S;if(typeof j=="object"){const{schemaId:I}=this.opts;if(S=j[I],S!==void 0&&typeof S!="string")throw new Error(`schema ${I} must be string`)}return D=(0,f.normalizeId)(D||S),this._checkUnique(D),this.schemas[D]=this._addSchema(j,C,D,h,!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 h=this.validate(C,j);if(!h&&D){const S="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(S);else throw new Error(S)}return h}getSchema(j){let D;for(;typeof(D=g.call(this,j))=="string";)j=D;if(D===void 0){const{schemaId:C}=this.opts,h=new c.SchemaEnv({schema:{},schemaId:C});if(D=c.resolveSchema.call(this,h,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=g.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,f.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(U.call(this,C,D),!D)return(0,$.eachItem)(C,S=>Q.call(this,S)),this;ae.call(this,D);const h={...D,type:(0,_.getJSONTypes)(D.type),schemaType:(0,_.getJSONTypes)(D.schemaType)};return(0,$.eachItem)(C,h.type.length===0?S=>Q.call(this,S,h):S=>h.type.forEach(I=>Q.call(this,S,h,I))),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 h=C.rules.findIndex(S=>S.keyword===j);h>=0&&C.rules.splice(h,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(h=>`${C}${h.instancePath} ${h.message}`).reduce((h,S)=>h+D+S)}$dataMetaSchema(j,D){const C=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const h of D){const S=h.split("/").slice(1);let I=j;for(const F of S)I=I[F];for(const F in C){const J=C[F];if(typeof J!="object")continue;const{$data:Y}=J.definition,G=I[F];Y&&G&&(I[F]=ye(G))}}return j}_removeAllSchemas(j,D){for(const C in j){const h=j[C];(!D||D.test(C))&&(typeof h=="string"?delete j[C]:h&&!h.meta&&(this._cache.delete(h.schema),delete j[C]))}}_addSchema(j,D,C,h=this.opts.validateSchema,S=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;C=(0,f.normalizeId)(I||C);const Y=f.getSchemaRefs.call(this,j,C);return J=new c.SchemaEnv({schema:j,schemaId:F,meta:D,baseId:C,localRefs:Y}),this._cache.set(J.schema,J),S&&!C.startsWith("#")&&(C&&this._checkUnique(C),this.refs[C]=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 D=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,j)}finally{this.opts=D}}}y.ValidationError=n.default,y.MissingRefError=i.default,e.default=y;function u(M,j,D,C="error"){for(const h in M){const S=h;S in j&&this.logger[C](`${D}: option ${h}. ${M[S]}`)}}function g(M){return M=(0,f.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 N(){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 U(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 h=j?.post;if(D&&h)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:S}=this;let I=h?S.post:S.rules.find(({type:J})=>J===D);if(I||(I={type:D,rules:[]},S.rules.push(I)),S.keywords[M]=!0,!j)return;const F={keyword:M,definition:{...j,type:(0,_.getJSONTypes)(j.type),schemaType:(0,_.getJSONTypes)(j.schemaType)}};j.before?oe.call(this,I,F,j.before):I.rules.push(F),S.all[M]=F,(C=j.implements)===null||C===void 0||C.forEach(J=>this.addKeyword(J))}function oe(M,j,D){const C=M.rules.findIndex(h=>h.keyword===D);C>=0?M.rules.splice(C,0,j):(M.rules.push(j),this.logger.warn(`rule ${D} is not defined`))}function ae(M){let{metaSchema:j}=M;j!==void 0&&(M.$data&&this.opts.$data&&(j=ye(j)),M.validateSchema=this.compile(j,!0))}const X={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ye(M){return{anyOf:[M,X]}}})(Ft)),Ft}var et={},tt={},rt={},Hr;function Is(){if(Hr)return rt;Hr=1,Object.defineProperty(rt,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return rt.default=e,rt}var Se={},xr;function Os(){if(xr)return Se;xr=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.callRef=Se.getValidate=void 0;const e=Ze(),t=me(),r=H(),n=Pe(),i=Yt(),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 P=$.scopeValue("root",{ref:a});return f(_,(0,r._)`${P}.validate`,a,a.$async)}function u(P){const N=o(_,P);f(_,N,P,P.$async)}function g(P){const N=$.scopeValue("schema",d.code.source===!0?{ref:P,code:(0,r.stringify)(P)}:{ref:P}),T=$.name("valid"),L=_.subschema({schema:P,dataTypes:[],schemaPath:r.nil,topSchemaRef:N,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`}Se.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 P=v.let("valid");v.try(()=>{v.code((0,r._)`await ${(0,t.callValidateCode)(_,$,a)}`),g($),w||v.assign(P,!0)},N=>{v.if((0,r._)`!(${N} instanceof ${b.ValidationError})`,()=>v.throw(N)),u(N),w||v.assign(P,!1)}),_.ok(P)}function y(){_.result((0,t.callValidateCode)(_,$,a),()=>g($),()=>u($))}function u(P){const N=(0,r._)`${P}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${N} : ${n.default.vErrors}.concat(${N})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function g(P){var N;if(!b.opts.unevaluated)return;const T=(N=E?.validate)===null||N===void 0?void 0:N.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._)`${P}.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._)`${P}.evaluated.items`);b.items=s.mergeEvaluated.items(v,L,b.items,r.Name)}}}return Se.callRef=f,Se.default=c,Se}var Wr;function qs(){if(Wr)return tt;Wr=1,Object.defineProperty(tt,"__esModule",{value:!0});const e=Is(),t=Os(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return tt.default=r,tt}var nt={},st={},Gr;function Ds(){if(Gr)return st;Gr=1,Object.defineProperty(st,"__esModule",{value:!0});const e=H(),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 st.default=i,st}var it={},Br;function Ts(){if(Br)return it;Br=1,Object.defineProperty(it,"__esModule",{value:!0});const e=H(),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 it.default=r,it}var ot={},at={},Yr;function Ms(){if(Yr)return at;Yr=1,Object.defineProperty(at,"__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 at.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',at}var Qr;function As(){if(Qr)return ot;Qr=1,Object.defineProperty(ot,"__esModule",{value:!0});const e=H(),t=B(),r=Ms(),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 ot.default=i,ot}var ct={},Zr;function Vs(){if(Zr)return ct;Zr=1,Object.defineProperty(ct,"__esModule",{value:!0});const e=me(),t=H(),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 ct.default=n,ct}var dt={},Xr;function Ls(){if(Xr)return dt;Xr=1,Object.defineProperty(dt,"__esModule",{value:!0});const e=H(),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 dt.default=r,dt}var ut={},en;function zs(){if(en)return ut;en=1,Object.defineProperty(ut,"__esModule",{value:!0});const e=me(),t=H(),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 ut.default=i,ut}var lt={},tn;function Us(){if(tn)return lt;tn=1,Object.defineProperty(lt,"__esModule",{value:!0});const e=H(),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 lt.default=r,lt}var ft={},pt={},rn;function Xt(){if(rn)return pt;rn=1,Object.defineProperty(pt,"__esModule",{value:!0});const e=Or();return e.code='require("ajv/dist/runtime/equal").default',pt.default=e,pt}var nn;function Fs(){if(nn)return ft;nn=1,Object.defineProperty(ft,"__esModule",{value:!0});const e=We(),t=H(),r=B(),n=Xt(),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"),P=(0,e.checkDataTypes)(w,g,v.opts.strictNumbers,e.DataType.Wrong),N=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${y}--;`,()=>{o.let(g,(0,t._)`${f}[${y}]`),o.if(P,(0,t._)`continue`),w.length>1&&o.if((0,t._)`typeof ${g} == "string"`,(0,t._)`${g} += "_"`),o.if((0,t._)`typeof ${N}[${g}] == "number"`,()=>{o.assign(u,(0,t._)`${N}[${g}]`),c.error(),o.assign(b,!1).break()}).code((0,t._)`${N}[${g}] = ${y}`)})}function l(y,u){const g=(0,r.useFunc)(o,n.default),P=o.name("outer");o.label(P).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(P)})))}}};return ft.default=s,ft}var mt={},sn;function Ks(){if(sn)return mt;sn=1,Object.defineProperty(mt,"__esModule",{value:!0});const e=H(),t=B(),r=Xt(),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 mt.default=i,mt}var ht={},on;function Js(){if(on)return ht;on=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=H(),t=B(),r=Xt(),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 ht.default=i,ht}var an;function Hs(){if(an)return nt;an=1,Object.defineProperty(nt,"__esModule",{value:!0});const e=Ds(),t=Ts(),r=As(),n=Vs(),i=Ls(),s=zs(),c=Us(),o=Fs(),f=Ks(),_=Js(),$=[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 nt.default=$,nt}var yt={},Ne={},cn;function dn(){if(cn)return Ne;cn=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.validateAdditionalItems=void 0;const e=H(),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 Ne.validateAdditionalItems=i,Ne.default=n,Ne}var gt={},Ie={},un;function ln(){if(un)return Ie;un=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.validateTuple=void 0;const e=H(),t=B(),r=me(),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 fn;function xs(){if(fn)return gt;fn=1,Object.defineProperty(gt,"__esModule",{value:!0});const e=ln(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return gt.default=t,gt}var vt={},pn;function Ws(){if(pn)return vt;pn=1,Object.defineProperty(vt,"__esModule",{value:!0});const e=H(),t=B(),r=me(),n=dn(),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 vt.default=s,vt}var _t={},mn;function Gs(){if(mn)return _t;mn=1,Object.defineProperty(_t,"__esModule",{value:!0});const e=H(),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 _t.default=n,_t}var er={},hn;function Bs(){return hn||(hn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=H(),r=B(),n=me();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: ${
|
|
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})(Xt)),Xt}var _t={},mn;function Gs(){if(mn)return _t;mn=1,Object.defineProperty(_t,"__esModule",{value:!0});const e=H(),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 _t.default=n,_t}var $t={},hn;function yn(){if(hn)return $t;hn=1,Object.defineProperty($t,"__esModule",{value:!0});const e=me(),t=H(),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: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 $t.default=s,$t}var bt={},gn;function xs(){if(gn)return bt;gn=1,Object.defineProperty(bt,"__esModule",{value:!0});const e=We(),t=me(),r=B(),n=yn(),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 bt.default=o,bt}var wt={},vn;function Ws(){if(vn)return wt;vn=1,Object.defineProperty(wt,"__esModule",{value:!0});const e=me(),t=H(),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 wt.default=o,wt}var Pt={},_n;function Bs(){if(_n)return Pt;_n=1,Object.defineProperty(Pt,"__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 Pt.default=t,Pt}var St={},$n;function Ys(){if($n)return St;$n=1,Object.defineProperty(St,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:me().validateUnion,error:{message:"must match a schema in anyOf"}};return St.default=t,St}var Et={},bn;function Qs(){if(bn)return Et;bn=1,Object.defineProperty(Et,"__esModule",{value:!0});const e=H(),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 Et.default=n,Et}var kt={},wn;function Zs(){if(wn)return kt;wn=1,Object.defineProperty(kt,"__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 kt.default=t,kt}var jt={},Pn;function Xs(){if(Pn)return jt;Pn=1,Object.defineProperty(jt,"__esModule",{value:!0});const e=H(),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 jt.default=n,jt}var Rt={},Sn;function ei(){if(Sn)return Rt;Sn=1,Object.defineProperty(Rt,"__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 Rt.default=t,Rt}var En;function ti(){if(En)return ht;En=1,Object.defineProperty(ht,"__esModule",{value:!0});const e=an(),t=Us(),r=dn(),n=Ks(),o=Js(),s=Hs(),c=Gs(),i=yn(),u=xs(),v=Ws(),$=Bs(),E=Ys(),_=Qs(),g=Zs(),b=Xs(),w=ei();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 ht.default=f,ht}var Ct={},It={},kn;function ri(){if(kn)return It;kn=1,Object.defineProperty(It,"__esModule",{value:!0});const e=H(),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 It.default=r,It}var jn;function ni(){if(jn)return Ct;jn=1,Object.defineProperty(Ct,"__esModule",{value:!0});const t=[ri().default];return Ct.default=t,Ct}var Re={},Rn;function si(){return Rn||(Rn=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.contentVocabulary=Re.metadataVocabulary=void 0,Re.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Re.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Re}var Cn;function ii(){if(Cn)return Xe;Cn=1,Object.defineProperty(Xe,"__esModule",{value:!0});const e=Cs(),t=Fs(),r=ti(),n=ni(),o=si(),s=[e.default,t.default,(0,r.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return Xe.default=s,Xe}var Nt={},Me={},In;function oi(){if(In)return Me;In=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Me.DiscrError=e={})),Me}var Nn;function ai(){if(Nn)return Nt;Nn=1,Object.defineProperty(Nt,"__esModule",{value:!0});const e=H(),t=oi(),r=Bt(),n=Qe(),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 Nt.default=c,Nt}const ci={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var On;function qn(){return On||(On=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=ks(),n=ii(),o=ai(),s=ci,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=We();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return v.KeywordCxt}});var $=H();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=Wt();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return E.default}});var _=Qe();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return _.default}})})(Ue,Ue.exports)),Ue.exports}var di=qn();const ui=lr(di);var Ot={exports:{}},er={},Dn;function li(){return Dn||(Dn=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],oe=+F[2],ae=+F[3],X=F[4],ye=F[5]==="-"?-1:1,M=+(F[6]||0),j=+(F[7]||0);if(M>23||j>59||O&&!X)return!1;if(Q<=23&&oe<=59&&ae<60)return!0;const D=oe-j*ye,C=Q-M*ye-(D<0?1:0);return(C===23||C===-1)&&(D===59||D===-1)&&ae<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,oe]=V.split(E),ae=c(z,Q);if(ae!==void 0)return ae||v(F,oe)}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}}})(er)),er}var tr={},Tn;function fi(){return Tn||(Tn=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=qn(),r=H(),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})(tr)),tr}var Mn;function pi(){return Mn||(Mn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=li(),n=fi(),o=H(),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})(Ot,Ot.exports)),Ot.exports}var mi=pi();const hi=lr(mi),Ae={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CICConfig",definitions: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":"其他"}}')},ce={REQUIRED:"required",TYPE:"type",ENUM:"enum",CONST:"const",ADDITIONAL:"additionalProperties",ANY_OF:"anyOf"},Ve={TYPE:"/type",VALUE:"/value",DEFAULT:"/default",ARGS:"/args"},Ce={missing:e=>`缺少必填字段:${e}`,type:e=>`类型必须为:${e}`,enum:e=>`取值必须为枚举之一:${e.join(", ")}`,const:e=>`取值必须为:${JSON.stringify(e)}`,additionalProp:e=>`不允许额外字段:${e}`,constDefault:"必须等于常量"},yi=[{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 gi(e){const t=e.instancePath||e.path||"",r=e.keyword,n=e.params||{};let o=e.message||"";switch(r){case ce.REQUIRED:n.missingProperty&&(o=Ce.missing(n.missingProperty));break;case ce.TYPE:e.schema&&(o=Ce.type(e.schema));break;case ce.ENUM:Array.isArray(n.allowedValues)&&(o=Ce.enum(n.allowedValues));break;case ce.CONST:o=n.allowedValue!==void 0?Ce.const(n.allowedValue):Ce.constDefault;break;case ce.ADDITIONAL:n.additionalProperty&&(o=Ce.additionalProp(n.additionalProperty));break}return{path:t,message:o,keyword:r,params:n}}function vi(e){return e.map(gi)}function _i(e){const t=[],r=new Map,n=new Set;for(const o of e)if(o.keyword===ce.CONST&&o.path.endsWith(Ve.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:ce.CONST,params:{allowedValue:o.values[0]},message:Ce.const(o.values[0])});else{const s=o.path.replace(new RegExp(`${Ve.TYPE}$`),"");n.add(s)}return{merged:t,multiConstRoots:n}}function $i(e){return`${e.keyword}|${e.path}|${JSON.stringify(e.params??{})}`}function bi(e){const t=new Set,r=[];for(const n of e){const o=$i(n);t.has(o)||(t.add(o),r.push(n))}return r}function wi(e){if(!e)return"";const t=Object.values(Ve).join("|"),r=new RegExp(`^(.*?)(?:${t})(?:$|\\/)`),n=e.match(r);return n?n[1]:e}function Pi(e){const t=new Map;for(const r of e){const n=wi(r.path),o=t.get(n)||[];o.push(r),t.set(n,o)}return t}function Si(e,t){return e.keyword===ce.REQUIRED&&t.keepRequired.includes(e.params?.missingProperty)}function Ei(e,t){const r=e.keyword===ce.TYPE,n=e.path===`${t}${Ve.VALUE}`||e.path===`${t}${Ve.DEFAULT}`;return r&&n}function ki(e,t){return e.keyword===ce.ADDITIONAL&&e.path===t}function ji(e,t){const r=[];for(const[n,o]of e.entries()){const s=yi.find(i=>i.rootPattern.test(n));if(s&&o.some(u=>u.keyword===ce.REQUIRED&&u.params?.missingProperty===s.discriminator)){for(const u of o)Si(u,s)&&r.push(u);continue}if(!t.has(n)){r.push(...o);continue}for(const i of o)Ei(i,n)||ki(i,n)||r.push(i)}return r}function Ri(e){return e.some(r=>r.keyword!==ce.ANY_OF)?e.filter(r=>r.keyword!==ce.ANY_OF):e}function An(e){if(e.keyword===ce.REQUIRED){const t=e.params?.missingProperty;return t==="type"||t==="role"?0:t==="id"?1:2}return 3}function Ci(e){return e.sort((t,r)=>An(t)-An(r))}function ee(e){if(!Array.isArray(e)||e.length===0)return[];const t=vi(e),{merged:r,multiConstRoots:n}=_i(t),o=bi(r),s=Pi(o),c=ji(s,n),i=Ri(c);return Ci(i)}function Ee(e,t){return t?.length?t.map(r=>({...r,path:`${e}${r.path?`.${r.path}`:""}`})):[]}let qt=null;const Vn=()=>(qt||(qt=new ui({allErrors:!0,strict:!1}),hi(qt)),qt),Ln=new Map,Ii=JSON.stringify(Ae),Ni={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"]},Oi=(e,t)=>e.compile({$ref:t,definitions:Ae.definitions,properties:Ae.properties}),te=e=>{const t=Vn(),r=`type:${e}::${Ii}`,n=Ln.get(r);if(n)return n;const o=Ni[e]||[`#/definitions/${e}`,`#/$defs/${e}`];for(const s of o)try{const c=Oi(t,s);return Ln.set(r,c),c}catch{}throw new Error(`VALIDATOR_REF_NOT_FOUND:${e}`)},Le=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,rr=()=>{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)})},he=(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)}`}]}}},qi=e=>e.map(t=>({path:"",keyword:"required",params:{missingProperty:t},message:`缺少必填字段:${t}`})),zn=({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:qi(s)}:{ok:!1,errors:ee(r.errors)}},sr=(e,t,r,n)=>zn({input:e,base:t,branches:r,key:n,missingKeys:[n,"id"],onSuccess:()=>({ok:!0,value:null})}),ir=(e,t,r,n,o,s,c=[s,"id"])=>zn({input:e,normalize:i=>r(i,t),base:n,branches:o,key:s,missingKeys:c,onSuccess:i=>({ok:!0,value:i})}),Fn=te("DataSourceItem"),Un=te("DataSourceRest"),Kn=te("DataSourceWebSocket"),Jn=te("DataSourceStatic"),Hn=te("DataSourceFunction"),Di=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=rr()),r.type&&(r.type==="rest"?(t?.strict||("pollInterval"in r&&Le(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),"timeout"in r&&Le(r.timeout)&&(r.timeout=Math.round(r.timeout))),he(r,t?.defaults)):r.type==="websocket"?(r.heartbeat&&typeof r.heartbeat=="object"&&(t?.strict||"interval"in r.heartbeat&&Le(r.heartbeat.interval)&&(r.heartbeat.interval=Math.round(r.heartbeat.interval))),t?.strict||"pollInterval"in r&&Le(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),he(r,t?.defaults)):r.type==="static"?t?.strict||he(r,t?.defaults):r.type==="function"&&(t?.strict||"timeout"in r&&Le(r.timeout)&&(r.timeout=Math.round(r.timeout)),t?.strict||he(r,t?.defaults))),r},Ti=e=>sr(e,Fn,{rest:Un,websocket:Kn,static:Jn,function:Hn},"type"),Gn=(e,t)=>ir(e,t,Di,Fn,{rest:Un,websocket:Kn,static:Jn,function:Hn},"type",["type","id"]),xn=te("ComponentInstance"),Wn=te("ViewComponentInstance"),Bn=te("ContainerComponentInstance"),Yn=te("LogicComponentInstanceRef"),Mi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=rr()),t?.strict||(r.role==="view"?delete r.children:r.role==="container"?delete r.component:r.role==="logic"&&delete r.children),he(r,t?.defaults),r},Ai=e=>sr(e,xn,{view:Wn,container:Bn,logic:Yn},"role"),Qn=(e,t)=>ir(e,t,Mi,xn,{view:Wn,container:Bn,logic:Yn},"role",["role","id"]),Dt=te("CICPage"),Vi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=rr()),t?.strict||he(r,t?.defaults),r},Li=e=>Dt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Dt.errors||[])},Zn=(e,t)=>{const r=Vi(e,t);return Dt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Dt.errors||[])}},Tt=te("Meta"),Mt=te("Layout"),zi=e=>Tt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Tt.errors||[])},Fi=e=>Mt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Mt.errors||[])},Xn=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Tt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Tt.errors||[])}},es=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Mt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Mt.errors||[])}},At=te("Variables"),Ui=e=>At(e)?{ok:!0,value:null}:{ok:!1,errors:ee(At.errors||[])},ts=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return At(r)?{ok:!0,value:r}:{ok:!1,errors:ee(At.errors||[])}},rs=te("Dependency"),ns=te("JSDependency"),ss=te("CSSDependency"),is=te("FontDependency"),os=te("ImageDependency"),as=te("JSONDependency"),cs=te("WasmDependency"),ds=te("OtherDependency"),Ki=e=>sr(e,rs,{js:ns,css:ss,font:is,image:os,json:as,wasm:cs,other:ds},"type"),us=(e,t)=>ir(e,t,(n,o)=>o?.strict?n:he(n,o?.defaults),rs,{js:ns,css:ss,font:is,image:os,json:as,wasm:cs,other:ds},"type",["type","id"]),Vt=te("RegistryComponents"),Ji=e=>Vt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Vt.errors||[])},ls=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Vt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Vt.errors||[])}},Hi=e=>typeof e=="number"?`[${e}]`:`/${e}`,Gi=()=>{const e=new Map,t=[],r=(...s)=>s.reduce((c,i,u)=>{const v=Hi(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}},xi=(e,t)=>{const r=Gi();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}},Wi=(e,t)=>{const r=xi(e,t);return r.ok?{ok:!0,value:null}:{ok:!1,errors:ee(r.errors)}},Bi=[{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}},{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}},{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}},{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}}];let Lt,fs;const Yi=()=>{const e=Vn(),t=JSON.stringify(Ae);(!Lt||fs!==t)&&(Lt=e.compile(Ae),fs=t)},zt=e=>{try{return Yi(),Lt(e)?Wi(e,Bi):{ok:!1,errors:ee(Lt.errors||[])}}catch(t){return{ok:!1,errors:ee([{path:"",message:t?.message||String(t),keyword:"anyOf",params:{}}])}}},Qi=(e,t)=>{if(e&&typeof e=="object")return ze(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=nr(r);return o.ok?ze(o.value,t):{ok:!1,errors:o.errors}},Zi=async(e,t)=>{if(e&&typeof e=="object")return ze(e,t);const r=(e||"").trim();if(r.startsWith("{")||r.startsWith("[")){const s=nr(r);return s.ok?ze(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=nr(c);return i.ok?ze(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)}}},Xi=e=>{const t=zt(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)}},ze=(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=Xn(r.meta,t?.meta);if(o.ok||n.push(...Ee("/meta",o.errors)),r.meta?.layout){const c=es(r.meta.layout,t?.layout);c.ok?r.meta.layout=c.value:n.push(...Ee("/meta/layout",c.errors))}if(o.ok&&(r.meta=o.value),r.variables){const c=ts(r.variables,t?.variables);c.ok?r.variables=c.value:n.push(...Ee("/variables",c.errors))}if(r.registry?.components){const c=[];for(let i=0;i<r.registry.components.length;i++){const u=ls(r.registry.components[i],t?.registry);u.ok?c.push(u.value):n.push(...Ee(`/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=us(r.deps[i],t?.dependency);u.ok?c.push(u.value):n.push(...Ee(`/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=Zn(u,t?.page);if(!v.ok){n.push(...Ee(`/pages[${i}]`,v.errors));continue}const $=v.value;if(Array.isArray(u.components)){const E=[];for(let _=0;_<u.components.length;_++){const g=Qn(u.components[_],t?.component);g.ok?E.push(g.value):n.push(...Ee(`/pages[${i}]/components[${_}]`,g.errors))}$.components=E}if(Array.isArray(u.dataSources)){const E=[];for(let _=0;_<u.dataSources.length;_++){const g=Gn(u.dataSources[_],t?.dataSource);g.ok?E.push(g.value):n.push(...Ee(`/pages[${i}]/dataSources[${_}]`,g.errors))}$.dataSources=E}c.push($)}r.pages=c}if(n.length)return{ok:!1,errors:ee(n)};const s=zt(r);return s.ok?{ok:!0,value:r}:{ok:!1,errors:s.errors}};var _e=(e=>(e.Pending="pending",e.Loading="loading",e.Loaded="loaded",e.Failed="failed",e))(_e||{});function eo(e,t){return Promise.race([e,new Promise((r,n)=>setTimeout(()=>n(new Error("Load timeout")),t))])}function to(e){return new Promise(t=>setTimeout(t,e))}function ro(e){try{return new Function("return "+e)()}catch{return!1}}function no(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===_e.Loaded)return s}if(this.loading.has(t.id))return this.loading.get(t.id);if(t.strategy?.when&&!ro(t.strategy.when))return{id:t.id,status:_e.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 eo(c.load(t,r),r.timeout);return v.duration=n()-o,await r.onAfterLoad(v),v}catch(v){s=v,u<r.retry&&await to(Math.pow(2,u)*1e3)}const i={id:t.id,status:_e.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=no(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??_e.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:_e.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:_e.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 io{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:_e.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 oo{async load(t){return new Promise((r,n)=>{const o=new Image;o.onload=()=>{r({id:t.id,status:_e.Loaded,data:o})},o.onerror=()=>{n(new Error(`Failed to load image: ${t.url||t.localPath}`))},o.src=t.url||t.localPath||""})}}class ao{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:_e.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 io),t.registerLoader("image",new oo),t.registerLoader("json",new ao),t}function co(e){return new ps(e)}let or=null;function uo(e){return or||(or=ms(e)),or}class lo{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 fo={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:{}},po={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"}}}},mo={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"}}]}},ho={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 ar extends qe{constructor(t){const r=zt(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&&ar.traverseTree(s.children,r,s)}static createDataSource=Gn;static validateDataSource=Ti;static createComponent=Qn;static validateComponent=Ai;static createPage=Zn;static validatePage=Li;static createMeta=Xn;static createLayout=es;static validateMeta=zi;static validateLayout=Fi;static createVariables=ts;static validateVariables=Ui;static createDependency=us;static validateDependency=Ki;static createRegistryComponent=ls;static validateRegistryComponent=Ji;static importCIC=Qi;static exportCIC=Xi;static validateCIC=zt;static importCICAsync=Zi;static createDependencyLoader=ms;static createBareLoader=co;static getDependencyLoaderSingleton=uo;static Render=lo}ve.CICManifestExample=fo,ve.CICManifestMiniProgram=ho,ve.CICManifestMinimal=po,ve.CICManifestReact=mo,ve.CICSDK=ar,Object.defineProperty(ve,Symbol.toStringTag,{value:"Module"})}));
|
|
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})(er)),er}var $t={},yn;function Ys(){if(yn)return $t;yn=1,Object.defineProperty($t,"__esModule",{value:!0});const e=H(),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 $t.default=n,$t}var bt={},gn;function vn(){if(gn)return bt;gn=1,Object.defineProperty(bt,"__esModule",{value:!0});const e=me(),t=H(),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 P;if(w.length>8){const N=(0,n.schemaRefOrVal)(m,_.properties,"properties");P=(0,e.isOwnProperty)(o,N,g)}else w.length?P=(0,t.or)(...w.map(N=>(0,t._)`${g} === ${N}`)):P=t.nil;return d.length&&(P=(0,t.or)(P,...d.map(N=>(0,t._)`${(0,e.usePattern)(c,N)}.test(${g})`))),(0,t.not)(P)}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 P=o.name("valid");b.removeAdditional==="failing"?(u(g,P,!1),o.if((0,t.not)(P),()=>{c.reset(),l(g)})):(u(g,P),v||o.if((0,t.not)(P),()=>o.break()))}}function u(g,P,N){const T={keyword:"additionalProperties",dataProp:g,dataPropType:n.Type.Str};N===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(T,P)}}};return bt.default=s,bt}var wt={},_n;function Qs(){if(_n)return wt;_n=1,Object.defineProperty(wt,"__esModule",{value:!0});const e=Be(),t=me(),r=B(),n=vn(),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 wt.default=i,wt}var Pt={},$n;function Zs(){if($n)return Pt;$n=1,Object.defineProperty(Pt,"__esModule",{value:!0});const e=me(),t=H(),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 Pt.default=i,Pt}var St={},bn;function Xs(){if(bn)return St;bn=1,Object.defineProperty(St,"__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 St.default=t,St}var Et={},wn;function ei(){if(wn)return Et;wn=1,Object.defineProperty(Et,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:me().validateUnion,error:{message:"must match a schema in anyOf"}};return Et.default=t,Et}var kt={},Pn;function ti(){if(Pn)return kt;Pn=1,Object.defineProperty(kt,"__esModule",{value:!0});const e=H(),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 kt.default=n,kt}var jt={},Sn;function ri(){if(Sn)return jt;Sn=1,Object.defineProperty(jt,"__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 jt.default=t,jt}var Rt={},En;function ni(){if(En)return Rt;En=1,Object.defineProperty(Rt,"__esModule",{value:!0});const e=H(),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 Rt.default=n,Rt}var Ct={},kn;function si(){if(kn)return Ct;kn=1,Object.defineProperty(Ct,"__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 Ct.default=t,Ct}var jn;function ii(){if(jn)return yt;jn=1,Object.defineProperty(yt,"__esModule",{value:!0});const e=dn(),t=xs(),r=ln(),n=Ws(),i=Gs(),s=Bs(),c=Ys(),o=vn(),f=Qs(),_=Zs(),$=Xs(),E=ei(),m=ti(),v=ri(),b=ni(),w=si();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 yt.default=d,yt}var Nt={},It={},Rn;function oi(){if(Rn)return It;Rn=1,Object.defineProperty(It,"__esModule",{value:!0});const e=H(),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 P=v.$async?(0,e._)`(${a}.async ? await ${y}(${c}) : ${y}(${c}))`:(0,e._)`${y}(${c})`,N=(0,e._)`(typeof ${y} == "function" ? ${P} : ${y}.test(${c}))`;return(0,e._)`${y} && ${y} !== true && ${l} === ${i} && !${N}`}}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(P());function u(){if(E.strictSchema===!1){b.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${f}" ignored in schema at path "${m}"`}}function g(N){const T=N instanceof RegExp?(0,e.regexpCode)(N):E.code.formats?(0,e._)`${E.code.formats}${(0,e.getProperty)(f)}`:void 0,L=s.scopeValue("formats",{key:f,ref:N,code:T});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,e._)`${L}.validate`]:["string",N,L]}function P(){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 It.default=r,It}var Cn;function ai(){if(Cn)return Nt;Cn=1,Object.defineProperty(Nt,"__esModule",{value:!0});const t=[oi().default];return Nt.default=t,Nt}var Re={},Nn;function ci(){return Nn||(Nn=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.contentVocabulary=Re.metadataVocabulary=void 0,Re.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Re.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Re}var In;function di(){if(In)return et;In=1,Object.defineProperty(et,"__esModule",{value:!0});const e=qs(),t=Hs(),r=ii(),n=ai(),i=ci(),s=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return et.default=s,et}var Ot={},Me={},On;function ui(){if(On)return Me;On=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Me.DiscrError=e={})),Me}var qn;function li(){if(qn)return Ot;qn=1,Object.defineProperty(Ot,"__esModule",{value:!0});const e=H(),t=ui(),r=Yt(),n=Ze(),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=N(E);let P=!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}"`);P=P&&(g||N(V)),T(z,O)}if(!P)throw new Error(`discriminator: "${b}" must be required`);return u;function N({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 Ot.default=c,Ot}const fi={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Dn;function Tn(){return Dn||(Dn=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=Ns(),n=di(),i=li(),s=fi,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 _=Be();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var $=H();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=Bt();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return E.default}});var m=Ze();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(Ke,Ke.exports)),Ke.exports}var pi=Tn();const mi=pr(pi);var qt={exports:{}},tr={},Mn;function hi(){return Mn||(Mn=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:P},float:{type:"number",validate:N},double:{type:"number",validate:N},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],oe=+U[2],ae=+U[3],X=U[4],ye=U[5]==="-"?-1:1,M=+(U[6]||0),j=+(U[7]||0);if(M>23||j>59||O&&!X)return!1;if(Q<=23&&oe<=59&&ae<60)return!0;const D=oe-j*ye,C=Q-M*ye-(D<0?1:0);return(C===23||C===-1)&&(D===59||D===-1)&&ae<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,oe]=V.split(E),ae=c(z,Q);if(ae!==void 0)return ae||_(U,oe)}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 P(O){return Number.isInteger(O)}function N(){return!0}const T=/[^\\]\\Z/;function L(O){if(T.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}})(tr)),tr}var rr={},An;function yi(){return An||(An=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=Tn(),r=H(),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})(rr)),rr}var Vn;function gi(){return Vn||(Vn=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=hi(),n=yi(),i=H(),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})(qt,qt.exports)),qt.exports}var vi=gi();const _i=pr(vi),Ae={$schema:"http://json-schema.org/draft-07/schema#",$ref:"#/definitions/CICConfig",definitions: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":"其他"}}')},ce={REQUIRED:"required",TYPE:"type",ENUM:"enum",CONST:"const",ADDITIONAL:"additionalProperties",ANY_OF:"anyOf"},Ve={TYPE:"/type",VALUE:"/value",DEFAULT:"/default",ARGS:"/args"},Ce={missing:e=>`缺少必填字段:${e}`,type:e=>`类型必须为:${e}`,enum:e=>`取值必须为枚举之一:${e.join(", ")}`,const:e=>`取值必须为:${JSON.stringify(e)}`,additionalProp:e=>`不允许额外字段:${e}`,constDefault:"必须等于常量"},$i=[{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 bi(e){const t=e.instancePath||e.path||"",r=e.keyword,n=e.params||{};let i=e.message||"";switch(r){case ce.REQUIRED:n.missingProperty&&(i=Ce.missing(n.missingProperty));break;case ce.TYPE:e.schema&&(i=Ce.type(e.schema));break;case ce.ENUM:Array.isArray(n.allowedValues)&&(i=Ce.enum(n.allowedValues));break;case ce.CONST:i=n.allowedValue!==void 0?Ce.const(n.allowedValue):Ce.constDefault;break;case ce.ADDITIONAL:n.additionalProperty&&(i=Ce.additionalProp(n.additionalProperty));break}return{path:t,message:i,keyword:r,params:n}}function wi(e){return e.map(bi)}function Pi(e){const t=[],r=new Map,n=new Set;for(const i of e)if(i.keyword===ce.CONST&&i.path.endsWith(Ve.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:ce.CONST,params:{allowedValue:i.values[0]},message:Ce.const(i.values[0])});else{const s=i.path.replace(new RegExp(`${Ve.TYPE}$`),"");n.add(s)}return{merged:t,multiConstRoots:n}}function Si(e){return`${e.keyword}|${e.path}|${JSON.stringify(e.params??{})}`}function Ei(e){const t=new Set,r=[];for(const n of e){const i=Si(n);t.has(i)||(t.add(i),r.push(n))}return r}function ki(e){if(!e)return"";const t=Object.values(Ve).join("|"),r=new RegExp(`^(.*?)(?:${t})(?:$|\\/)`),n=e.match(r);return n?n[1]:e}function ji(e){const t=new Map;for(const r of e){const n=ki(r.path),i=t.get(n)||[];i.push(r),t.set(n,i)}return t}function Ri(e,t){return e.keyword===ce.REQUIRED&&t.keepRequired.includes(e.params?.missingProperty)}function Ci(e,t){const r=e.keyword===ce.TYPE,n=e.path===`${t}${Ve.VALUE}`||e.path===`${t}${Ve.DEFAULT}`;return r&&n}function Ni(e,t){return e.keyword===ce.ADDITIONAL&&e.path===t}function Ii(e,t){const r=[];for(const[n,i]of e.entries()){const s=$i.find(o=>o.rootPattern.test(n));if(s&&i.some(f=>f.keyword===ce.REQUIRED&&f.params?.missingProperty===s.discriminator)){for(const f of i)Ri(f,s)&&r.push(f);continue}if(!t.has(n)){r.push(...i);continue}for(const o of i)Ci(o,n)||Ni(o,n)||r.push(o)}return r}function Oi(e){return e.some(r=>r.keyword!==ce.ANY_OF)?e.filter(r=>r.keyword!==ce.ANY_OF):e}function Ln(e){if(e.keyword===ce.REQUIRED){const t=e.params?.missingProperty;return t==="type"||t==="role"?0:t==="id"?1:2}return 3}function qi(e){return e.sort((t,r)=>Ln(t)-Ln(r))}function ee(e){if(!Array.isArray(e)||e.length===0)return[];const t=wi(e),{merged:r,multiConstRoots:n}=Pi(t),i=Ei(r),s=ji(i),c=Ii(s,n),o=Oi(c);return qi(o)}function Ee(e,t){return t?.length?t.map(r=>({...r,path:`${e}${r.path?`.${r.path}`:""}`})):[]}let Dt=null;const zn=()=>(Dt||(Dt=new mi({allErrors:!0,strict:!1}),_i(Dt)),Dt),Un=new Map,Di=JSON.stringify(Ae),Ti={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"]},Mi=(e,t)=>e.compile({$ref:t,definitions:Ae.definitions,properties:Ae.properties}),te=e=>{const t=zn(),r=`type:${e}::${Di}`,n=Un.get(r);if(n)return n;const i=Ti[e]||[`#/definitions/${e}`,`#/$defs/${e}`];for(const s of i)try{const c=Mi(t,s);return Un.set(r,c),c}catch{}throw new Error(`VALIDATOR_REF_NOT_FOUND:${e}`)},Le=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,nr=()=>{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)})},he=(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},sr=e=>{try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,errors:[{path:"",keyword:"type",message:`JSON 解析失败:${t?.message??String(t)}`}]}}},Ai=e=>e.map(t=>({path:"",keyword:"required",params:{missingProperty:t},message:`缺少必填字段:${t}`})),Fn=({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:Ai(s)}:{ok:!1,errors:ee(r.errors)}},ir=(e,t,r,n)=>Fn({input:e,base:t,branches:r,key:n,missingKeys:[n,"id"],onSuccess:()=>({ok:!0,value:null})}),or=(e,t,r,n,i,s,c=[s,"id"])=>Fn({input:e,normalize:o=>r(o,t),base:n,branches:i,key:s,missingKeys:c,onSuccess:o=>({ok:!0,value:o})}),Kn=te("DataSourceItem"),Jn=te("DataSourceRest"),Hn=te("DataSourceWebSocket"),xn=te("DataSourceStatic"),Wn=te("DataSourceFunction"),Vi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=nr()),r.type&&(r.type==="rest"?(t?.strict||("pollInterval"in r&&Le(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),"timeout"in r&&Le(r.timeout)&&(r.timeout=Math.round(r.timeout))),he(r,t?.defaults)):r.type==="websocket"?(r.heartbeat&&typeof r.heartbeat=="object"&&(t?.strict||"interval"in r.heartbeat&&Le(r.heartbeat.interval)&&(r.heartbeat.interval=Math.round(r.heartbeat.interval))),t?.strict||"pollInterval"in r&&Le(r.pollInterval)&&(r.pollInterval=Math.round(r.pollInterval)),he(r,t?.defaults)):r.type==="static"?t?.strict||he(r,t?.defaults):r.type==="function"&&(t?.strict||"timeout"in r&&Le(r.timeout)&&(r.timeout=Math.round(r.timeout)),t?.strict||he(r,t?.defaults))),r},Li=e=>ir(e,Kn,{rest:Jn,websocket:Hn,static:xn,function:Wn},"type"),Gn=(e,t)=>or(e,t,Vi,Kn,{rest:Jn,websocket:Hn,static:xn,function:Wn},"type",["type","id"]),Bn=te("ComponentInstance"),Yn=te("ViewComponentInstance"),Qn=te("ContainerComponentInstance"),Zn=te("LogicComponentInstanceRef"),zi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=nr()),t?.strict||(r.role==="view"?delete r.children:r.role==="container"?delete r.component:r.role==="logic"&&delete r.children),he(r,t?.defaults),r},Ui=e=>ir(e,Bn,{view:Yn,container:Qn,logic:Zn},"role"),Xn=(e,t)=>or(e,t,zi,Bn,{view:Yn,container:Qn,logic:Zn},"role",["role","id"]),Tt=te("CICPage"),Fi=(e,t)=>{const r={...e};return t?.generateId&&!r.id&&(r.id=nr()),t?.strict||he(r,t?.defaults),r},Ki=e=>Tt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Tt.errors||[])},es=(e,t)=>{const r=Fi(e,t);return Tt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Tt.errors||[])}},Mt=te("Meta"),At=te("Layout"),Ji=e=>Mt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Mt.errors||[])},Hi=e=>At(e)?{ok:!0,value:null}:{ok:!1,errors:ee(At.errors||[])},ts=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Mt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Mt.errors||[])}},rs=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return At(r)?{ok:!0,value:r}:{ok:!1,errors:ee(At.errors||[])}},Vt=te("Variables"),xi=e=>Vt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Vt.errors||[])},ns=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Vt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Vt.errors||[])}},ss=te("Dependency"),is=te("JSDependency"),os=te("CSSDependency"),as=te("FontDependency"),cs=te("ImageDependency"),ds=te("JSONDependency"),us=te("WasmDependency"),ls=te("OtherDependency"),Wi=e=>ir(e,ss,{js:is,css:os,font:as,image:cs,json:ds,wasm:us,other:ls},"type"),fs=(e,t)=>or(e,t,(n,i)=>i?.strict?n:he(n,i?.defaults),ss,{js:is,css:os,font:as,image:cs,json:ds,wasm:us,other:ls},"type",["type","id"]),Lt=te("RegistryComponents"),Gi=e=>Lt(e)?{ok:!0,value:null}:{ok:!1,errors:ee(Lt.errors||[])},ps=(e,t)=>{const r=t?.strict?e:he(e,t?.defaults);return Lt(r)?{ok:!0,value:r}:{ok:!1,errors:ee(Lt.errors||[])}},Bi=e=>typeof e=="number"?`[${e}]`:`/${e}`,Yi=()=>{const e=new Map,t=[],r=(...s)=>s.reduce((c,o,f)=>{const _=Bi(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}},Qi=(e,t)=>{const r=Yi();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}},Zi=(e,t)=>{const r=Qi(e,t);return r.ok?{ok:!0,value:null}:{ok:!1,errors:ee(r.errors)}},Xi=[{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}},{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}},{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}},{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}}];let zt,ms;const eo=()=>{const e=zn(),t=JSON.stringify(Ae);(!zt||ms!==t)&&(zt=e.compile(Ae),ms=t)},Ut=e=>{try{return eo(),zt(e)?Zi(e,Xi):{ok:!1,errors:ee(zt.errors||[])}}catch(t){return{ok:!1,errors:ee([{path:"",message:t?.message||String(t),keyword:"anyOf",params:{}}])}}},to=(e,t)=>{if(e&&typeof e=="object")return ze(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=sr(r);return i.ok?ze(i.value,t):{ok:!1,errors:i.errors}},ro=async(e,t)=>{if(e&&typeof e=="object")return ze(e,t);const r=(e||"").trim();if(r.startsWith("{")||r.startsWith("[")){const s=sr(r);return s.ok?ze(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=sr(c);return o.ok?ze(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)}}},no=e=>{const t=Ut(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)}},ze=(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=ts(r.meta,t?.meta);if(i.ok||n.push(...Ee("/meta",i.errors)),r.meta?.layout){const c=rs(r.meta.layout,t?.layout);c.ok?r.meta.layout=c.value:n.push(...Ee("/meta/layout",c.errors))}if(i.ok&&(r.meta=i.value),r.variables){const c=ns(r.variables,t?.variables);c.ok?r.variables=c.value:n.push(...Ee("/variables",c.errors))}if(r.registry?.components){const c=[];for(let o=0;o<r.registry.components.length;o++){const f=ps(r.registry.components[o],t?.registry);f.ok?c.push(f.value):n.push(...Ee(`/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=fs(r.deps[o],t?.dependency);f.ok?c.push(f.value):n.push(...Ee(`/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],_=es(f,t?.page);if(!_.ok){n.push(...Ee(`/pages[${o}]`,_.errors));continue}const $=_.value;if(Array.isArray(f.components)){const E=[];for(let m=0;m<f.components.length;m++){const v=Xn(f.components[m],t?.component);v.ok?E.push(v.value):n.push(...Ee(`/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=Gn(f.dataSources[m],t?.dataSource);v.ok?E.push(v.value):n.push(...Ee(`/pages[${o}]/dataSources[${m}]`,v.errors))}$.dataSources=E}c.push($)}r.pages=c}if(n.length)return{ok:!1,errors:ee(n)};const s=Ut(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 so(e,t){return Promise.race([e,new Promise((r,n)=>setTimeout(()=>n(new Error("Load timeout")),t))])}function io(e){return new Promise(t=>setTimeout(t,e))}function oo(e){try{return new Function("return "+e)()}catch{return!1}}function ao(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 hs{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&&!oo(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 so(c.load(t,r),r.timeout);return _.duration=n()-i,await r.onAfterLoad(_),_}catch(_){s=_,f<r.retry&&await io(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=ao(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 co{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 uo{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 lo{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 fo{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 ys(e){const t=new hs(e);return t.registerLoader("js",new co),t.registerLoader("css",new uo),t.registerLoader("image",new lo),t.registerLoader("json",new fo),t}function po(e){return new hs(e)}let ar=null;function mo(e){return ar||(ar=ys(e)),ar}class ho{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 cr(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 yo(e,t){if(!t||!e)return"unknown";if(t.startsWith("^")){const n=t.slice(1),i=cr(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=cr(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=cr(e,t);return r===void 0?"unknown":r===0?"yes":"no"}function go(e){const t=globalThis;return e.split(".").reduce((r,n)=>r?.[n],t)}function vo(e){return e==="importmap"?"esm":e==="global"?"global":"both"}function Ue(e,t){if(e==="development")return t.src;if(t.prodSrc!==null)return t.prodSrc??t.src}function _o(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 $o(e){return`data:text/javascript;charset=utf-8,${encodeURIComponent(e)}`}function gs(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`),$o(n.join(`
|
|
9
|
+
`))}function bo(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 wo(e,t,r){return{id:e,strategy:"skipped",providedVersion:t,requiredVersion:r,versionSatisfied:yo(t,r),warnings:[]}}function vs(e,t){const r=e.importMap?.imports||{},n=e.importMap?.scopes,i={},s=bo(t.modules.alias),c=[],o=t.modules.requires||[];for(const m of o){const v=m.required??!0,b=m.consume??vo(t.modules.strategy),w=e.provides[m.id],d=wo(m.id,w?.version,m.version);if(!w){const l=m.global||m.id;if(go(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=Ue(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=gs(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=Ue(e.engine.mode,a);d.strategy="direct-global",d.finalWindowKey=m.global||a.window||m.id,d.finalUrl=l}else if(p){const l=Ue(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=Ue(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=gs(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=Ue(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:_o(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 Po(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 So={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"}},Eo={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 dr extends qe{constructor(t){const r=Ut(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&&dr.traverseTree(s.children,r,s)}static createDataSource=Gn;static validateDataSource=Li;static createComponent=Xn;static validateComponent=Ui;static createPage=es;static validatePage=Ki;static createMeta=ts;static createLayout=rs;static validateMeta=Ji;static validateLayout=Hi;static createVariables=ns;static validateVariables=xi;static createDependency=fs;static validateDependency=Wi;static createRegistryComponent=ps;static validateRegistryComponent=Gi;static importCIC=to;static exportCIC=no;static validateCIC=Ut;static importCICAsync=ro;static createDependencyLoader=ys;static createBareLoader=po;static getDependencyLoaderSingleton=mo;static Render=ho;static resolveManifest=vs;static createManifestLoader=Po}we.CICManifestExample=So,we.CICSDK=dr,we.RuntimeManifestExample=Eo,Object.defineProperty(we,Symbol.toStringTag,{value:"Module"})}));
|