yaml-flow 8.4.12 → 8.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,6 @@ import df from'ajv-formats';import {createRequire}from'module';var qi=Object.cre
5
5
  || ${i} === "boolean" || ${n} === null`).assign(a,(0, b._)`[${n}]`);}}}function Aa({gen:t,parentData:e,parentDataProperty:r},s){t.if((0, b._)`${e} !== undefined`,()=>t.assign((0, b._)`${e}[${r}]`,s));}function jr(t,e,r,s=Ce.Correct){let n=s===Ce.Correct?b.operators.EQ:b.operators.NEQ,o;switch(t){case "null":return (0, b._)`${e} ${n} null`;case "array":o=(0, b._)`Array.isArray(${e})`;break;case "object":o=(0, b._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case "integer":o=i((0, b._)`!(${e} % 1) && !isNaN(${e})`);break;case "number":o=i();break;default:return (0, b._)`typeof ${e} ${n} ${t}`}return s===Ce.Correct?o:(0, b.not)(o);function i(a=b.nil){return (0, b.and)((0, b._)`typeof ${e} == "number"`,a,r?(0, b._)`isFinite(${e})`:b.nil)}}F.checkDataType=jr;function qr(t,e,r,s){if(t.length===1)return jr(t[0],e,r,s);let n,o=(0, pn.toHash)(t);if(o.array&&o.object){let i=(0, b._)`typeof ${e} != "object"`;n=o.null?i:(0, b._)`!${e} || ${i}`,delete o.null,delete o.array,delete o.object;}else n=b.nil;o.number&&delete o.integer;for(let i in o)n=(0, b.and)(n,jr(i,e,r,s));return n}F.checkDataTypes=qr;var Ca={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0, b._)`{type: ${t}}`:(0, b._)`{type: ${e}}`};function Or(t){let e=Ma(t);(0, qa.reportError)(e,Ca);}F.reportTypeError=Or;function Ma(t){let{gen:e,data:r,schema:s}=t,n=(0, pn.schemaRefOrVal)(t,s,"type");return {gen:e,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:t}}});var _n=g(qt=>{Object.defineProperty(qt,"__esModule",{value:true});qt.assignDefaults=void 0;var Me=S(),Da=q();function Va(t,e){let{properties:r,items:s}=t.schema;if(e==="object"&&r)for(let n in r)yn(t,n,r[n].default);else e==="array"&&Array.isArray(s)&&s.forEach((n,o)=>yn(t,o,n.default));}qt.assignDefaults=Va;function yn(t,e,r){let{gen:s,compositeRule:n,data:o,opts:i}=t;if(r===void 0)return;let a=(0, Me._)`${o}${(0, Me.getProperty)(e)}`;if(n){(0, Da.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0, Me._)`${a} === undefined`;i.useDefaults==="empty"&&(c=(0, Me._)`${c} || ${a} === null || ${a} === ""`),s.if(c,(0, Me._)`${a} = ${(0, Me.stringify)(r)}`);}});var Q=g(T=>{Object.defineProperty(T,"__esModule",{value:true});T.validateUnion=T.validateArray=T.usePattern=T.callValidateCode=T.schemaProperties=T.allSchemaProperties=T.noPropertyInData=T.propertyInData=T.isOwnProperty=T.hasPropFunc=T.reportMissingProp=T.checkMissingProp=T.checkReportMissingProp=void 0;var C=S(),Rr=q(),ye=le(),xa=q();function za(t,e){let{gen:r,data:s,it:n}=t;r.if(Ir(r,s,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0, C._)`${e}`},true),t.error();});}T.checkReportMissingProp=za;function Ka({gen:t,data:e,it:{opts:r}},s,n){return (0, C.or)(...s.map(o=>(0, C.and)(Ir(t,e,o,r.ownProperties),(0, C._)`${n} = ${o}`)))}T.checkMissingProp=Ka;function Fa(t,e){t.setParams({missingProperty:e},true),t.error();}T.reportMissingProp=Fa;function gn(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0, C._)`Object.prototype.hasOwnProperty`})}T.hasPropFunc=gn;function Tr(t,e,r){return (0, C._)`${gn(t)}.call(${e}, ${r})`}T.isOwnProperty=Tr;function Ua(t,e,r,s){let n=(0, C._)`${e}${(0, C.getProperty)(r)} !== undefined`;return s?(0, C._)`${n} && ${Tr(t,e,r)}`:n}T.propertyInData=Ua;function Ir(t,e,r,s){let n=(0, C._)`${e}${(0, C.getProperty)(r)} === undefined`;return s?(0, C.or)(n,(0, C.not)(Tr(t,e,r))):n}T.noPropertyInData=Ir;function $n(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}T.allSchemaProperties=$n;function La(t,e){return $n(e).filter(r=>!(0, Rr.alwaysValidSchema)(t,e[r]))}T.schemaProperties=La;function Ha({schemaCode:t,data:e,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:o},it:i},a,c,u){let d=u?(0, C._)`${t}, ${e}, ${s}${n}`:e,l=[[ye.default.instancePath,(0, C.strConcat)(ye.default.instancePath,o)],[ye.default.parentData,i.parentData],[ye.default.parentDataProperty,i.parentDataProperty],[ye.default.rootData,ye.default.rootData]];i.opts.dynamicRef&&l.push([ye.default.dynamicAnchors,ye.default.dynamicAnchors]);let m=(0, C._)`${d}, ${r.object(...l)}`;return c!==C.nil?(0, C._)`${a}.call(${c}, ${m})`:(0, C._)`${a}(${m})`}T.callValidateCode=Ha;var Ga=(0, C._)`new RegExp`;function Ja({gen:t,it:{opts:e}},r){let s=e.unicodeRegExp?"u":"",{regExp:n}=e.code,o=n(r,s);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0, C._)`${n.code==="new RegExp"?Ga:(0, xa.useFunc)(t,n)}(${r}, ${s})`})}T.usePattern=Ja;function Wa(t){let{gen:e,data:r,keyword:s,it:n}=t,o=e.name("valid");if(n.allErrors){let a=e.let("valid",true);return i(()=>e.assign(a,false)),a}return e.var(o,true),i(()=>e.break()),o;function i(a){let c=e.const("len",(0, C._)`${r}.length`);e.forRange("i",0,c,u=>{t.subschema({keyword:s,dataProp:u,dataPropType:Rr.Type.Num},o),e.if((0, C.not)(o),a);});}}T.validateArray=Wa;function Ba(t){let{gen:e,schema:r,keyword:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0, Rr.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let i=e.let("valid",false),a=e.name("_valid");e.block(()=>r.forEach((c,u)=>{let d=t.subschema({keyword:s,schemaProp:u,compositeRule:true},a);e.assign(i,(0, C._)`${i} || ${a}`),t.mergeValidEvaluated(d,a)||e.if((0, C.not)(i));})),t.result(i,()=>t.reset(),()=>t.error(true));}T.validateUnion=Ba;});var bn=g(ne=>{Object.defineProperty(ne,"__esModule",{value:true});ne.validateKeywordUsage=ne.validSchemaType=ne.funcKeywordCode=ne.macroKeywordCode=void 0;var L=S(),Ne=le(),Qa=Q(),Xa=tt();function Ya(t,e){let{gen:r,keyword:s,schema:n,parentSchema:o,it:i}=t,a=e.macro.call(i.self,n,o,i),c=wn(r,s,a);i.opts.validateSchema!==false&&i.self.validateSchema(a,true);let u=r.name("valid");t.subschema({schema:a,schemaPath:L.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:c,compositeRule:true},u),t.pass(u,()=>t.error(true));}ne.macroKeywordCode=Ya;function Za(t,e){var r;let{gen:s,keyword:n,schema:o,parentSchema:i,$data:a,it:c}=t;tc(c,e);let u=!a&&e.compile?e.compile.call(c.self,o,i,c):e.validate,d=wn(s,n,u),l=s.let("valid");t.block$data(l,m),t.ok((r=e.valid)!==null&&r!==void 0?r:l);function m(){if(e.errors===false)f(),e.modifying&&vn(t),y(()=>t.error());else {let _=e.async?h():p();e.modifying&&vn(t),y(()=>ec(t,_));}}function h(){let _=s.let("ruleErrs",null);return s.try(()=>f((0, L._)`await `),j=>s.assign(l,false).if((0, L._)`${j} instanceof ${c.ValidationError}`,()=>s.assign(_,(0, L._)`${j}.errors`),()=>s.throw(j))),_}function p(){let _=(0, L._)`${d}.errors`;return s.assign(_,null),f(L.nil),_}function f(_=e.async?(0, L._)`await `:L.nil){let j=c.opts.passContext?Ne.default.this:Ne.default.self,N=!("compile"in e&&!a||e.schema===false);s.assign(l,(0, L._)`${_}${(0, Qa.callValidateCode)(t,d,j,N)}`,e.modifying);}function y(_){var j;s.if((0, L.not)((j=e.valid)!==null&&j!==void 0?j:l),_);}}ne.funcKeywordCode=Za;function vn(t){let{gen:e,data:r,it:s}=t;e.if(s.parentData,()=>e.assign(r,(0, L._)`${s.parentData}[${s.parentDataProperty}]`));}function ec(t,e){let{gen:r}=t;r.if((0, L._)`Array.isArray(${e})`,()=>{r.assign(Ne.default.vErrors,(0, L._)`${Ne.default.vErrors} === null ? ${e} : ${Ne.default.vErrors}.concat(${e})`).assign(Ne.default.errors,(0, L._)`${Ne.default.vErrors}.length`),(0, Xa.extendErrors)(t);},()=>t.error());}function tc({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function wn(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0, L.stringify)(r)})}function rc(t,e,r=false){return !e.length||e.some(s=>s==="array"?Array.isArray(t):s==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==s||r&&typeof t>"u")}ne.validSchemaType=rc;function sc({schema:t,opts:e,self:r,errSchemaPath:s},n,o){if(Array.isArray(n.keyword)?!n.keyword.includes(o):n.keyword!==o)throw new Error("ajv implementation error");let i=n.dependencies;if(i?.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${o}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[o])){let c=`keyword "${o}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}ne.validateKeywordUsage=sc;});var Sn=g(_e=>{Object.defineProperty(_e,"__esModule",{value:true});_e.extendSubschemaMode=_e.extendSubschemaData=_e.getSubschema=void 0;var oe=S(),En=q();function nc(t,{keyword:e,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:o,topSchemaRef:i}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return r===void 0?{schema:a,schemaPath:(0, oe._)`${t.schemaPath}${(0, oe.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[r],schemaPath:(0, oe._)`${t.schemaPath}${(0, oe.getProperty)(e)}${(0, oe.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0, En.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||o===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return {schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}_e.getSubschema=nc;function oc(t,e,{dataProp:r,dataPropType:s,data:n,dataTypes:o,propertyName:i}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(r!==void 0){let{errorPath:u,dataPathArr:d,opts:l}=e,m=a.let("data",(0, oe._)`${e.data}${(0, oe.getProperty)(r)}`,true);c(m),t.errorPath=(0, oe.str)`${u}${(0, En.getErrorPath)(r,s,l.jsPropertySyntax)}`,t.parentDataProperty=(0, oe._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty];}if(n!==void 0){let u=n instanceof oe.Name?n:a.let("data",n,true);c(u),i!==void 0&&(t.propertyName=i);}o&&(t.dataTypes=o);function c(u){t.data=u,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,u];}}_e.extendSubschemaData=oc;function ic(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:o}){s!==void 0&&(t.compositeRule=s),n!==void 0&&(t.createErrors=n),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r;}_e.extendSubschemaMode=ic;});var Ar=g((Cf,Pn)=>{Pn.exports=function t(e,r){if(e===r)return true;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return false;var s,n,o;if(Array.isArray(e)){if(s=e.length,s!=r.length)return false;for(n=s;n--!==0;)if(!t(e[n],r[n]))return false;return true}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),s=o.length,s!==Object.keys(r).length)return false;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return false;for(n=s;n--!==0;){var i=o[n];if(!t(e[i],r[i]))return false}return true}return e!==e&&r!==r};});var kn=g((Mf,Nn)=>{var ge=Nn.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Ot(e,s,n,t,"",t);};ge.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true};ge.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true};ge.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true};ge.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function Ot(t,e,r,s,n,o,i,a,c,u){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,o,i,a,c,u);for(var d in s){var l=s[d];if(Array.isArray(l)){if(d in ge.arrayKeywords)for(var m=0;m<l.length;m++)Ot(t,e,r,l[m],n+"/"+d+"/"+m,o,n,d,s,m);}else if(d in ge.propsKeywords){if(l&&typeof l=="object")for(var h in l)Ot(t,e,r,l[h],n+"/"+d+"/"+ac(h),o,n,d,s,h);}else (d in ge.keywords||t.allKeys&&!(d in ge.skipKeywords))&&Ot(t,e,r,l,n+"/"+d,o,n,d,s);}r(s,n,o,i,a,c,u);}}function ac(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var st=g(J=>{Object.defineProperty(J,"__esModule",{value:true});J.getSchemaRefs=J.resolveUrl=J.normalizeId=J._getFullPath=J.getFullPath=J.inlineRef=void 0;var cc=q(),uc=Ar(),dc=kn(),lc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function fc(t,e=true){return typeof t=="boolean"?true:e===true?!Cr(t):e?jn(t)<=e:false}J.inlineRef=fc;var pc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Cr(t){for(let e in t){if(pc.has(e))return true;let r=t[e];if(Array.isArray(r)&&r.some(Cr)||typeof r=="object"&&Cr(r))return true}return false}function jn(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!lc.has(r)&&(typeof t[r]=="object"&&(0, cc.eachItem)(t[r],s=>e+=jn(s)),e===1/0))return 1/0}return e}function qn(t,e="",r){r!==false&&(e=De(e));let s=t.parse(e);return On(t,s)}J.getFullPath=qn;function On(t,e){return t.serialize(e).split("#")[0]+"#"}J._getFullPath=On;var hc=/#\/?$/;function De(t){return t?t.replace(hc,""):""}J.normalizeId=De;function mc(t,e,r){return r=De(r),t.resolve(e,r)}J.resolveUrl=mc;var yc=/^[a-z_][-a-z0-9._]*$/i;function _c(t,e){if(typeof t=="boolean")return {};let{schemaId:r,uriResolver:s}=this.opts,n=De(t[r]||e),o={"":n},i=qn(s,n,false),a={},c=new Set;return dc(t,{allKeys:true},(l,m,h,p)=>{if(p===void 0)return;let f=i+m,y=o[p];typeof l[r]=="string"&&(y=_.call(this,l[r])),j.call(this,l.$anchor),j.call(this,l.$dynamicAnchor),o[m]=y;function _(N){let A=this.opts.uriResolver.resolve;if(N=De(y?A(y,N):N),c.has(N))throw d(N);c.add(N);let w=this.refs[N];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?u(l,w.schema,N):N!==De(f)&&(N[0]==="#"?(u(l,a[N],N),a[N]=l):this.refs[N]=f),N}function j(N){if(typeof N=="string"){if(!yc.test(N))throw new Error(`invalid anchor "${N}"`);_.call(this,`#${N}`);}}}),a;function u(l,m,h){if(m!==void 0&&!uc(l,m))throw d(h)}function d(l){return new Error(`reference "${l}" resolves to more than one schema`)}}J.getSchemaRefs=_c;});var it=g($e=>{Object.defineProperty($e,"__esModule",{value:true});$e.getData=$e.KeywordCxt=$e.validateFunctionCode=void 0;var Cn=dn(),Rn=rt(),Dr=kr(),Rt=rt(),gc=_n(),ot=bn(),Mr=Sn(),$=S(),v=le(),$c=st(),fe=q(),nt=tt();function vc(t){if(Vn(t)&&(xn(t),Dn(t))){Ec(t);return}Mn(t,()=>(0, Cn.topBoolOrEmptySchema)(t));}$e.validateFunctionCode=vc;function Mn({gen:t,validateName:e,schema:r,schemaEnv:s,opts:n},o){n.code.es5?t.func(e,(0, $._)`${v.default.data}, ${v.default.valCxt}`,s.$async,()=>{t.code((0, $._)`"use strict"; ${Tn(r,n)}`),bc(t,n),t.code(o);}):t.func(e,(0, $._)`${v.default.data}, ${wc(n)}`,s.$async,()=>t.code(Tn(r,n)).code(o));}function wc(t){return (0, $._)`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${t.dynamicRef?(0, $._)`, ${v.default.dynamicAnchors}={}`:$.nil}}={}`}function bc(t,e){t.if(v.default.valCxt,()=>{t.var(v.default.instancePath,(0, $._)`${v.default.valCxt}.${v.default.instancePath}`),t.var(v.default.parentData,(0, $._)`${v.default.valCxt}.${v.default.parentData}`),t.var(v.default.parentDataProperty,(0, $._)`${v.default.valCxt}.${v.default.parentDataProperty}`),t.var(v.default.rootData,(0, $._)`${v.default.valCxt}.${v.default.rootData}`),e.dynamicRef&&t.var(v.default.dynamicAnchors,(0, $._)`${v.default.valCxt}.${v.default.dynamicAnchors}`);},()=>{t.var(v.default.instancePath,(0, $._)`""`),t.var(v.default.parentData,(0, $._)`undefined`),t.var(v.default.parentDataProperty,(0, $._)`undefined`),t.var(v.default.rootData,v.default.data),e.dynamicRef&&t.var(v.default.dynamicAnchors,(0, $._)`{}`);});}function Ec(t){let{schema:e,opts:r,gen:s}=t;Mn(t,()=>{r.$comment&&e.$comment&&Kn(t),jc(t),s.let(v.default.vErrors,null),s.let(v.default.errors,0),r.unevaluated&&Sc(t),zn(t),Rc(t);});}function Sc(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0, $._)`${r}.evaluated`),e.if((0, $._)`${t.evaluated}.dynamicProps`,()=>e.assign((0, $._)`${t.evaluated}.props`,(0, $._)`undefined`)),e.if((0, $._)`${t.evaluated}.dynamicItems`,()=>e.assign((0, $._)`${t.evaluated}.items`,(0, $._)`undefined`));}function Tn(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0, $._)`/*# sourceURL=${r} */`:$.nil}function Pc(t,e){if(Vn(t)&&(xn(t),Dn(t))){Nc(t,e);return}(0, Cn.boolOrEmptySchema)(t,e);}function Dn({schema:t,self:e}){if(typeof t=="boolean")return !t;for(let r in t)if(e.RULES.all[r])return true;return false}function Vn(t){return typeof t.schema!="boolean"}function Nc(t,e){let{schema:r,gen:s,opts:n}=t;n.$comment&&r.$comment&&Kn(t),qc(t),Oc(t);let o=s.const("_errs",v.default.errors);zn(t,o),s.var(e,(0, $._)`${o} === ${v.default.errors}`);}function xn(t){(0, fe.checkUnknownRules)(t),kc(t);}function zn(t,e){if(t.opts.jtd)return In(t,[],false,e);let r=(0, Rn.getSchemaTypes)(t.schema),s=(0, Rn.coerceAndCheckDataType)(t,r);In(t,r,!s,e);}function kc(t){let{schema:e,errSchemaPath:r,opts:s,self:n}=t;e.$ref&&s.ignoreKeywordsWithRef&&(0, fe.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`);}function jc(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0, fe.checkStrictMode)(t,"default is ignored in the schema root");}function qc(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0, $c.resolveUrl)(t.opts.uriResolver,t.baseId,e));}function Oc(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function Kn({gen:t,schemaEnv:e,schema:r,errSchemaPath:s,opts:n}){let o=r.$comment;if(n.$comment===true)t.code((0, $._)`${v.default.self}.logger.log(${o})`);else if(typeof n.$comment=="function"){let i=(0, $.str)`${s}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0, $._)`${v.default.self}.opts.$comment(${o}, ${i}, ${a}.schema)`);}}function Rc(t){let{gen:e,schemaEnv:r,validateName:s,ValidationError:n,opts:o}=t;r.$async?e.if((0, $._)`${v.default.errors} === 0`,()=>e.return(v.default.data),()=>e.throw((0, $._)`new ${n}(${v.default.vErrors})`)):(e.assign((0, $._)`${s}.errors`,v.default.vErrors),o.unevaluated&&Tc(t),e.return((0, $._)`${v.default.errors} === 0`));}function Tc({gen:t,evaluated:e,props:r,items:s}){r instanceof $.Name&&t.assign((0, $._)`${e}.props`,r),s instanceof $.Name&&t.assign((0, $._)`${e}.items`,s);}function In(t,e,r,s){let{gen:n,schema:o,data:i,allErrors:a,opts:c,self:u}=t,{RULES:d}=u;if(o.$ref&&(c.ignoreKeywordsWithRef||!(0, fe.schemaHasRulesButRef)(o,d))){n.block(()=>Un(t,"$ref",d.all.$ref.definition));return}c.jtd||Ic(t,e),n.block(()=>{for(let m of d.rules)l(m);l(d.post);});function l(m){(0, Dr.shouldUseGroup)(o,m)&&(m.type?(n.if((0, Rt.checkDataType)(m.type,i,c.strictNumbers)),An(t,m),e.length===1&&e[0]===m.type&&r&&(n.else(),(0, Rt.reportTypeError)(t)),n.endIf()):An(t,m),a||n.if((0, $._)`${v.default.errors} === ${s||0}`));}}function An(t,e){let{gen:r,schema:s,opts:{useDefaults:n}}=t;n&&(0, gc.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0, Dr.shouldUseRule)(s,o)&&Un(t,o.keyword,o.definition,e.type);});}function Ic(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Ac(t,e),t.opts.allowUnionTypes||Cc(t,e),Mc(t,t.dataTypes));}function Ac(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Fn(t.dataTypes,r)||Vr(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`);}),Vc(t,e);}}function Cc(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Vr(t,"use allowUnionTypes to allow union type keyword");}function Mc(t,e){let r=t.self.RULES.all;for(let s in r){let n=r[s];if(typeof n=="object"&&(0, Dr.shouldUseRule)(t.schema,n)){let{type:o}=n.definition;o.length&&!o.some(i=>Dc(e,i))&&Vr(t,`missing type "${o.join(",")}" for keyword "${s}"`);}}}function Dc(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Fn(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Vc(t,e){let r=[];for(let s of t.dataTypes)Fn(e,s)?r.push(s):e.includes("integer")&&s==="number"&&r.push("integer");t.dataTypes=r;}function Vr(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0, fe.checkStrictMode)(t,e,t.opts.strictTypes);}var Tt=class{constructor(e,r,s){if((0, ot.validateKeywordUsage)(e,r,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0, fe.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Ln(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0, ot.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!==false)&&(this.errsCount=e.gen.const("_errs",v.default.errors));}result(e,r,s){this.failResult((0, $.not)(e),r,s);}failResult(e,r,s){this.gen.if(e),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else();}pass(e,r){this.failResult((0, $.not)(e),void 0,r);}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(false);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else();}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:r}=this;this.fail((0, $._)`${r} !== undefined && (${(0, $.or)(this.invalid$data(),e)})`);}error(e,r,s){if(r){this.setParams(r),this._error(e,s),this.setParams({});return}this._error(e,s);}_error(e,r){(e?nt.reportExtraError:nt.reportError)(this,this.def.error,r);}$dataError(){(0, nt.reportError)(this,this.def.$dataError||nt.keyword$DataError);}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0, nt.resetErrorsCount)(this.gen,this.errsCount);}ok(e){this.allErrors||this.gen.if(e);}setParams(e,r){r?Object.assign(this.params,e):this.params=e;}block$data(e,r,s=$.nil){this.gen.block(()=>{this.check$data(e,s),r();});}check$data(e=$.nil,r=$.nil){if(!this.$data)return;let{gen:s,schemaCode:n,schemaType:o,def:i}=this;s.if((0, $.or)((0, $._)`${n} === undefined`,r)),e!==$.nil&&s.assign(e,true),(o.length||i.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==$.nil&&s.assign(e,false)),s.else();}invalid$data(){let{gen:e,schemaCode:r,schemaType:s,def:n,it:o}=this;return (0, $.or)(i(),a());function i(){if(s.length){if(!(r instanceof $.Name))throw new Error("ajv implementation error");let c=Array.isArray(s)?s:[s];return (0, $._)`${(0, Rt.checkDataTypes)(c,r,o.opts.strictNumbers,Rt.DataType.Wrong)}`}return $.nil}function a(){if(n.validateSchema){let c=e.scopeValue("validate$data",{ref:n.validateSchema});return (0, $._)`!${c}(${r})`}return $.nil}}subschema(e,r){let s=(0, Mr.getSubschema)(this.it,e);(0, Mr.extendSubschemaData)(s,this.it,e),(0, Mr.extendSubschemaMode)(s,e);let n={...this.it,...s,items:void 0,props:void 0};return Pc(n,r),n}mergeEvaluated(e,r){let{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==true&&e.props!==void 0&&(s.props=fe.mergeEvaluated.props(n,e.props,s.props,r)),s.items!==true&&e.items!==void 0&&(s.items=fe.mergeEvaluated.items(n,e.items,s.items,r)));}mergeValidEvaluated(e,r){let{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==true||s.items!==true))return n.if(r,()=>this.mergeEvaluated(e,$.Name)),true}};$e.KeywordCxt=Tt;function Un(t,e,r,s){let n=new Tt(t,r,e);"code"in r?r.code(n,s):n.$data&&r.validate?(0, ot.funcKeywordCode)(n,r):"macro"in r?(0, ot.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0, ot.funcKeywordCode)(n,r);}var xc=/^\/(?:[^~]|~0|~1)*$/,zc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ln(t,{dataLevel:e,dataNames:r,dataPathArr:s}){let n,o;if(t==="")return v.default.rootData;if(t[0]==="/"){if(!xc.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,o=v.default.rootData;}else {let u=zc.exec(t);if(!u)throw new Error(`Invalid JSON-pointer: ${t}`);let d=+u[1];if(n=u[2],n==="#"){if(d>=e)throw new Error(c("property/index",d));return s[e-d]}if(d>e)throw new Error(c("data",d));if(o=r[e-d],!n)return o}let i=o,a=n.split("/");for(let u of a)u&&(o=(0, $._)`${o}${(0, $.getProperty)((0, fe.unescapeJsonPointer)(u))}`,i=(0, $._)`${i} && ${o}`);return i;function c(u,d){return `Cannot access ${u} ${d} levels up, current level is ${e}`}}$e.getData=Ln;});var It=g(zr=>{Object.defineProperty(zr,"__esModule",{value:true});var xr=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=true;}};zr.default=xr;});var at=g(Ur=>{Object.defineProperty(Ur,"__esModule",{value:true});var Kr=st(),Fr=class extends Error{constructor(e,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0, Kr.resolveUrl)(e,r,s),this.missingSchema=(0, Kr.normalizeId)((0, Kr.getFullPath)(e,this.missingRef));}};Ur.default=Fr;});var Ct=g(X=>{Object.defineProperty(X,"__esModule",{value:true});X.resolveSchema=X.getCompilingSchema=X.resolveRef=X.compileSchema=X.SchemaEnv=void 0;var ee=S(),Kc=It(),ke=le(),te=st(),Hn=q(),Fc=it(),Ve=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0, te.normalizeId)(s?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s?.$async,this.refs={};}};X.SchemaEnv=Ve;function Hr(t){let e=Gn.call(this,t);if(e)return e;let r=(0, te.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:o}=this.opts,i=new ee.CodeGen(this.scope,{es5:s,lines:n,ownProperties:o}),a;t.$async&&(a=i.scopeValue("Error",{ref:Kc.default,code:(0, ee._)`require("ajv/dist/runtime/validation_error").default`}));let c=i.scopeName("validate");t.validateName=c;let u={gen:i,allErrors:this.opts.allErrors,data:ke.default.data,parentData:ke.default.parentData,parentDataProperty:ke.default.parentDataProperty,dataNames:[ke.default.data],dataPathArr:[ee.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===true?{ref:t.schema,code:(0, ee.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:ee.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0, ee._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(t),(0,Fc.validateFunctionCode)(u),i.optimize(this.opts.code.optimize);let l=i.toString();d=`${i.scopeRefs(ke.default.scope)}return ${l}`,this.opts.code.process&&(d=this.opts.code.process(d,t));let h=new Function(`${ke.default.self}`,`${ke.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=t.schema,h.schemaEnv=t,t.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:l,scopeValues:i._values}),this.opts.unevaluated){let{props:p,items:f}=u;h.evaluated={props:p instanceof ee.Name?void 0:p,items:f instanceof ee.Name?void 0:f,dynamicProps:p instanceof ee.Name,dynamicItems:f instanceof ee.Name},h.source&&(h.source.evaluated=(0,ee.stringify)(h.evaluated));}return t.validate=h,t}catch(l){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),l}finally{this._compilations.delete(t);}}X.compileSchema=Hr;function Uc(t,e,r){var s;r=(0, te.resolveUrl)(this.opts.uriResolver,e,r);let n=t.refs[r];if(n)return n;let o=Gc.call(this,t,r);if(o===void 0){let i=(s=t.localRefs)===null||s===void 0?void 0:s[r],{schemaId:a}=this.opts;i&&(o=new Ve({schema:i,schemaId:a,root:t,baseId:e}));}if(o!==void 0)return t.refs[r]=Lc.call(this,o)}X.resolveRef=Uc;function Lc(t){return (0, te.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Hr.call(this,t)}function Gn(t){for(let e of this._compilations)if(Hc(e,t))return e}X.getCompilingSchema=Gn;function Hc(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Gc(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||At.call(this,t,e)}function At(t,e){let r=this.opts.uriResolver.parse(e),s=(0, te._getFullPath)(this.opts.uriResolver,r),n=(0, te.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&s===n)return Lr.call(this,r,t);let o=(0, te.normalizeId)(s),i=this.refs[o]||this.schemas[o];if(typeof i=="string"){let a=At.call(this,t,i);return typeof a?.schema!="object"?void 0:Lr.call(this,r,a)}if(typeof i?.schema=="object"){if(i.validate||Hr.call(this,i),o===(0, te.normalizeId)(e)){let{schema:a}=i,{schemaId:c}=this.opts,u=a[c];return u&&(n=(0, te.resolveUrl)(this.opts.uriResolver,n,u)),new Ve({schema:a,schemaId:c,root:t,baseId:n})}return Lr.call(this,r,i)}}X.resolveSchema=At;var Jc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Lr(t,{baseId:e,schema:r,root:s}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0, Hn.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!Jc.has(a)&&u&&(e=(0, te.resolveUrl)(this.opts.uriResolver,e,u));}let o;if(typeof r!="boolean"&&r.$ref&&!(0, Hn.schemaHasRulesButRef)(r,this.RULES)){let a=(0, te.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=At.call(this,s,a);}let{schemaId:i}=this.opts;if(o=o||new Ve({schema:r,schemaId:i,root:s,baseId:e}),o.schema!==o.root.schema)return o}});var Jn=g((Ff,Wc)=>{Wc.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:false};});var Jr=g((Uf,Xn)=>{var Bc=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Bn=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function Gr(t){let e="",r=0,s=0;for(s=0;s<t.length;s++)if(r=t[s].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return "";e+=t[s];break}for(s+=1;s<t.length;s++){if(r=t[s].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return "";e+=t[s];}return e}var Qc=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Wn(t){return t.length=0,true}function Xc(t,e,r){if(t.length){let s=Gr(t);if(s!=="")e.push(s);else return r.error=true,false;t.length=0;}return true}function Yc(t){let e=0,r={error:false,address:"",zone:""},s=[],n=[],o=false,i=false,a=Xc;for(let c=0;c<t.length;c++){let u=t[c];if(!(u==="["||u==="]"))if(u===":"){if(o===true&&(i=true),!a(n,s,r))break;if(++e>7){r.error=true;break}c>0&&t[c-1]===":"&&(o=true),s.push(":");continue}else if(u==="%"){if(!a(n,s,r))break;a=Wn;}else {n.push(u);continue}}return n.length&&(a===Wn?r.zone=n.join(""):i?s.push(n.join("")):s.push(Gr(n))),r.address=s.join(""),r}function Qn(t){if(Zc(t,":")<2)return {host:t,isIPV6:false};let e=Yc(t);if(e.error)return {host:t,isIPV6:false};{let r=e.address,s=e.address;return e.zone&&(r+="%"+e.zone,s+="%25"+e.zone),{host:r,isIPV6:true,escapedHost:s}}}function Zc(t,e){let r=0;for(let s=0;s<t.length;s++)t[s]===e&&r++;return r}function eu(t){let e=t,r=[],s=-1,n=0;for(;n=e.length;){if(n===1){if(e===".")break;if(e==="/"){r.push("/");break}else {r.push(e);break}}else if(n===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(n===3&&e==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),r.length!==0&&r.pop();continue}}if((s=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,s)),e=e.slice(s);}return r.join("")}function tu(t,e){let r=e!==true?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function ru(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!Bn(r)){let s=Qn(r);s.isIPV6===true?r=`[${s.escapedHost}]`:r=t.host;}e.push(r);}return (typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Xn.exports={nonSimpleDomain:Qc,recomposeAuthority:ru,normalizeComponentEncoding:tu,removeDotSegments:eu,isIPv4:Bn,isUUID:Bc,normalizeIPv6:Qn,stringArrayToHexStripped:Gr};});var ro=g((Lf,to)=>{var{isUUID:su}=Jr(),nu=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,ou=["http","https","ws","wss","urn","urn:uuid"];function iu(t){return ou.indexOf(t)!==-1}function Wr(t){return t.secure===true?true:t.secure===false?false:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):false}function Yn(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function Zn(t){let e=String(t.scheme).toLowerCase()==="https";return (t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function au(t){return t.secure=Wr(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function cu(t){if((t.port===(Wr(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0;}return t.fragment=void 0,t}function uu(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(nu);if(r){let s=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let n=`${s}:${e.nid||t.nid}`,o=Br(n);t.path=void 0,o&&(t=o.parse(t,e));}else t.error=t.error||"URN can not be parsed.";return t}function du(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",s=t.nid.toLowerCase(),n=`${r}:${e.nid||s}`,o=Br(n);o&&(t=o.serialize(t,e));let i=t,a=t.nss;return i.path=`${s||e.nid}:${a}`,e.skipEscape=true,i}function lu(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!su(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function fu(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var eo={scheme:"http",domainHost:true,parse:Yn,serialize:Zn},pu={scheme:"https",domainHost:eo.domainHost,parse:Yn,serialize:Zn},Mt={scheme:"ws",domainHost:true,parse:au,serialize:cu},hu={scheme:"wss",domainHost:Mt.domainHost,parse:Mt.parse,serialize:Mt.serialize},mu={scheme:"urn",parse:uu,serialize:du,skipNormalize:true},yu={scheme:"urn:uuid",parse:lu,serialize:fu,skipNormalize:true},Dt={http:eo,https:pu,ws:Mt,wss:hu,urn:mu,"urn:uuid":yu};Object.setPrototypeOf(Dt,null);function Br(t){return t&&(Dt[t]||Dt[t.toLowerCase()])||void 0}to.exports={wsIsSecure:Wr,SCHEMES:Dt,isValidSchemeName:iu,getSchemeHandler:Br};});var oo=g((Hf,xt)=>{var{normalizeIPv6:_u,removeDotSegments:ct,recomposeAuthority:gu,normalizeComponentEncoding:Vt,isIPv4:$u,nonSimpleDomain:vu}=Jr(),{SCHEMES:wu,getSchemeHandler:so}=ro();function bu(t,e){return typeof t=="string"?t=ie(pe(t,e),e):typeof t=="object"&&(t=pe(ie(t,e),e)),t}function Eu(t,e,r){let s=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=no(pe(t,s),pe(e,s),s,true);return s.skipEscape=true,ie(n,s)}function no(t,e,r,s){let n={};return s||(t=pe(ie(t,r),r),e=pe(ie(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(n.scheme=e.scheme,n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=ct(e.path||""),n.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(n.userinfo=e.userinfo,n.host=e.host,n.port=e.port,n.path=ct(e.path||""),n.query=e.query):(e.path?(e.path[0]==="/"?n.path=ct(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?n.path="/"+e.path:t.path?n.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:n.path=e.path,n.path=ct(n.path)),n.query=e.query):(n.path=t.path,e.query!==void 0?n.query=e.query:n.query=t.query),n.userinfo=t.userinfo,n.host=t.host,n.port=t.port),n.scheme=t.scheme),n.fragment=e.fragment,n}function Su(t,e,r){return typeof t=="string"?(t=unescape(t),t=ie(Vt(pe(t,r),true),{...r,skipEscape:true})):typeof t=="object"&&(t=ie(Vt(t,true),{...r,skipEscape:true})),typeof e=="string"?(e=unescape(e),e=ie(Vt(pe(e,r),true),{...r,skipEscape:true})):typeof e=="object"&&(e=ie(Vt(e,true),{...r,skipEscape:true})),t.toLowerCase()===e.toLowerCase()}function ie(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},s=Object.assign({},e),n=[],o=so(s.scheme||r.scheme);o&&o.serialize&&o.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,":");let i=gu(r);if(i!==void 0&&(s.reference!=="suffix"&&n.push("//"),n.push(i),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let a=r.path;!s.absolutePath&&(!o||!o.absolutePath)&&(a=ct(a)),i===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),n.push(a);}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}var Pu=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function pe(t,e){let r=Object.assign({},e),s={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=false;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let o=t.match(Pu);if(o){if(s.scheme=o[1],s.userinfo=o[3],s.host=o[4],s.port=parseInt(o[5],10),s.path=o[6]||"",s.query=o[7],s.fragment=o[8],isNaN(s.port)&&(s.port=o[5]),s.host)if($u(s.host)===false){let c=_u(s.host);s.host=c.host.toLowerCase(),n=c.isIPV6;}else n=true;s.scheme===void 0&&s.userinfo===void 0&&s.host===void 0&&s.port===void 0&&s.query===void 0&&!s.path?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 i=so(r.scheme||s.scheme);if(!r.unicodeSupport&&(!i||!i.unicodeSupport)&&s.host&&(r.domainHost||i&&i.domainHost)&&n===false&&vu(s.host))try{s.host=URL.domainToASCII(s.host.toLowerCase());}catch(a){s.error=s.error||"Host's domain name can not be converted to ASCII: "+a;}(!i||i&&!i.skipNormalize)&&(t.indexOf("%")!==-1&&(s.scheme!==void 0&&(s.scheme=unescape(s.scheme)),s.host!==void 0&&(s.host=unescape(s.host))),s.path&&(s.path=escape(unescape(s.path))),s.fragment&&(s.fragment=encodeURI(decodeURIComponent(s.fragment)))),i&&i.parse&&i.parse(s,r);}else s.error=s.error||"URI can not be parsed.";return s}var Qr={SCHEMES:wu,normalize:bu,resolve:Eu,resolveComponent:no,equal:Su,serialize:ie,parse:pe};xt.exports=Qr;xt.exports.default=Qr;xt.exports.fastUri=Qr;});var ao=g(Xr=>{Object.defineProperty(Xr,"__esModule",{value:true});var io=oo();io.code='require("ajv/dist/runtime/uri").default';Xr.default=io;});var yo=g(V=>{Object.defineProperty(V,"__esModule",{value:true});V.CodeGen=V.Name=V.nil=V.stringify=V.str=V._=V.KeywordCxt=void 0;var Nu=it();Object.defineProperty(V,"KeywordCxt",{enumerable:true,get:function(){return Nu.KeywordCxt}});var xe=S();Object.defineProperty(V,"_",{enumerable:true,get:function(){return xe._}});Object.defineProperty(V,"str",{enumerable:true,get:function(){return xe.str}});Object.defineProperty(V,"stringify",{enumerable:true,get:function(){return xe.stringify}});Object.defineProperty(V,"nil",{enumerable:true,get:function(){return xe.nil}});Object.defineProperty(V,"Name",{enumerable:true,get:function(){return xe.Name}});Object.defineProperty(V,"CodeGen",{enumerable:true,get:function(){return xe.CodeGen}});var ku=It(),po=at(),ju=Nr(),ut=Ct(),qu=S(),dt=st(),zt=rt(),Zr=q(),co=Jn(),Ou=ao(),ho=(t,e)=>new RegExp(t,e);ho.code="new RegExp";var Ru=["removeAdditional","useDefaults","coerceTypes"],Tu=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Iu={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."},Au={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},uo=200;function Cu(t){var e,r,s,n,o,i,a,c,u,d,l,m,h,p,f,y,_,j,N,A,w,se,ce,rr,sr;let Ge=t.strict,nr=(e=t.code)===null||e===void 0?void 0:e.optimize,Ls=nr===true||nr===void 0?1:nr||0,Hs=(s=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&s!==void 0?s:ho,ji=(n=t.uriResolver)!==null&&n!==void 0?n:Ou.default;return {strictSchema:(i=(o=t.strictSchema)!==null&&o!==void 0?o:Ge)!==null&&i!==void 0?i:true,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:Ge)!==null&&c!==void 0?c:true,strictTypes:(d=(u=t.strictTypes)!==null&&u!==void 0?u:Ge)!==null&&d!==void 0?d:"log",strictTuples:(m=(l=t.strictTuples)!==null&&l!==void 0?l:Ge)!==null&&m!==void 0?m:"log",strictRequired:(p=(h=t.strictRequired)!==null&&h!==void 0?h:Ge)!==null&&p!==void 0?p:false,code:t.code?{...t.code,optimize:Ls,regExp:Hs}:{optimize:Ls,regExp:Hs},loopRequired:(f=t.loopRequired)!==null&&f!==void 0?f:uo,loopEnum:(y=t.loopEnum)!==null&&y!==void 0?y:uo,meta:(_=t.meta)!==null&&_!==void 0?_:true,messages:(j=t.messages)!==null&&j!==void 0?j:true,inlineRefs:(N=t.inlineRefs)!==null&&N!==void 0?N:true,schemaId:(A=t.schemaId)!==null&&A!==void 0?A:"$id",addUsedSchema:(w=t.addUsedSchema)!==null&&w!==void 0?w:true,validateSchema:(se=t.validateSchema)!==null&&se!==void 0?se:true,validateFormats:(ce=t.validateFormats)!==null&&ce!==void 0?ce:true,unicodeRegExp:(rr=t.unicodeRegExp)!==null&&rr!==void 0?rr:true,int32range:(sr=t.int32range)!==null&&sr!==void 0?sr:true,uriResolver:ji}}var lt=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Cu(e)};let{es5:r,lines:s}=this.opts.code;this.scope=new qu.ValueScope({scope:{},prefixes:Tu,es5:r,lines:s}),this.logger=Ku(e.logger);let n=e.validateFormats;e.validateFormats=false,this.RULES=(0, ju.getRules)(),lo.call(this,Iu,e,"NOT SUPPORTED"),lo.call(this,Au,e,"DEPRECATED","warn"),this._metaOpts=xu.call(this),e.formats&&Du.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Vu.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Mu.call(this),e.validateFormats=n;}_addVocabularies(){this.addKeyword("$async");}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:s}=this.opts,n=co;s==="id"&&(n={...co},n.id=n.$id,delete n.$id),r&&e&&this.addMetaSchema(n,n[s],false);}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let s;if(typeof e=="string"){if(s=this.getSchema(e),!s)throw new Error(`no schema with key or ref "${e}"`)}else s=this.compile(e);let n=s(r);return "$async"in s||(this.errors=s.errors),n}compile(e,r){let s=this._addSchema(e,r);return s.validate||this._compileSchemaEnv(s)}compileAsync(e,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,e,r);async function n(d,l){await o.call(this,d.$schema);let m=this._addSchema(d,l);return m.validate||i.call(this,m)}async function o(d){d&&!this.getSchema(d)&&await n.call(this,{$ref:d},true);}async function i(d){try{return this._compileSchemaEnv(d)}catch(l){if(!(l instanceof po.default))throw l;return a.call(this,l),await c.call(this,l.missingSchema),i.call(this,d)}}function a({missingSchema:d,missingRef:l}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${l} cannot be resolved`)}async function c(d){let l=await u.call(this,d);this.refs[d]||await o.call(this,l.$schema),this.refs[d]||this.addSchema(l,d,r);}async function u(d){let l=this._loading[d];if(l)return l;try{return await(this._loading[d]=s(d))}finally{delete this._loading[d];}}}addSchema(e,r,s,n=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,s,n);return this}let o;if(typeof e=="object"){let{schemaId:i}=this.opts;if(o=e[i],o!==void 0&&typeof o!="string")throw new Error(`schema ${i} must be string`)}return r=(0, dt.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,s,r,n,true),this}addMetaSchema(e,r,s=this.opts.validateSchema){return this.addSchema(e,r,true,s),this}validateSchema(e,r){if(typeof e=="boolean")return true;let s;if(s=e.$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,true;let n=this.validate(s,e);if(!n&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return n}getSchema(e){let r;for(;typeof(r=fo.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:s}=this.opts,n=new ut.SchemaEnv({schema:{},schemaId:s});if(r=ut.resolveSchema.call(this,n,e),!r)return;this.refs[e]=r;}return r.validate||this._compileSchemaEnv(r)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case "undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case "string":{let r=fo.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case "object":{let r=e;this._cache.delete(r);let s=e[this.opts.schemaId];return s&&(s=(0, dt.normalizeId)(s),delete this.schemas[s],delete this.refs[s]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let s;if(typeof e=="string")s=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=s);else if(typeof e=="object"&&r===void 0){if(r=e,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(Uu.call(this,s,r),!r)return (0, Zr.eachItem)(s,o=>Yr.call(this,o)),this;Hu.call(this,r);let n={...r,type:(0, zt.getJSONTypes)(r.type),schemaType:(0, zt.getJSONTypes)(r.schemaType)};return (0, Zr.eachItem)(s,n.type.length===0?o=>Yr.call(this,o,n):o=>n.type.forEach(i=>Yr.call(this,o,n,i))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let s of r.rules){let n=s.rules.findIndex(o=>o.keyword===e);n>=0&&s.rules.splice(n,1);}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:s="data"}={}){return !e||e.length===0?"No errors":e.map(n=>`${s}${n.instancePath} ${n.message}`).reduce((n,o)=>n+r+o)}$dataMetaSchema(e,r){let s=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let n of r){let o=n.split("/").slice(1),i=e;for(let a of o)i=i[a];for(let a in s){let c=s[a];if(typeof c!="object")continue;let{$data:u}=c.definition,d=i[a];u&&d&&(i[a]=mo(d));}}return e}_removeAllSchemas(e,r){for(let s in e){let n=e[s];(!r||r.test(s))&&(typeof n=="string"?delete e[s]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[s]));}}_addSchema(e,r,s,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i,{schemaId:a}=this.opts;if(typeof e=="object")i=e[a];else {if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;s=(0, dt.normalizeId)(i||s);let u=dt.getSchemaRefs.call(this,e,s);return c=new ut.SchemaEnv({schema:e,schemaId:a,meta:r,baseId:s,localRefs:u}),this._cache.set(c.schema,c),o&&!s.startsWith("#")&&(s&&this._checkUnique(s),this.refs[s]=c),n&&this.validateSchema(e,true),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):ut.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{ut.compileSchema.call(this,e);}finally{this.opts=r;}}};lt.ValidationError=ku.default;lt.MissingRefError=po.default;V.default=lt;function lo(t,e,r,s="error"){for(let n in t){let o=n;o in e&&this.logger[s](`${r}: option ${n}. ${t[o]}`);}}function fo(t){return t=(0, dt.normalizeId)(t),this.schemas[t]||this.refs[t]}function Mu(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e);}function Du(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e);}}function Vu(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r);}}function xu(){let t={...this.opts};for(let e of Ru)delete t[e];return t}var zu={log(){},warn(){},error(){}};function Ku(t){if(t===false)return zu;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var Fu=/^[a-z_$][a-z0-9_$:-]*$/i;function Uu(t,e){let{RULES:r}=this;if((0, Zr.eachItem)(t,s=>{if(r.keywords[s])throw new Error(`Keyword ${s} is already defined`);if(!Fu.test(s))throw new Error(`Keyword ${s} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Yr(t,e,r){var s;let n=e?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,i=n?o.post:o.rules.find(({type:c})=>c===r);if(i||(i={type:r,rules:[]},o.rules.push(i)),o.keywords[t]=true,!e)return;let a={keyword:t,definition:{...e,type:(0, zt.getJSONTypes)(e.type),schemaType:(0, zt.getJSONTypes)(e.schemaType)}};e.before?Lu.call(this,i,a,e.before):i.rules.push(a),o.all[t]=a,(s=e.implements)===null||s===void 0||s.forEach(c=>this.addKeyword(c));}function Lu(t,e,r){let s=t.rules.findIndex(n=>n.keyword===r);s>=0?t.rules.splice(s,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`));}function Hu(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=mo(e)),t.validateSchema=this.compile(e,true));}var Gu={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function mo(t){return {anyOf:[t,Gu]}}});var _o=g(es=>{Object.defineProperty(es,"__esModule",{value:true});var Ju={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};es.default=Ju;});var wo=g(je=>{Object.defineProperty(je,"__esModule",{value:true});je.callRef=je.getValidate=void 0;var Wu=at(),go=Q(),W=S(),ze=le(),$o=Ct(),Kt=q(),Bu={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:s}=t,{baseId:n,schemaEnv:o,validateName:i,opts:a,self:c}=s,{root:u}=o;if((r==="#"||r==="#/")&&n===u.baseId)return l();let d=$o.resolveRef.call(c,u,n,r);if(d===void 0)throw new Wu.default(s.opts.uriResolver,n,r);if(d instanceof $o.SchemaEnv)return m(d);return h(d);function l(){if(o===u)return Ft(t,i,o,o.$async);let p=e.scopeValue("root",{ref:u});return Ft(t,(0, W._)`${p}.validate`,u,u.$async)}function m(p){let f=vo(t,p);Ft(t,f,p,p.$async);}function h(p){let f=e.scopeValue("schema",a.code.source===true?{ref:p,code:(0, W.stringify)(p)}:{ref:p}),y=e.name("valid"),_=t.subschema({schema:p,dataTypes:[],schemaPath:W.nil,topSchemaRef:f,errSchemaPath:r},y);t.mergeEvaluated(_),t.ok(y);}}};function vo(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0, W._)`${r.scopeValue("wrapper",{ref:e})}.validate`}je.getValidate=vo;function Ft(t,e,r,s){let{gen:n,it:o}=t,{allErrors:i,schemaEnv:a,opts:c}=o,u=c.passContext?ze.default.this:W.nil;s?d():l();function d(){if(!a.$async)throw new Error("async schema referenced by sync schema");let p=n.let("valid");n.try(()=>{n.code((0, W._)`await ${(0, go.callValidateCode)(t,e,u)}`),h(e),i||n.assign(p,true);},f=>{n.if((0, W._)`!(${f} instanceof ${o.ValidationError})`,()=>n.throw(f)),m(f),i||n.assign(p,false);}),t.ok(p);}function l(){t.result((0, go.callValidateCode)(t,e,u),()=>h(e),()=>m(e));}function m(p){let f=(0, W._)`${p}.errors`;n.assign(ze.default.vErrors,(0, W._)`${ze.default.vErrors} === null ? ${f} : ${ze.default.vErrors}.concat(${f})`),n.assign(ze.default.errors,(0, W._)`${ze.default.vErrors}.length`);}function h(p){var f;if(!o.opts.unevaluated)return;let y=(f=r?.validate)===null||f===void 0?void 0:f.evaluated;if(o.props!==true)if(y&&!y.dynamicProps)y.props!==void 0&&(o.props=Kt.mergeEvaluated.props(n,y.props,o.props));else {let _=n.var("props",(0, W._)`${p}.evaluated.props`);o.props=Kt.mergeEvaluated.props(n,_,o.props,W.Name);}if(o.items!==true)if(y&&!y.dynamicItems)y.items!==void 0&&(o.items=Kt.mergeEvaluated.items(n,y.items,o.items));else {let _=n.var("items",(0, W._)`${p}.evaluated.items`);o.items=Kt.mergeEvaluated.items(n,_,o.items,W.Name);}}}je.callRef=Ft;je.default=Bu;});var bo=g(ts=>{Object.defineProperty(ts,"__esModule",{value:true});var Qu=_o(),Xu=wo(),Yu=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Qu.default,Xu.default];ts.default=Yu;});var Eo=g(rs=>{Object.defineProperty(rs,"__esModule",{value:true});var Ut=S(),ve=Ut.operators,Lt={maximum:{okStr:"<=",ok:ve.LTE,fail:ve.GT},minimum:{okStr:">=",ok:ve.GTE,fail:ve.LT},exclusiveMaximum:{okStr:"<",ok:ve.LT,fail:ve.GTE},exclusiveMinimum:{okStr:">",ok:ve.GT,fail:ve.LTE}},Zu={message:({keyword:t,schemaCode:e})=>(0, Ut.str)`must be ${Lt[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0, Ut._)`{comparison: ${Lt[t].okStr}, limit: ${e}}`},ed={keyword:Object.keys(Lt),type:"number",schemaType:"number",$data:true,error:Zu,code(t){let{keyword:e,data:r,schemaCode:s}=t;t.fail$data((0, Ut._)`${r} ${Lt[e].fail} ${s} || isNaN(${r})`);}};rs.default=ed;});var So=g(ss=>{Object.defineProperty(ss,"__esModule",{value:true});var ft=S(),td={message:({schemaCode:t})=>(0, ft.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0, ft._)`{multipleOf: ${t}}`},rd={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:td,code(t){let{gen:e,data:r,schemaCode:s,it:n}=t,o=n.opts.multipleOfPrecision,i=e.let("res"),a=o?(0, ft._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${o}`:(0, ft._)`${i} !== parseInt(${i})`;t.fail$data((0, ft._)`(${s} === 0 || (${i} = ${r}/${s}, ${a}))`);}};ss.default=rd;});var No=g(ns=>{Object.defineProperty(ns,"__esModule",{value:true});function Po(t){let e=t.length,r=0,s=0,n;for(;s<e;)r++,n=t.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=t.charCodeAt(s),(n&64512)===56320&&s++);return r}ns.default=Po;Po.code='require("ajv/dist/runtime/ucs2length").default';});var ko=g(os=>{Object.defineProperty(os,"__esModule",{value:true});var qe=S(),sd=q(),nd=No(),od={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return (0, qe.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0, qe._)`{limit: ${t}}`},id={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:od,code(t){let{keyword:e,data:r,schemaCode:s,it:n}=t,o=e==="maxLength"?qe.operators.GT:qe.operators.LT,i=n.opts.unicode===false?(0, qe._)`${r}.length`:(0, qe._)`${(0, sd.useFunc)(t.gen,nd.default)}(${r})`;t.fail$data((0, qe._)`${i} ${o} ${s}`);}};os.default=id;});var jo=g(is=>{Object.defineProperty(is,"__esModule",{value:true});var ad=Q(),cd=q(),Ke=S(),ud={message:({schemaCode:t})=>(0, Ke.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0, Ke._)`{pattern: ${t}}`},dd={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:ud,code(t){let{gen:e,data:r,$data:s,schema:n,schemaCode:o,it:i}=t,a=i.opts.unicodeRegExp?"u":"";if(s){let{regExp:c}=i.opts.code,u=c.code==="new RegExp"?(0, Ke._)`new RegExp`:(0, cd.useFunc)(e,c),d=e.let("valid");e.try(()=>e.assign(d,(0, Ke._)`${u}(${o}, ${a}).test(${r})`),()=>e.assign(d,false)),t.fail$data((0, Ke._)`!${d}`);}else {let c=(0, ad.usePattern)(t,n);t.fail$data((0, Ke._)`!${c}.test(${r})`);}}};is.default=dd;});var qo=g(as=>{Object.defineProperty(as,"__esModule",{value:true});var pt=S(),ld={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return (0, pt.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0, pt._)`{limit: ${t}}`},fd={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:ld,code(t){let{keyword:e,data:r,schemaCode:s}=t,n=e==="maxProperties"?pt.operators.GT:pt.operators.LT;t.fail$data((0, pt._)`Object.keys(${r}).length ${n} ${s}`);}};as.default=fd;});var Oo=g(cs=>{Object.defineProperty(cs,"__esModule",{value:true});var ht=Q(),mt=S(),pd=q(),hd={message:({params:{missingProperty:t}})=>(0, mt.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0, mt._)`{missingProperty: ${t}}`},md={keyword:"required",type:"object",schemaType:"array",$data:true,error:hd,code(t){let{gen:e,schema:r,schemaCode:s,data:n,$data:o,it:i}=t,{opts:a}=i;if(!o&&r.length===0)return;let c=r.length>=a.loopRequired;if(i.allErrors?u():d(),a.strictRequired){let h=t.parentSchema.properties,{definedProperties:p}=t.it;for(let f of r)if(h?.[f]===void 0&&!p.has(f)){let y=i.schemaEnv.baseId+i.errSchemaPath,_=`required property "${f}" is not defined at "${y}" (strictRequired)`;(0, pd.checkStrictMode)(i,_,i.opts.strictRequired);}}function u(){if(c||o)t.block$data(mt.nil,l);else for(let h of r)(0, ht.checkReportMissingProp)(t,h);}function d(){let h=e.let("missing");if(c||o){let p=e.let("valid",true);t.block$data(p,()=>m(h,p)),t.ok(p);}else e.if((0, ht.checkMissingProp)(t,r,h)),(0, ht.reportMissingProp)(t,h),e.else();}function l(){e.forOf("prop",s,h=>{t.setParams({missingProperty:h}),e.if((0, ht.noPropertyInData)(e,n,h,a.ownProperties),()=>t.error());});}function m(h,p){t.setParams({missingProperty:h}),e.forOf(h,s,()=>{e.assign(p,(0, ht.propertyInData)(e,n,h,a.ownProperties)),e.if((0, mt.not)(p),()=>{t.error(),e.break();});},mt.nil);}}};cs.default=md;});var Ro=g(us=>{Object.defineProperty(us,"__esModule",{value:true});var yt=S(),yd={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return (0, yt.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0, yt._)`{limit: ${t}}`},_d={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:yd,code(t){let{keyword:e,data:r,schemaCode:s}=t,n=e==="maxItems"?yt.operators.GT:yt.operators.LT;t.fail$data((0, yt._)`${r}.length ${n} ${s}`);}};us.default=_d;});var Ht=g(ds=>{Object.defineProperty(ds,"__esModule",{value:true});var To=Ar();To.code='require("ajv/dist/runtime/equal").default';ds.default=To;});var Io=g(fs=>{Object.defineProperty(fs,"__esModule",{value:true});var ls=rt(),x=S(),gd=q(),$d=Ht(),vd={message:({params:{i:t,j:e}})=>(0, x.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0, x._)`{i: ${t}, j: ${e}}`},wd={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:vd,code(t){let{gen:e,data:r,$data:s,schema:n,parentSchema:o,schemaCode:i,it:a}=t;if(!s&&!n)return;let c=e.let("valid"),u=o.items?(0, ls.getSchemaTypes)(o.items):[];t.block$data(c,d,(0, x._)`${i} === false`),t.ok(c);function d(){let p=e.let("i",(0, x._)`${r}.length`),f=e.let("j");t.setParams({i:p,j:f}),e.assign(c,true),e.if((0, x._)`${p} > 1`,()=>(l()?m:h)(p,f));}function l(){return u.length>0&&!u.some(p=>p==="object"||p==="array")}function m(p,f){let y=e.name("item"),_=(0, ls.checkDataTypes)(u,y,a.opts.strictNumbers,ls.DataType.Wrong),j=e.const("indices",(0, x._)`{}`);e.for((0, x._)`;${p}--;`,()=>{e.let(y,(0, x._)`${r}[${p}]`),e.if(_,(0, x._)`continue`),u.length>1&&e.if((0, x._)`typeof ${y} == "string"`,(0, x._)`${y} += "_"`),e.if((0, x._)`typeof ${j}[${y}] == "number"`,()=>{e.assign(f,(0, x._)`${j}[${y}]`),t.error(),e.assign(c,false).break();}).code((0, x._)`${j}[${y}] = ${p}`);});}function h(p,f){let y=(0, gd.useFunc)(e,$d.default),_=e.name("outer");e.label(_).for((0, x._)`;${p}--;`,()=>e.for((0, x._)`${f} = ${p}; ${f}--;`,()=>e.if((0, x._)`${y}(${r}[${p}], ${r}[${f}])`,()=>{t.error(),e.assign(c,false).break(_);})));}}};fs.default=wd;});var Ao=g(hs=>{Object.defineProperty(hs,"__esModule",{value:true});var ps=S(),bd=q(),Ed=Ht(),Sd={message:"must be equal to constant",params:({schemaCode:t})=>(0, ps._)`{allowedValue: ${t}}`},Pd={keyword:"const",$data:true,error:Sd,code(t){let{gen:e,data:r,$data:s,schemaCode:n,schema:o}=t;s||o&&typeof o=="object"?t.fail$data((0, ps._)`!${(0, bd.useFunc)(e,Ed.default)}(${r}, ${n})`):t.fail((0, ps._)`${o} !== ${r}`);}};hs.default=Pd;});var Co=g(ms=>{Object.defineProperty(ms,"__esModule",{value:true});var _t=S(),Nd=q(),kd=Ht(),jd={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0, _t._)`{allowedValues: ${t}}`},qd={keyword:"enum",schemaType:"array",$data:true,error:jd,code(t){let{gen:e,data:r,$data:s,schema:n,schemaCode:o,it:i}=t;if(!s&&n.length===0)throw new Error("enum must have non-empty array");let a=n.length>=i.opts.loopEnum,c,u=()=>c??(c=(0, Nd.useFunc)(e,kd.default)),d;if(a||s)d=e.let("valid"),t.block$data(d,l);else {if(!Array.isArray(n))throw new Error("ajv implementation error");let h=e.const("vSchema",o);d=(0, _t.or)(...n.map((p,f)=>m(h,f)));}t.pass(d);function l(){e.assign(d,false),e.forOf("v",o,h=>e.if((0, _t._)`${u()}(${r}, ${h})`,()=>e.assign(d,true).break()));}function m(h,p){let f=n[p];return typeof f=="object"&&f!==null?(0, _t._)`${u()}(${r}, ${h}[${p}])`:(0, _t._)`${r} === ${f}`}}};ms.default=qd;});var Mo=g(ys=>{Object.defineProperty(ys,"__esModule",{value:true});var Od=Eo(),Rd=So(),Td=ko(),Id=jo(),Ad=qo(),Cd=Oo(),Md=Ro(),Dd=Io(),Vd=Ao(),xd=Co(),zd=[Od.default,Rd.default,Td.default,Id.default,Ad.default,Cd.default,Md.default,Dd.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Vd.default,xd.default];ys.default=zd;});var gs=g(gt=>{Object.defineProperty(gt,"__esModule",{value:true});gt.validateAdditionalItems=void 0;var Oe=S(),_s=q(),Kd={message:({params:{len:t}})=>(0, Oe.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0, Oe._)`{limit: ${t}}`},Fd={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Kd,code(t){let{parentSchema:e,it:r}=t,{items:s}=e;if(!Array.isArray(s)){(0, _s.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Do(t,s);}};function Do(t,e){let{gen:r,schema:s,data:n,keyword:o,it:i}=t;i.items=true;let a=r.const("len",(0, Oe._)`${n}.length`);if(s===false)t.setParams({len:e.length}),t.pass((0, Oe._)`${a} <= ${e.length}`);else if(typeof s=="object"&&!(0, _s.alwaysValidSchema)(i,s)){let u=r.var("valid",(0, Oe._)`${a} <= ${e.length}`);r.if((0, Oe.not)(u),()=>c(u)),t.ok(u);}function c(u){r.forRange("i",e.length,a,d=>{t.subschema({keyword:o,dataProp:d,dataPropType:_s.Type.Num},u),i.allErrors||r.if((0, Oe.not)(u),()=>r.break());});}}gt.validateAdditionalItems=Do;gt.default=Fd;});var $s=g($t=>{Object.defineProperty($t,"__esModule",{value:true});$t.validateTuple=void 0;var Vo=S(),Gt=q(),Ud=Q(),Ld={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return xo(t,"additionalItems",e);r.items=true,!(0, Gt.alwaysValidSchema)(r,e)&&t.ok((0, Ud.validateArray)(t));}};function xo(t,e,r=t.schema){let{gen:s,parentSchema:n,data:o,keyword:i,it:a}=t;d(n),a.opts.unevaluated&&r.length&&a.items!==true&&(a.items=Gt.mergeEvaluated.items(s,r.length,a.items));let c=s.name("valid"),u=s.const("len",(0, Vo._)`${o}.length`);r.forEach((l,m)=>{(0, Gt.alwaysValidSchema)(a,l)||(s.if((0, Vo._)`${u} > ${m}`,()=>t.subschema({keyword:i,schemaProp:m,dataProp:m},c)),t.ok(c));});function d(l){let{opts:m,errSchemaPath:h}=a,p=r.length,f=p===l.minItems&&(p===l.maxItems||l[e]===false);if(m.strictTuples&&!f){let y=`"${i}" is ${p}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0, Gt.checkStrictMode)(a,y,m.strictTuples);}}}$t.validateTuple=xo;$t.default=Ld;});var zo=g(vs=>{Object.defineProperty(vs,"__esModule",{value:true});var Hd=$s(),Gd={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0, Hd.validateTuple)(t,"items")};vs.default=Gd;});var Fo=g(ws=>{Object.defineProperty(ws,"__esModule",{value:true});var Ko=S(),Jd=q(),Wd=Q(),Bd=gs(),Qd={message:({params:{len:t}})=>(0, Ko.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0, Ko._)`{limit: ${t}}`},Xd={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Qd,code(t){let{schema:e,parentSchema:r,it:s}=t,{prefixItems:n}=r;s.items=true,!(0, Jd.alwaysValidSchema)(s,e)&&(n?(0, Bd.validateAdditionalItems)(t,n):t.ok((0, Wd.validateArray)(t)));}};ws.default=Xd;});var Uo=g(bs=>{Object.defineProperty(bs,"__esModule",{value:true});var Y=S(),Jt=q(),Yd={message:({params:{min:t,max:e}})=>e===void 0?(0, Y.str)`must contain at least ${t} valid item(s)`:(0, Y.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0, Y._)`{minContains: ${t}}`:(0, Y._)`{minContains: ${t}, maxContains: ${e}}`},Zd={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:Yd,code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:o}=t,i,a,{minContains:c,maxContains:u}=s;o.opts.next?(i=c===void 0?1:c,a=u):i=1;let d=e.const("len",(0, Y._)`${n}.length`);if(t.setParams({min:i,max:a}),a===void 0&&i===0){(0, Jt.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&i>a){(0, Jt.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0, Jt.alwaysValidSchema)(o,r)){let f=(0, Y._)`${d} >= ${i}`;a!==void 0&&(f=(0, Y._)`${f} && ${d} <= ${a}`),t.pass(f);return}o.items=true;let l=e.name("valid");a===void 0&&i===1?h(l,()=>e.if(l,()=>e.break())):i===0?(e.let(l,true),a!==void 0&&e.if((0, Y._)`${n}.length > 0`,m)):(e.let(l,false),m()),t.result(l,()=>t.reset());function m(){let f=e.name("_valid"),y=e.let("count",0);h(f,()=>e.if(f,()=>p(y)));}function h(f,y){e.forRange("i",0,d,_=>{t.subschema({keyword:"contains",dataProp:_,dataPropType:Jt.Type.Num,compositeRule:true},f),y();});}function p(f){e.code((0, Y._)`${f}++`),a===void 0?e.if((0, Y._)`${f} >= ${i}`,()=>e.assign(l,true).break()):(e.if((0, Y._)`${f} > ${a}`,()=>e.assign(l,false).break()),i===1?e.assign(l,true):e.if((0, Y._)`${f} >= ${i}`,()=>e.assign(l,true)));}}};bs.default=Zd;});var Go=g(ae=>{Object.defineProperty(ae,"__esModule",{value:true});ae.validateSchemaDeps=ae.validatePropertyDeps=ae.error=void 0;var Es=S(),el=q(),vt=Q();ae.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let s=e===1?"property":"properties";return (0, Es.str)`must have ${s} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:s}})=>(0, Es._)`{property: ${t},
