@sockethub/examples 1.0.0-alpha.19 → 1.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/build/_app/immutable/assets/0.C4UYQlfe.css +1 -0
  3. package/build/_app/immutable/chunks/{BWVzoQAP.js → 3J8QMP2Y.js} +1 -1
  4. package/build/_app/immutable/chunks/{BJa-K1HI.js → B9A0qc9a.js} +1 -1
  5. package/build/_app/immutable/chunks/{BFggNCH_.js → BYPKMD8u.js} +1 -1
  6. package/build/_app/immutable/chunks/{Dd3sOYF9.js → BdtHEGL_.js} +1 -1
  7. package/build/_app/immutable/chunks/{C6XyCGtk.js → C7RIZnpe.js} +1 -1
  8. package/build/_app/immutable/chunks/{sOXp0zzN.js → CD2k2u89.js} +1 -1
  9. package/build/_app/immutable/chunks/CbROi3Jn.js +1 -0
  10. package/build/_app/immutable/chunks/{BxTKoTn_.js → Cj_plMLy.js} +1 -1
  11. package/build/_app/immutable/chunks/{B4QvvF9v.js → DKx16QfD.js} +1 -1
  12. package/build/_app/immutable/chunks/{B6vwNo36.js → DRQf9AgU.js} +1 -1
  13. package/build/_app/immutable/chunks/{DHN3DyXv.js → DhdgPWDb.js} +2 -2
  14. package/build/_app/immutable/chunks/{Cfa_Aa1G.js → Dm9HHmcs.js} +1 -1
  15. package/build/_app/immutable/chunks/DwTLqTAf.js +43 -0
  16. package/build/_app/immutable/chunks/{BkzolYRb.js → M4yGBGmj.js} +1 -1
  17. package/build/_app/immutable/chunks/{CUJhLo5A.js → XtX2ckS1.js} +1 -1
  18. package/build/_app/immutable/chunks/hmWg30fU.js +1 -0
  19. package/build/_app/immutable/entry/app.CJ3NoyW-.js +2 -0
  20. package/build/_app/immutable/entry/start.tteBvzOb.js +1 -0
  21. package/build/_app/immutable/nodes/0.BG1tT4ER.js +39 -0
  22. package/build/_app/immutable/nodes/{1.D3qZV2vo.js → 1.QkdmjIv3.js} +1 -1
  23. package/build/_app/immutable/nodes/{2.BysUTzcv.js → 2.DHzfe_7I.js} +2 -2
  24. package/build/_app/immutable/nodes/{8.DQNerIii.js → 3.BgzPo3wO.js} +1 -1
  25. package/build/_app/immutable/nodes/{4.DB8UnEA8.js → 4.BKsANTJg.js} +1 -1
  26. package/build/_app/immutable/nodes/{3.DKJ83Cvw.js → 5.BOOK1ims.js} +1 -1
  27. package/build/_app/immutable/nodes/{5.Cj8bv369.js → 6.Cki5_5wn.js} +1 -1
  28. package/build/_app/immutable/nodes/7.DPbQKnzj.js +1 -0
  29. package/build/_app/immutable/nodes/{7.Bi3xoTlo.js → 8.DfIFUyXA.js} +1 -1
  30. package/build/_app/immutable/nodes/{6.eKf13UwC.js → 9.DG2yRUwB.js} +1 -1
  31. package/build/_app/version.json +1 -1
  32. package/build/caldav.html +12 -12
  33. package/build/carddav.html +38 -0
  34. package/build/dummy.html +12 -12
  35. package/build/feeds.html +12 -12
  36. package/build/index.html +12 -12
  37. package/build/irc.html +12 -12
  38. package/build/metadata.html +12 -12
  39. package/build/xmpp.html +12 -12
  40. package/package.json +6 -3
  41. package/build/_app/immutable/assets/0.liGoyvVW.css +0 -1
  42. package/build/_app/immutable/chunks/BUnlO8zl.js +0 -36
  43. package/build/_app/immutable/chunks/D0ikSVuC.js +0 -1
  44. package/build/_app/immutable/chunks/DvphjqsX.js +0 -1
  45. package/build/_app/immutable/entry/app.DfHa-4d4.js +0 -2
  46. package/build/_app/immutable/entry/start.Bf_hVfxy.js +0 -1
  47. package/build/_app/immutable/nodes/0.Cd2_Nfba.js +0 -39
  48. /package/build/{config.json → examples-config.json} +0 -0
@@ -0,0 +1,43 @@
1
+ var Ac=Object.defineProperty;var jc=(t,e,r)=>e in t?Ac(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ct=(t,e,r)=>jc(t,typeof e!="symbol"?e+"":e,r);import{g as Ta,j as Mc,f as lt,a as Ge,s as st,d as sa,c as or,t as Dc}from"./Dm9HHmcs.js";import"./CbROi3Jn.js";import{z as Un,P as yo,V as Er,B as At,aQ as br,Q as Bn,g as oe,a3 as qc,S as Vc,T as Lc,U as Ia,W as Dr,C as vr,ay as aa,b2 as Uc,aJ as Ca,v as zc,b4 as er,A as xs,E as Fc,_ as Aa,Y as vo,b0 as ia,ag as Kc,b5 as Hc,b6 as Bc,b7 as Gc,w as _o,y as wo,b8 as Es,aY as Gn,a$ as xc,x as Wc,O as Jc,b9 as $o,ba as Qc,t as vt,Z as Xc,bb as Yc,b3 as Zc,aZ as eu,bc as tu,p as tr,s as ze,c as ye,r as me,n as bo,a as rr,u as ut,f as Ot,bd as ru,be as nu,b as kt,o as Ss,e as su,d as pr,h as Ps,ai as au}from"./CD2k2u89.js";import{w as zr,g as iu,c as ou,a as cu}from"./C7RIZnpe.js";import{a as uu,s as lu,i as wt,l as xn,p as _r,d as fu}from"./BYPKMD8u.js";import{s as du,a as qr,e as hu,C as pu}from"./XtX2ckS1.js";import{i as Eo}from"./Cj_plMLy.js";function So(t,e){return e}function mu(t,e,r){for(var n=[],a=e.length,c,s=e.length,u=0;u<a;u++){let w=e[u];wo(w,()=>{if(c){if(c.pending.delete(w),c.done.add(w),c.pending.size===0){var $=t.outrogroups;Ws(ia(c.done)),$.delete(c),$.size===0&&(t.outrogroups=null)}}else s-=1},!1)}if(s===0){var o=n.length===0&&r!==null;if(o){var y=r,f=y.parentNode;xc(f),f.append(y),t.items.clear()}Ws(e,!o)}else c={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(c)}function Ws(t,e=!0){for(var r=0;r<t.length;r++)Wc(t[r],e)}var ja;function Js(t,e,r,n,a,c=null){var s=t,u=new Map,o=(e&$o)!==0;if(o){var y=t;s=At?Er(br(y)):y.appendChild(Un())}At&&Bn();var f=null,w=qc(()=>{var i=r();return Kc(i)?i:i==null?[]:ia(i)}),$,E=!0;function b(){h.fallback=f,gu(h,$,s,e,n),f!==null&&($.length===0?(f.f&er)===0?_o(f):(f.f^=er,Ar(f,null,s)):wo(f,()=>{f=null}))}var S=yo(()=>{$=oe(w);var i=$.length;let d=!1;if(At){var l=Vc(s)===Lc;l!==(i===0)&&(s=Ia(),Er(s),Dr(!1),d=!0)}for(var _=new Set,m=zc,g=Fc(),v=0;v<i;v+=1){At&&vr.nodeType===aa&&vr.data===Uc&&(s=vr,d=!0,Dr(!1));var k=$[v],T=n(k,v),j=E?null:u.get(T);j?(j.v&&Ca(j.v,k),j.i&&Ca(j.i,v),g&&m.skipped_effects.delete(j.e)):(j=yu(u,E?s:ja??(ja=Un()),k,T,v,a,e,r),E||(j.e.f|=er),u.set(T,j)),_.add(T)}if(i===0&&c&&!f&&(E?f=xs(()=>c(s)):(f=xs(()=>c(ja??(ja=Un()))),f.f|=er)),At&&i>0&&Er(Ia()),!E)if(g){for(const[V,q]of u)_.has(V)||m.skipped_effects.add(q.e);m.oncommit(b),m.ondiscard(()=>{})}else b();d&&Dr(!0),oe(w)}),h={effect:S,items:u,outrogroups:null,fallback:f};E=!1,At&&(s=vr)}function gu(t,e,r,n,a){var j,V,q,W,x,te,ue,ve,fe;var c=(n&Qc)!==0,s=e.length,u=t.items,o=t.effect.first,y,f=null,w,$=[],E=[],b,S,h,i;if(c)for(i=0;i<s;i+=1)b=e[i],S=a(b,i),h=u.get(S).e,(h.f&er)===0&&((V=(j=h.nodes)==null?void 0:j.a)==null||V.measure(),(w??(w=new Set)).add(h));for(i=0;i<s;i+=1){if(b=e[i],S=a(b,i),h=u.get(S).e,t.outrogroups!==null)for(const ae of t.outrogroups)ae.pending.delete(h),ae.done.delete(h);if((h.f&er)!==0)if(h.f^=er,h===o)Ar(h,null,r);else{var d=f?f.next:o;h===t.effect.last&&(t.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),ar(t,f,h),ar(t,h,d),Ar(h,d,r),f=h,$=[],E=[],o=f.next;continue}if((h.f&Es)!==0&&(_o(h),c&&((W=(q=h.nodes)==null?void 0:q.a)==null||W.unfix(),(w??(w=new Set)).delete(h))),h!==o){if(y!==void 0&&y.has(h)){if($.length<E.length){var l=E[0],_;f=l.prev;var m=$[0],g=$[$.length-1];for(_=0;_<$.length;_+=1)Ar($[_],l,r);for(_=0;_<E.length;_+=1)y.delete(E[_]);ar(t,m.prev,g.next),ar(t,f,m),ar(t,g,l),o=l,f=g,i-=1,$=[],E=[]}else y.delete(h),Ar(h,o,r),ar(t,h.prev,h.next),ar(t,h,f===null?t.effect.first:f.next),ar(t,f,h),f=h;continue}for($=[],E=[];o!==null&&o!==h;)(y??(y=new Set)).add(o),E.push(o),o=o.next;if(o===null)continue}(h.f&er)===0&&$.push(h),f=h,o=h.next}if(t.outrogroups!==null){for(const ae of t.outrogroups)ae.pending.size===0&&(Ws(ia(ae.done)),(x=t.outrogroups)==null||x.delete(ae));t.outrogroups.size===0&&(t.outrogroups=null)}if(o!==null||y!==void 0){var v=[];if(y!==void 0)for(h of y)(h.f&Es)===0&&v.push(h);for(;o!==null;)(o.f&Es)===0&&o!==t.fallback&&v.push(o),o=o.next;var k=v.length;if(k>0){var T=(n&$o)!==0&&s===0?r:null;if(c){for(i=0;i<k;i+=1)(ue=(te=v[i].nodes)==null?void 0:te.a)==null||ue.measure();for(i=0;i<k;i+=1)(fe=(ve=v[i].nodes)==null?void 0:ve.a)==null||fe.fix()}mu(t,v,T)}}c&&Jc(()=>{var ae,L;if(w!==void 0)for(h of w)(L=(ae=h.nodes)==null?void 0:ae.a)==null||L.apply()})}function yu(t,e,r,n,a,c,s,u){var o=(s&Hc)!==0?(s&Bc)===0?vo(r,!1,!1):Aa(r):null,y=(s&Gc)!==0?Aa(a):null;return{v:o,i:y,e:xs(()=>(c(e,o??r,y??a,u),()=>{t.delete(n)}))}}function Ar(t,e,r){if(t.nodes)for(var n=t.nodes.start,a=t.nodes.end,c=e&&(e.f&er)===0?e.nodes.start:r;n!==null;){var s=Gn(n);if(c.before(n),n===a)return;n=s}}function ar(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function vu(t,e,r=!1,n=!1,a=!1){var c=t,s="";vt(()=>{var u=Xc;if(s===(s=e()??"")){At&&Bn();return}if(u.nodes!==null&&(Yc(u.nodes.start,u.nodes.end),u.nodes=null),s!==""){if(At){vr.data;for(var o=Bn(),y=o;o!==null&&(o.nodeType!==aa||o.data!=="");)y=o,o=Gn(o);if(o===null)throw Zc(),eu;Ta(vr,y),c=Er(o);return}var f=s+"";r?f=`<svg>${f}</svg>`:n&&(f=`<math>${f}</math>`);var w=Mc(f);if((r||n)&&(w=br(w)),Ta(br(w),w.lastChild),r||n)for(;br(w);)c.before(br(w));else c.before(w)}})}function _u(t,e,r,n,a){var u;At&&Bn();var c=(u=e.$$slots)==null?void 0:u[r],s=!1;c===!0&&(c=e.children,s=!0),c===void 0?a!==null&&a(t):c(t,s?()=>n:n)}function wu(t,e){let r=null,n=At;var a;if(At){r=vr;for(var c=br(document.head);c!==null&&(c.nodeType!==aa||c.data!==t);)c=Gn(c);if(c===null)Dr(!1);else{var s=Gn(c);c.remove(),Er(s)}}At||(a=document.head.appendChild(Un()));try{yo(()=>e(a),tu)}finally{n&&(Dr(!0),Er(r))}}const Qs=zr([]),Xr=new Map;function Po(t,e=!1){var r,n,a;if(console.log("displayMessage called:",{type:t.type,platform:Jn(t["@context"]),isResponse:e,actor:t.actor,content:(r=t.object)==null?void 0:r.content}),t.type==="send"&&((n=t.object)==null?void 0:n.type)==="message"){const c=typeof t.actor=="string"?t.actor:((a=t.actor)==null?void 0:a.name)||"",s=t.object.content||"",u=`${c}:${s}`,o=Date.now(),y=Xr.get(u);if(y&&o-y<2e3){console.log("Skipping duplicate message:",u);return}Xr.set(u,o);for(const[f,w]of Xr)o-w>5e3&&Xr.delete(f);Qs.set([...iu(Qs),[c,s]]),console.log("Message displayed:",{actorName:c,content:s,isResponse:e,platform:Jn(t["@context"])})}}var $u=lt("<li> </li>"),bu=lt('<div><label for="incomingMessagesContainer" class="text-gray-900 font-bold">Incoming Messages</label> <div id="incomingMessagesContainer" class="incoming-messages-container w-full"><ui class="incoming-messages"></ui> <div class="incoming-messages-anchor"></div></div></div>');function mm(t,e){tr(e,!1);const r=()=>uu(Qs,"$messages",n),[n,a]=lu();Eo();var c=bu(),s=ze(ye(c),2),u=ye(s);Js(u,5,r,So,(o,y)=>{var f=$u(),w=ye(f);me(f),vt(()=>st(w,`${oe(y)[0]??""}: ${oe(y)[1]??""}`)),Ge(o,f)}),me(u),bo(2),me(s),me(c),Ge(t,c),rr(),a()}function Eu(t,e,r){var a,c,s;const n=((a=e[r])==null?void 0:a.requestId)??r;return{sent:(c=t[n])==null?void 0:c[0],response:(s=t[r])==null?void 0:s[1]}}var Su=lt("<span> </span>");function oa(t,e){tr(e,!0);const r=ut(()=>Jn(e.entry["@context"]));var n=Su(),a=ye(n);me(n),vt(()=>st(a,`[${oe(r)??"unknown"??""}:${e.entry.type??""}]`)),Ge(t,n),rr()}var Pu=lt("<!> <span> </span> <span> </span>",1);function ku(t,e){tr(e,!0);var r=Pu(),n=Ot(r);oa(n,{get entry(){return e.entry}});var a=ze(n,2),c=ye(a);me(a);var s=ze(a,2),u=ye(s,!0);me(s),vt(()=>{var o,y,f;st(c,`#${e.id??""}
2
+ ${(typeof e.entry.actor=="string"?e.entry.actor:((o=e.entry.actor)==null?void 0:o.name)||((y=e.entry.actor)==null?void 0:y.id))??""}:`),st(u,((f=e.entry.object)==null?void 0:f.content)||"")}),Ge(t,r),rr()}var Ou=lt('<span class="font-medium">📰 Fetched feed:</span> <span> </span> <span class="text-gray-500"> </span>',1),Nu=lt("<span> </span>"),Ru=lt('<span class="text-gray-500 text-xs italic"> </span>'),Tu=lt('<span class="text-gray-500"> </span> <!> <span><a rel="noreferrer" target="_blank" class="text-blue-600 hover:text-blue-800 underline"> </a></span> <!>',1),Iu=lt("<!> <!>",1);function Cu(t,e){tr(e,!0);const r=ut(()=>e.entry.totalItems!==void 0),n=ut(()=>{var f;return oe(r)?e.entry.summary:(f=e.entry.object)==null?void 0:f.url}),a=ut(()=>{var f,w;return typeof e.entry.actor=="string"?e.entry.actor:((f=e.entry.actor)==null?void 0:f.name)||((w=e.entry.actor)==null?void 0:w.id)});var c=Iu(),s=Ot(c);oa(s,{get entry(){return e.entry}});var u=ze(s,2);{var o=f=>{var w=Ou(),$=ze(Ot(w),2),E=ye($,!0);me($);var b=ze($,2),S=ye(b);me(b),vt(()=>{st(E,oe(n)),st(S,`(${e.entry.totalItems??""} ${e.entry.totalItems===1?"item":"items"})`)}),Ge(f,w)},y=f=>{var w=Tu(),$=Ot(w),E=ye($);me($);var b=ze($,2);{var S=m=>{var g=Nu(),v=ye(g);me(g),vt(()=>st(v,`${oe(a)??""}:`)),Ge(m,g)};wt(b,m=>{oe(a)&&m(S)})}var h=ze(b,2),i=ye(h),d=ye(i,!0);me(i),me(h);var l=ze(h,2);{var _=m=>{var g=Ru(),v=ye(g,!0);me(g),vt(k=>st(v,k),[()=>{var k;return(k=e.entry.object)==null?void 0:k.published.split("T")[0]}]),Ge(m,g)};wt(l,m=>{var g;(g=e.entry.object)!=null&&g.published&&m(_)})}vt(()=>{var m,g,v;st(E,`#${e.id??""}`),du(i,"href",(m=e.entry.object)==null?void 0:m.url),st(d,((g=e.entry.object)==null?void 0:g.title)||(typeof e.entry.target=="string"?e.entry.target:(v=e.entry.target)==null?void 0:v.id))}),Ge(f,w)};wt(u,f=>{oe(r)?f(o):f(y,!1)})}Ge(t,c),rr()}var Au=lt("<!> <span> </span>",1);function ju(t,e){tr(e,!0);var r=Au(),n=Ot(r);oa(n,{get entry(){return e.entry}});var a=ze(n,2),c=ye(a);me(a),vt(()=>{var s,u;return st(c,`#${e.id??""}
3
+ ${(typeof e.entry.actor=="string"?e.entry.actor:((s=e.entry.actor)==null?void 0:s.name)||((u=e.entry.actor)==null?void 0:u.id))??""}`)}),Ge(t,r),rr()}var Mu=lt('<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full"> </span>'),Du=lt('<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs font-medium rounded-full"> </span>'),qu=lt('<div class="mt-2 p-3 bg-red-50 border border-red-200 rounded-lg"><div class="flex items-center space-x-2"><svg class="w-4 h-4 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="text-red-800 font-medium text-sm">Error:</span> <span class="text-red-700 text-sm"> </span></div></div>'),Vu=lt('<li class="p-4 hover:bg-gray-50 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-2"><div class="flex items-center space-x-2"><span class="text-sm font-semibold text-gray-700"> </span> <!> <!></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <div class="text-sm text-gray-600"><!></div> <!></div></div></li>');function Ma(t,e){tr(e,!0);const r=ut(()=>Jn(e.entry["@context"])),n=ut(()=>e.timestamp?new Date(e.timestamp).toLocaleTimeString():""),a=ut(()=>e.hasSend&&e.hasResponse?"Sent → Response OK":e.hasSend?"Sent → Awaiting response":""),c=ut(()=>e.hasSend&&e.hasResponse?"bg-green-500":e.hasSend?"bg-orange-400":"bg-green-500");var s=Vu(),u=ye(s),o=ye(u),y=ye(o),f=ze(y,2),w=ye(f,!0);me(f),me(o);var $=ze(o,2),E=ye($),b=ye(E),S=ye(b),h=ye(S,!0);me(S);var i=ze(S,2);{var d=q=>{var W=Mu(),x=ye(W,!0);me(W),vt(te=>st(x,te),[()=>oe(r).toUpperCase()]),Ge(q,W)};wt(i,q=>{oe(r)&&q(d)})}var l=ze(i,2);{var _=q=>{var W=Du(),x=ye(W,!0);me(W),vt(()=>st(x,e.entry.type)),Ge(q,W)};wt(l,q=>{e.entry.type&&q(_)})}me(b);var m=ze(b,2);m.__click=function(...q){var W;(W=e.buttonAction)==null||W.apply(this,q)},me(E);var g=ze(E,2),v=ye(g);{var k=q=>{ku(q,{get id(){return e.id},get entry(){return e.entry}})},T=q=>{var W=or(),x=Ot(W);{var te=ve=>{Cu(ve,{get id(){return e.id},get entry(){return e.entry}})},ue=ve=>{ju(ve,{get id(){return e.id},get entry(){return e.entry}})};wt(x,ve=>{oe(r)==="feeds"?ve(te):ve(ue,!1)},!0)}Ge(q,W)};wt(v,q=>{oe(r)==="dummy"?q(k):q(T,!1)})}me(g);var j=ze(g,2);{var V=q=>{var W=qu(),x=ye(W),te=ze(ye(x),4),ue=ye(te,!0);me(te),me(x),me(W),vt(()=>st(ue,e.entry.error)),Ge(q,W)};wt(j,q=>{e.entry.error&&q(V)})}me($),me(u),me(s),vt(()=>{qr(y,1,`w-3 h-3 ${oe(c)??""} rounded-full`),st(w,oe(n)||`#${e.id}`),st(h,oe(a))}),Ge(t,s),rr()}sa(["click"]);var Lu=lt('<div class="mt-2 p-2 bg-red-50 border border-red-200 rounded-lg"><span class="text-red-700 text-xs"> </span></div>'),Uu=lt('<li class="p-4 hover:bg-indigo-50/40 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-1"><div class="flex items-center space-x-2"><span> </span></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <p class="text-sm text-gray-600 truncate"> </p> <!></div></div></li>');function zu(t,e){tr(e,!0);const r={schemas:{label:"Schemas Received",color:"text-indigo-800",bg:"bg-indigo-100"},ready:{label:"Client Ready",color:"text-emerald-800",bg:"bg-emerald-100"},init_error:{label:"Init Error",color:"text-red-800",bg:"bg-red-100"}},n=ut(()=>r[e.entry._logType]??r.schemas);function a(v){if(!v||typeof v!="object")return"";const k=v;if(e.entry._logType==="schemas"){const j=(Array.isArray(k.platforms)?k.platforms:[]).map(q=>q==null?void 0:q.id).filter(Boolean);return`v${typeof k.version=="string"?k.version:""} — ${j.length} platform${j.length!==1?"s":""}: ${j.join(", ")}`}if(e.entry._logType==="ready"){const T=typeof k.reason=="string"?k.reason:"",j=typeof k.sockethubVersion=="string"?k.sockethubVersion:"",V=Array.isArray(k.platforms)?k.platforms.length:0;return`${T} — Sockethub v${j}, ${V} platform${V!==1?"s":""}`}if(e.entry._logType==="init_error"){const T=typeof k.error=="string"?k.error:"unknown",j=typeof k.phase=="string"?k.phase:"",V=k.retrying?" (retrying)":"";return`${j}: ${T}${V}`}return JSON.stringify(v).slice(0,120)}const c=ut(()=>a(e.entry.payload)),s=ut(()=>new Date(e.entry._timestamp).toLocaleTimeString());var u=Uu(),o=ye(u),y=ye(o),f=ye(y),w=ze(f,2),$=ye(w,!0);me(w),me(y);var E=ze(y,2),b=ye(E),S=ye(b),h=ye(S),i=ye(h,!0);me(h),me(S);var d=ze(S,2);d.__click=function(...v){var k;(k=e.buttonAction)==null||k.apply(this,v)},me(b);var l=ze(b,2),_=ye(l,!0);me(l);var m=ze(l,2);{var g=v=>{var k=Lu(),T=ye(k),j=ye(T,!0);me(T),me(k),vt(()=>{var V;return st(j,((V=e.entry.payload)==null?void 0:V.error)??"")}),Ge(v,k)};wt(m,v=>{e.entry._logType==="init_error"&&v(g)})}me(E),me(o),me(u),vt(()=>{qr(f,1,`w-3 h-3 ${e.entry._logType==="init_error"?"bg-red-500":"bg-indigo-500"} rounded-full`),st($,oe(s)),qr(h,1,`px-2 py-1 ${oe(n).bg??""} ${oe(n).color??""} text-xs font-semibold rounded-full`),st(i,oe(n).label),st(_,oe(c))}),Ge(t,u),rr()}sa(["click"]);function ko(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ks,Da;function Fu(){if(Da)return ks;Da=1;function t(K){return K instanceof Map?K.clear=K.delete=K.set=function(){throw new Error("map is read-only")}:K instanceof Set&&(K.add=K.clear=K.delete=function(){throw new Error("set is read-only")}),Object.freeze(K),Object.getOwnPropertyNames(K).forEach(ee=>{const ie=K[ee],ke=typeof ie;(ke==="object"||ke==="function")&&!Object.isFrozen(ie)&&t(ie)}),K}class e{constructor(ee){ee.data===void 0&&(ee.data={}),this.data=ee.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(K){return K.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function n(K,...ee){const ie=Object.create(null);for(const ke in K)ie[ke]=K[ke];return ee.forEach(function(ke){for(const et in ke)ie[et]=ke[et]}),ie}const a="</span>",c=K=>!!K.scope,s=(K,{prefix:ee})=>{if(K.startsWith("language:"))return K.replace("language:","language-");if(K.includes(".")){const ie=K.split(".");return[`${ee}${ie.shift()}`,...ie.map((ke,et)=>`${ke}${"_".repeat(et+1)}`)].join(" ")}return`${ee}${K}`};class u{constructor(ee,ie){this.buffer="",this.classPrefix=ie.classPrefix,ee.walk(this)}addText(ee){this.buffer+=r(ee)}openNode(ee){if(!c(ee))return;const ie=s(ee.scope,{prefix:this.classPrefix});this.span(ie)}closeNode(ee){c(ee)&&(this.buffer+=a)}value(){return this.buffer}span(ee){this.buffer+=`<span class="${ee}">`}}const o=(K={})=>{const ee={children:[]};return Object.assign(ee,K),ee};class y{constructor(){this.rootNode=o(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ee){this.top.children.push(ee)}openNode(ee){const ie=o({scope:ee});this.add(ie),this.stack.push(ie)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ee){return this.constructor._walk(ee,this.rootNode)}static _walk(ee,ie){return typeof ie=="string"?ee.addText(ie):ie.children&&(ee.openNode(ie),ie.children.forEach(ke=>this._walk(ee,ke)),ee.closeNode(ie)),ee}static _collapse(ee){typeof ee!="string"&&ee.children&&(ee.children.every(ie=>typeof ie=="string")?ee.children=[ee.children.join("")]:ee.children.forEach(ie=>{y._collapse(ie)}))}}class f extends y{constructor(ee){super(),this.options=ee}addText(ee){ee!==""&&this.add(ee)}startScope(ee){this.openNode(ee)}endScope(){this.closeNode()}__addSublanguage(ee,ie){const ke=ee.root;ie&&(ke.scope=`language:${ie}`),this.add(ke)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function w(K){return K?typeof K=="string"?K:K.source:null}function $(K){return S("(?=",K,")")}function E(K){return S("(?:",K,")*")}function b(K){return S("(?:",K,")?")}function S(...K){return K.map(ie=>w(ie)).join("")}function h(K){const ee=K[K.length-1];return typeof ee=="object"&&ee.constructor===Object?(K.splice(K.length-1,1),ee):{}}function i(...K){return"("+(h(K).capture?"":"?:")+K.map(ke=>w(ke)).join("|")+")"}function d(K){return new RegExp(K.toString()+"|").exec("").length-1}function l(K,ee){const ie=K&&K.exec(ee);return ie&&ie.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function m(K,{joinWith:ee}){let ie=0;return K.map(ke=>{ie+=1;const et=ie;let rt=w(ke),he="";for(;rt.length>0;){const le=_.exec(rt);if(!le){he+=rt;break}he+=rt.substring(0,le.index),rt=rt.substring(le.index+le[0].length),le[0][0]==="\\"&&le[1]?he+="\\"+String(Number(le[1])+et):(he+=le[0],le[0]==="("&&ie++)}return he}).map(ke=>`(${ke})`).join(ee)}const g=/\b\B/,v="[a-zA-Z]\\w*",k="[a-zA-Z_]\\w*",T="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",V="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",W=(K={})=>{const ee=/^#![ ]*\//;return K.binary&&(K.begin=S(ee,/.*\b/,K.binary,/\b.*/)),n({scope:"meta",begin:ee,end:/$/,relevance:0,"on:begin":(ie,ke)=>{ie.index!==0&&ke.ignoreMatch()}},K)},x={begin:"\\\\[\\s\\S]",relevance:0},te={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[x]},ue={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[x]},ve={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},fe=function(K,ee,ie={}){const ke=n({scope:"comment",begin:K,end:ee,contains:[]},ie);ke.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const et=i("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return ke.contains.push({begin:S(/[ ]+/,"(",et,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ke},ae=fe("//","$"),L=fe("/\\*","\\*/"),O=fe("#","$"),A={scope:"number",begin:T,relevance:0},R={scope:"number",begin:j,relevance:0},p={scope:"number",begin:V,relevance:0},P={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[x,{begin:/\[/,end:/\]/,relevance:0,contains:[x]}]},C={scope:"title",begin:v,relevance:0},B={scope:"title",begin:k,relevance:0},G={begin:"\\.\\s*"+k,relevance:0};var Z=Object.freeze({__proto__:null,APOS_STRING_MODE:te,BACKSLASH_ESCAPE:x,BINARY_NUMBER_MODE:p,BINARY_NUMBER_RE:V,COMMENT:fe,C_BLOCK_COMMENT_MODE:L,C_LINE_COMMENT_MODE:ae,C_NUMBER_MODE:R,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(K){return Object.assign(K,{"on:begin":(ee,ie)=>{ie.data._beginMatch=ee[1]},"on:end":(ee,ie)=>{ie.data._beginMatch!==ee[1]&&ie.ignoreMatch()}})},HASH_COMMENT_MODE:O,IDENT_RE:v,MATCH_NOTHING_RE:g,METHOD_GUARD:G,NUMBER_MODE:A,NUMBER_RE:T,PHRASAL_WORDS_MODE:ve,QUOTE_STRING_MODE:ue,REGEXP_MODE:P,RE_STARTERS_RE:q,SHEBANG:W,TITLE_MODE:C,UNDERSCORE_IDENT_RE:k,UNDERSCORE_TITLE_MODE:B});function F(K,ee){K.input[K.index-1]==="."&&ee.ignoreMatch()}function N(K,ee){K.className!==void 0&&(K.scope=K.className,delete K.className)}function I(K,ee){ee&&K.beginKeywords&&(K.begin="\\b("+K.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",K.__beforeBegin=F,K.keywords=K.keywords||K.beginKeywords,delete K.beginKeywords,K.relevance===void 0&&(K.relevance=0))}function M(K,ee){Array.isArray(K.illegal)&&(K.illegal=i(...K.illegal))}function U(K,ee){if(K.match){if(K.begin||K.end)throw new Error("begin & end are not supported with match");K.begin=K.match,delete K.match}}function J(K,ee){K.relevance===void 0&&(K.relevance=1)}const ne=(K,ee)=>{if(!K.beforeMatch)return;if(K.starts)throw new Error("beforeMatch cannot be used with starts");const ie=Object.assign({},K);Object.keys(K).forEach(ke=>{delete K[ke]}),K.keywords=ie.keywords,K.begin=S(ie.beforeMatch,$(ie.begin)),K.starts={relevance:0,contains:[Object.assign(ie,{endsParent:!0})]},K.relevance=0,delete ie.beforeMatch},_e=["of","and","for","in","not","or","if","then","parent","list","value"],Pe="keyword";function Ee(K,ee,ie=Pe){const ke=Object.create(null);return typeof K=="string"?et(ie,K.split(" ")):Array.isArray(K)?et(ie,K):Object.keys(K).forEach(function(rt){Object.assign(ke,Ee(K[rt],ee,rt))}),ke;function et(rt,he){ee&&(he=he.map(le=>le.toLowerCase())),he.forEach(function(le){const Se=le.split("|");ke[Se[0]]=[rt,$e(Se[0],Se[1])]})}}function $e(K,ee){return ee?Number(ee):be(K)?0:1}function be(K){return _e.includes(K.toLowerCase())}const Ne={},Ie=K=>{console.error(K)},pt=(K,...ee)=>{console.log(`WARN: ${K}`,...ee)},xe=(K,ee)=>{Ne[`${K}/${ee}`]||(console.log(`Deprecated as of ${K}. ${ee}`),Ne[`${K}/${ee}`]=!0)},dt=new Error;function $t(K,ee,{key:ie}){let ke=0;const et=K[ie],rt={},he={};for(let le=1;le<=ee.length;le++)he[le+ke]=et[le],rt[le+ke]=!0,ke+=d(ee[le-1]);K[ie]=he,K[ie]._emit=rt,K[ie]._multi=!0}function ot(K){if(Array.isArray(K.begin)){if(K.skip||K.excludeBegin||K.returnBegin)throw Ie("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),dt;if(typeof K.beginScope!="object"||K.beginScope===null)throw Ie("beginScope must be object"),dt;$t(K,K.begin,{key:"beginScope"}),K.begin=m(K.begin,{joinWith:""})}}function bt(K){if(Array.isArray(K.end)){if(K.skip||K.excludeEnd||K.returnEnd)throw Ie("skip, excludeEnd, returnEnd not compatible with endScope: {}"),dt;if(typeof K.endScope!="object"||K.endScope===null)throw Ie("endScope must be object"),dt;$t(K,K.end,{key:"endScope"}),K.end=m(K.end,{joinWith:""})}}function Kr(K){K.scope&&typeof K.scope=="object"&&K.scope!==null&&(K.beginScope=K.scope,delete K.scope)}function Hr(K){Kr(K),typeof K.beginScope=="string"&&(K.beginScope={_wrap:K.beginScope}),typeof K.endScope=="string"&&(K.endScope={_wrap:K.endScope}),ot(K),bt(K)}function dr(K){function ee(he,le){return new RegExp(w(he),"m"+(K.case_insensitive?"i":"")+(K.unicodeRegex?"u":"")+(le?"g":""))}class ie{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(le,Se){Se.position=this.position++,this.matchIndexes[this.matchAt]=Se,this.regexes.push([Se,le]),this.matchAt+=d(le)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const le=this.regexes.map(Se=>Se[1]);this.matcherRe=ee(m(le,{joinWith:"|"}),!0),this.lastIndex=0}exec(le){this.matcherRe.lastIndex=this.lastIndex;const Se=this.matcherRe.exec(le);if(!Se)return null;const ft=Se.findIndex((D,H)=>H>0&&D!==void 0),z=this.matchIndexes[ft];return Se.splice(0,ft),Object.assign(Se,z)}}class ke{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(le){if(this.multiRegexes[le])return this.multiRegexes[le];const Se=new ie;return this.rules.slice(le).forEach(([ft,z])=>Se.addRule(ft,z)),Se.compile(),this.multiRegexes[le]=Se,Se}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(le,Se){this.rules.push([le,Se]),Se.type==="begin"&&this.count++}exec(le){const Se=this.getMatcher(this.regexIndex);Se.lastIndex=this.lastIndex;let ft=Se.exec(le);if(this.resumingScanAtSamePosition()&&!(ft&&ft.index===this.lastIndex)){const z=this.getMatcher(0);z.lastIndex=this.lastIndex+1,ft=z.exec(le)}return ft&&(this.regexIndex+=ft.position+1,this.regexIndex===this.count&&this.considerAll()),ft}}function et(he){const le=new ke;return he.contains.forEach(Se=>le.addRule(Se.begin,{rule:Se,type:"begin"})),he.terminatorEnd&&le.addRule(he.terminatorEnd,{type:"end"}),he.illegal&&le.addRule(he.illegal,{type:"illegal"}),le}function rt(he,le){const Se=he;if(he.isCompiled)return Se;[N,U,Hr,ne].forEach(z=>z(he,le)),K.compilerExtensions.forEach(z=>z(he,le)),he.__beforeBegin=null,[I,M,J].forEach(z=>z(he,le)),he.isCompiled=!0;let ft=null;return typeof he.keywords=="object"&&he.keywords.$pattern&&(he.keywords=Object.assign({},he.keywords),ft=he.keywords.$pattern,delete he.keywords.$pattern),ft=ft||/\w+/,he.keywords&&(he.keywords=Ee(he.keywords,K.case_insensitive)),Se.keywordPatternRe=ee(ft,!0),le&&(he.begin||(he.begin=/\B|\b/),Se.beginRe=ee(Se.begin),!he.end&&!he.endsWithParent&&(he.end=/\B|\b/),he.end&&(Se.endRe=ee(Se.end)),Se.terminatorEnd=w(Se.end)||"",he.endsWithParent&&le.terminatorEnd&&(Se.terminatorEnd+=(he.end?"|":"")+le.terminatorEnd)),he.illegal&&(Se.illegalRe=ee(he.illegal)),he.contains||(he.contains=[]),he.contains=[].concat(...he.contains.map(function(z){return vs(z==="self"?he:z)})),he.contains.forEach(function(z){rt(z,Se)}),he.starts&&rt(he.starts,le),Se.matcher=et(Se),Se}if(K.compilerExtensions||(K.compilerExtensions=[]),K.contains&&K.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return K.classNameAliases=n(K.classNameAliases||{}),rt(K)}function Pr(K){return K?K.endsWithParent||Pr(K.starts):!1}function vs(K){return K.variants&&!K.cachedVariants&&(K.cachedVariants=K.variants.map(function(ee){return n(K,{variants:null},ee)})),K.cachedVariants?K.cachedVariants:Pr(K)?n(K,{starts:K.starts?n(K.starts):null}):Object.isFrozen(K)?n(K):K}var Br="11.11.1";class Rt extends Error{constructor(ee,ie){super(ee),this.name="HTMLInjectionError",this.html=ie}}const kr=r,Gr=n,xr=Symbol("nomatch"),_s=7,Wr=function(K){const ee=Object.create(null),ie=Object.create(null),ke=[];let et=!0;const rt="Could not find the language '{}', did you forget to load/include a language module?",he={disableAutodetect:!0,name:"Plain text",contains:[]};let le={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:f};function Se(se){return le.noHighlightRe.test(se)}function ft(se){let de=se.className+" ";de+=se.parentNode?se.parentNode.className:"";const Re=le.languageDetectRe.exec(de);if(Re){const Le=Fe(Re[1]);return Le||(pt(rt.replace("{}",Re[1])),pt("Falling back to no-highlight mode for this block.",se)),Le?Re[1]:"no-highlight"}return de.split(/\s+/).find(Le=>Se(Le)||Fe(Le))}function z(se,de,Re){let Le="",tt="";typeof de=="object"?(Le=se,Re=de.ignoreIllegals,tt=de.language):(xe("10.7.0","highlight(lang, code, ...args) has been deprecated."),xe("10.7.0",`Please use highlight(code, options) instead.
4
+ https://github.com/highlightjs/highlight.js/issues/2277`),tt=se,Le=de),Re===void 0&&(Re=!0);const Pt={code:Le,language:tt};Mt("before:highlight",Pt);const Dt=Pt.result?Pt.result:D(Pt.language,Pt.code,Re);return Dt.code=Pt.code,Mt("after:highlight",Dt),Dt}function D(se,de,Re,Le){const tt=Object.create(null);function Pt(ce,ge){return ce.keywords[ge]}function Dt(){if(!Te.keywords){gt.addText(Ze);return}let ce=0;Te.keywordPatternRe.lastIndex=0;let ge=Te.keywordPatternRe.exec(Ze),Ae="";for(;ge;){Ae+=Ze.substring(ce,ge.index);const We=Kt.case_insensitive?ge[0].toLowerCase():ge[0],_t=Pt(Te,We);if(_t){const[Qt,Ic]=_t;if(gt.addText(Ae),Ae="",tt[We]=(tt[We]||0)+1,tt[We]<=_s&&(Qr+=Ic),Qt.startsWith("_"))Ae+=ge[0];else{const Cc=Kt.classNameAliases[Qt]||Qt;Et(ge[0],Cc)}}else Ae+=ge[0];ce=Te.keywordPatternRe.lastIndex,ge=Te.keywordPatternRe.exec(Ze)}Ae+=Ze.substring(ce),gt.addText(Ae)}function Jt(){if(Ze==="")return;let ce=null;if(typeof Te.subLanguage=="string"){if(!ee[Te.subLanguage]){gt.addText(Ze);return}ce=D(Te.subLanguage,Ze,!0,Ra[Te.subLanguage]),Ra[Te.subLanguage]=ce._top}else ce=X(Ze,Te.subLanguage.length?Te.subLanguage:null);Te.relevance>0&&(Qr+=ce.relevance),gt.__addSublanguage(ce._emitter,ce.language)}function mt(){Te.subLanguage!=null?Jt():Dt(),Ze=""}function Et(ce,ge){ce!==""&&(gt.startScope(ge),gt.addText(ce),gt.endScope())}function Or(ce,ge){let Ae=1;const We=ge.length-1;for(;Ae<=We;){if(!ce._emit[Ae]){Ae++;continue}const _t=Kt.classNameAliases[ce[Ae]]||ce[Ae],Qt=ge[Ae];_t?Et(Qt,_t):(Ze=Qt,Dt(),Ze=""),Ae++}}function Nr(ce,ge){return ce.scope&&typeof ce.scope=="string"&&gt.openNode(Kt.classNameAliases[ce.scope]||ce.scope),ce.beginScope&&(ce.beginScope._wrap?(Et(Ze,Kt.classNameAliases[ce.beginScope._wrap]||ce.beginScope._wrap),Ze=""):ce.beginScope._multi&&(Or(ce.beginScope,ge),Ze="")),Te=Object.create(ce,{parent:{value:Te}}),Te}function sr(ce,ge,Ae){let We=l(ce.endRe,Ae);if(We){if(ce["on:end"]){const _t=new e(ce);ce["on:end"](ge,_t),_t.isMatchIgnored&&(We=!1)}if(We){for(;ce.endsParent&&ce.parent;)ce=ce.parent;return ce}}if(ce.endsWithParent)return sr(ce.parent,ge,Ae)}function kc(ce){return Te.matcher.regexIndex===0?(Ze+=ce[0],1):(bs=!0,0)}function Oc(ce){const ge=ce[0],Ae=ce.rule,We=new e(Ae),_t=[Ae.__beforeBegin,Ae["on:begin"]];for(const Qt of _t)if(Qt&&(Qt(ce,We),We.isMatchIgnored))return kc(ge);return Ae.skip?Ze+=ge:(Ae.excludeBegin&&(Ze+=ge),mt(),!Ae.returnBegin&&!Ae.excludeBegin&&(Ze=ge)),Nr(Ae,ce),Ae.returnBegin?0:ge.length}function Nc(ce){const ge=ce[0],Ae=de.substring(ce.index),We=sr(Te,ce,Ae);if(!We)return xr;const _t=Te;Te.endScope&&Te.endScope._wrap?(mt(),Et(ge,Te.endScope._wrap)):Te.endScope&&Te.endScope._multi?(mt(),Or(Te.endScope,ce)):_t.skip?Ze+=ge:(_t.returnEnd||_t.excludeEnd||(Ze+=ge),mt(),_t.excludeEnd&&(Ze=ge));do Te.scope&&gt.closeNode(),!Te.skip&&!Te.subLanguage&&(Qr+=Te.relevance),Te=Te.parent;while(Te!==We.parent);return We.starts&&Nr(We.starts,ce),_t.returnEnd?0:ge.length}function Rc(){const ce=[];for(let ge=Te;ge!==Kt;ge=ge.parent)ge.scope&&ce.unshift(ge.scope);ce.forEach(ge=>gt.openNode(ge))}let Jr={};function Na(ce,ge){const Ae=ge&&ge[0];if(Ze+=ce,Ae==null)return mt(),0;if(Jr.type==="begin"&&ge.type==="end"&&Jr.index===ge.index&&Ae===""){if(Ze+=de.slice(ge.index,ge.index+1),!et){const We=new Error(`0 width match regex (${se})`);throw We.languageName=se,We.badRule=Jr.rule,We}return 1}if(Jr=ge,ge.type==="begin")return Oc(ge);if(ge.type==="illegal"&&!Re){const We=new Error('Illegal lexeme "'+Ae+'" for mode "'+(Te.scope||"<unnamed>")+'"');throw We.mode=Te,We}else if(ge.type==="end"){const We=Nc(ge);if(We!==xr)return We}if(ge.type==="illegal"&&Ae==="")return Ze+=`
5
+ `,1;if($s>1e5&&$s>ge.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ze+=Ae,Ae.length}const Kt=Fe(se);if(!Kt)throw Ie(rt.replace("{}",se)),new Error('Unknown language: "'+se+'"');const Tc=dr(Kt);let ws="",Te=Le||Tc;const Ra={},gt=new le.__emitter(le);Rc();let Ze="",Qr=0,hr=0,$s=0,bs=!1;try{if(Kt.__emitTokens)Kt.__emitTokens(de,gt);else{for(Te.matcher.considerAll();;){$s++,bs?bs=!1:Te.matcher.considerAll(),Te.matcher.lastIndex=hr;const ce=Te.matcher.exec(de);if(!ce)break;const ge=de.substring(hr,ce.index),Ae=Na(ge,ce);hr=ce.index+Ae}Na(de.substring(hr))}return gt.finalize(),ws=gt.toHTML(),{language:se,value:ws,relevance:Qr,illegal:!1,_emitter:gt,_top:Te}}catch(ce){if(ce.message&&ce.message.includes("Illegal"))return{language:se,value:kr(de),illegal:!0,relevance:0,_illegalBy:{message:ce.message,index:hr,context:de.slice(hr-100,hr+100),mode:ce.mode,resultSoFar:ws},_emitter:gt};if(et)return{language:se,value:kr(de),illegal:!1,relevance:0,errorRaised:ce,_emitter:gt,_top:Te};throw ce}}function H(se){const de={value:kr(se),illegal:!1,relevance:0,_top:he,_emitter:new le.__emitter(le)};return de._emitter.addText(se),de}function X(se,de){de=de||le.languages||Object.keys(ee);const Re=H(se),Le=de.filter(Fe).filter(Ye).map(mt=>D(mt,se,!1));Le.unshift(Re);const tt=Le.sort((mt,Et)=>{if(mt.relevance!==Et.relevance)return Et.relevance-mt.relevance;if(mt.language&&Et.language){if(Fe(mt.language).supersetOf===Et.language)return 1;if(Fe(Et.language).supersetOf===mt.language)return-1}return 0}),[Pt,Dt]=tt,Jt=Pt;return Jt.secondBest=Dt,Jt}function Y(se,de,Re){const Le=de&&ie[de]||Re;se.classList.add("hljs"),se.classList.add(`language-${Le}`)}function pe(se){let de=null;const Re=ft(se);if(Se(Re))return;if(Mt("before:highlightElement",{el:se,language:Re}),se.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",se);return}if(se.children.length>0&&(le.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(se)),le.throwUnescapedHTML))throw new Rt("One of your code blocks includes unescaped HTML.",se.innerHTML);de=se;const Le=de.textContent,tt=Re?z(Le,{language:Re,ignoreIllegals:!0}):X(Le);se.innerHTML=tt.value,se.dataset.highlighted="yes",Y(se,Re,tt.language),se.result={language:tt.language,re:tt.relevance,relevance:tt.relevance},tt.secondBest&&(se.secondBest={language:tt.secondBest.language,relevance:tt.secondBest.relevance}),Mt("after:highlightElement",{el:se,result:tt,text:Le})}function we(se){le=Gr(le,se)}const Ve=()=>{Ce(),xe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Xe(){Ce(),xe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let nt=!1;function Ce(){function se(){Ce()}if(document.readyState==="loading"){nt||window.addEventListener("DOMContentLoaded",se,!1),nt=!0;return}document.querySelectorAll(le.cssSelector).forEach(pe)}function Qe(se,de){let Re=null;try{Re=de(K)}catch(Le){if(Ie("Language definition for '{}' could not be registered.".replace("{}",se)),et)Ie(Le);else throw Le;Re=he}Re.name||(Re.name=se),ee[se]=Re,Re.rawDefinition=de.bind(null,K),Re.aliases&&it(Re.aliases,{languageName:se})}function at(se){delete ee[se];for(const de of Object.keys(ie))ie[de]===se&&delete ie[de]}function Oe(){return Object.keys(ee)}function Fe(se){return se=(se||"").toLowerCase(),ee[se]||ee[ie[se]]}function it(se,{languageName:de}){typeof se=="string"&&(se=[se]),se.forEach(Re=>{ie[Re.toLowerCase()]=de})}function Ye(se){const de=Fe(se);return de&&!de.disableAutodetect}function Ft(se){se["before:highlightBlock"]&&!se["before:highlightElement"]&&(se["before:highlightElement"]=de=>{se["before:highlightBlock"](Object.assign({block:de.el},de))}),se["after:highlightBlock"]&&!se["after:highlightElement"]&&(se["after:highlightElement"]=de=>{se["after:highlightBlock"](Object.assign({block:de.el},de))})}function Tt(se){Ft(se),ke.push(se)}function It(se){const de=ke.indexOf(se);de!==-1&&ke.splice(de,1)}function Mt(se,de){const Re=se;ke.forEach(function(Le){Le[Re]&&Le[Re](de)})}function Wt(se){return xe("10.7.0","highlightBlock will be removed entirely in v12.0"),xe("10.7.0","Please use highlightElement now."),pe(se)}Object.assign(K,{highlight:z,highlightAuto:X,highlightAll:Ce,highlightElement:pe,highlightBlock:Wt,configure:we,initHighlighting:Ve,initHighlightingOnLoad:Xe,registerLanguage:Qe,unregisterLanguage:at,listLanguages:Oe,getLanguage:Fe,registerAliases:it,autoDetection:Ye,inherit:Gr,addPlugin:Tt,removePlugin:It}),K.debugMode=function(){et=!1},K.safeMode=function(){et=!0},K.versionString=Br,K.regex={concat:S,lookahead:$,either:i,optional:b,anyNumberOfTimes:E};for(const se in Z)typeof Z[se]=="object"&&t(Z[se]);return Object.assign(K,Z),K},nr=Wr({});return nr.newInstance=()=>Wr({}),ks=nr,nr.HighlightJS=nr,nr.default=nr,ks}var Ku=Fu();const qa=ko(Ku);var Hu=lt("<pre><code><!></code></pre>");function Bu(t,e){const r=xn(e,["children","$$slots","$$events","$$legacy"]),n=xn(r,["code","highlighted","languageName","langtag"]);let a=_r(e,"code",8),c=_r(e,"highlighted",8),s=_r(e,"languageName",8,"plaintext"),u=_r(e,"langtag",8,!1);var o=Hu();hu(o,()=>({"data-language":s(),...n,[pu]:{langtag:u()}}),void 0,void 0,void 0,"svelte-4jgeki");var y=ye(o);qr(y,1,"",null,{},{hljs:!0});var f=ye(y);{var w=E=>{var b=or(),S=Ot(b);vu(S,c),Ge(E,b)},$=E=>{var b=Dc();vt(()=>st(b,a())),Ge(E,b)};wt(f,E=>{c()?E(w):E($,!1)})}me(y),me(o),Ge(t,o)}function Va(t,e){const r=xn(e,["children","$$slots","$$events","$$legacy"]),n=xn(r,["language","code","langtag"]);tr(e,!1);let a=_r(e,"language",8),c=_r(e,"code",8),s=_r(e,"langtag",8,!1);const u=ou();let o=vo("");cu(()=>{oe(o)&&u("highlight",{highlighted:oe(o)})}),ru(()=>(Ss(a()),Ss(c())),()=>{qa.registerLanguage(a().name,a().register),kt(o,qa.highlight(c(),{language:a().name}).value)}),nu(),Eo();var y=or(),f=Ot(y);_u(f,e,"default",{get highlighted(){return oe(o)}},w=>{Bu(w,fu(()=>n,{get languageName(){return Ss(a()),su(()=>a().name)},get langtag(){return s()},get highlighted(){return oe(o)},get code(){return c()}}))}),Ge(t,y),rr()}function Gu(t){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},n=["true","false","null"],a={scope:"literal",beginKeywords:n.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:n},contains:[e,r,t.QUOTE_STRING_MODE,a,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const La={name:"json",register:Gu},Oo=zr({}),No=zr({});let Wn=0;function Os(t,e,r=!1,n){let a;const c=++Wn;e.id?a=e.id:a=`${c}`,e.id=a,r&&(a=`${a}-${++Wn}`);const s=Date.now();return No.update(u=>(u[a]||(u[a]={timestamp:s,sortKey:c,requestId:n}),u)),Oo.update(u=>{if(!u[a])t==="SEND"?u[a]=[e,{}]:u[a]=[{},e];else{const o=t==="SEND"?0:1;u[a][o]=e}return u}),e}const Ro=zr([]);function Ns(t,e){const r={_logType:t,_logId:`${t}-${++Wn}`,_sortKey:Wn,_timestamp:Date.now(),payload:e};Ro.update(n=>[r,...n])}var xu=lt(`<style>body {
6
+ overflow: hidden;
7
+ }</style>`),Wu=lt('<div class="p-8 text-center text-gray-500"><div class="text-4xl mb-2">📭</div> <p class="font-medium">No activity yet</p> <p class="text-sm">Activity will appear here when you interact with Sockethub</p></div>'),Ju=lt('<ul class="divide-y divide-gray-100"></ul>'),Qu=lt('<div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-lg p-4"><h4 class="font-semibold text-green-900 mb-3 flex items-center"><span class="mr-2">📥</span> Response from Sockethub</h4> <div class="bg-white rounded border border-green-200 overflow-hidden"><!></div></div>'),Xu=lt(`<div class="bg-gradient-to-r from-slate-50 to-gray-50 border border-gray-200 rounded-xl p-6 shadow-sm"><div class="flex items-center justify-between mb-4"><div><h3 class="text-xl font-bold text-gray-900 flex items-center"><span class="mr-2">📡</span> Sockethub Activity Log</h3> <p class="text-gray-600 text-sm mt-1">Real-time communication between your browser and Sockethub server</p></div> <div class="flex items-center space-x-4 text-xs"><div class="flex items-center space-x-1"><div class="w-3 h-3 bg-orange-400 rounded-full"></div> <span class="text-gray-600">Pending</span></div> <div class="flex items-center space-x-1"><div class="w-3 h-3 bg-green-500 rounded-full"></div> <span class="text-gray-600">Complete</span></div> <div class="flex items-center space-x-1"><div class="w-3 h-3 bg-indigo-500 rounded-full"></div> <span class="text-gray-600">Schema</span></div></div></div> <div class="bg-white rounded-lg border border-gray-200 shadow-sm"><div class="p-4 border-b border-gray-200 bg-gray-50 rounded-t-lg"><p class="text-sm text-gray-700">💡 <strong>How to read this log:</strong> Each entry shows messages sent to and received from Sockethub.
8
+ Click "View Details" to see the full JSON data being exchanged.</p></div> <div id="messages" class="max-h-96 overflow-y-auto"><!></div></div></div> <div><div class="bg-white rounded-xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-hidden flex flex-col"><div class="bg-gradient-to-r from-indigo-50 to-purple-50 px-6 py-4 border-b border-gray-200"><div class="flex items-center justify-between"><h3 class="text-lg font-bold text-gray-900 flex items-center"><span class="mr-2">🔍</span> </h3> <button type="button" aria-label="Close activity log details" class="text-gray-400 hover:text-gray-600 transition-colors"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <p class="text-gray-600 text-sm mt-1">Raw JSON data showing the ActivityStreams message exchange with Sockethub</p></div> <div class="flex-1 overflow-auto p-6 space-y-6"><div class="bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200 rounded-lg p-4"><h4 class="font-semibold text-blue-900 mb-3 flex items-center"><span class="mr-2"> </span> </h4> <div class="bg-white rounded border border-blue-200 overflow-hidden"><!></div></div> <!></div> <div class="bg-gray-50 px-6 py-4 border-t border-gray-200 flex justify-end"><button class="px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-medium">Close</button></div></div></div>`,1);function gm(t,e){tr(e,!0);let r=pr(Ps({})),n=pr(Ps({})),a=pr(Ps([])),c=pr(!1),s=pr(""),u=pr(""),o=pr("ActivityStreams Data Exchange");Oo.subscribe(A=>{kt(r,A,!0)}),No.subscribe(A=>{kt(n,A,!0)}),Ro.subscribe(A=>{kt(a,A,!0)});const y=ut(()=>{const A=[];for(const[R,p]of Object.entries(oe(r)??{})){const P=oe(n)[R];A.push({kind:"activity",id:R,sortKey:(P==null?void 0:P.sortKey)??0,tuple:p,timestamp:(P==null?void 0:P.timestamp)??0})}for(const R of oe(a))A.push({kind:"schema",sortKey:R._sortKey,entry:R});return A.sort((R,p)=>p.sortKey-R.sortKey),A});function f(A){return()=>{const{sent:R,response:p}=Eu(oe(r),oe(n),A);kt(o,"ActivityStreams Data Exchange"),kt(c,!0),kt(s,R?JSON.stringify(R,null,2):"",!0),kt(u,p&&Object.keys(p).length>0?JSON.stringify(p,null,2):"",!0)}}function w(A){return()=>{kt(o,`Schema Event: ${A._logType}`),kt(c,!0),kt(s,JSON.stringify(A.payload,null,2),!0),kt(u,"")}}var $=Xu();wu("asm1x0",A=>{var R=or(),p=Ot(R);{var P=C=>{var B=xu();Ge(C,B)};wt(p,C=>{oe(c)&&C(P)})}Ge(A,R)});var E=Ot($),b=ze(ye(E),2),S=ze(ye(b),2),h=ye(S);{var i=A=>{var R=Wu();Ge(A,R)},d=A=>{var R=Ju();Js(R,21,()=>oe(y),p=>p.kind==="schema"?p.entry._logId:p.id,(p,P)=>{var C=or(),B=Ot(C);{var G=Z=>{{let F=ut(()=>w(oe(P).entry));zu(Z,{get entry(){return oe(P).entry},get buttonAction(){return oe(F)}})}},re=Z=>{var F=or(),N=Ot(F);{var I=U=>{var J=or(),ne=Ot(J);Js(ne,17,()=>Object.entries(oe(P).tuple[oe(P).tuple.length-1]),So,(_e,Pe)=>{var Ee=ut(()=>au(oe(Pe),2));let $e=()=>oe(Ee)[0],be=()=>oe(Ee)[1];var Ne=or(),Ie=Ot(Ne);{var pt=xe=>{{let dt=ut(()=>f(`${oe(P).id}-${$e()}`)),$t=ut(()=>Object.prototype.hasOwnProperty.call(oe(P).tuple[0],"@context")),ot=ut(()=>typeof oe(r)[oe(P).id][1]<"u"),bt=ut(()=>`${oe(P).id}-${$e()}`);Ma(xe,{get buttonAction(){return oe(dt)},get hasSend(){return oe($t)},get hasResponse(){return oe(ot)},get id(){return oe(bt)},get entry(){return be()},get timestamp(){return oe(P).timestamp}})}};wt(Ie,xe=>{be()&&xe(pt)})}Ge(_e,Ne)}),Ge(U,J)},M=U=>{const J=ut(()=>Object.prototype.hasOwnProperty.call(oe(P).tuple[0],"@context")),ne=ut(()=>Object.prototype.hasOwnProperty.call(oe(P).tuple[1],"@context"));{let _e=ut(()=>f(oe(P).id)),Pe=ut(()=>oe(ne)?oe(P).tuple[1]:oe(P).tuple[0]);Ma(U,{get buttonAction(){return oe(_e)},get id(){return oe(P).id},get hasSend(){return oe(J)},get hasResponse(){return oe(ne)},get entry(){return oe(Pe)},get timestamp(){return oe(P).timestamp}})}};wt(N,U=>{Array.isArray(oe(P).tuple[oe(P).tuple.length-1])?U(I):U(M,!1)},!0)}Ge(Z,F)};wt(B,Z=>{oe(P).kind==="schema"?Z(G):Z(re,!1)})}Ge(p,C)}),me(R),Ge(A,R)};wt(h,A=>{oe(y).length===0?A(i):A(d,!1)})}me(S),me(b),me(E);var l=ze(E,2),_=ye(l),m=ye(_),g=ye(m),v=ye(g),k=ze(ye(v));me(v);var T=ze(v,2);T.__click=()=>kt(c,!1),me(g),bo(2),me(m);var j=ze(m,2),V=ye(j),q=ye(V),W=ye(q),x=ye(W,!0);me(W);var te=ze(W);me(q);var ue=ze(q,2),ve=ye(ue);Va(ve,{get language(){return La},get code(){return oe(s)}}),me(ue),me(V);var fe=ze(V,2);{var ae=A=>{var R=Qu(),p=ze(ye(R),2),P=ye(p);Va(P,{get language(){return La},get code(){return oe(u)}}),me(p),me(R),Ge(A,R)};wt(fe,A=>{oe(u)&&A(ae)})}me(j);var L=ze(j,2),O=ye(L);O.__click=()=>kt(c,!1),me(L),me(_),me(l),vt(()=>{qr(l,1,`${oe(c)?"flex items-center justify-center":"hidden"} bg-black bg-opacity-50 fixed top-0 left-0 w-full h-full z-50 p-4`),st(k,` ${oe(o)??""}`),st(x,oe(u)?"📤":"📋"),st(te,` ${oe(u)?"Sent to Sockethub":"Event Payload"}`)}),Ge(t,$),rr()}sa(["click"]);var Ua="https://sockethub.org/ns/context/platform/";function Jn(t){if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.startsWith(Ua)){const r=e.slice(Ua.length),n=r.indexOf("/");if(n>0)return r.slice(0,n)}}}var Yu=Object.create,Zu=Object.getPrototypeOf,Vr=Object.defineProperty,To=Object.getOwnPropertyNames,el=Object.getOwnPropertyDescriptor,Io=Object.prototype.hasOwnProperty;function Co(t){return this[t]}var tl,Fr=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var a=tl??(tl=new WeakMap),c=a.get(t);if(c)return c}r=t!=null?Yu(Zu(t)):{};const s=Vr(r,"default",{value:t,enumerable:!0});if(t&&typeof t=="object"||typeof t=="function")for(let u of To(t))Io.call(s,u)||Vr(s,u,{get:Co.bind(t,u),enumerable:!0});return n&&a.set(t,s),s},rl=t=>{var e=(za??(za=new WeakMap)).get(t),r;if(e)return e;if(e=Vr({},"__esModule",{value:!0}),t&&typeof t=="object"||typeof t=="function")for(var n of To(t))Io.call(e,n)||Vr(e,n,{get:Co.bind(t,n),enumerable:!(r=el(t,n))||r.enumerable});return za.set(t,e),e},za,Q=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nl=t=>t;function sl(t,e){this[t]=nl.bind(null,e)}var al=(t,e)=>{for(var r in e)Vr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:sl.bind(e,r)})},il=(t,e)=>()=>(t&&(e=t(t=0)),e),Qn=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(d){if(super(),!t.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");this.str=d}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(d){super(),this._items=typeof d=="string"?[d]:d}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const d=this._items[0];return d===""||d==='""'}get str(){var d;return(d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce((l,_)=>`${l}${_}`,"")}get names(){var d;return(d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce((l,_)=>(_ instanceof r&&(l[_.str]=(l[_.str]||0)+1),l),{})}}t._Code=n,t.nil=new n("");function a(i,...d){const l=[i[0]];let _=0;for(;_<d.length;)u(l,d[_]),l.push(i[++_]);return new n(l)}t._=a;var c=new n("+");function s(i,...d){const l=[E(i[0])];let _=0;for(;_<d.length;)l.push(c),u(l,d[_]),l.push(c,E(i[++_]));return o(l),new n(l)}t.str=s;function u(i,d){d instanceof n?i.push(...d._items):d instanceof r?i.push(d):i.push(w(d))}t.addCodeArg=u;function o(i){let d=1;for(;d<i.length-1;){if(i[d]===c){const l=y(i[d-1],i[d+1]);if(l!==void 0){i.splice(d-1,3,l);continue}i[d++]="+"}d++}}function y(i,d){if(d==='""')return i;if(i==='""')return d;if(typeof i=="string")return d instanceof r||i[i.length-1]!=='"'?void 0:typeof d!="string"?`${i.slice(0,-1)}${d}"`:d[0]==='"'?i.slice(0,-1)+d.slice(1):void 0;if(typeof d=="string"&&d[0]==='"'&&!(i instanceof r))return`"${i}${d.slice(1)}`}function f(i,d){return d.emptyStr()?i:i.emptyStr()?d:s`${i}${d}`}t.strConcat=f;function w(i){return typeof i=="number"||typeof i=="boolean"||i===null?i:E(Array.isArray(i)?i.join(","):i)}function $(i){return new n(E(i))}t.stringify=$;function E(i){return JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function b(i){return typeof i=="string"&&t.IDENTIFIER.test(i)?new n(`.${i}`):a`[${i}]`}t.getProperty=b;function S(i){if(typeof i=="string"&&t.IDENTIFIER.test(i))return new n(`${i}`);throw new Error(`CodeGen: invalid export name: ${i}, use explicit $id name mapping`)}t.getEsmExportName=S;function h(i){return new n(i.toString())}t.regexpCode=h}),Fa=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Qn();class r extends Error{constructor(y){super(`CodeGen: "code" for ${y} not defined`),this.value=y.value}}var n;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:y,parent:f}={}){this._names={},this._prefixes=y,this._parent=f}toName(y){return y instanceof e.Name?y:this.name(y)}name(y){return new e.Name(this._newName(y))}_newName(y){const f=this._names[y]||this._nameGroup(y);return`${y}${f.index++}`}_nameGroup(y){var f,w;if(!((w=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||w===void 0)&&w.has(y)||this._prefixes&&!this._prefixes.has(y))throw new Error(`CodeGen: prefix "${y}" is not allowed in this scope`);return this._names[y]={prefix:y,index:0}}}t.Scope=a;class c extends e.Name{constructor(y,f){super(f),this.prefix=y}setValue(y,{property:f,itemIndex:w}){this.value=y,this.scopePath=(0,e._)`.${new e.Name(f)}[${w}]`}}t.ValueScopeName=c;var s=(0,e._)`\n`;class u extends a{constructor(y){super(y),this._values={},this._scope=y.scope,this.opts={...y,_n:y.lines?s:e.nil}}get(){return this._scope}name(y){return new c(y,this._newName(y))}value(y,f){var w;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(y),{prefix:E}=$,b=(w=f.key)!==null&&w!==void 0?w:f.ref;let S=this._values[E];if(S){const d=S.get(b);if(d)return d}else S=this._values[E]=new Map;S.set(b,$);const h=this._scope[E]||(this._scope[E]=[]),i=h.length;return h[i]=f.ref,$.setValue(f,{property:E,itemIndex:i}),$}getValue(y,f){const w=this._values[y];if(w)return w.get(f)}scopeRefs(y,f=this._values){return this._reduceValues(f,w=>{if(w.scopePath===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return(0,e._)`${y}${w.scopePath}`})}scopeCode(y=this._values,f,w){return this._reduceValues(y,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},f,w)}_reduceValues(y,f,w={},$){let E=e.nil;for(const b in y){const S=y[b];if(!S)continue;const h=w[b]=w[b]||new Map;S.forEach(i=>{if(h.has(i))return;h.set(i,n.Started);let d=f(i);if(d){const l=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${l} ${i} = ${d};${this.opts._n}`}else if(d=$==null?void 0:$(i))E=(0,e._)`${E}${d}${this.opts._n}`;else throw new r(i);h.set(i,n.Completed)})}return E}}t.ValueScope=u}),De=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Qn(),r=Fa(),n=Qn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var a=Fa();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class c{optimizeNodes(){return this}optimizeNames(p,P){return this}}class s extends c{constructor(p,P,C){super(),this.varKind=p,this.name=P,this.rhs=C}render({es5:p,_n:P}){const C=p?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${B};`+P}optimizeNames(p,P){if(p[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,p,P)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends c{constructor(p,P,C){super(),this.lhs=p,this.rhs=P,this.sideEffects=C}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,P){if(!(this.lhs instanceof e.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=x(this.rhs,p,P),this}get names(){const p=this.lhs instanceof e.Name?{}:{...this.lhs.names};return W(p,this.rhs)}}class o extends u{constructor(p,P,C,B){super(p,C,B),this.op=P}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class y extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class f extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class w extends c{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class $ extends c{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,P){return this.code=x(this.code,p,P),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends c{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((P,C)=>P+C.render(p),"")}optimizeNodes(){const{nodes:p}=this;let P=p.length;for(;P--;){const C=p[P].optimizeNodes();Array.isArray(C)?p.splice(P,1,...C):C?p[P]=C:p.splice(P,1)}return p.length>0?this:void 0}optimizeNames(p,P){const{nodes:C}=this;let B=C.length;for(;B--;){const G=C[B];G.optimizeNames(p,P)||(te(p,G.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((p,P)=>q(p,P.names),{})}}class b extends E{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class S extends E{}class h extends b{}h.kind="else";class i extends b{constructor(p,P){super(P),this.condition=p}render(p){let P=`if(${this.condition})`+super.render(p);return this.else&&(P+="else "+this.else.render(p)),P}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let P=this.else;if(P){const C=P.optimizeNodes();P=this.else=Array.isArray(C)?new h(C):C}if(P)return p===!1?P instanceof i?P:P.nodes:this.nodes.length?this:new i(ue(p),P instanceof i?[P]:P.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,P){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(p,P),!!(super.optimizeNames(p,P)||this.else))return this.condition=x(this.condition,p,P),this}get names(){const p=super.names;return W(p,this.condition),this.else&&q(p,this.else.names),p}}i.kind="if";class d extends b{}d.kind="for";class l extends d{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iteration=x(this.iteration,p,P),this}get names(){return q(super.names,this.iteration.names)}}class _ extends d{constructor(p,P,C,B){super(),this.varKind=p,this.name=P,this.from=C,this.to=B}render(p){const P=p.es5?r.varKinds.var:this.varKind,{name:C,from:B,to:G}=this;return`for(${P} ${C}=${B}; ${C}<${G}; ${C}++)`+super.render(p)}get names(){const p=W(super.names,this.from);return W(p,this.to)}}class m extends d{constructor(p,P,C,B){super(),this.loop=p,this.varKind=P,this.name=C,this.iterable=B}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iterable=x(this.iterable,p,P),this}get names(){return q(super.names,this.iterable.names)}}class g extends b{constructor(p,P,C){super(),this.name=p,this.args=P,this.async=C}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}g.kind="func";class v extends E{render(p){return"return "+super.render(p)}}v.kind="return";class k extends b{render(p){let P="try"+super.render(p);return this.catch&&(P+=this.catch.render(p)),this.finally&&(P+=this.finally.render(p)),P}optimizeNodes(){var p,P;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(p,P){var C,B;return super.optimizeNames(p,P),(C=this.catch)===null||C===void 0||C.optimizeNames(p,P),(B=this.finally)===null||B===void 0||B.optimizeNames(p,P),this}get names(){const p=super.names;return this.catch&&q(p,this.catch.names),this.finally&&q(p,this.finally.names),p}}class T extends b{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}T.kind="catch";class j extends b{render(p){return"finally"+super.render(p)}}j.kind="finally";class V{constructor(p,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
9
+ `:""},this._extScope=p,this._scope=new r.Scope({parent:p}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(p){return this._scope.name(p)}scopeName(p){return this._extScope.name(p)}scopeValue(p,P){const C=this._extScope.value(p,P);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(p,P){return this._extScope.getValue(p,P)}scopeRefs(p){return this._extScope.scopeRefs(p,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(p,P,C,B){const G=this._scope.toName(P);return C!==void 0&&B&&(this._constants[G.str]=C),this._leafNode(new s(p,G,C)),G}const(p,P,C){return this._def(r.varKinds.const,p,P,C)}let(p,P,C){return this._def(r.varKinds.let,p,P,C)}var(p,P,C){return this._def(r.varKinds.var,p,P,C)}assign(p,P,C){return this._leafNode(new u(p,P,C))}add(p,P){return this._leafNode(new o(p,t.operators.ADD,P))}code(p){return typeof p=="function"?p():p!==e.nil&&this._leafNode(new $(p)),this}object(...p){const P=["{"];for(const[C,B]of p)P.length>1&&P.push(","),P.push(C),(C!==B||this.opts.es5)&&(P.push(":"),(0,e.addCodeArg)(P,B));return P.push("}"),new e._Code(P)}if(p,P,C){if(this._blockNode(new i(p)),P&&C)this.code(P).else().code(C).endIf();else if(P)this.code(P).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(p){return this._elseNode(new i(p))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode(i,h)}_for(p,P){return this._blockNode(p),P&&this.code(P).endFor(),this}for(p,P){return this._for(new l(p),P)}forRange(p,P,C,B,G=this.opts.es5?r.varKinds.var:r.varKinds.let){const re=this._scope.toName(p);return this._for(new _(G,re,P,C),()=>B(re))}forOf(p,P,C,B=r.varKinds.const){const G=this._scope.toName(p);if(this.opts.es5){const re=P instanceof e.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,e._)`${re}.length`,Z=>{this.var(G,(0,e._)`${re}[${Z}]`),C(G)})}return this._for(new m("of",B,G,P),()=>C(G))}forIn(p,P,C,B=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(p,(0,e._)`Object.keys(${P})`,C);const G=this._scope.toName(p);return this._for(new m("in",B,G,P),()=>C(G))}endFor(){return this._endBlockNode(d)}label(p){return this._leafNode(new y(p))}break(p){return this._leafNode(new f(p))}return(p){const P=new v;if(this._blockNode(P),this.code(p),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(v)}try(p,P,C){if(!P&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const B=new k;if(this._blockNode(B),this.code(p),P){const G=this.name("e");this._currNode=B.catch=new T(G),P(G)}return C&&(this._currNode=B.finally=new j,this.code(C)),this._endBlockNode(T,j)}throw(p){return this._leafNode(new w(p))}block(p,P){return this._blockStarts.push(this._nodes.length),p&&this.code(p).endBlock(P),this}endBlock(p){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-P;if(C<0||p!==void 0&&C!==p)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${p} expected`);return this._nodes.length=P,this}func(p,P=e.nil,C,B){return this._blockNode(new g(p,P,C)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(p=1){for(;p-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(p){return this._currNode.nodes.push(p),this}_blockNode(p){this._currNode.nodes.push(p),this._nodes.push(p)}_endBlockNode(p,P){const C=this._currNode;if(C instanceof p||P&&C instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${p.kind}/${P.kind}`:p.kind}"`)}_elseNode(p){const P=this._currNode;if(!(P instanceof i))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=p,this}get _root(){return this._nodes[0]}get _currNode(){const p=this._nodes;return p[p.length-1]}set _currNode(p){const P=this._nodes;P[P.length-1]=p}}t.CodeGen=V;function q(R,p){for(const P in p)R[P]=(R[P]||0)+(p[P]||0);return R}function W(R,p){return p instanceof e._CodeOrName?q(R,p.names):R}function x(R,p,P){if(R instanceof e.Name)return C(R);if(!B(R))return R;return new e._Code(R._items.reduce((G,re)=>(re instanceof e.Name&&(re=C(re)),re instanceof e._Code?G.push(...re._items):G.push(re),G),[]));function C(G){const re=P[G.str];return re===void 0||p[G.str]!==1?G:(delete p[G.str],re)}function B(G){return G instanceof e._Code&&G._items.some(re=>re instanceof e.Name&&p[re.str]===1&&P[re.str]!==void 0)}}function te(R,p){for(const P in p)R[P]=(R[P]||0)-(p[P]||0)}function ue(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${A(R)}`}t.not=ue;var ve=O(t.operators.AND);function fe(...R){return R.reduce(ve)}t.and=fe;var ae=O(t.operators.OR);function L(...R){return R.reduce(ae)}t.or=L;function O(R){return(p,P)=>p===e.nil?P:P===e.nil?p:(0,e._)`${A(p)} ${R} ${A(P)}`}function A(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),Ke=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=De(),r=Qn();function n(g){const v={};for(const k of g)v[k]=!0;return v}t.toHash=n;function a(g,v){return typeof v=="boolean"?v:Object.keys(v).length===0?!0:(c(g,v),!s(v,g.self.RULES.all))}t.alwaysValidSchema=a;function c(g,v=g.schema){const{opts:k,self:T}=g;if(!k.strictSchema||typeof v=="boolean")return;const j=T.RULES.keywords;for(const V in v)j[V]||m(g,`unknown keyword: "${V}"`)}t.checkUnknownRules=c;function s(g,v){if(typeof g=="boolean")return!g;for(const k in g)if(v[k])return!0;return!1}t.schemaHasRules=s;function u(g,v){if(typeof g=="boolean")return!g;for(const k in g)if(k!=="$ref"&&v.all[k])return!0;return!1}t.schemaHasRulesButRef=u;function o({topSchemaRef:g,schemaPath:v},k,T,j){if(!j){if(typeof k=="number"||typeof k=="boolean")return k;if(typeof k=="string")return(0,e._)`${k}`}return(0,e._)`${g}${v}${(0,e.getProperty)(T)}`}t.schemaRefOrVal=o;function y(g){return $(decodeURIComponent(g))}t.unescapeFragment=y;function f(g){return encodeURIComponent(w(g))}t.escapeFragment=f;function w(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=w;function $(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=$;function E(g,v){if(Array.isArray(g))for(const k of g)v(k);else v(g)}t.eachItem=E;function b({mergeNames:g,mergeToName:v,mergeValues:k,resultToName:T}){return(j,V,q,W)=>{const x=q===void 0?V:q instanceof e.Name?(V instanceof e.Name?g(j,V,q):v(j,V,q),q):V instanceof e.Name?(v(j,q,V),V):k(V,q);return W===e.Name&&!(x instanceof e.Name)?T(j,x):x}}t.mergeEvaluated={props:b({mergeNames:(g,v,k)=>g.if((0,e._)`${k} !== true && ${v} !== undefined`,()=>{g.if((0,e._)`${v} === true`,()=>g.assign(k,!0),()=>g.assign(k,(0,e._)`${k} || {}`).code((0,e._)`Object.assign(${k}, ${v})`))}),mergeToName:(g,v,k)=>g.if((0,e._)`${k} !== true`,()=>{v===!0?g.assign(k,!0):(g.assign(k,(0,e._)`${k} || {}`),h(g,k,v))}),mergeValues:(g,v)=>g===!0?!0:{...g,...v},resultToName:S}),items:b({mergeNames:(g,v,k)=>g.if((0,e._)`${k} !== true && ${v} !== undefined`,()=>g.assign(k,(0,e._)`${v} === true ? true : ${k} > ${v} ? ${k} : ${v}`)),mergeToName:(g,v,k)=>g.if((0,e._)`${k} !== true`,()=>g.assign(k,v===!0?!0:(0,e._)`${k} > ${v} ? ${k} : ${v}`)),mergeValues:(g,v)=>g===!0?!0:Math.max(g,v),resultToName:(g,v)=>g.var("items",v)})};function S(g,v){if(v===!0)return g.var("props",!0);const k=g.var("props",(0,e._)`{}`);return v!==void 0&&h(g,k,v),k}t.evaluatedPropsToName=S;function h(g,v,k){Object.keys(k).forEach(T=>g.assign((0,e._)`${v}${(0,e.getProperty)(T)}`,!0))}t.setEvaluated=h;var i={};function d(g,v){return g.scopeValue("func",{ref:v,code:i[v.code]||(i[v.code]=new r._Code(v.code))})}t.useFunc=d;var l;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(l||(t.Type=l={}));function _(g,v,k){if(g instanceof e.Name){const T=v===l.Num;return k?T?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:T?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return k?(0,e.getProperty)(g).toString():"/"+w(g)}t.getErrorPath=_;function m(g,v,k=g.opts.strictSchema){if(k){if(v=`strict mode: ${v}`,k===!0)throw new Error(v);g.self.logger.warn(v)}}t.checkStrictMode=m}),ur=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r={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")};t.default=r}),ns=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=De(),r=Ke(),n=ur();t.keywordError={message:({keyword:h})=>(0,e.str)`must pass "${h}" keyword validation`},t.keyword$DataError={message:({keyword:h,schemaType:i})=>i?(0,e.str)`"${h}" keyword must be ${i} ($data)`:(0,e.str)`"${h}" keyword is invalid ($data)`};function a(h,i=t.keywordError,d,l){const{it:_}=h,{gen:m,compositeRule:g,allErrors:v}=_,k=w(h,i,d);l??(g||v)?o(m,k):y(_,(0,e._)`[${k}]`)}t.reportError=a;function c(h,i=t.keywordError,d){const{it:l}=h,{gen:_,compositeRule:m,allErrors:g}=l,v=w(h,i,d);o(_,v),m||g||y(l,n.default.vErrors)}t.reportExtraError=c;function s(h,i){h.assign(n.default.errors,i),h.if((0,e._)`${n.default.vErrors} !== null`,()=>h.if(i,()=>h.assign((0,e._)`${n.default.vErrors}.length`,i),()=>h.assign(n.default.vErrors,null)))}t.resetErrorsCount=s;function u({gen:h,keyword:i,schemaValue:d,data:l,errsCount:_,it:m}){if(_===void 0)throw new Error("ajv implementation error");const g=h.name("err");h.forRange("i",_,n.default.errors,v=>{h.const(g,(0,e._)`${n.default.vErrors}[${v}]`),h.if((0,e._)`${g}.instancePath === undefined`,()=>h.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,m.errorPath))),h.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${m.errSchemaPath}/${i}`),m.opts.verbose&&(h.assign((0,e._)`${g}.schema`,d),h.assign((0,e._)`${g}.data`,l))})}t.extendErrors=u;function o(h,i){const d=h.const("err",i);h.if((0,e._)`${n.default.vErrors} === null`,()=>h.assign(n.default.vErrors,(0,e._)`[${d}]`),(0,e._)`${n.default.vErrors}.push(${d})`),h.code((0,e._)`${n.default.errors}++`)}function y(h,i){const{gen:d,validateName:l,schemaEnv:_}=h;_.$async?d.throw((0,e._)`new ${h.ValidationError}(${i})`):(d.assign((0,e._)`${l}.errors`,i),d.return(!1))}var f={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function w(h,i,d){const{createErrors:l}=h.it;return l===!1?(0,e._)`{}`:$(h,i,d)}function $(h,i,d={}){const{gen:l,it:_}=h,m=[E(_,d),b(h,d)];return S(h,i,m),l.object(...m)}function E({errorPath:h},{instancePath:i}){const d=i?(0,e.str)`${h}${(0,r.getErrorPath)(i,r.Type.Str)}`:h;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,d)]}function b({keyword:h,it:{errSchemaPath:i}},{schemaPath:d,parentSchema:l}){let _=l?i:(0,e.str)`${i}/${h}`;return d&&(_=(0,e.str)`${_}${(0,r.getErrorPath)(d,r.Type.Str)}`),[f.schemaPath,_]}function S(h,{params:i,message:d},l){const{keyword:_,data:m,schemaValue:g,it:v}=h,{opts:k,propertyName:T,topSchemaRef:j,schemaPath:V}=v;l.push([f.keyword,_],[f.params,typeof i=="function"?i(h):i||(0,e._)`{}`]),k.messages&&l.push([f.message,typeof d=="function"?d(h):d]),k.verbose&&l.push([f.schema,g],[f.parentSchema,(0,e._)`${j}${V}`],[n.default.data,m]),T&&l.push([f.propertyName,T])}}),ol=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=ns(),r=De(),n=ur(),a={message:"boolean schema is false"};function c(o){const{gen:y,schema:f,validateName:w}=o;f===!1?u(o,!1):typeof f=="object"&&f.$async===!0?y.return(n.default.data):(y.assign((0,r._)`${w}.errors`,null),y.return(!0))}t.topBoolOrEmptySchema=c;function s(o,y){const{gen:f,schema:w}=o;w===!1?(f.var(y,!1),u(o)):f.var(y,!0)}t.boolOrEmptySchema=s;function u(o,y){const{gen:f,data:w}=o,$={gen:f,keyword:"false schema",data:w,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)($,a,void 0,y)}}),Ao=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(c){return typeof c=="string"&&r.has(c)}t.isJSONType=n;function a(){const c={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...c,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},c.number,c.string,c.array,c.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=a}),jo=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:a,self:c},s){const u=c.RULES.types[s];return u&&u!==!0&&r(a,u)}t.schemaHasRulesForType=e;function r(a,c){return c.rules.some(s=>n(a,s))}t.shouldUseGroup=r;function n(a,c){var s;return a[c.keyword]!==void 0||((s=c.definition.implements)===null||s===void 0?void 0:s.some(u=>a[u]!==void 0))}t.shouldUseRule=n}),Xn=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=Ao(),r=jo(),n=ns(),a=De(),c=Ke(),s;(function(l){l[l.Correct=0]="Correct",l[l.Wrong=1]="Wrong"})(s||(t.DataType=s={}));function u(l){const _=o(l.type);if(_.includes("null")){if(l.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!_.length&&l.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');l.nullable===!0&&_.push("null")}return _}t.getSchemaTypes=u;function o(l){const _=Array.isArray(l)?l:l?[l]:[];if(_.every(e.isJSONType))return _;throw new Error("type must be JSONType or JSONType[]: "+_.join(","))}t.getJSONTypes=o;function y(l,_){const{gen:m,data:g,opts:v}=l,k=w(_,v.coerceTypes),T=_.length>0&&!(k.length===0&&_.length===1&&(0,r.schemaHasRulesForType)(l,_[0]));if(T){const j=S(_,g,v.strictNumbers,s.Wrong);m.if(j,()=>{k.length?$(l,_,k):i(l)})}return T}t.coerceAndCheckDataType=y;var f=new Set(["string","number","integer","boolean","null"]);function w(l,_){return _?l.filter(m=>f.has(m)||_==="array"&&m==="array"):[]}function $(l,_,m){const{gen:g,data:v,opts:k}=l,T=g.let("dataType",(0,a._)`typeof ${v}`),j=g.let("coerced",(0,a._)`undefined`);k.coerceTypes==="array"&&g.if((0,a._)`${T} == 'object' && Array.isArray(${v}) && ${v}.length == 1`,()=>g.assign(v,(0,a._)`${v}[0]`).assign(T,(0,a._)`typeof ${v}`).if(S(_,v,k.strictNumbers),()=>g.assign(j,v))),g.if((0,a._)`${j} !== undefined`);for(const q of m)(f.has(q)||q==="array"&&k.coerceTypes==="array")&&V(q);g.else(),i(l),g.endIf(),g.if((0,a._)`${j} !== undefined`,()=>{g.assign(v,j),E(l,j)});function V(q){switch(q){case"string":g.elseIf((0,a._)`${T} == "number" || ${T} == "boolean"`).assign(j,(0,a._)`"" + ${v}`).elseIf((0,a._)`${v} === null`).assign(j,(0,a._)`""`);return;case"number":g.elseIf((0,a._)`${T} == "boolean" || ${v} === null
10
+ || (${T} == "string" && ${v} && ${v} == +${v})`).assign(j,(0,a._)`+${v}`);return;case"integer":g.elseIf((0,a._)`${T} === "boolean" || ${v} === null
11
+ || (${T} === "string" && ${v} && ${v} == +${v} && !(${v} % 1))`).assign(j,(0,a._)`+${v}`);return;case"boolean":g.elseIf((0,a._)`${v} === "false" || ${v} === 0 || ${v} === null`).assign(j,!1).elseIf((0,a._)`${v} === "true" || ${v} === 1`).assign(j,!0);return;case"null":g.elseIf((0,a._)`${v} === "" || ${v} === 0 || ${v} === false`),g.assign(j,null);return;case"array":g.elseIf((0,a._)`${T} === "string" || ${T} === "number"
12
+ || ${T} === "boolean" || ${v} === null`).assign(j,(0,a._)`[${v}]`)}}}function E({gen:l,parentData:_,parentDataProperty:m},g){l.if((0,a._)`${_} !== undefined`,()=>l.assign((0,a._)`${_}[${m}]`,g))}function b(l,_,m,g=s.Correct){const v=g===s.Correct?a.operators.EQ:a.operators.NEQ;let k;switch(l){case"null":return(0,a._)`${_} ${v} null`;case"array":k=(0,a._)`Array.isArray(${_})`;break;case"object":k=(0,a._)`${_} && typeof ${_} == "object" && !Array.isArray(${_})`;break;case"integer":k=T((0,a._)`!(${_} % 1) && !isNaN(${_})`);break;case"number":k=T();break;default:return(0,a._)`typeof ${_} ${v} ${l}`}return g===s.Correct?k:(0,a.not)(k);function T(j=a.nil){return(0,a.and)((0,a._)`typeof ${_} == "number"`,j,m?(0,a._)`isFinite(${_})`:a.nil)}}t.checkDataType=b;function S(l,_,m,g){if(l.length===1)return b(l[0],_,m,g);let v;const k=(0,c.toHash)(l);if(k.array&&k.object){const T=(0,a._)`typeof ${_} != "object"`;v=k.null?T:(0,a._)`!${_} || ${T}`,delete k.null,delete k.array,delete k.object}else v=a.nil;k.number&&delete k.integer;for(const T in k)v=(0,a.and)(v,b(T,_,m,g));return v}t.checkDataTypes=S;var h={message:({schema:l})=>`must be ${l}`,params:({schema:l,schemaValue:_})=>typeof l=="string"?(0,a._)`{type: ${l}}`:(0,a._)`{type: ${_}}`};function i(l){const _=d(l);(0,n.reportError)(_,h)}t.reportTypeError=i;function d(l){const{gen:_,data:m,schema:g}=l,v=(0,c.schemaRefOrVal)(l,g,"type");return{gen:_,keyword:"type",data:m,schema:g.type,schemaCode:v,schemaValue:v,parentSchema:g,params:{},it:l}}}),cl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=De(),r=Ke();function n(c,s){const{properties:u,items:o}=c.schema;if(s==="object"&&u)for(const y in u)a(c,y,u[y].default);else s==="array"&&Array.isArray(o)&&o.forEach((y,f)=>a(c,f,y.default))}t.assignDefaults=n;function a(c,s,u){const{gen:o,compositeRule:y,data:f,opts:w}=c;if(u===void 0)return;const $=(0,e._)`${f}${(0,e.getProperty)(s)}`;if(y){(0,r.checkStrictMode)(c,`default is ignored for: ${$}`);return}let E=(0,e._)`${$} === undefined`;w.useDefaults==="empty"&&(E=(0,e._)`${E} || ${$} === null || ${$} === ""`),o.if(E,(0,e._)`${$} = ${(0,e.stringify)(u)}`)}}),Lt=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=De(),r=Ke(),n=ur(),a=Ke();function c(l,_){const{gen:m,data:g,it:v}=l;m.if(w(m,g,_,v.opts.ownProperties),()=>{l.setParams({missingProperty:(0,e._)`${_}`},!0),l.error()})}t.checkReportMissingProp=c;function s({gen:l,data:_,it:{opts:m}},g,v){return(0,e.or)(...g.map(k=>(0,e.and)(w(l,_,k,m.ownProperties),(0,e._)`${v} = ${k}`)))}t.checkMissingProp=s;function u(l,_){l.setParams({missingProperty:_},!0),l.error()}t.reportMissingProp=u;function o(l){return l.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=o;function y(l,_,m){return(0,e._)`${o(l)}.call(${_}, ${m})`}t.isOwnProperty=y;function f(l,_,m,g){const v=(0,e._)`${_}${(0,e.getProperty)(m)} !== undefined`;return g?(0,e._)`${v} && ${y(l,_,m)}`:v}t.propertyInData=f;function w(l,_,m,g){const v=(0,e._)`${_}${(0,e.getProperty)(m)} === undefined`;return g?(0,e.or)(v,(0,e.not)(y(l,_,m))):v}t.noPropertyInData=w;function $(l){return l?Object.keys(l).filter(_=>_!=="__proto__"):[]}t.allSchemaProperties=$;function E(l,_){return $(_).filter(m=>!(0,r.alwaysValidSchema)(l,_[m]))}t.schemaProperties=E;function b({schemaCode:l,data:_,it:{gen:m,topSchemaRef:g,schemaPath:v,errorPath:k},it:T},j,V,q){const W=q?(0,e._)`${l}, ${_}, ${g}${v}`:_,x=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,k)],[n.default.parentData,T.parentData],[n.default.parentDataProperty,T.parentDataProperty],[n.default.rootData,n.default.rootData]];T.opts.dynamicRef&&x.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const te=(0,e._)`${W}, ${m.object(...x)}`;return V!==e.nil?(0,e._)`${j}.call(${V}, ${te})`:(0,e._)`${j}(${te})`}t.callValidateCode=b;var S=(0,e._)`new RegExp`;function h({gen:l,it:{opts:_}},m){const g=_.unicodeRegExp?"u":"",{regExp:v}=_.code,k=v(m,g);return l.scopeValue("pattern",{key:k.toString(),ref:k,code:(0,e._)`${v.code==="new RegExp"?S:(0,a.useFunc)(l,v)}(${m}, ${g})`})}t.usePattern=h;function i(l){const{gen:_,data:m,keyword:g,it:v}=l,k=_.name("valid");if(v.allErrors){const j=_.let("valid",!0);return T(()=>_.assign(j,!1)),j}return _.var(k,!0),T(()=>_.break()),k;function T(j){const V=_.const("len",(0,e._)`${m}.length`);_.forRange("i",0,V,q=>{l.subschema({keyword:g,dataProp:q,dataPropType:r.Type.Num},k),_.if((0,e.not)(k),j)})}}t.validateArray=i;function d(l){const{gen:_,schema:m,keyword:g,it:v}=l;if(!Array.isArray(m))throw new Error("ajv implementation error");if(m.some(V=>(0,r.alwaysValidSchema)(v,V))&&!v.opts.unevaluated)return;const T=_.let("valid",!1),j=_.name("_valid");_.block(()=>m.forEach((V,q)=>{const W=l.subschema({keyword:g,schemaProp:q,compositeRule:!0},j);_.assign(T,(0,e._)`${T} || ${j}`),l.mergeValidEvaluated(W,j)||_.if((0,e.not)(T))})),l.result(T,()=>l.reset(),()=>l.error(!0))}t.validateUnion=d}),ul=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=De(),r=ur(),n=Lt(),a=ns();function c(E,b){const{gen:S,keyword:h,schema:i,parentSchema:d,it:l}=E,_=b.macro.call(l.self,i,d,l),m=f(S,h,_);l.opts.validateSchema!==!1&&l.self.validateSchema(_,!0);const g=S.name("valid");E.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${l.errSchemaPath}/${h}`,topSchemaRef:m,compositeRule:!0},g),E.pass(g,()=>E.error(!0))}t.macroKeywordCode=c;function s(E,b){var S;const{gen:h,keyword:i,schema:d,parentSchema:l,$data:_,it:m}=E;y(m,b);const g=!_&&b.compile?b.compile.call(m.self,d,l,m):b.validate,v=f(h,i,g),k=h.let("valid");E.block$data(k,T),E.ok((S=b.valid)!==null&&S!==void 0?S:k);function T(){if(b.errors===!1)q(),b.modifying&&u(E),W(()=>E.error());else{const x=b.async?j():V();b.modifying&&u(E),W(()=>o(E,x))}}function j(){const x=h.let("ruleErrs",null);return h.try(()=>q((0,e._)`await `),te=>h.assign(k,!1).if((0,e._)`${te} instanceof ${m.ValidationError}`,()=>h.assign(x,(0,e._)`${te}.errors`),()=>h.throw(te))),x}function V(){const x=(0,e._)`${v}.errors`;return h.assign(x,null),q(e.nil),x}function q(x=b.async?(0,e._)`await `:e.nil){const te=m.opts.passContext?r.default.this:r.default.self,ue=!("compile"in b&&!_||b.schema===!1);h.assign(k,(0,e._)`${x}${(0,n.callValidateCode)(E,v,te,ue)}`,b.modifying)}function W(x){var te;h.if((0,e.not)((te=b.valid)!==null&&te!==void 0?te:k),x)}}t.funcKeywordCode=s;function u(E){const{gen:b,data:S,it:h}=E;b.if(h.parentData,()=>b.assign(S,(0,e._)`${h.parentData}[${h.parentDataProperty}]`))}function o(E,b){const{gen:S}=E;S.if((0,e._)`Array.isArray(${b})`,()=>{S.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${b} : ${r.default.vErrors}.concat(${b})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,a.extendErrors)(E)},()=>E.error())}function y({schemaEnv:E},b){if(b.async&&!E.$async)throw new Error("async keyword in sync schema")}function f(E,b,S){if(S===void 0)throw new Error(`keyword "${b}" failed to compile`);return E.scopeValue("keyword",typeof S=="function"?{ref:S}:{ref:S,code:(0,e.stringify)(S)})}function w(E,b,S=!1){return!b.length||b.some(h=>h==="array"?Array.isArray(E):h==="object"?E&&typeof E=="object"&&!Array.isArray(E):typeof E==h||S&&typeof E>"u")}t.validSchemaType=w;function $({schema:E,opts:b,self:S,errSchemaPath:h},i,d){if(Array.isArray(i.keyword)?!i.keyword.includes(d):i.keyword!==d)throw new Error("ajv implementation error");const l=i.dependencies;if(l!=null&&l.some(_=>!Object.prototype.hasOwnProperty.call(E,_)))throw new Error(`parent schema must have dependencies of ${d}: ${l.join(",")}`);if(i.validateSchema&&!i.validateSchema(E[d])){const m=`keyword "${d}" value is invalid at path "${h}": `+S.errorsText(i.validateSchema.errors);if(b.validateSchema==="log")S.logger.error(m);else throw new Error(m)}}t.validateKeywordUsage=$}),ll=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=De(),r=Ke();function n(s,{keyword:u,schemaProp:o,schema:y,schemaPath:f,errSchemaPath:w,topSchemaRef:$}){if(u!==void 0&&y!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const E=s.schema[u];return o===void 0?{schema:E,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${s.errSchemaPath}/${u}`}:{schema:E[o],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${u}/${(0,r.escapeFragment)(o)}`}}if(y!==void 0){if(f===void 0||w===void 0||$===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:y,schemaPath:f,topSchemaRef:$,errSchemaPath:w}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function a(s,u,{dataProp:o,dataPropType:y,data:f,dataTypes:w,propertyName:$}){if(f!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:E}=u;if(o!==void 0){const{errorPath:S,dataPathArr:h,opts:i}=u,d=E.let("data",(0,e._)`${u.data}${(0,e.getProperty)(o)}`,!0);b(d),s.errorPath=(0,e.str)`${S}${(0,r.getErrorPath)(o,y,i.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${o}`,s.dataPathArr=[...h,s.parentDataProperty]}if(f!==void 0){const S=f instanceof e.Name?f:E.let("data",f,!0);b(S),$!==void 0&&(s.propertyName=$)}w&&(s.dataTypes=w);function b(S){s.data=S,s.dataLevel=u.dataLevel+1,s.dataTypes=[],u.definedProperties=new Set,s.parentData=u.data,s.dataNames=[...u.dataNames,S]}}t.extendSubschemaData=a;function c(s,{jtdDiscriminator:u,jtdMetadata:o,compositeRule:y,createErrors:f,allErrors:w}){y!==void 0&&(s.compositeRule=y),f!==void 0&&(s.createErrors=f),w!==void 0&&(s.allErrors=w),s.jtdDiscriminator=u,s.jtdMetadata=o}t.extendSubschemaMode=c}),ss=Q(function(t,e){e.exports=function r(n,a){if(n===a)return!0;if(n&&a&&typeof n=="object"&&typeof a=="object"){if(n.constructor!==a.constructor)return!1;var c,s,u;if(Array.isArray(n)){if(c=n.length,c!=a.length)return!1;for(s=c;s--!==0;)if(!r(n[s],a[s]))return!1;return!0}if(n.constructor===RegExp)return n.source===a.source&&n.flags===a.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===a.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===a.toString();if(u=Object.keys(n),c=u.length,c!==Object.keys(a).length)return!1;for(s=c;s--!==0;)if(!Object.prototype.hasOwnProperty.call(a,u[s]))return!1;for(s=c;s--!==0;){var o=u[s];if(!r(n[o],a[o]))return!1}return!0}return n!==n&&a!==a}}),Mo=Q(function(t,e){var r=e.exports=function(c,s,u){typeof s=="function"&&(u=s,s={}),u=s.cb||u;var o=typeof u=="function"?u:u.pre||function(){},y=u.post||function(){};n(s,o,y,c,"",c)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.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 n(c,s,u,o,y,f,w,$,E,b){if(o&&typeof o=="object"&&!Array.isArray(o)){s(o,y,f,w,$,E,b);for(var S in o){var h=o[S];if(Array.isArray(h)){if(S in r.arrayKeywords)for(var i=0;i<h.length;i++)n(c,s,u,h[i],y+"/"+S+"/"+i,f,y,S,o,i)}else if(S in r.propsKeywords){if(h&&typeof h=="object")for(var d in h)n(c,s,u,h[d],y+"/"+S+"/"+a(d),f,y,S,o,d)}else(S in r.keywords||c.allKeys&&!(S in r.skipKeywords))&&n(c,s,u,h,y+"/"+S,f,y,S,o)}u(o,y,f,w,$,E,b)}}function a(c){return c.replace(/~/g,"~0").replace(/\//g,"~1")}}),as=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Ke(),r=ss(),n=Mo(),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(h,i=!0){return typeof h=="boolean"?!0:i===!0?!u(h):i?o(h)<=i:!1}t.inlineRef=c;var s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(h){for(const i in h){if(s.has(i))return!0;const d=h[i];if(Array.isArray(d)&&d.some(u)||typeof d=="object"&&u(d))return!0}return!1}function o(h){let i=0;for(const d in h){if(d==="$ref")return 1/0;if(i++,!a.has(d)&&(typeof h[d]=="object"&&(0,e.eachItem)(h[d],l=>i+=o(l)),i===1/0))return 1/0}return i}function y(h,i="",d){d!==!1&&(i=$(i));const l=h.parse(i);return f(h,l)}t.getFullPath=y;function f(h,i){return h.serialize(i).split("#")[0]+"#"}t._getFullPath=f;var w=/#\/?$/;function $(h){return h?h.replace(w,""):""}t.normalizeId=$;function E(h,i,d){return d=$(d),h.resolve(i,d)}t.resolveUrl=E;var b=/^[a-z_][-a-z0-9._]*$/i;function S(h,i){if(typeof h=="boolean")return{};const{schemaId:d,uriResolver:l}=this.opts,_=$(h[d]||i),m={"":_},g=y(l,_,!1),v={},k=new Set;return n(h,{allKeys:!0},(V,q,W,x)=>{if(x===void 0)return;const te=g+q;let ue=m[x];typeof V[d]=="string"&&(ue=ve.call(this,V[d])),fe.call(this,V.$anchor),fe.call(this,V.$dynamicAnchor),m[q]=ue;function ve(ae){const L=this.opts.uriResolver.resolve;if(ae=$(ue?L(ue,ae):ae),k.has(ae))throw j(ae);k.add(ae);let O=this.refs[ae];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?T(V,O.schema,ae):ae!==$(te)&&(ae[0]==="#"?(T(V,v[ae],ae),v[ae]=V):this.refs[ae]=te),ae}function fe(ae){if(typeof ae=="string"){if(!b.test(ae))throw new Error(`invalid anchor "${ae}"`);ve.call(this,`#${ae}`)}}}),v;function T(V,q,W){if(q!==void 0&&!r(V,q))throw j(W)}function j(V){return new Error(`reference "${V}" resolves to more than one schema`)}}t.getSchemaRefs=S}),is=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=ol(),r=Xn(),n=jo(),a=Xn(),c=cl(),s=ul(),u=ll(),o=De(),y=ur(),f=as(),w=Ke(),$=ns();function E(N){if(g(N)&&(k(N),m(N))){i(N);return}b(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=E;function b({gen:N,validateName:I,schema:M,schemaEnv:U,opts:J},ne){J.code.es5?N.func(I,(0,o._)`${y.default.data}, ${y.default.valCxt}`,U.$async,()=>{N.code((0,o._)`"use strict"; ${l(M,J)}`),h(N,J),N.code(ne)}):N.func(I,(0,o._)`${y.default.data}, ${S(J)}`,U.$async,()=>N.code(l(M,J)).code(ne))}function S(N){return(0,o._)`{${y.default.instancePath}="", ${y.default.parentData}, ${y.default.parentDataProperty}, ${y.default.rootData}=${y.default.data}${N.dynamicRef?(0,o._)`, ${y.default.dynamicAnchors}={}`:o.nil}}={}`}function h(N,I){N.if(y.default.valCxt,()=>{N.var(y.default.instancePath,(0,o._)`${y.default.valCxt}.${y.default.instancePath}`),N.var(y.default.parentData,(0,o._)`${y.default.valCxt}.${y.default.parentData}`),N.var(y.default.parentDataProperty,(0,o._)`${y.default.valCxt}.${y.default.parentDataProperty}`),N.var(y.default.rootData,(0,o._)`${y.default.valCxt}.${y.default.rootData}`),I.dynamicRef&&N.var(y.default.dynamicAnchors,(0,o._)`${y.default.valCxt}.${y.default.dynamicAnchors}`)},()=>{N.var(y.default.instancePath,(0,o._)`""`),N.var(y.default.parentData,(0,o._)`undefined`),N.var(y.default.parentDataProperty,(0,o._)`undefined`),N.var(y.default.rootData,y.default.data),I.dynamicRef&&N.var(y.default.dynamicAnchors,(0,o._)`{}`)})}function i(N){const{schema:I,opts:M,gen:U}=N;b(N,()=>{M.$comment&&I.$comment&&x(N),V(N),U.let(y.default.vErrors,null),U.let(y.default.errors,0),M.unevaluated&&d(N),T(N),te(N)})}function d(N){const{gen:I,validateName:M}=N;N.evaluated=I.const("evaluated",(0,o._)`${M}.evaluated`),I.if((0,o._)`${N.evaluated}.dynamicProps`,()=>I.assign((0,o._)`${N.evaluated}.props`,(0,o._)`undefined`)),I.if((0,o._)`${N.evaluated}.dynamicItems`,()=>I.assign((0,o._)`${N.evaluated}.items`,(0,o._)`undefined`))}function l(N,I){const M=typeof N=="object"&&N[I.schemaId];return M&&(I.code.source||I.code.process)?(0,o._)`/*# sourceURL=${M} */`:o.nil}function _(N,I){if(g(N)&&(k(N),m(N))){v(N,I);return}(0,e.boolOrEmptySchema)(N,I)}function m({schema:N,self:I}){if(typeof N=="boolean")return!N;for(const M in N)if(I.RULES.all[M])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function v(N,I){const{schema:M,gen:U,opts:J}=N;J.$comment&&M.$comment&&x(N),q(N),W(N);const ne=U.const("_errs",y.default.errors);T(N,ne),U.var(I,(0,o._)`${ne} === ${y.default.errors}`)}function k(N){(0,w.checkUnknownRules)(N),j(N)}function T(N,I){if(N.opts.jtd)return ve(N,[],!1,I);const M=(0,r.getSchemaTypes)(N.schema),U=(0,r.coerceAndCheckDataType)(N,M);ve(N,M,!U,I)}function j(N){const{schema:I,errSchemaPath:M,opts:U,self:J}=N;I.$ref&&U.ignoreKeywordsWithRef&&(0,w.schemaHasRulesButRef)(I,J.RULES)&&J.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function V(N){const{schema:I,opts:M}=N;I.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,w.checkStrictMode)(N,"default is ignored in the schema root")}function q(N){const I=N.schema[N.opts.schemaId];I&&(N.baseId=(0,f.resolveUrl)(N.opts.uriResolver,N.baseId,I))}function W(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function x({gen:N,schemaEnv:I,schema:M,errSchemaPath:U,opts:J}){const ne=M.$comment;if(J.$comment===!0)N.code((0,o._)`${y.default.self}.logger.log(${ne})`);else if(typeof J.$comment=="function"){const _e=(0,o.str)`${U}/$comment`,Pe=N.scopeValue("root",{ref:I.root});N.code((0,o._)`${y.default.self}.opts.$comment(${ne}, ${_e}, ${Pe}.schema)`)}}function te(N){const{gen:I,schemaEnv:M,validateName:U,ValidationError:J,opts:ne}=N;M.$async?I.if((0,o._)`${y.default.errors} === 0`,()=>I.return(y.default.data),()=>I.throw((0,o._)`new ${J}(${y.default.vErrors})`)):(I.assign((0,o._)`${U}.errors`,y.default.vErrors),ne.unevaluated&&ue(N),I.return((0,o._)`${y.default.errors} === 0`))}function ue({gen:N,evaluated:I,props:M,items:U}){M instanceof o.Name&&N.assign((0,o._)`${I}.props`,M),U instanceof o.Name&&N.assign((0,o._)`${I}.items`,U)}function ve(N,I,M,U){const{gen:J,schema:ne,data:_e,allErrors:Pe,opts:Ee,self:$e}=N,{RULES:be}=$e;if(ne.$ref&&(Ee.ignoreKeywordsWithRef||!(0,w.schemaHasRulesButRef)(ne,be))){J.block(()=>G(N,"$ref",be.all.$ref.definition));return}Ee.jtd||ae(N,I),J.block(()=>{for(const Ie of be.rules)Ne(Ie);Ne(be.post)});function Ne(Ie){(0,n.shouldUseGroup)(ne,Ie)&&(Ie.type?(J.if((0,a.checkDataType)(Ie.type,_e,Ee.strictNumbers)),fe(N,Ie),I.length===1&&I[0]===Ie.type&&M&&(J.else(),(0,a.reportTypeError)(N)),J.endIf()):fe(N,Ie),Pe||J.if((0,o._)`${y.default.errors} === ${U||0}`))}}function fe(N,I){const{gen:M,schema:U,opts:{useDefaults:J}}=N;J&&(0,c.assignDefaults)(N,I.type),M.block(()=>{for(const ne of I.rules)(0,n.shouldUseRule)(U,ne)&&G(N,ne.keyword,ne.definition,I.type)})}function ae(N,I){N.schemaEnv.meta||!N.opts.strictTypes||(L(N,I),N.opts.allowUnionTypes||O(N,I),A(N,N.dataTypes))}function L(N,I){if(I.length){if(!N.dataTypes.length){N.dataTypes=I;return}I.forEach(M=>{p(N.dataTypes,M)||C(N,`type "${M}" not allowed by context "${N.dataTypes.join(",")}"`)}),P(N,I)}}function O(N,I){I.length>1&&!(I.length===2&&I.includes("null"))&&C(N,"use allowUnionTypes to allow union type keyword")}function A(N,I){const M=N.self.RULES.all;for(const U in M){const J=M[U];if(typeof J=="object"&&(0,n.shouldUseRule)(N.schema,J)){const{type:ne}=J.definition;ne.length&&!ne.some(_e=>R(I,_e))&&C(N,`missing type "${ne.join(",")}" for keyword "${U}"`)}}}function R(N,I){return N.includes(I)||I==="number"&&N.includes("integer")}function p(N,I){return N.includes(I)||I==="integer"&&N.includes("number")}function P(N,I){const M=[];for(const U of N.dataTypes)p(I,U)?M.push(U):I.includes("integer")&&U==="number"&&M.push("integer");N.dataTypes=M}function C(N,I){const M=N.schemaEnv.baseId+N.errSchemaPath;I+=` at "${M}" (strictTypes)`,(0,w.checkStrictMode)(N,I,N.opts.strictTypes)}class B{constructor(I,M,U){if((0,s.validateKeywordUsage)(I,M,U),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=U,this.data=I.data,this.schema=I.schema[U],this.$data=M.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,w.schemaRefOrVal)(I,this.schema,U,this.$data),this.schemaType=M.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=M,this.$data)this.schemaCode=I.gen.const("vSchema",F(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${U} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=I.gen.const("_errs",y.default.errors))}result(I,M,U){this.failResult((0,o.not)(I),M,U)}failResult(I,M,U){this.gen.if(I),U?U():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,M){this.failResult((0,o.not)(I),void 0,M)}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(I){if(!this.$data)return this.fail(I);const{schemaCode:M}=this;this.fail((0,o._)`${M} !== undefined && (${(0,o.or)(this.invalid$data(),I)})`)}error(I,M,U){if(M){this.setParams(M),this._error(I,U),this.setParams({});return}this._error(I,U)}_error(I,M){(I?$.reportExtraError:$.reportError)(this,this.def.error,M)}$dataError(){(0,$.reportError)(this,this.def.$dataError||$.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$.resetErrorsCount)(this.gen,this.errsCount)}ok(I){this.allErrors||this.gen.if(I)}setParams(I,M){M?Object.assign(this.params,I):this.params=I}block$data(I,M,U=o.nil){this.gen.block(()=>{this.check$data(I,U),M()})}check$data(I=o.nil,M=o.nil){if(!this.$data)return;const{gen:U,schemaCode:J,schemaType:ne,def:_e}=this;U.if((0,o.or)((0,o._)`${J} === undefined`,M)),I!==o.nil&&U.assign(I,!0),(ne.length||_e.validateSchema)&&(U.elseIf(this.invalid$data()),this.$dataError(),I!==o.nil&&U.assign(I,!1)),U.else()}invalid$data(){const{gen:I,schemaCode:M,schemaType:U,def:J,it:ne}=this;return(0,o.or)(_e(),Pe());function _e(){if(U.length){if(!(M instanceof o.Name))throw new Error("ajv implementation error");const Ee=Array.isArray(U)?U:[U];return(0,o._)`${(0,a.checkDataTypes)(Ee,M,ne.opts.strictNumbers,a.DataType.Wrong)}`}return o.nil}function Pe(){if(J.validateSchema){const Ee=I.scopeValue("validate$data",{ref:J.validateSchema});return(0,o._)`!${Ee}(${M})`}return o.nil}}subschema(I,M){const U=(0,u.getSubschema)(this.it,I);(0,u.extendSubschemaData)(U,this.it,I),(0,u.extendSubschemaMode)(U,I);const J={...this.it,...U,items:void 0,props:void 0};return _(J,M),J}mergeEvaluated(I,M){const{it:U,gen:J}=this;U.opts.unevaluated&&(U.props!==!0&&I.props!==void 0&&(U.props=w.mergeEvaluated.props(J,I.props,U.props,M)),U.items!==!0&&I.items!==void 0&&(U.items=w.mergeEvaluated.items(J,I.items,U.items,M)))}mergeValidEvaluated(I,M){const{it:U,gen:J}=this;if(U.opts.unevaluated&&(U.props!==!0||U.items!==!0))return J.if(M,()=>this.mergeEvaluated(I,o.Name)),!0}}t.KeywordCxt=B;function G(N,I,M,U){const J=new B(N,M,I);"code"in M?M.code(J,U):J.$data&&M.validate?(0,s.funcKeywordCode)(J,M):"macro"in M?(0,s.macroKeywordCode)(J,M):(M.compile||M.validate)&&(0,s.funcKeywordCode)(J,M)}var re=/^\/(?:[^~]|~0|~1)*$/,Z=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function F(N,{dataLevel:I,dataNames:M,dataPathArr:U}){let J,ne;if(N==="")return y.default.rootData;if(N[0]==="/"){if(!re.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);J=N,ne=y.default.rootData}else{const $e=Z.exec(N);if(!$e)throw new Error(`Invalid JSON-pointer: ${N}`);const be=+$e[1];if(J=$e[2],J==="#"){if(be>=I)throw new Error(Ee("property/index",be));return U[I-be]}if(be>I)throw new Error(Ee("data",be));if(ne=M[I-be],!J)return ne}let _e=ne;const Pe=J.split("/");for(const $e of Pe)$e&&(ne=(0,o._)`${ne}${(0,o.getProperty)((0,w.unescapeJsonPointer)($e))}`,_e=(0,o._)`${_e} && ${ne}`);return _e;function Ee($e,be){return`Cannot access ${$e} ${be} levels up, current level is ${I}`}}t.getData=F}),ca=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),os=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=as();class r extends Error{constructor(a,c,s,u){super(u||`can't resolve reference ${s} from id ${c}`),this.missingRef=(0,e.resolveUrl)(a,c,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(a,this.missingRef))}}t.default=r}),ua=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=De(),r=ca(),n=ur(),a=as(),c=Ke(),s=is();class u{constructor(d){var l;this.refs={},this.dynamicAnchors={};let _;typeof d.schema=="object"&&(_=d.schema),this.schema=d.schema,this.schemaId=d.schemaId,this.root=d.root||this,this.baseId=(l=d.baseId)!==null&&l!==void 0?l:(0,a.normalizeId)(_==null?void 0:_[d.schemaId||"$id"]),this.schemaPath=d.schemaPath,this.localRefs=d.localRefs,this.meta=d.meta,this.$async=_==null?void 0:_.$async,this.refs={}}}t.SchemaEnv=u;function o(i){const d=w.call(this,i);if(d)return d;const l=(0,a.getFullPath)(this.opts.uriResolver,i.root.baseId),{es5:_,lines:m}=this.opts.code,{ownProperties:g}=this.opts,v=new e.CodeGen(this.scope,{es5:_,lines:m,ownProperties:g});let k;i.$async&&(k=v.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const T=v.scopeName("validate");i.validateName=T;const j={gen:v,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:v.scopeValue("schema",this.opts.code.source===!0?{ref:i.schema,code:(0,e.stringify)(i.schema)}:{ref:i.schema}),validateName:T,ValidationError:k,schema:i.schema,schemaEnv:i,rootId:l,baseId:i.baseId||l,schemaPath:e.nil,errSchemaPath:i.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let V;try{this._compilations.add(i),(0,s.validateFunctionCode)(j),v.optimize(this.opts.code.optimize);const q=v.toString();V=`${v.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(V=this.opts.code.process(V,i));const x=new Function(`${n.default.self}`,`${n.default.scope}`,V)(this,this.scope.get());if(this.scope.value(T,{ref:x}),x.errors=null,x.schema=i.schema,x.schemaEnv=i,i.$async&&(x.$async=!0),this.opts.code.source===!0&&(x.source={validateName:T,validateCode:q,scopeValues:v._values}),this.opts.unevaluated){const{props:te,items:ue}=j;x.evaluated={props:te instanceof e.Name?void 0:te,items:ue instanceof e.Name?void 0:ue,dynamicProps:te instanceof e.Name,dynamicItems:ue instanceof e.Name},x.source&&(x.source.evaluated=(0,e.stringify)(x.evaluated))}return i.validate=x,i}catch(q){throw delete i.validate,delete i.validateName,V&&this.logger.error("Error compiling schema, function code:",V),q}finally{this._compilations.delete(i)}}t.compileSchema=o;function y(i,d,l){var _;l=(0,a.resolveUrl)(this.opts.uriResolver,d,l);const m=i.refs[l];if(m)return m;let g=E.call(this,i,l);if(g===void 0){const v=(_=i.localRefs)===null||_===void 0?void 0:_[l],{schemaId:k}=this.opts;v&&(g=new u({schema:v,schemaId:k,root:i,baseId:d}))}if(g!==void 0)return i.refs[l]=f.call(this,g)}t.resolveRef=y;function f(i){return(0,a.inlineRef)(i.schema,this.opts.inlineRefs)?i.schema:i.validate?i:o.call(this,i)}function w(i){for(const d of this._compilations)if($(d,i))return d}t.getCompilingSchema=w;function $(i,d){return i.schema===d.schema&&i.root===d.root&&i.baseId===d.baseId}function E(i,d){let l;for(;typeof(l=this.refs[d])=="string";)d=l;return l||this.schemas[d]||b.call(this,i,d)}function b(i,d){const l=this.opts.uriResolver.parse(d),_=(0,a._getFullPath)(this.opts.uriResolver,l);let m=(0,a.getFullPath)(this.opts.uriResolver,i.baseId,void 0);if(Object.keys(i.schema).length>0&&_===m)return h.call(this,l,i);const g=(0,a.normalizeId)(_),v=this.refs[g]||this.schemas[g];if(typeof v=="string"){const k=b.call(this,i,v);return typeof(k==null?void 0:k.schema)!="object"?void 0:h.call(this,l,k)}if(typeof(v==null?void 0:v.schema)=="object"){if(v.validate||o.call(this,v),g===(0,a.normalizeId)(d)){const{schema:k}=v,{schemaId:T}=this.opts,j=k[T];return j&&(m=(0,a.resolveUrl)(this.opts.uriResolver,m,j)),new u({schema:k,schemaId:T,root:i,baseId:m})}return h.call(this,l,v)}}t.resolveSchema=b;var S=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function h(i,{baseId:d,schema:l,root:_}){var m;if(((m=i.fragment)===null||m===void 0?void 0:m[0])!=="/")return;for(const k of i.fragment.slice(1).split("/")){if(typeof l=="boolean")return;const T=l[(0,c.unescapeFragment)(k)];if(T===void 0)return;l=T;const j=typeof l=="object"&&l[this.opts.schemaId];!S.has(k)&&j&&(d=(0,a.resolveUrl)(this.opts.uriResolver,d,j))}let g;if(typeof l!="boolean"&&l.$ref&&!(0,c.schemaHasRulesButRef)(l,this.RULES)){const k=(0,a.resolveUrl)(this.opts.uriResolver,d,l.$ref);g=b.call(this,_,k)}const{schemaId:v}=this.opts;if(g=g||new u({schema:l,schemaId:v,root:_,baseId:d}),g.schema!==g.root.schema)return g}}),fl=Q(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),Do=Q(function(t,e){var r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function a(b){let S="",h=0,i=0;for(i=0;i<b.length;i++)if(h=b[i].charCodeAt(0),h!==48){if(!(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102))return"";S+=b[i];break}for(i+=1;i<b.length;i++){if(h=b[i].charCodeAt(0),!(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102))return"";S+=b[i]}return S}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(b){return b.length=0,!0}function u(b,S,h){if(b.length){const i=a(b);if(i!=="")S.push(i);else return h.error=!0,!1;b.length=0}return!0}function o(b){let S=0;const h={error:!1,address:"",zone:""},i=[],d=[];let l=!1,_=!1,m=u;for(let g=0;g<b.length;g++){const v=b[g];if(!(v==="["||v==="]"))if(v===":"){if(l===!0&&(_=!0),!m(d,i,h))break;if(++S>7){h.error=!0;break}g>0&&b[g-1]===":"&&(l=!0),i.push(":");continue}else if(v==="%"){if(!m(d,i,h))break;m=s}else{d.push(v);continue}}return d.length&&(m===s?h.zone=d.join(""):_?i.push(d.join("")):i.push(a(d))),h.address=i.join(""),h}function y(b){if(f(b,":")<2)return{host:b,isIPV6:!1};const S=o(b);if(S.error)return{host:b,isIPV6:!1};{let h=S.address,i=S.address;return S.zone&&(h+="%"+S.zone,i+="%25"+S.zone),{host:h,isIPV6:!0,escapedHost:i}}}function f(b,S){let h=0;for(let i=0;i<b.length;i++)b[i]===S&&h++;return h}function w(b){let S=b;const h=[];let i=-1,d=0;for(;d=S.length;){if(d===1){if(S===".")break;if(S==="/"){h.push("/");break}else{h.push(S);break}}else if(d===2){if(S[0]==="."){if(S[1]===".")break;if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&(S[1]==="."||S[1]==="/")){h.push("/");break}}else if(d===3&&S==="/.."){h.length!==0&&h.pop(),h.push("/");break}if(S[0]==="."){if(S[1]==="."){if(S[2]==="/"){S=S.slice(3);continue}}else if(S[1]==="/"){S=S.slice(2);continue}}else if(S[0]==="/"&&S[1]==="."){if(S[2]==="/"){S=S.slice(2);continue}else if(S[2]==="."&&S[3]==="/"){S=S.slice(3),h.length!==0&&h.pop();continue}}if((i=S.indexOf("/",1))===-1){h.push(S);break}else h.push(S.slice(0,i)),S=S.slice(i)}return h.join("")}function $(b,S){const h=S!==!0?escape:unescape;return b.scheme!==void 0&&(b.scheme=h(b.scheme)),b.userinfo!==void 0&&(b.userinfo=h(b.userinfo)),b.host!==void 0&&(b.host=h(b.host)),b.path!==void 0&&(b.path=h(b.path)),b.query!==void 0&&(b.query=h(b.query)),b.fragment!==void 0&&(b.fragment=h(b.fragment)),b}function E(b){const S=[];if(b.userinfo!==void 0&&(S.push(b.userinfo),S.push("@")),b.host!==void 0){let h=unescape(b.host);if(!n(h)){const i=y(h);i.isIPV6===!0?h=`[${i.escapedHost}]`:h=b.host}S.push(h)}return(typeof b.port=="number"||typeof b.port=="string")&&(S.push(":"),S.push(String(b.port))),S.length?S.join(""):void 0}e.exports={nonSimpleDomain:c,recomposeAuthority:E,normalizeComponentEncoding:$,removeDotSegments:w,isIPv4:n,isUUID:r,normalizeIPv6:y,stringArrayToHexStripped:a}}),dl=Q(function(t,e){var{isUUID:r}=Do(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,a=["http","https","ws","wss","urn","urn:uuid"];function c(v){return a.indexOf(v)!==-1}function s(v){return v.secure===!0?!0:v.secure===!1?!1:v.scheme?v.scheme.length===3&&(v.scheme[0]==="w"||v.scheme[0]==="W")&&(v.scheme[1]==="s"||v.scheme[1]==="S")&&(v.scheme[2]==="s"||v.scheme[2]==="S"):!1}function u(v){return v.host||(v.error=v.error||"HTTP URIs must have a host."),v}function o(v){const k=String(v.scheme).toLowerCase()==="https";return(v.port===(k?443:80)||v.port==="")&&(v.port=void 0),v.path||(v.path="/"),v}function y(v){return v.secure=s(v),v.resourceName=(v.path||"/")+(v.query?"?"+v.query:""),v.path=void 0,v.query=void 0,v}function f(v){if((v.port===(s(v)?443:80)||v.port==="")&&(v.port=void 0),typeof v.secure=="boolean"&&(v.scheme=v.secure?"wss":"ws",v.secure=void 0),v.resourceName){const[k,T]=v.resourceName.split("?");v.path=k&&k!=="/"?k:void 0,v.query=T,v.resourceName=void 0}return v.fragment=void 0,v}function w(v,k){if(!v.path)return v.error="URN can not be parsed",v;const T=v.path.match(n);if(T){const j=k.scheme||v.scheme||"urn";v.nid=T[1].toLowerCase(),v.nss=T[2];const V=`${j}:${k.nid||v.nid}`,q=g(V);v.path=void 0,q&&(v=q.parse(v,k))}else v.error=v.error||"URN can not be parsed.";return v}function $(v,k){if(v.nid===void 0)throw new Error("URN without nid cannot be serialized");const T=k.scheme||v.scheme||"urn",j=v.nid.toLowerCase(),V=`${T}:${k.nid||j}`,q=g(V);q&&(v=q.serialize(v,k));const W=v,x=v.nss;return W.path=`${j||k.nid}:${x}`,k.skipEscape=!0,W}function E(v,k){const T=v;return T.uuid=T.nss,T.nss=void 0,!k.tolerant&&(!T.uuid||!r(T.uuid))&&(T.error=T.error||"UUID is not valid."),T}function b(v){const k=v;return k.nss=(v.uuid||"").toLowerCase(),k}var S={scheme:"http",domainHost:!0,parse:u,serialize:o},h={scheme:"https",domainHost:S.domainHost,parse:u,serialize:o},i={scheme:"ws",domainHost:!0,parse:y,serialize:f},d={scheme:"wss",domainHost:i.domainHost,parse:i.parse,serialize:i.serialize},l={scheme:"urn",parse:w,serialize:$,skipNormalize:!0},_={scheme:"urn:uuid",parse:E,serialize:b,skipNormalize:!0},m={http:S,https:h,ws:i,wss:d,urn:l,"urn:uuid":_};Object.setPrototypeOf(m,null);function g(v){return v&&(m[v]||m[v.toLowerCase()])||void 0}e.exports={wsIsSecure:s,SCHEMES:m,isValidSchemeName:c,getSchemeHandler:g}}),hl=Q(function(t,e){var{normalizeIPv6:r,removeDotSegments:n,recomposeAuthority:a,normalizeComponentEncoding:c,isIPv4:s,nonSimpleDomain:u}=Do(),{SCHEMES:o,getSchemeHandler:y}=dl();function f(d,l){return typeof d=="string"?d=b(h(d,l),l):typeof d=="object"&&(d=h(b(d,l),l)),d}function w(d,l,_){const m=_?Object.assign({scheme:"null"},_):{scheme:"null"},g=$(h(d,m),h(l,m),m,!0);return m.skipEscape=!0,b(g,m)}function $(d,l,_,m){const g={};return m||(d=h(b(d,_),_),l=h(b(l,_),_)),_=_||{},!_.tolerant&&l.scheme?(g.scheme=l.scheme,g.userinfo=l.userinfo,g.host=l.host,g.port=l.port,g.path=n(l.path||""),g.query=l.query):(l.userinfo!==void 0||l.host!==void 0||l.port!==void 0?(g.userinfo=l.userinfo,g.host=l.host,g.port=l.port,g.path=n(l.path||""),g.query=l.query):(l.path?(l.path[0]==="/"?g.path=n(l.path):((d.userinfo!==void 0||d.host!==void 0||d.port!==void 0)&&!d.path?g.path="/"+l.path:d.path?g.path=d.path.slice(0,d.path.lastIndexOf("/")+1)+l.path:g.path=l.path,g.path=n(g.path)),g.query=l.query):(g.path=d.path,l.query!==void 0?g.query=l.query:g.query=d.query),g.userinfo=d.userinfo,g.host=d.host,g.port=d.port),g.scheme=d.scheme),g.fragment=l.fragment,g}function E(d,l,_){return typeof d=="string"?(d=unescape(d),d=b(c(h(d,_),!0),{..._,skipEscape:!0})):typeof d=="object"&&(d=b(c(d,!0),{..._,skipEscape:!0})),typeof l=="string"?(l=unescape(l),l=b(c(h(l,_),!0),{..._,skipEscape:!0})):typeof l=="object"&&(l=b(c(l,!0),{..._,skipEscape:!0})),d.toLowerCase()===l.toLowerCase()}function b(d,l){const _={host:d.host,scheme:d.scheme,userinfo:d.userinfo,port:d.port,path:d.path,query:d.query,nid:d.nid,nss:d.nss,uuid:d.uuid,fragment:d.fragment,reference:d.reference,resourceName:d.resourceName,secure:d.secure,error:""},m=Object.assign({},l),g=[],v=y(m.scheme||_.scheme);v&&v.serialize&&v.serialize(_,m),_.path!==void 0&&(m.skipEscape?_.path=unescape(_.path):(_.path=escape(_.path),_.scheme!==void 0&&(_.path=_.path.split("%3A").join(":")))),m.reference!=="suffix"&&_.scheme&&g.push(_.scheme,":");const k=a(_);if(k!==void 0&&(m.reference!=="suffix"&&g.push("//"),g.push(k),_.path&&_.path[0]!=="/"&&g.push("/")),_.path!==void 0){let T=_.path;!m.absolutePath&&(!v||!v.absolutePath)&&(T=n(T)),k===void 0&&T[0]==="/"&&T[1]==="/"&&(T="/%2F"+T.slice(2)),g.push(T)}return _.query!==void 0&&g.push("?",_.query),_.fragment!==void 0&&g.push("#",_.fragment),g.join("")}var S=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function h(d,l){const _=Object.assign({},l),m={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let g=!1;_.reference==="suffix"&&(_.scheme?d=_.scheme+":"+d:d="//"+d);const v=d.match(S);if(v){if(m.scheme=v[1],m.userinfo=v[3],m.host=v[4],m.port=parseInt(v[5],10),m.path=v[6]||"",m.query=v[7],m.fragment=v[8],isNaN(m.port)&&(m.port=v[5]),m.host)if(s(m.host)===!1){const j=r(m.host);m.host=j.host.toLowerCase(),g=j.isIPV6}else g=!0;m.scheme===void 0&&m.userinfo===void 0&&m.host===void 0&&m.port===void 0&&m.query===void 0&&!m.path?m.reference="same-document":m.scheme===void 0?m.reference="relative":m.fragment===void 0?m.reference="absolute":m.reference="uri",_.reference&&_.reference!=="suffix"&&_.reference!==m.reference&&(m.error=m.error||"URI is not a "+_.reference+" reference.");const k=y(_.scheme||m.scheme);if(!_.unicodeSupport&&(!k||!k.unicodeSupport)&&m.host&&(_.domainHost||k&&k.domainHost)&&g===!1&&u(m.host))try{m.host=URL.domainToASCII(m.host.toLowerCase())}catch(T){m.error=m.error||"Host's domain name can not be converted to ASCII: "+T}(!k||k&&!k.skipNormalize)&&(d.indexOf("%")!==-1&&(m.scheme!==void 0&&(m.scheme=unescape(m.scheme)),m.host!==void 0&&(m.host=unescape(m.host))),m.path&&(m.path=escape(unescape(m.path))),m.fragment&&(m.fragment=encodeURI(decodeURIComponent(m.fragment)))),k&&k.parse&&k.parse(m,_)}else m.error=m.error||"URI can not be parsed.";return m}var i={SCHEMES:o,normalize:f,resolve:w,resolveComponent:$,equal:E,serialize:b,parse:h};e.exports=i,e.exports.default=i,e.exports.fastUri=i}),pl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=hl();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),ml=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=is();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=De();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=ca(),a=os(),c=Ao(),s=ua(),u=De(),o=as(),y=Xn(),f=Ke(),w=fl(),$=pl(),E=(L,O)=>new RegExp(L,O);E.code="new RegExp";var b=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={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."},i={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},d=200;function l(L){var O,A,R,p,P,C,B,G,re,Z,F,N,I,M,U,J,ne,_e,Pe,Ee,$e,be,Ne,Ie,pt;const xe=L.strict,dt=(O=L.code)===null||O===void 0?void 0:O.optimize,$t=dt===!0||dt===void 0?1:dt||0,ot=(R=(A=L.code)===null||A===void 0?void 0:A.regExp)!==null&&R!==void 0?R:E,bt=(p=L.uriResolver)!==null&&p!==void 0?p:$.default;return{strictSchema:(C=(P=L.strictSchema)!==null&&P!==void 0?P:xe)!==null&&C!==void 0?C:!0,strictNumbers:(G=(B=L.strictNumbers)!==null&&B!==void 0?B:xe)!==null&&G!==void 0?G:!0,strictTypes:(Z=(re=L.strictTypes)!==null&&re!==void 0?re:xe)!==null&&Z!==void 0?Z:"log",strictTuples:(N=(F=L.strictTuples)!==null&&F!==void 0?F:xe)!==null&&N!==void 0?N:"log",strictRequired:(M=(I=L.strictRequired)!==null&&I!==void 0?I:xe)!==null&&M!==void 0?M:!1,code:L.code?{...L.code,optimize:$t,regExp:ot}:{optimize:$t,regExp:ot},loopRequired:(U=L.loopRequired)!==null&&U!==void 0?U:d,loopEnum:(J=L.loopEnum)!==null&&J!==void 0?J:d,meta:(ne=L.meta)!==null&&ne!==void 0?ne:!0,messages:(_e=L.messages)!==null&&_e!==void 0?_e:!0,inlineRefs:(Pe=L.inlineRefs)!==null&&Pe!==void 0?Pe:!0,schemaId:(Ee=L.schemaId)!==null&&Ee!==void 0?Ee:"$id",addUsedSchema:($e=L.addUsedSchema)!==null&&$e!==void 0?$e:!0,validateSchema:(be=L.validateSchema)!==null&&be!==void 0?be:!0,validateFormats:(Ne=L.validateFormats)!==null&&Ne!==void 0?Ne:!0,unicodeRegExp:(Ie=L.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(pt=L.int32range)!==null&&pt!==void 0?pt:!0,uriResolver:bt}}class _{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...l(O)};const{es5:A,lines:R}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:S,es5:A,lines:R}),this.logger=q(O.logger);const p=O.validateFormats;O.validateFormats=!1,this.RULES=(0,c.getRules)(),m.call(this,h,O,"NOT SUPPORTED"),m.call(this,i,O,"DEPRECATED","warn"),this._metaOpts=j.call(this),O.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&T.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),v.call(this),O.validateFormats=p}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:A,schemaId:R}=this.opts;let p=w;R==="id"&&(p={...w},p.id=p.$id,delete p.$id),A&&O&&this.addMetaSchema(p,p[R],!1)}defaultMeta(){const{meta:O,schemaId:A}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[A]||O:void 0}validate(O,A){let R;if(typeof O=="string"){if(R=this.getSchema(O),!R)throw new Error(`no schema with key or ref "${O}"`)}else R=this.compile(O);const p=R(A);return"$async"in R||(this.errors=R.errors),p}compile(O,A){const R=this._addSchema(O,A);return R.validate||this._compileSchemaEnv(R)}compileAsync(O,A){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return p.call(this,O,A);async function p(Z,F){await P.call(this,Z.$schema);const N=this._addSchema(Z,F);return N.validate||C.call(this,N)}async function P(Z){Z&&!this.getSchema(Z)&&await p.call(this,{$ref:Z},!0)}async function C(Z){try{return this._compileSchemaEnv(Z)}catch(F){if(!(F instanceof a.default))throw F;return B.call(this,F),await G.call(this,F.missingSchema),C.call(this,Z)}}function B({missingSchema:Z,missingRef:F}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${F} cannot be resolved`)}async function G(Z){const F=await re.call(this,Z);this.refs[Z]||await P.call(this,F.$schema),this.refs[Z]||this.addSchema(F,Z,A)}async function re(Z){const F=this._loading[Z];if(F)return F;try{return await(this._loading[Z]=R(Z))}finally{delete this._loading[Z]}}}addSchema(O,A,R,p=this.opts.validateSchema){if(Array.isArray(O)){for(const C of O)this.addSchema(C,void 0,R,p);return this}let P;if(typeof O=="object"){const{schemaId:C}=this.opts;if(P=O[C],P!==void 0&&typeof P!="string")throw new Error(`schema ${C} must be string`)}return A=(0,o.normalizeId)(A||P),this._checkUnique(A),this.schemas[A]=this._addSchema(O,R,A,p,!0),this}addMetaSchema(O,A,R=this.opts.validateSchema){return this.addSchema(O,A,!0,R),this}validateSchema(O,A){if(typeof O=="boolean")return!0;let R;if(R=O.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const p=this.validate(R,O);if(!p&&A){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return p}getSchema(O){let A;for(;typeof(A=g.call(this,O))=="string";)O=A;if(A===void 0){const{schemaId:R}=this.opts,p=new s.SchemaEnv({schema:{},schemaId:R});if(A=s.resolveSchema.call(this,p,O),!A)return;this.refs[O]=A}return A.validate||this._compileSchemaEnv(A)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const A=g.call(this,O);return typeof A=="object"&&this._cache.delete(A.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const A=O;this._cache.delete(A);let R=O[this.opts.schemaId];return R&&(R=(0,o.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const A of O)this.addKeyword(A);return this}addKeyword(O,A){let R;if(typeof O=="string")R=O,typeof A=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),A.keyword=R);else if(typeof O=="object"&&A===void 0){if(A=O,R=A.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(x.call(this,R,A),!A)return(0,f.eachItem)(R,P=>te.call(this,P)),this;ve.call(this,A);const p={...A,type:(0,y.getJSONTypes)(A.type),schemaType:(0,y.getJSONTypes)(A.schemaType)};return(0,f.eachItem)(R,p.type.length===0?P=>te.call(this,P,p):P=>p.type.forEach(C=>te.call(this,P,p,C))),this}getKeyword(O){const A=this.RULES.all[O];return typeof A=="object"?A.definition:!!A}removeKeyword(O){const{RULES:A}=this;delete A.keywords[O],delete A.all[O];for(const R of A.rules){const p=R.rules.findIndex(P=>P.keyword===O);p>=0&&R.rules.splice(p,1)}return this}addFormat(O,A){return typeof A=="string"&&(A=new RegExp(A)),this.formats[O]=A,this}errorsText(O=this.errors,{separator:A=", ",dataVar:R="data"}={}){return!O||O.length===0?"No errors":O.map(p=>`${R}${p.instancePath} ${p.message}`).reduce((p,P)=>p+A+P)}$dataMetaSchema(O,A){const R=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const p of A){const P=p.split("/").slice(1);let C=O;for(const B of P)C=C[B];for(const B in R){const G=R[B];if(typeof G!="object")continue;const{$data:re}=G.definition,Z=C[B];re&&Z&&(C[B]=ae(Z))}}return O}_removeAllSchemas(O,A){for(const R in O){const p=O[R];(!A||A.test(R))&&(typeof p=="string"?delete O[R]:p&&!p.meta&&(this._cache.delete(p.schema),delete O[R]))}}_addSchema(O,A,R,p=this.opts.validateSchema,P=this.opts.addUsedSchema){let C;const{schemaId:B}=this.opts;if(typeof O=="object")C=O[B];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let G=this._cache.get(O);if(G!==void 0)return G;R=(0,o.normalizeId)(C||R);const re=o.getSchemaRefs.call(this,O,R);return G=new s.SchemaEnv({schema:O,schemaId:B,meta:A,baseId:R,localRefs:re}),this._cache.set(G.schema,G),P&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=G),p&&this.validateSchema(O,!0),G}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):s.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const A=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,O)}finally{this.opts=A}}}_.ValidationError=n.default,_.MissingRefError=a.default,t.default=_;function m(L,O,A,R="error"){for(const p in L){const P=p;P in O&&this.logger[R](`${A}: option ${p}. ${L[P]}`)}}function g(L){return L=(0,o.normalizeId)(L),this.schemas[L]||this.refs[L]}function v(){const L=this.opts.schemas;if(L)if(Array.isArray(L))this.addSchema(L);else for(const O in L)this.addSchema(L[O],O)}function k(){for(const L in this.opts.formats){const O=this.opts.formats[L];O&&this.addFormat(L,O)}}function T(L){if(Array.isArray(L)){this.addVocabulary(L);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in L){const A=L[O];A.keyword||(A.keyword=O),this.addKeyword(A)}}function j(){const L={...this.opts};for(const O of b)delete L[O];return L}var V={log(){},warn(){},error(){}};function q(L){if(L===!1)return V;if(L===void 0)return console;if(L.log&&L.warn&&L.error)return L;throw new Error("logger must implement log, warn and error methods")}var W=/^[a-z_$][a-z0-9_$:-]*$/i;function x(L,O){const{RULES:A}=this;if((0,f.eachItem)(L,R=>{if(A.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!W.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function te(L,O,A){var R;const p=O==null?void 0:O.post;if(A&&p)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let C=p?P.post:P.rules.find(({type:G})=>G===A);if(C||(C={type:A,rules:[]},P.rules.push(C)),P.keywords[L]=!0,!O)return;const B={keyword:L,definition:{...O,type:(0,y.getJSONTypes)(O.type),schemaType:(0,y.getJSONTypes)(O.schemaType)}};O.before?ue.call(this,C,B,O.before):C.rules.push(B),P.all[L]=B,(R=O.implements)===null||R===void 0||R.forEach(G=>this.addKeyword(G))}function ue(L,O,A){const R=L.rules.findIndex(p=>p.keyword===A);R>=0?L.rules.splice(R,0,O):(L.rules.push(O),this.logger.warn(`rule ${A} is not defined`))}function ve(L){let{metaSchema:O}=L;O!==void 0&&(L.$data&&this.opts.$data&&(O=ae(O)),L.validateSchema=this.compile(O,!0))}var fe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ae(L){return{anyOf:[L,fe]}}}),gl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),yl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=os(),r=Lt(),n=De(),a=ur(),c=ua(),s=Ke(),u={keyword:"$ref",schemaType:"string",code(f){const{gen:w,schema:$,it:E}=f,{baseId:b,schemaEnv:S,validateName:h,opts:i,self:d}=E,{root:l}=S;if(($==="#"||$==="#/")&&b===l.baseId)return m();const _=c.resolveRef.call(d,l,b,$);if(_===void 0)throw new e.default(E.opts.uriResolver,b,$);if(_ instanceof c.SchemaEnv)return g(_);return v(_);function m(){if(S===l)return y(f,h,S,S.$async);const k=w.scopeValue("root",{ref:l});return y(f,(0,n._)`${k}.validate`,l,l.$async)}function g(k){const T=o(f,k);y(f,T,k,k.$async)}function v(k){const T=w.scopeValue("schema",i.code.source===!0?{ref:k,code:(0,n.stringify)(k)}:{ref:k}),j=w.name("valid"),V=f.subschema({schema:k,dataTypes:[],schemaPath:n.nil,topSchemaRef:T,errSchemaPath:$},j);f.mergeEvaluated(V),f.ok(j)}}};function o(f,w){const{gen:$}=f;return w.validate?$.scopeValue("validate",{ref:w.validate}):(0,n._)`${$.scopeValue("wrapper",{ref:w})}.validate`}t.getValidate=o;function y(f,w,$,E){const{gen:b,it:S}=f,{allErrors:h,schemaEnv:i,opts:d}=S,l=d.passContext?a.default.this:n.nil;E?_():m();function _(){if(!i.$async)throw new Error("async schema referenced by sync schema");const k=b.let("valid");b.try(()=>{b.code((0,n._)`await ${(0,r.callValidateCode)(f,w,l)}`),v(w),h||b.assign(k,!0)},T=>{b.if((0,n._)`!(${T} instanceof ${S.ValidationError})`,()=>b.throw(T)),g(T),h||b.assign(k,!1)}),f.ok(k)}function m(){f.result((0,r.callValidateCode)(f,w,l),()=>v(w),()=>g(w))}function g(k){const T=(0,n._)`${k}.errors`;b.assign(a.default.vErrors,(0,n._)`${a.default.vErrors} === null ? ${T} : ${a.default.vErrors}.concat(${T})`),b.assign(a.default.errors,(0,n._)`${a.default.vErrors}.length`)}function v(k){var T;if(!S.opts.unevaluated)return;const j=(T=$==null?void 0:$.validate)===null||T===void 0?void 0:T.evaluated;if(S.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(S.props=s.mergeEvaluated.props(b,j.props,S.props));else{const V=b.var("props",(0,n._)`${k}.evaluated.props`);S.props=s.mergeEvaluated.props(b,V,S.props,n.Name)}if(S.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(S.items=s.mergeEvaluated.items(b,j.items,S.items));else{const V=b.var("items",(0,n._)`${k}.evaluated.items`);S.items=s.mergeEvaluated.items(b,V,S.items,n.Name)}}}t.callRef=y,t.default=u}),vl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=gl(),r=yl(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),_l=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},a={message:({keyword:s,schemaCode:u})=>(0,e.str)`must be ${n[s].okStr} ${u}`,params:({keyword:s,schemaCode:u})=>(0,e._)`{comparison: ${n[s].okStr}, limit: ${u}}`},c={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:a,code(s){const{keyword:u,data:o,schemaCode:y}=s;s.fail$data((0,e._)`${o} ${n[u].fail} ${y} || isNaN(${o})`)}};t.default=c}),wl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r={message:({schemaCode:a})=>(0,e.str)`must be multiple of ${a}`,params:({schemaCode:a})=>(0,e._)`{multipleOf: ${a}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(a){const{gen:c,data:s,schemaCode:u,it:o}=a,y=o.opts.multipleOfPrecision,f=c.let("res"),w=y?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${y}`:(0,e._)`${f} !== parseInt(${f})`;a.fail$data((0,e._)`(${u} === 0 || (${f} = ${s}/${u}, ${w}))`)}};t.default=n}),$l=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let a=0,c=0,s;for(;c<n;)a++,s=r.charCodeAt(c++),s>=55296&&s<=56319&&c<n&&(s=r.charCodeAt(c),(s&64512)===56320&&c++);return a}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),bl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Ke(),n=$l(),a={message({keyword:s,schemaCode:u}){const o=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${u} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},c={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:a,code(s){const{keyword:u,data:o,schemaCode:y,it:f}=s,w=u==="maxLength"?e.operators.GT:e.operators.LT,$=f.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,r.useFunc)(s.gen,n.default)}(${o})`;s.fail$data((0,e._)`${$} ${w} ${y}`)}};t.default=c}),El=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=Ke(),n=De(),a={message:({schemaCode:s})=>(0,n.str)`must match pattern "${s}"`,params:({schemaCode:s})=>(0,n._)`{pattern: ${s}}`},c={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:a,code(s){const{gen:u,data:o,$data:y,schema:f,schemaCode:w,it:$}=s,E=$.opts.unicodeRegExp?"u":"";if(y){const{regExp:b}=$.opts.code,S=b.code==="new RegExp"?(0,n._)`new RegExp`:(0,r.useFunc)(u,b),h=u.let("valid");u.try(()=>u.assign(h,(0,n._)`${S}(${w}, ${E}).test(${o})`),()=>u.assign(h,!1)),s.fail$data((0,n._)`!${h}`)}else{const b=(0,e.usePattern)(s,f);s.fail$data((0,n._)`!${b}.test(${o})`)}}};t.default=c}),Sl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r={message({keyword:a,schemaCode:c}){const s=a==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${c} properties`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(a){const{keyword:c,data:s,schemaCode:u}=a,o=c==="maxProperties"?e.operators.GT:e.operators.LT;a.fail$data((0,e._)`Object.keys(${s}).length ${o} ${u}`)}};t.default=n}),Pl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=De(),n=Ke(),a={message:({params:{missingProperty:s}})=>(0,r.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,r._)`{missingProperty: ${s}}`},c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:a,code(s){const{gen:u,schema:o,schemaCode:y,data:f,$data:w,it:$}=s,{opts:E}=$;if(!w&&o.length===0)return;const b=o.length>=E.loopRequired;if($.allErrors?S():h(),E.strictRequired){const l=s.parentSchema.properties,{definedProperties:_}=s.it;for(const m of o)if((l==null?void 0:l[m])===void 0&&!_.has(m)){const g=$.schemaEnv.baseId+$.errSchemaPath,v=`required property "${m}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)($,v,$.opts.strictRequired)}}function S(){if(b||w)s.block$data(r.nil,i);else for(const l of o)(0,e.checkReportMissingProp)(s,l)}function h(){const l=u.let("missing");if(b||w){const _=u.let("valid",!0);s.block$data(_,()=>d(l,_)),s.ok(_)}else u.if((0,e.checkMissingProp)(s,o,l)),(0,e.reportMissingProp)(s,l),u.else()}function i(){u.forOf("prop",y,l=>{s.setParams({missingProperty:l}),u.if((0,e.noPropertyInData)(u,f,l,E.ownProperties),()=>s.error())})}function d(l,_){s.setParams({missingProperty:l}),u.forOf(l,y,()=>{u.assign(_,(0,e.propertyInData)(u,f,l,E.ownProperties)),u.if((0,r.not)(_),()=>{s.error(),u.break()})},r.nil)}}};t.default=c}),kl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r={message({keyword:a,schemaCode:c}){const s=a==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${c} items`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(a){const{keyword:c,data:s,schemaCode:u}=a,o=c==="maxItems"?e.operators.GT:e.operators.LT;a.fail$data((0,e._)`${s}.length ${o} ${u}`)}};t.default=n}),la=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ss();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),Ol=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Xn(),r=De(),n=Ke(),a=la(),c={message:({params:{i:u,j:o}})=>(0,r.str)`must NOT have duplicate items (items ## ${o} and ${u} are identical)`,params:({params:{i:u,j:o}})=>(0,r._)`{i: ${u}, j: ${o}}`},s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:c,code(u){const{gen:o,data:y,$data:f,schema:w,parentSchema:$,schemaCode:E,it:b}=u;if(!f&&!w)return;const S=o.let("valid"),h=$.items?(0,e.getSchemaTypes)($.items):[];u.block$data(S,i,(0,r._)`${E} === false`),u.ok(S);function i(){const m=o.let("i",(0,r._)`${y}.length`),g=o.let("j");u.setParams({i:m,j:g}),o.assign(S,!0),o.if((0,r._)`${m} > 1`,()=>(d()?l:_)(m,g))}function d(){return h.length>0&&!h.some(m=>m==="object"||m==="array")}function l(m,g){const v=o.name("item"),k=(0,e.checkDataTypes)(h,v,b.opts.strictNumbers,e.DataType.Wrong),T=o.const("indices",(0,r._)`{}`);o.for((0,r._)`;${m}--;`,()=>{o.let(v,(0,r._)`${y}[${m}]`),o.if(k,(0,r._)`continue`),h.length>1&&o.if((0,r._)`typeof ${v} == "string"`,(0,r._)`${v} += "_"`),o.if((0,r._)`typeof ${T}[${v}] == "number"`,()=>{o.assign(g,(0,r._)`${T}[${v}]`),u.error(),o.assign(S,!1).break()}).code((0,r._)`${T}[${v}] = ${m}`)})}function _(m,g){const v=(0,n.useFunc)(o,a.default),k=o.name("outer");o.label(k).for((0,r._)`;${m}--;`,()=>o.for((0,r._)`${g} = ${m}; ${g}--;`,()=>o.if((0,r._)`${v}(${y}[${m}], ${y}[${g}])`,()=>{u.error(),o.assign(S,!1).break(k)})))}}};t.default=s}),Nl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Ke(),n=la(),a={message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},c={keyword:"const",$data:!0,error:a,code(s){const{gen:u,data:o,$data:y,schemaCode:f,schema:w}=s;y||w&&typeof w=="object"?s.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${o}, ${f})`):s.fail((0,e._)`${w} !== ${o}`)}};t.default=c}),Rl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Ke(),n=la(),a={message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},c={keyword:"enum",schemaType:"array",$data:!0,error:a,code(s){const{gen:u,data:o,$data:y,schema:f,schemaCode:w,it:$}=s;if(!y&&f.length===0)throw new Error("enum must have non-empty array");const E=f.length>=$.opts.loopEnum;let b;const S=()=>b??(b=(0,r.useFunc)(u,n.default));let h;if(E||y)h=u.let("valid"),s.block$data(h,i);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const l=u.const("vSchema",w);h=(0,e.or)(...f.map((_,m)=>d(l,m)))}s.pass(h);function i(){u.assign(h,!1),u.forOf("v",w,l=>u.if((0,e._)`${S()}(${o}, ${l})`,()=>u.assign(h,!0).break()))}function d(l,_){const m=f[_];return typeof m=="object"&&m!==null?(0,e._)`${S()}(${o}, ${l}[${_}])`:(0,e._)`${o} === ${m}`}}};t.default=c}),Tl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=_l(),r=wl(),n=bl(),a=El(),c=Sl(),s=Pl(),u=kl(),o=Ol(),y=Nl(),f=Rl(),w=[e.default,r.default,n.default,a.default,c.default,s.default,u.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},y.default,f.default];t.default=w}),qo=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=De(),r=Ke(),n={message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(s){const{parentSchema:u,it:o}=s,{items:y}=u;if(!Array.isArray(y)){(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}c(s,y)}};function c(s,u){const{gen:o,schema:y,data:f,keyword:w,it:$}=s;$.items=!0;const E=o.const("len",(0,e._)`${f}.length`);if(y===!1)s.setParams({len:u.length}),s.pass((0,e._)`${E} <= ${u.length}`);else if(typeof y=="object"&&!(0,r.alwaysValidSchema)($,y)){const S=o.var("valid",(0,e._)`${E} <= ${u.length}`);o.if((0,e.not)(S),()=>b(S)),s.ok(S)}function b(S){o.forRange("i",u.length,E,h=>{s.subschema({keyword:w,dataProp:h,dataPropType:r.Type.Num},S),$.allErrors||o.if((0,e.not)(S),()=>o.break())})}}t.validateAdditionalItems=c,t.default=a}),Vo=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=De(),r=Ke(),n=Lt(),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:u,it:o}=s;if(Array.isArray(u))return c(s,"additionalItems",u);o.items=!0,!(0,r.alwaysValidSchema)(o,u)&&s.ok((0,n.validateArray)(s))}};function c(s,u,o=s.schema){const{gen:y,parentSchema:f,data:w,keyword:$,it:E}=s;h(f),E.opts.unevaluated&&o.length&&E.items!==!0&&(E.items=r.mergeEvaluated.items(y,o.length,E.items));const b=y.name("valid"),S=y.const("len",(0,e._)`${w}.length`);o.forEach((i,d)=>{(0,r.alwaysValidSchema)(E,i)||(y.if((0,e._)`${S} > ${d}`,()=>s.subschema({keyword:$,schemaProp:d,dataProp:d},b)),s.ok(b))});function h(i){const{opts:d,errSchemaPath:l}=E,_=o.length,m=_===i.minItems&&(_===i.maxItems||i[u]===!1);if(d.strictTuples&&!m){const g=`"${$}" is ${_}-tuple, but minItems or maxItems/${u} are not specified or different at path "${l}"`;(0,r.checkStrictMode)(E,g,d.strictTuples)}}}t.validateTuple=c,t.default=a}),Il=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Vo(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Cl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Ke(),n=Lt(),a=qo(),c={message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:c,code(u){const{schema:o,parentSchema:y,it:f}=u,{prefixItems:w}=y;f.items=!0,!(0,r.alwaysValidSchema)(f,o)&&(w?(0,a.validateAdditionalItems)(u,w):u.ok((0,n.validateArray)(u)))}};t.default=s}),Al=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Ke(),n={message:({params:{min:c,max:s}})=>s===void 0?(0,e.str)`must contain at least ${c} valid item(s)`:(0,e.str)`must contain at least ${c} and no more than ${s} valid item(s)`,params:({params:{min:c,max:s}})=>s===void 0?(0,e._)`{minContains: ${c}}`:(0,e._)`{minContains: ${c}, maxContains: ${s}}`},a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(c){const{gen:s,schema:u,parentSchema:o,data:y,it:f}=c;let w,$;const{minContains:E,maxContains:b}=o;f.opts.next?(w=E===void 0?1:E,$=b):w=1;const S=s.const("len",(0,e._)`${y}.length`);if(c.setParams({min:w,max:$}),$===void 0&&w===0){(0,r.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if($!==void 0&&w>$){(0,r.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),c.fail();return}if((0,r.alwaysValidSchema)(f,u)){let _=(0,e._)`${S} >= ${w}`;$!==void 0&&(_=(0,e._)`${_} && ${S} <= ${$}`),c.pass(_);return}f.items=!0;const h=s.name("valid");$===void 0&&w===1?d(h,()=>s.if(h,()=>s.break())):w===0?(s.let(h,!0),$!==void 0&&s.if((0,e._)`${y}.length > 0`,i)):(s.let(h,!1),i()),c.result(h,()=>c.reset());function i(){const _=s.name("_valid"),m=s.let("count",0);d(_,()=>s.if(_,()=>l(m)))}function d(_,m){s.forRange("i",0,S,g=>{c.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},_),m()})}function l(_){s.code((0,e._)`${_}++`),$===void 0?s.if((0,e._)`${_} >= ${w}`,()=>s.assign(h,!0).break()):(s.if((0,e._)`${_} > ${$}`,()=>s.assign(h,!1).break()),w===1?s.assign(h,!0):s.if((0,e._)`${_} >= ${w}`,()=>s.assign(h,!0)))}}};t.default=a}),jl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=De(),r=Ke(),n=Lt();t.error={message:({params:{property:o,depsCount:y,deps:f}})=>{const w=y===1?"property":"properties";return(0,e.str)`must have ${w} ${f} when property ${o} is present`},params:({params:{property:o,depsCount:y,deps:f,missingProperty:w}})=>(0,e._)`{property: ${o},
13
+ missingProperty: ${w},
14
+ depsCount: ${y},
15
+ deps: ${f}}`};var a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(o){const[y,f]=c(o);s(o,y),u(o,f)}};function c({schema:o}){const y={},f={};for(const w in o){if(w==="__proto__")continue;const $=Array.isArray(o[w])?y:f;$[w]=o[w]}return[y,f]}function s(o,y=o.schema){const{gen:f,data:w,it:$}=o;if(Object.keys(y).length===0)return;const E=f.let("missing");for(const b in y){const S=y[b];if(S.length===0)continue;const h=(0,n.propertyInData)(f,w,b,$.opts.ownProperties);o.setParams({property:b,depsCount:S.length,deps:S.join(", ")}),$.allErrors?f.if(h,()=>{for(const i of S)(0,n.checkReportMissingProp)(o,i)}):(f.if((0,e._)`${h} && (${(0,n.checkMissingProp)(o,S,E)})`),(0,n.reportMissingProp)(o,E),f.else())}}t.validatePropertyDeps=s;function u(o,y=o.schema){const{gen:f,data:w,keyword:$,it:E}=o,b=f.name("valid");for(const S in y)(0,r.alwaysValidSchema)(E,y[S])||(f.if((0,n.propertyInData)(f,w,S,E.opts.ownProperties),()=>{const h=o.subschema({keyword:$,schemaProp:S},b);o.mergeValidEvaluated(h,b)},()=>f.var(b,!0)),o.ok(b))}t.validateSchemaDeps=u,t.default=a}),Ml=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Ke(),n={message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(c){const{gen:s,schema:u,data:o,it:y}=c;if((0,r.alwaysValidSchema)(y,u))return;const f=s.name("valid");s.forIn("key",o,w=>{c.setParams({propertyName:w}),c.subschema({keyword:"propertyNames",data:w,dataTypes:["string"],propertyName:w,compositeRule:!0},f),s.if((0,e.not)(f),()=>{c.error(!0),y.allErrors||s.break()})}),c.ok(f)}};t.default=a}),Lo=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=De(),n=ur(),a=Ke(),c={message:"must NOT have additional properties",params:({params:u})=>(0,r._)`{additionalProperty: ${u.additionalProperty}}`},s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:c,code(u){const{gen:o,schema:y,parentSchema:f,data:w,errsCount:$,it:E}=u;if(!$)throw new Error("ajv implementation error");const{allErrors:b,opts:S}=E;if(E.props=!0,S.removeAdditional!=="all"&&(0,a.alwaysValidSchema)(E,y))return;const h=(0,e.allSchemaProperties)(f.properties),i=(0,e.allSchemaProperties)(f.patternProperties);d(),u.ok((0,r._)`${$} === ${n.default.errors}`);function d(){o.forIn("key",w,v=>{!h.length&&!i.length?m(v):o.if(l(v),()=>m(v))})}function l(v){let k;if(h.length>8){const T=(0,a.schemaRefOrVal)(E,f.properties,"properties");k=(0,e.isOwnProperty)(o,T,v)}else h.length?k=(0,r.or)(...h.map(T=>(0,r._)`${v} === ${T}`)):k=r.nil;return i.length&&(k=(0,r.or)(k,...i.map(T=>(0,r._)`${(0,e.usePattern)(u,T)}.test(${v})`))),(0,r.not)(k)}function _(v){o.code((0,r._)`delete ${w}[${v}]`)}function m(v){if(S.removeAdditional==="all"||S.removeAdditional&&y===!1){_(v);return}if(y===!1){u.setParams({additionalProperty:v}),u.error(),b||o.break();return}if(typeof y=="object"&&!(0,a.alwaysValidSchema)(E,y)){const k=o.name("valid");S.removeAdditional==="failing"?(g(v,k,!1),o.if((0,r.not)(k),()=>{u.reset(),_(v)})):(g(v,k),b||o.if((0,r.not)(k),()=>o.break()))}}function g(v,k,T){const j={keyword:"additionalProperties",dataProp:v,dataPropType:a.Type.Str};T===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(j,k)}}};t.default=s}),Dl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=is(),r=Lt(),n=Ke(),a=Lo(),c={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:u,schema:o,parentSchema:y,data:f,it:w}=s;w.opts.removeAdditional==="all"&&y.additionalProperties===void 0&&a.default.code(new e.KeywordCxt(w,a.default,"additionalProperties"));const $=(0,r.allSchemaProperties)(o);for(const i of $)w.definedProperties.add(i);w.opts.unevaluated&&$.length&&w.props!==!0&&(w.props=n.mergeEvaluated.props(u,(0,n.toHash)($),w.props));const E=$.filter(i=>!(0,n.alwaysValidSchema)(w,o[i]));if(E.length===0)return;const b=u.name("valid");for(const i of E)S(i)?h(i):(u.if((0,r.propertyInData)(u,f,i,w.opts.ownProperties)),h(i),w.allErrors||u.else().var(b,!0),u.endIf()),s.it.definedProperties.add(i),s.ok(b);function S(i){return w.opts.useDefaults&&!w.compositeRule&&o[i].default!==void 0}function h(i){s.subschema({keyword:"properties",schemaProp:i,dataProp:i},b)}}};t.default=c}),ql=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r=De(),n=Ke(),a=Ke(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:u,schema:o,data:y,parentSchema:f,it:w}=s,{opts:$}=w,E=(0,e.allSchemaProperties)(o),b=E.filter(m=>(0,n.alwaysValidSchema)(w,o[m]));if(E.length===0||b.length===E.length&&(!w.opts.unevaluated||w.props===!0))return;const S=$.strictSchema&&!$.allowMatchingProperties&&f.properties,h=u.name("valid");w.props!==!0&&!(w.props instanceof r.Name)&&(w.props=(0,a.evaluatedPropsToName)(u,w.props));const{props:i}=w;d();function d(){for(const m of E)S&&l(m),w.allErrors?_(m):(u.var(h,!0),_(m),u.if(h))}function l(m){for(const g in S)new RegExp(m).test(g)&&(0,n.checkStrictMode)(w,`property ${g} matches pattern ${m} (use allowMatchingProperties)`)}function _(m){u.forIn("key",y,g=>{u.if((0,r._)`${(0,e.usePattern)(s,m)}.test(${g})`,()=>{const v=b.includes(m);v||s.subschema({keyword:"patternProperties",schemaProp:m,dataProp:g,dataPropType:a.Type.Str},h),w.opts.unevaluated&&i!==!0?u.assign((0,r._)`${i}[${g}]`,!0):!v&&!w.allErrors&&u.if((0,r.not)(h),()=>u.break())})})}}};t.default=c}),Vl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ke(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:a,schema:c,it:s}=n;if((0,e.alwaysValidSchema)(s,c)){n.fail();return}const u=a.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),n.failResult(u,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),Ll=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lt(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),Ul=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Ke(),n={message:"must match exactly one schema in oneOf",params:({params:c})=>(0,e._)`{passingSchemas: ${c.passing}}`},a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(c){const{gen:s,schema:u,parentSchema:o,it:y}=c;if(!Array.isArray(u))throw new Error("ajv implementation error");if(y.opts.discriminator&&o.discriminator)return;const f=u,w=s.let("valid",!1),$=s.let("passing",null),E=s.name("_valid");c.setParams({passing:$}),s.block(b),c.result(w,()=>c.reset(),()=>c.error(!0));function b(){f.forEach((S,h)=>{let i;(0,r.alwaysValidSchema)(y,S)?s.var(E,!0):i=c.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},E),h>0&&s.if((0,e._)`${E} && ${w}`).assign(w,!1).assign($,(0,e._)`[${$}, ${h}]`).else(),s.if(E,()=>{s.assign(w,!0),s.assign($,h),i&&c.mergeEvaluated(i,e.Name)})})}}};t.default=a}),zl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ke(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:a,schema:c,it:s}=n;if(!Array.isArray(c))throw new Error("ajv implementation error");const u=a.name("valid");c.forEach((o,y)=>{if((0,e.alwaysValidSchema)(s,o))return;const f=n.subschema({keyword:"allOf",schemaProp:y},u);n.ok(u),n.mergeEvaluated(f)})}};t.default=r}),Fl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Ke(),n={message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(s){const{gen:u,parentSchema:o,it:y}=s;o.then===void 0&&o.else===void 0&&(0,r.checkStrictMode)(y,'"if" without "then" and "else" is ignored');const f=c(y,"then"),w=c(y,"else");if(!f&&!w)return;const $=u.let("valid",!0),E=u.name("_valid");if(b(),s.reset(),f&&w){const h=u.let("ifClause");s.setParams({ifClause:h}),u.if(E,S("then",h),S("else",h))}else f?u.if(E,S("then")):u.if((0,e.not)(E),S("else"));s.pass($,()=>s.error(!0));function b(){const h=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},E);s.mergeEvaluated(h)}function S(h,i){return()=>{const d=s.subschema({keyword:h},E);u.assign($,E),s.mergeValidEvaluated(d,$),i?u.assign(i,(0,e._)`${h}`):s.setParams({ifClause:h})}}}};function c(s,u){const o=s.schema[u];return o!==void 0&&!(0,r.alwaysValidSchema)(s,o)}t.default=a}),Kl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ke(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:a,it:c}){a.if===void 0&&(0,e.checkStrictMode)(c,`"${n}" without "if" is ignored`)}};t.default=r}),Hl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=qo(),r=Il(),n=Vo(),a=Cl(),c=Al(),s=jl(),u=Ml(),o=Lo(),y=Dl(),f=ql(),w=Vl(),$=Ll(),E=Ul(),b=zl(),S=Fl(),h=Kl();function i(d=!1){const l=[w.default,$.default,E.default,b.default,S.default,h.default,u.default,o.default,s.default,y.default,f.default];return d?l.push(r.default,a.default):l.push(e.default,n.default),l.push(c.default),l}t.default=i}),Bl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r={message:({schemaCode:a})=>(0,e.str)`must match format "${a}"`,params:({schemaCode:a})=>(0,e._)`{format: ${a}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(a,c){const{gen:s,data:u,$data:o,schema:y,schemaCode:f,it:w}=a,{opts:$,errSchemaPath:E,schemaEnv:b,self:S}=w;if(!$.validateFormats)return;o?h():i();function h(){const d=s.scopeValue("formats",{ref:S.formats,code:$.code.formats}),l=s.const("fDef",(0,e._)`${d}[${f}]`),_=s.let("fType"),m=s.let("format");s.if((0,e._)`typeof ${l} == "object" && !(${l} instanceof RegExp)`,()=>s.assign(_,(0,e._)`${l}.type || "string"`).assign(m,(0,e._)`${l}.validate`),()=>s.assign(_,(0,e._)`"string"`).assign(m,l)),a.fail$data((0,e.or)(g(),v()));function g(){return $.strictSchema===!1?e.nil:(0,e._)`${f} && !${m}`}function v(){const k=b.$async?(0,e._)`(${l}.async ? await ${m}(${u}) : ${m}(${u}))`:(0,e._)`${m}(${u})`,T=(0,e._)`(typeof ${m} == "function" ? ${k} : ${m}.test(${u}))`;return(0,e._)`${m} && ${m} !== true && ${_} === ${c} && !${T}`}}function i(){const d=S.formats[y];if(!d){g();return}if(d===!0)return;const[l,_,m]=v(d);l===c&&a.pass(k());function g(){if($.strictSchema===!1){S.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${y}" ignored in schema at path "${E}"`}}function v(T){const j=T instanceof RegExp?(0,e.regexpCode)(T):$.code.formats?(0,e._)`${$.code.formats}${(0,e.getProperty)(y)}`:void 0,V=s.scopeValue("formats",{key:y,ref:T,code:j});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,e._)`${V}.validate`]:["string",T,V]}function k(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!b.$async)throw new Error("async format in sync schema");return(0,e._)`await ${m}(${u})`}return typeof _=="function"?(0,e._)`${m}(${u})`:(0,e._)`${m}.test(${u})`}}}};t.default=n}),Gl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Bl(),r=[e.default];t.default=r}),xl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),Wl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=vl(),r=Tl(),n=Hl(),a=Gl(),c=xl(),s=[e.default,r.default,(0,n.default)(),a.default,c.metadataVocabulary,c.contentVocabulary];t.default=s}),Jl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0;var e;(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(t.DiscrError=e={}))}),Ql=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=De(),r=Jl(),n=ua(),a=os(),c=Ke(),s={message:({params:{discrError:o,tagName:y}})=>o===r.DiscrError.Tag?`tag "${y}" must be string`:`value of tag "${y}" must be in oneOf`,params:({params:{discrError:o,tag:y,tagName:f}})=>(0,e._)`{error: ${o}, tag: ${f}, tagValue: ${y}}`},u={keyword:"discriminator",type:"object",schemaType:"object",error:s,code(o){const{gen:y,data:f,schema:w,parentSchema:$,it:E}=o,{oneOf:b}=$;if(!E.opts.discriminator)throw new Error("discriminator: requires discriminator option");const S=w.propertyName;if(typeof S!="string")throw new Error("discriminator: requires propertyName");if(w.mapping)throw new Error("discriminator: mapping is not supported");if(!b)throw new Error("discriminator: requires oneOf keyword");const h=y.let("valid",!1),i=y.const("tag",(0,e._)`${f}${(0,e.getProperty)(S)}`);y.if((0,e._)`typeof ${i} == "string"`,()=>d(),()=>o.error(!1,{discrError:r.DiscrError.Tag,tag:i,tagName:S})),o.ok(h);function d(){const m=_();y.if(!1);for(const g in m)y.elseIf((0,e._)`${i} === ${g}`),y.assign(h,l(m[g]));y.else(),o.error(!1,{discrError:r.DiscrError.Mapping,tag:i,tagName:S}),y.endIf()}function l(m){const g=y.name("valid"),v=o.subschema({keyword:"oneOf",schemaProp:m},g);return o.mergeEvaluated(v,e.Name),g}function _(){var m;const g={},v=T($);let k=!0;for(let q=0;q<b.length;q++){let W=b[q];if(W!=null&&W.$ref&&!(0,c.schemaHasRulesButRef)(W,E.self.RULES)){const te=W.$ref;if(W=n.resolveRef.call(E.self,E.schemaEnv.root,E.baseId,te),W instanceof n.SchemaEnv&&(W=W.schema),W===void 0)throw new a.default(E.opts.uriResolver,E.baseId,te)}const x=(m=W==null?void 0:W.properties)===null||m===void 0?void 0:m[S];if(typeof x!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${S}"`);k=k&&(v||T(W)),j(x,q)}if(!k)throw new Error(`discriminator: "${S}" must be required`);return g;function T({required:q}){return Array.isArray(q)&&q.includes(S)}function j(q,W){if(q.const)V(q.const,W);else if(q.enum)for(const x of q.enum)V(x,W);else throw new Error(`discriminator: "properties/${S}" must have "const" or "enum"`)}function V(q,W){if(typeof q!="string"||q in g)throw new Error(`discriminator: "${S}" values must be unique strings`);g[q]=W}}}};t.default=u}),Xl=Q(function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),Uo=Q(function(t,e){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;var r=ml(),n=Wl(),a=Ql(),c=Xl(),s=["/properties"],u="http://json-schema.org/draft-07/schema";class o extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(c,s):c;this.addMetaSchema(b,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=o,e.exports=t=o,e.exports.Ajv=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var y=is();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return y.KeywordCxt}});var f=De();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var w=ca();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return w.default}});var $=os();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return $.default}})}),Yl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(T,j){return{validate:T,compare:j}}t.fullFormats={date:e(c,s),time:e(o,y),"date-time":e(w,$),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:S,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:k,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:i,int32:{type:"number",validate:_},int64:{type:"number",validate:m},float:{type:"number",validate:g},double:{type:"number",validate:g},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,$),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(T){return T%4===0&&(T%100!==0||T%400===0)}var n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31];function c(T){const j=n.exec(T);if(!j)return!1;const V=+j[1],q=+j[2],W=+j[3];return q>=1&&q<=12&&W>=1&&W<=(q===2&&r(V)?29:a[q])}function s(T,j){if(T&&j)return T>j?1:T<j?-1:0}var u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function o(T,j){const V=u.exec(T);if(!V)return!1;const q=+V[1],W=+V[2],x=+V[3],te=V[5];return(q<=23&&W<=59&&x<=59||q===23&&W===59&&x===60)&&(!j||te!=="")}function y(T,j){if(!(T&&j))return;const V=u.exec(T),q=u.exec(j);if(V&&q)return T=V[1]+V[2]+V[3]+(V[4]||""),j=q[1]+q[2]+q[3]+(q[4]||""),T>j?1:T<j?-1:0}var f=/t|\s/i;function w(T){const j=T.split(f);return j.length===2&&c(j[0])&&o(j[1],!0)}function $(T,j){if(!(T&&j))return;const[V,q]=T.split(f),[W,x]=j.split(f),te=s(V,W);if(te!==void 0)return te||y(q,x)}var E=/\/|:/,b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function S(T){return E.test(T)&&b.test(T)}var h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function i(T){return h.lastIndex=0,h.test(T)}var d=-2147483648,l=2**31-1;function _(T){return Number.isInteger(T)&&T<=l&&T>=d}function m(T){return Number.isInteger(T)}function g(){return!0}var v=/[^\\]\\Z/;function k(T){if(v.test(T))return!1;try{return new RegExp(T),!0}catch{return!1}}}),Yn=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(d){if(super(),!t.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");this.str=d}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(d){super(),this._items=typeof d=="string"?[d]:d}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const d=this._items[0];return d===""||d==='""'}get str(){var d;return(d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce((l,_)=>`${l}${_}`,"")}get names(){var d;return(d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce((l,_)=>(_ instanceof r&&(l[_.str]=(l[_.str]||0)+1),l),{})}}t._Code=n,t.nil=new n("");function a(i,...d){const l=[i[0]];let _=0;for(;_<d.length;)u(l,d[_]),l.push(i[++_]);return new n(l)}t._=a;var c=new n("+");function s(i,...d){const l=[E(i[0])];let _=0;for(;_<d.length;)l.push(c),u(l,d[_]),l.push(c,E(i[++_]));return o(l),new n(l)}t.str=s;function u(i,d){d instanceof n?i.push(...d._items):d instanceof r?i.push(d):i.push(w(d))}t.addCodeArg=u;function o(i){let d=1;for(;d<i.length-1;){if(i[d]===c){const l=y(i[d-1],i[d+1]);if(l!==void 0){i.splice(d-1,3,l);continue}i[d++]="+"}d++}}function y(i,d){if(d==='""')return i;if(i==='""')return d;if(typeof i=="string")return d instanceof r||i[i.length-1]!=='"'?void 0:typeof d!="string"?`${i.slice(0,-1)}${d}"`:d[0]==='"'?i.slice(0,-1)+d.slice(1):void 0;if(typeof d=="string"&&d[0]==='"'&&!(i instanceof r))return`"${i}${d.slice(1)}`}function f(i,d){return d.emptyStr()?i:i.emptyStr()?d:s`${i}${d}`}t.strConcat=f;function w(i){return typeof i=="number"||typeof i=="boolean"||i===null?i:E(Array.isArray(i)?i.join(","):i)}function $(i){return new n(E(i))}t.stringify=$;function E(i){return JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function b(i){return typeof i=="string"&&t.IDENTIFIER.test(i)?new n(`.${i}`):a`[${i}]`}t.getProperty=b;function S(i){if(typeof i=="string"&&t.IDENTIFIER.test(i))return new n(`${i}`);throw new Error(`CodeGen: invalid export name: ${i}, use explicit $id name mapping`)}t.getEsmExportName=S;function h(i){return new n(i.toString())}t.regexpCode=h}),Ka=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Yn();class r extends Error{constructor(y){super(`CodeGen: "code" for ${y} not defined`),this.value=y.value}}var n;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:y,parent:f}={}){this._names={},this._prefixes=y,this._parent=f}toName(y){return y instanceof e.Name?y:this.name(y)}name(y){return new e.Name(this._newName(y))}_newName(y){const f=this._names[y]||this._nameGroup(y);return`${y}${f.index++}`}_nameGroup(y){var f,w;if(!((w=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||w===void 0)&&w.has(y)||this._prefixes&&!this._prefixes.has(y))throw new Error(`CodeGen: prefix "${y}" is not allowed in this scope`);return this._names[y]={prefix:y,index:0}}}t.Scope=a;class c extends e.Name{constructor(y,f){super(f),this.prefix=y}setValue(y,{property:f,itemIndex:w}){this.value=y,this.scopePath=(0,e._)`.${new e.Name(f)}[${w}]`}}t.ValueScopeName=c;var s=(0,e._)`\n`;class u extends a{constructor(y){super(y),this._values={},this._scope=y.scope,this.opts={...y,_n:y.lines?s:e.nil}}get(){return this._scope}name(y){return new c(y,this._newName(y))}value(y,f){var w;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(y),{prefix:E}=$,b=(w=f.key)!==null&&w!==void 0?w:f.ref;let S=this._values[E];if(S){const d=S.get(b);if(d)return d}else S=this._values[E]=new Map;S.set(b,$);const h=this._scope[E]||(this._scope[E]=[]),i=h.length;return h[i]=f.ref,$.setValue(f,{property:E,itemIndex:i}),$}getValue(y,f){const w=this._values[y];if(w)return w.get(f)}scopeRefs(y,f=this._values){return this._reduceValues(f,w=>{if(w.scopePath===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return(0,e._)`${y}${w.scopePath}`})}scopeCode(y=this._values,f,w){return this._reduceValues(y,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},f,w)}_reduceValues(y,f,w={},$){let E=e.nil;for(const b in y){const S=y[b];if(!S)continue;const h=w[b]=w[b]||new Map;S.forEach(i=>{if(h.has(i))return;h.set(i,n.Started);let d=f(i);if(d){const l=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${l} ${i} = ${d};${this.opts._n}`}else if(d=$==null?void 0:$(i))E=(0,e._)`${E}${d}${this.opts._n}`;else throw new r(i);h.set(i,n.Completed)})}return E}}t.ValueScope=u}),Me=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Yn(),r=Ka(),n=Yn();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var a=Ka();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class c{optimizeNodes(){return this}optimizeNames(p,P){return this}}class s extends c{constructor(p,P,C){super(),this.varKind=p,this.name=P,this.rhs=C}render({es5:p,_n:P}){const C=p?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${B};`+P}optimizeNames(p,P){if(p[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,p,P)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends c{constructor(p,P,C){super(),this.lhs=p,this.rhs=P,this.sideEffects=C}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,P){if(!(this.lhs instanceof e.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=x(this.rhs,p,P),this}get names(){const p=this.lhs instanceof e.Name?{}:{...this.lhs.names};return W(p,this.rhs)}}class o extends u{constructor(p,P,C,B){super(p,C,B),this.op=P}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class y extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class f extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class w extends c{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class $ extends c{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,P){return this.code=x(this.code,p,P),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends c{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((P,C)=>P+C.render(p),"")}optimizeNodes(){const{nodes:p}=this;let P=p.length;for(;P--;){const C=p[P].optimizeNodes();Array.isArray(C)?p.splice(P,1,...C):C?p[P]=C:p.splice(P,1)}return p.length>0?this:void 0}optimizeNames(p,P){const{nodes:C}=this;let B=C.length;for(;B--;){const G=C[B];G.optimizeNames(p,P)||(te(p,G.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((p,P)=>q(p,P.names),{})}}class b extends E{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class S extends E{}class h extends b{}h.kind="else";class i extends b{constructor(p,P){super(P),this.condition=p}render(p){let P=`if(${this.condition})`+super.render(p);return this.else&&(P+="else "+this.else.render(p)),P}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let P=this.else;if(P){const C=P.optimizeNodes();P=this.else=Array.isArray(C)?new h(C):C}if(P)return p===!1?P instanceof i?P:P.nodes:this.nodes.length?this:new i(ue(p),P instanceof i?[P]:P.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,P){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(p,P),!!(super.optimizeNames(p,P)||this.else))return this.condition=x(this.condition,p,P),this}get names(){const p=super.names;return W(p,this.condition),this.else&&q(p,this.else.names),p}}i.kind="if";class d extends b{}d.kind="for";class l extends d{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iteration=x(this.iteration,p,P),this}get names(){return q(super.names,this.iteration.names)}}class _ extends d{constructor(p,P,C,B){super(),this.varKind=p,this.name=P,this.from=C,this.to=B}render(p){const P=p.es5?r.varKinds.var:this.varKind,{name:C,from:B,to:G}=this;return`for(${P} ${C}=${B}; ${C}<${G}; ${C}++)`+super.render(p)}get names(){const p=W(super.names,this.from);return W(p,this.to)}}class m extends d{constructor(p,P,C,B){super(),this.loop=p,this.varKind=P,this.name=C,this.iterable=B}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iterable=x(this.iterable,p,P),this}get names(){return q(super.names,this.iterable.names)}}class g extends b{constructor(p,P,C){super(),this.name=p,this.args=P,this.async=C}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}g.kind="func";class v extends E{render(p){return"return "+super.render(p)}}v.kind="return";class k extends b{render(p){let P="try"+super.render(p);return this.catch&&(P+=this.catch.render(p)),this.finally&&(P+=this.finally.render(p)),P}optimizeNodes(){var p,P;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(p,P){var C,B;return super.optimizeNames(p,P),(C=this.catch)===null||C===void 0||C.optimizeNames(p,P),(B=this.finally)===null||B===void 0||B.optimizeNames(p,P),this}get names(){const p=super.names;return this.catch&&q(p,this.catch.names),this.finally&&q(p,this.finally.names),p}}class T extends b{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}T.kind="catch";class j extends b{render(p){return"finally"+super.render(p)}}j.kind="finally";class V{constructor(p,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
16
+ `:""},this._extScope=p,this._scope=new r.Scope({parent:p}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(p){return this._scope.name(p)}scopeName(p){return this._extScope.name(p)}scopeValue(p,P){const C=this._extScope.value(p,P);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(p,P){return this._extScope.getValue(p,P)}scopeRefs(p){return this._extScope.scopeRefs(p,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(p,P,C,B){const G=this._scope.toName(P);return C!==void 0&&B&&(this._constants[G.str]=C),this._leafNode(new s(p,G,C)),G}const(p,P,C){return this._def(r.varKinds.const,p,P,C)}let(p,P,C){return this._def(r.varKinds.let,p,P,C)}var(p,P,C){return this._def(r.varKinds.var,p,P,C)}assign(p,P,C){return this._leafNode(new u(p,P,C))}add(p,P){return this._leafNode(new o(p,t.operators.ADD,P))}code(p){return typeof p=="function"?p():p!==e.nil&&this._leafNode(new $(p)),this}object(...p){const P=["{"];for(const[C,B]of p)P.length>1&&P.push(","),P.push(C),(C!==B||this.opts.es5)&&(P.push(":"),(0,e.addCodeArg)(P,B));return P.push("}"),new e._Code(P)}if(p,P,C){if(this._blockNode(new i(p)),P&&C)this.code(P).else().code(C).endIf();else if(P)this.code(P).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(p){return this._elseNode(new i(p))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode(i,h)}_for(p,P){return this._blockNode(p),P&&this.code(P).endFor(),this}for(p,P){return this._for(new l(p),P)}forRange(p,P,C,B,G=this.opts.es5?r.varKinds.var:r.varKinds.let){const re=this._scope.toName(p);return this._for(new _(G,re,P,C),()=>B(re))}forOf(p,P,C,B=r.varKinds.const){const G=this._scope.toName(p);if(this.opts.es5){const re=P instanceof e.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,e._)`${re}.length`,Z=>{this.var(G,(0,e._)`${re}[${Z}]`),C(G)})}return this._for(new m("of",B,G,P),()=>C(G))}forIn(p,P,C,B=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(p,(0,e._)`Object.keys(${P})`,C);const G=this._scope.toName(p);return this._for(new m("in",B,G,P),()=>C(G))}endFor(){return this._endBlockNode(d)}label(p){return this._leafNode(new y(p))}break(p){return this._leafNode(new f(p))}return(p){const P=new v;if(this._blockNode(P),this.code(p),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(v)}try(p,P,C){if(!P&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const B=new k;if(this._blockNode(B),this.code(p),P){const G=this.name("e");this._currNode=B.catch=new T(G),P(G)}return C&&(this._currNode=B.finally=new j,this.code(C)),this._endBlockNode(T,j)}throw(p){return this._leafNode(new w(p))}block(p,P){return this._blockStarts.push(this._nodes.length),p&&this.code(p).endBlock(P),this}endBlock(p){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-P;if(C<0||p!==void 0&&C!==p)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${p} expected`);return this._nodes.length=P,this}func(p,P=e.nil,C,B){return this._blockNode(new g(p,P,C)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(p=1){for(;p-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(p){return this._currNode.nodes.push(p),this}_blockNode(p){this._currNode.nodes.push(p),this._nodes.push(p)}_endBlockNode(p,P){const C=this._currNode;if(C instanceof p||P&&C instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${p.kind}/${P.kind}`:p.kind}"`)}_elseNode(p){const P=this._currNode;if(!(P instanceof i))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=p,this}get _root(){return this._nodes[0]}get _currNode(){const p=this._nodes;return p[p.length-1]}set _currNode(p){const P=this._nodes;P[P.length-1]=p}}t.CodeGen=V;function q(R,p){for(const P in p)R[P]=(R[P]||0)+(p[P]||0);return R}function W(R,p){return p instanceof e._CodeOrName?q(R,p.names):R}function x(R,p,P){if(R instanceof e.Name)return C(R);if(!B(R))return R;return new e._Code(R._items.reduce((G,re)=>(re instanceof e.Name&&(re=C(re)),re instanceof e._Code?G.push(...re._items):G.push(re),G),[]));function C(G){const re=P[G.str];return re===void 0||p[G.str]!==1?G:(delete p[G.str],re)}function B(G){return G instanceof e._Code&&G._items.some(re=>re instanceof e.Name&&p[re.str]===1&&P[re.str]!==void 0)}}function te(R,p){for(const P in p)R[P]=(R[P]||0)-(p[P]||0)}function ue(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${A(R)}`}t.not=ue;var ve=O(t.operators.AND);function fe(...R){return R.reduce(ve)}t.and=fe;var ae=O(t.operators.OR);function L(...R){return R.reduce(ae)}t.or=L;function O(R){return(p,P)=>p===e.nil?P:P===e.nil?p:(0,e._)`${A(p)} ${R} ${A(P)}`}function A(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),Be=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Me(),r=Yn();function n(g){const v={};for(const k of g)v[k]=!0;return v}t.toHash=n;function a(g,v){return typeof v=="boolean"?v:Object.keys(v).length===0?!0:(c(g,v),!s(v,g.self.RULES.all))}t.alwaysValidSchema=a;function c(g,v=g.schema){const{opts:k,self:T}=g;if(!k.strictSchema||typeof v=="boolean")return;const j=T.RULES.keywords;for(const V in v)j[V]||m(g,`unknown keyword: "${V}"`)}t.checkUnknownRules=c;function s(g,v){if(typeof g=="boolean")return!g;for(const k in g)if(v[k])return!0;return!1}t.schemaHasRules=s;function u(g,v){if(typeof g=="boolean")return!g;for(const k in g)if(k!=="$ref"&&v.all[k])return!0;return!1}t.schemaHasRulesButRef=u;function o({topSchemaRef:g,schemaPath:v},k,T,j){if(!j){if(typeof k=="number"||typeof k=="boolean")return k;if(typeof k=="string")return(0,e._)`${k}`}return(0,e._)`${g}${v}${(0,e.getProperty)(T)}`}t.schemaRefOrVal=o;function y(g){return $(decodeURIComponent(g))}t.unescapeFragment=y;function f(g){return encodeURIComponent(w(g))}t.escapeFragment=f;function w(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=w;function $(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=$;function E(g,v){if(Array.isArray(g))for(const k of g)v(k);else v(g)}t.eachItem=E;function b({mergeNames:g,mergeToName:v,mergeValues:k,resultToName:T}){return(j,V,q,W)=>{const x=q===void 0?V:q instanceof e.Name?(V instanceof e.Name?g(j,V,q):v(j,V,q),q):V instanceof e.Name?(v(j,q,V),V):k(V,q);return W===e.Name&&!(x instanceof e.Name)?T(j,x):x}}t.mergeEvaluated={props:b({mergeNames:(g,v,k)=>g.if((0,e._)`${k} !== true && ${v} !== undefined`,()=>{g.if((0,e._)`${v} === true`,()=>g.assign(k,!0),()=>g.assign(k,(0,e._)`${k} || {}`).code((0,e._)`Object.assign(${k}, ${v})`))}),mergeToName:(g,v,k)=>g.if((0,e._)`${k} !== true`,()=>{v===!0?g.assign(k,!0):(g.assign(k,(0,e._)`${k} || {}`),h(g,k,v))}),mergeValues:(g,v)=>g===!0?!0:{...g,...v},resultToName:S}),items:b({mergeNames:(g,v,k)=>g.if((0,e._)`${k} !== true && ${v} !== undefined`,()=>g.assign(k,(0,e._)`${v} === true ? true : ${k} > ${v} ? ${k} : ${v}`)),mergeToName:(g,v,k)=>g.if((0,e._)`${k} !== true`,()=>g.assign(k,v===!0?!0:(0,e._)`${k} > ${v} ? ${k} : ${v}`)),mergeValues:(g,v)=>g===!0?!0:Math.max(g,v),resultToName:(g,v)=>g.var("items",v)})};function S(g,v){if(v===!0)return g.var("props",!0);const k=g.var("props",(0,e._)`{}`);return v!==void 0&&h(g,k,v),k}t.evaluatedPropsToName=S;function h(g,v,k){Object.keys(k).forEach(T=>g.assign((0,e._)`${v}${(0,e.getProperty)(T)}`,!0))}t.setEvaluated=h;var i={};function d(g,v){return g.scopeValue("func",{ref:v,code:i[v.code]||(i[v.code]=new r._Code(v.code))})}t.useFunc=d;var l;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(l=t.Type||(t.Type={}));function _(g,v,k){if(g instanceof e.Name){const T=v===l.Num;return k?T?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:T?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return k?(0,e.getProperty)(g).toString():"/"+w(g)}t.getErrorPath=_;function m(g,v,k=g.opts.strictSchema){if(k){if(v=`strict mode: ${v}`,k===!0)throw new Error(v);g.self.logger.warn(v)}}t.checkStrictMode=m}),lr=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={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")};t.default=r}),cs=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Me(),r=Be(),n=lr();t.keywordError={message:({keyword:h})=>(0,e.str)`must pass "${h}" keyword validation`},t.keyword$DataError={message:({keyword:h,schemaType:i})=>i?(0,e.str)`"${h}" keyword must be ${i} ($data)`:(0,e.str)`"${h}" keyword is invalid ($data)`};function a(h,i=t.keywordError,d,l){const{it:_}=h,{gen:m,compositeRule:g,allErrors:v}=_,k=w(h,i,d);l??(g||v)?o(m,k):y(_,(0,e._)`[${k}]`)}t.reportError=a;function c(h,i=t.keywordError,d){const{it:l}=h,{gen:_,compositeRule:m,allErrors:g}=l,v=w(h,i,d);o(_,v),m||g||y(l,n.default.vErrors)}t.reportExtraError=c;function s(h,i){h.assign(n.default.errors,i),h.if((0,e._)`${n.default.vErrors} !== null`,()=>h.if(i,()=>h.assign((0,e._)`${n.default.vErrors}.length`,i),()=>h.assign(n.default.vErrors,null)))}t.resetErrorsCount=s;function u({gen:h,keyword:i,schemaValue:d,data:l,errsCount:_,it:m}){if(_===void 0)throw new Error("ajv implementation error");const g=h.name("err");h.forRange("i",_,n.default.errors,v=>{h.const(g,(0,e._)`${n.default.vErrors}[${v}]`),h.if((0,e._)`${g}.instancePath === undefined`,()=>h.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,m.errorPath))),h.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${m.errSchemaPath}/${i}`),m.opts.verbose&&(h.assign((0,e._)`${g}.schema`,d),h.assign((0,e._)`${g}.data`,l))})}t.extendErrors=u;function o(h,i){const d=h.const("err",i);h.if((0,e._)`${n.default.vErrors} === null`,()=>h.assign(n.default.vErrors,(0,e._)`[${d}]`),(0,e._)`${n.default.vErrors}.push(${d})`),h.code((0,e._)`${n.default.errors}++`)}function y(h,i){const{gen:d,validateName:l,schemaEnv:_}=h;_.$async?d.throw((0,e._)`new ${h.ValidationError}(${i})`):(d.assign((0,e._)`${l}.errors`,i),d.return(!1))}var f={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function w(h,i,d){const{createErrors:l}=h.it;return l===!1?(0,e._)`{}`:$(h,i,d)}function $(h,i,d={}){const{gen:l,it:_}=h,m=[E(_,d),b(h,d)];return S(h,i,m),l.object(...m)}function E({errorPath:h},{instancePath:i}){const d=i?(0,e.str)`${h}${(0,r.getErrorPath)(i,r.Type.Str)}`:h;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,d)]}function b({keyword:h,it:{errSchemaPath:i}},{schemaPath:d,parentSchema:l}){let _=l?i:(0,e.str)`${i}/${h}`;return d&&(_=(0,e.str)`${_}${(0,r.getErrorPath)(d,r.Type.Str)}`),[f.schemaPath,_]}function S(h,{params:i,message:d},l){const{keyword:_,data:m,schemaValue:g,it:v}=h,{opts:k,propertyName:T,topSchemaRef:j,schemaPath:V}=v;l.push([f.keyword,_],[f.params,typeof i=="function"?i(h):i||(0,e._)`{}`]),k.messages&&l.push([f.message,typeof d=="function"?d(h):d]),k.verbose&&l.push([f.schema,g],[f.parentSchema,(0,e._)`${j}${V}`],[n.default.data,m]),T&&l.push([f.propertyName,T])}}),Zl=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=cs(),r=Me(),n=lr(),a={message:"boolean schema is false"};function c(o){const{gen:y,schema:f,validateName:w}=o;f===!1?u(o,!1):typeof f=="object"&&f.$async===!0?y.return(n.default.data):(y.assign((0,r._)`${w}.errors`,null),y.return(!0))}t.topBoolOrEmptySchema=c;function s(o,y){const{gen:f,schema:w}=o;w===!1?(f.var(y,!1),u(o)):f.var(y,!0)}t.boolOrEmptySchema=s;function u(o,y){const{gen:f,data:w}=o,$={gen:f,keyword:"false schema",data:w,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)($,a,void 0,y)}}),zo=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(c){return typeof c=="string"&&r.has(c)}t.isJSONType=n;function a(){const c={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...c,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},c.number,c.string,c.array,c.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=a}),Fo=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:a,self:c},s){const u=c.RULES.types[s];return u&&u!==!0&&r(a,u)}t.schemaHasRulesForType=e;function r(a,c){return c.rules.some(s=>n(a,s))}t.shouldUseGroup=r;function n(a,c){var s;return a[c.keyword]!==void 0||((s=c.definition.implements)===null||s===void 0?void 0:s.some(u=>a[u]!==void 0))}t.shouldUseRule=n}),Zn=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=zo(),r=Fo(),n=cs(),a=Me(),c=Be(),s;(function(l){l[l.Correct=0]="Correct",l[l.Wrong=1]="Wrong"})(s=t.DataType||(t.DataType={}));function u(l){const _=o(l.type);if(_.includes("null")){if(l.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!_.length&&l.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');l.nullable===!0&&_.push("null")}return _}t.getSchemaTypes=u;function o(l){const _=Array.isArray(l)?l:l?[l]:[];if(_.every(e.isJSONType))return _;throw new Error("type must be JSONType or JSONType[]: "+_.join(","))}t.getJSONTypes=o;function y(l,_){const{gen:m,data:g,opts:v}=l,k=w(_,v.coerceTypes),T=_.length>0&&!(k.length===0&&_.length===1&&(0,r.schemaHasRulesForType)(l,_[0]));if(T){const j=S(_,g,v.strictNumbers,s.Wrong);m.if(j,()=>{k.length?$(l,_,k):i(l)})}return T}t.coerceAndCheckDataType=y;var f=new Set(["string","number","integer","boolean","null"]);function w(l,_){return _?l.filter(m=>f.has(m)||_==="array"&&m==="array"):[]}function $(l,_,m){const{gen:g,data:v,opts:k}=l,T=g.let("dataType",(0,a._)`typeof ${v}`),j=g.let("coerced",(0,a._)`undefined`);k.coerceTypes==="array"&&g.if((0,a._)`${T} == 'object' && Array.isArray(${v}) && ${v}.length == 1`,()=>g.assign(v,(0,a._)`${v}[0]`).assign(T,(0,a._)`typeof ${v}`).if(S(_,v,k.strictNumbers),()=>g.assign(j,v))),g.if((0,a._)`${j} !== undefined`);for(const q of m)(f.has(q)||q==="array"&&k.coerceTypes==="array")&&V(q);g.else(),i(l),g.endIf(),g.if((0,a._)`${j} !== undefined`,()=>{g.assign(v,j),E(l,j)});function V(q){switch(q){case"string":g.elseIf((0,a._)`${T} == "number" || ${T} == "boolean"`).assign(j,(0,a._)`"" + ${v}`).elseIf((0,a._)`${v} === null`).assign(j,(0,a._)`""`);return;case"number":g.elseIf((0,a._)`${T} == "boolean" || ${v} === null
17
+ || (${T} == "string" && ${v} && ${v} == +${v})`).assign(j,(0,a._)`+${v}`);return;case"integer":g.elseIf((0,a._)`${T} === "boolean" || ${v} === null
18
+ || (${T} === "string" && ${v} && ${v} == +${v} && !(${v} % 1))`).assign(j,(0,a._)`+${v}`);return;case"boolean":g.elseIf((0,a._)`${v} === "false" || ${v} === 0 || ${v} === null`).assign(j,!1).elseIf((0,a._)`${v} === "true" || ${v} === 1`).assign(j,!0);return;case"null":g.elseIf((0,a._)`${v} === "" || ${v} === 0 || ${v} === false`),g.assign(j,null);return;case"array":g.elseIf((0,a._)`${T} === "string" || ${T} === "number"
19
+ || ${T} === "boolean" || ${v} === null`).assign(j,(0,a._)`[${v}]`)}}}function E({gen:l,parentData:_,parentDataProperty:m},g){l.if((0,a._)`${_} !== undefined`,()=>l.assign((0,a._)`${_}[${m}]`,g))}function b(l,_,m,g=s.Correct){const v=g===s.Correct?a.operators.EQ:a.operators.NEQ;let k;switch(l){case"null":return(0,a._)`${_} ${v} null`;case"array":k=(0,a._)`Array.isArray(${_})`;break;case"object":k=(0,a._)`${_} && typeof ${_} == "object" && !Array.isArray(${_})`;break;case"integer":k=T((0,a._)`!(${_} % 1) && !isNaN(${_})`);break;case"number":k=T();break;default:return(0,a._)`typeof ${_} ${v} ${l}`}return g===s.Correct?k:(0,a.not)(k);function T(j=a.nil){return(0,a.and)((0,a._)`typeof ${_} == "number"`,j,m?(0,a._)`isFinite(${_})`:a.nil)}}t.checkDataType=b;function S(l,_,m,g){if(l.length===1)return b(l[0],_,m,g);let v;const k=(0,c.toHash)(l);if(k.array&&k.object){const T=(0,a._)`typeof ${_} != "object"`;v=k.null?T:(0,a._)`!${_} || ${T}`,delete k.null,delete k.array,delete k.object}else v=a.nil;k.number&&delete k.integer;for(const T in k)v=(0,a.and)(v,b(T,_,m,g));return v}t.checkDataTypes=S;var h={message:({schema:l})=>`must be ${l}`,params:({schema:l,schemaValue:_})=>typeof l=="string"?(0,a._)`{type: ${l}}`:(0,a._)`{type: ${_}}`};function i(l){const _=d(l);(0,n.reportError)(_,h)}t.reportTypeError=i;function d(l){const{gen:_,data:m,schema:g}=l,v=(0,c.schemaRefOrVal)(l,g,"type");return{gen:_,keyword:"type",data:m,schema:g.type,schemaCode:v,schemaValue:v,parentSchema:g,params:{},it:l}}}),ef=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Me(),r=Be();function n(c,s){const{properties:u,items:o}=c.schema;if(s==="object"&&u)for(const y in u)a(c,y,u[y].default);else s==="array"&&Array.isArray(o)&&o.forEach((y,f)=>a(c,f,y.default))}t.assignDefaults=n;function a(c,s,u){const{gen:o,compositeRule:y,data:f,opts:w}=c;if(u===void 0)return;const $=(0,e._)`${f}${(0,e.getProperty)(s)}`;if(y){(0,r.checkStrictMode)(c,`default is ignored for: ${$}`);return}let E=(0,e._)`${$} === undefined`;w.useDefaults==="empty"&&(E=(0,e._)`${E} || ${$} === null || ${$} === ""`),o.if(E,(0,e._)`${$} = ${(0,e.stringify)(u)}`)}}),Ut=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Me(),r=Be(),n=lr(),a=Be();function c(l,_){const{gen:m,data:g,it:v}=l;m.if(w(m,g,_,v.opts.ownProperties),()=>{l.setParams({missingProperty:(0,e._)`${_}`},!0),l.error()})}t.checkReportMissingProp=c;function s({gen:l,data:_,it:{opts:m}},g,v){return(0,e.or)(...g.map(k=>(0,e.and)(w(l,_,k,m.ownProperties),(0,e._)`${v} = ${k}`)))}t.checkMissingProp=s;function u(l,_){l.setParams({missingProperty:_},!0),l.error()}t.reportMissingProp=u;function o(l){return l.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=o;function y(l,_,m){return(0,e._)`${o(l)}.call(${_}, ${m})`}t.isOwnProperty=y;function f(l,_,m,g){const v=(0,e._)`${_}${(0,e.getProperty)(m)} !== undefined`;return g?(0,e._)`${v} && ${y(l,_,m)}`:v}t.propertyInData=f;function w(l,_,m,g){const v=(0,e._)`${_}${(0,e.getProperty)(m)} === undefined`;return g?(0,e.or)(v,(0,e.not)(y(l,_,m))):v}t.noPropertyInData=w;function $(l){return l?Object.keys(l).filter(_=>_!=="__proto__"):[]}t.allSchemaProperties=$;function E(l,_){return $(_).filter(m=>!(0,r.alwaysValidSchema)(l,_[m]))}t.schemaProperties=E;function b({schemaCode:l,data:_,it:{gen:m,topSchemaRef:g,schemaPath:v,errorPath:k},it:T},j,V,q){const W=q?(0,e._)`${l}, ${_}, ${g}${v}`:_,x=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,k)],[n.default.parentData,T.parentData],[n.default.parentDataProperty,T.parentDataProperty],[n.default.rootData,n.default.rootData]];T.opts.dynamicRef&&x.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const te=(0,e._)`${W}, ${m.object(...x)}`;return V!==e.nil?(0,e._)`${j}.call(${V}, ${te})`:(0,e._)`${j}(${te})`}t.callValidateCode=b;var S=(0,e._)`new RegExp`;function h({gen:l,it:{opts:_}},m){const g=_.unicodeRegExp?"u":"",{regExp:v}=_.code,k=v(m,g);return l.scopeValue("pattern",{key:k.toString(),ref:k,code:(0,e._)`${v.code==="new RegExp"?S:(0,a.useFunc)(l,v)}(${m}, ${g})`})}t.usePattern=h;function i(l){const{gen:_,data:m,keyword:g,it:v}=l,k=_.name("valid");if(v.allErrors){const j=_.let("valid",!0);return T(()=>_.assign(j,!1)),j}return _.var(k,!0),T(()=>_.break()),k;function T(j){const V=_.const("len",(0,e._)`${m}.length`);_.forRange("i",0,V,q=>{l.subschema({keyword:g,dataProp:q,dataPropType:r.Type.Num},k),_.if((0,e.not)(k),j)})}}t.validateArray=i;function d(l){const{gen:_,schema:m,keyword:g,it:v}=l;if(!Array.isArray(m))throw new Error("ajv implementation error");if(m.some(V=>(0,r.alwaysValidSchema)(v,V))&&!v.opts.unevaluated)return;const T=_.let("valid",!1),j=_.name("_valid");_.block(()=>m.forEach((V,q)=>{const W=l.subschema({keyword:g,schemaProp:q,compositeRule:!0},j);_.assign(T,(0,e._)`${T} || ${j}`),l.mergeValidEvaluated(W,j)||_.if((0,e.not)(T))})),l.result(T,()=>l.reset(),()=>l.error(!0))}t.validateUnion=d}),tf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Me(),r=lr(),n=Ut(),a=cs();function c(E,b){const{gen:S,keyword:h,schema:i,parentSchema:d,it:l}=E,_=b.macro.call(l.self,i,d,l),m=f(S,h,_);l.opts.validateSchema!==!1&&l.self.validateSchema(_,!0);const g=S.name("valid");E.subschema({schema:_,schemaPath:e.nil,errSchemaPath:`${l.errSchemaPath}/${h}`,topSchemaRef:m,compositeRule:!0},g),E.pass(g,()=>E.error(!0))}t.macroKeywordCode=c;function s(E,b){var S;const{gen:h,keyword:i,schema:d,parentSchema:l,$data:_,it:m}=E;y(m,b);const g=!_&&b.compile?b.compile.call(m.self,d,l,m):b.validate,v=f(h,i,g),k=h.let("valid");E.block$data(k,T),E.ok((S=b.valid)!==null&&S!==void 0?S:k);function T(){if(b.errors===!1)q(),b.modifying&&u(E),W(()=>E.error());else{const x=b.async?j():V();b.modifying&&u(E),W(()=>o(E,x))}}function j(){const x=h.let("ruleErrs",null);return h.try(()=>q((0,e._)`await `),te=>h.assign(k,!1).if((0,e._)`${te} instanceof ${m.ValidationError}`,()=>h.assign(x,(0,e._)`${te}.errors`),()=>h.throw(te))),x}function V(){const x=(0,e._)`${v}.errors`;return h.assign(x,null),q(e.nil),x}function q(x=b.async?(0,e._)`await `:e.nil){const te=m.opts.passContext?r.default.this:r.default.self,ue=!("compile"in b&&!_||b.schema===!1);h.assign(k,(0,e._)`${x}${(0,n.callValidateCode)(E,v,te,ue)}`,b.modifying)}function W(x){var te;h.if((0,e.not)((te=b.valid)!==null&&te!==void 0?te:k),x)}}t.funcKeywordCode=s;function u(E){const{gen:b,data:S,it:h}=E;b.if(h.parentData,()=>b.assign(S,(0,e._)`${h.parentData}[${h.parentDataProperty}]`))}function o(E,b){const{gen:S}=E;S.if((0,e._)`Array.isArray(${b})`,()=>{S.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${b} : ${r.default.vErrors}.concat(${b})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,a.extendErrors)(E)},()=>E.error())}function y({schemaEnv:E},b){if(b.async&&!E.$async)throw new Error("async keyword in sync schema")}function f(E,b,S){if(S===void 0)throw new Error(`keyword "${b}" failed to compile`);return E.scopeValue("keyword",typeof S=="function"?{ref:S}:{ref:S,code:(0,e.stringify)(S)})}function w(E,b,S=!1){return!b.length||b.some(h=>h==="array"?Array.isArray(E):h==="object"?E&&typeof E=="object"&&!Array.isArray(E):typeof E==h||S&&typeof E>"u")}t.validSchemaType=w;function $({schema:E,opts:b,self:S,errSchemaPath:h},i,d){if(Array.isArray(i.keyword)?!i.keyword.includes(d):i.keyword!==d)throw new Error("ajv implementation error");const l=i.dependencies;if(l!=null&&l.some(_=>!Object.prototype.hasOwnProperty.call(E,_)))throw new Error(`parent schema must have dependencies of ${d}: ${l.join(",")}`);if(i.validateSchema&&!i.validateSchema(E[d])){const m=`keyword "${d}" value is invalid at path "${h}": `+S.errorsText(i.validateSchema.errors);if(b.validateSchema==="log")S.logger.error(m);else throw new Error(m)}}t.validateKeywordUsage=$}),rf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Me(),r=Be();function n(s,{keyword:u,schemaProp:o,schema:y,schemaPath:f,errSchemaPath:w,topSchemaRef:$}){if(u!==void 0&&y!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const E=s.schema[u];return o===void 0?{schema:E,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${s.errSchemaPath}/${u}`}:{schema:E[o],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${u}/${(0,r.escapeFragment)(o)}`}}if(y!==void 0){if(f===void 0||w===void 0||$===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:y,schemaPath:f,topSchemaRef:$,errSchemaPath:w}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function a(s,u,{dataProp:o,dataPropType:y,data:f,dataTypes:w,propertyName:$}){if(f!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:E}=u;if(o!==void 0){const{errorPath:S,dataPathArr:h,opts:i}=u,d=E.let("data",(0,e._)`${u.data}${(0,e.getProperty)(o)}`,!0);b(d),s.errorPath=(0,e.str)`${S}${(0,r.getErrorPath)(o,y,i.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${o}`,s.dataPathArr=[...h,s.parentDataProperty]}if(f!==void 0){const S=f instanceof e.Name?f:E.let("data",f,!0);b(S),$!==void 0&&(s.propertyName=$)}w&&(s.dataTypes=w);function b(S){s.data=S,s.dataLevel=u.dataLevel+1,s.dataTypes=[],u.definedProperties=new Set,s.parentData=u.data,s.dataNames=[...u.dataNames,S]}}t.extendSubschemaData=a;function c(s,{jtdDiscriminator:u,jtdMetadata:o,compositeRule:y,createErrors:f,allErrors:w}){y!==void 0&&(s.compositeRule=y),f!==void 0&&(s.createErrors=f),w!==void 0&&(s.allErrors=w),s.jtdDiscriminator=u,s.jtdMetadata=o}t.extendSubschemaMode=c}),us=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Be(),r=ss(),n=Mo(),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(h,i=!0){return typeof h=="boolean"?!0:i===!0?!u(h):i?o(h)<=i:!1}t.inlineRef=c;var s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(h){for(const i in h){if(s.has(i))return!0;const d=h[i];if(Array.isArray(d)&&d.some(u)||typeof d=="object"&&u(d))return!0}return!1}function o(h){let i=0;for(const d in h){if(d==="$ref")return 1/0;if(i++,!a.has(d)&&(typeof h[d]=="object"&&(0,e.eachItem)(h[d],l=>i+=o(l)),i===1/0))return 1/0}return i}function y(h,i="",d){d!==!1&&(i=$(i));const l=h.parse(i);return f(h,l)}t.getFullPath=y;function f(h,i){return h.serialize(i).split("#")[0]+"#"}t._getFullPath=f;var w=/#\/?$/;function $(h){return h?h.replace(w,""):""}t.normalizeId=$;function E(h,i,d){return d=$(d),h.resolve(i,d)}t.resolveUrl=E;var b=/^[a-z_][-a-z0-9._]*$/i;function S(h,i){if(typeof h=="boolean")return{};const{schemaId:d,uriResolver:l}=this.opts,_=$(h[d]||i),m={"":_},g=y(l,_,!1),v={},k=new Set;return n(h,{allKeys:!0},(V,q,W,x)=>{if(x===void 0)return;const te=g+q;let ue=m[x];typeof V[d]=="string"&&(ue=ve.call(this,V[d])),fe.call(this,V.$anchor),fe.call(this,V.$dynamicAnchor),m[q]=ue;function ve(ae){const L=this.opts.uriResolver.resolve;if(ae=$(ue?L(ue,ae):ae),k.has(ae))throw j(ae);k.add(ae);let O=this.refs[ae];return typeof O=="string"&&(O=this.refs[O]),typeof O=="object"?T(V,O.schema,ae):ae!==$(te)&&(ae[0]==="#"?(T(V,v[ae],ae),v[ae]=V):this.refs[ae]=te),ae}function fe(ae){if(typeof ae=="string"){if(!b.test(ae))throw new Error(`invalid anchor "${ae}"`);ve.call(this,`#${ae}`)}}}),v;function T(V,q,W){if(q!==void 0&&!r(V,q))throw j(W)}function j(V){return new Error(`reference "${V}" resolves to more than one schema`)}}t.getSchemaRefs=S}),ls=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Zl(),r=Zn(),n=Fo(),a=Zn(),c=ef(),s=tf(),u=rf(),o=Me(),y=lr(),f=us(),w=Be(),$=cs();function E(N){if(g(N)&&(k(N),m(N))){i(N);return}b(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=E;function b({gen:N,validateName:I,schema:M,schemaEnv:U,opts:J},ne){J.code.es5?N.func(I,(0,o._)`${y.default.data}, ${y.default.valCxt}`,U.$async,()=>{N.code((0,o._)`"use strict"; ${l(M,J)}`),h(N,J),N.code(ne)}):N.func(I,(0,o._)`${y.default.data}, ${S(J)}`,U.$async,()=>N.code(l(M,J)).code(ne))}function S(N){return(0,o._)`{${y.default.instancePath}="", ${y.default.parentData}, ${y.default.parentDataProperty}, ${y.default.rootData}=${y.default.data}${N.dynamicRef?(0,o._)`, ${y.default.dynamicAnchors}={}`:o.nil}}={}`}function h(N,I){N.if(y.default.valCxt,()=>{N.var(y.default.instancePath,(0,o._)`${y.default.valCxt}.${y.default.instancePath}`),N.var(y.default.parentData,(0,o._)`${y.default.valCxt}.${y.default.parentData}`),N.var(y.default.parentDataProperty,(0,o._)`${y.default.valCxt}.${y.default.parentDataProperty}`),N.var(y.default.rootData,(0,o._)`${y.default.valCxt}.${y.default.rootData}`),I.dynamicRef&&N.var(y.default.dynamicAnchors,(0,o._)`${y.default.valCxt}.${y.default.dynamicAnchors}`)},()=>{N.var(y.default.instancePath,(0,o._)`""`),N.var(y.default.parentData,(0,o._)`undefined`),N.var(y.default.parentDataProperty,(0,o._)`undefined`),N.var(y.default.rootData,y.default.data),I.dynamicRef&&N.var(y.default.dynamicAnchors,(0,o._)`{}`)})}function i(N){const{schema:I,opts:M,gen:U}=N;b(N,()=>{M.$comment&&I.$comment&&x(N),V(N),U.let(y.default.vErrors,null),U.let(y.default.errors,0),M.unevaluated&&d(N),T(N),te(N)})}function d(N){const{gen:I,validateName:M}=N;N.evaluated=I.const("evaluated",(0,o._)`${M}.evaluated`),I.if((0,o._)`${N.evaluated}.dynamicProps`,()=>I.assign((0,o._)`${N.evaluated}.props`,(0,o._)`undefined`)),I.if((0,o._)`${N.evaluated}.dynamicItems`,()=>I.assign((0,o._)`${N.evaluated}.items`,(0,o._)`undefined`))}function l(N,I){const M=typeof N=="object"&&N[I.schemaId];return M&&(I.code.source||I.code.process)?(0,o._)`/*# sourceURL=${M} */`:o.nil}function _(N,I){if(g(N)&&(k(N),m(N))){v(N,I);return}(0,e.boolOrEmptySchema)(N,I)}function m({schema:N,self:I}){if(typeof N=="boolean")return!N;for(const M in N)if(I.RULES.all[M])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function v(N,I){const{schema:M,gen:U,opts:J}=N;J.$comment&&M.$comment&&x(N),q(N),W(N);const ne=U.const("_errs",y.default.errors);T(N,ne),U.var(I,(0,o._)`${ne} === ${y.default.errors}`)}function k(N){(0,w.checkUnknownRules)(N),j(N)}function T(N,I){if(N.opts.jtd)return ve(N,[],!1,I);const M=(0,r.getSchemaTypes)(N.schema),U=(0,r.coerceAndCheckDataType)(N,M);ve(N,M,!U,I)}function j(N){const{schema:I,errSchemaPath:M,opts:U,self:J}=N;I.$ref&&U.ignoreKeywordsWithRef&&(0,w.schemaHasRulesButRef)(I,J.RULES)&&J.logger.warn(`$ref: keywords ignored in schema at path "${M}"`)}function V(N){const{schema:I,opts:M}=N;I.default!==void 0&&M.useDefaults&&M.strictSchema&&(0,w.checkStrictMode)(N,"default is ignored in the schema root")}function q(N){const I=N.schema[N.opts.schemaId];I&&(N.baseId=(0,f.resolveUrl)(N.opts.uriResolver,N.baseId,I))}function W(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function x({gen:N,schemaEnv:I,schema:M,errSchemaPath:U,opts:J}){const ne=M.$comment;if(J.$comment===!0)N.code((0,o._)`${y.default.self}.logger.log(${ne})`);else if(typeof J.$comment=="function"){const _e=(0,o.str)`${U}/$comment`,Pe=N.scopeValue("root",{ref:I.root});N.code((0,o._)`${y.default.self}.opts.$comment(${ne}, ${_e}, ${Pe}.schema)`)}}function te(N){const{gen:I,schemaEnv:M,validateName:U,ValidationError:J,opts:ne}=N;M.$async?I.if((0,o._)`${y.default.errors} === 0`,()=>I.return(y.default.data),()=>I.throw((0,o._)`new ${J}(${y.default.vErrors})`)):(I.assign((0,o._)`${U}.errors`,y.default.vErrors),ne.unevaluated&&ue(N),I.return((0,o._)`${y.default.errors} === 0`))}function ue({gen:N,evaluated:I,props:M,items:U}){M instanceof o.Name&&N.assign((0,o._)`${I}.props`,M),U instanceof o.Name&&N.assign((0,o._)`${I}.items`,U)}function ve(N,I,M,U){const{gen:J,schema:ne,data:_e,allErrors:Pe,opts:Ee,self:$e}=N,{RULES:be}=$e;if(ne.$ref&&(Ee.ignoreKeywordsWithRef||!(0,w.schemaHasRulesButRef)(ne,be))){J.block(()=>G(N,"$ref",be.all.$ref.definition));return}Ee.jtd||ae(N,I),J.block(()=>{for(const Ie of be.rules)Ne(Ie);Ne(be.post)});function Ne(Ie){(0,n.shouldUseGroup)(ne,Ie)&&(Ie.type?(J.if((0,a.checkDataType)(Ie.type,_e,Ee.strictNumbers)),fe(N,Ie),I.length===1&&I[0]===Ie.type&&M&&(J.else(),(0,a.reportTypeError)(N)),J.endIf()):fe(N,Ie),Pe||J.if((0,o._)`${y.default.errors} === ${U||0}`))}}function fe(N,I){const{gen:M,schema:U,opts:{useDefaults:J}}=N;J&&(0,c.assignDefaults)(N,I.type),M.block(()=>{for(const ne of I.rules)(0,n.shouldUseRule)(U,ne)&&G(N,ne.keyword,ne.definition,I.type)})}function ae(N,I){N.schemaEnv.meta||!N.opts.strictTypes||(L(N,I),N.opts.allowUnionTypes||O(N,I),A(N,N.dataTypes))}function L(N,I){if(I.length){if(!N.dataTypes.length){N.dataTypes=I;return}I.forEach(M=>{p(N.dataTypes,M)||C(N,`type "${M}" not allowed by context "${N.dataTypes.join(",")}"`)}),P(N,I)}}function O(N,I){I.length>1&&!(I.length===2&&I.includes("null"))&&C(N,"use allowUnionTypes to allow union type keyword")}function A(N,I){const M=N.self.RULES.all;for(const U in M){const J=M[U];if(typeof J=="object"&&(0,n.shouldUseRule)(N.schema,J)){const{type:ne}=J.definition;ne.length&&!ne.some(_e=>R(I,_e))&&C(N,`missing type "${ne.join(",")}" for keyword "${U}"`)}}}function R(N,I){return N.includes(I)||I==="number"&&N.includes("integer")}function p(N,I){return N.includes(I)||I==="integer"&&N.includes("number")}function P(N,I){const M=[];for(const U of N.dataTypes)p(I,U)?M.push(U):I.includes("integer")&&U==="number"&&M.push("integer");N.dataTypes=M}function C(N,I){const M=N.schemaEnv.baseId+N.errSchemaPath;I+=` at "${M}" (strictTypes)`,(0,w.checkStrictMode)(N,I,N.opts.strictTypes)}class B{constructor(I,M,U){if((0,s.validateKeywordUsage)(I,M,U),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=U,this.data=I.data,this.schema=I.schema[U],this.$data=M.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,w.schemaRefOrVal)(I,this.schema,U,this.$data),this.schemaType=M.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=M,this.$data)this.schemaCode=I.gen.const("vSchema",F(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,M.schemaType,M.allowUndefined))throw new Error(`${U} value must be ${JSON.stringify(M.schemaType)}`);("code"in M?M.trackErrors:M.errors!==!1)&&(this.errsCount=I.gen.const("_errs",y.default.errors))}result(I,M,U){this.failResult((0,o.not)(I),M,U)}failResult(I,M,U){this.gen.if(I),U?U():this.error(),M?(this.gen.else(),M(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,M){this.failResult((0,o.not)(I),void 0,M)}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(I){if(!this.$data)return this.fail(I);const{schemaCode:M}=this;this.fail((0,o._)`${M} !== undefined && (${(0,o.or)(this.invalid$data(),I)})`)}error(I,M,U){if(M){this.setParams(M),this._error(I,U),this.setParams({});return}this._error(I,U)}_error(I,M){(I?$.reportExtraError:$.reportError)(this,this.def.error,M)}$dataError(){(0,$.reportError)(this,this.def.$dataError||$.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$.resetErrorsCount)(this.gen,this.errsCount)}ok(I){this.allErrors||this.gen.if(I)}setParams(I,M){M?Object.assign(this.params,I):this.params=I}block$data(I,M,U=o.nil){this.gen.block(()=>{this.check$data(I,U),M()})}check$data(I=o.nil,M=o.nil){if(!this.$data)return;const{gen:U,schemaCode:J,schemaType:ne,def:_e}=this;U.if((0,o.or)((0,o._)`${J} === undefined`,M)),I!==o.nil&&U.assign(I,!0),(ne.length||_e.validateSchema)&&(U.elseIf(this.invalid$data()),this.$dataError(),I!==o.nil&&U.assign(I,!1)),U.else()}invalid$data(){const{gen:I,schemaCode:M,schemaType:U,def:J,it:ne}=this;return(0,o.or)(_e(),Pe());function _e(){if(U.length){if(!(M instanceof o.Name))throw new Error("ajv implementation error");const Ee=Array.isArray(U)?U:[U];return(0,o._)`${(0,a.checkDataTypes)(Ee,M,ne.opts.strictNumbers,a.DataType.Wrong)}`}return o.nil}function Pe(){if(J.validateSchema){const Ee=I.scopeValue("validate$data",{ref:J.validateSchema});return(0,o._)`!${Ee}(${M})`}return o.nil}}subschema(I,M){const U=(0,u.getSubschema)(this.it,I);(0,u.extendSubschemaData)(U,this.it,I),(0,u.extendSubschemaMode)(U,I);const J={...this.it,...U,items:void 0,props:void 0};return _(J,M),J}mergeEvaluated(I,M){const{it:U,gen:J}=this;U.opts.unevaluated&&(U.props!==!0&&I.props!==void 0&&(U.props=w.mergeEvaluated.props(J,I.props,U.props,M)),U.items!==!0&&I.items!==void 0&&(U.items=w.mergeEvaluated.items(J,I.items,U.items,M)))}mergeValidEvaluated(I,M){const{it:U,gen:J}=this;if(U.opts.unevaluated&&(U.props!==!0||U.items!==!0))return J.if(M,()=>this.mergeEvaluated(I,o.Name)),!0}}t.KeywordCxt=B;function G(N,I,M,U){const J=new B(N,M,I);"code"in M?M.code(J,U):J.$data&&M.validate?(0,s.funcKeywordCode)(J,M):"macro"in M?(0,s.macroKeywordCode)(J,M):(M.compile||M.validate)&&(0,s.funcKeywordCode)(J,M)}var re=/^\/(?:[^~]|~0|~1)*$/,Z=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function F(N,{dataLevel:I,dataNames:M,dataPathArr:U}){let J,ne;if(N==="")return y.default.rootData;if(N[0]==="/"){if(!re.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);J=N,ne=y.default.rootData}else{const $e=Z.exec(N);if(!$e)throw new Error(`Invalid JSON-pointer: ${N}`);const be=+$e[1];if(J=$e[2],J==="#"){if(be>=I)throw new Error(Ee("property/index",be));return U[I-be]}if(be>I)throw new Error(Ee("data",be));if(ne=M[I-be],!J)return ne}let _e=ne;const Pe=J.split("/");for(const $e of Pe)$e&&(ne=(0,o._)`${ne}${(0,o.getProperty)((0,w.unescapeJsonPointer)($e))}`,_e=(0,o._)`${_e} && ${ne}`);return _e;function Ee($e,be){return`Cannot access ${$e} ${be} levels up, current level is ${I}`}}t.getData=F}),fa=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),da=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=us();class r extends Error{constructor(a,c,s,u){super(u||`can't resolve reference ${s} from id ${c}`),this.missingRef=(0,e.resolveUrl)(a,c,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(a,this.missingRef))}}t.default=r}),ha=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Me(),r=fa(),n=lr(),a=us(),c=Be(),s=ls();class u{constructor(d){var l;this.refs={},this.dynamicAnchors={};let _;typeof d.schema=="object"&&(_=d.schema),this.schema=d.schema,this.schemaId=d.schemaId,this.root=d.root||this,this.baseId=(l=d.baseId)!==null&&l!==void 0?l:(0,a.normalizeId)(_==null?void 0:_[d.schemaId||"$id"]),this.schemaPath=d.schemaPath,this.localRefs=d.localRefs,this.meta=d.meta,this.$async=_==null?void 0:_.$async,this.refs={}}}t.SchemaEnv=u;function o(i){const d=w.call(this,i);if(d)return d;const l=(0,a.getFullPath)(this.opts.uriResolver,i.root.baseId),{es5:_,lines:m}=this.opts.code,{ownProperties:g}=this.opts,v=new e.CodeGen(this.scope,{es5:_,lines:m,ownProperties:g});let k;i.$async&&(k=v.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const T=v.scopeName("validate");i.validateName=T;const j={gen:v,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:v.scopeValue("schema",this.opts.code.source===!0?{ref:i.schema,code:(0,e.stringify)(i.schema)}:{ref:i.schema}),validateName:T,ValidationError:k,schema:i.schema,schemaEnv:i,rootId:l,baseId:i.baseId||l,schemaPath:e.nil,errSchemaPath:i.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let V;try{this._compilations.add(i),(0,s.validateFunctionCode)(j),v.optimize(this.opts.code.optimize);const q=v.toString();V=`${v.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(V=this.opts.code.process(V,i));const x=new Function(`${n.default.self}`,`${n.default.scope}`,V)(this,this.scope.get());if(this.scope.value(T,{ref:x}),x.errors=null,x.schema=i.schema,x.schemaEnv=i,i.$async&&(x.$async=!0),this.opts.code.source===!0&&(x.source={validateName:T,validateCode:q,scopeValues:v._values}),this.opts.unevaluated){const{props:te,items:ue}=j;x.evaluated={props:te instanceof e.Name?void 0:te,items:ue instanceof e.Name?void 0:ue,dynamicProps:te instanceof e.Name,dynamicItems:ue instanceof e.Name},x.source&&(x.source.evaluated=(0,e.stringify)(x.evaluated))}return i.validate=x,i}catch(q){throw delete i.validate,delete i.validateName,V&&this.logger.error("Error compiling schema, function code:",V),q}finally{this._compilations.delete(i)}}t.compileSchema=o;function y(i,d,l){var _;l=(0,a.resolveUrl)(this.opts.uriResolver,d,l);const m=i.refs[l];if(m)return m;let g=E.call(this,i,l);if(g===void 0){const v=(_=i.localRefs)===null||_===void 0?void 0:_[l],{schemaId:k}=this.opts;v&&(g=new u({schema:v,schemaId:k,root:i,baseId:d}))}if(g!==void 0)return i.refs[l]=f.call(this,g)}t.resolveRef=y;function f(i){return(0,a.inlineRef)(i.schema,this.opts.inlineRefs)?i.schema:i.validate?i:o.call(this,i)}function w(i){for(const d of this._compilations)if($(d,i))return d}t.getCompilingSchema=w;function $(i,d){return i.schema===d.schema&&i.root===d.root&&i.baseId===d.baseId}function E(i,d){let l;for(;typeof(l=this.refs[d])=="string";)d=l;return l||this.schemas[d]||b.call(this,i,d)}function b(i,d){const l=this.opts.uriResolver.parse(d),_=(0,a._getFullPath)(this.opts.uriResolver,l);let m=(0,a.getFullPath)(this.opts.uriResolver,i.baseId,void 0);if(Object.keys(i.schema).length>0&&_===m)return h.call(this,l,i);const g=(0,a.normalizeId)(_),v=this.refs[g]||this.schemas[g];if(typeof v=="string"){const k=b.call(this,i,v);return typeof(k==null?void 0:k.schema)!="object"?void 0:h.call(this,l,k)}if(typeof(v==null?void 0:v.schema)=="object"){if(v.validate||o.call(this,v),g===(0,a.normalizeId)(d)){const{schema:k}=v,{schemaId:T}=this.opts,j=k[T];return j&&(m=(0,a.resolveUrl)(this.opts.uriResolver,m,j)),new u({schema:k,schemaId:T,root:i,baseId:m})}return h.call(this,l,v)}}t.resolveSchema=b;var S=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function h(i,{baseId:d,schema:l,root:_}){var m;if(((m=i.fragment)===null||m===void 0?void 0:m[0])!=="/")return;for(const k of i.fragment.slice(1).split("/")){if(typeof l=="boolean")return;const T=l[(0,c.unescapeFragment)(k)];if(T===void 0)return;l=T;const j=typeof l=="object"&&l[this.opts.schemaId];!S.has(k)&&j&&(d=(0,a.resolveUrl)(this.opts.uriResolver,d,j))}let g;if(typeof l!="boolean"&&l.$ref&&!(0,c.schemaHasRulesButRef)(l,this.RULES)){const k=(0,a.resolveUrl)(this.opts.uriResolver,d,l.$ref);g=b.call(this,_,k)}const{schemaId:v}=this.opts;if(g=g||new u({schema:l,schemaId:v,root:_,baseId:d}),g.schema!==g.root.schema)return g}}),nf=Q(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),pa=Q(function(t,e){(function(r,n){typeof t=="object"&&typeof e<"u"?n(t):typeof define=="function"&&define.amd?define(["exports"],n):n(r.URI=r.URI||{})})(t,function(r){function n(){for(var z=arguments.length,D=Array(z),H=0;H<z;H++)D[H]=arguments[H];if(D.length>1){D[0]=D[0].slice(0,-1);for(var X=D.length-1,Y=1;Y<X;++Y)D[Y]=D[Y].slice(1,-1);return D[X]=D[X].slice(1),D.join("")}else return D[0]}function a(z){return"(?:"+z+")"}function c(z){return z===void 0?"undefined":z===null?"null":Object.prototype.toString.call(z).split(" ").pop().split("]").shift().toLowerCase()}function s(z){return z.toUpperCase()}function u(z){return z!=null?z instanceof Array?z:typeof z.length!="number"||z.split||z.setInterval||z.call?[z]:Array.prototype.slice.call(z):[]}function o(z,D){var H=z;if(D)for(var X in D)H[X]=D[X];return H}function y(z){var D="[A-Za-z]",H="[0-9]",X=n(H,"[A-Fa-f]"),Y=a(a("%[EFef]"+X+"%"+X+X+"%"+X+X)+"|"+a("%[89A-Fa-f]"+X+"%"+X+X)+"|"+a("%"+X+X)),pe="[\\:\\/\\?\\#\\[\\]\\@]",we="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Ve=n(pe,we),Xe=z?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",nt=z?"[\\uE000-\\uF8FF]":"[]",Ce=n(D,H,"[\\-\\.\\_\\~]",Xe);a(D+n(D,H,"[\\+\\-\\.]")+"*"),a(a(Y+"|"+n(Ce,we,"[\\:]"))+"*");var Qe=a(a("25[0-5]")+"|"+a("2[0-4]"+H)+"|"+a("1"+H+H)+"|"+a("0?[1-9]"+H)+"|0?0?"+H),at=a(Qe+"\\."+Qe+"\\."+Qe+"\\."+Qe),Oe=a(X+"{1,4}"),Fe=a(a(Oe+"\\:"+Oe)+"|"+at),it=a(a(Oe+"\\:")+"{6}"+Fe),Ye=a("\\:\\:"+a(Oe+"\\:")+"{5}"+Fe),Ft=a(a(Oe)+"?\\:\\:"+a(Oe+"\\:")+"{4}"+Fe),Tt=a(a(a(Oe+"\\:")+"{0,1}"+Oe)+"?\\:\\:"+a(Oe+"\\:")+"{3}"+Fe),It=a(a(a(Oe+"\\:")+"{0,2}"+Oe)+"?\\:\\:"+a(Oe+"\\:")+"{2}"+Fe),Mt=a(a(a(Oe+"\\:")+"{0,3}"+Oe)+"?\\:\\:"+Oe+"\\:"+Fe),Wt=a(a(a(Oe+"\\:")+"{0,4}"+Oe)+"?\\:\\:"+Fe),se=a(a(a(Oe+"\\:")+"{0,5}"+Oe)+"?\\:\\:"+Oe),de=a(a(a(Oe+"\\:")+"{0,6}"+Oe)+"?\\:\\:"),Re=a([it,Ye,Ft,Tt,It,Mt,Wt,se,de].join("|")),Le=a(a(Ce+"|"+Y)+"+");a("[vV]"+X+"+\\."+n(Ce,we,"[\\:]")+"+"),a(a(Y+"|"+n(Ce,we))+"*");var tt=a(Y+"|"+n(Ce,we,"[\\:\\@]"));return a(a(Y+"|"+n(Ce,we,"[\\@]"))+"+"),a(a(tt+"|"+n("[\\/\\?]",nt))+"*"),{NOT_SCHEME:new RegExp(n("[^]",D,H,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",Ce,we),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",Ce,we),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",Ce,we),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",Ce,we),"g"),NOT_QUERY:new RegExp(n("[^\\%]",Ce,we,"[\\:\\@\\/\\?]",nt),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",Ce,we,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",Ce,we),"g"),UNRESERVED:new RegExp(Ce,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",Ce,Ve),"g"),PCT_ENCODED:new RegExp(Y,"g"),IPV4ADDRESS:new RegExp("^("+at+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Re+")"+a(a("\\%25|\\%(?!"+X+"{2})")+"("+Le+")")+"?\\]?$")}}var f=y(!1),w=y(!0),$=function(){function z(D,H){var X=[],Y=!0,pe=!1,we=void 0;try{for(var Ve=D[Symbol.iterator](),Xe;!(Y=(Xe=Ve.next()).done)&&(X.push(Xe.value),!(H&&X.length===H));Y=!0);}catch(nt){pe=!0,we=nt}finally{try{!Y&&Ve.return&&Ve.return()}finally{if(pe)throw we}}return X}return function(D,H){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return z(D,H);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(z){if(Array.isArray(z)){for(var D=0,H=Array(z.length);D<z.length;D++)H[D]=z[D];return H}else return Array.from(z)},b=2147483647,S=36,h=1,i=26,d=38,l=700,_=72,m=128,g="-",v=/^xn--/,k=/[^\0-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,j={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},V=S-h,q=Math.floor,W=String.fromCharCode;function x(z){throw new RangeError(j[z])}function te(z,D){for(var H=[],X=z.length;X--;)H[X]=D(z[X]);return H}function ue(z,D){var H=z.split("@"),X="";H.length>1&&(X=H[0]+"@",z=H[1]),z=z.replace(T,".");var Y=z.split("."),pe=te(Y,D).join(".");return X+pe}function ve(z){for(var D=[],H=0,X=z.length;H<X;){var Y=z.charCodeAt(H++);if(Y>=55296&&Y<=56319&&H<X){var pe=z.charCodeAt(H++);(pe&64512)==56320?D.push(((Y&1023)<<10)+(pe&1023)+65536):(D.push(Y),H--)}else D.push(Y)}return D}var fe=function(D){return String.fromCodePoint.apply(String,E(D))},ae=function(D){return D-48<10?D-22:D-65<26?D-65:D-97<26?D-97:S},L=function(D,H){return D+22+75*(D<26)-((H!=0)<<5)},O=function(D,H,X){var Y=0;for(D=X?q(D/l):D>>1,D+=q(D/H);D>V*i>>1;Y+=S)D=q(D/V);return q(Y+(V+1)*D/(D+d))},A=function(D){var H=[],X=D.length,Y=0,pe=m,we=_,Ve=D.lastIndexOf(g);Ve<0&&(Ve=0);for(var Xe=0;Xe<Ve;++Xe)D.charCodeAt(Xe)>=128&&x("not-basic"),H.push(D.charCodeAt(Xe));for(var nt=Ve>0?Ve+1:0;nt<X;){for(var Ce=Y,Qe=1,at=S;;at+=S){nt>=X&&x("invalid-input");var Oe=ae(D.charCodeAt(nt++));(Oe>=S||Oe>q((b-Y)/Qe))&&x("overflow"),Y+=Oe*Qe;var Fe=at<=we?h:at>=we+i?i:at-we;if(Oe<Fe)break;var it=S-Fe;Qe>q(b/it)&&x("overflow"),Qe*=it}var Ye=H.length+1;we=O(Y-Ce,Ye,Ce==0),q(Y/Ye)>b-pe&&x("overflow"),pe+=q(Y/Ye),Y%=Ye,H.splice(Y++,0,pe)}return String.fromCodePoint.apply(String,H)},R=function(D){var H=[];D=ve(D);var X=D.length,Y=m,pe=0,we=_,Ve=!0,Xe=!1,nt=void 0;try{for(var Ce=D[Symbol.iterator](),Qe;!(Ve=(Qe=Ce.next()).done);Ve=!0){var at=Qe.value;at<128&&H.push(W(at))}}catch(sr){Xe=!0,nt=sr}finally{try{!Ve&&Ce.return&&Ce.return()}finally{if(Xe)throw nt}}var Oe=H.length,Fe=Oe;for(Oe&&H.push(g);Fe<X;){var it=b,Ye=!0,Ft=!1,Tt=void 0;try{for(var It=D[Symbol.iterator](),Mt;!(Ye=(Mt=It.next()).done);Ye=!0){var Wt=Mt.value;Wt>=Y&&Wt<it&&(it=Wt)}}catch(sr){Ft=!0,Tt=sr}finally{try{!Ye&&It.return&&It.return()}finally{if(Ft)throw Tt}}var se=Fe+1;it-Y>q((b-pe)/se)&&x("overflow"),pe+=(it-Y)*se,Y=it;var de=!0,Re=!1,Le=void 0;try{for(var tt=D[Symbol.iterator](),Pt;!(de=(Pt=tt.next()).done);de=!0){var Dt=Pt.value;if(Dt<Y&&++pe>b&&x("overflow"),Dt==Y){for(var Jt=pe,mt=S;;mt+=S){var Et=mt<=we?h:mt>=we+i?i:mt-we;if(Jt<Et)break;var Or=Jt-Et,Nr=S-Et;H.push(W(L(Et+Or%Nr,0))),Jt=q(Or/Nr)}H.push(W(L(Jt,0))),we=O(pe,se,Fe==Oe),pe=0,++Fe}}}catch(sr){Re=!0,Le=sr}finally{try{!de&&tt.return&&tt.return()}finally{if(Re)throw Le}}++pe,++Y}return H.join("")},p=function(D){return ue(D,function(H){return v.test(H)?A(H.slice(4).toLowerCase()):H})},P=function(D){return ue(D,function(H){return k.test(H)?"xn--"+R(H):H})},C={version:"2.1.0",ucs2:{decode:ve,encode:fe},decode:A,encode:R,toASCII:P,toUnicode:p},B={};function G(z){var D=z.charCodeAt(0),H=void 0;return D<16?H="%0"+D.toString(16).toUpperCase():D<128?H="%"+D.toString(16).toUpperCase():D<2048?H="%"+(D>>6|192).toString(16).toUpperCase()+"%"+(D&63|128).toString(16).toUpperCase():H="%"+(D>>12|224).toString(16).toUpperCase()+"%"+(D>>6&63|128).toString(16).toUpperCase()+"%"+(D&63|128).toString(16).toUpperCase(),H}function re(z){for(var D="",H=0,X=z.length;H<X;){var Y=parseInt(z.substr(H+1,2),16);if(Y<128)D+=String.fromCharCode(Y),H+=3;else if(Y>=194&&Y<224){if(X-H>=6){var pe=parseInt(z.substr(H+4,2),16);D+=String.fromCharCode((Y&31)<<6|pe&63)}else D+=z.substr(H,6);H+=6}else if(Y>=224){if(X-H>=9){var we=parseInt(z.substr(H+4,2),16),Ve=parseInt(z.substr(H+7,2),16);D+=String.fromCharCode((Y&15)<<12|(we&63)<<6|Ve&63)}else D+=z.substr(H,9);H+=9}else D+=z.substr(H,3),H+=3}return D}function Z(z,D){function H(X){var Y=re(X);return Y.match(D.UNRESERVED)?Y:X}return z.scheme&&(z.scheme=String(z.scheme).replace(D.PCT_ENCODED,H).toLowerCase().replace(D.NOT_SCHEME,"")),z.userinfo!==void 0&&(z.userinfo=String(z.userinfo).replace(D.PCT_ENCODED,H).replace(D.NOT_USERINFO,G).replace(D.PCT_ENCODED,s)),z.host!==void 0&&(z.host=String(z.host).replace(D.PCT_ENCODED,H).toLowerCase().replace(D.NOT_HOST,G).replace(D.PCT_ENCODED,s)),z.path!==void 0&&(z.path=String(z.path).replace(D.PCT_ENCODED,H).replace(z.scheme?D.NOT_PATH:D.NOT_PATH_NOSCHEME,G).replace(D.PCT_ENCODED,s)),z.query!==void 0&&(z.query=String(z.query).replace(D.PCT_ENCODED,H).replace(D.NOT_QUERY,G).replace(D.PCT_ENCODED,s)),z.fragment!==void 0&&(z.fragment=String(z.fragment).replace(D.PCT_ENCODED,H).replace(D.NOT_FRAGMENT,G).replace(D.PCT_ENCODED,s)),z}function F(z){return z.replace(/^0*(.*)/,"$1")||"0"}function N(z,D){var H=z.match(D.IPV4ADDRESS)||[],X=$(H,2),Y=X[1];return Y?Y.split(".").map(F).join("."):z}function I(z,D){var H=z.match(D.IPV6ADDRESS)||[],X=$(H,3),Y=X[1],pe=X[2];if(Y){for(var we=Y.toLowerCase().split("::").reverse(),Ve=$(we,2),Xe=Ve[0],nt=Ve[1],Ce=nt?nt.split(":").map(F):[],Qe=Xe.split(":").map(F),at=D.IPV4ADDRESS.test(Qe[Qe.length-1]),Oe=at?7:8,Fe=Qe.length-Oe,it=Array(Oe),Ye=0;Ye<Oe;++Ye)it[Ye]=Ce[Ye]||Qe[Fe+Ye]||"";at&&(it[Oe-1]=N(it[Oe-1],D));var Ft=it.reduce(function(se,de,Re){if(!de||de==="0"){var Le=se[se.length-1];Le&&Le.index+Le.length===Re?Le.length++:se.push({index:Re,length:1})}return se},[]),Tt=Ft.sort(function(se,de){return de.length-se.length})[0],It=void 0;if(Tt&&Tt.length>1){var Mt=it.slice(0,Tt.index),Wt=it.slice(Tt.index+Tt.length);It=Mt.join(":")+"::"+Wt.join(":")}else It=it.join(":");return pe&&(It+="%"+pe),It}else return z}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,U="".match(/(){0}/)[1]===void 0;function J(z){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H={},X=D.iri!==!1?w:f;D.reference==="suffix"&&(z=(D.scheme?D.scheme+":":"")+"//"+z);var Y=z.match(M);if(Y){U?(H.scheme=Y[1],H.userinfo=Y[3],H.host=Y[4],H.port=parseInt(Y[5],10),H.path=Y[6]||"",H.query=Y[7],H.fragment=Y[8],isNaN(H.port)&&(H.port=Y[5])):(H.scheme=Y[1]||void 0,H.userinfo=z.indexOf("@")!==-1?Y[3]:void 0,H.host=z.indexOf("//")!==-1?Y[4]:void 0,H.port=parseInt(Y[5],10),H.path=Y[6]||"",H.query=z.indexOf("?")!==-1?Y[7]:void 0,H.fragment=z.indexOf("#")!==-1?Y[8]:void 0,isNaN(H.port)&&(H.port=z.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Y[4]:void 0)),H.host&&(H.host=I(N(H.host,X),X)),H.scheme===void 0&&H.userinfo===void 0&&H.host===void 0&&H.port===void 0&&!H.path&&H.query===void 0?H.reference="same-document":H.scheme===void 0?H.reference="relative":H.fragment===void 0?H.reference="absolute":H.reference="uri",D.reference&&D.reference!=="suffix"&&D.reference!==H.reference&&(H.error=H.error||"URI is not a "+D.reference+" reference.");var pe=B[(D.scheme||H.scheme||"").toLowerCase()];if(!D.unicodeSupport&&(!pe||!pe.unicodeSupport)){if(H.host&&(D.domainHost||pe&&pe.domainHost))try{H.host=C.toASCII(H.host.replace(X.PCT_ENCODED,re).toLowerCase())}catch(we){H.error=H.error||"Host's domain name can not be converted to ASCII via punycode: "+we}Z(H,f)}else Z(H,X);pe&&pe.parse&&pe.parse(H,D)}else H.error=H.error||"URI can not be parsed.";return H}function ne(z,D){var H=D.iri!==!1?w:f,X=[];return z.userinfo!==void 0&&(X.push(z.userinfo),X.push("@")),z.host!==void 0&&X.push(I(N(String(z.host),H),H).replace(H.IPV6ADDRESS,function(Y,pe,we){return"["+pe+(we?"%25"+we:"")+"]"})),(typeof z.port=="number"||typeof z.port=="string")&&(X.push(":"),X.push(String(z.port))),X.length?X.join(""):void 0}var _e=/^\.\.?\//,Pe=/^\/\.(\/|$)/,Ee=/^\/\.\.(\/|$)/,$e=/^\/?(?:.|\n)*?(?=\/|$)/;function be(z){for(var D=[];z.length;)if(z.match(_e))z=z.replace(_e,"");else if(z.match(Pe))z=z.replace(Pe,"/");else if(z.match(Ee))z=z.replace(Ee,"/"),D.pop();else if(z==="."||z==="..")z="";else{var H=z.match($e);if(H){var X=H[0];z=z.slice(X.length),D.push(X)}else throw new Error("Unexpected dot segment condition")}return D.join("")}function Ne(z){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=D.iri?w:f,X=[],Y=B[(D.scheme||z.scheme||"").toLowerCase()];if(Y&&Y.serialize&&Y.serialize(z,D),z.host&&!H.IPV6ADDRESS.test(z.host)){if(D.domainHost||Y&&Y.domainHost)try{z.host=D.iri?C.toUnicode(z.host):C.toASCII(z.host.replace(H.PCT_ENCODED,re).toLowerCase())}catch(Ve){z.error=z.error||"Host's domain name can not be converted to "+(D.iri?"Unicode":"ASCII")+" via punycode: "+Ve}}Z(z,H),D.reference!=="suffix"&&z.scheme&&(X.push(z.scheme),X.push(":"));var pe=ne(z,D);if(pe!==void 0&&(D.reference!=="suffix"&&X.push("//"),X.push(pe),z.path&&z.path.charAt(0)!=="/"&&X.push("/")),z.path!==void 0){var we=z.path;!D.absolutePath&&(!Y||!Y.absolutePath)&&(we=be(we)),pe===void 0&&(we=we.replace(/^\/\//,"/%2F")),X.push(we)}return z.query!==void 0&&(X.push("?"),X.push(z.query)),z.fragment!==void 0&&(X.push("#"),X.push(z.fragment)),X.join("")}function Ie(z,D){var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},X=arguments[3],Y={};return X||(z=J(Ne(z,H),H),D=J(Ne(D,H),H)),H=H||{},!H.tolerant&&D.scheme?(Y.scheme=D.scheme,Y.userinfo=D.userinfo,Y.host=D.host,Y.port=D.port,Y.path=be(D.path||""),Y.query=D.query):(D.userinfo!==void 0||D.host!==void 0||D.port!==void 0?(Y.userinfo=D.userinfo,Y.host=D.host,Y.port=D.port,Y.path=be(D.path||""),Y.query=D.query):(D.path?(D.path.charAt(0)==="/"?Y.path=be(D.path):((z.userinfo!==void 0||z.host!==void 0||z.port!==void 0)&&!z.path?Y.path="/"+D.path:z.path?Y.path=z.path.slice(0,z.path.lastIndexOf("/")+1)+D.path:Y.path=D.path,Y.path=be(Y.path)),Y.query=D.query):(Y.path=z.path,D.query!==void 0?Y.query=D.query:Y.query=z.query),Y.userinfo=z.userinfo,Y.host=z.host,Y.port=z.port),Y.scheme=z.scheme),Y.fragment=D.fragment,Y}function pt(z,D,H){var X=o({scheme:"null"},H);return Ne(Ie(J(z,X),J(D,X),X,!0),X)}function xe(z,D){return typeof z=="string"?z=Ne(J(z,D),D):c(z)==="object"&&(z=J(Ne(z,D),D)),z}function dt(z,D,H){return typeof z=="string"?z=Ne(J(z,H),H):c(z)==="object"&&(z=Ne(z,H)),typeof D=="string"?D=Ne(J(D,H),H):c(D)==="object"&&(D=Ne(D,H)),z===D}function $t(z,D){return z&&z.toString().replace(!D||!D.iri?f.ESCAPE:w.ESCAPE,G)}function ot(z,D){return z&&z.toString().replace(!D||!D.iri?f.PCT_ENCODED:w.PCT_ENCODED,re)}var bt={scheme:"http",domainHost:!0,parse:function(D,H){return D.host||(D.error=D.error||"HTTP URIs must have a host."),D},serialize:function(D,H){var X=String(D.scheme).toLowerCase()==="https";return(D.port===(X?443:80)||D.port==="")&&(D.port=void 0),D.path||(D.path="/"),D}},Kr={scheme:"https",domainHost:bt.domainHost,parse:bt.parse,serialize:bt.serialize};function Hr(z){return typeof z.secure=="boolean"?z.secure:String(z.scheme).toLowerCase()==="wss"}var dr={scheme:"ws",domainHost:!0,parse:function(D,H){var X=D;return X.secure=Hr(X),X.resourceName=(X.path||"/")+(X.query?"?"+X.query:""),X.path=void 0,X.query=void 0,X},serialize:function(D,H){if((D.port===(Hr(D)?443:80)||D.port==="")&&(D.port=void 0),typeof D.secure=="boolean"&&(D.scheme=D.secure?"wss":"ws",D.secure=void 0),D.resourceName){var X=D.resourceName.split("?"),Y=$(X,2),pe=Y[0],we=Y[1];D.path=pe&&pe!=="/"?pe:void 0,D.query=we,D.resourceName=void 0}return D.fragment=void 0,D}},Pr={scheme:"wss",domainHost:dr.domainHost,parse:dr.parse,serialize:dr.serialize},vs={},Br="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Rt="[0-9A-Fa-f]",kr=a(a("%[EFef]"+Rt+"%"+Rt+Rt+"%"+Rt+Rt)+"|"+a("%[89A-Fa-f]"+Rt+"%"+Rt+Rt)+"|"+a("%"+Rt+Rt)),Gr="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",xr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",_s=n(xr,'[\\"\\\\]'),Wr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",nr=new RegExp(Br,"g"),K=new RegExp(kr,"g"),ee=new RegExp(n("[^]",Gr,"[\\.]",'[\\"]',_s),"g"),ie=new RegExp(n("[^]",Br,Wr),"g"),ke=ie;function et(z){var D=re(z);return D.match(nr)?D:z}var rt={scheme:"mailto",parse:function(D,H){var X=D,Y=X.to=X.path?X.path.split(","):[];if(X.path=void 0,X.query){for(var pe=!1,we={},Ve=X.query.split("&"),Xe=0,nt=Ve.length;Xe<nt;++Xe){var Ce=Ve[Xe].split("=");switch(Ce[0]){case"to":for(var Qe=Ce[1].split(","),at=0,Oe=Qe.length;at<Oe;++at)Y.push(Qe[at]);break;case"subject":X.subject=ot(Ce[1],H);break;case"body":X.body=ot(Ce[1],H);break;default:pe=!0,we[ot(Ce[0],H)]=ot(Ce[1],H);break}}pe&&(X.headers=we)}X.query=void 0;for(var Fe=0,it=Y.length;Fe<it;++Fe){var Ye=Y[Fe].split("@");if(Ye[0]=ot(Ye[0]),H.unicodeSupport)Ye[1]=ot(Ye[1],H).toLowerCase();else try{Ye[1]=C.toASCII(ot(Ye[1],H).toLowerCase())}catch(Ft){X.error=X.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ft}Y[Fe]=Ye.join("@")}return X},serialize:function(D,H){var X=D,Y=u(D.to);if(Y){for(var pe=0,we=Y.length;pe<we;++pe){var Ve=String(Y[pe]),Xe=Ve.lastIndexOf("@"),nt=Ve.slice(0,Xe).replace(K,et).replace(K,s).replace(ee,G),Ce=Ve.slice(Xe+1);try{Ce=H.iri?C.toUnicode(Ce):C.toASCII(ot(Ce,H).toLowerCase())}catch(Fe){X.error=X.error||"Email address's domain name can not be converted to "+(H.iri?"Unicode":"ASCII")+" via punycode: "+Fe}Y[pe]=nt+"@"+Ce}X.path=Y.join(",")}var Qe=D.headers=D.headers||{};D.subject&&(Qe.subject=D.subject),D.body&&(Qe.body=D.body);var at=[];for(var Oe in Qe)Qe[Oe]!==vs[Oe]&&at.push(Oe.replace(K,et).replace(K,s).replace(ie,G)+"="+Qe[Oe].replace(K,et).replace(K,s).replace(ke,G));return at.length&&(X.query=at.join("&")),X}},he=/^([^\:]+)\:(.*)/,le={scheme:"urn",parse:function(D,H){var X=D.path&&D.path.match(he),Y=D;if(X){var pe=H.scheme||Y.scheme||"urn",we=X[1].toLowerCase(),Ve=X[2],Xe=pe+":"+(H.nid||we),nt=B[Xe];Y.nid=we,Y.nss=Ve,Y.path=void 0,nt&&(Y=nt.parse(Y,H))}else Y.error=Y.error||"URN can not be parsed.";return Y},serialize:function(D,H){var X=H.scheme||D.scheme||"urn",Y=D.nid,pe=X+":"+(H.nid||Y),we=B[pe];we&&(D=we.serialize(D,H));var Ve=D,Xe=D.nss;return Ve.path=(Y||H.nid)+":"+Xe,Ve}},Se=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ft={scheme:"urn:uuid",parse:function(D,H){var X=D;return X.uuid=X.nss,X.nss=void 0,!H.tolerant&&(!X.uuid||!X.uuid.match(Se))&&(X.error=X.error||"UUID is not valid."),X},serialize:function(D,H){var X=D;return X.nss=(D.uuid||"").toLowerCase(),X}};B[bt.scheme]=bt,B[Kr.scheme]=Kr,B[dr.scheme]=dr,B[Pr.scheme]=Pr,B[rt.scheme]=rt,B[le.scheme]=le,B[ft.scheme]=ft,r.SCHEMES=B,r.pctEncChar=G,r.pctDecChars=re,r.parse=J,r.removeDotSegments=be,r.serialize=Ne,r.resolveComponents=Ie,r.resolve=pt,r.normalize=xe,r.equal=dt,r.escapeComponent=$t,r.unescapeComponent=ot,Object.defineProperty(r,"__esModule",{value:!0})})}),sf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=pa();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),af=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=ls();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Me();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=fa(),a=da(),c=zo(),s=ha(),u=Me(),o=us(),y=Zn(),f=Be(),w=nf(),$=sf(),E=(L,O)=>new RegExp(L,O);E.code="new RegExp";var b=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={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."},i={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},d=200;function l(L){var O,A,R,p,P,C,B,G,re,Z,F,N,I,M,U,J,ne,_e,Pe,Ee,$e,be,Ne,Ie,pt;const xe=L.strict,dt=(O=L.code)===null||O===void 0?void 0:O.optimize,$t=dt===!0||dt===void 0?1:dt||0,ot=(R=(A=L.code)===null||A===void 0?void 0:A.regExp)!==null&&R!==void 0?R:E,bt=(p=L.uriResolver)!==null&&p!==void 0?p:$.default;return{strictSchema:(C=(P=L.strictSchema)!==null&&P!==void 0?P:xe)!==null&&C!==void 0?C:!0,strictNumbers:(G=(B=L.strictNumbers)!==null&&B!==void 0?B:xe)!==null&&G!==void 0?G:!0,strictTypes:(Z=(re=L.strictTypes)!==null&&re!==void 0?re:xe)!==null&&Z!==void 0?Z:"log",strictTuples:(N=(F=L.strictTuples)!==null&&F!==void 0?F:xe)!==null&&N!==void 0?N:"log",strictRequired:(M=(I=L.strictRequired)!==null&&I!==void 0?I:xe)!==null&&M!==void 0?M:!1,code:L.code?{...L.code,optimize:$t,regExp:ot}:{optimize:$t,regExp:ot},loopRequired:(U=L.loopRequired)!==null&&U!==void 0?U:d,loopEnum:(J=L.loopEnum)!==null&&J!==void 0?J:d,meta:(ne=L.meta)!==null&&ne!==void 0?ne:!0,messages:(_e=L.messages)!==null&&_e!==void 0?_e:!0,inlineRefs:(Pe=L.inlineRefs)!==null&&Pe!==void 0?Pe:!0,schemaId:(Ee=L.schemaId)!==null&&Ee!==void 0?Ee:"$id",addUsedSchema:($e=L.addUsedSchema)!==null&&$e!==void 0?$e:!0,validateSchema:(be=L.validateSchema)!==null&&be!==void 0?be:!0,validateFormats:(Ne=L.validateFormats)!==null&&Ne!==void 0?Ne:!0,unicodeRegExp:(Ie=L.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(pt=L.int32range)!==null&&pt!==void 0?pt:!0,uriResolver:bt}}class _{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...l(O)};const{es5:A,lines:R}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:S,es5:A,lines:R}),this.logger=q(O.logger);const p=O.validateFormats;O.validateFormats=!1,this.RULES=(0,c.getRules)(),m.call(this,h,O,"NOT SUPPORTED"),m.call(this,i,O,"DEPRECATED","warn"),this._metaOpts=j.call(this),O.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&T.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),v.call(this),O.validateFormats=p}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:A,schemaId:R}=this.opts;let p=w;R==="id"&&(p={...w},p.id=p.$id,delete p.$id),A&&O&&this.addMetaSchema(p,p[R],!1)}defaultMeta(){const{meta:O,schemaId:A}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[A]||O:void 0}validate(O,A){let R;if(typeof O=="string"){if(R=this.getSchema(O),!R)throw new Error(`no schema with key or ref "${O}"`)}else R=this.compile(O);const p=R(A);return"$async"in R||(this.errors=R.errors),p}compile(O,A){const R=this._addSchema(O,A);return R.validate||this._compileSchemaEnv(R)}compileAsync(O,A){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return p.call(this,O,A);async function p(Z,F){await P.call(this,Z.$schema);const N=this._addSchema(Z,F);return N.validate||C.call(this,N)}async function P(Z){Z&&!this.getSchema(Z)&&await p.call(this,{$ref:Z},!0)}async function C(Z){try{return this._compileSchemaEnv(Z)}catch(F){if(!(F instanceof a.default))throw F;return B.call(this,F),await G.call(this,F.missingSchema),C.call(this,Z)}}function B({missingSchema:Z,missingRef:F}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${F} cannot be resolved`)}async function G(Z){const F=await re.call(this,Z);this.refs[Z]||await P.call(this,F.$schema),this.refs[Z]||this.addSchema(F,Z,A)}async function re(Z){const F=this._loading[Z];if(F)return F;try{return await(this._loading[Z]=R(Z))}finally{delete this._loading[Z]}}}addSchema(O,A,R,p=this.opts.validateSchema){if(Array.isArray(O)){for(const C of O)this.addSchema(C,void 0,R,p);return this}let P;if(typeof O=="object"){const{schemaId:C}=this.opts;if(P=O[C],P!==void 0&&typeof P!="string")throw new Error(`schema ${C} must be string`)}return A=(0,o.normalizeId)(A||P),this._checkUnique(A),this.schemas[A]=this._addSchema(O,R,A,p,!0),this}addMetaSchema(O,A,R=this.opts.validateSchema){return this.addSchema(O,A,!0,R),this}validateSchema(O,A){if(typeof O=="boolean")return!0;let R;if(R=O.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const p=this.validate(R,O);if(!p&&A){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return p}getSchema(O){let A;for(;typeof(A=g.call(this,O))=="string";)O=A;if(A===void 0){const{schemaId:R}=this.opts,p=new s.SchemaEnv({schema:{},schemaId:R});if(A=s.resolveSchema.call(this,p,O),!A)return;this.refs[O]=A}return A.validate||this._compileSchemaEnv(A)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const A=g.call(this,O);return typeof A=="object"&&this._cache.delete(A.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const A=O;this._cache.delete(A);let R=O[this.opts.schemaId];return R&&(R=(0,o.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const A of O)this.addKeyword(A);return this}addKeyword(O,A){let R;if(typeof O=="string")R=O,typeof A=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),A.keyword=R);else if(typeof O=="object"&&A===void 0){if(A=O,R=A.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(x.call(this,R,A),!A)return(0,f.eachItem)(R,P=>te.call(this,P)),this;ve.call(this,A);const p={...A,type:(0,y.getJSONTypes)(A.type),schemaType:(0,y.getJSONTypes)(A.schemaType)};return(0,f.eachItem)(R,p.type.length===0?P=>te.call(this,P,p):P=>p.type.forEach(C=>te.call(this,P,p,C))),this}getKeyword(O){const A=this.RULES.all[O];return typeof A=="object"?A.definition:!!A}removeKeyword(O){const{RULES:A}=this;delete A.keywords[O],delete A.all[O];for(const R of A.rules){const p=R.rules.findIndex(P=>P.keyword===O);p>=0&&R.rules.splice(p,1)}return this}addFormat(O,A){return typeof A=="string"&&(A=new RegExp(A)),this.formats[O]=A,this}errorsText(O=this.errors,{separator:A=", ",dataVar:R="data"}={}){return!O||O.length===0?"No errors":O.map(p=>`${R}${p.instancePath} ${p.message}`).reduce((p,P)=>p+A+P)}$dataMetaSchema(O,A){const R=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const p of A){const P=p.split("/").slice(1);let C=O;for(const B of P)C=C[B];for(const B in R){const G=R[B];if(typeof G!="object")continue;const{$data:re}=G.definition,Z=C[B];re&&Z&&(C[B]=ae(Z))}}return O}_removeAllSchemas(O,A){for(const R in O){const p=O[R];(!A||A.test(R))&&(typeof p=="string"?delete O[R]:p&&!p.meta&&(this._cache.delete(p.schema),delete O[R]))}}_addSchema(O,A,R,p=this.opts.validateSchema,P=this.opts.addUsedSchema){let C;const{schemaId:B}=this.opts;if(typeof O=="object")C=O[B];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let G=this._cache.get(O);if(G!==void 0)return G;R=(0,o.normalizeId)(C||R);const re=o.getSchemaRefs.call(this,O,R);return G=new s.SchemaEnv({schema:O,schemaId:B,meta:A,baseId:R,localRefs:re}),this._cache.set(G.schema,G),P&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=G),p&&this.validateSchema(O,!0),G}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):s.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const A=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,O)}finally{this.opts=A}}}t.default=_,_.ValidationError=n.default,_.MissingRefError=a.default;function m(L,O,A,R="error"){for(const p in L){const P=p;P in O&&this.logger[R](`${A}: option ${p}. ${L[P]}`)}}function g(L){return L=(0,o.normalizeId)(L),this.schemas[L]||this.refs[L]}function v(){const L=this.opts.schemas;if(L)if(Array.isArray(L))this.addSchema(L);else for(const O in L)this.addSchema(L[O],O)}function k(){for(const L in this.opts.formats){const O=this.opts.formats[L];O&&this.addFormat(L,O)}}function T(L){if(Array.isArray(L)){this.addVocabulary(L);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in L){const A=L[O];A.keyword||(A.keyword=O),this.addKeyword(A)}}function j(){const L={...this.opts};for(const O of b)delete L[O];return L}var V={log(){},warn(){},error(){}};function q(L){if(L===!1)return V;if(L===void 0)return console;if(L.log&&L.warn&&L.error)return L;throw new Error("logger must implement log, warn and error methods")}var W=/^[a-z_$][a-z0-9_$:-]*$/i;function x(L,O){const{RULES:A}=this;if((0,f.eachItem)(L,R=>{if(A.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!W.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function te(L,O,A){var R;const p=O==null?void 0:O.post;if(A&&p)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let C=p?P.post:P.rules.find(({type:G})=>G===A);if(C||(C={type:A,rules:[]},P.rules.push(C)),P.keywords[L]=!0,!O)return;const B={keyword:L,definition:{...O,type:(0,y.getJSONTypes)(O.type),schemaType:(0,y.getJSONTypes)(O.schemaType)}};O.before?ue.call(this,C,B,O.before):C.rules.push(B),P.all[L]=B,(R=O.implements)===null||R===void 0||R.forEach(G=>this.addKeyword(G))}function ue(L,O,A){const R=L.rules.findIndex(p=>p.keyword===A);R>=0?L.rules.splice(R,0,O):(L.rules.push(O),this.logger.warn(`rule ${A} is not defined`))}function ve(L){let{metaSchema:O}=L;O!==void 0&&(L.$data&&this.opts.$data&&(O=ae(O)),L.validateSchema=this.compile(O,!0))}var fe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ae(L){return{anyOf:[L,fe]}}}),of=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),cf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=da(),r=Ut(),n=Me(),a=lr(),c=ha(),s=Be(),u={keyword:"$ref",schemaType:"string",code(f){const{gen:w,schema:$,it:E}=f,{baseId:b,schemaEnv:S,validateName:h,opts:i,self:d}=E,{root:l}=S;if(($==="#"||$==="#/")&&b===l.baseId)return m();const _=c.resolveRef.call(d,l,b,$);if(_===void 0)throw new e.default(E.opts.uriResolver,b,$);if(_ instanceof c.SchemaEnv)return g(_);return v(_);function m(){if(S===l)return y(f,h,S,S.$async);const k=w.scopeValue("root",{ref:l});return y(f,(0,n._)`${k}.validate`,l,l.$async)}function g(k){const T=o(f,k);y(f,T,k,k.$async)}function v(k){const T=w.scopeValue("schema",i.code.source===!0?{ref:k,code:(0,n.stringify)(k)}:{ref:k}),j=w.name("valid"),V=f.subschema({schema:k,dataTypes:[],schemaPath:n.nil,topSchemaRef:T,errSchemaPath:$},j);f.mergeEvaluated(V),f.ok(j)}}};function o(f,w){const{gen:$}=f;return w.validate?$.scopeValue("validate",{ref:w.validate}):(0,n._)`${$.scopeValue("wrapper",{ref:w})}.validate`}t.getValidate=o;function y(f,w,$,E){const{gen:b,it:S}=f,{allErrors:h,schemaEnv:i,opts:d}=S,l=d.passContext?a.default.this:n.nil;E?_():m();function _(){if(!i.$async)throw new Error("async schema referenced by sync schema");const k=b.let("valid");b.try(()=>{b.code((0,n._)`await ${(0,r.callValidateCode)(f,w,l)}`),v(w),h||b.assign(k,!0)},T=>{b.if((0,n._)`!(${T} instanceof ${S.ValidationError})`,()=>b.throw(T)),g(T),h||b.assign(k,!1)}),f.ok(k)}function m(){f.result((0,r.callValidateCode)(f,w,l),()=>v(w),()=>g(w))}function g(k){const T=(0,n._)`${k}.errors`;b.assign(a.default.vErrors,(0,n._)`${a.default.vErrors} === null ? ${T} : ${a.default.vErrors}.concat(${T})`),b.assign(a.default.errors,(0,n._)`${a.default.vErrors}.length`)}function v(k){var T;if(!S.opts.unevaluated)return;const j=(T=$==null?void 0:$.validate)===null||T===void 0?void 0:T.evaluated;if(S.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(S.props=s.mergeEvaluated.props(b,j.props,S.props));else{const V=b.var("props",(0,n._)`${k}.evaluated.props`);S.props=s.mergeEvaluated.props(b,V,S.props,n.Name)}if(S.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(S.items=s.mergeEvaluated.items(b,j.items,S.items));else{const V=b.var("items",(0,n._)`${k}.evaluated.items`);S.items=s.mergeEvaluated.items(b,V,S.items,n.Name)}}}t.callRef=y,t.default=u}),uf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=of(),r=cf(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),lf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},a={message:({keyword:s,schemaCode:u})=>(0,e.str)`must be ${n[s].okStr} ${u}`,params:({keyword:s,schemaCode:u})=>(0,e._)`{comparison: ${n[s].okStr}, limit: ${u}}`},c={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:a,code(s){const{keyword:u,data:o,schemaCode:y}=s;s.fail$data((0,e._)`${o} ${n[u].fail} ${y} || isNaN(${o})`)}};t.default=c}),ff=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message:({schemaCode:a})=>(0,e.str)`must be multiple of ${a}`,params:({schemaCode:a})=>(0,e._)`{multipleOf: ${a}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(a){const{gen:c,data:s,schemaCode:u,it:o}=a,y=o.opts.multipleOfPrecision,f=c.let("res"),w=y?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${y}`:(0,e._)`${f} !== parseInt(${f})`;a.fail$data((0,e._)`(${u} === 0 || (${f} = ${s}/${u}, ${w}))`)}};t.default=n}),df=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let a=0,c=0,s;for(;c<n;)a++,s=r.charCodeAt(c++),s>=55296&&s<=56319&&c<n&&(s=r.charCodeAt(c),(s&64512)===56320&&c++);return a}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),hf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Be(),n=df(),a={message({keyword:s,schemaCode:u}){const o=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${u} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},c={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:a,code(s){const{keyword:u,data:o,schemaCode:y,it:f}=s,w=u==="maxLength"?e.operators.GT:e.operators.LT,$=f.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,r.useFunc)(s.gen,n.default)}(${o})`;s.fail$data((0,e._)`${$} ${w} ${y}`)}};t.default=c}),pf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ut(),r=Me(),n={message:({schemaCode:c})=>(0,r.str)`must match pattern "${c}"`,params:({schemaCode:c})=>(0,r._)`{pattern: ${c}}`},a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:n,code(c){const{data:s,$data:u,schema:o,schemaCode:y,it:f}=c,w=f.opts.unicodeRegExp?"u":"",$=u?(0,r._)`(new RegExp(${y}, ${w}))`:(0,e.usePattern)(c,o);c.fail$data((0,r._)`!${$}.test(${s})`)}};t.default=a}),mf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message({keyword:a,schemaCode:c}){const s=a==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${c} properties`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(a){const{keyword:c,data:s,schemaCode:u}=a,o=c==="maxProperties"?e.operators.GT:e.operators.LT;a.fail$data((0,e._)`Object.keys(${s}).length ${o} ${u}`)}};t.default=n}),gf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ut(),r=Me(),n=Be(),a={message:({params:{missingProperty:s}})=>(0,r.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,r._)`{missingProperty: ${s}}`},c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:a,code(s){const{gen:u,schema:o,schemaCode:y,data:f,$data:w,it:$}=s,{opts:E}=$;if(!w&&o.length===0)return;const b=o.length>=E.loopRequired;if($.allErrors?S():h(),E.strictRequired){const l=s.parentSchema.properties,{definedProperties:_}=s.it;for(const m of o)if((l==null?void 0:l[m])===void 0&&!_.has(m)){const g=$.schemaEnv.baseId+$.errSchemaPath,v=`required property "${m}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)($,v,$.opts.strictRequired)}}function S(){if(b||w)s.block$data(r.nil,i);else for(const l of o)(0,e.checkReportMissingProp)(s,l)}function h(){const l=u.let("missing");if(b||w){const _=u.let("valid",!0);s.block$data(_,()=>d(l,_)),s.ok(_)}else u.if((0,e.checkMissingProp)(s,o,l)),(0,e.reportMissingProp)(s,l),u.else()}function i(){u.forOf("prop",y,l=>{s.setParams({missingProperty:l}),u.if((0,e.noPropertyInData)(u,f,l,E.ownProperties),()=>s.error())})}function d(l,_){s.setParams({missingProperty:l}),u.forOf(l,y,()=>{u.assign(_,(0,e.propertyInData)(u,f,l,E.ownProperties)),u.if((0,r.not)(_),()=>{s.error(),u.break()})},r.nil)}}};t.default=c}),yf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message({keyword:a,schemaCode:c}){const s=a==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${c} items`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(a){const{keyword:c,data:s,schemaCode:u}=a,o=c==="maxItems"?e.operators.GT:e.operators.LT;a.fail$data((0,e._)`${s}.length ${o} ${u}`)}};t.default=n}),ma=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ss();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),vf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Zn(),r=Me(),n=Be(),a=ma(),c={message:({params:{i:u,j:o}})=>(0,r.str)`must NOT have duplicate items (items ## ${o} and ${u} are identical)`,params:({params:{i:u,j:o}})=>(0,r._)`{i: ${u}, j: ${o}}`},s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:c,code(u){const{gen:o,data:y,$data:f,schema:w,parentSchema:$,schemaCode:E,it:b}=u;if(!f&&!w)return;const S=o.let("valid"),h=$.items?(0,e.getSchemaTypes)($.items):[];u.block$data(S,i,(0,r._)`${E} === false`),u.ok(S);function i(){const m=o.let("i",(0,r._)`${y}.length`),g=o.let("j");u.setParams({i:m,j:g}),o.assign(S,!0),o.if((0,r._)`${m} > 1`,()=>(d()?l:_)(m,g))}function d(){return h.length>0&&!h.some(m=>m==="object"||m==="array")}function l(m,g){const v=o.name("item"),k=(0,e.checkDataTypes)(h,v,b.opts.strictNumbers,e.DataType.Wrong),T=o.const("indices",(0,r._)`{}`);o.for((0,r._)`;${m}--;`,()=>{o.let(v,(0,r._)`${y}[${m}]`),o.if(k,(0,r._)`continue`),h.length>1&&o.if((0,r._)`typeof ${v} == "string"`,(0,r._)`${v} += "_"`),o.if((0,r._)`typeof ${T}[${v}] == "number"`,()=>{o.assign(g,(0,r._)`${T}[${v}]`),u.error(),o.assign(S,!1).break()}).code((0,r._)`${T}[${v}] = ${m}`)})}function _(m,g){const v=(0,n.useFunc)(o,a.default),k=o.name("outer");o.label(k).for((0,r._)`;${m}--;`,()=>o.for((0,r._)`${g} = ${m}; ${g}--;`,()=>o.if((0,r._)`${v}(${y}[${m}], ${y}[${g}])`,()=>{u.error(),o.assign(S,!1).break(k)})))}}};t.default=s}),_f=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Be(),n=ma(),a={message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},c={keyword:"const",$data:!0,error:a,code(s){const{gen:u,data:o,$data:y,schemaCode:f,schema:w}=s;y||w&&typeof w=="object"?s.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${o}, ${f})`):s.fail((0,e._)`${w} !== ${o}`)}};t.default=c}),wf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Be(),n=ma(),a={message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},c={keyword:"enum",schemaType:"array",$data:!0,error:a,code(s){const{gen:u,data:o,$data:y,schema:f,schemaCode:w,it:$}=s;if(!y&&f.length===0)throw new Error("enum must have non-empty array");const E=f.length>=$.opts.loopEnum;let b;const S=()=>b??(b=(0,r.useFunc)(u,n.default));let h;if(E||y)h=u.let("valid"),s.block$data(h,i);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const l=u.const("vSchema",w);h=(0,e.or)(...f.map((_,m)=>d(l,m)))}s.pass(h);function i(){u.assign(h,!1),u.forOf("v",w,l=>u.if((0,e._)`${S()}(${o}, ${l})`,()=>u.assign(h,!0).break()))}function d(l,_){const m=f[_];return typeof m=="object"&&m!==null?(0,e._)`${S()}(${o}, ${l}[${_}])`:(0,e._)`${o} === ${m}`}}};t.default=c}),$f=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=lf(),r=ff(),n=hf(),a=pf(),c=mf(),s=gf(),u=yf(),o=vf(),y=_f(),f=wf(),w=[e.default,r.default,n.default,a.default,c.default,s.default,u.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},y.default,f.default];t.default=w}),Ko=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Me(),r=Be(),n={message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(s){const{parentSchema:u,it:o}=s,{items:y}=u;if(!Array.isArray(y)){(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}c(s,y)}};function c(s,u){const{gen:o,schema:y,data:f,keyword:w,it:$}=s;$.items=!0;const E=o.const("len",(0,e._)`${f}.length`);if(y===!1)s.setParams({len:u.length}),s.pass((0,e._)`${E} <= ${u.length}`);else if(typeof y=="object"&&!(0,r.alwaysValidSchema)($,y)){const S=o.var("valid",(0,e._)`${E} <= ${u.length}`);o.if((0,e.not)(S),()=>b(S)),s.ok(S)}function b(S){o.forRange("i",u.length,E,h=>{s.subschema({keyword:w,dataProp:h,dataPropType:r.Type.Num},S),$.allErrors||o.if((0,e.not)(S),()=>o.break())})}}t.validateAdditionalItems=c,t.default=a}),Ho=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Me(),r=Be(),n=Ut(),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:u,it:o}=s;if(Array.isArray(u))return c(s,"additionalItems",u);o.items=!0,!(0,r.alwaysValidSchema)(o,u)&&s.ok((0,n.validateArray)(s))}};function c(s,u,o=s.schema){const{gen:y,parentSchema:f,data:w,keyword:$,it:E}=s;h(f),E.opts.unevaluated&&o.length&&E.items!==!0&&(E.items=r.mergeEvaluated.items(y,o.length,E.items));const b=y.name("valid"),S=y.const("len",(0,e._)`${w}.length`);o.forEach((i,d)=>{(0,r.alwaysValidSchema)(E,i)||(y.if((0,e._)`${S} > ${d}`,()=>s.subschema({keyword:$,schemaProp:d,dataProp:d},b)),s.ok(b))});function h(i){const{opts:d,errSchemaPath:l}=E,_=o.length,m=_===i.minItems&&(_===i.maxItems||i[u]===!1);if(d.strictTuples&&!m){const g=`"${$}" is ${_}-tuple, but minItems or maxItems/${u} are not specified or different at path "${l}"`;(0,r.checkStrictMode)(E,g,d.strictTuples)}}}t.validateTuple=c,t.default=a}),bf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ho(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Ef=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Be(),n=Ut(),a=Ko(),c={message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:c,code(u){const{schema:o,parentSchema:y,it:f}=u,{prefixItems:w}=y;f.items=!0,!(0,r.alwaysValidSchema)(f,o)&&(w?(0,a.validateAdditionalItems)(u,w):u.ok((0,n.validateArray)(u)))}};t.default=s}),Sf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Be(),n={message:({params:{min:c,max:s}})=>s===void 0?(0,e.str)`must contain at least ${c} valid item(s)`:(0,e.str)`must contain at least ${c} and no more than ${s} valid item(s)`,params:({params:{min:c,max:s}})=>s===void 0?(0,e._)`{minContains: ${c}}`:(0,e._)`{minContains: ${c}, maxContains: ${s}}`},a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(c){const{gen:s,schema:u,parentSchema:o,data:y,it:f}=c;let w,$;const{minContains:E,maxContains:b}=o;f.opts.next?(w=E===void 0?1:E,$=b):w=1;const S=s.const("len",(0,e._)`${y}.length`);if(c.setParams({min:w,max:$}),$===void 0&&w===0){(0,r.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if($!==void 0&&w>$){(0,r.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),c.fail();return}if((0,r.alwaysValidSchema)(f,u)){let _=(0,e._)`${S} >= ${w}`;$!==void 0&&(_=(0,e._)`${_} && ${S} <= ${$}`),c.pass(_);return}f.items=!0;const h=s.name("valid");$===void 0&&w===1?d(h,()=>s.if(h,()=>s.break())):w===0?(s.let(h,!0),$!==void 0&&s.if((0,e._)`${y}.length > 0`,i)):(s.let(h,!1),i()),c.result(h,()=>c.reset());function i(){const _=s.name("_valid"),m=s.let("count",0);d(_,()=>s.if(_,()=>l(m)))}function d(_,m){s.forRange("i",0,S,g=>{c.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},_),m()})}function l(_){s.code((0,e._)`${_}++`),$===void 0?s.if((0,e._)`${_} >= ${w}`,()=>s.assign(h,!0).break()):(s.if((0,e._)`${_} > ${$}`,()=>s.assign(h,!1).break()),w===1?s.assign(h,!0):s.if((0,e._)`${_} >= ${w}`,()=>s.assign(h,!0)))}}};t.default=a}),Pf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Me(),r=Be(),n=Ut();t.error={message:({params:{property:o,depsCount:y,deps:f}})=>{const w=y===1?"property":"properties";return(0,e.str)`must have ${w} ${f} when property ${o} is present`},params:({params:{property:o,depsCount:y,deps:f,missingProperty:w}})=>(0,e._)`{property: ${o},
20
+ missingProperty: ${w},
21
+ depsCount: ${y},
22
+ deps: ${f}}`};var a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(o){const[y,f]=c(o);s(o,y),u(o,f)}};function c({schema:o}){const y={},f={};for(const w in o){if(w==="__proto__")continue;const $=Array.isArray(o[w])?y:f;$[w]=o[w]}return[y,f]}function s(o,y=o.schema){const{gen:f,data:w,it:$}=o;if(Object.keys(y).length===0)return;const E=f.let("missing");for(const b in y){const S=y[b];if(S.length===0)continue;const h=(0,n.propertyInData)(f,w,b,$.opts.ownProperties);o.setParams({property:b,depsCount:S.length,deps:S.join(", ")}),$.allErrors?f.if(h,()=>{for(const i of S)(0,n.checkReportMissingProp)(o,i)}):(f.if((0,e._)`${h} && (${(0,n.checkMissingProp)(o,S,E)})`),(0,n.reportMissingProp)(o,E),f.else())}}t.validatePropertyDeps=s;function u(o,y=o.schema){const{gen:f,data:w,keyword:$,it:E}=o,b=f.name("valid");for(const S in y)(0,r.alwaysValidSchema)(E,y[S])||(f.if((0,n.propertyInData)(f,w,S,E.opts.ownProperties),()=>{const h=o.subschema({keyword:$,schemaProp:S},b);o.mergeValidEvaluated(h,b)},()=>f.var(b,!0)),o.ok(b))}t.validateSchemaDeps=u,t.default=a}),kf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Be(),n={message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(c){const{gen:s,schema:u,data:o,it:y}=c;if((0,r.alwaysValidSchema)(y,u))return;const f=s.name("valid");s.forIn("key",o,w=>{c.setParams({propertyName:w}),c.subschema({keyword:"propertyNames",data:w,dataTypes:["string"],propertyName:w,compositeRule:!0},f),s.if((0,e.not)(f),()=>{c.error(!0),y.allErrors||s.break()})}),c.ok(f)}};t.default=a}),Bo=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ut(),r=Me(),n=lr(),a=Be(),c={message:"must NOT have additional properties",params:({params:u})=>(0,r._)`{additionalProperty: ${u.additionalProperty}}`},s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:c,code(u){const{gen:o,schema:y,parentSchema:f,data:w,errsCount:$,it:E}=u;if(!$)throw new Error("ajv implementation error");const{allErrors:b,opts:S}=E;if(E.props=!0,S.removeAdditional!=="all"&&(0,a.alwaysValidSchema)(E,y))return;const h=(0,e.allSchemaProperties)(f.properties),i=(0,e.allSchemaProperties)(f.patternProperties);d(),u.ok((0,r._)`${$} === ${n.default.errors}`);function d(){o.forIn("key",w,v=>{!h.length&&!i.length?m(v):o.if(l(v),()=>m(v))})}function l(v){let k;if(h.length>8){const T=(0,a.schemaRefOrVal)(E,f.properties,"properties");k=(0,e.isOwnProperty)(o,T,v)}else h.length?k=(0,r.or)(...h.map(T=>(0,r._)`${v} === ${T}`)):k=r.nil;return i.length&&(k=(0,r.or)(k,...i.map(T=>(0,r._)`${(0,e.usePattern)(u,T)}.test(${v})`))),(0,r.not)(k)}function _(v){o.code((0,r._)`delete ${w}[${v}]`)}function m(v){if(S.removeAdditional==="all"||S.removeAdditional&&y===!1){_(v);return}if(y===!1){u.setParams({additionalProperty:v}),u.error(),b||o.break();return}if(typeof y=="object"&&!(0,a.alwaysValidSchema)(E,y)){const k=o.name("valid");S.removeAdditional==="failing"?(g(v,k,!1),o.if((0,r.not)(k),()=>{u.reset(),_(v)})):(g(v,k),b||o.if((0,r.not)(k),()=>o.break()))}}function g(v,k,T){const j={keyword:"additionalProperties",dataProp:v,dataPropType:a.Type.Str};T===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(j,k)}}};t.default=s}),Of=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ls(),r=Ut(),n=Be(),a=Bo(),c={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:u,schema:o,parentSchema:y,data:f,it:w}=s;w.opts.removeAdditional==="all"&&y.additionalProperties===void 0&&a.default.code(new e.KeywordCxt(w,a.default,"additionalProperties"));const $=(0,r.allSchemaProperties)(o);for(const i of $)w.definedProperties.add(i);w.opts.unevaluated&&$.length&&w.props!==!0&&(w.props=n.mergeEvaluated.props(u,(0,n.toHash)($),w.props));const E=$.filter(i=>!(0,n.alwaysValidSchema)(w,o[i]));if(E.length===0)return;const b=u.name("valid");for(const i of E)S(i)?h(i):(u.if((0,r.propertyInData)(u,f,i,w.opts.ownProperties)),h(i),w.allErrors||u.else().var(b,!0),u.endIf()),s.it.definedProperties.add(i),s.ok(b);function S(i){return w.opts.useDefaults&&!w.compositeRule&&o[i].default!==void 0}function h(i){s.subschema({keyword:"properties",schemaProp:i,dataProp:i},b)}}};t.default=c}),Nf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ut(),r=Me(),n=Be(),a=Be(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:u,schema:o,data:y,parentSchema:f,it:w}=s,{opts:$}=w,E=(0,e.allSchemaProperties)(o),b=E.filter(m=>(0,n.alwaysValidSchema)(w,o[m]));if(E.length===0||b.length===E.length&&(!w.opts.unevaluated||w.props===!0))return;const S=$.strictSchema&&!$.allowMatchingProperties&&f.properties,h=u.name("valid");w.props!==!0&&!(w.props instanceof r.Name)&&(w.props=(0,a.evaluatedPropsToName)(u,w.props));const{props:i}=w;d();function d(){for(const m of E)S&&l(m),w.allErrors?_(m):(u.var(h,!0),_(m),u.if(h))}function l(m){for(const g in S)new RegExp(m).test(g)&&(0,n.checkStrictMode)(w,`property ${g} matches pattern ${m} (use allowMatchingProperties)`)}function _(m){u.forIn("key",y,g=>{u.if((0,r._)`${(0,e.usePattern)(s,m)}.test(${g})`,()=>{const v=b.includes(m);v||s.subschema({keyword:"patternProperties",schemaProp:m,dataProp:g,dataPropType:a.Type.Str},h),w.opts.unevaluated&&i!==!0?u.assign((0,r._)`${i}[${g}]`,!0):!v&&!w.allErrors&&u.if((0,r.not)(h),()=>u.break())})})}}};t.default=c}),Rf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:a,schema:c,it:s}=n;if((0,e.alwaysValidSchema)(s,c)){n.fail();return}const u=a.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),n.failResult(u,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),Tf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ut(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),If=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Be(),n={message:"must match exactly one schema in oneOf",params:({params:c})=>(0,e._)`{passingSchemas: ${c.passing}}`},a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(c){const{gen:s,schema:u,parentSchema:o,it:y}=c;if(!Array.isArray(u))throw new Error("ajv implementation error");if(y.opts.discriminator&&o.discriminator)return;const f=u,w=s.let("valid",!1),$=s.let("passing",null),E=s.name("_valid");c.setParams({passing:$}),s.block(b),c.result(w,()=>c.reset(),()=>c.error(!0));function b(){f.forEach((S,h)=>{let i;(0,r.alwaysValidSchema)(y,S)?s.var(E,!0):i=c.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},E),h>0&&s.if((0,e._)`${E} && ${w}`).assign(w,!1).assign($,(0,e._)`[${$}, ${h}]`).else(),s.if(E,()=>{s.assign(w,!0),s.assign($,h),i&&c.mergeEvaluated(i,e.Name)})})}}};t.default=a}),Cf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:a,schema:c,it:s}=n;if(!Array.isArray(c))throw new Error("ajv implementation error");const u=a.name("valid");c.forEach((o,y)=>{if((0,e.alwaysValidSchema)(s,o))return;const f=n.subschema({keyword:"allOf",schemaProp:y},u);n.ok(u),n.mergeEvaluated(f)})}};t.default=r}),Af=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Be(),n={message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(s){const{gen:u,parentSchema:o,it:y}=s;o.then===void 0&&o.else===void 0&&(0,r.checkStrictMode)(y,'"if" without "then" and "else" is ignored');const f=c(y,"then"),w=c(y,"else");if(!f&&!w)return;const $=u.let("valid",!0),E=u.name("_valid");if(b(),s.reset(),f&&w){const h=u.let("ifClause");s.setParams({ifClause:h}),u.if(E,S("then",h),S("else",h))}else f?u.if(E,S("then")):u.if((0,e.not)(E),S("else"));s.pass($,()=>s.error(!0));function b(){const h=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},E);s.mergeEvaluated(h)}function S(h,i){return()=>{const d=s.subschema({keyword:h},E);u.assign($,E),s.mergeValidEvaluated(d,$),i?u.assign(i,(0,e._)`${h}`):s.setParams({ifClause:h})}}}};function c(s,u){const o=s.schema[u];return o!==void 0&&!(0,r.alwaysValidSchema)(s,o)}t.default=a}),jf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Be(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:a,it:c}){a.if===void 0&&(0,e.checkStrictMode)(c,`"${n}" without "if" is ignored`)}};t.default=r}),Mf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ko(),r=bf(),n=Ho(),a=Ef(),c=Sf(),s=Pf(),u=kf(),o=Bo(),y=Of(),f=Nf(),w=Rf(),$=Tf(),E=If(),b=Cf(),S=Af(),h=jf();function i(d=!1){const l=[w.default,$.default,E.default,b.default,S.default,h.default,u.default,o.default,s.default,y.default,f.default];return d?l.push(r.default,a.default):l.push(e.default,n.default),l.push(c.default),l}t.default=i}),Df=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message:({schemaCode:a})=>(0,e.str)`must match format "${a}"`,params:({schemaCode:a})=>(0,e._)`{format: ${a}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(a,c){const{gen:s,data:u,$data:o,schema:y,schemaCode:f,it:w}=a,{opts:$,errSchemaPath:E,schemaEnv:b,self:S}=w;if(!$.validateFormats)return;o?h():i();function h(){const d=s.scopeValue("formats",{ref:S.formats,code:$.code.formats}),l=s.const("fDef",(0,e._)`${d}[${f}]`),_=s.let("fType"),m=s.let("format");s.if((0,e._)`typeof ${l} == "object" && !(${l} instanceof RegExp)`,()=>s.assign(_,(0,e._)`${l}.type || "string"`).assign(m,(0,e._)`${l}.validate`),()=>s.assign(_,(0,e._)`"string"`).assign(m,l)),a.fail$data((0,e.or)(g(),v()));function g(){return $.strictSchema===!1?e.nil:(0,e._)`${f} && !${m}`}function v(){const k=b.$async?(0,e._)`(${l}.async ? await ${m}(${u}) : ${m}(${u}))`:(0,e._)`${m}(${u})`,T=(0,e._)`(typeof ${m} == "function" ? ${k} : ${m}.test(${u}))`;return(0,e._)`${m} && ${m} !== true && ${_} === ${c} && !${T}`}}function i(){const d=S.formats[y];if(!d){g();return}if(d===!0)return;const[l,_,m]=v(d);l===c&&a.pass(k());function g(){if($.strictSchema===!1){S.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${y}" ignored in schema at path "${E}"`}}function v(T){const j=T instanceof RegExp?(0,e.regexpCode)(T):$.code.formats?(0,e._)`${$.code.formats}${(0,e.getProperty)(y)}`:void 0,V=s.scopeValue("formats",{key:y,ref:T,code:j});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,e._)`${V}.validate`]:["string",T,V]}function k(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!b.$async)throw new Error("async format in sync schema");return(0,e._)`await ${m}(${u})`}return typeof _=="function"?(0,e._)`${m}(${u})`:(0,e._)`${m}.test(${u})`}}}};t.default=n}),qf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Df(),r=[e.default];t.default=r}),Vf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),Lf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=uf(),r=$f(),n=Mf(),a=qf(),c=Vf(),s=[e.default,r.default,(0,n.default)(),a.default,c.metadataVocabulary,c.contentVocabulary];t.default=s}),Uf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))}),zf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Uf(),n=ha(),a=Be(),c={message:({params:{discrError:u,tagName:o}})=>u===r.DiscrError.Tag?`tag "${o}" must be string`:`value of tag "${o}" must be in oneOf`,params:({params:{discrError:u,tag:o,tagName:y}})=>(0,e._)`{error: ${u}, tag: ${y}, tagValue: ${o}}`},s={keyword:"discriminator",type:"object",schemaType:"object",error:c,code(u){const{gen:o,data:y,schema:f,parentSchema:w,it:$}=u,{oneOf:E}=w;if(!$.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=f.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(f.mapping)throw new Error("discriminator: mapping is not supported");if(!E)throw new Error("discriminator: requires oneOf keyword");const S=o.let("valid",!1),h=o.const("tag",(0,e._)`${y}${(0,e.getProperty)(b)}`);o.if((0,e._)`typeof ${h} == "string"`,()=>i(),()=>u.error(!1,{discrError:r.DiscrError.Tag,tag:h,tagName:b})),u.ok(S);function i(){const _=l();o.if(!1);for(const m in _)o.elseIf((0,e._)`${h} === ${m}`),o.assign(S,d(_[m]));o.else(),u.error(!1,{discrError:r.DiscrError.Mapping,tag:h,tagName:b}),o.endIf()}function d(_){const m=o.name("valid"),g=u.subschema({keyword:"oneOf",schemaProp:_},m);return u.mergeEvaluated(g,e.Name),m}function l(){var _;const m={},g=k(w);let v=!0;for(let V=0;V<E.length;V++){let q=E[V];q!=null&&q.$ref&&!(0,a.schemaHasRulesButRef)(q,$.self.RULES)&&(q=n.resolveRef.call($.self,$.schemaEnv.root,$.baseId,q==null?void 0:q.$ref),q instanceof n.SchemaEnv&&(q=q.schema));const W=(_=q==null?void 0:q.properties)===null||_===void 0?void 0:_[b];if(typeof W!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);v=v&&(g||k(q)),T(W,V)}if(!v)throw new Error(`discriminator: "${b}" must be required`);return m;function k({required:V}){return Array.isArray(V)&&V.includes(b)}function T(V,q){if(V.const)j(V.const,q);else if(V.enum)for(const W of V.enum)j(W,q);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function j(V,q){if(typeof V!="string"||V in m)throw new Error(`discriminator: "${b}" values must be unique strings`);m[V]=q}}}};t.default=s}),Ff=Q(function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),Kf=Q(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=af(),n=Lf(),a=zf(),c=Ff(),s=["/properties"],u="http://json-schema.org/draft-07/schema";class o extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(c,s):c;this.addMetaSchema(b,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var y=ls();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return y.KeywordCxt}});var f=Me();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var w=fa();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return w.default}});var $=da();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return $.default}})}),Hf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=Kf(),r=Me(),n=r.operators,a={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},c={message:({keyword:u,schemaCode:o})=>r.str`should be ${a[u].okStr} ${o}`,params:({keyword:u,schemaCode:o})=>r._`{comparison: ${a[u].okStr}, limit: ${o}}`};t.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:c,code(u){const{gen:o,data:y,schemaCode:f,keyword:w,it:$}=u,{opts:E,self:b}=$;if(!E.validateFormats)return;const S=new e.KeywordCxt($,b.RULES.all.format.definition,"format");S.$data?h():i();function h(){const l=o.scopeValue("formats",{ref:b.formats,code:E.code.formats}),_=o.const("fmt",r._`${l}[${S.schemaCode}]`);u.fail$data(r.or(r._`typeof ${_} != "object"`,r._`${_} instanceof RegExp`,r._`typeof ${_}.compare != "function"`,d(_)))}function i(){const l=S.schema,_=b.formats[l];if(!_||_===!0)return;if(typeof _!="object"||_ instanceof RegExp||typeof _.compare!="function")throw new Error(`"${w}": format "${l}" does not define "compare" function`);const m=o.scopeValue("formats",{key:l,ref:_,code:E.code.formats?r._`${E.code.formats}${r.getProperty(l)}`:void 0});u.fail$data(d(m))}function d(l){return r._`${l}.compare(${y}, ${f}) ${a[w].fail} 0`}},dependencies:["format"]};var s=u=>(u.addKeyword(t.formatLimitDefinition),u);t.default=s}),Bf=Q(function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var r=Yl(),n=Hf(),a=Me(),c=new a.Name("fullFormats"),s=new a.Name("fastFormats"),u=(y,f={keywords:!0})=>{if(Array.isArray(f))return o(y,f,r.fullFormats,c),y;const[w,$]=f.mode==="fast"?[r.fastFormats,s]:[r.fullFormats,c],E=f.formats||r.formatNames;return o(y,E,w,$),f.keywords&&n.default(y),y};u.get=(y,f="full")=>{const $=(f==="fast"?r.fastFormats:r.fullFormats)[y];if(!$)throw new Error(`Unknown format "${y}"`);return $};function o(y,f,w,$){var E,b;(E=(b=y.opts.code).formats)!==null&&E!==void 0||(b.formats=a._`require("ajv-formats/dist/formats").${$}`);for(const S of f)y.addFormat(S,w[S])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u}),Gf=Q(function(t,e){(function(r,n){typeof e=="object"&&e.exports?e.exports=n():r.nearley=n()})(t,function(){function r(f,w,$){return this.id=++r.highestId,this.name=f,this.symbols=w,this.postprocess=$,this}r.highestId=0,r.prototype.toString=function(f){var w=typeof f>"u"?this.symbols.map(y).join(" "):this.symbols.slice(0,f).map(y).join(" ")+" ● "+this.symbols.slice(f).map(y).join(" ");return this.name+" → "+w};function n(f,w,$,E){this.rule=f,this.dot=w,this.reference=$,this.data=[],this.wantedBy=E,this.isComplete=this.dot===f.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(f){var w=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return w.left=this,w.right=f,w.isComplete&&(w.data=w.build(),w.right=void 0),w},n.prototype.build=function(){var f=[],w=this;do f.push(w.right.data),w=w.left;while(w.left);return f.reverse(),f},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,u.fail))};function a(f,w){this.grammar=f,this.index=w,this.states=[],this.wants={},this.scannable=[],this.completed={}}a.prototype.process=function(f){for(var w=this.states,$=this.wants,E=this.completed,b=0;b<w.length;b++){var S=w[b];if(S.isComplete){if(S.finish(),S.data!==u.fail){for(var h=S.wantedBy,i=h.length;i--;){var d=h[i];this.complete(d,S)}if(S.reference===this.index){var l=S.rule.name;(this.completed[l]=this.completed[l]||[]).push(S)}}}else{var l=S.rule.symbols[S.dot];if(typeof l!="string"){this.scannable.push(S);continue}if($[l]){if($[l].push(S),E.hasOwnProperty(l))for(var _=E[l],i=0;i<_.length;i++){var m=_[i];this.complete(S,m)}}else $[l]=[S],this.predict(l)}}},a.prototype.predict=function(f){for(var w=this.grammar.byName[f]||[],$=0;$<w.length;$++){var E=w[$],b=this.wants[f],S=new n(E,0,this.index,b);this.states.push(S)}},a.prototype.complete=function(f,w){var $=f.nextState(w);this.states.push($)};function c(f,w){this.rules=f,this.start=w||this.rules[0].name;var $=this.byName={};this.rules.forEach(function(E){$.hasOwnProperty(E.name)||($[E.name]=[]),$[E.name].push(E)})}c.fromCompiled=function(E,w){var $=E.Lexer;E.ParserStart&&(w=E.ParserStart,E=E.ParserRules);var E=E.map(function(S){return new r(S.name,S.symbols,S.postprocess)}),b=new c(E,w);return b.lexer=$,b};function s(){this.reset("")}s.prototype.reset=function(f,w){this.buffer=f,this.index=0,this.line=w?w.line:1,this.lastLineBreak=w?-w.col:0},s.prototype.next=function(){if(this.index<this.buffer.length){var f=this.buffer[this.index++];return f===`
23
+ `&&(this.line+=1,this.lastLineBreak=this.index),{value:f}}},s.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},s.prototype.formatError=function(f,w){var $=this.buffer;if(typeof $=="string"){var E=$.split(`
24
+ `).slice(Math.max(0,this.line-5),this.line),b=$.indexOf(`
25
+ `,this.index);b===-1&&(b=$.length);var S=this.index-this.lastLineBreak,h=String(this.line).length;return w+=" at line "+this.line+" col "+S+`:
26
+
27
+ `,w+=E.map(function(d,l){return i(this.line-E.length+l+1,h)+" "+d},this).join(`
28
+ `),w+=`
29
+ `+i("",h+S)+`^
30
+ `,w}else return w+" at index "+(this.index-1);function i(d,l){var _=String(d);return Array(l-_.length+1).join(" ")+_}};function u(f,w,$){if(f instanceof c)var E=f,$=w;else var E=c.fromCompiled(f,w);this.grammar=E,this.options={keepHistory:!1,lexer:E.lexer||new s};for(var b in $||{})this.options[b]=$[b];this.lexer=this.options.lexer,this.lexerState=void 0;var S=new a(E,0);this.table=[S],S.wants[E.start]=[],S.predict(E.start),S.process(),this.current=0}u.fail={},u.prototype.feed=function(f){var w=this.lexer;w.reset(f,this.lexerState);for(var $;;){try{if($=w.next(),!$)break}catch(k){var h=new a(this.grammar,this.current+1);this.table.push(h);var E=new Error(this.reportLexerError(k));throw E.offset=this.current,E.token=k.token,E}var b=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var S=this.current+1,h=new a(this.grammar,S);this.table.push(h);for(var i=$.text!==void 0?$.text:$.value,d=w.constructor===s?$.value:$,l=b.scannable,_=l.length;_--;){var m=l[_],g=m.rule.symbols[m.dot];if(g.test?g.test(d):g.type?g.type===$.type:g.literal===i){var v=m.nextState({data:d,token:$,isToken:!0,reference:S-1});h.states.push(v)}}if(h.process(),h.states.length===0){var E=new Error(this.reportError($));throw E.offset=this.current,E.token=$,E}this.options.keepHistory&&(b.lexerState=w.save()),this.current++}return b&&(this.lexerState=w.save()),this.results=this.finish(),this},u.prototype.reportLexerError=function(f){var w,$,E=f.token;return E?(w="input "+JSON.stringify(E.text[0])+" (lexer error)",$=this.lexer.formatError(E,"Syntax error")):(w="input (lexer error)",$=f.message),this.reportErrorCommon($,w)},u.prototype.reportError=function(f){var w=(f.type?f.type+" token: ":"")+JSON.stringify(f.value!==void 0?f.value:f),$=this.lexer.formatError(f,"Syntax error");return this.reportErrorCommon($,w)},u.prototype.reportErrorCommon=function(f,w){var $=[];$.push(f);var E=this.table.length-2,b=this.table[E],S=b.states.filter(function(i){var d=i.rule.symbols[i.dot];return d&&typeof d!="string"});if(S.length===0)$.push("Unexpected "+w+`. I did not expect any more input. Here is the state of my parse table:
31
+ `),this.displayStateStack(b.states,$);else{$.push("Unexpected "+w+`. Instead, I was expecting to see one of the following:
32
+ `);var h=S.map(function(i){return this.buildFirstStateStack(i,[])||[i]},this);h.forEach(function(i){var d=i[0],l=d.rule.symbols[d.dot],_=this.getSymbolDisplay(l);$.push("A "+_+" based on:"),this.displayStateStack(i,$)},this)}return $.push(""),$.join(`
33
+ `)},u.prototype.displayStateStack=function(f,w){for(var $,E=0,b=0;b<f.length;b++){var S=f[b],h=S.rule.toString(S.dot);h===$?E++:(E>0&&w.push(" ^ "+E+" more lines identical to this"),E=0,w.push(" "+h)),$=h}},u.prototype.getSymbolDisplay=function(f){return o(f)},u.prototype.buildFirstStateStack=function(f,w){if(w.indexOf(f)!==-1)return null;if(f.wantedBy.length===0)return[f];var $=f.wantedBy[0],E=[f].concat(w),b=this.buildFirstStateStack($,E);return b===null?null:[f].concat(b)},u.prototype.save=function(){var f=this.table[this.current];return f.lexerState=this.lexerState,f},u.prototype.restore=function(f){var w=f.index;this.current=w,this.table[w]=f,this.table.splice(w+1),this.lexerState=f.lexerState,this.results=this.finish()},u.prototype.rewind=function(f){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[f])},u.prototype.finish=function(){var f=[],w=this.grammar.start,$=this.table[this.table.length-1];return $.states.forEach(function(E){E.rule.name===w&&E.dot===E.rule.symbols.length&&E.reference===0&&E.data!==u.fail&&f.push(E)}),f.map(function(E){return E.data})};function o(f){var w=typeof f;if(w==="string")return f;if(w==="object"){if(f.literal)return JSON.stringify(f.literal);if(f instanceof RegExp)return"character matching "+f;if(f.type)return f.type+" token";if(f.test)return"token matching "+String(f.test);throw new Error("Unknown symbol type: "+f)}}function y(f){var w=typeof f;if(w==="string")return f;if(w==="object"){if(f.literal)return JSON.stringify(f.literal);if(f instanceof RegExp)return f.toString();if(f.type)return"%"+f.type;if(f.test)return"<"+String(f.test)+">";throw new Error("Unknown symbol type: "+f)}}return{Parser:u,Grammar:c,Rule:r}})}),xf=Q(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(c){return c[0]}var r=c=>[].concat(...c.map(s=>Array.isArray(s)?r(s):s));function n(c){return c?Array.isArray(c)?r(c).join(""):c:""}var a={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:c=>c.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(c){return c.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(c){return c.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:e},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:e},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:c=>c[0].concat([c[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:e},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:c=>c[0].concat([c[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:e},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(c){return{DomainName:n(c[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(c){return{AddressLiteral:n(c[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(c){return{localPart:n(c[0]),domainPart:n(c[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(c){return{DotString:n(c[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(c){return{QuotedString:n(c[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:c=>c[0].concat([c[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:c=>c[0].concat([c[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:e},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(c){return c.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:c=>c[0].concat([c[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:e},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:c=>c.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:c=>c.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:e},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:e},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:e}],ParserStart:"Reverse_path"};t.default=a}),ga=Q(function(t){var e=t&&t.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;var r=Gf(),n=e(xf());n.default.ParserStart="Mailbox";var a=r.Grammar.fromCompiled(n.default);function c(f){if(f.length>986)throw new Error("address too long");const $=new r.Parser(a);if($.feed(f),$.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");const E=f.lastIndexOf("@"),b=f.substring(E+1);if(b[0]!=="["){if(b.length>253)throw new Error("domain too long");const S=b.split(".");if(S.length<2)throw new Error("domain not fully qualified");if(S[S.length-1].length<2)throw new Error("top level domain label too short");if(S.sort(function(h,i){return i.length-h.length}),S[0].length>63)throw new Error("domain label too long")}return $.results[0]}t.parse=c;function s(f){return function(){const E=f.indexOf("+");return E===-1?f:f.substr(0,E)}().replace(/\./g,"").toLowerCase()}t.normalize_dot_string=s;function u(f){var w,$;const E=c(f),b=(w=E.domainPart.AddressLiteral)!==null&&w!==void 0?w:E.domainPart.DomainName.toLowerCase();return`${($=E.localPart.QuotedString)!==null&&$!==void 0?$:s(E.localPart.DotString)}@${b}`}t.normalize=u;function o(f){return`"${f.substr(1).substr(0,f.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.canonicalize_quoted_string=o;function y(f){var w;const $=c(f),E=(w=$.domainPart.AddressLiteral)!==null&&w!==void 0?w:$.domainPart.DomainName.toLowerCase();return`${$.localPart.QuotedString?o($.localPart.QuotedString):$.localPart.DotString}@${E}`}t.canonicalize=y}),Wf=Q(function(t,e){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,c=Object.getOwnPropertyDescriptor,s=function(w){return typeof Array.isArray=="function"?Array.isArray(w):n.call(w)==="[object Array]"},u=function(w){if(!w||n.call(w)!=="[object Object]")return!1;var $=r.call(w,"constructor"),E=w.constructor&&w.constructor.prototype&&r.call(w.constructor.prototype,"isPrototypeOf");if(w.constructor&&!$&&!E)return!1;var b;for(b in w);return typeof b>"u"||r.call(w,b)},o=function(w,$){a&&$.name==="__proto__"?a(w,$.name,{enumerable:!0,configurable:!0,value:$.newValue,writable:!0}):w[$.name]=$.newValue},y=function(w,$){if($==="__proto__")if(r.call(w,$)){if(c)return c(w,$).value}else return;return w[$]};e.exports=function f(){var w,$,E,b,S,h,i=arguments[0],d=1,l=arguments.length,_=!1;for(typeof i=="boolean"&&(_=i,i=arguments[1]||{},d=2),(i==null||typeof i!="object"&&typeof i!="function")&&(i={});d<l;++d)if(w=arguments[d],w!=null)for($ in w)E=y(i,$),b=y(w,$),i!==b&&(_&&b&&(u(b)||(S=s(b)))?(S?(S=!1,h=E&&s(E)?E:[]):h=E&&u(E)?E:{},o(i,{name:$,newValue:f(_,h,b)})):typeof b<"u"&&o(i,{name:$,newValue:b}));return i}}),Jf=Q(function(t,e){e.exports=[{scheme:"aaa",description:"Diameter Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"aaas",description:"Diameter Protocol with Secure Transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"about",description:"about",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6694"}]},{scheme:"acap",description:"application configuration access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2244"}]},{scheme:"acct",description:"acct",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7565"}]},{scheme:"cap",description:"Calendar Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4324"}]},{scheme:"cid",description:"content identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"coap",description:"coap",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"coaps",description:"coaps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"crid",description:"TV-Anytime Content Reference Identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4078"}]},{scheme:"data",description:"data",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2397"}]},{scheme:"dav",description:"dav",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"dict",description:"dictionary service protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2229"}]},{scheme:"dns",description:"Domain Name System",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4501"}]},{scheme:"example",description:"example",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7595"}]},{scheme:"file",description:"Host-specific file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"ftp",description:"File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"geo",description:"Geographic Locations",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5870"}]},{scheme:"go",description:"go",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3368"}]},{scheme:"gopher",description:"The Gopher Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4266"}]},{scheme:"h323",description:"H.323",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3508"}]},{scheme:"http",description:"Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"https",description:"Hypertext Transfer Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"iax",description:"Inter-Asterisk eXchange Version 2",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5456"}]},{scheme:"icap",description:"Internet Content Adaptation Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3507"}]},{scheme:"im",description:"Instant Messaging",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3860"}]},{scheme:"imap",description:"internet message access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5092"}]},{scheme:"info",description:`Information Assets with Identifiers in Public Namespaces.
34
+ (section 3) defines an "info" registry
35
+ of public namespaces, which is maintained by NISO and can be accessed
36
+ from .`,reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4452"}]},{scheme:"ipp",description:"Internet Printing Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3510"}]},{scheme:"ipps",description:"Internet Printing Protocol over HTTPS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7472"}]},{scheme:"iris",description:"Internet Registry Information Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3981"}]},{scheme:"iris.beep",description:"iris.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3983"}]},{scheme:"iris.lwz",description:"iris.lwz",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4993"}]},{scheme:"iris.xpc",description:"iris.xpc",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"iris.xpcs",description:"iris.xpcs",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"jabber",description:"jabber",reference:[],template:"http://www.iana.org/assignments/uri-schemes/perm/jabber"},{scheme:"ldap",description:"Lightweight Directory Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4516"}]},{scheme:"mailto",description:"Electronic mail address",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6068"}]},{scheme:"mid",description:"message identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"msrp",description:"Message Session Relay Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"msrps",description:"Message Session Relay Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"mtqp",description:"Message Tracking Query Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3887"}]},{scheme:"mupdate",description:"Mailbox Update (MUPDATE) Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3656"}]},{scheme:"news",description:"USENET news",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"nfs",description:"network file system protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2224"}]},{scheme:"ni",description:"ni",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nih",description:"nih",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nntp",description:"USENET news using NNTP access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"opaquelocktoken",description:"opaquelocktokent",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"pkcs11",description:"PKCS#11",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7512"}]},{scheme:"pop",description:"Post Office Protocol v3",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2384"}]},{scheme:"pres",description:"Presence",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3859"}]},{scheme:"reload",description:"reload",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6940"}]},{scheme:"rtsp",description:"Real-time Streaming Protocol (RTSP)",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtsps",description:"Real-time Streaming Protocol (RTSP) over TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtspu",description:"Real-time Streaming Protocol (RTSP) over unreliable datagram transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"}]},{scheme:"service",description:"service location",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2609"}]},{scheme:"session",description:"session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6787"}]},{scheme:"shttp",description:"Secure Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2660"}]},{scheme:"sieve",description:"ManageSieve Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5804"}]},{scheme:"sip",description:"session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sips",description:"secure session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sms",description:"Short Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5724"}]},{scheme:"snmp",description:"Simple Network Management Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4088"}]},{scheme:"soap.beep",description:"soap.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"soap.beeps",description:"soap.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"stun",description:"stun",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"stuns",description:"stuns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"tag",description:"tag",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4151"}]},{scheme:"tel",description:"telephone",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"telnet",description:"Reference to interactive sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4248"}]},{scheme:"tftp",description:"Trivial File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3617"}]},{scheme:"thismessage",description:"multipart/related relative reference resolution",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2557"}],template:"http://www.iana.org/assignments/uri-schemes/perm/thismessage"},{scheme:"tip",description:"Transaction Internet Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2371"}]},{scheme:"tn3270",description:"Interactive 3270 emulation sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6270"}]},{scheme:"turn",description:"turn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"turns",description:"turns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"tv",description:"TV Broadcasts",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2838"}]},{scheme:"urn",description:"Uniform Resource Names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2141"},{type:"registry",href:"http://www.iana.org/assignments/urn-namespaces"}]},{scheme:"vemmi",description:"versatile multimedia interface",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2122"}]},{scheme:"vnc",description:"Remote Framebuffer Protocol",reference:[{type:"draft",href:"http://www.iana.org/go/RFC-warden-appsawg-vnc-scheme-10"}]},{scheme:"ws",description:"WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"wss",description:"Encrypted WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"xcon",description:"xcon",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xcon-userid",description:"xcon-userid",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xmlrpc.beep",description:"xmlrpc.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmlrpc.beeps",description:"xmlrpc.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmpp",description:"Extensible Messaging and Presence Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5122"}]},{scheme:"z39.50r",description:"Z39.50 Retrieval",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]},{scheme:"z39.50s",description:"Z39.50 Session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Qf=Q(function(t,e){e.exports=[{scheme:"acr",description:"acr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/acr"},{scheme:"adiumxtra",description:"adiumxtra",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/adiumxtra"},{scheme:"afp",description:"afp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/afp"},{scheme:"afs",description:"Andrew File System global file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"aim",description:"aim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aim"},{scheme:"appdata",description:"appdata",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/appdata"},{scheme:"apt",description:"apt",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/apt"},{scheme:"attachment",description:"attachment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/attachment"},{scheme:"aw",description:"aw",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aw"},{scheme:"barion",description:"barion",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/barion"},{scheme:"beshare",description:"beshare",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/beshare"},{scheme:"bitcoin",description:"bitcoin",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bitcoin"},{scheme:"blob",description:"blob",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/blob"},{scheme:"bolo",description:"bolo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bolo"},{scheme:"callto",description:"callto",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/callto"},{scheme:"chrome",description:"chrome",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome"},{scheme:"chrome-extension",description:"chrome-extension",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome-extension"},{scheme:"com-eventbrite-attendee",description:"com-eventbrite-attendee",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/com-eventbrite-attendee"},{scheme:"content",description:"content",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/content"},{scheme:"cvs",description:"cvs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/cvs"},{scheme:"dis",description:"dis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dis"},{scheme:"dlna-playcontainer",description:"dlna-playcontainer",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playcontainer"},{scheme:"dlna-playsingle",description:"dlna-playsingle",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playsingle"},{scheme:"dntp",description:"dntp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dntp"},{scheme:"dtn",description:"DTNRG research and development",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5050"}]},{scheme:"dvb",description:"dvb",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mcroberts-uri-dvb"}]},{scheme:"ed2k",description:"ed2k",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ed2k"},{scheme:"facetime",description:"facetime",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/facetime"},{scheme:"feed",description:"feed",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feed"},{scheme:"feedready",description:"feedready",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feedready"},{scheme:"finger",description:"finger",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/finger"},{scheme:"fish",description:"fish",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/fish"},{scheme:"gg",description:"gg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gg"},{scheme:"git",description:"git",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/git"},{scheme:"gizmoproject",description:"gizmoproject",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gizmoproject"},{scheme:"gtalk",description:"gtalk",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gtalk"},{scheme:"ham",description:"ham",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7046"}]},{scheme:"hcp",description:"hcp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/hcp"},{scheme:"icon",description:"icon",reference:[{type:"draft",href:"http://www.iana.org/go/draft-lafayette-icon-uri-scheme"}]},{scheme:"iotdisco",description:"iotdisco",reference:[{type:"uri",href:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco.pdf"}],template:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco"},{scheme:"ipn",description:"ipn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6260"}]},{scheme:"irc",description:"irc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc"},{scheme:"irc6",description:"irc6",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc6"},{scheme:"ircs",description:"ircs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ircs"},{scheme:"isostore",description:"isostore",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/isostore"},{scheme:"itms",description:"itms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/itms"},{scheme:"jar",description:"jar",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/jar"},{scheme:"jms",description:"Java Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6167"}]},{scheme:"keyparc",description:"keyparc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/keyparc"},{scheme:"lastfm",description:"lastfm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/lastfm"},{scheme:"ldaps",description:"ldaps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ldaps"},{scheme:"magnet",description:"magnet",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/magnet"},{scheme:"maps",description:"maps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/maps"},{scheme:"market",description:"market",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/market"},{scheme:"message",description:"message",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/message"},{scheme:"mms",description:"mms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mms"},{scheme:"ms-access",description:"ms-access",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-access"},{scheme:"ms-drive-to",description:"ms-drive-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-drive-to"},{scheme:"ms-enrollment",description:"ms-enrollment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-enrollment"},{scheme:"ms-excel",description:"ms-excel",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-excel"},{scheme:"ms-getoffice",description:"ms-getoffice",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-getoffice"},{scheme:"ms-help",description:"ms-help",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-help"},{scheme:"ms-infopath",description:"ms-infopath",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-infopath"},{scheme:"ms-media-stream-id",description:"ms-media-stream-id",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-media-stream-id"},{scheme:"ms-powerpoint",description:"ms-powerpoint",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-powerpoint"},{scheme:"ms-project",description:"ms-project",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-project"},{scheme:"ms-publisher",description:"ms-publisher",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-publisher"},{scheme:"ms-search-repair",description:"ms-search-repair",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-search-repair"},{scheme:"ms-secondary-screen-controller",description:"ms-secondary-screen-controller",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-controller"},{scheme:"ms-secondary-screen-setup",description:"ms-secondary-screen-setup",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-setup"},{scheme:"ms-settings",description:"ms-settings",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings"},{scheme:"ms-settings-airplanemode",description:"ms-settings-airplanemode",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-airplanemode"},{scheme:"ms-settings-bluetooth",description:"ms-settings-bluetooth",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-bluetooth"},{scheme:"ms-settings-camera",description:"ms-settings-camera",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-camera"},{scheme:"ms-settings-cellular",description:"ms-settings-cellular",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cellular"},{scheme:"ms-settings-cloudstorage",description:"ms-settings-cloudstorage",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cloudstorage"},{scheme:"ms-settings-connectabledevices",description:"ms-settings-connectabledevices",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-connectabledevices"},{scheme:"ms-settings-displays-topology",description:"ms-settings-displays-topology",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-displays-topology"},{scheme:"ms-settings-emailandaccounts",description:"ms-settings-emailandaccounts",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-emailandaccounts"},{scheme:"ms-settings-language",description:"ms-settings-language",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-language"},{scheme:"ms-settings-location",description:"ms-settings-location",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-location"},{scheme:"ms-settings-lock",description:"ms-settings-lock",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-lock"},{scheme:"ms-settings-nfctransactions",description:"ms-settings-nfctransactions",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-nfctransactions"},{scheme:"ms-settings-notifications",description:"ms-settings-notifications",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-notifications"},{scheme:"ms-settings-power",description:"ms-settings-power",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-power"},{scheme:"ms-settings-privacy",description:"ms-settings-privacy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-privacy"},{scheme:"ms-settings-proximity",description:"ms-settings-proximity",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-proximity"},{scheme:"ms-settings-screenrotation",description:"ms-settings-screenrotation",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-screenrotation"},{scheme:"ms-settings-wifi",description:"ms-settings-wifi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-wifi"},{scheme:"ms-settings-workplace",description:"ms-settings-workplace",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-workplace"},{scheme:"ms-spd",description:"ms-spd",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-spd"},{scheme:"ms-transit-to",description:"ms-transit-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-transit-to"},{scheme:"ms-visio",description:"ms-visio",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-visio"},{scheme:"ms-walk-to",description:"ms-walk-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-walk-to"},{scheme:"ms-word",description:"ms-word",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-word"},{scheme:"msnim",description:"msnim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/msnim"},{scheme:"mumble",description:"mumble",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mumble"},{scheme:"mvn",description:"mvn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mvn"},{scheme:"notes",description:"notes",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/notes"},{scheme:"oid",description:"oid",reference:[{type:"draft",href:"http://www.iana.org/go/draft-larmouth-oid-iri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/oid"},{scheme:"palm",description:"palm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/palm"},{scheme:"paparazzi",description:"paparazzi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/paparazzi"},{scheme:"platform",description:"platform",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/platform"},{scheme:"proxy",description:"proxy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/proxy"},{scheme:"psyc",description:"psyc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/psyc"},{scheme:"query",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/query"},{scheme:"redis",description:"redis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/redis"},{scheme:"rediss",description:"rediss",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rediss"},{scheme:"res",description:"res",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/res"},{scheme:"resource",description:"resource",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/resource"},{scheme:"rmi",description:"rmi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rmi"},{scheme:"rsync",description:"rsync",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5781"}]},{scheme:"rtmfp",description:"rtmfp",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7425"}],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmfp"},{scheme:"rtmp",description:"rtmp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmp"},{scheme:"secondlife",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/secondlife"},{scheme:"sftp",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sftp"},{scheme:"sgn",description:"sgn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sgn"},{scheme:"skype",description:"skype",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/skype"},{scheme:"smb",description:"smb",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/smb"},{scheme:"smtp",description:"smtp",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/smtp"},{scheme:"soldat",description:"soldat",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/soldat"},{scheme:"spotify",description:"spotify",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/spotify"},{scheme:"ssh",description:"ssh",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ssh"},{scheme:"steam",description:"steam",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/steam"},{scheme:"submit",description:"submit",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/submit"},{scheme:"svn",description:"svn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/svn"},{scheme:"teamspeak",description:"teamspeak",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teamspeak"},{scheme:"teliaeid",description:"teliaeid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teliaeid"},{scheme:"things",description:"things",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/things"},{scheme:"tool",description:"tool",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/tool"},{scheme:"udp",description:"udp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/udp"},{scheme:"unreal",description:"unreal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/unreal"},{scheme:"ut2004",description:"ut2004",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ut2004"},{scheme:"v-event",description:"v-event",reference:[{type:"draft",href:"http://www.iana.org/go/draft-menderico-v-event-uri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/v-event"},{scheme:"ventrilo",description:"ventrilo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ventrilo"},{scheme:"view-source",description:"view-source",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/view-source"},{scheme:"webcal",description:"webcal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/webcal"},{scheme:"wpid",description:"wpid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wpid"},{scheme:"wtai",description:"wtai",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wtai"},{scheme:"wyciwyg",description:"wyciwyg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wyciwyg"},{scheme:"xfire",description:"xfire",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xfire"},{scheme:"xri",description:"xri",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xri"},{scheme:"ymsgr",description:"ymsgr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ymsgr"}]}),Xf=Q(function(t,e){e.exports=[{scheme:"fax",description:"fax",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"filesystem",description:"filesystem",reference:[],template:"http://www.iana.org/assignments/uri-schemes/historic/filesystem"},{scheme:"mailserver",description:"Access to data available from mail servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6196"}]},{scheme:"modem",description:"modem",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"pack",description:"pack",reference:[{type:"draft",href:"http://www.iana.org/go/draft-shur-pack-uri-scheme"}],template:"http://www.iana.org/assignments/uri-schemes/historic/pack"},{scheme:"prospero",description:"Prospero Directory Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4157"}]},{scheme:"snews",description:"NNTP over SSL/TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"videotex",description:"videotex",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mavrakis-videotex-url-spec"},{type:"rfc",href:"http://www.iana.org/go/rfc2122"},{type:"rfc",href:"http://www.iana.org/go/rfc3986"}],template:"http://www.iana.org/assignments/uri-schemes/historic/videotex"},{scheme:"wais",description:"Wide Area Information Servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4156"}]},{scheme:"z39.50",description:"Z39.50 information access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"},{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Yf=Q(function(t,e){e.exports=[{scheme:"android-app"},{scheme:"webpack"},{scheme:"s3",description:"Amazon Web Services S3 bucket"},{scheme:"gs",description:"Google Cloud Storage"},{scheme:"mqtt",description:"Message Queuing Telemetry Transport Protocol"},{scheme:"modbus+tcp",description:"Modbus over TCP"}]}),Go=Q(function(t,e){var r=Wf(),n={permanent:Jf(),provosional:Qf(),historical:Xf()},a={};Object.keys(n).forEach(function(c){n[c].forEach(function(s){a[s.scheme]=r(s,{type:c})})}),n.unofficial=Yf().filter(function(c){return!a[c.scheme]}),n.unofficial.forEach(function(c){a[c.scheme]=r(c,{type:"unofficial"})}),e.exports=r(n,{allByName:a})}),Zf=Q(function(t,e){var{parse:r}=pa(),{addressParser:n}=ga(),a=Go();function c(s){try{return n(s),!0}catch{return!1}}e.exports=s=>{const u=r(s);return!!(u.scheme==="mailto"&&u.to.every(c)||u.reference==="absolute"&&a.allByName[u.scheme])}}),ed=Q(function(t,e){e.exports=/^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/}),td=Q(function(t,e){var{parse:r}=ga();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),xo={};al(xo,{default:()=>Xo});function Wo(t){return this[t]}function rd(t,e){this[t]=id.bind(null,e)}var Jo,Qo,Lr,ya,va,nd=(t,e,r)=>{var n=ya(e);for(let a of n)!va.call(t,a)&&a!=="default"&&Lr(t,a,{get:Wo.bind(e,a),enumerable:!0})},sd,Ha=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var a=sd??(sd=new WeakMap),c=a.get(t);if(c)return c}r=t!=null?Jo(Qo(t)):{};let s=e||!t||!t.__esModule?Lr(r,"default",{value:t,enumerable:!0}):r;for(let u of ya(t))va.call(s,u)||Lr(s,u,{get:Wo.bind(t,u),enumerable:!0});return n&&a.set(t,s),s},ad=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),id=t=>t,od=(t,e)=>{for(var r in e)Lr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:rd.bind(e,r)})},Rs,Ts,Is,Xo,cd=il(()=>{Jo=Object.create,{getPrototypeOf:Qo,defineProperty:Lr,getOwnPropertyNames:ya}=Object,va=Object.prototype.hasOwnProperty,Rs=ad((t,e)=>{var r=/^xn--/,n=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,u=String.fromCharCode;function o(m){throw RangeError(c[m])}function y(m,g){let v=[],k=m.length;for(;k--;)v[k]=g(m[k]);return v}function f(m,g){let v=m.split("@"),k="";v.length>1&&(k=v[0]+"@",m=v[1]),m=m.replace(a,".");let T=m.split("."),j=y(T,g).join(".");return k+j}function w(m){let g=[],v=0,k=m.length;for(;v<k;){let T=m.charCodeAt(v++);if(T>=55296&&T<=56319&&v<k){let j=m.charCodeAt(v++);(j&64512)==56320?g.push(((T&1023)<<10)+(j&1023)+65536):(g.push(T),v--)}else g.push(T)}return g}var $=m=>String.fromCodePoint(...m),E=function(m){return m>=48&&m<58?26+(m-48):m>=65&&m<91?m-65:m>=97&&m<123?m-97:36},b=function(m,g){return m+22+75*(m<26)-((g!=0)<<5)},S=function(m,g,v){let k=0;for(m=v?s(m/700):m>>1,m+=s(m/g);m>455;k+=36)m=s(m/35);return s(k+36*m/(m+38))},h=function(m){let g=[],v=m.length,k=0,T=128,j=72,V=m.lastIndexOf("-");V<0&&(V=0);for(let q=0;q<V;++q)m.charCodeAt(q)>=128&&o("not-basic"),g.push(m.charCodeAt(q));for(let q=V>0?V+1:0;q<v;){let W=k;for(let te=1,ue=36;;ue+=36){q>=v&&o("invalid-input");let ve=E(m.charCodeAt(q++));ve>=36&&o("invalid-input"),ve>s((2147483647-k)/te)&&o("overflow"),k+=ve*te;let fe=ue<=j?1:ue>=j+26?26:ue-j;if(ve<fe)break;let ae=36-fe;te>s(2147483647/ae)&&o("overflow"),te*=ae}let x=g.length+1;j=S(k-W,x,W==0),s(k/x)>2147483647-T&&o("overflow"),T+=s(k/x),k%=x,g.splice(k++,0,T)}return String.fromCodePoint(...g)},i=function(m){let g=[];m=w(m);let v=m.length,k=128,T=0,j=72;for(let W of m)W<128&&g.push(u(W));let V=g.length,q=V;for(V&&g.push("-");q<v;){let W=2147483647;for(let te of m)te>=k&&te<W&&(W=te);let x=q+1;W-k>s((2147483647-T)/x)&&o("overflow"),T+=(W-k)*x,k=W;for(let te of m)if(te<k&&++T>2147483647&&o("overflow"),te===k){let ue=T;for(let ve=36;;ve+=36){let fe=ve<=j?1:ve>=j+26?26:ve-j;if(ue<fe)break;let ae=ue-fe,L=36-fe;g.push(u(b(fe+ae%L,0))),ue=s(ae/L)}g.push(u(b(ue,0))),j=S(T,x,q===V),T=0,++q}++T,++k}return g.join("")},d=function(m){return f(m,function(g){return r.test(g)?h(g.slice(4).toLowerCase()):g})},l=function(m){return f(m,function(g){return n.test(g)?"xn--"+i(g):g})},_={version:"2.3.1",ucs2:{decode:w,encode:$},decode:h,encode:i,toASCII:l,toUnicode:d};e.exports=_}),Ts={},od(Ts,{default:()=>Is.default}),nd(Ts,Ha(Rs(),1)),Is=Ha(Rs(),1),Xo=Is.default}),ud=Q(function(t,e){var{toASCII:r}=(cd(),rl(xo)),n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;e.exports=a=>{const c=r(a);return c.replace(/\.$/,"").length<=253&&n.test(c)}}),ld=Q(function(t,e){var{parse:r}=pa(),{addressParser:n}=ga(),a=Go();function c(s){try{return n(s),!0}catch{return!1}}e.exports=s=>{const u=r(s);return u.scheme==="mailto"&&u.to.every(c)||u.reference==="absolute"&&u.path!==void 0&&a.allByName[u.scheme]?!0:u.scheme&&!a.allByName[u.scheme]?!1:u.path!==void 0&&(u.reference==="relative"||u.reference==="same-document"||u.reference==="uri")}}),fd=Q(function(t,e){t.iri=Zf(),t.duration=ed(),t["idn-email"]=td(),t["idn-hostname"]=ud(),t["iri-reference"]=ld()}),dd=Q(function(t,e){var r=fd();e.exports=(n,a={})=>{const c=Object.keys(r);let s=c;if(a.formats){if(!Array.isArray(a.formats))throw new Error("options.formats must be an array");s=a.formats}return c.filter(u=>s.includes(u)).forEach(u=>{n.addFormat(u,r[u])}),n}}),hd=Q(function(t,e){var r=Object.prototype.hasOwnProperty,n="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(n=!1));function c(y,f,w){this.fn=y,this.context=f,this.once=w||!1}function s(y,f,w,$,E){if(typeof w!="function")throw new TypeError("The listener must be a function");var b=new c(w,$||y,E),S=n?n+f:f;return y._events[S]?y._events[S].fn?y._events[S]=[y._events[S],b]:y._events[S].push(b):(y._events[S]=b,y._eventsCount++),y}function u(y,f){--y._eventsCount===0?y._events=new a:delete y._events[f]}function o(){this._events=new a,this._eventsCount=0}o.prototype.eventNames=function(){var f=[],w,$;if(this._eventsCount===0)return f;for($ in w=this._events)r.call(w,$)&&f.push(n?$.slice(1):$);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(w)):f},o.prototype.listeners=function(f){var w=n?n+f:f,$=this._events[w];if(!$)return[];if($.fn)return[$.fn];for(var E=0,b=$.length,S=new Array(b);E<b;E++)S[E]=$[E].fn;return S},o.prototype.listenerCount=function(f){var w=n?n+f:f,$=this._events[w];return $?$.fn?1:$.length:0},o.prototype.emit=function(f,w,$,E,b,S){var h=n?n+f:f;if(!this._events[h])return!1;var i=this._events[h],d=arguments.length,l,_;if(i.fn){switch(i.once&&this.removeListener(f,i.fn,void 0,!0),d){case 1:return i.fn.call(i.context),!0;case 2:return i.fn.call(i.context,w),!0;case 3:return i.fn.call(i.context,w,$),!0;case 4:return i.fn.call(i.context,w,$,E),!0;case 5:return i.fn.call(i.context,w,$,E,b),!0;case 6:return i.fn.call(i.context,w,$,E,b,S),!0}for(_=1,l=new Array(d-1);_<d;_++)l[_-1]=arguments[_];i.fn.apply(i.context,l)}else{var m=i.length,g;for(_=0;_<m;_++)switch(i[_].once&&this.removeListener(f,i[_].fn,void 0,!0),d){case 1:i[_].fn.call(i[_].context);break;case 2:i[_].fn.call(i[_].context,w);break;case 3:i[_].fn.call(i[_].context,w,$);break;case 4:i[_].fn.call(i[_].context,w,$,E);break;default:if(!l)for(g=1,l=new Array(d-1);g<d;g++)l[g-1]=arguments[g];i[_].fn.apply(i[_].context,l)}}return!0},o.prototype.on=function(f,w,$){return s(this,f,w,$,!1)},o.prototype.once=function(f,w,$){return s(this,f,w,$,!0)},o.prototype.removeListener=function(f,w,$,E){var b=n?n+f:f;if(!this._events[b])return this;if(!w)return u(this,b),this;var S=this._events[b];if(S.fn)S.fn===w&&(!E||S.once)&&(!$||S.context===$)&&u(this,b);else{for(var h=0,i=[],d=S.length;h<d;h++)(S[h].fn!==w||E&&!S[h].once||$&&S[h].context!==$)&&i.push(S[h]);i.length?this._events[b]=i.length===1?i[0]:i:u(this,b)}return this},o.prototype.removeAllListeners=function(f){var w;return f?(w=n?n+f:f,this._events[w]&&u(this,w)):(this._events=new a,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,typeof e<"u"&&(e.exports=o)}),pd="https://www.w3.org/ns/activitystreams",md="https://sockethub.org/ns/context/v1.jsonld",gd="error",yd="https://sockethub.org/ns/context/platform/error/v1.jsonld",vd="sockethub:internal",_d="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",_a=new Map,Yo=new Map,Zo=new Map;function wd(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function $d(t){return wd(t["@context"])}function ec(t,e,r,n){_a.set(e,t),Yo.set(e,r),Zo.set(e,n)}function fs(t){const r=$d(t).filter(n=>_a.has(n));return r.length!==1?null:r[0]}function tc(t){return _a.get(t)}function bd(t){return Yo.get(t)}function Ed(t){return Zo.get(t)}var Sd=Fr(Uo());new Sd.default({strictTypes:!1,allErrors:!0});var rc={feed:{required:["id","type"],additionalProperties:!0,properties:{type:{enum:["feed"]},id:{type:"string",format:"iri"},name:{type:"string"},description:{type:"string"},author:{type:"string"},favicon:{type:"string"}}},person:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["person"]},name:{type:"string"}}},room:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["room"]},name:{type:"string"}}},service:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["service"]},name:{type:"string"}}},platform:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["platform"]},name:{type:"string"}}},website:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["website"]},name:{type:"string"}}},address:{required:["type"],additionalProperties:!1,properties:{type:{enum:["address"]}}},calendar:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["calendar"]},name:{type:"string"},components:{type:"array",items:{enum:["event","task"]}}}},addressBook:{required:["id","type"],additionalProperties:!1,properties:{id:{type:"string",format:"iri"},type:{enum:["addressBook"]}}}},Pd=Object.keys(rc),nc=["person","room","service","feed","website","platform"],sc=["person","room","service","feed","website","platform","address","calendar","addressBook"],kd=nc.map(t=>({$ref:`#/definitions/type/${t}`})),Od=sc.map(t=>({$ref:`#/definitions/type/${t}`})),Nd={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:pd}},{contains:{const:md}}]},Rd={type:"string"},Td={$id:"https://sockethub.org/schemas/v/activity-stream.json",description:"Schema for Sockethub Activity Streams",type:"object",required:["@context","type","actor"],additionalProperties:!1,properties:{"@context":Nd,id:{type:"string"},type:Rd,actor:{type:"object",oneOf:kd},target:{type:"object",oneOf:Od},object:{type:"object"},published:{type:"string",format:"date-time"}},definitions:{type:rc}},Id={version:"3.0.0-alpha.21"};function Cd(t,e){return t.replace("/v/",`/${e}/`)}var Ad={$id:"https://sockethub.org/schemas/v/sockethub-config.json"};Cd(Ad.$id,Id.version);var jd=Fr(Uo()),Md=Fr(Bf()),Dd=Fr(dd());function qd(t){let e=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return t.keyword==="additionalProperties"?e+=`: ${t.params.additionalProperty}`:t.keyword==="enum"&&(e+=`: ${t.params.allowedValues.join(", ")}`),e}function jr(t){const e=[];t!=null&&t.type&&e.push(t.type);const r=t;for(const n in r){const a=r[n];a&&typeof a=="object"&&"type"in a&&e.push(...jr(a))}return e}function Vd(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function Ld(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function Ud(t,e){const r=Vd(t),n=Ld(t);if(!n)return-1;const a=e[n];return!a||!r||!a.includes(r)?-1:t.instancePath.split("/").length}function zd(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:jr(t)};const e=t;return{actor:jr(e.actor),target:jr(e.target),object:e.object?jr(e.object):[]}}function Fd(t,e,r){const n=zd(t);let a=0,c=-1;for(let s=0;s<e.length;s++){const u=Ud(e[s],n);u>c&&(c=u,a=s)}return c>=0?qd(e[a]):Hd(e[e.length-1],r)}function Kd(t,e){if(!(e!=null&&e.excludeTypes)||e.excludeTypes.length===0)return t;const r=new Set(e.excludeTypes);return t.filter(n=>!r.has(n))}function Hd(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],a=n==="actor"?nc:n==="target"?sc:Pd,c=Kd(a,e),s=c.length>0?c:a;r=`${t.instancePath}: ${t.message}: ${s.join(", ")}`}else r=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return"additionalProperty"in t.params&&(r+=`: ${t.params.additionalProperty}`),r}var Ht=new jd.default({strictTypes:!1,allErrors:!0});Md.default(Ht);Dd.default(Ht);var Bt="https://sockethub.org/schemas/v0",Xs={},Bd={},Ba=!1;Xs[`${Bt}/activity-stream`]=Td;for(const t in Xs)Ht.addSchema(Xs[t],t);function Ga(t,e){ec(t,e,`${Bt}/context/${t}/messages`,`${Bt}/context/${t}/credentials`);const r=`${Bt}/context/${t}/messages`;Ht.getSchema(r)||Ht.addSchema({},r);const n=`${Bt}/context/${t}/credentials`;Ht.getSchema(n)||Ht.addSchema({},n)}function Gd(){Ba||(Ga(gd,yd),Ga(vd,_d),Ba=!0)}Gd();function es(t,e){const r=Ht.getSchema(t);if(!r)return`schema ${t} not found`;if(!r(e)){let a=Fd(e,r.errors,Bd);if(Array.isArray(e["@context"])){const c=fs(e);if(c){const s=tc(c);s&&(a=`[${s}] ${a}`)}}return a}return""}function xd(t){const e=es(`${Bt}/activity-stream`,t);if(e)return e;const r=fs(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=bd(r);return n?es(n,t):`platform context URL ${r} does not have a registered message schema`}function Wd(t){if(!Array.isArray(t["@context"]))return"credential activity streams must have an @context set";if(t.type!=="credentials")return"credential activity streams must have credentials set as type";const e=es(`${Bt}/activity-stream`,t);if(e)return e;const r=fs(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=Ed(r);return n?es(n,t):`platform context URL ${r} does not have a registered credentials schema`}function xa(t,e){const r=`${Bt}/context/${e}`;Ht.getSchema(r)||Ht.addSchema(t,r)}function Jd(t,e){ec(t,e,`${Bt}/context/${t}/messages`,`${Bt}/context/${t}/credentials`)}function Qd(t){const e=fs(t);return e?tc(e)??null:null}var Wa={actor:"id",target:"id",object:"content"};function Xd(t,e){return typeof t=="string"?{[e]:t}:Array.isArray(t)?t.map(r=>typeof r=="string"?{id:r}:r):t}function Cs(t){const e={...t};for(const r of Object.keys(Wa))r in e&&(e[r]=Xd(e[r],Wa[r]));return e}var Yd=Fr(hd()),Zd=Yd.default;class Ur{constructor(e,r={}){ct(this,"events",{credentials:new Map,connect:new Map,join:new Map});ct(this,"_socket");ct(this,"socket");ct(this,"debug",!0);ct(this,"options");ct(this,"platformRegistry",new Map);ct(this,"asContextUrl");ct(this,"sockethubContextUrl");ct(this,"sockethubVersion");ct(this,"initState","idle");ct(this,"hasReadyOnce",!1);ct(this,"initCycle");ct(this,"initTokenCounter",0);ct(this,"initTimeoutTimer");ct(this,"waitingWarningTimer");ct(this,"waitingWarningIntervalMs",1e4);ct(this,"readyWaiters",[]);ct(this,"outboundQueue",[]);ct(this,"outboundSequence",0);ct(this,"registryFingerprint");ct(this,"latestReadyInfo");if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.options={initTimeoutMs:r.initTimeoutMs??5e3,maxQueuedOutbound:r.maxQueuedOutbound??1e3,maxQueuedAgeMs:r.maxQueuedAgeMs??3e4},this.socket=this.createPublicEmitter(),this.registerSocketIOHandlers(),this._socket.connected&&(this.socket.connected=!0,this.socket.id=this._socket.id,this.socket._emit("connect"),this.startInitialization("initial-connect",!0))}clearCredentials(){this.events.credentials.clear()}getRegisteredPlatforms(){return Array.from(this.platformRegistry.values()).map(e=>({...e,types:[...e.types],schemas:{...e.schemas}}))}isSchemasReady(){return this.isReady()}isReady(){return this.initState==="ready"}getInitState(){return this.initState}getRegisteredBaseContexts(){if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");return{as:this.asContextUrl,sockethub:this.sockethubContextUrl}}getPlatformSchema(e,r="messages"){var a,c;const n=e==null?void 0:e.trim();if(n)return(c=(a=this.platformRegistry.get(n))==null?void 0:a.schemas)==null?void 0:c[r]}async waitForSchemas(e=2e3){return await this.ready(e),this.buildPlatformRegistryPayload()}ready(e=this.options.initTimeoutMs){return this.isReady()&&this.latestReadyInfo?Promise.resolve(this.latestReadyInfo):new Promise((r,n)=>{const a={resolve:r,reject:n};e>0&&(a.timer=setTimeout(()=>{this.readyWaiters=this.readyWaiters.filter(c=>c!==a),n(new Error(`SockethubClient ready() timed out after ${e}ms`))},e)),this.readyWaiters.push(a),this.socket.connected&&this.initState==="idle"&&this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)})}validateActivity(e){return e.type==="credentials"?Wd(e):xd(e)}contextFor(e){if(typeof e!="string"||e.trim().length===0)throw new Error("SockethubClient.contextFor(platform) requires a non-empty platform string");if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");const r=e.trim(),n=this.platformRegistry.get(r);if(!n){const a=Array.from(this.platformRegistry.keys()).sort();throw new Error(`unknown platform '${r}'. Registered platforms: ${a.join(", ")}`)}return[this.asContextUrl,this.sockethubContextUrl,n.contextUrl]}createPublicEmitter(){const e=new Zd;return e._emit=e.emit,e.emit=(r,n,a)=>{this.handlePublicEmit(r,n,a)},e.connected=!1,e.disconnect=()=>{this._socket.disconnect()},e.connect=()=>{this._socket.connect()},e}requestSchemaRegistry(){"io"in this._socket&&this._socket.emit("schemas",this.registryFingerprint,r=>{this.handleSchemasPayload(r)})}applyPlatformRegistry(e){var s,u,o,y;if(!e||typeof e!="object")return;const r=e,n=(s=r.contexts)==null?void 0:s.as,a=(u=r.contexts)==null?void 0:u.sockethub;if(typeof n!="string"||typeof a!="string"||!Array.isArray(r.platforms))return;this.sockethubVersion=typeof r.version=="string"?r.version:"unknown",this.asContextUrl=n,this.sockethubContextUrl=a,this.platformRegistry.clear();for(const f of r.platforms)if(!(!f||typeof f!="object"||typeof f.id!="string"||typeof f.version!="string"||typeof f.contextUrl!="string")){this.platformRegistry.set(f.id,{...f,version:f.version,types:Array.isArray(f.types)?f.types:[],schemas:f.schemas||{}}),Jd(f.id,f.contextUrl);try{const w=(o=f.schemas)==null?void 0:o.credentials;w&&typeof w=="object"&&!Array.isArray(w)&&xa(w,`${f.id}/credentials`);const $=(y=f.schemas)==null?void 0:y.messages;$&&typeof $=="object"&&!Array.isArray($)&&xa($,`${f.id}/messages`)}catch(w){const $=w instanceof Error?w.message:String(w);console.warn(`[SockethubClient] Failed to register schemas for platform ${f.id}: ${$}`)}}const c=this.buildPlatformRegistryPayload();return this.registryFingerprint=typeof r.fingerprint=="string"?r.fingerprint:void 0,this.socket._emit("schemas",c),c}eventCredentials(e){e.object&&e.object.type==="credentials"&&this.events.credentials.set(Ur.getKey(e),e)}eventMessage(e){if(!this._socket.connected)return;const r=Ur.getKey(e);e.type==="join"||e.type==="connect"?this.events[e.type].set(r,e):e.type==="leave"?this.events.join.delete(r):e.type==="disconnect"&&this.events.connect.delete(r)}static getKey(e){var c;const r=((c=e.actor)==null?void 0:c.id)||e.actor;if(!r)throw new Error(`actor property not present for message type: ${e==null?void 0:e.type}`);const n=e.target?e.target.id||e.target:"";return`${Qd(e)??""}:${r}-${n}`}buildPlatformRegistryPayload(){return{version:this.sockethubVersion,contexts:this.asContextUrl&&this.sockethubContextUrl?{as:this.asContextUrl,sockethub:this.sockethubContextUrl}:void 0,platforms:this.getRegisteredPlatforms()}}buildReadyInfo(e){if(!(!this.sockethubVersion||!this.asContextUrl||!this.sockethubContextUrl))return{state:"ready",reason:e,sockethubVersion:this.sockethubVersion,contexts:{as:this.asContextUrl,sockethub:this.sockethubContextUrl},platforms:this.getRegisteredPlatforms().map(r=>({id:r.id,version:r.version,contextUrl:r.contextUrl,contextVersion:r.contextVersion,schemaVersion:r.schemaVersion,types:[...r.types]}))}}resolveReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.resolve(e)}rejectReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.reject(e)}emitInitError(e,r,n){this.socket._emit("init_error",{error:e,phase:r,retrying:n})}emitClientError(e,r,n){if(typeof r=="function"){r({error:n});return}this.socket._emit("client_error",{event:e,error:n})}clearInitTimers(){this.initTimeoutTimer&&(clearTimeout(this.initTimeoutTimer),this.initTimeoutTimer=void 0),this.waitingWarningTimer&&(clearInterval(this.waitingWarningTimer),this.waitingWarningTimer=void 0)}startWaitingWarnings(){this.waitingWarningTimer||(this.waitingWarningTimer=setInterval(()=>{if(this.isReady()||this.initState==="closed"){this.clearInitTimers();return}const e=this.outboundQueue.length,r=this.outboundQueue[0],n=r?((Date.now()-r.enqueuedAt)/1e3).toFixed(1):"0.0";console.warn(`[SockethubClient] Still waiting for schemas; queued outbound messages: ${e}; oldest queued age: ${n}s.`)},this.waitingWarningIntervalMs))}startInitialization(e,r){if(!this.socket.connected||this.initState==="closed")return;const n=++this.initTokenCounter;this.initCycle={token:n,reason:e,startedAt:Date.now(),replayOnReady:r,timedOut:!1},this.initState="initializing",this.clearInitTimers(),this.initTimeoutTimer=setTimeout(()=>{if(!this.initCycle||this.initCycle.token!==n)return;this.initCycle.timedOut=!0,this.initState="init_error";const a=`Initialization timed out after ${this.options.initTimeoutMs}ms waiting for schemas`;console.warn(`[SockethubClient] ${a}; queued outbound messages: ${this.outboundQueue.length}. Waiting for schemas event from server.`),this.emitInitError(a,"timeout",!1),this.startWaitingWarnings()},this.options.initTimeoutMs);try{this.requestSchemaRegistry()}catch(a){this.initState="init_error";const c=a instanceof Error?a.message:String(a);this.emitInitError(c,"schemas-request",!1),this.startWaitingWarnings()}}markReady(e){const r=this.initCycle,n=!!(r!=null&&r.replayOnReady);this.initCycle=void 0,this.clearInitTimers(),this.initState="ready",this.hasReadyOnce=!0;const a=this.buildReadyInfo(e);if(!a){const c=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(c.message,"schemas-apply",!0),this.rejectReadyWaiters(c);return}this.socket._emit("ready",a),this.latestReadyInfo=a,this.resolveReadyWaiters(a),n&&(this.replay("credentials",this.events.credentials),this.replay("message",this.events.connect),this.replay("message",this.events.join)),this.flushOutboundQueue()}handleSchemasPayload(e){if(!e||typeof e!="object")return;if(e.unchanged===!0&&typeof this.registryFingerprint=="string"&&this.platformRegistry.size>0){this.initCycle?this.markReady(this.initCycle.reason):this.initState!=="ready"&&this.markReady("schemas-update");return}const r=e.fingerprint;if(this.initState==="ready"&&!this.initCycle&&r&&r===this.registryFingerprint)return;if(this.initState==="ready"&&!this.initCycle&&(this.initState="initializing"),!this.applyPlatformRegistry(e)){this.initState="init_error",this.emitInitError("Received invalid schemas payload from server","schemas-apply",!0),this.startWaitingWarnings();return}if(this.initCycle){this.markReady(this.initCycle.reason);return}this.markReady("schemas-update")}handlePublicEmit(e,r,n){const a={event:e,content:r,callback:n,enqueuedAt:Date.now(),sequence:this.outboundSequence++};if(!this.isReady()){this.enqueueOutbound(a);return}this.sendOutbound(a)}enqueueOutbound(e){if(this.outboundQueue.push(e),this.outboundQueue.length<=this.options.maxQueuedOutbound)return;const r=this.outboundQueue.shift();r&&this.emitClientError(r.event,r.callback,"SockethubClient queue overflow before ready")}flushOutboundQueue(){if(!this.isReady()||this.outboundQueue.length===0)return;const e=Date.now(),r=this.outboundQueue.sort((n,a)=>n.sequence-a.sequence);this.outboundQueue=[];for(const n of r){if(e-n.enqueuedAt>this.options.maxQueuedAgeMs){this.emitClientError(n.event,n.callback,`SockethubClient queued message expired after ${this.options.maxQueuedAgeMs}ms before initialization`);continue}this.sendOutbound(n)}}sendOutbound(e){let r=e.content;try{if(e.event==="credentials"||e.event==="message"){if(r=Cs(e.content),r&&typeof r=="object"){const n=r;e.event==="credentials"&&!n.type&&(n.type="credentials"),n.actor&&typeof n.actor=="object"&&!n.actor.type&&(n.actor.type="person")}if(this.platformRegistry.size>0){const n=this.validateActivity(r);if(n){this.emitClientError(e.event,e.callback,`SockethubClient validation failed: ${n}`);return}}}e.event==="credentials"?this.eventCredentials(r):e.event==="message"&&this.eventMessage(r),this._socket.emit(e.event,r,e.callback)}catch(n){const a=n instanceof Error?n.message:String(n);this.emitClientError(e.event,e.callback,a)}}log(e,r){this.debug&&console.log(e,r)}registerSocketIOHandlers(){this._socket.on("connect",()=>{this.socket.id=this._socket.id,this.socket.connected=!0,this.socket._emit("connect"),this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)}),this._socket.on("connect_error",e=>{this.socket._emit("connect_error",e)}),this._socket.on("disconnect",e=>{this.socket.connected=!1,this.initState!=="closed"&&(this.initState="idle"),this.clearInitTimers(),this.socket._emit("disconnect",e)}),this._socket.on("schemas",e=>{this.handleSchemasPayload(e)}),this._socket.on("message",e=>{this.socket._emit("message",Cs(e))})}hasActorId(e){return"actor"in e&&e.actor!==null&&typeof e.actor=="object"&&"id"in e.actor&&typeof e.actor.id=="string"}replay(e,r){for(const n of r.values()){const a=Cs(n);let c=a==null?void 0:a.id;if(this.hasActorId(a)){const s=a.actor;c=typeof s=="string"?s:s.id}this.log(`replaying ${e} for ${c}`),this._socket.emit(e,a)}}}(t=>{t.SockethubClient=Ur})(typeof globalThis=="object"?globalThis:{});const xt=Object.create(null);xt.open="0";xt.close="1";xt.ping="2";xt.pong="3";xt.message="4";xt.upgrade="5";xt.noop="6";const zn=Object.create(null);Object.keys(xt).forEach(t=>{zn[xt[t]]=t});const Ys={type:"error",data:"parser error"},ac=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ic=typeof ArrayBuffer=="function",oc=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,wa=({type:t,data:e},r,n)=>ac&&e instanceof Blob?r?n(e):Ja(e,n):ic&&(e instanceof ArrayBuffer||oc(e))?r?n(e):Ja(new Blob([e]),n):n(xt[t]+(e||"")),Ja=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function Qa(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let As;function eh(t,e){if(ac&&t.data instanceof Blob)return t.data.arrayBuffer().then(Qa).then(e);if(ic&&(t.data instanceof ArrayBuffer||oc(t.data)))return e(Qa(t.data));wa(t,!1,r=>{As||(As=new TextEncoder),e(As.encode(r))})}const Xa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Xa.length;t++)Mr[Xa.charCodeAt(t)]=t;const th=t=>{let e=t.length*.75,r=t.length,n,a=0,c,s,u,o;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const y=new ArrayBuffer(e),f=new Uint8Array(y);for(n=0;n<r;n+=4)c=Mr[t.charCodeAt(n)],s=Mr[t.charCodeAt(n+1)],u=Mr[t.charCodeAt(n+2)],o=Mr[t.charCodeAt(n+3)],f[a++]=c<<2|s>>4,f[a++]=(s&15)<<4|u>>2,f[a++]=(u&3)<<6|o&63;return y},rh=typeof ArrayBuffer=="function",$a=(t,e)=>{if(typeof t!="string")return{type:"message",data:cc(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:nh(t.substring(1),e)}:zn[r]?t.length>1?{type:zn[r],data:t.substring(1)}:{type:zn[r]}:Ys},nh=(t,e)=>{if(rh){const r=th(t);return cc(r,e)}else return{base64:!0,data:t}},cc=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},uc="",sh=(t,e)=>{const r=t.length,n=new Array(r);let a=0;t.forEach((c,s)=>{wa(c,!1,u=>{n[s]=u,++a===r&&e(n.join(uc))})})},ah=(t,e)=>{const r=t.split(uc),n=[];for(let a=0;a<r.length;a++){const c=$a(r[a],e);if(n.push(c),c.type==="error")break}return n};function ih(){return new TransformStream({transform(t,e){eh(t,r=>{const n=r.length;let a;if(n<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,n);else if(n<65536){a=new Uint8Array(3);const c=new DataView(a.buffer);c.setUint8(0,126),c.setUint16(1,n)}else{a=new Uint8Array(9);const c=new DataView(a.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(a[0]|=128),e.enqueue(a),e.enqueue(r)})}})}let js;function Yr(t){return t.reduce((e,r)=>e+r.length,0)}function Zr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let a=0;a<e;a++)r[a]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function oh(t,e){js||(js=new TextDecoder);const r=[];let n=0,a=-1,c=!1;return new TransformStream({transform(s,u){for(r.push(s);;){if(n===0){if(Yr(r)<1)break;const o=Zr(r,1);c=(o[0]&128)===128,a=o[0]&127,a<126?n=3:a===126?n=1:n=2}else if(n===1){if(Yr(r)<2)break;const o=Zr(r,2);a=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),n=3}else if(n===2){if(Yr(r)<8)break;const o=Zr(r,8),y=new DataView(o.buffer,o.byteOffset,o.length),f=y.getUint32(0);if(f>Math.pow(2,21)-1){u.enqueue(Ys);break}a=f*Math.pow(2,32)+y.getUint32(4),n=3}else{if(Yr(r)<a)break;const o=Zr(r,a);u.enqueue($a(c?o:js.decode(o),e)),n=0}if(a===0||a>t){u.enqueue(Ys);break}}}})}const lc=4;function ht(t){if(t)return ch(t)}function ch(t){for(var e in ht.prototype)t[e]=ht.prototype[e];return t}ht.prototype.on=ht.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ht.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ht.prototype.off=ht.prototype.removeListener=ht.prototype.removeAllListeners=ht.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,a=0;a<r.length;a++)if(n=r[a],n===e||n.fn===e){r.splice(a,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ht.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,a=r.length;n<a;++n)r[n].apply(this,e)}return this};ht.prototype.emitReserved=ht.prototype.emit;ht.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ht.prototype.hasListeners=function(t){return!!this.listeners(t).length};const ds=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),jt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),uh="arraybuffer";function fc(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const lh=jt.setTimeout,fh=jt.clearTimeout;function hs(t,e){e.useNativeTimers?(t.setTimeoutFn=lh.bind(jt),t.clearTimeoutFn=fh.bind(jt)):(t.setTimeoutFn=jt.setTimeout.bind(jt),t.clearTimeoutFn=jt.clearTimeout.bind(jt))}const dh=1.33;function hh(t){return typeof t=="string"?ph(t):Math.ceil((t.byteLength||t.size)*dh)}function ph(t){let e=0,r=0;for(let n=0,a=t.length;n<a;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function dc(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function mh(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function gh(t){let e={},r=t.split("&");for(let n=0,a=r.length;n<a;n++){let c=r[n].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return e}class yh extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class ba extends ht{constructor(e){super(),this.writable=!1,hs(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new yh(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=$a(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=mh(e);return r.length?"?"+r:""}}class vh extends ba{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};ah(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,sh(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=dc()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let hc=!1;try{hc=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const _h=hc;function wh(){}class $h extends vh{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(a,c)=>{this.onError("xhr post error",a,c)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class Gt extends ht{constructor(e,r,n){super(),this.createRequest=e,hs(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=fc(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&n.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var a;n.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=Gt.requestsCount++,Gt.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=wh,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Gt.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Gt.requestsCount=0;Gt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ya);else if(typeof addEventListener=="function"){const t="onpagehide"in jt?"pagehide":"unload";addEventListener(t,Ya,!1)}}function Ya(){for(let t in Gt.requests)Gt.requests.hasOwnProperty(t)&&Gt.requests[t].abort()}const bh=function(){const t=pc({xdomain:!1});return t&&t.responseType!==null}();class Eh extends $h{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=bh&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Gt(pc,this.uri(),e)}}function pc(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||_h))return new XMLHttpRequest}catch{}if(!e)try{return new jt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const mc=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Sh extends ba{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=mc?{}:fc(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;wa(n,this.supportsBinary,c=>{try{this.doWrite(n,c)}catch{}a&&ds(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=dc()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const Ms=jt.WebSocket||jt.MozWebSocket;class Ph extends Sh{createSocket(e,r,n){return mc?new Ms(e,r,n):r?new Ms(e,r):new Ms(e)}doWrite(e,r){this.ws.send(r)}}class kh extends ba{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=oh(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),a=ih();a.readable.pipeTo(e.writable),this._writer=a.writable.getWriter();const c=()=>{n.read().then(({done:u,value:o})=>{u||(this.onPacket(o),c())}).catch(u=>{})};c();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],a=r===e.length-1;this._writer.write(n).then(()=>{a&&ds(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Oh={websocket:Ph,webtransport:kh,polling:Eh},Nh=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Rh=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Zs(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let a=Nh.exec(t||""),c={},s=14;for(;s--;)c[Rh[s]]=a[s]||"";return r!=-1&&n!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=Th(c,c.path),c.queryKey=Ih(c,c.query),c}function Th(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Ih(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,a,c){a&&(r[a]=c)}),r}const ea=typeof addEventListener=="function"&&typeof removeEventListener=="function",Fn=[];ea&&addEventListener("offline",()=>{Fn.forEach(t=>t())},!1);class cr extends ht{constructor(e,r){if(super(),this.binaryType=uh,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=Zs(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Zs(r.host).host);hs(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const a=n.prototype.name;this.transports.push(a),this._transportsByName[a]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=gh(this.opts.query)),ea&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Fn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=lc,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&cr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",cr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const a=this.writeBuffer[n].data;if(a&&(r+=hh(a)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,ds(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,a){if(typeof r=="function"&&(a=r,r=void 0),typeof n=="function"&&(a=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const c={type:e,data:r,options:n};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),a&&this.once("flush",a),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(cr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ea&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Fn.indexOf(this._offlineEventListener);n!==-1&&Fn.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}cr.protocol=lc;class Ch extends cr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;cr.priorWebsocketSuccess=!1;const a=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",w=>{if(!n)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;cr.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const $=new Error("probe error");$.transport=r.name,this.emitReserved("upgradeError",$)}}))};function c(){n||(n=!0,f(),r.close(),r=null)}const s=w=>{const $=new Error("probe error: "+w);$.transport=r.name,c(),this.emitReserved("upgradeError",$)};function u(){s("transport closed")}function o(){s("socket closed")}function y(w){r&&w.name!==r.name&&c()}const f=()=>{r.removeListener("open",a),r.removeListener("error",s),r.removeListener("close",u),this.off("close",o),this.off("upgrading",y)};r.once("open",a),r.once("error",s),r.once("close",u),this.once("close",o),this.once("upgrading",y),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let Ah=class extends Ch{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(a=>Oh[a]).filter(a=>!!a)),super(e,n)}};function jh(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Zs(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const c=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port+e,n.href=n.protocol+"://"+c+(r&&r.port===n.port?"":":"+n.port),n}const Mh=typeof ArrayBuffer=="function",Dh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,gc=Object.prototype.toString,qh=typeof Blob=="function"||typeof Blob<"u"&&gc.call(Blob)==="[object BlobConstructor]",Vh=typeof File=="function"||typeof File<"u"&&gc.call(File)==="[object FileConstructor]";function Ea(t){return Mh&&(t instanceof ArrayBuffer||Dh(t))||qh&&t instanceof Blob||Vh&&t instanceof File}function Kn(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Kn(t[r]))return!0;return!1}if(Ea(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Kn(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Kn(t[r]))return!0;return!1}function Lh(t){const e=[],r=t.data,n=t;return n.data=ta(r,e),n.attachments=e.length,{packet:n,buffers:e}}function ta(t,e){if(!t)return t;if(Ea(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=ta(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=ta(t[n],e));return r}return t}function Uh(t,e){return t.data=ra(t.data,e),delete t.attachments,t}function ra(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=ra(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=ra(t[r],e));return t}const zh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Fh=5;var Ue;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ue||(Ue={}));class Kh{constructor(e){this.replacer=e}encode(e){return(e.type===Ue.EVENT||e.type===Ue.ACK)&&Kn(e)?this.encodeAsBinary({type:e.type===Ue.EVENT?Ue.BINARY_EVENT:Ue.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===Ue.BINARY_EVENT||e.type===Ue.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=Lh(e),n=this.encodeAsString(r.packet),a=r.buffers;return a.unshift(n),a}}function Za(t){return Object.prototype.toString.call(t)==="[object Object]"}class Sa extends ht{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===Ue.BINARY_EVENT;n||r.type===Ue.BINARY_ACK?(r.type=n?Ue.EVENT:Ue.ACK,this.reconstructor=new Hh(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ea(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(Ue[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Ue.BINARY_EVENT||n.type===Ue.BINARY_ACK){const c=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const s=e.substring(c,r);if(s!=Number(s)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(e.charAt(r+1)==="/"){const c=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(c,r)}else n.nsp="/";const a=e.charAt(r+1);if(a!==""&&Number(a)==a){const c=r+1;for(;++r;){const s=e.charAt(r);if(s==null||Number(s)!=s){--r;break}if(r===e.length)break}n.id=Number(e.substring(c,r+1))}if(e.charAt(++r)){const c=this.tryParse(e.substr(r));if(Sa.isPayloadValid(n.type,c))n.data=c;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case Ue.CONNECT:return Za(r);case Ue.DISCONNECT:return r===void 0;case Ue.CONNECT_ERROR:return typeof r=="string"||Za(r);case Ue.EVENT:case Ue.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&zh.indexOf(r[0])===-1);case Ue.ACK:case Ue.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Hh{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=Uh(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Bh=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sa,Encoder:Kh,get PacketType(){return Ue},protocol:Fh},Symbol.toStringTag,{value:"Module"}));function Vt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Gh=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class yc extends ht{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Vt(e,"open",this.onopen.bind(this)),Vt(e,"packet",this.onpacket.bind(this)),Vt(e,"error",this.onerror.bind(this)),Vt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,a,c;if(Gh.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const s={type:Ue.EVENT,data:r};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const f=this.ids++,w=r.pop();this._registerAckCallback(f,w),s.id=f}const u=(a=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||a===void 0?void 0:a.writable,o=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!u||(o?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,r){var n;const a=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(a===void 0){this.acks[e]=r;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let u=0;u<this.sendBuffer.length;u++)this.sendBuffer[u].id===e&&this.sendBuffer.splice(u,1);r.call(this,new Error("operation has timed out"))},a),s=(...u)=>{this.io.clearTimeoutFn(c),r.apply(this,u)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...r){return new Promise((n,a)=>{const c=(s,u)=>s?a(s):n(u);c.withError=!0,r.push(c),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((a,...c)=>(this._queue[0],a!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(a)):(this._queue.shift(),r&&r(null,...c)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Ue.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Ue.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ue.EVENT:case Ue.BINARY_EVENT:this.onevent(e);break;case Ue.ACK:case Ue.BINARY_ACK:this.onack(e);break;case Ue.DISCONNECT:this.ondisconnect();break;case Ue.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...a){n||(n=!0,r.packet({type:Ue.ACK,id:e,data:a}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ue.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function Sr(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Sr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};Sr.prototype.reset=function(){this.attempts=0};Sr.prototype.setMin=function(t){this.ms=t};Sr.prototype.setMax=function(t){this.max=t};Sr.prototype.setJitter=function(t){this.jitter=t};class na extends ht{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,hs(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Sr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const a=r.parser||Bh;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Ah(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const a=Vt(r,"open",function(){n.onopen(),e&&e()}),c=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),e?e(u):this.maybeReconnectOnOpen()},s=Vt(r,"error",c);if(this._timeout!==!1){const u=this._timeout,o=this.setTimeoutFn(()=>{a(),c(new Error("timeout")),r.close()},u);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(a),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Vt(e,"ping",this.onping.bind(this)),Vt(e,"data",this.ondata.bind(this)),Vt(e,"error",this.onerror.bind(this)),Vt(e,"close",this.onclose.bind(this)),Vt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){ds(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new yc(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(a=>{a?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",a)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Rr={};function Hn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=jh(t,e.path||"/socket.io"),n=r.source,a=r.id,c=r.path,s=Rr[a]&&c in Rr[a].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let o;return u?o=new na(n,e):(Rr[a]||(Rr[a]=new na(n,e)),o=Rr[a]),r.query&&!e.query&&(e.query=r.queryKey),o.socket(r.path,e)}Object.assign(Hn,{Manager:na,Socket:yc,io:Hn,connect:Hn});var en={exports:{}},Ds={},Xt={},mr={},qs={},Vs={},Ls={},ei;function ts(){return ei||(ei=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(d){if(super(),!t.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");this.str=d}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(d){super(),this._items=typeof d=="string"?[d]:d}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const d=this._items[0];return d===""||d==='""'}get str(){var d;return(d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce((l,_)=>`${l}${_}`,"")}get names(){var d;return(d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce((l,_)=>(_ instanceof r&&(l[_.str]=(l[_.str]||0)+1),l),{})}}t._Code=n,t.nil=new n("");function a(i,...d){const l=[i[0]];let _=0;for(;_<d.length;)u(l,d[_]),l.push(i[++_]);return new n(l)}t._=a;const c=new n("+");function s(i,...d){const l=[E(i[0])];let _=0;for(;_<d.length;)l.push(c),u(l,d[_]),l.push(c,E(i[++_]));return o(l),new n(l)}t.str=s;function u(i,d){d instanceof n?i.push(...d._items):d instanceof r?i.push(d):i.push(w(d))}t.addCodeArg=u;function o(i){let d=1;for(;d<i.length-1;){if(i[d]===c){const l=y(i[d-1],i[d+1]);if(l!==void 0){i.splice(d-1,3,l);continue}i[d++]="+"}d++}}function y(i,d){if(d==='""')return i;if(i==='""')return d;if(typeof i=="string")return d instanceof r||i[i.length-1]!=='"'?void 0:typeof d!="string"?`${i.slice(0,-1)}${d}"`:d[0]==='"'?i.slice(0,-1)+d.slice(1):void 0;if(typeof d=="string"&&d[0]==='"'&&!(i instanceof r))return`"${i}${d.slice(1)}`}function f(i,d){return d.emptyStr()?i:i.emptyStr()?d:s`${i}${d}`}t.strConcat=f;function w(i){return typeof i=="number"||typeof i=="boolean"||i===null?i:E(Array.isArray(i)?i.join(","):i)}function $(i){return new n(E(i))}t.stringify=$;function E(i){return JSON.stringify(i).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function b(i){return typeof i=="string"&&t.IDENTIFIER.test(i)?new n(`.${i}`):a`[${i}]`}t.getProperty=b;function S(i){if(typeof i=="string"&&t.IDENTIFIER.test(i))return new n(`${i}`);throw new Error(`CodeGen: invalid export name: ${i}, use explicit $id name mapping`)}t.getEsmExportName=S;function h(i){return new n(i.toString())}t.regexpCode=h}(Ls)),Ls}var Us={},ti;function ri(){return ti||(ti=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=ts();class r extends Error{constructor(y){super(`CodeGen: "code" for ${y} not defined`),this.value=y.value}}var n;(function(o){o[o.Started=0]="Started",o[o.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class a{constructor({prefixes:y,parent:f}={}){this._names={},this._prefixes=y,this._parent=f}toName(y){return y instanceof e.Name?y:this.name(y)}name(y){return new e.Name(this._newName(y))}_newName(y){const f=this._names[y]||this._nameGroup(y);return`${y}${f.index++}`}_nameGroup(y){var f,w;if(!((w=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||w===void 0)&&w.has(y)||this._prefixes&&!this._prefixes.has(y))throw new Error(`CodeGen: prefix "${y}" is not allowed in this scope`);return this._names[y]={prefix:y,index:0}}}t.Scope=a;class c extends e.Name{constructor(y,f){super(f),this.prefix=y}setValue(y,{property:f,itemIndex:w}){this.value=y,this.scopePath=(0,e._)`.${new e.Name(f)}[${w}]`}}t.ValueScopeName=c;const s=(0,e._)`\n`;class u extends a{constructor(y){super(y),this._values={},this._scope=y.scope,this.opts={...y,_n:y.lines?s:e.nil}}get(){return this._scope}name(y){return new c(y,this._newName(y))}value(y,f){var w;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const $=this.toName(y),{prefix:E}=$,b=(w=f.key)!==null&&w!==void 0?w:f.ref;let S=this._values[E];if(S){const d=S.get(b);if(d)return d}else S=this._values[E]=new Map;S.set(b,$);const h=this._scope[E]||(this._scope[E]=[]),i=h.length;return h[i]=f.ref,$.setValue(f,{property:E,itemIndex:i}),$}getValue(y,f){const w=this._values[y];if(w)return w.get(f)}scopeRefs(y,f=this._values){return this._reduceValues(f,w=>{if(w.scopePath===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return(0,e._)`${y}${w.scopePath}`})}scopeCode(y=this._values,f,w){return this._reduceValues(y,$=>{if($.value===void 0)throw new Error(`CodeGen: name "${$}" has no value`);return $.value.code},f,w)}_reduceValues(y,f,w={},$){let E=e.nil;for(const b in y){const S=y[b];if(!S)continue;const h=w[b]=w[b]||new Map;S.forEach(i=>{if(h.has(i))return;h.set(i,n.Started);let d=f(i);if(d){const l=this.opts.es5?t.varKinds.var:t.varKinds.const;E=(0,e._)`${E}${l} ${i} = ${d};${this.opts._n}`}else if(d=$==null?void 0:$(i))E=(0,e._)`${E}${d}${this.opts._n}`;else throw new r(i);h.set(i,n.Completed)})}return E}}t.ValueScope=u}(Us)),Us}var ni;function qe(){return ni||(ni=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=ts(),r=ri();var n=ts();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var a=ri();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class c{optimizeNodes(){return this}optimizeNames(p,P){return this}}class s extends c{constructor(p,P,C){super(),this.varKind=p,this.name=P,this.rhs=C}render({es5:p,_n:P}){const C=p?r.varKinds.var:this.varKind,B=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${B};`+P}optimizeNames(p,P){if(p[this.name.str])return this.rhs&&(this.rhs=x(this.rhs,p,P)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends c{constructor(p,P,C){super(),this.lhs=p,this.rhs=P,this.sideEffects=C}render({_n:p}){return`${this.lhs} = ${this.rhs};`+p}optimizeNames(p,P){if(!(this.lhs instanceof e.Name&&!p[this.lhs.str]&&!this.sideEffects))return this.rhs=x(this.rhs,p,P),this}get names(){const p=this.lhs instanceof e.Name?{}:{...this.lhs.names};return W(p,this.rhs)}}class o extends u{constructor(p,P,C,B){super(p,C,B),this.op=P}render({_n:p}){return`${this.lhs} ${this.op}= ${this.rhs};`+p}}class y extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`${this.label}:`+p}}class f extends c{constructor(p){super(),this.label=p,this.names={}}render({_n:p}){return`break${this.label?` ${this.label}`:""};`+p}}class w extends c{constructor(p){super(),this.error=p}render({_n:p}){return`throw ${this.error};`+p}get names(){return this.error.names}}class $ extends c{constructor(p){super(),this.code=p}render({_n:p}){return`${this.code};`+p}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(p,P){return this.code=x(this.code,p,P),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class E extends c{constructor(p=[]){super(),this.nodes=p}render(p){return this.nodes.reduce((P,C)=>P+C.render(p),"")}optimizeNodes(){const{nodes:p}=this;let P=p.length;for(;P--;){const C=p[P].optimizeNodes();Array.isArray(C)?p.splice(P,1,...C):C?p[P]=C:p.splice(P,1)}return p.length>0?this:void 0}optimizeNames(p,P){const{nodes:C}=this;let B=C.length;for(;B--;){const G=C[B];G.optimizeNames(p,P)||(te(p,G.names),C.splice(B,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((p,P)=>q(p,P.names),{})}}class b extends E{render(p){return"{"+p._n+super.render(p)+"}"+p._n}}class S extends E{}class h extends b{}h.kind="else";class i extends b{constructor(p,P){super(P),this.condition=p}render(p){let P=`if(${this.condition})`+super.render(p);return this.else&&(P+="else "+this.else.render(p)),P}optimizeNodes(){super.optimizeNodes();const p=this.condition;if(p===!0)return this.nodes;let P=this.else;if(P){const C=P.optimizeNodes();P=this.else=Array.isArray(C)?new h(C):C}if(P)return p===!1?P instanceof i?P:P.nodes:this.nodes.length?this:new i(ue(p),P instanceof i?[P]:P.nodes);if(!(p===!1||!this.nodes.length))return this}optimizeNames(p,P){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(p,P),!!(super.optimizeNames(p,P)||this.else))return this.condition=x(this.condition,p,P),this}get names(){const p=super.names;return W(p,this.condition),this.else&&q(p,this.else.names),p}}i.kind="if";class d extends b{}d.kind="for";class l extends d{constructor(p){super(),this.iteration=p}render(p){return`for(${this.iteration})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iteration=x(this.iteration,p,P),this}get names(){return q(super.names,this.iteration.names)}}class _ extends d{constructor(p,P,C,B){super(),this.varKind=p,this.name=P,this.from=C,this.to=B}render(p){const P=p.es5?r.varKinds.var:this.varKind,{name:C,from:B,to:G}=this;return`for(${P} ${C}=${B}; ${C}<${G}; ${C}++)`+super.render(p)}get names(){const p=W(super.names,this.from);return W(p,this.to)}}class m extends d{constructor(p,P,C,B){super(),this.loop=p,this.varKind=P,this.name=C,this.iterable=B}render(p){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(p)}optimizeNames(p,P){if(super.optimizeNames(p,P))return this.iterable=x(this.iterable,p,P),this}get names(){return q(super.names,this.iterable.names)}}class g extends b{constructor(p,P,C){super(),this.name=p,this.args=P,this.async=C}render(p){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(p)}}g.kind="func";class v extends E{render(p){return"return "+super.render(p)}}v.kind="return";class k extends b{render(p){let P="try"+super.render(p);return this.catch&&(P+=this.catch.render(p)),this.finally&&(P+=this.finally.render(p)),P}optimizeNodes(){var p,P;return super.optimizeNodes(),(p=this.catch)===null||p===void 0||p.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(p,P){var C,B;return super.optimizeNames(p,P),(C=this.catch)===null||C===void 0||C.optimizeNames(p,P),(B=this.finally)===null||B===void 0||B.optimizeNames(p,P),this}get names(){const p=super.names;return this.catch&&q(p,this.catch.names),this.finally&&q(p,this.finally.names),p}}class T extends b{constructor(p){super(),this.error=p}render(p){return`catch(${this.error})`+super.render(p)}}T.kind="catch";class j extends b{render(p){return"finally"+super.render(p)}}j.kind="finally";class V{constructor(p,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
37
+ `:""},this._extScope=p,this._scope=new r.Scope({parent:p}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(p){return this._scope.name(p)}scopeName(p){return this._extScope.name(p)}scopeValue(p,P){const C=this._extScope.value(p,P);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(p,P){return this._extScope.getValue(p,P)}scopeRefs(p){return this._extScope.scopeRefs(p,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(p,P,C,B){const G=this._scope.toName(P);return C!==void 0&&B&&(this._constants[G.str]=C),this._leafNode(new s(p,G,C)),G}const(p,P,C){return this._def(r.varKinds.const,p,P,C)}let(p,P,C){return this._def(r.varKinds.let,p,P,C)}var(p,P,C){return this._def(r.varKinds.var,p,P,C)}assign(p,P,C){return this._leafNode(new u(p,P,C))}add(p,P){return this._leafNode(new o(p,t.operators.ADD,P))}code(p){return typeof p=="function"?p():p!==e.nil&&this._leafNode(new $(p)),this}object(...p){const P=["{"];for(const[C,B]of p)P.length>1&&P.push(","),P.push(C),(C!==B||this.opts.es5)&&(P.push(":"),(0,e.addCodeArg)(P,B));return P.push("}"),new e._Code(P)}if(p,P,C){if(this._blockNode(new i(p)),P&&C)this.code(P).else().code(C).endIf();else if(P)this.code(P).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(p){return this._elseNode(new i(p))}else(){return this._elseNode(new h)}endIf(){return this._endBlockNode(i,h)}_for(p,P){return this._blockNode(p),P&&this.code(P).endFor(),this}for(p,P){return this._for(new l(p),P)}forRange(p,P,C,B,G=this.opts.es5?r.varKinds.var:r.varKinds.let){const re=this._scope.toName(p);return this._for(new _(G,re,P,C),()=>B(re))}forOf(p,P,C,B=r.varKinds.const){const G=this._scope.toName(p);if(this.opts.es5){const re=P instanceof e.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,e._)`${re}.length`,Z=>{this.var(G,(0,e._)`${re}[${Z}]`),C(G)})}return this._for(new m("of",B,G,P),()=>C(G))}forIn(p,P,C,B=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(p,(0,e._)`Object.keys(${P})`,C);const G=this._scope.toName(p);return this._for(new m("in",B,G,P),()=>C(G))}endFor(){return this._endBlockNode(d)}label(p){return this._leafNode(new y(p))}break(p){return this._leafNode(new f(p))}return(p){const P=new v;if(this._blockNode(P),this.code(p),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(v)}try(p,P,C){if(!P&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const B=new k;if(this._blockNode(B),this.code(p),P){const G=this.name("e");this._currNode=B.catch=new T(G),P(G)}return C&&(this._currNode=B.finally=new j,this.code(C)),this._endBlockNode(T,j)}throw(p){return this._leafNode(new w(p))}block(p,P){return this._blockStarts.push(this._nodes.length),p&&this.code(p).endBlock(P),this}endBlock(p){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-P;if(C<0||p!==void 0&&C!==p)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${p} expected`);return this._nodes.length=P,this}func(p,P=e.nil,C,B){return this._blockNode(new g(p,P,C)),B&&this.code(B).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(p=1){for(;p-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(p){return this._currNode.nodes.push(p),this}_blockNode(p){this._currNode.nodes.push(p),this._nodes.push(p)}_endBlockNode(p,P){const C=this._currNode;if(C instanceof p||P&&C instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${p.kind}/${P.kind}`:p.kind}"`)}_elseNode(p){const P=this._currNode;if(!(P instanceof i))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=p,this}get _root(){return this._nodes[0]}get _currNode(){const p=this._nodes;return p[p.length-1]}set _currNode(p){const P=this._nodes;P[P.length-1]=p}}t.CodeGen=V;function q(R,p){for(const P in p)R[P]=(R[P]||0)+(p[P]||0);return R}function W(R,p){return p instanceof e._CodeOrName?q(R,p.names):R}function x(R,p,P){if(R instanceof e.Name)return C(R);if(!B(R))return R;return new e._Code(R._items.reduce((G,re)=>(re instanceof e.Name&&(re=C(re)),re instanceof e._Code?G.push(...re._items):G.push(re),G),[]));function C(G){const re=P[G.str];return re===void 0||p[G.str]!==1?G:(delete p[G.str],re)}function B(G){return G instanceof e._Code&&G._items.some(re=>re instanceof e.Name&&p[re.str]===1&&P[re.str]!==void 0)}}function te(R,p){for(const P in p)R[P]=(R[P]||0)-(p[P]||0)}function ue(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${A(R)}`}t.not=ue;const ve=O(t.operators.AND);function fe(...R){return R.reduce(ve)}t.and=fe;const ae=O(t.operators.OR);function L(...R){return R.reduce(ae)}t.or=L;function O(R){return(p,P)=>p===e.nil?P:P===e.nil?p:(0,e._)`${A(p)} ${R} ${A(P)}`}function A(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}(Vs)),Vs}var je={},si;function He(){if(si)return je;si=1,Object.defineProperty(je,"__esModule",{value:!0}),je.checkStrictMode=je.getErrorPath=je.Type=je.useFunc=je.setEvaluated=je.evaluatedPropsToName=je.mergeEvaluated=je.eachItem=je.unescapeJsonPointer=je.escapeJsonPointer=je.escapeFragment=je.unescapeFragment=je.schemaRefOrVal=je.schemaHasRulesButRef=je.schemaHasRules=je.checkUnknownRules=je.alwaysValidSchema=je.toHash=void 0;const t=qe(),e=ts();function r(m){const g={};for(const v of m)g[v]=!0;return g}je.toHash=r;function n(m,g){return typeof g=="boolean"?g:Object.keys(g).length===0?!0:(a(m,g),!c(g,m.self.RULES.all))}je.alwaysValidSchema=n;function a(m,g=m.schema){const{opts:v,self:k}=m;if(!v.strictSchema||typeof g=="boolean")return;const T=k.RULES.keywords;for(const j in g)T[j]||_(m,`unknown keyword: "${j}"`)}je.checkUnknownRules=a;function c(m,g){if(typeof m=="boolean")return!m;for(const v in m)if(g[v])return!0;return!1}je.schemaHasRules=c;function s(m,g){if(typeof m=="boolean")return!m;for(const v in m)if(v!=="$ref"&&g.all[v])return!0;return!1}je.schemaHasRulesButRef=s;function u({topSchemaRef:m,schemaPath:g},v,k,T){if(!T){if(typeof v=="number"||typeof v=="boolean")return v;if(typeof v=="string")return(0,t._)`${v}`}return(0,t._)`${m}${g}${(0,t.getProperty)(k)}`}je.schemaRefOrVal=u;function o(m){return w(decodeURIComponent(m))}je.unescapeFragment=o;function y(m){return encodeURIComponent(f(m))}je.escapeFragment=y;function f(m){return typeof m=="number"?`${m}`:m.replace(/~/g,"~0").replace(/\//g,"~1")}je.escapeJsonPointer=f;function w(m){return m.replace(/~1/g,"/").replace(/~0/g,"~")}je.unescapeJsonPointer=w;function $(m,g){if(Array.isArray(m))for(const v of m)g(v);else g(m)}je.eachItem=$;function E({mergeNames:m,mergeToName:g,mergeValues:v,resultToName:k}){return(T,j,V,q)=>{const W=V===void 0?j:V instanceof t.Name?(j instanceof t.Name?m(T,j,V):g(T,j,V),V):j instanceof t.Name?(g(T,V,j),j):v(j,V);return q===t.Name&&!(W instanceof t.Name)?k(T,W):W}}je.mergeEvaluated={props:E({mergeNames:(m,g,v)=>m.if((0,t._)`${v} !== true && ${g} !== undefined`,()=>{m.if((0,t._)`${g} === true`,()=>m.assign(v,!0),()=>m.assign(v,(0,t._)`${v} || {}`).code((0,t._)`Object.assign(${v}, ${g})`))}),mergeToName:(m,g,v)=>m.if((0,t._)`${v} !== true`,()=>{g===!0?m.assign(v,!0):(m.assign(v,(0,t._)`${v} || {}`),S(m,v,g))}),mergeValues:(m,g)=>m===!0?!0:{...m,...g},resultToName:b}),items:E({mergeNames:(m,g,v)=>m.if((0,t._)`${v} !== true && ${g} !== undefined`,()=>m.assign(v,(0,t._)`${g} === true ? true : ${v} > ${g} ? ${v} : ${g}`)),mergeToName:(m,g,v)=>m.if((0,t._)`${v} !== true`,()=>m.assign(v,g===!0?!0:(0,t._)`${v} > ${g} ? ${v} : ${g}`)),mergeValues:(m,g)=>m===!0?!0:Math.max(m,g),resultToName:(m,g)=>m.var("items",g)})};function b(m,g){if(g===!0)return m.var("props",!0);const v=m.var("props",(0,t._)`{}`);return g!==void 0&&S(m,v,g),v}je.evaluatedPropsToName=b;function S(m,g,v){Object.keys(v).forEach(k=>m.assign((0,t._)`${g}${(0,t.getProperty)(k)}`,!0))}je.setEvaluated=S;const h={};function i(m,g){return m.scopeValue("func",{ref:g,code:h[g.code]||(h[g.code]=new e._Code(g.code))})}je.useFunc=i;var d;(function(m){m[m.Num=0]="Num",m[m.Str=1]="Str"})(d||(je.Type=d={}));function l(m,g,v){if(m instanceof t.Name){const k=g===d.Num;return v?k?(0,t._)`"[" + ${m} + "]"`:(0,t._)`"['" + ${m} + "']"`:k?(0,t._)`"/" + ${m}`:(0,t._)`"/" + ${m}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return v?(0,t.getProperty)(m).toString():"/"+f(m)}je.getErrorPath=l;function _(m,g,v=m.opts.strictSchema){if(v){if(g=`strict mode: ${g}`,v===!0)throw new Error(g);m.self.logger.warn(g)}}return je.checkStrictMode=_,je}var tn={},ai;function fr(){if(ai)return tn;ai=1,Object.defineProperty(tn,"__esModule",{value:!0});const t=qe(),e={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return tn.default=e,tn}var ii;function ps(){return ii||(ii=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=qe(),r=He(),n=fr();t.keywordError={message:({keyword:h})=>(0,e.str)`must pass "${h}" keyword validation`},t.keyword$DataError={message:({keyword:h,schemaType:i})=>i?(0,e.str)`"${h}" keyword must be ${i} ($data)`:(0,e.str)`"${h}" keyword is invalid ($data)`};function a(h,i=t.keywordError,d,l){const{it:_}=h,{gen:m,compositeRule:g,allErrors:v}=_,k=w(h,i,d);l??(g||v)?o(m,k):y(_,(0,e._)`[${k}]`)}t.reportError=a;function c(h,i=t.keywordError,d){const{it:l}=h,{gen:_,compositeRule:m,allErrors:g}=l,v=w(h,i,d);o(_,v),m||g||y(l,n.default.vErrors)}t.reportExtraError=c;function s(h,i){h.assign(n.default.errors,i),h.if((0,e._)`${n.default.vErrors} !== null`,()=>h.if(i,()=>h.assign((0,e._)`${n.default.vErrors}.length`,i),()=>h.assign(n.default.vErrors,null)))}t.resetErrorsCount=s;function u({gen:h,keyword:i,schemaValue:d,data:l,errsCount:_,it:m}){if(_===void 0)throw new Error("ajv implementation error");const g=h.name("err");h.forRange("i",_,n.default.errors,v=>{h.const(g,(0,e._)`${n.default.vErrors}[${v}]`),h.if((0,e._)`${g}.instancePath === undefined`,()=>h.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,m.errorPath))),h.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${m.errSchemaPath}/${i}`),m.opts.verbose&&(h.assign((0,e._)`${g}.schema`,d),h.assign((0,e._)`${g}.data`,l))})}t.extendErrors=u;function o(h,i){const d=h.const("err",i);h.if((0,e._)`${n.default.vErrors} === null`,()=>h.assign(n.default.vErrors,(0,e._)`[${d}]`),(0,e._)`${n.default.vErrors}.push(${d})`),h.code((0,e._)`${n.default.errors}++`)}function y(h,i){const{gen:d,validateName:l,schemaEnv:_}=h;_.$async?d.throw((0,e._)`new ${h.ValidationError}(${i})`):(d.assign((0,e._)`${l}.errors`,i),d.return(!1))}const f={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function w(h,i,d){const{createErrors:l}=h.it;return l===!1?(0,e._)`{}`:$(h,i,d)}function $(h,i,d={}){const{gen:l,it:_}=h,m=[E(_,d),b(h,d)];return S(h,i,m),l.object(...m)}function E({errorPath:h},{instancePath:i}){const d=i?(0,e.str)`${h}${(0,r.getErrorPath)(i,r.Type.Str)}`:h;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,d)]}function b({keyword:h,it:{errSchemaPath:i}},{schemaPath:d,parentSchema:l}){let _=l?i:(0,e.str)`${i}/${h}`;return d&&(_=(0,e.str)`${_}${(0,r.getErrorPath)(d,r.Type.Str)}`),[f.schemaPath,_]}function S(h,{params:i,message:d},l){const{keyword:_,data:m,schemaValue:g,it:v}=h,{opts:k,propertyName:T,topSchemaRef:j,schemaPath:V}=v;l.push([f.keyword,_],[f.params,typeof i=="function"?i(h):i||(0,e._)`{}`]),k.messages&&l.push([f.message,typeof d=="function"?d(h):d]),k.verbose&&l.push([f.schema,g],[f.parentSchema,(0,e._)`${j}${V}`],[n.default.data,m]),T&&l.push([f.propertyName,T])}}(qs)),qs}var oi;function xh(){if(oi)return mr;oi=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.boolOrEmptySchema=mr.topBoolOrEmptySchema=void 0;const t=ps(),e=qe(),r=fr(),n={message:"boolean schema is false"};function a(u){const{gen:o,schema:y,validateName:f}=u;y===!1?s(u,!1):typeof y=="object"&&y.$async===!0?o.return(r.default.data):(o.assign((0,e._)`${f}.errors`,null),o.return(!0))}mr.topBoolOrEmptySchema=a;function c(u,o){const{gen:y,schema:f}=u;f===!1?(y.var(o,!1),s(u)):y.var(o,!0)}mr.boolOrEmptySchema=c;function s(u,o){const{gen:y,data:f}=u,w={gen:y,keyword:"false schema",data:f,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,t.reportError)(w,n,void 0,o)}return mr}var yt={},gr={},ci;function vc(){if(ci)return gr;ci=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.getRules=gr.isJSONType=void 0;const t=["string","number","integer","boolean","null","object","array"],e=new Set(t);function r(a){return typeof a=="string"&&e.has(a)}gr.isJSONType=r;function n(){const a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}return gr.getRules=n,gr}var Yt={},ui;function _c(){if(ui)return Yt;ui=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.shouldUseRule=Yt.shouldUseGroup=Yt.schemaHasRulesForType=void 0;function t({schema:n,self:a},c){const s=a.RULES.types[c];return s&&s!==!0&&e(n,s)}Yt.schemaHasRulesForType=t;function e(n,a){return a.rules.some(c=>r(n,c))}Yt.shouldUseGroup=e;function r(n,a){var c;return n[a.keyword]!==void 0||((c=a.definition.implements)===null||c===void 0?void 0:c.some(s=>n[s]!==void 0))}return Yt.shouldUseRule=r,Yt}var li;function rs(){if(li)return yt;li=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.reportTypeError=yt.checkDataTypes=yt.checkDataType=yt.coerceAndCheckDataType=yt.getJSONTypes=yt.getSchemaTypes=yt.DataType=void 0;const t=vc(),e=_c(),r=ps(),n=qe(),a=He();var c;(function(d){d[d.Correct=0]="Correct",d[d.Wrong=1]="Wrong"})(c||(yt.DataType=c={}));function s(d){const l=u(d.type);if(l.includes("null")){if(d.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!l.length&&d.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');d.nullable===!0&&l.push("null")}return l}yt.getSchemaTypes=s;function u(d){const l=Array.isArray(d)?d:d?[d]:[];if(l.every(t.isJSONType))return l;throw new Error("type must be JSONType or JSONType[]: "+l.join(","))}yt.getJSONTypes=u;function o(d,l){const{gen:_,data:m,opts:g}=d,v=f(l,g.coerceTypes),k=l.length>0&&!(v.length===0&&l.length===1&&(0,e.schemaHasRulesForType)(d,l[0]));if(k){const T=b(l,m,g.strictNumbers,c.Wrong);_.if(T,()=>{v.length?w(d,l,v):h(d)})}return k}yt.coerceAndCheckDataType=o;const y=new Set(["string","number","integer","boolean","null"]);function f(d,l){return l?d.filter(_=>y.has(_)||l==="array"&&_==="array"):[]}function w(d,l,_){const{gen:m,data:g,opts:v}=d,k=m.let("dataType",(0,n._)`typeof ${g}`),T=m.let("coerced",(0,n._)`undefined`);v.coerceTypes==="array"&&m.if((0,n._)`${k} == 'object' && Array.isArray(${g}) && ${g}.length == 1`,()=>m.assign(g,(0,n._)`${g}[0]`).assign(k,(0,n._)`typeof ${g}`).if(b(l,g,v.strictNumbers),()=>m.assign(T,g))),m.if((0,n._)`${T} !== undefined`);for(const V of _)(y.has(V)||V==="array"&&v.coerceTypes==="array")&&j(V);m.else(),h(d),m.endIf(),m.if((0,n._)`${T} !== undefined`,()=>{m.assign(g,T),$(d,T)});function j(V){switch(V){case"string":m.elseIf((0,n._)`${k} == "number" || ${k} == "boolean"`).assign(T,(0,n._)`"" + ${g}`).elseIf((0,n._)`${g} === null`).assign(T,(0,n._)`""`);return;case"number":m.elseIf((0,n._)`${k} == "boolean" || ${g} === null
38
+ || (${k} == "string" && ${g} && ${g} == +${g})`).assign(T,(0,n._)`+${g}`);return;case"integer":m.elseIf((0,n._)`${k} === "boolean" || ${g} === null
39
+ || (${k} === "string" && ${g} && ${g} == +${g} && !(${g} % 1))`).assign(T,(0,n._)`+${g}`);return;case"boolean":m.elseIf((0,n._)`${g} === "false" || ${g} === 0 || ${g} === null`).assign(T,!1).elseIf((0,n._)`${g} === "true" || ${g} === 1`).assign(T,!0);return;case"null":m.elseIf((0,n._)`${g} === "" || ${g} === 0 || ${g} === false`),m.assign(T,null);return;case"array":m.elseIf((0,n._)`${k} === "string" || ${k} === "number"
40
+ || ${k} === "boolean" || ${g} === null`).assign(T,(0,n._)`[${g}]`)}}}function $({gen:d,parentData:l,parentDataProperty:_},m){d.if((0,n._)`${l} !== undefined`,()=>d.assign((0,n._)`${l}[${_}]`,m))}function E(d,l,_,m=c.Correct){const g=m===c.Correct?n.operators.EQ:n.operators.NEQ;let v;switch(d){case"null":return(0,n._)`${l} ${g} null`;case"array":v=(0,n._)`Array.isArray(${l})`;break;case"object":v=(0,n._)`${l} && typeof ${l} == "object" && !Array.isArray(${l})`;break;case"integer":v=k((0,n._)`!(${l} % 1) && !isNaN(${l})`);break;case"number":v=k();break;default:return(0,n._)`typeof ${l} ${g} ${d}`}return m===c.Correct?v:(0,n.not)(v);function k(T=n.nil){return(0,n.and)((0,n._)`typeof ${l} == "number"`,T,_?(0,n._)`isFinite(${l})`:n.nil)}}yt.checkDataType=E;function b(d,l,_,m){if(d.length===1)return E(d[0],l,_,m);let g;const v=(0,a.toHash)(d);if(v.array&&v.object){const k=(0,n._)`typeof ${l} != "object"`;g=v.null?k:(0,n._)`!${l} || ${k}`,delete v.null,delete v.array,delete v.object}else g=n.nil;v.number&&delete v.integer;for(const k in v)g=(0,n.and)(g,E(k,l,_,m));return g}yt.checkDataTypes=b;const S={message:({schema:d})=>`must be ${d}`,params:({schema:d,schemaValue:l})=>typeof d=="string"?(0,n._)`{type: ${d}}`:(0,n._)`{type: ${l}}`};function h(d){const l=i(d);(0,r.reportError)(l,S)}yt.reportTypeError=h;function i(d){const{gen:l,data:_,schema:m}=d,g=(0,a.schemaRefOrVal)(d,m,"type");return{gen:l,keyword:"type",data:_,schema:m.type,schemaCode:g,schemaValue:g,parentSchema:m,params:{},it:d}}return yt}var Tr={},fi;function Wh(){if(fi)return Tr;fi=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.assignDefaults=void 0;const t=qe(),e=He();function r(a,c){const{properties:s,items:u}=a.schema;if(c==="object"&&s)for(const o in s)n(a,o,s[o].default);else c==="array"&&Array.isArray(u)&&u.forEach((o,y)=>n(a,y,o.default))}Tr.assignDefaults=r;function n(a,c,s){const{gen:u,compositeRule:o,data:y,opts:f}=a;if(s===void 0)return;const w=(0,t._)`${y}${(0,t.getProperty)(c)}`;if(o){(0,e.checkStrictMode)(a,`default is ignored for: ${w}`);return}let $=(0,t._)`${w} === undefined`;f.useDefaults==="empty"&&($=(0,t._)`${$} || ${w} === null || ${w} === ""`),u.if($,(0,t._)`${w} = ${(0,t.stringify)(s)}`)}return Tr}var qt={},Je={},di;function zt(){if(di)return Je;di=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.validateUnion=Je.validateArray=Je.usePattern=Je.callValidateCode=Je.schemaProperties=Je.allSchemaProperties=Je.noPropertyInData=Je.propertyInData=Je.isOwnProperty=Je.hasPropFunc=Je.reportMissingProp=Je.checkMissingProp=Je.checkReportMissingProp=void 0;const t=qe(),e=He(),r=fr(),n=He();function a(d,l){const{gen:_,data:m,it:g}=d;_.if(f(_,m,l,g.opts.ownProperties),()=>{d.setParams({missingProperty:(0,t._)`${l}`},!0),d.error()})}Je.checkReportMissingProp=a;function c({gen:d,data:l,it:{opts:_}},m,g){return(0,t.or)(...m.map(v=>(0,t.and)(f(d,l,v,_.ownProperties),(0,t._)`${g} = ${v}`)))}Je.checkMissingProp=c;function s(d,l){d.setParams({missingProperty:l},!0),d.error()}Je.reportMissingProp=s;function u(d){return d.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}Je.hasPropFunc=u;function o(d,l,_){return(0,t._)`${u(d)}.call(${l}, ${_})`}Je.isOwnProperty=o;function y(d,l,_,m){const g=(0,t._)`${l}${(0,t.getProperty)(_)} !== undefined`;return m?(0,t._)`${g} && ${o(d,l,_)}`:g}Je.propertyInData=y;function f(d,l,_,m){const g=(0,t._)`${l}${(0,t.getProperty)(_)} === undefined`;return m?(0,t.or)(g,(0,t.not)(o(d,l,_))):g}Je.noPropertyInData=f;function w(d){return d?Object.keys(d).filter(l=>l!=="__proto__"):[]}Je.allSchemaProperties=w;function $(d,l){return w(l).filter(_=>!(0,e.alwaysValidSchema)(d,l[_]))}Je.schemaProperties=$;function E({schemaCode:d,data:l,it:{gen:_,topSchemaRef:m,schemaPath:g,errorPath:v},it:k},T,j,V){const q=V?(0,t._)`${d}, ${l}, ${m}${g}`:l,W=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,v)],[r.default.parentData,k.parentData],[r.default.parentDataProperty,k.parentDataProperty],[r.default.rootData,r.default.rootData]];k.opts.dynamicRef&&W.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const x=(0,t._)`${q}, ${_.object(...W)}`;return j!==t.nil?(0,t._)`${T}.call(${j}, ${x})`:(0,t._)`${T}(${x})`}Je.callValidateCode=E;const b=(0,t._)`new RegExp`;function S({gen:d,it:{opts:l}},_){const m=l.unicodeRegExp?"u":"",{regExp:g}=l.code,v=g(_,m);return d.scopeValue("pattern",{key:v.toString(),ref:v,code:(0,t._)`${g.code==="new RegExp"?b:(0,n.useFunc)(d,g)}(${_}, ${m})`})}Je.usePattern=S;function h(d){const{gen:l,data:_,keyword:m,it:g}=d,v=l.name("valid");if(g.allErrors){const T=l.let("valid",!0);return k(()=>l.assign(T,!1)),T}return l.var(v,!0),k(()=>l.break()),v;function k(T){const j=l.const("len",(0,t._)`${_}.length`);l.forRange("i",0,j,V=>{d.subschema({keyword:m,dataProp:V,dataPropType:e.Type.Num},v),l.if((0,t.not)(v),T)})}}Je.validateArray=h;function i(d){const{gen:l,schema:_,keyword:m,it:g}=d;if(!Array.isArray(_))throw new Error("ajv implementation error");if(_.some(j=>(0,e.alwaysValidSchema)(g,j))&&!g.opts.unevaluated)return;const k=l.let("valid",!1),T=l.name("_valid");l.block(()=>_.forEach((j,V)=>{const q=d.subschema({keyword:m,schemaProp:V,compositeRule:!0},T);l.assign(k,(0,t._)`${k} || ${T}`),d.mergeValidEvaluated(q,T)||l.if((0,t.not)(k))})),d.result(k,()=>d.reset(),()=>d.error(!0))}return Je.validateUnion=i,Je}var hi;function Jh(){if(hi)return qt;hi=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.validateKeywordUsage=qt.validSchemaType=qt.funcKeywordCode=qt.macroKeywordCode=void 0;const t=qe(),e=fr(),r=zt(),n=ps();function a($,E){const{gen:b,keyword:S,schema:h,parentSchema:i,it:d}=$,l=E.macro.call(d.self,h,i,d),_=y(b,S,l);d.opts.validateSchema!==!1&&d.self.validateSchema(l,!0);const m=b.name("valid");$.subschema({schema:l,schemaPath:t.nil,errSchemaPath:`${d.errSchemaPath}/${S}`,topSchemaRef:_,compositeRule:!0},m),$.pass(m,()=>$.error(!0))}qt.macroKeywordCode=a;function c($,E){var b;const{gen:S,keyword:h,schema:i,parentSchema:d,$data:l,it:_}=$;o(_,E);const m=!l&&E.compile?E.compile.call(_.self,i,d,_):E.validate,g=y(S,h,m),v=S.let("valid");$.block$data(v,k),$.ok((b=E.valid)!==null&&b!==void 0?b:v);function k(){if(E.errors===!1)V(),E.modifying&&s($),q(()=>$.error());else{const W=E.async?T():j();E.modifying&&s($),q(()=>u($,W))}}function T(){const W=S.let("ruleErrs",null);return S.try(()=>V((0,t._)`await `),x=>S.assign(v,!1).if((0,t._)`${x} instanceof ${_.ValidationError}`,()=>S.assign(W,(0,t._)`${x}.errors`),()=>S.throw(x))),W}function j(){const W=(0,t._)`${g}.errors`;return S.assign(W,null),V(t.nil),W}function V(W=E.async?(0,t._)`await `:t.nil){const x=_.opts.passContext?e.default.this:e.default.self,te=!("compile"in E&&!l||E.schema===!1);S.assign(v,(0,t._)`${W}${(0,r.callValidateCode)($,g,x,te)}`,E.modifying)}function q(W){var x;S.if((0,t.not)((x=E.valid)!==null&&x!==void 0?x:v),W)}}qt.funcKeywordCode=c;function s($){const{gen:E,data:b,it:S}=$;E.if(S.parentData,()=>E.assign(b,(0,t._)`${S.parentData}[${S.parentDataProperty}]`))}function u($,E){const{gen:b}=$;b.if((0,t._)`Array.isArray(${E})`,()=>{b.assign(e.default.vErrors,(0,t._)`${e.default.vErrors} === null ? ${E} : ${e.default.vErrors}.concat(${E})`).assign(e.default.errors,(0,t._)`${e.default.vErrors}.length`),(0,n.extendErrors)($)},()=>$.error())}function o({schemaEnv:$},E){if(E.async&&!$.$async)throw new Error("async keyword in sync schema")}function y($,E,b){if(b===void 0)throw new Error(`keyword "${E}" failed to compile`);return $.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,t.stringify)(b)})}function f($,E,b=!1){return!E.length||E.some(S=>S==="array"?Array.isArray($):S==="object"?$&&typeof $=="object"&&!Array.isArray($):typeof $==S||b&&typeof $>"u")}qt.validSchemaType=f;function w({schema:$,opts:E,self:b,errSchemaPath:S},h,i){if(Array.isArray(h.keyword)?!h.keyword.includes(i):h.keyword!==i)throw new Error("ajv implementation error");const d=h.dependencies;if(d!=null&&d.some(l=>!Object.prototype.hasOwnProperty.call($,l)))throw new Error(`parent schema must have dependencies of ${i}: ${d.join(",")}`);if(h.validateSchema&&!h.validateSchema($[i])){const _=`keyword "${i}" value is invalid at path "${S}": `+b.errorsText(h.validateSchema.errors);if(E.validateSchema==="log")b.logger.error(_);else throw new Error(_)}}return qt.validateKeywordUsage=w,qt}var Zt={},pi;function Qh(){if(pi)return Zt;pi=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.extendSubschemaMode=Zt.extendSubschemaData=Zt.getSubschema=void 0;const t=qe(),e=He();function r(c,{keyword:s,schemaProp:u,schema:o,schemaPath:y,errSchemaPath:f,topSchemaRef:w}){if(s!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){const $=c.schema[s];return u===void 0?{schema:$,schemaPath:(0,t._)`${c.schemaPath}${(0,t.getProperty)(s)}`,errSchemaPath:`${c.errSchemaPath}/${s}`}:{schema:$[u],schemaPath:(0,t._)`${c.schemaPath}${(0,t.getProperty)(s)}${(0,t.getProperty)(u)}`,errSchemaPath:`${c.errSchemaPath}/${s}/${(0,e.escapeFragment)(u)}`}}if(o!==void 0){if(y===void 0||f===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:y,topSchemaRef:w,errSchemaPath:f}}throw new Error('either "keyword" or "schema" must be passed')}Zt.getSubschema=r;function n(c,s,{dataProp:u,dataPropType:o,data:y,dataTypes:f,propertyName:w}){if(y!==void 0&&u!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:$}=s;if(u!==void 0){const{errorPath:b,dataPathArr:S,opts:h}=s,i=$.let("data",(0,t._)`${s.data}${(0,t.getProperty)(u)}`,!0);E(i),c.errorPath=(0,t.str)`${b}${(0,e.getErrorPath)(u,o,h.jsPropertySyntax)}`,c.parentDataProperty=(0,t._)`${u}`,c.dataPathArr=[...S,c.parentDataProperty]}if(y!==void 0){const b=y instanceof t.Name?y:$.let("data",y,!0);E(b),w!==void 0&&(c.propertyName=w)}f&&(c.dataTypes=f);function E(b){c.data=b,c.dataLevel=s.dataLevel+1,c.dataTypes=[],s.definedProperties=new Set,c.parentData=s.data,c.dataNames=[...s.dataNames,b]}}Zt.extendSubschemaData=n;function a(c,{jtdDiscriminator:s,jtdMetadata:u,compositeRule:o,createErrors:y,allErrors:f}){o!==void 0&&(c.compositeRule=o),y!==void 0&&(c.createErrors=y),f!==void 0&&(c.allErrors=f),c.jtdDiscriminator=s,c.jtdMetadata=u}return Zt.extendSubschemaMode=a,Zt}var St={},zs,mi;function wc(){return mi||(mi=1,zs=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,c;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(c=Object.keys(e),n=c.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,c[a]))return!1;for(a=n;a--!==0;){var s=c[a];if(!t(e[s],r[s]))return!1}return!0}return e!==e&&r!==r}),zs}var Fs={exports:{}},gi;function Xh(){if(gi)return Fs.exports;gi=1;var t=Fs.exports=function(n,a,c){typeof a=="function"&&(c=a,a={}),c=a.cb||c;var s=typeof c=="function"?c:c.pre||function(){},u=c.post||function(){};e(a,s,u,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,a,c,s,u,o,y,f,w,$){if(s&&typeof s=="object"&&!Array.isArray(s)){a(s,u,o,y,f,w,$);for(var E in s){var b=s[E];if(Array.isArray(b)){if(E in t.arrayKeywords)for(var S=0;S<b.length;S++)e(n,a,c,b[S],u+"/"+E+"/"+S,o,u,E,s,S)}else if(E in t.propsKeywords){if(b&&typeof b=="object")for(var h in b)e(n,a,c,b[h],u+"/"+E+"/"+r(h),o,u,E,s,h)}else(E in t.keywords||n.allKeys&&!(E in t.skipKeywords))&&e(n,a,c,b,u+"/"+E,o,u,E,s)}c(s,u,o,y,f,w,$)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Fs.exports}var yi;function ms(){if(yi)return St;yi=1,Object.defineProperty(St,"__esModule",{value:!0}),St.getSchemaRefs=St.resolveUrl=St.normalizeId=St._getFullPath=St.getFullPath=St.inlineRef=void 0;const t=He(),e=wc(),r=Xh(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(S,h=!0){return typeof S=="boolean"?!0:h===!0?!s(S):h?u(S)<=h:!1}St.inlineRef=a;const c=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(S){for(const h in S){if(c.has(h))return!0;const i=S[h];if(Array.isArray(i)&&i.some(s)||typeof i=="object"&&s(i))return!0}return!1}function u(S){let h=0;for(const i in S){if(i==="$ref")return 1/0;if(h++,!n.has(i)&&(typeof S[i]=="object"&&(0,t.eachItem)(S[i],d=>h+=u(d)),h===1/0))return 1/0}return h}function o(S,h="",i){i!==!1&&(h=w(h));const d=S.parse(h);return y(S,d)}St.getFullPath=o;function y(S,h){return S.serialize(h).split("#")[0]+"#"}St._getFullPath=y;const f=/#\/?$/;function w(S){return S?S.replace(f,""):""}St.normalizeId=w;function $(S,h,i){return i=w(i),S.resolve(h,i)}St.resolveUrl=$;const E=/^[a-z_][-a-z0-9._]*$/i;function b(S,h){if(typeof S=="boolean")return{};const{schemaId:i,uriResolver:d}=this.opts,l=w(S[i]||h),_={"":l},m=o(d,l,!1),g={},v=new Set;return r(S,{allKeys:!0},(j,V,q,W)=>{if(W===void 0)return;const x=m+V;let te=_[W];typeof j[i]=="string"&&(te=ue.call(this,j[i])),ve.call(this,j.$anchor),ve.call(this,j.$dynamicAnchor),_[V]=te;function ue(fe){const ae=this.opts.uriResolver.resolve;if(fe=w(te?ae(te,fe):fe),v.has(fe))throw T(fe);v.add(fe);let L=this.refs[fe];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?k(j,L.schema,fe):fe!==w(x)&&(fe[0]==="#"?(k(j,g[fe],fe),g[fe]=j):this.refs[fe]=x),fe}function ve(fe){if(typeof fe=="string"){if(!E.test(fe))throw new Error(`invalid anchor "${fe}"`);ue.call(this,`#${fe}`)}}}),g;function k(j,V,q){if(V!==void 0&&!e(j,V))throw T(q)}function T(j){return new Error(`reference "${j}" resolves to more than one schema`)}}return St.getSchemaRefs=b,St}var vi;function gs(){if(vi)return Xt;vi=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.getData=Xt.KeywordCxt=Xt.validateFunctionCode=void 0;const t=xh(),e=rs(),r=_c(),n=rs(),a=Wh(),c=Jh(),s=Qh(),u=qe(),o=fr(),y=ms(),f=He(),w=ps();function $(F){if(m(F)&&(v(F),_(F))){h(F);return}E(F,()=>(0,t.topBoolOrEmptySchema)(F))}Xt.validateFunctionCode=$;function E({gen:F,validateName:N,schema:I,schemaEnv:M,opts:U},J){U.code.es5?F.func(N,(0,u._)`${o.default.data}, ${o.default.valCxt}`,M.$async,()=>{F.code((0,u._)`"use strict"; ${d(I,U)}`),S(F,U),F.code(J)}):F.func(N,(0,u._)`${o.default.data}, ${b(U)}`,M.$async,()=>F.code(d(I,U)).code(J))}function b(F){return(0,u._)`{${o.default.instancePath}="", ${o.default.parentData}, ${o.default.parentDataProperty}, ${o.default.rootData}=${o.default.data}${F.dynamicRef?(0,u._)`, ${o.default.dynamicAnchors}={}`:u.nil}}={}`}function S(F,N){F.if(o.default.valCxt,()=>{F.var(o.default.instancePath,(0,u._)`${o.default.valCxt}.${o.default.instancePath}`),F.var(o.default.parentData,(0,u._)`${o.default.valCxt}.${o.default.parentData}`),F.var(o.default.parentDataProperty,(0,u._)`${o.default.valCxt}.${o.default.parentDataProperty}`),F.var(o.default.rootData,(0,u._)`${o.default.valCxt}.${o.default.rootData}`),N.dynamicRef&&F.var(o.default.dynamicAnchors,(0,u._)`${o.default.valCxt}.${o.default.dynamicAnchors}`)},()=>{F.var(o.default.instancePath,(0,u._)`""`),F.var(o.default.parentData,(0,u._)`undefined`),F.var(o.default.parentDataProperty,(0,u._)`undefined`),F.var(o.default.rootData,o.default.data),N.dynamicRef&&F.var(o.default.dynamicAnchors,(0,u._)`{}`)})}function h(F){const{schema:N,opts:I,gen:M}=F;E(F,()=>{I.$comment&&N.$comment&&W(F),j(F),M.let(o.default.vErrors,null),M.let(o.default.errors,0),I.unevaluated&&i(F),k(F),x(F)})}function i(F){const{gen:N,validateName:I}=F;F.evaluated=N.const("evaluated",(0,u._)`${I}.evaluated`),N.if((0,u._)`${F.evaluated}.dynamicProps`,()=>N.assign((0,u._)`${F.evaluated}.props`,(0,u._)`undefined`)),N.if((0,u._)`${F.evaluated}.dynamicItems`,()=>N.assign((0,u._)`${F.evaluated}.items`,(0,u._)`undefined`))}function d(F,N){const I=typeof F=="object"&&F[N.schemaId];return I&&(N.code.source||N.code.process)?(0,u._)`/*# sourceURL=${I} */`:u.nil}function l(F,N){if(m(F)&&(v(F),_(F))){g(F,N);return}(0,t.boolOrEmptySchema)(F,N)}function _({schema:F,self:N}){if(typeof F=="boolean")return!F;for(const I in F)if(N.RULES.all[I])return!0;return!1}function m(F){return typeof F.schema!="boolean"}function g(F,N){const{schema:I,gen:M,opts:U}=F;U.$comment&&I.$comment&&W(F),V(F),q(F);const J=M.const("_errs",o.default.errors);k(F,J),M.var(N,(0,u._)`${J} === ${o.default.errors}`)}function v(F){(0,f.checkUnknownRules)(F),T(F)}function k(F,N){if(F.opts.jtd)return ue(F,[],!1,N);const I=(0,e.getSchemaTypes)(F.schema),M=(0,e.coerceAndCheckDataType)(F,I);ue(F,I,!M,N)}function T(F){const{schema:N,errSchemaPath:I,opts:M,self:U}=F;N.$ref&&M.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(N,U.RULES)&&U.logger.warn(`$ref: keywords ignored in schema at path "${I}"`)}function j(F){const{schema:N,opts:I}=F;N.default!==void 0&&I.useDefaults&&I.strictSchema&&(0,f.checkStrictMode)(F,"default is ignored in the schema root")}function V(F){const N=F.schema[F.opts.schemaId];N&&(F.baseId=(0,y.resolveUrl)(F.opts.uriResolver,F.baseId,N))}function q(F){if(F.schema.$async&&!F.schemaEnv.$async)throw new Error("async schema in sync schema")}function W({gen:F,schemaEnv:N,schema:I,errSchemaPath:M,opts:U}){const J=I.$comment;if(U.$comment===!0)F.code((0,u._)`${o.default.self}.logger.log(${J})`);else if(typeof U.$comment=="function"){const ne=(0,u.str)`${M}/$comment`,_e=F.scopeValue("root",{ref:N.root});F.code((0,u._)`${o.default.self}.opts.$comment(${J}, ${ne}, ${_e}.schema)`)}}function x(F){const{gen:N,schemaEnv:I,validateName:M,ValidationError:U,opts:J}=F;I.$async?N.if((0,u._)`${o.default.errors} === 0`,()=>N.return(o.default.data),()=>N.throw((0,u._)`new ${U}(${o.default.vErrors})`)):(N.assign((0,u._)`${M}.errors`,o.default.vErrors),J.unevaluated&&te(F),N.return((0,u._)`${o.default.errors} === 0`))}function te({gen:F,evaluated:N,props:I,items:M}){I instanceof u.Name&&F.assign((0,u._)`${N}.props`,I),M instanceof u.Name&&F.assign((0,u._)`${N}.items`,M)}function ue(F,N,I,M){const{gen:U,schema:J,data:ne,allErrors:_e,opts:Pe,self:Ee}=F,{RULES:$e}=Ee;if(J.$ref&&(Pe.ignoreKeywordsWithRef||!(0,f.schemaHasRulesButRef)(J,$e))){U.block(()=>B(F,"$ref",$e.all.$ref.definition));return}Pe.jtd||fe(F,N),U.block(()=>{for(const Ne of $e.rules)be(Ne);be($e.post)});function be(Ne){(0,r.shouldUseGroup)(J,Ne)&&(Ne.type?(U.if((0,n.checkDataType)(Ne.type,ne,Pe.strictNumbers)),ve(F,Ne),N.length===1&&N[0]===Ne.type&&I&&(U.else(),(0,n.reportTypeError)(F)),U.endIf()):ve(F,Ne),_e||U.if((0,u._)`${o.default.errors} === ${M||0}`))}}function ve(F,N){const{gen:I,schema:M,opts:{useDefaults:U}}=F;U&&(0,a.assignDefaults)(F,N.type),I.block(()=>{for(const J of N.rules)(0,r.shouldUseRule)(M,J)&&B(F,J.keyword,J.definition,N.type)})}function fe(F,N){F.schemaEnv.meta||!F.opts.strictTypes||(ae(F,N),F.opts.allowUnionTypes||L(F,N),O(F,F.dataTypes))}function ae(F,N){if(N.length){if(!F.dataTypes.length){F.dataTypes=N;return}N.forEach(I=>{R(F.dataTypes,I)||P(F,`type "${I}" not allowed by context "${F.dataTypes.join(",")}"`)}),p(F,N)}}function L(F,N){N.length>1&&!(N.length===2&&N.includes("null"))&&P(F,"use allowUnionTypes to allow union type keyword")}function O(F,N){const I=F.self.RULES.all;for(const M in I){const U=I[M];if(typeof U=="object"&&(0,r.shouldUseRule)(F.schema,U)){const{type:J}=U.definition;J.length&&!J.some(ne=>A(N,ne))&&P(F,`missing type "${J.join(",")}" for keyword "${M}"`)}}}function A(F,N){return F.includes(N)||N==="number"&&F.includes("integer")}function R(F,N){return F.includes(N)||N==="integer"&&F.includes("number")}function p(F,N){const I=[];for(const M of F.dataTypes)R(N,M)?I.push(M):N.includes("integer")&&M==="number"&&I.push("integer");F.dataTypes=I}function P(F,N){const I=F.schemaEnv.baseId+F.errSchemaPath;N+=` at "${I}" (strictTypes)`,(0,f.checkStrictMode)(F,N,F.opts.strictTypes)}class C{constructor(N,I,M){if((0,c.validateKeywordUsage)(N,I,M),this.gen=N.gen,this.allErrors=N.allErrors,this.keyword=M,this.data=N.data,this.schema=N.schema[M],this.$data=I.$data&&N.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(N,this.schema,M,this.$data),this.schemaType=I.schemaType,this.parentSchema=N.schema,this.params={},this.it=N,this.def=I,this.$data)this.schemaCode=N.gen.const("vSchema",Z(this.$data,N));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,I.schemaType,I.allowUndefined))throw new Error(`${M} value must be ${JSON.stringify(I.schemaType)}`);("code"in I?I.trackErrors:I.errors!==!1)&&(this.errsCount=N.gen.const("_errs",o.default.errors))}result(N,I,M){this.failResult((0,u.not)(N),I,M)}failResult(N,I,M){this.gen.if(N),M?M():this.error(),I?(this.gen.else(),I(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(N,I){this.failResult((0,u.not)(N),void 0,I)}fail(N){if(N===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(N),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(N){if(!this.$data)return this.fail(N);const{schemaCode:I}=this;this.fail((0,u._)`${I} !== undefined && (${(0,u.or)(this.invalid$data(),N)})`)}error(N,I,M){if(I){this.setParams(I),this._error(N,M),this.setParams({});return}this._error(N,M)}_error(N,I){(N?w.reportExtraError:w.reportError)(this,this.def.error,I)}$dataError(){(0,w.reportError)(this,this.def.$dataError||w.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,w.resetErrorsCount)(this.gen,this.errsCount)}ok(N){this.allErrors||this.gen.if(N)}setParams(N,I){I?Object.assign(this.params,N):this.params=N}block$data(N,I,M=u.nil){this.gen.block(()=>{this.check$data(N,M),I()})}check$data(N=u.nil,I=u.nil){if(!this.$data)return;const{gen:M,schemaCode:U,schemaType:J,def:ne}=this;M.if((0,u.or)((0,u._)`${U} === undefined`,I)),N!==u.nil&&M.assign(N,!0),(J.length||ne.validateSchema)&&(M.elseIf(this.invalid$data()),this.$dataError(),N!==u.nil&&M.assign(N,!1)),M.else()}invalid$data(){const{gen:N,schemaCode:I,schemaType:M,def:U,it:J}=this;return(0,u.or)(ne(),_e());function ne(){if(M.length){if(!(I instanceof u.Name))throw new Error("ajv implementation error");const Pe=Array.isArray(M)?M:[M];return(0,u._)`${(0,n.checkDataTypes)(Pe,I,J.opts.strictNumbers,n.DataType.Wrong)}`}return u.nil}function _e(){if(U.validateSchema){const Pe=N.scopeValue("validate$data",{ref:U.validateSchema});return(0,u._)`!${Pe}(${I})`}return u.nil}}subschema(N,I){const M=(0,s.getSubschema)(this.it,N);(0,s.extendSubschemaData)(M,this.it,N),(0,s.extendSubschemaMode)(M,N);const U={...this.it,...M,items:void 0,props:void 0};return l(U,I),U}mergeEvaluated(N,I){const{it:M,gen:U}=this;M.opts.unevaluated&&(M.props!==!0&&N.props!==void 0&&(M.props=f.mergeEvaluated.props(U,N.props,M.props,I)),M.items!==!0&&N.items!==void 0&&(M.items=f.mergeEvaluated.items(U,N.items,M.items,I)))}mergeValidEvaluated(N,I){const{it:M,gen:U}=this;if(M.opts.unevaluated&&(M.props!==!0||M.items!==!0))return U.if(I,()=>this.mergeEvaluated(N,u.Name)),!0}}Xt.KeywordCxt=C;function B(F,N,I,M){const U=new C(F,I,N);"code"in I?I.code(U,M):U.$data&&I.validate?(0,c.funcKeywordCode)(U,I):"macro"in I?(0,c.macroKeywordCode)(U,I):(I.compile||I.validate)&&(0,c.funcKeywordCode)(U,I)}const G=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Z(F,{dataLevel:N,dataNames:I,dataPathArr:M}){let U,J;if(F==="")return o.default.rootData;if(F[0]==="/"){if(!G.test(F))throw new Error(`Invalid JSON-pointer: ${F}`);U=F,J=o.default.rootData}else{const Ee=re.exec(F);if(!Ee)throw new Error(`Invalid JSON-pointer: ${F}`);const $e=+Ee[1];if(U=Ee[2],U==="#"){if($e>=N)throw new Error(Pe("property/index",$e));return M[N-$e]}if($e>N)throw new Error(Pe("data",$e));if(J=I[N-$e],!U)return J}let ne=J;const _e=U.split("/");for(const Ee of _e)Ee&&(J=(0,u._)`${J}${(0,u.getProperty)((0,f.unescapeJsonPointer)(Ee))}`,ne=(0,u._)`${ne} && ${J}`);return ne;function Pe(Ee,$e){return`Cannot access ${Ee} ${$e} levels up, current level is ${N}`}}return Xt.getData=Z,Xt}var rn={},_i;function Pa(){if(_i)return rn;_i=1,Object.defineProperty(rn,"__esModule",{value:!0});class t extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return rn.default=t,rn}var nn={},wi;function ys(){if(wi)return nn;wi=1,Object.defineProperty(nn,"__esModule",{value:!0});const t=ms();class e extends Error{constructor(n,a,c,s){super(s||`can't resolve reference ${c} from id ${a}`),this.missingRef=(0,t.resolveUrl)(n,a,c),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(n,this.missingRef))}}return nn.default=e,nn}var Nt={},$i;function ka(){if($i)return Nt;$i=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.resolveSchema=Nt.getCompilingSchema=Nt.resolveRef=Nt.compileSchema=Nt.SchemaEnv=void 0;const t=qe(),e=Pa(),r=fr(),n=ms(),a=He(),c=gs();class s{constructor(i){var d;this.refs={},this.dynamicAnchors={};let l;typeof i.schema=="object"&&(l=i.schema),this.schema=i.schema,this.schemaId=i.schemaId,this.root=i.root||this,this.baseId=(d=i.baseId)!==null&&d!==void 0?d:(0,n.normalizeId)(l==null?void 0:l[i.schemaId||"$id"]),this.schemaPath=i.schemaPath,this.localRefs=i.localRefs,this.meta=i.meta,this.$async=l==null?void 0:l.$async,this.refs={}}}Nt.SchemaEnv=s;function u(h){const i=f.call(this,h);if(i)return i;const d=(0,n.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:l,lines:_}=this.opts.code,{ownProperties:m}=this.opts,g=new t.CodeGen(this.scope,{es5:l,lines:_,ownProperties:m});let v;h.$async&&(v=g.scopeValue("Error",{ref:e.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));const k=g.scopeName("validate");h.validateName=k;const T={gen:g,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:g.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,t.stringify)(h.schema)}:{ref:h.schema}),validateName:k,ValidationError:v,schema:h.schema,schemaEnv:h,rootId:d,baseId:h.baseId||d,schemaPath:t.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this};let j;try{this._compilations.add(h),(0,c.validateFunctionCode)(T),g.optimize(this.opts.code.optimize);const V=g.toString();j=`${g.scopeRefs(r.default.scope)}return ${V}`,this.opts.code.process&&(j=this.opts.code.process(j,h));const W=new Function(`${r.default.self}`,`${r.default.scope}`,j)(this,this.scope.get());if(this.scope.value(k,{ref:W}),W.errors=null,W.schema=h.schema,W.schemaEnv=h,h.$async&&(W.$async=!0),this.opts.code.source===!0&&(W.source={validateName:k,validateCode:V,scopeValues:g._values}),this.opts.unevaluated){const{props:x,items:te}=T;W.evaluated={props:x instanceof t.Name?void 0:x,items:te instanceof t.Name?void 0:te,dynamicProps:x instanceof t.Name,dynamicItems:te instanceof t.Name},W.source&&(W.source.evaluated=(0,t.stringify)(W.evaluated))}return h.validate=W,h}catch(V){throw delete h.validate,delete h.validateName,j&&this.logger.error("Error compiling schema, function code:",j),V}finally{this._compilations.delete(h)}}Nt.compileSchema=u;function o(h,i,d){var l;d=(0,n.resolveUrl)(this.opts.uriResolver,i,d);const _=h.refs[d];if(_)return _;let m=$.call(this,h,d);if(m===void 0){const g=(l=h.localRefs)===null||l===void 0?void 0:l[d],{schemaId:v}=this.opts;g&&(m=new s({schema:g,schemaId:v,root:h,baseId:i}))}if(m!==void 0)return h.refs[d]=y.call(this,m)}Nt.resolveRef=o;function y(h){return(0,n.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:u.call(this,h)}function f(h){for(const i of this._compilations)if(w(i,h))return i}Nt.getCompilingSchema=f;function w(h,i){return h.schema===i.schema&&h.root===i.root&&h.baseId===i.baseId}function $(h,i){let d;for(;typeof(d=this.refs[i])=="string";)i=d;return d||this.schemas[i]||E.call(this,h,i)}function E(h,i){const d=this.opts.uriResolver.parse(i),l=(0,n._getFullPath)(this.opts.uriResolver,d);let _=(0,n.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&l===_)return S.call(this,d,h);const m=(0,n.normalizeId)(l),g=this.refs[m]||this.schemas[m];if(typeof g=="string"){const v=E.call(this,h,g);return typeof(v==null?void 0:v.schema)!="object"?void 0:S.call(this,d,v)}if(typeof(g==null?void 0:g.schema)=="object"){if(g.validate||u.call(this,g),m===(0,n.normalizeId)(i)){const{schema:v}=g,{schemaId:k}=this.opts,T=v[k];return T&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,T)),new s({schema:v,schemaId:k,root:h,baseId:_})}return S.call(this,d,g)}}Nt.resolveSchema=E;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(h,{baseId:i,schema:d,root:l}){var _;if(((_=h.fragment)===null||_===void 0?void 0:_[0])!=="/")return;for(const v of h.fragment.slice(1).split("/")){if(typeof d=="boolean")return;const k=d[(0,a.unescapeFragment)(v)];if(k===void 0)return;d=k;const T=typeof d=="object"&&d[this.opts.schemaId];!b.has(v)&&T&&(i=(0,n.resolveUrl)(this.opts.uriResolver,i,T))}let m;if(typeof d!="boolean"&&d.$ref&&!(0,a.schemaHasRulesButRef)(d,this.RULES)){const v=(0,n.resolveUrl)(this.opts.uriResolver,i,d.$ref);m=E.call(this,l,v)}const{schemaId:g}=this.opts;if(m=m||new s({schema:d,schemaId:g,root:l,baseId:i}),m.schema!==m.root.schema)return m}return Nt}const Yh="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Zh="Meta-schema for $data reference (JSON AnySchema extension proposal)",ep="object",tp=["$data"],rp={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},np=!1,sp={$id:Yh,description:Zh,type:ep,required:tp,properties:rp,additionalProperties:np};var sn={},Ir={exports:{}},Ks,bi;function $c(){if(bi)return Ks;bi=1;const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),e=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r($){let E="",b=0,S=0;for(S=0;S<$.length;S++)if(b=$[S].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";E+=$[S];break}for(S+=1;S<$.length;S++){if(b=$[S].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";E+=$[S]}return E}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a($){return $.length=0,!0}function c($,E,b){if($.length){const S=r($);if(S!=="")E.push(S);else return b.error=!0,!1;$.length=0}return!0}function s($){let E=0;const b={error:!1,address:"",zone:""},S=[],h=[];let i=!1,d=!1,l=c;for(let _=0;_<$.length;_++){const m=$[_];if(!(m==="["||m==="]"))if(m===":"){if(i===!0&&(d=!0),!l(h,S,b))break;if(++E>7){b.error=!0;break}_>0&&$[_-1]===":"&&(i=!0),S.push(":");continue}else if(m==="%"){if(!l(h,S,b))break;l=a}else{h.push(m);continue}}return h.length&&(l===a?b.zone=h.join(""):d?S.push(h.join("")):S.push(r(h))),b.address=S.join(""),b}function u($){if(o($,":")<2)return{host:$,isIPV6:!1};const E=s($);if(E.error)return{host:$,isIPV6:!1};{let b=E.address,S=E.address;return E.zone&&(b+="%"+E.zone,S+="%25"+E.zone),{host:b,isIPV6:!0,escapedHost:S}}}function o($,E){let b=0;for(let S=0;S<$.length;S++)$[S]===E&&b++;return b}function y($){let E=$;const b=[];let S=-1,h=0;for(;h=E.length;){if(h===1){if(E===".")break;if(E==="/"){b.push("/");break}else{b.push(E);break}}else if(h===2){if(E[0]==="."){if(E[1]===".")break;if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&(E[1]==="."||E[1]==="/")){b.push("/");break}}else if(h===3&&E==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(E[0]==="."){if(E[1]==="."){if(E[2]==="/"){E=E.slice(3);continue}}else if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&E[1]==="."){if(E[2]==="/"){E=E.slice(2);continue}else if(E[2]==="."&&E[3]==="/"){E=E.slice(3),b.length!==0&&b.pop();continue}}if((S=E.indexOf("/",1))===-1){b.push(E);break}else b.push(E.slice(0,S)),E=E.slice(S)}return b.join("")}function f($,E){const b=E!==!0?escape:unescape;return $.scheme!==void 0&&($.scheme=b($.scheme)),$.userinfo!==void 0&&($.userinfo=b($.userinfo)),$.host!==void 0&&($.host=b($.host)),$.path!==void 0&&($.path=b($.path)),$.query!==void 0&&($.query=b($.query)),$.fragment!==void 0&&($.fragment=b($.fragment)),$}function w($){const E=[];if($.userinfo!==void 0&&(E.push($.userinfo),E.push("@")),$.host!==void 0){let b=unescape($.host);if(!e(b)){const S=u(b);S.isIPV6===!0?b=`[${S.escapedHost}]`:b=$.host}E.push(b)}return(typeof $.port=="number"||typeof $.port=="string")&&(E.push(":"),E.push(String($.port))),E.length?E.join(""):void 0}return Ks={nonSimpleDomain:n,recomposeAuthority:w,normalizeComponentEncoding:f,removeDotSegments:y,isIPv4:e,isUUID:t,normalizeIPv6:u,stringArrayToHexStripped:r},Ks}var Hs,Ei;function ap(){if(Ei)return Hs;Ei=1;const{isUUID:t}=$c(),e=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(m){return r.indexOf(m)!==-1}function a(m){return m.secure===!0?!0:m.secure===!1?!1:m.scheme?m.scheme.length===3&&(m.scheme[0]==="w"||m.scheme[0]==="W")&&(m.scheme[1]==="s"||m.scheme[1]==="S")&&(m.scheme[2]==="s"||m.scheme[2]==="S"):!1}function c(m){return m.host||(m.error=m.error||"HTTP URIs must have a host."),m}function s(m){const g=String(m.scheme).toLowerCase()==="https";return(m.port===(g?443:80)||m.port==="")&&(m.port=void 0),m.path||(m.path="/"),m}function u(m){return m.secure=a(m),m.resourceName=(m.path||"/")+(m.query?"?"+m.query:""),m.path=void 0,m.query=void 0,m}function o(m){if((m.port===(a(m)?443:80)||m.port==="")&&(m.port=void 0),typeof m.secure=="boolean"&&(m.scheme=m.secure?"wss":"ws",m.secure=void 0),m.resourceName){const[g,v]=m.resourceName.split("?");m.path=g&&g!=="/"?g:void 0,m.query=v,m.resourceName=void 0}return m.fragment=void 0,m}function y(m,g){if(!m.path)return m.error="URN can not be parsed",m;const v=m.path.match(e);if(v){const k=g.scheme||m.scheme||"urn";m.nid=v[1].toLowerCase(),m.nss=v[2];const T=`${k}:${g.nid||m.nid}`,j=_(T);m.path=void 0,j&&(m=j.parse(m,g))}else m.error=m.error||"URN can not be parsed.";return m}function f(m,g){if(m.nid===void 0)throw new Error("URN without nid cannot be serialized");const v=g.scheme||m.scheme||"urn",k=m.nid.toLowerCase(),T=`${v}:${g.nid||k}`,j=_(T);j&&(m=j.serialize(m,g));const V=m,q=m.nss;return V.path=`${k||g.nid}:${q}`,g.skipEscape=!0,V}function w(m,g){const v=m;return v.uuid=v.nss,v.nss=void 0,!g.tolerant&&(!v.uuid||!t(v.uuid))&&(v.error=v.error||"UUID is not valid."),v}function $(m){const g=m;return g.nss=(m.uuid||"").toLowerCase(),g}const E={scheme:"http",domainHost:!0,parse:c,serialize:s},b={scheme:"https",domainHost:E.domainHost,parse:c,serialize:s},S={scheme:"ws",domainHost:!0,parse:u,serialize:o},h={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},l={http:E,https:b,ws:S,wss:h,urn:{scheme:"urn",parse:y,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:w,serialize:$,skipNormalize:!0}};Object.setPrototypeOf(l,null);function _(m){return m&&(l[m]||l[m.toLowerCase()])||void 0}return Hs={wsIsSecure:a,SCHEMES:l,isValidSchemeName:n,getSchemeHandler:_},Hs}var Si;function ip(){if(Si)return Ir.exports;Si=1;const{normalizeIPv6:t,removeDotSegments:e,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:a,nonSimpleDomain:c}=$c(),{SCHEMES:s,getSchemeHandler:u}=ap();function o(h,i){return typeof h=="string"?h=$(b(h,i),i):typeof h=="object"&&(h=b($(h,i),i)),h}function y(h,i,d){const l=d?Object.assign({scheme:"null"},d):{scheme:"null"},_=f(b(h,l),b(i,l),l,!0);return l.skipEscape=!0,$(_,l)}function f(h,i,d,l){const _={};return l||(h=b($(h,d),d),i=b($(i,d),d)),d=d||{},!d.tolerant&&i.scheme?(_.scheme=i.scheme,_.userinfo=i.userinfo,_.host=i.host,_.port=i.port,_.path=e(i.path||""),_.query=i.query):(i.userinfo!==void 0||i.host!==void 0||i.port!==void 0?(_.userinfo=i.userinfo,_.host=i.host,_.port=i.port,_.path=e(i.path||""),_.query=i.query):(i.path?(i.path[0]==="/"?_.path=e(i.path):((h.userinfo!==void 0||h.host!==void 0||h.port!==void 0)&&!h.path?_.path="/"+i.path:h.path?_.path=h.path.slice(0,h.path.lastIndexOf("/")+1)+i.path:_.path=i.path,_.path=e(_.path)),_.query=i.query):(_.path=h.path,i.query!==void 0?_.query=i.query:_.query=h.query),_.userinfo=h.userinfo,_.host=h.host,_.port=h.port),_.scheme=h.scheme),_.fragment=i.fragment,_}function w(h,i,d){return typeof h=="string"?(h=unescape(h),h=$(n(b(h,d),!0),{...d,skipEscape:!0})):typeof h=="object"&&(h=$(n(h,!0),{...d,skipEscape:!0})),typeof i=="string"?(i=unescape(i),i=$(n(b(i,d),!0),{...d,skipEscape:!0})):typeof i=="object"&&(i=$(n(i,!0),{...d,skipEscape:!0})),h.toLowerCase()===i.toLowerCase()}function $(h,i){const d={host:h.host,scheme:h.scheme,userinfo:h.userinfo,port:h.port,path:h.path,query:h.query,nid:h.nid,nss:h.nss,uuid:h.uuid,fragment:h.fragment,reference:h.reference,resourceName:h.resourceName,secure:h.secure,error:""},l=Object.assign({},i),_=[],m=u(l.scheme||d.scheme);m&&m.serialize&&m.serialize(d,l),d.path!==void 0&&(l.skipEscape?d.path=unescape(d.path):(d.path=escape(d.path),d.scheme!==void 0&&(d.path=d.path.split("%3A").join(":")))),l.reference!=="suffix"&&d.scheme&&_.push(d.scheme,":");const g=r(d);if(g!==void 0&&(l.reference!=="suffix"&&_.push("//"),_.push(g),d.path&&d.path[0]!=="/"&&_.push("/")),d.path!==void 0){let v=d.path;!l.absolutePath&&(!m||!m.absolutePath)&&(v=e(v)),g===void 0&&v[0]==="/"&&v[1]==="/"&&(v="/%2F"+v.slice(2)),_.push(v)}return d.query!==void 0&&_.push("?",d.query),d.fragment!==void 0&&_.push("#",d.fragment),_.join("")}const E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(h,i){const d=Object.assign({},i),l={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let _=!1;d.reference==="suffix"&&(d.scheme?h=d.scheme+":"+h:h="//"+h);const m=h.match(E);if(m){if(l.scheme=m[1],l.userinfo=m[3],l.host=m[4],l.port=parseInt(m[5],10),l.path=m[6]||"",l.query=m[7],l.fragment=m[8],isNaN(l.port)&&(l.port=m[5]),l.host)if(a(l.host)===!1){const k=t(l.host);l.host=k.host.toLowerCase(),_=k.isIPV6}else _=!0;l.scheme===void 0&&l.userinfo===void 0&&l.host===void 0&&l.port===void 0&&l.query===void 0&&!l.path?l.reference="same-document":l.scheme===void 0?l.reference="relative":l.fragment===void 0?l.reference="absolute":l.reference="uri",d.reference&&d.reference!=="suffix"&&d.reference!==l.reference&&(l.error=l.error||"URI is not a "+d.reference+" reference.");const g=u(d.scheme||l.scheme);if(!d.unicodeSupport&&(!g||!g.unicodeSupport)&&l.host&&(d.domainHost||g&&g.domainHost)&&_===!1&&c(l.host))try{l.host=URL.domainToASCII(l.host.toLowerCase())}catch(v){l.error=l.error||"Host's domain name can not be converted to ASCII: "+v}(!g||g&&!g.skipNormalize)&&(h.indexOf("%")!==-1&&(l.scheme!==void 0&&(l.scheme=unescape(l.scheme)),l.host!==void 0&&(l.host=unescape(l.host))),l.path&&(l.path=escape(unescape(l.path))),l.fragment&&(l.fragment=encodeURI(decodeURIComponent(l.fragment)))),g&&g.parse&&g.parse(l,d)}else l.error=l.error||"URI can not be parsed.";return l}const S={SCHEMES:s,normalize:o,resolve:y,resolveComponent:f,equal:w,serialize:$,parse:b};return Ir.exports=S,Ir.exports.default=S,Ir.exports.fastUri=S,Ir.exports}var Pi;function op(){if(Pi)return sn;Pi=1,Object.defineProperty(sn,"__esModule",{value:!0});const t=ip();return t.code='require("ajv/dist/runtime/uri").default',sn.default=t,sn}var ki;function cp(){return ki||(ki=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=gs();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=qe();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Pa(),a=ys(),c=vc(),s=ka(),u=qe(),o=ms(),y=rs(),f=He(),w=sp,$=op(),E=(L,O)=>new RegExp(L,O);E.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),h={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."},i={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},d=200;function l(L){var O,A,R,p,P,C,B,G,re,Z,F,N,I,M,U,J,ne,_e,Pe,Ee,$e,be,Ne,Ie,pt;const xe=L.strict,dt=(O=L.code)===null||O===void 0?void 0:O.optimize,$t=dt===!0||dt===void 0?1:dt||0,ot=(R=(A=L.code)===null||A===void 0?void 0:A.regExp)!==null&&R!==void 0?R:E,bt=(p=L.uriResolver)!==null&&p!==void 0?p:$.default;return{strictSchema:(C=(P=L.strictSchema)!==null&&P!==void 0?P:xe)!==null&&C!==void 0?C:!0,strictNumbers:(G=(B=L.strictNumbers)!==null&&B!==void 0?B:xe)!==null&&G!==void 0?G:!0,strictTypes:(Z=(re=L.strictTypes)!==null&&re!==void 0?re:xe)!==null&&Z!==void 0?Z:"log",strictTuples:(N=(F=L.strictTuples)!==null&&F!==void 0?F:xe)!==null&&N!==void 0?N:"log",strictRequired:(M=(I=L.strictRequired)!==null&&I!==void 0?I:xe)!==null&&M!==void 0?M:!1,code:L.code?{...L.code,optimize:$t,regExp:ot}:{optimize:$t,regExp:ot},loopRequired:(U=L.loopRequired)!==null&&U!==void 0?U:d,loopEnum:(J=L.loopEnum)!==null&&J!==void 0?J:d,meta:(ne=L.meta)!==null&&ne!==void 0?ne:!0,messages:(_e=L.messages)!==null&&_e!==void 0?_e:!0,inlineRefs:(Pe=L.inlineRefs)!==null&&Pe!==void 0?Pe:!0,schemaId:(Ee=L.schemaId)!==null&&Ee!==void 0?Ee:"$id",addUsedSchema:($e=L.addUsedSchema)!==null&&$e!==void 0?$e:!0,validateSchema:(be=L.validateSchema)!==null&&be!==void 0?be:!0,validateFormats:(Ne=L.validateFormats)!==null&&Ne!==void 0?Ne:!0,unicodeRegExp:(Ie=L.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(pt=L.int32range)!==null&&pt!==void 0?pt:!0,uriResolver:bt}}class _{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...l(O)};const{es5:A,lines:R}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:S,es5:A,lines:R}),this.logger=q(O.logger);const p=O.validateFormats;O.validateFormats=!1,this.RULES=(0,c.getRules)(),m.call(this,h,O,"NOT SUPPORTED"),m.call(this,i,O,"DEPRECATED","warn"),this._metaOpts=j.call(this),O.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&T.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),v.call(this),O.validateFormats=p}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:A,schemaId:R}=this.opts;let p=w;R==="id"&&(p={...w},p.id=p.$id,delete p.$id),A&&O&&this.addMetaSchema(p,p[R],!1)}defaultMeta(){const{meta:O,schemaId:A}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[A]||O:void 0}validate(O,A){let R;if(typeof O=="string"){if(R=this.getSchema(O),!R)throw new Error(`no schema with key or ref "${O}"`)}else R=this.compile(O);const p=R(A);return"$async"in R||(this.errors=R.errors),p}compile(O,A){const R=this._addSchema(O,A);return R.validate||this._compileSchemaEnv(R)}compileAsync(O,A){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return p.call(this,O,A);async function p(Z,F){await P.call(this,Z.$schema);const N=this._addSchema(Z,F);return N.validate||C.call(this,N)}async function P(Z){Z&&!this.getSchema(Z)&&await p.call(this,{$ref:Z},!0)}async function C(Z){try{return this._compileSchemaEnv(Z)}catch(F){if(!(F instanceof a.default))throw F;return B.call(this,F),await G.call(this,F.missingSchema),C.call(this,Z)}}function B({missingSchema:Z,missingRef:F}){if(this.refs[Z])throw new Error(`AnySchema ${Z} is loaded but ${F} cannot be resolved`)}async function G(Z){const F=await re.call(this,Z);this.refs[Z]||await P.call(this,F.$schema),this.refs[Z]||this.addSchema(F,Z,A)}async function re(Z){const F=this._loading[Z];if(F)return F;try{return await(this._loading[Z]=R(Z))}finally{delete this._loading[Z]}}}addSchema(O,A,R,p=this.opts.validateSchema){if(Array.isArray(O)){for(const C of O)this.addSchema(C,void 0,R,p);return this}let P;if(typeof O=="object"){const{schemaId:C}=this.opts;if(P=O[C],P!==void 0&&typeof P!="string")throw new Error(`schema ${C} must be string`)}return A=(0,o.normalizeId)(A||P),this._checkUnique(A),this.schemas[A]=this._addSchema(O,R,A,p,!0),this}addMetaSchema(O,A,R=this.opts.validateSchema){return this.addSchema(O,A,!0,R),this}validateSchema(O,A){if(typeof O=="boolean")return!0;let R;if(R=O.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const p=this.validate(R,O);if(!p&&A){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return p}getSchema(O){let A;for(;typeof(A=g.call(this,O))=="string";)O=A;if(A===void 0){const{schemaId:R}=this.opts,p=new s.SchemaEnv({schema:{},schemaId:R});if(A=s.resolveSchema.call(this,p,O),!A)return;this.refs[O]=A}return A.validate||this._compileSchemaEnv(A)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const A=g.call(this,O);return typeof A=="object"&&this._cache.delete(A.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const A=O;this._cache.delete(A);let R=O[this.opts.schemaId];return R&&(R=(0,o.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const A of O)this.addKeyword(A);return this}addKeyword(O,A){let R;if(typeof O=="string")R=O,typeof A=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),A.keyword=R);else if(typeof O=="object"&&A===void 0){if(A=O,R=A.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(x.call(this,R,A),!A)return(0,f.eachItem)(R,P=>te.call(this,P)),this;ve.call(this,A);const p={...A,type:(0,y.getJSONTypes)(A.type),schemaType:(0,y.getJSONTypes)(A.schemaType)};return(0,f.eachItem)(R,p.type.length===0?P=>te.call(this,P,p):P=>p.type.forEach(C=>te.call(this,P,p,C))),this}getKeyword(O){const A=this.RULES.all[O];return typeof A=="object"?A.definition:!!A}removeKeyword(O){const{RULES:A}=this;delete A.keywords[O],delete A.all[O];for(const R of A.rules){const p=R.rules.findIndex(P=>P.keyword===O);p>=0&&R.rules.splice(p,1)}return this}addFormat(O,A){return typeof A=="string"&&(A=new RegExp(A)),this.formats[O]=A,this}errorsText(O=this.errors,{separator:A=", ",dataVar:R="data"}={}){return!O||O.length===0?"No errors":O.map(p=>`${R}${p.instancePath} ${p.message}`).reduce((p,P)=>p+A+P)}$dataMetaSchema(O,A){const R=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const p of A){const P=p.split("/").slice(1);let C=O;for(const B of P)C=C[B];for(const B in R){const G=R[B];if(typeof G!="object")continue;const{$data:re}=G.definition,Z=C[B];re&&Z&&(C[B]=ae(Z))}}return O}_removeAllSchemas(O,A){for(const R in O){const p=O[R];(!A||A.test(R))&&(typeof p=="string"?delete O[R]:p&&!p.meta&&(this._cache.delete(p.schema),delete O[R]))}}_addSchema(O,A,R,p=this.opts.validateSchema,P=this.opts.addUsedSchema){let C;const{schemaId:B}=this.opts;if(typeof O=="object")C=O[B];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let G=this._cache.get(O);if(G!==void 0)return G;R=(0,o.normalizeId)(C||R);const re=o.getSchemaRefs.call(this,O,R);return G=new s.SchemaEnv({schema:O,schemaId:B,meta:A,baseId:R,localRefs:re}),this._cache.set(G.schema,G),P&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=G),p&&this.validateSchema(O,!0),G}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):s.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const A=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,O)}finally{this.opts=A}}}_.ValidationError=n.default,_.MissingRefError=a.default,t.default=_;function m(L,O,A,R="error"){for(const p in L){const P=p;P in O&&this.logger[R](`${A}: option ${p}. ${L[P]}`)}}function g(L){return L=(0,o.normalizeId)(L),this.schemas[L]||this.refs[L]}function v(){const L=this.opts.schemas;if(L)if(Array.isArray(L))this.addSchema(L);else for(const O in L)this.addSchema(L[O],O)}function k(){for(const L in this.opts.formats){const O=this.opts.formats[L];O&&this.addFormat(L,O)}}function T(L){if(Array.isArray(L)){this.addVocabulary(L);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in L){const A=L[O];A.keyword||(A.keyword=O),this.addKeyword(A)}}function j(){const L={...this.opts};for(const O of b)delete L[O];return L}const V={log(){},warn(){},error(){}};function q(L){if(L===!1)return V;if(L===void 0)return console;if(L.log&&L.warn&&L.error)return L;throw new Error("logger must implement log, warn and error methods")}const W=/^[a-z_$][a-z0-9_$:-]*$/i;function x(L,O){const{RULES:A}=this;if((0,f.eachItem)(L,R=>{if(A.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!W.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function te(L,O,A){var R;const p=O==null?void 0:O.post;if(A&&p)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let C=p?P.post:P.rules.find(({type:G})=>G===A);if(C||(C={type:A,rules:[]},P.rules.push(C)),P.keywords[L]=!0,!O)return;const B={keyword:L,definition:{...O,type:(0,y.getJSONTypes)(O.type),schemaType:(0,y.getJSONTypes)(O.schemaType)}};O.before?ue.call(this,C,B,O.before):C.rules.push(B),P.all[L]=B,(R=O.implements)===null||R===void 0||R.forEach(G=>this.addKeyword(G))}function ue(L,O,A){const R=L.rules.findIndex(p=>p.keyword===A);R>=0?L.rules.splice(R,0,O):(L.rules.push(O),this.logger.warn(`rule ${A} is not defined`))}function ve(L){let{metaSchema:O}=L;O!==void 0&&(L.$data&&this.opts.$data&&(O=ae(O)),L.validateSchema=this.compile(O,!0))}const fe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ae(L){return{anyOf:[L,fe]}}}(Ds)),Ds}var an={},on={},cn={},Oi;function up(){if(Oi)return cn;Oi=1,Object.defineProperty(cn,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return cn.default=t,cn}var ir={},Ni;function lp(){if(Ni)return ir;Ni=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.callRef=ir.getValidate=void 0;const t=ys(),e=zt(),r=qe(),n=fr(),a=ka(),c=He(),s={keyword:"$ref",schemaType:"string",code(y){const{gen:f,schema:w,it:$}=y,{baseId:E,schemaEnv:b,validateName:S,opts:h,self:i}=$,{root:d}=b;if((w==="#"||w==="#/")&&E===d.baseId)return _();const l=a.resolveRef.call(i,d,E,w);if(l===void 0)throw new t.default($.opts.uriResolver,E,w);if(l instanceof a.SchemaEnv)return m(l);return g(l);function _(){if(b===d)return o(y,S,b,b.$async);const v=f.scopeValue("root",{ref:d});return o(y,(0,r._)`${v}.validate`,d,d.$async)}function m(v){const k=u(y,v);o(y,k,v,v.$async)}function g(v){const k=f.scopeValue("schema",h.code.source===!0?{ref:v,code:(0,r.stringify)(v)}:{ref:v}),T=f.name("valid"),j=y.subschema({schema:v,dataTypes:[],schemaPath:r.nil,topSchemaRef:k,errSchemaPath:w},T);y.mergeEvaluated(j),y.ok(T)}}};function u(y,f){const{gen:w}=y;return f.validate?w.scopeValue("validate",{ref:f.validate}):(0,r._)`${w.scopeValue("wrapper",{ref:f})}.validate`}ir.getValidate=u;function o(y,f,w,$){const{gen:E,it:b}=y,{allErrors:S,schemaEnv:h,opts:i}=b,d=i.passContext?n.default.this:r.nil;$?l():_();function l(){if(!h.$async)throw new Error("async schema referenced by sync schema");const v=E.let("valid");E.try(()=>{E.code((0,r._)`await ${(0,e.callValidateCode)(y,f,d)}`),g(f),S||E.assign(v,!0)},k=>{E.if((0,r._)`!(${k} instanceof ${b.ValidationError})`,()=>E.throw(k)),m(k),S||E.assign(v,!1)}),y.ok(v)}function _(){y.result((0,e.callValidateCode)(y,f,d),()=>g(f),()=>m(f))}function m(v){const k=(0,r._)`${v}.errors`;E.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${k} : ${n.default.vErrors}.concat(${k})`),E.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function g(v){var k;if(!b.opts.unevaluated)return;const T=(k=w==null?void 0:w.validate)===null||k===void 0?void 0:k.evaluated;if(b.props!==!0)if(T&&!T.dynamicProps)T.props!==void 0&&(b.props=c.mergeEvaluated.props(E,T.props,b.props));else{const j=E.var("props",(0,r._)`${v}.evaluated.props`);b.props=c.mergeEvaluated.props(E,j,b.props,r.Name)}if(b.items!==!0)if(T&&!T.dynamicItems)T.items!==void 0&&(b.items=c.mergeEvaluated.items(E,T.items,b.items));else{const j=E.var("items",(0,r._)`${v}.evaluated.items`);b.items=c.mergeEvaluated.items(E,j,b.items,r.Name)}}}return ir.callRef=o,ir.default=s,ir}var Ri;function fp(){if(Ri)return on;Ri=1,Object.defineProperty(on,"__esModule",{value:!0});const t=up(),e=lp(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,e.default];return on.default=r,on}var un={},ln={},Ti;function dp(){if(Ti)return ln;Ti=1,Object.defineProperty(ln,"__esModule",{value:!0});const t=qe(),e=t.operators,r={maximum:{okStr:"<=",ok:e.LTE,fail:e.GT},minimum:{okStr:">=",ok:e.GTE,fail:e.LT},exclusiveMaximum:{okStr:"<",ok:e.LT,fail:e.GTE},exclusiveMinimum:{okStr:">",ok:e.GT,fail:e.LTE}},n={message:({keyword:c,schemaCode:s})=>(0,t.str)`must be ${r[c].okStr} ${s}`,params:({keyword:c,schemaCode:s})=>(0,t._)`{comparison: ${r[c].okStr}, limit: ${s}}`},a={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(c){const{keyword:s,data:u,schemaCode:o}=c;c.fail$data((0,t._)`${u} ${r[s].fail} ${o} || isNaN(${u})`)}};return ln.default=a,ln}var fn={},Ii;function hp(){if(Ii)return fn;Ii=1,Object.defineProperty(fn,"__esModule",{value:!0});const t=qe(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,t._)`{multipleOf: ${n}}`},code(n){const{gen:a,data:c,schemaCode:s,it:u}=n,o=u.opts.multipleOfPrecision,y=a.let("res"),f=o?(0,t._)`Math.abs(Math.round(${y}) - ${y}) > 1e-${o}`:(0,t._)`${y} !== parseInt(${y})`;n.fail$data((0,t._)`(${s} === 0 || (${y} = ${c}/${s}, ${f}))`)}};return fn.default=r,fn}var dn={},hn={},Ci;function pp(){if(Ci)return hn;Ci=1,Object.defineProperty(hn,"__esModule",{value:!0});function t(e){const r=e.length;let n=0,a=0,c;for(;a<r;)n++,c=e.charCodeAt(a++),c>=55296&&c<=56319&&a<r&&(c=e.charCodeAt(a),(c&64512)===56320&&a++);return n}return hn.default=t,t.code='require("ajv/dist/runtime/ucs2length").default',hn}var Ai;function mp(){if(Ai)return dn;Ai=1,Object.defineProperty(dn,"__esModule",{value:!0});const t=qe(),e=He(),r=pp(),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:c,schemaCode:s}){const u=c==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${u} than ${s} characters`},params:({schemaCode:c})=>(0,t._)`{limit: ${c}}`},code(c){const{keyword:s,data:u,schemaCode:o,it:y}=c,f=s==="maxLength"?t.operators.GT:t.operators.LT,w=y.opts.unicode===!1?(0,t._)`${u}.length`:(0,t._)`${(0,e.useFunc)(c.gen,r.default)}(${u})`;c.fail$data((0,t._)`${w} ${f} ${o}`)}};return dn.default=a,dn}var pn={},ji;function gp(){if(ji)return pn;ji=1,Object.defineProperty(pn,"__esModule",{value:!0});const t=zt(),e=He(),r=qe(),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:c})=>(0,r.str)`must match pattern "${c}"`,params:({schemaCode:c})=>(0,r._)`{pattern: ${c}}`},code(c){const{gen:s,data:u,$data:o,schema:y,schemaCode:f,it:w}=c,$=w.opts.unicodeRegExp?"u":"";if(o){const{regExp:E}=w.opts.code,b=E.code==="new RegExp"?(0,r._)`new RegExp`:(0,e.useFunc)(s,E),S=s.let("valid");s.try(()=>s.assign(S,(0,r._)`${b}(${f}, ${$}).test(${u})`),()=>s.assign(S,!1)),c.fail$data((0,r._)`!${S}`)}else{const E=(0,t.usePattern)(c,y);c.fail$data((0,r._)`!${E}.test(${u})`)}}};return pn.default=a,pn}var mn={},Mi;function yp(){if(Mi)return mn;Mi=1,Object.defineProperty(mn,"__esModule",{value:!0});const t=qe(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:a}){const c=n==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${c} than ${a} properties`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:a,data:c,schemaCode:s}=n,u=a==="maxProperties"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`Object.keys(${c}).length ${u} ${s}`)}};return mn.default=r,mn}var gn={},Di;function vp(){if(Di)return gn;Di=1,Object.defineProperty(gn,"__esModule",{value:!0});const t=zt(),e=qe(),r=He(),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:c}})=>(0,e.str)`must have required property '${c}'`,params:({params:{missingProperty:c}})=>(0,e._)`{missingProperty: ${c}}`},code(c){const{gen:s,schema:u,schemaCode:o,data:y,$data:f,it:w}=c,{opts:$}=w;if(!f&&u.length===0)return;const E=u.length>=$.loopRequired;if(w.allErrors?b():S(),$.strictRequired){const d=c.parentSchema.properties,{definedProperties:l}=c.it;for(const _ of u)if((d==null?void 0:d[_])===void 0&&!l.has(_)){const m=w.schemaEnv.baseId+w.errSchemaPath,g=`required property "${_}" is not defined at "${m}" (strictRequired)`;(0,r.checkStrictMode)(w,g,w.opts.strictRequired)}}function b(){if(E||f)c.block$data(e.nil,h);else for(const d of u)(0,t.checkReportMissingProp)(c,d)}function S(){const d=s.let("missing");if(E||f){const l=s.let("valid",!0);c.block$data(l,()=>i(d,l)),c.ok(l)}else s.if((0,t.checkMissingProp)(c,u,d)),(0,t.reportMissingProp)(c,d),s.else()}function h(){s.forOf("prop",o,d=>{c.setParams({missingProperty:d}),s.if((0,t.noPropertyInData)(s,y,d,$.ownProperties),()=>c.error())})}function i(d,l){c.setParams({missingProperty:d}),s.forOf(d,o,()=>{s.assign(l,(0,t.propertyInData)(s,y,d,$.ownProperties)),s.if((0,e.not)(l),()=>{c.error(),s.break()})},e.nil)}}};return gn.default=a,gn}var yn={},qi;function _p(){if(qi)return yn;qi=1,Object.defineProperty(yn,"__esModule",{value:!0});const t=qe(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:a}){const c=n==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${c} than ${a} items`},params:({schemaCode:n})=>(0,t._)`{limit: ${n}}`},code(n){const{keyword:a,data:c,schemaCode:s}=n,u=a==="maxItems"?t.operators.GT:t.operators.LT;n.fail$data((0,t._)`${c}.length ${u} ${s}`)}};return yn.default=r,yn}var vn={},_n={},Vi;function Oa(){if(Vi)return _n;Vi=1,Object.defineProperty(_n,"__esModule",{value:!0});const t=wc();return t.code='require("ajv/dist/runtime/equal").default',_n.default=t,_n}var Li;function wp(){if(Li)return vn;Li=1,Object.defineProperty(vn,"__esModule",{value:!0});const t=rs(),e=qe(),r=He(),n=Oa(),c={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:s,j:u}})=>(0,e.str)`must NOT have duplicate items (items ## ${u} and ${s} are identical)`,params:({params:{i:s,j:u}})=>(0,e._)`{i: ${s}, j: ${u}}`},code(s){const{gen:u,data:o,$data:y,schema:f,parentSchema:w,schemaCode:$,it:E}=s;if(!y&&!f)return;const b=u.let("valid"),S=w.items?(0,t.getSchemaTypes)(w.items):[];s.block$data(b,h,(0,e._)`${$} === false`),s.ok(b);function h(){const _=u.let("i",(0,e._)`${o}.length`),m=u.let("j");s.setParams({i:_,j:m}),u.assign(b,!0),u.if((0,e._)`${_} > 1`,()=>(i()?d:l)(_,m))}function i(){return S.length>0&&!S.some(_=>_==="object"||_==="array")}function d(_,m){const g=u.name("item"),v=(0,t.checkDataTypes)(S,g,E.opts.strictNumbers,t.DataType.Wrong),k=u.const("indices",(0,e._)`{}`);u.for((0,e._)`;${_}--;`,()=>{u.let(g,(0,e._)`${o}[${_}]`),u.if(v,(0,e._)`continue`),S.length>1&&u.if((0,e._)`typeof ${g} == "string"`,(0,e._)`${g} += "_"`),u.if((0,e._)`typeof ${k}[${g}] == "number"`,()=>{u.assign(m,(0,e._)`${k}[${g}]`),s.error(),u.assign(b,!1).break()}).code((0,e._)`${k}[${g}] = ${_}`)})}function l(_,m){const g=(0,r.useFunc)(u,n.default),v=u.name("outer");u.label(v).for((0,e._)`;${_}--;`,()=>u.for((0,e._)`${m} = ${_}; ${m}--;`,()=>u.if((0,e._)`${g}(${o}[${_}], ${o}[${m}])`,()=>{s.error(),u.assign(b,!1).break(v)})))}}};return vn.default=c,vn}var wn={},Ui;function $p(){if(Ui)return wn;Ui=1,Object.defineProperty(wn,"__esModule",{value:!0});const t=qe(),e=He(),r=Oa(),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:c})=>(0,t._)`{allowedValue: ${c}}`},code(c){const{gen:s,data:u,$data:o,schemaCode:y,schema:f}=c;o||f&&typeof f=="object"?c.fail$data((0,t._)`!${(0,e.useFunc)(s,r.default)}(${u}, ${y})`):c.fail((0,t._)`${f} !== ${u}`)}};return wn.default=a,wn}var $n={},zi;function bp(){if(zi)return $n;zi=1,Object.defineProperty($n,"__esModule",{value:!0});const t=qe(),e=He(),r=Oa(),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:c})=>(0,t._)`{allowedValues: ${c}}`},code(c){const{gen:s,data:u,$data:o,schema:y,schemaCode:f,it:w}=c;if(!o&&y.length===0)throw new Error("enum must have non-empty array");const $=y.length>=w.opts.loopEnum;let E;const b=()=>E??(E=(0,e.useFunc)(s,r.default));let S;if($||o)S=s.let("valid"),c.block$data(S,h);else{if(!Array.isArray(y))throw new Error("ajv implementation error");const d=s.const("vSchema",f);S=(0,t.or)(...y.map((l,_)=>i(d,_)))}c.pass(S);function h(){s.assign(S,!1),s.forOf("v",f,d=>s.if((0,t._)`${b()}(${u}, ${d})`,()=>s.assign(S,!0).break()))}function i(d,l){const _=y[l];return typeof _=="object"&&_!==null?(0,t._)`${b()}(${u}, ${d}[${l}])`:(0,t._)`${u} === ${_}`}}};return $n.default=a,$n}var Fi;function Ep(){if(Fi)return un;Fi=1,Object.defineProperty(un,"__esModule",{value:!0});const t=dp(),e=hp(),r=mp(),n=gp(),a=yp(),c=vp(),s=_p(),u=wp(),o=$p(),y=bp(),f=[t.default,e.default,r.default,n.default,a.default,c.default,s.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},o.default,y.default];return un.default=f,un}var bn={},wr={},Ki;function bc(){if(Ki)return wr;Ki=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.validateAdditionalItems=void 0;const t=qe(),e=He(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,t.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,t._)`{limit: ${c}}`},code(c){const{parentSchema:s,it:u}=c,{items:o}=s;if(!Array.isArray(o)){(0,e.checkStrictMode)(u,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(c,o)}};function a(c,s){const{gen:u,schema:o,data:y,keyword:f,it:w}=c;w.items=!0;const $=u.const("len",(0,t._)`${y}.length`);if(o===!1)c.setParams({len:s.length}),c.pass((0,t._)`${$} <= ${s.length}`);else if(typeof o=="object"&&!(0,e.alwaysValidSchema)(w,o)){const b=u.var("valid",(0,t._)`${$} <= ${s.length}`);u.if((0,t.not)(b),()=>E(b)),c.ok(b)}function E(b){u.forRange("i",s.length,$,S=>{c.subschema({keyword:f,dataProp:S,dataPropType:e.Type.Num},b),w.allErrors||u.if((0,t.not)(b),()=>u.break())})}}return wr.validateAdditionalItems=a,wr.default=n,wr}var En={},$r={},Hi;function Ec(){if(Hi)return $r;Hi=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.validateTuple=void 0;const t=qe(),e=He(),r=zt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(c){const{schema:s,it:u}=c;if(Array.isArray(s))return a(c,"additionalItems",s);u.items=!0,!(0,e.alwaysValidSchema)(u,s)&&c.ok((0,r.validateArray)(c))}};function a(c,s,u=c.schema){const{gen:o,parentSchema:y,data:f,keyword:w,it:$}=c;S(y),$.opts.unevaluated&&u.length&&$.items!==!0&&($.items=e.mergeEvaluated.items(o,u.length,$.items));const E=o.name("valid"),b=o.const("len",(0,t._)`${f}.length`);u.forEach((h,i)=>{(0,e.alwaysValidSchema)($,h)||(o.if((0,t._)`${b} > ${i}`,()=>c.subschema({keyword:w,schemaProp:i,dataProp:i},E)),c.ok(E))});function S(h){const{opts:i,errSchemaPath:d}=$,l=u.length,_=l===h.minItems&&(l===h.maxItems||h[s]===!1);if(i.strictTuples&&!_){const m=`"${w}" is ${l}-tuple, but minItems or maxItems/${s} are not specified or different at path "${d}"`;(0,e.checkStrictMode)($,m,i.strictTuples)}}}return $r.validateTuple=a,$r.default=n,$r}var Bi;function Sp(){if(Bi)return En;Bi=1,Object.defineProperty(En,"__esModule",{value:!0});const t=Ec(),e={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,t.validateTuple)(r,"items")};return En.default=e,En}var Sn={},Gi;function Pp(){if(Gi)return Sn;Gi=1,Object.defineProperty(Sn,"__esModule",{value:!0});const t=qe(),e=He(),r=zt(),n=bc(),c={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,t.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,t._)`{limit: ${s}}`},code(s){const{schema:u,parentSchema:o,it:y}=s,{prefixItems:f}=o;y.items=!0,!(0,e.alwaysValidSchema)(y,u)&&(f?(0,n.validateAdditionalItems)(s,f):s.ok((0,r.validateArray)(s)))}};return Sn.default=c,Sn}var Pn={},xi;function kp(){if(xi)return Pn;xi=1,Object.defineProperty(Pn,"__esModule",{value:!0});const t=qe(),e=He(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:a,max:c}})=>c===void 0?(0,t.str)`must contain at least ${a} valid item(s)`:(0,t.str)`must contain at least ${a} and no more than ${c} valid item(s)`,params:({params:{min:a,max:c}})=>c===void 0?(0,t._)`{minContains: ${a}}`:(0,t._)`{minContains: ${a}, maxContains: ${c}}`},code(a){const{gen:c,schema:s,parentSchema:u,data:o,it:y}=a;let f,w;const{minContains:$,maxContains:E}=u;y.opts.next?(f=$===void 0?1:$,w=E):f=1;const b=c.const("len",(0,t._)`${o}.length`);if(a.setParams({min:f,max:w}),w===void 0&&f===0){(0,e.checkStrictMode)(y,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&f>w){(0,e.checkStrictMode)(y,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,e.alwaysValidSchema)(y,s)){let l=(0,t._)`${b} >= ${f}`;w!==void 0&&(l=(0,t._)`${l} && ${b} <= ${w}`),a.pass(l);return}y.items=!0;const S=c.name("valid");w===void 0&&f===1?i(S,()=>c.if(S,()=>c.break())):f===0?(c.let(S,!0),w!==void 0&&c.if((0,t._)`${o}.length > 0`,h)):(c.let(S,!1),h()),a.result(S,()=>a.reset());function h(){const l=c.name("_valid"),_=c.let("count",0);i(l,()=>c.if(l,()=>d(_)))}function i(l,_){c.forRange("i",0,b,m=>{a.subschema({keyword:"contains",dataProp:m,dataPropType:e.Type.Num,compositeRule:!0},l),_()})}function d(l){c.code((0,t._)`${l}++`),w===void 0?c.if((0,t._)`${l} >= ${f}`,()=>c.assign(S,!0).break()):(c.if((0,t._)`${l} > ${w}`,()=>c.assign(S,!1).break()),f===1?c.assign(S,!0):c.if((0,t._)`${l} >= ${f}`,()=>c.assign(S,!0)))}}};return Pn.default=n,Pn}var Bs={},Wi;function Op(){return Wi||(Wi=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=qe(),r=He(),n=zt();t.error={message:({params:{property:o,depsCount:y,deps:f}})=>{const w=y===1?"property":"properties";return(0,e.str)`must have ${w} ${f} when property ${o} is present`},params:({params:{property:o,depsCount:y,deps:f,missingProperty:w}})=>(0,e._)`{property: ${o},
41
+ missingProperty: ${w},
42
+ depsCount: ${y},
43
+ deps: ${f}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(o){const[y,f]=c(o);s(o,y),u(o,f)}};function c({schema:o}){const y={},f={};for(const w in o){if(w==="__proto__")continue;const $=Array.isArray(o[w])?y:f;$[w]=o[w]}return[y,f]}function s(o,y=o.schema){const{gen:f,data:w,it:$}=o;if(Object.keys(y).length===0)return;const E=f.let("missing");for(const b in y){const S=y[b];if(S.length===0)continue;const h=(0,n.propertyInData)(f,w,b,$.opts.ownProperties);o.setParams({property:b,depsCount:S.length,deps:S.join(", ")}),$.allErrors?f.if(h,()=>{for(const i of S)(0,n.checkReportMissingProp)(o,i)}):(f.if((0,e._)`${h} && (${(0,n.checkMissingProp)(o,S,E)})`),(0,n.reportMissingProp)(o,E),f.else())}}t.validatePropertyDeps=s;function u(o,y=o.schema){const{gen:f,data:w,keyword:$,it:E}=o,b=f.name("valid");for(const S in y)(0,r.alwaysValidSchema)(E,y[S])||(f.if((0,n.propertyInData)(f,w,S,E.opts.ownProperties),()=>{const h=o.subschema({keyword:$,schemaProp:S},b);o.mergeValidEvaluated(h,b)},()=>f.var(b,!0)),o.ok(b))}t.validateSchemaDeps=u,t.default=a}(Bs)),Bs}var kn={},Ji;function Np(){if(Ji)return kn;Ji=1,Object.defineProperty(kn,"__esModule",{value:!0});const t=qe(),e=He(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,t._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:c,schema:s,data:u,it:o}=a;if((0,e.alwaysValidSchema)(o,s))return;const y=c.name("valid");c.forIn("key",u,f=>{a.setParams({propertyName:f}),a.subschema({keyword:"propertyNames",data:f,dataTypes:["string"],propertyName:f,compositeRule:!0},y),c.if((0,t.not)(y),()=>{a.error(!0),o.allErrors||c.break()})}),a.ok(y)}};return kn.default=n,kn}var On={},Qi;function Sc(){if(Qi)return On;Qi=1,Object.defineProperty(On,"__esModule",{value:!0});const t=zt(),e=qe(),r=fr(),n=He(),c={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:s})=>(0,e._)`{additionalProperty: ${s.additionalProperty}}`},code(s){const{gen:u,schema:o,parentSchema:y,data:f,errsCount:w,it:$}=s;if(!w)throw new Error("ajv implementation error");const{allErrors:E,opts:b}=$;if($.props=!0,b.removeAdditional!=="all"&&(0,n.alwaysValidSchema)($,o))return;const S=(0,t.allSchemaProperties)(y.properties),h=(0,t.allSchemaProperties)(y.patternProperties);i(),s.ok((0,e._)`${w} === ${r.default.errors}`);function i(){u.forIn("key",f,g=>{!S.length&&!h.length?_(g):u.if(d(g),()=>_(g))})}function d(g){let v;if(S.length>8){const k=(0,n.schemaRefOrVal)($,y.properties,"properties");v=(0,t.isOwnProperty)(u,k,g)}else S.length?v=(0,e.or)(...S.map(k=>(0,e._)`${g} === ${k}`)):v=e.nil;return h.length&&(v=(0,e.or)(v,...h.map(k=>(0,e._)`${(0,t.usePattern)(s,k)}.test(${g})`))),(0,e.not)(v)}function l(g){u.code((0,e._)`delete ${f}[${g}]`)}function _(g){if(b.removeAdditional==="all"||b.removeAdditional&&o===!1){l(g);return}if(o===!1){s.setParams({additionalProperty:g}),s.error(),E||u.break();return}if(typeof o=="object"&&!(0,n.alwaysValidSchema)($,o)){const v=u.name("valid");b.removeAdditional==="failing"?(m(g,v,!1),u.if((0,e.not)(v),()=>{s.reset(),l(g)})):(m(g,v),E||u.if((0,e.not)(v),()=>u.break()))}}function m(g,v,k){const T={keyword:"additionalProperties",dataProp:g,dataPropType:n.Type.Str};k===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),s.subschema(T,v)}}};return On.default=c,On}var Nn={},Xi;function Rp(){if(Xi)return Nn;Xi=1,Object.defineProperty(Nn,"__esModule",{value:!0});const t=gs(),e=zt(),r=He(),n=Sc(),a={keyword:"properties",type:"object",schemaType:"object",code(c){const{gen:s,schema:u,parentSchema:o,data:y,it:f}=c;f.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(f,n.default,"additionalProperties"));const w=(0,e.allSchemaProperties)(u);for(const h of w)f.definedProperties.add(h);f.opts.unevaluated&&w.length&&f.props!==!0&&(f.props=r.mergeEvaluated.props(s,(0,r.toHash)(w),f.props));const $=w.filter(h=>!(0,r.alwaysValidSchema)(f,u[h]));if($.length===0)return;const E=s.name("valid");for(const h of $)b(h)?S(h):(s.if((0,e.propertyInData)(s,y,h,f.opts.ownProperties)),S(h),f.allErrors||s.else().var(E,!0),s.endIf()),c.it.definedProperties.add(h),c.ok(E);function b(h){return f.opts.useDefaults&&!f.compositeRule&&u[h].default!==void 0}function S(h){c.subschema({keyword:"properties",schemaProp:h,dataProp:h},E)}}};return Nn.default=a,Nn}var Rn={},Yi;function Tp(){if(Yi)return Rn;Yi=1,Object.defineProperty(Rn,"__esModule",{value:!0});const t=zt(),e=qe(),r=He(),n=He(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(c){const{gen:s,schema:u,data:o,parentSchema:y,it:f}=c,{opts:w}=f,$=(0,t.allSchemaProperties)(u),E=$.filter(_=>(0,r.alwaysValidSchema)(f,u[_]));if($.length===0||E.length===$.length&&(!f.opts.unevaluated||f.props===!0))return;const b=w.strictSchema&&!w.allowMatchingProperties&&y.properties,S=s.name("valid");f.props!==!0&&!(f.props instanceof e.Name)&&(f.props=(0,n.evaluatedPropsToName)(s,f.props));const{props:h}=f;i();function i(){for(const _ of $)b&&d(_),f.allErrors?l(_):(s.var(S,!0),l(_),s.if(S))}function d(_){for(const m in b)new RegExp(_).test(m)&&(0,r.checkStrictMode)(f,`property ${m} matches pattern ${_} (use allowMatchingProperties)`)}function l(_){s.forIn("key",o,m=>{s.if((0,e._)`${(0,t.usePattern)(c,_)}.test(${m})`,()=>{const g=E.includes(_);g||c.subschema({keyword:"patternProperties",schemaProp:_,dataProp:m,dataPropType:n.Type.Str},S),f.opts.unevaluated&&h!==!0?s.assign((0,e._)`${h}[${m}]`,!0):!g&&!f.allErrors&&s.if((0,e.not)(S),()=>s.break())})})}}};return Rn.default=a,Rn}var Tn={},Zi;function Ip(){if(Zi)return Tn;Zi=1,Object.defineProperty(Tn,"__esModule",{value:!0});const t=He(),e={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:a,it:c}=r;if((0,t.alwaysValidSchema)(c,a)){r.fail();return}const s=n.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 Tn.default=e,Tn}var In={},eo;function Cp(){if(eo)return In;eo=1,Object.defineProperty(In,"__esModule",{value:!0});const e={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:zt().validateUnion,error:{message:"must match a schema in anyOf"}};return In.default=e,In}var Cn={},to;function Ap(){if(to)return Cn;to=1,Object.defineProperty(Cn,"__esModule",{value:!0});const t=qe(),e=He(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>(0,t._)`{passingSchemas: ${a.passing}}`},code(a){const{gen:c,schema:s,parentSchema:u,it:o}=a;if(!Array.isArray(s))throw new Error("ajv implementation error");if(o.opts.discriminator&&u.discriminator)return;const y=s,f=c.let("valid",!1),w=c.let("passing",null),$=c.name("_valid");a.setParams({passing:w}),c.block(E),a.result(f,()=>a.reset(),()=>a.error(!0));function E(){y.forEach((b,S)=>{let h;(0,e.alwaysValidSchema)(o,b)?c.var($,!0):h=a.subschema({keyword:"oneOf",schemaProp:S,compositeRule:!0},$),S>0&&c.if((0,t._)`${$} && ${f}`).assign(f,!1).assign(w,(0,t._)`[${w}, ${S}]`).else(),c.if($,()=>{c.assign(f,!0),c.assign(w,S),h&&a.mergeEvaluated(h,t.Name)})})}}};return Cn.default=n,Cn}var An={},ro;function jp(){if(ro)return An;ro=1,Object.defineProperty(An,"__esModule",{value:!0});const t=He(),e={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:a,it:c}=r;if(!Array.isArray(a))throw new Error("ajv implementation error");const s=n.name("valid");a.forEach((u,o)=>{if((0,t.alwaysValidSchema)(c,u))return;const y=r.subschema({keyword:"allOf",schemaProp:o},s);r.ok(s),r.mergeEvaluated(y)})}};return An.default=e,An}var jn={},no;function Mp(){if(no)return jn;no=1,Object.defineProperty(jn,"__esModule",{value:!0});const t=qe(),e=He(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:c})=>(0,t.str)`must match "${c.ifClause}" schema`,params:({params:c})=>(0,t._)`{failingKeyword: ${c.ifClause}}`},code(c){const{gen:s,parentSchema:u,it:o}=c;u.then===void 0&&u.else===void 0&&(0,e.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const y=a(o,"then"),f=a(o,"else");if(!y&&!f)return;const w=s.let("valid",!0),$=s.name("_valid");if(E(),c.reset(),y&&f){const S=s.let("ifClause");c.setParams({ifClause:S}),s.if($,b("then",S),b("else",S))}else y?s.if($,b("then")):s.if((0,t.not)($),b("else"));c.pass(w,()=>c.error(!0));function E(){const S=c.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},$);c.mergeEvaluated(S)}function b(S,h){return()=>{const i=c.subschema({keyword:S},$);s.assign(w,$),c.mergeValidEvaluated(i,w),h?s.assign(h,(0,t._)`${S}`):c.setParams({ifClause:S})}}}};function a(c,s){const u=c.schema[s];return u!==void 0&&!(0,e.alwaysValidSchema)(c,u)}return jn.default=n,jn}var Mn={},so;function Dp(){if(so)return Mn;so=1,Object.defineProperty(Mn,"__esModule",{value:!0});const t=He(),e={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:a}){n.if===void 0&&(0,t.checkStrictMode)(a,`"${r}" without "if" is ignored`)}};return Mn.default=e,Mn}var ao;function qp(){if(ao)return bn;ao=1,Object.defineProperty(bn,"__esModule",{value:!0});const t=bc(),e=Sp(),r=Ec(),n=Pp(),a=kp(),c=Op(),s=Np(),u=Sc(),o=Rp(),y=Tp(),f=Ip(),w=Cp(),$=Ap(),E=jp(),b=Mp(),S=Dp();function h(i=!1){const d=[f.default,w.default,$.default,E.default,b.default,S.default,s.default,u.default,c.default,o.default,y.default];return i?d.push(e.default,n.default):d.push(t.default,r.default),d.push(a.default),d}return bn.default=h,bn}var Dn={},qn={},io;function Vp(){if(io)return qn;io=1,Object.defineProperty(qn,"__esModule",{value:!0});const t=qe(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,t.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,t._)`{format: ${n}}`},code(n,a){const{gen:c,data:s,$data:u,schema:o,schemaCode:y,it:f}=n,{opts:w,errSchemaPath:$,schemaEnv:E,self:b}=f;if(!w.validateFormats)return;u?S():h();function S(){const i=c.scopeValue("formats",{ref:b.formats,code:w.code.formats}),d=c.const("fDef",(0,t._)`${i}[${y}]`),l=c.let("fType"),_=c.let("format");c.if((0,t._)`typeof ${d} == "object" && !(${d} instanceof RegExp)`,()=>c.assign(l,(0,t._)`${d}.type || "string"`).assign(_,(0,t._)`${d}.validate`),()=>c.assign(l,(0,t._)`"string"`).assign(_,d)),n.fail$data((0,t.or)(m(),g()));function m(){return w.strictSchema===!1?t.nil:(0,t._)`${y} && !${_}`}function g(){const v=E.$async?(0,t._)`(${d}.async ? await ${_}(${s}) : ${_}(${s}))`:(0,t._)`${_}(${s})`,k=(0,t._)`(typeof ${_} == "function" ? ${v} : ${_}.test(${s}))`;return(0,t._)`${_} && ${_} !== true && ${l} === ${a} && !${k}`}}function h(){const i=b.formats[o];if(!i){m();return}if(i===!0)return;const[d,l,_]=g(i);d===a&&n.pass(v());function m(){if(w.strictSchema===!1){b.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${o}" ignored in schema at path "${$}"`}}function g(k){const T=k instanceof RegExp?(0,t.regexpCode)(k):w.code.formats?(0,t._)`${w.code.formats}${(0,t.getProperty)(o)}`:void 0,j=c.scopeValue("formats",{key:o,ref:k,code:T});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,t._)`${j}.validate`]:["string",k,j]}function v(){if(typeof i=="object"&&!(i instanceof RegExp)&&i.async){if(!E.$async)throw new Error("async format in sync schema");return(0,t._)`await ${_}(${s})`}return typeof l=="function"?(0,t._)`${_}(${s})`:(0,t._)`${_}.test(${s})`}}}};return qn.default=r,qn}var oo;function Lp(){if(oo)return Dn;oo=1,Object.defineProperty(Dn,"__esModule",{value:!0});const e=[Vp().default];return Dn.default=e,Dn}var yr={},co;function Up(){return co||(co=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.contentVocabulary=yr.metadataVocabulary=void 0,yr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],yr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),yr}var uo;function zp(){if(uo)return an;uo=1,Object.defineProperty(an,"__esModule",{value:!0});const t=fp(),e=Ep(),r=qp(),n=Lp(),a=Up(),c=[t.default,e.default,(0,r.default)(),n.default,a.metadataVocabulary,a.contentVocabulary];return an.default=c,an}var Vn={},Cr={},lo;function Fp(){if(lo)return Cr;lo=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.DiscrError=void 0;var t;return function(e){e.Tag="tag",e.Mapping="mapping"}(t||(Cr.DiscrError=t={})),Cr}var fo;function Kp(){if(fo)return Vn;fo=1,Object.defineProperty(Vn,"__esModule",{value:!0});const t=qe(),e=Fp(),r=ka(),n=ys(),a=He(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:u,tagName:o}})=>u===e.DiscrError.Tag?`tag "${o}" must be string`:`value of tag "${o}" must be in oneOf`,params:({params:{discrError:u,tag:o,tagName:y}})=>(0,t._)`{error: ${u}, tag: ${y}, tagValue: ${o}}`},code(u){const{gen:o,data:y,schema:f,parentSchema:w,it:$}=u,{oneOf:E}=w;if(!$.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=f.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(f.mapping)throw new Error("discriminator: mapping is not supported");if(!E)throw new Error("discriminator: requires oneOf keyword");const S=o.let("valid",!1),h=o.const("tag",(0,t._)`${y}${(0,t.getProperty)(b)}`);o.if((0,t._)`typeof ${h} == "string"`,()=>i(),()=>u.error(!1,{discrError:e.DiscrError.Tag,tag:h,tagName:b})),u.ok(S);function i(){const _=l();o.if(!1);for(const m in _)o.elseIf((0,t._)`${h} === ${m}`),o.assign(S,d(_[m]));o.else(),u.error(!1,{discrError:e.DiscrError.Mapping,tag:h,tagName:b}),o.endIf()}function d(_){const m=o.name("valid"),g=u.subschema({keyword:"oneOf",schemaProp:_},m);return u.mergeEvaluated(g,t.Name),m}function l(){var _;const m={},g=k(w);let v=!0;for(let V=0;V<E.length;V++){let q=E[V];if(q!=null&&q.$ref&&!(0,a.schemaHasRulesButRef)(q,$.self.RULES)){const x=q.$ref;if(q=r.resolveRef.call($.self,$.schemaEnv.root,$.baseId,x),q instanceof r.SchemaEnv&&(q=q.schema),q===void 0)throw new n.default($.opts.uriResolver,$.baseId,x)}const W=(_=q==null?void 0:q.properties)===null||_===void 0?void 0:_[b];if(typeof W!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);v=v&&(g||k(q)),T(W,V)}if(!v)throw new Error(`discriminator: "${b}" must be required`);return m;function k({required:V}){return Array.isArray(V)&&V.includes(b)}function T(V,q){if(V.const)j(V.const,q);else if(V.enum)for(const W of V.enum)j(W,q);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function j(V,q){if(typeof V!="string"||V in m)throw new Error(`discriminator: "${b}" values must be unique strings`);m[V]=q}}}};return Vn.default=s,Vn}const Hp="http://json-schema.org/draft-07/schema#",Bp="http://json-schema.org/draft-07/schema#",Gp="Core schema meta-schema",xp={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:[]}},Wp=["object","boolean"],Jp={$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:"#"}},Qp={$schema:Hp,$id:Bp,title:Gp,definitions:xp,type:Wp,properties:Jp,default:!0};var ho;function Xp(){return ho||(ho=1,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=cp(),n=zp(),a=Kp(),c=Qp,s=["/properties"],u="http://json-schema.org/draft-07/schema";class o extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(c,s):c;this.addMetaSchema(b,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.Ajv=o,t.exports=e=o,t.exports.Ajv=o,Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var y=gs();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return y.KeywordCxt}});var f=qe();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var w=Pa();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return w.default}});var $=ys();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return $.default}})}(en,en.exports)),en.exports}var Yp=Xp();const Zp=ko(Yp),po={type:"integer",minimum:1,maximum:65535},em={$id:"https://sockethub.org/schemas/v/examples-config.json",description:"Sockethub examples runtime configuration",type:"object",required:["sockethub","public"],additionalProperties:!1,properties:{sockethub:{type:"object",required:["port","host","path"],additionalProperties:!1,properties:{port:po,host:{type:"string"},path:{type:"string"}}},public:{type:"object",required:["protocol","host","port","path"],additionalProperties:!1,properties:{protocol:{type:"string"},host:{type:"string"},port:po,path:{type:"string"}}},platforms:{type:"array",items:{type:"string"}}}},tm=new Zp({strictTypes:!1,allErrors:!0});let mo;function rm(t){return mo??(mo=tm.compile(em)),mo(t)}const nm={sockethub:{port:10550,host:"localhost",path:"/sockethub"},public:{protocol:"http",host:"localhost",port:10550,path:"/"}};let Ln;function sm(){return Ln||(Ln=fetch("/examples-config.json").then(async t=>{if(!t.ok)throw new Error(`failed to load runtime config: ${t.status}`);const e=await t.json();if(!rm(e))throw new Error("invalid examples config");return e}).catch(t=>{throw Ln=void 0,console.error("failed to load examples config",t),t})),Ln}function vm(t){return(t.split("/").pop()??t).replace(/^platform-/,"")}let Ct;const am=zr(!1);async function Pc(){if(!Ct)throw new Error("Sockethub client is not initialized yet");await Ct.ready()}async function _m(t){return await Pc(),Ct.contextFor(t)}function wm(t){return{id:t.id,type:t.type,name:t.name??t.id}}async function $m(t){return await Pc(),console.log("sending ->",t),new Promise((e,r)=>{const n=Os("SEND",t);Ct.socket.emit("message",n,a=>{if(console.log("received <-",a),Os("RESP",a),a.totalItems&&a.items)for(const c of a.items.reverse())Os("RESP",c,!0,n.id);Po(a,!0),a.error?r(a.error):e(a)})})}function Gs(t){return e=>{const r=t==="connect";am.update(()=>r),console.log(`sockethub ${t} [connected: ${r}]`,e||"")}}function im(t){console.log("handle incoming: ",t),Po(t,!1)}function go(t=nm){Ct=new Ur(Hn(`${t.public.protocol}://${t.public.host}:${t.public.port}`,{path:t.sockethub.path}),{initTimeoutMs:1e4}),Ct.socket.on("connect",Gs("connect")),Ct.socket.on("error",Gs("error")),Ct.socket.on("disconnect",Gs("disconnect")),Ct.socket.on("message",im),Ct.socket.on("schemas",e=>{console.log("schemas received:",e),Ns("schemas",e)}),Ct.socket.on("ready",e=>{console.log("client ready:",e),Ns("ready",e)}),Ct.socket.on("init_error",e=>{console.error("client init error:",e),Ns("init_error",e)})}typeof globalThis=="object"&&"window"in globalThis&&(console.log("connecting to sockethub"),sm().then(go).catch(()=>go()));export{mm as I,gm as L,wm as a,Pc as b,_m as c,Ct as d,Js as e,am as f,vu as g,wu as h,So as i,sm as l,vm as p,$m as s};