@reformer/builder 1.0.0-beta.2 → 1.0.0-beta.3

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.
Files changed (57) hide show
  1. package/README.md +40 -2
  2. package/dist/assets/App-DhfnN2PQ.js +1147 -0
  3. package/dist/assets/BootError-BsY6cGIZ.js +1 -0
  4. package/dist/assets/CodeEditor-JLfxhhe0.js +2 -0
  5. package/dist/assets/RawJsonEditor-57g0Rm7H.js +1 -0
  6. package/dist/assets/boot-BWxMqNgc.js +2 -0
  7. package/dist/assets/{freemarker2-tfw_pRan.js → freemarker2-DbCqF1ZC.js} +2 -2
  8. package/dist/assets/handlebars-DSBoIGTo.js +1 -0
  9. package/dist/assets/html-CWy7OEeC.js +1 -0
  10. package/dist/assets/index-BLGbxQaR.js +104 -0
  11. package/dist/assets/index-BfbmpSTa.js +11 -0
  12. package/dist/assets/index-Bnp0iuTg.js +3 -0
  13. package/dist/assets/index-Bv1xwgY8.js +10 -0
  14. package/dist/assets/index-Crsub4wy.js +5028 -0
  15. package/dist/assets/index-DIgOR-JL.css +1 -0
  16. package/dist/assets/index-DzAasWzr.css +1 -0
  17. package/dist/assets/index-IJIJTAKu.js +68 -0
  18. package/dist/assets/index-IZOejzqt.js +4709 -0
  19. package/dist/assets/index-sBr0hAnB.js +1 -0
  20. package/dist/assets/javascript-DUf-ZLKm.js +1 -0
  21. package/dist/assets/{jsonMode-Aya4lOGs.js → jsonMode-Brz11yjF.js} +3 -3
  22. package/dist/assets/liquid-CvvhoEw5.js +1 -0
  23. package/dist/assets/load-B8MFuNhL.js +11 -0
  24. package/dist/assets/mdx-DvF3MtVm.js +1 -0
  25. package/dist/assets/{monaco-setup-B6kwd_0J.js → monaco-setup-D3b3uU6s.js} +34 -34
  26. package/dist/assets/python-PPnkm6ew.js +1 -0
  27. package/dist/assets/razor-ByKZ6TkS.js +1 -0
  28. package/dist/assets/reformer-ui-kit-11-CeSX1KRr.js +1 -0
  29. package/dist/assets/reformer-ui-kit-CzN5mDMr.js +1 -0
  30. package/dist/assets/typescript-CwhzuadN.js +1 -0
  31. package/dist/assets/typescript-DZSqjTqg.js +433 -0
  32. package/dist/assets/useFormField-BLbvmpme-gc2657u6.js +1 -0
  33. package/dist/assets/xml-CKD6Y3PR.js +1 -0
  34. package/dist/assets/yaml-FlNIn5wo.js +1 -0
  35. package/dist/index.html +2 -2
  36. package/package.json +5 -1
  37. package/runtime-config.schema.json +7 -2
  38. package/dist/assets/App-DvLyYXtZ.js +0 -897
  39. package/dist/assets/BootError-ps-fllml.js +0 -1
  40. package/dist/assets/CodeEditor-CX-m-nEs.js +0 -2
  41. package/dist/assets/RawJsonEditor-CY7IUmDp.js +0 -1
  42. package/dist/assets/boot-CuZxg0HF.js +0 -1
  43. package/dist/assets/contract-B3HSgIc9.js +0 -9
  44. package/dist/assets/handlebars-DBfGlcms.js +0 -1
  45. package/dist/assets/html-Dngeqtjy.js +0 -1
  46. package/dist/assets/index-BCoy6hGR.css +0 -1
  47. package/dist/assets/index-C-GU80Rf.js +0 -10
  48. package/dist/assets/javascript-DnPmr6xA.js +0 -1
  49. package/dist/assets/liquid-C4xaioHY.js +0 -1
  50. package/dist/assets/load-XqAV88cm.js +0 -3
  51. package/dist/assets/mdx-CCZI-lp7.js +0 -1
  52. package/dist/assets/python-CJHezmLq.js +0 -1
  53. package/dist/assets/razor-CK3JWDE6.js +0 -1
  54. package/dist/assets/typescript-WN4cheQs.js +0 -1
  55. package/dist/assets/validate-Dx8tWiBg.js +0 -8
  56. package/dist/assets/xml-C-RWR0G6.js +0 -1
  57. package/dist/assets/yaml-lg5xL1Wa.js +0 -1
