HEX
Server: nginx/1.28.1
System: Linux VM-0-12-opencloudos 6.6.117-45.oc9.x86_64 #1 SMP Thu Dec 4 10:26:39 CST 2025 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.waciwang.com/wp-content/plugins/gutenberg/build/modules/abilities/index.min.js
var Xo=Object.create;var Or=Object.defineProperty;var Qo=Object.getOwnPropertyDescriptor;var eu=Object.getOwnPropertyNames;var tu=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty;var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jn=(e,t)=>{for(var r in t)Or(e,r,{get:t[r],enumerable:!0})},su=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of eu(t))!ru.call(e,n)&&n!==r&&Or(e,n,{get:()=>t[n],enumerable:!(s=Qo(t,n))||s.enumerable});return e};var we=(e,t,r)=>(r=e!=null?Xo(tu(e)):{},su(t||!e||!e.__esModule?Or(r,"default",{value:e,enumerable:!0}):r,e));var ot=y((Yp,Wn)=>{Wn.exports=window.wp.data});var kr=y((Bp,Zn)=>{Zn.exports=window.wp.i18n});var dt=y(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.regexpCode=k.getEsmExportName=k.getProperty=k.safeStringify=k.stringify=k.strConcat=k.addCodeArg=k.str=k._=k.nil=k._Code=k.Name=k.IDENTIFIER=k._CodeOrName=void 0;var ut=class{};k._CodeOrName=ut;k.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var qe=class extends ut{constructor(t){if(super(),!k.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};k.Name=qe;var W=class extends ut{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,s)=>`${r}${s}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,s)=>(s instanceof qe&&(r[s.str]=(r[s.str]||0)+1),r),{})}};k._Code=W;k.nil=new W("");function sa(e,...t){let r=[e[0]],s=0;for(;s<t.length;)Mr(r,t[s]),r.push(e[++s]);return new W(r)}k._=sa;var Cr=new W("+");function na(e,...t){let r=[ct(e[0])],s=0;for(;s<t.length;)r.push(Cr),Mr(r,t[s]),r.push(Cr,ct(e[++s]));return vu(r),new W(r)}k.str=na;function Mr(e,t){t instanceof W?e.push(...t._items):t instanceof qe?e.push(t):e.push(Eu(t))}k.addCodeArg=Mr;function vu(e){let t=1;for(;t<e.length-1;){if(e[t]===Cr){let r=wu(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function wu(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof qe||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof qe))return`"${e}${t.slice(1)}`}function bu(e,t){return t.emptyStr()?e:e.emptyStr()?t:na`${e}${t}`}k.strConcat=bu;function Eu(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ct(Array.isArray(e)?e.join(","):e)}function Su(e){return new W(ct(e))}k.stringify=Su;function ct(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}k.safeStringify=ct;function Pu(e){return typeof e=="string"&&k.IDENTIFIER.test(e)?new W(`.${e}`):sa`[${e}]`}k.getProperty=Pu;function Tu(e){if(typeof e=="string"&&k.IDENTIFIER.test(e))return new W(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}k.getEsmExportName=Tu;function Iu(e){return new W(e.toString())}k.regexpCode=Iu});var Vr=y(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.ValueScope=Y.ValueScopeName=Y.Scope=Y.varKinds=Y.UsedValueState=void 0;var H=dt(),Dr=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ut;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ut||(Y.UsedValueState=Ut={}));Y.varKinds={const:new H.Name("const"),let:new H.Name("let"),var:new H.Name("var")};var Ft=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof H.Name?t:this.name(t)}name(t){return new H.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,s;if(!((s=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||s===void 0)&&s.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Y.Scope=Ft;var Kt=class extends H.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:s}){this.value=t,this.scopePath=(0,H._)`.${new H.Name(r)}[${s}]`}};Y.ValueScopeName=Kt;var Nu=(0,H._)`\n`,zr=class extends Ft{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Nu:H.nil}}get(){return this._scope}name(t){return new Kt(t,this._newName(t))}value(t,r){var s;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:a}=n,i=(s=r.key)!==null&&s!==void 0?s:r.ref,o=this._values[a];if(o){let c=o.get(i);if(c)return c}else o=this._values[a]=new Map;o.set(i,n);let u=this._scope[a]||(this._scope[a]=[]),d=u.length;return u[d]=r.ref,n.setValue(r,{property:a,itemIndex:d}),n}getValue(t,r){let s=this._values[t];if(s)return s.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,H._)`${t}${s.scopePath}`})}scopeCode(t=this._values,r,s){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,s)}_reduceValues(t,r,s={},n){let a=H.nil;for(let i in t){let o=t[i];if(!o)continue;let u=s[i]=s[i]||new Map;o.forEach(d=>{if(u.has(d))return;u.set(d,Ut.Started);let c=r(d);if(c){let l=this.opts.es5?Y.varKinds.var:Y.varKinds.const;a=(0,H._)`${a}${l} ${d} = ${c};${this.opts._n}`}else if(c=n?.(d))a=(0,H._)`${a}${c}${this.opts._n}`;else throw new Dr(d);u.set(d,Ut.Completed)})}return a}};Y.ValueScope=zr});var b=y(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.or=S.and=S.not=S.CodeGen=S.operators=S.varKinds=S.ValueScopeName=S.ValueScope=S.Scope=S.Name=S.regexpCode=S.stringify=S.getProperty=S.nil=S.strConcat=S.str=S._=void 0;var I=dt(),te=Vr(),be=dt();Object.defineProperty(S,"_",{enumerable:!0,get:function(){return be._}});Object.defineProperty(S,"str",{enumerable:!0,get:function(){return be.str}});Object.defineProperty(S,"strConcat",{enumerable:!0,get:function(){return be.strConcat}});Object.defineProperty(S,"nil",{enumerable:!0,get:function(){return be.nil}});Object.defineProperty(S,"getProperty",{enumerable:!0,get:function(){return be.getProperty}});Object.defineProperty(S,"stringify",{enumerable:!0,get:function(){return be.stringify}});Object.defineProperty(S,"regexpCode",{enumerable:!0,get:function(){return be.regexpCode}});Object.defineProperty(S,"Name",{enumerable:!0,get:function(){return be.Name}});var Bt=Vr();Object.defineProperty(S,"Scope",{enumerable:!0,get:function(){return Bt.Scope}});Object.defineProperty(S,"ValueScope",{enumerable:!0,get:function(){return Bt.ValueScope}});Object.defineProperty(S,"ValueScopeName",{enumerable:!0,get:function(){return Bt.ValueScopeName}});Object.defineProperty(S,"varKinds",{enumerable:!0,get:function(){return Bt.varKinds}});S.operators={GT:new I._Code(">"),GTE:new I._Code(">="),LT:new I._Code("<"),LTE:new I._Code("<="),EQ:new I._Code("==="),NEQ:new I._Code("!=="),NOT:new I._Code("!"),OR:new I._Code("||"),AND:new I._Code("&&"),ADD:new I._Code("+")};var ye=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},xr=class extends ye{constructor(t,r,s){super(),this.varKind=t,this.name=r,this.rhs=s}render({es5:t,_n:r}){let s=t?te.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Ue(this.rhs,t,r)),this}get names(){return this.rhs instanceof I._CodeOrName?this.rhs.names:{}}},Gt=class extends ye{constructor(t,r,s){super(),this.lhs=t,this.rhs=r,this.sideEffects=s}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof I.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Ue(this.rhs,t,r),this}get names(){let t=this.lhs instanceof I.Name?{}:{...this.lhs.names};return Yt(t,this.rhs)}},Lr=class extends Gt{constructor(t,r,s,n){super(t,s,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Ur=class extends ye{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Fr=class extends ye{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},Kr=class extends ye{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Gr=class extends ye{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Ue(this.code,t,r),this}get names(){return this.code instanceof I._CodeOrName?this.code.names:{}}},lt=class extends ye{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,s)=>r+s.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let s=t[r].optimizeNodes();Array.isArray(s)?t.splice(r,1,...s):s?t[r]=s:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:s}=this,n=s.length;for(;n--;){let a=s[n];a.optimizeNames(t,r)||(Ou(t,a.names),s.splice(n,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Ae(t,r.names),{})}},_e=class extends lt{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Hr=class extends lt{},Le=class extends _e{};Le.kind="else";var Re=class e extends _e{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let s=r.optimizeNodes();r=this.else=Array.isArray(s)?new Le(s):s}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(aa(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var s;if(this.else=(s=this.else)===null||s===void 0?void 0:s.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Ue(this.condition,t,r),this}get names(){let t=super.names;return Yt(t,this.condition),this.else&&Ae(t,this.else.names),t}};Re.kind="if";var je=class extends _e{};je.kind="for";var Yr=class extends je{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Ue(this.iteration,t,r),this}get names(){return Ae(super.names,this.iteration.names)}},Br=class extends je{constructor(t,r,s,n){super(),this.varKind=t,this.name=r,this.from=s,this.to=n}render(t){let r=t.es5?te.varKinds.var:this.varKind,{name:s,from:n,to:a}=this;return`for(${r} ${s}=${n}; ${s}<${a}; ${s}++)`+super.render(t)}get names(){let t=Yt(super.names,this.from);return Yt(t,this.to)}},Ht=class extends je{constructor(t,r,s,n){super(),this.loop=t,this.varKind=r,this.name=s,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Ue(this.iterable,t,r),this}get names(){return Ae(super.names,this.iterable.names)}},ft=class extends _e{constructor(t,r,s){super(),this.name=t,this.args=r,this.async=s}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ft.kind="func";var mt=class extends lt{render(t){return"return "+super.render(t)}};mt.kind="return";var Jr=class extends _e{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var s,n;return super.optimizeNames(t,r),(s=this.catch)===null||s===void 0||s.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Ae(t,this.catch.names),this.finally&&Ae(t,this.finally.names),t}},pt=class extends _e{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};pt.kind="catch";var ht=class extends _e{render(t){return"finally"+super.render(t)}};ht.kind="finally";var Wr=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
`:""},this._extScope=t,this._scope=new te.Scope({parent:t}),this._nodes=[new Hr]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let s=this._extScope.value(t,r);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,s,n){let a=this._scope.toName(r);return s!==void 0&&n&&(this._constants[a.str]=s),this._leafNode(new xr(t,a,s)),a}const(t,r,s){return this._def(te.varKinds.const,t,r,s)}let(t,r,s){return this._def(te.varKinds.let,t,r,s)}var(t,r,s){return this._def(te.varKinds.var,t,r,s)}assign(t,r,s){return this._leafNode(new Gt(t,r,s))}add(t,r){return this._leafNode(new Lr(t,S.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==I.nil&&this._leafNode(new Gr(t)),this}object(...t){let r=["{"];for(let[s,n]of t)r.length>1&&r.push(","),r.push(s),(s!==n||this.opts.es5)&&(r.push(":"),(0,I.addCodeArg)(r,n));return r.push("}"),new I._Code(r)}if(t,r,s){if(this._blockNode(new Re(t)),r&&s)this.code(r).else().code(s).endIf();else if(r)this.code(r).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Re(t))}else(){return this._elseNode(new Le)}endIf(){return this._endBlockNode(Re,Le)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Yr(t),r)}forRange(t,r,s,n,a=this.opts.es5?te.varKinds.var:te.varKinds.let){let i=this._scope.toName(t);return this._for(new Br(a,i,r,s),()=>n(i))}forOf(t,r,s,n=te.varKinds.const){let a=this._scope.toName(t);if(this.opts.es5){let i=r instanceof I.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,I._)`${i}.length`,o=>{this.var(a,(0,I._)`${i}[${o}]`),s(a)})}return this._for(new Ht("of",n,a,r),()=>s(a))}forIn(t,r,s,n=this.opts.es5?te.varKinds.var:te.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,I._)`Object.keys(${r})`,s);let a=this._scope.toName(t);return this._for(new Ht("in",n,a,r),()=>s(a))}endFor(){return this._endBlockNode(je)}label(t){return this._leafNode(new Ur(t))}break(t){return this._leafNode(new Fr(t))}return(t){let r=new mt;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(mt)}try(t,r,s){if(!r&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Jr;if(this._blockNode(n),this.code(t),r){let a=this.name("e");this._currNode=n.catch=new pt(a),r(a)}return s&&(this._currNode=n.finally=new ht,this.code(s)),this._endBlockNode(pt,ht)}throw(t){return this._leafNode(new Kr(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-r;if(s<0||t!==void 0&&s!==t)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=I.nil,s,n){return this._blockNode(new ft(t,r,s)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(ft)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let s=this._currNode;if(s instanceof t||r&&s instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Re))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};S.CodeGen=Wr;function Ae(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Yt(e,t){return t instanceof I._CodeOrName?Ae(e,t.names):e}function Ue(e,t,r){if(e instanceof I.Name)return s(e);if(!n(e))return e;return new I._Code(e._items.reduce((a,i)=>(i instanceof I.Name&&(i=s(i)),i instanceof I._Code?a.push(...i._items):a.push(i),a),[]));function s(a){let i=r[a.str];return i===void 0||t[a.str]!==1?a:(delete t[a.str],i)}function n(a){return a instanceof I._Code&&a._items.some(i=>i instanceof I.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function Ou(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function aa(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,I._)`!${Zr(e)}`}S.not=aa;var ku=ia(S.operators.AND);function qu(...e){return e.reduce(ku)}S.and=qu;var Ru=ia(S.operators.OR);function ju(...e){return e.reduce(Ru)}S.or=ju;function ia(e){return(t,r)=>t===I.nil?r:r===I.nil?t:(0,I._)`${Zr(t)} ${e} ${Zr(r)}`}function Zr(e){return e instanceof I.Name?e:(0,I._)`(${e})`}});var q=y(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.checkStrictMode=P.getErrorPath=P.Type=P.useFunc=P.setEvaluated=P.evaluatedPropsToName=P.mergeEvaluated=P.eachItem=P.unescapeJsonPointer=P.escapeJsonPointer=P.escapeFragment=P.unescapeFragment=P.schemaRefOrVal=P.schemaHasRulesButRef=P.schemaHasRules=P.checkUnknownRules=P.alwaysValidSchema=P.toHash=void 0;var j=b(),Au=dt();function Cu(e){let t={};for(let r of e)t[r]=!0;return t}P.toHash=Cu;function Mu(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(ca(e,t),!da(t,e.self.RULES.all))}P.alwaysValidSchema=Mu;function ca(e,t=e.schema){let{opts:r,self:s}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=s.RULES.keywords;for(let a in t)n[a]||ma(e,`unknown keyword: "${a}"`)}P.checkUnknownRules=ca;function da(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}P.schemaHasRules=da;function Du(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}P.schemaHasRulesButRef=Du;function zu({topSchemaRef:e,schemaPath:t},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,j._)`${r}`}return(0,j._)`${e}${t}${(0,j.getProperty)(s)}`}P.schemaRefOrVal=zu;function Vu(e){return la(decodeURIComponent(e))}P.unescapeFragment=Vu;function xu(e){return encodeURIComponent(Qr(e))}P.escapeFragment=xu;function Qr(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}P.escapeJsonPointer=Qr;function la(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}P.unescapeJsonPointer=la;function Lu(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}P.eachItem=Lu;function oa({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:s}){return(n,a,i,o)=>{let u=i===void 0?a:i instanceof j.Name?(a instanceof j.Name?e(n,a,i):t(n,a,i),i):a instanceof j.Name?(t(n,i,a),a):r(a,i);return o===j.Name&&!(u instanceof j.Name)?s(n,u):u}}P.mergeEvaluated={props:oa({mergeNames:(e,t,r)=>e.if((0,j._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,j._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,j._)`${r} || {}`).code((0,j._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,j._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,j._)`${r} || {}`),es(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:fa}),items:oa({mergeNames:(e,t,r)=>e.if((0,j._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,j._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,j._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,j._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function fa(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,j._)`{}`);return t!==void 0&&es(e,r,t),r}P.evaluatedPropsToName=fa;function es(e,t,r){Object.keys(r).forEach(s=>e.assign((0,j._)`${t}${(0,j.getProperty)(s)}`,!0))}P.setEvaluated=es;var ua={};function Uu(e,t){return e.scopeValue("func",{ref:t,code:ua[t.code]||(ua[t.code]=new Au._Code(t.code))})}P.useFunc=Uu;var Xr;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Xr||(P.Type=Xr={}));function Fu(e,t,r){if(e instanceof j.Name){let s=t===Xr.Num;return r?s?(0,j._)`"[" + ${e} + "]"`:(0,j._)`"['" + ${e} + "']"`:s?(0,j._)`"/" + ${e}`:(0,j._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,j.getProperty)(e).toString():"/"+Qr(e)}P.getErrorPath=Fu;function ma(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}P.checkStrictMode=ma});var ge=y(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});var L=b(),Ku={data:new L.Name("data"),valCxt:new L.Name("valCxt"),instancePath:new L.Name("instancePath"),parentData:new L.Name("parentData"),parentDataProperty:new L.Name("parentDataProperty"),rootData:new L.Name("rootData"),dynamicAnchors:new L.Name("dynamicAnchors"),vErrors:new L.Name("vErrors"),errors:new L.Name("errors"),this:new L.Name("this"),self:new L.Name("self"),scope:new L.Name("scope"),json:new L.Name("json"),jsonPos:new L.Name("jsonPos"),jsonLen:new L.Name("jsonLen"),jsonPart:new L.Name("jsonPart")};ts.default=Ku});var yt=y(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.extendErrors=U.resetErrorsCount=U.reportExtraError=U.reportError=U.keyword$DataError=U.keywordError=void 0;var O=b(),Jt=q(),K=ge();U.keywordError={message:({keyword:e})=>(0,O.str)`must pass "${e}" keyword validation`};U.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,O.str)`"${e}" keyword must be ${t} ($data)`:(0,O.str)`"${e}" keyword is invalid ($data)`};function Gu(e,t=U.keywordError,r,s){let{it:n}=e,{gen:a,compositeRule:i,allErrors:o}=n,u=ya(e,t,r);s??(i||o)?pa(a,u):ha(n,(0,O._)`[${u}]`)}U.reportError=Gu;function Hu(e,t=U.keywordError,r){let{it:s}=e,{gen:n,compositeRule:a,allErrors:i}=s,o=ya(e,t,r);pa(n,o),a||i||ha(s,K.default.vErrors)}U.reportExtraError=Hu;function Yu(e,t){e.assign(K.default.errors,t),e.if((0,O._)`${K.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,O._)`${K.default.vErrors}.length`,t),()=>e.assign(K.default.vErrors,null)))}U.resetErrorsCount=Yu;function Bu({gen:e,keyword:t,schemaValue:r,data:s,errsCount:n,it:a}){if(n===void 0)throw new Error("ajv implementation error");let i=e.name("err");e.forRange("i",n,K.default.errors,o=>{e.const(i,(0,O._)`${K.default.vErrors}[${o}]`),e.if((0,O._)`${i}.instancePath === undefined`,()=>e.assign((0,O._)`${i}.instancePath`,(0,O.strConcat)(K.default.instancePath,a.errorPath))),e.assign((0,O._)`${i}.schemaPath`,(0,O.str)`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign((0,O._)`${i}.schema`,r),e.assign((0,O._)`${i}.data`,s))})}U.extendErrors=Bu;function pa(e,t){let r=e.const("err",t);e.if((0,O._)`${K.default.vErrors} === null`,()=>e.assign(K.default.vErrors,(0,O._)`[${r}]`),(0,O._)`${K.default.vErrors}.push(${r})`),e.code((0,O._)`${K.default.errors}++`)}function ha(e,t){let{gen:r,validateName:s,schemaEnv:n}=e;n.$async?r.throw((0,O._)`new ${e.ValidationError}(${t})`):(r.assign((0,O._)`${s}.errors`,t),r.return(!1))}var Ce={keyword:new O.Name("keyword"),schemaPath:new O.Name("schemaPath"),params:new O.Name("params"),propertyName:new O.Name("propertyName"),message:new O.Name("message"),schema:new O.Name("schema"),parentSchema:new O.Name("parentSchema")};function ya(e,t,r){let{createErrors:s}=e.it;return s===!1?(0,O._)`{}`:Ju(e,t,r)}function Ju(e,t,r={}){let{gen:s,it:n}=e,a=[Wu(n,r),Zu(e,r)];return Xu(e,t,a),s.object(...a)}function Wu({errorPath:e},{instancePath:t}){let r=t?(0,O.str)`${e}${(0,Jt.getErrorPath)(t,Jt.Type.Str)}`:e;return[K.default.instancePath,(0,O.strConcat)(K.default.instancePath,r)]}function Zu({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let n=s?t:(0,O.str)`${t}/${e}`;return r&&(n=(0,O.str)`${n}${(0,Jt.getErrorPath)(r,Jt.Type.Str)}`),[Ce.schemaPath,n]}function Xu(e,{params:t,message:r},s){let{keyword:n,data:a,schemaValue:i,it:o}=e,{opts:u,propertyName:d,topSchemaRef:c,schemaPath:l}=o;s.push([Ce.keyword,n],[Ce.params,typeof t=="function"?t(e):t||(0,O._)`{}`]),u.messages&&s.push([Ce.message,typeof r=="function"?r(e):r]),u.verbose&&s.push([Ce.schema,i],[Ce.parentSchema,(0,O._)`${c}${l}`],[K.default.data,a]),d&&s.push([Ce.propertyName,d])}});var ga=y(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.boolOrEmptySchema=Fe.topBoolOrEmptySchema=void 0;var Qu=yt(),ec=b(),tc=ge(),rc={message:"boolean schema is false"};function sc(e){let{gen:t,schema:r,validateName:s}=e;r===!1?_a(e,!1):typeof r=="object"&&r.$async===!0?t.return(tc.default.data):(t.assign((0,ec._)`${s}.errors`,null),t.return(!0))}Fe.topBoolOrEmptySchema=sc;function nc(e,t){let{gen:r,schema:s}=e;s===!1?(r.var(t,!1),_a(e)):r.var(t,!0)}Fe.boolOrEmptySchema=nc;function _a(e,t){let{gen:r,data:s}=e,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Qu.reportError)(n,rc,void 0,t)}});var rs=y(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.getRules=Ke.isJSONType=void 0;var ac=["string","number","integer","boolean","null","object","array"],ic=new Set(ac);function oc(e){return typeof e=="string"&&ic.has(e)}Ke.isJSONType=oc;function uc(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Ke.getRules=uc});var ss=y(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.shouldUseRule=Ee.shouldUseGroup=Ee.schemaHasRulesForType=void 0;function cc({schema:e,self:t},r){let s=t.RULES.types[r];return s&&s!==!0&&$a(e,s)}Ee.schemaHasRulesForType=cc;function $a(e,t){return t.rules.some(r=>va(e,r))}Ee.shouldUseGroup=$a;function va(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(s=>e[s]!==void 0))}Ee.shouldUseRule=va});var _t=y(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.reportTypeError=F.checkDataTypes=F.checkDataType=F.coerceAndCheckDataType=F.getJSONTypes=F.getSchemaTypes=F.DataType=void 0;var dc=rs(),lc=ss(),fc=yt(),E=b(),wa=q(),Ge;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Ge||(F.DataType=Ge={}));function mc(e){let t=ba(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}F.getSchemaTypes=mc;function ba(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(dc.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}F.getJSONTypes=ba;function pc(e,t){let{gen:r,data:s,opts:n}=e,a=hc(t,n.coerceTypes),i=t.length>0&&!(a.length===0&&t.length===1&&(0,lc.schemaHasRulesForType)(e,t[0]));if(i){let o=as(t,s,n.strictNumbers,Ge.Wrong);r.if(o,()=>{a.length?yc(e,t,a):is(e)})}return i}F.coerceAndCheckDataType=pc;var Ea=new Set(["string","number","integer","boolean","null"]);function hc(e,t){return t?e.filter(r=>Ea.has(r)||t==="array"&&r==="array"):[]}function yc(e,t,r){let{gen:s,data:n,opts:a}=e,i=s.let("dataType",(0,E._)`typeof ${n}`),o=s.let("coerced",(0,E._)`undefined`);a.coerceTypes==="array"&&s.if((0,E._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,E._)`${n}[0]`).assign(i,(0,E._)`typeof ${n}`).if(as(t,n,a.strictNumbers),()=>s.assign(o,n))),s.if((0,E._)`${o} !== undefined`);for(let d of r)(Ea.has(d)||d==="array"&&a.coerceTypes==="array")&&u(d);s.else(),is(e),s.endIf(),s.if((0,E._)`${o} !== undefined`,()=>{s.assign(n,o),_c(e,o)});function u(d){switch(d){case"string":s.elseIf((0,E._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,E._)`"" + ${n}`).elseIf((0,E._)`${n} === null`).assign(o,(0,E._)`""`);return;case"number":s.elseIf((0,E._)`${i} == "boolean" || ${n} === null
              || (${i} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,E._)`+${n}`);return;case"integer":s.elseIf((0,E._)`${i} === "boolean" || ${n} === null
              || (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,E._)`+${n}`);return;case"boolean":s.elseIf((0,E._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,E._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":s.elseIf((0,E._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(o,null);return;case"array":s.elseIf((0,E._)`${i} === "string" || ${i} === "number"
              || ${i} === "boolean" || ${n} === null`).assign(o,(0,E._)`[${n}]`)}}}function _c({gen:e,parentData:t,parentDataProperty:r},s){e.if((0,E._)`${t} !== undefined`,()=>e.assign((0,E._)`${t}[${r}]`,s))}function ns(e,t,r,s=Ge.Correct){let n=s===Ge.Correct?E.operators.EQ:E.operators.NEQ,a;switch(e){case"null":return(0,E._)`${t} ${n} null`;case"array":a=(0,E._)`Array.isArray(${t})`;break;case"object":a=(0,E._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=i((0,E._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=i();break;default:return(0,E._)`typeof ${t} ${n} ${e}`}return s===Ge.Correct?a:(0,E.not)(a);function i(o=E.nil){return(0,E.and)((0,E._)`typeof ${t} == "number"`,o,r?(0,E._)`isFinite(${t})`:E.nil)}}F.checkDataType=ns;function as(e,t,r,s){if(e.length===1)return ns(e[0],t,r,s);let n,a=(0,wa.toHash)(e);if(a.array&&a.object){let i=(0,E._)`typeof ${t} != "object"`;n=a.null?i:(0,E._)`!${t} || ${i}`,delete a.null,delete a.array,delete a.object}else n=E.nil;a.number&&delete a.integer;for(let i in a)n=(0,E.and)(n,ns(i,t,r,s));return n}F.checkDataTypes=as;var gc={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,E._)`{type: ${e}}`:(0,E._)`{type: ${t}}`};function is(e){let t=$c(e);(0,fc.reportError)(t,gc)}F.reportTypeError=is;function $c(e){let{gen:t,data:r,schema:s}=e,n=(0,wa.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:e}}});var Pa=y(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.assignDefaults=void 0;var He=b(),vc=q();function wc(e,t){let{properties:r,items:s}=e.schema;if(t==="object"&&r)for(let n in r)Sa(e,n,r[n].default);else t==="array"&&Array.isArray(s)&&s.forEach((n,a)=>Sa(e,a,n.default))}Wt.assignDefaults=wc;function Sa(e,t,r){let{gen:s,compositeRule:n,data:a,opts:i}=e;if(r===void 0)return;let o=(0,He._)`${a}${(0,He.getProperty)(t)}`;if(n){(0,vc.checkStrictMode)(e,`default is ignored for: ${o}`);return}let u=(0,He._)`${o} === undefined`;i.useDefaults==="empty"&&(u=(0,He._)`${u} || ${o} === null || ${o} === ""`),s.if(u,(0,He._)`${o} = ${(0,He.stringify)(r)}`)}});var Z=y(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.validateUnion=R.validateArray=R.usePattern=R.callValidateCode=R.schemaProperties=R.allSchemaProperties=R.noPropertyInData=R.propertyInData=R.isOwnProperty=R.hasPropFunc=R.reportMissingProp=R.checkMissingProp=R.checkReportMissingProp=void 0;var C=b(),os=q(),Se=ge(),bc=q();function Ec(e,t){let{gen:r,data:s,it:n}=e;r.if(cs(r,s,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,C._)`${t}`},!0),e.error()})}R.checkReportMissingProp=Ec;function Sc({gen:e,data:t,it:{opts:r}},s,n){return(0,C.or)(...s.map(a=>(0,C.and)(cs(e,t,a,r.ownProperties),(0,C._)`${n} = ${a}`)))}R.checkMissingProp=Sc;function Pc(e,t){e.setParams({missingProperty:t},!0),e.error()}R.reportMissingProp=Pc;function Ta(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,C._)`Object.prototype.hasOwnProperty`})}R.hasPropFunc=Ta;function us(e,t,r){return(0,C._)`${Ta(e)}.call(${t}, ${r})`}R.isOwnProperty=us;function Tc(e,t,r,s){let n=(0,C._)`${t}${(0,C.getProperty)(r)} !== undefined`;return s?(0,C._)`${n} && ${us(e,t,r)}`:n}R.propertyInData=Tc;function cs(e,t,r,s){let n=(0,C._)`${t}${(0,C.getProperty)(r)} === undefined`;return s?(0,C.or)(n,(0,C.not)(us(e,t,r))):n}R.noPropertyInData=cs;function Ia(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}R.allSchemaProperties=Ia;function Ic(e,t){return Ia(t).filter(r=>!(0,os.alwaysValidSchema)(e,t[r]))}R.schemaProperties=Ic;function Nc({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:a},it:i},o,u,d){let c=d?(0,C._)`${e}, ${t}, ${s}${n}`:t,l=[[Se.default.instancePath,(0,C.strConcat)(Se.default.instancePath,a)],[Se.default.parentData,i.parentData],[Se.default.parentDataProperty,i.parentDataProperty],[Se.default.rootData,Se.default.rootData]];i.opts.dynamicRef&&l.push([Se.default.dynamicAnchors,Se.default.dynamicAnchors]);let h=(0,C._)`${c}, ${r.object(...l)}`;return u!==C.nil?(0,C._)`${o}.call(${u}, ${h})`:(0,C._)`${o}(${h})`}R.callValidateCode=Nc;var Oc=(0,C._)`new RegExp`;function kc({gen:e,it:{opts:t}},r){let s=t.unicodeRegExp?"u":"",{regExp:n}=t.code,a=n(r,s);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,C._)`${n.code==="new RegExp"?Oc:(0,bc.useFunc)(e,n)}(${r}, ${s})`})}R.usePattern=kc;function qc(e){let{gen:t,data:r,keyword:s,it:n}=e,a=t.name("valid");if(n.allErrors){let o=t.let("valid",!0);return i(()=>t.assign(o,!1)),o}return t.var(a,!0),i(()=>t.break()),a;function i(o){let u=t.const("len",(0,C._)`${r}.length`);t.forRange("i",0,u,d=>{e.subschema({keyword:s,dataProp:d,dataPropType:os.Type.Num},a),t.if((0,C.not)(a),o)})}}R.validateArray=qc;function Rc(e){let{gen:t,schema:r,keyword:s,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,os.alwaysValidSchema)(n,u))&&!n.opts.unevaluated)return;let i=t.let("valid",!1),o=t.name("_valid");t.block(()=>r.forEach((u,d)=>{let c=e.subschema({keyword:s,schemaProp:d,compositeRule:!0},o);t.assign(i,(0,C._)`${i} || ${o}`),e.mergeValidEvaluated(c,o)||t.if((0,C.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}R.validateUnion=Rc});var ka=y(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.validateKeywordUsage=oe.validSchemaType=oe.funcKeywordCode=oe.macroKeywordCode=void 0;var G=b(),Me=ge(),jc=Z(),Ac=yt();function Cc(e,t){let{gen:r,keyword:s,schema:n,parentSchema:a,it:i}=e,o=t.macro.call(i.self,n,a,i),u=Oa(r,s,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let d=r.name("valid");e.subschema({schema:o,schemaPath:G.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}oe.macroKeywordCode=Cc;function Mc(e,t){var r;let{gen:s,keyword:n,schema:a,parentSchema:i,$data:o,it:u}=e;zc(u,t);let d=!o&&t.compile?t.compile.call(u.self,a,i,u):t.validate,c=Oa(s,n,d),l=s.let("valid");e.block$data(l,h),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function h(){if(t.errors===!1)m(),t.modifying&&Na(e),_(()=>e.error());else{let g=t.async?p():f();t.modifying&&Na(e),_(()=>Dc(e,g))}}function p(){let g=s.let("ruleErrs",null);return s.try(()=>m((0,G._)`await `),N=>s.assign(l,!1).if((0,G._)`${N} instanceof ${u.ValidationError}`,()=>s.assign(g,(0,G._)`${N}.errors`),()=>s.throw(N))),g}function f(){let g=(0,G._)`${c}.errors`;return s.assign(g,null),m(G.nil),g}function m(g=t.async?(0,G._)`await `:G.nil){let N=u.opts.passContext?Me.default.this:Me.default.self,T=!("compile"in t&&!o||t.schema===!1);s.assign(l,(0,G._)`${g}${(0,jc.callValidateCode)(e,c,N,T)}`,t.modifying)}function _(g){var N;s.if((0,G.not)((N=t.valid)!==null&&N!==void 0?N:l),g)}}oe.funcKeywordCode=Mc;function Na(e){let{gen:t,data:r,it:s}=e;t.if(s.parentData,()=>t.assign(r,(0,G._)`${s.parentData}[${s.parentDataProperty}]`))}function Dc(e,t){let{gen:r}=e;r.if((0,G._)`Array.isArray(${t})`,()=>{r.assign(Me.default.vErrors,(0,G._)`${Me.default.vErrors} === null ? ${t} : ${Me.default.vErrors}.concat(${t})`).assign(Me.default.errors,(0,G._)`${Me.default.vErrors}.length`),(0,Ac.extendErrors)(e)},()=>e.error())}function zc({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Oa(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,G.stringify)(r)})}function Vc(e,t,r=!1){return!t.length||t.some(s=>s==="array"?Array.isArray(e):s==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==s||r&&typeof e>"u")}oe.validSchemaType=Vc;function xc({schema:e,opts:t,self:r,errSchemaPath:s},n,a){if(Array.isArray(n.keyword)?!n.keyword.includes(a):n.keyword!==a)throw new Error("ajv implementation error");let i=n.dependencies;if(i?.some(o=>!Object.prototype.hasOwnProperty.call(e,o)))throw new Error(`parent schema must have dependencies of ${a}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[a])){let u=`keyword "${a}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}oe.validateKeywordUsage=xc});var Ra=y(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.extendSubschemaMode=Pe.extendSubschemaData=Pe.getSubschema=void 0;var ue=b(),qa=q();function Lc(e,{keyword:t,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:a,topSchemaRef:i}){if(t!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let o=e.schema[t];return r===void 0?{schema:o,schemaPath:(0,ue._)`${e.schemaPath}${(0,ue.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:(0,ue._)`${e.schemaPath}${(0,ue.getProperty)(t)}${(0,ue.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,qa.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||a===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Pe.getSubschema=Lc;function Uc(e,t,{dataProp:r,dataPropType:s,data:n,dataTypes:a,propertyName:i}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=t;if(r!==void 0){let{errorPath:d,dataPathArr:c,opts:l}=t,h=o.let("data",(0,ue._)`${t.data}${(0,ue.getProperty)(r)}`,!0);u(h),e.errorPath=(0,ue.str)`${d}${(0,qa.getErrorPath)(r,s,l.jsPropertySyntax)}`,e.parentDataProperty=(0,ue._)`${r}`,e.dataPathArr=[...c,e.parentDataProperty]}if(n!==void 0){let d=n instanceof ue.Name?n:o.let("data",n,!0);u(d),i!==void 0&&(e.propertyName=i)}a&&(e.dataTypes=a);function u(d){e.data=d,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,d]}}Pe.extendSubschemaData=Uc;function Fc(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:a}){s!==void 0&&(e.compositeRule=s),n!==void 0&&(e.createErrors=n),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=r}Pe.extendSubschemaMode=Fc});var ds=y((yh,ja)=>{"use strict";ja.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var s,n,a;if(Array.isArray(t)){if(s=t.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(a=Object.keys(t),s=a.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=s;n--!==0;){var i=a[n];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}});var Ca=y((_h,Aa)=>{"use strict";var Te=Aa.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Zt(t,s,n,e,"",e)};Te.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Te.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Te.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Te.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 Zt(e,t,r,s,n,a,i,o,u,d){if(s&&typeof s=="object"&&!Array.isArray(s)){t(s,n,a,i,o,u,d);for(var c in s){var l=s[c];if(Array.isArray(l)){if(c in Te.arrayKeywords)for(var h=0;h<l.length;h++)Zt(e,t,r,l[h],n+"/"+c+"/"+h,a,n,c,s,h)}else if(c in Te.propsKeywords){if(l&&typeof l=="object")for(var p in l)Zt(e,t,r,l[p],n+"/"+c+"/"+Kc(p),a,n,c,s,p)}else(c in Te.keywords||e.allKeys&&!(c in Te.skipKeywords))&&Zt(e,t,r,l,n+"/"+c,a,n,c,s)}r(s,n,a,i,o,u,d)}}function Kc(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var gt=y(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.getSchemaRefs=B.resolveUrl=B.normalizeId=B._getFullPath=B.getFullPath=B.inlineRef=void 0;var Gc=q(),Hc=ds(),Yc=Ca(),Bc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Jc(e,t=!0){return typeof e=="boolean"?!0:t===!0?!ls(e):t?Ma(e)<=t:!1}B.inlineRef=Jc;var Wc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ls(e){for(let t in e){if(Wc.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(ls)||typeof r=="object"&&ls(r))return!0}return!1}function Ma(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!Bc.has(r)&&(typeof e[r]=="object"&&(0,Gc.eachItem)(e[r],s=>t+=Ma(s)),t===1/0))return 1/0}return t}function Da(e,t="",r){r!==!1&&(t=Ye(t));let s=e.parse(t);return za(e,s)}B.getFullPath=Da;function za(e,t){return e.serialize(t).split("#")[0]+"#"}B._getFullPath=za;var Zc=/#\/?$/;function Ye(e){return e?e.replace(Zc,""):""}B.normalizeId=Ye;function Xc(e,t,r){return r=Ye(r),e.resolve(t,r)}B.resolveUrl=Xc;var Qc=/^[a-z_][-a-z0-9._]*$/i;function ed(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:s}=this.opts,n=Ye(e[r]||t),a={"":n},i=Da(s,n,!1),o={},u=new Set;return Yc(e,{allKeys:!0},(l,h,p,f)=>{if(f===void 0)return;let m=i+h,_=a[f];typeof l[r]=="string"&&(_=g.call(this,l[r])),N.call(this,l.$anchor),N.call(this,l.$dynamicAnchor),a[h]=_;function g(T){let A=this.opts.uriResolver.resolve;if(T=Ye(_?A(_,T):T),u.has(T))throw c(T);u.add(T);let w=this.refs[T];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?d(l,w.schema,T):T!==Ye(m)&&(T[0]==="#"?(d(l,o[T],T),o[T]=l):this.refs[T]=m),T}function N(T){if(typeof T=="string"){if(!Qc.test(T))throw new Error(`invalid anchor "${T}"`);g.call(this,`#${T}`)}}}),o;function d(l,h,p){if(h!==void 0&&!Hc(l,h))throw c(p)}function c(l){return new Error(`reference "${l}" resolves to more than one schema`)}}B.getSchemaRefs=ed});var wt=y(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.getData=Ie.KeywordCxt=Ie.validateFunctionCode=void 0;var Fa=ga(),Va=_t(),ms=ss(),Xt=_t(),td=Pa(),vt=ka(),fs=Ra(),$=b(),v=ge(),rd=gt(),$e=q(),$t=yt();function sd(e){if(Ha(e)&&(Ya(e),Ga(e))){id(e);return}Ka(e,()=>(0,Fa.topBoolOrEmptySchema)(e))}Ie.validateFunctionCode=sd;function Ka({gen:e,validateName:t,schema:r,schemaEnv:s,opts:n},a){n.code.es5?e.func(t,(0,$._)`${v.default.data}, ${v.default.valCxt}`,s.$async,()=>{e.code((0,$._)`"use strict"; ${xa(r,n)}`),ad(e,n),e.code(a)}):e.func(t,(0,$._)`${v.default.data}, ${nd(n)}`,s.$async,()=>e.code(xa(r,n)).code(a))}function nd(e){return(0,$._)`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${e.dynamicRef?(0,$._)`, ${v.default.dynamicAnchors}={}`:$.nil}}={}`}function ad(e,t){e.if(v.default.valCxt,()=>{e.var(v.default.instancePath,(0,$._)`${v.default.valCxt}.${v.default.instancePath}`),e.var(v.default.parentData,(0,$._)`${v.default.valCxt}.${v.default.parentData}`),e.var(v.default.parentDataProperty,(0,$._)`${v.default.valCxt}.${v.default.parentDataProperty}`),e.var(v.default.rootData,(0,$._)`${v.default.valCxt}.${v.default.rootData}`),t.dynamicRef&&e.var(v.default.dynamicAnchors,(0,$._)`${v.default.valCxt}.${v.default.dynamicAnchors}`)},()=>{e.var(v.default.instancePath,(0,$._)`""`),e.var(v.default.parentData,(0,$._)`undefined`),e.var(v.default.parentDataProperty,(0,$._)`undefined`),e.var(v.default.rootData,v.default.data),t.dynamicRef&&e.var(v.default.dynamicAnchors,(0,$._)`{}`)})}function id(e){let{schema:t,opts:r,gen:s}=e;Ka(e,()=>{r.$comment&&t.$comment&&Ja(e),ld(e),s.let(v.default.vErrors,null),s.let(v.default.errors,0),r.unevaluated&&od(e),Ba(e),pd(e)})}function od(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,$._)`${r}.evaluated`),t.if((0,$._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,$._)`${e.evaluated}.props`,(0,$._)`undefined`)),t.if((0,$._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,$._)`${e.evaluated}.items`,(0,$._)`undefined`))}function xa(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,$._)`/*# sourceURL=${r} */`:$.nil}function ud(e,t){if(Ha(e)&&(Ya(e),Ga(e))){cd(e,t);return}(0,Fa.boolOrEmptySchema)(e,t)}function Ga({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Ha(e){return typeof e.schema!="boolean"}function cd(e,t){let{schema:r,gen:s,opts:n}=e;n.$comment&&r.$comment&&Ja(e),fd(e),md(e);let a=s.const("_errs",v.default.errors);Ba(e,a),s.var(t,(0,$._)`${a} === ${v.default.errors}`)}function Ya(e){(0,$e.checkUnknownRules)(e),dd(e)}function Ba(e,t){if(e.opts.jtd)return La(e,[],!1,t);let r=(0,Va.getSchemaTypes)(e.schema),s=(0,Va.coerceAndCheckDataType)(e,r);La(e,r,!s,t)}function dd(e){let{schema:t,errSchemaPath:r,opts:s,self:n}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0,$e.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function ld(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,$e.checkStrictMode)(e,"default is ignored in the schema root")}function fd(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,rd.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function md(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Ja({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:n}){let a=r.$comment;if(n.$comment===!0)e.code((0,$._)`${v.default.self}.logger.log(${a})`);else if(typeof n.$comment=="function"){let i=(0,$.str)`${s}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code((0,$._)`${v.default.self}.opts.$comment(${a}, ${i}, ${o}.schema)`)}}function pd(e){let{gen:t,schemaEnv:r,validateName:s,ValidationError:n,opts:a}=e;r.$async?t.if((0,$._)`${v.default.errors} === 0`,()=>t.return(v.default.data),()=>t.throw((0,$._)`new ${n}(${v.default.vErrors})`)):(t.assign((0,$._)`${s}.errors`,v.default.vErrors),a.unevaluated&&hd(e),t.return((0,$._)`${v.default.errors} === 0`))}function hd({gen:e,evaluated:t,props:r,items:s}){r instanceof $.Name&&e.assign((0,$._)`${t}.props`,r),s instanceof $.Name&&e.assign((0,$._)`${t}.items`,s)}function La(e,t,r,s){let{gen:n,schema:a,data:i,allErrors:o,opts:u,self:d}=e,{RULES:c}=d;if(a.$ref&&(u.ignoreKeywordsWithRef||!(0,$e.schemaHasRulesButRef)(a,c))){n.block(()=>Za(e,"$ref",c.all.$ref.definition));return}u.jtd||yd(e,t),n.block(()=>{for(let h of c.rules)l(h);l(c.post)});function l(h){(0,ms.shouldUseGroup)(a,h)&&(h.type?(n.if((0,Xt.checkDataType)(h.type,i,u.strictNumbers)),Ua(e,h),t.length===1&&t[0]===h.type&&r&&(n.else(),(0,Xt.reportTypeError)(e)),n.endIf()):Ua(e,h),o||n.if((0,$._)`${v.default.errors} === ${s||0}`))}}function Ua(e,t){let{gen:r,schema:s,opts:{useDefaults:n}}=e;n&&(0,td.assignDefaults)(e,t.type),r.block(()=>{for(let a of t.rules)(0,ms.shouldUseRule)(s,a)&&Za(e,a.keyword,a.definition,t.type)})}function yd(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(_d(e,t),e.opts.allowUnionTypes||gd(e,t),$d(e,e.dataTypes))}function _d(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Wa(e.dataTypes,r)||ps(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),wd(e,t)}}function gd(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ps(e,"use allowUnionTypes to allow union type keyword")}function $d(e,t){let r=e.self.RULES.all;for(let s in r){let n=r[s];if(typeof n=="object"&&(0,ms.shouldUseRule)(e.schema,n)){let{type:a}=n.definition;a.length&&!a.some(i=>vd(t,i))&&ps(e,`missing type "${a.join(",")}" for keyword "${s}"`)}}}function vd(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Wa(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function wd(e,t){let r=[];for(let s of e.dataTypes)Wa(t,s)?r.push(s):t.includes("integer")&&s==="number"&&r.push("integer");e.dataTypes=r}function ps(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,$e.checkStrictMode)(e,t,e.opts.strictTypes)}var Qt=class{constructor(t,r,s){if((0,vt.validateKeywordUsage)(t,r,s),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=s,this.data=t.data,this.schema=t.schema[s],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$e.schemaRefOrVal)(t,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Xa(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,vt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",v.default.errors))}result(t,r,s){this.failResult((0,$.not)(t),r,s)}failResult(t,r,s){this.gen.if(t),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,$.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,$._)`${r} !== undefined && (${(0,$.or)(this.invalid$data(),t)})`)}error(t,r,s){if(r){this.setParams(r),this._error(t,s),this.setParams({});return}this._error(t,s)}_error(t,r){(t?$t.reportExtraError:$t.reportError)(this,this.def.error,r)}$dataError(){(0,$t.reportError)(this,this.def.$dataError||$t.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$t.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,s=$.nil){this.gen.block(()=>{this.check$data(t,s),r()})}check$data(t=$.nil,r=$.nil){if(!this.$data)return;let{gen:s,schemaCode:n,schemaType:a,def:i}=this;s.if((0,$.or)((0,$._)`${n} === undefined`,r)),t!==$.nil&&s.assign(t,!0),(a.length||i.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),t!==$.nil&&s.assign(t,!1)),s.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:s,def:n,it:a}=this;return(0,$.or)(i(),o());function i(){if(s.length){if(!(r instanceof $.Name))throw new Error("ajv implementation error");let u=Array.isArray(s)?s:[s];return(0,$._)`${(0,Xt.checkDataTypes)(u,r,a.opts.strictNumbers,Xt.DataType.Wrong)}`}return $.nil}function o(){if(n.validateSchema){let u=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,$._)`!${u}(${r})`}return $.nil}}subschema(t,r){let s=(0,fs.getSubschema)(this.it,t);(0,fs.extendSubschemaData)(s,this.it,t),(0,fs.extendSubschemaMode)(s,t);let n={...this.it,...s,items:void 0,props:void 0};return ud(n,r),n}mergeEvaluated(t,r){let{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&t.props!==void 0&&(s.props=$e.mergeEvaluated.props(n,t.props,s.props,r)),s.items!==!0&&t.items!==void 0&&(s.items=$e.mergeEvaluated.items(n,t.items,s.items,r)))}mergeValidEvaluated(t,r){let{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,$.Name)),!0}};Ie.KeywordCxt=Qt;function Za(e,t,r,s){let n=new Qt(e,r,t);"code"in r?r.code(n,s):n.$data&&r.validate?(0,vt.funcKeywordCode)(n,r):"macro"in r?(0,vt.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,vt.funcKeywordCode)(n,r)}var bd=/^\/(?:[^~]|~0|~1)*$/,Ed=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Xa(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let n,a;if(e==="")return v.default.rootData;if(e[0]==="/"){if(!bd.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,a=v.default.rootData}else{let d=Ed.exec(e);if(!d)throw new Error(`Invalid JSON-pointer: ${e}`);let c=+d[1];if(n=d[2],n==="#"){if(c>=t)throw new Error(u("property/index",c));return s[t-c]}if(c>t)throw new Error(u("data",c));if(a=r[t-c],!n)return a}let i=a,o=n.split("/");for(let d of o)d&&(a=(0,$._)`${a}${(0,$.getProperty)((0,$e.unescapeJsonPointer)(d))}`,i=(0,$._)`${i} && ${a}`);return i;function u(d,c){return`Cannot access ${d} ${c} levels up, current level is ${t}`}}Ie.getData=Xa});var er=y(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});var hs=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};ys.default=hs});var bt=y($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var _s=gt(),gs=class extends Error{constructor(t,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,_s.resolveUrl)(t,r,s),this.missingSchema=(0,_s.normalizeId)((0,_s.getFullPath)(t,this.missingRef))}};$s.default=gs});var rr=y(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.resolveSchema=X.getCompilingSchema=X.resolveRef=X.compileSchema=X.SchemaEnv=void 0;var re=b(),Sd=er(),De=ge(),se=gt(),Qa=q(),Pd=wt(),Be=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let s;typeof t.schema=="object"&&(s=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,se.normalizeId)(s?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=s?.$async,this.refs={}}};X.SchemaEnv=Be;function ws(e){let t=ei.call(this,e);if(t)return t;let r=(0,se.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:a}=this.opts,i=new re.CodeGen(this.scope,{es5:s,lines:n,ownProperties:a}),o;e.$async&&(o=i.scopeValue("Error",{ref:Sd.default,code:(0,re._)`require("ajv/dist/runtime/validation_error").default`}));let u=i.scopeName("validate");e.validateName=u;let d={gen:i,allErrors:this.opts.allErrors,data:De.default.data,parentData:De.default.parentData,parentDataProperty:De.default.parentDataProperty,dataNames:[De.default.data],dataPathArr:[re.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,re.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:o,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:re.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,re._)`""`,opts:this.opts,self:this},c;try{this._compilations.add(e),(0,Pd.validateFunctionCode)(d),i.optimize(this.opts.code.optimize);let l=i.toString();c=`${i.scopeRefs(De.default.scope)}return ${l}`,this.opts.code.process&&(c=this.opts.code.process(c,e));let p=new Function(`${De.default.self}`,`${De.default.scope}`,c)(this,this.scope.get());if(this.scope.value(u,{ref:p}),p.errors=null,p.schema=e.schema,p.schemaEnv=e,e.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:u,validateCode:l,scopeValues:i._values}),this.opts.unevaluated){let{props:f,items:m}=d;p.evaluated={props:f instanceof re.Name?void 0:f,items:m instanceof re.Name?void 0:m,dynamicProps:f instanceof re.Name,dynamicItems:m instanceof re.Name},p.source&&(p.source.evaluated=(0,re.stringify)(p.evaluated))}return e.validate=p,e}catch(l){throw delete e.validate,delete e.validateName,c&&this.logger.error("Error compiling schema, function code:",c),l}finally{this._compilations.delete(e)}}X.compileSchema=ws;function Td(e,t,r){var s;r=(0,se.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let a=Od.call(this,e,r);if(a===void 0){let i=(s=e.localRefs)===null||s===void 0?void 0:s[r],{schemaId:o}=this.opts;i&&(a=new Be({schema:i,schemaId:o,root:e,baseId:t}))}if(a!==void 0)return e.refs[r]=Id.call(this,a)}X.resolveRef=Td;function Id(e){return(0,se.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:ws.call(this,e)}function ei(e){for(let t of this._compilations)if(Nd(t,e))return t}X.getCompilingSchema=ei;function Nd(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Od(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||tr.call(this,e,t)}function tr(e,t){let r=this.opts.uriResolver.parse(t),s=(0,se._getFullPath)(this.opts.uriResolver,r),n=(0,se.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&s===n)return vs.call(this,r,e);let a=(0,se.normalizeId)(s),i=this.refs[a]||this.schemas[a];if(typeof i=="string"){let o=tr.call(this,e,i);return typeof o?.schema!="object"?void 0:vs.call(this,r,o)}if(typeof i?.schema=="object"){if(i.validate||ws.call(this,i),a===(0,se.normalizeId)(t)){let{schema:o}=i,{schemaId:u}=this.opts,d=o[u];return d&&(n=(0,se.resolveUrl)(this.opts.uriResolver,n,d)),new Be({schema:o,schemaId:u,root:e,baseId:n})}return vs.call(this,r,i)}}X.resolveSchema=tr;var kd=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function vs(e,{baseId:t,schema:r,root:s}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let o of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let u=r[(0,Qa.unescapeFragment)(o)];if(u===void 0)return;r=u;let d=typeof r=="object"&&r[this.opts.schemaId];!kd.has(o)&&d&&(t=(0,se.resolveUrl)(this.opts.uriResolver,t,d))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,Qa.schemaHasRulesButRef)(r,this.RULES)){let o=(0,se.resolveUrl)(this.opts.uriResolver,t,r.$ref);a=tr.call(this,s,o)}let{schemaId:i}=this.opts;if(a=a||new Be({schema:r,schemaId:i,root:s,baseId:t}),a.schema!==a.root.schema)return a}});var ti=y((Eh,qd)=>{qd.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var si=y((Sh,ri)=>{"use strict";var Rd={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ri.exports={HEX:Rd}});var li=y((Ph,di)=>{"use strict";var{HEX:jd}=si();function oi(e){if(ci(e,".")<3)return{host:e,isIPV4:!1};let t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=t;return r?{host:Cd(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function bs(e,t=!1){let r="",s=!0;for(let n of e){if(jd[n]===void 0)return;n!=="0"&&s===!0&&(s=!1),s||(r+=n)}return t&&r.length===0&&(r="0"),r}function Ad(e){let t=0,r={error:!1,address:"",zone:""},s=[],n=[],a=!1,i=!1,o=!1;function u(){if(n.length){if(a===!1){let d=bs(n);if(d!==void 0)s.push(d);else return r.error=!0,!1}n.length=0}return!0}for(let d=0;d<e.length;d++){let c=e[d];if(!(c==="["||c==="]"))if(c===":"){if(i===!0&&(o=!0),!u())break;if(t++,s.push(":"),t>7){r.error=!0;break}d-1>=0&&e[d-1]===":"&&(i=!0);continue}else if(c==="%"){if(!u())break;a=!0}else{n.push(c);continue}}return n.length&&(a?r.zone=n.join(""):o?s.push(n.join("")):s.push(bs(n))),r.address=s.join(""),r}function ui(e,t={}){if(ci(e,":")<2)return{host:e,isIPV6:!1};let r=Ad(e);if(r.error)return{host:e,isIPV6:!1};{let s=r.address,n=r.address;return r.zone&&(s+="%"+r.zone,n+="%25"+r.zone),{host:s,escapedHost:n,isIPV6:!0}}}function Cd(e,t){let r="",s=!0,n=e.length;for(let a=0;a<n;a++){let i=e[a];i==="0"&&s?(a+1<=n&&e[a+1]===t||a+1===n)&&(r+=i,s=!1):(i===t?s=!0:s=!1,r+=i)}return r}function ci(e,t){let r=0;for(let s=0;s<e.length;s++)e[s]===t&&r++;return r}var ni=/^\.\.?\//u,ai=/^\/\.(?:\/|$)/u,ii=/^\/\.\.(?:\/|$)/u,Md=/^\/?(?:.|\n)*?(?=\/|$)/u;function Dd(e){let t=[];for(;e.length;)if(e.match(ni))e=e.replace(ni,"");else if(e.match(ai))e=e.replace(ai,"/");else if(e.match(ii))e=e.replace(ii,"/"),t.pop();else if(e==="."||e==="..")e="";else{let r=e.match(Md);if(r){let s=r[0];e=e.slice(s.length),t.push(s)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function zd(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function Vd(e,t){let r=[];if(e.userinfo!==void 0&&(r.push(e.userinfo),r.push("@")),e.host!==void 0){let s=unescape(e.host),n=oi(s);if(n.isIPV4)s=n.host;else{let a=ui(n.host,{isIPV4:!1});a.isIPV6===!0?s=`[${a.escapedHost}]`:s=e.host}r.push(s)}return(typeof e.port=="number"||typeof e.port=="string")&&(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}di.exports={recomposeAuthority:Vd,normalizeComponentEncoding:zd,removeDotSegments:Dd,normalizeIPv4:oi,normalizeIPv6:ui,stringArrayToHexStripped:bs}});var _i=y((Th,yi)=>{"use strict";var xd=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,Ld=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function fi(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function mi(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function pi(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function Ud(e){return e.secure=fi(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Fd(e){if((e.port===(fi(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function Kd(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(Ld);if(r){let s=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${s}:${t.nid||e.nid}`,a=Es[n];e.path=void 0,a&&(e=a.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function Gd(e,t){let r=t.scheme||e.scheme||"urn",s=e.nid.toLowerCase(),n=`${r}:${t.nid||s}`,a=Es[n];a&&(e=a.serialize(e,t));let i=e,o=e.nss;return i.path=`${s||t.nid}:${o}`,t.skipEscape=!0,i}function Hd(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!xd.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function Yd(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var hi={scheme:"http",domainHost:!0,parse:mi,serialize:pi},Bd={scheme:"https",domainHost:hi.domainHost,parse:mi,serialize:pi},sr={scheme:"ws",domainHost:!0,parse:Ud,serialize:Fd},Jd={scheme:"wss",domainHost:sr.domainHost,parse:sr.parse,serialize:sr.serialize},Wd={scheme:"urn",parse:Kd,serialize:Gd,skipNormalize:!0},Zd={scheme:"urn:uuid",parse:Hd,serialize:Yd,skipNormalize:!0},Es={http:hi,https:Bd,ws:sr,wss:Jd,urn:Wd,"urn:uuid":Zd};yi.exports=Es});var $i=y((Ih,ar)=>{"use strict";var{normalizeIPv6:Xd,normalizeIPv4:Qd,removeDotSegments:Et,recomposeAuthority:el,normalizeComponentEncoding:nr}=li(),Ss=_i();function tl(e,t){return typeof e=="string"?e=ce(ve(e,t),t):typeof e=="object"&&(e=ve(ce(e,t),t)),e}function rl(e,t,r){let s=Object.assign({scheme:"null"},r),n=gi(ve(e,s),ve(t,s),s,!0);return ce(n,{...s,skipEscape:!0})}function gi(e,t,r,s){let n={};return s||(e=ve(ce(e,r),r),t=ve(ce(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=Et(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=Et(t.path||""),n.query=t.query):(t.path?(t.path.charAt(0)==="/"?n.path=Et(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=Et(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function sl(e,t,r){return typeof e=="string"?(e=unescape(e),e=ce(nr(ve(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=ce(nr(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=ce(nr(ve(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=ce(nr(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function ce(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},s=Object.assign({},t),n=[],a=Ss[(s.scheme||r.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(r,s),r.path!==void 0&&(s.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),s.reference!=="suffix"&&r.scheme&&(n.push(r.scheme),n.push(":"));let i=el(r,s);if(i!==void 0&&(s.reference!=="suffix"&&n.push("//"),n.push(i),r.path&&r.path.charAt(0)!=="/"&&n.push("/")),r.path!==void 0){let o=r.path;!s.absolutePath&&(!a||!a.absolutePath)&&(o=Et(o)),i===void 0&&(o=o.replace(/^\/\//u,"/%2F")),n.push(o)}return r.query!==void 0&&(n.push("?"),n.push(r.query)),r.fragment!==void 0&&(n.push("#"),n.push(r.fragment)),n.join("")}var nl=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function al(e){let t=0;for(let r=0,s=e.length;r<s;++r)if(t=e.charCodeAt(r),t>126||nl[t])return!0;return!1}var il=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function ve(e,t){let r=Object.assign({},t),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=e.indexOf("%")!==-1,a=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);let i=e.match(il);if(i){if(s.scheme=i[1],s.userinfo=i[3],s.host=i[4],s.port=parseInt(i[5],10),s.path=i[6]||"",s.query=i[7],s.fragment=i[8],isNaN(s.port)&&(s.port=i[5]),s.host){let u=Qd(s.host);if(u.isIPV4===!1){let d=Xd(u.host,{isIPV4:!1});s.host=d.host.toLowerCase(),a=d.isIPV6}else s.host=u.host,a=!0}s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&!s.path&&s.query===void 0?s.reference="same-document":s.scheme===void 0?s.reference="relative":s.fragment===void 0?s.reference="absolute":s.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==s.reference&&(s.error=s.error||"URI is not a "+r.reference+" reference.");let o=Ss[(r.scheme||s.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&s.host&&(r.domainHost||o&&o.domainHost)&&a===!1&&al(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase())}catch(u){s.error=s.error||"Host's domain name can not be converted to ASCII: "+u}(!o||o&&!o.skipNormalize)&&(n&&s.scheme!==void 0&&(s.scheme=unescape(s.scheme)),n&&s.userinfo!==void 0&&(s.userinfo=unescape(s.userinfo)),n&&s.host!==void 0&&(s.host=unescape(s.host)),s.path!==void 0&&s.path.length&&(s.path=escape(unescape(s.path))),s.fragment!==void 0&&s.fragment.length&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),o&&o.parse&&o.parse(s,r)}else s.error=s.error||"URI can not be parsed.";return s}var Ps={SCHEMES:Ss,normalize:tl,resolve:rl,resolveComponents:gi,equal:sl,serialize:ce,parse:ve};ar.exports=Ps;ar.exports.default=Ps;ar.exports.fastUri=Ps});var wi=y(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});var vi=$i();vi.code='require("ajv/dist/runtime/uri").default';Ts.default=vi});var We=y(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.CodeGen=V.Name=V.nil=V.stringify=V.str=V._=V.KeywordCxt=void 0;var ol=wt();Object.defineProperty(V,"KeywordCxt",{enumerable:!0,get:function(){return ol.KeywordCxt}});var Je=b();Object.defineProperty(V,"_",{enumerable:!0,get:function(){return Je._}});Object.defineProperty(V,"str",{enumerable:!0,get:function(){return Je.str}});Object.defineProperty(V,"stringify",{enumerable:!0,get:function(){return Je.stringify}});Object.defineProperty(V,"nil",{enumerable:!0,get:function(){return Je.nil}});Object.defineProperty(V,"Name",{enumerable:!0,get:function(){return Je.Name}});Object.defineProperty(V,"CodeGen",{enumerable:!0,get:function(){return Je.CodeGen}});var ul=er(),Ti=bt(),cl=rs(),St=rr(),dl=b(),Pt=gt(),ir=_t(),Ns=q(),bi=ti(),ll=wi(),Ii=(e,t)=>new RegExp(e,t);Ii.code="new RegExp";var fl=["removeAdditional","useDefaults","coerceTypes"],ml=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),pl={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."},hl={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ei=200;function yl(e){var t,r,s,n,a,i,o,u,d,c,l,h,p,f,m,_,g,N,T,A,w,ie,pe,Tr,Ir;let it=e.strict,Nr=(t=e.code)===null||t===void 0?void 0:t.optimize,Yn=Nr===!0||Nr===void 0?1:Nr||0,Bn=(s=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:Ii,Zo=(n=e.uriResolver)!==null&&n!==void 0?n:ll.default;return{strictSchema:(i=(a=e.strictSchema)!==null&&a!==void 0?a:it)!==null&&i!==void 0?i:!0,strictNumbers:(u=(o=e.strictNumbers)!==null&&o!==void 0?o:it)!==null&&u!==void 0?u:!0,strictTypes:(c=(d=e.strictTypes)!==null&&d!==void 0?d:it)!==null&&c!==void 0?c:"log",strictTuples:(h=(l=e.strictTuples)!==null&&l!==void 0?l:it)!==null&&h!==void 0?h:"log",strictRequired:(f=(p=e.strictRequired)!==null&&p!==void 0?p:it)!==null&&f!==void 0?f:!1,code:e.code?{...e.code,optimize:Yn,regExp:Bn}:{optimize:Yn,regExp:Bn},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:Ei,loopEnum:(_=e.loopEnum)!==null&&_!==void 0?_:Ei,meta:(g=e.meta)!==null&&g!==void 0?g:!0,messages:(N=e.messages)!==null&&N!==void 0?N:!0,inlineRefs:(T=e.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(A=e.schemaId)!==null&&A!==void 0?A:"$id",addUsedSchema:(w=e.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(ie=e.validateSchema)!==null&&ie!==void 0?ie:!0,validateFormats:(pe=e.validateFormats)!==null&&pe!==void 0?pe:!0,unicodeRegExp:(Tr=e.unicodeRegExp)!==null&&Tr!==void 0?Tr:!0,int32range:(Ir=e.int32range)!==null&&Ir!==void 0?Ir:!0,uriResolver:Zo}}var Tt=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...yl(t)};let{es5:r,lines:s}=this.opts.code;this.scope=new dl.ValueScope({scope:{},prefixes:ml,es5:r,lines:s}),this.logger=bl(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,cl.getRules)(),Si.call(this,pl,t,"NOT SUPPORTED"),Si.call(this,hl,t,"DEPRECATED","warn"),this._metaOpts=vl.call(this),t.formats&&gl.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&$l.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),_l.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:s}=this.opts,n=bi;s==="id"&&(n={...bi},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[s],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let s;if(typeof t=="string"){if(s=this.getSchema(t),!s)throw new Error(`no schema with key or ref "${t}"`)}else s=this.compile(t);let n=s(r);return"$async"in s||(this.errors=s.errors),n}compile(t,r){let s=this._addSchema(t,r);return s.validate||this._compileSchemaEnv(s)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:s}=this.opts;return n.call(this,t,r);async function n(c,l){await a.call(this,c.$schema);let h=this._addSchema(c,l);return h.validate||i.call(this,h)}async function a(c){c&&!this.getSchema(c)&&await n.call(this,{$ref:c},!0)}async function i(c){try{return this._compileSchemaEnv(c)}catch(l){if(!(l instanceof Ti.default))throw l;return o.call(this,l),await u.call(this,l.missingSchema),i.call(this,c)}}function o({missingSchema:c,missingRef:l}){if(this.refs[c])throw new Error(`AnySchema ${c} is loaded but ${l} cannot be resolved`)}async function u(c){let l=await d.call(this,c);this.refs[c]||await a.call(this,l.$schema),this.refs[c]||this.addSchema(l,c,r)}async function d(c){let l=this._loading[c];if(l)return l;try{return await(this._loading[c]=s(c))}finally{delete this._loading[c]}}}addSchema(t,r,s,n=this.opts.validateSchema){if(Array.isArray(t)){for(let i of t)this.addSchema(i,void 0,s,n);return this}let a;if(typeof t=="object"){let{schemaId:i}=this.opts;if(a=t[i],a!==void 0&&typeof a!="string")throw new Error(`schema ${i} must be string`)}return r=(0,Pt.normalizeId)(r||a),this._checkUnique(r),this.schemas[r]=this._addSchema(t,s,r,n,!0),this}addMetaSchema(t,r,s=this.opts.validateSchema){return this.addSchema(t,r,!0,s),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let s;if(s=t.$schema,s!==void 0&&typeof s!="string")throw new Error("$schema must be a string");if(s=s||this.opts.defaultMeta||this.defaultMeta(),!s)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let n=this.validate(s,t);if(!n&&r){let a="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(a);else throw new Error(a)}return n}getSchema(t){let r;for(;typeof(r=Pi.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:s}=this.opts,n=new St.SchemaEnv({schema:{},schemaId:s});if(r=St.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=Pi.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let s=t[this.opts.schemaId];return s&&(s=(0,Pt.normalizeId)(s),delete this.schemas[s],delete this.refs[s]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let s;if(typeof t=="string")s=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=s);else if(typeof t=="object"&&r===void 0){if(r=t,s=r.keyword,Array.isArray(s)&&!s.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Sl.call(this,s,r),!r)return(0,Ns.eachItem)(s,a=>Is.call(this,a)),this;Tl.call(this,r);let n={...r,type:(0,ir.getJSONTypes)(r.type),schemaType:(0,ir.getJSONTypes)(r.schemaType)};return(0,Ns.eachItem)(s,n.type.length===0?a=>Is.call(this,a,n):a=>n.type.forEach(i=>Is.call(this,a,n,i))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let s of r.rules){let n=s.rules.findIndex(a=>a.keyword===t);n>=0&&s.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:s="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${s}${n.instancePath} ${n.message}`).reduce((n,a)=>n+r+a)}$dataMetaSchema(t,r){let s=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let a=n.split("/").slice(1),i=t;for(let o of a)i=i[o];for(let o in s){let u=s[o];if(typeof u!="object")continue;let{$data:d}=u.definition,c=i[o];d&&c&&(i[o]=Ni(c))}}return t}_removeAllSchemas(t,r){for(let s in t){let n=t[s];(!r||r.test(s))&&(typeof n=="string"?delete t[s]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[s]))}}_addSchema(t,r,s,n=this.opts.validateSchema,a=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof t=="object")i=t[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let u=this._cache.get(t);if(u!==void 0)return u;s=(0,Pt.normalizeId)(i||s);let d=Pt.getSchemaRefs.call(this,t,s);return u=new St.SchemaEnv({schema:t,schemaId:o,meta:r,baseId:s,localRefs:d}),this._cache.set(u.schema,u),a&&!s.startsWith("#")&&(s&&this._checkUnique(s),this.refs[s]=u),n&&this.validateSchema(t,!0),u}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):St.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{St.compileSchema.call(this,t)}finally{this.opts=r}}};Tt.ValidationError=ul.default;Tt.MissingRefError=Ti.default;V.default=Tt;function Si(e,t,r,s="error"){for(let n in e){let a=n;a in t&&this.logger[s](`${r}: option ${n}. ${e[a]}`)}}function Pi(e){return e=(0,Pt.normalizeId)(e),this.schemas[e]||this.refs[e]}function _l(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function gl(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function $l(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function vl(){let e={...this.opts};for(let t of fl)delete e[t];return e}var wl={log(){},warn(){},error(){}};function bl(e){if(e===!1)return wl;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var El=/^[a-z_$][a-z0-9_$:-]*$/i;function Sl(e,t){let{RULES:r}=this;if((0,Ns.eachItem)(e,s=>{if(r.keywords[s])throw new Error(`Keyword ${s} is already defined`);if(!El.test(s))throw new Error(`Keyword ${s} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Is(e,t,r){var s;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:a}=this,i=n?a.post:a.rules.find(({type:u})=>u===r);if(i||(i={type:r,rules:[]},a.rules.push(i)),a.keywords[e]=!0,!t)return;let o={keyword:e,definition:{...t,type:(0,ir.getJSONTypes)(t.type),schemaType:(0,ir.getJSONTypes)(t.schemaType)}};t.before?Pl.call(this,i,o,t.before):i.rules.push(o),a.all[e]=o,(s=t.implements)===null||s===void 0||s.forEach(u=>this.addKeyword(u))}function Pl(e,t,r){let s=e.rules.findIndex(n=>n.keyword===r);s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function Tl(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=Ni(t)),e.validateSchema=this.compile(t,!0))}var Il={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ni(e){return{anyOf:[e,Il]}}});var Os=y(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.callRef=ze.getValidate=void 0;var Nl=bt(),Oi=Z(),J=b(),Ze=ge(),ki=rr(),or=q(),Ol={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:s}=e,{baseId:n,schemaEnv:a,validateName:i,opts:o,self:u}=s,{root:d}=a;if((r==="#"||r==="#/")&&n===d.baseId)return l();let c=ki.resolveRef.call(u,d,n,r);if(c===void 0)throw new Nl.default(s.opts.uriResolver,n,r);if(c instanceof ki.SchemaEnv)return h(c);return p(c);function l(){if(a===d)return ur(e,i,a,a.$async);let f=t.scopeValue("root",{ref:d});return ur(e,(0,J._)`${f}.validate`,d,d.$async)}function h(f){let m=qi(e,f);ur(e,m,f,f.$async)}function p(f){let m=t.scopeValue("schema",o.code.source===!0?{ref:f,code:(0,J.stringify)(f)}:{ref:f}),_=t.name("valid"),g=e.subschema({schema:f,dataTypes:[],schemaPath:J.nil,topSchemaRef:m,errSchemaPath:r},_);e.mergeEvaluated(g),e.ok(_)}}};function qi(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,J._)`${r.scopeValue("wrapper",{ref:t})}.validate`}ze.getValidate=qi;function ur(e,t,r,s){let{gen:n,it:a}=e,{allErrors:i,schemaEnv:o,opts:u}=a,d=u.passContext?Ze.default.this:J.nil;s?c():l();function c(){if(!o.$async)throw new Error("async schema referenced by sync schema");let f=n.let("valid");n.try(()=>{n.code((0,J._)`await ${(0,Oi.callValidateCode)(e,t,d)}`),p(t),i||n.assign(f,!0)},m=>{n.if((0,J._)`!(${m} instanceof ${a.ValidationError})`,()=>n.throw(m)),h(m),i||n.assign(f,!1)}),e.ok(f)}function l(){e.result((0,Oi.callValidateCode)(e,t,d),()=>p(t),()=>h(t))}function h(f){let m=(0,J._)`${f}.errors`;n.assign(Ze.default.vErrors,(0,J._)`${Ze.default.vErrors} === null ? ${m} : ${Ze.default.vErrors}.concat(${m})`),n.assign(Ze.default.errors,(0,J._)`${Ze.default.vErrors}.length`)}function p(f){var m;if(!a.opts.unevaluated)return;let _=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(a.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(a.props=or.mergeEvaluated.props(n,_.props,a.props));else{let g=n.var("props",(0,J._)`${f}.evaluated.props`);a.props=or.mergeEvaluated.props(n,g,a.props,J.Name)}if(a.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(a.items=or.mergeEvaluated.items(n,_.items,a.items));else{let g=n.var("items",(0,J._)`${f}.evaluated.items`);a.items=or.mergeEvaluated.items(n,g,a.items,J.Name)}}}ze.callRef=ur;ze.default=Ol});var Ri=y(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var kl=Os(),ql=["$schema","id","$defs",{keyword:"$comment"},"definitions",kl.default];ks.default=ql});var ji=y(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});var qs=We(),Rl=b(),Ne=Rl.operators,Rs={maximum:{exclusive:"exclusiveMaximum",ops:[{okStr:"<=",ok:Ne.LTE,fail:Ne.GT},{okStr:"<",ok:Ne.LT,fail:Ne.GTE}]},minimum:{exclusive:"exclusiveMinimum",ops:[{okStr:">=",ok:Ne.GTE,fail:Ne.LT},{okStr:">",ok:Ne.GT,fail:Ne.LTE}]}},jl={message:e=>qs.str`must be ${js(e).okStr} ${e.schemaCode}`,params:e=>qs._`{comparison: ${js(e).okStr}, limit: ${e.schemaCode}}`},Al={keyword:Object.keys(Rs),type:"number",schemaType:"number",$data:!0,error:jl,code(e){let{data:t,schemaCode:r}=e;e.fail$data(qs._`${t} ${js(e).fail} ${r} || isNaN(${t})`)}};function js(e){var t;let r=e.keyword,s=!((t=e.parentSchema)===null||t===void 0)&&t[Rs[r].exclusive]?1:0;return Rs[r].ops[s]}As.default=Al});var Ci=y(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var Ai={exclusiveMaximum:"maximum",exclusiveMinimum:"minimum"},Cl={keyword:Object.keys(Ai),type:"number",schemaType:"boolean",code({keyword:e,parentSchema:t}){let r=Ai[e];if(t[r]===void 0)throw new Error(`${e} can only be used with ${r}`)}};Cs.default=Cl});var Ds=y(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});var It=b(),Ml={message:({schemaCode:e})=>(0,It.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,It._)`{multipleOf: ${e}}`},Dl={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Ml,code(e){let{gen:t,data:r,schemaCode:s,it:n}=e,a=n.opts.multipleOfPrecision,i=t.let("res"),o=a?(0,It._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:(0,It._)`${i} !== parseInt(${i})`;e.fail$data((0,It._)`(${s} === 0 || (${i} = ${r}/${s}, ${o}))`)}};Ms.default=Dl});var Di=y(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});function Mi(e){let t=e.length,r=0,s=0,n;for(;s<t;)r++,n=e.charCodeAt(s++),n>=55296&&n<=56319&&s<t&&(n=e.charCodeAt(s),(n&64512)===56320&&s++);return r}zs.default=Mi;Mi.code='require("ajv/dist/runtime/ucs2length").default'});var xs=y(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});var Ve=b(),zl=q(),Vl=Di(),xl={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Ve.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Ve._)`{limit: ${e}}`},Ll={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:xl,code(e){let{keyword:t,data:r,schemaCode:s,it:n}=e,a=t==="maxLength"?Ve.operators.GT:Ve.operators.LT,i=n.opts.unicode===!1?(0,Ve._)`${r}.length`:(0,Ve._)`${(0,zl.useFunc)(e.gen,Vl.default)}(${r})`;e.fail$data((0,Ve._)`${i} ${a} ${s}`)}};Vs.default=Ll});var Us=y(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});var Ul=Z(),cr=b(),Fl={message:({schemaCode:e})=>(0,cr.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,cr._)`{pattern: ${e}}`},Kl={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Fl,code(e){let{data:t,$data:r,schema:s,schemaCode:n,it:a}=e,i=a.opts.unicodeRegExp?"u":"",o=r?(0,cr._)`(new RegExp(${n}, ${i}))`:(0,Ul.usePattern)(e,s);e.fail$data((0,cr._)`!${o}.test(${t})`)}};Ls.default=Kl});var Ks=y(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});var Nt=b(),Gl={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Nt.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Nt._)`{limit: ${e}}`},Hl={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Gl,code(e){let{keyword:t,data:r,schemaCode:s}=e,n=t==="maxProperties"?Nt.operators.GT:Nt.operators.LT;e.fail$data((0,Nt._)`Object.keys(${r}).length ${n} ${s}`)}};Fs.default=Hl});var Hs=y(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});var Ot=Z(),kt=b(),Yl=q(),Bl={message:({params:{missingProperty:e}})=>(0,kt.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,kt._)`{missingProperty: ${e}}`},Jl={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Bl,code(e){let{gen:t,schema:r,schemaCode:s,data:n,$data:a,it:i}=e,{opts:o}=i;if(!a&&r.length===0)return;let u=r.length>=o.loopRequired;if(i.allErrors?d():c(),o.strictRequired){let p=e.parentSchema.properties,{definedProperties:f}=e.it;for(let m of r)if(p?.[m]===void 0&&!f.has(m)){let _=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${m}" is not defined at "${_}" (strictRequired)`;(0,Yl.checkStrictMode)(i,g,i.opts.strictRequired)}}function d(){if(u||a)e.block$data(kt.nil,l);else for(let p of r)(0,Ot.checkReportMissingProp)(e,p)}function c(){let p=t.let("missing");if(u||a){let f=t.let("valid",!0);e.block$data(f,()=>h(p,f)),e.ok(f)}else t.if((0,Ot.checkMissingProp)(e,r,p)),(0,Ot.reportMissingProp)(e,p),t.else()}function l(){t.forOf("prop",s,p=>{e.setParams({missingProperty:p}),t.if((0,Ot.noPropertyInData)(t,n,p,o.ownProperties),()=>e.error())})}function h(p,f){e.setParams({missingProperty:p}),t.forOf(p,s,()=>{t.assign(f,(0,Ot.propertyInData)(t,n,p,o.ownProperties)),t.if((0,kt.not)(f),()=>{e.error(),t.break()})},kt.nil)}}};Gs.default=Jl});var Bs=y(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});var qt=b(),Wl={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,qt.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,qt._)`{limit: ${e}}`},Zl={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Wl,code(e){let{keyword:t,data:r,schemaCode:s}=e,n=t==="maxItems"?qt.operators.GT:qt.operators.LT;e.fail$data((0,qt._)`${r}.length ${n} ${s}`)}};Ys.default=Zl});var dr=y(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});var zi=ds();zi.code='require("ajv/dist/runtime/equal").default';Js.default=zi});var Xs=y(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var Ws=_t(),x=b(),Xl=q(),Ql=dr(),ef={message:({params:{i:e,j:t}})=>(0,x.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,x._)`{i: ${e}, j: ${t}}`},tf={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:ef,code(e){let{gen:t,data:r,$data:s,schema:n,parentSchema:a,schemaCode:i,it:o}=e;if(!s&&!n)return;let u=t.let("valid"),d=a.items?(0,Ws.getSchemaTypes)(a.items):[];e.block$data(u,c,(0,x._)`${i} === false`),e.ok(u);function c(){let f=t.let("i",(0,x._)`${r}.length`),m=t.let("j");e.setParams({i:f,j:m}),t.assign(u,!0),t.if((0,x._)`${f} > 1`,()=>(l()?h:p)(f,m))}function l(){return d.length>0&&!d.some(f=>f==="object"||f==="array")}function h(f,m){let _=t.name("item"),g=(0,Ws.checkDataTypes)(d,_,o.opts.strictNumbers,Ws.DataType.Wrong),N=t.const("indices",(0,x._)`{}`);t.for((0,x._)`;${f}--;`,()=>{t.let(_,(0,x._)`${r}[${f}]`),t.if(g,(0,x._)`continue`),d.length>1&&t.if((0,x._)`typeof ${_} == "string"`,(0,x._)`${_} += "_"`),t.if((0,x._)`typeof ${N}[${_}] == "number"`,()=>{t.assign(m,(0,x._)`${N}[${_}]`),e.error(),t.assign(u,!1).break()}).code((0,x._)`${N}[${_}] = ${f}`)})}function p(f,m){let _=(0,Xl.useFunc)(t,Ql.default),g=t.name("outer");t.label(g).for((0,x._)`;${f}--;`,()=>t.for((0,x._)`${m} = ${f}; ${m}--;`,()=>t.if((0,x._)`${_}(${r}[${f}], ${r}[${m}])`,()=>{e.error(),t.assign(u,!1).break(g)})))}}};Zs.default=tf});var tn=y(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});var Qs=b(),rf=q(),sf=dr(),nf={message:"must be equal to constant",params:({schemaCode:e})=>(0,Qs._)`{allowedValue: ${e}}`},af={keyword:"const",$data:!0,error:nf,code(e){let{gen:t,data:r,$data:s,schemaCode:n,schema:a}=e;s||a&&typeof a=="object"?e.fail$data((0,Qs._)`!${(0,rf.useFunc)(t,sf.default)}(${r}, ${n})`):e.fail((0,Qs._)`${a} !== ${r}`)}};en.default=af});var sn=y(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});var Rt=b(),of=q(),uf=dr(),cf={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Rt._)`{allowedValues: ${e}}`},df={keyword:"enum",schemaType:"array",$data:!0,error:cf,code(e){let{gen:t,data:r,$data:s,schema:n,schemaCode:a,it:i}=e;if(!s&&n.length===0)throw new Error("enum must have non-empty array");let o=n.length>=i.opts.loopEnum,u,d=()=>u??(u=(0,of.useFunc)(t,uf.default)),c;if(o||s)c=t.let("valid"),e.block$data(c,l);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let p=t.const("vSchema",a);c=(0,Rt.or)(...n.map((f,m)=>h(p,m)))}e.pass(c);function l(){t.assign(c,!1),t.forOf("v",a,p=>t.if((0,Rt._)`${d()}(${r}, ${p})`,()=>t.assign(c,!0).break()))}function h(p,f){let m=n[f];return typeof m=="object"&&m!==null?(0,Rt._)`${d()}(${r}, ${p}[${f}])`:(0,Rt._)`${r} === ${m}`}}};rn.default=df});var Vi=y(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});var lf=ji(),ff=Ci(),mf=Ds(),pf=xs(),hf=Us(),yf=Ks(),_f=Hs(),gf=Bs(),$f=Xs(),vf=tn(),wf=sn(),bf=[lf.default,ff.default,mf.default,pf.default,hf.default,yf.default,_f.default,gf.default,$f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},vf.default,wf.default];nn.default=bf});var on=y(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.validateAdditionalItems=void 0;var xe=b(),an=q(),Ef={message:({params:{len:e}})=>(0,xe.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,xe._)`{limit: ${e}}`},Sf={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ef,code(e){let{parentSchema:t,it:r}=e,{items:s}=t;if(!Array.isArray(s)){(0,an.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}xi(e,s)}};function xi(e,t){let{gen:r,schema:s,data:n,keyword:a,it:i}=e;i.items=!0;let o=r.const("len",(0,xe._)`${n}.length`);if(s===!1)e.setParams({len:t.length}),e.pass((0,xe._)`${o} <= ${t.length}`);else if(typeof s=="object"&&!(0,an.alwaysValidSchema)(i,s)){let d=r.var("valid",(0,xe._)`${o} <= ${t.length}`);r.if((0,xe.not)(d),()=>u(d)),e.ok(d)}function u(d){r.forRange("i",t.length,o,c=>{e.subschema({keyword:a,dataProp:c,dataPropType:an.Type.Num},d),i.allErrors||r.if((0,xe.not)(d),()=>r.break())})}}jt.validateAdditionalItems=xi;jt.default=Sf});var un=y(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.validateTuple=void 0;var Li=b(),lr=q(),Pf=Z(),Tf={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return Ui(e,"additionalItems",t);r.items=!0,!(0,lr.alwaysValidSchema)(r,t)&&e.ok((0,Pf.validateArray)(e))}};function Ui(e,t,r=e.schema){let{gen:s,parentSchema:n,data:a,keyword:i,it:o}=e;c(n),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=lr.mergeEvaluated.items(s,r.length,o.items));let u=s.name("valid"),d=s.const("len",(0,Li._)`${a}.length`);r.forEach((l,h)=>{(0,lr.alwaysValidSchema)(o,l)||(s.if((0,Li._)`${d} > ${h}`,()=>e.subschema({keyword:i,schemaProp:h,dataProp:h},u)),e.ok(u))});function c(l){let{opts:h,errSchemaPath:p}=o,f=r.length,m=f===l.minItems&&(f===l.maxItems||l[t]===!1);if(h.strictTuples&&!m){let _=`"${i}" is ${f}-tuple, but minItems or maxItems/${t} are not specified or different at path "${p}"`;(0,lr.checkStrictMode)(o,_,h.strictTuples)}}}At.validateTuple=Ui;At.default=Tf});var Fi=y(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});var If=un(),Nf={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,If.validateTuple)(e,"items")};cn.default=Nf});var Gi=y(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});var Ki=b(),Of=q(),kf=Z(),qf=on(),Rf={message:({params:{len:e}})=>(0,Ki.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ki._)`{limit: ${e}}`},jf={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Rf,code(e){let{schema:t,parentSchema:r,it:s}=e,{prefixItems:n}=r;s.items=!0,!(0,Of.alwaysValidSchema)(s,t)&&(n?(0,qf.validateAdditionalItems)(e,n):e.ok((0,kf.validateArray)(e)))}};dn.default=jf});var Hi=y(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});var Q=b(),fr=q(),Af={message:({params:{min:e,max:t}})=>t===void 0?(0,Q.str)`must contain at least ${e} valid item(s)`:(0,Q.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Q._)`{minContains: ${e}}`:(0,Q._)`{minContains: ${e}, maxContains: ${t}}`},Cf={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Af,code(e){let{gen:t,schema:r,parentSchema:s,data:n,it:a}=e,i,o,{minContains:u,maxContains:d}=s;a.opts.next?(i=u===void 0?1:u,o=d):i=1;let c=t.const("len",(0,Q._)`${n}.length`);if(e.setParams({min:i,max:o}),o===void 0&&i===0){(0,fr.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,fr.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,fr.alwaysValidSchema)(a,r)){let m=(0,Q._)`${c} >= ${i}`;o!==void 0&&(m=(0,Q._)`${m} && ${c} <= ${o}`),e.pass(m);return}a.items=!0;let l=t.name("valid");o===void 0&&i===1?p(l,()=>t.if(l,()=>t.break())):i===0?(t.let(l,!0),o!==void 0&&t.if((0,Q._)`${n}.length > 0`,h)):(t.let(l,!1),h()),e.result(l,()=>e.reset());function h(){let m=t.name("_valid"),_=t.let("count",0);p(m,()=>t.if(m,()=>f(_)))}function p(m,_){t.forRange("i",0,c,g=>{e.subschema({keyword:"contains",dataProp:g,dataPropType:fr.Type.Num,compositeRule:!0},m),_()})}function f(m){t.code((0,Q._)`${m}++`),o===void 0?t.if((0,Q._)`${m} >= ${i}`,()=>t.assign(l,!0).break()):(t.if((0,Q._)`${m} > ${o}`,()=>t.assign(l,!1).break()),i===1?t.assign(l,!0):t.if((0,Q._)`${m} >= ${i}`,()=>t.assign(l,!0)))}}};ln.default=Cf});var Ji=y(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.validateSchemaDeps=de.validatePropertyDeps=de.error=void 0;var fn=b(),Mf=q(),Ct=Z();de.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let s=t===1?"property":"properties";return(0,fn.str)`must have ${s} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>(0,fn._)`{property: ${e},
    missingProperty: ${s},
    depsCount: ${t},
    deps: ${r}}`};var Df={keyword:"dependencies",type:"object",schemaType:"object",error:de.error,code(e){let[t,r]=zf(e);Yi(e,t),Bi(e,r)}};function zf({schema:e}){let t={},r={};for(let s in e){if(s==="__proto__")continue;let n=Array.isArray(e[s])?t:r;n[s]=e[s]}return[t,r]}function Yi(e,t=e.schema){let{gen:r,data:s,it:n}=e;if(Object.keys(t).length===0)return;let a=r.let("missing");for(let i in t){let o=t[i];if(o.length===0)continue;let u=(0,Ct.propertyInData)(r,s,i,n.opts.ownProperties);e.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),n.allErrors?r.if(u,()=>{for(let d of o)(0,Ct.checkReportMissingProp)(e,d)}):(r.if((0,fn._)`${u} && (${(0,Ct.checkMissingProp)(e,o,a)})`),(0,Ct.reportMissingProp)(e,a),r.else())}}de.validatePropertyDeps=Yi;function Bi(e,t=e.schema){let{gen:r,data:s,keyword:n,it:a}=e,i=r.name("valid");for(let o in t)(0,Mf.alwaysValidSchema)(a,t[o])||(r.if((0,Ct.propertyInData)(r,s,o,a.opts.ownProperties),()=>{let u=e.subschema({keyword:n,schemaProp:o},i);e.mergeValidEvaluated(u,i)},()=>r.var(i,!0)),e.ok(i))}de.validateSchemaDeps=Bi;de.default=Df});var Zi=y(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var Wi=b(),Vf=q(),xf={message:"property name must be valid",params:({params:e})=>(0,Wi._)`{propertyName: ${e.propertyName}}`},Lf={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:xf,code(e){let{gen:t,schema:r,data:s,it:n}=e;if((0,Vf.alwaysValidSchema)(n,r))return;let a=t.name("valid");t.forIn("key",s,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),t.if((0,Wi.not)(a),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(a)}};mn.default=Lf});var hn=y(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var mr=Z(),ne=b(),Uf=ge(),pr=q(),Ff={message:"must NOT have additional properties",params:({params:e})=>(0,ne._)`{additionalProperty: ${e.additionalProperty}}`},Kf={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Ff,code(e){let{gen:t,schema:r,parentSchema:s,data:n,errsCount:a,it:i}=e;if(!a)throw new Error("ajv implementation error");let{allErrors:o,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,pr.alwaysValidSchema)(i,r))return;let d=(0,mr.allSchemaProperties)(s.properties),c=(0,mr.allSchemaProperties)(s.patternProperties);l(),e.ok((0,ne._)`${a} === ${Uf.default.errors}`);function l(){t.forIn("key",n,_=>{!d.length&&!c.length?f(_):t.if(h(_),()=>f(_))})}function h(_){let g;if(d.length>8){let N=(0,pr.schemaRefOrVal)(i,s.properties,"properties");g=(0,mr.isOwnProperty)(t,N,_)}else d.length?g=(0,ne.or)(...d.map(N=>(0,ne._)`${_} === ${N}`)):g=ne.nil;return c.length&&(g=(0,ne.or)(g,...c.map(N=>(0,ne._)`${(0,mr.usePattern)(e,N)}.test(${_})`))),(0,ne.not)(g)}function p(_){t.code((0,ne._)`delete ${n}[${_}]`)}function f(_){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){p(_);return}if(r===!1){e.setParams({additionalProperty:_}),e.error(),o||t.break();return}if(typeof r=="object"&&!(0,pr.alwaysValidSchema)(i,r)){let g=t.name("valid");u.removeAdditional==="failing"?(m(_,g,!1),t.if((0,ne.not)(g),()=>{e.reset(),p(_)})):(m(_,g),o||t.if((0,ne.not)(g),()=>t.break()))}}function m(_,g,N){let T={keyword:"additionalProperties",dataProp:_,dataPropType:pr.Type.Str};N===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(T,g)}}};pn.default=Kf});var eo=y(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});var Gf=wt(),Xi=Z(),yn=q(),Qi=hn(),Hf={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:s,data:n,it:a}=e;a.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Qi.default.code(new Gf.KeywordCxt(a,Qi.default,"additionalProperties"));let i=(0,Xi.allSchemaProperties)(r);for(let l of i)a.definedProperties.add(l);a.opts.unevaluated&&i.length&&a.props!==!0&&(a.props=yn.mergeEvaluated.props(t,(0,yn.toHash)(i),a.props));let o=i.filter(l=>!(0,yn.alwaysValidSchema)(a,r[l]));if(o.length===0)return;let u=t.name("valid");for(let l of o)d(l)?c(l):(t.if((0,Xi.propertyInData)(t,n,l,a.opts.ownProperties)),c(l),a.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(l),e.ok(u);function d(l){return a.opts.useDefaults&&!a.compositeRule&&r[l].default!==void 0}function c(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},u)}}};_n.default=Hf});var no=y(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var to=Z(),hr=b(),ro=q(),so=q(),Yf={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:s,parentSchema:n,it:a}=e,{opts:i}=a,o=(0,to.allSchemaProperties)(r),u=o.filter(m=>(0,ro.alwaysValidSchema)(a,r[m]));if(o.length===0||u.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;let d=i.strictSchema&&!i.allowMatchingProperties&&n.properties,c=t.name("valid");a.props!==!0&&!(a.props instanceof hr.Name)&&(a.props=(0,so.evaluatedPropsToName)(t,a.props));let{props:l}=a;h();function h(){for(let m of o)d&&p(m),a.allErrors?f(m):(t.var(c,!0),f(m),t.if(c))}function p(m){for(let _ in d)new RegExp(m).test(_)&&(0,ro.checkStrictMode)(a,`property ${_} matches pattern ${m} (use allowMatchingProperties)`)}function f(m){t.forIn("key",s,_=>{t.if((0,hr._)`${(0,to.usePattern)(e,m)}.test(${_})`,()=>{let g=u.includes(m);g||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:_,dataPropType:so.Type.Str},c),a.opts.unevaluated&&l!==!0?t.assign((0,hr._)`${l}[${_}]`,!0):!g&&!a.allErrors&&t.if((0,hr.not)(c),()=>t.break())})})}}};gn.default=Yf});var ao=y($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});var Bf=q(),Jf={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:s}=e;if((0,Bf.alwaysValidSchema)(s,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};$n.default=Jf});var io=y(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var Wf=Z(),Zf={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Wf.validateUnion,error:{message:"must match a schema in anyOf"}};vn.default=Zf});var oo=y(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});var yr=b(),Xf=q(),Qf={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,yr._)`{passingSchemas: ${e.passing}}`},em={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Qf,code(e){let{gen:t,schema:r,parentSchema:s,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let a=r,i=t.let("valid",!1),o=t.let("passing",null),u=t.name("_valid");e.setParams({passing:o}),t.block(d),e.result(i,()=>e.reset(),()=>e.error(!0));function d(){a.forEach((c,l)=>{let h;(0,Xf.alwaysValidSchema)(n,c)?t.var(u,!0):h=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},u),l>0&&t.if((0,yr._)`${u} && ${i}`).assign(i,!1).assign(o,(0,yr._)`[${o}, ${l}]`).else(),t.if(u,()=>{t.assign(i,!0),t.assign(o,l),h&&e.mergeEvaluated(h,yr.Name)})})}}};wn.default=em});var uo=y(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});var tm=q(),rm={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((a,i)=>{if((0,tm.alwaysValidSchema)(s,a))return;let o=e.subschema({keyword:"allOf",schemaProp:i},n);e.ok(n),e.mergeEvaluated(o)})}};bn.default=rm});var fo=y(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});var _r=b(),lo=q(),sm={message:({params:e})=>(0,_r.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,_r._)`{failingKeyword: ${e.ifClause}}`},nm={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:sm,code(e){let{gen:t,parentSchema:r,it:s}=e;r.then===void 0&&r.else===void 0&&(0,lo.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=co(s,"then"),a=co(s,"else");if(!n&&!a)return;let i=t.let("valid",!0),o=t.name("_valid");if(u(),e.reset(),n&&a){let c=t.let("ifClause");e.setParams({ifClause:c}),t.if(o,d("then",c),d("else",c))}else n?t.if(o,d("then")):t.if((0,_r.not)(o),d("else"));e.pass(i,()=>e.error(!0));function u(){let c=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(c)}function d(c,l){return()=>{let h=e.subschema({keyword:c},o);t.assign(i,o),e.mergeValidEvaluated(h,i),l?t.assign(l,(0,_r._)`${c}`):e.setParams({ifClause:c})}}}};function co(e,t){let r=e.schema[t];return r!==void 0&&!(0,lo.alwaysValidSchema)(e,r)}En.default=nm});var mo=y(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});var am=q(),im={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,am.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Sn.default=im});var Tn=y(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});var om=on(),um=Fi(),cm=un(),dm=Gi(),lm=Hi(),fm=Ji(),mm=Zi(),pm=hn(),hm=eo(),ym=no(),_m=ao(),gm=io(),$m=oo(),vm=uo(),wm=fo(),bm=mo();function Em(e=!1){let t=[_m.default,gm.default,$m.default,vm.default,wm.default,bm.default,mm.default,pm.default,fm.default,hm.default,ym.default];return e?t.push(um.default,dm.default):t.push(om.default,cm.default),t.push(lm.default),t}Pn.default=Em});var po=y(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var D=b(),Sm={message:({schemaCode:e})=>(0,D.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,D._)`{format: ${e}}`},Pm={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Sm,code(e,t){let{gen:r,data:s,$data:n,schema:a,schemaCode:i,it:o}=e,{opts:u,errSchemaPath:d,schemaEnv:c,self:l}=o;if(!u.validateFormats)return;n?h():p();function h(){let f=r.scopeValue("formats",{ref:l.formats,code:u.code.formats}),m=r.const("fDef",(0,D._)`${f}[${i}]`),_=r.let("fType"),g=r.let("format");r.if((0,D._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(_,(0,D._)`${m}.type || "string"`).assign(g,(0,D._)`${m}.validate`),()=>r.assign(_,(0,D._)`"string"`).assign(g,m)),e.fail$data((0,D.or)(N(),T()));function N(){return u.strictSchema===!1?D.nil:(0,D._)`${i} && !${g}`}function T(){let A=c.$async?(0,D._)`(${m}.async ? await ${g}(${s}) : ${g}(${s}))`:(0,D._)`${g}(${s})`,w=(0,D._)`(typeof ${g} == "function" ? ${A} : ${g}.test(${s}))`;return(0,D._)`${g} && ${g} !== true && ${_} === ${t} && !${w}`}}function p(){let f=l.formats[a];if(!f){N();return}if(f===!0)return;let[m,_,g]=T(f);m===t&&e.pass(A());function N(){if(u.strictSchema===!1){l.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${a}" ignored in schema at path "${d}"`}}function T(w){let ie=w instanceof RegExp?(0,D.regexpCode)(w):u.code.formats?(0,D._)`${u.code.formats}${(0,D.getProperty)(a)}`:void 0,pe=r.scopeValue("formats",{key:a,ref:w,code:ie});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,D._)`${pe}.validate`]:["string",w,pe]}function A(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!c.$async)throw new Error("async format in sync schema");return(0,D._)`await ${g}(${s})`}return typeof _=="function"?(0,D._)`${g}(${s})`:(0,D._)`${g}.test(${s})`}}}};In.default=Pm});var On=y(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var Tm=po(),Im=[Tm.default];Nn.default=Im});var ho=y(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var Nm=Ri(),Om=Vi(),km=Tn(),qm=On(),Rm=["title","description","default"],jm=[Nm.default,Om.default,km.default(),qm.default,Rm];kn.default=jm});var _o=y(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.DiscrError=void 0;var yo;(function(e){e.Tag="tag",e.Mapping="mapping"})(yo||(gr.DiscrError=yo={}))});var jn=y(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});var Xe=b(),qn=_o(),go=rr(),Am=bt(),Cm=q(),Mm={message:({params:{discrError:e,tagName:t}})=>e===qn.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Xe._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},Dm={keyword:"discriminator",type:"object",schemaType:"object",error:Mm,code(e){let{gen:t,data:r,schema:s,parentSchema:n,it:a}=e,{oneOf:i}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=s.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let u=t.let("valid",!1),d=t.const("tag",(0,Xe._)`${r}${(0,Xe.getProperty)(o)}`);t.if((0,Xe._)`typeof ${d} == "string"`,()=>c(),()=>e.error(!1,{discrError:qn.DiscrError.Tag,tag:d,tagName:o})),e.ok(u);function c(){let p=h();t.if(!1);for(let f in p)t.elseIf((0,Xe._)`${d} === ${f}`),t.assign(u,l(p[f]));t.else(),e.error(!1,{discrError:qn.DiscrError.Mapping,tag:d,tagName:o}),t.endIf()}function l(p){let f=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:p},f);return e.mergeEvaluated(m,Xe.Name),f}function h(){var p;let f={},m=g(n),_=!0;for(let A=0;A<i.length;A++){let w=i[A];if(w?.$ref&&!(0,Cm.schemaHasRulesButRef)(w,a.self.RULES)){let pe=w.$ref;if(w=go.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,pe),w instanceof go.SchemaEnv&&(w=w.schema),w===void 0)throw new Am.default(a.opts.uriResolver,a.baseId,pe)}let ie=(p=w?.properties)===null||p===void 0?void 0:p[o];if(typeof ie!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(m||g(w)),N(ie,A)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return f;function g({required:A}){return Array.isArray(A)&&A.includes(o)}function N(A,w){if(A.const)T(A.const,w);else if(A.enum)for(let ie of A.enum)T(ie,w);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function T(A,w){if(typeof A!="string"||A in f)throw new Error(`discriminator: "${o}" values must be unique strings`);f[A]=w}}}};Rn.default=Dm});var $o=y((py,zm)=>{zm.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}}});var bo=y((z,wo)=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.CodeGen=z.Name=z.nil=z.stringify=z.str=z._=z.KeywordCxt=void 0;var Vm=We(),xm=ho(),Lm=jn(),vo=$o(),Um=["/properties"],$r="http://json-schema.org/draft-04/schema",vr=class extends Vm.default{constructor(t={}){super({...t,schemaId:"id"})}_addVocabularies(){super._addVocabularies(),xm.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(Lm.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(vo,Um):vo;this.addMetaSchema(t,$r,!1),this.refs["http://json-schema.org/schema"]=$r}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema($r)?$r:void 0)}};wo.exports=z=vr;Object.defineProperty(z,"__esModule",{value:!0});z.default=vr;var Fm=We();Object.defineProperty(z,"KeywordCxt",{enumerable:!0,get:function(){return Fm.KeywordCxt}});var Qe=We();Object.defineProperty(z,"_",{enumerable:!0,get:function(){return Qe._}});Object.defineProperty(z,"str",{enumerable:!0,get:function(){return Qe.str}});Object.defineProperty(z,"stringify",{enumerable:!0,get:function(){return Qe.stringify}});Object.defineProperty(z,"nil",{enumerable:!0,get:function(){return Qe.nil}});Object.defineProperty(z,"Name",{enumerable:!0,get:function(){return Qe.Name}});Object.defineProperty(z,"CodeGen",{enumerable:!0,get:function(){return Qe.CodeGen}})});var ko=y(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.formatNames=fe.fastFormats=fe.fullFormats=void 0;function le(e,t){return{validate:e,compare:t}}fe.fullFormats={date:le(To,Dn),time:le(Cn(!0),zn),"date-time":le(Eo(!0),No),"iso-time":le(Cn(),Io),"iso-date-time":le(Eo(),Oo),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Jm,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:rp,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:Wm,int32:{type:"number",validate:Qm},int64:{type:"number",validate:ep},float:{type:"number",validate:Po},double:{type:"number",validate:Po},password:!0,binary:!0};fe.fastFormats={...fe.fullFormats,date:le(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Dn),time:le(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,zn),"date-time":le(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,No),"iso-time":le(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Io),"iso-date-time":le(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Oo),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};fe.formatNames=Object.keys(fe.fullFormats);function Km(e){return e%4===0&&(e%100!==0||e%400===0)}var Gm=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Hm=[0,31,28,31,30,31,30,31,31,30,31,30,31];function To(e){let t=Gm.exec(e);if(!t)return!1;let r=+t[1],s=+t[2],n=+t[3];return s>=1&&s<=12&&n>=1&&n<=(s===2&&Km(r)?29:Hm[s])}function Dn(e,t){if(e&&t)return e>t?1:e<t?-1:0}var An=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Cn(e){return function(r){let s=An.exec(r);if(!s)return!1;let n=+s[1],a=+s[2],i=+s[3],o=s[4],u=s[5]==="-"?-1:1,d=+(s[6]||0),c=+(s[7]||0);if(d>23||c>59||e&&!o)return!1;if(n<=23&&a<=59&&i<60)return!0;let l=a-c*u,h=n-d*u-(l<0?1:0);return(h===23||h===-1)&&(l===59||l===-1)&&i<61}}function zn(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+t).valueOf();if(r&&s)return r-s}function Io(e,t){if(!(e&&t))return;let r=An.exec(e),s=An.exec(t);if(r&&s)return e=r[1]+r[2]+r[3],t=s[1]+s[2]+s[3],e>t?1:e<t?-1:0}var Mn=/t|\s/i;function Eo(e){let t=Cn(e);return function(s){let n=s.split(Mn);return n.length===2&&To(n[0])&&t(n[1])}}function No(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),s=new Date(t).valueOf();if(r&&s)return r-s}function Oo(e,t){if(!(e&&t))return;let[r,s]=e.split(Mn),[n,a]=t.split(Mn),i=Dn(r,n);if(i!==void 0)return i||zn(s,a)}var Ym=/\/|:/,Bm=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Jm(e){return Ym.test(e)&&Bm.test(e)}var So=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function Wm(e){return So.lastIndex=0,So.test(e)}var Zm=-(2**31),Xm=2**31-1;function Qm(e){return Number.isInteger(e)&&e<=Xm&&e>=Zm}function ep(e){return Number.isInteger(e)}function Po(){return!0}var tp=/[^\\]\\Z/;function rp(e){if(tp.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var qo=y(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});var sp={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Vn.default=sp});var Ro=y(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});var np=qo(),ap=Os(),ip=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",np.default,ap.default];xn.default=ip});var jo=y(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});var wr=b(),Oe=wr.operators,br={maximum:{okStr:"<=",ok:Oe.LTE,fail:Oe.GT},minimum:{okStr:">=",ok:Oe.GTE,fail:Oe.LT},exclusiveMaximum:{okStr:"<",ok:Oe.LT,fail:Oe.GTE},exclusiveMinimum:{okStr:">",ok:Oe.GT,fail:Oe.LTE}},op={message:({keyword:e,schemaCode:t})=>(0,wr.str)`must be ${br[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,wr._)`{comparison: ${br[e].okStr}, limit: ${t}}`},up={keyword:Object.keys(br),type:"number",schemaType:"number",$data:!0,error:op,code(e){let{keyword:t,data:r,schemaCode:s}=e;e.fail$data((0,wr._)`${r} ${br[t].fail} ${s} || isNaN(${r})`)}};Ln.default=up});var Ao=y(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var cp=jo(),dp=Ds(),lp=xs(),fp=Us(),mp=Ks(),pp=Hs(),hp=Bs(),yp=Xs(),_p=tn(),gp=sn(),$p=[cp.default,dp.default,lp.default,fp.default,mp.default,pp.default,hp.default,yp.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},_p.default,gp.default];Un.default=$p});var Co=y(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.contentVocabulary=et.metadataVocabulary=void 0;et.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];et.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Do=y(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});var vp=Ro(),wp=Ao(),bp=Tn(),Ep=On(),Mo=Co(),Sp=[vp.default,wp.default,(0,bp.default)(),Ep.default,Mo.metadataVocabulary,Mo.contentVocabulary];Fn.default=Sp});var zo=y((by,Pp)=>{Pp.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var xo=y((M,Kn)=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.MissingRefError=M.ValidationError=M.CodeGen=M.Name=M.nil=M.stringify=M.str=M._=M.KeywordCxt=M.Ajv=void 0;var Tp=We(),Ip=Do(),Np=jn(),Vo=zo(),Op=["/properties"],Er="http://json-schema.org/draft-07/schema",tt=class extends Tp.default{_addVocabularies(){super._addVocabularies(),Ip.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(Np.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Vo,Op):Vo;this.addMetaSchema(t,Er,!1),this.refs["http://json-schema.org/schema"]=Er}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Er)?Er:void 0)}};M.Ajv=tt;Kn.exports=M=tt;Kn.exports.Ajv=tt;Object.defineProperty(M,"__esModule",{value:!0});M.default=tt;var kp=wt();Object.defineProperty(M,"KeywordCxt",{enumerable:!0,get:function(){return kp.KeywordCxt}});var rt=b();Object.defineProperty(M,"_",{enumerable:!0,get:function(){return rt._}});Object.defineProperty(M,"str",{enumerable:!0,get:function(){return rt.str}});Object.defineProperty(M,"stringify",{enumerable:!0,get:function(){return rt.stringify}});Object.defineProperty(M,"nil",{enumerable:!0,get:function(){return rt.nil}});Object.defineProperty(M,"Name",{enumerable:!0,get:function(){return rt.Name}});Object.defineProperty(M,"CodeGen",{enumerable:!0,get:function(){return rt.CodeGen}});var qp=er();Object.defineProperty(M,"ValidationError",{enumerable:!0,get:function(){return qp.default}});var Rp=bt();Object.defineProperty(M,"MissingRefError",{enumerable:!0,get:function(){return Rp.default}})});var Lo=y(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.formatLimitDefinition=void 0;var jp=xo(),ae=b(),ke=ae.operators,Sr={formatMaximum:{okStr:"<=",ok:ke.LTE,fail:ke.GT},formatMinimum:{okStr:">=",ok:ke.GTE,fail:ke.LT},formatExclusiveMaximum:{okStr:"<",ok:ke.LT,fail:ke.GTE},formatExclusiveMinimum:{okStr:">",ok:ke.GT,fail:ke.LTE}},Ap={message:({keyword:e,schemaCode:t})=>(0,ae.str)`should be ${Sr[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,ae._)`{comparison: ${Sr[e].okStr}, limit: ${t}}`};st.formatLimitDefinition={keyword:Object.keys(Sr),type:"string",schemaType:"string",$data:!0,error:Ap,code(e){let{gen:t,data:r,schemaCode:s,keyword:n,it:a}=e,{opts:i,self:o}=a;if(!i.validateFormats)return;let u=new jp.KeywordCxt(a,o.RULES.all.format.definition,"format");u.$data?d():c();function d(){let h=t.scopeValue("formats",{ref:o.formats,code:i.code.formats}),p=t.const("fmt",(0,ae._)`${h}[${u.schemaCode}]`);e.fail$data((0,ae.or)((0,ae._)`typeof ${p} != "object"`,(0,ae._)`${p} instanceof RegExp`,(0,ae._)`typeof ${p}.compare != "function"`,l(p)))}function c(){let h=u.schema,p=o.formats[h];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${n}": format "${h}" does not define "compare" function`);let f=t.scopeValue("formats",{key:h,ref:p,code:i.code.formats?(0,ae._)`${i.code.formats}${(0,ae.getProperty)(h)}`:void 0});e.fail$data(l(f))}function l(h){return(0,ae._)`${h}.compare(${r}, ${s}) ${Sr[n].fail} 0`}},dependencies:["format"]};var Cp=e=>(e.addKeyword(st.formatLimitDefinition),e);st.default=Cp});var Go=y((Mt,Ko)=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});var nt=ko(),Mp=Lo(),Gn=b(),Uo=new Gn.Name("fullFormats"),Dp=new Gn.Name("fastFormats"),Hn=(e,t={keywords:!0})=>{if(Array.isArray(t))return Fo(e,t,nt.fullFormats,Uo),e;let[r,s]=t.mode==="fast"?[nt.fastFormats,Dp]:[nt.fullFormats,Uo],n=t.formats||nt.formatNames;return Fo(e,n,r,s),t.keywords&&(0,Mp.default)(e),e};Hn.get=(e,t="full")=>{let s=(t==="fast"?nt.fastFormats:nt.fullFormats)[e];if(!s)throw new Error(`Unknown format "${e}"`);return s};function Fo(e,t,r,s){var n,a;(n=(a=e.opts.code).formats)!==null&&n!==void 0||(a.formats=(0,Gn._)`require("ajv-formats/dist/formats").${s}`);for(let i of t)e.addFormat(i,r[i])}Ko.exports=Mt=Hn;Object.defineProperty(Mt,"__esModule",{value:!0});Mt.default=Hn});var me=we(ot(),1),at=we(kr(),1);var Lt=we(ot(),1);var ea=we(ot(),1);var Xn="core/abilities",Qn=/^[a-z0-9-]+\/[a-z0-9-]+$/,qr=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,Dt="REGISTER_ABILITY",zt="UNREGISTER_ABILITY",Vt="REGISTER_ABILITY_CATEGORY",xt="UNREGISTER_ABILITY_CATEGORY";var nu=["name","label","description","category","input_schema","output_schema","meta","callback","permissionCallback"],au=["slug","label","description","meta"];function iu(e){return Object.keys(e).filter(t=>nu.includes(t)&&e[t]!==void 0).reduce((t,r)=>({...t,[r]:e[r]}),{})}function ou(e){return Object.keys(e).filter(t=>au.includes(t)&&e[t]!==void 0).reduce((t,r)=>({...t,[r]:e[r]}),{})}var uu={};function cu(e=uu,t){switch(t.type){case Dt:return t.ability?{...e,[t.ability.name]:iu(t.ability)}:e;case zt:{if(!e[t.name])return e;let{[t.name]:r,...s}=e;return s}default:return e}}var du={};function lu(e=du,t){switch(t.type){case Vt:return t.category?{...e,[t.category.slug]:ou(t.category)}:e;case xt:{if(!e[t.slug])return e;let{[t.slug]:r,...s}=e;return s}default:return e}}var ta=(0,ea.combineReducers)({abilitiesByName:cu,categoriesBySlug:lu});var Rr={};Jn(Rr,{registerAbility:()=>fu,registerAbilityCategory:()=>pu,unregisterAbility:()=>mu,unregisterAbilityCategory:()=>hu});var he=we(kr(),1);function ra(e,t){let r={};if(e)for(let s of t)e[s]!==void 0&&(r[s]=e[s]);return r}function fu(e){return({select:t,dispatch:r})=>{if(!e.name)throw new Error("Ability name is required");if(!Qn.test(e.name))throw new Error('Ability name must be a string containing a namespace prefix, i.e. "my-plugin/my-ability". It can only contain lowercase alphanumeric characters, dashes and the forward slash.');if(!e.label)throw new Error((0,he.sprintf)('Ability "%s" must have a label',e.name));if(!e.description)throw new Error((0,he.sprintf)('Ability "%s" must have a description',e.name));if(!e.category)throw new Error((0,he.sprintf)('Ability "%s" must have a category',e.name));if(!qr.test(e.category))throw new Error((0,he.sprintf)('Ability "%1$s" has an invalid category. Category must be lowercase alphanumeric with dashes only. Got: "%2$s"',e.name,e.category));if(!t.getAbilityCategories().find(u=>u.slug===e.category))throw new Error((0,he.sprintf)('Ability "%1$s" references non-existent category "%2$s". Please register the category first.',e.name,e.category));if(e.callback&&typeof e.callback!="function")throw new Error((0,he.sprintf)('Ability "%s" has an invalid callback. Callback must be a function',e.name));if(t.getAbility(e.name))throw new Error((0,he.sprintf)('Ability "%s" is already registered',e.name));let i=ra(e.meta?.annotations,["readonly","destructive","idempotent","serverRegistered","clientRegistered"]);i.serverRegistered||(i.clientRegistered=!0),r({type:Dt,ability:{...e,meta:{annotations:i}}})}}function mu(e){return{type:zt,name:e}}function pu(e,t){return({select:r,dispatch:s})=>{if(!e)throw new Error("Category slug is required");if(!qr.test(e))throw new Error("Category slug must contain only lowercase alphanumeric characters and dashes.");if(r.getAbilityCategory(e))throw new Error((0,he.sprintf)('Category "%s" is already registered.',e));if(!t.label||typeof t.label!="string")throw new Error("The category properties must contain a `label` string.");if(!t.description||typeof t.description!="string")throw new Error("The category properties must contain a `description` string.");if(t.meta!==void 0&&(typeof t.meta!="object"||Array.isArray(t.meta)))throw new Error("The category properties should provide a valid `meta` object.");let a=ra(t.meta?.annotations,["serverRegistered","clientRegistered"]);a.serverRegistered||(a.clientRegistered=!0);let i={annotations:a},o={slug:e,label:t.label,description:t.description,meta:i};s({type:Vt,category:o})}}function hu(e){return{type:xt,slug:e}}var Ar={};Jn(Ar,{getAbilities:()=>yu,getAbility:()=>_u,getAbilityCategories:()=>gu,getAbilityCategory:()=>$u});var jr=we(ot(),1),yu=(0,jr.createSelector)((e,{category:t}={})=>{let r=Object.values(e.abilitiesByName);return t?r.filter(s=>s.category===t):r},(e,{category:t}={})=>[e.abilitiesByName,t]);function _u(e,t){return e.abilitiesByName[t]}var gu=(0,jr.createSelector)(e=>Object.values(e.categoriesBySlug),e=>[e.categoriesBySlug]);function $u(e,t){return e.categoriesBySlug[t]}var ee=(0,Lt.createReduxStore)(Xn,{reducer:ta,actions:Rr,selectors:Ar});(0,Lt.register)(ee);var Yo=we(bo(),1),Bo=we(Go(),1),Jo=new Yo.default({coerceTypes:!1,useDefaults:!0,removeAdditional:!1,allErrors:!0,verbose:!0,allowUnionTypes:!0});(0,Bo.default)(Jo,["date-time","email","hostname","ipv4","ipv6","uuid"]);function Ho(e,t){let r=e.instancePath?e.instancePath.replace(/\//g,"][").replace(/^\]\[/,"[")+"]":"",s=t+r;switch(e.keyword){case"type":return`${s} is not of type ${e.params.type}.`;case"required":return`${e.params.missingProperty} is a required property of ${s}.`;case"additionalProperties":return`${e.params.additionalProperty} is not a valid property of Object.`;case"enum":let n=e.params.allowedValues.map(o=>typeof o=="string"?o:JSON.stringify(o)).join(", ");return e.params.allowedValues.length===1?`${s} is not ${n}.`:`${s} is not one of ${n}.`;case"pattern":return`${s} does not match pattern ${e.params.pattern}.`;case"format":let a=e.params.format;return{email:"Invalid email address.","date-time":"Invalid date.",uuid:`${s} is not a valid UUID.`,ipv4:`${s} is not a valid IP address.`,ipv6:`${s} is not a valid IP address.`,hostname:`${s} is not a valid hostname.`}[a]||`Invalid ${a}.`;case"minimum":case"exclusiveMinimum":return e.keyword==="exclusiveMinimum"?`${s} must be greater than ${e.params.limit}`:`${s} must be greater than or equal to ${e.params.limit}`;case"maximum":case"exclusiveMaximum":return e.keyword==="exclusiveMaximum"?`${s} must be less than ${e.params.limit}`:`${s} must be less than or equal to ${e.params.limit}`;case"multipleOf":return`${s} must be a multiple of ${e.params.multipleOf}.`;case"anyOf":case"oneOf":return`${s} is invalid (failed ${e.keyword} validation).`;case"minLength":return`${s} must be at least ${e.params.limit} character${e.params.limit===1?"":"s"} long.`;case"maxLength":return`${s} must be at most ${e.params.limit} character${e.params.limit===1?"":"s"} long.`;case"minItems":return`${s} must contain at least ${e.params.limit} item${e.params.limit===1?"":"s"}.`;case"maxItems":return`${s} must contain at most ${e.params.limit} item${e.params.limit===1?"":"s"}.`;case"uniqueItems":return`${s} has duplicate items.`;case"minProperties":return`${s} must contain at least ${e.params.limit} propert${e.params.limit===1?"y":"ies"}.`;case"maxProperties":return`${s} must contain at most ${e.params.limit} propert${e.params.limit===1?"y":"ies"}.`;default:return e.message||`${s} is invalid (failed ${e.keyword} validation).`}}function Pr(e,t,r=""){if(!t||typeof t!="object")return console.warn(`Schema must be an object. Received ${typeof t}.`),!0;if(!t.type&&!t.anyOf&&!t.oneOf)return console.warn(`The "type" schema keyword for ${r||"value"} is required.`),!0;try{let{default:s,...n}=t,a=Jo.compile(n);if(a(e===void 0?s:e))return!0;if(a.errors&&a.errors.length>0){let o=a.errors.find(u=>u.keyword==="anyOf"||u.keyword==="oneOf");return Ho(o||a.errors[0],r)}return`${r} is invalid.`}catch(s){return console.error("Schema compilation error:",s),"Invalid schema provided for validation."}}function zp(e={}){return(0,me.select)(ee).getAbilities(e)}function Wo(e){return(0,me.select)(ee).getAbility(e)}function Vp(){return(0,me.select)(ee).getAbilityCategories()}function xp(e){return(0,me.select)(ee).getAbilityCategory(e)}function Lp(e){(0,me.dispatch)(ee).registerAbility(e)}function Up(e){(0,me.dispatch)(ee).unregisterAbility(e)}function Fp(e,t){(0,me.dispatch)(ee).registerAbilityCategory(e,t)}function Kp(e){(0,me.dispatch)(ee).unregisterAbilityCategory(e)}async function Gp(e,t){let r=Wo(e);if(!r)throw new Error((0,at.sprintf)("Ability not found: %s",e));if(!r.callback)throw new Error((0,at.sprintf)('Ability "%s" is missing callback. Please ensure the ability is properly registered.',r.name));if(r.permissionCallback&&!await r.permissionCallback(t)){let a=new Error((0,at.sprintf)("Permission denied for ability: %s",r.name));throw a.code="ability_permission_denied",a}if(r.input_schema){let n=Pr(t,r.input_schema,"input");if(n!==!0){let a=new Error((0,at.sprintf)('Ability "%1$s" has invalid input. Reason: %2$s',r.name,n));throw a.code="ability_invalid_input",a}}let s;try{s=await r.callback(t)}catch(n){throw console.error(`Error executing ability ${r.name}:`,n),n}if(r.output_schema){let n=Pr(s,r.output_schema,"output");if(n!==!0){let a=new Error((0,at.sprintf)('Ability "%1$s" has invalid output. Reason: %2$s',r.name,n));throw a.code="ability_invalid_output",a}}return s}export{Gp as executeAbility,zp as getAbilities,Wo as getAbility,Vp as getAbilityCategories,xp as getAbilityCategory,Lp as registerAbility,Fp as registerAbilityCategory,ee as store,Up as unregisterAbility,Kp as unregisterAbilityCategory,Pr as validateValueFromSchema};
//# sourceMappingURL=index.min.js.map