6
6
  missingProperty: ${s},
7
7
  depsCount: ${e},
8
- deps: ${r}}`};var tl={keyword:"dependencies",type:"object",schemaType:"object",error:ae.error,code(t){let[e,r]=rl(t);Lo(t,e),Ho(t,r);}};function rl({schema:t}){let e={},r={};for(let s in t){if(s==="__proto__")continue;let n=Array.isArray(t[s])?e:r;n[s]=t[s];}return [e,r]}function Lo(t,e=t.schema){let{gen:r,data:s,it:n}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let i in e){let a=e[i];if(a.length===0)continue;let c=(0, vt.propertyInData)(r,s,i,n.opts.ownProperties);t.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0, vt.checkReportMissingProp)(t,u);}):(r.if((0, Es._)`${c} && (${(0, vt.checkMissingProp)(t,a,o)})`),(0, vt.reportMissingProp)(t,o),r.else());}}ae.validatePropertyDeps=Lo;function Ho(t,e=t.schema){let{gen:r,data:s,keyword:n,it:o}=t,i=r.name("valid");for(let a in e)(0, el.alwaysValidSchema)(o,e[a])||(r.if((0, vt.propertyInData)(r,s,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:n,schemaProp:a},i);t.mergeValidEvaluated(c,i);},()=>r.var(i,true)),t.ok(i));}ae.validateSchemaDeps=Ho;ae.default=tl;});var Wo=g(Ss=>{Object.defineProperty(Ss,"__esModule",{value:true});var Jo=S(),sl=q(),nl={message:"property name must be valid",params:({params:t})=>(0, Jo._)`{propertyName: ${t.propertyName}}`},ol={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:nl,code(t){let{gen:e,schema:r,data:s,it:n}=t;if((0, sl.alwaysValidSchema)(n,r))return;let o=e.name("valid");e.forIn("key",s,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:true},o),e.if((0, Jo.not)(o),()=>{t.error(true),n.allErrors||e.break();});}),t.ok(o);}};Ss.default=ol;});var Ns=g(Ps=>{Object.defineProperty(Ps,"__esModule",{value:true});var Wt=Q(),re=S(),il=le(),Bt=q(),al={message:"must NOT have additional properties",params:({params:t})=>(0, re._)`{additionalProperty: ${t.additionalProperty}}`},cl={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:al,code(t){let{gen:e,schema:r,parentSchema:s,data:n,errsCount:o,it:i}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=true,c.removeAdditional!=="all"&&(0, Bt.alwaysValidSchema)(i,r))return;let u=(0, Wt.allSchemaProperties)(s.properties),d=(0, Wt.allSchemaProperties)(s.patternProperties);l(),t.ok((0, re._)`${o} === ${il.default.errors}`);function l(){e.forIn("key",n,y=>{!u.length&&!d.length?p(y):e.if(m(y),()=>p(y));});}function m(y){let _;if(u.length>8){let j=(0, Bt.schemaRefOrVal)(i,s.properties,"properties");_=(0, Wt.isOwnProperty)(e,j,y);}else u.length?_=(0, re.or)(...u.map(j=>(0, re._)`${y} === ${j}`)):_=re.nil;return d.length&&(_=(0, re.or)(_,...d.map(j=>(0, re._)`${(0, Wt.usePattern)(t,j)}.test(${y})`))),(0, re.not)(_)}function h(y){e.code((0, re._)`delete ${n}[${y}]`);}function p(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===false){h(y);return}if(r===false){t.setParams({additionalProperty:y}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0, Bt.alwaysValidSchema)(i,r)){let _=e.name("valid");c.removeAdditional==="failing"?(f(y,_,false),e.if((0, re.not)(_),()=>{t.reset(),h(y);})):(f(y,_),a||e.if((0, re.not)(_),()=>e.break()));}}function f(y,_,j){let N={keyword:"additionalProperties",dataProp:y,dataPropType:Bt.Type.Str};j===false&&Object.assign(N,{compositeRule:true,createErrors:false,allErrors:false}),t.subschema(N,_);}}};Ps.default=cl;});var Xo=g(js=>{Object.defineProperty(js,"__esModule",{value:true});var ul=it(),Bo=Q(),ks=q(),Qo=Ns(),dl={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:o}=t;o.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Qo.default.code(new ul.KeywordCxt(o,Qo.default,"additionalProperties"));let i=(0, Bo.allSchemaProperties)(r);for(let l of i)o.definedProperties.add(l);o.opts.unevaluated&&i.length&&o.props!==true&&(o.props=ks.mergeEvaluated.props(e,(0, ks.toHash)(i),o.props));let a=i.filter(l=>!(0, ks.alwaysValidSchema)(o,r[l]));if(a.length===0)return;let c=e.name("valid");for(let l of a)u(l)?d(l):(e.if((0, Bo.propertyInData)(e,n,l,o.opts.ownProperties)),d(l),o.allErrors||e.else().var(c,true),e.endIf()),t.it.definedProperties.add(l),t.ok(c);function u(l){return o.opts.useDefaults&&!o.compositeRule&&r[l].default!==void 0}function d(l){t.subschema({keyword:"properties",schemaProp:l,dataProp:l},c);}}};js.default=dl;});var ti=g(qs=>{Object.defineProperty(qs,"__esModule",{value:true});var Yo=Q(),Qt=S(),Zo=q(),ei=q(),ll={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:s,parentSchema:n,it:o}=t,{opts:i}=o,a=(0, Yo.allSchemaProperties)(r),c=a.filter(f=>(0, Zo.alwaysValidSchema)(o,r[f]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===true))return;let u=i.strictSchema&&!i.allowMatchingProperties&&n.properties,d=e.name("valid");o.props!==true&&!(o.props instanceof Qt.Name)&&(o.props=(0, ei.evaluatedPropsToName)(e,o.props));let{props:l}=o;m();function m(){for(let f of a)u&&h(f),o.allErrors?p(f):(e.var(d,true),p(f),e.if(d));}function h(f){for(let y in u)new RegExp(f).test(y)&&(0, Zo.checkStrictMode)(o,`property ${y} matches pattern ${f} (use allowMatchingProperties)`);}function p(f){e.forIn("key",s,y=>{e.if((0, Qt._)`${(0, Yo.usePattern)(t,f)}.test(${y})`,()=>{let _=c.includes(f);_||t.subschema({keyword:"patternProperties",schemaProp:f,dataProp:y,dataPropType:ei.Type.Str},d),o.opts.unevaluated&&l!==true?e.assign((0, Qt._)`${l}[${y}]`,true):!_&&!o.allErrors&&e.if((0, Qt.not)(d),()=>e.break());});});}}};qs.default=ll;});var ri=g(Os=>{Object.defineProperty(Os,"__esModule",{value:true});var fl=q(),pl={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(t){let{gen:e,schema:r,it:s}=t;if((0, fl.alwaysValidSchema)(s,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},n),t.failResult(n,()=>t.reset(),()=>t.error());},error:{message:"must NOT be valid"}};Os.default=pl;});var si=g(Rs=>{Object.defineProperty(Rs,"__esModule",{value:true});var hl=Q(),ml={keyword:"anyOf",schemaType:"array",trackErrors:true,code:hl.validateUnion,error:{message:"must match a schema in anyOf"}};Rs.default=ml;});var ni=g(Ts=>{Object.defineProperty(Ts,"__esModule",{value:true});var Xt=S(),yl=q(),_l={message:"must match exactly one schema in oneOf",params:({params:t})=>(0, Xt._)`{passingSchemas: ${t.passing}}`},gl={keyword:"oneOf",schemaType:"array",trackErrors:true,error:_l,code(t){let{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let o=r,i=e.let("valid",false),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(i,()=>t.reset(),()=>t.error(true));function u(){o.forEach((d,l)=>{let m;(0, yl.alwaysValidSchema)(n,d)?e.var(c,true):m=t.subschema({keyword:"oneOf",schemaProp:l,compositeRule:true},c),l>0&&e.if((0, Xt._)`${c} && ${i}`).assign(i,false).assign(a,(0, Xt._)`[${a}, ${l}]`).else(),e.if(c,()=>{e.assign(i,true),e.assign(a,l),m&&t.mergeEvaluated(m,Xt.Name);});});}}};Ts.default=gl;});var oi=g(Is=>{Object.defineProperty(Is,"__esModule",{value:true});var $l=q(),vl={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((o,i)=>{if((0, $l.alwaysValidSchema)(s,o))return;let a=t.subschema({keyword:"allOf",schemaProp:i},n);t.ok(n),t.mergeEvaluated(a);});}};Is.default=vl;});var ci=g(As=>{Object.defineProperty(As,"__esModule",{value:true});var Yt=S(),ai=q(),wl={message:({params:t})=>(0, Yt.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0, Yt._)`{failingKeyword: ${t.ifClause}}`},bl={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:wl,code(t){let{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0, ai.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=ii(s,"then"),o=ii(s,"else");if(!n&&!o)return;let i=e.let("valid",true),a=e.name("_valid");if(c(),t.reset(),n&&o){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,u("then",d),u("else",d));}else n?e.if(a,u("then")):e.if((0, Yt.not)(a),u("else"));t.pass(i,()=>t.error(true));function c(){let d=t.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},a);t.mergeEvaluated(d);}function u(d,l){return ()=>{let m=t.subschema({keyword:d},a);e.assign(i,a),t.mergeValidEvaluated(m,i),l?e.assign(l,(0, Yt._)`${d}`):t.setParams({ifClause:d});}}}};function ii(t,e){let r=t.schema[e];return r!==void 0&&!(0, ai.alwaysValidSchema)(t,r)}As.default=bl;});var ui=g(Cs=>{Object.defineProperty(Cs,"__esModule",{value:true});var El=q(),Sl={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0, El.checkStrictMode)(r,`"${t}" without "if" is ignored`);}};Cs.default=Sl;});var di=g(Ms=>{Object.defineProperty(Ms,"__esModule",{value:true});var Pl=gs(),Nl=zo(),kl=$s(),jl=Fo(),ql=Uo(),Ol=Go(),Rl=Wo(),Tl=Ns(),Il=Xo(),Al=ti(),Cl=ri(),Ml=si(),Dl=ni(),Vl=oi(),xl=ci(),zl=ui();function Kl(t=false){let e=[Cl.default,Ml.default,Dl.default,Vl.default,xl.default,zl.default,Rl.default,Tl.default,Ol.default,Il.default,Al.default];return t?e.push(Nl.default,jl.default):e.push(Pl.default,kl.default),e.push(ql.default),e}Ms.default=Kl;});var li=g(Ds=>{Object.defineProperty(Ds,"__esModule",{value:true});var D=S(),Fl={message:({schemaCode:t})=>(0, D.str)`must match format "${t}"`,params:({schemaCode:t})=>(0, D._)`{format: ${t}}`},Ul={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:Fl,code(t,e){let{gen:r,data:s,$data:n,schema:o,schemaCode:i,it:a}=t,{opts:c,errSchemaPath:u,schemaEnv:d,self:l}=a;if(!c.validateFormats)return;n?m():h();function m(){let p=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),f=r.const("fDef",(0, D._)`${p}[${i}]`),y=r.let("fType"),_=r.let("format");r.if((0, D._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(y,(0, D._)`${f}.type || "string"`).assign(_,(0, D._)`${f}.validate`),()=>r.assign(y,(0, D._)`"string"`).assign(_,f)),t.fail$data((0, D.or)(j(),N()));function j(){return c.strictSchema===false?D.nil:(0, D._)`${i} && !${_}`}function N(){let A=d.$async?(0, D._)`(${f}.async ? await ${_}(${s}) : ${_}(${s}))`:(0, D._)`${_}(${s})`,w=(0, D._)`(typeof ${_} == "function" ? ${A} : ${_}.test(${s}))`;return (0, D._)`${_} && ${_} !== true && ${y} === ${e} && !${w}`}}function h(){let p=l.formats[o];if(!p){j();return}if(p===true)return;let[f,y,_]=N(p);f===e&&t.pass(A());function j(){if(c.strictSchema===false){l.logger.warn(w());return}throw new Error(w());function w(){return `unknown format "${o}" ignored in schema at path "${u}"`}}function N(w){let se=w instanceof RegExp?(0, D.regexpCode)(w):c.code.formats?(0, D._)`${c.code.formats}${(0, D.getProperty)(o)}`:void 0,ce=r.scopeValue("formats",{key:o,ref:w,code:se});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0, D._)`${ce}.validate`]:["string",w,ce]}function A(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!d.$async)throw new Error("async format in sync schema");return (0, D._)`await ${_}(${s})`}return typeof y=="function"?(0, D._)`${_}(${s})`:(0, D._)`${_}.test(${s})`}}}};Ds.default=Ul;});var fi=g(Vs=>{Object.defineProperty(Vs,"__esModule",{value:true});var Ll=li(),Hl=[Ll.default];Vs.default=Hl;});var pi=g(Fe=>{Object.defineProperty(Fe,"__esModule",{value:true});Fe.contentVocabulary=Fe.metadataVocabulary=void 0;Fe.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Fe.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];});var mi=g(xs=>{Object.defineProperty(xs,"__esModule",{value:true});var Gl=bo(),Jl=Mo(),Wl=di(),Bl=fi(),hi=pi(),Ql=[Gl.default,Jl.default,(0, Wl.default)(),Bl.default,hi.metadataVocabulary,hi.contentVocabulary];xs.default=Ql;});var _i=g(Zt=>{Object.defineProperty(Zt,"__esModule",{value:true});Zt.DiscrError=void 0;var yi;(function(t){t.Tag="tag",t.Mapping="mapping";})(yi||(Zt.DiscrError=yi={}));});var $i=g(Ks=>{Object.defineProperty(Ks,"__esModule",{value:true});var Ue=S(),zs=_i(),gi=Ct(),Xl=at(),Yl=q(),Zl={message:({params:{discrError:t,tagName:e}})=>t===zs.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0, Ue._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},ef={keyword:"discriminator",type:"object",schemaType:"object",error:Zl,code(t){let{gen:e,data:r,schema:s,parentSchema:n,it:o}=t,{oneOf:i}=n;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=s.propertyName;if(typeof a!="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 c=e.let("valid",false),u=e.const("tag",(0, Ue._)`${r}${(0, Ue.getProperty)(a)}`);e.if((0, Ue._)`typeof ${u} == "string"`,()=>d(),()=>t.error(false,{discrError:zs.DiscrError.Tag,tag:u,tagName:a})),t.ok(c);function d(){let h=m();e.if(false);for(let p in h)e.elseIf((0, Ue._)`${u} === ${p}`),e.assign(c,l(h[p]));e.else(),t.error(false,{discrError:zs.DiscrError.Mapping,tag:u,tagName:a}),e.endIf();}function l(h){let p=e.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:h},p);return t.mergeEvaluated(f,Ue.Name),p}function m(){var h;let p={},f=_(n),y=true;for(let A=0;A<i.length;A++){let w=i[A];if(w?.$ref&&!(0, Yl.schemaHasRulesButRef)(w,o.self.RULES)){let ce=w.$ref;if(w=gi.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,ce),w instanceof gi.SchemaEnv&&(w=w.schema),w===void 0)throw new Xl.default(o.opts.uriResolver,o.baseId,ce)}let se=(h=w?.properties)===null||h===void 0?void 0:h[a];if(typeof se!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(f||_(w)),j(se,A);}if(!y)throw new Error(`discriminator: "${a}" must be required`);return p;function _({required:A}){return Array.isArray(A)&&A.includes(a)}function j(A,w){if(A.const)N(A.const,w);else if(A.enum)for(let se of A.enum)N(se,w);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function N(A,w){if(typeof A!="string"||A in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[A]=w;}}}};Ks.default=ef;});var vi=g((Ip,tf)=>{tf.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:true,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:true,readOnly:{type:"boolean",default:false},examples:{type:"array",items:true},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:true},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},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:true,enum:{type:"array",items:true,minItems:1,uniqueItems:true},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:true}]},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:true};});var bi=g((M,Fs)=>{Object.defineProperty(M,"__esModule",{value:true});M.MissingRefError=M.ValidationError=M.CodeGen=M.Name=M.nil=M.stringify=M.str=M._=M.KeywordCxt=M.Ajv=void 0;var rf=yo(),sf=mi(),nf=$i(),wi=vi(),of=["/properties"],er="http://json-schema.org/draft-07/schema",Le=class extends rf.default{_addVocabularies(){super._addVocabularies(),sf.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(nf.default);}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(wi,of):wi;this.addMetaSchema(e,er,false),this.refs["http://json-schema.org/schema"]=er;}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(er)?er:void 0)}};M.Ajv=Le;Fs.exports=M=Le;Fs.exports.Ajv=Le;Object.defineProperty(M,"__esModule",{value:true});M.default=Le;var af=it();Object.defineProperty(M,"KeywordCxt",{enumerable:true,get:function(){return af.KeywordCxt}});var He=S();Object.defineProperty(M,"_",{enumerable:true,get:function(){return He._}});Object.defineProperty(M,"str",{enumerable:true,get:function(){return He.str}});Object.defineProperty(M,"stringify",{enumerable:true,get:function(){return He.stringify}});Object.defineProperty(M,"nil",{enumerable:true,get:function(){return He.nil}});Object.defineProperty(M,"Name",{enumerable:true,get:function(){return He.Name}});Object.defineProperty(M,"CodeGen",{enumerable:true,get:function(){return He.CodeGen}});var cf=It();Object.defineProperty(M,"ValidationError",{enumerable:true,get:function(){return cf.default}});var uf=at();Object.defineProperty(M,"MissingRefError",{enumerable:true,get:function(){return uf.default}});});var Js={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://nsreehari.github.io/boards/live-cards.schema.json",definitions:{bind_ref:{description:"A card data path reference, e.g. 'card_data.raw_quotes' or 'requires.upstream'",type:"string",pattern:"^(card_data|requires|fetched_sources|computed_values)(\\.|$)"},bind_or_literal:{description:"A literal value or a bind reference object",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object",properties:{bind:{$ref:"#/definitions/bind_ref"}},required:["bind"]}]},compute_expr:{description:"A declarative JSON compute expression",type:"object",required:["fn"],properties:{fn:{type:"string",description:"Function name from the built-in vocabulary",enum:["sum","avg","min","max","count","first","last","add","sub","mul","div","round","abs","mod","gt","gte","lt","lte","eq","neq","if","and","or","not","concat","upper","lower","template","filter","pluck","map","sort","slice","flat","unique","group","get","default","now","diff_days","format_date"]},input:{description:"card_data.path, literal, array of inputs, or nested compute_expr",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{$ref:"#/definitions/compute_expr"}]},field:{type:"string",description:"For pluck/sum/group \u2014 the object key to extract"},where:{$ref:"#/definitions/compute_expr",description:"For filter \u2014 predicate expression ($ = current item)"},cond:{$ref:"#/definitions/compute_expr",description:"For if \u2014 condition expression"},then:{description:"For if \u2014 value when cond is truthy"},else:{description:"For if \u2014 value when cond is falsy"},format:{type:"string",description:"For format_date \u2014 date format string"}}},meta:{type:"object",properties:{title:{type:"string"},tags:{type:"array",items:{type:"string"}}}},requires:{type:"array",items:{type:"string"},description:"IDs of upstream nodes this node depends on"},provides:{type:"array",items:{type:"object",required:["bindTo","ref"],properties:{bindTo:{type:"string",description:"Token name published downstream"},ref:{type:"string",description:"Path to read value from (card_data.*, requires.*, fetched_sources.*, computed_values.*)"}}},description:"Explicit bindings exposing computed or card_data values downstream as named tokens"},compute_step:{description:"A single ordered compute step: reads card_data.*/requires.*/computed_values.*, writes to computed_values[bindTo]",type:"object",required:["bindTo","expr"],properties:{bindTo:{type:"string",description:"Key in computed_values to write result"},expr:{type:"string",description:"JSONata expression evaluated against { card_data, requires, fetched_sources, computed_values }"}}},source_def:{description:"One source entry. The engine requires 'bindTo' (compute namespace key) and 'outputFile' (delivery signal path). bindTo and outputFile must be unique across all source_defs in a card. Every other property is yours \u2014 add whatever your task-executor needs: kind, url, headers, mailbox, channel, model, query, etc. The full object is passed verbatim as the --in JSON to the executor.",type:"object",required:["bindTo","outputFile"],additionalProperties:true,properties:{bindTo:{type:"string",description:"Key under fetched_sources.* available in compute expressions"},outputFile:{type:"string",description:"Board-relative path the executor writes its JSON result to. Presence of this file signals delivery."},projections:{type:"object",description:"Named data projections from card_data or requires, evaluated before the executor is called. Each key is a ref name; each value is a JSONata expression rooted at card_data or requires. The resolved values are passed to the executor as _projections. fetched_sources, computed_values, and source_defs are not accessible here \u2014 sources run before those exist.",additionalProperties:{type:"string"}},optionalForCompletionGating:{type:"boolean",default:false,description:"When true this source does not gate card completion. Default false when absent, so source_defs are completion-gating by default."},timeout:{type:"integer",minimum:0,default:12e4,description:"Executor/script timeout in ms. Default: 120 000 (2 min)."},script:{type:"string",description:"Legacy direct-run: shell command executed when no .task-executor is registered. stdout is captured as the result."}}},render_element:{type:"object",required:["kind"],properties:{id:{type:"string",description:"Optional element ID for targeted updates"},kind:{enum:["metric","table","editable-table","chart","form","filter","list","notes","todo","alert","narrative","badge","text","markdown","ref","custom","actions"]},label:{type:"string",description:"Heading above this element"},className:{type:"string",description:"Bootstrap grid class, e.g. 'col-12 col-md-6'"},visible:{type:"string",description:"card_data/requires/fetched_sources/computed_values path \u2014 element shown only if truthy"},data:{type:"object",properties:{bind:{$ref:"#/definitions/bind_ref",description:"card_data/requires/fetched_sources/computed_values path to read data from"},writeTo:{$ref:"#/definitions/bind_ref",description:"card_data path for user input (form, filter, todo, notes)"},columns:{type:"array",items:{type:"string"},description:"table: visible columns"},maxRows:{type:"integer",description:"table/list: max rows to display"},sortable:{type:"boolean",default:true,description:"table: enable click-to-sort"},placeholder:{type:"string",description:"Empty-state message"},chartType:{enum:["bar","line","pie","doughnut"]},chartOptions:{type:"object",description:"Chart.js options passthrough"},fields:{type:"object",description:"JSON Schema for form/filter fields"},thresholds:{type:"object",properties:{green:{type:"string"},amber:{type:"string"}}},colorMap:{type:"object",description:"badge: value \u2192 Bootstrap color"},style:{enum:["heading","muted","default"],description:"text: display style"},upload:{type:"boolean",default:true,description:"file-upload: show drop zone (false = read-only file list)"},accept:{type:"array",items:{type:"string"},description:"file-upload: allowed extensions"},multiple:{type:"boolean",default:true,description:"file-upload: allow multiple files"},fileAttach:{type:"boolean",default:false,description:"chat: enable inline file attachments"},fileAccept:{type:"array",items:{type:"string"},description:"chat: allowed attachment extensions"},buttons:{type:"array",description:"actions: button definitions",items:{type:"object",required:["id","label"],properties:{id:{type:"string"},label:{type:"string"},style:{type:"string",description:"Bootstrap button variant, e.g. 'success', 'outline-danger'"},size:{type:"string",default:"sm"},disabled:{oneOf:[{type:"boolean"},{type:"string",description:"card_data/requires/fetched_sources/computed_values path \u2014 truthy = disabled"}]}}}}}}}},view:{type:"object",required:["elements"],properties:{elements:{type:"array",minItems:1,items:{$ref:"#/definitions/render_element"}},layout:{type:"object",properties:{board:{type:"object",properties:{col:{type:"integer",minimum:1,maximum:12},order:{type:"integer"}}},canvas:{type:"object",properties:{x:{type:"number"},y:{type:"number"},w:{type:"number"},h:{type:"number"}}}}},features:{type:"object",properties:{chat:{type:"boolean",default:false},notes:{type:"boolean",default:false},refresh:{type:"boolean",default:true}}}}}},title:"LiveCard",description:"A unified card node. Behavior depends on which sections are present (source_defs, compute, view, etc.)",type:"object",required:["id"],additionalProperties:false,properties:{id:{type:"string"},requires:{$ref:"#/definitions/requires"},provides:{$ref:"#/definitions/provides"},meta:{$ref:"#/definitions/meta"},view:{$ref:"#/definitions/view"},card_data:{type:"object",description:"Authored card data and runtime metadata. Includes uploaded-file metadata maintained by host handlers and inference evaluation results.",properties:{files:{type:"array",description:"Optional uploaded-file metadata maintained by host handlers. Stored name is normalized and serial-prefixed (for example 001-my_file.pdf).",items:{type:"object",required:["name","stored_name"],properties:{name:{type:"string",minLength:1},stored_name:{type:"string",minLength:5,maxLength:32,pattern:"^[0-9]{3,}-[a-z0-9._-]+$"},size:{oneOf:[{type:"integer",minimum:0},{type:"null"}]},mime_type:{type:"string"},path:{type:"string",pattern:"^[^\\s]+/files/[0-9]{3,}-[a-z0-9._-]+$"},uploaded_at:{type:"string",format:"date-time"}},additionalProperties:false}}},additionalProperties:true},source_defs:{type:"array",description:"Source entries. Each entry is passed verbatim to the board's .task-executor (registered via init --task-executor) as the --in JSON file. The executor fetches/generates the data and writes JSON to --out. If no executor is registered, the built-in executor runs the entry's 'cli' command directly. Sources gate completion by default. Set optionalForCompletionGating: true for enrichment-only source_defs that should not block task-completed.",items:{$ref:"#/definitions/source_def"}},compute:{type:"array",description:"Ordered array of compute steps. Each reads card_data.*/requires.*/fetched_sources.*/computed_values.* and writes to ephemeral computed_values[bindTo].",items:{$ref:"#/definitions/compute_step"}}}};var Pi=Ci(bi());var ff=createRequire(import.meta.url),pf=ff("./jsonata-sync.cjs"),tr=null;var Ei=/\b(card_data|requires|fetched_sources|computed_values|source_defs)\b/g,hf=/^\s*(card_data|requires|fetched_sources|computed_values|source_defs)(\.|$)/;function mf(t){let e=new Set,r;for(Ei.lastIndex=0;(r=Ei.exec(t))!==null;)e.add(r[1]);return e}function Ni(t){let e=hf.exec(t);return e?e[1]:null}function Si(t,e,r,s){try{pf(t);}catch(o){let i=o instanceof Error?o.message:String(o);s.push(`${e}: invalid JSONata expression (${i})`);return}let n=mf(t);for(let o of n)r.has(o)||s.push(`${e}: disallowed namespace "${o}" in expression`);}function Us(t,e,r){if(Array.isArray(t)){t.forEach((n,o)=>{Us(n,`${e}/${o}`,r);});return}if(typeof t=="string"){let n=Ni(t);if(!n)return;new Set(["card_data","requires","computed_values"]).has(n)||r.push(`${e}: disallowed namespace "${n}" in view reference`);return}if(!t||typeof t!="object")return;let s=t;for(let[n,o]of Object.entries(s))Us(o,`${e}/${n}`,r);}function yf(){if(tr)return tr;let t=new Pi.default({allErrors:true});return df(t),tr=t.compile(Js),tr}function _f(t){let e=yf(),r=e(t),s=(e.errors??[]).map(n=>`${n.instancePath||"/"}: ${n.message??"unknown error"}`);if(t&&typeof t=="object"&&!Array.isArray(t)){let n=t.source_defs;if(Array.isArray(n)){let o=new Set,i=new Set;n.forEach((a,c)=>{if(!a||typeof a!="object"||Array.isArray(a))return;let u=a;typeof u.bindTo=="string"&&u.bindTo&&(o.has(u.bindTo)&&s.push(`/source_defs/${c}/bindTo: bindTo "${u.bindTo}" must be unique across all source_defs`),o.add(u.bindTo)),typeof u.outputFile=="string"&&u.outputFile&&(i.has(u.outputFile)&&s.push(`/source_defs/${c}/outputFile: outputFile "${u.outputFile}" must be unique across all source_defs`),i.add(u.outputFile));});}}return !r||s.length>0?{ok:false,errors:s}:{ok:true,errors:[]}}function gf(t){let e=[];if(!t||typeof t!="object"||Array.isArray(t))return {ok:true,errors:[]};let r=t,s=r.compute;Array.isArray(s)&&s.forEach((u,d)=>{if(!u||typeof u!="object"||Array.isArray(u))return;let l=u.expr;typeof l!="string"||l.trim().length===0||Si(l,`/compute/${d}/expr`,new Set(["card_data","requires","fetched_sources","computed_values"]),e);});let n=new Set(["card_data","requires","fetched_sources","computed_values"]),o=r.provides;Array.isArray(o)&&o.forEach((u,d)=>{if(!u||typeof u!="object"||Array.isArray(u))return;let l=u.ref;if(typeof l!="string"||l.trim().length===0)return;let m=Ni(l);m===null?e.push(`/provides/${d}/ref: path "${l}" must start with a valid namespace (${[...n].join(", ")})`):n.has(m)||e.push(`/provides/${d}/ref: disallowed namespace "${m}" in path "${l}" (valid: ${[...n].join(", ")})`);});let i=r.view;i&&typeof i=="object"&&!Array.isArray(i)&&Us(i,"/view",e);let a=new Set(["card_data","requires"]),c=r.source_defs;return Array.isArray(c)&&c.forEach((u,d)=>{if(!u||typeof u!="object"||Array.isArray(u))return;let l=u.projections;if(!(!l||typeof l!="object"||Array.isArray(l)))for(let[m,h]of Object.entries(l))typeof h!="string"||h.trim().length===0||Si(h,`/source_defs/${d}/projections/${m}`,a,e);}),{ok:e.length===0,errors:e}}function ki(t){let e=_f(t);if(!e.ok)return e;let r=gf(t);return r.ok?{ok:true,errors:[]}:{ok:false,errors:r.errors}}function xp(t){let e=ki(t);return {isValid:e.ok,issues:e.errors}}
8
+ deps: ${r}}`};var tl={keyword:"dependencies",type:"object",schemaType:"object",error:ae.error,code(t){let[e,r]=rl(t);Lo(t,e),Ho(t,r);}};function rl({schema:t}){let e={},r={};for(let s in t){if(s==="__proto__")continue;let n=Array.isArray(t[s])?e:r;n[s]=t[s];}return [e,r]}function Lo(t,e=t.schema){let{gen:r,data:s,it:n}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let i in e){let a=e[i];if(a.length===0)continue;let c=(0, vt.propertyInData)(r,s,i,n.opts.ownProperties);t.setParams({property:i,depsCount:a.length,deps:a.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of a)(0, vt.checkReportMissingProp)(t,u);}):(r.if((0, Es._)`${c} && (${(0, vt.checkMissingProp)(t,a,o)})`),(0, vt.reportMissingProp)(t,o),r.else());}}ae.validatePropertyDeps=Lo;function Ho(t,e=t.schema){let{gen:r,data:s,keyword:n,it:o}=t,i=r.name("valid");for(let a in e)(0, el.alwaysValidSchema)(o,e[a])||(r.if((0, vt.propertyInData)(r,s,a,o.opts.ownProperties),()=>{let c=t.subschema({keyword:n,schemaProp:a},i);t.mergeValidEvaluated(c,i);},()=>r.var(i,true)),t.ok(i));}ae.validateSchemaDeps=Ho;ae.default=tl;});var Wo=g(Ss=>{Object.defineProperty(Ss,"__esModule",{value:true});var Jo=S(),sl=q(),nl={message:"property name must be valid",params:({params:t})=>(0, Jo._)`{propertyName: ${t.propertyName}}`},ol={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:nl,code(t){let{gen:e,schema:r,data:s,it:n}=t;if((0, sl.alwaysValidSchema)(n,r))return;let o=e.name("valid");e.forIn("key",s,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:true},o),e.if((0, Jo.not)(o),()=>{t.error(true),n.allErrors||e.break();});}),t.ok(o);}};Ss.default=ol;});var Ns=g(Ps=>{Object.defineProperty(Ps,"__esModule",{value:true});var Wt=Q(),re=S(),il=le(),Bt=q(),al={message:"must NOT have additional properties",params:({params:t})=>(0, re._)`{additionalProperty: ${t.additionalProperty}}`},cl={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:al,code(t){let{gen:e,schema:r,parentSchema:s,data:n,errsCount:o,it:i}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=i;if(i.props=true,c.removeAdditional!=="all"&&(0, Bt.alwaysValidSchema)(i,r))return;let u=(0, Wt.allSchemaProperties)(s.properties),d=(0, Wt.allSchemaProperties)(s.patternProperties);l(),t.ok((0, re._)`${o} === ${il.default.errors}`);function l(){e.forIn("key",n,y=>{!u.length&&!d.length?p(y):e.if(m(y),()=>p(y));});}function m(y){let _;if(u.length>8){let j=(0, Bt.schemaRefOrVal)(i,s.properties,"properties");_=(0, Wt.isOwnProperty)(e,j,y);}else u.length?_=(0, re.or)(...u.map(j=>(0, re._)`${y} === ${j}`)):_=re.nil;return d.length&&(_=(0, re.or)(_,...d.map(j=>(0, re._)`${(0, Wt.usePattern)(t,j)}.test(${y})`))),(0, re.not)(_)}function h(y){e.code((0, re._)`delete ${n}[${y}]`);}function p(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===false){h(y);return}if(r===false){t.setParams({additionalProperty:y}),t.error(),a||e.break();return}if(typeof r=="object"&&!(0, Bt.alwaysValidSchema)(i,r)){let _=e.name("valid");c.removeAdditional==="failing"?(f(y,_,false),e.if((0, re.not)(_),()=>{t.reset(),h(y);})):(f(y,_),a||e.if((0, re.not)(_),()=>e.break()));}}function f(y,_,j){let N={keyword:"additionalProperties",dataProp:y,dataPropType:Bt.Type.Str};j===false&&Object.assign(N,{compositeRule:true,createErrors:false,allErrors:false}),t.subschema(N,_);}}};Ps.default=cl;});var Xo=g(js=>{Object.defineProperty(js,"__esModule",{value:true});var ul=it(),Bo=Q(),ks=q(),Qo=Ns(),dl={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:s,data:n,it:o}=t;o.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Qo.default.code(new ul.KeywordCxt(o,Qo.default,"additionalProperties"));let i=(0, Bo.allSchemaProperties)(r);for(let l of i)o.definedProperties.add(l);o.opts.unevaluated&&i.length&&o.props!==true&&(o.props=ks.mergeEvaluated.props(e,(0, ks.toHash)(i),o.props));let a=i.filter(l=>!(0, ks.alwaysValidSchema)(o,r[l]));if(a.length===0)return;let c=e.name("valid");for(let l of a)u(l)?d(l):(e.if((0, Bo.propertyInData)(e,n,l,o.opts.ownProperties)),d(l),o.allErrors||e.else().var(c,true),e.endIf()),t.it.definedProperties.add(l),t.ok(c);function u(l){return o.opts.useDefaults&&!o.compositeRule&&r[l].default!==void 0}function d(l){t.subschema({keyword:"properties",schemaProp:l,dataProp:l},c);}}};js.default=dl;});var ti=g(qs=>{Object.defineProperty(qs,"__esModule",{value:true});var Yo=Q(),Qt=S(),Zo=q(),ei=q(),ll={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:s,parentSchema:n,it:o}=t,{opts:i}=o,a=(0, Yo.allSchemaProperties)(r),c=a.filter(f=>(0, Zo.alwaysValidSchema)(o,r[f]));if(a.length===0||c.length===a.length&&(!o.opts.unevaluated||o.props===true))return;let u=i.strictSchema&&!i.allowMatchingProperties&&n.properties,d=e.name("valid");o.props!==true&&!(o.props instanceof Qt.Name)&&(o.props=(0, ei.evaluatedPropsToName)(e,o.props));let{props:l}=o;m();function m(){for(let f of a)u&&h(f),o.allErrors?p(f):(e.var(d,true),p(f),e.if(d));}function h(f){for(let y in u)new RegExp(f).test(y)&&(0, Zo.checkStrictMode)(o,`property ${y} matches pattern ${f} (use allowMatchingProperties)`);}function p(f){e.forIn("key",s,y=>{e.if((0, Qt._)`${(0, Yo.usePattern)(t,f)}.test(${y})`,()=>{let _=c.includes(f);_||t.subschema({keyword:"patternProperties",schemaProp:f,dataProp:y,dataPropType:ei.Type.Str},d),o.opts.unevaluated&&l!==true?e.assign((0, Qt._)`${l}[${y}]`,true):!_&&!o.allErrors&&e.if((0, Qt.not)(d),()=>e.break());});});}}};qs.default=ll;});var ri=g(Os=>{Object.defineProperty(Os,"__esModule",{value:true});var fl=q(),pl={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(t){let{gen:e,schema:r,it:s}=t;if((0, fl.alwaysValidSchema)(s,r)){t.fail();return}let n=e.name("valid");t.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},n),t.failResult(n,()=>t.reset(),()=>t.error());},error:{message:"must NOT be valid"}};Os.default=pl;});var si=g(Rs=>{Object.defineProperty(Rs,"__esModule",{value:true});var hl=Q(),ml={keyword:"anyOf",schemaType:"array",trackErrors:true,code:hl.validateUnion,error:{message:"must match a schema in anyOf"}};Rs.default=ml;});var ni=g(Ts=>{Object.defineProperty(Ts,"__esModule",{value:true});var Xt=S(),yl=q(),_l={message:"must match exactly one schema in oneOf",params:({params:t})=>(0, Xt._)`{passingSchemas: ${t.passing}}`},gl={keyword:"oneOf",schemaType:"array",trackErrors:true,error:_l,code(t){let{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;let o=r,i=e.let("valid",false),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(u),t.result(i,()=>t.reset(),()=>t.error(true));function u(){o.forEach((d,l)=>{let m;(0, yl.alwaysValidSchema)(n,d)?e.var(c,true):m=t.subschema({keyword:"oneOf",schemaProp:l,compositeRule:true},c),l>0&&e.if((0, Xt._)`${c} && ${i}`).assign(i,false).assign(a,(0, Xt._)`[${a}, ${l}]`).else(),e.if(c,()=>{e.assign(i,true),e.assign(a,l),m&&t.mergeEvaluated(m,Xt.Name);});});}}};Ts.default=gl;});var oi=g(Is=>{Object.defineProperty(Is,"__esModule",{value:true});var $l=q(),vl={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=e.name("valid");r.forEach((o,i)=>{if((0, $l.alwaysValidSchema)(s,o))return;let a=t.subschema({keyword:"allOf",schemaProp:i},n);t.ok(n),t.mergeEvaluated(a);});}};Is.default=vl;});var ci=g(As=>{Object.defineProperty(As,"__esModule",{value:true});var Yt=S(),ai=q(),wl={message:({params:t})=>(0, Yt.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0, Yt._)`{failingKeyword: ${t.ifClause}}`},bl={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:wl,code(t){let{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0, ai.checkStrictMode)(s,'"if" without "then" and "else" is ignored');let n=ii(s,"then"),o=ii(s,"else");if(!n&&!o)return;let i=e.let("valid",true),a=e.name("_valid");if(c(),t.reset(),n&&o){let d=e.let("ifClause");t.setParams({ifClause:d}),e.if(a,u("then",d),u("else",d));}else n?e.if(a,u("then")):e.if((0, Yt.not)(a),u("else"));t.pass(i,()=>t.error(true));function c(){let d=t.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},a);t.mergeEvaluated(d);}function u(d,l){return ()=>{let m=t.subschema({keyword:d},a);e.assign(i,a),t.mergeValidEvaluated(m,i),l?e.assign(l,(0, Yt._)`${d}`):t.setParams({ifClause:d});}}}};function ii(t,e){let r=t.schema[e];return r!==void 0&&!(0, ai.alwaysValidSchema)(t,r)}As.default=bl;});var ui=g(Cs=>{Object.defineProperty(Cs,"__esModule",{value:true});var El=q(),Sl={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0, El.checkStrictMode)(r,`"${t}" without "if" is ignored`);}};Cs.default=Sl;});var di=g(Ms=>{Object.defineProperty(Ms,"__esModule",{value:true});var Pl=gs(),Nl=zo(),kl=$s(),jl=Fo(),ql=Uo(),Ol=Go(),Rl=Wo(),Tl=Ns(),Il=Xo(),Al=ti(),Cl=ri(),Ml=si(),Dl=ni(),Vl=oi(),xl=ci(),zl=ui();function Kl(t=false){let e=[Cl.default,Ml.default,Dl.default,Vl.default,xl.default,zl.default,Rl.default,Tl.default,Ol.default,Il.default,Al.default];return t?e.push(Nl.default,jl.default):e.push(Pl.default,kl.default),e.push(ql.default),e}Ms.default=Kl;});var li=g(Ds=>{Object.defineProperty(Ds,"__esModule",{value:true});var D=S(),Fl={message:({schemaCode:t})=>(0, D.str)`must match format "${t}"`,params:({schemaCode:t})=>(0, D._)`{format: ${t}}`},Ul={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:Fl,code(t,e){let{gen:r,data:s,$data:n,schema:o,schemaCode:i,it:a}=t,{opts:c,errSchemaPath:u,schemaEnv:d,self:l}=a;if(!c.validateFormats)return;n?m():h();function m(){let p=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),f=r.const("fDef",(0, D._)`${p}[${i}]`),y=r.let("fType"),_=r.let("format");r.if((0, D._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>r.assign(y,(0, D._)`${f}.type || "string"`).assign(_,(0, D._)`${f}.validate`),()=>r.assign(y,(0, D._)`"string"`).assign(_,f)),t.fail$data((0, D.or)(j(),N()));function j(){return c.strictSchema===false?D.nil:(0, D._)`${i} && !${_}`}function N(){let A=d.$async?(0, D._)`(${f}.async ? await ${_}(${s}) : ${_}(${s}))`:(0, D._)`${_}(${s})`,w=(0, D._)`(typeof ${_} == "function" ? ${A} : ${_}.test(${s}))`;return (0, D._)`${_} && ${_} !== true && ${y} === ${e} && !${w}`}}function h(){let p=l.formats[o];if(!p){j();return}if(p===true)return;let[f,y,_]=N(p);f===e&&t.pass(A());function j(){if(c.strictSchema===false){l.logger.warn(w());return}throw new Error(w());function w(){return `unknown format "${o}" ignored in schema at path "${u}"`}}function N(w){let se=w instanceof RegExp?(0, D.regexpCode)(w):c.code.formats?(0, D._)`${c.code.formats}${(0, D.getProperty)(o)}`:void 0,ce=r.scopeValue("formats",{key:o,ref:w,code:se});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0, D._)`${ce}.validate`]:["string",w,ce]}function A(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!d.$async)throw new Error("async format in sync schema");return (0, D._)`await ${_}(${s})`}return typeof y=="function"?(0, D._)`${_}(${s})`:(0, D._)`${_}.test(${s})`}}}};Ds.default=Ul;});var fi=g(Vs=>{Object.defineProperty(Vs,"__esModule",{value:true});var Ll=li(),Hl=[Ll.default];Vs.default=Hl;});var pi=g(Fe=>{Object.defineProperty(Fe,"__esModule",{value:true});Fe.contentVocabulary=Fe.metadataVocabulary=void 0;Fe.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Fe.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];});var mi=g(xs=>{Object.defineProperty(xs,"__esModule",{value:true});var Gl=bo(),Jl=Mo(),Wl=di(),Bl=fi(),hi=pi(),Ql=[Gl.default,Jl.default,(0, Wl.default)(),Bl.default,hi.metadataVocabulary,hi.contentVocabulary];xs.default=Ql;});var _i=g(Zt=>{Object.defineProperty(Zt,"__esModule",{value:true});Zt.DiscrError=void 0;var yi;(function(t){t.Tag="tag",t.Mapping="mapping";})(yi||(Zt.DiscrError=yi={}));});var $i=g(Ks=>{Object.defineProperty(Ks,"__esModule",{value:true});var Ue=S(),zs=_i(),gi=Ct(),Xl=at(),Yl=q(),Zl={message:({params:{discrError:t,tagName:e}})=>t===zs.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0, Ue._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},ef={keyword:"discriminator",type:"object",schemaType:"object",error:Zl,code(t){let{gen:e,data:r,schema:s,parentSchema:n,it:o}=t,{oneOf:i}=n;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=s.propertyName;if(typeof a!="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 c=e.let("valid",false),u=e.const("tag",(0, Ue._)`${r}${(0, Ue.getProperty)(a)}`);e.if((0, Ue._)`typeof ${u} == "string"`,()=>d(),()=>t.error(false,{discrError:zs.DiscrError.Tag,tag:u,tagName:a})),t.ok(c);function d(){let h=m();e.if(false);for(let p in h)e.elseIf((0, Ue._)`${u} === ${p}`),e.assign(c,l(h[p]));e.else(),t.error(false,{discrError:zs.DiscrError.Mapping,tag:u,tagName:a}),e.endIf();}function l(h){let p=e.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:h},p);return t.mergeEvaluated(f,Ue.Name),p}function m(){var h;let p={},f=_(n),y=true;for(let A=0;A<i.length;A++){let w=i[A];if(w?.$ref&&!(0, Yl.schemaHasRulesButRef)(w,o.self.RULES)){let ce=w.$ref;if(w=gi.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,ce),w instanceof gi.SchemaEnv&&(w=w.schema),w===void 0)throw new Xl.default(o.opts.uriResolver,o.baseId,ce)}let se=(h=w?.properties)===null||h===void 0?void 0:h[a];if(typeof se!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(f||_(w)),j(se,A);}if(!y)throw new Error(`discriminator: "${a}" must be required`);return p;function _({required:A}){return Array.isArray(A)&&A.includes(a)}function j(A,w){if(A.const)N(A.const,w);else if(A.enum)for(let se of A.enum)N(se,w);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function N(A,w){if(typeof A!="string"||A in p)throw new Error(`discriminator: "${a}" values must be unique strings`);p[A]=w;}}}};Ks.default=ef;});var vi=g((Ip,tf)=>{tf.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:true,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:true,readOnly:{type:"boolean",default:false},examples:{type:"array",items:true},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:true},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},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:true,enum:{type:"array",items:true,minItems:1,uniqueItems:true},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:true}]},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:true};});var bi=g((M,Fs)=>{Object.defineProperty(M,"__esModule",{value:true});M.MissingRefError=M.ValidationError=M.CodeGen=M.Name=M.nil=M.stringify=M.str=M._=M.KeywordCxt=M.Ajv=void 0;var rf=yo(),sf=mi(),nf=$i(),wi=vi(),of=["/properties"],er="http://json-schema.org/draft-07/schema",Le=class extends rf.default{_addVocabularies(){super._addVocabularies(),sf.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(nf.default);}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(wi,of):wi;this.addMetaSchema(e,er,false),this.refs["http://json-schema.org/schema"]=er;}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(er)?er:void 0)}};M.Ajv=Le;Fs.exports=M=Le;Fs.exports.Ajv=Le;Object.defineProperty(M,"__esModule",{value:true});M.default=Le;var af=it();Object.defineProperty(M,"KeywordCxt",{enumerable:true,get:function(){return af.KeywordCxt}});var He=S();Object.defineProperty(M,"_",{enumerable:true,get:function(){return He._}});Object.defineProperty(M,"str",{enumerable:true,get:function(){return He.str}});Object.defineProperty(M,"stringify",{enumerable:true,get:function(){return He.stringify}});Object.defineProperty(M,"nil",{enumerable:true,get:function(){return He.nil}});Object.defineProperty(M,"Name",{enumerable:true,get:function(){return He.Name}});Object.defineProperty(M,"CodeGen",{enumerable:true,get:function(){return He.CodeGen}});var cf=It();Object.defineProperty(M,"ValidationError",{enumerable:true,get:function(){return cf.default}});var uf=at();Object.defineProperty(M,"MissingRefError",{enumerable:true,get:function(){return uf.default}});});var Js={$schema:"http://json-schema.org/draft-07/schema#",$id:"https://nsreehari.github.io/boards/live-cards.schema.json",definitions:{bind_ref:{description:"A card data path reference, e.g. 'card_data.raw_quotes' or 'requires.upstream'",type:"string",pattern:"^(card_data|requires|fetched_sources|computed_values)(\\.|$)"},bind_or_literal:{description:"A literal value or a bind reference object",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object",properties:{bind:{$ref:"#/definitions/bind_ref"}},required:["bind"]}]},compute_expr:{description:"A declarative JSON compute expression",type:"object",required:["fn"],properties:{fn:{type:"string",description:"Function name from the built-in vocabulary",enum:["sum","avg","min","max","count","first","last","add","sub","mul","div","round","abs","mod","gt","gte","lt","lte","eq","neq","if","and","or","not","concat","upper","lower","template","filter","pluck","map","sort","slice","flat","unique","group","get","default","now","diff_days","format_date"]},input:{description:"card_data.path, literal, array of inputs, or nested compute_expr",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{$ref:"#/definitions/compute_expr"}]},field:{type:"string",description:"For pluck/sum/group \u2014 the object key to extract"},where:{$ref:"#/definitions/compute_expr",description:"For filter \u2014 predicate expression ($ = current item)"},cond:{$ref:"#/definitions/compute_expr",description:"For if \u2014 condition expression"},then:{description:"For if \u2014 value when cond is truthy"},else:{description:"For if \u2014 value when cond is falsy"},format:{type:"string",description:"For format_date \u2014 date format string"}}},meta:{type:"object",properties:{title:{type:"string"},tags:{type:"array",items:{type:"string"}}}},requires:{type:"array",items:{type:"string"},description:"IDs of upstream nodes this node depends on"},provides:{type:"array",items:{type:"object",required:["bindTo","ref"],properties:{bindTo:{type:"string",description:"Token name published downstream"},ref:{type:"string",description:"Path to read value from (card_data.*, requires.*, fetched_sources.*, computed_values.*)"}}},description:"Explicit bindings exposing computed or card_data values downstream as named tokens"},compute_step:{description:"A single ordered compute step: reads card_data.*/requires.*/computed_values.*, writes to computed_values[bindTo]",type:"object",required:["bindTo","expr"],properties:{bindTo:{type:"string",description:"Key in computed_values to write result"},expr:{type:"string",description:"JSONata expression evaluated against { card_data, requires, fetched_sources, computed_values }"}}},source_def:{description:"One source entry. The engine requires 'bindTo' (compute namespace key) and 'outputFile' (delivery signal path). bindTo and outputFile must be unique across all source_defs in a card. Every other property is yours \u2014 add whatever your task-executor needs: kind, url, headers, mailbox, channel, model, query, etc. The full object is passed verbatim as the --in JSON to the executor.",type:"object",required:["bindTo","outputFile"],additionalProperties:true,properties:{bindTo:{type:"string",description:"Key under fetched_sources.* available in compute expressions"},outputFile:{type:"string",description:"Board-relative path the executor writes its JSON result to. Presence of this file signals delivery."},projections:{type:"object",description:"Named data projections from card_data or requires, evaluated before the executor is called. Each key is a ref name; each value is a JSONata expression rooted at card_data or requires. The resolved values are passed to the executor as _projections. fetched_sources, computed_values, and source_defs are not accessible here \u2014 sources run before those exist.",additionalProperties:{type:"string"}},optionalForCompletionGating:{type:"boolean",default:false,description:"When true this source does not gate card completion. Default false when absent, so source_defs are completion-gating by default."},timeout:{type:"integer",minimum:0,default:12e4,description:"Executor/script timeout in ms. Default: 120 000 (2 min)."},script:{type:"string",description:"Legacy direct-run: shell command executed when no .task-executor is registered. stdout is captured as the result."}}},render_element:{type:"object",required:["kind"],properties:{id:{type:"string",description:"Optional element ID for targeted updates"},kind:{enum:["metric","table","editable-table","chart","form","filter","list","notes","todo","alert","narrative","badge","text","markdown","ref","custom","actions"]},label:{type:"string",description:"Heading above this element"},className:{type:"string",description:"Bootstrap grid class, e.g. 'col-12 col-md-6'"},visible:{type:"string",description:"card_data/requires/fetched_sources/computed_values path \u2014 element shown only if truthy"},data:{type:"object",properties:{bind:{$ref:"#/definitions/bind_ref",description:"card_data/requires/fetched_sources/computed_values path to read data from"},writeTo:{$ref:"#/definitions/bind_ref",description:"card_data path for user input (form, filter, todo, notes)"},columns:{type:"array",items:{type:"string"},description:"table: visible columns"},maxRows:{type:"integer",description:"table/list: max rows to display"},sortable:{type:"boolean",default:true,description:"table: enable click-to-sort"},placeholder:{type:"string",description:"Empty-state message"},chartType:{enum:["bar","line","pie","doughnut"]},chartOptions:{type:"object",description:"Chart.js options passthrough"},fields:{type:"object",description:"JSON Schema for form/filter fields"},thresholds:{type:"object",properties:{green:{type:"string"},amber:{type:"string"}}},colorMap:{type:"object",description:"badge: value \u2192 Bootstrap color"},style:{enum:["heading","muted","default"],description:"text: display style"},upload:{type:"boolean",default:true,description:"file-upload: show drop zone (false = read-only file list)"},accept:{type:"array",items:{type:"string"},description:"file-upload: allowed extensions"},multiple:{type:"boolean",default:true,description:"file-upload: allow multiple files"},fileAttach:{type:"boolean",default:false,description:"chat: enable inline file attachments"},fileAccept:{type:"array",items:{type:"string"},description:"chat: allowed attachment extensions"},buttons:{type:"array",description:"actions: button definitions",items:{type:"object",required:["id","label"],properties:{id:{type:"string"},label:{type:"string"},style:{type:"string",description:"Bootstrap button variant, e.g. 'success', 'outline-danger'"},size:{type:"string",default:"sm"},disabled:{oneOf:[{type:"boolean"},{type:"string",description:"card_data/requires/fetched_sources/computed_values path \u2014 truthy = disabled"}]}}}}}}}},view:{type:"object",required:["elements"],properties:{elements:{type:"array",minItems:1,items:{$ref:"#/definitions/render_element"}},layout:{type:"object",properties:{board:{type:"object",properties:{col:{type:"integer",minimum:1,maximum:12},order:{type:"integer"}}},canvas:{type:"object",properties:{x:{type:"number"},y:{type:"number"},w:{type:"number"},h:{type:"number"}}}}},features:{type:"object",properties:{chat:{type:"boolean",default:false},notes:{type:"boolean",default:false},refresh:{type:"boolean",default:true}}}}}},title:"LiveCard",description:"A unified card node. Behavior depends on which sections are present (source_defs, compute, view, etc.)",type:"object",required:["id"],additionalProperties:false,properties:{id:{type:"string"},requires:{$ref:"#/definitions/requires"},provides:{$ref:"#/definitions/provides"},meta:{$ref:"#/definitions/meta"},view:{$ref:"#/definitions/view"},card_data:{type:"object",description:"Authored card data and runtime metadata. Includes uploaded-file metadata maintained by host handlers and inference evaluation results.",properties:{files:{type:"array",description:"Optional uploaded-file metadata maintained by host handlers. Stored name is normalized and serial-prefixed (for example 001-my_file.pdf).",items:{type:"object",required:["name","stored_name"],properties:{name:{type:"string",minLength:1},stored_name:{type:"string",minLength:5,maxLength:32,pattern:"^[0-9]{3,}-[a-z0-9._-]+$"},size:{oneOf:[{type:"integer",minimum:0},{type:"null"}]},mime_type:{type:"string"},path:{type:"string",pattern:"^[^\\s]+/files/[0-9]{3,}-[a-z0-9._-]+$"},uploaded_at:{type:"string",format:"date-time"},chat:{type:"boolean",description:"Whether this file entry is associated with a chat interaction"}},additionalProperties:false}}},additionalProperties:true},source_defs:{type:"array",description:"Source entries. Each entry is passed verbatim to the board's .task-executor (registered via init --task-executor) as the --in JSON file. The executor fetches/generates the data and writes JSON to --out. If no executor is registered, the built-in executor runs the entry's 'cli' command directly. Sources gate completion by default. Set optionalForCompletionGating: true for enrichment-only source_defs that should not block task-completed.",items:{$ref:"#/definitions/source_def"}},compute:{type:"array",description:"Ordered array of compute steps. Each reads card_data.*/requires.*/fetched_sources.*/computed_values.* and writes to ephemeral computed_values[bindTo].",items:{$ref:"#/definitions/compute_step"}}}};var Pi=Ci(bi());var ff=createRequire(import.meta.url),pf=ff("./jsonata-sync.cjs"),tr=null;var Ei=/\b(card_data|requires|fetched_sources|computed_values|source_defs)\b/g,hf=/^\s*(card_data|requires|fetched_sources|computed_values|source_defs)(\.|$)/;function mf(t){let e=new Set,r;for(Ei.lastIndex=0;(r=Ei.exec(t))!==null;)e.add(r[1]);return e}function Ni(t){let e=hf.exec(t);return e?e[1]:null}function Si(t,e,r,s){try{pf(t);}catch(o){let i=o instanceof Error?o.message:String(o);s.push(`${e}: invalid JSONata expression (${i})`);return}let n=mf(t);for(let o of n)r.has(o)||s.push(`${e}: disallowed namespace "${o}" in expression`);}function Us(t,e,r){if(Array.isArray(t)){t.forEach((n,o)=>{Us(n,`${e}/${o}`,r);});return}if(typeof t=="string"){let n=Ni(t);if(!n)return;new Set(["card_data","requires","computed_values"]).has(n)||r.push(`${e}: disallowed namespace "${n}" in view reference`);return}if(!t||typeof t!="object")return;let s=t;for(let[n,o]of Object.entries(s))Us(o,`${e}/${n}`,r);}function yf(){if(tr)return tr;let t=new Pi.default({allErrors:true});return df(t),tr=t.compile(Js),tr}function _f(t){let e=yf(),r=e(t),s=(e.errors??[]).map(n=>`${n.instancePath||"/"}: ${n.message??"unknown error"}`);if(t&&typeof t=="object"&&!Array.isArray(t)){let n=t.source_defs;if(Array.isArray(n)){let o=new Set,i=new Set;n.forEach((a,c)=>{if(!a||typeof a!="object"||Array.isArray(a))return;let u=a;typeof u.bindTo=="string"&&u.bindTo&&(o.has(u.bindTo)&&s.push(`/source_defs/${c}/bindTo: bindTo "${u.bindTo}" must be unique across all source_defs`),o.add(u.bindTo)),typeof u.outputFile=="string"&&u.outputFile&&(i.has(u.outputFile)&&s.push(`/source_defs/${c}/outputFile: outputFile "${u.outputFile}" must be unique across all source_defs`),i.add(u.outputFile));});}}return !r||s.length>0?{ok:false,errors:s}:{ok:true,errors:[]}}function gf(t){let e=[];if(!t||typeof t!="object"||Array.isArray(t))return {ok:true,errors:[]};let r=t,s=r.compute;Array.isArray(s)&&s.forEach((u,d)=>{if(!u||typeof u!="object"||Array.isArray(u))return;let l=u.expr;typeof l!="string"||l.trim().length===0||Si(l,`/compute/${d}/expr`,new Set(["card_data","requires","fetched_sources","computed_values"]),e);});let n=new Set(["card_data","requires","fetched_sources","computed_values"]),o=r.provides;Array.isArray(o)&&o.forEach((u,d)=>{if(!u||typeof u!="object"||Array.isArray(u))return;let l=u.ref;if(typeof l!="string"||l.trim().length===0)return;let m=Ni(l);m===null?e.push(`/provides/${d}/ref: path "${l}" must start with a valid namespace (${[...n].join(", ")})`):n.has(m)||e.push(`/provides/${d}/ref: disallowed namespace "${m}" in path "${l}" (valid: ${[...n].join(", ")})`);});let i=r.view;i&&typeof i=="object"&&!Array.isArray(i)&&Us(i,"/view",e);let a=new Set(["card_data","requires"]),c=r.source_defs;return Array.isArray(c)&&c.forEach((u,d)=>{if(!u||typeof u!="object"||Array.isArray(u))return;let l=u.projections;if(!(!l||typeof l!="object"||Array.isArray(l)))for(let[m,h]of Object.entries(l))typeof h!="string"||h.trim().length===0||Si(h,`/source_defs/${d}/projections/${m}`,a,e);}),{ok:e.length===0,errors:e}}function ki(t){let e=_f(t);if(!e.ok)return e;let r=gf(t);return r.ok?{ok:true,errors:[]}:{ok:false,errors:r.errors}}function xp(t){let e=ki(t);return {isValid:e.ok,issues:e.errors}}
9
9
  export{xp as validateCardPreflight};//# sourceMappingURL=card-validation.js.map
10
10
  //# sourceMappingURL=card-validation.js.map