@@ -1,9 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/validate-Dx8tWiBg.js","assets/index-C-GU80Rf.js","assets/index-BCoy6hGR.css"])))=>i.map(i=>d[i]);
2
- import{g as ci,W as di,r as D,j as K,_ as ui}from"./index-C-GU80Rf.js";var at={exports:{}},mr={},we={},je={},yr={},gr={},vr={},Hr;function Wt(){return Hr||(Hr=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(s){if(super(),!t.IDENTIFIER.test(s))throw new Error("CodeGen: name must be a valid identifier");this.str=s}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(s){super(),this._items=typeof s=="string"?[s]:s}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const s=this._items[0];return s===""||s==='""'}get str(){var s;return(s=this._str)!==null&&s!==void 0?s:this._str=this._items.reduce((p,$)=>`${p}${$}`,"")}get names(){var s;return(s=this._names)!==null&&s!==void 0?s:this._names=this._items.reduce((p,$)=>($ instanceof r&&(p[$.str]=(p[$.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function i(f,...s){const p=[f[0]];let $=0;for(;$<s.length;)l(p,s[$]),p.push(f[++$]);return new n(p)}t._=i;const o=new n("+");function a(f,...s){const p=[v(f[0])];let $=0;for(;$<s.length;)p.push(o),l(p,s[$]),p.push(o,v(f[++$]));return u(p),new n(p)}t.str=a;function l(f,s){s instanceof n?f.push(...s._items):s instanceof r?f.push(s):f.push(w(s))}t.addCodeArg=l;function u(f){let s=1;for(;s<f.length-1;){if(f[s]===o){const p=S(f[s-1],f[s+1]);if(p!==void 0){f.splice(s-1,3,p);continue}f[s++]="+"}s++}}function S(f,s){if(s==='""')return f;if(f==='""')return s;if(typeof f=="string")return s instanceof r||f[f.length-1]!=='"'?void 0:typeof s!="string"?`${f.slice(0,-1)}${s}"`:s[0]==='"'?f.slice(0,-1)+s.slice(1):void 0;if(typeof s=="string"&&s[0]==='"'&&!(f instanceof r))return`"${f}${s.slice(1)}`}function g(f,s){return s.emptyStr()?f:f.emptyStr()?s:a`${f}${s}`}t.strConcat=g;function w(f){return typeof f=="number"||typeof f=="boolean"||f===null?f:v(Array.isArray(f)?f.join(","):f)}function b(f){return new n(v(f))}t.stringify=b;function v(f){return JSON.stringify(f).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=v;function y(f){return typeof f=="string"&&t.IDENTIFIER.test(f)?new n(`.${f}`):i`[${f}]`}t.getProperty=y;function _(f){if(typeof f=="string"&&t.IDENTIFIER.test(f))return new n(`${f}`);throw new Error(`CodeGen: invalid export name: ${f}, use explicit $id name mapping`)}t.getEsmExportName=_;function d(f){return new n(f.toString())}t.regexpCode=d})(vr)),vr}var br={},Wr;function Jr(){return Wr||(Wr=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Wt();class r extends Error{constructor(S){super(`CodeGen: "code" for ${S} not defined`),this.value=S.value}}var n;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class i{constructor({prefixes:S,parent:g}={}){this._names={},this._prefixes=S,this._parent=g}toName(S){return S instanceof e.Name?S:this.name(S)}name(S){return new e.Name(this._newName(S))}_newName(S){const g=this._names[S]||this._nameGroup(S);return`${S}${g.index++}`}_nameGroup(S){var g,w;if(!((w=(g=this._parent)===null||g===void 0?void 0:g._prefixes)===null||w===void 0)&&w.has(S)||this._prefixes&&!this._prefixes.has(S))throw new Error(`CodeGen: prefix "${S}" is not allowed in this scope`);return this._names[S]={prefix:S,index:0}}}t.Scope=i;class o extends e.Name{constructor(S,g){super(g),this.prefix=S}setValue(S,{property:g,itemIndex:w}){this.value=S,this.scopePath=(0,e._)`.${new e.Name(g)}[${w}]`}}t.ValueScopeName=o;const a=(0,e._)`\n`;class l extends i{constructor(S){super(S),this._values={},this._scope=S.scope,this.opts={...S,_n:S.lines?a:e.nil}}get(){return this._scope}name(S){return new o(S,this._newName(S))}value(S,g){var w;if(g.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const b=this.toName(S),{prefix:v}=b,y=(w=g.key)!==null&&w!==void 0?w:g.ref;let _=this._values[v];if(_){const s=_.get(y);if(s)return s}else _=this._values[v]=new Map;_.set(y,b);const d=this._scope[v]||(this._scope[v]=[]),f=d.length;return d[f]=g.ref,b.setValue(g,{property:v,itemIndex:f}),b}getValue(S,g){const w=this._values[S];if(w)return w.get(g)}scopeRefs(S,g=this._values){return this._reduceValues(g,w=>{if(w.scopePath===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return(0,e._)`${S}${w.scopePath}`})}scopeCode(S=this._values,g,w){return this._reduceValues(S,b=>{if(b.value===void 0)throw new Error(`CodeGen: name "${b}" has no value`);return b.value.code},g,w)}_reduceValues(S,g,w={},b){let v=e.nil;for(const y in S){const _=S[y];if(!_)continue;const d=w[y]=w[y]||new Map;_.forEach(f=>{if(d.has(f))return;d.set(f,n.Started);let s=g(f);if(s){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;v=(0,e._)`${v}${p} ${f} = ${s};${this.opts._n}`}else if(s=b?.(f))v=(0,e._)`${v}${s}${this.opts._n}`;else throw new r(f);d.set(f,n.Completed)})}return v}}t.ValueScope=l})(br)),br}var Zr;function W(){return Zr||(Zr=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Wt(),r=Jr();var n=Wt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var i=Jr();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(m,k){return this}}class a extends o{constructor(m,k,T){super(),this.varKind=m,this.name=k,this.rhs=T}render({es5:m,_n:k}){const T=m?r.varKinds.var:this.varKind,V=this.rhs===void 0?"":` = ${this.rhs}`;return`${T} ${this.name}${V};`+k}optimizeNames(m,k){if(m[this.name.str])return this.rhs&&(this.rhs=Y(this.rhs,m,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends o{constructor(m,k,T){super(),this.lhs=m,this.rhs=k,this.sideEffects=T}render({_n:m}){return`${this.lhs} = ${this.rhs};`+m}optimizeNames(m,k){if(!(this.lhs instanceof e.Name&&!m[this.lhs.str]&&!this.sideEffects))return this.rhs=Y(this.rhs,m,k),this}get names(){const m=this.lhs instanceof e.Name?{}:{...this.lhs.names};return z(m,this.rhs)}}class u extends l{constructor(m,k,T,V){super(m,T,V),this.op=k}render({_n:m}){return`${this.lhs} ${this.op}= ${this.rhs};`+m}}class S extends o{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`${this.label}:`+m}}class g extends o{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`break${this.label?` ${this.label}`:""};`+m}}class w extends o{constructor(m){super(),this.error=m}render({_n:m}){return`throw ${this.error};`+m}get names(){return this.error.names}}class b extends o{constructor(m){super(),this.code=m}render({_n:m}){return`${this.code};`+m}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(m,k){return this.code=Y(this.code,m,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class v extends o{constructor(m=[]){super(),this.nodes=m}render(m){return this.nodes.reduce((k,T)=>k+T.render(m),"")}optimizeNodes(){const{nodes:m}=this;let k=m.length;for(;k--;){const T=m[k].optimizeNodes();Array.isArray(T)?m.splice(k,1,...T):T?m[k]=T:m.splice(k,1)}return m.length>0?this:void 0}optimizeNames(m,k){const{nodes:T}=this;let V=T.length;for(;V--;){const L=T[V];L.optimizeNames(m,k)||(ie(m,L.names),T.splice(V,1))}return T.length>0?this:void 0}get names(){return this.nodes.reduce((m,k)=>U(m,k.names),{})}}class y extends v{render(m){return"{"+m._n+super.render(m)+"}"+m._n}}class _ extends v{}class d extends y{}d.kind="else";class f extends y{constructor(m,k){super(k),this.condition=m}render(m){let k=`if(${this.condition})`+super.render(m);return this.else&&(k+="else "+this.else.render(m)),k}optimizeNodes(){super.optimizeNodes();const m=this.condition;if(m===!0)return this.nodes;let k=this.else;if(k){const T=k.optimizeNodes();k=this.else=Array.isArray(T)?new d(T):T}if(k)return m===!1?k instanceof f?k:k.nodes:this.nodes.length?this:new f(Se(m),k instanceof f?[k]:k.nodes);if(!(m===!1||!this.nodes.length))return this}optimizeNames(m,k){var T;if(this.else=(T=this.else)===null||T===void 0?void 0:T.optimizeNames(m,k),!!(super.optimizeNames(m,k)||this.else))return this.condition=Y(this.condition,m,k),this}get names(){const m=super.names;return z(m,this.condition),this.else&&U(m,this.else.names),m}}f.kind="if";class s extends y{}s.kind="for";class p extends s{constructor(m){super(),this.iteration=m}render(m){return`for(${this.iteration})`+super.render(m)}optimizeNames(m,k){if(super.optimizeNames(m,k))return this.iteration=Y(this.iteration,m,k),this}get names(){return U(super.names,this.iteration.names)}}class $ extends s{constructor(m,k,T,V){super(),this.varKind=m,this.name=k,this.from=T,this.to=V}render(m){const k=m.es5?r.varKinds.var:this.varKind,{name:T,from:V,to:L}=this;return`for(${k} ${T}=${V}; ${T}<${L}; ${T}++)`+super.render(m)}get names(){const m=z(super.names,this.from);return z(m,this.to)}}class c extends s{constructor(m,k,T,V){super(),this.loop=m,this.varKind=k,this.name=T,this.iterable=V}render(m){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(m)}optimizeNames(m,k){if(super.optimizeNames(m,k))return this.iterable=Y(this.iterable,m,k),this}get names(){return U(super.names,this.iterable.names)}}class h extends y{constructor(m,k,T){super(),this.name=m,this.args=k,this.async=T}render(m){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(m)}}h.kind="func";class P extends v{render(m){return"return "+super.render(m)}}P.kind="return";class j extends y{render(m){let k="try"+super.render(m);return this.catch&&(k+=this.catch.render(m)),this.finally&&(k+=this.finally.render(m)),k}optimizeNodes(){var m,k;return super.optimizeNodes(),(m=this.catch)===null||m===void 0||m.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(m,k){var T,V;return super.optimizeNames(m,k),(T=this.catch)===null||T===void 0||T.optimizeNames(m,k),(V=this.finally)===null||V===void 0||V.optimizeNames(m,k),this}get names(){const m=super.names;return this.catch&&U(m,this.catch.names),this.finally&&U(m,this.finally.names),m}}class A extends y{constructor(m){super(),this.error=m}render(m){return`catch(${this.error})`+super.render(m)}}A.kind="catch";class F extends y{render(m){return"finally"+super.render(m)}}F.kind="finally";class q{constructor(m,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
3
- `:""},this._extScope=m,this._scope=new r.Scope({parent:m}),this._nodes=[new _]}toString(){return this._root.render(this.opts)}name(m){return this._scope.name(m)}scopeName(m){return this._extScope.name(m)}scopeValue(m,k){const T=this._extScope.value(m,k);return(this._values[T.prefix]||(this._values[T.prefix]=new Set)).add(T),T}getScopeValue(m,k){return this._extScope.getValue(m,k)}scopeRefs(m){return this._extScope.scopeRefs(m,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(m,k,T,V){const L=this._scope.toName(k);return T!==void 0&&V&&(this._constants[L.str]=T),this._leafNode(new a(m,L,T)),L}const(m,k,T){return this._def(r.varKinds.const,m,k,T)}let(m,k,T){return this._def(r.varKinds.let,m,k,T)}var(m,k,T){return this._def(r.varKinds.var,m,k,T)}assign(m,k,T){return this._leafNode(new l(m,k,T))}add(m,k){return this._leafNode(new u(m,t.operators.ADD,k))}code(m){return typeof m=="function"?m():m!==e.nil&&this._leafNode(new b(m)),this}object(...m){const k=["{"];for(const[T,V]of m)k.length>1&&k.push(","),k.push(T),(T!==V||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,V));return k.push("}"),new e._Code(k)}if(m,k,T){if(this._blockNode(new f(m)),k&&T)this.code(k).else().code(T).endIf();else if(k)this.code(k).endIf();else if(T)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(m){return this._elseNode(new f(m))}else(){return this._elseNode(new d)}endIf(){return this._endBlockNode(f,d)}_for(m,k){return this._blockNode(m),k&&this.code(k).endFor(),this}for(m,k){return this._for(new p(m),k)}forRange(m,k,T,V,L=this.opts.es5?r.varKinds.var:r.varKinds.let){const X=this._scope.toName(m);return this._for(new $(L,X,k,T),()=>V(X))}forOf(m,k,T,V=r.varKinds.const){const L=this._scope.toName(m);if(this.opts.es5){const X=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${X}.length`,Z=>{this.var(L,(0,e._)`${X}[${Z}]`),T(L)})}return this._for(new c("of",V,L,k),()=>T(L))}forIn(m,k,T,V=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(m,(0,e._)`Object.keys(${k})`,T);const L=this._scope.toName(m);return this._for(new c("in",V,L,k),()=>T(L))}endFor(){return this._endBlockNode(s)}label(m){return this._leafNode(new S(m))}break(m){return this._leafNode(new g(m))}return(m){const k=new P;if(this._blockNode(k),this.code(m),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(m,k,T){if(!k&&!T)throw new Error('CodeGen: "try" without "catch" and "finally"');const V=new j;if(this._blockNode(V),this.code(m),k){const L=this.name("e");this._currNode=V.catch=new A(L),k(L)}return T&&(this._currNode=V.finally=new F,this.code(T)),this._endBlockNode(A,F)}throw(m){return this._leafNode(new w(m))}block(m,k){return this._blockStarts.push(this._nodes.length),m&&this.code(m).endBlock(k),this}endBlock(m){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const T=this._nodes.length-k;if(T<0||m!==void 0&&T!==m)throw new Error(`CodeGen: wrong number of nodes: ${T} vs ${m} expected`);return this._nodes.length=k,this}func(m,k=e.nil,T,V){return this._blockNode(new h(m,k,T)),V&&this.code(V).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,k){const T=this._currNode;if(T instanceof m||k&&T instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${m.kind}/${k.kind}`:m.kind}"`)}_elseNode(m){const k=this._currNode;if(!(k instanceof f))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=m,this}get _root(){return this._nodes[0]}get _currNode(){const m=this._nodes;return m[m.length-1]}set _currNode(m){const k=this._nodes;k[k.length-1]=m}}t.CodeGen=q;function U(N,m){for(const k in m)N[k]=(N[k]||0)+(m[k]||0);return N}function z(N,m){return m instanceof e._CodeOrName?U(N,m.names):N}function Y(N,m,k){if(N instanceof e.Name)return T(N);if(!V(N))return N;return new e._Code(N._items.reduce((L,X)=>(X instanceof e.Name&&(X=T(X)),X instanceof e._Code?L.push(...X._items):L.push(X),L),[]));function T(L){const X=k[L.str];return X===void 0||m[L.str]!==1?L:(delete m[L.str],X)}function V(L){return L instanceof e._Code&&L._items.some(X=>X instanceof e.Name&&m[X.str]===1&&k[X.str]!==void 0)}}function ie(N,m){for(const k in m)N[k]=(N[k]||0)-(m[k]||0)}function Se(N){return typeof N=="boolean"||typeof N=="number"||N===null?!N:(0,e._)`!${R(N)}`}t.not=Se;const $e=E(t.operators.AND);function ne(...N){return N.reduce($e)}t.and=ne;const Ee=E(t.operators.OR);function I(...N){return N.reduce(Ee)}t.or=I;function E(N){return(m,k)=>m===e.nil?k:k===e.nil?m:(0,e._)`${R(m)} ${N} ${R(k)}`}function R(N){return N instanceof e.Name?N:(0,e._)`(${N})`}})(gr)),gr}var G={},Yr;function Q(){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 t=W(),e=Wt();function r(c){const h={};for(const P of c)h[P]=!0;return h}G.toHash=r;function n(c,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(i(c,h),!o(h,c.self.RULES.all))}G.alwaysValidSchema=n;function i(c,h=c.schema){const{opts:P,self:j}=c;if(!P.strictSchema||typeof h=="boolean")return;const A=j.RULES.keywords;for(const F in h)A[F]||$(c,`unknown keyword: "${F}"`)}G.checkUnknownRules=i;function o(c,h){if(typeof c=="boolean")return!c;for(const P in c)if(h[P])return!0;return!1}G.schemaHasRules=o;function a(c,h){if(typeof c=="boolean")return!c;for(const P in c)if(P!=="$ref"&&h.all[P])return!0;return!1}G.schemaHasRulesButRef=a;function l({topSchemaRef:c,schemaPath:h},P,j,A){if(!A){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,t._)`${P}`}return(0,t._)`${c}${h}${(0,t.getProperty)(j)}`}G.schemaRefOrVal=l;function u(c){return w(decodeURIComponent(c))}G.unescapeFragment=u;function S(c){return encodeURIComponent(g(c))}G.escapeFragment=S;function g(c){return typeof c=="number"?`${c}`:c.replace(/~/g,"~0").replace(/\//g,"~1")}G.escapeJsonPointer=g;function w(c){return c.replace(/~1/g,"/").replace(/~0/g,"~")}G.unescapeJsonPointer=w;function b(c,h){if(Array.isArray(c))for(const P of c)h(P);else h(c)}G.eachItem=b;function v({mergeNames:c,mergeToName:h,mergeValues:P,resultToName:j}){return(A,F,q,U)=>{const z=q===void 0?F:q instanceof t.Name?(F instanceof t.Name?c(A,F,q):h(A,F,q),q):F instanceof t.Name?(h(A,q,F),F):P(F,q);return U===t.Name&&!(z instanceof t.Name)?j(A,z):z}}G.mergeEvaluated={props:v({mergeNames:(c,h,P)=>c.if((0,t._)`${P} !== true && ${h} !== undefined`,()=>{c.if((0,t._)`${h} === true`,()=>c.assign(P,!0),()=>c.assign(P,(0,t._)`${P} || {}`).code((0,t._)`Object.assign(${P}, ${h})`))}),mergeToName:(c,h,P)=>c.if((0,t._)`${P} !== true`,()=>{h===!0?c.assign(P,!0):(c.assign(P,(0,t._)`${P} || {}`),_(c,P,h))}),mergeValues:(c,h)=>c===!0?!0:{...c,...h},resultToName:y}),items:v({mergeNames:(c,h,P)=>c.if((0,t._)`${P} !== true && ${h} !== undefined`,()=>c.assign(P,(0,t._)`${h} === true ? true : ${P} > ${h} ? ${P} : ${h}`)),mergeToName:(c,h,P)=>c.if((0,t._)`${P} !== true`,()=>c.assign(P,h===!0?!0:(0,t._)`${P} > ${h} ? ${P} : ${h}`)),mergeValues:(c,h)=>c===!0?!0:Math.max(c,h),resultToName:(c,h)=>c.var("items",h)})};function y(c,h){if(h===!0)return c.var("props",!0);const P=c.var("props",(0,t._)`{}`);return h!==void 0&&_(c,P,h),P}G.evaluatedPropsToName=y;function _(c,h,P){Object.keys(P).forEach(j=>c.assign((0,t._)`${h}${(0,t.getProperty)(j)}`,!0))}G.setEvaluated=_;const d={};function f(c,h){return c.scopeValue("func",{ref:h,code:d[h.code]||(d[h.code]=new e._Code(h.code))})}G.useFunc=f;var s;(function(c){c[c.Num=0]="Num",c[c.Str=1]="Str"})(s||(G.Type=s={}));function p(c,h,P){if(c instanceof t.Name){const j=h===s.Num;return P?j?(0,t._)`"[" + ${c} + "]"`:(0,t._)`"['" + ${c} + "']"`:j?(0,t._)`"/" + ${c}`:(0,t._)`"/" + ${c}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,t.getProperty)(c).toString():"/"+g(c)}G.getErrorPath=p;function $(c,h,P=c.opts.strictSchema){if(P){if(h=`strict mode: ${h}`,P===!0)throw new Error(h);c.self.logger.warn(h)}}return G.checkStrictMode=$,G}var lt={},Qr;function Ne(){if(Qr)return lt;Qr=1,Object.defineProperty(lt,"__esModule",{value:!0});const t=W(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return lt.default=e,lt}var Xr;function rr(){return Xr||(Xr=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=W(),r=Q(),n=Ne();t.keywordError={message:({keyword:d})=>(0,e.str)`must pass "${d}" keyword validation`},t.keyword$DataError={message:({keyword:d,schemaType:f})=>f?(0,e.str)`"${d}" keyword must be ${f} ($data)`:(0,e.str)`"${d}" keyword is invalid ($data)`};function i(d,f=t.keywordError,s,p){const{it:$}=d,{gen:c,compositeRule:h,allErrors:P}=$,j=w(d,f,s);p??(h||P)?u(c,j):S($,(0,e._)`[${j}]`)}t.reportError=i;function o(d,f=t.keywordError,s){const{it:p}=d,{gen:$,compositeRule:c,allErrors:h}=p,P=w(d,f,s);u($,P),c||h||S(p,n.default.vErrors)}t.reportExtraError=o;function a(d,f){d.assign(n.default.errors,f),d.if((0,e._)`${n.default.vErrors} !== null`,()=>d.if(f,()=>d.assign((0,e._)`${n.default.vErrors}.length`,f),()=>d.assign(n.default.vErrors,null)))}t.resetErrorsCount=a;function l({gen:d,keyword:f,schemaValue:s,data:p,errsCount:$,it:c}){if($===void 0)throw new Error("ajv implementation error");const h=d.name("err");d.forRange("i",$,n.default.errors,P=>{d.const(h,(0,e._)`${n.default.vErrors}[${P}]`),d.if((0,e._)`${h}.instancePath === undefined`,()=>d.assign((0,e._)`${h}.instancePath`,(0,e.strConcat)(n.default.instancePath,c.errorPath))),d.assign((0,e._)`${h}.schemaPath`,(0,e.str)`${c.errSchemaPath}/${f}`),c.opts.verbose&&(d.assign((0,e._)`${h}.schema`,s),d.assign((0,e._)`${h}.data`,p))})}t.extendErrors=l;function u(d,f){const s=d.const("err",f);d.if((0,e._)`${n.default.vErrors} === null`,()=>d.assign(n.default.vErrors,(0,e._)`[${s}]`),(0,e._)`${n.default.vErrors}.push(${s})`),d.code((0,e._)`${n.default.errors}++`)}function S(d,f){const{gen:s,validateName:p,schemaEnv:$}=d;$.$async?s.throw((0,e._)`new ${d.ValidationError}(${f})`):(s.assign((0,e._)`${p}.errors`,f),s.return(!1))}const g={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function w(d,f,s){const{createErrors:p}=d.it;return p===!1?(0,e._)`{}`:b(d,f,s)}function b(d,f,s={}){const{gen:p,it:$}=d,c=[v($,s),y(d,s)];return _(d,f,c),p.object(...c)}function v({errorPath:d},{instancePath:f}){const s=f?(0,e.str)`${d}${(0,r.getErrorPath)(f,r.Type.Str)}`:d;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,s)]}function y({keyword:d,it:{errSchemaPath:f}},{schemaPath:s,parentSchema:p}){let $=p?f:(0,e.str)`${f}/${d}`;return s&&($=(0,e.str)`${$}${(0,r.getErrorPath)(s,r.Type.Str)}`),[g.schemaPath,$]}function _(d,{params:f,message:s},p){const{keyword:$,data:c,schemaValue:h,it:P}=d,{opts:j,propertyName:A,topSchemaRef:F,schemaPath:q}=P;p.push([g.keyword,$],[g.params,typeof f=="function"?f(d):f||(0,e._)`{}`]),j.messages&&p.push([g.message,typeof s=="function"?s(d):s]),j.verbose&&p.push([g.schema,h],[g.parentSchema,(0,e._)`${F}${q}`],[n.default.data,c]),A&&p.push([g.propertyName,A])}})(yr)),yr}var en;function pi(){if(en)return je;en=1,Object.defineProperty(je,"__esModule",{value:!0}),je.boolOrEmptySchema=je.topBoolOrEmptySchema=void 0;const t=rr(),e=W(),r=Ne(),n={message:"boolean schema is false"};function i(l){const{gen:u,schema:S,validateName:g}=l;S===!1?a(l,!1):typeof S=="object"&&S.$async===!0?u.return(r.default.data):(u.assign((0,e._)`${g}.errors`,null),u.return(!0))}je.topBoolOrEmptySchema=i;function o(l,u){const{gen:S,schema:g}=l;g===!1?(S.var(u,!1),a(l)):S.var(u,!0)}je.boolOrEmptySchema=o;function a(l,u){const{gen:S,data:g}=l,w={gen:S,keyword:"false schema",data:g,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,t.reportError)(w,n,void 0,u)}return je}var le={},Te={},tn;function $o(){if(tn)return Te;tn=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.getRules=Te.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(i){return typeof i=="string"&&e.has(i)}Te.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 Te.getRules=n,Te}var Pe={},rn;function wo(){if(rn)return Pe;rn=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.shouldUseRule=Pe.shouldUseGroup=Pe.schemaHasRulesForType=void 0;function t({schema:n,self:i},o){const a=i.RULES.types[o];return a&&a!==!0&&e(n,a)}Pe.schemaHasRulesForType=t;function e(n,i){return i.rules.some(o=>r(n,o))}Pe.shouldUseGroup=e;function r(n,i){var o;return n[i.keyword]!==void 0||((o=i.definition.implements)===null||o===void 0?void 0:o.some(a=>n[a]!==void 0))}return Pe.shouldUseRule=r,Pe}var nn;function Jt(){if(nn)return le;nn=1,Object.defineProperty(le,"__esModule",{value:!0}),le.reportTypeError=le.checkDataTypes=le.checkDataType=le.coerceAndCheckDataType=le.getJSONTypes=le.getSchemaTypes=le.DataType=void 0;const t=$o(),e=wo(),r=rr(),n=W(),i=Q();var o;(function(s){s[s.Correct=0]="Correct",s[s.Wrong=1]="Wrong"})(o||(le.DataType=o={}));function a(s){const p=l(s.type);if(p.includes("null")){if(s.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&s.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');s.nullable===!0&&p.push("null")}return p}le.getSchemaTypes=a;function l(s){const p=Array.isArray(s)?s:s?[s]:[];if(p.every(t.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}le.getJSONTypes=l;function u(s,p){const{gen:$,data:c,opts:h}=s,P=g(p,h.coerceTypes),j=p.length>0&&!(P.length===0&&p.length===1&&(0,e.schemaHasRulesForType)(s,p[0]));if(j){const A=y(p,c,h.strictNumbers,o.Wrong);$.if(A,()=>{P.length?w(s,p,P):d(s)})}return j}le.coerceAndCheckDataType=u;const S=new Set(["string","number","integer","boolean","null"]);function g(s,p){return p?s.filter($=>S.has($)||p==="array"&&$==="array"):[]}function w(s,p,$){const{gen:c,data:h,opts:P}=s,j=c.let("dataType",(0,n._)`typeof ${h}`),A=c.let("coerced",(0,n._)`undefined`);P.coerceTypes==="array"&&c.if((0,n._)`${j} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>c.assign(h,(0,n._)`${h}[0]`).assign(j,(0,n._)`typeof ${h}`).if(y(p,h,P.strictNumbers),()=>c.assign(A,h))),c.if((0,n._)`${A} !== undefined`);for(const q of $)(S.has(q)||q==="array"&&P.coerceTypes==="array")&&F(q);c.else(),d(s),c.endIf(),c.if((0,n._)`${A} !== undefined`,()=>{c.assign(h,A),b(s,A)});function F(q){switch(q){case"string":c.elseIf((0,n._)`${j} == "number" || ${j} == "boolean"`).assign(A,(0,n._)`"" + ${h}`).elseIf((0,n._)`${h} === null`).assign(A,(0,n._)`""`);return;case"number":c.elseIf((0,n._)`${j} == "boolean" || ${h} === null
4
- || (${j} == "string" && ${h} && ${h} == +${h})`).assign(A,(0,n._)`+${h}`);return;case"integer":c.elseIf((0,n._)`${j} === "boolean" || ${h} === null
5
- || (${j} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(A,(0,n._)`+${h}`);return;case"boolean":c.elseIf((0,n._)`${h} === "false" || ${h} === 0 || ${h} === null`).assign(A,!1).elseIf((0,n._)`${h} === "true" || ${h} === 1`).assign(A,!0);return;case"null":c.elseIf((0,n._)`${h} === "" || ${h} === 0 || ${h} === false`),c.assign(A,null);return;case"array":c.elseIf((0,n._)`${j} === "string" || ${j} === "number"
6
- || ${j} === "boolean" || ${h} === null`).assign(A,(0,n._)`[${h}]`)}}}function b({gen:s,parentData:p,parentDataProperty:$},c){s.if((0,n._)`${p} !== undefined`,()=>s.assign((0,n._)`${p}[${$}]`,c))}function v(s,p,$,c=o.Correct){const h=c===o.Correct?n.operators.EQ:n.operators.NEQ;let P;switch(s){case"null":return(0,n._)`${p} ${h} null`;case"array":P=(0,n._)`Array.isArray(${p})`;break;case"object":P=(0,n._)`${p} && typeof ${p} == "object" && !Array.isArray(${p})`;break;case"integer":P=j((0,n._)`!(${p} % 1) && !isNaN(${p})`);break;case"number":P=j();break;default:return(0,n._)`typeof ${p} ${h} ${s}`}return c===o.Correct?P:(0,n.not)(P);function j(A=n.nil){return(0,n.and)((0,n._)`typeof ${p} == "number"`,A,$?(0,n._)`isFinite(${p})`:n.nil)}}le.checkDataType=v;function y(s,p,$,c){if(s.length===1)return v(s[0],p,$,c);let h;const P=(0,i.toHash)(s);if(P.array&&P.object){const j=(0,n._)`typeof ${p} != "object"`;h=P.null?j:(0,n._)`!${p} || ${j}`,delete P.null,delete P.array,delete P.object}else h=n.nil;P.number&&delete P.integer;for(const j in P)h=(0,n.and)(h,v(j,p,$,c));return h}le.checkDataTypes=y;const _={message:({schema:s})=>`must be ${s}`,params:({schema:s,schemaValue:p})=>typeof s=="string"?(0,n._)`{type: ${s}}`:(0,n._)`{type: ${p}}`};function d(s){const p=f(s);(0,r.reportError)(p,_)}le.reportTypeError=d;function f(s){const{gen:p,data:$,schema:c}=s,h=(0,i.schemaRefOrVal)(s,c,"type");return{gen:p,keyword:"type",data:$,schema:c.type,schemaCode:h,schemaValue:h,parentSchema:c,params:{},it:s}}return le}var Qe={},on;function fi(){if(on)return Qe;on=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.assignDefaults=void 0;const t=W(),e=Q();function r(i,o){const{properties:a,items:l}=i.schema;if(o==="object"&&a)for(const u in a)n(i,u,a[u].default);else o==="array"&&Array.isArray(l)&&l.forEach((u,S)=>n(i,S,u.default))}Qe.assignDefaults=r;function n(i,o,a){const{gen:l,compositeRule:u,data:S,opts:g}=i;if(a===void 0)return;const w=(0,t._)`${S}${(0,t.getProperty)(o)}`;if(u){(0,e.checkStrictMode)(i,`default is ignored for: ${w}`);return}let b=(0,t._)`${w} === undefined`;g.useDefaults==="empty"&&(b=(0,t._)`${b} || ${w} === null || ${w} === ""`),l.if(b,(0,t._)`${w} = ${(0,t.stringify)(a)}`)}return Qe}var be={},re={},sn;function _e(){if(sn)return re;sn=1,Object.defineProperty(re,"__esModule",{value:!0}),re.validateUnion=re.validateArray=re.usePattern=re.callValidateCode=re.schemaProperties=re.allSchemaProperties=re.noPropertyInData=re.propertyInData=re.isOwnProperty=re.hasPropFunc=re.reportMissingProp=re.checkMissingProp=re.checkReportMissingProp=void 0;const t=W(),e=Q(),r=Ne(),n=Q();function i(s,p){const{gen:$,data:c,it:h}=s;$.if(g($,c,p,h.opts.ownProperties),()=>{s.setParams({missingProperty:(0,t._)`${p}`},!0),s.error()})}re.checkReportMissingProp=i;function o({gen:s,data:p,it:{opts:$}},c,h){return(0,t.or)(...c.map(P=>(0,t.and)(g(s,p,P,$.ownProperties),(0,t._)`${h} = ${P}`)))}re.checkMissingProp=o;function a(s,p){s.setParams({missingProperty:p},!0),s.error()}re.reportMissingProp=a;function l(s){return s.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}re.hasPropFunc=l;function u(s,p,$){return(0,t._)`${l(s)}.call(${p}, ${$})`}re.isOwnProperty=u;function S(s,p,$,c){const h=(0,t._)`${p}${(0,t.getProperty)($)} !== undefined`;return c?(0,t._)`${h} && ${u(s,p,$)}`:h}re.propertyInData=S;function g(s,p,$,c){const h=(0,t._)`${p}${(0,t.getProperty)($)} === undefined`;return c?(0,t.or)(h,(0,t.not)(u(s,p,$))):h}re.noPropertyInData=g;function w(s){return s?Object.keys(s).filter(p=>p!=="__proto__"):[]}re.allSchemaProperties=w;function b(s,p){return w(p).filter($=>!(0,e.alwaysValidSchema)(s,p[$]))}re.schemaProperties=b;function v({schemaCode:s,data:p,it:{gen:$,topSchemaRef:c,schemaPath:h,errorPath:P},it:j},A,F,q){const U=q?(0,t._)`${s}, ${p}, ${c}${h}`:p,z=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,P)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&z.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const Y=(0,t._)`${U}, ${$.object(...z)}`;return F!==t.nil?(0,t._)`${A}.call(${F}, ${Y})`:(0,t._)`${A}(${Y})`}re.callValidateCode=v;const y=(0,t._)`new RegExp`;function _({gen:s,it:{opts:p}},$){const c=p.unicodeRegExp?"u":"",{regExp:h}=p.code,P=h($,c);return s.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,t._)`${h.code==="new RegExp"?y:(0,n.useFunc)(s,h)}(${$}, ${c})`})}re.usePattern=_;function d(s){const{gen:p,data:$,keyword:c,it:h}=s,P=p.name("valid");if(h.allErrors){const A=p.let("valid",!0);return j(()=>p.assign(A,!1)),A}return p.var(P,!0),j(()=>p.break()),P;function j(A){const F=p.const("len",(0,t._)`${$}.length`);p.forRange("i",0,F,q=>{s.subschema({keyword:c,dataProp:q,dataPropType:e.Type.Num},P),p.if((0,t.not)(P),A)})}}re.validateArray=d;function f(s){const{gen:p,schema:$,keyword:c,it:h}=s;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(F=>(0,e.alwaysValidSchema)(h,F))&&!h.opts.unevaluated)return;const j=p.let("valid",!1),A=p.name("_valid");p.block(()=>$.forEach((F,q)=>{const U=s.subschema({keyword:c,schemaProp:q,compositeRule:!0},A);p.assign(j,(0,t._)`${j} || ${A}`),s.mergeValidEvaluated(U,A)||p.if((0,t.not)(j))})),s.result(j,()=>s.reset(),()=>s.error(!0))}return re.validateUnion=f,re}var an;function hi(){if(an)return be;an=1,Object.defineProperty(be,"__esModule",{value:!0}),be.validateKeywordUsage=be.validSchemaType=be.funcKeywordCode=be.macroKeywordCode=void 0;const t=W(),e=Ne(),r=_e(),n=rr();function i(b,v){const{gen:y,keyword:_,schema:d,parentSchema:f,it:s}=b,p=v.macro.call(s.self,d,f,s),$=S(y,_,p);s.opts.validateSchema!==!1&&s.self.validateSchema(p,!0);const c=y.name("valid");b.subschema({schema:p,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${_}`,topSchemaRef:$,compositeRule:!0},c),b.pass(c,()=>b.error(!0))}be.macroKeywordCode=i;function o(b,v){var y;const{gen:_,keyword:d,schema:f,parentSchema:s,$data:p,it:$}=b;u($,v);const c=!p&&v.compile?v.compile.call($.self,f,s,$):v.validate,h=S(_,d,c),P=_.let("valid");b.block$data(P,j),b.ok((y=v.valid)!==null&&y!==void 0?y:P);function j(){if(v.errors===!1)q(),v.modifying&&a(b),U(()=>b.error());else{const z=v.async?A():F();v.modifying&&a(b),U(()=>l(b,z))}}function A(){const z=_.let("ruleErrs",null);return _.try(()=>q((0,t._)`await `),Y=>_.assign(P,!1).if((0,t._)`${Y} instanceof ${$.ValidationError}`,()=>_.assign(z,(0,t._)`${Y}.errors`),()=>_.throw(Y))),z}function F(){const z=(0,t._)`${h}.errors`;return _.assign(z,null),q(t.nil),z}function q(z=v.async?(0,t._)`await `:t.nil){const Y=$.opts.passContext?e.default.this:e.default.self,ie=!("compile"in v&&!p||v.schema===!1);_.assign(P,(0,t._)`${z}${(0,r.callValidateCode)(b,h,Y,ie)}`,v.modifying)}function U(z){var Y;_.if((0,t.not)((Y=v.valid)!==null&&Y!==void 0?Y:P),z)}}be.funcKeywordCode=o;function a(b){const{gen:v,data:y,it:_}=b;v.if(_.parentData,()=>v.assign(y,(0,t._)`${_.parentData}[${_.parentDataProperty}]`))}function l(b,v){const{gen:y}=b;y.if((0,t._)`Array.isArray(${v})`,()=>{y.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${v} : ${e.default.vErrors}.concat(${v})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)(b)},()=>b.error())}function u({schemaEnv:b},v){if(v.async&&!b.$async)throw new Error("async keyword in sync schema")}function S(b,v,y){if(y===void 0)throw new Error(`keyword "${v}" failed to compile`);return b.scopeValue("keyword",typeof y=="function"?{ref:y}:{ref:y,code:(0,t.stringify)(y)})}function g(b,v,y=!1){return!v.length||v.some(_=>_==="array"?Array.isArray(b):_==="object"?b&&typeof b=="object"&&!Array.isArray(b):typeof b==_||y&&typeof b>"u")}be.validSchemaType=g;function w({schema:b,opts:v,self:y,errSchemaPath:_},d,f){if(Array.isArray(d.keyword)?!d.keyword.includes(f):d.keyword!==f)throw new Error("ajv implementation error");const s=d.dependencies;if(s?.some(p=>!Object.prototype.hasOwnProperty.call(b,p)))throw new Error(`parent schema must have dependencies of ${f}: ${s.join(",")}`);if(d.validateSchema&&!d.validateSchema(b[f])){const $=`keyword "${f}" value is invalid at path "${_}": `+y.errorsText(d.validateSchema.errors);if(v.validateSchema==="log")y.logger.error($);else throw new Error($)}}return be.validateKeywordUsage=w,be}var ke={},ln;function mi(){if(ln)return ke;ln=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.extendSubschemaMode=ke.extendSubschemaData=ke.getSubschema=void 0;const t=W(),e=Q();function r(o,{keyword:a,schemaProp:l,schema:u,schemaPath:S,errSchemaPath:g,topSchemaRef:w}){if(a!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const b=o.schema[a];return l===void 0?{schema:b,schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${a}`}:{schema:b[l],schemaPath:(0,t._)`${o.schemaPath}${(0,t.getProperty)(a)}${(0,t.getProperty)(l)}`,errSchemaPath:`${o.errSchemaPath}/${a}/${(0,e.escapeFragment)(l)}`}}if(u!==void 0){if(S===void 0||g===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:S,topSchemaRef:w,errSchemaPath:g}}throw new Error('either "keyword" or "schema" must be passed')}ke.getSubschema=r;function n(o,a,{dataProp:l,dataPropType:u,data:S,dataTypes:g,propertyName:w}){if(S!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:b}=a;if(l!==void 0){const{errorPath:y,dataPathArr:_,opts:d}=a,f=b.let("data",(0,t._)`${a.data}${(0,t.getProperty)(l)}`,!0);v(f),o.errorPath=(0,t.str)`${y}${(0,e.getErrorPath)(l,u,d.jsPropertySyntax)}`,o.parentDataProperty=(0,t._)`${l}`,o.dataPathArr=[..._,o.parentDataProperty]}if(S!==void 0){const y=S instanceof t.Name?S:b.let("data",S,!0);v(y),w!==void 0&&(o.propertyName=w)}g&&(o.dataTypes=g);function v(y){o.data=y,o.dataLevel=a.dataLevel+1,o.dataTypes=[],a.definedProperties=new Set,o.parentData=a.data,o.dataNames=[...a.dataNames,y]}}ke.extendSubschemaData=n;function i(o,{jtdDiscriminator:a,jtdMetadata:l,compositeRule:u,createErrors:S,allErrors:g}){u!==void 0&&(o.compositeRule=u),S!==void 0&&(o.createErrors=S),g!==void 0&&(o.allErrors=g),o.jtdDiscriminator=a,o.jtdMetadata=l}return ke.extendSubschemaMode=i,ke}var ue={},_r,cn;function Po(){return cn||(cn=1,_r=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}),_r}var Sr={exports:{}},dn;function yi(){if(dn)return Sr.exports;dn=1;var t=Sr.exports=function(n,i,o){typeof i=="function"&&(o=i,i={}),o=i.cb||o;var a=typeof o=="function"?o:o.pre||function(){},l=o.post||function(){};e(i,a,l,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.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 e(n,i,o,a,l,u,S,g,w,b){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,l,u,S,g,w,b);for(var v in a){var y=a[v];if(Array.isArray(y)){if(v in t.arrayKeywords)for(var _=0;_<y.length;_++)e(n,i,o,y[_],l+"/"+v+"/"+_,u,l,v,a,_)}else if(v in t.propsKeywords){if(y&&typeof y=="object")for(var d in y)e(n,i,o,y[d],l+"/"+v+"/"+r(d),u,l,v,a,d)}else(v in t.keywords||n.allKeys&&!(v in t.skipKeywords))&&e(n,i,o,y,l+"/"+v,u,l,v,a)}o(a,l,u,S,g,w,b)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Sr.exports}var un;function nr(){if(un)return ue;un=1,Object.defineProperty(ue,"__esModule",{value:!0}),ue.getSchemaRefs=ue.resolveUrl=ue.normalizeId=ue._getFullPath=ue.getFullPath=ue.inlineRef=void 0;const t=Q(),e=Po(),r=yi(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(_,d=!0){return typeof _=="boolean"?!0:d===!0?!a(_):d?l(_)<=d:!1}ue.inlineRef=i;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(_){for(const d in _){if(o.has(d))return!0;const f=_[d];if(Array.isArray(f)&&f.some(a)||typeof f=="object"&&a(f))return!0}return!1}function l(_){let d=0;for(const f in _){if(f==="$ref")return 1/0;if(d++,!n.has(f)&&(typeof _[f]=="object"&&(0,t.eachItem)(_[f],s=>d+=l(s)),d===1/0))return 1/0}return d}function u(_,d="",f){f!==!1&&(d=w(d));const s=_.parse(d);return S(_,s)}ue.getFullPath=u;function S(_,d){return _.serialize(d).split("#")[0]+"#"}ue._getFullPath=S;const g=/#\/?$/;function w(_){return _?_.replace(g,""):""}ue.normalizeId=w;function b(_,d,f){return f=w(f),_.resolve(d,f)}ue.resolveUrl=b;const v=/^[a-z_][-a-z0-9._]*$/i;function y(_,d){if(typeof _=="boolean")return{};const{schemaId:f,uriResolver:s}=this.opts,p=w(_[f]||d),$={"":p},c=u(s,p,!1),h={},P=new Set;return r(_,{allKeys:!0},(F,q,U,z)=>{if(z===void 0)return;const Y=c+q;let ie=$[z];typeof F[f]=="string"&&(ie=Se.call(this,F[f])),$e.call(this,F.$anchor),$e.call(this,F.$dynamicAnchor),$[q]=ie;function Se(ne){const Ee=this.opts.uriResolver.resolve;if(ne=w(ie?Ee(ie,ne):ne),P.has(ne))throw A(ne);P.add(ne);let I=this.refs[ne];return typeof I=="string"&&(I=this.refs[I]),typeof I=="object"?j(F,I.schema,ne):ne!==w(Y)&&(ne[0]==="#"?(j(F,h[ne],ne),h[ne]=F):this.refs[ne]=Y),ne}function $e(ne){if(typeof ne=="string"){if(!v.test(ne))throw new Error(`invalid anchor "${ne}"`);Se.call(this,`#${ne}`)}}}),h;function j(F,q,U){if(q!==void 0&&!e(F,q))throw A(U)}function A(F){return new Error(`reference "${F}" resolves to more than one schema`)}}return ue.getSchemaRefs=y,ue}var pn;function or(){if(pn)return we;pn=1,Object.defineProperty(we,"__esModule",{value:!0}),we.getData=we.KeywordCxt=we.validateFunctionCode=void 0;const t=pi(),e=Jt(),r=wo(),n=Jt(),i=fi(),o=hi(),a=mi(),l=W(),u=Ne(),S=nr(),g=Q(),w=rr();function b(x){if(c(x)&&(P(x),$(x))){d(x);return}v(x,()=>(0,t.topBoolOrEmptySchema)(x))}we.validateFunctionCode=b;function v({gen:x,validateName:C,schema:O,schemaEnv:M,opts:B},H){B.code.es5?x.func(C,(0,l._)`${u.default.data}, ${u.default.valCxt}`,M.$async,()=>{x.code((0,l._)`"use strict"; ${s(O,B)}`),_(x,B),x.code(H)}):x.func(C,(0,l._)`${u.default.data}, ${y(B)}`,M.$async,()=>x.code(s(O,B)).code(H))}function y(x){return(0,l._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${x.dynamicRef?(0,l._)`, ${u.default.dynamicAnchors}={}`:l.nil}}={}`}function _(x,C){x.if(u.default.valCxt,()=>{x.var(u.default.instancePath,(0,l._)`${u.default.valCxt}.${u.default.instancePath}`),x.var(u.default.parentData,(0,l._)`${u.default.valCxt}.${u.default.parentData}`),x.var(u.default.parentDataProperty,(0,l._)`${u.default.valCxt}.${u.default.parentDataProperty}`),x.var(u.default.rootData,(0,l._)`${u.default.valCxt}.${u.default.rootData}`),C.dynamicRef&&x.var(u.default.dynamicAnchors,(0,l._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{x.var(u.default.instancePath,(0,l._)`""`),x.var(u.default.parentData,(0,l._)`undefined`),x.var(u.default.parentDataProperty,(0,l._)`undefined`),x.var(u.default.rootData,u.default.data),C.dynamicRef&&x.var(u.default.dynamicAnchors,(0,l._)`{}`)})}function d(x){const{schema:C,opts:O,gen:M}=x;v(x,()=>{O.$comment&&C.$comment&&z(x),F(x),M.let(u.default.vErrors,null),M.let(u.default.errors,0),O.unevaluated&&f(x),j(x),Y(x)})}function f(x){const{gen:C,validateName:O}=x;x.evaluated=C.const("evaluated",(0,l._)`${O}.evaluated`),C.if((0,l._)`${x.evaluated}.dynamicProps`,()=>C.assign((0,l._)`${x.evaluated}.props`,(0,l._)`undefined`)),C.if((0,l._)`${x.evaluated}.dynamicItems`,()=>C.assign((0,l._)`${x.evaluated}.items`,(0,l._)`undefined`))}function s(x,C){const O=typeof x=="object"&&x[C.schemaId];return O&&(C.code.source||C.code.process)?(0,l._)`/*# sourceURL=${O} */`:l.nil}function p(x,C){if(c(x)&&(P(x),$(x))){h(x,C);return}(0,t.boolOrEmptySchema)(x,C)}function $({schema:x,self:C}){if(typeof x=="boolean")return!x;for(const O in x)if(C.RULES.all[O])return!0;return!1}function c(x){return typeof x.schema!="boolean"}function h(x,C){const{schema:O,gen:M,opts:B}=x;B.$comment&&O.$comment&&z(x),q(x),U(x);const H=M.const("_errs",u.default.errors);j(x,H),M.var(C,(0,l._)`${H} === ${u.default.errors}`)}function P(x){(0,g.checkUnknownRules)(x),A(x)}function j(x,C){if(x.opts.jtd)return Se(x,[],!1,C);const O=(0,e.getSchemaTypes)(x.schema),M=(0,e.coerceAndCheckDataType)(x,O);Se(x,O,!M,C)}function A(x){const{schema:C,errSchemaPath:O,opts:M,self:B}=x;C.$ref&&M.ignoreKeywordsWithRef&&(0,g.schemaHasRulesButRef)(C,B.RULES)&&B.logger.warn(`$ref: keywords ignored in schema at path "${O}"`)}function F(x){const{schema:C,opts:O}=x;C.default!==void 0&&O.useDefaults&&O.strictSchema&&(0,g.checkStrictMode)(x,"default is ignored in the schema root")}function q(x){const C=x.schema[x.opts.schemaId];C&&(x.baseId=(0,S.resolveUrl)(x.opts.uriResolver,x.baseId,C))}function U(x){if(x.schema.$async&&!x.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:x,schemaEnv:C,schema:O,errSchemaPath:M,opts:B}){const H=O.$comment;if(B.$comment===!0)x.code((0,l._)`${u.default.self}.logger.log(${H})`);else if(typeof B.$comment=="function"){const se=(0,l.str)`${M}/$comment`,ve=x.scopeValue("root",{ref:C.root});x.code((0,l._)`${u.default.self}.opts.$comment(${H}, ${se}, ${ve}.schema)`)}}function Y(x){const{gen:C,schemaEnv:O,validateName:M,ValidationError:B,opts:H}=x;O.$async?C.if((0,l._)`${u.default.errors} === 0`,()=>C.return(u.default.data),()=>C.throw((0,l._)`new ${B}(${u.default.vErrors})`)):(C.assign((0,l._)`${M}.errors`,u.default.vErrors),H.unevaluated&&ie(x),C.return((0,l._)`${u.default.errors} === 0`))}function ie({gen:x,evaluated:C,props:O,items:M}){O instanceof l.Name&&x.assign((0,l._)`${C}.props`,O),M instanceof l.Name&&x.assign((0,l._)`${C}.items`,M)}function Se(x,C,O,M){const{gen:B,schema:H,data:se,allErrors:ve,opts:fe,self:he}=x,{RULES:ae}=he;if(H.$ref&&(fe.ignoreKeywordsWithRef||!(0,g.schemaHasRulesButRef)(H,ae))){B.block(()=>V(x,"$ref",ae.all.$ref.definition));return}fe.jtd||ne(x,C),B.block(()=>{for(const ge of ae.rules)De(ge);De(ae.post)});function De(ge){(0,r.shouldUseGroup)(H,ge)&&(ge.type?(B.if((0,n.checkDataType)(ge.type,se,fe.strictNumbers)),$e(x,ge),C.length===1&&C[0]===ge.type&&O&&(B.else(),(0,n.reportTypeError)(x)),B.endIf()):$e(x,ge),ve||B.if((0,l._)`${u.default.errors} === ${M||0}`))}}function $e(x,C){const{gen:O,schema:M,opts:{useDefaults:B}}=x;B&&(0,i.assignDefaults)(x,C.type),O.block(()=>{for(const H of C.rules)(0,r.shouldUseRule)(M,H)&&V(x,H.keyword,H.definition,C.type)})}function ne(x,C){x.schemaEnv.meta||!x.opts.strictTypes||(Ee(x,C),x.opts.allowUnionTypes||I(x,C),E(x,x.dataTypes))}function Ee(x,C){if(C.length){if(!x.dataTypes.length){x.dataTypes=C;return}C.forEach(O=>{N(x.dataTypes,O)||k(x,`type "${O}" not allowed by context "${x.dataTypes.join(",")}"`)}),m(x,C)}}function I(x,C){C.length>1&&!(C.length===2&&C.includes("null"))&&k(x,"use allowUnionTypes to allow union type keyword")}function E(x,C){const O=x.self.RULES.all;for(const M in O){const B=O[M];if(typeof B=="object"&&(0,r.shouldUseRule)(x.schema,B)){const{type:H}=B.definition;H.length&&!H.some(se=>R(C,se))&&k(x,`missing type "${H.join(",")}" for keyword "${M}"`)}}}function R(x,C){return x.includes(C)||C==="number"&&x.includes("integer")}function N(x,C){return x.includes(C)||C==="integer"&&x.includes("number")}function m(x,C){const O=[];for(const M of x.dataTypes)N(C,M)?O.push(M):C.includes("integer")&&M==="number"&&O.push("integer");x.dataTypes=O}function k(x,C){const O=x.schemaEnv.baseId+x.errSchemaPath;C+=` at "${O}" (strictTypes)`,(0,g.checkStrictMode)(x,C,x.opts.strictTypes)}class T{constructor(C,O,M){if((0,o.validateKeywordUsage)(C,O,M),this.gen=C.gen,this.allErrors=C.allErrors,this.keyword=M,this.data=C.data,this.schema=C.schema[M],this.$data=O.$data&&C.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,g.schemaRefOrVal)(C,this.schema,M,this.$data),this.schemaType=O.schemaType,this.parentSchema=C.schema,this.params={},this.it=C,this.def=O,this.$data)this.schemaCode=C.gen.const("vSchema",Z(this.$data,C));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,O.schemaType,O.allowUndefined))throw new Error(`${M} value must be ${JSON.stringify(O.schemaType)}`);("code"in O?O.trackErrors:O.errors!==!1)&&(this.errsCount=C.gen.const("_errs",u.default.errors))}result(C,O,M){this.failResult((0,l.not)(C),O,M)}failResult(C,O,M){this.gen.if(C),M?M():this.error(),O?(this.gen.else(),O(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(C,O){this.failResult((0,l.not)(C),void 0,O)}fail(C){if(C===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(C),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(C){if(!this.$data)return this.fail(C);const{schemaCode:O}=this;this.fail((0,l._)`${O} !== undefined && (${(0,l.or)(this.invalid$data(),C)})`)}error(C,O,M){if(O){this.setParams(O),this._error(C,M),this.setParams({});return}this._error(C,M)}_error(C,O){(C?w.reportExtraError:w.reportError)(this,this.def.error,O)}$dataError(){(0,w.reportError)(this,this.def.$dataError||w.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,w.resetErrorsCount)(this.gen,this.errsCount)}ok(C){this.allErrors||this.gen.if(C)}setParams(C,O){O?Object.assign(this.params,C):this.params=C}block$data(C,O,M=l.nil){this.gen.block(()=>{this.check$data(C,M),O()})}check$data(C=l.nil,O=l.nil){if(!this.$data)return;const{gen:M,schemaCode:B,schemaType:H,def:se}=this;M.if((0,l.or)((0,l._)`${B} === undefined`,O)),C!==l.nil&&M.assign(C,!0),(H.length||se.validateSchema)&&(M.elseIf(this.invalid$data()),this.$dataError(),C!==l.nil&&M.assign(C,!1)),M.else()}invalid$data(){const{gen:C,schemaCode:O,schemaType:M,def:B,it:H}=this;return(0,l.or)(se(),ve());function se(){if(M.length){if(!(O instanceof l.Name))throw new Error("ajv implementation error");const fe=Array.isArray(M)?M:[M];return(0,l._)`${(0,n.checkDataTypes)(fe,O,H.opts.strictNumbers,n.DataType.Wrong)}`}return l.nil}function ve(){if(B.validateSchema){const fe=C.scopeValue("validate$data",{ref:B.validateSchema});return(0,l._)`!${fe}(${O})`}return l.nil}}subschema(C,O){const M=(0,a.getSubschema)(this.it,C);(0,a.extendSubschemaData)(M,this.it,C),(0,a.extendSubschemaMode)(M,C);const B={...this.it,...M,items:void 0,props:void 0};return p(B,O),B}mergeEvaluated(C,O){const{it:M,gen:B}=this;M.opts.unevaluated&&(M.props!==!0&&C.props!==void 0&&(M.props=g.mergeEvaluated.props(B,C.props,M.props,O)),M.items!==!0&&C.items!==void 0&&(M.items=g.mergeEvaluated.items(B,C.items,M.items,O)))}mergeValidEvaluated(C,O){const{it:M,gen:B}=this;if(M.opts.unevaluated&&(M.props!==!0||M.items!==!0))return B.if(O,()=>this.mergeEvaluated(C,l.Name)),!0}}we.KeywordCxt=T;function V(x,C,O,M){const B=new T(x,O,C);"code"in O?O.code(B,M):B.$data&&O.validate?(0,o.funcKeywordCode)(B,O):"macro"in O?(0,o.macroKeywordCode)(B,O):(O.compile||O.validate)&&(0,o.funcKeywordCode)(B,O)}const L=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(x,{dataLevel:C,dataNames:O,dataPathArr:M}){let B,H;if(x==="")return u.default.rootData;if(x[0]==="/"){if(!L.test(x))throw new Error(`Invalid JSON-pointer: ${x}`);B=x,H=u.default.rootData}else{const he=X.exec(x);if(!he)throw new Error(`Invalid JSON-pointer: ${x}`);const ae=+he[1];if(B=he[2],B==="#"){if(ae>=C)throw new Error(fe("property/index",ae));return M[C-ae]}if(ae>C)throw new Error(fe("data",ae));if(H=O[C-ae],!B)return H}let se=H;const ve=B.split("/");for(const he of ve)he&&(H=(0,l._)`${H}${(0,l.getProperty)((0,g.unescapeJsonPointer)(he))}`,se=(0,l._)`${se} && ${H}`);return se;function fe(he,ae){return`Cannot access ${he} ${ae} levels up, current level is ${C}`}}return we.getData=Z,we}var ct={},fn;function Ar(){if(fn)return ct;fn=1,Object.defineProperty(ct,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return ct.default=t,ct}var dt={},hn;function ir(){if(hn)return dt;hn=1,Object.defineProperty(dt,"__esModule",{value:!0});const t=nr();class e extends Error{constructor(n,i,o,a){super(a||`can't resolve reference ${o} from id ${i}`),this.missingRef=(0,t.resolveUrl)(n,i,o),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return dt.default=e,dt}var ye={},mn;function Ir(){if(mn)return ye;mn=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.resolveSchema=ye.getCompilingSchema=ye.resolveRef=ye.compileSchema=ye.SchemaEnv=void 0;const t=W(),e=Ar(),r=Ne(),n=nr(),i=Q(),o=or();class a{constructor(f){var s;this.refs={},this.dynamicAnchors={};let p;typeof f.schema=="object"&&(p=f.schema),this.schema=f.schema,this.schemaId=f.schemaId,this.root=f.root||this,this.baseId=(s=f.baseId)!==null&&s!==void 0?s:(0,n.normalizeId)(p?.[f.schemaId||"$id"]),this.schemaPath=f.schemaPath,this.localRefs=f.localRefs,this.meta=f.meta,this.$async=p?.$async,this.refs={}}}ye.SchemaEnv=a;function l(d){const f=g.call(this,d);if(f)return f;const s=(0,n.getFullPath)(this.opts.uriResolver,d.root.baseId),{es5:p,lines:$}=this.opts.code,{ownProperties:c}=this.opts,h=new t.CodeGen(this.scope,{es5:p,lines:$,ownProperties:c});let P;d.$async&&(P=h.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const j=h.scopeName("validate");d.validateName=j;const A={gen:h,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",this.opts.code.source===!0?{ref:d.schema,code:(0,t.stringify)(d.schema)}:{ref:d.schema}),validateName:j,ValidationError:P,schema:d.schema,schemaEnv:d,rootId:s,baseId:d.baseId||s,schemaPath:t.nil,errSchemaPath:d.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let F;try{this._compilations.add(d),(0,o.validateFunctionCode)(A),h.optimize(this.opts.code.optimize);const q=h.toString();F=`${h.scopeRefs(r.default.scope)}return ${q}`,this.opts.code.process&&(F=this.opts.code.process(F,d));const z=new Function(`${r.default.self}`,`${r.default.scope}`,F)(this,this.scope.get());if(this.scope.value(j,{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:j,validateCode:q,scopeValues:h._values}),this.opts.unevaluated){const{props:Y,items:ie}=A;z.evaluated={props:Y instanceof t.Name?void 0:Y,items:ie instanceof t.Name?void 0:ie,dynamicProps:Y instanceof t.Name,dynamicItems:ie instanceof t.Name},z.source&&(z.source.evaluated=(0,t.stringify)(z.evaluated))}return d.validate=z,d}catch(q){throw delete d.validate,delete d.validateName,F&&this.logger.error("Error compiling schema, function code:",F),q}finally{this._compilations.delete(d)}}ye.compileSchema=l;function u(d,f,s){var p;s=(0,n.resolveUrl)(this.opts.uriResolver,f,s);const $=d.refs[s];if($)return $;let c=b.call(this,d,s);if(c===void 0){const h=(p=d.localRefs)===null||p===void 0?void 0:p[s],{schemaId:P}=this.opts;h&&(c=new a({schema:h,schemaId:P,root:d,baseId:f}))}if(c!==void 0)return d.refs[s]=S.call(this,c)}ye.resolveRef=u;function S(d){return(0,n.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:l.call(this,d)}function g(d){for(const f of this._compilations)if(w(f,d))return f}ye.getCompilingSchema=g;function w(d,f){return d.schema===f.schema&&d.root===f.root&&d.baseId===f.baseId}function b(d,f){let s;for(;typeof(s=this.refs[f])=="string";)f=s;return s||this.schemas[f]||v.call(this,d,f)}function v(d,f){const s=this.opts.uriResolver.parse(f),p=(0,n._getFullPath)(this.opts.uriResolver,s);let $=(0,n.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&p===$)return _.call(this,s,d);const c=(0,n.normalizeId)(p),h=this.refs[c]||this.schemas[c];if(typeof h=="string"){const P=v.call(this,d,h);return typeof P?.schema!="object"?void 0:_.call(this,s,P)}if(typeof h?.schema=="object"){if(h.validate||l.call(this,h),c===(0,n.normalizeId)(f)){const{schema:P}=h,{schemaId:j}=this.opts,A=P[j];return A&&($=(0,n.resolveUrl)(this.opts.uriResolver,$,A)),new a({schema:P,schemaId:j,root:d,baseId:$})}return _.call(this,s,h)}}ye.resolveSchema=v;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function _(d,{baseId:f,schema:s,root:p}){var $;if((($=d.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const P of d.fragment.slice(1).split("/")){if(typeof s=="boolean")return;const j=s[(0,i.unescapeFragment)(P)];if(j===void 0)return;s=j;const A=typeof s=="object"&&s[this.opts.schemaId];!y.has(P)&&A&&(f=(0,n.resolveUrl)(this.opts.uriResolver,f,A))}let c;if(typeof s!="boolean"&&s.$ref&&!(0,i.schemaHasRulesButRef)(s,this.RULES)){const P=(0,n.resolveUrl)(this.opts.uriResolver,f,s.$ref);c=v.call(this,p,P)}const{schemaId:h}=this.opts;if(c=c||new a({schema:s,schemaId:h,root:p,baseId:f}),c.schema!==c.root.schema)return c}return ye}const gi="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",vi="Meta-schema for $data reference (JSON AnySchema extension proposal)",bi="object",_i=["$data"],Si={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},$i=!1,wi={$id:gi,description:vi,type:bi,required:_i,properties:Si,additionalProperties:$i};var ut={},Xe={exports:{}},$r,yn;function ko(){if(yn)return $r;yn=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=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(b){let v="",y=0,_=0;for(_=0;_<b.length;_++)if(y=b[_].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";v+=b[_];break}for(_+=1;_<b.length;_++){if(y=b[_].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";v+=b[_]}return v}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(b){return b.length=0,!0}function o(b,v,y){if(b.length){const _=r(b);if(_!=="")v.push(_);else return y.error=!0,!1;b.length=0}return!0}function a(b){let v=0;const y={error:!1,address:"",zone:""},_=[],d=[];let f=!1,s=!1,p=o;for(let $=0;$<b.length;$++){const c=b[$];if(!(c==="["||c==="]"))if(c===":"){if(f===!0&&(s=!0),!p(d,_,y))break;if(++v>7){y.error=!0;break}$>0&&b[$-1]===":"&&(f=!0),_.push(":");continue}else if(c==="%"){if(!p(d,_,y))break;p=i}else{d.push(c);continue}}return d.length&&(p===i?y.zone=d.join(""):s?_.push(d.join("")):_.push(r(d))),y.address=_.join(""),y}function l(b){if(u(b,":")<2)return{host:b,isIPV6:!1};const v=a(b);if(v.error)return{host:b,isIPV6:!1};{let y=v.address,_=v.address;return v.zone&&(y+="%"+v.zone,_+="%25"+v.zone),{host:y,isIPV6:!0,escapedHost:_}}}function u(b,v){let y=0;for(let _=0;_<b.length;_++)b[_]===v&&y++;return y}function S(b){let v=b;const y=[];let _=-1,d=0;for(;d=v.length;){if(d===1){if(v===".")break;if(v==="/"){y.push("/");break}else{y.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]==="/")){y.push("/");break}}else if(d===3&&v==="/.."){y.length!==0&&y.pop(),y.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),y.length!==0&&y.pop();continue}}if((_=v.indexOf("/",1))===-1){y.push(v);break}else y.push(v.slice(0,_)),v=v.slice(_)}return y.join("")}function g(b,v){const y=v!==!0?escape:unescape;return b.scheme!==void 0&&(b.scheme=y(b.scheme)),b.userinfo!==void 0&&(b.userinfo=y(b.userinfo)),b.host!==void 0&&(b.host=y(b.host)),b.path!==void 0&&(b.path=y(b.path)),b.query!==void 0&&(b.query=y(b.query)),b.fragment!==void 0&&(b.fragment=y(b.fragment)),b}function w(b){const v=[];if(b.userinfo!==void 0&&(v.push(b.userinfo),v.push("@")),b.host!==void 0){let y=unescape(b.host);if(!e(y)){const _=l(y);_.isIPV6===!0?y=`[${_.escapedHost}]`:y=b.host}v.push(y)}return(typeof b.port=="number"||typeof b.port=="string")&&(v.push(":"),v.push(String(b.port))),v.length?v.join(""):void 0}return $r={nonSimpleDomain:n,recomposeAuthority:w,normalizeComponentEncoding:g,removeDotSegments:S,isIPv4:e,isUUID:t,normalizeIPv6:l,stringArrayToHexStripped:r},$r}var wr,gn;function Pi(){if(gn)return wr;gn=1;const{isUUID:t}=ko(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(c){return r.indexOf(c)!==-1}function i(c){return c.secure===!0?!0:c.secure===!1?!1:c.scheme?c.scheme.length===3&&(c.scheme[0]==="w"||c.scheme[0]==="W")&&(c.scheme[1]==="s"||c.scheme[1]==="S")&&(c.scheme[2]==="s"||c.scheme[2]==="S"):!1}function o(c){return c.host||(c.error=c.error||"HTTP URIs must have a host."),c}function a(c){const h=String(c.scheme).toLowerCase()==="https";return(c.port===(h?443:80)||c.port==="")&&(c.port=void 0),c.path||(c.path="/"),c}function l(c){return c.secure=i(c),c.resourceName=(c.path||"/")+(c.query?"?"+c.query:""),c.path=void 0,c.query=void 0,c}function u(c){if((c.port===(i(c)?443:80)||c.port==="")&&(c.port=void 0),typeof c.secure=="boolean"&&(c.scheme=c.secure?"wss":"ws",c.secure=void 0),c.resourceName){const[h,P]=c.resourceName.split("?");c.path=h&&h!=="/"?h:void 0,c.query=P,c.resourceName=void 0}return c.fragment=void 0,c}function S(c,h){if(!c.path)return c.error="URN can not be parsed",c;const P=c.path.match(e);if(P){const j=h.scheme||c.scheme||"urn";c.nid=P[1].toLowerCase(),c.nss=P[2];const A=`${j}:${h.nid||c.nid}`,F=$(A);c.path=void 0,F&&(c=F.parse(c,h))}else c.error=c.error||"URN can not be parsed.";return c}function g(c,h){if(c.nid===void 0)throw new Error("URN without nid cannot be serialized");const P=h.scheme||c.scheme||"urn",j=c.nid.toLowerCase(),A=`${P}:${h.nid||j}`,F=$(A);F&&(c=F.serialize(c,h));const q=c,U=c.nss;return q.path=`${j||h.nid}:${U}`,h.skipEscape=!0,q}function w(c,h){const P=c;return P.uuid=P.nss,P.nss=void 0,!h.tolerant&&(!P.uuid||!t(P.uuid))&&(P.error=P.error||"UUID is not valid."),P}function b(c){const h=c;return h.nss=(c.uuid||"").toLowerCase(),h}const v={scheme:"http",domainHost:!0,parse:o,serialize:a},y={scheme:"https",domainHost:v.domainHost,parse:o,serialize:a},_={scheme:"ws",domainHost:!0,parse:l,serialize:u},d={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},p={http:v,https:y,ws:_,wss:d,urn:{scheme:"urn",parse:S,serialize:g,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:w,serialize:b,skipNormalize:!0}};Object.setPrototypeOf(p,null);function $(c){return c&&(p[c]||p[c.toLowerCase()])||void 0}return wr={wsIsSecure:i,SCHEMES:p,isValidSchemeName:n,getSchemeHandler:$},wr}var vn;function ki(){if(vn)return Xe.exports;vn=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:i,nonSimpleDomain:o}=ko(),{SCHEMES:a,getSchemeHandler:l}=Pi();function u(d,f){return typeof d=="string"?d=b(y(d,f),f):typeof d=="object"&&(d=y(b(d,f),f)),d}function S(d,f,s){const p=s?Object.assign({scheme:"null"},s):{scheme:"null"},$=g(y(d,p),y(f,p),p,!0);return p.skipEscape=!0,b($,p)}function g(d,f,s,p){const $={};return p||(d=y(b(d,s),s),f=y(b(f,s),s)),s=s||{},!s.tolerant&&f.scheme?($.scheme=f.scheme,$.userinfo=f.userinfo,$.host=f.host,$.port=f.port,$.path=e(f.path||""),$.query=f.query):(f.userinfo!==void 0||f.host!==void 0||f.port!==void 0?($.userinfo=f.userinfo,$.host=f.host,$.port=f.port,$.path=e(f.path||""),$.query=f.query):(f.path?(f.path[0]==="/"?$.path=e(f.path):((d.userinfo!==void 0||d.host!==void 0||d.port!==void 0)&&!d.path?$.path="/"+f.path:d.path?$.path=d.path.slice(0,d.path.lastIndexOf("/")+1)+f.path:$.path=f.path,$.path=e($.path)),$.query=f.query):($.path=d.path,f.query!==void 0?$.query=f.query:$.query=d.query),$.userinfo=d.userinfo,$.host=d.host,$.port=d.port),$.scheme=d.scheme),$.fragment=f.fragment,$}function w(d,f,s){return typeof d=="string"?(d=unescape(d),d=b(n(y(d,s),!0),{...s,skipEscape:!0})):typeof d=="object"&&(d=b(n(d,!0),{...s,skipEscape:!0})),typeof f=="string"?(f=unescape(f),f=b(n(y(f,s),!0),{...s,skipEscape:!0})):typeof f=="object"&&(f=b(n(f,!0),{...s,skipEscape:!0})),d.toLowerCase()===f.toLowerCase()}function b(d,f){const s={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:""},p=Object.assign({},f),$=[],c=l(p.scheme||s.scheme);c&&c.serialize&&c.serialize(s,p),s.path!==void 0&&(p.skipEscape?s.path=unescape(s.path):(s.path=escape(s.path),s.scheme!==void 0&&(s.path=s.path.split("%3A").join(":")))),p.reference!=="suffix"&&s.scheme&&$.push(s.scheme,":");const h=r(s);if(h!==void 0&&(p.reference!=="suffix"&&$.push("//"),$.push(h),s.path&&s.path[0]!=="/"&&$.push("/")),s.path!==void 0){let P=s.path;!p.absolutePath&&(!c||!c.absolutePath)&&(P=e(P)),h===void 0&&P[0]==="/"&&P[1]==="/"&&(P="/%2F"+P.slice(2)),$.push(P)}return s.query!==void 0&&$.push("?",s.query),s.fragment!==void 0&&$.push("#",s.fragment),$.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(d,f){const s=Object.assign({},f),p={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let $=!1;s.reference==="suffix"&&(s.scheme?d=s.scheme+":"+d:d="//"+d);const c=d.match(v);if(c){if(p.scheme=c[1],p.userinfo=c[3],p.host=c[4],p.port=parseInt(c[5],10),p.path=c[6]||"",p.query=c[7],p.fragment=c[8],isNaN(p.port)&&(p.port=c[5]),p.host)if(i(p.host)===!1){const j=t(p.host);p.host=j.host.toLowerCase(),$=j.isIPV6}else $=!0;p.scheme===void 0&&p.userinfo===void 0&&p.host===void 0&&p.port===void 0&&p.query===void 0&&!p.path?p.reference="same-document":p.scheme===void 0?p.reference="relative":p.fragment===void 0?p.reference="absolute":p.reference="uri",s.reference&&s.reference!=="suffix"&&s.reference!==p.reference&&(p.error=p.error||"URI is not a "+s.reference+" reference.");const h=l(s.scheme||p.scheme);if(!s.unicodeSupport&&(!h||!h.unicodeSupport)&&p.host&&(s.domainHost||h&&h.domainHost)&&$===!1&&o(p.host))try{p.host=URL.domainToASCII(p.host.toLowerCase())}catch(P){p.error=p.error||"Host's domain name can not be converted to ASCII: "+P}(!h||h&&!h.skipNormalize)&&(d.indexOf("%")!==-1&&(p.scheme!==void 0&&(p.scheme=unescape(p.scheme)),p.host!==void 0&&(p.host=unescape(p.host))),p.path&&(p.path=escape(unescape(p.path))),p.fragment&&(p.fragment=encodeURI(decodeURIComponent(p.fragment)))),h&&h.parse&&h.parse(p,s)}else p.error=p.error||"URI can not be parsed.";return p}const _={SCHEMES:a,normalize:u,resolve:S,resolveComponent:g,equal:w,serialize:b,parse:y};return Xe.exports=_,Xe.exports.default=_,Xe.exports.fastUri=_,Xe.exports}var bn;function xi(){if(bn)return ut;bn=1,Object.defineProperty(ut,"__esModule",{value:!0});const t=ki();return t.code='require("ajv/dist/runtime/uri").default',ut.default=t,ut}var _n;function Ei(){return _n||(_n=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=or();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=W();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Ar(),i=ir(),o=$o(),a=Ir(),l=W(),u=nr(),S=Jt(),g=Q(),w=wi,b=xi(),v=(I,E)=>new RegExp(I,E);v.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],_=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."},f={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},s=200;function p(I){var E,R,N,m,k,T,V,L,X,Z,x,C,O,M,B,H,se,ve,fe,he,ae,De,ge,pr,fr;const Ye=I.strict,hr=(E=I.code)===null||E===void 0?void 0:E.optimize,Kr=hr===!0||hr===void 0?1:hr||0,Gr=(N=(R=I.code)===null||R===void 0?void 0:R.regExp)!==null&&N!==void 0?N:v,li=(m=I.uriResolver)!==null&&m!==void 0?m:b.default;return{strictSchema:(T=(k=I.strictSchema)!==null&&k!==void 0?k:Ye)!==null&&T!==void 0?T:!0,strictNumbers:(L=(V=I.strictNumbers)!==null&&V!==void 0?V:Ye)!==null&&L!==void 0?L:!0,strictTypes:(Z=(X=I.strictTypes)!==null&&X!==void 0?X:Ye)!==null&&Z!==void 0?Z:"log",strictTuples:(C=(x=I.strictTuples)!==null&&x!==void 0?x:Ye)!==null&&C!==void 0?C:"log",strictRequired:(M=(O=I.strictRequired)!==null&&O!==void 0?O:Ye)!==null&&M!==void 0?M:!1,code:I.code?{...I.code,optimize:Kr,regExp:Gr}:{optimize:Kr,regExp:Gr},loopRequired:(B=I.loopRequired)!==null&&B!==void 0?B:s,loopEnum:(H=I.loopEnum)!==null&&H!==void 0?H:s,meta:(se=I.meta)!==null&&se!==void 0?se:!0,messages:(ve=I.messages)!==null&&ve!==void 0?ve:!0,inlineRefs:(fe=I.inlineRefs)!==null&&fe!==void 0?fe:!0,schemaId:(he=I.schemaId)!==null&&he!==void 0?he:"$id",addUsedSchema:(ae=I.addUsedSchema)!==null&&ae!==void 0?ae:!0,validateSchema:(De=I.validateSchema)!==null&&De!==void 0?De:!0,validateFormats:(ge=I.validateFormats)!==null&&ge!==void 0?ge:!0,unicodeRegExp:(pr=I.unicodeRegExp)!==null&&pr!==void 0?pr:!0,int32range:(fr=I.int32range)!==null&&fr!==void 0?fr:!0,uriResolver:li}}class ${constructor(E={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,E=this.opts={...E,...p(E)};const{es5:R,lines:N}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:_,es5:R,lines:N}),this.logger=U(E.logger);const m=E.validateFormats;E.validateFormats=!1,this.RULES=(0,o.getRules)(),c.call(this,d,E,"NOT SUPPORTED"),c.call(this,f,E,"DEPRECATED","warn"),this._metaOpts=F.call(this),E.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),E.keywords&&A.call(this,E.keywords),typeof E.meta=="object"&&this.addMetaSchema(E.meta),P.call(this),E.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:E,meta:R,schemaId:N}=this.opts;let m=w;N==="id"&&(m={...w},m.id=m.$id,delete m.$id),R&&E&&this.addMetaSchema(m,m[N],!1)}defaultMeta(){const{meta:E,schemaId:R}=this.opts;return this.opts.defaultMeta=typeof E=="object"?E[R]||E:void 0}validate(E,R){let N;if(typeof E=="string"){if(N=this.getSchema(E),!N)throw new Error(`no schema with key or ref "${E}"`)}else N=this.compile(E);const m=N(R);return"$async"in N||(this.errors=N.errors),m}compile(E,R){const N=this._addSchema(E,R);return N.validate||this._compileSchemaEnv(N)}compileAsync(E,R){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:N}=this.opts;return m.call(this,E,R);async function m(Z,x){await k.call(this,Z.$schema);const C=this._addSchema(Z,x);return C.validate||T.call(this,C)}async function k(Z){Z&&!this.getSchema(Z)&&await m.call(this,{$ref:Z},!0)}async function T(Z){try{return this._compileSchemaEnv(Z)}catch(x){if(!(x instanceof i.default))throw x;return V.call(this,x),await L.call(this,x.missingSchema),T.call(this,Z)}}function V({missingSchema:Z,missingRef:x}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${x} cannot be resolved`)}async function L(Z){const x=await X.call(this,Z);this.refs[Z]||await k.call(this,x.$schema),this.refs[Z]||this.addSchema(x,Z,R)}async function X(Z){const x=this._loading[Z];if(x)return x;try{return await(this._loading[Z]=N(Z))}finally{delete this._loading[Z]}}}addSchema(E,R,N,m=this.opts.validateSchema){if(Array.isArray(E)){for(const T of E)this.addSchema(T,void 0,N,m);return this}let k;if(typeof E=="object"){const{schemaId:T}=this.opts;if(k=E[T],k!==void 0&&typeof k!="string")throw new Error(`schema ${T} must be string`)}return R=(0,u.normalizeId)(R||k),this._checkUnique(R),this.schemas[R]=this._addSchema(E,N,R,m,!0),this}addMetaSchema(E,R,N=this.opts.validateSchema){return this.addSchema(E,R,!0,N),this}validateSchema(E,R){if(typeof E=="boolean")return!0;let N;if(N=E.$schema,N!==void 0&&typeof N!="string")throw new Error("$schema must be a string");if(N=N||this.opts.defaultMeta||this.defaultMeta(),!N)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const m=this.validate(N,E);if(!m&&R){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return m}getSchema(E){let R;for(;typeof(R=h.call(this,E))=="string";)E=R;if(R===void 0){const{schemaId:N}=this.opts,m=new a.SchemaEnv({schema:{},schemaId:N});if(R=a.resolveSchema.call(this,m,E),!R)return;this.refs[E]=R}return R.validate||this._compileSchemaEnv(R)}removeSchema(E){if(E instanceof RegExp)return this._removeAllSchemas(this.schemas,E),this._removeAllSchemas(this.refs,E),this;switch(typeof E){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const R=h.call(this,E);return typeof R=="object"&&this._cache.delete(R.schema),delete this.schemas[E],delete this.refs[E],this}case"object":{const R=E;this._cache.delete(R);let N=E[this.opts.schemaId];return N&&(N=(0,u.normalizeId)(N),delete this.schemas[N],delete this.refs[N]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(E){for(const R of E)this.addKeyword(R);return this}addKeyword(E,R){let N;if(typeof E=="string")N=E,typeof R=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),R.keyword=N);else if(typeof E=="object"&&R===void 0){if(R=E,N=R.keyword,Array.isArray(N)&&!N.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Y.call(this,N,R),!R)return(0,g.eachItem)(N,k=>ie.call(this,k)),this;$e.call(this,R);const m={...R,type:(0,S.getJSONTypes)(R.type),schemaType:(0,S.getJSONTypes)(R.schemaType)};return(0,g.eachItem)(N,m.type.length===0?k=>ie.call(this,k,m):k=>m.type.forEach(T=>ie.call(this,k,m,T))),this}getKeyword(E){const R=this.RULES.all[E];return typeof R=="object"?R.definition:!!R}removeKeyword(E){const{RULES:R}=this;delete R.keywords[E],delete R.all[E];for(const N of R.rules){const m=N.rules.findIndex(k=>k.keyword===E);m>=0&&N.rules.splice(m,1)}return this}addFormat(E,R){return typeof R=="string"&&(R=new RegExp(R)),this.formats[E]=R,this}errorsText(E=this.errors,{separator:R=", ",dataVar:N="data"}={}){return!E||E.length===0?"No errors":E.map(m=>`${N}${m.instancePath} ${m.message}`).reduce((m,k)=>m+R+k)}$dataMetaSchema(E,R){const N=this.RULES.all;E=JSON.parse(JSON.stringify(E));for(const m of R){const k=m.split("/").slice(1);let T=E;for(const V of k)T=T[V];for(const V in N){const L=N[V];if(typeof L!="object")continue;const{$data:X}=L.definition,Z=T[V];X&&Z&&(T[V]=Ee(Z))}}return E}_removeAllSchemas(E,R){for(const N in E){const m=E[N];(!R||R.test(N))&&(typeof m=="string"?delete E[N]:m&&!m.meta&&(this._cache.delete(m.schema),delete E[N]))}}_addSchema(E,R,N,m=this.opts.validateSchema,k=this.opts.addUsedSchema){let T;const{schemaId:V}=this.opts;if(typeof E=="object")T=E[V];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof E!="boolean")throw new Error("schema must be object or boolean")}let L=this._cache.get(E);if(L!==void 0)return L;N=(0,u.normalizeId)(T||N);const X=u.getSchemaRefs.call(this,E,N);return L=new a.SchemaEnv({schema:E,schemaId:V,meta:R,baseId:N,localRefs:X}),this._cache.set(L.schema,L),k&&!N.startsWith("#")&&(N&&this._checkUnique(N),this.refs[N]=L),m&&this.validateSchema(E,!0),L}_checkUnique(E){if(this.schemas[E]||this.refs[E])throw new Error(`schema with key or id "${E}" already exists`)}_compileSchemaEnv(E){if(E.meta?this._compileMetaSchema(E):a.compileSchema.call(this,E),!E.validate)throw new Error("ajv implementation error");return E.validate}_compileMetaSchema(E){const R=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,E)}finally{this.opts=R}}}$.ValidationError=n.default,$.MissingRefError=i.default,t.default=$;function c(I,E,R,N="error"){for(const m in I){const k=m;k in E&&this.logger[N](`${R}: option ${m}. ${I[k]}`)}}function h(I){return I=(0,u.normalizeId)(I),this.schemas[I]||this.refs[I]}function P(){const I=this.opts.schemas;if(I)if(Array.isArray(I))this.addSchema(I);else for(const E in I)this.addSchema(I[E],E)}function j(){for(const I in this.opts.formats){const E=this.opts.formats[I];E&&this.addFormat(I,E)}}function A(I){if(Array.isArray(I)){this.addVocabulary(I);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const E in I){const R=I[E];R.keyword||(R.keyword=E),this.addKeyword(R)}}function F(){const I={...this.opts};for(const E of y)delete I[E];return I}const q={log(){},warn(){},error(){}};function U(I){if(I===!1)return q;if(I===void 0)return console;if(I.log&&I.warn&&I.error)return I;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(I,E){const{RULES:R}=this;if((0,g.eachItem)(I,N=>{if(R.keywords[N])throw new Error(`Keyword ${N} is already defined`);if(!z.test(N))throw new Error(`Keyword ${N} has invalid name`)}),!!E&&E.$data&&!("code"in E||"validate"in E))throw new Error('$data keyword must have "code" or "validate" function')}function ie(I,E,R){var N;const m=E?.post;if(R&&m)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let T=m?k.post:k.rules.find(({type:L})=>L===R);if(T||(T={type:R,rules:[]},k.rules.push(T)),k.keywords[I]=!0,!E)return;const V={keyword:I,definition:{...E,type:(0,S.getJSONTypes)(E.type),schemaType:(0,S.getJSONTypes)(E.schemaType)}};E.before?Se.call(this,T,V,E.before):T.rules.push(V),k.all[I]=V,(N=E.implements)===null||N===void 0||N.forEach(L=>this.addKeyword(L))}function Se(I,E,R){const N=I.rules.findIndex(m=>m.keyword===R);N>=0?I.rules.splice(N,0,E):(I.rules.push(E),this.logger.warn(`rule ${R} is not defined`))}function $e(I){let{metaSchema:E}=I;E!==void 0&&(I.$data&&this.opts.$data&&(E=Ee(E)),I.validateSchema=this.compile(E,!0))}const ne={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ee(I){return{anyOf:[I,ne]}}})(mr)),mr}var pt={},ft={},ht={},Sn;function Ci(){if(Sn)return ht;Sn=1,Object.defineProperty(ht,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return ht.default=t,ht}var Ce={},$n;function Ni(){if($n)return Ce;$n=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.callRef=Ce.getValidate=void 0;const t=ir(),e=_e(),r=W(),n=Ne(),i=Ir(),o=Q(),a={keyword:"$ref",schemaType:"string",code(S){const{gen:g,schema:w,it:b}=S,{baseId:v,schemaEnv:y,validateName:_,opts:d,self:f}=b,{root:s}=y;if((w==="#"||w==="#/")&&v===s.baseId)return $();const p=i.resolveRef.call(f,s,v,w);if(p===void 0)throw new t.default(b.opts.uriResolver,v,w);if(p instanceof i.SchemaEnv)return c(p);return h(p);function $(){if(y===s)return u(S,_,y,y.$async);const P=g.scopeValue("root",{ref:s});return u(S,(0,r._)`${P}.validate`,s,s.$async)}function c(P){const j=l(S,P);u(S,j,P,P.$async)}function h(P){const j=g.scopeValue("schema",d.code.source===!0?{ref:P,code:(0,r.stringify)(P)}:{ref:P}),A=g.name("valid"),F=S.subschema({schema:P,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:w},A);S.mergeEvaluated(F),S.ok(A)}}};function l(S,g){const{gen:w}=S;return g.validate?w.scopeValue("validate",{ref:g.validate}):(0,r._)`${w.scopeValue("wrapper",{ref:g})}.validate`}Ce.getValidate=l;function u(S,g,w,b){const{gen:v,it:y}=S,{allErrors:_,schemaEnv:d,opts:f}=y,s=f.passContext?n.default.this:r.nil;b?p():$();function p(){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,e.callValidateCode)(S,g,s)}`),h(g),_||v.assign(P,!0)},j=>{v.if((0,r._)`!(${j} instanceof ${y.ValidationError})`,()=>v.throw(j)),c(j),_||v.assign(P,!1)}),S.ok(P)}function $(){S.result((0,e.callValidateCode)(S,g,s),()=>h(g),()=>c(g))}function c(P){const j=(0,r._)`${P}.errors`;v.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${j} : ${n.default.vErrors}.concat(${j})`),v.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function h(P){var j;if(!y.opts.unevaluated)return;const A=(j=w?.validate)===null||j===void 0?void 0:j.evaluated;if(y.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(y.props=o.mergeEvaluated.props(v,A.props,y.props));else{const F=v.var("props",(0,r._)`${P}.evaluated.props`);y.props=o.mergeEvaluated.props(v,F,y.props,r.Name)}if(y.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(y.items=o.mergeEvaluated.items(v,A.items,y.items));else{const F=v.var("items",(0,r._)`${P}.evaluated.items`);y.items=o.mergeEvaluated.items(v,F,y.items,r.Name)}}}return Ce.callRef=u,Ce.default=a,Ce}var wn;function ji(){if(wn)return ft;wn=1,Object.defineProperty(ft,"__esModule",{value:!0});const t=Ci(),e=Ni(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return ft.default=r,ft}var mt={},yt={},Pn;function Ti(){if(Pn)return yt;Pn=1,Object.defineProperty(yt,"__esModule",{value:!0});const t=W(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:o,schemaCode:a})=>(0,t.str)`must be ${r[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,t._)`{comparison: ${r[o].okStr}, limit: ${a}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:a,data:l,schemaCode:u}=o;o.fail$data((0,t._)`${l} ${r[a].fail} ${u} || isNaN(${l})`)}};return yt.default=i,yt}var gt={},kn;function Oi(){if(kn)return gt;kn=1,Object.defineProperty(gt,"__esModule",{value:!0});const t=W(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:o,schemaCode:a,it:l}=n,u=l.opts.multipleOfPrecision,S=i.let("res"),g=u?(0,t._)`Math.abs(Math.round(${S}) - ${S}) > 1e-${u}`:(0,t._)`${S} !== parseInt(${S})`;n.fail$data((0,t._)`(${a} === 0 || (${S} = ${o}/${a}, ${g}))`)}};return gt.default=r,gt}var vt={},bt={},xn;function Ri(){if(xn)return bt;xn=1,Object.defineProperty(bt,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,i=0,o;for(;i<r;)n++,o=e.charCodeAt(i++),o>=55296&&o<=56319&&i<r&&(o=e.charCodeAt(i),(o&64512)===56320&&i++);return n}return bt.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',bt}var En;function Ai(){if(En)return vt;En=1,Object.defineProperty(vt,"__esModule",{value:!0});const t=W(),e=Q(),r=Ri(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){const l=o==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${l} than ${a} characters`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){const{keyword:a,data:l,schemaCode:u,it:S}=o,g=a==="maxLength"?t.operators.GT:t.operators.LT,w=S.opts.unicode===!1?(0,t._)`${l}.length`:(0,t._)`${(0,e.useFunc)(o.gen,r.default)}(${l})`;o.fail$data((0,t._)`${w} ${g} ${u}`)}};return vt.default=i,vt}var _t={},Cn;function Ii(){if(Cn)return _t;Cn=1,Object.defineProperty(_t,"__esModule",{value:!0});const t=_e(),e=W(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,e._)`{pattern: ${i}}`},code(i){const{data:o,$data:a,schema:l,schemaCode:u,it:S}=i,g=S.opts.unicodeRegExp?"u":"",w=a?(0,e._)`(new RegExp(${u}, ${g}))`:(0,t.usePattern)(i,l);i.fail$data((0,e._)`!${w}.test(${o})`)}};return _t.default=n,_t}var St={},Nn;function Mi(){if(Nn)return St;Nn=1,Object.defineProperty(St,"__esModule",{value:!0});const t=W(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,l=i==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${o}).length ${l} ${a}`)}};return St.default=r,St}var $t={},jn;function Fi(){if(jn)return $t;jn=1,Object.defineProperty($t,"__esModule",{value:!0});const t=_e(),e=W(),r=Q(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,e.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,e._)`{missingProperty: ${o}}`},code(o){const{gen:a,schema:l,schemaCode:u,data:S,$data:g,it:w}=o,{opts:b}=w;if(!g&&l.length===0)return;const v=l.length>=b.loopRequired;if(w.allErrors?y():_(),b.strictRequired){const s=o.parentSchema.properties,{definedProperties:p}=o.it;for(const $ of l)if(s?.[$]===void 0&&!p.has($)){const c=w.schemaEnv.baseId+w.errSchemaPath,h=`required property "${$}" is not defined at "${c}" (strictRequired)`;(0,r.checkStrictMode)(w,h,w.opts.strictRequired)}}function y(){if(v||g)o.block$data(e.nil,d);else for(const s of l)(0,t.checkReportMissingProp)(o,s)}function _(){const s=a.let("missing");if(v||g){const p=a.let("valid",!0);o.block$data(p,()=>f(s,p)),o.ok(p)}else a.if((0,t.checkMissingProp)(o,l,s)),(0,t.reportMissingProp)(o,s),a.else()}function d(){a.forOf("prop",u,s=>{o.setParams({missingProperty:s}),a.if((0,t.noPropertyInData)(a,S,s,b.ownProperties),()=>o.error())})}function f(s,p){o.setParams({missingProperty:s}),a.forOf(s,u,()=>{a.assign(p,(0,t.propertyInData)(a,S,s,b.ownProperties)),a.if((0,e.not)(p),()=>{o.error(),a.break()})},e.nil)}}};return $t.default=i,$t}var wt={},Tn;function qi(){if(Tn)return wt;Tn=1,Object.defineProperty(wt,"__esModule",{value:!0});const t=W(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const o=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${i} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:i,data:o,schemaCode:a}=n,l=i==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${o}.length ${l} ${a}`)}};return wt.default=r,wt}var Pt={},kt={},On;function Mr(){if(On)return kt;On=1,Object.defineProperty(kt,"__esModule",{value:!0});const t=Po();return t.code='require("ajv/dist/runtime/equal").default',kt.default=t,kt}var Rn;function Di(){if(Rn)return Pt;Rn=1,Object.defineProperty(Pt,"__esModule",{value:!0});const t=Jt(),e=W(),r=Q(),n=Mr(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:l}})=>(0,e.str)`must NOT have duplicate items (items ## ${l} and ${a} are identical)`,params:({params:{i:a,j:l}})=>(0,e._)`{i: ${a}, j: ${l}}`},code(a){const{gen:l,data:u,$data:S,schema:g,parentSchema:w,schemaCode:b,it:v}=a;if(!S&&!g)return;const y=l.let("valid"),_=w.items?(0,t.getSchemaTypes)(w.items):[];a.block$data(y,d,(0,e._)`${b} === false`),a.ok(y);function d(){const $=l.let("i",(0,e._)`${u}.length`),c=l.let("j");a.setParams({i:$,j:c}),l.assign(y,!0),l.if((0,e._)`${$} > 1`,()=>(f()?s:p)($,c))}function f(){return _.length>0&&!_.some($=>$==="object"||$==="array")}function s($,c){const h=l.name("item"),P=(0,t.checkDataTypes)(_,h,v.opts.strictNumbers,t.DataType.Wrong),j=l.const("indices",(0,e._)`{}`);l.for((0,e._)`;${$}--;`,()=>{l.let(h,(0,e._)`${u}[${$}]`),l.if(P,(0,e._)`continue`),_.length>1&&l.if((0,e._)`typeof ${h} == "string"`,(0,e._)`${h} += "_"`),l.if((0,e._)`typeof ${j}[${h}] == "number"`,()=>{l.assign(c,(0,e._)`${j}[${h}]`),a.error(),l.assign(y,!1).break()}).code((0,e._)`${j}[${h}] = ${$}`)})}function p($,c){const h=(0,r.useFunc)(l,n.default),P=l.name("outer");l.label(P).for((0,e._)`;${$}--;`,()=>l.for((0,e._)`${c} = ${$}; ${c}--;`,()=>l.if((0,e._)`${h}(${u}[${$}], ${u}[${c}])`,()=>{a.error(),l.assign(y,!1).break(P)})))}}};return Pt.default=o,Pt}var xt={},An;function Vi(){if(An)return xt;An=1,Object.defineProperty(xt,"__esModule",{value:!0});const t=W(),e=Q(),r=Mr(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,t._)`{allowedValue: ${o}}`},code(o){const{gen:a,data:l,$data:u,schemaCode:S,schema:g}=o;u||g&&typeof g=="object"?o.fail$data((0,t._)`!${(0,e.useFunc)(a,r.default)}(${l}, ${S})`):o.fail((0,t._)`${g} !== ${l}`)}};return xt.default=i,xt}var Et={},In;function Bi(){if(In)return Et;In=1,Object.defineProperty(Et,"__esModule",{value:!0});const t=W(),e=Q(),r=Mr(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,t._)`{allowedValues: ${o}}`},code(o){const{gen:a,data:l,$data:u,schema:S,schemaCode:g,it:w}=o;if(!u&&S.length===0)throw new Error("enum must have non-empty array");const b=S.length>=w.opts.loopEnum;let v;const y=()=>v??(v=(0,e.useFunc)(a,r.default));let _;if(b||u)_=a.let("valid"),o.block$data(_,d);else{if(!Array.isArray(S))throw new Error("ajv implementation error");const s=a.const("vSchema",g);_=(0,t.or)(...S.map((p,$)=>f(s,$)))}o.pass(_);function d(){a.assign(_,!1),a.forOf("v",g,s=>a.if((0,t._)`${y()}(${l}, ${s})`,()=>a.assign(_,!0).break()))}function f(s,p){const $=S[p];return typeof $=="object"&&$!==null?(0,t._)`${y()}(${l}, ${s}[${p}])`:(0,t._)`${l} === ${$}`}}};return Et.default=i,Et}var Mn;function Li(){if(Mn)return mt;Mn=1,Object.defineProperty(mt,"__esModule",{value:!0});const t=Ti(),e=Oi(),r=Ai(),n=Ii(),i=Mi(),o=Fi(),a=qi(),l=Di(),u=Vi(),S=Bi(),g=[t.default,e.default,r.default,n.default,i.default,o.default,a.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,S.default];return mt.default=g,mt}var Ct={},Ve={},Fn;function xo(){if(Fn)return Ve;Fn=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.validateAdditionalItems=void 0;const t=W(),e=Q(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){const{parentSchema:a,it:l}=o,{items:u}=a;if(!Array.isArray(u)){(0,e.checkStrictMode)(l,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(o,u)}};function i(o,a){const{gen:l,schema:u,data:S,keyword:g,it:w}=o;w.items=!0;const b=l.const("len",(0,t._)`${S}.length`);if(u===!1)o.setParams({len:a.length}),o.pass((0,t._)`${b} <= ${a.length}`);else if(typeof u=="object"&&!(0,e.alwaysValidSchema)(w,u)){const y=l.var("valid",(0,t._)`${b} <= ${a.length}`);l.if((0,t.not)(y),()=>v(y)),o.ok(y)}function v(y){l.forRange("i",a.length,b,_=>{o.subschema({keyword:g,dataProp:_,dataPropType:e.Type.Num},y),w.allErrors||l.if((0,t.not)(y),()=>l.break())})}}return Ve.validateAdditionalItems=i,Ve.default=n,Ve}var Nt={},Be={},qn;function Eo(){if(qn)return Be;qn=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.validateTuple=void 0;const t=W(),e=Q(),r=_e(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:a,it:l}=o;if(Array.isArray(a))return i(o,"additionalItems",a);l.items=!0,!(0,e.alwaysValidSchema)(l,a)&&o.ok((0,r.validateArray)(o))}};function i(o,a,l=o.schema){const{gen:u,parentSchema:S,data:g,keyword:w,it:b}=o;_(S),b.opts.unevaluated&&l.length&&b.items!==!0&&(b.items=e.mergeEvaluated.items(u,l.length,b.items));const v=u.name("valid"),y=u.const("len",(0,t._)`${g}.length`);l.forEach((d,f)=>{(0,e.alwaysValidSchema)(b,d)||(u.if((0,t._)`${y} > ${f}`,()=>o.subschema({keyword:w,schemaProp:f,dataProp:f},v)),o.ok(v))});function _(d){const{opts:f,errSchemaPath:s}=b,p=l.length,$=p===d.minItems&&(p===d.maxItems||d[a]===!1);if(f.strictTuples&&!$){const c=`"${w}" is ${p}-tuple, but minItems or maxItems/${a} are not specified or different at path "${s}"`;(0,e.checkStrictMode)(b,c,f.strictTuples)}}}return Be.validateTuple=i,Be.default=n,Be}var Dn;function zi(){if(Dn)return Nt;Dn=1,Object.defineProperty(Nt,"__esModule",{value:!0});const t=Eo(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return Nt.default=e,Nt}var jt={},Vn;function Ui(){if(Vn)return jt;Vn=1,Object.defineProperty(jt,"__esModule",{value:!0});const t=W(),e=Q(),r=_e(),n=xo(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){const{schema:l,parentSchema:u,it:S}=a,{prefixItems:g}=u;S.items=!0,!(0,e.alwaysValidSchema)(S,l)&&(g?(0,n.validateAdditionalItems)(a,g):a.ok((0,r.validateArray)(a)))}};return jt.default=o,jt}var Tt={},Bn;function Ki(){if(Bn)return Tt;Bn=1,Object.defineProperty(Tt,"__esModule",{value:!0});const t=W(),e=Q(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:o}})=>o===void 0?(0,t.str)`must contain at least ${i} valid item(s)`:(0,t.str)`must contain at least ${i} and no more than ${o} valid item(s)`,params:({params:{min:i,max:o}})=>o===void 0?(0,t._)`{minContains: ${i}}`:(0,t._)`{minContains: ${i}, maxContains: ${o}}`},code(i){const{gen:o,schema:a,parentSchema:l,data:u,it:S}=i;let g,w;const{minContains:b,maxContains:v}=l;S.opts.next?(g=b===void 0?1:b,w=v):g=1;const y=o.const("len",(0,t._)`${u}.length`);if(i.setParams({min:g,max:w}),w===void 0&&g===0){(0,e.checkStrictMode)(S,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&g>w){(0,e.checkStrictMode)(S,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,e.alwaysValidSchema)(S,a)){let p=(0,t._)`${y} >= ${g}`;w!==void 0&&(p=(0,t._)`${p} && ${y} <= ${w}`),i.pass(p);return}S.items=!0;const _=o.name("valid");w===void 0&&g===1?f(_,()=>o.if(_,()=>o.break())):g===0?(o.let(_,!0),w!==void 0&&o.if((0,t._)`${u}.length > 0`,d)):(o.let(_,!1),d()),i.result(_,()=>i.reset());function d(){const p=o.name("_valid"),$=o.let("count",0);f(p,()=>o.if(p,()=>s($)))}function f(p,$){o.forRange("i",0,y,c=>{i.subschema({keyword:"contains",dataProp:c,dataPropType:e.Type.Num,compositeRule:!0},p),$()})}function s(p){o.code((0,t._)`${p}++`),w===void 0?o.if((0,t._)`${p} >= ${g}`,()=>o.assign(_,!0).break()):(o.if((0,t._)`${p} > ${w}`,()=>o.assign(_,!1).break()),g===1?o.assign(_,!0):o.if((0,t._)`${p} >= ${g}`,()=>o.assign(_,!0)))}}};return Tt.default=n,Tt}var Pr={},Ln;function Gi(){return Ln||(Ln=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=W(),r=Q(),n=_e();t.error={message:({params:{property:u,depsCount:S,deps:g}})=>{const w=S===1?"property":"properties";return(0,e.str)`must have ${w} ${g} when property ${u} is present`},params:({params:{property:u,depsCount:S,deps:g,missingProperty:w}})=>(0,e._)`{property: ${u},
7
- missingProperty: ${w},
8
- depsCount: ${S},
9
- deps: ${g}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(u){const[S,g]=o(u);a(u,S),l(u,g)}};function o({schema:u}){const S={},g={};for(const w in u){if(w==="__proto__")continue;const b=Array.isArray(u[w])?S:g;b[w]=u[w]}return[S,g]}function a(u,S=u.schema){const{gen:g,data:w,it:b}=u;if(Object.keys(S).length===0)return;const v=g.let("missing");for(const y in S){const _=S[y];if(_.length===0)continue;const d=(0,n.propertyInData)(g,w,y,b.opts.ownProperties);u.setParams({property:y,depsCount:_.length,deps:_.join(", ")}),b.allErrors?g.if(d,()=>{for(const f of _)(0,n.checkReportMissingProp)(u,f)}):(g.if((0,e._)`${d} && (${(0,n.checkMissingProp)(u,_,v)})`),(0,n.reportMissingProp)(u,v),g.else())}}t.validatePropertyDeps=a;function l(u,S=u.schema){const{gen:g,data:w,keyword:b,it:v}=u,y=g.name("valid");for(const _ in S)(0,r.alwaysValidSchema)(v,S[_])||(g.if((0,n.propertyInData)(g,w,_,v.opts.ownProperties),()=>{const d=u.subschema({keyword:b,schemaProp:_},y);u.mergeValidEvaluated(d,y)},()=>g.var(y,!0)),u.ok(y))}t.validateSchemaDeps=l,t.default=i})(Pr)),Pr}var Ot={},zn;function Hi(){if(zn)return Ot;zn=1,Object.defineProperty(Ot,"__esModule",{value:!0});const t=W(),e=Q(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,t._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:o,schema:a,data:l,it:u}=i;if((0,e.alwaysValidSchema)(u,a))return;const S=o.name("valid");o.forIn("key",l,g=>{i.setParams({propertyName:g}),i.subschema({keyword:"propertyNames",data:g,dataTypes:["string"],propertyName:g,compositeRule:!0},S),o.if((0,t.not)(S),()=>{i.error(!0),u.allErrors||o.break()})}),i.ok(S)}};return Ot.default=n,Ot}var Rt={},Un;function Co(){if(Un)return Rt;Un=1,Object.defineProperty(Rt,"__esModule",{value:!0});const t=_e(),e=W(),r=Ne(),n=Q(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,e._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:l,schema:u,parentSchema:S,data:g,errsCount:w,it:b}=a;if(!w)throw new Error("ajv implementation error");const{allErrors:v,opts:y}=b;if(b.props=!0,y.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(b,u))return;const _=(0,t.allSchemaProperties)(S.properties),d=(0,t.allSchemaProperties)(S.patternProperties);f(),a.ok((0,e._)`${w} === ${r.default.errors}`);function f(){l.forIn("key",g,h=>{!_.length&&!d.length?$(h):l.if(s(h),()=>$(h))})}function s(h){let P;if(_.length>8){const j=(0,n.schemaRefOrVal)(b,S.properties,"properties");P=(0,t.isOwnProperty)(l,j,h)}else _.length?P=(0,e.or)(..._.map(j=>(0,e._)`${h} === ${j}`)):P=e.nil;return d.length&&(P=(0,e.or)(P,...d.map(j=>(0,e._)`${(0,t.usePattern)(a,j)}.test(${h})`))),(0,e.not)(P)}function p(h){l.code((0,e._)`delete ${g}[${h}]`)}function $(h){if(y.removeAdditional==="all"||y.removeAdditional&&u===!1){p(h);return}if(u===!1){a.setParams({additionalProperty:h}),a.error(),v||l.break();return}if(typeof u=="object"&&!(0,n.alwaysValidSchema)(b,u)){const P=l.name("valid");y.removeAdditional==="failing"?(c(h,P,!1),l.if((0,e.not)(P),()=>{a.reset(),p(h)})):(c(h,P),v||l.if((0,e.not)(P),()=>l.break()))}}function c(h,P,j){const A={keyword:"additionalProperties",dataProp:h,dataPropType:n.Type.Str};j===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(A,P)}}};return Rt.default=o,Rt}var At={},Kn;function Wi(){if(Kn)return At;Kn=1,Object.defineProperty(At,"__esModule",{value:!0});const t=or(),e=_e(),r=Q(),n=Co(),i={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:a,schema:l,parentSchema:u,data:S,it:g}=o;g.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(g,n.default,"additionalProperties"));const w=(0,e.allSchemaProperties)(l);for(const d of w)g.definedProperties.add(d);g.opts.unevaluated&&w.length&&g.props!==!0&&(g.props=r.mergeEvaluated.props(a,(0,r.toHash)(w),g.props));const b=w.filter(d=>!(0,r.alwaysValidSchema)(g,l[d]));if(b.length===0)return;const v=a.name("valid");for(const d of b)y(d)?_(d):(a.if((0,e.propertyInData)(a,S,d,g.opts.ownProperties)),_(d),g.allErrors||a.else().var(v,!0),a.endIf()),o.it.definedProperties.add(d),o.ok(v);function y(d){return g.opts.useDefaults&&!g.compositeRule&&l[d].default!==void 0}function _(d){o.subschema({keyword:"properties",schemaProp:d,dataProp:d},v)}}};return At.default=i,At}var It={},Gn;function Ji(){if(Gn)return It;Gn=1,Object.defineProperty(It,"__esModule",{value:!0});const t=_e(),e=W(),r=Q(),n=Q(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:a,schema:l,data:u,parentSchema:S,it:g}=o,{opts:w}=g,b=(0,t.allSchemaProperties)(l),v=b.filter($=>(0,r.alwaysValidSchema)(g,l[$]));if(b.length===0||v.length===b.length&&(!g.opts.unevaluated||g.props===!0))return;const y=w.strictSchema&&!w.allowMatchingProperties&&S.properties,_=a.name("valid");g.props!==!0&&!(g.props instanceof e.Name)&&(g.props=(0,n.evaluatedPropsToName)(a,g.props));const{props:d}=g;f();function f(){for(const $ of b)y&&s($),g.allErrors?p($):(a.var(_,!0),p($),a.if(_))}function s($){for(const c in y)new RegExp($).test(c)&&(0,r.checkStrictMode)(g,`property ${c} matches pattern ${$} (use allowMatchingProperties)`)}function p($){a.forIn("key",u,c=>{a.if((0,e._)`${(0,t.usePattern)(o,$)}.test(${c})`,()=>{const h=v.includes($);h||o.subschema({keyword:"patternProperties",schemaProp:$,dataProp:c,dataPropType:n.Type.Str},_),g.opts.unevaluated&&d!==!0?a.assign((0,e._)`${d}[${c}]`,!0):!h&&!g.allErrors&&a.if((0,e.not)(_),()=>a.break())})})}}};return It.default=i,It}var Mt={},Hn;function Zi(){if(Hn)return Mt;Hn=1,Object.defineProperty(Mt,"__esModule",{value:!0});const t=Q(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:o}=r;if((0,t.alwaysValidSchema)(o,i)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Mt.default=e,Mt}var Ft={},Wn;function Yi(){if(Wn)return Ft;Wn=1,Object.defineProperty(Ft,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:_e().validateUnion,error:{message:"must match a schema in anyOf"}};return Ft.default=e,Ft}var qt={},Jn;function Qi(){if(Jn)return qt;Jn=1,Object.defineProperty(qt,"__esModule",{value:!0});const t=W(),e=Q(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,t._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:o,schema:a,parentSchema:l,it:u}=i;if(!Array.isArray(a))throw new Error("ajv implementation error");if(u.opts.discriminator&&l.discriminator)return;const S=a,g=o.let("valid",!1),w=o.let("passing",null),b=o.name("_valid");i.setParams({passing:w}),o.block(v),i.result(g,()=>i.reset(),()=>i.error(!0));function v(){S.forEach((y,_)=>{let d;(0,e.alwaysValidSchema)(u,y)?o.var(b,!0):d=i.subschema({keyword:"oneOf",schemaProp:_,compositeRule:!0},b),_>0&&o.if((0,t._)`${b} && ${g}`).assign(g,!1).assign(w,(0,t._)`[${w}, ${_}]`).else(),o.if(b,()=>{o.assign(g,!0),o.assign(w,_),d&&i.mergeEvaluated(d,t.Name)})})}}};return qt.default=n,qt}var Dt={},Zn;function Xi(){if(Zn)return Dt;Zn=1,Object.defineProperty(Dt,"__esModule",{value:!0});const t=Q(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:o}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const a=n.name("valid");i.forEach((l,u)=>{if((0,t.alwaysValidSchema)(o,l))return;const S=r.subschema({keyword:"allOf",schemaProp:u},a);r.ok(a),r.mergeEvaluated(S)})}};return Dt.default=e,Dt}var Vt={},Yn;function es(){if(Yn)return Vt;Yn=1,Object.defineProperty(Vt,"__esModule",{value:!0});const t=W(),e=Q(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,t.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,t._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:a,parentSchema:l,it:u}=o;l.then===void 0&&l.else===void 0&&(0,e.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const S=i(u,"then"),g=i(u,"else");if(!S&&!g)return;const w=a.let("valid",!0),b=a.name("_valid");if(v(),o.reset(),S&&g){const _=a.let("ifClause");o.setParams({ifClause:_}),a.if(b,y("then",_),y("else",_))}else S?a.if(b,y("then")):a.if((0,t.not)(b),y("else"));o.pass(w,()=>o.error(!0));function v(){const _=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},b);o.mergeEvaluated(_)}function y(_,d){return()=>{const f=o.subschema({keyword:_},b);a.assign(w,b),o.mergeValidEvaluated(f,w),d?a.assign(d,(0,t._)`${_}`):o.setParams({ifClause:_})}}}};function i(o,a){const l=o.schema[a];return l!==void 0&&!(0,e.alwaysValidSchema)(o,l)}return Vt.default=n,Vt}var Bt={},Qn;function ts(){if(Qn)return Bt;Qn=1,Object.defineProperty(Bt,"__esModule",{value:!0});const t=Q(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,t.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return Bt.default=e,Bt}var Xn;function rs(){if(Xn)return Ct;Xn=1,Object.defineProperty(Ct,"__esModule",{value:!0});const t=xo(),e=zi(),r=Eo(),n=Ui(),i=Ki(),o=Gi(),a=Hi(),l=Co(),u=Wi(),S=Ji(),g=Zi(),w=Yi(),b=Qi(),v=Xi(),y=es(),_=ts();function d(f=!1){const s=[g.default,w.default,b.default,v.default,y.default,_.default,a.default,l.default,o.default,u.default,S.default];return f?s.push(e.default,n.default):s.push(t.default,r.default),s.push(i.default),s}return Ct.default=d,Ct}var Lt={},zt={},eo;function ns(){if(eo)return zt;eo=1,Object.defineProperty(zt,"__esModule",{value:!0});const t=W(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,i){const{gen:o,data:a,$data:l,schema:u,schemaCode:S,it:g}=n,{opts:w,errSchemaPath:b,schemaEnv:v,self:y}=g;if(!w.validateFormats)return;l?_():d();function _(){const f=o.scopeValue("formats",{ref:y.formats,code:w.code.formats}),s=o.const("fDef",(0,t._)`${f}[${S}]`),p=o.let("fType"),$=o.let("format");o.if((0,t._)`typeof ${s} == "object" && !(${s} instanceof RegExp)`,()=>o.assign(p,(0,t._)`${s}.type || "string"`).assign($,(0,t._)`${s}.validate`),()=>o.assign(p,(0,t._)`"string"`).assign($,s)),n.fail$data((0,t.or)(c(),h()));function c(){return w.strictSchema===!1?t.nil:(0,t._)`${S} && !${$}`}function h(){const P=v.$async?(0,t._)`(${s}.async ? await ${$}(${a}) : ${$}(${a}))`:(0,t._)`${$}(${a})`,j=(0,t._)`(typeof ${$} == "function" ? ${P} : ${$}.test(${a}))`;return(0,t._)`${$} && ${$} !== true && ${p} === ${i} && !${j}`}}function d(){const f=y.formats[u];if(!f){c();return}if(f===!0)return;const[s,p,$]=h(f);s===i&&n.pass(P());function c(){if(w.strictSchema===!1){y.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${u}" ignored in schema at path "${b}"`}}function h(j){const A=j instanceof RegExp?(0,t.regexpCode)(j):w.code.formats?(0,t._)`${w.code.formats}${(0,t.getProperty)(u)}`:void 0,F=o.scopeValue("formats",{key:u,ref:j,code:A});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,t._)`${F}.validate`]:["string",j,F]}function P(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!v.$async)throw new Error("async format in sync schema");return(0,t._)`await ${$}(${a})`}return typeof p=="function"?(0,t._)`${$}(${a})`:(0,t._)`${$}.test(${a})`}}}};return zt.default=r,zt}var to;function os(){if(to)return Lt;to=1,Object.defineProperty(Lt,"__esModule",{value:!0});const e=[ns().default];return Lt.default=e,Lt}var Oe={},ro;function is(){return ro||(ro=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.contentVocabulary=Oe.metadataVocabulary=void 0,Oe.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Oe.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Oe}var no;function ss(){if(no)return pt;no=1,Object.defineProperty(pt,"__esModule",{value:!0});const t=ji(),e=Li(),r=rs(),n=os(),i=is(),o=[t.default,e.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return pt.default=o,pt}var Ut={},et={},oo;function as(){if(oo)return et;oo=1,Object.defineProperty(et,"__esModule",{value:!0}),et.DiscrError=void 0;var t;return(function(e){e.Tag="tag",e.Mapping="mapping"})(t||(et.DiscrError=t={})),et}var io;function ls(){if(io)return Ut;io=1,Object.defineProperty(Ut,"__esModule",{value:!0});const t=W(),e=as(),r=Ir(),n=ir(),i=Q(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:l,tagName:u}})=>l===e.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:l,tag:u,tagName:S}})=>(0,t._)`{error: ${l}, tag: ${S}, tagValue: ${u}}`},code(l){const{gen:u,data:S,schema:g,parentSchema:w,it:b}=l,{oneOf:v}=w;if(!b.opts.discriminator)throw new Error("discriminator: requires discriminator option");const y=g.propertyName;if(typeof y!="string")throw new Error("discriminator: requires propertyName");if(g.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const _=u.let("valid",!1),d=u.const("tag",(0,t._)`${S}${(0,t.getProperty)(y)}`);u.if((0,t._)`typeof ${d} == "string"`,()=>f(),()=>l.error(!1,{discrError:e.DiscrError.Tag,tag:d,tagName:y})),l.ok(_);function f(){const $=p();u.if(!1);for(const c in $)u.elseIf((0,t._)`${d} === ${c}`),u.assign(_,s($[c]));u.else(),l.error(!1,{discrError:e.DiscrError.Mapping,tag:d,tagName:y}),u.endIf()}function s($){const c=u.name("valid"),h=l.subschema({keyword:"oneOf",schemaProp:$},c);return l.mergeEvaluated(h,t.Name),c}function p(){var $;const c={},h=j(w);let P=!0;for(let q=0;q<v.length;q++){let U=v[q];if(U?.$ref&&!(0,i.schemaHasRulesButRef)(U,b.self.RULES)){const Y=U.$ref;if(U=r.resolveRef.call(b.self,b.schemaEnv.root,b.baseId,Y),U instanceof r.SchemaEnv&&(U=U.schema),U===void 0)throw new n.default(b.opts.uriResolver,b.baseId,Y)}const z=($=U?.properties)===null||$===void 0?void 0:$[y];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${y}"`);P=P&&(h||j(U)),A(z,q)}if(!P)throw new Error(`discriminator: "${y}" must be required`);return c;function j({required:q}){return Array.isArray(q)&&q.includes(y)}function A(q,U){if(q.const)F(q.const,U);else if(q.enum)for(const z of q.enum)F(z,U);else throw new Error(`discriminator: "properties/${y}" must have "const" or "enum"`)}function F(q,U){if(typeof q!="string"||q in c)throw new Error(`discriminator: "${y}" values must be unique strings`);c[q]=U}}}};return Ut.default=a,Ut}const cs="http://json-schema.org/draft-07/schema#",ds="http://json-schema.org/draft-07/schema#",us="Core schema meta-schema",ps={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:[]}},fs=["object","boolean"],hs={$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:"#"}},ms={$schema:cs,$id:ds,title:us,definitions:ps,type:fs,properties:hs,default:!0};var so;function ys(){return so||(so=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Ei(),n=ss(),i=ls(),o=ms,a=["/properties"],l="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(y,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.Ajv=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var S=or();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return S.KeywordCxt}});var g=W();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}});var w=Ar();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return w.default}});var b=ir();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return b.default}})})(at,at.exports)),at.exports}var gs=ys();const vs=ci(gs),bs={};let No=bs,jo=null;function To(){return No}function Fl(t){No=t}function _s(){return jo}function ql(t){jo=t}function Le(t,e){return{type:"string",...e?{description:e}:{},"x-doc":{group:t,type:"string"}}}function kr(t,e){return{type:"number",...e?{description:e}:{},"x-doc":{group:t,type:"number"}}}function Ss(t,e){return{type:"boolean",description:e,"x-doc":{group:t,type:"boolean"}}}function xr(t,e,r){return{type:"string",enum:[...e],...r?{description:r}:{},"x-doc":{group:t,type:"string"}}}const $s={type:"string",description:"CSS-класс (Tailwind: flex, grid, gap-*).","x-doc":{group:"Control",type:"string",kind:"readonly"}},ws={type:"string",description:"Текстовое содержимое.","x-doc":{group:"Control",type:"string"}},Nr=[{tag:"div",content:"container",defaultClass:"flex gap-4"},{tag:"section",content:"container",defaultClass:"space-y-4"},{tag:"article",content:"container",defaultClass:"space-y-4"},{tag:"aside",content:"container",defaultClass:"space-y-4"},{tag:"header",content:"container",defaultClass:"space-y-4"},{tag:"footer",content:"container",defaultClass:"space-y-4"},{tag:"nav",content:"container",defaultClass:"flex gap-4"},{tag:"main",content:"container",defaultClass:"space-y-4"},{tag:"fieldset",content:"container",defaultClass:"space-y-4"},{tag:"h1",content:"text",defaultText:"Заголовок"},{tag:"h2",content:"text",defaultText:"Заголовок"},{tag:"h3",content:"text",defaultText:"Заголовок"},{tag:"h4",content:"text",defaultText:"Заголовок"},{tag:"h5",content:"text",defaultText:"Заголовок"},{tag:"h6",content:"text",defaultText:"Заголовок"},{tag:"p",content:"text",defaultText:"Текст"},{tag:"span",content:"text",defaultText:"Текст"},{tag:"strong",content:"text",defaultText:"Текст"},{tag:"em",content:"text",defaultText:"Текст"},{tag:"small",content:"text",defaultText:"Текст"},{tag:"blockquote",content:"text",defaultText:"Цитата",props:{cite:Le("Options","URL источника цитаты.")}},{tag:"code",content:"text",defaultText:"code"},{tag:"pre",content:"text",defaultText:"Текст"},{tag:"a",content:"text",defaultText:"Ссылка",props:{href:Le("Control","URL ссылки."),target:xr("Options",["_self","_blank","_parent","_top"],"Где открыть ссылку."),rel:Le("Options","Отношение (напр. noopener noreferrer).")}},{tag:"label",content:"text",defaultText:"Подпись",props:{htmlFor:Le("Options","ID связанного поля (атрибут for).")}},{tag:"br",content:"void"},{tag:"ul",content:"container",defaultClass:"list-disc space-y-1 pl-5"},{tag:"ol",content:"container",defaultClass:"list-decimal space-y-1 pl-5",props:{start:kr("Options","Начальный номер списка."),reversed:Ss("Behavior","Обратный порядок нумерации."),type:xr("Options",["1","a","A","i","I"],"Стиль маркера нумерации.")}},{tag:"li",content:"container"},{tag:"hr",content:"void"},{tag:"img",content:"void",props:{src:Le("Control","URL изображения."),alt:Le("Control","Альтернативный текст (доступность)."),width:kr("Options","Ширина, px."),height:kr("Options","Высота, px."),loading:xr("Behavior",["lazy","eager"],"Стратегия загрузки.")}}],Ps=new Map(Nr.map(t=>[t.tag,t]));function ks(t){return Ps.get(t)}function xs(t){const e={className:$s};return t.content==="text"&&(e.text=ws),t.props&&Object.assign(e,t.props),{type:"object",properties:e}}const Es={type:"object",properties:{title:{type:"string","x-doc":{group:"Control",type:"string"}},addButtonLabel:{type:"string","x-doc":{group:"Control",type:"string"}},emptyMessage:{type:"string","x-doc":{group:"Control",type:"string"}},itemLabel:{type:"string",description:"Подпись элемента: строка или $dataSource/$fn.","x-doc":{group:"Options",type:"string"}},reorderable:{type:"boolean","x-doc":{group:"Behavior",type:"boolean"}},minItems:{type:"number","x-doc":{group:"Behavior",type:"number"}},maxItems:{type:"number","x-doc":{group:"Behavior",type:"number"}}}},Cs={type:"object",properties:{className:{type:"string","x-doc":{group:"Control",type:"string"}}}},Ns={type:"object",properties:{title:{type:"string","x-doc":{group:"Control",type:"string"}},icon:{type:"string",description:"Иконка шага: эмодзи или строка.","x-doc":{group:"Control",type:"string"}}}};function js(t){const e=t?.htmlTags&&t.htmlTags.length?Nr.filter(l=>t.htmlTags.includes(l.tag)):Nr,r=t?.html===!1?[]:e.map(l=>({name:`$html(${l.tag})`,role:"container",category:"HTML",propsSchema:xs(l)})),n={name:"FormArray",role:"array",category:"Массив",propsSchema:Es},i={name:"Wizard",role:"container",category:"Мастер",propsSchema:Cs},o={name:"Step",role:"container",category:"Мастер",propsSchema:Ns},a=[...r];return t?.formArray!==!1&&a.push(n),t?.wizard!==!1&&a.push(i,o),a}var Ts=Symbol.for("preact-signals");function sr(){if(xe>1)xe--;else{var t,e=!1;for((function(){var i=Yt;for(Yt=void 0;i!==void 0;)i.S.v===i.v&&(i.S.i=i.i),i=i.o})();rt!==void 0;){var r=rt;for(rt=void 0,Zt++;r!==void 0;){var n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&Ao(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=n}}if(Zt=0,xe--,e)throw t}}function Os(t){if(xe>0)return t();jr=++Rs,xe++;try{return t()}finally{sr()}}var ee=void 0;function Oo(t){var e=ee;ee=void 0;try{return t()}finally{ee=e}}var rt=void 0,xe=0,Zt=0,Rs=0,jr=0,Yt=void 0,Qt=0;function Ro(t){if(ee!==void 0){var e=t.n;if(e===void 0||e.t!==ee)return e={i:0,S:t,p:ee.s,n:void 0,t:ee,e:void 0,x:void 0,r:e},ee.s!==void 0&&(ee.s.n=e),ee.s=e,t.n=e,32&ee.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=ee.s,e.n=void 0,ee.s.n=e,ee.s=e),e}}function oe(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}oe.prototype.brand=Ts;oe.prototype.h=function(){return!0};oe.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:Oo(function(){var n;(n=e.W)==null||n.call(e)}))};oe.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,n=t.x;r!==void 0&&(r.x=n,t.e=void 0),n!==void 0&&(n.e=r,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&Oo(function(){var i;(i=e.Z)==null||i.call(e)}))}};oe.prototype.subscribe=function(t){var e=this;return pe(function(){var r=e.value,n=ee;ee=void 0;try{t(r)}finally{ee=n}},{name:"sub"})};oe.prototype.valueOf=function(){return this.value};oe.prototype.toString=function(){return this.value+""};oe.prototype.toJSON=function(){return this.value};oe.prototype.peek=function(){var t=ee;ee=void 0;try{return this.value}finally{ee=t}};Object.defineProperty(oe.prototype,"value",{get:function(){var t=Ro(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Zt>100)throw new Error("Cycle detected");(function(r){xe!==0&&Zt===0&&r.l!==jr&&(r.l=jr,Yt={S:r,v:r.v,i:r.i,o:Yt})})(this),this.v=t,this.i++,Qt++,xe++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{sr()}}}});function de(t,e){return new oe(t,e)}function Ao(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function Io(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function Mo(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function qe(t,e){oe.call(this,void 0),this.x=t,this.s=void 0,this.g=Qt-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}qe.prototype=new oe;qe.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Qt))return!0;if(this.g=Qt,this.f|=1,this.i>0&&!Ao(this))return this.f&=-2,!0;var t=ee;try{Io(this),ee=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return ee=t,Mo(this),this.f&=-2,!0};qe.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}oe.prototype.S.call(this,t)};qe.prototype.U=function(t){if(this.t!==void 0&&(oe.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};qe.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(qe.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=Ro(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function J(t,e){return new qe(t,e)}function Fo(t){var e=t.m;if(t.m=void 0,typeof e=="function"){xe++;var r=ee;ee=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Fr(t),n}finally{ee=r,sr()}}}function Fr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,Fo(t)}function As(t){if(ee!==this)throw new Error("Out-of-order effect");Mo(this),ee=t,this.f&=-2,8&this.f&&Fr(this),sr()}function He(t,e){this.x=t,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=e?.name}He.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.m=e)}finally{t()}};He.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Fo(this),Io(this),xe++;var t=ee;return ee=this,As.bind(this,t)};He.prototype.N=function(){2&this.f||(this.f|=2,this.u=rt,rt=this)};He.prototype.d=function(){this.f|=8,1&this.f||Fr(this)};He.prototype.dispose=function(){this.d()};function pe(t,e){var r=new He(t,e);try{r.c()}catch(i){throw r.d(),i}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}const Is=new WeakMap;function ao(t){return Is.has(t)}let qr=class{subscriptions=new Map;add(e,r){return this.subscriptions.has(e)&&this.subscriptions.get(e)?.(),this.subscriptions.set(e,r),()=>this.remove(e)}remove(e){const r=this.subscriptions.get(e);return r?(r(),this.subscriptions.delete(e),!0):!1}clear(){this.subscriptions.forEach(e=>{e()}),this.subscriptions.clear()}size(){return this.subscriptions.size}has(e){return this.subscriptions.has(e)}getKeys(){return Array.from(this.subscriptions.keys())}dispose(){this.clear()}};const qo=new WeakMap;function Ms(t,e){qo.set(t,e)}function Fs(t){return qo.get(t)}let ar=class{_touched=de(!1);_dirty=de(!1);_status=de("valid");touched=J(()=>this._touched.value);untouched=J(()=>!this._touched.value);dirty=J(()=>this._dirty.value);pristine=J(()=>!this._dirty.value);status=J(()=>this._status.value);disabled=J(()=>this._status.value==="disabled");enabled=J(()=>this._status.value!=="disabled");getErrors(e){const r=this.errors.value;return e?r.filter(n=>{if(e.code!==void 0&&!(Array.isArray(e.code)?e.code:[e.code]).includes(n.code)||e.message!==void 0&&!n.message.toLowerCase().includes(e.message.toLowerCase()))return!1;if(e.params!==void 0){if(!n.params)return!1;for(const[i,o]of Object.entries(e.params))if(n.params[i]!==o)return!1}return!(e.predicate!==void 0&&!e.predicate(n))}):r}markAsTouched(){this._touched.value=!0,this.onMarkAsTouched()}markAsUntouched(){this._touched.value=!1,this.onMarkAsUntouched()}markAsDirty(){this._dirty.value=!0,this.onMarkAsDirty()}markAsPristine(){this._dirty.value=!1,this.onMarkAsPristine()}touchAll(){this.markAsTouched()}disable(){this._status.value="disabled",this.onDisable()}enable(){this._status.value="valid",this.onEnable()}onMarkAsTouched(){}onMarkAsUntouched(){}onMarkAsDirty(){}onMarkAsPristine(){}onDisable(){}onEnable(){}};const Ae={Watch:"watch",ComputeFrom:"computeFrom",LinkFields:"linkFields",WatchField:"watchField",WatchItems:"watchItems",WatchLength:"watchLength"};let qs=0;function Ie(t){return`${t}-${++qs}`}var Re=(t=>(t.THROW="throw",t.LOG="log",t.CONVERT="convert",t))(Re||{});let ze=class{static handle(e,r,n="throw"){const i=this.extractMessage(e);switch(n){case"throw":throw e;case"log":return;case"convert":return{code:"validator_error",message:i,params:{field:r}}}}static extractMessage(e){return e instanceof Error?e.message:typeof e=="string"?e:typeof e=="object"&&e!==null&&"message"in e?String(e.message):String(e)}static createValidationError(e,r,n){return{code:e,message:r,params:n?{field:n}:void 0}}static isValidationError(e){return typeof e=="object"&&e!==null&&"code"in e&&"message"in e&&typeof e.code=="string"&&typeof e.message=="string"}},Ds=class{_status;status;valid;invalid;pending;disabled;constructor(e="valid"){this._status=de(e),this.status=J(()=>this._status.value),this.valid=J(()=>this._status.value==="valid"),this.invalid=J(()=>this._status.value==="invalid"),this.pending=J(()=>this._status.value==="pending"),this.disabled=J(()=>this._status.value==="disabled")}startValidation(){this._status.value!=="disabled"&&(this._status.value="pending")}completeValidation(e){this._status.value!=="disabled"&&(this._status.value=e?"invalid":"valid")}setErrors(e){this._status.value!=="disabled"&&(this._status.value=e?"invalid":"valid")}disable(){this._status.value="disabled"}enable(e=!1){this._status.value=e?"invalid":"valid"}dispatch(e){switch(e.type){case"START_VALIDATION":this.startValidation();break;case"VALIDATION_SUCCESS":this.completeValidation(!1);break;case"VALIDATION_FAILURE":this.completeValidation(!0);break;case"DISABLE":this.disable();break;case"ENABLE":this.enable(e.hasErrors);break;case"SET_ERRORS":this.setErrors(e.hasErrors);break}}getStatus(){return this._status.value}canValidate(){return this._status.value!=="disabled"}},Vs=class extends ar{_value;_errors;_componentProps;statusMachine;value;valid;invalid;pending;status;disabled;errors;componentProps;shouldShowError;validators;asyncValidators;updateOn;initialValue;currentAbortController;debounceMs;validateDebounceTimer;pendingValidation;disposers=new qr;component;constructor(e){super(),this.validators=e.validators||[],this.asyncValidators=e.asyncValidators||[],this.updateOn=e.updateOn||"blur",this.debounceMs=e.debounce||0,this.component=e.component,this._value=e.valueSignal??de(e.value),this.initialValue=this._value.peek(),this._errors=de([]),this._componentProps=de(e.componentProps||{}),this.statusMachine=new Ds(e.disabled?"disabled":"valid"),this.value=J(()=>this._value.value),this.valid=J(()=>this.statusMachine.valid.value),this.invalid=J(()=>this.statusMachine.invalid.value),this.pending=J(()=>this.statusMachine.pending.value),this.status=J(()=>this.statusMachine.status.value),this.disabled=J(()=>this.statusMachine.disabled.value),this.errors=J(()=>this._errors.value),this.componentProps=J(()=>this._componentProps.value),this.shouldShowError=J(()=>this.statusMachine.invalid.value&&(this._touched.value||this._dirty.value))}getValue(){return this._value.peek()}setValue(e,r){if(this._value.value=e,this._dirty.value=!0,r?.emitEvent===!1)return;const n=this.validators.length>0||this.asyncValidators.length>0,i=this._errors.value.length>0;if(this.updateOn==="change"){this.validate();return}i&&n&&this.validate()}patchValue(e){this.setValue(e)}reset(e){this._value.value=e!==void 0?e:this.initialValue,this._errors.value=[],this._touched.value=!1,this._dirty.value=!1,this.statusMachine.setErrors(!1)}resetToInitial(){this.reset(this.initialValue)}cancelPendingValidation(){this.pendingValidation&&(this.pendingValidation.abortController.abort(),this.pendingValidation.resolve(!1),this.pendingValidation=void 0),this.validateDebounceTimer&&(clearTimeout(this.validateDebounceTimer),this.validateDebounceTimer=void 0),this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=void 0)}async validate(e){const r=e?.debounce??this.debounceMs;if(this.cancelPendingValidation(),r<=0||this.asyncValidators.length===0)return this.validateImmediate();const n=new AbortController;return new Promise(i=>{this.pendingValidation={resolve:i,abortController:n},this.validateDebounceTimer=setTimeout(async()=>{if(this.validateDebounceTimer=void 0,n.signal.aborted){i(!1);return}this.pendingValidation=void 0;const o=await this.validateImmediate(n);i(o)},r),n.signal.addEventListener("abort",()=>{this.validateDebounceTimer&&(clearTimeout(this.validateDebounceTimer),this.validateDebounceTimer=void 0),i(!1)},{once:!0})})}async validateImmediate(e){const r=e??new AbortController;e||this.currentAbortController?.abort(),this.currentAbortController=r;const{signal:n}=r,i=[];for(const o of this.validators){const a=o(this._value.value);a&&i.push(a)}if(n.aborted)return!1;if(i.length>0){this._errors.value=i;const o=i.some(a=>a.severity!=="warning");if(this.statusMachine.setErrors(o),o)return!1}if(this.asyncValidators.length>0){if(n.aborted)return!1;this.statusMachine.startValidation();try{const o=await Promise.all(this.asyncValidators.map(async l=>{if(n.aborted)throw new DOMException("Validation aborted","AbortError");try{const u=await l(this._value.value,{signal:n});if(n.aborted)throw new DOMException("Validation aborted","AbortError");return u}catch(u){if(u instanceof DOMException&&u.name==="AbortError")throw u;return ze.handle(u,"FieldNode AsyncValidator",Re.CONVERT)}}));if(n.aborted)return!1;const a=o.filter(l=>l!==null);if(a.length>0){this._errors.value=a;const l=a.some(u=>u.severity!=="warning");if(this.statusMachine.completeValidation(l),l)return!1}}catch(o){if(o instanceof DOMException&&o.name==="AbortError")return!1;throw o}}return n.aborted?!1:((this.validators.length>0||this.asyncValidators.length>0)&&(this._errors.value=[],this.statusMachine.completeValidation(!1)),!this._errors.value.some(o=>o.severity!=="warning"))}setErrors(e){this._errors.value=e;const r=e.some(n=>n.severity!=="warning");this.statusMachine.setErrors(r)}clearErrors(){this._errors.value=[],this.statusMachine.setErrors(!1)}onMarkAsTouched(){this.updateOn==="blur"&&this.validate()}onDisable(){this.statusMachine.disable(),this._errors.value=[]}onEnable(){this.statusMachine.enable(this._errors.value.length>0),this.validate()}updateComponentProps(e){this._componentProps.value={...this._componentProps.value,...e}}setUpdateOn(e){this.updateOn=e}getUpdateOn(){return this.updateOn}watch(e){const r=new AbortController,n=pe(()=>{const o=this.value.value;e(o,r.signal)}),i=Ie(Ae.Watch);return this.disposers.add(i,()=>{r.abort(),n()})}computeFrom(e,r){const n=pe(()=>{const o=e.map(l=>l.value),a=r(...o);this.setValue(a,{emitEvent:!1})}),i=Ie(Ae.ComputeFrom);return this.disposers.add(i,n)}dispose(){try{this.disposers.dispose()}finally{this.cancelPendingValidation()}}};function Dr(t){const{getChildren:e,ownErrors:r,disabled:n}=t,i=J(()=>r.value.length>0?!1:e().every(w=>w.disabled.value||w.valid.value)),o=J(()=>!i.value),a=J(()=>e().some(w=>w.pending.value)),l=J(()=>e().some(w=>w.touched.value)),u=J(()=>e().some(w=>w.dirty.value)),S=J(()=>{const w=[...r.value];for(const b of e())w.push(...b.errors.value);return w}),g=J(()=>n?.value?"disabled":a.value?"pending":o.value?"invalid":"valid");return{valid:i,invalid:o,pending:a,touched:l,dirty:u,errors:S,status:g}}function lo(t){return typeof t=="object"&&t!==null&&"getProxy"in t&&typeof t.getProxy=="function"}const co="$";function Bs(t,e){let r;const n=()=>{if(!r){const i={};e.forEach((o,a)=>{i[a]=o&&lo(o)?o.getProxy():o}),r=i}return r};return new Proxy(t,{get:(i,o)=>{if(o===co)return n();if(o in i)return i[o];if(typeof o=="string"&&e.has(o)){const a=e.get(o);return a&&lo(a)?a.getProxy():a}},set:(i,o,a)=>typeof o=="string"&&e.has(o)?!1:(i[o]=a,!0),has:(i,o)=>o===co||typeof o=="string"&&e.has(o)?!0:o in i,ownKeys:i=>{const o=Reflect.ownKeys(i),a=Array.from(e.keys());return[...new Set([...o,...a])]},getOwnPropertyDescriptor:(i,o)=>typeof o=="string"&&e.has(o)?{enumerable:!0,configurable:!0}:Reflect.getOwnPropertyDescriptor(i,o)})}let Ls=class{constructor(e){this.form=e}_submitting=de(!1);submitting=J(()=>this._submitting.value);async submit(e,r){const{skipValidation:n=!1,skipTouch:i=!1}=r||{};if(i||this.form.markAsTouched(),!n&&!await this.form.validate())return null;this._submitting.value=!0;try{return await e(this.form.getValue())}finally{this._submitting.value=!1}}async submitWithResult(e,r){const{skipValidation:n=!1,skipTouch:i=!1}=r||{};if(i||this.form.markAsTouched(),!n&&!await this.form.validate())return{success:!1,data:null};this._submitting.value=!0;try{return{success:!0,data:await e(this.form.getValue())}}catch(o){return{success:!1,data:null,error:o instanceof Error?o:new Error(String(o))}}finally{this._submitting.value=!1}}isSubmitting(){return this._submitting.value}};function zs(t){const e=[];for(const r of t.split(".")){const n=/^([^[\]]+)(?:\[(\d+)\])?$/.exec(r);if(!n)return[];e.push(n[2]!==void 0?{key:n[1],index:Number(n[2])}:{key:n[1]})}return e}let Ge=class Do extends ar{id=crypto.randomUUID();_fields=new Map;disposers=new qr;_proxyInstance;_behaviorCleanup;nodeFactory=new Us;formSubmitter;_disabled=de(!1);_formErrors=de([]);_fieldSignals=new WeakMap;value;valid;invalid;touched;dirty;pending;errors;status;submitting;constructor(e){super(),this.formSubmitter=new Ls(this);const r=e.form,n=r!=null&&typeof r=="object"&&("valueSignal"in r||"value"in r),i="form"in e&&!n?e.form:e;for(const[a,l]of Object.entries(i)){const u=this.createNode(l);this._fields.set(a,u)}this.value=J(()=>{const a={};return this._fields.forEach((l,u)=>{a[u]=l.value.value}),a});const o=Dr({getChildren:()=>Array.from(this._fields.values()),ownErrors:this._formErrors,disabled:this._disabled});this.valid=o.valid,this.invalid=o.invalid,this.pending=o.pending,this.touched=o.touched,this.dirty=o.dirty,this.errors=o.errors,this.status=o.status,this.submitting=this.formSubmitter.submitting}buildProxy(){return Bs(this,this._fields)}getValue(){const e={};return this._fields.forEach((r,n)=>{e[n]=r.getValue()}),e}setValue(e,r){for(const[n,i]of Object.entries(e)){const o=this._fields.get(n);if(o){const a=this._fieldSignals.get(o)??o.value;if(ao(a))continue;o.setValue(i,r)}}}patchValue(e){Os(()=>{for(const[r,n]of Object.entries(e)){const i=this._fields.get(r);if(i&&n!==void 0){const o=this._fieldSignals.get(i)??i.value;if(ao(o))continue;i.setValue(n,{emitEvent:!1})}}})}reset(e){this._formErrors.value=[],this._fields.forEach((r,n)=>{const i=e?.[n];r.reset(i)})}resetToInitial(){this._formErrors.value=[],this._fields.forEach(e=>{"resetToInitial"in e&&typeof e.resetToInitial=="function"?e.resetToInitial():e.reset()})}async validate(){return this.clearErrors(),await Promise.all(Array.from(this._fields.values()).map(e=>e.validate())),Array.from(this._fields.values()).every(e=>e.valid.value||e.disabled.value)}setErrors(e){this._formErrors.value=e}clearErrors(){this._formErrors.value=[],this._fields.forEach(e=>e.clearErrors())}getField(e){return this._fields.get(e)}get fields(){return this._fields}getProxy(){return this._proxyInstance||(this._proxyInstance=this.buildProxy()),this._proxyInstance}getAllFields(){return this._fields.values()}onMarkAsTouched(){this._fields.forEach(e=>e.markAsTouched())}onMarkAsUntouched(){this._fields.forEach(e=>e.markAsUntouched())}onMarkAsDirty(){this._fields.forEach(e=>e.markAsDirty())}onMarkAsPristine(){this._fields.forEach(e=>e.markAsPristine())}async submit(e,r){return this.formSubmitter.submit(e,r)}async submitWithResult(e,r){return this.formSubmitter.submitWithResult(e,r)}getFieldByPath(e){if(e.startsWith(".")||e.endsWith("."))return;const r=zs(e);if(r.length===0)return;let n=this;for(const i of r){if(!(n instanceof Do)||(n=n.getField(i.key),!n))return;if(i.index!==void 0)if("at"in n&&"length"in n&&typeof n.at=="function"){const o=n.at(i.index);if(!o)return;n=o}else return}return n}createNode(e){return this.nodeFactory.createNode(e)}linkFields(e,r,n){const i=this._fields.get(e),o=this._fields.get(r);if(!i||!o){const u=i?r:e;throw new Error(`GroupNode.linkFields: field "${String(u)}" not found`)}const a=pe(()=>{const u=i.value.value,S=n?n(u):u;o.setValue(S,{emitEvent:!1})}),l=Ie(Ae.LinkFields);return this.disposers.add(l,a)}watchField(e,r){const n=this.getFieldByPath(e);if(!n)throw new Error(`GroupNode.watchField: field "${e}" not found`);const i=pe(()=>{r(n.value.value)}),o=Ie(Ae.WatchField);return this.disposers.add(o,i)}watchFieldByPath(e,r){const n=this.getFieldByPath(e);if(!n)throw new Error(`GroupNode.watchFieldByPath: field "${e}" not found`);const i=pe(()=>{r(n.value.value)}),o=Ie(Ae.WatchField);return this.disposers.add(o,i)}onDisable(){this._disabled.value=!0,this._fields.forEach(e=>e.disable())}onEnable(){this._disabled.value=!1,this._fields.forEach(e=>e.enable())}attachBehaviorCleanup(e){this._behaviorCleanup=e}registerFieldSignal(e,r){this._fieldSignals.set(e,r)}dispose(){this._behaviorCleanup?.(),this._behaviorCleanup=void 0,this.disposers.dispose(),this._fields.forEach(e=>{"dispose"in e&&typeof e.dispose=="function"&&e.dispose()})}},uo=class extends ar{items;itemSchema;initialItems;disposers=new qr;_arrayErrors=de([]);validationSchemaFn;behaviorSchemaFn;value;valid;invalid;touched;dirty;pending;errors;status;length;constructor(e,r=[]){super(),this.itemSchema=e,this.initialItems=r,this.items=de([]);for(const i of r)this.push(i);this.length=J(()=>this.items.value.length),this.value=J(()=>this.items.value.map(i=>i.value.value));const n=Dr({getChildren:()=>this.items.value,ownErrors:this._arrayErrors});this.valid=n.valid,this.invalid=n.invalid,this.pending=n.pending,this.touched=n.touched,this.dirty=n.dirty,this.errors=n.errors,this.status=n.status}push(e){const r=this.createItem(e);this.items.value=[...this.items.value,r]}removeAt(e){if(e<0||e>=this.items.value.length){ze.handle(new Error(`ArrayNode.removeAt: index ${e} out of bounds (length: ${this.items.value.length})`),"ArrayNode.removeAt",Re.LOG);return}const r=this.items.value[e];this.items.value=this.items.value.filter((n,i)=>i!==e),r&&"dispose"in r&&typeof r.dispose=="function"&&r.dispose()}insert(e,r){if(e<0||e>this.items.value.length){ze.handle(new Error(`ArrayNode.insert: index ${e} out of bounds (length: ${this.items.value.length})`),"ArrayNode.insert",Re.LOG);return}const n=this.createItem(r),i=[...this.items.value];i.splice(e,0,n),this.items.value=i}move(e,r){const n=this.items.value.length;if(e<0||e>=n||r<0||r>=n){ze.handle(new Error(`ArrayNode.move: index out of bounds (from=${e}, to=${r}, length=${n})`),"ArrayNode.move",Re.LOG);return}if(e===r)return;const i=[...this.items.value],[o]=i.splice(e,1);i.splice(r,0,o),this.items.value=i}swap(e,r){const n=this.items.value.length;if(e<0||e>=n||r<0||r>=n){ze.handle(new Error(`ArrayNode.swap: index out of bounds (a=${e}, b=${r}, length=${n})`),"ArrayNode.swap",Re.LOG);return}if(e===r)return;const i=[...this.items.value];[i[e],i[r]]=[i[r],i[e]],this.items.value=i}clear(){const e=[...this.items.value];this.items.value=[],e.forEach(r=>{"dispose"in r&&typeof r.dispose=="function"&&r.dispose()})}at(e){const r=this.items.value[e];if(r)return r.getProxy()}getValue(){return this.items.value.map(e=>e.getValue())}setValue(e,r){this.clear(),e.forEach(n=>this.push(n)),r?.emitEvent!==!1&&this.validate().catch(n=>{ze.handle(n,"ArrayNode.setValue",Re.LOG)})}patchValue(e){e.forEach((r,n)=>{this.items.value[n]&&r!==void 0&&this.items.value[n].patchValue(r)})}reset(e){this._arrayErrors.value=[],this.clear(),e&&e.forEach(r=>this.push(r))}resetToInitial(){this._arrayErrors.value=[],this.clear(),this.initialItems.forEach(e=>this.push(e))}async validate(){return(await Promise.all(this.items.value.map(e=>e.validate()))).every(Boolean)&&this._arrayErrors.value.length===0}setErrors(e){this._arrayErrors.value=e}clearErrors(){this._arrayErrors.value=[],this.items.value.forEach(e=>e.clearErrors())}onMarkAsTouched(){this.items.value.forEach(e=>e.markAsTouched())}onMarkAsUntouched(){this.items.value.forEach(e=>e.markAsUntouched())}onMarkAsDirty(){this.items.value.forEach(e=>e.markAsDirty())}onMarkAsPristine(){this.items.value.forEach(e=>e.markAsPristine())}forEach(e){this.items.value.forEach((r,n)=>{const i=r.getProxy();e(i,n)})}map(e){return this.items.value.map((r,n)=>{const i=r.getProxy();return e(i,n)})}createItem(e){if(this.isGroupSchema(this.itemSchema)){const r=new Ge(this.itemSchema);return e&&r.patchValue(e),this.validationSchemaFn&&"applyValidationSchema"in r&&r.applyValidationSchema(this.validationSchemaFn),this.behaviorSchemaFn&&"applyBehaviorSchema"in r&&r.applyBehaviorSchema(this.behaviorSchemaFn),r}throw new Error("ArrayNode поддерживает только GroupNode элементы. Для массива примитивов используйте обычное поле с типом массива.")}isGroupSchema(e){return typeof e=="object"&&e!==null&&!("component"in e)&&!Array.isArray(e)}applyValidationSchema(e){this.validationSchemaFn=e,this.items.value.forEach(r=>{"applyValidationSchema"in r&&typeof r.applyValidationSchema=="function"&&r.applyValidationSchema(e)})}applyBehaviorSchema(e){this.behaviorSchemaFn=e,this.items.value.forEach(r=>{"applyBehaviorSchema"in r&&typeof r.applyBehaviorSchema=="function"&&r.applyBehaviorSchema(e)})}watchItems(e,r){const n=pe(()=>{const o=this.items.value.map(a=>{if(a instanceof Ge)return a.getFieldByPath(e)?.value.value});r(o)}),i=Ie(Ae.WatchItems);return this.disposers.add(i,n)}watchLength(e){const r=pe(()=>{const i=this.length.value;e(i)}),n=Ie(Ae.WatchLength);return this.disposers.add(n,r)}dispose(){this.disposers.dispose(),this.items.value.forEach(e=>{"dispose"in e&&typeof e.dispose=="function"&&e.dispose()})}onDisable(){this.items.value.forEach(e=>{e.disable()})}onEnable(){this.items.value.forEach(e=>{e.enable()})}},Us=class{createNode(e){if(Array.isArray(e)&&e.length>=1)return this.createArrayNodeFromArray(e);if(this.isFieldConfig(e))return new Vs(e);if(this.isArrayConfig(e))return new uo(e.schema,e.initialItems);if(this.isGroupConfig(e))return new Ge(e);throw new Error(`NodeFactory: Unknown node config. Expected FieldConfig, GroupConfig, or ArrayConfig, but got: ${JSON.stringify(e)}`)}createArrayNodeFromArray(e){const[r,...n]=e,i=[];this.isGroupConfig(r)&&i.push(this.extractValues(r));for(const o of n)this.isGroupConfig(o)?i.push(this.extractValues(o)):i.push(o);return new uo(r,i)}extractValues(e){if(this.isFieldConfig(e))return e.value;if(Array.isArray(e))return e.map(r=>this.extractValues(r));if(this.isGroupConfig(e)){const r={};for(const[n,i]of Object.entries(e))r[n]=this.extractValues(i);return r}return e}isFieldConfig(e){return e==null||typeof e!="object"?!1:"valueSignal"in e?!0:"value"in e?"component"in e||"componentProps"in e||"validators"in e||"asyncValidators"in e||"updateOn"in e||"debounce"in e:!1}isArrayConfig(e){return e!=null&&typeof e=="object"&&"schema"in e&&!("value"in e)}isGroupConfig(e){return e!=null&&typeof e=="object"&&!this.isFieldConfig(e)&&!this.isArrayConfig(e)}},Ks=class extends ar{constructor(e,r){super(),this.control=e,this.buildItem=r,this.initial=e.toArray(),this.disposeSync=pe(()=>{const i=e.length,o=[],a=[];for(let S=0;S<i;S++){const g=e.at(S);if(!g)continue;let w=this.cache.get(g);w||(w=r(g),this.cache.set(g,w)),o.push(g),a.push(w)}const l=new Set(o),u=[];for(const S of this.mountedModels){if(l.has(S))continue;const g=this.cache.get(S);this.cache.delete(S),g&&u.push(g)}this.mountedModels=o,this.itemNodes.value=a,u.forEach(S=>this.disposeItemNode(S))}),this.length=J(()=>this.itemNodes.value.length),this.value=J(()=>this.itemNodes.value.map(i=>i.value.value));const n=Dr({getChildren:()=>this.itemNodes.value,ownErrors:this._arrayErrors});this.valid=n.valid,this.invalid=n.invalid,this.pending=n.pending,this.touched=n.touched,this.dirty=n.dirty,this.errors=n.errors,this.status=n.status}itemNodes=de([]);cache=new WeakMap;mountedModels=[];initial;_arrayErrors=de([]);disposeSync;get items(){return this.itemNodes}value;valid;invalid;pending;touched;dirty;errors;status;length;at(e){return this.itemNodes.value[e]}map(e){return this.itemNodes.value.map((r,n)=>e(r,n))}forEach(e){this.itemNodes.value.forEach((r,n)=>e(r,n))}push(e){this.control.push(e??{})}insert(e,r){this.control.insertAt(e,r??{})}removeAt(e){this.control.removeAt(e)}move(e,r){this.control.move(e,r)}swap(e,r){this.control.swap(e,r)}clear(){this.control.clear()}getValue(){return this.control.toArray()}setValue(e){this.control.clear(),(e??[]).forEach(r=>this.control.push(r))}patchValue(e){this.setValue(e)}reset(e){this._arrayErrors.value=[],this.setValue(e??this.initial)}resetToInitial(){this.reset(this.initial)}async validate(){return(await Promise.all(this.itemNodes.value.map(e=>e.validate()))).every(Boolean)&&this._arrayErrors.value.length===0}setErrors(e){this._arrayErrors.value=e}clearErrors(){this._arrayErrors.value=[],this.itemNodes.value.forEach(e=>e.clearErrors?.())}onMarkAsTouched(){this.itemNodes.value.forEach(e=>e.markAsTouched?.())}onMarkAsUntouched(){this.itemNodes.value.forEach(e=>e.markAsUntouched?.())}onMarkAsDirty(){this.itemNodes.value.forEach(e=>e.markAsDirty?.())}onMarkAsPristine(){this.itemNodes.value.forEach(e=>e.markAsPristine?.())}onDisable(){this.itemNodes.value.forEach(e=>e.disable?.())}onEnable(){this.itemNodes.value.forEach(e=>e.enable?.())}disposeItemNode(e){e.dispose?.()}dispose(){this.disposeSync(),this.itemNodes.value.forEach(e=>this.disposeItemNode(e)),this.mountedModels=[]}};const Vo=t=>t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Date)&&!(typeof Blob<"u"&&t instanceof Blob)&&!(typeof File<"u"&&t instanceof File);function Tr(t,e,r){if(t==null||typeof t!="object"||t instanceof oe)return;if(Array.isArray(t)){for(const o of t)Tr(o,e,r);return}const n=t,i=n.array;if(i&&typeof i.__path=="string"&&typeof n.item=="function"){r.set(i.__path,n.item);return}n.value instanceof oe&&e.set(n.value,{component:n.component,componentProps:n.componentProps,validators:n.validators,asyncValidators:n.asyncValidators,updateOn:n.updateOn,disabled:n.disabled,debounce:n.debounce});for(const[o,a]of Object.entries(n))o!=="value"&&Tr(a,e,r)}function Bo(t,e,r,n){const i={};for(const[o,a]of Object.entries(e)){const l=r===""?o:`${r}.${o}`;if(Array.isArray(a))continue;if(Vo(a)){i[o]=Bo(t,a,l,n);continue}const u=t.signalAt(l);if(!u)throw new Error(`createForm({ model }): не найден сигнал для пути "${l}"`);const S=n.get(u)??{},{validators:g,asyncValidators:w,...b}=S;i[o]={...b,valueSignal:u}}return i}function Lo(t,e,r){for(const[n,i]of Object.entries(t)){const o=e===""?n:`${e}.${n}`;Array.isArray(i)||(Vo(i)?Lo(i,o,r):r.push(o))}}function zo(t){const{model:e,schema:r,behavior:n}=t,i=new Map,o=new Map;r!==void 0&&Tr(r,i,o);const a=Bo(e,e.get(),"",i),l=new Ge(a),u=e.get();for(const[w,b]of Object.entries(u)){if(!Array.isArray(b))continue;const v=o.get(w);if(!v)continue;const y=e[w],_=f=>zo({model:f,schema:v(f)}),d=new Ks(y,_);l.fields.set(w,d)}const S=l.getProxy(),g=[];Lo(e.get(),"",g);for(const w of g){const b=e.signalAt(w),v=l.getFieldByPath(w);if(b&&v){Ms(b,v);const y=w.lastIndexOf("."),_=y===-1?l:l.getFieldByPath(w.slice(0,y));_ instanceof Ge&&_.registerFieldSignal(v,b)}}return n&&l.attachBehaviorCleanup(n.__run(e,S)),S}const Gs=t=>t!=null&&typeof t=="object"&&"model"in t&&typeof t.model?.signalAt=="function";function Wl(t){return Gs(t)?zo(t):new Ge(t).getProxy()}var po={exports:{}},Er={},fo;function Hs(){if(fo)return Er;fo=1;var t=di;function e(w,b){return w===b&&(w!==0||1/w===1/b)||w!==w&&b!==b}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,i=t.useEffect,o=t.useLayoutEffect,a=t.useDebugValue;function l(w,b){var v=b(),y=n({inst:{value:v,getSnapshot:b}}),_=y[0].inst,d=y[1];return o(function(){_.value=v,_.getSnapshot=b,u(_)&&d({inst:_})},[w,v,b]),i(function(){return u(_)&&d({inst:_}),w(function(){u(_)&&d({inst:_})})},[w]),a(v),v}function u(w){var b=w.getSnapshot;w=w.value;try{var v=b();return!r(w,v)}catch{return!0}}function S(w,b){return b()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:l;return Er.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,Er}var ho;function Ws(){return ho||(ho=1,po.exports=Hs()),po.exports}var Js=Ws();function Zs(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Vr(t,e,r,n){const i=D.useRef(null),o=D.useRef(t);o.current=t;const a=D.useRef(e);a.current=e;const l=D.useRef(r);if(l.current=r,i.current===null){const g={};for(const w in t)g[w]=t[w].value;i.current={...g,__snapshot:null}}const u=D.useCallback(g=>{let w=!0;return pe(()=>{const b=o.current;for(const v in b)b[v].value;if(w){w=!1;return}g()})},[n]),S=D.useCallback(()=>{const g=i.current,w=o.current,b={};for(const y in w)b[y]=w[y].value;let v=!1;for(const y of a.current){const{key:_,useShallowArrayEqual:d}=y,f=b[_],s=g[_];if(d){if(!Zs(s,f)){v=!0;break}}else if(s!==f){v=!0;break}}if(!v&&g.__snapshot)return g.__snapshot;for(const y in w)g[y]=b[y];return g.__snapshot=l.current(b),g.__snapshot},[n]);return Js.useSyncExternalStore(u,S,S)}function Ys(t){const e={value:t.value,disabled:t.disabled,errors:t.errors,pending:t.pending,valid:t.valid,invalid:t.invalid,touched:t.touched,dirty:t.dirty,shouldShowError:t.shouldShowError,componentProps:t.componentProps},r=[{key:"value"},{key:"disabled"},{key:"errors",useShallowArrayEqual:!0},{key:"pending"},{key:"valid"},{key:"invalid"},{key:"touched"},{key:"dirty"},{key:"shouldShowError"},{key:"componentProps"}],n=D.useCallback(i=>({value:i.value,pending:i.pending,disabled:i.disabled,errors:i.errors,valid:i.valid,invalid:i.invalid,touched:i.touched,dirty:i.dirty,shouldShowError:i.shouldShowError,componentProps:i.componentProps}),[]);return Vr(e,r,n,t)}function Qs(t){const e={value:t.value,length:t.length,errors:t.errors,pending:t.pending,valid:t.valid,invalid:t.invalid,touched:t.touched,dirty:t.dirty,disabled:t.disabled},r=[{key:"value"},{key:"length"},{key:"errors",useShallowArrayEqual:!0},{key:"pending"},{key:"valid"},{key:"invalid"},{key:"touched"},{key:"dirty"},{key:"disabled"}],n=D.useCallback(i=>({value:i.value,length:i.length,pending:i.pending,errors:i.errors,valid:i.valid,invalid:i.invalid,touched:i.touched,dirty:i.dirty,disabled:i.disabled}),[]);return Vr(e,r,n,t)}function Xs(){const t=D.useCallback(()=>({value:[],length:0,pending:!1,errors:[],valid:!0,invalid:!1,touched:!1,dirty:!1,disabled:!1}),[]);return Vr({},[],t)}function Jl(t){const e=t&&"length"in t&&"map"in t;return t?e?Qs(t):Ys(t):Xs()}function ea(t){return t.value instanceof oe}function ta(t){const e=t;return e.array!=null&&typeof e.array=="object"&&typeof e.item=="function"}function ra(t){const e=t.component;return typeof e=="function"?!0:typeof e=="string"?e.length>0:e!==null&&typeof e=="object"&&e.$$typeof!==void 0}const na=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Uo=D.createContext(null);function oa({value:t,children:e}){return K.jsx(Uo.Provider,{value:t,children:e})}function ia(){const t=D.useContext(Uo);if(!t)throw new Error("useRenderContext must be used within RenderContextProvider (FormRenderer)");return t}const Ko=Symbol("RenderSchemaProxy"),lr=D.createContext(null);function mo(t){return typeof t=="function"&&Ko in t}function sa(t){const e=new Map,r=new Map,n=new Map,i=new Map,o=[],a=new Map,l=new Map,u=de(0),S=new Map,g=y=>{let _=S.get(y);return _||(_=de(0),S.set(y,_)),_},w=y=>{u.value++,g(y).value++},b={hiddenOverrides:e,propsOverrides:r,refRegistry:n,conditionRegistry:i,effectRegistry:o,callbackRegistry:a,lifecycleRegistry:l,version:u,versionFor:g},v=t;return Object.assign(v,{[Ko]:!0,__overrideMaps:b}),v.node=y=>({setHidden(_){return e.set(y,_),w(y),this},resetHidden(){return e.delete(y),w(y),this},patchProps(_){return r.set(y,{...r.get(y)??{},..._}),w(y),this},resetProps(){return r.delete(y),w(y),this},getRef(){return n.has(y)||n.set(y,D.createRef()),n.get(y)},__selector:y,__overrideMaps:b}),v}function aa(t){const e=D.useContext(lr);return D.useSyncExternalStore(D.useCallback(r=>e&&t?e.versionFor(t).subscribe(r):()=>{},[e,t]),()=>t&&e?e.hiddenOverrides.get(t)??null:null,()=>t&&e?e.hiddenOverrides.get(t)??null:null)}function la(t){const e=D.useContext(lr);return D.useSyncExternalStore(D.useCallback(r=>e&&t?e.versionFor(t).subscribe(r):()=>{},[e,t]),()=>t&&e?e.propsOverrides.get(t)??null:null,()=>t&&e?e.propsOverrides.get(t)??null:null)}function ca(t){const e=D.useCallback(()=>t?.()??!1,[t]),r=D.useCallback(n=>t?J(t).subscribe(n):()=>{},[t]);return D.useSyncExternalStore(r,e,e)}function da({effectRegistry:t}){return D.useEffect(()=>{const e=t.map(r=>pe(()=>{const n=r();return typeof n=="function"?n:void 0}));return()=>e.forEach(r=>r())},[]),null}function ua(t){D.useEffect(()=>{if(!t)return;const e=t.onMount?.();return()=>{typeof e=="function"&&e(),t.onUnmount?.()}},[t])}const yo=t=>t;function pa(t,e,r,n,i){const o=t.strip?.length?Object.fromEntries(Object.entries(i).filter(([a])=>!t.strip.includes(a))):i;return{...o,[t.valueProp??"value"]:(t.toValue??yo)(e),[t.changeProp??"onChange"]:a=>r((t.fromEmit??yo)(a,o)),...t.bindBlur?t.bindBlur(n):{onBlur:n}}}function fa(t){const e=D.useRef({value:t.value.value,disabled:t.disabled.value,componentProps:t.componentProps.value}),r=D.useCallback(i=>{let o=!0;return pe(()=>{if(t.value.value,t.disabled.value,t.componentProps.value,o){o=!1;return}i()})},[t]),n=D.useCallback(()=>{const i=t.value.value,o=t.disabled.value,a=t.componentProps.value,l=e.current;if(l.value===i&&l.disabled===o&&l.componentProps===a)return l;const u={value:i,disabled:o,componentProps:a};return e.current=u,u},[t]);return D.useSyncExternalStore(r,n,n)}const ha=D.memo(function({node:t,fieldNode:e,fieldWrapper:r,nodeRef:n,resolveFieldAdapter:i}){const{value:o,disabled:a,componentProps:l}=fa(e),u=D.useCallback(h=>e.setValue(h),[e]),S=D.useCallback(()=>e.markAsTouched(),[e]),g=t.component;if(!g)return typeof console<"u"&&console.warn("[RenderSchema] Model field has no component — nothing to render."),null;const{className:w,wrapper:b="div",fieldWrapper:v,testId:y,..._}={...t.componentProps,...l},d=t.value.__path,f=typeof y=="string"?y:d?d.replace(/\./g,"-"):void 0,s=i?.(g),p=s?.passControl===!0||g.reformerNeedsControl===!0?{control:e}:{};let $;if(s){const h=pa(s,o,u,S,_);f&&h["data-testid"]===void 0&&(h["data-testid"]=`input-${f}`),$=K.jsx(g,{disabled:a,...h,...p,...n!==void 0?{ref:n}:{}})}else{const h={value:o,disabled:a,..._};f&&h["data-testid"]===void 0&&(h["data-testid"]=`input-${f}`),$=K.jsx(g,{...p,...h,...n!==void 0?{ref:n}:{},onChange:u,onBlur:S})}const c=v??r;return c?K.jsx(c,{control:e,className:w,testId:f,children:$}):K.jsx(b,{className:w,children:$})});function Go(t){const e=D.useRef(0),r=D.useCallback(n=>pe(()=>{t.length,e.current+=1,n()}),[t]);return D.useSyncExternalStore(r,()=>e.current,()=>e.current)}const go=new WeakMap;let vo=0;function Ho(t){if(t==null||typeof t!="object")return vo++;let e=go.get(t);return e===void 0&&(e=vo++,go.set(t,e)),e}const ma=t=>typeof t=="function"?t():t;function Zl(t,e,r){Go(t);const n=t.length,i=D.useRef(null);(!i.current||i.current.itemFn!==e)&&(i.current={itemFn:e,map:new WeakMap});const o=a=>{if(a==null||typeof a!="object")return e(a);const l=i.current.map;let u=l.get(a);return u===void 0&&(u=e(a),l.set(a,u)),u};return Array.from({length:n},(a,l)=>{const u=t.at(l),S=Ho(u);return{key:S,index:l,model:u,element:K.jsx(cr,{node:o(u),fieldWrapper:r},S)}})}const ya=D.memo(function({node:t,fieldWrapper:e}){const r=t.array;Go(r);const n=r.length,i=D.useRef(null);(!i.current||i.current.itemFn!==t.item)&&(i.current={itemFn:t.item,map:new WeakMap});const o=h=>{if(h==null||typeof h!="object")return t.item(h);const P=i.current.map;let j=P.get(h);return j===void 0&&(j=t.item(h),P.set(h,j)),j},a=t.componentProps??{},{title:l,addButtonLabel:u="+ Добавить",removeButtonLabel:S="Удалить",emptyMessage:g,itemLabel:w,reorderable:b=!1,className:v="space-y-3 mt-2",cardClassName:y="mb-4 p-4 bg-white rounded border"}=a,_=(h,P)=>typeof w=="function"?w(h,P):`${w??l??"Элемент"} #${P+1}`,d=a.moveUpLabel??"Переместить вверх",f=a.moveDownLabel??"Переместить вниз",s=a.addButtonClassName??"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2",p=a.removeButtonClassName??"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors bg-destructive text-destructive-foreground shadow hover:bg-destructive/90 h-9 px-4 py-2",$=a.moveButtonClassName??"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-40 h-9 w-9",c=h=>K.jsx("button",{type:"button","data-testid":"array-add",className:h,onClick:()=>r.push(ma(t.initialValue)),children:u});return K.jsxs("section",{className:v,children:[l?K.jsxs("div",{className:"flex justify-between items-center mb-4",children:[K.jsx("h3",{className:"text-lg font-semibold",children:l}),c(s)]}):null,Array.from({length:n},(h,P)=>{const j=r.at(P),A=o(j),F=n>1;return K.jsxs("div",{className:y,"data-testid":`array-item-${P}`,children:[l||w?K.jsxs("div",{className:"flex justify-between items-center mb-3",children:[K.jsx("h4",{className:"font-medium",children:_(j,P)}),K.jsxs("div",{className:"flex items-center gap-2",children:[b?K.jsxs("div",{className:"flex items-center gap-1",children:[K.jsx("button",{type:"button","aria-label":d,"data-testid":`array-item-${P}-move-up`,className:$,disabled:P===0,onClick:()=>r.move(P,P-1),children:"↑"}),K.jsx("button",{type:"button","aria-label":f,"data-testid":`array-item-${P}-move-down`,className:$,disabled:P===n-1,onClick:()=>r.move(P,P+1),children:"↓"})]}):null,F?K.jsx("button",{type:"button","data-testid":`array-item-${P}-remove`,className:p,onClick:()=>r.removeAt(P),children:S}):null]})]}):null,K.jsx(cr,{node:A,fieldWrapper:e})]},Ho(j))}),n===0&&g?K.jsx("div",{className:"p-4 bg-gray-100 border border-gray-300 rounded text-center text-gray-600",children:g}):null,l?null:K.jsx("div",{children:c("text-sm text-blue-600 hover:text-blue-700 hover:underline")})]})}),ga=D.memo(function({node:t,fieldWrapper:e}){const r=t.component;return K.jsx(r,{array:t.array,item:t.item,initialValue:t.initialValue,fieldWrapper:e,...t.componentProps??{}})});function va(t){return Array.isArray(t)?t:[t]}function ba(t){const e=[];for(const r of t)r instanceof oe&&e.push(r);return e}function _a(t){let e="";for(const r of t){const n=r instanceof oe?r.value:r;n!=null&&(e+=String(n))}return e}function Wo(t){const e=D.useRef({signals:t,key:0}),r=e.current;return(r.signals.length!==t.length||t.some((n,i)=>n!==r.signals[i]))&&(e.current={signals:t,key:r.key+1}),e.current.key}function Sa(t){const e=[];if(t)for(const u of Object.keys(t))t[u]instanceof oe&&e.push(u);const r=e.map(u=>t[u]),n=Wo(r),i=D.useRef(r);i.current=r;const o=D.useRef(0),a=D.useCallback(u=>{if(i.current.length===0)return()=>{};let S=!0;return pe(()=>{for(const g of i.current)g.value;if(S){S=!1;return}o.current+=1,u()})},[n]);if(D.useSyncExternalStore(a,()=>o.current,()=>o.current),!t||e.length===0)return t;const l={...t};for(const u of e)l[u]=t[u].value;return l}const $a=D.memo(function({text:t}){const e=va(t),r=ba(e),n=Wo(r),i=D.useRef(e);i.current=e;const o=D.useRef(r);o.current=r;const a=D.useCallback(u=>{if(o.current.length===0)return()=>{};let S=!0;return pe(()=>{for(const g of o.current)g.value;if(S){S=!1;return}u()})},[n]),l=D.useCallback(()=>_a(i.current),[]);return D.useSyncExternalStore(a,l,l)});function cr({node:t,form:e,fieldWrapper:r}){const{settings:n}=ia(),i=r??n?.fieldWrapper,{selector:o}=t,a=aa(o),l=la(o),u=D.useContext(lr),S=o&&u?.refRegistry.has(o)?u.refRegistry.get(o):void 0,g=o?u?.conditionRegistry.get(o):void 0,w=ca(g),b=a??w,v=o?u?.lifecycleRegistry.get(o):void 0;ua(v);const y=Sa(t.componentProps);if(b)return null;if(ea(t)){const _=Fs(t.value);if(!_){if(typeof console<"u"){const s=t.value.__path;console.warn(`[RenderSchema] No form node for signal${s?` "${s}"`:""} — render value-leaf after createForm.`)}return null}const d=o??t.value.__path,f=d&&u?.refRegistry.has(d)?u.refRegistry.get(d):void 0;return K.jsx(ha,{node:t,fieldNode:_,fieldWrapper:i,nodeRef:f,resolveFieldAdapter:n?.resolveFieldAdapter})}if(ta(t))return t.component?K.jsx(ga,{node:t,fieldWrapper:i}):K.jsx(ya,{node:t,fieldWrapper:i});if(ra(t)){const{selector:_,component:d,children:f}=t,s=y||{},p=l!=null?{...s,...l}:s,$=_?u?.callbackRegistry.get(_):void 0,c=$?Object.fromEntries($):{},h=$?{...p,...c}:p,P=typeof d=="string",j=!P&&_!==void 0?{selector:_}:{},A=d;if(!P&&d.__selfManagedChildren===!0){const F=d,q=h.form===void 0&&e!==void 0?{form:e}:{};return K.jsx(F,{..._!==void 0?{selector:_}:{},...h,...q,...S!==void 0?{ref:S}:{},...f!==void 0?{children:f}:{}})}return P&&na.has(d)?K.jsx(A,{...h,...S!==void 0?{ref:S}:{}}):K.jsxs(A,{...j,...h,...S!==void 0?{ref:S}:{},children:[t.text!==void 0?K.jsx($a,{text:t.text}):null,f?.map((F,q)=>K.jsx(cr,{node:F,form:e},q))]})}return null}function wa({render:t,settings:e}){const r=t(),n=K.jsxs(oa,{value:{settings:e},children:[mo(t)&&t.__overrideMaps.effectRegistry.length>0&&K.jsx(da,{effectRegistry:t.__overrideMaps.effectRegistry}),K.jsx(cr,{node:r})]});return mo(t)?K.jsx(lr.Provider,{value:t.__overrideMaps,children:n}):n}const Pa=/^\$(model|component|html|dataSource|fn|locale)\((.+)\)$/;function ce(t){if(typeof t!="string")return null;const e=Pa.exec(t);return e?{op:e[1],arg:e[2]}:null}const Fe=t=>ce(t)?.op==="model",Br=t=>ce(t)?.op==="component",dr=t=>ce(t)?.op==="html",ka=t=>ce(t)?.op==="dataSource",xa=t=>ce(t)?.op==="fn",Ea=t=>ce(t)?.op==="locale",Jo=new Set(["div","section","article","aside","header","footer","nav","main","figure","figcaption","details","summary","fieldset","legend","p","span","h1","h2","h3","h4","h5","h6","strong","b","em","i","u","s","small","mark","sub","sup","code","pre","kbd","samp","var","blockquote","cite","q","abbr","time","address","label","br","hr","a","ul","ol","li","dl","dt","dd","table","caption","colgroup","col","thead","tbody","tfoot","tr","th","td","img","picture","source","video","audio","track","progress","meter"]);function Ca(t){return Jo.has(t.toLowerCase())}const Na=new Set(["href","src","srcSet","srcset","poster","action","formAction","formaction","data","xlinkHref","cite","ping"]);function ja(t){const e=Array.from(t).filter(r=>r.charCodeAt(0)>32).join("").toLowerCase();return e.startsWith("javascript:")||e.startsWith("vbscript:")?!0:e.startsWith("data:")?!e.startsWith("data:image/"):!1}function Ta(t,e){if(!t)return t;let r=null;const n={};for(const i of Object.keys(t)){const o=t[i],a=i.length>2&&i.startsWith("on")&&i[2]===i[2].toUpperCase(),l=Na.has(i)&&typeof o=="string"&&ja(o);if(i==="dangerouslySetInnerHTML"||a||l){(r??=[]).push(i);continue}n[i]=o}return r?(typeof console<"u"&&console.warn(`[JsonRenderer] $html(${e}): отброшены небезопасные props — ${r.join(", ")}. HTML-узлы предназначены для презентационной разметки: исполняемые обработчики, сырой innerHTML и javascript:/data:-URL в них не пропускаются.`),n):t}const Oa="http://json-schema.org/draft-07/schema#",Ra="https://reformer.dev/schemas/form-schema.schema.json",Aa="ReFormer JSON form schema (M1, string-operator DSL)",Ia="Base meta-schema: validates node structure + operator string syntax ($model/$component/$dataSource). Component-name enum is tightened per-app via buildFormSchemaMetaSchema; $dataSource names and $model paths are checked outside this schema.",Ma="object",Fa=["root"],qa=!1,Da={$schema:{type:"string"},version:{type:"string"},root:{$ref:"#/definitions/node"}},Va={modelOp:{type:"string",pattern:"^\\$model\\(.+\\)$",description:'Model binding: "$model(path)" — path resolved at runtime (not validated here).'},componentOp:{type:"string",pattern:"^\\$component\\(.+\\)$",description:'Registry component: "$component(Name)". Name is tightened to a registry enum by buildFormSchemaMetaSchema.'},htmlOp:{type:"string",pattern:"^\\$html\\([a-zA-Z][a-zA-Z0-9]*\\)$",description:'Native HTML tag: "$html(div)". The tag is checked against the presentational whitelist (isAllowedHtmlTag) by validateFormSchema and by the converter; buildFormSchemaMetaSchema tightens it to an enum for IDE completion.'},textContent:{description:'Text content of a node: a literal, an operator string ("$model(path)" for reactive model values, "$locale(key)" for localized strings), or an array of parts joined without a separator.',$comment:`Types are listed as separate anyOf branches rather than a union "type": ["string","number"] — ajv's strict mode rejects union type keywords unless allowUnionTypes is on, and validateFormSchema compiles this schema without it.`,anyOf:[{type:"string"},{type:"number"},{type:"array",items:{anyOf:[{type:"string"},{type:"number"}]}}]},operatorOp:{type:"string",pattern:"^\\$(model|component|html|dataSource|fn|locale)\\(.+\\)$",description:'Any DSL operator string ("$model/$component/$dataSource/$fn/$locale(...)") used as an escape hatch on a componentProps value (e.g. "options": "$dataSource(LOAN_TYPES)"). The component-props validator wraps every prop in anyOf:[honest type, operatorOp] via allowOperatorStrings, so an operator string is accepted wherever a literal value is.'},node:{$comment:"Discriminated by which operator key is present (array→value→component), mirroring the isArrayNode/isFieldNode/isContainerNode runtime guards. Using oneOf here made ajv (allErrors) report failures against all three branches for any single mistake, burying the real cause; if/then/else surfaces only the relevant branch's errors.",if:{type:"object",required:["array"]},then:{$ref:"#/definitions/arrayNode"},else:{if:{type:"object",required:["value"]},then:{$ref:"#/definitions/fieldNode"},else:{$ref:"#/definitions/containerNode"}}},fieldNode:{type:"object",required:["value"],additionalProperties:!1,properties:{selector:{type:"string"},value:{$ref:"#/definitions/modelOp"},component:{$ref:"#/definitions/componentOp"},componentProps:{type:"object"},wrapper:{$ref:"#/definitions/node"}}},arrayNode:{type:"object",required:["array","item"],additionalProperties:!1,properties:{selector:{type:"string"},array:{$ref:"#/definitions/modelOp"},component:{$ref:"#/definitions/componentOp"},item:{type:"object",required:["$template"],additionalProperties:!1,properties:{$template:{$ref:"#/definitions/node"}}},initialValue:{type:"object"},componentProps:{type:"object"}}},containerNode:{type:"object",required:["component"],additionalProperties:!1,properties:{selector:{type:"string"},component:{anyOf:[{$ref:"#/definitions/componentOp"},{$ref:"#/definitions/htmlOp"}]},componentProps:{type:"object"},text:{$ref:"#/definitions/textContent"},children:{type:"array",items:{$ref:"#/definitions/node"}}}}},Lr={$schema:Oa,$id:Ra,title:Aa,description:Ia,type:Ma,required:Fa,additionalProperties:qa,properties:Da,definitions:Va},Yl=Lr;function Ql(t){return t.names().filter(e=>t.get(e)?.type==="component")}function Xl(t){return t.names().filter(e=>t.get(e)?.type==="dataSource")}function ec(t){return t.names().filter(e=>t.get(e)?.type==="fn")}function tc(t){return t.getLocale?.()?.keys}function Ba(){return Lr.definitions.operatorOp}function La(t){return Or(t)}function Or(t){if(Array.isArray(t))return t.map(Or);if(t!==null&&typeof t=="object"){const e={};for(const[r,n]of Object.entries(t))r.startsWith("x-")||(e[r]=Or(n));return e}return t}function za(t){return Gt(t)}function Gt(t){if(Array.isArray(t))return t.map(Gt);if(t===null||typeof t!="object")return t;const e=t,r={...e};if(e.properties!==null&&typeof e.properties=="object"&&!Array.isArray(e.properties)){const n={};for(const[i,o]of Object.entries(e.properties))n[i]={anyOf:[Gt(o),{$ref:"#/definitions/operatorOp"}]};r.properties=n}return e.items!==void 0&&(r.items=Gt(e.items)),r}function Ua(t){const e=La(t),r=za(e),n=r.definitions??{};return{...r,definitions:{...n,operatorOp:Ba()}}}function rc(t){const e=JSON.parse(JSON.stringify(Lr)),r=t?.componentNames;if(r&&r.length>0){const o=e.definitions.componentOp;delete o.pattern,o.enum=r.map(a=>`$component(${a})`)}const n=e.definitions.htmlOp;delete n.pattern,n.enum=[...Jo].map(o=>`$html(${o})`);const i=t?.propSchemas;if(i&&Object.keys(i).length>0){const o=Object.entries(i).map(([a,l])=>({if:{required:["component"],properties:{component:{const:`$component(${a})`}}},then:{properties:{componentProps:Ua(l)}}}));for(const a of["fieldNode","containerNode"]){const l=e.definitions[a];l.allOf=[...l.allOf??[],...o]}}return e}const Ka="$fieldWrapper",Zo="$localeService";class Ke{own=new Map;parent=null;get(e){return this.own.get(e)??this.parent?.get(e)}getDataSource(e){const r=this.get(e);if(!(!r||r.type!=="dataSource"))return r.component}getLocale(){const e=this.get(Zo);if(!(!e||e.type!=="locale"))return e.component}has(e){return this.own.has(e)||(this.parent?.has(e)??!1)}names(){const e=this.parent?.names()??[],r=Array.from(this.own.keys());return[...new Set([...e,...r])]}_set(e,r){this.own.has(e)&&console.warn(`[ComponentRegistry] Overwriting entry: ${e}`),this.own.set(e,r)}static withParent(e,r){const n=new Ke,i=o=>{if(o instanceof Ke)o.own.forEach((a,l)=>n.own.set(l,a));else for(const a of o.names()){const l=o.get(a);l&&n.own.set(a,l)}};return e instanceof Ke?n.parent=e:i(e),i(r),n}}function nc(t){const e=new Ke;return t({component(r,n,i){e._set(r,{component:n,type:"component",description:i})},dataSource(r,n,i){e._set(r,{component:n,type:"dataSource",description:i})},fn(r,n,i){if(typeof n!="function")throw new Error(`reg.fn("${r}") expects a function, got ${typeof n}. Use reg.dataSource(...) for non-function values.`);e._set(r,{component:n,type:"fn",description:i})},locale(r,n){const i=typeof r=="function"?{resolve:r}:r;e._set(Zo,{component:i,type:"locale",description:n})}}),e}const Rr=D.createContext({});function oc({settings:t,children:e}){const r=D.useContext(Rr),n=D.useMemo(()=>r.registry&&t.registry?Ke.withParent(r.registry,t.registry):t.registry??r.registry,[r.registry,t.registry]),i=D.useMemo(()=>{const o=n?.get(Ka)?.component;return{...r,...t,registry:n,fieldWrapper:t.fieldWrapper??o??r.fieldWrapper}},[r,t,n]);return K.jsx(Rr.Provider,{value:i,children:e})}function Ga(){return D.useContext(Rr)}function st(t){const e=t;return Fe(e.array)&&typeof e.item=="object"&&e.item!==null&&"$template"in e.item}function ur(t){return Fe(t.value)}function We(t){const e=t.component;return(Br(e)||dr(e))&&!ur(t)&&!st(t)}function Ha(t){const e=ce(t)?.arg;if(!e)throw new Error(`Invalid $html operator: "${t}"`);if(!Ca(e))throw new Error(`HTML tag "${e}" is not allowed in $html(...). Presentational tags only — script/style/iframe/form-controls are excluded by design.`);return e.toLowerCase()}function tt(t,e){if(!t)return;if(dr(t))return Ha(t);const r=ce(t)?.arg;if(!r)throw new Error(`Invalid $component operator: "${t}"`);const n=e.get(r);if(!n)throw new Error(`Component "${r}" not found in registry. Available: ${e.names().join(", ")}`);if(n.type!=="component")throw new Error(`Entry "${r}" is a '${n.type}' and cannot be used as $component(...)`);return n.component}function Wa(t,e){const r=e.get(t);if(!r)throw new Error(`Data source "${t}" not found in registry. Available: ${e.names().join(", ")}`);if(r.type!=="dataSource")throw new Error(`Entry "${t}" is a '${r.type}' and cannot be used as $dataSource(...)`);return r.component}function Ja(t,e){const r=e.get(t);if(!r)throw new Error(`Function "${t}" not found in registry. Available: ${e.names().join(", ")}`);if(r.type!=="fn")throw new Error(`Entry "${t}" is a '${r.type}' and cannot be used as $fn(...)`);return r.component}function bo(t,e,r){return e.getLocale?.()?.resolve(t,r)??t}function Za(t){return t!==null&&typeof t=="object"&&typeof t.$locale=="string"}function Ya(t,e){if(!t)return t;let r=!1;const n={};for(const i of Object.keys(t)){const o=t[i];if(Fe(o)){const a=e.signalAt(ce(o).arg);n[i]=a?.peek?.(),r=!0}else n[i]=o}return r?n:t}function Qa(t,e){if(!(!e||typeof console>"u"))for(const r of Object.keys(e))Fe(e[r])&&console.warn(`[JsonRenderer] $locale("${t}"): параметр "${r}" (=${String(e[r])}) взят снимком значения на момент рендера и не обновляется при изменении модели. Для реактивного значения используй I18n: { component: "$component(I18n)", componentProps: { id: "${t}", values: { ${r}: "${String(e[r])}" } } }.`)}function Xa(t,e){return e.split(".").reduce((r,n)=>r==null?r:r[n],t)}function el(t){if(t===null||typeof t!="object")return!1;const e=t;return Fe(e.value)||Fe(e.array)||Br(e.component)||dr(e.component)}function tl(t){return t==null?t:JSON.parse(JSON.stringify(t))}function ot(t,e,r){if(ka(t))return Wa(ce(t).arg,r);if(Br(t))return tt(t,r);if(xa(t))return Ja(ce(t).arg,r);if(Ea(t))return bo(ce(t).arg,r);if(Fe(t))return e.signalAt(ce(t).arg);if(Za(t))return Qa(t.$locale,t.params),bo(t.$locale,r,Ya(t.params,e));if(el(t))return it(t,e,r);if(Array.isArray(t))return t.map(n=>ot(n,e,r));if(t!==null&&typeof t=="object"){const n=t,i={};for(const o of Object.keys(n))i[o]=ot(n[o],e,r);return i}return t}function Cr(t,e,r){if(!t)return;const n={};for(const i of Object.keys(t))n[i]=ot(t[i],e,r);return n}function rl(t,e,r){if(t!==void 0)return Array.isArray(t)?t.map(n=>ot(n,e,r)):ot(t,e,r)}function it(t,e,r){if(st(t)){const n=Xa(e,ce(t.array).arg),i=t.item.$template,o=t.initialValue,a=t.component?tt(t.component,r):void 0;return{...t.selector?{selector:t.selector}:{},array:n,...a?{component:a}:{},initialValue:()=>o?tl(o):{},item:l=>it(i,l,r),componentProps:Cr(t.componentProps,e,r)}}if(ur(t)){const n=ce(t.value).arg,i=e.signalAt(n);!i&&typeof console<"u"&&console.warn(`[JsonRenderer/M1] No model signal for "${n}".`);const o=Cr(t.componentProps,e,r),a=t.wrapper?tt(t.wrapper.component,r):void 0;return{...t.selector?{selector:t.selector}:{},value:i,component:tt(t.component,r),componentProps:a?{...o??{},fieldWrapper:a}:o}}if(We(t)){const n=dr(t.component),i=tt(t.component,r),o=Cr(t.componentProps,e,r);return{...t.selector?{selector:t.selector}:{},component:i,componentProps:n?Ta(o,i):o,...t.text!==void 0?{text:rl(t.text,e,r)}:{},children:t.children?.map(a=>it(a,e,r))}}throw new Error(`Invalid JSON node (M1): ${JSON.stringify(t)}`)}function ic(t,e,r){return it(t.root,r,e)}function nl(t,e,r){return()=>it(t.root,r,e)}function Ht(t){return t!==null&&typeof t=="object"}function ol(t){return"component"in t||"value"in t||"array"in t||"selector"in t||"children"in t}function Ue(t,e){if(Ht(t)){if(Array.isArray(t)){for(const r of t)Ue(r,e);return}if(typeof t.selector=="string"&&e.add(t.selector),Ue(t.children,e),Ht(t.item)&&Ue(t.item.$template,e),Ue(t.wrapper,e),Ht(t.componentProps))for(const r of Object.values(t.componentProps))Yo(r,e)}}function Yo(t,e){if(Ht(t)){if(Array.isArray(t)){for(const r of t)Yo(r,e);return}ol(t)&&Ue(t,e)}}function il(t){const e=new Set;return Ue(t.root,e),e}function Qo({errors:t}){return K.jsxs("div",{role:"alert","data-testid":"schema-error-panel",style:{border:"1px solid #f5a9a9",background:"#fff5f5",color:"#9b1c1c",borderRadius:8,padding:"16px 20px",font:"14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace"},children:[K.jsxs("strong",{style:{display:"block",marginBottom:8,fontSize:15},children:["Невалидная JSON-схема формы (",t.length,")"]}),K.jsx("ul",{style:{margin:0,paddingLeft:20},children:t.map((e,r)=>K.jsx("li",{style:{marginBottom:4},children:e},r))})]})}class sl extends D.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,r){typeof console<"u"&&console.error("[JsonFormRenderer] schema conversion/render failed:",e,r.componentStack)}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){return this.state.error?K.jsx(Qo,{errors:[`Schema conversion/render failed: ${this.state.error.message}`]}):this.props.children}}function sc({form:t,schema:e,model:r,renderBehavior:n,onSchemaReady:i,validateSchema:o=!1}){const{registry:a,...l}=Ga(),u=t?.schema??e,S=t?.model??r,[g,w]=D.useState(o?void 0:null);D.useEffect(()=>{if(!o||!u){w(null);return}let y=!1;return w(void 0),ui(async()=>{const{validateFormSchema:_}=await import("./validate-Dx8tWiBg.js");return{validateFormSchema:_}},__vite__mapDeps([0,1,2])).then(({validateFormSchema:_})=>{if(y)return;const{valid:d,errors:f}=_(u,{registry:a});w(d?null:f)}).catch(_=>{y||w([`Schema validator failed to load: ${String(_)}`])}),()=>{y=!0}},[o,u,a]);const b=D.useRef(n);D.useEffect(()=>{b.current=n},[n]);const v=D.useMemo(()=>{if(!u||!S)throw new Error("JsonFormRenderer: provide a `form` bundle (createJsonForm) or both `schema` and `model` props.");if(g!==null)return null;if(!a)throw new Error("JsonFormRenderer: settings.registry is required. Pass a ComponentRegistry via JsonRendererProvider.");const y=nl(u,a,S),_=sa(y);return n&&n(_),_},[u,a,n,S,g]);return D.useMemo(()=>{v&&i&&i(v)},[v]),D.useEffect(()=>{if(!v||!u)return;const y=il(u),_=v.__overrideMaps,d=[...new Set([..._.hiddenOverrides.keys(),..._.propsOverrides.keys(),..._.refRegistry.keys(),..._.conditionRegistry.keys(),..._.callbackRegistry.keys(),..._.lifecycleRegistry.keys()])].filter(f=>!y.has(f));d.length>0&&typeof console<"u"&&console.warn(`[JsonFormRenderer] schema.node(...) адресует неизвестный selector: ${d.join(", ")}. Известные селекторы: ${[...y].sort().join(", ")||"(нет)"}.`)},[v,u]),g&&g.length>0?K.jsx(Qo,{errors:g}):v?K.jsx(sl,{resetKey:v,children:K.jsx(wa,{render:v,settings:l})}):null}const al={resolve:t=>t};D.createContext(al);var ll=Symbol.for("preact-signals");function zr(){if(Me>1)Me--;else{var t,e=!1;for((function(){var i=er;for(er=void 0;i!==void 0;)i.S.v===i.v&&(i.S.i=i.i),i=i.o})();nt!==void 0;){var r=nt;for(nt=void 0,Xt++;r!==void 0;){var n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&ti(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=n}}if(Xt=0,Me--,e)throw t}}var te=void 0;function Xo(t){var e=te;te=void 0;try{return t()}finally{te=e}}var nt=void 0,Me=0,Xt=0,_o=0,er=void 0,tr=0;function ei(t){if(te!==void 0){var e=t.n;if(e===void 0||e.t!==te)return e={i:0,S:t,p:te.s,n:void 0,t:te,e:void 0,x:void 0,r:e},te.s!==void 0&&(te.s.n=e),te.s=e,t.n=e,32&te.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=te.s,e.n=void 0,te.s.n=e,te.s=e),e}}function me(t,e){this.v=t,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}me.prototype.brand=ll;me.prototype.h=function(){return!0};me.prototype.S=function(t){var e=this,r=this.t;r!==t&&t.e===void 0&&(t.x=r,this.t=t,r!==void 0?r.e=t:Xo(function(){var n;(n=e.W)==null||n.call(e)}))};me.prototype.U=function(t){var e=this;if(this.t!==void 0){var r=t.e,n=t.x;r!==void 0&&(r.x=n,t.e=void 0),n!==void 0&&(n.e=r,t.x=void 0),t===this.t&&(this.t=n,n===void 0&&Xo(function(){var i;(i=e.Z)==null||i.call(e)}))}};me.prototype.subscribe=function(t){var e=this;return dl(function(){var r=e.value,n=te;te=void 0;try{t(r)}finally{te=n}},{name:"sub"})};me.prototype.valueOf=function(){return this.value};me.prototype.toString=function(){return this.value+""};me.prototype.toJSON=function(){return this.value};me.prototype.peek=function(){var t=te;te=void 0;try{return this.value}finally{te=t}};Object.defineProperty(me.prototype,"value",{get:function(){var t=ei(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(t!==this.v){if(Xt>100)throw new Error("Cycle detected");(function(r){Me!==0&&Xt===0&&r.l!==_o&&(r.l=_o,er={S:r,v:r.v,i:r.i,o:er})})(this),this.v=t,this.i++,tr++,Me++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{zr()}}}});function ti(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ri(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function ni(t){for(var e=t.s,r=void 0;e!==void 0;){var n=e.p;e.i===-1?(e.S.U(e),n!==void 0&&(n.n=e.n),e.n!==void 0&&(e.n.p=n)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=n}t.s=r}function Je(t,e){me.call(this,void 0),this.x=t,this.s=void 0,this.g=tr-1,this.f=4,this.W=e?.watched,this.Z=e?.unwatched,this.name=e?.name}Je.prototype=new me;Je.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===tr))return!0;if(this.g=tr,this.f|=1,this.i>0&&!ti(this))return this.f&=-2,!0;var t=te;try{ri(this),te=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return te=t,ni(this),this.f&=-2,!0};Je.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}me.prototype.S.call(this,t)};Je.prototype.U=function(t){if(this.t!==void 0&&(me.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}};Je.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}};Object.defineProperty(Je.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var t=ei(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function oi(t){var e=t.m;if(t.m=void 0,typeof e=="function"){Me++;var r=te;te=void 0;try{e()}catch(n){throw t.f&=-2,t.f|=8,Ur(t),n}finally{te=r,zr()}}}function Ur(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,oi(t)}function cl(t){if(te!==this)throw new Error("Out-of-order effect");ni(this),te=t,this.f&=-2,8&this.f&&Ur(this),zr()}function Ze(t,e){this.x=t,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=e?.name}Ze.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.m=e)}finally{t()}};Ze.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,oi(this),ri(this),Me++;var t=te;return te=this,cl.bind(this,t)};Ze.prototype.N=function(){2&this.f||(this.f|=2,this.u=nt,nt=this)};Ze.prototype.d=function(){this.f|=8,1&this.f||Ur(this)};Ze.prototype.dispose=function(){this.d()};function dl(t,e){var r=new Ze(t,e);try{r.c()}catch(i){throw r.d(),i}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}function ac(t){return st(t)?"array":ur(t)?"field":"container"}function So(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;const e=t;return"value"in e||"array"in e||"component"in e}const ul=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),ii=new Set(["Icon","Separator","Spinner","Skeleton","Progress"]);function pl(t){const e=ce(t);return e?e.op==="component"?ii.has(e.arg):e.op==="html"?ul.has(e.arg):!1:!1}function si(t){return pl(t.component)}function lc(t,e){const r=[];if(si(t))return r;if(st(t)){const n=t;return r.push({kind:"template",path:[...e,"item","$template"],single:!0,nodes:[n.item.$template]}),r}if(ur(t))return t.wrapper&&r.push({kind:"wrapper",path:[...e,"wrapper"],single:!0,nodes:[t.wrapper]}),r;if(We(t)){const n=t,i=n.componentProps?.steps;Array.isArray(i)&&i.some(So)&&r.push({kind:"steps",path:[...e,"componentProps","steps"],single:!1,nodes:i.filter(So)}),Array.isArray(n.children)&&r.push({kind:"children",path:[...e,"children"],single:!1,nodes:n.children})}return r}function cc(t){return si(t)?!1:!!(st(t)||We(t))}function dc(t){if(!We(t))return"vertical";const e=t.componentProps?.className;if(typeof e!="string")return"vertical";const r=e.split(/\s+/).filter(Boolean);if(r.includes("grid")){const n=r.find(i=>/^grid-cols-\d+$/.test(i));if(n&&Number(n.slice(10))>=2)return"horizontal"}return r.includes("flex")&&!r.includes("flex-col")?"horizontal":"vertical"}function uc(t){return We(t)&&t.component==="$html(div)"}function pc(t){if(!We(t))return!1;const e=t;if(e.component!=="$html(div)")return!1;const r=e.componentProps?.className;return typeof r=="string"&&r.split(/\s+/).includes("flex")}function fl(t){return{value:"$model(newField)",component:`$component(${t})`,componentProps:{label:t}}}function hl(t){return{component:`$component(${t})`,componentProps:{className:"space-y-4"},children:[]}}function ml(t){return{component:`$component(${t})`,componentProps:{}}}function yl(t){const e=t.slice(6,-1),r=`$html(${e})`,n=ks(e);if(!n||n.content==="container"){const i=n?.defaultClass?{className:n.defaultClass}:{};return{component:r,componentProps:i,children:[]}}return n.content==="void"?{component:r,componentProps:{}}:{component:r,text:n.defaultText??"Текст"}}function gl(){return{array:"$model(items)",item:{$template:{component:"$component(Box)",componentProps:{className:"space-y-3"},children:[]}},componentProps:{addButtonLabel:"+ Добавить элемент"}}}function ai(t="Шаг"){return{component:"$component(Step)",componentProps:{title:t},children:[]}}function vl(){return{component:"$component(Wizard)",componentProps:{steps:[ai("Шаг 1")]}}}function bl(t,e){return e==="array"?gl():t.startsWith("$html(")?yl(t):e==="field"?fl(t):t==="Wizard"?vl():t==="Step"?ai():ii.has(t)?ml(t):hl(t)}const _l="http://json-schema.org/draft-07/schema#",Sl="https://reformer.dev/schemas/component-catalog.schema.json",$l="ReFormer component catalog",wl="Контракт каталога компонентов (спека §5). Владелец — reformer-builder; клиенты (напр. @reformer/ui-kit) генерируют валидный catalog-JSON со списком своих компонентов. Билдер грузит его в палитру/инспектор.",Pl="object",kl=["version","components"],xl=!1,El={$schema:{type:"string",description:"Ссылка на этот контракт (для валидации/подсказок в IDE). Не нормативна — билдер валидирует каталог программно."},version:{type:"string",minLength:1},components:{type:"array",items:{type:"object",required:["name","role","propsSchema"],additionalProperties:!1,properties:{name:{type:"string",minLength:1,description:"Имя компонента для оператора $component(name)."},role:{enum:["field","container","array"],description:"field — form-control (несёт value); container — держит children; array — повторяющийся блок."},category:{type:"string",description:"Необязательная группировка палитры. Категория — забота билдера; клиент может не поставлять."},propsSchema:{type:"object",description:"JSON Schema редактируемых пропсов компонента (валидируется её структура, не содержимое)."},variantGroup:{type:"string",description:"Имя группы вариантов. Компоненты с одним variantGroup — варианты одного компонента (селектор variant в инспекторе). Дефолт группы — член, чей name === variantGroup."},variant:{type:"string",description:"Человекочитаемая метка варианта в группе (напр. «Пароль»)."}}}}},Cl={$schema:_l,$id:Sl,title:$l,description:wl,type:Pl,required:kl,additionalProperties:xl,properties:El},Nl="1.0",jl=JSON.parse(`[{"name":"Accordion","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Accordion","properties":{"className":{"type":"string","description":"CSS-класс контейнера аккордеона (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"type":{"type":"string","enum":["single","multiple"],"description":"Режим раскрытия: одна секция за раз (single) или несколько (multiple).","x-doc":{"group":"Behavior","type":"'single' | 'multiple'","kind":"enum"}},"collapsible":{"type":"boolean","description":"В режиме single разрешить закрыть открытую секцию (не оставлять всегда одну открытой).","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}},"defaultValue":{"type":"string","description":"Значение(-я) секции, открытой по умолчанию (uncontrolled).","x-doc":{"group":"Behavior","type":"string | string[]"}},"disabled":{"type":"boolean","description":"Заблокировать взаимодействие со всеми секциями.","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}},"orientation":{"type":"string","enum":["vertical","horizontal"],"default":"vertical","description":"Ориентация раскладки секций.","x-doc":{"group":"Behavior","type":"'vertical' | 'horizontal'","kind":"enum"}}}}},{"name":"Alert","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Alert","properties":{"className":{"type":"string","description":"CSS-класс контейнера алерта (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["default","destructive"],"default":"default","description":"Визуальный тон алерта.","x-doc":{"group":"Behavior","type":"'default' | 'destructive'","kind":"enum"}}}}},{"name":"AlertDialog","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"AlertDialog","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыт ли диалог изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}}}}},{"name":"AspectRatio","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"AspectRatio","properties":{"ratio":{"type":"number","default":1,"description":"Соотношение сторон (ширина / высота), напр. 16/9 ≈ 1.78.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Attachment","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Attachment","properties":{"state":{"type":"string","enum":["idle","uploading","processing","error","done"],"default":"done","description":"Состояние загрузки/обработки файла — влияет на стили рамки и анимацию.","x-doc":{"group":"Behavior","type":"'idle' | 'uploading' | 'processing' | 'error' | 'done'","kind":"enum"}},"size":{"type":"string","enum":["default","sm","xs"],"default":"default","description":"Размер чипа (отступы и типографика).","x-doc":{"group":"Behavior","type":"'default' | 'sm' | 'xs'","kind":"enum"}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация: горизонтальный чип или вертикальная карточка.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Avatar","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Avatar","properties":{"className":{"type":"string","description":"CSS-класс аватара (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"size":{"type":"string","enum":["default","sm","lg"],"default":"default","description":"Размер аватара: sm (24px), default (32px), lg (40px).","x-doc":{"group":"Behavior","type":"'default' | 'sm' | 'lg'","kind":"enum"}}}}},{"name":"Badge","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Badge","properties":{"className":{"type":"string","description":"CSS-класс бейджа (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["default","secondary","destructive","outline","ghost","link"],"default":"default","description":"Визуальный вариант бейджа.","x-doc":{"group":"Behavior","type":"'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link'","kind":"enum"}}}}},{"name":"Box","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Box","properties":{"className":{"type":"string","description":"CSS-класс layout-контейнера (atomic CSS / Tailwind: flex, grid, gap-*).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Breadcrumb","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Breadcrumb","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Bubble","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Bubble","properties":{"variant":{"type":"string","enum":["default","secondary","muted","tinted","outline","ghost","destructive"],"default":"default","description":"Вариант оформления пузыря.","x-doc":{"group":"Behavior","type":"'default' | 'secondary' | 'muted' | 'tinted' | 'outline' | 'ghost' | 'destructive'","kind":"enum"}},"align":{"type":"string","enum":["start","end"],"default":"start","description":"Сторона выравнивания пузыря (start — слева, end — справа).","x-doc":{"group":"Behavior","type":"'start' | 'end'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Button","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Button","properties":{"className":{"type":"string","description":"Доп. CSS-класс кнопки (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["default","destructive","outline","secondary","ghost","link"],"default":"default","description":"Визуальный вариант кнопки (cva).","x-doc":{"group":"Behavior","type":"'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link'","kind":"enum"}},"size":{"type":"string","enum":["default","xs","sm","lg","icon","icon-xs","icon-sm","icon-lg"],"default":"default","description":"Размер кнопки (cva); icon-* — квадратные для иконок без текста.","x-doc":{"group":"Behavior","type":"'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg'","kind":"enum"}},"type":{"type":"string","enum":["button","submit","reset"],"description":"HTML-тип кнопки: button | submit | reset.","x-doc":{"group":"Behavior","type":"'button' | 'submit' | 'reset'","kind":"enum"}},"disabled":{"type":"boolean","description":"Заблокировать кнопку.","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}}}}},{"name":"ButtonGroup","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"ButtonGroup","properties":{"className":{"type":"string","description":"CSS-класс группы кнопок (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация группы: горизонтальная (по умолчанию) или вертикальная (cva).","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}}}}},{"name":"Calendar","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"mode":{"type":"string","enum":["single"],"default":"single","description":"Режим выбора. Field-версия — только single (одна дата, value: Date | null).","x-doc":{"group":"Behavior","type":"'single'","kind":"enum"}},"captionLayout":{"type":"string","enum":["label","dropdown","dropdown-months","dropdown-years"],"default":"label","description":"Шапка месяца: статичная подпись или дропдауны выбора месяца/года.","x-doc":{"group":"Behavior","type":"'label' | 'dropdown' | 'dropdown-months' | 'dropdown-years'","kind":"enum"}},"showOutsideDays":{"type":"boolean","default":true,"description":"Показывать дни соседних месяцев в первой и последней неделе.","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс корневого элемента.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"Date | null","description":"Выбранная дата. null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: Date | null) => void","description":"Выбор даты. Повторный клик по выбранной дате сбрасывает значение в null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Card","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Card","properties":{"className":{"type":"string","description":"CSS-класс карточки-контейнера (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Carousel","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Carousel","properties":{"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация прокрутки карусели.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Chart","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Chart","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind) — обычно задаёт высоту/ширину графика.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Checkbox","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись справа от чекбокса (inline-раскладка). Рендерит сам контрол.","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс контрола (CheckboxPrimitive.Root).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"boolean","description":"Состояние чекбокса. undefined/null трактуется как false."},"onChange":{"group":"Control","type":"(value: boolean) => void","description":"Изменение. indeterminate приводится к false."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Collapsible","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Collapsible","properties":{"className":{"type":"string","description":"CSS-класс контейнера collapsible (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"defaultOpen":{"type":"boolean","description":"Раскрыт ли collapsible по умолчанию (uncontrolled).","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}},"disabled":{"type":"boolean","description":"Заблокировать раскрытие/сворачивание.","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}}}}},{"name":"Combobox","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс триггера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":"string"},"label":{"type":"string"}}},"description":"Список опций { value, label }. Поиск идёт по label.","x-doc":{"group":"Options","type":"Array<{ value; label }>","kind":"readonly"}},"placeholder":{"type":"string","default":"Select an option...","description":"Подсказка в триггере, пока ничего не выбрано.","x-doc":{"group":"Textfield","type":"string"}},"searchPlaceholder":{"type":"string","default":"Search...","description":"Подсказка в поле поиска.","x-doc":{"group":"Textfield","type":"string"}},"emptyText":{"type":"string","default":"No options found.","description":"Текст пустого состояния (ничего не найдено).","x-doc":{"group":"Textfield","type":"string"}},"clearable":{"type":"boolean","default":false,"description":"Показывать крестик очистки (сброс в null); повторный выбор опции тоже сбрасывает.","x-doc":{"group":"Behavior","type":"boolean"}},"creatable":{"type":"boolean","default":false,"description":"Разрешить ввести своё значение: при отсутствии совпадения — пункт «Создать «…»» (эмитит введённое как value).","x-doc":{"group":"Behavior","type":"boolean"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value). null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Выбор; при очистке приходит null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Command","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Command","properties":{"shouldFilter":{"type":"boolean","default":true,"description":"Авто-фильтрация и сортировка по поисковому запросу.","x-doc":{"group":"Behavior","type":"boolean"}},"loop":{"type":"boolean","default":false,"description":"Зацикливать навигацию стрелками (с конца — в начало).","x-doc":{"group":"Behavior","type":"boolean"}},"disablePointerSelection":{"type":"boolean","default":false,"description":"Отключить выбор пункта наведением мыши.","x-doc":{"group":"Behavior","type":"boolean"}},"vimBindings":{"type":"boolean","default":true,"description":"Vim-хоткеи навигации (ctrl+n/j/p/k).","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"ContextMenu","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"ContextMenu","properties":{"dir":{"type":"string","enum":["ltr","rtl"],"default":"ltr","description":"Направление чтения — влияет на раскладку и навигацию с клавиатуры.","x-doc":{"group":"Behavior","type":"'ltr' | 'rtl'","kind":"enum"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном при открытом меню.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"DatePicker","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"placeholder":{"type":"string","default":"Выберите дату","description":"Текст кнопки-триггера, когда дата не выбрана.","x-doc":{"group":"Textfield","type":"string"}},"dateFormat":{"type":"string","default":"PPP","description":"Формат отображения выбранной даты — токены date-fns (напр. dd.MM.yyyy).","x-doc":{"group":"Behavior","type":"string"}},"className":{"type":"string","description":"Доп. CSS-класс кнопки-триггера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"Date | null","description":"Выбранная дата. null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: Date | null) => void","description":"Выбор даты в календаре. Повторный клик по выбранной дате сбрасывает в null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Dialog","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Dialog","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыт ли диалог изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"Drawer","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Drawer","properties":{"direction":{"type":"string","enum":["top","bottom","left","right"],"default":"bottom","description":"Сторона появления шторки.","x-doc":{"group":"Behavior","type":"'top' | 'bottom' | 'left' | 'right'","kind":"enum"}},"defaultOpen":{"type":"boolean","default":false,"description":"Открыта ли шторка изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном.","x-doc":{"group":"Behavior","type":"boolean"}},"dismissible":{"type":"boolean","default":true,"description":"Можно ли закрыть свайпом/кликом по фону.","x-doc":{"group":"Behavior","type":"boolean"}},"handleOnly":{"type":"boolean","default":false,"description":"Тянуть только за «ручку», а не за весь контент.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"DropdownMenu","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"DropdownMenu","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыто ли меню изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном, пока меню открыто.","x-doc":{"group":"Behavior","type":"boolean"}},"dir":{"type":"string","enum":["ltr","rtl"],"description":"Направление чтения — влияет на раскладку и навигацию клавиатурой.","x-doc":{"group":"Behavior","type":"'ltr' | 'rtl'","kind":"enum"}}}}},{"name":"Empty","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Empty","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"FileUpload","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["button","dropzone","input"],"default":"button","description":"Представление: кнопка-триггер, зона drag-and-drop или компактный инпут с кнопкой-иконкой.","x-doc":{"group":"Control","type":"'button' | 'dropzone' | 'input'"}},"placeholder":{"type":"string","description":"Видимый текст кнопки (button), зоны (dropzone) или пустого инпута (input). Подпись поля — отдельная конвенция label (рендерит FormField).","x-doc":{"group":"Textfield","type":"string"}},"invalid":{"type":"boolean","default":false,"description":"Явно пометить поле невалидным (подсветка рамки у dropzone/input). Под FormField не нужен: aria-invalid приходит от обёртки при ошибке валидации; button показывает ошибку текстом (FormField.Error).","x-doc":{"group":"State","type":"boolean"}},"hint":{"type":"string","description":"Подсказка с ограничениями («PDF, до 5 МБ, максимум 3 файла»).","x-doc":{"group":"Textfield","type":"string"}},"accept":{"type":"string","description":"Допустимые типы в синтаксисе нативного accept: \\".pdf\\", \\"image/png\\", \\"image/*\\", список через запятую. Применяется и к drag-and-drop.","x-doc":{"group":"Behavior","type":"string"}},"multiple":{"type":"boolean","default":false,"description":"Несколько файлов. При false новая селекция заменяет текущую.","x-doc":{"group":"Behavior","type":"boolean"}},"maxFiles":{"type":"number","minimum":1,"description":"Максимум файлов в списке (действует при multiple).","x-doc":{"group":"Behavior","type":"number"}},"maxFileSize":{"type":"number","minimum":0,"description":"Максимальный размер одного файла, байты.","x-doc":{"group":"Behavior","type":"number"}},"minFileSize":{"type":"number","minimum":0,"description":"Минимальный размер одного файла, байты (1 — отсев пустых).","x-doc":{"group":"Behavior","type":"number"}},"maxTotalFileSize":{"type":"number","minimum":0,"description":"Максимальный суммарный размер всех файлов, байты.","x-doc":{"group":"Behavior","type":"number"}},"preventDuplicates":{"type":"boolean","default":true,"description":"Отклонять дубликаты (совпадение имени и размера).","x-doc":{"group":"Behavior","type":"boolean"}},"allowDrop":{"type":"boolean","default":true,"description":"Принимать drag-and-drop на зоне.","x-doc":{"group":"Behavior","type":"boolean"}},"allowPaste":{"type":"boolean","default":false,"description":"Принимать файлы из буфера обмена (paste на сфокусированной зоне).","x-doc":{"group":"Behavior","type":"boolean"}},"capture":{"type":"string","enum":["user","environment"],"description":"Источник камеры для мобильного пикера (фронтальная/тыловая).","x-doc":{"group":"Behavior","type":"'user' | 'environment'"}},"autoUpload":{"type":"boolean","default":true,"description":"Автозагрузка принятых файлов (действует при заданном uploader).","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"File[] | RemoteFileRef[] | null","description":"Выбранные файлы. Без uploader — File[]; с uploader — сериализуемые дескрипторы загруженных. null — пусто."},"onChange":{"group":"Control","type":"(value: File[] | RemoteFileRef[] | null) => void","description":"Изменение списка; пустой список приходит как null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."},"uploader":{"group":"Behavior","type":"(file: File, ctx: { onProgress; signal }) => Promise<RemoteFileRef>","description":"Загрузчик immediate-режима. В JSON-форме недостижим: требует функцию — передаётся через реестр."},"onReject":{"group":"Behavior","type":"(rejections: FileRejection[]) => void","description":"Файлы, отклонённые отбором (в значение поля не попадают)."}}},"variantGroup":"FileUpload","variant":"Файлы"},{"name":"FileUploadAvatar","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","default":"Загрузить изображение","description":"Доступное имя зоны (aria-label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"shape":{"type":"string","enum":["circle","square"],"default":"circle","description":"Форма превью.","x-doc":{"group":"Control","type":"'circle' | 'square'"}},"accept":{"type":"string","default":"image/*","description":"Допустимые типы в синтаксисе нативного accept.","x-doc":{"group":"Behavior","type":"string"}},"maxFileSize":{"type":"number","minimum":0,"description":"Максимальный размер файла, байты.","x-doc":{"group":"Behavior","type":"number"}},"capture":{"type":"string","enum":["user","environment"],"description":"Источник камеры для мобильного пикера.","x-doc":{"group":"Behavior","type":"'user' | 'environment'"}},"invalid":{"type":"boolean","default":false,"description":"Явно пометить поле невалидным (подсветка рамки зоны). Под FormField не нужен: aria-invalid приходит от обёртки при ошибке валидации.","x-doc":{"group":"State","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"File | RemoteFileRef | null","description":"Выбранное изображение (single). null — пусто."},"onChange":{"group":"Control","type":"(value: File | RemoteFileRef | null) => void","description":"Выбор/замена/удаление изображения."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."},"uploader":{"group":"Behavior","type":"(file: File, ctx: { onProgress; signal }) => Promise<RemoteFileRef>","description":"Загрузчик immediate-режима. В JSON-форме недостижим: требует функцию — передаётся через реестр."},"onReject":{"group":"Behavior","type":"(rejections: FileRejection[]) => void","description":"Файлы, отклонённые отбором."}}},"variantGroup":"FileUpload","variant":"Аватар"},{"name":"HoverCard","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"HoverCard","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыта ли карточка изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"openDelay":{"type":"number","default":700,"description":"Задержка (мс) перед открытием при наведении.","x-doc":{"group":"Behavior","type":"number"}},"closeDelay":{"type":"number","default":300,"description":"Задержка (мс) перед закрытием при уходе курсора.","x-doc":{"group":"Behavior","type":"number"}}}}},{"name":"Icon","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Icon","properties":{"iconName":{"type":"string","default":"Circle","description":"Имя иконки lucide (PascalCase, напр. Home, ArrowRight).","x-doc":{"group":"Control","type":"string"}},"size":{"type":"number","default":24,"minimum":8,"description":"Размер в пикселях.","x-doc":{"group":"Control","type":"number"}},"color":{"type":"string","description":"Цвет обводки (любой CSS-цвет; по умолчанию currentColor).","x-doc":{"group":"Control","type":"string"}},"strokeWidth":{"type":"number","default":2,"minimum":0.5,"description":"Толщина линий.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Input","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"type":{"type":"string","enum":["text","email","tel","url","password","number","date"],"default":"text","description":"HTML-тип input. number включает числовой буфер, остальные — строковые.","x-doc":{"group":"Textfield","type":"'text' | 'email' | 'number' | 'date' | …","kind":"enum"}},"placeholder":{"type":"string","description":"Подсказка внутри поля.","x-doc":{"group":"Textfield","type":"string"}},"min":{"type":"number","description":"Минимум (type=number). При min>=0 отрицательные значения зажимаются к 0.","x-doc":{"group":"Behavior","type":"number"}},"max":{"type":"number","description":"Максимум (type=number).","x-doc":{"group":"Behavior","type":"number"}},"step":{"type":"number","description":"Шаг (type=number).","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | number | null","description":"Значение поля. Для type=number — number|null, иначе string|null."},"onChange":{"group":"Control","type":"(value: string | number | null) => void","description":"Изменение. Пустой ввод → null. Для number частичный ввод («-», «1.») не эмитится."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}},"variantGroup":"Input","variant":"Текст"},{"name":"InputGroup","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"InputGroup","properties":{"className":{"type":"string","description":"CSS-класс контейнера-группы (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"InputMask","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"mask":{"type":"string","description":"Шаблон маски-подсказки: '9' — цифра, прочие символы — литералы (уходят в placeholder). Напр. '+7 (999) 999-99-99'. Автовставки литералов нет — компонент только помечает формат.","x-doc":{"group":"Textfield","type":"string"}},"placeholder":{"type":"string","description":"Подсказка внутри поля. По умолчанию равна mask.","x-doc":{"group":"Textfield","type":"string"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Значение поля. null/undefined → пустое поле."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение. Пустой ввод → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}},"variantGroup":"Input","variant":"Маска"},{"name":"InputOTP","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"maxLength":{"type":"number","default":6,"minimum":1,"description":"Число слотов (длина кода). Дефолтная раскладка разворачивает одну группу из maxLength слотов.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс скрытого input.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Набранный код. null — пусто."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение кода. Пустой ввод → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}},"variantGroup":"Input","variant":"OTP"},{"name":"InputPassword","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"placeholder":{"type":"string","default":"Password","description":"Подсказка внутри поля.","x-doc":{"group":"Textfield","type":"string"}},"showToggle":{"type":"boolean","default":true,"description":"Показывать иконку переключения видимости (eye/eye-off). Появляется при непустом value.","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Значение пароля. null/пусто — пустое поле."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение. Пустой ввод приводится к null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}},"variantGroup":"Input","variant":"Пароль"},{"name":"Item","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Item","properties":{"variant":{"type":"string","enum":["default","outline","muted"],"default":"default","description":"Визуальный стиль: прозрачный, с рамкой или приглушённый фон.","x-doc":{"group":"Behavior","type":"'default' | 'outline' | 'muted'","kind":"enum"}},"size":{"type":"string","enum":["default","sm"],"default":"default","description":"Размер отступов и зазоров внутри строки.","x-doc":{"group":"Behavior","type":"'default' | 'sm'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Kbd","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Kbd","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Label","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Label","properties":{"className":{"type":"string","description":"CSS-класс подписи (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"htmlFor":{"type":"string","description":"id связанного контрола (атрибут \`for\` тега \`<label>\`).","x-doc":{"group":"Behavior","type":"string"}}}}},{"name":"Marker","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Marker","properties":{"variant":{"type":"string","enum":["default","separator","border"],"default":"default","description":"Вариант оформления маркера.","x-doc":{"group":"Behavior","type":"'default' | 'separator' | 'border'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Menubar","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Menubar","properties":{"dir":{"type":"string","enum":["ltr","rtl"],"default":"ltr","description":"Направление чтения (влияет на навигацию стрелками).","x-doc":{"group":"Behavior","type":"'ltr' | 'rtl'","kind":"enum"}},"loop":{"type":"boolean","default":false,"description":"Зациклить перемещение фокуса стрелками по краям.","x-doc":{"group":"Behavior","type":"boolean"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Message","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Message","properties":{"align":{"type":"string","enum":["start","end"],"default":"start","description":"Сторона выравнивания сообщения (end — своё сообщение справа).","x-doc":{"group":"Behavior","type":"'start' | 'end'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"MessageScroller","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"MessageScroller","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"NativeSelect","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":["string","number"]},"label":{"type":"string"},"group":{"type":"string"}}},"description":"Опции списка. Одинаковый group объединяется в <optgroup>.","x-doc":{"group":"Options","type":"Array<{ value; label; group? }>","kind":"readonly"}},"placeholder":{"type":"string","description":"Подсказка-опция (value=\\"\\") в начале списка.","x-doc":{"group":"Textfield","type":"string"}},"className":{"type":"string","description":"Доп. CSS-класс select.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value как строка). Пустой выбор → null."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение. Пустой выбор (value=\\"\\") → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"NavigationMenu","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"NavigationMenu","properties":{"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация меню.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"dir":{"type":"string","enum":["ltr","rtl"],"description":"Направление письма (слева-направо / справа-налево).","x-doc":{"group":"Behavior","type":"'ltr' | 'rtl'","kind":"enum"}},"viewport":{"type":"boolean","default":true,"description":"Рендерить общий Viewport-оверлей для контента (иначе контент под каждым пунктом).","x-doc":{"group":"Behavior","type":"boolean"}},"delayDuration":{"type":"number","default":200,"description":"Задержка (мс) перед открытием меню при наведении.","x-doc":{"group":"Behavior","type":"number"}},"skipDelayDuration":{"type":"number","default":300,"description":"Окно (мс), в течение которого переход между пунктами открывает меню без задержки.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Pagination","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Pagination","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Popover","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Popover","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыт ли поповер изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":false,"description":"Модальный режим — блокирует взаимодействие с фоном и ловит фокус.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"Progress","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Progress","properties":{"className":{"type":"string","description":"CSS-класс дорожки прогресса (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"value":{"type":"number","minimum":0,"maximum":100,"description":"Текущее значение прогресса в процентах (0–100).","x-doc":{"group":"State","type":"number","kind":"number"}},"max":{"type":"number","minimum":1,"default":100,"description":"Максимальное значение шкалы (по умолчанию 100).","x-doc":{"group":"State","type":"number","kind":"number"}}}}},{"name":"RadioGroup","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":"string"},"label":{"type":"string"}}},"description":"Варианты выбора. Каждый рендерится как radio + подпись справа.","x-doc":{"group":"Options","type":"Array<{ value; label }>","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера группы (по умолчанию grid gap-3).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value). null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Выбор варианта; пустой выбор → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Resizable","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Resizable","properties":{"direction":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Направление разделения панелей.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"ScrollArea","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"ScrollArea","properties":{"type":{"type":"string","enum":["auto","always","scroll","hover"],"default":"hover","description":"Когда показывать скроллбары.","x-doc":{"group":"Behavior","type":"'auto' | 'always' | 'scroll' | 'hover'","kind":"enum"}},"scrollHideDelay":{"type":"number","default":600,"description":"Задержка скрытия скроллбаров (мс) — для type=hover/scroll.","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Section","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Section","properties":{"title":{"type":"string","description":"Заголовок секции. Не задан — заголовок не рендерится (только обёртка).","x-doc":{"group":"Textfield","type":"string"}},"titleAs":{"type":"string","enum":["h1","h2","h3","h4","h5","h6"],"default":"h3","description":"HTML-элемент заголовка (уровень h1-h6).","x-doc":{"group":"Behavior","type":"'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'","kind":"enum"}},"titleClassName":{"type":"string","description":"Доп. CSS-класс заголовка.","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера \`<section>\` (напр. \`grid grid-cols-2 gap-4\`).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Select","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс триггера.","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":["string","number"]},"label":{"type":"string"},"group":{"type":"string"}}},"description":"Inline-опции. Одинаковый group объединяется в секцию SelectLabel.","x-doc":{"group":"Options","type":"Array<{ value; label; group? }>","kind":"readonly"}},"placeholder":{"type":"string","default":"Select an option...","description":"Подсказка в триггере.","x-doc":{"group":"Textfield","type":"string"}},"clearable":{"type":"boolean","default":false,"description":"Показывать крестик очистки (сброс в null).","x-doc":{"group":"Behavior","type":"boolean"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value). null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Выбор; при очистке приходит null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."},"resource":{"group":"Options","type":"ResourceConfig<unknown>","description":"Асинхронный источник опций (static / preload / partial). В JSON-форме недостижим: требует функцию load."}}}},{"name":"Separator","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Separator","properties":{"className":{"type":"string","description":"CSS-класс разделителя (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация разделителя: горизонтальный (по умолчанию) или вертикальный.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"decorative":{"type":"boolean","default":true,"description":"Декоративный ли разделитель. true (по умолчанию) — скрыт от AT; false — семантический separator.","x-doc":{"group":"Behavior","type":"boolean","kind":"boolean"}}}}},{"name":"Sheet","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Sheet","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Открыта ли панель изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"modal":{"type":"boolean","default":true,"description":"Модальный режим — блокирует взаимодействие с фоном.","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"Sidebar","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Sidebar","properties":{"side":{"type":"string","enum":["left","right"],"default":"left","description":"Сторона размещения.","x-doc":{"group":"Behavior","type":"'left' | 'right'","kind":"enum"}},"variant":{"type":"string","enum":["sidebar","floating","inset"],"default":"sidebar","description":"Вариант оформления.","x-doc":{"group":"Behavior","type":"'sidebar' | 'floating' | 'inset'","kind":"enum"}},"collapsible":{"type":"string","enum":["offcanvas","icon","none"],"default":"offcanvas","description":"Режим сворачивания.","x-doc":{"group":"Behavior","type":"'offcanvas' | 'icon' | 'none'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Skeleton","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Skeleton","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind) — задаёт размеры плейсхолдера (h-*/w-*).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Slider","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"min":{"type":"number","default":0,"description":"Минимум диапазона (Radix min).","x-doc":{"group":"Behavior","type":"number"}},"max":{"type":"number","default":100,"description":"Максимум диапазона (Radix max).","x-doc":{"group":"Behavior","type":"number"}},"step":{"type":"number","default":1,"description":"Шаг изменения значения (Radix step).","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс слайдера (SliderPrimitive.Root).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"number | null","description":"Значение слайдера (одно-thumb). null трактуется как min. Резолвится формой."},"onChange":{"group":"Control","type":"(value: number | null) => void","description":"Изменение; эмитит первое число массива Radix (onValueChange → arr[0])."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Spinner","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Spinner","properties":{"className":{"type":"string","description":"Доп. CSS-класс (Tailwind); размер задаётся через size-* (по умолчанию size-4).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Switch","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись справа от переключателя (inline-раскладка; FormField верхнюю метку не рисует).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"className":{"type":"string","description":"Доп. CSS-класс переключателя.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"boolean","description":"Состояние переключателя (true — включён). Резолвится формой."},"onChange":{"group":"Control","type":"(value: boolean) => void","description":"Переключение; эмитит boolean (Radix onCheckedChange, indeterminate → false)."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Table","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Table","properties":{"className":{"type":"string","description":"CSS-класс таблицы (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"Tabs","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"Tabs","properties":{"className":{"type":"string","description":"CSS-класс контейнера табов (Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}},"defaultValue":{"type":"string","description":"Значение вкладки, активной по умолчанию (uncontrolled).","x-doc":{"group":"Behavior","type":"string"}},"orientation":{"type":"string","enum":["horizontal","vertical"],"default":"horizontal","description":"Ориентация раскладки табов.","x-doc":{"group":"Behavior","type":"'horizontal' | 'vertical'","kind":"enum"}},"activationMode":{"type":"string","enum":["automatic","manual"],"default":"automatic","description":"Активировать вкладку при фокусе (automatic) или только по клику/Enter (manual).","x-doc":{"group":"Behavior","type":"'automatic' | 'manual'","kind":"enum"}}}}},{"name":"Textarea","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"placeholder":{"type":"string","description":"Подсказка внутри поля.","x-doc":{"group":"Textfield","type":"string"}},"rows":{"type":"number","description":"Число видимых строк (HTML-атрибут rows).","x-doc":{"group":"Behavior","type":"number"}},"className":{"type":"string","description":"Доп. CSS-класс.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Значение поля. Пустой ввод → null."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Изменение. Пустой ввод → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Toggle","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"variant":{"type":"string","enum":["default","outline"],"default":"default","description":"Стиль cva: default (заливка при нажатии) | outline (граница).","x-doc":{"group":"Control","type":"'default' | 'outline'","kind":"enum"}},"size":{"type":"string","enum":["default","sm","lg"],"default":"default","description":"Размер cva: default | sm | lg.","x-doc":{"group":"Control","type":"'default' | 'sm' | 'lg'","kind":"enum"}},"className":{"type":"string","description":"Доп. CSS-класс контрола (TogglePrimitive.Root).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"boolean","description":"Состояние (true — нажат/pressed). undefined/null трактуется как false. Резолвится формой."},"onChange":{"group":"Control","type":"(value: boolean) => void","description":"Переключение; эмитит boolean (Radix onPressedChange)."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"ToggleGroup","role":"field","propsSchema":{"type":"object","properties":{"label":{"type":"string","description":"Подпись поля (рендерит FormField.Label).","x-doc":{"group":"Textfield","type":"string"}},"required":{"type":"boolean","default":false,"description":"Маркер «*» у метки + aria-required.","x-doc":{"group":"State","type":"boolean"}},"description":{"type":"string","description":"Пояснение под полем (shadcn FieldDescription).","x-doc":{"group":"Textfield","type":"string"}},"testId":{"type":"string","description":"data-testid для e2e (meta-проп; в DOM примитива не течёт).","x-doc":{"group":"Behavior","type":"string","kind":"readonly"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"additionalProperties":false,"properties":{"value":{"type":"string"},"label":{"type":"string"}}},"description":"Варианты выбора. Каждый рендерится как кнопка-переключатель.","x-doc":{"group":"Options","type":"Array<{ value; label }>","kind":"readonly"}},"variant":{"type":"string","enum":["default","outline"],"default":"default","description":"Визуальный стиль кнопок: плоские (default) или с рамкой (outline).","x-doc":{"group":"Control","type":"'default' | 'outline'"}},"className":{"type":"string","description":"Доп. CSS-класс контейнера группы.","x-doc":{"group":"Control","type":"string","kind":"readonly"}}},"additionalProperties":false,"x-runtimeProps":{"value":{"group":"Control","type":"string | null","description":"Выбранное значение (option.value). null — ничего не выбрано."},"onChange":{"group":"Control","type":"(value: string | null) => void","description":"Выбор варианта; пустой выбор → null."},"onBlur":{"group":"Control","type":"() => void","kind":"readonly","description":"Отметка touched. Форма подставляет control.markAsTouched."},"disabled":{"group":"State","type":"boolean","kind":"boolean","default":false,"description":"Блокировка поля. Задаётся через control.disable()/enable(), НЕ через componentProps: FormFieldControl.tsx:104-115 ставит disabled ПОСЛЕ спреда componentProps, поэтому componentProps.disabled мёртв."}}}},{"name":"Tooltip","role":"container","propsSchema":{"type":"object","additionalProperties":true,"x-registryName":"Tooltip","properties":{"defaultOpen":{"type":"boolean","default":false,"description":"Показан ли тултип изначально (неуправляемый режим).","x-doc":{"group":"State","type":"boolean"}},"delayDuration":{"type":"number","default":700,"description":"Задержка перед показом (мс).","x-doc":{"group":"Behavior","type":"number"}},"disableHoverableContent":{"type":"boolean","default":false,"description":"Скрывать тултип при уходе курсора с триггера (нельзя навести на сам тултип).","x-doc":{"group":"Behavior","type":"boolean"}}}}},{"name":"TypographyBlockquote","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyBlockquote","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Цитата» (элемент <blockquote>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyH1","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyH1","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Заголовок 1» (элемент <h1>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyH2","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyH2","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Заголовок 2» (элемент <h2>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyH3","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyH3","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Заголовок 3» (элемент <h3>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyH4","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyH4","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Заголовок 4» (элемент <h4>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyInlineCode","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyInlineCode","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Инлайн-код» (элемент <code>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyLarge","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyLarge","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Крупный текст» (элемент <div>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyLead","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyLead","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Лид-абзац» (элемент <p>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyList","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyList","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Список» (элемент <ul>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyMuted","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyMuted","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Приглушённый текст» (элемент <p>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographyP","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographyP","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Абзац» (элемент <p>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}},{"name":"TypographySmall","role":"container","propsSchema":{"type":"object","additionalProperties":false,"x-registryName":"TypographySmall","properties":{"className":{"type":"string","description":"Доп. CSS-класс для «Мелкий текст» (элемент <small>, Tailwind).","x-doc":{"group":"Control","type":"string","kind":"readonly"}}}}}]`),Tl={version:Nl,components:jl},Ol=Cl,Rl={Input:"Поля ввода",InputPassword:"Поля ввода",InputMask:"Поля ввода",InputOTP:"Поля ввода",Textarea:"Поля ввода",DatePicker:"Поля ввода",Calendar:"Поля ввода",FileUpload:"Поля ввода",FileUploadAvatar:"Поля ввода",Select:"Выбор и переключатели",NativeSelect:"Выбор и переключатели",Combobox:"Выбор и переключатели",RadioGroup:"Выбор и переключатели",Checkbox:"Выбор и переключатели",Switch:"Выбор и переключатели",Slider:"Выбор и переключатели",Toggle:"Выбор и переключатели",ToggleGroup:"Выбор и переключатели",Box:"Контейнеры",Section:"Контейнеры",Card:"Контейнеры",Accordion:"Контейнеры",Tabs:"Контейнеры",Collapsible:"Контейнеры",InputGroup:"Контейнеры",ButtonGroup:"Контейнеры",AspectRatio:"Контейнеры",ScrollArea:"Контейнеры",Resizable:"Контейнеры",Sidebar:"Контейнеры",Button:"Действия",Icon:"Отображение",Label:"Отображение",Badge:"Отображение",Typography:"Отображение",Avatar:"Отображение",Progress:"Отображение",Skeleton:"Отображение",Spinner:"Отображение",Table:"Отображение",Chart:"Отображение",Empty:"Отображение",Kbd:"Отображение",Marker:"Отображение",Alert:"Отображение",Separator:"Отображение",Carousel:"Отображение",Dialog:"Оверлеи",AlertDialog:"Оверлеи",Sheet:"Оверлеи",Drawer:"Оверлеи",Popover:"Оверлеи",HoverCard:"Оверлеи",Tooltip:"Оверлеи",Command:"Оверлеи",DropdownMenu:"Навигация",ContextMenu:"Навигация",Menubar:"Навигация",NavigationMenu:"Навигация",Breadcrumb:"Навигация",Pagination:"Навигация",Bubble:"Чат",Message:"Чат",MessageScroller:"Чат",Attachment:"Чат",Item:"Чат"};function Al(t,e){const r=To().palette?.categoryByName?.[t];return r||(t.startsWith("Typography")?"Типографика":Rl[t]??(e==="container"?"Контейнеры":"Прочее"))}function Il(t,e){let r=t;if(e?.include&&e.include.length){const n=new Set(e.include);r=r.filter(i=>n.has(i.name))}if(e?.exclude&&e.exclude.length){const n=new Set(e.exclude);r=r.filter(i=>!n.has(i.name))}return r}function fc(){const t=To().components,e=_s()??Tl,r=[...e.components,...js(t?.synthetic)];return{version:e.version,components:Il(r,t)}}function hc(t){return t.components.map(e=>({name:e.name,role:e.role,category:e.category??Al(e.name,e.role),propsSchema:e.propsSchema,...e.variantGroup?{variantGroup:e.variantGroup}:{},...e.variant?{variant:e.variant}:{},makeNode:()=>bl(e.name,e.role)}))}let Kt=null;function mc(t){Kt||(Kt=new vs({allErrors:!0,strict:!1}).compile(Ol));const e=Kt(t),r=(Kt.errors??[]).map(n=>`${n.instancePath||"/"} ${n.message??""}`.trim());return{valid:!!e,errors:r}}export{vs as A,rc as B,Ka as E,Yl as F,Ca as H,cr as L,Jl as M,Wl as O,Ua as P,Xl as R,tc as U,Zl as W,st as X,ur as Y,ql as a,ma as b,lc as c,dc as d,uc as e,cc as f,To as g,si as h,So as i,hc as j,ic as k,fc as l,pc as m,ac as n,ao as o,ce as p,oc as q,sc as r,Fl as s,nc as t,Ql as u,mc as v,ec as w,We as x,de as y,Fe as z};