@highstate/designer 0.9.23 → 0.9.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{DGGZlK_j.js → 2_2KUf9V.js} +1 -1
- package/.output/public/_nuxt/{B9mqi9z7.js → 3LpHLxRl.js} +1 -1
- package/.output/public/_nuxt/3PCN7j8q.js +1 -0
- package/.output/public/_nuxt/{DqjoH-x_.js → 59PMIeQ4.js} +1 -1
- package/.output/public/_nuxt/{C4_hyZfA.js → 6sv365WT.js} +1 -1
- package/.output/public/_nuxt/7i6ebBbE.js +1 -0
- package/.output/public/_nuxt/B9LFeMs0.js +1 -0
- package/.output/public/_nuxt/{CCWo5rW7.js → BE7U7IMi.js} +1 -1
- package/.output/public/_nuxt/BFGH3z3o.js +1 -0
- package/.output/public/_nuxt/{ChgcJmVR.js → BH4nlVIU.js} +1 -1
- package/.output/public/_nuxt/{BRz27G3j.js → BQetnsDA.js} +1 -1
- package/.output/public/_nuxt/BRuYF4D2.js +1 -0
- package/.output/public/_nuxt/{BWTftWoG.js → BWYCrvX0.js} +1 -1
- package/.output/public/_nuxt/{DeoaNYc1.js → BXM3C0V4.js} +1 -1
- package/.output/public/_nuxt/{B189csPj.js → BY52G8Tm.js} +1 -1
- package/.output/public/_nuxt/{B5Eo-Ujz.js → Ba86WTV8.js} +1 -1
- package/.output/public/_nuxt/{CWazJ566.js → Bb5baCOl.js} +1 -1
- package/.output/public/_nuxt/BdIRPxiF.js +1 -0
- package/.output/public/_nuxt/{B5LlFtQf.js → BfSzgjS_.js} +1 -1
- package/.output/public/_nuxt/{BxRWCLFh.js → BiIBleSl.js} +1 -1
- package/.output/public/_nuxt/Bj3rqU6I.js +1 -0
- package/.output/public/_nuxt/{DeupYvpN.js → Bn0Zbfoq.js} +1 -1
- package/.output/public/_nuxt/{iZKo0eie.js → BnGFifCP.js} +1 -1
- package/.output/public/_nuxt/BsRVBDsu.js +1 -0
- package/.output/public/_nuxt/BupwbIct.js +1 -0
- package/.output/public/_nuxt/Bv67ecSF.js +1 -0
- package/.output/public/_nuxt/BwdNL8Va.js +1 -0
- package/.output/public/_nuxt/C-9cuL7d.js +1 -0
- package/.output/public/_nuxt/C3yhbqK4.js +1 -0
- package/.output/public/_nuxt/C9YEl5sm.js +1 -0
- package/.output/public/_nuxt/{BoC8E-T9.js → CAhH2MwF.js} +1 -1
- package/.output/public/_nuxt/CIKz8Dy1.js +1 -0
- package/.output/public/_nuxt/CL05HtGp.js +1 -0
- package/.output/public/_nuxt/{BF7lERe4.js → CS-zEzwC.js} +1 -1
- package/.output/public/_nuxt/CSUrQ8gc.js +2 -0
- package/.output/public/_nuxt/CZPJwgkG.js +1 -0
- package/.output/public/_nuxt/{Jx-0SCro.js → CaoWeBfh.js} +1 -1
- package/.output/public/_nuxt/{TwvQJIWC.js → Ce2VDx7d.js} +1 -1
- package/.output/public/_nuxt/{DoodpQpa.js → ChqmTuOf.js} +2 -2
- package/.output/public/_nuxt/CpCtee_A.js +1 -0
- package/.output/public/_nuxt/{f9NuEumg.js → CqvStsgd.js} +1 -1
- package/.output/public/_nuxt/CxIHZSF6.js +1 -0
- package/.output/public/_nuxt/{BvMxGlog.js → CxkhZvbM.js} +1 -1
- package/.output/public/_nuxt/{D8BPl5Ng.js → D7XUjlaN.js} +1 -1
- package/.output/public/_nuxt/DDcCARbk.js +1 -0
- package/.output/public/_nuxt/DDisVaZ-.js +1 -0
- package/.output/public/_nuxt/DEbbN9kC.js +1 -0
- package/.output/public/_nuxt/DHXuoO9y.js +1 -0
- package/.output/public/_nuxt/{B9t6gCA0.js → DIeBS5QK.js} +1 -1
- package/.output/public/_nuxt/{Bkak_ypl.js → DOxpgdeB.js} +47 -47
- package/.output/public/_nuxt/{DcuosykK.js → DYmoQtxJ.js} +1 -1
- package/.output/public/_nuxt/DbQdvSZh.js +1 -0
- package/.output/public/_nuxt/DdJzczvw.js +1 -0
- package/.output/public/_nuxt/{DoW4m9dD.js → Dh4MZoTg.js} +1 -1
- package/.output/public/_nuxt/DzZyM8cg.js +1 -0
- package/.output/public/_nuxt/{DgGsslqu.js → J6PXxuMa.js} +1 -1
- package/.output/public/_nuxt/SecretValueField.Bt8N7AOu.css +1 -0
- package/.output/public/_nuxt/TzxBW-Dx.js +1 -0
- package/.output/public/_nuxt/Vr2kfwLx.js +1 -0
- package/.output/public/_nuxt/WAOquFQG.js +1 -0
- package/.output/public/_nuxt/{K9ySVciZ.js → XEdD8kNU.js} +1 -1
- package/.output/public/_nuxt/{LzkmrMfu.js → Z4_uNFpl.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/444e24b1-e3bd-412e-905a-3508978d03c2.json +1 -0
- package/.output/public/_nuxt/{entry.B__IA1SB.css → entry.CRqPpN6-.css} +1 -1
- package/.output/public/_nuxt/{CcdbamqU.js → fewcdjrN.js} +1 -1
- package/.output/public/_nuxt/g2vlOeoR.js +1 -0
- package/.output/public/_nuxt/gjCKVrBc.js +1 -0
- package/.output/public/_nuxt/{graph-resolver-3Wc6wUO6.js → graph-resolver-B43q5cy5.js} +6 -6
- package/.output/public/_nuxt/operations.B7FA252u.css +1 -0
- package/.output/public/_nuxt/{DKuR9WtZ.js → uj4-TOVk.js} +1 -1
- package/.output/public/_nuxt/{BflOb3zh.js → xGUJRHBC.js} +1 -1
- package/.output/server/index.mjs +1292 -1243
- package/.output/server/package.json +1 -1
- package/package.json +5 -5
- package/.output/public/_nuxt/B0DwtIiW.js +0 -1
- package/.output/public/_nuxt/BIUo-Bxf.js +0 -1
- package/.output/public/_nuxt/BIaCZ37Q.js +0 -1
- package/.output/public/_nuxt/BR84xh6o.js +0 -1
- package/.output/public/_nuxt/BTHtjCvv.js +0 -1
- package/.output/public/_nuxt/BdBhgVvK.js +0 -1
- package/.output/public/_nuxt/BjfuCvsP.js +0 -1
- package/.output/public/_nuxt/BkGCFSTP.js +0 -1
- package/.output/public/_nuxt/BpPu1KhW.js +0 -1
- package/.output/public/_nuxt/BuEUFExJ.js +0 -1
- package/.output/public/_nuxt/Bv2mtDTo.js +0 -1
- package/.output/public/_nuxt/Bzy3U_4D.js +0 -1
- package/.output/public/_nuxt/C2OahqVS.js +0 -1
- package/.output/public/_nuxt/C2nQTzN4.js +0 -1
- package/.output/public/_nuxt/C53Fxxsk.js +0 -1
- package/.output/public/_nuxt/CPa4tq4x.js +0 -1
- package/.output/public/_nuxt/CW46IvFj.js +0 -1
- package/.output/public/_nuxt/CdAJz8Zf.js +0 -1
- package/.output/public/_nuxt/CgrnwBjj.js +0 -1
- package/.output/public/_nuxt/ChL5CFGQ.js +0 -2
- package/.output/public/_nuxt/CxOwNk56.js +0 -1
- package/.output/public/_nuxt/Cz0mhusi.js +0 -1
- package/.output/public/_nuxt/DATYi_ZW.js +0 -1
- package/.output/public/_nuxt/Dfmtf7xs.js +0 -1
- package/.output/public/_nuxt/DqrkUst7.js +0 -1
- package/.output/public/_nuxt/DrqQhYAT.js +0 -1
- package/.output/public/_nuxt/EPq4mQZK.js +0 -1
- package/.output/public/_nuxt/EozEqmut.js +0 -1
- package/.output/public/_nuxt/LfqdzYdw.js +0 -1
- package/.output/public/_nuxt/SecretValueField.SMGlmIfE.css +0 -1
- package/.output/public/_nuxt/V5hR3Nor.js +0 -1
- package/.output/public/_nuxt/b-Mr8ypy.js +0 -1
- package/.output/public/_nuxt/builds/meta/59532fa9-bbe6-423e-8fdc-69d5821c94aa.json +0 -1
- package/.output/public/_nuxt/operations.3bVU1gWl.css +0 -1
|
@@ -156,20 +156,20 @@ ${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.pus
|
|
|
156
156
|
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
157
157
|
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){const r=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,t.indent)){const n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const i=!this.onKeyLine&&this.indent===t.indent,n=i&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(n&&r.sep&&!r.value){const s=[];for(let a=0;a<r.sep.length;++a){const c=r.sep[a];switch(c.type){case"newline":s.push(a);break;case"space":break;case"comment":c.indent>t.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(o=r.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":n||r.value?(o.push(this.sourceToken),t.items.push({start:o}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):n||r.value?(o.push(this.sourceToken),t.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(r.explicitKey)if(r.sep)if(r.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Pt(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(_p(r.key)&&!Pt(r.sep,"newline")){const s=tn(r.start),a=r.key,c=r.sep;c.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:a,sep:c}]})}else o.length>0?r.sep=r.sep.concat(o,this.sourceToken):r.sep.push(this.sourceToken);else if(Pt(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const s=tn(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||n?t.items.push({start:o,key:null,sep:[this.sourceToken]}):Pt(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);n||r.value?(t.items.push({start:o,key:s,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(s):(Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{const s=this.startBlockValue(t);if(s){if(s.type==="block-seq"){if(!r.explicitKey&&r.sep&&!Pt(r.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&t.items.push({start:o});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){const r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){const i="end"in r.value?r.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){const n=t.items[t.items.length-2]?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,r.start),n.push(this.sourceToken),t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;r.value||Pt(r.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>t.indent){const i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i&&i.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?t.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!r||r.value?t.items.push({start:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);!r||r.value?t.items.push({start:[],key:n,sep:[]}):r.sep?this.stack.push(n):Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){const n=fr(i),o=tn(n);tu(t);const s=t.end.splice(1,t.end.length);s.push(this.sourceToken);const a={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let r=this.source.indexOf(`
|
|
158
158
|
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
|
159
|
-
`,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=fr(t),i=tn(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=fr(t),i=tn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function O0(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new E0||null,prettyErrors:t}}function x0(e,t={}){const{lineCounter:r,prettyErrors:i}=O0(t),n=new N0(r?.addNewLine),o=new _0(t);let s=null;for(const a of o.compose(n.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Bn(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(Ha(e,r)),s.warnings.forEach(Ha(e,r))),s}function j0(e,t,r){let i;const n=x0(e,r);if(!n)return null;if(n.warnings.forEach(o=>Gh(n.options.logLevel,o)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}var Ye=H({title:q().optional(),globalTitle:q().optional(),description:q().optional(),color:q().optional(),icon:q().optional(),iconColor:q().optional(),avatarUrl:q().optional(),secondaryIcon:q().optional(),secondaryIconColor:q().optional()}),ut=Ye.pick({title:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),wp=Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),xn=Ye.pick({title:!0,description:!0,avatarUrl:!0,icon:!0,iconColor:!0}).required({title:!0}),A0=H({createdAt:Ie(),updatedAt:Ie()}),dt=q().regex(/^[a-z][a-z0-9-_.]+$/).min(2).max(64),Fi=xt([Rn([dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)])]),Qi=q().regex(/^[a-z][a-zA-Z0-9]+$/).min(2).max(64);H({type:Fi,schema:bn(),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0}),definitionHash:Ke()});var z0=Symbol("runtimeSchema"),kp=bt(["composite","unit"]),Sp=H({schema:bn(),[z0]:Ph(de).optional(),required:Re(),meta:Ye.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),nu=H({type:Fi,required:Re(),multiple:Re(),meta:Ye.required({title:!0}).pick({title:!0,description:!0})}),T0=H({type:dt,kind:kp,args:Ze(Qi,Sp),inputs:Ze(Qi,nu),outputs:Ze(Qi,nu),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0,secondaryIcon:!0,secondaryIconColor:!0}).extend({category:q().optional(),defaultNamePrefix:q()}),definitionHash:Ke()}),Ip=H({x:Ke(),y:Ke()}),Ot=Rn([Fi,":",dt]),pn=H({instanceId:Ot,output:q()}),Oo=H({hubId:q()}),P0=H({args:Ze(q(),Ct()).optional(),inputs:Ze(q(),qe(pn)).optional(),hubInputs:Ze(q(),qe(Oo)).optional(),injectionInputs:qe(Oo).optional(),position:Ip.optional()}),eo=H({id:Ot,kind:kp,type:Fi,name:dt,...P0.shape,resolvedInputs:Ze(q(),qe(pn)).optional(),parentId:Ot.optional(),outputs:Ze(q(),qe(pn)).optional(),resolvedOutputs:Ze(q(),qe(pn)).optional()}),D0=H({position:Ip.optional(),inputs:qe(pn).optional(),injectionInputs:qe(Oo).optional()}),U0=H({id:be(),...D0.shape}),C0=H({"c857cac5-caa6-4421-b82c-e561fbce6367":ve(!0),value:q()}),B0=H({name:q(),contentType:q().optional(),size:Ke().optional(),mode:Ke().optional()}),R0=H({"d55c63ac-3174-4756-808f-f778e99af0d1":ve(!0),hash:q(),meta:ut.optional()}),F0=xt([H({type:ve("embedded"),isBinary:Re().optional(),value:q()}),H({type:ve("artifact"),...R0.shape})]),Ep=H({meta:B0,content:F0}),L0=xt([q(),Ke(),Re(),q().array()]);H({name:q(),meta:Ye.pick({title:!0,icon:!0,iconColor:!0}).required({title:!0}),complementaryTo:q().optional(),value:L0.optional()});var Z0=Sp.extend({readonly:Dt.boolean(),computed:Dt.boolean()}),M0=Dt.object({package:Dt.string(),path:Dt.string().optional()});Dt.object({...T0.shape,source:M0,secrets:Dt.record(Dt.string(),Z0)});function Sa(e){return"source"in e}var Np=H({image:q(),command:q().array(),cwd:q().optional(),env:Ze(q(),q()).optional(),files:Ze(q(),Ep).optional()});H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:Np});var Op=xt([H({type:ve("markdown"),content:q()}),H({type:ve("qr"),content:q(),showContent:Dh(),language:q().optional()}),H({type:ve("file"),file:Ep})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),content:Op.array()});var q0=xt([H({type:ve("before-destroy")})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:q0});var V0=H({name:q()});H({name:q(),image:q(),params:Ze(q(),Ct())});H({projectId:be(),workerVersionId:be(),apiUrl:Hd(),apiKey:q()});H({instanceId:q(),args:Ze(q(),Ct()),inputs:Ze(q(),pn.array()),invokedTriggers:V0.array(),secretNames:q().array(),stateIdMap:Ze(Ot,q())});var ru=new WeakMap;function K0(e){const t=C0.safeParse(e);if(!t.success)return e;const r=ru.get(e);if(r!==void 0)return r;const i=j0(t.data.value);return ru.set(e,i),i}jt("type",[H({type:ve("host")})]);const J0={id:"q8xbilhwpsn65zjlv5kz44qh"},G0={id:"n0rfvpl9o77iqf29ff4kk5gf"},W0={id:"pmn9y901jeiz2ydh93045l39"},H0={id:"qppfcerovu3h22o0x8rlpc3g"};jt("type",[H({type:ve("codebase")}),H({type:ve("database")})]);H({name:dt,spaceId:be().default(J0.id),modelStorageId:be().default(H0.id),libraryId:be().default(G0.id),pulumiBackendId:be().default(W0.id),meta:ut});H({id:q(),name:dt,meta:ut,spaceId:be(),modelStorageId:be(),libraryId:be(),pulumiBackendId:be(),...A0.shape});const X0=H({encryptedIdentities:qe(q()),hasPasskey:Re()});jt("type",[H({type:ve("locked"),unlockSuite:X0.optional()}),H({type:ve("unlocked")})]);jt("type",[H({type:ve("host")})]);H({id:q(),meta:Ye,recipient:q()});const Y0=H({key:q(),order:bt(["asc","desc"])}),Bt=H({search:q().optional(),sortBy:qe(Y0).optional(),skip:Ke().int().nonnegative().default(0).optional(),count:Ke().int().positive().max(100).default(20).optional()}),Q0=Ye.pick({title:!0,description:!0}).required({title:!0});H({id:be(),meta:ut,serviceAccountId:be(),serviceAccountMeta:xn.nullable(),createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});H({id:be(),hash:q(),size:Ke(),meta:ut,createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional(),serviceAccountId:q().optional(),terminalId:q().optional(),pageId:q().optional()});H({name:q(),meta:ut,value:q(),message:q().optional(),order:Ke().min(0).max(100).optional()});const e$=H({stateId:be(),meta:ut,acquiredAt:Ie()});jt("type",[H({type:ve("locked"),locks:e$.array()}),H({type:ve("unlocked"),stateIds:qe(q())})]);H({updatedInstances:eo.array().optional(),updatedHubs:U0.array().optional(),updatedVirtualInstances:eo.array().optional(),updatedGhostInstances:eo.array().optional(),deletedInstanceIds:Ot.array().optional(),deletedHubIds:q().array().optional(),deletedVirtualInstanceIds:Ot.array().optional(),deletedGhostInstanceIds:Ot.array().optional()});const t$=bt(["destroy","update","refresh"]),n$=H({id:Ot,parentId:q().optional(),message:q()}),r$=H({type:t$,instances:qe(n$)}),i$=H({forceUpdateDependencies:Re().default(!1),forceUpdateChildren:Re().default(!1),destroyDependentInstances:Re().default(!0),invokeDestroyTriggers:Re().default(!0),deleteUnreachableResources:Re().default(!1),forceDeleteState:Re().default(!1),allowPartialCompositeInstanceUpdate:Re().default(!1),allowPartialCompositeInstanceDestruction:Re().default(!1),refresh:Re().default(!1),debug:Re().default(!1)}).partial(),xp=bt(["update","preview","destroy","recreate","refresh"]),o$=bt(["pending","running","failing","completed","failed","cancelled"]),jp=Ye.pick({title:!0,description:!0}).required({title:!0});H({projectId:q(),type:xp,instanceIds:qe(Ot).min(1),options:i$.partial().optional(),meta:jp,plan:r$.array().optional()});jt("type",[H({type:ve("updated"),operation:bn()}),H({type:ve("deleted"),operationId:q()})]);H({id:be(),type:xp,status:o$,meta:jp,startedAt:Ie(),updatedAt:Ie(),finishedAt:Ie().nullable()});const s$=H({id:be(),meta:ut,name:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...s$.shape,content:qe(Op)});H({id:be(),meta:wp,name:q().nullable(),systemName:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional()});H({id:be(),meta:xn,createdAt:Ie(),updatedAt:Ie()});Bt.extend({artifactId:q().optional()});jt("type",[H({type:ve("updated"),state:bn()}),H({type:ve("patched"),stateId:q(),patch:bn()}),H({type:ve("deleted"),stateId:q()})]);jt("type",[H({type:ve("registered"),instanceId:q(),params:Ze(q(),Ct())}),H({type:ve("deregistered"),instanceId:q()})]);const a$=bt(["active","unavailable"]);H({id:be(),terminalId:be(),meta:wp,startedAt:Ie(),finishedAt:Ie().nullable()});const u$=H({id:be(),name:q().nullable(),meta:ut,status:a$,stateId:q().nullable(),serviceAccountId:q().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...u$.shape,spec:Np});H({id:be(),meta:ut,name:q(),stateId:be(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional()});const Ap=bt(["password","passkey"]),zp=Ye.pick({title:!0,description:!0}).required({title:!0});H({meta:zp,type:Ap,encryptedIdentity:q(),recipient:q()});H({id:be(),type:Ap,meta:zp,recipient:q(),createdAt:Ie(),updatedAt:Ie()});const c$=bt(["unknown","starting","running","stopping","stopped","error"]);H({id:be(),digest:q(),meta:ut,status:c$,enabled:Re(),apiKeyId:q(),apiKeyMeta:Q0,createdAt:Ie(),updatedAt:Ie()});H({id:be(),identity:q(),meta:ut,serviceAccountId:q(),serviceAccountMeta:xn,createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});class Li{constructor(t,r,i,n){this.nodes=t,this.logger=r,this.outputHandler=i,this.dependentSetHandler=n}workset=new Set;dependencyMap=new Map;dependentMap=new Map;outputMap=new Map;addToWorkset(t){this.workset.add(t)}addAllNodesToWorkset(){for(const t of this.nodes.keys())this.workset.add(t)}get outputs(){return this.outputMap}get dependents(){return this.dependentMap}requireOutput(t){const r=this.outputMap.get(t);if(!r)throw new Error(`Output for node ${t} is not available`);return r}getDependents(t){const r=this.dependentMap.get(t);return r?Array.from(r):[]}invalidate(t){const r=[t];for(;r.length>0;){const i=r.pop();if(!this.nodes.has(i))continue;this.outputMap.delete(i),this.workset.add(i);const n=this.dependentMap.get(i);if(n)for(const o of n)this.outputMap.has(o)&&r.push(o)}}invalidateSingle(t){this.nodes.has(t)&&(this.outputMap.delete(t),this.workset.add(t))}async process(t){for(;this.workset.size>0;){const r=this.workset.values().next().value,i=[{nodeId:r,resolved:!1,dependencies:[]}];for(;i.length>0;){const n=i[i.length-1],{nodeId:o,resolved:s}=n,a=this.nodes.get(o);if(!a){this.logger.warn({nodeId:o},"node not found in the graph, skipping"),i.pop();continue}if(this.outputMap.has(o)){i.pop();continue}if(!s){n.dependencies=gv(this.getNodeDependencies(a));let h=!1;for(const y of n.dependencies){if(!this.nodes.has(y)){this.logger.warn({depId:y,nodeId:o},"dependency not found in the graph, skipping");continue}this.outputMap.has(y)||(i.push({nodeId:y,resolved:!1,dependencies:[]}),h=!0)}if(h){n.resolved=!0;continue}}const c=await this.processNode(a,this.logger);if(t?.aborted){this.logger.warn({nodeId:o},"processing aborted, skipping output");return}const d=new Set,u=this.dependencyMap.get(o)??[];for(const h of u){const y=this.dependentMap.get(h);y&&(y.delete(o),d.add(h),y.size===0&&this.dependentMap.delete(h))}for(const h of n.dependencies){let y=this.dependentMap.get(h);y||(y=new Set,this.dependentMap.set(h,y)),y.add(o),d.add(h)}if(this.dependentSetHandler)for(const h of d){const y=this.dependentMap.get(h);this.dependentSetHandler(h,y)}this.outputMap.set(o,c),this.outputHandler?.(o,c),this.dependencyMap.set(o,n.dependencies),i.pop()}this.workset.delete(r)}}}class l$ extends Li{getNodeDependencies(t){const r=[];if(t.kind==="hub"){for(const i of t.hub.inputs??[])r.push(`instance:${i.instanceId}`);for(const i of t.hub.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}for(const i of Object.values(t.instance.inputs??{}))for(const n of i)r.push(`instance:${n.instanceId}`);for(const i of Object.values(t.instance.hubInputs??{}))for(const n of i)r.push(`hub:${n.hubId}`);for(const i of t.instance.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}processNode(t){const r=u=>{const h=this.outputs.get(`hub:${u.hubId}`);if(!h)return{resolvedInputs:[]};if(h.kind!=="hub")throw new Error("Expected hub node");return h},i=u=>{const h=this.outputs.get(`instance:${u.instanceId}`);if(!h)return{component:null,resolvedInputs:[],resolvedOutputs:[]};if(h.kind!=="instance")throw new Error("Expected instance node");return{component:h.component,resolvedInputs:h.resolvedInputs[u.output]??[],resolvedOutputs:h.resolvedOutputs?.[u.output]}};if(t.kind==="hub"){const u=new Map,h=y=>{u.set(`${y.input.instanceId}:${y.input.output}`,y)};for(const y of t.hub.inputs??[]){const{component:_}=i(y),b=_?.outputs[y.output];if(!b){this.logger.warn({msg:"output not found in the component",input:y,component:_});continue}h({input:y,type:b.type})}for(const y of t.hub.injectionInputs??[]){const{resolvedInputs:_}=r(y);for(const b of _)h(b)}return{kind:"hub",resolvedInputs:Array.from(u.values())}}if(t.instance.resolvedInputs)return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:vv(t.instance.resolvedInputs,(u,h)=>{const y=t.component.inputs[h];return y?u.map(_=>({input:_,type:y.type})):(this.logger.warn({msg:"input not found in the component",inputName:h,component:t.component}),[])}),resolvedOutputs:t.instance.resolvedOutputs??{},resolvedInjectionInputs:[],matchedInjectionInputs:[]};const n=new Map,o=(u,h)=>{let y=n.get(u);y||(y=new Map,n.set(u,y)),y.set(`${h.input.instanceId}:${h.input.output}`,h)},s=(u,h)=>{const y=t.component.inputs[u];if(!y){this.logger.warn({msg:"input not found in the component",input:h,component:t.component});return}const{component:_,resolvedOutputs:b}=i(h);if(!_){this.logger.warn({instanceId:t.instance.id,input:h},"no output found for the input");return}if(Sa(_)){o(u,{input:h,type:y.type});return}if(b)for(const g of b)o(u,{input:g,type:y.type});else o(u,{input:h,type:y.type})};for(const[u,h]of Object.entries(t.instance.inputs??{}))for(const y of h)s(u,y);const a=new Map,c=new Map;for(const u of t.instance.injectionInputs??[]){const{resolvedInputs:h}=r(u);for(const y of h)a.set(`${y.input.instanceId}:${y.input.output}`,y)}for(const[u,h]of Object.entries(t.component.inputs??{})){const y=new Map(a),_=t.instance.hubInputs?.[u]??[];for(const b of _){const{resolvedInputs:g}=r(b);for(const m of g)y.set(`${m.input.instanceId}:${m.input.output}`,m)}for(const b of y.values())if(b.type===h.type){s(u,b.input);const g=`${b.input.instanceId}:${b.input.output}`;a.has(g)&&c.set(g,b)}}const d=bv(Array.from(n.entries()).map(([u,h])=>[u,Array.from(h.values())]));return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:d,resolvedOutputs:t.instance.resolvedOutputs,resolvedInjectionInputs:Array.from(a.values()),matchedInjectionInputs:Array.from(c.values())}}}var Tp={},Zi={};Zi.byteLength=h$;Zi.toByteArray=m$;Zi.fromByteArray=v$;var yt=[],rt=[],f$=typeof Uint8Array<"u"?Uint8Array:Array,to="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var nn=0,d$=to.length;nn<d$;++nn)yt[nn]=to[nn],rt[to.charCodeAt(nn)]=nn;rt[45]=62;rt[95]=63;function Pp(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function h$(e){var t=Pp(e),r=t[0],i=t[1];return(r+i)*3/4-i}function p$(e,t,r){return(t+r)*3/4-r}function m$(e){var t,r=Pp(e),i=r[0],n=r[1],o=new f$(p$(e,i,n)),s=0,a=n>0?i-4:i,c;for(c=0;c<a;c+=4)t=rt[e.charCodeAt(c)]<<18|rt[e.charCodeAt(c+1)]<<12|rt[e.charCodeAt(c+2)]<<6|rt[e.charCodeAt(c+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return n===2&&(t=rt[e.charCodeAt(c)]<<2|rt[e.charCodeAt(c+1)]>>4,o[s++]=t&255),n===1&&(t=rt[e.charCodeAt(c)]<<10|rt[e.charCodeAt(c+1)]<<4|rt[e.charCodeAt(c+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function g$(e){return yt[e>>18&63]+yt[e>>12&63]+yt[e>>6&63]+yt[e&63]}function y$(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(g$(i));return n.join("")}function v$(e){for(var t,r=e.length,i=r%3,n=[],o=16383,s=0,a=r-i;s<a;s+=o)n.push(y$(e,s,s+o>a?a:s+o));return i===1?(t=e[r-1],n.push(yt[t>>2]+yt[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(yt[t>>10]+yt[t>>4&63]+yt[t<<2&63]+"=")),n.join("")}var Ia={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ia.read=function(e,t,r,i,n){var o,s,a=n*8-i-1,c=(1<<a)-1,d=c>>1,u=-7,h=r?n-1:0,y=r?-1:1,_=e[t+h];for(h+=y,o=_&(1<<-u)-1,_>>=-u,u+=a;u>0;o=o*256+e[t+h],h+=y,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+e[t+h],h+=y,u-=8);if(o===0)o=1-d;else{if(o===c)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-d}return(_?-1:1)*s*Math.pow(2,o-i)};Ia.write=function(e,t,r,i,n,o){var s,a,c,d=o*8-n-1,u=(1<<d)-1,h=u>>1,y=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=i?0:o-1,b=i?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+h>=1?t+=y/c:t+=y*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,n),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;e[r+_]=a&255,_+=b,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[r+_]=s&255,_+=b,s/=256,d-=8);e[r+_-b]|=g*128};/*!
|
|
159
|
+
`,r)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const r=fr(t),i=tn(r);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=fr(t),i=tn(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){return this.type!=="comment"||this.indent<=r?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function O0(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new E0||null,prettyErrors:t}}function x0(e,t={}){const{lineCounter:r,prettyErrors:i}=O0(t),n=new N0(r?.addNewLine),o=new _0(t);let s=null;for(const a of o.compose(n.parse(e),!0,e.length))if(!s)s=a;else if(s.options.logLevel!=="silent"){s.errors.push(new Bn(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&r&&(s.errors.forEach(Ha(e,r)),s.warnings.forEach(Ha(e,r))),s}function j0(e,t,r){let i;const n=x0(e,r);if(!n)return null;if(n.warnings.forEach(o=>Gh(n.options.logLevel,o)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},r))}var Ye=H({title:q().optional(),globalTitle:q().optional(),description:q().optional(),color:q().optional(),icon:q().optional(),iconColor:q().optional(),avatarUrl:q().optional(),secondaryIcon:q().optional(),secondaryIconColor:q().optional()}),ut=Ye.pick({title:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),wp=Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),xn=Ye.pick({title:!0,description:!0,avatarUrl:!0,icon:!0,iconColor:!0}).required({title:!0}),A0=H({createdAt:Ie(),updatedAt:Ie()}),dt=q().regex(/^[a-z][a-z0-9-_.]+$/).min(2).max(64),Fi=xt([Rn([dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)]),Rn([dt,ve("."),dt,ve("."),dt,ve("."),ve("v"),Ke().int().min(1)])]),Qi=q().regex(/^[a-z][a-zA-Z0-9]+$/).min(2).max(64);H({type:Fi,schema:bn(),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0}),definitionHash:Ke()});var z0=Symbol("runtimeSchema"),kp=bt(["composite","unit"]),Sp=H({schema:bn(),[z0]:Ph(de).optional(),required:Re(),meta:Ye.required({title:!0}).pick({title:!0,globalTitle:!0,description:!0,color:!0,icon:!0,iconColor:!0})}),nu=H({type:Fi,required:Re(),multiple:Re(),meta:Ye.required({title:!0}).pick({title:!0,description:!0})}),T0=H({type:dt,kind:kp,args:Ze(Qi,Sp),inputs:Ze(Qi,nu),outputs:Ze(Qi,nu),meta:Ye.required({title:!0}).pick({title:!0,description:!0,color:!0,icon:!0,iconColor:!0,secondaryIcon:!0,secondaryIconColor:!0}).extend({category:q().optional(),defaultNamePrefix:q()}),definitionHash:Ke()}),Ip=H({x:Ke(),y:Ke()}),Ot=Rn([Fi,":",dt]),pn=H({instanceId:Ot,output:q()}),Oo=H({hubId:q()}),P0=H({args:Ze(q(),Ct()).optional(),inputs:Ze(q(),qe(pn)).optional(),hubInputs:Ze(q(),qe(Oo)).optional(),injectionInputs:qe(Oo).optional(),position:Ip.optional()}),eo=H({id:Ot,kind:kp,type:Fi,name:dt,...P0.shape,resolvedInputs:Ze(q(),qe(pn)).optional(),parentId:Ot.optional(),outputs:Ze(q(),qe(pn)).optional(),resolvedOutputs:Ze(q(),qe(pn)).optional()}),D0=H({position:Ip.optional(),inputs:qe(pn).optional(),injectionInputs:qe(Oo).optional()}),U0=H({id:be(),...D0.shape}),C0=H({"c857cac5-caa6-4421-b82c-e561fbce6367":ve(!0),value:q()}),B0=H({name:q(),contentType:q().optional(),size:Ke().optional(),mode:Ke().optional()}),R0=H({"d55c63ac-3174-4756-808f-f778e99af0d1":ve(!0),hash:q(),meta:ut.optional()}),F0=xt([H({type:ve("embedded"),isBinary:Re().optional(),value:q()}),H({type:ve("artifact"),...R0.shape})]),Ep=H({meta:B0,content:F0}),L0=xt([q(),Ke(),Re(),q().array()]);H({name:q(),meta:Ye.pick({title:!0,icon:!0,iconColor:!0}).required({title:!0}),complementaryTo:q().optional(),value:L0.optional()});var Z0=Sp.extend({readonly:Dt.boolean(),computed:Dt.boolean()}),M0=Dt.object({package:Dt.string(),path:Dt.string().optional()});Dt.object({...T0.shape,source:M0,secrets:Dt.record(Dt.string(),Z0)});function Sa(e){return"source"in e}var Np=H({image:q(),command:q().array(),cwd:q().optional(),env:Ze(q(),q()).optional(),files:Ze(q(),Ep).optional()});H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:Np});var Op=xt([H({type:ve("markdown"),content:q()}),H({type:ve("qr"),content:q(),showContent:Dh(),language:q().optional()}),H({type:ve("file"),file:Ep})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),content:Op.array()});var q0=xt([H({type:ve("before-destroy")})]);H({name:q(),meta:Ye.pick({title:!0,globalTitle:!0,description:!0,icon:!0,iconColor:!0}).required({title:!0}),spec:q0});var V0=H({name:q()});H({name:q(),image:q(),params:Ze(q(),Ct())});H({projectId:be(),workerVersionId:be(),apiUrl:Hd(),apiKey:q()});H({instanceId:q(),args:Ze(q(),Ct()),inputs:Ze(q(),pn.array()),invokedTriggers:V0.array(),secretNames:q().array(),stateIdMap:Ze(Ot,q())});var ru=new WeakMap;function K0(e){const t=C0.safeParse(e);if(!t.success)return e;const r=ru.get(e);if(r!==void 0)return r;const i=j0(t.data.value);return ru.set(e,i),i}jt("type",[H({type:ve("host")})]);const J0={id:"q8xbilhwpsn65zjlv5kz44qh"},G0={id:"n0rfvpl9o77iqf29ff4kk5gf"},W0={id:"pmn9y901jeiz2ydh93045l39"},H0={id:"qppfcerovu3h22o0x8rlpc3g"};jt("type",[H({type:ve("codebase")}),H({type:ve("database")})]);H({name:dt,spaceId:be().default(J0.id),modelStorageId:be().default(H0.id),libraryId:be().default(G0.id),pulumiBackendId:be().default(W0.id),meta:ut});H({id:q(),name:dt,meta:ut,spaceId:be(),modelStorageId:be(),libraryId:be(),pulumiBackendId:be(),...A0.shape});const X0=H({encryptedIdentities:qe(q()),hasPasskey:Re()});jt("type",[H({type:ve("locked"),unlockSuite:X0.optional()}),H({type:ve("unlocked")})]);jt("type",[H({type:ve("host")})]);H({id:q(),meta:Ye,recipient:q()});const Y0=H({key:q(),order:bt(["asc","desc"])}),Bt=H({search:q().optional(),sortBy:qe(Y0).optional(),skip:Ke().int().nonnegative().default(0).optional(),count:Ke().int().positive().max(100).default(20).optional()}),Q0=Ye.pick({title:!0,description:!0}).required({title:!0});H({id:be(),meta:ut,serviceAccountId:be(),serviceAccountMeta:xn.nullable(),createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});H({id:be(),hash:q(),size:Ke(),meta:ut,createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional(),serviceAccountId:q().optional(),terminalId:q().optional(),pageId:q().optional()});H({name:q(),meta:ut,value:q(),message:q().optional(),order:Ke().min(0).max(100).optional()});const e$=H({stateId:be(),meta:ut,acquiredAt:Ie()});jt("type",[H({type:ve("locked"),locks:e$.array()}),H({type:ve("unlocked"),stateIds:qe(q())})]);H({updatedInstances:eo.array().optional(),updatedHubs:U0.array().optional(),updatedVirtualInstances:eo.array().optional(),updatedGhostInstances:eo.array().optional(),deletedInstanceIds:Ot.array().optional(),deletedHubIds:q().array().optional(),deletedVirtualInstanceIds:Ot.array().optional(),deletedGhostInstanceIds:Ot.array().optional()});const t$=bt(["destroy","update","refresh"]),n$=H({id:Ot,parentId:q().optional(),message:q()}),r$=H({type:t$,instances:qe(n$)}),i$=H({forceUpdateDependencies:Re().default(!1),forceUpdateChildren:Re().default(!1),destroyDependentInstances:Re().default(!0),invokeDestroyTriggers:Re().default(!0),deleteUnreachableResources:Re().default(!1),forceDeleteState:Re().default(!1),allowPartialCompositeInstanceUpdate:Re().default(!1),allowPartialCompositeInstanceDestruction:Re().default(!1),refresh:Re().default(!1),debug:Re().default(!1)}).partial(),xp=bt(["update","preview","destroy","recreate","refresh"]),o$=bt(["pending","running","failing","completed","failed","cancelled"]),jp=Ye.pick({title:!0,description:!0}).required({title:!0}),s$=H({projectId:q(),type:xp,instanceIds:qe(Ot).min(1),options:i$.partial().optional()});s$.extend({meta:jp,plan:r$.array().optional()});jt("type",[H({type:ve("updated"),operation:bn()}),H({type:ve("deleted"),operationId:q()})]);H({id:be(),type:xp,status:o$,meta:jp,startedAt:Ie(),updatedAt:Ie(),finishedAt:Ie().nullable()});const a$=H({id:be(),meta:ut,name:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...a$.shape,content:qe(Op)});H({id:be(),meta:wp,name:q().nullable(),systemName:q().nullable(),stateId:be().nullable(),serviceAccountId:be().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional()});H({id:be(),meta:xn,createdAt:Ie(),updatedAt:Ie()});Bt.extend({artifactId:q().optional()});jt("type",[H({type:ve("updated"),state:bn()}),H({type:ve("patched"),stateId:q(),patch:bn()}),H({type:ve("deleted"),stateId:q()})]);jt("type",[H({type:ve("registered"),instanceId:q(),params:Ze(q(),Ct())}),H({type:ve("deregistered"),instanceId:q()})]);const u$=bt(["active","unavailable"]);H({id:be(),terminalId:be(),meta:wp,startedAt:Ie(),finishedAt:Ie().nullable()});const c$=H({id:be(),name:q().nullable(),meta:ut,status:u$,stateId:q().nullable(),serviceAccountId:q().nullable(),serviceAccountMeta:xn.nullable(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({serviceAccountId:q().optional(),stateId:q().optional(),artifactId:q().optional()});H({...c$.shape,spec:Np});H({id:be(),meta:ut,name:q(),stateId:be(),createdAt:Ie(),updatedAt:Ie()});Bt.extend({stateId:q().optional()});const Ap=bt(["password","passkey"]),zp=Ye.pick({title:!0,description:!0}).required({title:!0});H({meta:zp,type:Ap,encryptedIdentity:q(),recipient:q()});H({id:be(),type:Ap,meta:zp,recipient:q(),createdAt:Ie(),updatedAt:Ie()});const l$=bt(["unknown","starting","running","stopping","stopped","error"]);H({id:be(),digest:q(),meta:ut,status:l$,enabled:Re(),apiKeyId:q(),apiKeyMeta:Q0,createdAt:Ie(),updatedAt:Ie()});H({id:be(),identity:q(),meta:ut,serviceAccountId:q(),serviceAccountMeta:xn,createdAt:Ie()});Bt.extend({serviceAccountId:q().optional()});class Li{constructor(t,r,i,n){this.nodes=t,this.logger=r,this.outputHandler=i,this.dependentSetHandler=n}workset=new Set;dependencyMap=new Map;dependentMap=new Map;outputMap=new Map;addToWorkset(t){this.workset.add(t)}addAllNodesToWorkset(){for(const t of this.nodes.keys())this.workset.add(t)}get outputs(){return this.outputMap}get dependents(){return this.dependentMap}requireOutput(t){const r=this.outputMap.get(t);if(!r)throw new Error(`Output for node ${t} is not available`);return r}getDependents(t){const r=this.dependentMap.get(t);return r?Array.from(r):[]}invalidate(t){const r=[t];for(;r.length>0;){const i=r.pop();if(!this.nodes.has(i))continue;this.outputMap.delete(i),this.workset.add(i);const n=this.dependentMap.get(i);if(n)for(const o of n)this.outputMap.has(o)&&r.push(o)}}invalidateSingle(t){this.nodes.has(t)&&(this.outputMap.delete(t),this.workset.add(t))}async process(t){for(;this.workset.size>0;){const r=this.workset.values().next().value,i=[{nodeId:r,resolved:!1,dependencies:[]}];for(;i.length>0;){const n=i[i.length-1],{nodeId:o,resolved:s}=n,a=this.nodes.get(o);if(!a){this.logger.warn({nodeId:o},"node not found in the graph, skipping"),i.pop();continue}if(this.outputMap.has(o)){i.pop();continue}if(!s){n.dependencies=gv(this.getNodeDependencies(a));let h=!1;for(const y of n.dependencies){if(!this.nodes.has(y)){this.logger.warn({depId:y,nodeId:o},"dependency not found in the graph, skipping");continue}this.outputMap.has(y)||(i.push({nodeId:y,resolved:!1,dependencies:[]}),h=!0)}if(h){n.resolved=!0;continue}}const c=await this.processNode(a,this.logger);if(t?.aborted){this.logger.warn({nodeId:o},"processing aborted, skipping output");return}const d=new Set,u=this.dependencyMap.get(o)??[];for(const h of u){const y=this.dependentMap.get(h);y&&(y.delete(o),d.add(h),y.size===0&&this.dependentMap.delete(h))}for(const h of n.dependencies){let y=this.dependentMap.get(h);y||(y=new Set,this.dependentMap.set(h,y)),y.add(o),d.add(h)}if(this.dependentSetHandler)for(const h of d){const y=this.dependentMap.get(h);this.dependentSetHandler(h,y)}this.outputMap.set(o,c),this.outputHandler?.(o,c),this.dependencyMap.set(o,n.dependencies),i.pop()}this.workset.delete(r)}}}class f$ extends Li{getNodeDependencies(t){const r=[];if(t.kind==="hub"){for(const i of t.hub.inputs??[])r.push(`instance:${i.instanceId}`);for(const i of t.hub.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}for(const i of Object.values(t.instance.inputs??{}))for(const n of i)r.push(`instance:${n.instanceId}`);for(const i of Object.values(t.instance.hubInputs??{}))for(const n of i)r.push(`hub:${n.hubId}`);for(const i of t.instance.injectionInputs??[])r.push(`hub:${i.hubId}`);return r}processNode(t){const r=u=>{const h=this.outputs.get(`hub:${u.hubId}`);if(!h)return{resolvedInputs:[]};if(h.kind!=="hub")throw new Error("Expected hub node");return h},i=u=>{const h=this.outputs.get(`instance:${u.instanceId}`);if(!h)return{component:null,resolvedInputs:[],resolvedOutputs:[]};if(h.kind!=="instance")throw new Error("Expected instance node");return{component:h.component,resolvedInputs:h.resolvedInputs[u.output]??[],resolvedOutputs:h.resolvedOutputs?.[u.output]}};if(t.kind==="hub"){const u=new Map,h=y=>{u.set(`${y.input.instanceId}:${y.input.output}`,y)};for(const y of t.hub.inputs??[]){const{component:_}=i(y),b=_?.outputs[y.output];if(!b){this.logger.warn({msg:"output not found in the component",input:y,component:_});continue}h({input:y,type:b.type})}for(const y of t.hub.injectionInputs??[]){const{resolvedInputs:_}=r(y);for(const b of _)h(b)}return{kind:"hub",resolvedInputs:Array.from(u.values())}}if(t.instance.resolvedInputs)return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:vv(t.instance.resolvedInputs,(u,h)=>{const y=t.component.inputs[h];return y?u.map(_=>({input:_,type:y.type})):(this.logger.warn({msg:"input not found in the component",inputName:h,component:t.component}),[])}),resolvedOutputs:t.instance.resolvedOutputs??{},resolvedInjectionInputs:[],matchedInjectionInputs:[]};const n=new Map,o=(u,h)=>{let y=n.get(u);y||(y=new Map,n.set(u,y)),y.set(`${h.input.instanceId}:${h.input.output}`,h)},s=(u,h)=>{const y=t.component.inputs[u];if(!y){this.logger.warn({msg:"input not found in the component",input:h,component:t.component});return}const{component:_,resolvedOutputs:b}=i(h);if(!_){this.logger.warn({instanceId:t.instance.id,input:h},"no output found for the input");return}if(Sa(_)){o(u,{input:h,type:y.type});return}if(b)for(const g of b)o(u,{input:g,type:y.type});else o(u,{input:h,type:y.type})};for(const[u,h]of Object.entries(t.instance.inputs??{}))for(const y of h)s(u,y);const a=new Map,c=new Map;for(const u of t.instance.injectionInputs??[]){const{resolvedInputs:h}=r(u);for(const y of h)a.set(`${y.input.instanceId}:${y.input.output}`,y)}for(const[u,h]of Object.entries(t.component.inputs??{})){const y=new Map(a),_=t.instance.hubInputs?.[u]??[];for(const b of _){const{resolvedInputs:g}=r(b);for(const m of g)y.set(`${m.input.instanceId}:${m.input.output}`,m)}for(const b of y.values())if(b.type===h.type){s(u,b.input);const g=`${b.input.instanceId}:${b.input.output}`;a.has(g)&&c.set(g,b)}}const d=bv(Array.from(n.entries()).map(([u,h])=>[u,Array.from(h.values())]));return{kind:"instance",instance:t.instance,component:t.component,resolvedInputs:d,resolvedOutputs:t.instance.resolvedOutputs,resolvedInjectionInputs:Array.from(a.values()),matchedInjectionInputs:Array.from(c.values())}}}var Tp={},Zi={};Zi.byteLength=p$;Zi.toByteArray=g$;Zi.fromByteArray=$$;var yt=[],rt=[],d$=typeof Uint8Array<"u"?Uint8Array:Array,to="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var nn=0,h$=to.length;nn<h$;++nn)yt[nn]=to[nn],rt[to.charCodeAt(nn)]=nn;rt[45]=62;rt[95]=63;function Pp(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var i=r===t?0:4-r%4;return[r,i]}function p$(e){var t=Pp(e),r=t[0],i=t[1];return(r+i)*3/4-i}function m$(e,t,r){return(t+r)*3/4-r}function g$(e){var t,r=Pp(e),i=r[0],n=r[1],o=new d$(m$(e,i,n)),s=0,a=n>0?i-4:i,c;for(c=0;c<a;c+=4)t=rt[e.charCodeAt(c)]<<18|rt[e.charCodeAt(c+1)]<<12|rt[e.charCodeAt(c+2)]<<6|rt[e.charCodeAt(c+3)],o[s++]=t>>16&255,o[s++]=t>>8&255,o[s++]=t&255;return n===2&&(t=rt[e.charCodeAt(c)]<<2|rt[e.charCodeAt(c+1)]>>4,o[s++]=t&255),n===1&&(t=rt[e.charCodeAt(c)]<<10|rt[e.charCodeAt(c+1)]<<4|rt[e.charCodeAt(c+2)]>>2,o[s++]=t>>8&255,o[s++]=t&255),o}function y$(e){return yt[e>>18&63]+yt[e>>12&63]+yt[e>>6&63]+yt[e&63]}function v$(e,t,r){for(var i,n=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),n.push(y$(i));return n.join("")}function $$(e){for(var t,r=e.length,i=r%3,n=[],o=16383,s=0,a=r-i;s<a;s+=o)n.push(v$(e,s,s+o>a?a:s+o));return i===1?(t=e[r-1],n.push(yt[t>>2]+yt[t<<4&63]+"==")):i===2&&(t=(e[r-2]<<8)+e[r-1],n.push(yt[t>>10]+yt[t>>4&63]+yt[t<<2&63]+"=")),n.join("")}var Ia={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ia.read=function(e,t,r,i,n){var o,s,a=n*8-i-1,c=(1<<a)-1,d=c>>1,u=-7,h=r?n-1:0,y=r?-1:1,_=e[t+h];for(h+=y,o=_&(1<<-u)-1,_>>=-u,u+=a;u>0;o=o*256+e[t+h],h+=y,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=s*256+e[t+h],h+=y,u-=8);if(o===0)o=1-d;else{if(o===c)return s?NaN:(_?-1:1)*(1/0);s=s+Math.pow(2,i),o=o-d}return(_?-1:1)*s*Math.pow(2,o-i)};Ia.write=function(e,t,r,i,n,o){var s,a,c,d=o*8-n-1,u=(1<<d)-1,h=u>>1,y=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=i?0:o-1,b=i?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+h>=1?t+=y/c:t+=y*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*c-1)*Math.pow(2,n),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,n),s=0));n>=8;e[r+_]=a&255,_+=b,a/=256,n-=8);for(s=s<<n|a,d+=n;d>0;e[r+_]=s&255,_+=b,s/=256,d-=8);e[r+_-b]|=g*128};/*!
|
|
160
160
|
* The buffer module from node.js, for the browser.
|
|
161
161
|
*
|
|
162
162
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
163
163
|
* @license MIT
|
|
164
|
-
*/(function(e){const t=Zi,r=Ia,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const k=new o(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,o.prototype),Object.setPrototypeOf(k,l),k.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function d(k){if(k>n)throw new RangeError('The value "'+k+'" is invalid for option "size"');const l=new o(k);return Object.setPrototypeOf(l,u.prototype),l}function u(k,l,p){if(typeof k=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(k)}return h(k,l,p)}u.poolSize=8192;function h(k,l,p){if(typeof k=="string")return g(k,l);if(s.isView(k))return $(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(Qe(k,s)||k&&Qe(k.buffer,s)||typeof a<"u"&&(Qe(k,a)||k&&Qe(k.buffer,a)))return f(k,l,p);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=k.valueOf&&k.valueOf();if(N!=null&&N!==k)return u.from(N,l,p);const z=v(k);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return u.from(k[Symbol.toPrimitive]("string"),l,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}u.from=function(k,l,p){return h(k,l,p)},Object.setPrototypeOf(u.prototype,o.prototype),Object.setPrototypeOf(u,o);function y(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function _(k,l,p){return y(k),k<=0?d(k):l!==void 0?typeof p=="string"?d(k).fill(l,p):d(k).fill(l):d(k)}u.alloc=function(k,l,p){return _(k,l,p)};function b(k){return y(k),d(k<0?0:S(k)|0)}u.allocUnsafe=function(k){return b(k)},u.allocUnsafeSlow=function(k){return b(k)};function g(k,l){if((typeof l!="string"||l==="")&&(l="utf8"),!u.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const p=I(k,l)|0;let N=d(p);const z=N.write(k,l);return z!==p&&(N=N.slice(0,z)),N}function m(k){const l=k.length<0?0:S(k.length)|0,p=d(l);for(let N=0;N<l;N+=1)p[N]=k[N]&255;return p}function $(k){if(Qe(k,o)){const l=new o(k);return f(l.buffer,l.byteOffset,l.byteLength)}return m(k)}function f(k,l,p){if(l<0||k.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<l+(p||0))throw new RangeError('"length" is outside of buffer bounds');let N;return l===void 0&&p===void 0?N=new o(k):p===void 0?N=new o(k,l):N=new o(k,l,p),Object.setPrototypeOf(N,u.prototype),N}function v(k){if(u.isBuffer(k)){const l=S(k.length)|0,p=d(l);return p.length===0||k.copy(p,0,0,l),p}if(k.length!==void 0)return typeof k.length!="number"||_t(k.length)?d(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function S(k){if(k>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return k|0}function E(k){return+k!=k&&(k=0),u.alloc(+k)}u.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==u.prototype},u.compare=function(l,p){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),Qe(p,o)&&(p=u.from(p,p.offset,p.byteLength)),!u.isBuffer(l)||!u.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===p)return 0;let N=l.length,z=p.length;for(let C=0,Z=Math.min(N,z);C<Z;++C)if(l[C]!==p[C]){N=l[C],z=p[C];break}return N<z?-1:z<N?1:0},u.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(l,p){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return u.alloc(0);let N;if(p===void 0)for(p=0,N=0;N<l.length;++N)p+=l[N].length;const z=u.allocUnsafe(p);let C=0;for(N=0;N<l.length;++N){let Z=l[N];if(Qe(Z,o))C+Z.length>z.length?(u.isBuffer(Z)||(Z=u.from(Z)),Z.copy(z,C)):o.prototype.set.call(z,Z,C);else if(u.isBuffer(Z))Z.copy(z,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=Z.length}return z};function I(k,l){if(u.isBuffer(k))return k.length;if(s.isView(k)||Qe(k,s))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const p=k.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&p===0)return 0;let z=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Le(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return Je(k).length;default:if(z)return N?-1:Le(k).length;l=(""+l).toLowerCase(),z=!0}}u.byteLength=I;function O(k,l,p){let N=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,l>>>=0,p<=l))return"";for(k||(k="utf8");;)switch(k){case"hex":return F(this,l,p);case"utf8":case"utf-8":return ie(this,l,p);case"ascii":return K(this,l,p);case"latin1":case"binary":return T(this,l,p);case"base64":return X(this,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,l,p);default:if(N)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),N=!0}}u.prototype._isBuffer=!0;function j(k,l,p){const N=k[l];k[l]=k[p],k[p]=N}u.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<l;p+=2)j(this,p,p+1);return this},u.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<l;p+=4)j(this,p,p+3),j(this,p+1,p+2);return this},u.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<l;p+=8)j(this,p,p+7),j(this,p+1,p+6),j(this,p+2,p+5),j(this,p+3,p+4);return this},u.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?ie(this,0,l):O.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(l){if(!u.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:u.compare(this,l)===0},u.prototype.inspect=function(){let l="";const p=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(l+=" ... "),"<Buffer "+l+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(l,p,N,z,C){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),!u.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(p===void 0&&(p=0),N===void 0&&(N=l?l.length:0),z===void 0&&(z=0),C===void 0&&(C=this.length),p<0||N>l.length||z<0||C>this.length)throw new RangeError("out of range index");if(z>=C&&p>=N)return 0;if(z>=C)return-1;if(p>=N)return 1;if(p>>>=0,N>>>=0,z>>>=0,C>>>=0,this===l)return 0;let Z=C-z,ge=N-p;const Ae=Math.min(Z,ge),xe=this.slice(z,C),ze=l.slice(p,N);for(let Se=0;Se<Ae;++Se)if(xe[Se]!==ze[Se]){Z=xe[Se],ge=ze[Se];break}return Z<ge?-1:ge<Z?1:0};function L(k,l,p,N,z){if(k.length===0)return-1;if(typeof p=="string"?(N=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,_t(p)&&(p=z?0:k.length-1),p<0&&(p=k.length+p),p>=k.length){if(z)return-1;p=k.length-1}else if(p<0)if(z)p=0;else return-1;if(typeof l=="string"&&(l=u.from(l,N)),u.isBuffer(l))return l.length===0?-1:G(k,l,p,N,z);if(typeof l=="number")return l=l&255,typeof o.prototype.indexOf=="function"?z?o.prototype.indexOf.call(k,l,p):o.prototype.lastIndexOf.call(k,l,p):G(k,[l],p,N,z);throw new TypeError("val must be string, number or Buffer")}function G(k,l,p,N,z){let C=1,Z=k.length,ge=l.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(k.length<2||l.length<2)return-1;C=2,Z/=2,ge/=2,p/=2}function Ae(ze,Se){return C===1?ze[Se]:ze.readUInt16BE(Se*C)}let xe;if(z){let ze=-1;for(xe=p;xe<Z;xe++)if(Ae(k,xe)===Ae(l,ze===-1?0:xe-ze)){if(ze===-1&&(ze=xe),xe-ze+1===ge)return ze*C}else ze!==-1&&(xe-=xe-ze),ze=-1}else for(p+ge>Z&&(p=Z-ge),xe=p;xe>=0;xe--){let ze=!0;for(let Se=0;Se<ge;Se++)if(Ae(k,xe+Se)!==Ae(l,Se)){ze=!1;break}if(ze)return xe}return-1}u.prototype.includes=function(l,p,N){return this.indexOf(l,p,N)!==-1},u.prototype.indexOf=function(l,p,N){return L(this,l,p,N,!0)},u.prototype.lastIndexOf=function(l,p,N){return L(this,l,p,N,!1)};function Y(k,l,p,N){p=Number(p)||0;const z=k.length-p;N?(N=Number(N),N>z&&(N=z)):N=z;const C=l.length;N>C/2&&(N=C/2);let Z;for(Z=0;Z<N;++Z){const ge=parseInt(l.substr(Z*2,2),16);if(_t(ge))return Z;k[p+Z]=ge}return Z}function Q(k,l,p,N){return zt(Le(l,k.length-p),k,p,N)}function oe(k,l,p,N){return zt(Ce(l),k,p,N)}function pe(k,l,p,N){return zt(Je(l),k,p,N)}function R(k,l,p,N){return zt(At(l,k.length-p),k,p,N)}u.prototype.write=function(l,p,N,z){if(p===void 0)z="utf8",N=this.length,p=0;else if(N===void 0&&typeof p=="string")z=p,N=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(N)?(N=N>>>0,z===void 0&&(z="utf8")):(z=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const C=this.length-p;if((N===void 0||N>C)&&(N=C),l.length>0&&(N<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let Z=!1;for(;;)switch(z){case"hex":return Y(this,l,p,N);case"utf8":case"utf-8":return Q(this,l,p,N);case"ascii":case"latin1":case"binary":return oe(this,l,p,N);case"base64":return pe(this,l,p,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,l,p,N);default:if(Z)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),Z=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(k,l,p){return l===0&&p===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(l,p))}function ie(k,l,p){p=Math.min(k.length,p);const N=[];let z=l;for(;z<p;){const C=k[z];let Z=null,ge=C>239?4:C>223?3:C>191?2:1;if(z+ge<=p){let Ae,xe,ze,Se;switch(ge){case 1:C<128&&(Z=C);break;case 2:Ae=k[z+1],(Ae&192)===128&&(Se=(C&31)<<6|Ae&63,Se>127&&(Z=Se));break;case 3:Ae=k[z+1],xe=k[z+2],(Ae&192)===128&&(xe&192)===128&&(Se=(C&15)<<12|(Ae&63)<<6|xe&63,Se>2047&&(Se<55296||Se>57343)&&(Z=Se));break;case 4:Ae=k[z+1],xe=k[z+2],ze=k[z+3],(Ae&192)===128&&(xe&192)===128&&(ze&192)===128&&(Se=(C&15)<<18|(Ae&63)<<12|(xe&63)<<6|ze&63,Se>65535&&Se<1114112&&(Z=Se))}}Z===null?(Z=65533,ge=1):Z>65535&&(Z-=65536,N.push(Z>>>10&1023|55296),Z=56320|Z&1023),N.push(Z),z+=ge}return ce(N)}const re=4096;function ce(k){const l=k.length;if(l<=re)return String.fromCharCode.apply(String,k);let p="",N=0;for(;N<l;)p+=String.fromCharCode.apply(String,k.slice(N,N+=re));return p}function K(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]&127);return N}function T(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]);return N}function F(k,l,p){const N=k.length;(!l||l<0)&&(l=0),(!p||p<0||p>N)&&(p=N);let z="";for(let C=l;C<p;++C)z+=jn[k[C]];return z}function P(k,l,p){const N=k.slice(l,p);let z="";for(let C=0;C<N.length-1;C+=2)z+=String.fromCharCode(N[C]+N[C+1]*256);return z}u.prototype.slice=function(l,p){const N=this.length;l=~~l,p=p===void 0?N:~~p,l<0?(l+=N,l<0&&(l=0)):l>N&&(l=N),p<0?(p+=N,p<0&&(p=0)):p>N&&(p=N),p<l&&(p=l);const z=this.subarray(l,p);return Object.setPrototypeOf(z,u.prototype),z};function w(k,l,p){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+l>p)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return z},u.prototype.readUintBE=u.prototype.readUIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l+--p],C=1;for(;p>0&&(C*=256);)z+=this[l+--p]*C;return z},u.prototype.readUint8=u.prototype.readUInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]|this[l+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]<<8|this[l+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},u.prototype.readBigUInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,C=this[++l]+this[++l]*2**8+this[++l]*2**16+N*2**24;return BigInt(z)+(BigInt(C)<<BigInt(32))}),u.prototype.readBigUInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],C=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N;return(BigInt(z)<<BigInt(32))+BigInt(C)}),u.prototype.readIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return C*=128,z>=C&&(z-=Math.pow(2,8*p)),z},u.prototype.readIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=p,C=1,Z=this[l+--z];for(;z>0&&(C*=256);)Z+=this[l+--z]*C;return C*=128,Z>=C&&(Z-=Math.pow(2,8*p)),Z},u.prototype.readInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},u.prototype.readInt16LE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l]|this[l+1]<<8;return N&32768?N|4294901760:N},u.prototype.readInt16BE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l+1]|this[l]<<8;return N&32768?N|4294901760:N},u.prototype.readInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},u.prototype.readInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},u.prototype.readBigInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(N<<24);return(BigInt(z)<<BigInt(32))+BigInt(p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),u.prototype.readBigInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=(p<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(z)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N)}),u.prototype.readFloatLE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!0,23,4)},u.prototype.readFloatBE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!1,23,4)},u.prototype.readDoubleLE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!0,52,8)},u.prototype.readDoubleBE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!1,52,8)};function x(k,l,p,N,z,C){if(!u.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>z||l<C)throw new RangeError('"value" argument is out of bounds');if(p+N>k.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=1,Z=0;for(this[p]=l&255;++Z<N&&(C*=256);)this[p+Z]=l/C&255;return p+N},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=N-1,Z=1;for(this[p+C]=l&255;--C>=0&&(Z*=256);)this[p+C]=l/Z&255;return p+N},u.prototype.writeUint8=u.prototype.writeUInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,255,0),this[p]=l&255,p+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p+3]=l>>>24,this[p+2]=l>>>16,this[p+1]=l>>>8,this[p]=l&255,p+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4};function B(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,p}function ee(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p+7]=C,C=C>>8,k[p+6]=C,C=C>>8,k[p+5]=C,C=C>>8,k[p+4]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p+3]=Z,Z=Z>>8,k[p+2]=Z,Z=Z>>8,k[p+1]=Z,Z=Z>>8,k[p]=Z,p+8}u.prototype.writeBigUInt64LE=ct(function(l,p=0){return B(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=ct(function(l,p=0){return ee(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=0,Z=1,ge=0;for(this[p]=l&255;++C<N&&(Z*=256);)l<0&&ge===0&&this[p+C-1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=N-1,Z=1,ge=0;for(this[p+C]=l&255;--C>=0&&(Z*=256);)l<0&&ge===0&&this[p+C+1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,127,-128),l<0&&(l=255+l+1),this[p]=l&255,p+1},u.prototype.writeInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),this[p]=l&255,this[p+1]=l>>>8,this[p+2]=l>>>16,this[p+3]=l>>>24,p+4},u.prototype.writeInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4},u.prototype.writeBigInt64LE=ct(function(l,p=0){return B(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=ct(function(l,p=0){return ee(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(k,l,p,N,z,C){if(p+N>k.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function me(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,4),r.write(k,l,p,N,23,4),p+4}u.prototype.writeFloatLE=function(l,p,N){return me(this,l,p,!0,N)},u.prototype.writeFloatBE=function(l,p,N){return me(this,l,p,!1,N)};function se(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,8),r.write(k,l,p,N,52,8),p+8}u.prototype.writeDoubleLE=function(l,p,N){return se(this,l,p,!0,N)},u.prototype.writeDoubleBE=function(l,p,N){return se(this,l,p,!1,N)},u.prototype.copy=function(l,p,N,z){if(!u.isBuffer(l))throw new TypeError("argument should be a Buffer");if(N||(N=0),!z&&z!==0&&(z=this.length),p>=l.length&&(p=l.length),p||(p=0),z>0&&z<N&&(z=N),z===N||l.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),l.length-p<z-N&&(z=l.length-p+N);const C=z-N;return this===l&&typeof o.prototype.copyWithin=="function"?this.copyWithin(p,N,z):o.prototype.set.call(l,this.subarray(N,z),p),C},u.prototype.fill=function(l,p,N,z){if(typeof l=="string"){if(typeof p=="string"?(z=p,p=0,N=this.length):typeof N=="string"&&(z=N,N=this.length),z!==void 0&&typeof z!="string")throw new TypeError("encoding must be a string");if(typeof z=="string"&&!u.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(l.length===1){const Z=l.charCodeAt(0);(z==="utf8"&&Z<128||z==="latin1")&&(l=Z)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(p<0||this.length<p||this.length<N)throw new RangeError("Out of range index");if(N<=p)return this;p=p>>>0,N=N===void 0?this.length:N>>>0,l||(l=0);let C;if(typeof l=="number")for(C=p;C<N;++C)this[C]=l;else{const Z=u.isBuffer(l)?l:u.from(l,z),ge=Z.length;if(ge===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(C=0;C<N-p;++C)this[C+p]=Z[C%ge]}return this};const A={};function U(k,l,p){A[k]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:z,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(k,l){return`The "${k}" argument must be of type number. Received type ${typeof l}`},TypeError),U("ERR_OUT_OF_RANGE",function(k,l,p){let N=`The value of "${k}" is out of range.`,z=p;return Number.isInteger(p)&&Math.abs(p)>2**32?z=M(String(p)):typeof p=="bigint"&&(z=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(z=M(z)),z+="n"),N+=` It must be ${l}. Received ${z}`,N},RangeError);function M(k){let l="",p=k.length;const N=k[0]==="-"?1:0;for(;p>=N+4;p-=3)l=`_${k.slice(p-3,p)}${l}`;return`${k.slice(0,p)}${l}`}function J(k,l,p){ae(l,"offset"),(k[l]===void 0||k[l+p]===void 0)&&we(l,k.length-(p+1))}function ne(k,l,p,N,z,C){if(k>p||k<l){const Z=typeof l=="bigint"?"n":"";let ge;throw l===0||l===BigInt(0)?ge=`>= 0${Z} and < 2${Z} ** ${(C+1)*8}${Z}`:ge=`>= -(2${Z} ** ${(C+1)*8-1}${Z}) and < 2 ** ${(C+1)*8-1}${Z}`,new A.ERR_OUT_OF_RANGE("value",ge,k)}J(N,z,C)}function ae(k,l){if(typeof k!="number")throw new A.ERR_INVALID_ARG_TYPE(l,"number",k)}function we(k,l,p){throw Math.floor(k)!==k?(ae(k,p),new A.ERR_OUT_OF_RANGE("offset","an integer",k)):l<0?new A.ERR_BUFFER_OUT_OF_BOUNDS:new A.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,k)}const Fe=/[^+/0-9A-Za-z-_]/g;function Ve(k){if(k=k.split("=")[0],k=k.trim().replace(Fe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Le(k,l){l=l||1/0;let p;const N=k.length;let z=null;const C=[];for(let Z=0;Z<N;++Z){if(p=k.charCodeAt(Z),p>55295&&p<57344){if(!z){if(p>56319){(l-=3)>-1&&C.push(239,191,189);continue}else if(Z+1===N){(l-=3)>-1&&C.push(239,191,189);continue}z=p;continue}if(p<56320){(l-=3)>-1&&C.push(239,191,189),z=p;continue}p=(z-55296<<10|p-56320)+65536}else z&&(l-=3)>-1&&C.push(239,191,189);if(z=null,p<128){if((l-=1)<0)break;C.push(p)}else if(p<2048){if((l-=2)<0)break;C.push(p>>6|192,p&63|128)}else if(p<65536){if((l-=3)<0)break;C.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((l-=4)<0)break;C.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return C}function Ce(k){const l=[];for(let p=0;p<k.length;++p)l.push(k.charCodeAt(p)&255);return l}function At(k,l){let p,N,z;const C=[];for(let Z=0;Z<k.length&&!((l-=2)<0);++Z)p=k.charCodeAt(Z),N=p>>8,z=p%256,C.push(z),C.push(N);return C}function Je(k){return t.toByteArray(Ve(k))}function zt(k,l,p,N){let z;for(z=0;z<N&&!(z+p>=l.length||z>=k.length);++z)l[z+p]=k[z];return z}function Qe(k,l){return k instanceof l||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===l.name}function _t(k){return k!==k}const jn=function(){const k="0123456789abcdef",l=new Array(256);for(let p=0;p<16;++p){const N=p*16;for(let z=0;z<16;++z)l[N+z]=k[p]+k[z]}return l}();function ct(k){return typeof BigInt>"u"?ir:k}function ir(){throw new Error("BigInt not supported")}})(Tp);const mn=Tp.Buffer;function $$(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const b$=e=>new TextEncoder().encode(e);typeof mn<"u"&&mn.from;function _$(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}function iu(e){return new w$().update(e).digest()}var w$=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,i;try{for(var n=$$(t),o=n.next();!o.done;o=n.next()){var s=o.value;this.checksum=this.checksum>>>8^S$[(this.checksum^s)&255]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}(),k$=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],S$=_$(k$);function I$(e){const t=e.length;let r=0,i=0;for(;i<t;){let n=e.charCodeAt(i++);if((n&4294967168)===0){r++;continue}else if((n&4294965248)===0)r+=2;else{if(n>=55296&&n<=56319&&i<t){const o=e.charCodeAt(i);(o&64512)===56320&&(++i,n=((n&1023)<<10)+(o&1023)+65536)}(n&4294901760)===0?r+=3:r+=4}}return r}function E$(e,t,r){const i=e.length;let n=r,o=0;for(;o<i;){let s=e.charCodeAt(o++);if((s&4294967168)===0){t[n++]=s;continue}else if((s&4294965248)===0)t[n++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&o<i){const a=e.charCodeAt(o);(a&64512)===56320&&(++o,s=((s&1023)<<10)+(a&1023)+65536)}(s&4294901760)===0?(t[n++]=s>>12&15|224,t[n++]=s>>6&63|128):(t[n++]=s>>18&7|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128)}t[n++]=s&63|128}}const N$=new TextEncoder,O$=50;function x$(e,t,r){N$.encodeInto(e,t.subarray(r))}function j$(e,t,r){e.length>O$?x$(e,t,r):E$(e,t,r)}new TextDecoder;class dr{constructor(t,r){this.type=t,this.data=r}}class di extends Error{constructor(t){super(t);const r=Object.create(di.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:di.name})}}function A$(e,t,r){const i=r/4294967296,n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function Dp(e,t,r){const i=Math.floor(r/4294967296),n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function z$(e,t){const r=e.getInt32(t),i=e.getUint32(t+4);return r*4294967296+i}const T$=-1,P$=4294967296-1,D$=17179869184-1;function U$({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=D$)if(t===0&&e<=P$){const r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e),r}else{const r=e/4294967296,i=e&4294967295,n=new Uint8Array(8),o=new DataView(n.buffer);return o.setUint32(0,t<<2|r&3),o.setUint32(4,i),n}else{const r=new Uint8Array(12),i=new DataView(r.buffer);return i.setUint32(0,t),Dp(i,4,e),r}}function C$(e){const t=e.getTime(),r=Math.floor(t/1e3),i=(t-r*1e3)*1e6,n=Math.floor(i/1e9);return{sec:r+n,nsec:i-n*1e9}}function B$(e){if(e instanceof Date){const t=C$(e);return U$(t)}else return null}function R$(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{const r=t.getUint32(0),i=t.getUint32(4),n=(r&3)*4294967296+i,o=r>>>2;return{sec:n,nsec:o}}case 12:{const r=z$(t,4),i=t.getUint32(0);return{sec:r,nsec:i}}default:throw new di(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}function F$(e){const t=R$(e);return new Date(t.sec*1e3+t.nsec/1e6)}const L$={type:T$,encode:B$,decode:F$};class xo{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(L$)}register({type:t,encode:r,decode:i}){if(t>=0)this.encoders[t]=r,this.decoders[t]=i;else{const n=-1-t;this.builtInEncoders[n]=r,this.builtInDecoders[n]=i}}tryToEncode(t,r){for(let i=0;i<this.builtInEncoders.length;i++){const n=this.builtInEncoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=-1-i;return new dr(s,o)}}}for(let i=0;i<this.encoders.length;i++){const n=this.encoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=i;return new dr(s,o)}}}return t instanceof dr?t:null}decode(t,r,i){const n=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return n?n(t,r,i):new dr(r,t)}}xo.defaultCodec=new xo;function Z$(e){return e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer}function M$(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Z$(e)?new Uint8Array(e):Uint8Array.from(e)}const q$=100,V$=2048;class Ea{constructor(t){this.entered=!1,this.extensionCodec=t?.extensionCodec??xo.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.maxDepth=t?.maxDepth??q$,this.initialBufferSize=t?.initialBufferSize??V$,this.sortKeys=t?.sortKeys??!1,this.forceFloat32=t?.forceFloat32??!1,this.ignoreUndefined=t?.ignoreUndefined??!1,this.forceIntegerToFloat=t?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new Ea({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(t){if(this.entered)return this.clone().encodeSharedRef(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(t){if(this.entered)return this.clone().encode(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(t,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);t==null?this.encodeNil():typeof t=="boolean"?this.encodeBoolean(t):typeof t=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(t):this.encodeNumber(t):typeof t=="string"?this.encodeString(t):this.useBigInt64&&typeof t=="bigint"?this.encodeBigInt64(t):this.encodeObject(t,r)}ensureBufferSizeToWrite(t){const r=this.pos+t;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(t){const r=new ArrayBuffer(t),i=new Uint8Array(r),n=new DataView(r);i.set(this.bytes),this.view=n,this.bytes=i}encodeNil(){this.writeU8(192)}encodeBoolean(t){t===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(t){!this.forceIntegerToFloat&&Number.isSafeInteger(t)?t>=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(211),this.writeI64(t)):this.encodeNumberAsFloat(t)}encodeNumberAsFloat(t){this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))}encodeBigInt64(t){t>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(t)):(this.writeU8(211),this.writeBigInt64(t))}writeStringHeader(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else if(t<4294967296)this.writeU8(219),this.writeU32(t);else throw new Error(`Too long string: ${t} bytes in UTF-8`)}encodeString(t){const i=I$(t);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),j$(t,this.bytes,this.pos),this.pos+=i}encodeObject(t,r){const i=this.extensionCodec.tryToEncode(t,this.context);if(i!=null)this.encodeExtension(i);else if(Array.isArray(t))this.encodeArray(t,r);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else if(typeof t=="object")this.encodeMap(t,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(t)}`)}encodeBinary(t){const r=t.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);const i=M$(t);this.writeU8a(i)}encodeArray(t,r){const i=t.length;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else if(i<4294967296)this.writeU8(221),this.writeU32(i);else throw new Error(`Too large array: ${i}`);for(const n of t)this.doEncode(n,r+1)}countWithoutUndefined(t,r){let i=0;for(const n of r)t[n]!==void 0&&i++;return i}encodeMap(t,r){const i=Object.keys(t);this.sortKeys&&i.sort();const n=this.ignoreUndefined?this.countWithoutUndefined(t,i):i.length;if(n<16)this.writeU8(128+n);else if(n<65536)this.writeU8(222),this.writeU16(n);else if(n<4294967296)this.writeU8(223),this.writeU32(n);else throw new Error(`Too large map object: ${n}`);for(const o of i){const s=t[o];this.ignoreUndefined&&s===void 0||(this.encodeString(o),this.doEncode(s,r+1))}}encodeExtension(t){if(typeof t.data=="function"){const i=t.data(this.pos+6),n=i.length;if(n>=4294967296)throw new Error(`Too large extension object: ${n}`);this.writeU8(201),this.writeU32(n),this.writeI8(t.type),this.writeU8a(i);return}const r=t.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(t.type),this.writeU8a(t.data)}writeU8(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++}writeU8a(t){const r=t.length;this.ensureBufferSizeToWrite(r),this.bytes.set(t,this.pos),this.pos+=r}writeI8(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++}writeU16(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2}writeI16(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2}writeU32(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4}writeI32(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4}writeF32(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4}writeF64(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8}writeU64(t){this.ensureBufferSizeToWrite(8),A$(this.view,this.pos,t),this.pos+=8}writeI64(t){this.ensureBufferSizeToWrite(8),Dp(this.view,this.pos,t),this.pos+=8}writeBigUint64(t){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,t),this.pos+=8}writeBigInt64(t){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,t),this.pos+=8}}function K$(e,t){return new Ea(t).encodeSharedRef(e)}function rn(e){const t=new ArrayBuffer(4);return new DataView(t).setInt32(0,e,!0),new Uint8Array(t)}class J$ extends Li{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t??{}))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,resolvedInputs:i,sourceHash:n,state:o}){const s=[];s.push(rn(r.definitionHash)),o?.inputHashNonce&&s.push(rn(o.inputHashNonce)),t.args&&s.push(K$(t.args)),n?s.push(rn(n)):Sa(r)&&this.logger.warn({instanceId:t.id},"missing source hash for unit model, this may lead to incorrect input hash");const a=Object.entries(i).sort(([h],[y])=>h.localeCompare(y)),c=new Set;for(const[h,y]of a){if(Object.keys(y).length===0)continue;s.push(mn.from(h));const _=y.map(b=>b.input.instanceId).sort();for(const b of _){const g=this.outputs.get(b);if(!g){this.logger.warn({instanceId:b,dependentInstanceId:t.id},"missing dependency when calculating input hash, this may lead to incorrect input hash");continue}s.push(rn(g.inputHash)),s.push(rn(g.outputHash)),c.add(b)}}const d=[],u=Array.from(c).sort();for(const h of u){const y=this.outputs.get(h);if(!y){this.logger.warn({instanceId:h,dependentInstanceId:t.id},"missing dependency when calculating dependency output hash, this may lead to incorrect input hash");continue}d.push(rn(y.outputHash))}return{inputHash:iu(mn.concat(s)),dependencyOutputHash:iu(mn.concat(d)),outputHash:o?.outputHash??0}}}class G$ extends Li{getNodeDependencies(t){const r=new Set;for(const i of Object.values(t.resolvedInputs??{}))for(const n of i)r.add(n.instanceId);return Array.from(r)}processNode(){}}var hr={exports:{}},no={},wt={},Ft={},ro={},io={},oo={},ou;function hi(){return ou||(ou=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((v,S)=>`${v}${S}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((v,S)=>(S instanceof r&&(v[S.str]=(v[S.str]||0)+1),v),{})}}e._Code=i,e.nil=new i("");function n($,...f){const v=[$[0]];let S=0;for(;S<f.length;)a(v,f[S]),v.push($[++S]);return new i(v)}e._=n;const o=new i("+");function s($,...f){const v=[_($[0])];let S=0;for(;S<f.length;)v.push(o),a(v,f[S]),v.push(o,_($[++S]));return c(v),new i(v)}e.str=s;function a($,f){f instanceof i?$.push(...f._items):f instanceof r?$.push(f):$.push(h(f))}e.addCodeArg=a;function c($){let f=1;for(;f<$.length-1;){if($[f]===o){const v=d($[f-1],$[f+1]);if(v!==void 0){$.splice(f-1,3,v);continue}$[f++]="+"}f++}}function d($,f){if(f==='""')return $;if($==='""')return f;if(typeof $=="string")return f instanceof r||$[$.length-1]!=='"'?void 0:typeof f!="string"?`${$.slice(0,-1)}${f}"`:f[0]==='"'?$.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!($ instanceof r))return`"${$}${f.slice(1)}`}function u($,f){return f.emptyStr()?$:$.emptyStr()?f:s`${$}${f}`}e.strConcat=u;function h($){return typeof $=="number"||typeof $=="boolean"||$===null?$:_(Array.isArray($)?$.join(","):$)}function y($){return new i(_($))}e.stringify=y;function _($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function b($){return typeof $=="string"&&e.IDENTIFIER.test($)?new i(`.${$}`):n`[${$}]`}e.getProperty=b;function g($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new i(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=g;function m($){return new i($.toString())}e.regexpCode=m}(oo)),oo}var so={},su;function au(){return su||(su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=hi();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var i;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:d,parent:u}={}){this._names={},this._prefixes=d,this._parent=u}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const u=this._names[d]||this._nameGroup(d);return`${d}${u.index++}`}_nameGroup(d){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=n;class o extends t.Name{constructor(d,u){super(u),this.prefix=d}setValue(d,{property:u,itemIndex:h}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(u)}[${h}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class a extends n{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?s:t.nil}}get(){return this._scope}name(d){return new o(d,this._newName(d))}value(d,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(d),{prefix:_}=y,b=(h=u.key)!==null&&h!==void 0?h:u.ref;let g=this._values[_];if(g){const f=g.get(b);if(f)return f}else g=this._values[_]=new Map;g.set(b,y);const m=this._scope[_]||(this._scope[_]=[]),$=m.length;return m[$]=u.ref,y.setValue(u,{property:_,itemIndex:$}),y}getValue(d,u){const h=this._values[d];if(h)return h.get(u)}scopeRefs(d,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${d}${h.scopePath}`})}scopeCode(d=this._values,u,h){return this._reduceValues(d,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},u,h)}_reduceValues(d,u,h={},y){let _=t.nil;for(const b in d){const g=d[b];if(!g)continue;const m=h[b]=h[b]||new Map;g.forEach($=>{if(m.has($))return;m.set($,i.Started);let f=u($);if(f){const v=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${v} ${$} = ${f};${this.opts._n}`}else if(f=y?.($))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r($);m.set($,i.Completed)})}return _}}e.ValueScope=a}(so)),so}var uu;function ye(){return uu||(uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=hi(),r=au();var i=hi();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var n=au();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(w,x){return this}}class s extends o{constructor(w,x,B){super(),this.varKind=w,this.name=x,this.rhs=B}render({es5:w,_n:x}){const B=w?r.varKinds.var:this.varKind,ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ee};`+x}optimizeNames(w,x){if(w[this.name.str])return this.rhs&&(this.rhs=pe(this.rhs,w,x)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(w,x,B){super(),this.lhs=w,this.rhs=x,this.sideEffects=B}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,x){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=pe(this.rhs,w,x),this}get names(){const w=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(w,this.rhs)}}class c extends a{constructor(w,x,B,ee){super(w,B,ee),this.op=x}render({_n:w}){return`${this.lhs} ${this.op}= ${this.rhs};`+w}}class d extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class u extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class h extends o{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class y extends o{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code};`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,x){return this.code=pe(this.code,w,x),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends o{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((x,B)=>x+B.render(w),"")}optimizeNodes(){const{nodes:w}=this;let x=w.length;for(;x--;){const B=w[x].optimizeNodes();Array.isArray(B)?w.splice(x,1,...B):B?w[x]=B:w.splice(x,1)}return w.length>0?this:void 0}optimizeNames(w,x){const{nodes:B}=this;let ee=B.length;for(;ee--;){const te=B[ee];te.optimizeNames(w,x)||(R(w,te.names),B.splice(ee,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((w,x)=>Q(w,x.names),{})}}class b extends _{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class g extends _{}class m extends b{}m.kind="else";class $ extends b{constructor(w,x){super(x),this.condition=w}render(w){let x=`if(${this.condition})`+super.render(w);return this.else&&(x+="else "+this.else.render(w)),x}optimizeNodes(){super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let x=this.else;if(x){const B=x.optimizeNodes();x=this.else=Array.isArray(B)?new m(B):B}if(x)return w===!1?x instanceof $?x:x.nodes:this.nodes.length?this:new $(X(w),x instanceof $?[x]:x.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,x){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(w,x),!!(super.optimizeNames(w,x)||this.else))return this.condition=pe(this.condition,w,x),this}get names(){const w=super.names;return oe(w,this.condition),this.else&&Q(w,this.else.names),w}}$.kind="if";class f extends b{}f.kind="for";class v extends f{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iteration=pe(this.iteration,w,x),this}get names(){return Q(super.names,this.iteration.names)}}class S extends f{constructor(w,x,B,ee){super(),this.varKind=w,this.name=x,this.from=B,this.to=ee}render(w){const x=w.es5?r.varKinds.var:this.varKind,{name:B,from:ee,to:te}=this;return`for(${x} ${B}=${ee}; ${B}<${te}; ${B}++)`+super.render(w)}get names(){const w=oe(super.names,this.from);return oe(w,this.to)}}class E extends f{constructor(w,x,B,ee){super(),this.loop=w,this.varKind=x,this.name=B,this.iterable=ee}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iterable=pe(this.iterable,w,x),this}get names(){return Q(super.names,this.iterable.names)}}class I extends b{constructor(w,x,B){super(),this.name=w,this.args=x,this.async=B}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}I.kind="func";class O extends _{render(w){return"return "+super.render(w)}}O.kind="return";class j extends b{render(w){let x="try"+super.render(w);return this.catch&&(x+=this.catch.render(w)),this.finally&&(x+=this.finally.render(w)),x}optimizeNodes(){var w,x;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(x=this.finally)===null||x===void 0||x.optimizeNodes(),this}optimizeNames(w,x){var B,ee;return super.optimizeNames(w,x),(B=this.catch)===null||B===void 0||B.optimizeNames(w,x),(ee=this.finally)===null||ee===void 0||ee.optimizeNames(w,x),this}get names(){const w=super.names;return this.catch&&Q(w,this.catch.names),this.finally&&Q(w,this.finally.names),w}}class L extends b{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.render(w)}}L.kind="catch";class G extends b{render(w){return"finally"+super.render(w)}}G.kind="finally";class Y{constructor(w,x={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...x,_n:x.lines?`
|
|
165
|
-
`:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,x){const B=this._extScope.value(w,x);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(w,x){return this._extScope.getValue(w,x)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,x,B,ee){const te=this._scope.toName(x);return B!==void 0&&ee&&(this._constants[te.str]=B),this._leafNode(new s(w,te,B)),te}const(w,x,B){return this._def(r.varKinds.const,w,x,B)}let(w,x,B){return this._def(r.varKinds.let,w,x,B)}var(w,x,B){return this._def(r.varKinds.var,w,x,B)}assign(w,x,B){return this._leafNode(new a(w,x,B))}add(w,x){return this._leafNode(new c(w,e.operators.ADD,x))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new y(w)),this}object(...w){const x=["{"];for(const[B,ee]of w)x.length>1&&x.push(","),x.push(B),(B!==ee||this.opts.es5)&&(x.push(":"),(0,t.addCodeArg)(x,ee));return x.push("}"),new t._Code(x)}if(w,x,B){if(this._blockNode(new $(w)),x&&B)this.code(x).else().code(B).endIf();else if(x)this.code(x).endIf();else if(B)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new $(w))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode($,m)}_for(w,x){return this._blockNode(w),x&&this.code(x).endFor(),this}for(w,x){return this._for(new v(w),x)}forRange(w,x,B,ee,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName(w);return this._for(new S(te,me,x,B),()=>ee(me))}forOf(w,x,B,ee=r.varKinds.const){const te=this._scope.toName(w);if(this.opts.es5){const me=x instanceof t.Name?x:this.var("_arr",x);return this.forRange("_i",0,(0,t._)`${me}.length`,se=>{this.var(te,(0,t._)`${me}[${se}]`),B(te)})}return this._for(new E("of",ee,te,x),()=>B(te))}forIn(w,x,B,ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0,t._)`Object.keys(${x})`,B);const te=this._scope.toName(w);return this._for(new E("in",ee,te,x),()=>B(te))}endFor(){return this._endBlockNode(f)}label(w){return this._leafNode(new d(w))}break(w){return this._leafNode(new u(w))}return(w){const x=new O;if(this._blockNode(x),this.code(w),x.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(w,x,B){if(!x&&!B)throw new Error('CodeGen: "try" without "catch" and "finally"');const ee=new j;if(this._blockNode(ee),this.code(w),x){const te=this.name("e");this._currNode=ee.catch=new L(te),x(te)}return B&&(this._currNode=ee.finally=new G,this.code(B)),this._endBlockNode(L,G)}throw(w){return this._leafNode(new h(w))}block(w,x){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(x),this}endBlock(w){const x=this._blockStarts.pop();if(x===void 0)throw new Error("CodeGen: not in self-balancing block");const B=this._nodes.length-x;if(B<0||w!==void 0&&B!==w)throw new Error(`CodeGen: wrong number of nodes: ${B} vs ${w} expected`);return this._nodes.length=x,this}func(w,x=t.nil,B,ee){return this._blockNode(new I(w,x,B)),ee&&this.code(ee).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,x){const B=this._currNode;if(B instanceof w||x&&B instanceof x)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${x?`${w.kind}/${x.kind}`:w.kind}"`)}_elseNode(w){const x=this._currNode;if(!(x instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=x.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const x=this._nodes;x[x.length-1]=w}}e.CodeGen=Y;function Q(P,w){for(const x in w)P[x]=(P[x]||0)+(w[x]||0);return P}function oe(P,w){return w instanceof t._CodeOrName?Q(P,w.names):P}function pe(P,w,x){if(P instanceof t.Name)return B(P);if(!ee(P))return P;return new t._Code(P._items.reduce((te,me)=>(me instanceof t.Name&&(me=B(me)),me instanceof t._Code?te.push(...me._items):te.push(me),te),[]));function B(te){const me=x[te.str];return me===void 0||w[te.str]!==1?te:(delete w[te.str],me)}function ee(te){return te instanceof t._Code&&te._items.some(me=>me instanceof t.Name&&w[me.str]===1&&x[me.str]!==void 0)}}function R(P,w){for(const x in w)P[x]=(P[x]||0)-(w[x]||0)}function X(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${F(P)}`}e.not=X;const ie=T(e.operators.AND);function re(...P){return P.reduce(ie)}e.and=re;const ce=T(e.operators.OR);function K(...P){return P.reduce(ce)}e.or=K;function T(P){return(w,x)=>w===t.nil?x:x===t.nil?w:(0,t._)`${F(w)} ${P} ${F(x)}`}function F(P){return P instanceof t.Name?P:(0,t._)`(${P})`}}(io)),io}var he={},cu;function _e(){if(cu)return he;cu=1,Object.defineProperty(he,"__esModule",{value:!0}),he.checkStrictMode=he.getErrorPath=he.Type=he.useFunc=he.setEvaluated=he.evaluatedPropsToName=he.mergeEvaluated=he.eachItem=he.unescapeJsonPointer=he.escapeJsonPointer=he.escapeFragment=he.unescapeFragment=he.schemaRefOrVal=he.schemaHasRulesButRef=he.schemaHasRules=he.checkUnknownRules=he.alwaysValidSchema=he.toHash=void 0;const e=ye(),t=hi();function r(E){const I={};for(const O of E)I[O]=!0;return I}he.toHash=r;function i(E,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(n(E,I),!o(I,E.self.RULES.all))}he.alwaysValidSchema=i;function n(E,I=E.schema){const{opts:O,self:j}=E;if(!O.strictSchema||typeof I=="boolean")return;const L=j.RULES.keywords;for(const G in I)L[G]||S(E,`unknown keyword: "${G}"`)}he.checkUnknownRules=n;function o(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(I[O])return!0;return!1}he.schemaHasRules=o;function s(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(O!=="$ref"&&I.all[O])return!0;return!1}he.schemaHasRulesButRef=s;function a({topSchemaRef:E,schemaPath:I},O,j,L){if(!L){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${E}${I}${(0,e.getProperty)(j)}`}he.schemaRefOrVal=a;function c(E){return h(decodeURIComponent(E))}he.unescapeFragment=c;function d(E){return encodeURIComponent(u(E))}he.escapeFragment=d;function u(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}he.escapeJsonPointer=u;function h(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}he.unescapeJsonPointer=h;function y(E,I){if(Array.isArray(E))for(const O of E)I(O);else I(E)}he.eachItem=y;function _({mergeNames:E,mergeToName:I,mergeValues:O,resultToName:j}){return(L,G,Y,Q)=>{const oe=Y===void 0?G:Y instanceof e.Name?(G instanceof e.Name?E(L,G,Y):I(L,G,Y),Y):G instanceof e.Name?(I(L,Y,G),G):O(G,Y);return Q===e.Name&&!(oe instanceof e.Name)?j(L,oe):oe}}he.mergeEvaluated={props:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>{E.if((0,e._)`${I} === true`,()=>E.assign(O,!0),()=>E.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${I})`))}),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>{I===!0?E.assign(O,!0):(E.assign(O,(0,e._)`${O} || {}`),g(E,O,I))}),mergeValues:(E,I)=>E===!0?!0:{...E,...I},resultToName:b}),items:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>E.assign(O,(0,e._)`${I} === true ? true : ${O} > ${I} ? ${O} : ${I}`)),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>E.assign(O,I===!0?!0:(0,e._)`${O} > ${I} ? ${O} : ${I}`)),mergeValues:(E,I)=>E===!0?!0:Math.max(E,I),resultToName:(E,I)=>E.var("items",I)})};function b(E,I){if(I===!0)return E.var("props",!0);const O=E.var("props",(0,e._)`{}`);return I!==void 0&&g(E,O,I),O}he.evaluatedPropsToName=b;function g(E,I,O){Object.keys(O).forEach(j=>E.assign((0,e._)`${I}${(0,e.getProperty)(j)}`,!0))}he.setEvaluated=g;const m={};function $(E,I){return E.scopeValue("func",{ref:I,code:m[I.code]||(m[I.code]=new t._Code(I.code))})}he.useFunc=$;var f;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(f||(he.Type=f={}));function v(E,I,O){if(E instanceof e.Name){const j=I===f.Num;return O?j?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:j?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(E).toString():"/"+u(E)}he.getErrorPath=v;function S(E,I,O=E.opts.strictSchema){if(O){if(I=`strict mode: ${I}`,O===!0)throw new Error(I);E.self.logger.warn(I)}}return he.checkStrictMode=S,he}var pr={},lu;function Rt(){if(lu)return pr;lu=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=ye(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return pr.default=t,pr}var fu;function Mi(){return fu||(fu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ye(),r=_e(),i=Rt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:$})=>$?(0,t.str)`"${m}" keyword must be ${$} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function n(m,$=e.keywordError,f,v){const{it:S}=m,{gen:E,compositeRule:I,allErrors:O}=S,j=h(m,$,f);v??(I||O)?c(E,j):d(S,(0,t._)`[${j}]`)}e.reportError=n;function o(m,$=e.keywordError,f){const{it:v}=m,{gen:S,compositeRule:E,allErrors:I}=v,O=h(m,$,f);c(S,O),E||I||d(v,i.default.vErrors)}e.reportExtraError=o;function s(m,$){m.assign(i.default.errors,$),m.if((0,t._)`${i.default.vErrors} !== null`,()=>m.if($,()=>m.assign((0,t._)`${i.default.vErrors}.length`,$),()=>m.assign(i.default.vErrors,null)))}e.resetErrorsCount=s;function a({gen:m,keyword:$,schemaValue:f,data:v,errsCount:S,it:E}){if(S===void 0)throw new Error("ajv implementation error");const I=m.name("err");m.forRange("i",S,i.default.errors,O=>{m.const(I,(0,t._)`${i.default.vErrors}[${O}]`),m.if((0,t._)`${I}.instancePath === undefined`,()=>m.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(i.default.instancePath,E.errorPath))),m.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${E.errSchemaPath}/${$}`),E.opts.verbose&&(m.assign((0,t._)`${I}.schema`,f),m.assign((0,t._)`${I}.data`,v))})}e.extendErrors=a;function c(m,$){const f=m.const("err",$);m.if((0,t._)`${i.default.vErrors} === null`,()=>m.assign(i.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${i.default.vErrors}.push(${f})`),m.code((0,t._)`${i.default.errors}++`)}function d(m,$){const{gen:f,validateName:v,schemaEnv:S}=m;S.$async?f.throw((0,t._)`new ${m.ValidationError}(${$})`):(f.assign((0,t._)`${v}.errors`,$),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(m,$,f){const{createErrors:v}=m.it;return v===!1?(0,t._)`{}`:y(m,$,f)}function y(m,$,f={}){const{gen:v,it:S}=m,E=[_(S,f),b(m,f)];return g(m,$,E),v.object(...E)}function _({errorPath:m},{instancePath:$}){const f=$?(0,t.str)`${m}${(0,r.getErrorPath)($,r.Type.Str)}`:m;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,f)]}function b({keyword:m,it:{errSchemaPath:$}},{schemaPath:f,parentSchema:v}){let S=v?$:(0,t.str)`${$}/${m}`;return f&&(S=(0,t.str)`${S}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,S]}function g(m,{params:$,message:f},v){const{keyword:S,data:E,schemaValue:I,it:O}=m,{opts:j,propertyName:L,topSchemaRef:G,schemaPath:Y}=O;v.push([u.keyword,S],[u.params,typeof $=="function"?$(m):$||(0,t._)`{}`]),j.messages&&v.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&v.push([u.schema,I],[u.parentSchema,(0,t._)`${G}${Y}`],[i.default.data,E]),L&&v.push([u.propertyName,L])}}(ro)),ro}var du;function W$(){if(du)return Ft;du=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.boolOrEmptySchema=Ft.topBoolOrEmptySchema=void 0;const e=Mi(),t=ye(),r=Rt(),i={message:"boolean schema is false"};function n(a){const{gen:c,schema:d,validateName:u}=a;d===!1?s(a,!1):typeof d=="object"&&d.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}Ft.topBoolOrEmptySchema=n;function o(a,c){const{gen:d,schema:u}=a;u===!1?(d.var(c,!1),s(a)):d.var(c,!0)}Ft.boolOrEmptySchema=o;function s(a,c){const{gen:d,data:u}=a,h={gen:d,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(h,i,void 0,c)}return Ft}var Me={},Lt={},hu;function Up(){if(hu)return Lt;hu=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.getRules=Lt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(n){return typeof n=="string"&&t.has(n)}Lt.isJSONType=r;function i(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}return Lt.getRules=i,Lt}var kt={},pu;function Cp(){if(pu)return kt;pu=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.shouldUseRule=kt.shouldUseGroup=kt.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const s=n.RULES.types[o];return s&&s!==!0&&t(i,s)}kt.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}kt.shouldUseGroup=t;function r(i,n){var o;return i[n.keyword]!==void 0||((o=n.definition.implements)===null||o===void 0?void 0:o.some(s=>i[s]!==void 0))}return kt.shouldUseRule=r,kt}var mu;function pi(){if(mu)return Me;mu=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const e=Up(),t=Cp(),r=Mi(),i=ye(),n=_e();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Me.DataType=o={}));function s(f){const v=a(f.type);if(v.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&v.push("null")}return v}Me.getSchemaTypes=s;function a(f){const v=Array.isArray(f)?f:f?[f]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}Me.getJSONTypes=a;function c(f,v){const{gen:S,data:E,opts:I}=f,O=u(v,I.coerceTypes),j=v.length>0&&!(O.length===0&&v.length===1&&(0,t.schemaHasRulesForType)(f,v[0]));if(j){const L=b(v,E,I.strictNumbers,o.Wrong);S.if(L,()=>{O.length?h(f,v,O):m(f)})}return j}Me.coerceAndCheckDataType=c;const d=new Set(["string","number","integer","boolean","null"]);function u(f,v){return v?f.filter(S=>d.has(S)||v==="array"&&S==="array"):[]}function h(f,v,S){const{gen:E,data:I,opts:O}=f,j=E.let("dataType",(0,i._)`typeof ${I}`),L=E.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&E.if((0,i._)`${j} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>E.assign(I,(0,i._)`${I}[0]`).assign(j,(0,i._)`typeof ${I}`).if(b(v,I,O.strictNumbers),()=>E.assign(L,I))),E.if((0,i._)`${L} !== undefined`);for(const Y of S)(d.has(Y)||Y==="array"&&O.coerceTypes==="array")&&G(Y);E.else(),m(f),E.endIf(),E.if((0,i._)`${L} !== undefined`,()=>{E.assign(I,L),y(f,L)});function G(Y){switch(Y){case"string":E.elseIf((0,i._)`${j} == "number" || ${j} == "boolean"`).assign(L,(0,i._)`"" + ${I}`).elseIf((0,i._)`${I} === null`).assign(L,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${j} == "boolean" || ${I} === null
|
|
164
|
+
*/(function(e){const t=Zi,r=Ia,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const n=2147483647;e.kMaxLength=n;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const k=new o(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,o.prototype),Object.setPrototypeOf(k,l),k.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function d(k){if(k>n)throw new RangeError('The value "'+k+'" is invalid for option "size"');const l=new o(k);return Object.setPrototypeOf(l,u.prototype),l}function u(k,l,p){if(typeof k=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(k)}return h(k,l,p)}u.poolSize=8192;function h(k,l,p){if(typeof k=="string")return g(k,l);if(s.isView(k))return $(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(Qe(k,s)||k&&Qe(k.buffer,s)||typeof a<"u"&&(Qe(k,a)||k&&Qe(k.buffer,a)))return f(k,l,p);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=k.valueOf&&k.valueOf();if(N!=null&&N!==k)return u.from(N,l,p);const z=v(k);if(z)return z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return u.from(k[Symbol.toPrimitive]("string"),l,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}u.from=function(k,l,p){return h(k,l,p)},Object.setPrototypeOf(u.prototype,o.prototype),Object.setPrototypeOf(u,o);function y(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function _(k,l,p){return y(k),k<=0?d(k):l!==void 0?typeof p=="string"?d(k).fill(l,p):d(k).fill(l):d(k)}u.alloc=function(k,l,p){return _(k,l,p)};function b(k){return y(k),d(k<0?0:S(k)|0)}u.allocUnsafe=function(k){return b(k)},u.allocUnsafeSlow=function(k){return b(k)};function g(k,l){if((typeof l!="string"||l==="")&&(l="utf8"),!u.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const p=I(k,l)|0;let N=d(p);const z=N.write(k,l);return z!==p&&(N=N.slice(0,z)),N}function m(k){const l=k.length<0?0:S(k.length)|0,p=d(l);for(let N=0;N<l;N+=1)p[N]=k[N]&255;return p}function $(k){if(Qe(k,o)){const l=new o(k);return f(l.buffer,l.byteOffset,l.byteLength)}return m(k)}function f(k,l,p){if(l<0||k.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(k.byteLength<l+(p||0))throw new RangeError('"length" is outside of buffer bounds');let N;return l===void 0&&p===void 0?N=new o(k):p===void 0?N=new o(k,l):N=new o(k,l,p),Object.setPrototypeOf(N,u.prototype),N}function v(k){if(u.isBuffer(k)){const l=S(k.length)|0,p=d(l);return p.length===0||k.copy(p,0,0,l),p}if(k.length!==void 0)return typeof k.length!="number"||_t(k.length)?d(0):m(k);if(k.type==="Buffer"&&Array.isArray(k.data))return m(k.data)}function S(k){if(k>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return k|0}function E(k){return+k!=k&&(k=0),u.alloc(+k)}u.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==u.prototype},u.compare=function(l,p){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),Qe(p,o)&&(p=u.from(p,p.offset,p.byteLength)),!u.isBuffer(l)||!u.isBuffer(p))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===p)return 0;let N=l.length,z=p.length;for(let C=0,Z=Math.min(N,z);C<Z;++C)if(l[C]!==p[C]){N=l[C],z=p[C];break}return N<z?-1:z<N?1:0},u.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(l,p){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return u.alloc(0);let N;if(p===void 0)for(p=0,N=0;N<l.length;++N)p+=l[N].length;const z=u.allocUnsafe(p);let C=0;for(N=0;N<l.length;++N){let Z=l[N];if(Qe(Z,o))C+Z.length>z.length?(u.isBuffer(Z)||(Z=u.from(Z)),Z.copy(z,C)):o.prototype.set.call(z,Z,C);else if(u.isBuffer(Z))Z.copy(z,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=Z.length}return z};function I(k,l){if(u.isBuffer(k))return k.length;if(s.isView(k)||Qe(k,s))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const p=k.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&p===0)return 0;let z=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Le(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return Je(k).length;default:if(z)return N?-1:Le(k).length;l=(""+l).toLowerCase(),z=!0}}u.byteLength=I;function O(k,l,p){let N=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,l>>>=0,p<=l))return"";for(k||(k="utf8");;)switch(k){case"hex":return F(this,l,p);case"utf8":case"utf-8":return ie(this,l,p);case"ascii":return K(this,l,p);case"latin1":case"binary":return T(this,l,p);case"base64":return X(this,l,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,l,p);default:if(N)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),N=!0}}u.prototype._isBuffer=!0;function j(k,l,p){const N=k[l];k[l]=k[p],k[p]=N}u.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let p=0;p<l;p+=2)j(this,p,p+1);return this},u.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let p=0;p<l;p+=4)j(this,p,p+3),j(this,p+1,p+2);return this},u.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let p=0;p<l;p+=8)j(this,p,p+7),j(this,p+1,p+6),j(this,p+2,p+5),j(this,p+3,p+4);return this},u.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?ie(this,0,l):O.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(l){if(!u.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:u.compare(this,l)===0},u.prototype.inspect=function(){let l="";const p=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,p).replace(/(.{2})/g,"$1 ").trim(),this.length>p&&(l+=" ... "),"<Buffer "+l+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(l,p,N,z,C){if(Qe(l,o)&&(l=u.from(l,l.offset,l.byteLength)),!u.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(p===void 0&&(p=0),N===void 0&&(N=l?l.length:0),z===void 0&&(z=0),C===void 0&&(C=this.length),p<0||N>l.length||z<0||C>this.length)throw new RangeError("out of range index");if(z>=C&&p>=N)return 0;if(z>=C)return-1;if(p>=N)return 1;if(p>>>=0,N>>>=0,z>>>=0,C>>>=0,this===l)return 0;let Z=C-z,ge=N-p;const Ae=Math.min(Z,ge),xe=this.slice(z,C),ze=l.slice(p,N);for(let Se=0;Se<Ae;++Se)if(xe[Se]!==ze[Se]){Z=xe[Se],ge=ze[Se];break}return Z<ge?-1:ge<Z?1:0};function L(k,l,p,N,z){if(k.length===0)return-1;if(typeof p=="string"?(N=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,_t(p)&&(p=z?0:k.length-1),p<0&&(p=k.length+p),p>=k.length){if(z)return-1;p=k.length-1}else if(p<0)if(z)p=0;else return-1;if(typeof l=="string"&&(l=u.from(l,N)),u.isBuffer(l))return l.length===0?-1:G(k,l,p,N,z);if(typeof l=="number")return l=l&255,typeof o.prototype.indexOf=="function"?z?o.prototype.indexOf.call(k,l,p):o.prototype.lastIndexOf.call(k,l,p):G(k,[l],p,N,z);throw new TypeError("val must be string, number or Buffer")}function G(k,l,p,N,z){let C=1,Z=k.length,ge=l.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(k.length<2||l.length<2)return-1;C=2,Z/=2,ge/=2,p/=2}function Ae(ze,Se){return C===1?ze[Se]:ze.readUInt16BE(Se*C)}let xe;if(z){let ze=-1;for(xe=p;xe<Z;xe++)if(Ae(k,xe)===Ae(l,ze===-1?0:xe-ze)){if(ze===-1&&(ze=xe),xe-ze+1===ge)return ze*C}else ze!==-1&&(xe-=xe-ze),ze=-1}else for(p+ge>Z&&(p=Z-ge),xe=p;xe>=0;xe--){let ze=!0;for(let Se=0;Se<ge;Se++)if(Ae(k,xe+Se)!==Ae(l,Se)){ze=!1;break}if(ze)return xe}return-1}u.prototype.includes=function(l,p,N){return this.indexOf(l,p,N)!==-1},u.prototype.indexOf=function(l,p,N){return L(this,l,p,N,!0)},u.prototype.lastIndexOf=function(l,p,N){return L(this,l,p,N,!1)};function Y(k,l,p,N){p=Number(p)||0;const z=k.length-p;N?(N=Number(N),N>z&&(N=z)):N=z;const C=l.length;N>C/2&&(N=C/2);let Z;for(Z=0;Z<N;++Z){const ge=parseInt(l.substr(Z*2,2),16);if(_t(ge))return Z;k[p+Z]=ge}return Z}function Q(k,l,p,N){return zt(Le(l,k.length-p),k,p,N)}function oe(k,l,p,N){return zt(Ce(l),k,p,N)}function pe(k,l,p,N){return zt(Je(l),k,p,N)}function R(k,l,p,N){return zt(At(l,k.length-p),k,p,N)}u.prototype.write=function(l,p,N,z){if(p===void 0)z="utf8",N=this.length,p=0;else if(N===void 0&&typeof p=="string")z=p,N=this.length,p=0;else if(isFinite(p))p=p>>>0,isFinite(N)?(N=N>>>0,z===void 0&&(z="utf8")):(z=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const C=this.length-p;if((N===void 0||N>C)&&(N=C),l.length>0&&(N<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");z||(z="utf8");let Z=!1;for(;;)switch(z){case"hex":return Y(this,l,p,N);case"utf8":case"utf-8":return Q(this,l,p,N);case"ascii":case"latin1":case"binary":return oe(this,l,p,N);case"base64":return pe(this,l,p,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,l,p,N);default:if(Z)throw new TypeError("Unknown encoding: "+z);z=(""+z).toLowerCase(),Z=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function X(k,l,p){return l===0&&p===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(l,p))}function ie(k,l,p){p=Math.min(k.length,p);const N=[];let z=l;for(;z<p;){const C=k[z];let Z=null,ge=C>239?4:C>223?3:C>191?2:1;if(z+ge<=p){let Ae,xe,ze,Se;switch(ge){case 1:C<128&&(Z=C);break;case 2:Ae=k[z+1],(Ae&192)===128&&(Se=(C&31)<<6|Ae&63,Se>127&&(Z=Se));break;case 3:Ae=k[z+1],xe=k[z+2],(Ae&192)===128&&(xe&192)===128&&(Se=(C&15)<<12|(Ae&63)<<6|xe&63,Se>2047&&(Se<55296||Se>57343)&&(Z=Se));break;case 4:Ae=k[z+1],xe=k[z+2],ze=k[z+3],(Ae&192)===128&&(xe&192)===128&&(ze&192)===128&&(Se=(C&15)<<18|(Ae&63)<<12|(xe&63)<<6|ze&63,Se>65535&&Se<1114112&&(Z=Se))}}Z===null?(Z=65533,ge=1):Z>65535&&(Z-=65536,N.push(Z>>>10&1023|55296),Z=56320|Z&1023),N.push(Z),z+=ge}return ce(N)}const re=4096;function ce(k){const l=k.length;if(l<=re)return String.fromCharCode.apply(String,k);let p="",N=0;for(;N<l;)p+=String.fromCharCode.apply(String,k.slice(N,N+=re));return p}function K(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]&127);return N}function T(k,l,p){let N="";p=Math.min(k.length,p);for(let z=l;z<p;++z)N+=String.fromCharCode(k[z]);return N}function F(k,l,p){const N=k.length;(!l||l<0)&&(l=0),(!p||p<0||p>N)&&(p=N);let z="";for(let C=l;C<p;++C)z+=jn[k[C]];return z}function P(k,l,p){const N=k.slice(l,p);let z="";for(let C=0;C<N.length-1;C+=2)z+=String.fromCharCode(N[C]+N[C+1]*256);return z}u.prototype.slice=function(l,p){const N=this.length;l=~~l,p=p===void 0?N:~~p,l<0?(l+=N,l<0&&(l=0)):l>N&&(l=N),p<0?(p+=N,p<0&&(p=0)):p>N&&(p=N),p<l&&(p=l);const z=this.subarray(l,p);return Object.setPrototypeOf(z,u.prototype),z};function w(k,l,p){if(k%1!==0||k<0)throw new RangeError("offset is not uint");if(k+l>p)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return z},u.prototype.readUintBE=u.prototype.readUIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l+--p],C=1;for(;p>0&&(C*=256);)z+=this[l+--p]*C;return z},u.prototype.readUint8=u.prototype.readUInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]|this[l+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(l,p){return l=l>>>0,p||w(l,2,this.length),this[l]<<8|this[l+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},u.prototype.readBigUInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,C=this[++l]+this[++l]*2**8+this[++l]*2**16+N*2**24;return BigInt(z)+(BigInt(C)<<BigInt(32))}),u.prototype.readBigUInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=p*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],C=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N;return(BigInt(z)<<BigInt(32))+BigInt(C)}),u.prototype.readIntLE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=this[l],C=1,Z=0;for(;++Z<p&&(C*=256);)z+=this[l+Z]*C;return C*=128,z>=C&&(z-=Math.pow(2,8*p)),z},u.prototype.readIntBE=function(l,p,N){l=l>>>0,p=p>>>0,N||w(l,p,this.length);let z=p,C=1,Z=this[l+--z];for(;z>0&&(C*=256);)Z+=this[l+--z]*C;return C*=128,Z>=C&&(Z-=Math.pow(2,8*p)),Z},u.prototype.readInt8=function(l,p){return l=l>>>0,p||w(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},u.prototype.readInt16LE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l]|this[l+1]<<8;return N&32768?N|4294901760:N},u.prototype.readInt16BE=function(l,p){l=l>>>0,p||w(l,2,this.length);const N=this[l+1]|this[l]<<8;return N&32768?N|4294901760:N},u.prototype.readInt32LE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},u.prototype.readInt32BE=function(l,p){return l=l>>>0,p||w(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},u.prototype.readBigInt64LE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(N<<24);return(BigInt(z)<<BigInt(32))+BigInt(p+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),u.prototype.readBigInt64BE=ct(function(l){l=l>>>0,ae(l,"offset");const p=this[l],N=this[l+7];(p===void 0||N===void 0)&&we(l,this.length-8);const z=(p<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(z)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N)}),u.prototype.readFloatLE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!0,23,4)},u.prototype.readFloatBE=function(l,p){return l=l>>>0,p||w(l,4,this.length),r.read(this,l,!1,23,4)},u.prototype.readDoubleLE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!0,52,8)},u.prototype.readDoubleBE=function(l,p){return l=l>>>0,p||w(l,8,this.length),r.read(this,l,!1,52,8)};function x(k,l,p,N,z,C){if(!u.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>z||l<C)throw new RangeError('"value" argument is out of bounds');if(p+N>k.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=1,Z=0;for(this[p]=l&255;++Z<N&&(C*=256);)this[p+Z]=l/C&255;return p+N},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,N=N>>>0,!z){const ge=Math.pow(2,8*N)-1;x(this,l,p,N,ge,0)}let C=N-1,Z=1;for(this[p+C]=l&255;--C>=0&&(Z*=256);)this[p+C]=l/Z&255;return p+N},u.prototype.writeUint8=u.prototype.writeUInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,255,0),this[p]=l&255,p+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,65535,0),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p+3]=l>>>24,this[p+2]=l>>>16,this[p+1]=l>>>8,this[p]=l&255,p+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,4294967295,0),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4};function B(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C,C=C>>8,k[p++]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,Z=Z>>8,k[p++]=Z,p}function ee(k,l,p,N,z){ne(l,N,z,k,p,7);let C=Number(l&BigInt(4294967295));k[p+7]=C,C=C>>8,k[p+6]=C,C=C>>8,k[p+5]=C,C=C>>8,k[p+4]=C;let Z=Number(l>>BigInt(32)&BigInt(4294967295));return k[p+3]=Z,Z=Z>>8,k[p+2]=Z,Z=Z>>8,k[p+1]=Z,Z=Z>>8,k[p]=Z,p+8}u.prototype.writeBigUInt64LE=ct(function(l,p=0){return B(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=ct(function(l,p=0){return ee(this,l,p,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=0,Z=1,ge=0;for(this[p]=l&255;++C<N&&(Z*=256);)l<0&&ge===0&&this[p+C-1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeIntBE=function(l,p,N,z){if(l=+l,p=p>>>0,!z){const Ae=Math.pow(2,8*N-1);x(this,l,p,N,Ae-1,-Ae)}let C=N-1,Z=1,ge=0;for(this[p+C]=l&255;--C>=0&&(Z*=256);)l<0&&ge===0&&this[p+C+1]!==0&&(ge=1),this[p+C]=(l/Z>>0)-ge&255;return p+N},u.prototype.writeInt8=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,1,127,-128),l<0&&(l=255+l+1),this[p]=l&255,p+1},u.prototype.writeInt16LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l&255,this[p+1]=l>>>8,p+2},u.prototype.writeInt16BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,2,32767,-32768),this[p]=l>>>8,this[p+1]=l&255,p+2},u.prototype.writeInt32LE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),this[p]=l&255,this[p+1]=l>>>8,this[p+2]=l>>>16,this[p+3]=l>>>24,p+4},u.prototype.writeInt32BE=function(l,p,N){return l=+l,p=p>>>0,N||x(this,l,p,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[p]=l>>>24,this[p+1]=l>>>16,this[p+2]=l>>>8,this[p+3]=l&255,p+4},u.prototype.writeBigInt64LE=ct(function(l,p=0){return B(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=ct(function(l,p=0){return ee(this,l,p,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function te(k,l,p,N,z,C){if(p+N>k.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function me(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,4),r.write(k,l,p,N,23,4),p+4}u.prototype.writeFloatLE=function(l,p,N){return me(this,l,p,!0,N)},u.prototype.writeFloatBE=function(l,p,N){return me(this,l,p,!1,N)};function se(k,l,p,N,z){return l=+l,p=p>>>0,z||te(k,l,p,8),r.write(k,l,p,N,52,8),p+8}u.prototype.writeDoubleLE=function(l,p,N){return se(this,l,p,!0,N)},u.prototype.writeDoubleBE=function(l,p,N){return se(this,l,p,!1,N)},u.prototype.copy=function(l,p,N,z){if(!u.isBuffer(l))throw new TypeError("argument should be a Buffer");if(N||(N=0),!z&&z!==0&&(z=this.length),p>=l.length&&(p=l.length),p||(p=0),z>0&&z<N&&(z=N),z===N||l.length===0||this.length===0)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(z<0)throw new RangeError("sourceEnd out of bounds");z>this.length&&(z=this.length),l.length-p<z-N&&(z=l.length-p+N);const C=z-N;return this===l&&typeof o.prototype.copyWithin=="function"?this.copyWithin(p,N,z):o.prototype.set.call(l,this.subarray(N,z),p),C},u.prototype.fill=function(l,p,N,z){if(typeof l=="string"){if(typeof p=="string"?(z=p,p=0,N=this.length):typeof N=="string"&&(z=N,N=this.length),z!==void 0&&typeof z!="string")throw new TypeError("encoding must be a string");if(typeof z=="string"&&!u.isEncoding(z))throw new TypeError("Unknown encoding: "+z);if(l.length===1){const Z=l.charCodeAt(0);(z==="utf8"&&Z<128||z==="latin1")&&(l=Z)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(p<0||this.length<p||this.length<N)throw new RangeError("Out of range index");if(N<=p)return this;p=p>>>0,N=N===void 0?this.length:N>>>0,l||(l=0);let C;if(typeof l=="number")for(C=p;C<N;++C)this[C]=l;else{const Z=u.isBuffer(l)?l:u.from(l,z),ge=Z.length;if(ge===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(C=0;C<N-p;++C)this[C+p]=Z[C%ge]}return this};const A={};function U(k,l,p){A[k]=class extends p{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${k}]`,this.stack,delete this.name}get code(){return k}set code(z){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:z,writable:!0})}toString(){return`${this.name} [${k}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(k){return k?`${k} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(k,l){return`The "${k}" argument must be of type number. Received type ${typeof l}`},TypeError),U("ERR_OUT_OF_RANGE",function(k,l,p){let N=`The value of "${k}" is out of range.`,z=p;return Number.isInteger(p)&&Math.abs(p)>2**32?z=M(String(p)):typeof p=="bigint"&&(z=String(p),(p>BigInt(2)**BigInt(32)||p<-(BigInt(2)**BigInt(32)))&&(z=M(z)),z+="n"),N+=` It must be ${l}. Received ${z}`,N},RangeError);function M(k){let l="",p=k.length;const N=k[0]==="-"?1:0;for(;p>=N+4;p-=3)l=`_${k.slice(p-3,p)}${l}`;return`${k.slice(0,p)}${l}`}function J(k,l,p){ae(l,"offset"),(k[l]===void 0||k[l+p]===void 0)&&we(l,k.length-(p+1))}function ne(k,l,p,N,z,C){if(k>p||k<l){const Z=typeof l=="bigint"?"n":"";let ge;throw l===0||l===BigInt(0)?ge=`>= 0${Z} and < 2${Z} ** ${(C+1)*8}${Z}`:ge=`>= -(2${Z} ** ${(C+1)*8-1}${Z}) and < 2 ** ${(C+1)*8-1}${Z}`,new A.ERR_OUT_OF_RANGE("value",ge,k)}J(N,z,C)}function ae(k,l){if(typeof k!="number")throw new A.ERR_INVALID_ARG_TYPE(l,"number",k)}function we(k,l,p){throw Math.floor(k)!==k?(ae(k,p),new A.ERR_OUT_OF_RANGE("offset","an integer",k)):l<0?new A.ERR_BUFFER_OUT_OF_BOUNDS:new A.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,k)}const Fe=/[^+/0-9A-Za-z-_]/g;function Ve(k){if(k=k.split("=")[0],k=k.trim().replace(Fe,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Le(k,l){l=l||1/0;let p;const N=k.length;let z=null;const C=[];for(let Z=0;Z<N;++Z){if(p=k.charCodeAt(Z),p>55295&&p<57344){if(!z){if(p>56319){(l-=3)>-1&&C.push(239,191,189);continue}else if(Z+1===N){(l-=3)>-1&&C.push(239,191,189);continue}z=p;continue}if(p<56320){(l-=3)>-1&&C.push(239,191,189),z=p;continue}p=(z-55296<<10|p-56320)+65536}else z&&(l-=3)>-1&&C.push(239,191,189);if(z=null,p<128){if((l-=1)<0)break;C.push(p)}else if(p<2048){if((l-=2)<0)break;C.push(p>>6|192,p&63|128)}else if(p<65536){if((l-=3)<0)break;C.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((l-=4)<0)break;C.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return C}function Ce(k){const l=[];for(let p=0;p<k.length;++p)l.push(k.charCodeAt(p)&255);return l}function At(k,l){let p,N,z;const C=[];for(let Z=0;Z<k.length&&!((l-=2)<0);++Z)p=k.charCodeAt(Z),N=p>>8,z=p%256,C.push(z),C.push(N);return C}function Je(k){return t.toByteArray(Ve(k))}function zt(k,l,p,N){let z;for(z=0;z<N&&!(z+p>=l.length||z>=k.length);++z)l[z+p]=k[z];return z}function Qe(k,l){return k instanceof l||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===l.name}function _t(k){return k!==k}const jn=function(){const k="0123456789abcdef",l=new Array(256);for(let p=0;p<16;++p){const N=p*16;for(let z=0;z<16;++z)l[N+z]=k[p]+k[z]}return l}();function ct(k){return typeof BigInt>"u"?ir:k}function ir(){throw new Error("BigInt not supported")}})(Tp);const mn=Tp.Buffer;function b$(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const _$=e=>new TextEncoder().encode(e);typeof mn<"u"&&mn.from;function w$(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}function iu(e){return new k$().update(e).digest()}var k$=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,i;try{for(var n=b$(t),o=n.next();!o.done;o=n.next()){var s=o.value;this.checksum=this.checksum>>>8^I$[(this.checksum^s)&255]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}(),S$=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],I$=w$(S$);function E$(e){const t=e.length;let r=0,i=0;for(;i<t;){let n=e.charCodeAt(i++);if((n&4294967168)===0){r++;continue}else if((n&4294965248)===0)r+=2;else{if(n>=55296&&n<=56319&&i<t){const o=e.charCodeAt(i);(o&64512)===56320&&(++i,n=((n&1023)<<10)+(o&1023)+65536)}(n&4294901760)===0?r+=3:r+=4}}return r}function N$(e,t,r){const i=e.length;let n=r,o=0;for(;o<i;){let s=e.charCodeAt(o++);if((s&4294967168)===0){t[n++]=s;continue}else if((s&4294965248)===0)t[n++]=s>>6&31|192;else{if(s>=55296&&s<=56319&&o<i){const a=e.charCodeAt(o);(a&64512)===56320&&(++o,s=((s&1023)<<10)+(a&1023)+65536)}(s&4294901760)===0?(t[n++]=s>>12&15|224,t[n++]=s>>6&63|128):(t[n++]=s>>18&7|240,t[n++]=s>>12&63|128,t[n++]=s>>6&63|128)}t[n++]=s&63|128}}const O$=new TextEncoder,x$=50;function j$(e,t,r){O$.encodeInto(e,t.subarray(r))}function A$(e,t,r){e.length>x$?j$(e,t,r):N$(e,t,r)}new TextDecoder;class dr{constructor(t,r){this.type=t,this.data=r}}class di extends Error{constructor(t){super(t);const r=Object.create(di.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:di.name})}}function z$(e,t,r){const i=r/4294967296,n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function Dp(e,t,r){const i=Math.floor(r/4294967296),n=r;e.setUint32(t,i),e.setUint32(t+4,n)}function T$(e,t){const r=e.getInt32(t),i=e.getUint32(t+4);return r*4294967296+i}const P$=-1,D$=4294967296-1,U$=17179869184-1;function C$({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=U$)if(t===0&&e<=D$){const r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,e),r}else{const r=e/4294967296,i=e&4294967295,n=new Uint8Array(8),o=new DataView(n.buffer);return o.setUint32(0,t<<2|r&3),o.setUint32(4,i),n}else{const r=new Uint8Array(12),i=new DataView(r.buffer);return i.setUint32(0,t),Dp(i,4,e),r}}function B$(e){const t=e.getTime(),r=Math.floor(t/1e3),i=(t-r*1e3)*1e6,n=Math.floor(i/1e9);return{sec:r+n,nsec:i-n*1e9}}function R$(e){if(e instanceof Date){const t=B$(e);return C$(t)}else return null}function F$(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{const r=t.getUint32(0),i=t.getUint32(4),n=(r&3)*4294967296+i,o=r>>>2;return{sec:n,nsec:o}}case 12:{const r=T$(t,4),i=t.getUint32(0);return{sec:r,nsec:i}}default:throw new di(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}function L$(e){const t=F$(e);return new Date(t.sec*1e3+t.nsec/1e6)}const Z$={type:P$,encode:R$,decode:L$};class xo{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(Z$)}register({type:t,encode:r,decode:i}){if(t>=0)this.encoders[t]=r,this.decoders[t]=i;else{const n=-1-t;this.builtInEncoders[n]=r,this.builtInDecoders[n]=i}}tryToEncode(t,r){for(let i=0;i<this.builtInEncoders.length;i++){const n=this.builtInEncoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=-1-i;return new dr(s,o)}}}for(let i=0;i<this.encoders.length;i++){const n=this.encoders[i];if(n!=null){const o=n(t,r);if(o!=null){const s=i;return new dr(s,o)}}}return t instanceof dr?t:null}decode(t,r,i){const n=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return n?n(t,r,i):new dr(r,t)}}xo.defaultCodec=new xo;function M$(e){return e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer}function q$(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):M$(e)?new Uint8Array(e):Uint8Array.from(e)}const V$=100,K$=2048;class Ea{constructor(t){this.entered=!1,this.extensionCodec=t?.extensionCodec??xo.defaultCodec,this.context=t?.context,this.useBigInt64=t?.useBigInt64??!1,this.maxDepth=t?.maxDepth??V$,this.initialBufferSize=t?.initialBufferSize??K$,this.sortKeys=t?.sortKeys??!1,this.forceFloat32=t?.forceFloat32??!1,this.ignoreUndefined=t?.ignoreUndefined??!1,this.forceIntegerToFloat=t?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new Ea({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(t){if(this.entered)return this.clone().encodeSharedRef(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(t){if(this.entered)return this.clone().encode(t);try{return this.entered=!0,this.reinitializeState(),this.doEncode(t,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(t,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);t==null?this.encodeNil():typeof t=="boolean"?this.encodeBoolean(t):typeof t=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(t):this.encodeNumber(t):typeof t=="string"?this.encodeString(t):this.useBigInt64&&typeof t=="bigint"?this.encodeBigInt64(t):this.encodeObject(t,r)}ensureBufferSizeToWrite(t){const r=this.pos+t;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(t){const r=new ArrayBuffer(t),i=new Uint8Array(r),n=new DataView(r);i.set(this.bytes),this.view=n,this.bytes=i}encodeNil(){this.writeU8(192)}encodeBoolean(t){t===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(t){!this.forceIntegerToFloat&&Number.isSafeInteger(t)?t>=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):this.useBigInt64?this.encodeNumberAsFloat(t):(this.writeU8(211),this.writeI64(t)):this.encodeNumberAsFloat(t)}encodeNumberAsFloat(t){this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))}encodeBigInt64(t){t>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(t)):(this.writeU8(211),this.writeBigInt64(t))}writeStringHeader(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else if(t<4294967296)this.writeU8(219),this.writeU32(t);else throw new Error(`Too long string: ${t} bytes in UTF-8`)}encodeString(t){const i=E$(t);this.ensureBufferSizeToWrite(5+i),this.writeStringHeader(i),A$(t,this.bytes,this.pos),this.pos+=i}encodeObject(t,r){const i=this.extensionCodec.tryToEncode(t,this.context);if(i!=null)this.encodeExtension(i);else if(Array.isArray(t))this.encodeArray(t,r);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else if(typeof t=="object")this.encodeMap(t,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(t)}`)}encodeBinary(t){const r=t.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);const i=q$(t);this.writeU8a(i)}encodeArray(t,r){const i=t.length;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else if(i<4294967296)this.writeU8(221),this.writeU32(i);else throw new Error(`Too large array: ${i}`);for(const n of t)this.doEncode(n,r+1)}countWithoutUndefined(t,r){let i=0;for(const n of r)t[n]!==void 0&&i++;return i}encodeMap(t,r){const i=Object.keys(t);this.sortKeys&&i.sort();const n=this.ignoreUndefined?this.countWithoutUndefined(t,i):i.length;if(n<16)this.writeU8(128+n);else if(n<65536)this.writeU8(222),this.writeU16(n);else if(n<4294967296)this.writeU8(223),this.writeU32(n);else throw new Error(`Too large map object: ${n}`);for(const o of i){const s=t[o];this.ignoreUndefined&&s===void 0||(this.encodeString(o),this.doEncode(s,r+1))}}encodeExtension(t){if(typeof t.data=="function"){const i=t.data(this.pos+6),n=i.length;if(n>=4294967296)throw new Error(`Too large extension object: ${n}`);this.writeU8(201),this.writeU32(n),this.writeI8(t.type),this.writeU8a(i);return}const r=t.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(t.type),this.writeU8a(t.data)}writeU8(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++}writeU8a(t){const r=t.length;this.ensureBufferSizeToWrite(r),this.bytes.set(t,this.pos),this.pos+=r}writeI8(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++}writeU16(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2}writeI16(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2}writeU32(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4}writeI32(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4}writeF32(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4}writeF64(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8}writeU64(t){this.ensureBufferSizeToWrite(8),z$(this.view,this.pos,t),this.pos+=8}writeI64(t){this.ensureBufferSizeToWrite(8),Dp(this.view,this.pos,t),this.pos+=8}writeBigUint64(t){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,t),this.pos+=8}writeBigInt64(t){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,t),this.pos+=8}}function J$(e,t){return new Ea(t).encodeSharedRef(e)}function rn(e){const t=new ArrayBuffer(4);return new DataView(t).setInt32(0,e,!0),new Uint8Array(t)}class G$ extends Li{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t??{}))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,resolvedInputs:i,sourceHash:n,state:o}){const s=[];s.push(rn(r.definitionHash)),o?.inputHashNonce&&s.push(rn(o.inputHashNonce)),t.args&&s.push(J$(t.args)),n?s.push(rn(n)):Sa(r)&&this.logger.warn({instanceId:t.id},"missing source hash for unit model, this may lead to incorrect input hash");const a=Object.entries(i).sort(([h],[y])=>h.localeCompare(y)),c=new Set;for(const[h,y]of a){if(Object.keys(y).length===0)continue;s.push(mn.from(h));const _=y.map(b=>b.input.instanceId).sort();for(const b of _){const g=this.outputs.get(b);if(!g){this.logger.warn({instanceId:b,dependentInstanceId:t.id},"missing dependency when calculating input hash, this may lead to incorrect input hash");continue}s.push(rn(g.inputHash)),s.push(rn(g.outputHash)),c.add(b)}}const d=[],u=Array.from(c).sort();for(const h of u){const y=this.outputs.get(h);if(!y){this.logger.warn({instanceId:h,dependentInstanceId:t.id},"missing dependency when calculating dependency output hash, this may lead to incorrect input hash");continue}d.push(rn(y.outputHash))}return{inputHash:iu(mn.concat(s)),dependencyOutputHash:iu(mn.concat(d)),outputHash:o?.outputHash??0}}}class W$ extends Li{getNodeDependencies(t){const r=new Set;for(const i of Object.values(t.resolvedInputs??{}))for(const n of i)r.add(n.instanceId);return Array.from(r)}processNode(){}}var hr={exports:{}},no={},wt={},Ft={},ro={},io={},oo={},ou;function hi(){return ou||(ou=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class i extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((v,S)=>`${v}${S}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((v,S)=>(S instanceof r&&(v[S.str]=(v[S.str]||0)+1),v),{})}}e._Code=i,e.nil=new i("");function n($,...f){const v=[$[0]];let S=0;for(;S<f.length;)a(v,f[S]),v.push($[++S]);return new i(v)}e._=n;const o=new i("+");function s($,...f){const v=[_($[0])];let S=0;for(;S<f.length;)v.push(o),a(v,f[S]),v.push(o,_($[++S]));return c(v),new i(v)}e.str=s;function a($,f){f instanceof i?$.push(...f._items):f instanceof r?$.push(f):$.push(h(f))}e.addCodeArg=a;function c($){let f=1;for(;f<$.length-1;){if($[f]===o){const v=d($[f-1],$[f+1]);if(v!==void 0){$.splice(f-1,3,v);continue}$[f++]="+"}f++}}function d($,f){if(f==='""')return $;if($==='""')return f;if(typeof $=="string")return f instanceof r||$[$.length-1]!=='"'?void 0:typeof f!="string"?`${$.slice(0,-1)}${f}"`:f[0]==='"'?$.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!($ instanceof r))return`"${$}${f.slice(1)}`}function u($,f){return f.emptyStr()?$:$.emptyStr()?f:s`${$}${f}`}e.strConcat=u;function h($){return typeof $=="number"||typeof $=="boolean"||$===null?$:_(Array.isArray($)?$.join(","):$)}function y($){return new i(_($))}e.stringify=y;function _($){return JSON.stringify($).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=_;function b($){return typeof $=="string"&&e.IDENTIFIER.test($)?new i(`.${$}`):n`[${$}]`}e.getProperty=b;function g($){if(typeof $=="string"&&e.IDENTIFIER.test($))return new i(`${$}`);throw new Error(`CodeGen: invalid export name: ${$}, use explicit $id name mapping`)}e.getEsmExportName=g;function m($){return new i($.toString())}e.regexpCode=m}(oo)),oo}var so={},su;function au(){return su||(su=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=hi();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var i;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:d,parent:u}={}){this._names={},this._prefixes=d,this._parent=u}toName(d){return d instanceof t.Name?d:this.name(d)}name(d){return new t.Name(this._newName(d))}_newName(d){const u=this._names[d]||this._nameGroup(d);return`${d}${u.index++}`}_nameGroup(d){var u,h;if(!((h=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||h===void 0)&&h.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}e.Scope=n;class o extends t.Name{constructor(d,u){super(u),this.prefix=d}setValue(d,{property:u,itemIndex:h}){this.value=d,this.scopePath=(0,t._)`.${new t.Name(u)}[${h}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class a extends n{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?s:t.nil}}get(){return this._scope}name(d){return new o(d,this._newName(d))}value(d,u){var h;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const y=this.toName(d),{prefix:_}=y,b=(h=u.key)!==null&&h!==void 0?h:u.ref;let g=this._values[_];if(g){const f=g.get(b);if(f)return f}else g=this._values[_]=new Map;g.set(b,y);const m=this._scope[_]||(this._scope[_]=[]),$=m.length;return m[$]=u.ref,y.setValue(u,{property:_,itemIndex:$}),y}getValue(d,u){const h=this._values[d];if(h)return h.get(u)}scopeRefs(d,u=this._values){return this._reduceValues(u,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${d}${h.scopePath}`})}scopeCode(d=this._values,u,h){return this._reduceValues(d,y=>{if(y.value===void 0)throw new Error(`CodeGen: name "${y}" has no value`);return y.value.code},u,h)}_reduceValues(d,u,h={},y){let _=t.nil;for(const b in d){const g=d[b];if(!g)continue;const m=h[b]=h[b]||new Map;g.forEach($=>{if(m.has($))return;m.set($,i.Started);let f=u($);if(f){const v=this.opts.es5?e.varKinds.var:e.varKinds.const;_=(0,t._)`${_}${v} ${$} = ${f};${this.opts._n}`}else if(f=y?.($))_=(0,t._)`${_}${f}${this.opts._n}`;else throw new r($);m.set($,i.Completed)})}return _}}e.ValueScope=a}(so)),so}var uu;function ye(){return uu||(uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=hi(),r=au();var i=hi();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var n=au();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(w,x){return this}}class s extends o{constructor(w,x,B){super(),this.varKind=w,this.name=x,this.rhs=B}render({es5:w,_n:x}){const B=w?r.varKinds.var:this.varKind,ee=this.rhs===void 0?"":` = ${this.rhs}`;return`${B} ${this.name}${ee};`+x}optimizeNames(w,x){if(w[this.name.str])return this.rhs&&(this.rhs=pe(this.rhs,w,x)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(w,x,B){super(),this.lhs=w,this.rhs=x,this.sideEffects=B}render({_n:w}){return`${this.lhs} = ${this.rhs};`+w}optimizeNames(w,x){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=pe(this.rhs,w,x),this}get names(){const w=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(w,this.rhs)}}class c extends a{constructor(w,x,B,ee){super(w,B,ee),this.op=x}render({_n:w}){return`${this.lhs} ${this.op}= ${this.rhs};`+w}}class d extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`${this.label}:`+w}}class u extends o{constructor(w){super(),this.label=w,this.names={}}render({_n:w}){return`break${this.label?` ${this.label}`:""};`+w}}class h extends o{constructor(w){super(),this.error=w}render({_n:w}){return`throw ${this.error};`+w}get names(){return this.error.names}}class y extends o{constructor(w){super(),this.code=w}render({_n:w}){return`${this.code};`+w}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(w,x){return this.code=pe(this.code,w,x),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class _ extends o{constructor(w=[]){super(),this.nodes=w}render(w){return this.nodes.reduce((x,B)=>x+B.render(w),"")}optimizeNodes(){const{nodes:w}=this;let x=w.length;for(;x--;){const B=w[x].optimizeNodes();Array.isArray(B)?w.splice(x,1,...B):B?w[x]=B:w.splice(x,1)}return w.length>0?this:void 0}optimizeNames(w,x){const{nodes:B}=this;let ee=B.length;for(;ee--;){const te=B[ee];te.optimizeNames(w,x)||(R(w,te.names),B.splice(ee,1))}return B.length>0?this:void 0}get names(){return this.nodes.reduce((w,x)=>Q(w,x.names),{})}}class b extends _{render(w){return"{"+w._n+super.render(w)+"}"+w._n}}class g extends _{}class m extends b{}m.kind="else";class $ extends b{constructor(w,x){super(x),this.condition=w}render(w){let x=`if(${this.condition})`+super.render(w);return this.else&&(x+="else "+this.else.render(w)),x}optimizeNodes(){super.optimizeNodes();const w=this.condition;if(w===!0)return this.nodes;let x=this.else;if(x){const B=x.optimizeNodes();x=this.else=Array.isArray(B)?new m(B):B}if(x)return w===!1?x instanceof $?x:x.nodes:this.nodes.length?this:new $(X(w),x instanceof $?[x]:x.nodes);if(!(w===!1||!this.nodes.length))return this}optimizeNames(w,x){var B;if(this.else=(B=this.else)===null||B===void 0?void 0:B.optimizeNames(w,x),!!(super.optimizeNames(w,x)||this.else))return this.condition=pe(this.condition,w,x),this}get names(){const w=super.names;return oe(w,this.condition),this.else&&Q(w,this.else.names),w}}$.kind="if";class f extends b{}f.kind="for";class v extends f{constructor(w){super(),this.iteration=w}render(w){return`for(${this.iteration})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iteration=pe(this.iteration,w,x),this}get names(){return Q(super.names,this.iteration.names)}}class S extends f{constructor(w,x,B,ee){super(),this.varKind=w,this.name=x,this.from=B,this.to=ee}render(w){const x=w.es5?r.varKinds.var:this.varKind,{name:B,from:ee,to:te}=this;return`for(${x} ${B}=${ee}; ${B}<${te}; ${B}++)`+super.render(w)}get names(){const w=oe(super.names,this.from);return oe(w,this.to)}}class E extends f{constructor(w,x,B,ee){super(),this.loop=w,this.varKind=x,this.name=B,this.iterable=ee}render(w){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,x){if(super.optimizeNames(w,x))return this.iterable=pe(this.iterable,w,x),this}get names(){return Q(super.names,this.iterable.names)}}class I extends b{constructor(w,x,B){super(),this.name=w,this.args=x,this.async=B}render(w){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}}I.kind="func";class O extends _{render(w){return"return "+super.render(w)}}O.kind="return";class j extends b{render(w){let x="try"+super.render(w);return this.catch&&(x+=this.catch.render(w)),this.finally&&(x+=this.finally.render(w)),x}optimizeNodes(){var w,x;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(x=this.finally)===null||x===void 0||x.optimizeNodes(),this}optimizeNames(w,x){var B,ee;return super.optimizeNames(w,x),(B=this.catch)===null||B===void 0||B.optimizeNames(w,x),(ee=this.finally)===null||ee===void 0||ee.optimizeNames(w,x),this}get names(){const w=super.names;return this.catch&&Q(w,this.catch.names),this.finally&&Q(w,this.finally.names),w}}class L extends b{constructor(w){super(),this.error=w}render(w){return`catch(${this.error})`+super.render(w)}}L.kind="catch";class G extends b{render(w){return"finally"+super.render(w)}}G.kind="finally";class Y{constructor(w,x={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...x,_n:x.lines?`
|
|
165
|
+
`:""},this._extScope=w,this._scope=new r.Scope({parent:w}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,x){const B=this._extScope.value(w,x);return(this._values[B.prefix]||(this._values[B.prefix]=new Set)).add(B),B}getScopeValue(w,x){return this._extScope.getValue(w,x)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,x,B,ee){const te=this._scope.toName(x);return B!==void 0&&ee&&(this._constants[te.str]=B),this._leafNode(new s(w,te,B)),te}const(w,x,B){return this._def(r.varKinds.const,w,x,B)}let(w,x,B){return this._def(r.varKinds.let,w,x,B)}var(w,x,B){return this._def(r.varKinds.var,w,x,B)}assign(w,x,B){return this._leafNode(new a(w,x,B))}add(w,x){return this._leafNode(new c(w,e.operators.ADD,x))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new y(w)),this}object(...w){const x=["{"];for(const[B,ee]of w)x.length>1&&x.push(","),x.push(B),(B!==ee||this.opts.es5)&&(x.push(":"),(0,t.addCodeArg)(x,ee));return x.push("}"),new t._Code(x)}if(w,x,B){if(this._blockNode(new $(w)),x&&B)this.code(x).else().code(B).endIf();else if(x)this.code(x).endIf();else if(B)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new $(w))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode($,m)}_for(w,x){return this._blockNode(w),x&&this.code(x).endFor(),this}for(w,x){return this._for(new v(w),x)}forRange(w,x,B,ee,te=this.opts.es5?r.varKinds.var:r.varKinds.let){const me=this._scope.toName(w);return this._for(new S(te,me,x,B),()=>ee(me))}forOf(w,x,B,ee=r.varKinds.const){const te=this._scope.toName(w);if(this.opts.es5){const me=x instanceof t.Name?x:this.var("_arr",x);return this.forRange("_i",0,(0,t._)`${me}.length`,se=>{this.var(te,(0,t._)`${me}[${se}]`),B(te)})}return this._for(new E("of",ee,te,x),()=>B(te))}forIn(w,x,B,ee=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0,t._)`Object.keys(${x})`,B);const te=this._scope.toName(w);return this._for(new E("in",ee,te,x),()=>B(te))}endFor(){return this._endBlockNode(f)}label(w){return this._leafNode(new d(w))}break(w){return this._leafNode(new u(w))}return(w){const x=new O;if(this._blockNode(x),this.code(w),x.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(w,x,B){if(!x&&!B)throw new Error('CodeGen: "try" without "catch" and "finally"');const ee=new j;if(this._blockNode(ee),this.code(w),x){const te=this.name("e");this._currNode=ee.catch=new L(te),x(te)}return B&&(this._currNode=ee.finally=new G,this.code(B)),this._endBlockNode(L,G)}throw(w){return this._leafNode(new h(w))}block(w,x){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(x),this}endBlock(w){const x=this._blockStarts.pop();if(x===void 0)throw new Error("CodeGen: not in self-balancing block");const B=this._nodes.length-x;if(B<0||w!==void 0&&B!==w)throw new Error(`CodeGen: wrong number of nodes: ${B} vs ${w} expected`);return this._nodes.length=x,this}func(w,x=t.nil,B,ee){return this._blockNode(new I(w,x,B)),ee&&this.code(ee).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w)}_endBlockNode(w,x){const B=this._currNode;if(B instanceof w||x&&B instanceof x)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${x?`${w.kind}/${x.kind}`:w.kind}"`)}_elseNode(w){const x=this._currNode;if(!(x instanceof $))throw new Error('CodeGen: "else" without "if"');return this._currNode=x.else=w,this}get _root(){return this._nodes[0]}get _currNode(){const w=this._nodes;return w[w.length-1]}set _currNode(w){const x=this._nodes;x[x.length-1]=w}}e.CodeGen=Y;function Q(P,w){for(const x in w)P[x]=(P[x]||0)+(w[x]||0);return P}function oe(P,w){return w instanceof t._CodeOrName?Q(P,w.names):P}function pe(P,w,x){if(P instanceof t.Name)return B(P);if(!ee(P))return P;return new t._Code(P._items.reduce((te,me)=>(me instanceof t.Name&&(me=B(me)),me instanceof t._Code?te.push(...me._items):te.push(me),te),[]));function B(te){const me=x[te.str];return me===void 0||w[te.str]!==1?te:(delete w[te.str],me)}function ee(te){return te instanceof t._Code&&te._items.some(me=>me instanceof t.Name&&w[me.str]===1&&x[me.str]!==void 0)}}function R(P,w){for(const x in w)P[x]=(P[x]||0)-(w[x]||0)}function X(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,t._)`!${F(P)}`}e.not=X;const ie=T(e.operators.AND);function re(...P){return P.reduce(ie)}e.and=re;const ce=T(e.operators.OR);function K(...P){return P.reduce(ce)}e.or=K;function T(P){return(w,x)=>w===t.nil?x:x===t.nil?w:(0,t._)`${F(w)} ${P} ${F(x)}`}function F(P){return P instanceof t.Name?P:(0,t._)`(${P})`}}(io)),io}var he={},cu;function _e(){if(cu)return he;cu=1,Object.defineProperty(he,"__esModule",{value:!0}),he.checkStrictMode=he.getErrorPath=he.Type=he.useFunc=he.setEvaluated=he.evaluatedPropsToName=he.mergeEvaluated=he.eachItem=he.unescapeJsonPointer=he.escapeJsonPointer=he.escapeFragment=he.unescapeFragment=he.schemaRefOrVal=he.schemaHasRulesButRef=he.schemaHasRules=he.checkUnknownRules=he.alwaysValidSchema=he.toHash=void 0;const e=ye(),t=hi();function r(E){const I={};for(const O of E)I[O]=!0;return I}he.toHash=r;function i(E,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(n(E,I),!o(I,E.self.RULES.all))}he.alwaysValidSchema=i;function n(E,I=E.schema){const{opts:O,self:j}=E;if(!O.strictSchema||typeof I=="boolean")return;const L=j.RULES.keywords;for(const G in I)L[G]||S(E,`unknown keyword: "${G}"`)}he.checkUnknownRules=n;function o(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(I[O])return!0;return!1}he.schemaHasRules=o;function s(E,I){if(typeof E=="boolean")return!E;for(const O in E)if(O!=="$ref"&&I.all[O])return!0;return!1}he.schemaHasRulesButRef=s;function a({topSchemaRef:E,schemaPath:I},O,j,L){if(!L){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${E}${I}${(0,e.getProperty)(j)}`}he.schemaRefOrVal=a;function c(E){return h(decodeURIComponent(E))}he.unescapeFragment=c;function d(E){return encodeURIComponent(u(E))}he.escapeFragment=d;function u(E){return typeof E=="number"?`${E}`:E.replace(/~/g,"~0").replace(/\//g,"~1")}he.escapeJsonPointer=u;function h(E){return E.replace(/~1/g,"/").replace(/~0/g,"~")}he.unescapeJsonPointer=h;function y(E,I){if(Array.isArray(E))for(const O of E)I(O);else I(E)}he.eachItem=y;function _({mergeNames:E,mergeToName:I,mergeValues:O,resultToName:j}){return(L,G,Y,Q)=>{const oe=Y===void 0?G:Y instanceof e.Name?(G instanceof e.Name?E(L,G,Y):I(L,G,Y),Y):G instanceof e.Name?(I(L,Y,G),G):O(G,Y);return Q===e.Name&&!(oe instanceof e.Name)?j(L,oe):oe}}he.mergeEvaluated={props:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>{E.if((0,e._)`${I} === true`,()=>E.assign(O,!0),()=>E.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${I})`))}),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>{I===!0?E.assign(O,!0):(E.assign(O,(0,e._)`${O} || {}`),g(E,O,I))}),mergeValues:(E,I)=>E===!0?!0:{...E,...I},resultToName:b}),items:_({mergeNames:(E,I,O)=>E.if((0,e._)`${O} !== true && ${I} !== undefined`,()=>E.assign(O,(0,e._)`${I} === true ? true : ${O} > ${I} ? ${O} : ${I}`)),mergeToName:(E,I,O)=>E.if((0,e._)`${O} !== true`,()=>E.assign(O,I===!0?!0:(0,e._)`${O} > ${I} ? ${O} : ${I}`)),mergeValues:(E,I)=>E===!0?!0:Math.max(E,I),resultToName:(E,I)=>E.var("items",I)})};function b(E,I){if(I===!0)return E.var("props",!0);const O=E.var("props",(0,e._)`{}`);return I!==void 0&&g(E,O,I),O}he.evaluatedPropsToName=b;function g(E,I,O){Object.keys(O).forEach(j=>E.assign((0,e._)`${I}${(0,e.getProperty)(j)}`,!0))}he.setEvaluated=g;const m={};function $(E,I){return E.scopeValue("func",{ref:I,code:m[I.code]||(m[I.code]=new t._Code(I.code))})}he.useFunc=$;var f;(function(E){E[E.Num=0]="Num",E[E.Str=1]="Str"})(f||(he.Type=f={}));function v(E,I,O){if(E instanceof e.Name){const j=I===f.Num;return O?j?(0,e._)`"[" + ${E} + "]"`:(0,e._)`"['" + ${E} + "']"`:j?(0,e._)`"/" + ${E}`:(0,e._)`"/" + ${E}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(E).toString():"/"+u(E)}he.getErrorPath=v;function S(E,I,O=E.opts.strictSchema){if(O){if(I=`strict mode: ${I}`,O===!0)throw new Error(I);E.self.logger.warn(I)}}return he.checkStrictMode=S,he}var pr={},lu;function Rt(){if(lu)return pr;lu=1,Object.defineProperty(pr,"__esModule",{value:!0});const e=ye(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return pr.default=t,pr}var fu;function Mi(){return fu||(fu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ye(),r=_e(),i=Rt();e.keywordError={message:({keyword:m})=>(0,t.str)`must pass "${m}" keyword validation`},e.keyword$DataError={message:({keyword:m,schemaType:$})=>$?(0,t.str)`"${m}" keyword must be ${$} ($data)`:(0,t.str)`"${m}" keyword is invalid ($data)`};function n(m,$=e.keywordError,f,v){const{it:S}=m,{gen:E,compositeRule:I,allErrors:O}=S,j=h(m,$,f);v??(I||O)?c(E,j):d(S,(0,t._)`[${j}]`)}e.reportError=n;function o(m,$=e.keywordError,f){const{it:v}=m,{gen:S,compositeRule:E,allErrors:I}=v,O=h(m,$,f);c(S,O),E||I||d(v,i.default.vErrors)}e.reportExtraError=o;function s(m,$){m.assign(i.default.errors,$),m.if((0,t._)`${i.default.vErrors} !== null`,()=>m.if($,()=>m.assign((0,t._)`${i.default.vErrors}.length`,$),()=>m.assign(i.default.vErrors,null)))}e.resetErrorsCount=s;function a({gen:m,keyword:$,schemaValue:f,data:v,errsCount:S,it:E}){if(S===void 0)throw new Error("ajv implementation error");const I=m.name("err");m.forRange("i",S,i.default.errors,O=>{m.const(I,(0,t._)`${i.default.vErrors}[${O}]`),m.if((0,t._)`${I}.instancePath === undefined`,()=>m.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(i.default.instancePath,E.errorPath))),m.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${E.errSchemaPath}/${$}`),E.opts.verbose&&(m.assign((0,t._)`${I}.schema`,f),m.assign((0,t._)`${I}.data`,v))})}e.extendErrors=a;function c(m,$){const f=m.const("err",$);m.if((0,t._)`${i.default.vErrors} === null`,()=>m.assign(i.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${i.default.vErrors}.push(${f})`),m.code((0,t._)`${i.default.errors}++`)}function d(m,$){const{gen:f,validateName:v,schemaEnv:S}=m;S.$async?f.throw((0,t._)`new ${m.ValidationError}(${$})`):(f.assign((0,t._)`${v}.errors`,$),f.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function h(m,$,f){const{createErrors:v}=m.it;return v===!1?(0,t._)`{}`:y(m,$,f)}function y(m,$,f={}){const{gen:v,it:S}=m,E=[_(S,f),b(m,f)];return g(m,$,E),v.object(...E)}function _({errorPath:m},{instancePath:$}){const f=$?(0,t.str)`${m}${(0,r.getErrorPath)($,r.Type.Str)}`:m;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,f)]}function b({keyword:m,it:{errSchemaPath:$}},{schemaPath:f,parentSchema:v}){let S=v?$:(0,t.str)`${$}/${m}`;return f&&(S=(0,t.str)`${S}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,S]}function g(m,{params:$,message:f},v){const{keyword:S,data:E,schemaValue:I,it:O}=m,{opts:j,propertyName:L,topSchemaRef:G,schemaPath:Y}=O;v.push([u.keyword,S],[u.params,typeof $=="function"?$(m):$||(0,t._)`{}`]),j.messages&&v.push([u.message,typeof f=="function"?f(m):f]),j.verbose&&v.push([u.schema,I],[u.parentSchema,(0,t._)`${G}${Y}`],[i.default.data,E]),L&&v.push([u.propertyName,L])}}(ro)),ro}var du;function H$(){if(du)return Ft;du=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.boolOrEmptySchema=Ft.topBoolOrEmptySchema=void 0;const e=Mi(),t=ye(),r=Rt(),i={message:"boolean schema is false"};function n(a){const{gen:c,schema:d,validateName:u}=a;d===!1?s(a,!1):typeof d=="object"&&d.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}Ft.topBoolOrEmptySchema=n;function o(a,c){const{gen:d,schema:u}=a;u===!1?(d.var(c,!1),s(a)):d.var(c,!0)}Ft.boolOrEmptySchema=o;function s(a,c){const{gen:d,data:u}=a,h={gen:d,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(h,i,void 0,c)}return Ft}var Me={},Lt={},hu;function Up(){if(hu)return Lt;hu=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.getRules=Lt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(n){return typeof n=="string"&&t.has(n)}Lt.isJSONType=r;function i(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}return Lt.getRules=i,Lt}var kt={},pu;function Cp(){if(pu)return kt;pu=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.shouldUseRule=kt.shouldUseGroup=kt.schemaHasRulesForType=void 0;function e({schema:i,self:n},o){const s=n.RULES.types[o];return s&&s!==!0&&t(i,s)}kt.schemaHasRulesForType=e;function t(i,n){return n.rules.some(o=>r(i,o))}kt.shouldUseGroup=t;function r(i,n){var o;return i[n.keyword]!==void 0||((o=n.definition.implements)===null||o===void 0?void 0:o.some(s=>i[s]!==void 0))}return kt.shouldUseRule=r,kt}var mu;function pi(){if(mu)return Me;mu=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.reportTypeError=Me.checkDataTypes=Me.checkDataType=Me.coerceAndCheckDataType=Me.getJSONTypes=Me.getSchemaTypes=Me.DataType=void 0;const e=Up(),t=Cp(),r=Mi(),i=ye(),n=_e();var o;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(o||(Me.DataType=o={}));function s(f){const v=a(f.type);if(v.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&v.push("null")}return v}Me.getSchemaTypes=s;function a(f){const v=Array.isArray(f)?f:f?[f]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}Me.getJSONTypes=a;function c(f,v){const{gen:S,data:E,opts:I}=f,O=u(v,I.coerceTypes),j=v.length>0&&!(O.length===0&&v.length===1&&(0,t.schemaHasRulesForType)(f,v[0]));if(j){const L=b(v,E,I.strictNumbers,o.Wrong);S.if(L,()=>{O.length?h(f,v,O):m(f)})}return j}Me.coerceAndCheckDataType=c;const d=new Set(["string","number","integer","boolean","null"]);function u(f,v){return v?f.filter(S=>d.has(S)||v==="array"&&S==="array"):[]}function h(f,v,S){const{gen:E,data:I,opts:O}=f,j=E.let("dataType",(0,i._)`typeof ${I}`),L=E.let("coerced",(0,i._)`undefined`);O.coerceTypes==="array"&&E.if((0,i._)`${j} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>E.assign(I,(0,i._)`${I}[0]`).assign(j,(0,i._)`typeof ${I}`).if(b(v,I,O.strictNumbers),()=>E.assign(L,I))),E.if((0,i._)`${L} !== undefined`);for(const Y of S)(d.has(Y)||Y==="array"&&O.coerceTypes==="array")&&G(Y);E.else(),m(f),E.endIf(),E.if((0,i._)`${L} !== undefined`,()=>{E.assign(I,L),y(f,L)});function G(Y){switch(Y){case"string":E.elseIf((0,i._)`${j} == "number" || ${j} == "boolean"`).assign(L,(0,i._)`"" + ${I}`).elseIf((0,i._)`${I} === null`).assign(L,(0,i._)`""`);return;case"number":E.elseIf((0,i._)`${j} == "boolean" || ${I} === null
|
|
166
166
|
|| (${j} == "string" && ${I} && ${I} == +${I})`).assign(L,(0,i._)`+${I}`);return;case"integer":E.elseIf((0,i._)`${j} === "boolean" || ${I} === null
|
|
167
167
|
|| (${j} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign(L,(0,i._)`+${I}`);return;case"boolean":E.elseIf((0,i._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign(L,!1).elseIf((0,i._)`${I} === "true" || ${I} === 1`).assign(L,!0);return;case"null":E.elseIf((0,i._)`${I} === "" || ${I} === 0 || ${I} === false`),E.assign(L,null);return;case"array":E.elseIf((0,i._)`${j} === "string" || ${j} === "number"
|
|
168
|
-
|| ${j} === "boolean" || ${I} === null`).assign(L,(0,i._)`[${I}]`)}}}function y({gen:f,parentData:v,parentDataProperty:S},E){f.if((0,i._)`${v} !== undefined`,()=>f.assign((0,i._)`${v}[${S}]`,E))}function _(f,v,S,E=o.Correct){const I=E===o.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(f){case"null":return(0,i._)`${v} ${I} null`;case"array":O=(0,i._)`Array.isArray(${v})`;break;case"object":O=(0,i._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":O=j((0,i._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":O=j();break;default:return(0,i._)`typeof ${v} ${I} ${f}`}return E===o.Correct?O:(0,i.not)(O);function j(L=i.nil){return(0,i.and)((0,i._)`typeof ${v} == "number"`,L,S?(0,i._)`isFinite(${v})`:i.nil)}}Me.checkDataType=_;function b(f,v,S,E){if(f.length===1)return _(f[0],v,S,E);let I;const O=(0,n.toHash)(f);if(O.array&&O.object){const j=(0,i._)`typeof ${v} != "object"`;I=O.null?j:(0,i._)`!${v} || ${j}`,delete O.null,delete O.array,delete O.object}else I=i.nil;O.number&&delete O.integer;for(const j in O)I=(0,i.and)(I,_(j,v,S,E));return I}Me.checkDataTypes=b;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:v})=>typeof f=="string"?(0,i._)`{type: ${f}}`:(0,i._)`{type: ${v}}`};function m(f){const v=$(f);(0,r.reportError)(v,g)}Me.reportTypeError=m;function $(f){const{gen:v,data:S,schema:E}=f,I=(0,n.schemaRefOrVal)(f,E,"type");return{gen:v,keyword:"type",data:S,schema:E.type,schemaCode:I,schemaValue:I,parentSchema:E,params:{},it:f}}return Me}var zn={},gu;function H$(){if(gu)return zn;gu=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.assignDefaults=void 0;const e=ye(),t=_e();function r(n,o){const{properties:s,items:a}=n.schema;if(o==="object"&&s)for(const c in s)i(n,c,s[c].default);else o==="array"&&Array.isArray(a)&&a.forEach((c,d)=>i(n,d,c.default))}zn.assignDefaults=r;function i(n,o,s){const{gen:a,compositeRule:c,data:d,opts:u}=n;if(s===void 0)return;const h=(0,e._)`${d}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${h}`);return}let y=(0,e._)`${h} === undefined`;u.useDefaults==="empty"&&(y=(0,e._)`${y} || ${h} === null || ${h} === ""`),a.if(y,(0,e._)`${h} = ${(0,e.stringify)(s)}`)}return zn}var ft={},ke={},yu;function gt(){if(yu)return ke;yu=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateUnion=ke.validateArray=ke.usePattern=ke.callValidateCode=ke.schemaProperties=ke.allSchemaProperties=ke.noPropertyInData=ke.propertyInData=ke.isOwnProperty=ke.hasPropFunc=ke.reportMissingProp=ke.checkMissingProp=ke.checkReportMissingProp=void 0;const e=ye(),t=_e(),r=Rt(),i=_e();function n(f,v){const{gen:S,data:E,it:I}=f;S.if(u(S,E,v,I.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${v}`},!0),f.error()})}ke.checkReportMissingProp=n;function o({gen:f,data:v,it:{opts:S}},E,I){return(0,e.or)(...E.map(O=>(0,e.and)(u(f,v,O,S.ownProperties),(0,e._)`${I} = ${O}`)))}ke.checkMissingProp=o;function s(f,v){f.setParams({missingProperty:v},!0),f.error()}ke.reportMissingProp=s;function a(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ke.hasPropFunc=a;function c(f,v,S){return(0,e._)`${a(f)}.call(${v}, ${S})`}ke.isOwnProperty=c;function d(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} !== undefined`;return E?(0,e._)`${I} && ${c(f,v,S)}`:I}ke.propertyInData=d;function u(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} === undefined`;return E?(0,e.or)(I,(0,e.not)(c(f,v,S))):I}ke.noPropertyInData=u;function h(f){return f?Object.keys(f).filter(v=>v!=="__proto__"):[]}ke.allSchemaProperties=h;function y(f,v){return h(v).filter(S=>!(0,t.alwaysValidSchema)(f,v[S]))}ke.schemaProperties=y;function _({schemaCode:f,data:v,it:{gen:S,topSchemaRef:E,schemaPath:I,errorPath:O},it:j},L,G,Y){const Q=Y?(0,e._)`${f}, ${v}, ${E}${I}`:v,oe=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&oe.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const pe=(0,e._)`${Q}, ${S.object(...oe)}`;return G!==e.nil?(0,e._)`${L}.call(${G}, ${pe})`:(0,e._)`${L}(${pe})`}ke.callValidateCode=_;const b=(0,e._)`new RegExp`;function g({gen:f,it:{opts:v}},S){const E=v.unicodeRegExp?"u":"",{regExp:I}=v.code,O=I(S,E);return f.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${I.code==="new RegExp"?b:(0,i.useFunc)(f,I)}(${S}, ${E})`})}ke.usePattern=g;function m(f){const{gen:v,data:S,keyword:E,it:I}=f,O=v.name("valid");if(I.allErrors){const L=v.let("valid",!0);return j(()=>v.assign(L,!1)),L}return v.var(O,!0),j(()=>v.break()),O;function j(L){const G=v.const("len",(0,e._)`${S}.length`);v.forRange("i",0,G,Y=>{f.subschema({keyword:E,dataProp:Y,dataPropType:t.Type.Num},O),v.if((0,e.not)(O),L)})}}ke.validateArray=m;function $(f){const{gen:v,schema:S,keyword:E,it:I}=f;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(G=>(0,t.alwaysValidSchema)(I,G))&&!I.opts.unevaluated)return;const j=v.let("valid",!1),L=v.name("_valid");v.block(()=>S.forEach((G,Y)=>{const Q=f.subschema({keyword:E,schemaProp:Y,compositeRule:!0},L);v.assign(j,(0,e._)`${j} || ${L}`),f.mergeValidEvaluated(Q,L)||v.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return ke.validateUnion=$,ke}var vu;function X$(){if(vu)return ft;vu=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const e=ye(),t=Rt(),r=gt(),i=Mi();function n(y,_){const{gen:b,keyword:g,schema:m,parentSchema:$,it:f}=y,v=_.macro.call(f.self,m,$,f),S=d(b,g,v);f.opts.validateSchema!==!1&&f.self.validateSchema(v,!0);const E=b.name("valid");y.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:!0},E),y.pass(E,()=>y.error(!0))}ft.macroKeywordCode=n;function o(y,_){var b;const{gen:g,keyword:m,schema:$,parentSchema:f,$data:v,it:S}=y;c(S,_);const E=!v&&_.compile?_.compile.call(S.self,$,f,S):_.validate,I=d(g,m,E),O=g.let("valid");y.block$data(O,j),y.ok((b=_.valid)!==null&&b!==void 0?b:O);function j(){if(_.errors===!1)Y(),_.modifying&&s(y),Q(()=>y.error());else{const oe=_.async?L():G();_.modifying&&s(y),Q(()=>a(y,oe))}}function L(){const oe=g.let("ruleErrs",null);return g.try(()=>Y((0,e._)`await `),pe=>g.assign(O,!1).if((0,e._)`${pe} instanceof ${S.ValidationError}`,()=>g.assign(oe,(0,e._)`${pe}.errors`),()=>g.throw(pe))),oe}function G(){const oe=(0,e._)`${I}.errors`;return g.assign(oe,null),Y(e.nil),oe}function Y(oe=_.async?(0,e._)`await `:e.nil){const pe=S.opts.passContext?t.default.this:t.default.self,R=!("compile"in _&&!v||_.schema===!1);g.assign(O,(0,e._)`${oe}${(0,r.callValidateCode)(y,I,pe,R)}`,_.modifying)}function Q(oe){var pe;g.if((0,e.not)((pe=_.valid)!==null&&pe!==void 0?pe:O),oe)}}ft.funcKeywordCode=o;function s(y){const{gen:_,data:b,it:g}=y;_.if(g.parentData,()=>_.assign(b,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function a(y,_){const{gen:b}=y;b.if((0,e._)`Array.isArray(${_})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(y)},()=>y.error())}function c({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function d(y,_,b){if(b===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function u(y,_,b=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||b&&typeof y>"u")}ft.validSchemaType=u;function h({schema:y,opts:_,self:b,errSchemaPath:g},m,$){if(Array.isArray(m.keyword)?!m.keyword.includes($):m.keyword!==$)throw new Error("ajv implementation error");const f=m.dependencies;if(f?.some(v=>!Object.prototype.hasOwnProperty.call(y,v)))throw new Error(`parent schema must have dependencies of ${$}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(y[$])){const S=`keyword "${$}" value is invalid at path "${g}": `+b.errorsText(m.validateSchema.errors);if(_.validateSchema==="log")b.logger.error(S);else throw new Error(S)}}return ft.validateKeywordUsage=h,ft}var St={},$u;function Y$(){if($u)return St;$u=1,Object.defineProperty(St,"__esModule",{value:!0}),St.extendSubschemaMode=St.extendSubschemaData=St.getSubschema=void 0;const e=ye(),t=_e();function r(o,{keyword:s,schemaProp:a,schema:c,schemaPath:d,errSchemaPath:u,topSchemaRef:h}){if(s!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const y=o.schema[s];return a===void 0?{schema:y,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:y[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,t.escapeFragment)(a)}`}}if(c!==void 0){if(d===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:d,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}St.getSubschema=r;function i(o,s,{dataProp:a,dataPropType:c,data:d,dataTypes:u,propertyName:h}){if(d!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=s;if(a!==void 0){const{errorPath:b,dataPathArr:g,opts:m}=s,$=y.let("data",(0,e._)`${s.data}${(0,e.getProperty)(a)}`,!0);_($),o.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(a,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...g,o.parentDataProperty]}if(d!==void 0){const b=d instanceof e.Name?d:y.let("data",d,!0);_(b),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function _(b){o.data=b,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,b]}}St.extendSubschemaData=i;function n(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:c,createErrors:d,allErrors:u}){c!==void 0&&(o.compositeRule=c),d!==void 0&&(o.createErrors=d),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=s,o.jtdMetadata=a}return St.extendSubschemaMode=n,St}var Ge={},ao,bu;function Bp(){return bu||(bu=1,ao=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var s=o[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}),ao}var uo={exports:{}},_u;function Q$(){if(_u)return uo.exports;_u=1;var e=uo.exports=function(i,n,o){typeof n=="function"&&(o=n,n={}),o=n.cb||o;var s=typeof o=="function"?o:o.pre||function(){},a=o.post||function(){};t(n,s,a,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,n,o,s,a,c,d,u,h,y){if(s&&typeof s=="object"&&!Array.isArray(s)){n(s,a,c,d,u,h,y);for(var _ in s){var b=s[_];if(Array.isArray(b)){if(_ in e.arrayKeywords)for(var g=0;g<b.length;g++)t(i,n,o,b[g],a+"/"+_+"/"+g,c,a,_,s,g)}else if(_ in e.propsKeywords){if(b&&typeof b=="object")for(var m in b)t(i,n,o,b[m],a+"/"+_+"/"+r(m),c,a,_,s,m)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,n,o,b,a+"/"+_,c,a,_,s)}o(s,a,c,d,u,h,y)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return uo.exports}var wu;function qi(){if(wu)return Ge;wu=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getSchemaRefs=Ge.resolveUrl=Ge.normalizeId=Ge._getFullPath=Ge.getFullPath=Ge.inlineRef=void 0;const e=_e(),t=Bp(),r=Q$(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n(g,m=!0){return typeof g=="boolean"?!0:m===!0?!s(g):m?a(g)<=m:!1}Ge.inlineRef=n;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(const m in g){if(o.has(m))return!0;const $=g[m];if(Array.isArray($)&&$.some(s)||typeof $=="object"&&s($))return!0}return!1}function a(g){let m=0;for(const $ in g){if($==="$ref")return 1/0;if(m++,!i.has($)&&(typeof g[$]=="object"&&(0,e.eachItem)(g[$],f=>m+=a(f)),m===1/0))return 1/0}return m}function c(g,m="",$){$!==!1&&(m=h(m));const f=g.parse(m);return d(g,f)}Ge.getFullPath=c;function d(g,m){return g.serialize(m).split("#")[0]+"#"}Ge._getFullPath=d;const u=/#\/?$/;function h(g){return g?g.replace(u,""):""}Ge.normalizeId=h;function y(g,m,$){return $=h($),g.resolve(m,$)}Ge.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function b(g,m){if(typeof g=="boolean")return{};const{schemaId:$,uriResolver:f}=this.opts,v=h(g[$]||m),S={"":v},E=c(f,v,!1),I={},O=new Set;return r(g,{allKeys:!0},(G,Y,Q,oe)=>{if(oe===void 0)return;const pe=E+Y;let R=S[oe];typeof G[$]=="string"&&(R=X.call(this,G[$])),ie.call(this,G.$anchor),ie.call(this,G.$dynamicAnchor),S[Y]=R;function X(re){const ce=this.opts.uriResolver.resolve;if(re=h(R?ce(R,re):re),O.has(re))throw L(re);O.add(re);let K=this.refs[re];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?j(G,K.schema,re):re!==h(pe)&&(re[0]==="#"?(j(G,I[re],re),I[re]=G):this.refs[re]=pe),re}function ie(re){if(typeof re=="string"){if(!_.test(re))throw new Error(`invalid anchor "${re}"`);X.call(this,`#${re}`)}}}),I;function j(G,Y,Q){if(Y!==void 0&&!t(G,Y))throw L(Q)}function L(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Ge.getSchemaRefs=b,Ge}var ku;function Vi(){if(ku)return wt;ku=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.getData=wt.KeywordCxt=wt.validateFunctionCode=void 0;const e=W$(),t=pi(),r=Cp(),i=pi(),n=H$(),o=X$(),s=Y$(),a=ye(),c=Rt(),d=qi(),u=_e(),h=Mi();function y(A){if(E(A)&&(O(A),S(A))){m(A);return}_(A,()=>(0,e.topBoolOrEmptySchema)(A))}wt.validateFunctionCode=y;function _({gen:A,validateName:U,schema:M,schemaEnv:J,opts:ne},ae){ne.code.es5?A.func(U,(0,a._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{A.code((0,a._)`"use strict"; ${f(M,ne)}`),g(A,ne),A.code(ae)}):A.func(U,(0,a._)`${c.default.data}, ${b(ne)}`,J.$async,()=>A.code(f(M,ne)).code(ae))}function b(A){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function g(A,U){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,a._)`""`),A.var(c.default.parentData,(0,a._)`undefined`),A.var(c.default.parentDataProperty,(0,a._)`undefined`),A.var(c.default.rootData,c.default.data),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function m(A){const{schema:U,opts:M,gen:J}=A;_(A,()=>{M.$comment&&U.$comment&&oe(A),G(A),J.let(c.default.vErrors,null),J.let(c.default.errors,0),M.unevaluated&&$(A),j(A),pe(A)})}function $(A){const{gen:U,validateName:M}=A;A.evaluated=U.const("evaluated",(0,a._)`${M}.evaluated`),U.if((0,a._)`${A.evaluated}.dynamicProps`,()=>U.assign((0,a._)`${A.evaluated}.props`,(0,a._)`undefined`)),U.if((0,a._)`${A.evaluated}.dynamicItems`,()=>U.assign((0,a._)`${A.evaluated}.items`,(0,a._)`undefined`))}function f(A,U){const M=typeof A=="object"&&A[U.schemaId];return M&&(U.code.source||U.code.process)?(0,a._)`/*# sourceURL=${M} */`:a.nil}function v(A,U){if(E(A)&&(O(A),S(A))){I(A,U);return}(0,e.boolOrEmptySchema)(A,U)}function S({schema:A,self:U}){if(typeof A=="boolean")return!A;for(const M in A)if(U.RULES.all[M])return!0;return!1}function E(A){return typeof A.schema!="boolean"}function I(A,U){const{schema:M,gen:J,opts:ne}=A;ne.$comment&&M.$comment&&oe(A),Y(A),Q(A);const ae=J.const("_errs",c.default.errors);j(A,ae),J.var(U,(0,a._)`${ae} === ${c.default.errors}`)}function O(A){(0,u.checkUnknownRules)(A),L(A)}function j(A,U){if(A.opts.jtd)return X(A,[],!1,U);const M=(0,t.getSchemaTypes)(A.schema),J=(0,t.coerceAndCheckDataType)(A,M);X(A,M,!J,U)}function L(A){const{schema:U,errSchemaPath:M,opts:J,self:ne}=A;U.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(U,ne.RULES)&&ne.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function G(A){const{schema:U,opts:M}=A;U.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function Y(A){const U=A.schema[A.opts.schemaId];U&&(A.baseId=(0,d.resolveUrl)(A.opts.uriResolver,A.baseId,U))}function Q(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function oe({gen:A,schemaEnv:U,schema:M,errSchemaPath:J,opts:ne}){const ae=M.$comment;if(ne.$comment===!0)A.code((0,a._)`${c.default.self}.logger.log(${ae})`);else if(typeof ne.$comment=="function"){const we=(0,a.str)`${J}/$comment`,Fe=A.scopeValue("root",{ref:U.root});A.code((0,a._)`${c.default.self}.opts.$comment(${ae}, ${we}, ${Fe}.schema)`)}}function pe(A){const{gen:U,schemaEnv:M,validateName:J,ValidationError:ne,opts:ae}=A;M.$async?U.if((0,a._)`${c.default.errors} === 0`,()=>U.return(c.default.data),()=>U.throw((0,a._)`new ${ne}(${c.default.vErrors})`)):(U.assign((0,a._)`${J}.errors`,c.default.vErrors),ae.unevaluated&&R(A),U.return((0,a._)`${c.default.errors} === 0`))}function R({gen:A,evaluated:U,props:M,items:J}){M instanceof a.Name&&A.assign((0,a._)`${U}.props`,M),J instanceof a.Name&&A.assign((0,a._)`${U}.items`,J)}function X(A,U,M,J){const{gen:ne,schema:ae,data:we,allErrors:Fe,opts:Ve,self:Le}=A,{RULES:Ce}=Le;if(ae.$ref&&(Ve.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ae,Ce))){ne.block(()=>ee(A,"$ref",Ce.all.$ref.definition));return}Ve.jtd||re(A,U),ne.block(()=>{for(const Je of Ce.rules)At(Je);At(Ce.post)});function At(Je){(0,r.shouldUseGroup)(ae,Je)&&(Je.type?(ne.if((0,i.checkDataType)(Je.type,we,Ve.strictNumbers)),ie(A,Je),U.length===1&&U[0]===Je.type&&M&&(ne.else(),(0,i.reportTypeError)(A)),ne.endIf()):ie(A,Je),Fe||ne.if((0,a._)`${c.default.errors} === ${J||0}`))}}function ie(A,U){const{gen:M,schema:J,opts:{useDefaults:ne}}=A;ne&&(0,n.assignDefaults)(A,U.type),M.block(()=>{for(const ae of U.rules)(0,r.shouldUseRule)(J,ae)&&ee(A,ae.keyword,ae.definition,U.type)})}function re(A,U){A.schemaEnv.meta||!A.opts.strictTypes||(ce(A,U),A.opts.allowUnionTypes||K(A,U),T(A,A.dataTypes))}function ce(A,U){if(U.length){if(!A.dataTypes.length){A.dataTypes=U;return}U.forEach(M=>{P(A.dataTypes,M)||x(A,`type "${M}" not allowed by context "${A.dataTypes.join(",")}"`)}),w(A,U)}}function K(A,U){U.length>1&&!(U.length===2&&U.includes("null"))&&x(A,"use allowUnionTypes to allow union type keyword")}function T(A,U){const M=A.self.RULES.all;for(const J in M){const ne=M[J];if(typeof ne=="object"&&(0,r.shouldUseRule)(A.schema,ne)){const{type:ae}=ne.definition;ae.length&&!ae.some(we=>F(U,we))&&x(A,`missing type "${ae.join(",")}" for keyword "${J}"`)}}}function F(A,U){return A.includes(U)||U==="number"&&A.includes("integer")}function P(A,U){return A.includes(U)||U==="integer"&&A.includes("number")}function w(A,U){const M=[];for(const J of A.dataTypes)P(U,J)?M.push(J):U.includes("integer")&&J==="number"&&M.push("integer");A.dataTypes=M}function x(A,U){const M=A.schemaEnv.baseId+A.errSchemaPath;U+=` at "${M}" (strictTypes)`,(0,u.checkStrictMode)(A,U,A.opts.strictTypes)}class B{constructor(U,M,J){if((0,o.validateKeywordUsage)(U,M,J),this.gen=U.gen,this.allErrors=U.allErrors,this.keyword=J,this.data=U.data,this.schema=U.schema[J],this.$data=M.$data&&U.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(U,this.schema,J,this.$data),this.schemaType=M.schemaType,this.parentSchema=U.schema,this.params={},this.it=U,this.def=M,this.$data)this.schemaCode=U.gen.const("vSchema",se(this.$data,U));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=U.gen.const("_errs",c.default.errors))}result(U,M,J){this.failResult((0,a.not)(U),M,J)}failResult(U,M,J){this.gen.if(U),J?J():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(U,M){this.failResult((0,a.not)(U),void 0,M)}fail(U){if(U===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(U),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(U){if(!this.$data)return this.fail(U);const{schemaCode:M}=this;this.fail((0,a._)`${M} !== undefined && (${(0,a.or)(this.invalid$data(),U)})`)}error(U,M,J){if(M){this.setParams(M),this._error(U,J),this.setParams({});return}this._error(U,J)}_error(U,M){(U?h.reportExtraError:h.reportError)(this,this.def.error,M)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(U){this.allErrors||this.gen.if(U)}setParams(U,M){M?Object.assign(this.params,U):this.params=U}block$data(U,M,J=a.nil){this.gen.block(()=>{this.check$data(U,J),M()})}check$data(U=a.nil,M=a.nil){if(!this.$data)return;const{gen:J,schemaCode:ne,schemaType:ae,def:we}=this;J.if((0,a.or)((0,a._)`${ne} === undefined`,M)),U!==a.nil&&J.assign(U,!0),(ae.length||we.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),U!==a.nil&&J.assign(U,!1)),J.else()}invalid$data(){const{gen:U,schemaCode:M,schemaType:J,def:ne,it:ae}=this;return(0,a.or)(we(),Fe());function we(){if(J.length){if(!(M instanceof a.Name))throw new Error("ajv implementation error");const Ve=Array.isArray(J)?J:[J];return(0,a._)`${(0,i.checkDataTypes)(Ve,M,ae.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function Fe(){if(ne.validateSchema){const Ve=U.scopeValue("validate$data",{ref:ne.validateSchema});return(0,a._)`!${Ve}(${M})`}return a.nil}}subschema(U,M){const J=(0,s.getSubschema)(this.it,U);(0,s.extendSubschemaData)(J,this.it,U),(0,s.extendSubschemaMode)(J,U);const ne={...this.it,...J,items:void 0,props:void 0};return v(ne,M),ne}mergeEvaluated(U,M){const{it:J,gen:ne}=this;J.opts.unevaluated&&(J.props!==!0&&U.props!==void 0&&(J.props=u.mergeEvaluated.props(ne,U.props,J.props,M)),J.items!==!0&&U.items!==void 0&&(J.items=u.mergeEvaluated.items(ne,U.items,J.items,M)))}mergeValidEvaluated(U,M){const{it:J,gen:ne}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ne.if(M,()=>this.mergeEvaluated(U,a.Name)),!0}}wt.KeywordCxt=B;function ee(A,U,M,J){const ne=new B(A,M,U);"code"in M?M.code(ne,J):ne.$data&&M.validate?(0,o.funcKeywordCode)(ne,M):"macro"in M?(0,o.macroKeywordCode)(ne,M):(M.compile||M.validate)&&(0,o.funcKeywordCode)(ne,M)}const te=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(A,{dataLevel:U,dataNames:M,dataPathArr:J}){let ne,ae;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!te.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ne=A,ae=c.default.rootData}else{const Le=me.exec(A);if(!Le)throw new Error(`Invalid JSON-pointer: ${A}`);const Ce=+Le[1];if(ne=Le[2],ne==="#"){if(Ce>=U)throw new Error(Ve("property/index",Ce));return J[U-Ce]}if(Ce>U)throw new Error(Ve("data",Ce));if(ae=M[U-Ce],!ne)return ae}let we=ae;const Fe=ne.split("/");for(const Le of Fe)Le&&(ae=(0,a._)`${ae}${(0,a.getProperty)((0,u.unescapeJsonPointer)(Le))}`,we=(0,a._)`${we} && ${ae}`);return we;function Ve(Le,Ce){return`Cannot access ${Le} ${Ce} levels up, current level is ${U}`}}return wt.getData=se,wt}var mr={},Su;function Na(){if(Su)return mr;Su=1,Object.defineProperty(mr,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return mr.default=e,mr}var gr={},Iu;function Ki(){if(Iu)return gr;Iu=1,Object.defineProperty(gr,"__esModule",{value:!0});const e=qi();class t extends Error{constructor(i,n,o,s){super(s||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,e.resolveUrl)(i,n,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return gr.default=t,gr}var tt={},Eu;function Oa(){if(Eu)return tt;Eu=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const e=ye(),t=Na(),r=Rt(),i=qi(),n=_e(),o=Vi();class s{constructor($){var f;this.refs={},this.dynamicAnchors={};let v;typeof $.schema=="object"&&(v=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(f=$.baseId)!==null&&f!==void 0?f:(0,i.normalizeId)(v?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=v?.$async,this.refs={}}}tt.SchemaEnv=s;function a(m){const $=u.call(this,m);if($)return $;const f=(0,i.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:v,lines:S}=this.opts.code,{ownProperties:E}=this.opts,I=new e.CodeGen(this.scope,{es5:v,lines:S,ownProperties:E});let O;m.$async&&(O=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=I.scopeName("validate");m.validateName=j;const L={gen:I,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:I.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:O,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(m),(0,o.validateFunctionCode)(L),I.optimize(this.opts.code.optimize);const Y=I.toString();G=`${I.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(G=this.opts.code.process(G,m));const oe=new Function(`${r.default.self}`,`${r.default.scope}`,G)(this,this.scope.get());if(this.scope.value(j,{ref:oe}),oe.errors=null,oe.schema=m.schema,oe.schemaEnv=m,m.$async&&(oe.$async=!0),this.opts.code.source===!0&&(oe.source={validateName:j,validateCode:Y,scopeValues:I._values}),this.opts.unevaluated){const{props:pe,items:R}=L;oe.evaluated={props:pe instanceof e.Name?void 0:pe,items:R instanceof e.Name?void 0:R,dynamicProps:pe instanceof e.Name,dynamicItems:R instanceof e.Name},oe.source&&(oe.source.evaluated=(0,e.stringify)(oe.evaluated))}return m.validate=oe,m}catch(Y){throw delete m.validate,delete m.validateName,G&&this.logger.error("Error compiling schema, function code:",G),Y}finally{this._compilations.delete(m)}}tt.compileSchema=a;function c(m,$,f){var v;f=(0,i.resolveUrl)(this.opts.uriResolver,$,f);const S=m.refs[f];if(S)return S;let E=y.call(this,m,f);if(E===void 0){const I=(v=m.localRefs)===null||v===void 0?void 0:v[f],{schemaId:O}=this.opts;I&&(E=new s({schema:I,schemaId:O,root:m,baseId:$}))}if(E!==void 0)return m.refs[f]=d.call(this,E)}tt.resolveRef=c;function d(m){return(0,i.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:a.call(this,m)}function u(m){for(const $ of this._compilations)if(h($,m))return $}tt.getCompilingSchema=u;function h(m,$){return m.schema===$.schema&&m.root===$.root&&m.baseId===$.baseId}function y(m,$){let f;for(;typeof(f=this.refs[$])=="string";)$=f;return f||this.schemas[$]||_.call(this,m,$)}function _(m,$){const f=this.opts.uriResolver.parse($),v=(0,i._getFullPath)(this.opts.uriResolver,f);let S=(0,i.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&v===S)return g.call(this,f,m);const E=(0,i.normalizeId)(v),I=this.refs[E]||this.schemas[E];if(typeof I=="string"){const O=_.call(this,m,I);return typeof O?.schema!="object"?void 0:g.call(this,f,O)}if(typeof I?.schema=="object"){if(I.validate||a.call(this,I),E===(0,i.normalizeId)($)){const{schema:O}=I,{schemaId:j}=this.opts,L=O[j];return L&&(S=(0,i.resolveUrl)(this.opts.uriResolver,S,L)),new s({schema:O,schemaId:j,root:m,baseId:S})}return g.call(this,f,I)}}tt.resolveSchema=_;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(m,{baseId:$,schema:f,root:v}){var S;if(((S=m.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,n.unescapeFragment)(O)];if(j===void 0)return;f=j;const L=typeof f=="object"&&f[this.opts.schemaId];!b.has(O)&&L&&($=(0,i.resolveUrl)(this.opts.uriResolver,$,L))}let E;if(typeof f!="boolean"&&f.$ref&&!(0,n.schemaHasRulesButRef)(f,this.RULES)){const O=(0,i.resolveUrl)(this.opts.uriResolver,$,f.$ref);E=_.call(this,v,O)}const{schemaId:I}=this.opts;if(E=E||new s({schema:f,schemaId:I,root:v,baseId:$}),E.schema!==E.root.schema)return E}return tt}const eb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",tb="Meta-schema for $data reference (JSON AnySchema extension proposal)",nb="object",rb=["$data"],ib={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},ob=!1;var sb={$id:eb,description:tb,type:nb,required:rb,properties:ib,additionalProperties:ob},yr={},Tn={exports:{}},co,Nu;function ab(){return Nu||(Nu=1,co={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),co}var lo,Ou;function ub(){if(Ou)return lo;Ou=1;const{HEX:e}=ab(),t=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r(g){if(a(g,".")<3)return{host:g,isIPV4:!1};const m=g.match(t)||[],[$]=m;return $?{host:s($,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function i(g,m=!1){let $="",f=!0;for(const v of g){if(e[v]===void 0)return;v!=="0"&&f===!0&&(f=!1),f||($+=v)}return m&&$.length===0&&($="0"),$}function n(g){let m=0;const $={error:!1,address:"",zone:""},f=[],v=[];let S=!1,E=!1,I=!1;function O(){if(v.length){if(S===!1){const j=i(v);if(j!==void 0)f.push(j);else return $.error=!0,!1}v.length=0}return!0}for(let j=0;j<g.length;j++){const L=g[j];if(!(L==="["||L==="]"))if(L===":"){if(E===!0&&(I=!0),!O())break;if(m++,f.push(":"),m>7){$.error=!0;break}j-1>=0&&g[j-1]===":"&&(E=!0);continue}else if(L==="%"){if(!O())break;S=!0}else{v.push(L);continue}}return v.length&&(S?$.zone=v.join(""):I?f.push(v.join("")):f.push(i(v))),$.address=f.join(""),$}function o(g){if(a(g,":")<2)return{host:g,isIPV6:!1};const m=n(g);if(m.error)return{host:g,isIPV6:!1};{let $=m.address,f=m.address;return m.zone&&($+="%"+m.zone,f+="%25"+m.zone),{host:$,escapedHost:f,isIPV6:!0}}}function s(g,m){let $="",f=!0;const v=g.length;for(let S=0;S<v;S++){const E=g[S];E==="0"&&f?(S+1<=v&&g[S+1]===m||S+1===v)&&($+=E,f=!1):(E===m?f=!0:f=!1,$+=E)}return $}function a(g,m){let $=0;for(let f=0;f<g.length;f++)g[f]===m&&$++;return $}const c=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,h=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const m=[];for(;g.length;)if(g.match(c))g=g.replace(c,"");else if(g.match(d))g=g.replace(d,"/");else if(g.match(u))g=g.replace(u,"/"),m.pop();else if(g==="."||g==="..")g="";else{const $=g.match(h);if($){const f=$[0];g=g.slice(f.length),m.push(f)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function _(g,m){const $=m!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=$(g.scheme)),g.userinfo!==void 0&&(g.userinfo=$(g.userinfo)),g.host!==void 0&&(g.host=$(g.host)),g.path!==void 0&&(g.path=$(g.path)),g.query!==void 0&&(g.query=$(g.query)),g.fragment!==void 0&&(g.fragment=$(g.fragment)),g}function b(g){const m=[];if(g.userinfo!==void 0&&(m.push(g.userinfo),m.push("@")),g.host!==void 0){let $=unescape(g.host);const f=r($);if(f.isIPV4)$=f.host;else{const v=o(f.host);v.isIPV6===!0?$=`[${v.escapedHost}]`:$=g.host}m.push($)}return(typeof g.port=="number"||typeof g.port=="string")&&(m.push(":"),m.push(String(g.port))),m.length?m.join(""):void 0}return lo={recomposeAuthority:b,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:o,stringArrayToHexStripped:i},lo}var fo,xu;function cb(){if(xu)return fo;xu=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}function i(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function n(f){const v=String(f.scheme).toLowerCase()==="https";return(f.port===(v?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function o(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function s(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){const[v,S]=f.resourceName.split("?");f.path=v&&v!=="/"?v:void 0,f.query=S,f.resourceName=void 0}return f.fragment=void 0,f}function a(f,v){if(!f.path)return f.error="URN can not be parsed",f;const S=f.path.match(t);if(S){const E=v.scheme||f.scheme||"urn";f.nid=S[1].toLowerCase(),f.nss=S[2];const I=`${E}:${v.nid||f.nid}`,O=$[I];f.path=void 0,O&&(f=O.parse(f,v))}else f.error=f.error||"URN can not be parsed.";return f}function c(f,v){const S=v.scheme||f.scheme||"urn",E=f.nid.toLowerCase(),I=`${S}:${v.nid||E}`,O=$[I];O&&(f=O.serialize(f,v));const j=f,L=f.nss;return j.path=`${E||v.nid}:${L}`,v.skipEscape=!0,j}function d(f,v){const S=f;return S.uuid=S.nss,S.nss=void 0,!v.tolerant&&(!S.uuid||!e.test(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function u(f){const v=f;return v.nss=(f.uuid||"").toLowerCase(),v}const h={scheme:"http",domainHost:!0,parse:i,serialize:n},y={scheme:"https",domainHost:h.domainHost,parse:i,serialize:n},_={scheme:"ws",domainHost:!0,parse:o,serialize:s},b={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},$={http:h,https:y,ws:_,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:u,skipNormalize:!0}};return fo=$,fo}var ju;function lb(){if(ju)return Tn.exports;ju=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:n}=ub(),o=cb();function s(m,$){return typeof m=="string"?m=u(b(m,$),$):typeof m=="object"&&(m=b(u(m,$),$)),m}function a(m,$,f){const v=Object.assign({scheme:"null"},f),S=c(b(m,v),b($,v),v,!0);return u(S,{...v,skipEscape:!0})}function c(m,$,f,v){const S={};return v||(m=b(u(m,f),f),$=b(u($,f),f)),f=f||{},!f.tolerant&&$.scheme?(S.scheme=$.scheme,S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.userinfo!==void 0||$.host!==void 0||$.port!==void 0?(S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.path?($.path.charAt(0)==="/"?S.path=r($.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?S.path="/"+$.path:m.path?S.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+$.path:S.path=$.path,S.path=r(S.path)),S.query=$.query):(S.path=m.path,$.query!==void 0?S.query=$.query:S.query=m.query),S.userinfo=m.userinfo,S.host=m.host,S.port=m.port),S.scheme=m.scheme),S.fragment=$.fragment,S}function d(m,$,f){return typeof m=="string"?(m=unescape(m),m=u(n(b(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=u(n(m,!0),{...f,skipEscape:!0})),typeof $=="string"?($=unescape($),$=u(n(b($,f),!0),{...f,skipEscape:!0})):typeof $=="object"&&($=u(n($,!0),{...f,skipEscape:!0})),m.toLowerCase()===$.toLowerCase()}function u(m,$){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},v=Object.assign({},$),S=[],E=o[(v.scheme||f.scheme||"").toLowerCase()];E&&E.serialize&&E.serialize(f,v),f.path!==void 0&&(v.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),v.reference!=="suffix"&&f.scheme&&S.push(f.scheme,":");const I=i(f);if(I!==void 0&&(v.reference!=="suffix"&&S.push("//"),S.push(I),f.path&&f.path.charAt(0)!=="/"&&S.push("/")),f.path!==void 0){let O=f.path;!v.absolutePath&&(!E||!E.absolutePath)&&(O=r(O)),I===void 0&&(O=O.replace(/^\/\//u,"/%2F")),S.push(O)}return f.query!==void 0&&S.push("?",f.query),f.fragment!==void 0&&S.push("#",f.fragment),S.join("")}const h=Array.from({length:127},(m,$)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode($)));function y(m){let $=0;for(let f=0,v=m.length;f<v;++f)if($=m.charCodeAt(f),$>126||h[$])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(m,$){const f=Object.assign({},$),v={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},S=m.indexOf("%")!==-1;let E=!1;f.reference==="suffix"&&(m=(f.scheme?f.scheme+":":"")+"//"+m);const I=m.match(_);if(I){if(v.scheme=I[1],v.userinfo=I[3],v.host=I[4],v.port=parseInt(I[5],10),v.path=I[6]||"",v.query=I[7],v.fragment=I[8],isNaN(v.port)&&(v.port=I[5]),v.host){const j=t(v.host);if(j.isIPV4===!1){const L=e(j.host);v.host=L.host.toLowerCase(),E=L.isIPV6}else v.host=j.host,E=!0}v.scheme===void 0&&v.userinfo===void 0&&v.host===void 0&&v.port===void 0&&v.query===void 0&&!v.path?v.reference="same-document":v.scheme===void 0?v.reference="relative":v.fragment===void 0?v.reference="absolute":v.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==v.reference&&(v.error=v.error||"URI is not a "+f.reference+" reference.");const O=o[(f.scheme||v.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!O||!O.unicodeSupport)&&v.host&&(f.domainHost||O&&O.domainHost)&&E===!1&&y(v.host))try{v.host=URL.domainToASCII(v.host.toLowerCase())}catch(j){v.error=v.error||"Host's domain name can not be converted to ASCII: "+j}(!O||O&&!O.skipNormalize)&&(S&&v.scheme!==void 0&&(v.scheme=unescape(v.scheme)),S&&v.host!==void 0&&(v.host=unescape(v.host)),v.path&&(v.path=escape(unescape(v.path))),v.fragment&&(v.fragment=encodeURI(decodeURIComponent(v.fragment)))),O&&O.parse&&O.parse(v,f)}else v.error=v.error||"URI can not be parsed.";return v}const g={SCHEMES:o,normalize:s,resolve:a,resolveComponents:c,equal:d,serialize:u,parse:b};return Tn.exports=g,Tn.exports.default=g,Tn.exports.fastUri=g,Tn.exports}var Au;function fb(){if(Au)return yr;Au=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=lb();return e.code='require("ajv/dist/runtime/uri").default',yr.default=e,yr}var zu;function db(){return zu||(zu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Vi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=Na(),n=Ki(),o=Up(),s=Oa(),a=ye(),c=qi(),d=pi(),u=_e(),h=sb,y=fb(),_=(K,T)=>new RegExp(K,T);_.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={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."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function v(K){var T,F,P,w,x,B,ee,te,me,se,A,U,M,J,ne,ae,we,Fe,Ve,Le,Ce,At,Je,zt,Qe;const _t=K.strict,jn=(T=K.code)===null||T===void 0?void 0:T.optimize,ct=jn===!0||jn===void 0?1:jn||0,ir=(P=(F=K.code)===null||F===void 0?void 0:F.regExp)!==null&&P!==void 0?P:_,k=(w=K.uriResolver)!==null&&w!==void 0?w:y.default;return{strictSchema:(B=(x=K.strictSchema)!==null&&x!==void 0?x:_t)!==null&&B!==void 0?B:!0,strictNumbers:(te=(ee=K.strictNumbers)!==null&&ee!==void 0?ee:_t)!==null&&te!==void 0?te:!0,strictTypes:(se=(me=K.strictTypes)!==null&&me!==void 0?me:_t)!==null&&se!==void 0?se:"log",strictTuples:(U=(A=K.strictTuples)!==null&&A!==void 0?A:_t)!==null&&U!==void 0?U:"log",strictRequired:(J=(M=K.strictRequired)!==null&&M!==void 0?M:_t)!==null&&J!==void 0?J:!1,code:K.code?{...K.code,optimize:ct,regExp:ir}:{optimize:ct,regExp:ir},loopRequired:(ne=K.loopRequired)!==null&&ne!==void 0?ne:f,loopEnum:(ae=K.loopEnum)!==null&&ae!==void 0?ae:f,meta:(we=K.meta)!==null&&we!==void 0?we:!0,messages:(Fe=K.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ve=K.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Le=K.schemaId)!==null&&Le!==void 0?Le:"$id",addUsedSchema:(Ce=K.addUsedSchema)!==null&&Ce!==void 0?Ce:!0,validateSchema:(At=K.validateSchema)!==null&&At!==void 0?At:!0,validateFormats:(Je=K.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(zt=K.unicodeRegExp)!==null&&zt!==void 0?zt:!0,int32range:(Qe=K.int32range)!==null&&Qe!==void 0?Qe:!0,uriResolver:k}}class S{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...v(T)};const{es5:F,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:F,lines:P}),this.logger=Q(T.logger);const w=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),E.call(this,m,T,"NOT SUPPORTED"),E.call(this,$,T,"DEPRECATED","warn"),this._metaOpts=G.call(this),T.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&L.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),O.call(this),T.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:F,schemaId:P}=this.opts;let w=h;P==="id"&&(w={...h},w.id=w.$id,delete w.$id),F&&T&&this.addMetaSchema(w,w[P],!1)}defaultMeta(){const{meta:T,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[F]||T:void 0}validate(T,F){let P;if(typeof T=="string"){if(P=this.getSchema(T),!P)throw new Error(`no schema with key or ref "${T}"`)}else P=this.compile(T);const w=P(F);return"$async"in P||(this.errors=P.errors),w}compile(T,F){const P=this._addSchema(T,F);return P.validate||this._compileSchemaEnv(P)}compileAsync(T,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return w.call(this,T,F);async function w(se,A){await x.call(this,se.$schema);const U=this._addSchema(se,A);return U.validate||B.call(this,U)}async function x(se){se&&!this.getSchema(se)&&await w.call(this,{$ref:se},!0)}async function B(se){try{return this._compileSchemaEnv(se)}catch(A){if(!(A instanceof n.default))throw A;return ee.call(this,A),await te.call(this,A.missingSchema),B.call(this,se)}}function ee({missingSchema:se,missingRef:A}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${A} cannot be resolved`)}async function te(se){const A=await me.call(this,se);this.refs[se]||await x.call(this,A.$schema),this.refs[se]||this.addSchema(A,se,F)}async function me(se){const A=this._loading[se];if(A)return A;try{return await(this._loading[se]=P(se))}finally{delete this._loading[se]}}}addSchema(T,F,P,w=this.opts.validateSchema){if(Array.isArray(T)){for(const B of T)this.addSchema(B,void 0,P,w);return this}let x;if(typeof T=="object"){const{schemaId:B}=this.opts;if(x=T[B],x!==void 0&&typeof x!="string")throw new Error(`schema ${B} must be string`)}return F=(0,c.normalizeId)(F||x),this._checkUnique(F),this.schemas[F]=this._addSchema(T,P,F,w,!0),this}addMetaSchema(T,F,P=this.opts.validateSchema){return this.addSchema(T,F,!0,P),this}validateSchema(T,F){if(typeof T=="boolean")return!0;let P;if(P=T.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(P,T);if(!w&&F){const x="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(x);else throw new Error(x)}return w}getSchema(T){let F;for(;typeof(F=I.call(this,T))=="string";)T=F;if(F===void 0){const{schemaId:P}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:P});if(F=s.resolveSchema.call(this,w,T),!F)return;this.refs[T]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=I.call(this,T);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const F=T;this._cache.delete(F);let P=T[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const F of T)this.addKeyword(F);return this}addKeyword(T,F){let P;if(typeof T=="string")P=T,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=P);else if(typeof T=="object"&&F===void 0){if(F=T,P=F.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(pe.call(this,P,F),!F)return(0,u.eachItem)(P,x=>R.call(this,x)),this;ie.call(this,F);const w={...F,type:(0,d.getJSONTypes)(F.type),schemaType:(0,d.getJSONTypes)(F.schemaType)};return(0,u.eachItem)(P,w.type.length===0?x=>R.call(this,x,w):x=>w.type.forEach(B=>R.call(this,x,w,B))),this}getKeyword(T){const F=this.RULES.all[T];return typeof F=="object"?F.definition:!!F}removeKeyword(T){const{RULES:F}=this;delete F.keywords[T],delete F.all[T];for(const P of F.rules){const w=P.rules.findIndex(x=>x.keyword===T);w>=0&&P.rules.splice(w,1)}return this}addFormat(T,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[T]=F,this}errorsText(T=this.errors,{separator:F=", ",dataVar:P="data"}={}){return!T||T.length===0?"No errors":T.map(w=>`${P}${w.instancePath} ${w.message}`).reduce((w,x)=>w+F+x)}$dataMetaSchema(T,F){const P=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const w of F){const x=w.split("/").slice(1);let B=T;for(const ee of x)B=B[ee];for(const ee in P){const te=P[ee];if(typeof te!="object")continue;const{$data:me}=te.definition,se=B[ee];me&&se&&(B[ee]=ce(se))}}return T}_removeAllSchemas(T,F){for(const P in T){const w=T[P];(!F||F.test(P))&&(typeof w=="string"?delete T[P]:w&&!w.meta&&(this._cache.delete(w.schema),delete T[P]))}}_addSchema(T,F,P,w=this.opts.validateSchema,x=this.opts.addUsedSchema){let B;const{schemaId:ee}=this.opts;if(typeof T=="object")B=T[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let te=this._cache.get(T);if(te!==void 0)return te;P=(0,c.normalizeId)(B||P);const me=c.getSchemaRefs.call(this,T,P);return te=new s.SchemaEnv({schema:T,schemaId:ee,meta:F,baseId:P,localRefs:me}),this._cache.set(te.schema,te),x&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=te),w&&this.validateSchema(T,!0),te}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):s.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,T)}finally{this.opts=F}}}S.ValidationError=i.default,S.MissingRefError=n.default,e.default=S;function E(K,T,F,P="error"){for(const w in K){const x=w;x in T&&this.logger[P](`${F}: option ${w}. ${K[x]}`)}}function I(K){return K=(0,c.normalizeId)(K),this.schemas[K]||this.refs[K]}function O(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const T in K)this.addSchema(K[T],T)}function j(){for(const K in this.opts.formats){const T=this.opts.formats[K];T&&this.addFormat(K,T)}}function L(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in K){const F=K[T];F.keyword||(F.keyword=T),this.addKeyword(F)}}function G(){const K={...this.opts};for(const T of b)delete K[T];return K}const Y={log(){},warn(){},error(){}};function Q(K){if(K===!1)return Y;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const oe=/^[a-z_$][a-z0-9_$:-]*$/i;function pe(K,T){const{RULES:F}=this;if((0,u.eachItem)(K,P=>{if(F.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!oe.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function R(K,T,F){var P;const w=T?.post;if(F&&w)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:x}=this;let B=w?x.post:x.rules.find(({type:te})=>te===F);if(B||(B={type:F,rules:[]},x.rules.push(B)),x.keywords[K]=!0,!T)return;const ee={keyword:K,definition:{...T,type:(0,d.getJSONTypes)(T.type),schemaType:(0,d.getJSONTypes)(T.schemaType)}};T.before?X.call(this,B,ee,T.before):B.rules.push(ee),x.all[K]=ee,(P=T.implements)===null||P===void 0||P.forEach(te=>this.addKeyword(te))}function X(K,T,F){const P=K.rules.findIndex(w=>w.keyword===F);P>=0?K.rules.splice(P,0,T):(K.rules.push(T),this.logger.warn(`rule ${F} is not defined`))}function ie(K){let{metaSchema:T}=K;T!==void 0&&(K.$data&&this.opts.$data&&(T=ce(T)),K.validateSchema=this.compile(T,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(K){return{anyOf:[K,re]}}}(no)),no}var vr={},$r={},br={},Tu;function hb(){if(Tu)return br;Tu=1,Object.defineProperty(br,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return br.default=e,br}var Tt={},Pu;function pb(){if(Pu)return Tt;Pu=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.callRef=Tt.getValidate=void 0;const e=Ki(),t=gt(),r=ye(),i=Rt(),n=Oa(),o=_e(),s={keyword:"$ref",schemaType:"string",code(d){const{gen:u,schema:h,it:y}=d,{baseId:_,schemaEnv:b,validateName:g,opts:m,self:$}=y,{root:f}=b;if((h==="#"||h==="#/")&&_===f.baseId)return S();const v=n.resolveRef.call($,f,_,h);if(v===void 0)throw new e.default(y.opts.uriResolver,_,h);if(v instanceof n.SchemaEnv)return E(v);return I(v);function S(){if(b===f)return c(d,g,b,b.$async);const O=u.scopeValue("root",{ref:f});return c(d,(0,r._)`${O}.validate`,f,f.$async)}function E(O){const j=a(d,O);c(d,j,O,O.$async)}function I(O){const j=u.scopeValue("schema",m.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),L=u.name("valid"),G=d.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},L);d.mergeEvaluated(G),d.ok(L)}}};function a(d,u){const{gen:h}=d;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}Tt.getValidate=a;function c(d,u,h,y){const{gen:_,it:b}=d,{allErrors:g,schemaEnv:m,opts:$}=b,f=$.passContext?i.default.this:r.nil;y?v():S();function v(){if(!m.$async)throw new Error("async schema referenced by sync schema");const O=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(d,u,f)}`),I(u),g||_.assign(O,!0)},j=>{_.if((0,r._)`!(${j} instanceof ${b.ValidationError})`,()=>_.throw(j)),E(j),g||_.assign(O,!1)}),d.ok(O)}function S(){d.result((0,t.callValidateCode)(d,u,f),()=>I(u),()=>E(u))}function E(O){const j=(0,r._)`${O}.errors`;_.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${j} : ${i.default.vErrors}.concat(${j})`),_.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function I(O){var j;if(!b.opts.unevaluated)return;const L=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if(b.props!==!0)if(L&&!L.dynamicProps)L.props!==void 0&&(b.props=o.mergeEvaluated.props(_,L.props,b.props));else{const G=_.var("props",(0,r._)`${O}.evaluated.props`);b.props=o.mergeEvaluated.props(_,G,b.props,r.Name)}if(b.items!==!0)if(L&&!L.dynamicItems)L.items!==void 0&&(b.items=o.mergeEvaluated.items(_,L.items,b.items));else{const G=_.var("items",(0,r._)`${O}.evaluated.items`);b.items=o.mergeEvaluated.items(_,G,b.items,r.Name)}}}return Tt.callRef=c,Tt.default=s,Tt}var Du;function mb(){if(Du)return $r;Du=1,Object.defineProperty($r,"__esModule",{value:!0});const e=hb(),t=pb(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return $r.default=r,$r}var _r={},wr={},Uu;function gb(){if(Uu)return wr;Uu=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ye(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:o,schemaCode:s})=>(0,e.str)`must be ${r[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${s}}`},n={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(o){const{keyword:s,data:a,schemaCode:c}=o;o.fail$data((0,e._)`${a} ${r[s].fail} ${c} || isNaN(${a})`)}};return wr.default=n,wr}var kr={},Cu;function yb(){if(Cu)return kr;Cu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ye(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:n,data:o,schemaCode:s,it:a}=i,c=a.opts.multipleOfPrecision,d=n.let("res"),u=c?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${c}`:(0,e._)`${d} !== parseInt(${d})`;i.fail$data((0,e._)`(${s} === 0 || (${d} = ${o}/${s}, ${u}))`)}};return kr.default=r,kr}var Sr={},Ir={},Bu;function vb(){if(Bu)return Ir;Bu=1,Object.defineProperty(Ir,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,n=0,o;for(;n<r;)i++,o=t.charCodeAt(n++),o>=55296&&o<=56319&&n<r&&(o=t.charCodeAt(n),(o&64512)===56320&&n++);return i}return Ir.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ir}var Ru;function $b(){if(Ru)return Sr;Ru=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ye(),t=_e(),r=vb(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:s}){const a=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:s,data:a,schemaCode:c,it:d}=o,u=s==="maxLength"?e.operators.GT:e.operators.LT,h=d.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${h} ${u} ${c}`)}};return Sr.default=n,Sr}var Er={},Fu;function bb(){if(Fu)return Er;Fu=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=gt(),t=ye(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,t._)`{pattern: ${n}}`},code(n){const{data:o,$data:s,schema:a,schemaCode:c,it:d}=n,u=d.opts.unicodeRegExp?"u":"",h=s?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(n,a);n.fail$data((0,t._)`!${h}.test(${o})`)}};return Er.default=i,Er}var Nr={},Lu;function _b(){if(Lu)return Nr;Lu=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=ye(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${o}).length ${a} ${s}`)}};return Nr.default=r,Nr}var Or={},Zu;function wb(){if(Zu)return Or;Zu=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:s,schema:a,schemaCode:c,data:d,$data:u,it:h}=o,{opts:y}=h;if(!u&&a.length===0)return;const _=a.length>=y.loopRequired;if(h.allErrors?b():g(),y.strictRequired){const f=o.parentSchema.properties,{definedProperties:v}=o.it;for(const S of a)if(f?.[S]===void 0&&!v.has(S)){const E=h.schemaEnv.baseId+h.errSchemaPath,I=`required property "${S}" is not defined at "${E}" (strictRequired)`;(0,r.checkStrictMode)(h,I,h.opts.strictRequired)}}function b(){if(_||u)o.block$data(t.nil,m);else for(const f of a)(0,e.checkReportMissingProp)(o,f)}function g(){const f=s.let("missing");if(_||u){const v=s.let("valid",!0);o.block$data(v,()=>$(f,v)),o.ok(v)}else s.if((0,e.checkMissingProp)(o,a,f)),(0,e.reportMissingProp)(o,f),s.else()}function m(){s.forOf("prop",c,f=>{o.setParams({missingProperty:f}),s.if((0,e.noPropertyInData)(s,d,f,y.ownProperties),()=>o.error())})}function $(f,v){o.setParams({missingProperty:f}),s.forOf(f,c,()=>{s.assign(v,(0,e.propertyInData)(s,d,f,y.ownProperties)),s.if((0,t.not)(v),()=>{o.error(),s.break()})},t.nil)}}};return Or.default=n,Or}var xr={},Mu;function kb(){if(Mu)return xr;Mu=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ye(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${o}.length ${a} ${s}`)}};return xr.default=r,xr}var jr={},Ar={},qu;function xa(){if(qu)return Ar;qu=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Bp();return e.code='require("ajv/dist/runtime/equal").default',Ar.default=e,Ar}var Vu;function Sb(){if(Vu)return jr;Vu=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=pi(),t=ye(),r=_e(),i=xa(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0,t._)`{i: ${s}, j: ${a}}`},code(s){const{gen:a,data:c,$data:d,schema:u,parentSchema:h,schemaCode:y,it:_}=s;if(!d&&!u)return;const b=a.let("valid"),g=h.items?(0,e.getSchemaTypes)(h.items):[];s.block$data(b,m,(0,t._)`${y} === false`),s.ok(b);function m(){const S=a.let("i",(0,t._)`${c}.length`),E=a.let("j");s.setParams({i:S,j:E}),a.assign(b,!0),a.if((0,t._)`${S} > 1`,()=>($()?f:v)(S,E))}function $(){return g.length>0&&!g.some(S=>S==="object"||S==="array")}function f(S,E){const I=a.name("item"),O=(0,e.checkDataTypes)(g,I,_.opts.strictNumbers,e.DataType.Wrong),j=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${S}--;`,()=>{a.let(I,(0,t._)`${c}[${S}]`),a.if(O,(0,t._)`continue`),g.length>1&&a.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),a.if((0,t._)`typeof ${j}[${I}] == "number"`,()=>{a.assign(E,(0,t._)`${j}[${I}]`),s.error(),a.assign(b,!1).break()}).code((0,t._)`${j}[${I}] = ${S}`)})}function v(S,E){const I=(0,r.useFunc)(a,i.default),O=a.name("outer");a.label(O).for((0,t._)`;${S}--;`,()=>a.for((0,t._)`${E} = ${S}; ${E}--;`,()=>a.if((0,t._)`${I}(${c}[${S}], ${c}[${E}])`,()=>{s.error(),a.assign(b,!1).break(O)})))}}};return jr.default=o,jr}var zr={},Ku;function Ib(){if(Ku)return zr;Ku=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:s,data:a,$data:c,schemaCode:d,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${d})`):o.fail((0,e._)`${u} !== ${a}`)}};return zr.default=n,zr}var Tr={},Ju;function Eb(){if(Ju)return Tr;Ju=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:s,data:a,$data:c,schema:d,schemaCode:u,it:h}=o;if(!c&&d.length===0)throw new Error("enum must have non-empty array");const y=d.length>=h.opts.loopEnum;let _;const b=()=>_??(_=(0,t.useFunc)(s,r.default));let g;if(y||c)g=s.let("valid"),o.block$data(g,m);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const f=s.const("vSchema",u);g=(0,e.or)(...d.map((v,S)=>$(f,S)))}o.pass(g);function m(){s.assign(g,!1),s.forOf("v",u,f=>s.if((0,e._)`${b()}(${a}, ${f})`,()=>s.assign(g,!0).break()))}function $(f,v){const S=d[v];return typeof S=="object"&&S!==null?(0,e._)`${b()}(${a}, ${f}[${v}])`:(0,e._)`${a} === ${S}`}}};return Tr.default=n,Tr}var Gu;function Nb(){if(Gu)return _r;Gu=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=gb(),t=yb(),r=$b(),i=bb(),n=_b(),o=wb(),s=kb(),a=Sb(),c=Ib(),d=Eb(),u=[e.default,t.default,r.default,i.default,n.default,o.default,s.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,d.default];return _r.default=u,_r}var Pr={},on={},Wu;function Rp(){if(Wu)return on;Wu=1,Object.defineProperty(on,"__esModule",{value:!0}),on.validateAdditionalItems=void 0;const e=ye(),t=_e(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:s,it:a}=o,{items:c}=s;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,s){const{gen:a,schema:c,data:d,keyword:u,it:h}=o;h.items=!0;const y=a.const("len",(0,e._)`${d}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,e._)`${y} <= ${s.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const b=a.var("valid",(0,e._)`${y} <= ${s.length}`);a.if((0,e.not)(b),()=>_(b)),o.ok(b)}function _(b){a.forRange("i",s.length,y,g=>{o.subschema({keyword:u,dataProp:g,dataPropType:t.Type.Num},b),h.allErrors||a.if((0,e.not)(b),()=>a.break())})}}return on.validateAdditionalItems=n,on.default=i,on}var Dr={},sn={},Hu;function Fp(){if(Hu)return sn;Hu=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.validateTuple=void 0;const e=ye(),t=_e(),r=gt(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:s,it:a}=o;if(Array.isArray(s))return n(o,"additionalItems",s);a.items=!0,!(0,t.alwaysValidSchema)(a,s)&&o.ok((0,r.validateArray)(o))}};function n(o,s,a=o.schema){const{gen:c,parentSchema:d,data:u,keyword:h,it:y}=o;g(d),y.opts.unevaluated&&a.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(c,a.length,y.items));const _=c.name("valid"),b=c.const("len",(0,e._)`${u}.length`);a.forEach((m,$)=>{(0,t.alwaysValidSchema)(y,m)||(c.if((0,e._)`${b} > ${$}`,()=>o.subschema({keyword:h,schemaProp:$,dataProp:$},_)),o.ok(_))});function g(m){const{opts:$,errSchemaPath:f}=y,v=a.length,S=v===m.minItems&&(v===m.maxItems||m[s]===!1);if($.strictTuples&&!S){const E=`"${h}" is ${v}-tuple, but minItems or maxItems/${s} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,E,$.strictTuples)}}}return sn.validateTuple=n,sn.default=i,sn}var Xu;function Ob(){if(Xu)return Dr;Xu=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=Fp(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Dr.default=t,Dr}var Ur={},Yu;function xb(){if(Yu)return Ur;Yu=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=ye(),t=_e(),r=gt(),i=Rp(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{schema:a,parentSchema:c,it:d}=s,{prefixItems:u}=c;d.items=!0,!(0,t.alwaysValidSchema)(d,a)&&(u?(0,i.validateAdditionalItems)(s,u):s.ok((0,r.validateArray)(s)))}};return Ur.default=o,Ur}var Cr={},Qu;function jb(){if(Qu)return Cr;Qu=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:o}})=>o===void 0?(0,e.str)`must contain at least ${n} valid item(s)`:(0,e.str)`must contain at least ${n} and no more than ${o} valid item(s)`,params:({params:{min:n,max:o}})=>o===void 0?(0,e._)`{minContains: ${n}}`:(0,e._)`{minContains: ${n}, maxContains: ${o}}`},code(n){const{gen:o,schema:s,parentSchema:a,data:c,it:d}=n;let u,h;const{minContains:y,maxContains:_}=a;d.opts.next?(u=y===void 0?1:y,h=_):u=1;const b=o.const("len",(0,e._)`${c}.length`);if(n.setParams({min:u,max:h}),h===void 0&&u===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(d,s)){let v=(0,e._)`${b} >= ${u}`;h!==void 0&&(v=(0,e._)`${v} && ${b} <= ${h}`),n.pass(v);return}d.items=!0;const g=o.name("valid");h===void 0&&u===1?$(g,()=>o.if(g,()=>o.break())):u===0?(o.let(g,!0),h!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(g,!1),m()),n.result(g,()=>n.reset());function m(){const v=o.name("_valid"),S=o.let("count",0);$(v,()=>o.if(v,()=>f(S)))}function $(v,S){o.forRange("i",0,b,E=>{n.subschema({keyword:"contains",dataProp:E,dataPropType:t.Type.Num,compositeRule:!0},v),S()})}function f(v){o.code((0,e._)`${v}++`),h===void 0?o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0).break()):(o.if((0,e._)`${v} > ${h}`,()=>o.assign(g,!1).break()),u===1?o.assign(g,!0):o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0)))}}};return Cr.default=i,Cr}var ho={},ec;function Ab(){return ec||(ec=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=_e(),i=gt();e.error={message:({params:{property:c,depsCount:d,deps:u}})=>{const h=d===1?"property":"properties";return(0,t.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:u,missingProperty:h}})=>(0,t._)`{property: ${c},
|
|
168
|
+
|| ${j} === "boolean" || ${I} === null`).assign(L,(0,i._)`[${I}]`)}}}function y({gen:f,parentData:v,parentDataProperty:S},E){f.if((0,i._)`${v} !== undefined`,()=>f.assign((0,i._)`${v}[${S}]`,E))}function _(f,v,S,E=o.Correct){const I=E===o.Correct?i.operators.EQ:i.operators.NEQ;let O;switch(f){case"null":return(0,i._)`${v} ${I} null`;case"array":O=(0,i._)`Array.isArray(${v})`;break;case"object":O=(0,i._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":O=j((0,i._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":O=j();break;default:return(0,i._)`typeof ${v} ${I} ${f}`}return E===o.Correct?O:(0,i.not)(O);function j(L=i.nil){return(0,i.and)((0,i._)`typeof ${v} == "number"`,L,S?(0,i._)`isFinite(${v})`:i.nil)}}Me.checkDataType=_;function b(f,v,S,E){if(f.length===1)return _(f[0],v,S,E);let I;const O=(0,n.toHash)(f);if(O.array&&O.object){const j=(0,i._)`typeof ${v} != "object"`;I=O.null?j:(0,i._)`!${v} || ${j}`,delete O.null,delete O.array,delete O.object}else I=i.nil;O.number&&delete O.integer;for(const j in O)I=(0,i.and)(I,_(j,v,S,E));return I}Me.checkDataTypes=b;const g={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:v})=>typeof f=="string"?(0,i._)`{type: ${f}}`:(0,i._)`{type: ${v}}`};function m(f){const v=$(f);(0,r.reportError)(v,g)}Me.reportTypeError=m;function $(f){const{gen:v,data:S,schema:E}=f,I=(0,n.schemaRefOrVal)(f,E,"type");return{gen:v,keyword:"type",data:S,schema:E.type,schemaCode:I,schemaValue:I,parentSchema:E,params:{},it:f}}return Me}var zn={},gu;function X$(){if(gu)return zn;gu=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.assignDefaults=void 0;const e=ye(),t=_e();function r(n,o){const{properties:s,items:a}=n.schema;if(o==="object"&&s)for(const c in s)i(n,c,s[c].default);else o==="array"&&Array.isArray(a)&&a.forEach((c,d)=>i(n,d,c.default))}zn.assignDefaults=r;function i(n,o,s){const{gen:a,compositeRule:c,data:d,opts:u}=n;if(s===void 0)return;const h=(0,e._)`${d}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${h}`);return}let y=(0,e._)`${h} === undefined`;u.useDefaults==="empty"&&(y=(0,e._)`${y} || ${h} === null || ${h} === ""`),a.if(y,(0,e._)`${h} = ${(0,e.stringify)(s)}`)}return zn}var ft={},ke={},yu;function gt(){if(yu)return ke;yu=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.validateUnion=ke.validateArray=ke.usePattern=ke.callValidateCode=ke.schemaProperties=ke.allSchemaProperties=ke.noPropertyInData=ke.propertyInData=ke.isOwnProperty=ke.hasPropFunc=ke.reportMissingProp=ke.checkMissingProp=ke.checkReportMissingProp=void 0;const e=ye(),t=_e(),r=Rt(),i=_e();function n(f,v){const{gen:S,data:E,it:I}=f;S.if(u(S,E,v,I.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${v}`},!0),f.error()})}ke.checkReportMissingProp=n;function o({gen:f,data:v,it:{opts:S}},E,I){return(0,e.or)(...E.map(O=>(0,e.and)(u(f,v,O,S.ownProperties),(0,e._)`${I} = ${O}`)))}ke.checkMissingProp=o;function s(f,v){f.setParams({missingProperty:v},!0),f.error()}ke.reportMissingProp=s;function a(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}ke.hasPropFunc=a;function c(f,v,S){return(0,e._)`${a(f)}.call(${v}, ${S})`}ke.isOwnProperty=c;function d(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} !== undefined`;return E?(0,e._)`${I} && ${c(f,v,S)}`:I}ke.propertyInData=d;function u(f,v,S,E){const I=(0,e._)`${v}${(0,e.getProperty)(S)} === undefined`;return E?(0,e.or)(I,(0,e.not)(c(f,v,S))):I}ke.noPropertyInData=u;function h(f){return f?Object.keys(f).filter(v=>v!=="__proto__"):[]}ke.allSchemaProperties=h;function y(f,v){return h(v).filter(S=>!(0,t.alwaysValidSchema)(f,v[S]))}ke.schemaProperties=y;function _({schemaCode:f,data:v,it:{gen:S,topSchemaRef:E,schemaPath:I,errorPath:O},it:j},L,G,Y){const Q=Y?(0,e._)`${f}, ${v}, ${E}${I}`:v,oe=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[r.default.parentData,j.parentData],[r.default.parentDataProperty,j.parentDataProperty],[r.default.rootData,r.default.rootData]];j.opts.dynamicRef&&oe.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const pe=(0,e._)`${Q}, ${S.object(...oe)}`;return G!==e.nil?(0,e._)`${L}.call(${G}, ${pe})`:(0,e._)`${L}(${pe})`}ke.callValidateCode=_;const b=(0,e._)`new RegExp`;function g({gen:f,it:{opts:v}},S){const E=v.unicodeRegExp?"u":"",{regExp:I}=v.code,O=I(S,E);return f.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${I.code==="new RegExp"?b:(0,i.useFunc)(f,I)}(${S}, ${E})`})}ke.usePattern=g;function m(f){const{gen:v,data:S,keyword:E,it:I}=f,O=v.name("valid");if(I.allErrors){const L=v.let("valid",!0);return j(()=>v.assign(L,!1)),L}return v.var(O,!0),j(()=>v.break()),O;function j(L){const G=v.const("len",(0,e._)`${S}.length`);v.forRange("i",0,G,Y=>{f.subschema({keyword:E,dataProp:Y,dataPropType:t.Type.Num},O),v.if((0,e.not)(O),L)})}}ke.validateArray=m;function $(f){const{gen:v,schema:S,keyword:E,it:I}=f;if(!Array.isArray(S))throw new Error("ajv implementation error");if(S.some(G=>(0,t.alwaysValidSchema)(I,G))&&!I.opts.unevaluated)return;const j=v.let("valid",!1),L=v.name("_valid");v.block(()=>S.forEach((G,Y)=>{const Q=f.subschema({keyword:E,schemaProp:Y,compositeRule:!0},L);v.assign(j,(0,e._)`${j} || ${L}`),f.mergeValidEvaluated(Q,L)||v.if((0,e.not)(j))})),f.result(j,()=>f.reset(),()=>f.error(!0))}return ke.validateUnion=$,ke}var vu;function Y$(){if(vu)return ft;vu=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const e=ye(),t=Rt(),r=gt(),i=Mi();function n(y,_){const{gen:b,keyword:g,schema:m,parentSchema:$,it:f}=y,v=_.macro.call(f.self,m,$,f),S=d(b,g,v);f.opts.validateSchema!==!1&&f.self.validateSchema(v,!0);const E=b.name("valid");y.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${g}`,topSchemaRef:S,compositeRule:!0},E),y.pass(E,()=>y.error(!0))}ft.macroKeywordCode=n;function o(y,_){var b;const{gen:g,keyword:m,schema:$,parentSchema:f,$data:v,it:S}=y;c(S,_);const E=!v&&_.compile?_.compile.call(S.self,$,f,S):_.validate,I=d(g,m,E),O=g.let("valid");y.block$data(O,j),y.ok((b=_.valid)!==null&&b!==void 0?b:O);function j(){if(_.errors===!1)Y(),_.modifying&&s(y),Q(()=>y.error());else{const oe=_.async?L():G();_.modifying&&s(y),Q(()=>a(y,oe))}}function L(){const oe=g.let("ruleErrs",null);return g.try(()=>Y((0,e._)`await `),pe=>g.assign(O,!1).if((0,e._)`${pe} instanceof ${S.ValidationError}`,()=>g.assign(oe,(0,e._)`${pe}.errors`),()=>g.throw(pe))),oe}function G(){const oe=(0,e._)`${I}.errors`;return g.assign(oe,null),Y(e.nil),oe}function Y(oe=_.async?(0,e._)`await `:e.nil){const pe=S.opts.passContext?t.default.this:t.default.self,R=!("compile"in _&&!v||_.schema===!1);g.assign(O,(0,e._)`${oe}${(0,r.callValidateCode)(y,I,pe,R)}`,_.modifying)}function Q(oe){var pe;g.if((0,e.not)((pe=_.valid)!==null&&pe!==void 0?pe:O),oe)}}ft.funcKeywordCode=o;function s(y){const{gen:_,data:b,it:g}=y;_.if(g.parentData,()=>_.assign(b,(0,e._)`${g.parentData}[${g.parentDataProperty}]`))}function a(y,_){const{gen:b}=y;b.if((0,e._)`Array.isArray(${_})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${_} : ${t.default.vErrors}.concat(${_})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,i.extendErrors)(y)},()=>y.error())}function c({schemaEnv:y},_){if(_.async&&!y.$async)throw new Error("async keyword in sync schema")}function d(y,_,b){if(b===void 0)throw new Error(`keyword "${_}" failed to compile`);return y.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function u(y,_,b=!1){return!_.length||_.some(g=>g==="array"?Array.isArray(y):g==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==g||b&&typeof y>"u")}ft.validSchemaType=u;function h({schema:y,opts:_,self:b,errSchemaPath:g},m,$){if(Array.isArray(m.keyword)?!m.keyword.includes($):m.keyword!==$)throw new Error("ajv implementation error");const f=m.dependencies;if(f?.some(v=>!Object.prototype.hasOwnProperty.call(y,v)))throw new Error(`parent schema must have dependencies of ${$}: ${f.join(",")}`);if(m.validateSchema&&!m.validateSchema(y[$])){const S=`keyword "${$}" value is invalid at path "${g}": `+b.errorsText(m.validateSchema.errors);if(_.validateSchema==="log")b.logger.error(S);else throw new Error(S)}}return ft.validateKeywordUsage=h,ft}var St={},$u;function Q$(){if($u)return St;$u=1,Object.defineProperty(St,"__esModule",{value:!0}),St.extendSubschemaMode=St.extendSubschemaData=St.getSubschema=void 0;const e=ye(),t=_e();function r(o,{keyword:s,schemaProp:a,schema:c,schemaPath:d,errSchemaPath:u,topSchemaRef:h}){if(s!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const y=o.schema[s];return a===void 0?{schema:y,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}`,errSchemaPath:`${o.errSchemaPath}/${s}`}:{schema:y[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(s)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${s}/${(0,t.escapeFragment)(a)}`}}if(c!==void 0){if(d===void 0||u===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:d,topSchemaRef:h,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}St.getSubschema=r;function i(o,s,{dataProp:a,dataPropType:c,data:d,dataTypes:u,propertyName:h}){if(d!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:y}=s;if(a!==void 0){const{errorPath:b,dataPathArr:g,opts:m}=s,$=y.let("data",(0,e._)`${s.data}${(0,e.getProperty)(a)}`,!0);_($),o.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(a,c,m.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...g,o.parentDataProperty]}if(d!==void 0){const b=d instanceof e.Name?d:y.let("data",d,!0);_(b),h!==void 0&&(o.propertyName=h)}u&&(o.dataTypes=u);function _(b){o.data=b,o.dataLevel=s.dataLevel+1,o.dataTypes=[],s.definedProperties=new Set,o.parentData=s.data,o.dataNames=[...s.dataNames,b]}}St.extendSubschemaData=i;function n(o,{jtdDiscriminator:s,jtdMetadata:a,compositeRule:c,createErrors:d,allErrors:u}){c!==void 0&&(o.compositeRule=c),d!==void 0&&(o.createErrors=d),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=s,o.jtdMetadata=a}return St.extendSubschemaMode=n,St}var Ge={},ao,bu;function Bp(){return bu||(bu=1,ao=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var i,n,o;if(Array.isArray(t)){if(i=t.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),i=o.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[n]))return!1;for(n=i;n--!==0;){var s=o[n];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}),ao}var uo={exports:{}},_u;function eb(){if(_u)return uo.exports;_u=1;var e=uo.exports=function(i,n,o){typeof n=="function"&&(o=n,n={}),o=n.cb||o;var s=typeof o=="function"?o:o.pre||function(){},a=o.post||function(){};t(n,s,a,i,"",i)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(i,n,o,s,a,c,d,u,h,y){if(s&&typeof s=="object"&&!Array.isArray(s)){n(s,a,c,d,u,h,y);for(var _ in s){var b=s[_];if(Array.isArray(b)){if(_ in e.arrayKeywords)for(var g=0;g<b.length;g++)t(i,n,o,b[g],a+"/"+_+"/"+g,c,a,_,s,g)}else if(_ in e.propsKeywords){if(b&&typeof b=="object")for(var m in b)t(i,n,o,b[m],a+"/"+_+"/"+r(m),c,a,_,s,m)}else(_ in e.keywords||i.allKeys&&!(_ in e.skipKeywords))&&t(i,n,o,b,a+"/"+_,c,a,_,s)}o(s,a,c,d,u,h,y)}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}return uo.exports}var wu;function qi(){if(wu)return Ge;wu=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.getSchemaRefs=Ge.resolveUrl=Ge.normalizeId=Ge._getFullPath=Ge.getFullPath=Ge.inlineRef=void 0;const e=_e(),t=Bp(),r=eb(),i=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n(g,m=!0){return typeof g=="boolean"?!0:m===!0?!s(g):m?a(g)<=m:!1}Ge.inlineRef=n;const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(g){for(const m in g){if(o.has(m))return!0;const $=g[m];if(Array.isArray($)&&$.some(s)||typeof $=="object"&&s($))return!0}return!1}function a(g){let m=0;for(const $ in g){if($==="$ref")return 1/0;if(m++,!i.has($)&&(typeof g[$]=="object"&&(0,e.eachItem)(g[$],f=>m+=a(f)),m===1/0))return 1/0}return m}function c(g,m="",$){$!==!1&&(m=h(m));const f=g.parse(m);return d(g,f)}Ge.getFullPath=c;function d(g,m){return g.serialize(m).split("#")[0]+"#"}Ge._getFullPath=d;const u=/#\/?$/;function h(g){return g?g.replace(u,""):""}Ge.normalizeId=h;function y(g,m,$){return $=h($),g.resolve(m,$)}Ge.resolveUrl=y;const _=/^[a-z_][-a-z0-9._]*$/i;function b(g,m){if(typeof g=="boolean")return{};const{schemaId:$,uriResolver:f}=this.opts,v=h(g[$]||m),S={"":v},E=c(f,v,!1),I={},O=new Set;return r(g,{allKeys:!0},(G,Y,Q,oe)=>{if(oe===void 0)return;const pe=E+Y;let R=S[oe];typeof G[$]=="string"&&(R=X.call(this,G[$])),ie.call(this,G.$anchor),ie.call(this,G.$dynamicAnchor),S[Y]=R;function X(re){const ce=this.opts.uriResolver.resolve;if(re=h(R?ce(R,re):re),O.has(re))throw L(re);O.add(re);let K=this.refs[re];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?j(G,K.schema,re):re!==h(pe)&&(re[0]==="#"?(j(G,I[re],re),I[re]=G):this.refs[re]=pe),re}function ie(re){if(typeof re=="string"){if(!_.test(re))throw new Error(`invalid anchor "${re}"`);X.call(this,`#${re}`)}}}),I;function j(G,Y,Q){if(Y!==void 0&&!t(G,Y))throw L(Q)}function L(G){return new Error(`reference "${G}" resolves to more than one schema`)}}return Ge.getSchemaRefs=b,Ge}var ku;function Vi(){if(ku)return wt;ku=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.getData=wt.KeywordCxt=wt.validateFunctionCode=void 0;const e=H$(),t=pi(),r=Cp(),i=pi(),n=X$(),o=Y$(),s=Q$(),a=ye(),c=Rt(),d=qi(),u=_e(),h=Mi();function y(A){if(E(A)&&(O(A),S(A))){m(A);return}_(A,()=>(0,e.topBoolOrEmptySchema)(A))}wt.validateFunctionCode=y;function _({gen:A,validateName:U,schema:M,schemaEnv:J,opts:ne},ae){ne.code.es5?A.func(U,(0,a._)`${c.default.data}, ${c.default.valCxt}`,J.$async,()=>{A.code((0,a._)`"use strict"; ${f(M,ne)}`),g(A,ne),A.code(ae)}):A.func(U,(0,a._)`${c.default.data}, ${b(ne)}`,J.$async,()=>A.code(f(M,ne)).code(ae))}function b(A){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${A.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function g(A,U){A.if(c.default.valCxt,()=>{A.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),A.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),A.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),A.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{A.var(c.default.instancePath,(0,a._)`""`),A.var(c.default.parentData,(0,a._)`undefined`),A.var(c.default.parentDataProperty,(0,a._)`undefined`),A.var(c.default.rootData,c.default.data),U.dynamicRef&&A.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function m(A){const{schema:U,opts:M,gen:J}=A;_(A,()=>{M.$comment&&U.$comment&&oe(A),G(A),J.let(c.default.vErrors,null),J.let(c.default.errors,0),M.unevaluated&&$(A),j(A),pe(A)})}function $(A){const{gen:U,validateName:M}=A;A.evaluated=U.const("evaluated",(0,a._)`${M}.evaluated`),U.if((0,a._)`${A.evaluated}.dynamicProps`,()=>U.assign((0,a._)`${A.evaluated}.props`,(0,a._)`undefined`)),U.if((0,a._)`${A.evaluated}.dynamicItems`,()=>U.assign((0,a._)`${A.evaluated}.items`,(0,a._)`undefined`))}function f(A,U){const M=typeof A=="object"&&A[U.schemaId];return M&&(U.code.source||U.code.process)?(0,a._)`/*# sourceURL=${M} */`:a.nil}function v(A,U){if(E(A)&&(O(A),S(A))){I(A,U);return}(0,e.boolOrEmptySchema)(A,U)}function S({schema:A,self:U}){if(typeof A=="boolean")return!A;for(const M in A)if(U.RULES.all[M])return!0;return!1}function E(A){return typeof A.schema!="boolean"}function I(A,U){const{schema:M,gen:J,opts:ne}=A;ne.$comment&&M.$comment&&oe(A),Y(A),Q(A);const ae=J.const("_errs",c.default.errors);j(A,ae),J.var(U,(0,a._)`${ae} === ${c.default.errors}`)}function O(A){(0,u.checkUnknownRules)(A),L(A)}function j(A,U){if(A.opts.jtd)return X(A,[],!1,U);const M=(0,t.getSchemaTypes)(A.schema),J=(0,t.coerceAndCheckDataType)(A,M);X(A,M,!J,U)}function L(A){const{schema:U,errSchemaPath:M,opts:J,self:ne}=A;U.$ref&&J.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(U,ne.RULES)&&ne.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function G(A){const{schema:U,opts:M}=A;U.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,u.checkStrictMode)(A,"default is ignored in the schema root")}function Y(A){const U=A.schema[A.opts.schemaId];U&&(A.baseId=(0,d.resolveUrl)(A.opts.uriResolver,A.baseId,U))}function Q(A){if(A.schema.$async&&!A.schemaEnv.$async)throw new Error("async schema in sync schema")}function oe({gen:A,schemaEnv:U,schema:M,errSchemaPath:J,opts:ne}){const ae=M.$comment;if(ne.$comment===!0)A.code((0,a._)`${c.default.self}.logger.log(${ae})`);else if(typeof ne.$comment=="function"){const we=(0,a.str)`${J}/$comment`,Fe=A.scopeValue("root",{ref:U.root});A.code((0,a._)`${c.default.self}.opts.$comment(${ae}, ${we}, ${Fe}.schema)`)}}function pe(A){const{gen:U,schemaEnv:M,validateName:J,ValidationError:ne,opts:ae}=A;M.$async?U.if((0,a._)`${c.default.errors} === 0`,()=>U.return(c.default.data),()=>U.throw((0,a._)`new ${ne}(${c.default.vErrors})`)):(U.assign((0,a._)`${J}.errors`,c.default.vErrors),ae.unevaluated&&R(A),U.return((0,a._)`${c.default.errors} === 0`))}function R({gen:A,evaluated:U,props:M,items:J}){M instanceof a.Name&&A.assign((0,a._)`${U}.props`,M),J instanceof a.Name&&A.assign((0,a._)`${U}.items`,J)}function X(A,U,M,J){const{gen:ne,schema:ae,data:we,allErrors:Fe,opts:Ve,self:Le}=A,{RULES:Ce}=Le;if(ae.$ref&&(Ve.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(ae,Ce))){ne.block(()=>ee(A,"$ref",Ce.all.$ref.definition));return}Ve.jtd||re(A,U),ne.block(()=>{for(const Je of Ce.rules)At(Je);At(Ce.post)});function At(Je){(0,r.shouldUseGroup)(ae,Je)&&(Je.type?(ne.if((0,i.checkDataType)(Je.type,we,Ve.strictNumbers)),ie(A,Je),U.length===1&&U[0]===Je.type&&M&&(ne.else(),(0,i.reportTypeError)(A)),ne.endIf()):ie(A,Je),Fe||ne.if((0,a._)`${c.default.errors} === ${J||0}`))}}function ie(A,U){const{gen:M,schema:J,opts:{useDefaults:ne}}=A;ne&&(0,n.assignDefaults)(A,U.type),M.block(()=>{for(const ae of U.rules)(0,r.shouldUseRule)(J,ae)&&ee(A,ae.keyword,ae.definition,U.type)})}function re(A,U){A.schemaEnv.meta||!A.opts.strictTypes||(ce(A,U),A.opts.allowUnionTypes||K(A,U),T(A,A.dataTypes))}function ce(A,U){if(U.length){if(!A.dataTypes.length){A.dataTypes=U;return}U.forEach(M=>{P(A.dataTypes,M)||x(A,`type "${M}" not allowed by context "${A.dataTypes.join(",")}"`)}),w(A,U)}}function K(A,U){U.length>1&&!(U.length===2&&U.includes("null"))&&x(A,"use allowUnionTypes to allow union type keyword")}function T(A,U){const M=A.self.RULES.all;for(const J in M){const ne=M[J];if(typeof ne=="object"&&(0,r.shouldUseRule)(A.schema,ne)){const{type:ae}=ne.definition;ae.length&&!ae.some(we=>F(U,we))&&x(A,`missing type "${ae.join(",")}" for keyword "${J}"`)}}}function F(A,U){return A.includes(U)||U==="number"&&A.includes("integer")}function P(A,U){return A.includes(U)||U==="integer"&&A.includes("number")}function w(A,U){const M=[];for(const J of A.dataTypes)P(U,J)?M.push(J):U.includes("integer")&&J==="number"&&M.push("integer");A.dataTypes=M}function x(A,U){const M=A.schemaEnv.baseId+A.errSchemaPath;U+=` at "${M}" (strictTypes)`,(0,u.checkStrictMode)(A,U,A.opts.strictTypes)}class B{constructor(U,M,J){if((0,o.validateKeywordUsage)(U,M,J),this.gen=U.gen,this.allErrors=U.allErrors,this.keyword=J,this.data=U.data,this.schema=U.schema[J],this.$data=M.$data&&U.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(U,this.schema,J,this.$data),this.schemaType=M.schemaType,this.parentSchema=U.schema,this.params={},this.it=U,this.def=M,this.$data)this.schemaCode=U.gen.const("vSchema",se(this.$data,U));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${J} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=U.gen.const("_errs",c.default.errors))}result(U,M,J){this.failResult((0,a.not)(U),M,J)}failResult(U,M,J){this.gen.if(U),J?J():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(U,M){this.failResult((0,a.not)(U),void 0,M)}fail(U){if(U===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(U),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(U){if(!this.$data)return this.fail(U);const{schemaCode:M}=this;this.fail((0,a._)`${M} !== undefined && (${(0,a.or)(this.invalid$data(),U)})`)}error(U,M,J){if(M){this.setParams(M),this._error(U,J),this.setParams({});return}this._error(U,J)}_error(U,M){(U?h.reportExtraError:h.reportError)(this,this.def.error,M)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(U){this.allErrors||this.gen.if(U)}setParams(U,M){M?Object.assign(this.params,U):this.params=U}block$data(U,M,J=a.nil){this.gen.block(()=>{this.check$data(U,J),M()})}check$data(U=a.nil,M=a.nil){if(!this.$data)return;const{gen:J,schemaCode:ne,schemaType:ae,def:we}=this;J.if((0,a.or)((0,a._)`${ne} === undefined`,M)),U!==a.nil&&J.assign(U,!0),(ae.length||we.validateSchema)&&(J.elseIf(this.invalid$data()),this.$dataError(),U!==a.nil&&J.assign(U,!1)),J.else()}invalid$data(){const{gen:U,schemaCode:M,schemaType:J,def:ne,it:ae}=this;return(0,a.or)(we(),Fe());function we(){if(J.length){if(!(M instanceof a.Name))throw new Error("ajv implementation error");const Ve=Array.isArray(J)?J:[J];return(0,a._)`${(0,i.checkDataTypes)(Ve,M,ae.opts.strictNumbers,i.DataType.Wrong)}`}return a.nil}function Fe(){if(ne.validateSchema){const Ve=U.scopeValue("validate$data",{ref:ne.validateSchema});return(0,a._)`!${Ve}(${M})`}return a.nil}}subschema(U,M){const J=(0,s.getSubschema)(this.it,U);(0,s.extendSubschemaData)(J,this.it,U),(0,s.extendSubschemaMode)(J,U);const ne={...this.it,...J,items:void 0,props:void 0};return v(ne,M),ne}mergeEvaluated(U,M){const{it:J,gen:ne}=this;J.opts.unevaluated&&(J.props!==!0&&U.props!==void 0&&(J.props=u.mergeEvaluated.props(ne,U.props,J.props,M)),J.items!==!0&&U.items!==void 0&&(J.items=u.mergeEvaluated.items(ne,U.items,J.items,M)))}mergeValidEvaluated(U,M){const{it:J,gen:ne}=this;if(J.opts.unevaluated&&(J.props!==!0||J.items!==!0))return ne.if(M,()=>this.mergeEvaluated(U,a.Name)),!0}}wt.KeywordCxt=B;function ee(A,U,M,J){const ne=new B(A,M,U);"code"in M?M.code(ne,J):ne.$data&&M.validate?(0,o.funcKeywordCode)(ne,M):"macro"in M?(0,o.macroKeywordCode)(ne,M):(M.compile||M.validate)&&(0,o.funcKeywordCode)(ne,M)}const te=/^\/(?:[^~]|~0|~1)*$/,me=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(A,{dataLevel:U,dataNames:M,dataPathArr:J}){let ne,ae;if(A==="")return c.default.rootData;if(A[0]==="/"){if(!te.test(A))throw new Error(`Invalid JSON-pointer: ${A}`);ne=A,ae=c.default.rootData}else{const Le=me.exec(A);if(!Le)throw new Error(`Invalid JSON-pointer: ${A}`);const Ce=+Le[1];if(ne=Le[2],ne==="#"){if(Ce>=U)throw new Error(Ve("property/index",Ce));return J[U-Ce]}if(Ce>U)throw new Error(Ve("data",Ce));if(ae=M[U-Ce],!ne)return ae}let we=ae;const Fe=ne.split("/");for(const Le of Fe)Le&&(ae=(0,a._)`${ae}${(0,a.getProperty)((0,u.unescapeJsonPointer)(Le))}`,we=(0,a._)`${we} && ${ae}`);return we;function Ve(Le,Ce){return`Cannot access ${Le} ${Ce} levels up, current level is ${U}`}}return wt.getData=se,wt}var mr={},Su;function Na(){if(Su)return mr;Su=1,Object.defineProperty(mr,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return mr.default=e,mr}var gr={},Iu;function Ki(){if(Iu)return gr;Iu=1,Object.defineProperty(gr,"__esModule",{value:!0});const e=qi();class t extends Error{constructor(i,n,o,s){super(s||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,e.resolveUrl)(i,n,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(i,this.missingRef))}}return gr.default=t,gr}var tt={},Eu;function Oa(){if(Eu)return tt;Eu=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.resolveSchema=tt.getCompilingSchema=tt.resolveRef=tt.compileSchema=tt.SchemaEnv=void 0;const e=ye(),t=Na(),r=Rt(),i=qi(),n=_e(),o=Vi();class s{constructor($){var f;this.refs={},this.dynamicAnchors={};let v;typeof $.schema=="object"&&(v=$.schema),this.schema=$.schema,this.schemaId=$.schemaId,this.root=$.root||this,this.baseId=(f=$.baseId)!==null&&f!==void 0?f:(0,i.normalizeId)(v?.[$.schemaId||"$id"]),this.schemaPath=$.schemaPath,this.localRefs=$.localRefs,this.meta=$.meta,this.$async=v?.$async,this.refs={}}}tt.SchemaEnv=s;function a(m){const $=u.call(this,m);if($)return $;const f=(0,i.getFullPath)(this.opts.uriResolver,m.root.baseId),{es5:v,lines:S}=this.opts.code,{ownProperties:E}=this.opts,I=new e.CodeGen(this.scope,{es5:v,lines:S,ownProperties:E});let O;m.$async&&(O=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const j=I.scopeName("validate");m.validateName=j;const L={gen:I,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:I.scopeValue("schema",this.opts.code.source===!0?{ref:m.schema,code:(0,e.stringify)(m.schema)}:{ref:m.schema}),validateName:j,ValidationError:O,schema:m.schema,schemaEnv:m,rootId:f,baseId:m.baseId||f,schemaPath:e.nil,errSchemaPath:m.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let G;try{this._compilations.add(m),(0,o.validateFunctionCode)(L),I.optimize(this.opts.code.optimize);const Y=I.toString();G=`${I.scopeRefs(r.default.scope)}return ${Y}`,this.opts.code.process&&(G=this.opts.code.process(G,m));const oe=new Function(`${r.default.self}`,`${r.default.scope}`,G)(this,this.scope.get());if(this.scope.value(j,{ref:oe}),oe.errors=null,oe.schema=m.schema,oe.schemaEnv=m,m.$async&&(oe.$async=!0),this.opts.code.source===!0&&(oe.source={validateName:j,validateCode:Y,scopeValues:I._values}),this.opts.unevaluated){const{props:pe,items:R}=L;oe.evaluated={props:pe instanceof e.Name?void 0:pe,items:R instanceof e.Name?void 0:R,dynamicProps:pe instanceof e.Name,dynamicItems:R instanceof e.Name},oe.source&&(oe.source.evaluated=(0,e.stringify)(oe.evaluated))}return m.validate=oe,m}catch(Y){throw delete m.validate,delete m.validateName,G&&this.logger.error("Error compiling schema, function code:",G),Y}finally{this._compilations.delete(m)}}tt.compileSchema=a;function c(m,$,f){var v;f=(0,i.resolveUrl)(this.opts.uriResolver,$,f);const S=m.refs[f];if(S)return S;let E=y.call(this,m,f);if(E===void 0){const I=(v=m.localRefs)===null||v===void 0?void 0:v[f],{schemaId:O}=this.opts;I&&(E=new s({schema:I,schemaId:O,root:m,baseId:$}))}if(E!==void 0)return m.refs[f]=d.call(this,E)}tt.resolveRef=c;function d(m){return(0,i.inlineRef)(m.schema,this.opts.inlineRefs)?m.schema:m.validate?m:a.call(this,m)}function u(m){for(const $ of this._compilations)if(h($,m))return $}tt.getCompilingSchema=u;function h(m,$){return m.schema===$.schema&&m.root===$.root&&m.baseId===$.baseId}function y(m,$){let f;for(;typeof(f=this.refs[$])=="string";)$=f;return f||this.schemas[$]||_.call(this,m,$)}function _(m,$){const f=this.opts.uriResolver.parse($),v=(0,i._getFullPath)(this.opts.uriResolver,f);let S=(0,i.getFullPath)(this.opts.uriResolver,m.baseId,void 0);if(Object.keys(m.schema).length>0&&v===S)return g.call(this,f,m);const E=(0,i.normalizeId)(v),I=this.refs[E]||this.schemas[E];if(typeof I=="string"){const O=_.call(this,m,I);return typeof O?.schema!="object"?void 0:g.call(this,f,O)}if(typeof I?.schema=="object"){if(I.validate||a.call(this,I),E===(0,i.normalizeId)($)){const{schema:O}=I,{schemaId:j}=this.opts,L=O[j];return L&&(S=(0,i.resolveUrl)(this.opts.uriResolver,S,L)),new s({schema:O,schemaId:j,root:m,baseId:S})}return g.call(this,f,I)}}tt.resolveSchema=_;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(m,{baseId:$,schema:f,root:v}){var S;if(((S=m.fragment)===null||S===void 0?void 0:S[0])!=="/")return;for(const O of m.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const j=f[(0,n.unescapeFragment)(O)];if(j===void 0)return;f=j;const L=typeof f=="object"&&f[this.opts.schemaId];!b.has(O)&&L&&($=(0,i.resolveUrl)(this.opts.uriResolver,$,L))}let E;if(typeof f!="boolean"&&f.$ref&&!(0,n.schemaHasRulesButRef)(f,this.RULES)){const O=(0,i.resolveUrl)(this.opts.uriResolver,$,f.$ref);E=_.call(this,v,O)}const{schemaId:I}=this.opts;if(E=E||new s({schema:f,schemaId:I,root:v,baseId:$}),E.schema!==E.root.schema)return E}return tt}const tb="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",nb="Meta-schema for $data reference (JSON AnySchema extension proposal)",rb="object",ib=["$data"],ob={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},sb=!1;var ab={$id:tb,description:nb,type:rb,required:ib,properties:ob,additionalProperties:sb},yr={},Tn={exports:{}},co,Nu;function ub(){return Nu||(Nu=1,co={HEX:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15}}),co}var lo,Ou;function cb(){if(Ou)return lo;Ou=1;const{HEX:e}=ub(),t=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function r(g){if(a(g,".")<3)return{host:g,isIPV4:!1};const m=g.match(t)||[],[$]=m;return $?{host:s($,"."),isIPV4:!0}:{host:g,isIPV4:!1}}function i(g,m=!1){let $="",f=!0;for(const v of g){if(e[v]===void 0)return;v!=="0"&&f===!0&&(f=!1),f||($+=v)}return m&&$.length===0&&($="0"),$}function n(g){let m=0;const $={error:!1,address:"",zone:""},f=[],v=[];let S=!1,E=!1,I=!1;function O(){if(v.length){if(S===!1){const j=i(v);if(j!==void 0)f.push(j);else return $.error=!0,!1}v.length=0}return!0}for(let j=0;j<g.length;j++){const L=g[j];if(!(L==="["||L==="]"))if(L===":"){if(E===!0&&(I=!0),!O())break;if(m++,f.push(":"),m>7){$.error=!0;break}j-1>=0&&g[j-1]===":"&&(E=!0);continue}else if(L==="%"){if(!O())break;S=!0}else{v.push(L);continue}}return v.length&&(S?$.zone=v.join(""):I?f.push(v.join("")):f.push(i(v))),$.address=f.join(""),$}function o(g){if(a(g,":")<2)return{host:g,isIPV6:!1};const m=n(g);if(m.error)return{host:g,isIPV6:!1};{let $=m.address,f=m.address;return m.zone&&($+="%"+m.zone,f+="%25"+m.zone),{host:$,escapedHost:f,isIPV6:!0}}}function s(g,m){let $="",f=!0;const v=g.length;for(let S=0;S<v;S++){const E=g[S];E==="0"&&f?(S+1<=v&&g[S+1]===m||S+1===v)&&($+=E,f=!1):(E===m?f=!0:f=!1,$+=E)}return $}function a(g,m){let $=0;for(let f=0;f<g.length;f++)g[f]===m&&$++;return $}const c=/^\.\.?\//u,d=/^\/\.(?:\/|$)/u,u=/^\/\.\.(?:\/|$)/u,h=/^\/?(?:.|\n)*?(?=\/|$)/u;function y(g){const m=[];for(;g.length;)if(g.match(c))g=g.replace(c,"");else if(g.match(d))g=g.replace(d,"/");else if(g.match(u))g=g.replace(u,"/"),m.pop();else if(g==="."||g==="..")g="";else{const $=g.match(h);if($){const f=$[0];g=g.slice(f.length),m.push(f)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function _(g,m){const $=m!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=$(g.scheme)),g.userinfo!==void 0&&(g.userinfo=$(g.userinfo)),g.host!==void 0&&(g.host=$(g.host)),g.path!==void 0&&(g.path=$(g.path)),g.query!==void 0&&(g.query=$(g.query)),g.fragment!==void 0&&(g.fragment=$(g.fragment)),g}function b(g){const m=[];if(g.userinfo!==void 0&&(m.push(g.userinfo),m.push("@")),g.host!==void 0){let $=unescape(g.host);const f=r($);if(f.isIPV4)$=f.host;else{const v=o(f.host);v.isIPV6===!0?$=`[${v.escapedHost}]`:$=g.host}m.push($)}return(typeof g.port=="number"||typeof g.port=="string")&&(m.push(":"),m.push(String(g.port))),m.length?m.join(""):void 0}return lo={recomposeAuthority:b,normalizeComponentEncoding:_,removeDotSegments:y,normalizeIPv4:r,normalizeIPv6:o,stringArrayToHexStripped:i},lo}var fo,xu;function lb(){if(xu)return fo;xu=1;const e=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function r(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}function i(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function n(f){const v=String(f.scheme).toLowerCase()==="https";return(f.port===(v?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function o(f){return f.secure=r(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function s(f){if((f.port===(r(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){const[v,S]=f.resourceName.split("?");f.path=v&&v!=="/"?v:void 0,f.query=S,f.resourceName=void 0}return f.fragment=void 0,f}function a(f,v){if(!f.path)return f.error="URN can not be parsed",f;const S=f.path.match(t);if(S){const E=v.scheme||f.scheme||"urn";f.nid=S[1].toLowerCase(),f.nss=S[2];const I=`${E}:${v.nid||f.nid}`,O=$[I];f.path=void 0,O&&(f=O.parse(f,v))}else f.error=f.error||"URN can not be parsed.";return f}function c(f,v){const S=v.scheme||f.scheme||"urn",E=f.nid.toLowerCase(),I=`${S}:${v.nid||E}`,O=$[I];O&&(f=O.serialize(f,v));const j=f,L=f.nss;return j.path=`${E||v.nid}:${L}`,v.skipEscape=!0,j}function d(f,v){const S=f;return S.uuid=S.nss,S.nss=void 0,!v.tolerant&&(!S.uuid||!e.test(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function u(f){const v=f;return v.nss=(f.uuid||"").toLowerCase(),v}const h={scheme:"http",domainHost:!0,parse:i,serialize:n},y={scheme:"https",domainHost:h.domainHost,parse:i,serialize:n},_={scheme:"ws",domainHost:!0,parse:o,serialize:s},b={scheme:"wss",domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},$={http:h,https:y,ws:_,wss:b,urn:{scheme:"urn",parse:a,serialize:c,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:u,skipNormalize:!0}};return fo=$,fo}var ju;function fb(){if(ju)return Tn.exports;ju=1;const{normalizeIPv6:e,normalizeIPv4:t,removeDotSegments:r,recomposeAuthority:i,normalizeComponentEncoding:n}=cb(),o=lb();function s(m,$){return typeof m=="string"?m=u(b(m,$),$):typeof m=="object"&&(m=b(u(m,$),$)),m}function a(m,$,f){const v=Object.assign({scheme:"null"},f),S=c(b(m,v),b($,v),v,!0);return u(S,{...v,skipEscape:!0})}function c(m,$,f,v){const S={};return v||(m=b(u(m,f),f),$=b(u($,f),f)),f=f||{},!f.tolerant&&$.scheme?(S.scheme=$.scheme,S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.userinfo!==void 0||$.host!==void 0||$.port!==void 0?(S.userinfo=$.userinfo,S.host=$.host,S.port=$.port,S.path=r($.path||""),S.query=$.query):($.path?($.path.charAt(0)==="/"?S.path=r($.path):((m.userinfo!==void 0||m.host!==void 0||m.port!==void 0)&&!m.path?S.path="/"+$.path:m.path?S.path=m.path.slice(0,m.path.lastIndexOf("/")+1)+$.path:S.path=$.path,S.path=r(S.path)),S.query=$.query):(S.path=m.path,$.query!==void 0?S.query=$.query:S.query=m.query),S.userinfo=m.userinfo,S.host=m.host,S.port=m.port),S.scheme=m.scheme),S.fragment=$.fragment,S}function d(m,$,f){return typeof m=="string"?(m=unescape(m),m=u(n(b(m,f),!0),{...f,skipEscape:!0})):typeof m=="object"&&(m=u(n(m,!0),{...f,skipEscape:!0})),typeof $=="string"?($=unescape($),$=u(n(b($,f),!0),{...f,skipEscape:!0})):typeof $=="object"&&($=u(n($,!0),{...f,skipEscape:!0})),m.toLowerCase()===$.toLowerCase()}function u(m,$){const f={host:m.host,scheme:m.scheme,userinfo:m.userinfo,port:m.port,path:m.path,query:m.query,nid:m.nid,nss:m.nss,uuid:m.uuid,fragment:m.fragment,reference:m.reference,resourceName:m.resourceName,secure:m.secure,error:""},v=Object.assign({},$),S=[],E=o[(v.scheme||f.scheme||"").toLowerCase()];E&&E.serialize&&E.serialize(f,v),f.path!==void 0&&(v.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),v.reference!=="suffix"&&f.scheme&&S.push(f.scheme,":");const I=i(f);if(I!==void 0&&(v.reference!=="suffix"&&S.push("//"),S.push(I),f.path&&f.path.charAt(0)!=="/"&&S.push("/")),f.path!==void 0){let O=f.path;!v.absolutePath&&(!E||!E.absolutePath)&&(O=r(O)),I===void 0&&(O=O.replace(/^\/\//u,"/%2F")),S.push(O)}return f.query!==void 0&&S.push("?",f.query),f.fragment!==void 0&&S.push("#",f.fragment),S.join("")}const h=Array.from({length:127},(m,$)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode($)));function y(m){let $=0;for(let f=0,v=m.length;f<v;++f)if($=m.charCodeAt(f),$>126||h[$])return!0;return!1}const _=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(m,$){const f=Object.assign({},$),v={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},S=m.indexOf("%")!==-1;let E=!1;f.reference==="suffix"&&(m=(f.scheme?f.scheme+":":"")+"//"+m);const I=m.match(_);if(I){if(v.scheme=I[1],v.userinfo=I[3],v.host=I[4],v.port=parseInt(I[5],10),v.path=I[6]||"",v.query=I[7],v.fragment=I[8],isNaN(v.port)&&(v.port=I[5]),v.host){const j=t(v.host);if(j.isIPV4===!1){const L=e(j.host);v.host=L.host.toLowerCase(),E=L.isIPV6}else v.host=j.host,E=!0}v.scheme===void 0&&v.userinfo===void 0&&v.host===void 0&&v.port===void 0&&v.query===void 0&&!v.path?v.reference="same-document":v.scheme===void 0?v.reference="relative":v.fragment===void 0?v.reference="absolute":v.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==v.reference&&(v.error=v.error||"URI is not a "+f.reference+" reference.");const O=o[(f.scheme||v.scheme||"").toLowerCase()];if(!f.unicodeSupport&&(!O||!O.unicodeSupport)&&v.host&&(f.domainHost||O&&O.domainHost)&&E===!1&&y(v.host))try{v.host=URL.domainToASCII(v.host.toLowerCase())}catch(j){v.error=v.error||"Host's domain name can not be converted to ASCII: "+j}(!O||O&&!O.skipNormalize)&&(S&&v.scheme!==void 0&&(v.scheme=unescape(v.scheme)),S&&v.host!==void 0&&(v.host=unescape(v.host)),v.path&&(v.path=escape(unescape(v.path))),v.fragment&&(v.fragment=encodeURI(decodeURIComponent(v.fragment)))),O&&O.parse&&O.parse(v,f)}else v.error=v.error||"URI can not be parsed.";return v}const g={SCHEMES:o,normalize:s,resolve:a,resolveComponents:c,equal:d,serialize:u,parse:b};return Tn.exports=g,Tn.exports.default=g,Tn.exports.fastUri=g,Tn.exports}var Au;function db(){if(Au)return yr;Au=1,Object.defineProperty(yr,"__esModule",{value:!0});const e=fb();return e.code='require("ajv/dist/runtime/uri").default',yr.default=e,yr}var zu;function hb(){return zu||(zu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Vi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const i=Na(),n=Ki(),o=Up(),s=Oa(),a=ye(),c=qi(),d=pi(),u=_e(),h=ab,y=db(),_=(K,T)=>new RegExp(K,T);_.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={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."},$={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function v(K){var T,F,P,w,x,B,ee,te,me,se,A,U,M,J,ne,ae,we,Fe,Ve,Le,Ce,At,Je,zt,Qe;const _t=K.strict,jn=(T=K.code)===null||T===void 0?void 0:T.optimize,ct=jn===!0||jn===void 0?1:jn||0,ir=(P=(F=K.code)===null||F===void 0?void 0:F.regExp)!==null&&P!==void 0?P:_,k=(w=K.uriResolver)!==null&&w!==void 0?w:y.default;return{strictSchema:(B=(x=K.strictSchema)!==null&&x!==void 0?x:_t)!==null&&B!==void 0?B:!0,strictNumbers:(te=(ee=K.strictNumbers)!==null&&ee!==void 0?ee:_t)!==null&&te!==void 0?te:!0,strictTypes:(se=(me=K.strictTypes)!==null&&me!==void 0?me:_t)!==null&&se!==void 0?se:"log",strictTuples:(U=(A=K.strictTuples)!==null&&A!==void 0?A:_t)!==null&&U!==void 0?U:"log",strictRequired:(J=(M=K.strictRequired)!==null&&M!==void 0?M:_t)!==null&&J!==void 0?J:!1,code:K.code?{...K.code,optimize:ct,regExp:ir}:{optimize:ct,regExp:ir},loopRequired:(ne=K.loopRequired)!==null&&ne!==void 0?ne:f,loopEnum:(ae=K.loopEnum)!==null&&ae!==void 0?ae:f,meta:(we=K.meta)!==null&&we!==void 0?we:!0,messages:(Fe=K.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(Ve=K.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Le=K.schemaId)!==null&&Le!==void 0?Le:"$id",addUsedSchema:(Ce=K.addUsedSchema)!==null&&Ce!==void 0?Ce:!0,validateSchema:(At=K.validateSchema)!==null&&At!==void 0?At:!0,validateFormats:(Je=K.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(zt=K.unicodeRegExp)!==null&&zt!==void 0?zt:!0,int32range:(Qe=K.int32range)!==null&&Qe!==void 0?Qe:!0,uriResolver:k}}class S{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...v(T)};const{es5:F,lines:P}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:F,lines:P}),this.logger=Q(T.logger);const w=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),E.call(this,m,T,"NOT SUPPORTED"),E.call(this,$,T,"DEPRECATED","warn"),this._metaOpts=G.call(this),T.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&L.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),O.call(this),T.validateFormats=w}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:F,schemaId:P}=this.opts;let w=h;P==="id"&&(w={...h},w.id=w.$id,delete w.$id),F&&T&&this.addMetaSchema(w,w[P],!1)}defaultMeta(){const{meta:T,schemaId:F}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[F]||T:void 0}validate(T,F){let P;if(typeof T=="string"){if(P=this.getSchema(T),!P)throw new Error(`no schema with key or ref "${T}"`)}else P=this.compile(T);const w=P(F);return"$async"in P||(this.errors=P.errors),w}compile(T,F){const P=this._addSchema(T,F);return P.validate||this._compileSchemaEnv(P)}compileAsync(T,F){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return w.call(this,T,F);async function w(se,A){await x.call(this,se.$schema);const U=this._addSchema(se,A);return U.validate||B.call(this,U)}async function x(se){se&&!this.getSchema(se)&&await w.call(this,{$ref:se},!0)}async function B(se){try{return this._compileSchemaEnv(se)}catch(A){if(!(A instanceof n.default))throw A;return ee.call(this,A),await te.call(this,A.missingSchema),B.call(this,se)}}function ee({missingSchema:se,missingRef:A}){if(this.refs[se])throw new Error(`AnySchema ${se} is loaded but ${A} cannot be resolved`)}async function te(se){const A=await me.call(this,se);this.refs[se]||await x.call(this,A.$schema),this.refs[se]||this.addSchema(A,se,F)}async function me(se){const A=this._loading[se];if(A)return A;try{return await(this._loading[se]=P(se))}finally{delete this._loading[se]}}}addSchema(T,F,P,w=this.opts.validateSchema){if(Array.isArray(T)){for(const B of T)this.addSchema(B,void 0,P,w);return this}let x;if(typeof T=="object"){const{schemaId:B}=this.opts;if(x=T[B],x!==void 0&&typeof x!="string")throw new Error(`schema ${B} must be string`)}return F=(0,c.normalizeId)(F||x),this._checkUnique(F),this.schemas[F]=this._addSchema(T,P,F,w,!0),this}addMetaSchema(T,F,P=this.opts.validateSchema){return this.addSchema(T,F,!0,P),this}validateSchema(T,F){if(typeof T=="boolean")return!0;let P;if(P=T.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const w=this.validate(P,T);if(!w&&F){const x="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(x);else throw new Error(x)}return w}getSchema(T){let F;for(;typeof(F=I.call(this,T))=="string";)T=F;if(F===void 0){const{schemaId:P}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:P});if(F=s.resolveSchema.call(this,w,T),!F)return;this.refs[T]=F}return F.validate||this._compileSchemaEnv(F)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const F=I.call(this,T);return typeof F=="object"&&this._cache.delete(F.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const F=T;this._cache.delete(F);let P=T[this.opts.schemaId];return P&&(P=(0,c.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const F of T)this.addKeyword(F);return this}addKeyword(T,F){let P;if(typeof T=="string")P=T,typeof F=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),F.keyword=P);else if(typeof T=="object"&&F===void 0){if(F=T,P=F.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(pe.call(this,P,F),!F)return(0,u.eachItem)(P,x=>R.call(this,x)),this;ie.call(this,F);const w={...F,type:(0,d.getJSONTypes)(F.type),schemaType:(0,d.getJSONTypes)(F.schemaType)};return(0,u.eachItem)(P,w.type.length===0?x=>R.call(this,x,w):x=>w.type.forEach(B=>R.call(this,x,w,B))),this}getKeyword(T){const F=this.RULES.all[T];return typeof F=="object"?F.definition:!!F}removeKeyword(T){const{RULES:F}=this;delete F.keywords[T],delete F.all[T];for(const P of F.rules){const w=P.rules.findIndex(x=>x.keyword===T);w>=0&&P.rules.splice(w,1)}return this}addFormat(T,F){return typeof F=="string"&&(F=new RegExp(F)),this.formats[T]=F,this}errorsText(T=this.errors,{separator:F=", ",dataVar:P="data"}={}){return!T||T.length===0?"No errors":T.map(w=>`${P}${w.instancePath} ${w.message}`).reduce((w,x)=>w+F+x)}$dataMetaSchema(T,F){const P=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const w of F){const x=w.split("/").slice(1);let B=T;for(const ee of x)B=B[ee];for(const ee in P){const te=P[ee];if(typeof te!="object")continue;const{$data:me}=te.definition,se=B[ee];me&&se&&(B[ee]=ce(se))}}return T}_removeAllSchemas(T,F){for(const P in T){const w=T[P];(!F||F.test(P))&&(typeof w=="string"?delete T[P]:w&&!w.meta&&(this._cache.delete(w.schema),delete T[P]))}}_addSchema(T,F,P,w=this.opts.validateSchema,x=this.opts.addUsedSchema){let B;const{schemaId:ee}=this.opts;if(typeof T=="object")B=T[ee];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let te=this._cache.get(T);if(te!==void 0)return te;P=(0,c.normalizeId)(B||P);const me=c.getSchemaRefs.call(this,T,P);return te=new s.SchemaEnv({schema:T,schemaId:ee,meta:F,baseId:P,localRefs:me}),this._cache.set(te.schema,te),x&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=te),w&&this.validateSchema(T,!0),te}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):s.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const F=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,T)}finally{this.opts=F}}}S.ValidationError=i.default,S.MissingRefError=n.default,e.default=S;function E(K,T,F,P="error"){for(const w in K){const x=w;x in T&&this.logger[P](`${F}: option ${w}. ${K[x]}`)}}function I(K){return K=(0,c.normalizeId)(K),this.schemas[K]||this.refs[K]}function O(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const T in K)this.addSchema(K[T],T)}function j(){for(const K in this.opts.formats){const T=this.opts.formats[K];T&&this.addFormat(K,T)}}function L(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in K){const F=K[T];F.keyword||(F.keyword=T),this.addKeyword(F)}}function G(){const K={...this.opts};for(const T of b)delete K[T];return K}const Y={log(){},warn(){},error(){}};function Q(K){if(K===!1)return Y;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const oe=/^[a-z_$][a-z0-9_$:-]*$/i;function pe(K,T){const{RULES:F}=this;if((0,u.eachItem)(K,P=>{if(F.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!oe.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function R(K,T,F){var P;const w=T?.post;if(F&&w)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:x}=this;let B=w?x.post:x.rules.find(({type:te})=>te===F);if(B||(B={type:F,rules:[]},x.rules.push(B)),x.keywords[K]=!0,!T)return;const ee={keyword:K,definition:{...T,type:(0,d.getJSONTypes)(T.type),schemaType:(0,d.getJSONTypes)(T.schemaType)}};T.before?X.call(this,B,ee,T.before):B.rules.push(ee),x.all[K]=ee,(P=T.implements)===null||P===void 0||P.forEach(te=>this.addKeyword(te))}function X(K,T,F){const P=K.rules.findIndex(w=>w.keyword===F);P>=0?K.rules.splice(P,0,T):(K.rules.push(T),this.logger.warn(`rule ${F} is not defined`))}function ie(K){let{metaSchema:T}=K;T!==void 0&&(K.$data&&this.opts.$data&&(T=ce(T)),K.validateSchema=this.compile(T,!0))}const re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ce(K){return{anyOf:[K,re]}}}(no)),no}var vr={},$r={},br={},Tu;function pb(){if(Tu)return br;Tu=1,Object.defineProperty(br,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return br.default=e,br}var Tt={},Pu;function mb(){if(Pu)return Tt;Pu=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.callRef=Tt.getValidate=void 0;const e=Ki(),t=gt(),r=ye(),i=Rt(),n=Oa(),o=_e(),s={keyword:"$ref",schemaType:"string",code(d){const{gen:u,schema:h,it:y}=d,{baseId:_,schemaEnv:b,validateName:g,opts:m,self:$}=y,{root:f}=b;if((h==="#"||h==="#/")&&_===f.baseId)return S();const v=n.resolveRef.call($,f,_,h);if(v===void 0)throw new e.default(y.opts.uriResolver,_,h);if(v instanceof n.SchemaEnv)return E(v);return I(v);function S(){if(b===f)return c(d,g,b,b.$async);const O=u.scopeValue("root",{ref:f});return c(d,(0,r._)`${O}.validate`,f,f.$async)}function E(O){const j=a(d,O);c(d,j,O,O.$async)}function I(O){const j=u.scopeValue("schema",m.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),L=u.name("valid"),G=d.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:j,errSchemaPath:h},L);d.mergeEvaluated(G),d.ok(L)}}};function a(d,u){const{gen:h}=d;return u.validate?h.scopeValue("validate",{ref:u.validate}):(0,r._)`${h.scopeValue("wrapper",{ref:u})}.validate`}Tt.getValidate=a;function c(d,u,h,y){const{gen:_,it:b}=d,{allErrors:g,schemaEnv:m,opts:$}=b,f=$.passContext?i.default.this:r.nil;y?v():S();function v(){if(!m.$async)throw new Error("async schema referenced by sync schema");const O=_.let("valid");_.try(()=>{_.code((0,r._)`await ${(0,t.callValidateCode)(d,u,f)}`),I(u),g||_.assign(O,!0)},j=>{_.if((0,r._)`!(${j} instanceof ${b.ValidationError})`,()=>_.throw(j)),E(j),g||_.assign(O,!1)}),d.ok(O)}function S(){d.result((0,t.callValidateCode)(d,u,f),()=>I(u),()=>E(u))}function E(O){const j=(0,r._)`${O}.errors`;_.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${j} : ${i.default.vErrors}.concat(${j})`),_.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function I(O){var j;if(!b.opts.unevaluated)return;const L=(j=h?.validate)===null||j===void 0?void 0:j.evaluated;if(b.props!==!0)if(L&&!L.dynamicProps)L.props!==void 0&&(b.props=o.mergeEvaluated.props(_,L.props,b.props));else{const G=_.var("props",(0,r._)`${O}.evaluated.props`);b.props=o.mergeEvaluated.props(_,G,b.props,r.Name)}if(b.items!==!0)if(L&&!L.dynamicItems)L.items!==void 0&&(b.items=o.mergeEvaluated.items(_,L.items,b.items));else{const G=_.var("items",(0,r._)`${O}.evaluated.items`);b.items=o.mergeEvaluated.items(_,G,b.items,r.Name)}}}return Tt.callRef=c,Tt.default=s,Tt}var Du;function gb(){if(Du)return $r;Du=1,Object.defineProperty($r,"__esModule",{value:!0});const e=pb(),t=mb(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return $r.default=r,$r}var _r={},wr={},Uu;function yb(){if(Uu)return wr;Uu=1,Object.defineProperty(wr,"__esModule",{value:!0});const e=ye(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},i={message:({keyword:o,schemaCode:s})=>(0,e.str)`must be ${r[o].okStr} ${s}`,params:({keyword:o,schemaCode:s})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${s}}`},n={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:i,code(o){const{keyword:s,data:a,schemaCode:c}=o;o.fail$data((0,e._)`${a} ${r[s].fail} ${c} || isNaN(${a})`)}};return wr.default=n,wr}var kr={},Cu;function vb(){if(Cu)return kr;Cu=1,Object.defineProperty(kr,"__esModule",{value:!0});const e=ye(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,e._)`{multipleOf: ${i}}`},code(i){const{gen:n,data:o,schemaCode:s,it:a}=i,c=a.opts.multipleOfPrecision,d=n.let("res"),u=c?(0,e._)`Math.abs(Math.round(${d}) - ${d}) > 1e-${c}`:(0,e._)`${d} !== parseInt(${d})`;i.fail$data((0,e._)`(${s} === 0 || (${d} = ${o}/${s}, ${u}))`)}};return kr.default=r,kr}var Sr={},Ir={},Bu;function $b(){if(Bu)return Ir;Bu=1,Object.defineProperty(Ir,"__esModule",{value:!0});function e(t){const r=t.length;let i=0,n=0,o;for(;n<r;)i++,o=t.charCodeAt(n++),o>=55296&&o<=56319&&n<r&&(o=t.charCodeAt(n),(o&64512)===56320&&n++);return i}return Ir.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Ir}var Ru;function bb(){if(Ru)return Sr;Ru=1,Object.defineProperty(Sr,"__esModule",{value:!0});const e=ye(),t=_e(),r=$b(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:s}){const a=o==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:o})=>(0,e._)`{limit: ${o}}`},code(o){const{keyword:s,data:a,schemaCode:c,it:d}=o,u=s==="maxLength"?e.operators.GT:e.operators.LT,h=d.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${h} ${u} ${c}`)}};return Sr.default=n,Sr}var Er={},Fu;function _b(){if(Fu)return Er;Fu=1,Object.defineProperty(Er,"__esModule",{value:!0});const e=gt(),t=ye(),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match pattern "${n}"`,params:({schemaCode:n})=>(0,t._)`{pattern: ${n}}`},code(n){const{data:o,$data:s,schema:a,schemaCode:c,it:d}=n,u=d.opts.unicodeRegExp?"u":"",h=s?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(n,a);n.fail$data((0,t._)`!${h}.test(${o})`)}};return Er.default=i,Er}var Nr={},Lu;function wb(){if(Lu)return Nr;Lu=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=ye(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} properties`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxProperties"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`Object.keys(${o}).length ${a} ${s}`)}};return Nr.default=r,Nr}var Or={},Zu;function kb(){if(Zu)return Or;Zu=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:s,schema:a,schemaCode:c,data:d,$data:u,it:h}=o,{opts:y}=h;if(!u&&a.length===0)return;const _=a.length>=y.loopRequired;if(h.allErrors?b():g(),y.strictRequired){const f=o.parentSchema.properties,{definedProperties:v}=o.it;for(const S of a)if(f?.[S]===void 0&&!v.has(S)){const E=h.schemaEnv.baseId+h.errSchemaPath,I=`required property "${S}" is not defined at "${E}" (strictRequired)`;(0,r.checkStrictMode)(h,I,h.opts.strictRequired)}}function b(){if(_||u)o.block$data(t.nil,m);else for(const f of a)(0,e.checkReportMissingProp)(o,f)}function g(){const f=s.let("missing");if(_||u){const v=s.let("valid",!0);o.block$data(v,()=>$(f,v)),o.ok(v)}else s.if((0,e.checkMissingProp)(o,a,f)),(0,e.reportMissingProp)(o,f),s.else()}function m(){s.forOf("prop",c,f=>{o.setParams({missingProperty:f}),s.if((0,e.noPropertyInData)(s,d,f,y.ownProperties),()=>o.error())})}function $(f,v){o.setParams({missingProperty:f}),s.forOf(f,c,()=>{s.assign(v,(0,e.propertyInData)(s,d,f,y.ownProperties)),s.if((0,t.not)(v),()=>{o.error(),s.break()})},t.nil)}}};return Or.default=n,Or}var xr={},Mu;function Sb(){if(Mu)return xr;Mu=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=ye(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){const o=i==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${n} items`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:n,data:o,schemaCode:s}=i,a=n==="maxItems"?e.operators.GT:e.operators.LT;i.fail$data((0,e._)`${o}.length ${a} ${s}`)}};return xr.default=r,xr}var jr={},Ar={},qu;function xa(){if(qu)return Ar;qu=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=Bp();return e.code='require("ajv/dist/runtime/equal").default',Ar.default=e,Ar}var Vu;function Ib(){if(Vu)return jr;Vu=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=pi(),t=ye(),r=_e(),i=xa(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0,t._)`{i: ${s}, j: ${a}}`},code(s){const{gen:a,data:c,$data:d,schema:u,parentSchema:h,schemaCode:y,it:_}=s;if(!d&&!u)return;const b=a.let("valid"),g=h.items?(0,e.getSchemaTypes)(h.items):[];s.block$data(b,m,(0,t._)`${y} === false`),s.ok(b);function m(){const S=a.let("i",(0,t._)`${c}.length`),E=a.let("j");s.setParams({i:S,j:E}),a.assign(b,!0),a.if((0,t._)`${S} > 1`,()=>($()?f:v)(S,E))}function $(){return g.length>0&&!g.some(S=>S==="object"||S==="array")}function f(S,E){const I=a.name("item"),O=(0,e.checkDataTypes)(g,I,_.opts.strictNumbers,e.DataType.Wrong),j=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${S}--;`,()=>{a.let(I,(0,t._)`${c}[${S}]`),a.if(O,(0,t._)`continue`),g.length>1&&a.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),a.if((0,t._)`typeof ${j}[${I}] == "number"`,()=>{a.assign(E,(0,t._)`${j}[${I}]`),s.error(),a.assign(b,!1).break()}).code((0,t._)`${j}[${I}] = ${S}`)})}function v(S,E){const I=(0,r.useFunc)(a,i.default),O=a.name("outer");a.label(O).for((0,t._)`;${S}--;`,()=>a.for((0,t._)`${E} = ${S}; ${E}--;`,()=>a.if((0,t._)`${I}(${c}[${S}], ${c}[${E}])`,()=>{s.error(),a.assign(b,!1).break(O)})))}}};return jr.default=o,jr}var zr={},Ku;function Eb(){if(Ku)return zr;Ku=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:s,data:a,$data:c,schemaCode:d,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(s,r.default)}(${a}, ${d})`):o.fail((0,e._)`${u} !== ${a}`)}};return zr.default=n,zr}var Tr={},Ju;function Nb(){if(Ju)return Tr;Ju=1,Object.defineProperty(Tr,"__esModule",{value:!0});const e=ye(),t=_e(),r=xa(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:s,data:a,$data:c,schema:d,schemaCode:u,it:h}=o;if(!c&&d.length===0)throw new Error("enum must have non-empty array");const y=d.length>=h.opts.loopEnum;let _;const b=()=>_??(_=(0,t.useFunc)(s,r.default));let g;if(y||c)g=s.let("valid"),o.block$data(g,m);else{if(!Array.isArray(d))throw new Error("ajv implementation error");const f=s.const("vSchema",u);g=(0,e.or)(...d.map((v,S)=>$(f,S)))}o.pass(g);function m(){s.assign(g,!1),s.forOf("v",u,f=>s.if((0,e._)`${b()}(${a}, ${f})`,()=>s.assign(g,!0).break()))}function $(f,v){const S=d[v];return typeof S=="object"&&S!==null?(0,e._)`${b()}(${a}, ${f}[${v}])`:(0,e._)`${a} === ${S}`}}};return Tr.default=n,Tr}var Gu;function Ob(){if(Gu)return _r;Gu=1,Object.defineProperty(_r,"__esModule",{value:!0});const e=yb(),t=vb(),r=bb(),i=_b(),n=wb(),o=kb(),s=Sb(),a=Ib(),c=Eb(),d=Nb(),u=[e.default,t.default,r.default,i.default,n.default,o.default,s.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,d.default];return _r.default=u,_r}var Pr={},on={},Wu;function Rp(){if(Wu)return on;Wu=1,Object.defineProperty(on,"__esModule",{value:!0}),on.validateAdditionalItems=void 0;const e=ye(),t=_e(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:s,it:a}=o,{items:c}=s;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,s){const{gen:a,schema:c,data:d,keyword:u,it:h}=o;h.items=!0;const y=a.const("len",(0,e._)`${d}.length`);if(c===!1)o.setParams({len:s.length}),o.pass((0,e._)`${y} <= ${s.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(h,c)){const b=a.var("valid",(0,e._)`${y} <= ${s.length}`);a.if((0,e.not)(b),()=>_(b)),o.ok(b)}function _(b){a.forRange("i",s.length,y,g=>{o.subschema({keyword:u,dataProp:g,dataPropType:t.Type.Num},b),h.allErrors||a.if((0,e.not)(b),()=>a.break())})}}return on.validateAdditionalItems=n,on.default=i,on}var Dr={},sn={},Hu;function Fp(){if(Hu)return sn;Hu=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.validateTuple=void 0;const e=ye(),t=_e(),r=gt(),i={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:s,it:a}=o;if(Array.isArray(s))return n(o,"additionalItems",s);a.items=!0,!(0,t.alwaysValidSchema)(a,s)&&o.ok((0,r.validateArray)(o))}};function n(o,s,a=o.schema){const{gen:c,parentSchema:d,data:u,keyword:h,it:y}=o;g(d),y.opts.unevaluated&&a.length&&y.items!==!0&&(y.items=t.mergeEvaluated.items(c,a.length,y.items));const _=c.name("valid"),b=c.const("len",(0,e._)`${u}.length`);a.forEach((m,$)=>{(0,t.alwaysValidSchema)(y,m)||(c.if((0,e._)`${b} > ${$}`,()=>o.subschema({keyword:h,schemaProp:$,dataProp:$},_)),o.ok(_))});function g(m){const{opts:$,errSchemaPath:f}=y,v=a.length,S=v===m.minItems&&(v===m.maxItems||m[s]===!1);if($.strictTuples&&!S){const E=`"${h}" is ${v}-tuple, but minItems or maxItems/${s} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(y,E,$.strictTuples)}}}return sn.validateTuple=n,sn.default=i,sn}var Xu;function xb(){if(Xu)return Dr;Xu=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=Fp(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Dr.default=t,Dr}var Ur={},Yu;function jb(){if(Yu)return Ur;Yu=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=ye(),t=_e(),r=gt(),i=Rp(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{schema:a,parentSchema:c,it:d}=s,{prefixItems:u}=c;d.items=!0,!(0,t.alwaysValidSchema)(d,a)&&(u?(0,i.validateAdditionalItems)(s,u):s.ok((0,r.validateArray)(s)))}};return Ur.default=o,Ur}var Cr={},Qu;function Ab(){if(Qu)return Cr;Qu=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:o}})=>o===void 0?(0,e.str)`must contain at least ${n} valid item(s)`:(0,e.str)`must contain at least ${n} and no more than ${o} valid item(s)`,params:({params:{min:n,max:o}})=>o===void 0?(0,e._)`{minContains: ${n}}`:(0,e._)`{minContains: ${n}, maxContains: ${o}}`},code(n){const{gen:o,schema:s,parentSchema:a,data:c,it:d}=n;let u,h;const{minContains:y,maxContains:_}=a;d.opts.next?(u=y===void 0?1:y,h=_):u=1;const b=o.const("len",(0,e._)`${c}.length`);if(n.setParams({min:u,max:h}),h===void 0&&u===0){(0,t.checkStrictMode)(d,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(h!==void 0&&u>h){(0,t.checkStrictMode)(d,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(d,s)){let v=(0,e._)`${b} >= ${u}`;h!==void 0&&(v=(0,e._)`${v} && ${b} <= ${h}`),n.pass(v);return}d.items=!0;const g=o.name("valid");h===void 0&&u===1?$(g,()=>o.if(g,()=>o.break())):u===0?(o.let(g,!0),h!==void 0&&o.if((0,e._)`${c}.length > 0`,m)):(o.let(g,!1),m()),n.result(g,()=>n.reset());function m(){const v=o.name("_valid"),S=o.let("count",0);$(v,()=>o.if(v,()=>f(S)))}function $(v,S){o.forRange("i",0,b,E=>{n.subschema({keyword:"contains",dataProp:E,dataPropType:t.Type.Num,compositeRule:!0},v),S()})}function f(v){o.code((0,e._)`${v}++`),h===void 0?o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0).break()):(o.if((0,e._)`${v} > ${h}`,()=>o.assign(g,!1).break()),u===1?o.assign(g,!0):o.if((0,e._)`${v} >= ${u}`,()=>o.assign(g,!0)))}}};return Cr.default=i,Cr}var ho={},ec;function zb(){return ec||(ec=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ye(),r=_e(),i=gt();e.error={message:({params:{property:c,depsCount:d,deps:u}})=>{const h=d===1?"property":"properties";return(0,t.str)`must have ${h} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:d,deps:u,missingProperty:h}})=>(0,t._)`{property: ${c},
|
|
169
169
|
missingProperty: ${h},
|
|
170
170
|
depsCount: ${d},
|
|
171
|
-
deps: ${u}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[d,u]=o(c);s(c,d),a(c,u)}};function o({schema:c}){const d={},u={};for(const h in c){if(h==="__proto__")continue;const y=Array.isArray(c[h])?d:u;y[h]=c[h]}return[d,u]}function s(c,d=c.schema){const{gen:u,data:h,it:y}=c;if(Object.keys(d).length===0)return;const _=u.let("missing");for(const b in d){const g=d[b];if(g.length===0)continue;const m=(0,i.propertyInData)(u,h,b,y.opts.ownProperties);c.setParams({property:b,depsCount:g.length,deps:g.join(", ")}),y.allErrors?u.if(m,()=>{for(const $ of g)(0,i.checkReportMissingProp)(c,$)}):(u.if((0,t._)`${m} && (${(0,i.checkMissingProp)(c,g,_)})`),(0,i.reportMissingProp)(c,_),u.else())}}e.validatePropertyDeps=s;function a(c,d=c.schema){const{gen:u,data:h,keyword:y,it:_}=c,b=u.name("valid");for(const g in d)(0,r.alwaysValidSchema)(_,d[g])||(u.if((0,i.propertyInData)(u,h,g,_.opts.ownProperties),()=>{const m=c.subschema({keyword:y,schemaProp:g},b);c.mergeValidEvaluated(m,b)},()=>u.var(b,!0)),c.ok(b))}e.validateSchemaDeps=a,e.default=n}(ho)),ho}var Br={},tc;function zb(){if(tc)return Br;tc=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:o,schema:s,data:a,it:c}=n;if((0,t.alwaysValidSchema)(c,s))return;const d=o.name("valid");o.forIn("key",a,u=>{n.setParams({propertyName:u}),n.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},d),o.if((0,e.not)(d),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(d)}};return Br.default=i,Br}var Rr={},nc;function Lp(){if(nc)return Rr;nc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=gt(),t=ye(),r=Rt(),i=_e(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:a,schema:c,parentSchema:d,data:u,errsCount:h,it:y}=s;if(!h)throw new Error("ajv implementation error");const{allErrors:_,opts:b}=y;if(y.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(y,c))return;const g=(0,e.allSchemaProperties)(d.properties),m=(0,e.allSchemaProperties)(d.patternProperties);$(),s.ok((0,t._)`${h} === ${r.default.errors}`);function $(){a.forIn("key",u,I=>{!g.length&&!m.length?S(I):a.if(f(I),()=>S(I))})}function f(I){let O;if(g.length>8){const j=(0,i.schemaRefOrVal)(y,d.properties,"properties");O=(0,e.isOwnProperty)(a,j,I)}else g.length?O=(0,t.or)(...g.map(j=>(0,t._)`${I} === ${j}`)):O=t.nil;return m.length&&(O=(0,t.or)(O,...m.map(j=>(0,t._)`${(0,e.usePattern)(s,j)}.test(${I})`))),(0,t.not)(O)}function v(I){a.code((0,t._)`delete ${u}[${I}]`)}function S(I){if(b.removeAdditional==="all"||b.removeAdditional&&c===!1){v(I);return}if(c===!1){s.setParams({additionalProperty:I}),s.error(),_||a.break();return}if(typeof c=="object"&&!(0,i.alwaysValidSchema)(y,c)){const O=a.name("valid");b.removeAdditional==="failing"?(E(I,O,!1),a.if((0,t.not)(O),()=>{s.reset(),v(I)})):(E(I,O),_||a.if((0,t.not)(O),()=>a.break()))}}function E(I,O,j){const L={keyword:"additionalProperties",dataProp:I,dataPropType:i.Type.Str};j===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(L,O)}}};return Rr.default=o,Rr}var Fr={},rc;function Tb(){if(rc)return Fr;rc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Vi(),t=gt(),r=_e(),i=Lp(),n={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:c,data:d,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(u,i.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(a);for(const m of h)u.definedProperties.add(m);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(h),u.props));const y=h.filter(m=>!(0,r.alwaysValidSchema)(u,a[m]));if(y.length===0)return;const _=s.name("valid");for(const m of y)b(m)?g(m):(s.if((0,t.propertyInData)(s,d,m,u.opts.ownProperties)),g(m),u.allErrors||s.else().var(_,!0),s.endIf()),o.it.definedProperties.add(m),o.ok(_);function b(m){return u.opts.useDefaults&&!u.compositeRule&&a[m].default!==void 0}function g(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},_)}}};return Fr.default=n,Fr}var Lr={},ic;function Pb(){if(ic)return Lr;ic=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),i=_e(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:c,parentSchema:d,it:u}=o,{opts:h}=u,y=(0,e.allSchemaProperties)(a),_=y.filter(S=>(0,r.alwaysValidSchema)(u,a[S]));if(y.length===0||_.length===y.length&&(!u.opts.unevaluated||u.props===!0))return;const b=h.strictSchema&&!h.allowMatchingProperties&&d.properties,g=s.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,i.evaluatedPropsToName)(s,u.props));const{props:m}=u;$();function $(){for(const S of y)b&&f(S),u.allErrors?v(S):(s.var(g,!0),v(S),s.if(g))}function f(S){for(const E in b)new RegExp(S).test(E)&&(0,r.checkStrictMode)(u,`property ${E} matches pattern ${S} (use allowMatchingProperties)`)}function v(S){s.forIn("key",c,E=>{s.if((0,t._)`${(0,e.usePattern)(o,S)}.test(${E})`,()=>{const I=_.includes(S);I||o.subschema({keyword:"patternProperties",schemaProp:S,dataProp:E,dataPropType:i.Type.Str},g),u.opts.unevaluated&&m!==!0?s.assign((0,t._)`${m}[${E}]`,!0):!I&&!u.allErrors&&s.if((0,t.not)(g),()=>s.break())})})}}};return Lr.default=n,Lr}var Zr={},oc;function Db(){if(oc)return Zr;oc=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=_e(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:n,it:o}=r;if((0,e.alwaysValidSchema)(o,n)){r.fail();return}const s=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Zr.default=t,Zr}var Mr={},sc;function Ub(){if(sc)return Mr;sc=1,Object.defineProperty(Mr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:gt().validateUnion,error:{message:"must match a schema in anyOf"}};return Mr.default=t,Mr}var qr={},ac;function Cb(){if(ac)return qr;ac=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:o,schema:s,parentSchema:a,it:c}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const d=s,u=o.let("valid",!1),h=o.let("passing",null),y=o.name("_valid");n.setParams({passing:h}),o.block(_),n.result(u,()=>n.reset(),()=>n.error(!0));function _(){d.forEach((b,g)=>{let m;(0,t.alwaysValidSchema)(c,b)?o.var(y,!0):m=n.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&o.if((0,e._)`${y} && ${u}`).assign(u,!1).assign(h,(0,e._)`[${h}, ${g}]`).else(),o.if(y,()=>{o.assign(u,!0),o.assign(h,g),m&&n.mergeEvaluated(m,e.Name)})})}}};return qr.default=i,qr}var Vr={},uc;function Bb(){if(uc)return Vr;uc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=_e(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:n,it:o}=r;if(!Array.isArray(n))throw new Error("ajv implementation error");const s=i.name("valid");n.forEach((a,c)=>{if((0,e.alwaysValidSchema)(o,a))return;const d=r.subschema({keyword:"allOf",schemaProp:c},s);r.ok(s),r.mergeEvaluated(d)})}};return Vr.default=t,Vr}var Kr={},cc;function Rb(){if(cc)return Kr;cc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:s,parentSchema:a,it:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const d=n(c,"then"),u=n(c,"else");if(!d&&!u)return;const h=s.let("valid",!0),y=s.name("_valid");if(_(),o.reset(),d&&u){const g=s.let("ifClause");o.setParams({ifClause:g}),s.if(y,b("then",g),b("else",g))}else d?s.if(y,b("then")):s.if((0,e.not)(y),b("else"));o.pass(h,()=>o.error(!0));function _(){const g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);o.mergeEvaluated(g)}function b(g,m){return()=>{const $=o.subschema({keyword:g},y);s.assign(h,y),o.mergeValidEvaluated($,h),m?s.assign(m,(0,e._)`${g}`):o.setParams({ifClause:g})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Kr.default=i,Kr}var Jr={},lc;function Fb(){if(lc)return Jr;lc=1,Object.defineProperty(Jr,"__esModule",{value:!0});const e=_e(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:n}){i.if===void 0&&(0,e.checkStrictMode)(n,`"${r}" without "if" is ignored`)}};return Jr.default=t,Jr}var fc;function Lb(){if(fc)return Pr;fc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=Rp(),t=Ob(),r=Fp(),i=xb(),n=jb(),o=Ab(),s=zb(),a=Lp(),c=Tb(),d=Pb(),u=Db(),h=Ub(),y=Cb(),_=Bb(),b=Rb(),g=Fb();function m($=!1){const f=[u.default,h.default,y.default,_.default,b.default,g.default,s.default,a.default,o.default,c.default,d.default];return $?f.push(t.default,i.default):f.push(e.default,r.default),f.push(n.default),f}return Pr.default=m,Pr}var Gr={},Wr={},dc;function Zb(){if(dc)return Wr;dc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ye(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,n){const{gen:o,data:s,$data:a,schema:c,schemaCode:d,it:u}=i,{opts:h,errSchemaPath:y,schemaEnv:_,self:b}=u;if(!h.validateFormats)return;a?g():m();function g(){const $=o.scopeValue("formats",{ref:b.formats,code:h.code.formats}),f=o.const("fDef",(0,e._)`${$}[${d}]`),v=o.let("fType"),S=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(v,(0,e._)`${f}.type || "string"`).assign(S,(0,e._)`${f}.validate`),()=>o.assign(v,(0,e._)`"string"`).assign(S,f)),i.fail$data((0,e.or)(E(),I()));function E(){return h.strictSchema===!1?e.nil:(0,e._)`${d} && !${S}`}function I(){const O=_.$async?(0,e._)`(${f}.async ? await ${S}(${s}) : ${S}(${s}))`:(0,e._)`${S}(${s})`,j=(0,e._)`(typeof ${S} == "function" ? ${O} : ${S}.test(${s}))`;return(0,e._)`${S} && ${S} !== true && ${v} === ${n} && !${j}`}}function m(){const $=b.formats[c];if(!$){E();return}if($===!0)return;const[f,v,S]=I($);f===n&&i.pass(O());function E(){if(h.strictSchema===!1){b.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${y}"`}}function I(j){const L=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,G=o.scopeValue("formats",{key:c,ref:j,code:L});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${G}.validate`]:["string",j,G]}function O(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${s})`}return typeof v=="function"?(0,e._)`${S}(${s})`:(0,e._)`${S}.test(${s})`}}}};return Wr.default=r,Wr}var hc;function Mb(){if(hc)return Gr;hc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const t=[Zb().default];return Gr.default=t,Gr}var Zt={},pc;function qb(){return pc||(pc=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.contentVocabulary=Zt.metadataVocabulary=void 0,Zt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Zt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Zt}var mc;function Vb(){if(mc)return vr;mc=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=mb(),t=Nb(),r=Lb(),i=Mb(),n=qb(),o=[e.default,t.default,(0,r.default)(),i.default,n.metadataVocabulary,n.contentVocabulary];return vr.default=o,vr}var Hr={},Pn={},gc;function Kb(){if(gc)return Pn;gc=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(Pn.DiscrError=e={})),Pn}var yc;function Jb(){if(yc)return Hr;yc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=ye(),t=Kb(),r=Oa(),i=Ki(),n=_e(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:d}})=>(0,e._)`{error: ${a}, tag: ${d}, tagValue: ${c}}`},code(a){const{gen:c,data:d,schema:u,parentSchema:h,it:y}=a,{oneOf:_}=h;if(!y.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=c.let("valid",!1),m=c.const("tag",(0,e._)`${d}${(0,e.getProperty)(b)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>$(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:b})),a.ok(g);function $(){const S=v();c.if(!1);for(const E in S)c.elseIf((0,e._)`${m} === ${E}`),c.assign(g,f(S[E]));c.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:b}),c.endIf()}function f(S){const E=c.name("valid"),I=a.subschema({keyword:"oneOf",schemaProp:S},E);return a.mergeEvaluated(I,e.Name),E}function v(){var S;const E={},I=j(h);let O=!0;for(let Y=0;Y<_.length;Y++){let Q=_[Y];if(Q?.$ref&&!(0,n.schemaHasRulesButRef)(Q,y.self.RULES)){const pe=Q.$ref;if(Q=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,pe),Q instanceof r.SchemaEnv&&(Q=Q.schema),Q===void 0)throw new i.default(y.opts.uriResolver,y.baseId,pe)}const oe=(S=Q?.properties)===null||S===void 0?void 0:S[b];if(typeof oe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);O=O&&(I||j(Q)),L(oe,Y)}if(!O)throw new Error(`discriminator: "${b}" must be required`);return E;function j({required:Y}){return Array.isArray(Y)&&Y.includes(b)}function L(Y,Q){if(Y.const)G(Y.const,Q);else if(Y.enum)for(const oe of Y.enum)G(oe,Q);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function G(Y,Q){if(typeof Y!="string"||Y in E)throw new Error(`discriminator: "${b}" values must be unique strings`);E[Y]=Q}}}};return Hr.default=s,Hr}const Gb="http://json-schema.org/draft-07/schema#",Wb="http://json-schema.org/draft-07/schema#",Hb="Core schema meta-schema",Xb={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Yb=["object","boolean"],Qb={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}};var e_={$schema:Gb,$id:Wb,title:Hb,definitions:Xb,type:Yb,properties:Qb,default:!0},vc;function t_(){return vc||(vc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=db(),i=Vb(),n=Jb(),o=e_,s=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(b,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=Vi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=Na();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var y=Ki();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})}(hr,hr.exports)),hr.exports}var n_=t_();const po=10,$c=(e=0)=>t=>`\x1B[${t+e}m`,bc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_c=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,je={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(je.modifier);const r_=Object.keys(je.color),i_=Object.keys(je.bgColor);[...r_,...i_];function o_(){const e=new Map;for(const[t,r]of Object.entries(je)){for(const[i,n]of Object.entries(r))je[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=je[i],e.set(n[0],n[1]);Object.defineProperty(je,t,{value:r,enumerable:!1})}return Object.defineProperty(je,"codes",{value:e,enumerable:!1}),je.color.close="\x1B[39m",je.bgColor.close="\x1B[49m",je.color.ansi=$c(),je.color.ansi256=bc(),je.color.ansi16m=_c(),je.bgColor.ansi=$c(po),je.bgColor.ansi256=bc(po),je.bgColor.ansi16m=_c(po),Object.defineProperties(je,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));const n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>je.rgbToAnsi256(...je.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;const a=t%36;r=Math.floor(t/36)/5,i=Math.floor(a/6)/5,n=a%6/5}const o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>je.ansi256ToAnsi(je.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>je.ansi256ToAnsi(je.hexToAnsi256(t)),enumerable:!1}}),je}const et=o_();class s_ extends Li{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,state:i,resolvedInputs:n}){const o=new n_.Ajv({strict:!1});this.logger.debug({instanceId:t.id},"validating instance");const s=[];for(const[d,u]of Object.entries(r.args))try{const h=K0(t.args?.[d]);if(!u.required&&h===void 0)continue;o.validate(u.schema,h)||(this.logger.debug({instanceId:t.id,argumentName:d},"invalid argument"),s.push(`Invalid argument "${et.blueBright.open}${d}${et.reset.close}": `+o.errorsText()))}catch(h){this.logger.debug({instanceId:t.id,argumentName:d,error:h},"failed to validate argument"),s.push(`Failed to validate argument "${et.blueBright.open}${d}${et.reset.close}": `+(h instanceof Error?h.message:String(h)))}if(Sa(r))for(const[d,u]of Object.entries(r.secrets))u.required&&!i?.secretNames?.includes(d)&&s.push(`Missing required secret "${et.blueBright.open}${d}${et.reset.close}"`);for(const[d,u]of Object.entries(n))for(const h of u)this.outputs.get(h.input.instanceId)?.status!=="ok"&&s.push(`Invalid input "${et.blueBright.open}${d}${et.reset.close}":
|
|
171
|
+
deps: ${u}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[d,u]=o(c);s(c,d),a(c,u)}};function o({schema:c}){const d={},u={};for(const h in c){if(h==="__proto__")continue;const y=Array.isArray(c[h])?d:u;y[h]=c[h]}return[d,u]}function s(c,d=c.schema){const{gen:u,data:h,it:y}=c;if(Object.keys(d).length===0)return;const _=u.let("missing");for(const b in d){const g=d[b];if(g.length===0)continue;const m=(0,i.propertyInData)(u,h,b,y.opts.ownProperties);c.setParams({property:b,depsCount:g.length,deps:g.join(", ")}),y.allErrors?u.if(m,()=>{for(const $ of g)(0,i.checkReportMissingProp)(c,$)}):(u.if((0,t._)`${m} && (${(0,i.checkMissingProp)(c,g,_)})`),(0,i.reportMissingProp)(c,_),u.else())}}e.validatePropertyDeps=s;function a(c,d=c.schema){const{gen:u,data:h,keyword:y,it:_}=c,b=u.name("valid");for(const g in d)(0,r.alwaysValidSchema)(_,d[g])||(u.if((0,i.propertyInData)(u,h,g,_.opts.ownProperties),()=>{const m=c.subschema({keyword:y,schemaProp:g},b);c.mergeValidEvaluated(m,b)},()=>u.var(b,!0)),c.ok(b))}e.validateSchemaDeps=a,e.default=n}(ho)),ho}var Br={},tc;function Tb(){if(tc)return Br;tc=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:o,schema:s,data:a,it:c}=n;if((0,t.alwaysValidSchema)(c,s))return;const d=o.name("valid");o.forIn("key",a,u=>{n.setParams({propertyName:u}),n.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},d),o.if((0,e.not)(d),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(d)}};return Br.default=i,Br}var Rr={},nc;function Lp(){if(nc)return Rr;nc=1,Object.defineProperty(Rr,"__esModule",{value:!0});const e=gt(),t=ye(),r=Rt(),i=_e(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,t._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:a,schema:c,parentSchema:d,data:u,errsCount:h,it:y}=s;if(!h)throw new Error("ajv implementation error");const{allErrors:_,opts:b}=y;if(y.props=!0,b.removeAdditional!=="all"&&(0,i.alwaysValidSchema)(y,c))return;const g=(0,e.allSchemaProperties)(d.properties),m=(0,e.allSchemaProperties)(d.patternProperties);$(),s.ok((0,t._)`${h} === ${r.default.errors}`);function $(){a.forIn("key",u,I=>{!g.length&&!m.length?S(I):a.if(f(I),()=>S(I))})}function f(I){let O;if(g.length>8){const j=(0,i.schemaRefOrVal)(y,d.properties,"properties");O=(0,e.isOwnProperty)(a,j,I)}else g.length?O=(0,t.or)(...g.map(j=>(0,t._)`${I} === ${j}`)):O=t.nil;return m.length&&(O=(0,t.or)(O,...m.map(j=>(0,t._)`${(0,e.usePattern)(s,j)}.test(${I})`))),(0,t.not)(O)}function v(I){a.code((0,t._)`delete ${u}[${I}]`)}function S(I){if(b.removeAdditional==="all"||b.removeAdditional&&c===!1){v(I);return}if(c===!1){s.setParams({additionalProperty:I}),s.error(),_||a.break();return}if(typeof c=="object"&&!(0,i.alwaysValidSchema)(y,c)){const O=a.name("valid");b.removeAdditional==="failing"?(E(I,O,!1),a.if((0,t.not)(O),()=>{s.reset(),v(I)})):(E(I,O),_||a.if((0,t.not)(O),()=>a.break()))}}function E(I,O,j){const L={keyword:"additionalProperties",dataProp:I,dataPropType:i.Type.Str};j===!1&&Object.assign(L,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(L,O)}}};return Rr.default=o,Rr}var Fr={},rc;function Pb(){if(rc)return Fr;rc=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=Vi(),t=gt(),r=_e(),i=Lp(),n={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,parentSchema:c,data:d,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&i.default.code(new e.KeywordCxt(u,i.default,"additionalProperties"));const h=(0,t.allSchemaProperties)(a);for(const m of h)u.definedProperties.add(m);u.opts.unevaluated&&h.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(s,(0,r.toHash)(h),u.props));const y=h.filter(m=>!(0,r.alwaysValidSchema)(u,a[m]));if(y.length===0)return;const _=s.name("valid");for(const m of y)b(m)?g(m):(s.if((0,t.propertyInData)(s,d,m,u.opts.ownProperties)),g(m),u.allErrors||s.else().var(_,!0),s.endIf()),o.it.definedProperties.add(m),o.ok(_);function b(m){return u.opts.useDefaults&&!u.compositeRule&&a[m].default!==void 0}function g(m){o.subschema({keyword:"properties",schemaProp:m,dataProp:m},_)}}};return Fr.default=n,Fr}var Lr={},ic;function Db(){if(ic)return Lr;ic=1,Object.defineProperty(Lr,"__esModule",{value:!0});const e=gt(),t=ye(),r=_e(),i=_e(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:s,schema:a,data:c,parentSchema:d,it:u}=o,{opts:h}=u,y=(0,e.allSchemaProperties)(a),_=y.filter(S=>(0,r.alwaysValidSchema)(u,a[S]));if(y.length===0||_.length===y.length&&(!u.opts.unevaluated||u.props===!0))return;const b=h.strictSchema&&!h.allowMatchingProperties&&d.properties,g=s.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,i.evaluatedPropsToName)(s,u.props));const{props:m}=u;$();function $(){for(const S of y)b&&f(S),u.allErrors?v(S):(s.var(g,!0),v(S),s.if(g))}function f(S){for(const E in b)new RegExp(S).test(E)&&(0,r.checkStrictMode)(u,`property ${E} matches pattern ${S} (use allowMatchingProperties)`)}function v(S){s.forIn("key",c,E=>{s.if((0,t._)`${(0,e.usePattern)(o,S)}.test(${E})`,()=>{const I=_.includes(S);I||o.subschema({keyword:"patternProperties",schemaProp:S,dataProp:E,dataPropType:i.Type.Str},g),u.opts.unevaluated&&m!==!0?s.assign((0,t._)`${m}[${E}]`,!0):!I&&!u.allErrors&&s.if((0,t.not)(g),()=>s.break())})})}}};return Lr.default=n,Lr}var Zr={},oc;function Ub(){if(oc)return Zr;oc=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=_e(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:i,schema:n,it:o}=r;if((0,e.alwaysValidSchema)(o,n)){r.fail();return}const s=i.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Zr.default=t,Zr}var Mr={},sc;function Cb(){if(sc)return Mr;sc=1,Object.defineProperty(Mr,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:gt().validateUnion,error:{message:"must match a schema in anyOf"}};return Mr.default=t,Mr}var qr={},ac;function Bb(){if(ac)return qr;ac=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:o,schema:s,parentSchema:a,it:c}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const d=s,u=o.let("valid",!1),h=o.let("passing",null),y=o.name("_valid");n.setParams({passing:h}),o.block(_),n.result(u,()=>n.reset(),()=>n.error(!0));function _(){d.forEach((b,g)=>{let m;(0,t.alwaysValidSchema)(c,b)?o.var(y,!0):m=n.subschema({keyword:"oneOf",schemaProp:g,compositeRule:!0},y),g>0&&o.if((0,e._)`${y} && ${u}`).assign(u,!1).assign(h,(0,e._)`[${h}, ${g}]`).else(),o.if(y,()=>{o.assign(u,!0),o.assign(h,g),m&&n.mergeEvaluated(m,e.Name)})})}}};return qr.default=i,qr}var Vr={},uc;function Rb(){if(uc)return Vr;uc=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=_e(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:i,schema:n,it:o}=r;if(!Array.isArray(n))throw new Error("ajv implementation error");const s=i.name("valid");n.forEach((a,c)=>{if((0,e.alwaysValidSchema)(o,a))return;const d=r.subschema({keyword:"allOf",schemaProp:c},s);r.ok(s),r.mergeEvaluated(d)})}};return Vr.default=t,Vr}var Kr={},cc;function Fb(){if(cc)return Kr;cc=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=ye(),t=_e(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:s,parentSchema:a,it:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const d=n(c,"then"),u=n(c,"else");if(!d&&!u)return;const h=s.let("valid",!0),y=s.name("_valid");if(_(),o.reset(),d&&u){const g=s.let("ifClause");o.setParams({ifClause:g}),s.if(y,b("then",g),b("else",g))}else d?s.if(y,b("then")):s.if((0,e.not)(y),b("else"));o.pass(h,()=>o.error(!0));function _(){const g=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},y);o.mergeEvaluated(g)}function b(g,m){return()=>{const $=o.subschema({keyword:g},y);s.assign(h,y),o.mergeValidEvaluated($,h),m?s.assign(m,(0,e._)`${g}`):o.setParams({ifClause:g})}}}};function n(o,s){const a=o.schema[s];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Kr.default=i,Kr}var Jr={},lc;function Lb(){if(lc)return Jr;lc=1,Object.defineProperty(Jr,"__esModule",{value:!0});const e=_e(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:i,it:n}){i.if===void 0&&(0,e.checkStrictMode)(n,`"${r}" without "if" is ignored`)}};return Jr.default=t,Jr}var fc;function Zb(){if(fc)return Pr;fc=1,Object.defineProperty(Pr,"__esModule",{value:!0});const e=Rp(),t=xb(),r=Fp(),i=jb(),n=Ab(),o=zb(),s=Tb(),a=Lp(),c=Pb(),d=Db(),u=Ub(),h=Cb(),y=Bb(),_=Rb(),b=Fb(),g=Lb();function m($=!1){const f=[u.default,h.default,y.default,_.default,b.default,g.default,s.default,a.default,o.default,c.default,d.default];return $?f.push(t.default,i.default):f.push(e.default,r.default),f.push(n.default),f}return Pr.default=m,Pr}var Gr={},Wr={},dc;function Mb(){if(dc)return Wr;dc=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=ye(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,e.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,e._)`{format: ${i}}`},code(i,n){const{gen:o,data:s,$data:a,schema:c,schemaCode:d,it:u}=i,{opts:h,errSchemaPath:y,schemaEnv:_,self:b}=u;if(!h.validateFormats)return;a?g():m();function g(){const $=o.scopeValue("formats",{ref:b.formats,code:h.code.formats}),f=o.const("fDef",(0,e._)`${$}[${d}]`),v=o.let("fType"),S=o.let("format");o.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>o.assign(v,(0,e._)`${f}.type || "string"`).assign(S,(0,e._)`${f}.validate`),()=>o.assign(v,(0,e._)`"string"`).assign(S,f)),i.fail$data((0,e.or)(E(),I()));function E(){return h.strictSchema===!1?e.nil:(0,e._)`${d} && !${S}`}function I(){const O=_.$async?(0,e._)`(${f}.async ? await ${S}(${s}) : ${S}(${s}))`:(0,e._)`${S}(${s})`,j=(0,e._)`(typeof ${S} == "function" ? ${O} : ${S}.test(${s}))`;return(0,e._)`${S} && ${S} !== true && ${v} === ${n} && !${j}`}}function m(){const $=b.formats[c];if(!$){E();return}if($===!0)return;const[f,v,S]=I($);f===n&&i.pass(O());function E(){if(h.strictSchema===!1){b.logger.warn(j());return}throw new Error(j());function j(){return`unknown format "${c}" ignored in schema at path "${y}"`}}function I(j){const L=j instanceof RegExp?(0,e.regexpCode)(j):h.code.formats?(0,e._)`${h.code.formats}${(0,e.getProperty)(c)}`:void 0,G=o.scopeValue("formats",{key:c,ref:j,code:L});return typeof j=="object"&&!(j instanceof RegExp)?[j.type||"string",j.validate,(0,e._)`${G}.validate`]:["string",j,G]}function O(){if(typeof $=="object"&&!($ instanceof RegExp)&&$.async){if(!_.$async)throw new Error("async format in sync schema");return(0,e._)`await ${S}(${s})`}return typeof v=="function"?(0,e._)`${S}(${s})`:(0,e._)`${S}.test(${s})`}}}};return Wr.default=r,Wr}var hc;function qb(){if(hc)return Gr;hc=1,Object.defineProperty(Gr,"__esModule",{value:!0});const t=[Mb().default];return Gr.default=t,Gr}var Zt={},pc;function Vb(){return pc||(pc=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.contentVocabulary=Zt.metadataVocabulary=void 0,Zt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Zt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Zt}var mc;function Kb(){if(mc)return vr;mc=1,Object.defineProperty(vr,"__esModule",{value:!0});const e=gb(),t=Ob(),r=Zb(),i=qb(),n=Vb(),o=[e.default,t.default,(0,r.default)(),i.default,n.metadataVocabulary,n.contentVocabulary];return vr.default=o,vr}var Hr={},Pn={},gc;function Jb(){if(gc)return Pn;gc=1,Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.DiscrError=void 0;var e;return function(t){t.Tag="tag",t.Mapping="mapping"}(e||(Pn.DiscrError=e={})),Pn}var yc;function Gb(){if(yc)return Hr;yc=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=ye(),t=Jb(),r=Oa(),i=Ki(),n=_e(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:d}})=>(0,e._)`{error: ${a}, tag: ${d}, tagValue: ${c}}`},code(a){const{gen:c,data:d,schema:u,parentSchema:h,it:y}=a,{oneOf:_}=h;if(!y.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=u.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const g=c.let("valid",!1),m=c.const("tag",(0,e._)`${d}${(0,e.getProperty)(b)}`);c.if((0,e._)`typeof ${m} == "string"`,()=>$(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:m,tagName:b})),a.ok(g);function $(){const S=v();c.if(!1);for(const E in S)c.elseIf((0,e._)`${m} === ${E}`),c.assign(g,f(S[E]));c.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:m,tagName:b}),c.endIf()}function f(S){const E=c.name("valid"),I=a.subschema({keyword:"oneOf",schemaProp:S},E);return a.mergeEvaluated(I,e.Name),E}function v(){var S;const E={},I=j(h);let O=!0;for(let Y=0;Y<_.length;Y++){let Q=_[Y];if(Q?.$ref&&!(0,n.schemaHasRulesButRef)(Q,y.self.RULES)){const pe=Q.$ref;if(Q=r.resolveRef.call(y.self,y.schemaEnv.root,y.baseId,pe),Q instanceof r.SchemaEnv&&(Q=Q.schema),Q===void 0)throw new i.default(y.opts.uriResolver,y.baseId,pe)}const oe=(S=Q?.properties)===null||S===void 0?void 0:S[b];if(typeof oe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);O=O&&(I||j(Q)),L(oe,Y)}if(!O)throw new Error(`discriminator: "${b}" must be required`);return E;function j({required:Y}){return Array.isArray(Y)&&Y.includes(b)}function L(Y,Q){if(Y.const)G(Y.const,Q);else if(Y.enum)for(const oe of Y.enum)G(oe,Q);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function G(Y,Q){if(typeof Y!="string"||Y in E)throw new Error(`discriminator: "${b}" values must be unique strings`);E[Y]=Q}}}};return Hr.default=s,Hr}const Wb="http://json-schema.org/draft-07/schema#",Hb="http://json-schema.org/draft-07/schema#",Xb="Core schema meta-schema",Yb={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Qb=["object","boolean"],e_={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}};var t_={$schema:Wb,$id:Hb,title:Xb,definitions:Yb,type:Qb,properties:e_,default:!0},vc;function n_(){return vc||(vc=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=hb(),i=Kb(),n=Gb(),o=t_,s=["/properties"],a="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(b,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var d=Vi();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=ye();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=Na();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var y=Ki();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return y.default}})}(hr,hr.exports)),hr.exports}var r_=n_();const po=10,$c=(e=0)=>t=>`\x1B[${t+e}m`,bc=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_c=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,je={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(je.modifier);const i_=Object.keys(je.color),o_=Object.keys(je.bgColor);[...i_,...o_];function s_(){const e=new Map;for(const[t,r]of Object.entries(je)){for(const[i,n]of Object.entries(r))je[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=je[i],e.set(n[0],n[1]);Object.defineProperty(je,t,{value:r,enumerable:!1})}return Object.defineProperty(je,"codes",{value:e,enumerable:!1}),je.color.close="\x1B[39m",je.bgColor.close="\x1B[49m",je.color.ansi=$c(),je.color.ansi256=bc(),je.color.ansi16m=_c(),je.bgColor.ansi=$c(po),je.bgColor.ansi256=bc(po),je.bgColor.ansi16m=_c(po),Object.defineProperties(je,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));const n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>je.rgbToAnsi256(...je.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;const a=t%36;r=Math.floor(t/36)/5,i=Math.floor(a/6)/5,n=a%6/5}const o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>je.ansi256ToAnsi(je.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>je.ansi256ToAnsi(je.hexToAnsi256(t)),enumerable:!1}}),je}const et=s_();class a_ extends Li{getNodeDependencies({resolvedInputs:t}){const r=[];for(const i of Object.values(t))for(const n of i)r.push(n.input.instanceId);return r}processNode({instance:t,component:r,state:i,resolvedInputs:n}){const o=new r_.Ajv({strict:!1});this.logger.debug({instanceId:t.id},"validating instance");const s=[];for(const[d,u]of Object.entries(r.args))try{const h=K0(t.args?.[d]);if(!u.required&&h===void 0)continue;o.validate(u.schema,h)||(this.logger.debug({instanceId:t.id,argumentName:d},"invalid argument"),s.push(`Invalid argument "${et.blueBright.open}${d}${et.reset.close}": `+o.errorsText()))}catch(h){this.logger.debug({instanceId:t.id,argumentName:d,error:h},"failed to validate argument"),s.push(`Failed to validate argument "${et.blueBright.open}${d}${et.reset.close}": `+(h instanceof Error?h.message:String(h)))}if(Sa(r))for(const[d,u]of Object.entries(r.secrets))u.required&&!i?.secretNames?.includes(d)&&s.push(`Missing required secret "${et.blueBright.open}${d}${et.reset.close}"`);for(const[d,u]of Object.entries(n))for(const h of u)this.outputs.get(h.input.instanceId)?.status!=="ok"&&s.push(`Invalid input "${et.blueBright.open}${d}${et.reset.close}":
|
|
172
172
|
"${et.blueBright.open}${h.input.instanceId}${et.reset.close}" has validation errors`);for(const[d,u]of Object.entries(r.inputs))u.required&&(!n[d]||!n[d].length)&&s.push(`Missing required input "${et.blueBright.open}${d}${et.reset.close}" of type "${et.greenBright.open}${u.type}${et.reset.close}"`);if(s.length===0)return{status:"ok"};const a=(s.length+1).toString().length+2;return{status:"error",errorText:s.map((d,u)=>{const h=d.split(`
|
|
173
173
|
`),y=`${u+1}. `;return h.map((_,b)=>`${b===0?y:" ".repeat(a)}${_}`).join(`\r
|
|
174
174
|
`)}).join(`\r
|
|
175
|
-
`)}}}const
|
|
175
|
+
`)}}}const u_={InputResolver:f$,InputHashResolver:G$,ValidationResolver:a_,StateResolver:W$};var Dn={exports:{}},mo,wc;function c_(){if(wc)return mo;wc=1;function e(r){try{return JSON.stringify(r)}catch{return'"[Circular]"'}}mo=t;function t(r,i,n){var o=n&&n.stringify||e,s=1;if(typeof r=="object"&&r!==null){var a=i.length+s;if(a===1)return r;var c=new Array(a);c[0]=o(r);for(var d=1;d<a;d++)c[d]=o(i[d]);return c.join(" ")}if(typeof r!="string")return r;var u=i.length;if(u===0)return r;for(var h="",y=1-s,_=-1,b=r&&r.length||0,g=0;g<b;){if(r.charCodeAt(g)===37&&g+1<b){switch(_=_>-1?_:0,r.charCodeAt(g+1)){case 100:case 102:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Number(i[y]),_=g+2,g++;break;case 105:if(y>=u||i[y]==null)break;_<g&&(h+=r.slice(_,g)),h+=Math.floor(Number(i[y])),_=g+2,g++;break;case 79:case 111:case 106:if(y>=u||i[y]===void 0)break;_<g&&(h+=r.slice(_,g));var m=typeof i[y];if(m==="string"){h+="'"+i[y]+"'",_=g+2,g++;break}if(m==="function"){h+=i[y].name||"<anonymous>",_=g+2,g++;break}h+=o(i[y]),_=g+2,g++;break;case 115:if(y>=u)break;_<g&&(h+=r.slice(_,g)),h+=String(i[y]),_=g+2,g++;break;case 37:_<g&&(h+=r.slice(_,g)),h+="%",_=g+2,g++,y--;break}++y}++g}return _===-1?r:(_<b&&(h+=r.slice(_)),h)}return mo}var kc;function l_(){if(kc)return Dn.exports;kc=1;const e=c_();Dn.exports=u;const t=pe().console||{},r={mapHttpRequest:O,mapHttpResponse:O,wrapRequestSerializer:j,wrapResponseSerializer:j,wrapErrorSerializer:j,req:O,res:O,err:E,errWithCause:E};function i(R,X){return R==="silent"?1/0:X.levels.values[R]}const n=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),s={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function a(R,X){const ie={logger:X,parent:R[o]};X[o]=ie}function c(R,X,ie){const re={};X.forEach(ce=>{re[ce]=ie[ce]?ie[ce]:t[ce]||t[s[ce]||"log"]||L}),R[n]=re}function d(R,X){return Array.isArray(R)?R.filter(function(re){return re!=="!stdSerializers.err"}):R===!0?Object.keys(X):!1}function u(R){R=R||{},R.browser=R.browser||{};const X=R.browser.transmit;if(X&&typeof X.send!="function")throw Error("pino: transmit option must have a send function");const ie=R.browser.write||t;R.browser.write&&(R.browser.asObject=!0);const re=R.serializers||{},ce=d(R.browser.serialize,re);let K=R.browser.serialize;Array.isArray(R.browser.serialize)&&R.browser.serialize.indexOf("!stdSerializers.err")>-1&&(K=!1);const T=Object.keys(R.customLevels||{}),F=["error","fatal","warn","info","debug","trace"].concat(T);typeof ie=="function"&&F.forEach(function(se){ie[se]=ie}),(R.enabled===!1||R.browser.disabled)&&(R.level="silent");const P=R.level||"info",w=Object.create(ie);w.log||(w.log=L),c(w,F,ie),a({},w),Object.defineProperty(w,"levelVal",{get:B}),Object.defineProperty(w,"level",{get:ee,set:te});const x={transmit:X,serialize:ce,asObject:R.browser.asObject,asObjectBindingsOnly:R.browser.asObjectBindingsOnly,formatters:R.browser.formatters,levels:F,timestamp:I(R),messageKey:R.messageKey||"msg",onChild:R.onChild||L};w.levels=h(R),w.level=P,w.isLevelEnabled=function(se){return this.levels.values[se]?this.levels.values[se]>=this.levels.values[this.level]:!1},w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=L,w.serializers=re,w._serialize=ce,w._stdErrSerialize=K,w.child=function(...se){return me.call(this,x,...se)},X&&(w._logEvent=S());function B(){return i(this.level,this)}function ee(){return this._level}function te(se){if(se!=="silent"&&!this.levels.values[se])throw Error("unknown level "+se);this._level=se,b(this,x,w,"error"),b(this,x,w,"fatal"),b(this,x,w,"warn"),b(this,x,w,"info"),b(this,x,w,"debug"),b(this,x,w,"trace"),T.forEach(A=>{b(this,x,w,A)})}function me(se,A,U){if(!A)throw new Error("missing bindings for child Pino");U=U||{},ce&&A.serializers&&(U.serializers=A.serializers);const M=U.serializers;if(ce&&M){var J=Object.assign({},re,M),ne=R.browser.serialize===!0?Object.keys(J):ce;delete A.serializers,f([A],ne,J,this._stdErrSerialize)}function ae(Fe){this._childLevel=(Fe._childLevel|0)+1,this.bindings=A,J&&(this.serializers=J,this._serialize=ne),X&&(this._logEvent=S([].concat(Fe._logEvent.bindings,A)))}ae.prototype=this;const we=new ae(this);return a(this,we),we.child=function(...Fe){return me.call(this,se,...Fe)},we.level=U.level||this.level,se.onChild(we),we}return w}function h(R){const X=R.customLevels||{},ie=Object.assign({},u.levels.values,X),re=Object.assign({},u.levels.labels,y(X));return{values:ie,labels:re}}function y(R){const X={};return Object.keys(R).forEach(function(ie){X[R[ie]]=ie}),X}u.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},u.stdSerializers=r,u.stdTimeFunctions=Object.assign({},{nullTime:G,epochTime:Y,unixTime:Q,isoTime:oe});function _(R){const X=[];R.bindings&&X.push(R.bindings);let ie=R[o];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&X.push(ie.logger.bindings);return X.reverse()}function b(R,X,ie,re){if(Object.defineProperty(R,re,{value:i(R.level,ie)>i(re,ie)?L:ie[n][re],writable:!0,enumerable:!0,configurable:!0}),R[re]===L){if(!X.transmit)return;const K=X.transmit.level||R.level,T=i(K,ie);if(i(re,ie)<T)return}R[re]=m(R,X,ie,re);const ce=_(R);ce.length!==0&&(R[re]=g(ce,R[re]))}function g(R,X){return function(){return X.apply(this,[...R,...arguments])}}function m(R,X,ie,re){return function(ce){return function(){const T=X.timestamp(),F=new Array(arguments.length),P=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var w=0;w<F.length;w++)F[w]=arguments[w];var x=!1;if(X.serialize&&(f(F,this._serialize,this.serializers,this._stdErrSerialize),x=!0),X.asObject||X.formatters?ce.call(P,...$(this,re,F,T,X)):ce.apply(P,F),X.transmit){const B=X.transmit.level||R._level,ee=i(B,ie),te=i(re,ie);if(te<ee)return;v(this,{ts:T,methodLevel:re,methodValue:te,transmitValue:ie.levels.values[X.transmit.level||R._level],send:X.transmit.send,val:i(R._level,ie)},F,x)}}}(R[n][re])}function $(R,X,ie,re,ce){const{level:K,log:T=B=>B}=ce.formatters||{},F=ie.slice();let P=F[0];const w={};let x=(R._childLevel|0)+1;if(x<1&&(x=1),re&&(w.time=re),K){const B=K(X,R.levels.values[X]);Object.assign(w,B)}else w.level=R.levels.values[X];if(ce.asObjectBindingsOnly){if(P!==null&&typeof P=="object")for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());return[T(w),...F]}else{if(P!==null&&typeof P=="object"){for(;x--&&typeof F[0]=="object";)Object.assign(w,F.shift());P=F.length?e(F.shift(),F):void 0}else typeof P=="string"&&(P=e(F.shift(),F));return P!==void 0&&(w[ce.messageKey]=P),[T(w)]}}function f(R,X,ie,re){for(const ce in R)if(re&&R[ce]instanceof Error)R[ce]=u.stdSerializers.err(R[ce]);else if(typeof R[ce]=="object"&&!Array.isArray(R[ce])&&X)for(const K in R[ce])X.indexOf(K)>-1&&K in ie&&(R[ce][K]=ie[K](R[ce][K]))}function v(R,X,ie,re=!1){const ce=X.send,K=X.ts,T=X.methodLevel,F=X.methodValue,P=X.val,w=R._logEvent.bindings;re||f(ie,R._serialize||Object.keys(R.serializers),R.serializers,R._stdErrSerialize===void 0?!0:R._stdErrSerialize),R._logEvent.ts=K,R._logEvent.messages=ie.filter(function(x){return w.indexOf(x)===-1}),R._logEvent.level.label=T,R._logEvent.level.value=F,ce(T,R._logEvent,P),R._logEvent=S(w)}function S(R){return{ts:0,messages:[],bindings:R||[],level:{label:"",value:0}}}function E(R){const X={type:R.constructor.name,msg:R.message,stack:R.stack};for(const ie in R)X[ie]===void 0&&(X[ie]=R[ie]);return X}function I(R){return typeof R.timestamp=="function"?R.timestamp:R.timestamp===!1?G:Y}function O(){return{}}function j(R){return R}function L(){}function G(){return!1}function Y(){return Date.now()}function Q(){return Math.round(Date.now()/1e3)}function oe(){return new Date(Date.now()).toISOString()}function pe(){function R(X){return typeof X<"u"&&X}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return R(self)||R(window)||R(this)||{}}}return Dn.exports.default=u,Dn.exports.pino=u,Dn.exports}var f_=l_();const ei=(e,t)=>{e.postMessage(t)},Wn=new Map,d_=async(e,t,r,i,n=!1)=>{if(Wn.has(r)){console.warn(`state with id "${r}" already exists`);return}const o=f_.pino({level:"info"}).child({resolverId:r,resolverType:i}),s=(d,u)=>{ei(e,{type:"outputs",resolverId:r,items:[{nodeId:d,output:u}]})};let a;n&&(a=(d,u)=>{ei(e,{type:"dependent-set",resolverId:r,nodeId:d,dependents:u&&Array.from(u)})});const c=new u_[i](t,o,s,a);Wn.set(r,{nodes:t,resolver:c,logger:o,abortController:new AbortController}),c.addAllNodesToWorkset(),await c.process(),ei(e,{type:"resolver-ready",resolverId:r})},Zp=(e,t,r)=>{e.abortController.abort(),e.abortController=new AbortController,e.nodes.set(t,r),e.resolver.invalidate(t),e.resolver.process(e.abortController.signal)},h_=(e,t,r)=>{const i=Wn.get(e);if(!i)throw new Error(`Unknown state: ${e}`);i.nodes.set(t,r),Zp(i,t,r)},p_=(e,t)=>{const r=Wn.get(e);if(!r)throw new Error(`Unknown state: ${e}`);r.nodes.delete(t),Zp(r,t,void 0)},m_=e=>{Wn.delete(e)};self.onconnect=e=>{const t=e.ports[0];t.onmessage=r=>{const i=r.data;switch(i.type){case"create-resolver":{const n=new Map(Object.entries(i.nodes));d_(t,n,i.resolverId,i.resolverType,i.syncDependentMap);break}case"update-input":{h_(i.resolverId,i.nodeId,i.node);break}case"delete-input":{p_(i.resolverId,i.nodeId);break}case"dispose-resolver":{m_(i.resolverId);break}}},ei(t,{type:"ready"})};
|