@sockethub/examples 1.0.0-alpha.11 → 1.0.0-alpha.13

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 (51) hide show
  1. package/README.md +36 -148
  2. package/build/_app/immutable/assets/0.GKlhshq0.css +1 -0
  3. package/build/_app/immutable/chunks/{Cf7Xaqef.js → B5Mgq-ia.js} +1 -1
  4. package/build/_app/immutable/chunks/{DJd_9GSN.js → BAMCB3hl.js} +1 -1
  5. package/build/_app/immutable/chunks/{P3PHXZz3.js → BB3nrZKK.js} +2 -2
  6. package/build/_app/immutable/chunks/{B-2myMF5.js → BPmfLl8P.js} +1 -1
  7. package/build/_app/immutable/chunks/Bh9jqwq3.js +2 -0
  8. package/build/_app/immutable/chunks/CE_Br0Li.js +36 -0
  9. package/build/_app/immutable/chunks/{CARmnL8B.js → CF0IgWN3.js} +1 -1
  10. package/build/_app/immutable/chunks/{CC-fhLYv.js → CLc0OQ-M.js} +1 -1
  11. package/build/_app/immutable/chunks/CLcl1K30.js +1 -0
  12. package/build/_app/immutable/chunks/{D_xw8KSE.js → CPsRFLIg.js} +1 -1
  13. package/build/_app/immutable/chunks/DTPsrcK7.js +4 -0
  14. package/build/_app/immutable/chunks/{Ciq9INsC.js → DT_OQU4t.js} +1 -1
  15. package/build/_app/immutable/chunks/{DvzjJQ_P.js → De6kqrZW.js} +1 -1
  16. package/build/_app/immutable/chunks/{DxLbbUVu.js → DhU_U-a9.js} +1 -1
  17. package/build/_app/immutable/chunks/Dm-WrFn1.js +1 -0
  18. package/build/_app/immutable/chunks/aGNzqrdP.js +1 -0
  19. package/build/_app/immutable/entry/{app.24uSP5jR.js → app.44tyicEj.js} +2 -2
  20. package/build/_app/immutable/entry/start.D_PJ6UtD.js +1 -0
  21. package/build/_app/immutable/nodes/{0.CRxtfUZO.js → 0.COBjogKI.js} +1 -1
  22. package/build/_app/immutable/nodes/{1.CjzaWbdc.js → 1.ZmYfbvuo.js} +1 -1
  23. package/build/_app/immutable/nodes/{2.Dzi-FWBZ.js → 2.B-c8MtqI.js} +3 -3
  24. package/build/_app/immutable/nodes/3.DKOfQDif.js +2 -0
  25. package/build/_app/immutable/nodes/4.PE7b6wi8.js +1 -0
  26. package/build/_app/immutable/nodes/5.Cc6bNRTx.js +1 -0
  27. package/build/_app/immutable/nodes/6.D0DWXXhX.js +1 -0
  28. package/build/_app/immutable/nodes/7.CFhuHlBr.js +1 -0
  29. package/build/_app/version.json +1 -1
  30. package/build/dummy.html +12 -12
  31. package/build/feeds.html +12 -12
  32. package/build/index.html +12 -12
  33. package/build/irc.html +12 -12
  34. package/build/metadata-test.html +16 -0
  35. package/build/metadata.html +12 -12
  36. package/build/sockethub-logo.svg +11 -9
  37. package/build/xmpp.html +12 -12
  38. package/package.json +5 -4
  39. package/build/_app/immutable/assets/0.JUA-HkH6.css +0 -1
  40. package/build/_app/immutable/chunks/B48xiOwQ.js +0 -1
  41. package/build/_app/immutable/chunks/BnKTx64M.js +0 -1
  42. package/build/_app/immutable/chunks/D34JQ8ay.js +0 -4
  43. package/build/_app/immutable/chunks/DRqIvF0-.js +0 -1
  44. package/build/_app/immutable/chunks/DqdrLdzV.js +0 -2
  45. package/build/_app/immutable/chunks/Duf23zEt.js +0 -23
  46. package/build/_app/immutable/entry/start.odGQGxrg.js +0 -1
  47. package/build/_app/immutable/nodes/3.WM6k04_L.js +0 -1
  48. package/build/_app/immutable/nodes/4.C0mUcLdq.js +0 -1
  49. package/build/_app/immutable/nodes/5.JU4p_B8j.js +0 -1
  50. package/build/_app/immutable/nodes/6.BjGCqlQt.js +0 -1
  51. package/build/_app/immutable/nodes/7.HL4NrxY9.js +0 -1
@@ -0,0 +1,36 @@
1
+ var qa=Object.defineProperty;var La=(t,e,r)=>e in t?qa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var nt=(t,e,r)=>La(t,typeof e!="symbol"?e+"":e,r);import{g as ss,j as Va,f as at,a as Ve,s as et,c as zt,t as Ts,d as jn}from"./Bh9jqwq3.js";import"./CLcl1K30.js";import{y as Rr,L as Rs,R as sr,A as kt,aQ as nr,M as Mr,g as ae,a1 as Ua,O as Fa,P as za,Q as as,S as pr,B as tr,ay as Mn,b2 as xa,aJ as is,q as Ba,b4 as xt,z as En,D as Ha,X as os,V as Is,b0 as Dn,ae as Ka,b5 as Ga,b6 as Wa,b7 as Ja,v as Cs,x as As,b8 as ln,aY as Dr,a$ as Qa,w as Xa,b9 as js,ai as Ya,ba as Za,t as ut,W as ei,bb as ti,b3 as ri,aZ as ni,bc as si,p as Bt,s as qe,c as me,r as he,n as Ms,a as Ht,u as st,f as gt,bd as ai,be as ii,d as _t,m as un,e as oi,b as er,$ as fn,ag as ci}from"./DT_OQU4t.js";import{w as yr,g as li,c as ui,a as fi}from"./CF0IgWN3.js";import{b as di,s as hi,i as dt,l as qr,p as rr,d as pi}from"./B5Mgq-ia.js";import{s as mi,a as mr,d as gi,C as vi}from"./BB3nrZKK.js";import{i as Ds}from"./BPmfLl8P.js";function qs(t,e){return e}function yi(t,e,r){for(var n=[],s=e.length,l,a=e.length,u=0;u<s;u++){let d=e[u];As(d,()=>{if(l){if(l.pending.delete(d),l.done.add(d),l.pending.size===0){var w=t.outrogroups;Sn(Dn(l.done)),w.delete(l),w.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var i=n.length===0&&r!==null;if(i){var h=r,c=h.parentNode;Qa(c),c.append(h),t.items.clear()}Sn(e,!i)}else l={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(l)}function Sn(t,e=!0){for(var r=0;r<t.length;r++)Xa(t[r],e)}var cs;function Pn(t,e,r,n,s,l=null){var a=t,u=new Map,i=(e&js)!==0;if(i){var h=t;a=kt?sr(nr(h)):h.appendChild(Rr())}kt&&Mr();var c=null,d=Ua(()=>{var o=r();return Ka(o)?o:o==null?[]:Dn(o)}),w,P=!0;function b(){m.fallback=c,_i(m,w,a,e,n),c!==null&&(w.length===0?(c.f&xt)===0?Cs(c):(c.f^=xt,fr(c,null,a)):As(c,()=>{c=null}))}var E=Rs(()=>{w=ae(d);var o=w.length;let _=!1;if(kt){var p=Fa(a)===za;p!==(o===0)&&(a=as(),sr(a),pr(!1),_=!0)}for(var v=new Set,$=Ba,y=Ha(),f=0;f<o;f+=1){kt&&tr.nodeType===Mn&&tr.data===xa&&(a=tr,_=!0,pr(!1));var S=w[f],O=n(S,f),j=P?null:u.get(O);j?(j.v&&is(j.v,S),j.i&&is(j.i,f),y&&$.skipped_effects.delete(j.e)):(j=wi(u,P?a:cs??(cs=Rr()),S,O,f,s,e,r),P||(j.e.f|=xt),u.set(O,j)),v.add(O)}if(o===0&&l&&!c&&(P?c=En(()=>l(a)):(c=En(()=>l(cs??(cs=Rr()))),c.f|=xt)),kt&&o>0&&sr(as()),!P)if(y){for(const[F,V]of u)v.has(F)||$.skipped_effects.add(V.e);$.oncommit(b),$.ondiscard(()=>{})}else b();_&&pr(!0),ae(d)}),m={effect:E,items:u,outrogroups:null,fallback:c};P=!1,kt&&(a=tr)}function _i(t,e,r,n,s){var j,F,V,X,G,ee,fe,we,Oe;var l=(n&Za)!==0,a=e.length,u=t.items,i=t.effect.first,h,c=null,d,w=[],P=[],b,E,m,o;if(l)for(o=0;o<a;o+=1)b=e[o],E=s(b,o),m=u.get(E).e,(m.f&xt)===0&&((F=(j=m.nodes)==null?void 0:j.a)==null||F.measure(),(d??(d=new Set)).add(m));for(o=0;o<a;o+=1){if(b=e[o],E=s(b,o),m=u.get(E).e,t.outrogroups!==null)for(const se of t.outrogroups)se.pending.delete(m),se.done.delete(m);if((m.f&xt)!==0)if(m.f^=xt,m===i)fr(m,null,r);else{var _=c?c.next:i;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Wt(t,c,m),Wt(t,m,_),fr(m,_,r),c=m,w=[],P=[],i=c.next;continue}if((m.f&ln)!==0&&(Cs(m),l&&((X=(V=m.nodes)==null?void 0:V.a)==null||X.unfix(),(d??(d=new Set)).delete(m))),m!==i){if(h!==void 0&&h.has(m)){if(w.length<P.length){var p=P[0],v;c=p.prev;var $=w[0],y=w[w.length-1];for(v=0;v<w.length;v+=1)fr(w[v],p,r);for(v=0;v<P.length;v+=1)h.delete(P[v]);Wt(t,$.prev,y.next),Wt(t,c,$),Wt(t,y,p),i=p,c=y,o-=1,w=[],P=[]}else h.delete(m),fr(m,i,r),Wt(t,m.prev,m.next),Wt(t,m,c===null?t.effect.first:c.next),Wt(t,c,m),c=m;continue}for(w=[],P=[];i!==null&&i!==m;)(h??(h=new Set)).add(i),P.push(i),i=i.next;if(i===null)continue}(m.f&xt)===0&&w.push(m),c=m,i=m.next}if(t.outrogroups!==null){for(const se of t.outrogroups)se.pending.size===0&&(Sn(Dn(se.done)),(G=t.outrogroups)==null||G.delete(se));t.outrogroups.size===0&&(t.outrogroups=null)}if(i!==null||h!==void 0){var f=[];if(h!==void 0)for(m of h)(m.f&ln)===0&&f.push(m);for(;i!==null;)(i.f&ln)===0&&i!==t.fallback&&f.push(i),i=i.next;var S=f.length;if(S>0){var O=(n&js)!==0&&a===0?r:null;if(l){for(o=0;o<S;o+=1)(fe=(ee=f[o].nodes)==null?void 0:ee.a)==null||fe.measure();for(o=0;o<S;o+=1)(Oe=(we=f[o].nodes)==null?void 0:we.a)==null||Oe.fix()}yi(t,f,O)}}l&&Ya(()=>{var se,x;if(d!==void 0)for(m of d)(x=(se=m.nodes)==null?void 0:se.a)==null||x.apply()})}function wi(t,e,r,n,s,l,a,u){var i=(a&Ga)!==0?(a&Wa)===0?Is(r,!1,!1):os(r):null,h=(a&Ja)!==0?os(s):null;return{v:i,i:h,e:En(()=>(l(e,i??r,h??s,u),()=>{t.delete(n)}))}}function fr(t,e,r){if(t.nodes)for(var n=t.nodes.start,s=t.nodes.end,l=e&&(e.f&xt)===0?e.nodes.start:r;n!==null;){var a=Dr(n);if(l.before(n),n===s)return;n=a}}function Wt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function Ls(t,e,r=!1,n=!1,s=!1){var l=t,a="";ut(()=>{var u=ei;if(a===(a=e()??"")){kt&&Mr();return}if(u.nodes!==null&&(ti(u.nodes.start,u.nodes.end),u.nodes=null),a!==""){if(kt){tr.data;for(var i=Mr(),h=i;i!==null&&(i.nodeType!==Mn||i.data!=="");)h=i,i=Dr(i);if(i===null)throw ri(),ni;ss(tr,h),l=sr(i);return}var c=a+"";r?c=`<svg>${c}</svg>`:n&&(c=`<math>${c}</math>`);var d=Va(c);if((r||n)&&(d=nr(d)),ss(nr(d),d.lastChild),r||n)for(;nr(d);)l.before(nr(d));else l.before(d)}})}function $i(t,e,r,n,s){var u;kt&&Mr();var l=(u=e.$$slots)==null?void 0:u[r],a=!1;l===!0&&(l=e.children,a=!0),l===void 0?s!==null&&s(t):l(t,a?()=>n:n)}function bi(t,e){let r=null,n=kt;var s;if(kt){r=tr;for(var l=nr(document.head);l!==null&&(l.nodeType!==Mn||l.data!==t);)l=Dr(l);if(l===null)pr(!1);else{var a=Dr(l);l.remove(),sr(a)}}kt||(s=document.head.appendChild(Rr()));try{Rs(()=>e(s),si)}finally{n&&(pr(!0),sr(r))}}const kn=yr([]),Or=new Map;function Vs(t,e=!1){var r,n,s;if(console.log("displayMessage called:",{type:t.type,platform:Vr(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 l=typeof t.actor=="string"?t.actor:((s=t.actor)==null?void 0:s.name)||"",a=t.object.content||"",u=`${l}:${a}`,i=Date.now(),h=Or.get(u);if(h&&i-h<2e3){console.log("Skipping duplicate message:",u);return}Or.set(u,i);for(const[c,d]of Or)i-d>5e3&&Or.delete(c);kn.set([...li(kn),[l,a]]),console.log("Message displayed:",{actorName:l,content:a,isResponse:e,platform:Vr(t["@context"])})}}var Ei=at("<li> </li>"),Si=at('<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 nf(t,e){Bt(e,!1);const r=()=>di(kn,"$messages",n),[n,s]=hi();Ds();var l=Si(),a=qe(me(l),2),u=me(a);Pn(u,5,r,qs,(i,h)=>{var c=Ei(),d=me(c);he(c),ut(()=>et(d,`${ae(h)[0]??""}: ${ae(h)[1]??""}`)),Ve(i,c)}),he(u),Ms(2),he(a),he(l),Ve(t,l),Ht(),s()}var Pi=at("<span> </span>");function qn(t,e){Bt(e,!0);const r=st(()=>Vr(e.entry["@context"]));var n=Pi(),s=me(n);he(n),ut(()=>et(s,`[${ae(r)??"unknown"??""}:${e.entry.type??""}]`)),Ve(t,n),Ht()}var ki=at("<!> <span> </span> <span> </span>",1);function Oi(t,e){Bt(e,!0);var r=ki(),n=gt(r);qn(n,{get entry(){return e.entry}});var s=qe(n,2),l=me(s);he(s);var a=qe(s,2),u=me(a,!0);he(a),ut(()=>{var i,h,c;et(l,`#${e.id??""}
2
+ ${(typeof e.entry.actor=="string"?e.entry.actor:((i=e.entry.actor)==null?void 0:i.name)||((h=e.entry.actor)==null?void 0:h.id))??""}:`),et(u,((c=e.entry.object)==null?void 0:c.content)||"")}),Ve(t,r),Ht()}var Ni=at('<span class="font-medium">📰 Fetched feed:</span> <span> </span> <span class="text-gray-500"> </span>',1),Ti=at("<span> </span>"),Ri=at('<span class="text-gray-500 text-xs italic"> </span>'),Ii=at('<span class="text-gray-500"> </span> <!> <span><a rel="noreferrer" target="_blank" class="text-blue-600 hover:text-blue-800 underline"><!></a></span> <!>',1),Ci=at("<!> <!>",1);function Ai(t,e){Bt(e,!0);const r=st(()=>e.entry.totalItems!==void 0),n=st(()=>{var c;return ae(r)?e.entry.summary:(c=e.entry.object)==null?void 0:c.url}),s=st(()=>{var c,d;return typeof e.entry.actor=="string"?e.entry.actor:((c=e.entry.actor)==null?void 0:c.name)||((d=e.entry.actor)==null?void 0:d.id)});var l=Ci(),a=gt(l);qn(a,{get entry(){return e.entry}});var u=qe(a,2);{var i=c=>{var d=Ni(),w=qe(gt(d),2),P=me(w,!0);he(w);var b=qe(w,2),E=me(b);he(b),ut(()=>{et(P,ae(n)),et(E,`(${e.entry.totalItems??""} ${e.entry.totalItems===1?"item":"items"})`)}),Ve(c,d)},h=c=>{var d=Ii(),w=gt(d),P=me(w);he(w);var b=qe(w,2);{var E=f=>{var S=Ti(),O=me(S);he(S),ut(()=>et(O,`${ae(s)??""}:`)),Ve(f,S)};dt(b,f=>{ae(s)&&f(E)})}var m=qe(b,2),o=me(m),_=me(o);{var p=f=>{var S=zt(),O=gt(S);Ls(O,()=>{var j;return(j=e.entry.object)==null?void 0:j.title}),Ve(f,S)},v=f=>{var S=Ts();ut(()=>{var O,j;return et(S,(O=e.entry.object)!=null&&O.title||typeof e.entry.target=="string"?e.entry.target:(j=e.entry.target)==null?void 0:j.id)}),Ve(f,S)};dt(_,f=>{var S;((S=e.entry.object)==null?void 0:S.contentType)==="html"?f(p):f(v,!1)})}he(o),he(m);var $=qe(m,2);{var y=f=>{var S=Ri(),O=me(S,!0);he(S),ut(j=>et(O,j),[()=>{var j;return(j=e.entry.object)==null?void 0:j.published.split("T")[0]}]),Ve(f,S)};dt($,f=>{var S;(S=e.entry.object)!=null&&S.published&&f(y)})}ut(()=>{var f;et(P,`#${e.id??""}`),mi(o,"href",(f=e.entry.object)==null?void 0:f.url)}),Ve(c,d)};dt(u,c=>{ae(r)?c(i):c(h,!1)})}Ve(t,l),Ht()}var ji=at("<!> <span> </span>",1);function Mi(t,e){Bt(e,!0);var r=ji(),n=gt(r);qn(n,{get entry(){return e.entry}});var s=qe(n,2),l=me(s);he(s),ut(()=>{var a,u;return et(l,`#${e.id??""}
3
+ ${(typeof e.entry.actor=="string"?e.entry.actor:((a=e.entry.actor)==null?void 0:a.name)||((u=e.entry.actor)==null?void 0:u.id))??""}`)}),Ve(t,r),Ht()}var Di=at('<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full"> </span>'),qi=at('<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs font-medium rounded-full"> </span>'),Li=at('<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>'),Vi=at('<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 ls(t,e){Bt(e,!0);const r=st(()=>Vr(e.entry["@context"])),n=st(()=>e.timestamp?new Date(e.timestamp).toLocaleTimeString():""),s=st(()=>e.hasSend&&e.hasResponse?"Sent → Response OK":e.hasSend?"Sent → Awaiting response":""),l=st(()=>e.hasSend&&e.hasResponse?"bg-green-500":e.hasSend?"bg-orange-400":"bg-green-500");var a=Vi(),u=me(a),i=me(u),h=me(i),c=qe(h,2),d=me(c,!0);he(c),he(i);var w=qe(i,2),P=me(w),b=me(P),E=me(b),m=me(E,!0);he(E);var o=qe(E,2);{var _=V=>{var X=Di(),G=me(X,!0);he(X),ut(ee=>et(G,ee),[()=>ae(r).toUpperCase()]),Ve(V,X)};dt(o,V=>{ae(r)&&V(_)})}var p=qe(o,2);{var v=V=>{var X=qi(),G=me(X,!0);he(X),ut(()=>et(G,e.entry.type)),Ve(V,X)};dt(p,V=>{e.entry.type&&V(v)})}he(b);var $=qe(b,2);$.__click=function(...V){var X;(X=e.buttonAction)==null||X.apply(this,V)},he(P);var y=qe(P,2),f=me(y);{var S=V=>{Oi(V,{get id(){return e.id},get entry(){return e.entry}})},O=V=>{var X=zt(),G=gt(X);{var ee=we=>{Ai(we,{get id(){return e.id},get entry(){return e.entry}})},fe=we=>{Mi(we,{get id(){return e.id},get entry(){return e.entry}})};dt(G,we=>{ae(r)==="feeds"?we(ee):we(fe,!1)},!0)}Ve(V,X)};dt(f,V=>{ae(r)==="dummy"?V(S):V(O,!1)})}he(y);var j=qe(y,2);{var F=V=>{var X=Li(),G=me(X),ee=qe(me(G),4),fe=me(ee,!0);he(ee),he(G),he(X),ut(()=>et(fe,e.entry.error)),Ve(V,X)};dt(j,V=>{e.entry.error&&V(F)})}he(w),he(u),he(a),ut(()=>{mr(h,1,`w-3 h-3 ${ae(l)??""} rounded-full`),et(d,ae(n)||`#${e.id}`),et(m,ae(s))}),Ve(t,a),Ht()}jn(["click"]);var Ui=at('<div class="mt-2 p-2 bg-red-50 border border-red-200 rounded-lg"><span class="text-red-700 text-xs"> </span></div>'),Fi=at('<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 zi(t,e){Bt(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=st(()=>r[e.entry._logType]??r.schemas);function s(f){if(!f||typeof f!="object")return"";const S=f;if(e.entry._logType==="schemas"){const j=(Array.isArray(S.platforms)?S.platforms:[]).map(V=>V==null?void 0:V.id).filter(Boolean);return`v${typeof S.version=="string"?S.version:""} — ${j.length} platform${j.length!==1?"s":""}: ${j.join(", ")}`}if(e.entry._logType==="ready"){const O=typeof S.reason=="string"?S.reason:"",j=typeof S.sockethubVersion=="string"?S.sockethubVersion:"",F=Array.isArray(S.platforms)?S.platforms.length:0;return`${O} — Sockethub v${j}, ${F} platform${F!==1?"s":""}`}if(e.entry._logType==="init_error"){const O=typeof S.error=="string"?S.error:"unknown",j=typeof S.phase=="string"?S.phase:"",F=S.retrying?" (retrying)":"";return`${j}: ${O}${F}`}return JSON.stringify(f).slice(0,120)}const l=st(()=>s(e.entry.payload)),a=st(()=>new Date(e.entry._timestamp).toLocaleTimeString());var u=Fi(),i=me(u),h=me(i),c=me(h),d=qe(c,2),w=me(d,!0);he(d),he(h);var P=qe(h,2),b=me(P),E=me(b),m=me(E),o=me(m,!0);he(m),he(E);var _=qe(E,2);_.__click=function(...f){var S;(S=e.buttonAction)==null||S.apply(this,f)},he(b);var p=qe(b,2),v=me(p,!0);he(p);var $=qe(p,2);{var y=f=>{var S=Ui(),O=me(S),j=me(O,!0);he(O),he(S),ut(()=>{var F;return et(j,((F=e.entry.payload)==null?void 0:F.error)??"")}),Ve(f,S)};dt($,f=>{e.entry._logType==="init_error"&&f(y)})}he(P),he(i),he(u),ut(()=>{mr(c,1,`w-3 h-3 ${e.entry._logType==="init_error"?"bg-red-500":"bg-indigo-500"} rounded-full`),et(w,ae(a)),mr(m,1,`px-2 py-1 ${ae(n).bg??""} ${ae(n).color??""} text-xs font-semibold rounded-full`),et(o,ae(n).label),et(v,ae(l))}),Ve(t,u),Ht()}jn(["click"]);function xi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dn,us;function Bi(){if(us)return dn;us=1;function t(q){return q instanceof Map?q.clear=q.delete=q.set=function(){throw new Error("map is read-only")}:q instanceof Set&&(q.add=q.clear=q.delete=function(){throw new Error("set is read-only")}),Object.freeze(q),Object.getOwnPropertyNames(q).forEach(Y=>{const ne=q[Y],$e=typeof ne;($e==="object"||$e==="function")&&!Object.isFrozen(ne)&&t(ne)}),q}class e{constructor(Y){Y.data===void 0&&(Y.data={}),this.data=Y.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(q){return q.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function n(q,...Y){const ne=Object.create(null);for(const $e in q)ne[$e]=q[$e];return Y.forEach(function($e){for(const Je in $e)ne[Je]=$e[Je]}),ne}const s="</span>",l=q=>!!q.scope,a=(q,{prefix:Y})=>{if(q.startsWith("language:"))return q.replace("language:","language-");if(q.includes(".")){const ne=q.split(".");return[`${Y}${ne.shift()}`,...ne.map(($e,Je)=>`${$e}${"_".repeat(Je+1)}`)].join(" ")}return`${Y}${q}`};class u{constructor(Y,ne){this.buffer="",this.classPrefix=ne.classPrefix,Y.walk(this)}addText(Y){this.buffer+=r(Y)}openNode(Y){if(!l(Y))return;const ne=a(Y.scope,{prefix:this.classPrefix});this.span(ne)}closeNode(Y){l(Y)&&(this.buffer+=s)}value(){return this.buffer}span(Y){this.buffer+=`<span class="${Y}">`}}const i=(q={})=>{const Y={children:[]};return Object.assign(Y,q),Y};class h{constructor(){this.rootNode=i(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Y){this.top.children.push(Y)}openNode(Y){const ne=i({scope:Y});this.add(ne),this.stack.push(ne)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Y){return this.constructor._walk(Y,this.rootNode)}static _walk(Y,ne){return typeof ne=="string"?Y.addText(ne):ne.children&&(Y.openNode(ne),ne.children.forEach($e=>this._walk(Y,$e)),Y.closeNode(ne)),Y}static _collapse(Y){typeof Y!="string"&&Y.children&&(Y.children.every(ne=>typeof ne=="string")?Y.children=[Y.children.join("")]:Y.children.forEach(ne=>{h._collapse(ne)}))}}class c extends h{constructor(Y){super(),this.options=Y}addText(Y){Y!==""&&this.add(Y)}startScope(Y){this.openNode(Y)}endScope(){this.closeNode()}__addSublanguage(Y,ne){const $e=Y.root;ne&&($e.scope=`language:${ne}`),this.add($e)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(q){return q?typeof q=="string"?q:q.source:null}function w(q){return E("(?=",q,")")}function P(q){return E("(?:",q,")*")}function b(q){return E("(?:",q,")?")}function E(...q){return q.map(ne=>d(ne)).join("")}function m(q){const Y=q[q.length-1];return typeof Y=="object"&&Y.constructor===Object?(q.splice(q.length-1,1),Y):{}}function o(...q){return"("+(m(q).capture?"":"?:")+q.map($e=>d($e)).join("|")+")"}function _(q){return new RegExp(q.toString()+"|").exec("").length-1}function p(q,Y){const ne=q&&q.exec(Y);return ne&&ne.index===0}const v=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(q,{joinWith:Y}){let ne=0;return q.map($e=>{ne+=1;const Je=ne;let Ye=d($e),ue="";for(;Ye.length>0;){const ce=v.exec(Ye);if(!ce){ue+=Ye;break}ue+=Ye.substring(0,ce.index),Ye=Ye.substring(ce.index+ce[0].length),ce[0][0]==="\\"&&ce[1]?ue+="\\"+String(Number(ce[1])+Je):(ue+=ce[0],ce[0]==="("&&ne++)}return ue}).map($e=>`(${$e})`).join(Y)}const y=/\b\B/,f="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",O="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",V="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",X=(q={})=>{const Y=/^#![ ]*\//;return q.binary&&(q.begin=E(Y,/.*\b/,q.binary,/\b.*/)),n({scope:"meta",begin:Y,end:/$/,relevance:0,"on:begin":(ne,$e)=>{ne.index!==0&&$e.ignoreMatch()}},q)},G={begin:"\\\\[\\s\\S]",relevance:0},ee={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[G]},fe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[G]},we={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/},Oe=function(q,Y,ne={}){const $e=n({scope:"comment",begin:q,end:Y,contains:[]},ne);$e.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 Je=o("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 $e.contains.push({begin:E(/[ ]+/,"(",Je,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),$e},se=Oe("//","$"),x=Oe("/\\*","\\*/"),T=Oe("#","$"),M={scope:"number",begin:O,relevance:0},R={scope:"number",begin:j,relevance:0},g={scope:"number",begin:F,relevance:0},k={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[G,{begin:/\[/,end:/\]/,relevance:0,contains:[G]}]},A={scope:"title",begin:f,relevance:0},W={scope:"title",begin:S,relevance:0},Q={begin:"\\.\\s*"+S,relevance:0};var re=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:G,BINARY_NUMBER_MODE:g,BINARY_NUMBER_RE:F,COMMENT:Oe,C_BLOCK_COMMENT_MODE:x,C_LINE_COMMENT_MODE:se,C_NUMBER_MODE:R,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(q){return Object.assign(q,{"on:begin":(Y,ne)=>{ne.data._beginMatch=Y[1]},"on:end":(Y,ne)=>{ne.data._beginMatch!==Y[1]&&ne.ignoreMatch()}})},HASH_COMMENT_MODE:T,IDENT_RE:f,MATCH_NOTHING_RE:y,METHOD_GUARD:Q,NUMBER_MODE:M,NUMBER_RE:O,PHRASAL_WORDS_MODE:we,QUOTE_STRING_MODE:fe,REGEXP_MODE:k,RE_STARTERS_RE:V,SHEBANG:X,TITLE_MODE:A,UNDERSCORE_IDENT_RE:S,UNDERSCORE_TITLE_MODE:W});function ve(q,Y){q.input[q.index-1]==="."&&Y.ignoreMatch()}function N(q,Y){q.className!==void 0&&(q.scope=q.className,delete q.className)}function I(q,Y){Y&&q.beginKeywords&&(q.begin="\\b("+q.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",q.__beforeBegin=ve,q.keywords=q.keywords||q.beginKeywords,delete q.beginKeywords,q.relevance===void 0&&(q.relevance=0))}function L(q,Y){Array.isArray(q.illegal)&&(q.illegal=o(...q.illegal))}function z(q,Y){if(q.match){if(q.begin||q.end)throw new Error("begin & end are not supported with match");q.begin=q.match,delete q.match}}function J(q,Y){q.relevance===void 0&&(q.relevance=1)}const te=(q,Y)=>{if(!q.beforeMatch)return;if(q.starts)throw new Error("beforeMatch cannot be used with starts");const ne=Object.assign({},q);Object.keys(q).forEach($e=>{delete q[$e]}),q.keywords=ne.keywords,q.begin=E(ne.beforeMatch,w(ne.begin)),q.starts={relevance:0,contains:[Object.assign(ne,{endsParent:!0})]},q.relevance=0,delete ne.beforeMatch},Ee=["of","and","for","in","not","or","if","then","parent","list","value"],Fe="keyword";function Re(q,Y,ne=Fe){const $e=Object.create(null);return typeof q=="string"?Je(ne,q.split(" ")):Array.isArray(q)?Je(ne,q):Object.keys(q).forEach(function(Ye){Object.assign($e,Re(q[Ye],Y,Ye))}),$e;function Je(Ye,ue){Y&&(ue=ue.map(ce=>ce.toLowerCase())),ue.forEach(function(ce){const ye=ce.split("|");$e[ye[0]]=[Ye,Ae(ye[0],ye[1])]})}}function Ae(q,Y){return Y?Number(Y):_e(q)?0:1}function _e(q){return Ee.includes(q.toLowerCase())}const xe={},Ie=q=>{console.error(q)},vt=(q,...Y)=>{console.log(`WARN: ${q}`,...Y)},Xe=(q,Y)=>{xe[`${q}/${Y}`]||(console.log(`Deprecated as of ${q}. ${Y}`),xe[`${q}/${Y}`]=!0)},ht=new Error;function $t(q,Y,{key:ne}){let $e=0;const Je=q[ne],Ye={},ue={};for(let ce=1;ce<=Y.length;ce++)ue[ce+$e]=Je[ce],Ye[ce+$e]=!0,$e+=_(Y[ce-1]);q[ne]=ue,q[ne]._emit=Ye,q[ne]._multi=!0}function ct(q){if(Array.isArray(q.begin)){if(q.skip||q.excludeBegin||q.returnBegin)throw Ie("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ht;if(typeof q.beginScope!="object"||q.beginScope===null)throw Ie("beginScope must be object"),ht;$t(q,q.begin,{key:"beginScope"}),q.begin=$(q.begin,{joinWith:""})}}function wt(q){if(Array.isArray(q.end)){if(q.skip||q.excludeEnd||q.returnEnd)throw Ie("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ht;if(typeof q.endScope!="object"||q.endScope===null)throw Ie("endScope must be object"),ht;$t(q,q.end,{key:"endScope"}),q.end=$(q.end,{joinWith:""})}}function _r(q){q.scope&&typeof q.scope=="object"&&q.scope!==null&&(q.beginScope=q.scope,delete q.scope)}function wr(q){_r(q),typeof q.beginScope=="string"&&(q.beginScope={_wrap:q.beginScope}),typeof q.endScope=="string"&&(q.endScope={_wrap:q.endScope}),ct(q),wt(q)}function Yt(q){function Y(ue,ce){return new RegExp(d(ue),"m"+(q.case_insensitive?"i":"")+(q.unicodeRegex?"u":"")+(ce?"g":""))}class ne{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ce,ye){ye.position=this.position++,this.matchIndexes[this.matchAt]=ye,this.regexes.push([ye,ce]),this.matchAt+=_(ce)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ce=this.regexes.map(ye=>ye[1]);this.matcherRe=Y($(ce,{joinWith:"|"}),!0),this.lastIndex=0}exec(ce){this.matcherRe.lastIndex=this.lastIndex;const ye=this.matcherRe.exec(ce);if(!ye)return null;const it=ye.findIndex((C,U)=>U>0&&C!==void 0),D=this.matchIndexes[it];return ye.splice(0,it),Object.assign(ye,D)}}class $e{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ce){if(this.multiRegexes[ce])return this.multiRegexes[ce];const ye=new ne;return this.rules.slice(ce).forEach(([it,D])=>ye.addRule(it,D)),ye.compile(),this.multiRegexes[ce]=ye,ye}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ce,ye){this.rules.push([ce,ye]),ye.type==="begin"&&this.count++}exec(ce){const ye=this.getMatcher(this.regexIndex);ye.lastIndex=this.lastIndex;let it=ye.exec(ce);if(this.resumingScanAtSamePosition()&&!(it&&it.index===this.lastIndex)){const D=this.getMatcher(0);D.lastIndex=this.lastIndex+1,it=D.exec(ce)}return it&&(this.regexIndex+=it.position+1,this.regexIndex===this.count&&this.considerAll()),it}}function Je(ue){const ce=new $e;return ue.contains.forEach(ye=>ce.addRule(ye.begin,{rule:ye,type:"begin"})),ue.terminatorEnd&&ce.addRule(ue.terminatorEnd,{type:"end"}),ue.illegal&&ce.addRule(ue.illegal,{type:"illegal"}),ce}function Ye(ue,ce){const ye=ue;if(ue.isCompiled)return ye;[N,z,wr,te].forEach(D=>D(ue,ce)),q.compilerExtensions.forEach(D=>D(ue,ce)),ue.__beforeBegin=null,[I,L,J].forEach(D=>D(ue,ce)),ue.isCompiled=!0;let it=null;return typeof ue.keywords=="object"&&ue.keywords.$pattern&&(ue.keywords=Object.assign({},ue.keywords),it=ue.keywords.$pattern,delete ue.keywords.$pattern),it=it||/\w+/,ue.keywords&&(ue.keywords=Re(ue.keywords,q.case_insensitive)),ye.keywordPatternRe=Y(it,!0),ce&&(ue.begin||(ue.begin=/\B|\b/),ye.beginRe=Y(ye.begin),!ue.end&&!ue.endsWithParent&&(ue.end=/\B|\b/),ue.end&&(ye.endRe=Y(ye.end)),ye.terminatorEnd=d(ye.end)||"",ue.endsWithParent&&ce.terminatorEnd&&(ye.terminatorEnd+=(ue.end?"|":"")+ce.terminatorEnd)),ue.illegal&&(ye.illegalRe=Y(ue.illegal)),ue.contains||(ue.contains=[]),ue.contains=[].concat(...ue.contains.map(function(D){return nn(D==="self"?ue:D)})),ue.contains.forEach(function(D){Ye(D,ye)}),ue.starts&&Ye(ue.starts,ce),ye.matcher=Je(ye),ye}if(q.compilerExtensions||(q.compilerExtensions=[]),q.contains&&q.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return q.classNameAliases=n(q.classNameAliases||{}),Ye(q)}function ir(q){return q?q.endsWithParent||ir(q.starts):!1}function nn(q){return q.variants&&!q.cachedVariants&&(q.cachedVariants=q.variants.map(function(Y){return n(q,{variants:null},Y)})),q.cachedVariants?q.cachedVariants:ir(q)?n(q,{starts:q.starts?n(q.starts):null}):Object.isFrozen(q)?n(q):q}var $r="11.11.1";class bt extends Error{constructor(Y,ne){super(Y),this.name="HTMLInjectionError",this.html=ne}}const or=r,br=n,Er=Symbol("nomatch"),sn=7,Sr=function(q){const Y=Object.create(null),ne=Object.create(null),$e=[];let Je=!0;const Ye="Could not find the language '{}', did you forget to load/include a language module?",ue={disableAutodetect:!0,name:"Plain text",contains:[]};let ce={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function ye(Z){return ce.noHighlightRe.test(Z)}function it(Z){let le=Z.className+" ";le+=Z.parentNode?Z.parentNode.className:"";const Se=ce.languageDetectRe.exec(le);if(Se){const Me=Le(Se[1]);return Me||(vt(Ye.replace("{}",Se[1])),vt("Falling back to no-highlight mode for this block.",Z)),Me?Se[1]:"no-highlight"}return le.split(/\s+/).find(Me=>ye(Me)||Le(Me))}function D(Z,le,Se){let Me="",Qe="";typeof le=="object"?(Me=Z,Se=le.ignoreIllegals,Qe=le.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`),Qe=Z,Me=le),Se===void 0&&(Se=!0);const yt={code:Me,language:Qe};Nt("before:highlight",yt);const Tt=yt.result?yt.result:C(yt.language,yt.code,Se);return Tt.code=yt.code,Nt("after:highlight",Tt),Tt}function C(Z,le,Se,Me){const Qe=Object.create(null);function yt(oe,pe){return oe.keywords[pe]}function Tt(){if(!Pe.keywords){ft.addText(We);return}let oe=0;Pe.keywordPatternRe.lastIndex=0;let pe=Pe.keywordPatternRe.exec(We),Ne="";for(;pe;){Ne+=We.substring(oe,pe.index);const Be=jt.case_insensitive?pe[0].toLowerCase():pe[0],pt=yt(Pe,Be);if(pt){const[Ft,Ma]=pt;if(ft.addText(Ne),Ne="",Qe[Be]=(Qe[Be]||0)+1,Qe[Be]<=sn&&(kr+=Ma),Ft.startsWith("_"))Ne+=pe[0];else{const Da=jt.classNameAliases[Ft]||Ft;mt(pe[0],Da)}}else Ne+=pe[0];oe=Pe.keywordPatternRe.lastIndex,pe=Pe.keywordPatternRe.exec(We)}Ne+=We.substring(oe),ft.addText(Ne)}function Ut(){if(We==="")return;let oe=null;if(typeof Pe.subLanguage=="string"){if(!Y[Pe.subLanguage]){ft.addText(We);return}oe=C(Pe.subLanguage,We,!0,ns[Pe.subLanguage]),ns[Pe.subLanguage]=oe._top}else oe=H(We,Pe.subLanguage.length?Pe.subLanguage:null);Pe.relevance>0&&(kr+=oe.relevance),ft.__addSublanguage(oe._emitter,oe.language)}function lt(){Pe.subLanguage!=null?Ut():Tt(),We=""}function mt(oe,pe){oe!==""&&(ft.startScope(pe),ft.addText(oe),ft.endScope())}function cr(oe,pe){let Ne=1;const Be=pe.length-1;for(;Ne<=Be;){if(!oe._emit[Ne]){Ne++;continue}const pt=jt.classNameAliases[oe[Ne]]||oe[Ne],Ft=pe[Ne];pt?mt(Ft,pt):(We=Ft,Tt(),We=""),Ne++}}function lr(oe,pe){return oe.scope&&typeof oe.scope=="string"&&ft.openNode(jt.classNameAliases[oe.scope]||oe.scope),oe.beginScope&&(oe.beginScope._wrap?(mt(We,jt.classNameAliases[oe.beginScope._wrap]||oe.beginScope._wrap),We=""):oe.beginScope._multi&&(cr(oe.beginScope,pe),We="")),Pe=Object.create(oe,{parent:{value:Pe}}),Pe}function Gt(oe,pe,Ne){let Be=p(oe.endRe,Ne);if(Be){if(oe["on:end"]){const pt=new e(oe);oe["on:end"](pe,pt),pt.isMatchIgnored&&(Be=!1)}if(Be){for(;oe.endsParent&&oe.parent;)oe=oe.parent;return oe}}if(oe.endsWithParent)return Gt(oe.parent,pe,Ne)}function Ra(oe){return Pe.matcher.regexIndex===0?(We+=oe[0],1):(cn=!0,0)}function Ia(oe){const pe=oe[0],Ne=oe.rule,Be=new e(Ne),pt=[Ne.__beforeBegin,Ne["on:begin"]];for(const Ft of pt)if(Ft&&(Ft(oe,Be),Be.isMatchIgnored))return Ra(pe);return Ne.skip?We+=pe:(Ne.excludeBegin&&(We+=pe),lt(),!Ne.returnBegin&&!Ne.excludeBegin&&(We=pe)),lr(Ne,oe),Ne.returnBegin?0:pe.length}function Ca(oe){const pe=oe[0],Ne=le.substring(oe.index),Be=Gt(Pe,oe,Ne);if(!Be)return Er;const pt=Pe;Pe.endScope&&Pe.endScope._wrap?(lt(),mt(pe,Pe.endScope._wrap)):Pe.endScope&&Pe.endScope._multi?(lt(),cr(Pe.endScope,oe)):pt.skip?We+=pe:(pt.returnEnd||pt.excludeEnd||(We+=pe),lt(),pt.excludeEnd&&(We=pe));do Pe.scope&&ft.closeNode(),!Pe.skip&&!Pe.subLanguage&&(kr+=Pe.relevance),Pe=Pe.parent;while(Pe!==Be.parent);return Be.starts&&lr(Be.starts,oe),pt.returnEnd?0:pe.length}function Aa(){const oe=[];for(let pe=Pe;pe!==jt;pe=pe.parent)pe.scope&&oe.unshift(pe.scope);oe.forEach(pe=>ft.openNode(pe))}let Pr={};function rs(oe,pe){const Ne=pe&&pe[0];if(We+=oe,Ne==null)return lt(),0;if(Pr.type==="begin"&&pe.type==="end"&&Pr.index===pe.index&&Ne===""){if(We+=le.slice(pe.index,pe.index+1),!Je){const Be=new Error(`0 width match regex (${Z})`);throw Be.languageName=Z,Be.badRule=Pr.rule,Be}return 1}if(Pr=pe,pe.type==="begin")return Ia(pe);if(pe.type==="illegal"&&!Se){const Be=new Error('Illegal lexeme "'+Ne+'" for mode "'+(Pe.scope||"<unnamed>")+'"');throw Be.mode=Pe,Be}else if(pe.type==="end"){const Be=Ca(pe);if(Be!==Er)return Be}if(pe.type==="illegal"&&Ne==="")return We+=`
5
+ `,1;if(on>1e5&&on>pe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return We+=Ne,Ne.length}const jt=Le(Z);if(!jt)throw Ie(Ye.replace("{}",Z)),new Error('Unknown language: "'+Z+'"');const ja=Yt(jt);let an="",Pe=Me||ja;const ns={},ft=new ce.__emitter(ce);Aa();let We="",kr=0,Zt=0,on=0,cn=!1;try{if(jt.__emitTokens)jt.__emitTokens(le,ft);else{for(Pe.matcher.considerAll();;){on++,cn?cn=!1:Pe.matcher.considerAll(),Pe.matcher.lastIndex=Zt;const oe=Pe.matcher.exec(le);if(!oe)break;const pe=le.substring(Zt,oe.index),Ne=rs(pe,oe);Zt=oe.index+Ne}rs(le.substring(Zt))}return ft.finalize(),an=ft.toHTML(),{language:Z,value:an,relevance:kr,illegal:!1,_emitter:ft,_top:Pe}}catch(oe){if(oe.message&&oe.message.includes("Illegal"))return{language:Z,value:or(le),illegal:!0,relevance:0,_illegalBy:{message:oe.message,index:Zt,context:le.slice(Zt-100,Zt+100),mode:oe.mode,resultSoFar:an},_emitter:ft};if(Je)return{language:Z,value:or(le),illegal:!1,relevance:0,errorRaised:oe,_emitter:ft,_top:Pe};throw oe}}function U(Z){const le={value:or(Z),illegal:!1,relevance:0,_top:ue,_emitter:new ce.__emitter(ce)};return le._emitter.addText(Z),le}function H(Z,le){le=le||ce.languages||Object.keys(Y);const Se=U(Z),Me=le.filter(Le).filter(Ge).map(lt=>C(lt,Z,!1));Me.unshift(Se);const Qe=Me.sort((lt,mt)=>{if(lt.relevance!==mt.relevance)return mt.relevance-lt.relevance;if(lt.language&&mt.language){if(Le(lt.language).supersetOf===mt.language)return 1;if(Le(mt.language).supersetOf===lt.language)return-1}return 0}),[yt,Tt]=Qe,Ut=yt;return Ut.secondBest=Tt,Ut}function K(Z,le,Se){const Me=le&&ne[le]||Se;Z.classList.add("hljs"),Z.classList.add(`language-${Me}`)}function de(Z){let le=null;const Se=it(Z);if(ye(Se))return;if(Nt("before:highlightElement",{el:Z,language:Se}),Z.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Z);return}if(Z.children.length>0&&(ce.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(Z)),ce.throwUnescapedHTML))throw new bt("One of your code blocks includes unescaped HTML.",Z.innerHTML);le=Z;const Me=le.textContent,Qe=Se?D(Me,{language:Se,ignoreIllegals:!0}):H(Me);Z.innerHTML=Qe.value,Z.dataset.highlighted="yes",K(Z,Se,Qe.language),Z.result={language:Qe.language,re:Qe.relevance,relevance:Qe.relevance},Qe.secondBest&&(Z.secondBest={language:Qe.secondBest.language,relevance:Qe.secondBest.relevance}),Nt("after:highlightElement",{el:Z,result:Qe,text:Me})}function ge(Z){ce=br(ce,Z)}const je=()=>{ke(),Xe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ke(){ke(),Xe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ze=!1;function ke(){function Z(){ke()}if(document.readyState==="loading"){Ze||window.addEventListener("DOMContentLoaded",Z,!1),Ze=!0;return}document.querySelectorAll(ce.cssSelector).forEach(de)}function He(Z,le){let Se=null;try{Se=le(q)}catch(Me){if(Ie("Language definition for '{}' could not be registered.".replace("{}",Z)),Je)Ie(Me);else throw Me;Se=ue}Se.name||(Se.name=Z),Y[Z]=Se,Se.rawDefinition=le.bind(null,q),Se.aliases&&rt(Se.aliases,{languageName:Z})}function tt(Z){delete Y[Z];for(const le of Object.keys(ne))ne[le]===Z&&delete ne[le]}function be(){return Object.keys(Y)}function Le(Z){return Z=(Z||"").toLowerCase(),Y[Z]||Y[ne[Z]]}function rt(Z,{languageName:le}){typeof Z=="string"&&(Z=[Z]),Z.forEach(Se=>{ne[Se.toLowerCase()]=le})}function Ge(Z){const le=Le(Z);return le&&!le.disableAutodetect}function At(Z){Z["before:highlightBlock"]&&!Z["before:highlightElement"]&&(Z["before:highlightElement"]=le=>{Z["before:highlightBlock"](Object.assign({block:le.el},le))}),Z["after:highlightBlock"]&&!Z["after:highlightElement"]&&(Z["after:highlightElement"]=le=>{Z["after:highlightBlock"](Object.assign({block:le.el},le))})}function Et(Z){At(Z),$e.push(Z)}function St(Z){const le=$e.indexOf(Z);le!==-1&&$e.splice(le,1)}function Nt(Z,le){const Se=Z;$e.forEach(function(Me){Me[Se]&&Me[Se](le)})}function Vt(Z){return Xe("10.7.0","highlightBlock will be removed entirely in v12.0"),Xe("10.7.0","Please use highlightElement now."),de(Z)}Object.assign(q,{highlight:D,highlightAuto:H,highlightAll:ke,highlightElement:de,highlightBlock:Vt,configure:ge,initHighlighting:je,initHighlightingOnLoad:Ke,registerLanguage:He,unregisterLanguage:tt,listLanguages:be,getLanguage:Le,registerAliases:rt,autoDetection:Ge,inherit:br,addPlugin:Et,removePlugin:St}),q.debugMode=function(){Je=!1},q.safeMode=function(){Je=!0},q.versionString=$r,q.regex={concat:E,lookahead:w,either:o,optional:b,anyNumberOfTimes:P};for(const Z in re)typeof re[Z]=="object"&&t(re[Z]);return Object.assign(q,re),q},Kt=Sr({});return Kt.newInstance=()=>Sr({}),dn=Kt,Kt.HighlightJS=Kt,Kt.default=Kt,dn}var Hi=Bi();const fs=xi(Hi);var Ki=at("<pre><code><!></code></pre>");function Gi(t,e){const r=qr(e,["children","$$slots","$$events","$$legacy"]),n=qr(r,["code","highlighted","languageName","langtag"]);let s=rr(e,"code",8),l=rr(e,"highlighted",8),a=rr(e,"languageName",8,"plaintext"),u=rr(e,"langtag",8,!1);var i=Ki();gi(i,()=>({"data-language":a(),...n,[vi]:{langtag:u()}}),void 0,void 0,void 0,"svelte-4jgeki");var h=me(i);mr(h,1,"",null,{},{hljs:!0});var c=me(h);{var d=P=>{var b=zt(),E=gt(b);Ls(E,l),Ve(P,b)},w=P=>{var b=Ts();ut(()=>et(b,s())),Ve(P,b)};dt(c,P=>{l()?P(d):P(w,!1)})}he(h),he(i),Ve(t,i)}function ds(t,e){const r=qr(e,["children","$$slots","$$events","$$legacy"]),n=qr(r,["language","code","langtag"]);Bt(e,!1);let s=rr(e,"language",8),l=rr(e,"code",8),a=rr(e,"langtag",8,!1);const u=ui();let i=Is("");fi(()=>{ae(i)&&u("highlight",{highlighted:ae(i)})}),ai(()=>(un(s()),un(l())),()=>{fs.registerLanguage(s().name,s().register),_t(i,fs.highlight(l(),{language:s().name}).value)}),ii(),Ds();var h=zt(),c=gt(h);$i(c,e,"default",{get highlighted(){return ae(i)}},d=>{Gi(d,pi(()=>n,{get languageName(){return un(s()),oi(()=>s().name)},get langtag(){return a()},get highlighted(){return ae(i)},get code(){return l()}}))}),Ve(t,h),Ht()}function Wi(t){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},n=["true","false","null"],s={scope:"literal",beginKeywords:n.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:n},contains:[e,r,t.QUOTE_STRING_MODE,s,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const hs={name:"json",register:Wi},Us=yr({}),Fs=yr({});let Lr=0;function hn(t,e,r=!1){let n;const s=++Lr;e.id?n=e.id:n=`${s}`,e.id=n,r&&(n=`${n}-${++Lr}`);const l=Date.now();return Fs.update(a=>(a[n]||(a[n]={timestamp:l,sortKey:s}),a)),Us.update(a=>{if(!a[n])t==="SEND"?a[n]=[e,{}]:a[n]=[{},e];else{const u=t==="SEND"?0:1;a[n][u]=e}return a}),e}const zs=yr([]);function pn(t,e){const r={_logType:t,_logId:`${t}-${++Lr}`,_sortKey:Lr,_timestamp:Date.now(),payload:e};zs.update(n=>[r,...n])}var Ji=at(`<style>body {
6
+ overflow: hidden;
7
+ }</style>`),Qi=at('<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>'),Xi=at('<ul class="divide-y divide-gray-100"></ul>'),Yi=at('<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>'),Zi=at(`<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 sf(t,e){Bt(e,!0);let r=er(fn({})),n=er(fn({})),s=er(fn([])),l=er(!1),a=er(""),u=er(""),i=er("ActivityStreams Data Exchange");Us.subscribe(M=>{_t(r,M,!0)}),Fs.subscribe(M=>{_t(n,M,!0)}),zs.subscribe(M=>{_t(s,M,!0)});const h=st(()=>{const M=[];for(const[R,g]of Object.entries(ae(r)??{})){const k=ae(n)[R];M.push({kind:"activity",id:R,sortKey:(k==null?void 0:k.sortKey)??0,tuple:g,timestamp:(k==null?void 0:k.timestamp)??0})}for(const R of ae(s))M.push({kind:"schema",sortKey:R._sortKey,entry:R});return M.sort((R,g)=>g.sortKey-R.sortKey),M});function c(M){return()=>{var A;let R=M,g=M;M.includes("-")&&(R=M.split("-")[0]),console.log(`indexSend:${R} indexResp:${g}`),console.log("logs: ",ae(r)),_t(i,"ActivityStreams Data Exchange"),_t(l,!0),_t(a,JSON.stringify(ae(r)[R][0],null,2),!0);const k=(A=ae(r)[g])==null?void 0:A[1];_t(u,k&&Object.keys(k).length>0?JSON.stringify(k,null,2):"",!0)}}function d(M){return()=>{_t(i,`Schema Event: ${M._logType}`),_t(l,!0),_t(a,JSON.stringify(M.payload,null,2),!0),_t(u,"")}}var w=Zi();bi("asm1x0",M=>{var R=zt(),g=gt(R);{var k=A=>{var W=Ji();Ve(A,W)};dt(g,A=>{ae(l)&&A(k)})}Ve(M,R)});var P=gt(w),b=qe(me(P),2),E=qe(me(b),2),m=me(E);{var o=M=>{var R=Qi();Ve(M,R)},_=M=>{var R=Xi();Pn(R,21,()=>ae(h),g=>g.kind==="schema"?g.entry._logId:g.id,(g,k)=>{var A=zt(),W=gt(A);{var Q=re=>{{let ve=st(()=>d(ae(k).entry));zi(re,{get entry(){return ae(k).entry},get buttonAction(){return ae(ve)}})}},ie=re=>{var ve=zt(),N=gt(ve);{var I=z=>{var J=zt(),te=gt(J);Pn(te,17,()=>Object.entries(ae(k).tuple[ae(k).tuple.length-1]),qs,(Ee,Fe)=>{var Re=st(()=>ci(ae(Fe),2));let Ae=()=>ae(Re)[0],_e=()=>ae(Re)[1];var xe=zt(),Ie=gt(xe);{var vt=Xe=>{{let ht=st(()=>c(`${ae(k).id}-${Ae()}`)),$t=st(()=>Object.prototype.hasOwnProperty.call(ae(k).tuple[0],"@context")),ct=st(()=>typeof ae(r)[ae(k).id][1]<"u"),wt=st(()=>`${ae(k).id}-${Ae()}`);ls(Xe,{get buttonAction(){return ae(ht)},get hasSend(){return ae($t)},get hasResponse(){return ae(ct)},get id(){return ae(wt)},get entry(){return _e()},get timestamp(){return ae(k).timestamp}})}};dt(Ie,Xe=>{_e()&&Xe(vt)})}Ve(Ee,xe)}),Ve(z,J)},L=z=>{const J=st(()=>Object.prototype.hasOwnProperty.call(ae(k).tuple[0],"@context")),te=st(()=>Object.prototype.hasOwnProperty.call(ae(k).tuple[1],"@context"));{let Ee=st(()=>c(ae(k).id)),Fe=st(()=>ae(te)?ae(k).tuple[1]:ae(k).tuple[0]);ls(z,{get buttonAction(){return ae(Ee)},get id(){return ae(k).id},get hasSend(){return ae(J)},get hasResponse(){return ae(te)},get entry(){return ae(Fe)},get timestamp(){return ae(k).timestamp}})}};dt(N,z=>{Array.isArray(ae(k).tuple[ae(k).tuple.length-1])?z(I):z(L,!1)},!0)}Ve(re,ve)};dt(W,re=>{ae(k).kind==="schema"?re(Q):re(ie,!1)})}Ve(g,A)}),he(R),Ve(M,R)};dt(m,M=>{ae(h).length===0?M(o):M(_,!1)})}he(E),he(b),he(P);var p=qe(P,2),v=me(p),$=me(v),y=me($),f=me(y),S=qe(me(f));he(f);var O=qe(f,2);O.__click=()=>_t(l,!1),he(y),Ms(2),he($);var j=qe($,2),F=me(j),V=me(F),X=me(V),G=me(X,!0);he(X);var ee=qe(X);he(V);var fe=qe(V,2),we=me(fe);ds(we,{get language(){return hs},get code(){return ae(a)}}),he(fe),he(F);var Oe=qe(F,2);{var se=M=>{var R=Yi(),g=qe(me(R),2),k=me(g);ds(k,{get language(){return hs},get code(){return ae(u)}}),he(g),he(R),Ve(M,R)};dt(Oe,M=>{ae(u)&&M(se)})}he(j);var x=qe(j,2),T=me(x);T.__click=()=>_t(l,!1),he(x),he(v),he(p),ut(()=>{mr(p,1,`${ae(l)?"flex items-center justify-center":"hidden"} bg-black bg-opacity-50 fixed top-0 left-0 w-full h-full z-50 p-4`),et(S,` ${ae(i)??""}`),et(G,ae(u)?"📤":"📋"),et(ee,` ${ae(u)?"Sent to Sockethub":"Event Payload"}`)}),Ve(t,w),Ht()}jn(["click"]);var ps="https://sockethub.org/ns/context/platform/";function Vr(t){if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.startsWith(ps)){const r=e.slice(ps.length),n=r.indexOf("/");if(n>0)return r.slice(0,n)}}}var eo=Object.create,to=Object.getPrototypeOf,gr=Object.defineProperty,xs=Object.getOwnPropertyNames,ro=Object.getOwnPropertyDescriptor,Bs=Object.prototype.hasOwnProperty;function Hs(t){return this[t]}var no,Hr=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=no??(no=new WeakMap),l=s.get(t);if(l)return l}r=t!=null?eo(to(t)):{};const a=gr(r,"default",{value:t,enumerable:!0});for(let u of xs(t))Bs.call(a,u)||gr(a,u,{get:Hs.bind(t,u),enumerable:!0});return n&&s.set(t,a),a},so=t=>{var e=(ms??(ms=new WeakMap)).get(t),r;if(e)return e;if(e=gr({},"__esModule",{value:!0}),t&&typeof t=="object"||typeof t=="function")for(var n of xs(t))Bs.call(e,n)||gr(e,n,{get:Hs.bind(t,n),enumerable:!(r=ro(t,n))||r.enumerable});return ms.set(t,e),e},ms,B=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ao=t=>t;function io(t,e){this[t]=ao.bind(null,e)}var oo=(t,e)=>{for(var r in e)gr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:io.bind(e,r)})},co=(t,e)=>()=>(t&&(e=t(t=0)),e),Ur=B(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(_){if(super(),!t.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((p,v)=>`${p}${v}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((p,v)=>(v instanceof r&&(p[v.str]=(p[v.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function s(o,..._){const p=[o[0]];let v=0;for(;v<_.length;)u(p,_[v]),p.push(o[++v]);return new n(p)}t._=s;var l=new n("+");function a(o,..._){const p=[P(o[0])];let v=0;for(;v<_.length;)p.push(l),u(p,_[v]),p.push(l,P(o[++v]));return i(p),new n(p)}t.str=a;function u(o,_){_ instanceof n?o.push(..._._items):_ instanceof r?o.push(_):o.push(d(_))}t.addCodeArg=u;function i(o){let _=1;for(;_<o.length-1;){if(o[_]===l){const p=h(o[_-1],o[_+1]);if(p!==void 0){o.splice(_-1,3,p);continue}o[_++]="+"}_++}}function h(o,_){if(_==='""')return o;if(o==='""')return _;if(typeof o=="string")return _ instanceof r||o[o.length-1]!=='"'?void 0:typeof _!="string"?`${o.slice(0,-1)}${_}"`:_[0]==='"'?o.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(o instanceof r))return`"${o}${_.slice(1)}`}function c(o,_){return _.emptyStr()?o:o.emptyStr()?_:a`${o}${_}`}t.strConcat=c;function d(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:P(Array.isArray(o)?o.join(","):o)}function w(o){return new n(P(o))}t.stringify=w;function P(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=P;function b(o){return typeof o=="string"&&t.IDENTIFIER.test(o)?new n(`.${o}`):s`[${o}]`}t.getProperty=b;function E(o){if(typeof o=="string"&&t.IDENTIFIER.test(o))return new n(`${o}`);throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`)}t.getEsmExportName=E;function m(o){return new n(o.toString())}t.regexpCode=m}),gs=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Ur();class r extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var n;(function(i){i[i.Started=0]="Started",i[i.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 s{constructor({prefixes:h,parent:c}={}){this._names={},this._prefixes=h,this._parent=c}toName(h){return h instanceof e.Name?h:this.name(h)}name(h){return new e.Name(this._newName(h))}_newName(h){const c=this._names[h]||this._nameGroup(h);return`${h}${c.index++}`}_nameGroup(h){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}t.Scope=s;class l extends e.Name{constructor(h,c){super(c),this.prefix=h}setValue(h,{property:c,itemIndex:d}){this.value=h,this.scopePath=(0,e._)`.${new e.Name(c)}[${d}]`}}t.ValueScopeName=l;var a=(0,e._)`\n`;class u extends s{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?a:e.nil}}get(){return this._scope}name(h){return new l(h,this._newName(h))}value(h,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(h),{prefix:P}=w,b=(d=c.key)!==null&&d!==void 0?d:c.ref;let E=this._values[P];if(E){const _=E.get(b);if(_)return _}else E=this._values[P]=new Map;E.set(b,w);const m=this._scope[P]||(this._scope[P]=[]),o=m.length;return m[o]=c.ref,w.setValue(c,{property:P,itemIndex:o}),w}getValue(h,c){const d=this._values[h];if(d)return d.get(c)}scopeRefs(h,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${h}${d.scopePath}`})}scopeCode(h=this._values,c,d){return this._reduceValues(h,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},c,d)}_reduceValues(h,c,d={},w){let P=e.nil;for(const b in h){const E=h[b];if(!E)continue;const m=d[b]=d[b]||new Map;E.forEach(o=>{if(m.has(o))return;m.set(o,n.Started);let _=c(o);if(_){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;P=(0,e._)`${P}${p} ${o} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(o))P=(0,e._)`${P}${_}${this.opts._n}`;else throw new r(o);m.set(o,n.Completed)})}return P}}t.ValueScope=u}),Ce=B(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=Ur(),r=gs(),n=Ur();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 s=gs();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.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 l{optimizeNodes(){return this}optimizeNames(g,k){return this}}class a extends l{constructor(g,k,A){super(),this.varKind=g,this.name=k,this.rhs=A}render({es5:g,_n:k}){const A=g?r.varKinds.var:this.varKind,W=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${W};`+k}optimizeNames(g,k){if(g[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,g,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends l{constructor(g,k,A){super(),this.lhs=g,this.rhs=k,this.sideEffects=A}render({_n:g}){return`${this.lhs} = ${this.rhs};`+g}optimizeNames(g,k){if(!(this.lhs instanceof e.Name&&!g[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,g,k),this}get names(){const g=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(g,this.rhs)}}class i extends u{constructor(g,k,A,W){super(g,A,W),this.op=k}render({_n:g}){return`${this.lhs} ${this.op}= ${this.rhs};`+g}}class h extends l{constructor(g){super(),this.label=g,this.names={}}render({_n:g}){return`${this.label}:`+g}}class c extends l{constructor(g){super(),this.label=g,this.names={}}render({_n:g}){return`break${this.label?` ${this.label}`:""};`+g}}class d extends l{constructor(g){super(),this.error=g}render({_n:g}){return`throw ${this.error};`+g}get names(){return this.error.names}}class w extends l{constructor(g){super(),this.code=g}render({_n:g}){return`${this.code};`+g}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(g,k){return this.code=G(this.code,g,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class P extends l{constructor(g=[]){super(),this.nodes=g}render(g){return this.nodes.reduce((k,A)=>k+A.render(g),"")}optimizeNodes(){const{nodes:g}=this;let k=g.length;for(;k--;){const A=g[k].optimizeNodes();Array.isArray(A)?g.splice(k,1,...A):A?g[k]=A:g.splice(k,1)}return g.length>0?this:void 0}optimizeNames(g,k){const{nodes:A}=this;let W=A.length;for(;W--;){const Q=A[W];Q.optimizeNames(g,k)||(ee(g,Q.names),A.splice(W,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((g,k)=>V(g,k.names),{})}}class b extends P{render(g){return"{"+g._n+super.render(g)+"}"+g._n}}class E extends P{}class m extends b{}m.kind="else";class o extends b{constructor(g,k){super(k),this.condition=g}render(g){let k=`if(${this.condition})`+super.render(g);return this.else&&(k+="else "+this.else.render(g)),k}optimizeNodes(){super.optimizeNodes();const g=this.condition;if(g===!0)return this.nodes;let k=this.else;if(k){const A=k.optimizeNodes();k=this.else=Array.isArray(A)?new m(A):A}if(k)return g===!1?k instanceof o?k:k.nodes:this.nodes.length?this:new o(fe(g),k instanceof o?[k]:k.nodes);if(!(g===!1||!this.nodes.length))return this}optimizeNames(g,k){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(g,k),!!(super.optimizeNames(g,k)||this.else))return this.condition=G(this.condition,g,k),this}get names(){const g=super.names;return X(g,this.condition),this.else&&V(g,this.else.names),g}}o.kind="if";class _ extends b{}_.kind="for";class p extends _{constructor(g){super(),this.iteration=g}render(g){return`for(${this.iteration})`+super.render(g)}optimizeNames(g,k){if(super.optimizeNames(g,k))return this.iteration=G(this.iteration,g,k),this}get names(){return V(super.names,this.iteration.names)}}class v extends _{constructor(g,k,A,W){super(),this.varKind=g,this.name=k,this.from=A,this.to=W}render(g){const k=g.es5?r.varKinds.var:this.varKind,{name:A,from:W,to:Q}=this;return`for(${k} ${A}=${W}; ${A}<${Q}; ${A}++)`+super.render(g)}get names(){const g=X(super.names,this.from);return X(g,this.to)}}class $ extends _{constructor(g,k,A,W){super(),this.loop=g,this.varKind=k,this.name=A,this.iterable=W}render(g){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(g)}optimizeNames(g,k){if(super.optimizeNames(g,k))return this.iterable=G(this.iterable,g,k),this}get names(){return V(super.names,this.iterable.names)}}class y extends b{constructor(g,k,A){super(),this.name=g,this.args=k,this.async=A}render(g){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(g)}}y.kind="func";class f extends P{render(g){return"return "+super.render(g)}}f.kind="return";class S extends b{render(g){let k="try"+super.render(g);return this.catch&&(k+=this.catch.render(g)),this.finally&&(k+=this.finally.render(g)),k}optimizeNodes(){var g,k;return super.optimizeNodes(),(g=this.catch)===null||g===void 0||g.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(g,k){var A,W;return super.optimizeNames(g,k),(A=this.catch)===null||A===void 0||A.optimizeNames(g,k),(W=this.finally)===null||W===void 0||W.optimizeNames(g,k),this}get names(){const g=super.names;return this.catch&&V(g,this.catch.names),this.finally&&V(g,this.finally.names),g}}class O extends b{constructor(g){super(),this.error=g}render(g){return`catch(${this.error})`+super.render(g)}}O.kind="catch";class j extends b{render(g){return"finally"+super.render(g)}}j.kind="finally";class F{constructor(g,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
9
+ `:""},this._extScope=g,this._scope=new r.Scope({parent:g}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(g){return this._scope.name(g)}scopeName(g){return this._extScope.name(g)}scopeValue(g,k){const A=this._extScope.value(g,k);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(g,k){return this._extScope.getValue(g,k)}scopeRefs(g){return this._extScope.scopeRefs(g,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(g,k,A,W){const Q=this._scope.toName(k);return A!==void 0&&W&&(this._constants[Q.str]=A),this._leafNode(new a(g,Q,A)),Q}const(g,k,A){return this._def(r.varKinds.const,g,k,A)}let(g,k,A){return this._def(r.varKinds.let,g,k,A)}var(g,k,A){return this._def(r.varKinds.var,g,k,A)}assign(g,k,A){return this._leafNode(new u(g,k,A))}add(g,k){return this._leafNode(new i(g,t.operators.ADD,k))}code(g){return typeof g=="function"?g():g!==e.nil&&this._leafNode(new w(g)),this}object(...g){const k=["{"];for(const[A,W]of g)k.length>1&&k.push(","),k.push(A),(A!==W||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,W));return k.push("}"),new e._Code(k)}if(g,k,A){if(this._blockNode(new o(g)),k&&A)this.code(k).else().code(A).endIf();else if(k)this.code(k).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(g){return this._elseNode(new o(g))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(o,m)}_for(g,k){return this._blockNode(g),k&&this.code(k).endFor(),this}for(g,k){return this._for(new p(g),k)}forRange(g,k,A,W,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const ie=this._scope.toName(g);return this._for(new v(Q,ie,k,A),()=>W(ie))}forOf(g,k,A,W=r.varKinds.const){const Q=this._scope.toName(g);if(this.opts.es5){const ie=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ie}.length`,re=>{this.var(Q,(0,e._)`${ie}[${re}]`),A(Q)})}return this._for(new $("of",W,Q,k),()=>A(Q))}forIn(g,k,A,W=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(g,(0,e._)`Object.keys(${k})`,A);const Q=this._scope.toName(g);return this._for(new $("in",W,Q,k),()=>A(Q))}endFor(){return this._endBlockNode(_)}label(g){return this._leafNode(new h(g))}break(g){return this._leafNode(new c(g))}return(g){const k=new f;if(this._blockNode(k),this.code(g),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(f)}try(g,k,A){if(!k&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const W=new S;if(this._blockNode(W),this.code(g),k){const Q=this.name("e");this._currNode=W.catch=new O(Q),k(Q)}return A&&(this._currNode=W.finally=new j,this.code(A)),this._endBlockNode(O,j)}throw(g){return this._leafNode(new d(g))}block(g,k){return this._blockStarts.push(this._nodes.length),g&&this.code(g).endBlock(k),this}endBlock(g){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-k;if(A<0||g!==void 0&&A!==g)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${g} expected`);return this._nodes.length=k,this}func(g,k=e.nil,A,W){return this._blockNode(new y(g,k,A)),W&&this.code(W).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(g=1){for(;g-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(g){return this._currNode.nodes.push(g),this}_blockNode(g){this._currNode.nodes.push(g),this._nodes.push(g)}_endBlockNode(g,k){const A=this._currNode;if(A instanceof g||k&&A instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${g.kind}/${k.kind}`:g.kind}"`)}_elseNode(g){const k=this._currNode;if(!(k instanceof o))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=g,this}get _root(){return this._nodes[0]}get _currNode(){const g=this._nodes;return g[g.length-1]}set _currNode(g){const k=this._nodes;k[k.length-1]=g}}t.CodeGen=F;function V(R,g){for(const k in g)R[k]=(R[k]||0)+(g[k]||0);return R}function X(R,g){return g instanceof e._CodeOrName?V(R,g.names):R}function G(R,g,k){if(R instanceof e.Name)return A(R);if(!W(R))return R;return new e._Code(R._items.reduce((Q,ie)=>(ie instanceof e.Name&&(ie=A(ie)),ie instanceof e._Code?Q.push(...ie._items):Q.push(ie),Q),[]));function A(Q){const ie=k[Q.str];return ie===void 0||g[Q.str]!==1?Q:(delete g[Q.str],ie)}function W(Q){return Q instanceof e._Code&&Q._items.some(ie=>ie instanceof e.Name&&g[ie.str]===1&&k[ie.str]!==void 0)}}function ee(R,g){for(const k in g)R[k]=(R[k]||0)-(g[k]||0)}function fe(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${M(R)}`}t.not=fe;var we=T(t.operators.AND);function Oe(...R){return R.reduce(we)}t.and=Oe;var se=T(t.operators.OR);function x(...R){return R.reduce(se)}t.or=x;function T(R){return(g,k)=>g===e.nil?k:k===e.nil?g:(0,e._)`${M(g)} ${R} ${M(k)}`}function M(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),Ue=B(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=Ce(),r=Ur();function n(y){const f={};for(const S of y)f[S]=!0;return f}t.toHash=n;function s(y,f){return typeof f=="boolean"?f:Object.keys(f).length===0?!0:(l(y,f),!a(f,y.self.RULES.all))}t.alwaysValidSchema=s;function l(y,f=y.schema){const{opts:S,self:O}=y;if(!S.strictSchema||typeof f=="boolean")return;const j=O.RULES.keywords;for(const F in f)j[F]||$(y,`unknown keyword: "${F}"`)}t.checkUnknownRules=l;function a(y,f){if(typeof y=="boolean")return!y;for(const S in y)if(f[S])return!0;return!1}t.schemaHasRules=a;function u(y,f){if(typeof y=="boolean")return!y;for(const S in y)if(S!=="$ref"&&f.all[S])return!0;return!1}t.schemaHasRulesButRef=u;function i({topSchemaRef:y,schemaPath:f},S,O,j){if(!j){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${y}${f}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=i;function h(y){return w(decodeURIComponent(y))}t.unescapeFragment=h;function c(y){return encodeURIComponent(d(y))}t.escapeFragment=c;function d(y){return typeof y=="number"?`${y}`:y.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function w(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function P(y,f){if(Array.isArray(y))for(const S of y)f(S);else f(y)}t.eachItem=P;function b({mergeNames:y,mergeToName:f,mergeValues:S,resultToName:O}){return(j,F,V,X)=>{const G=V===void 0?F:V instanceof e.Name?(F instanceof e.Name?y(j,F,V):f(j,F,V),V):F instanceof e.Name?(f(j,V,F),F):S(F,V);return X===e.Name&&!(G instanceof e.Name)?O(j,G):G}}t.mergeEvaluated={props:b({mergeNames:(y,f,S)=>y.if((0,e._)`${S} !== true && ${f} !== undefined`,()=>{y.if((0,e._)`${f} === true`,()=>y.assign(S,!0),()=>y.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${f})`))}),mergeToName:(y,f,S)=>y.if((0,e._)`${S} !== true`,()=>{f===!0?y.assign(S,!0):(y.assign(S,(0,e._)`${S} || {}`),m(y,S,f))}),mergeValues:(y,f)=>y===!0?!0:{...y,...f},resultToName:E}),items:b({mergeNames:(y,f,S)=>y.if((0,e._)`${S} !== true && ${f} !== undefined`,()=>y.assign(S,(0,e._)`${f} === true ? true : ${S} > ${f} ? ${S} : ${f}`)),mergeToName:(y,f,S)=>y.if((0,e._)`${S} !== true`,()=>y.assign(S,f===!0?!0:(0,e._)`${S} > ${f} ? ${S} : ${f}`)),mergeValues:(y,f)=>y===!0?!0:Math.max(y,f),resultToName:(y,f)=>y.var("items",f)})};function E(y,f){if(f===!0)return y.var("props",!0);const S=y.var("props",(0,e._)`{}`);return f!==void 0&&m(y,S,f),S}t.evaluatedPropsToName=E;function m(y,f,S){Object.keys(S).forEach(O=>y.assign((0,e._)`${f}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var o={};function _(y,f){return y.scopeValue("func",{ref:f,code:o[f.code]||(o[f.code]=new r._Code(f.code))})}t.useFunc=_;var p;(function(y){y[y.Num=0]="Num",y[y.Str=1]="Str"})(p||(t.Type=p={}));function v(y,f,S){if(y instanceof e.Name){const O=f===p.Num;return S?O?(0,e._)`"[" + ${y} + "]"`:(0,e._)`"['" + ${y} + "']"`:O?(0,e._)`"/" + ${y}`:(0,e._)`"/" + ${y}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(y).toString():"/"+d(y)}t.getErrorPath=v;function $(y,f,S=y.opts.strictSchema){if(S){if(f=`strict mode: ${f}`,S===!0)throw new Error(f);y.self.logger.warn(f)}}t.checkStrictMode=$}),Qt=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),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}),Kr=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Ce(),r=Ue(),n=Qt();t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:o})=>o?(0,e.str)`"${m}" keyword must be ${o} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,o=t.keywordError,_,p){const{it:v}=m,{gen:$,compositeRule:y,allErrors:f}=v,S=d(m,o,_);p??(y||f)?i($,S):h(v,(0,e._)`[${S}]`)}t.reportError=s;function l(m,o=t.keywordError,_){const{it:p}=m,{gen:v,compositeRule:$,allErrors:y}=p,f=d(m,o,_);i(v,f),$||y||h(p,n.default.vErrors)}t.reportExtraError=l;function a(m,o){m.assign(n.default.errors,o),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(o,()=>m.assign((0,e._)`${n.default.vErrors}.length`,o),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=a;function u({gen:m,keyword:o,schemaValue:_,data:p,errsCount:v,it:$}){if(v===void 0)throw new Error("ajv implementation error");const y=m.name("err");m.forRange("i",v,n.default.errors,f=>{m.const(y,(0,e._)`${n.default.vErrors}[${f}]`),m.if((0,e._)`${y}.instancePath === undefined`,()=>m.assign((0,e._)`${y}.instancePath`,(0,e.strConcat)(n.default.instancePath,$.errorPath))),m.assign((0,e._)`${y}.schemaPath`,(0,e.str)`${$.errSchemaPath}/${o}`),$.opts.verbose&&(m.assign((0,e._)`${y}.schema`,_),m.assign((0,e._)`${y}.data`,p))})}t.extendErrors=u;function i(m,o){const _=m.const("err",o);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${_}]`),(0,e._)`${n.default.vErrors}.push(${_})`),m.code((0,e._)`${n.default.errors}++`)}function h(m,o){const{gen:_,validateName:p,schemaEnv:v}=m;v.$async?_.throw((0,e._)`new ${m.ValidationError}(${o})`):(_.assign((0,e._)`${p}.errors`,o),_.return(!1))}var c={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 d(m,o,_){const{createErrors:p}=m.it;return p===!1?(0,e._)`{}`:w(m,o,_)}function w(m,o,_={}){const{gen:p,it:v}=m,$=[P(v,_),b(m,_)];return E(m,o,$),p.object(...$)}function P({errorPath:m},{instancePath:o}){const _=o?(0,e.str)`${m}${(0,r.getErrorPath)(o,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function b({keyword:m,it:{errSchemaPath:o}},{schemaPath:_,parentSchema:p}){let v=p?o:(0,e.str)`${o}/${m}`;return _&&(v=(0,e.str)`${v}${(0,r.getErrorPath)(_,r.Type.Str)}`),[c.schemaPath,v]}function E(m,{params:o,message:_},p){const{keyword:v,data:$,schemaValue:y,it:f}=m,{opts:S,propertyName:O,topSchemaRef:j,schemaPath:F}=f;p.push([c.keyword,v],[c.params,typeof o=="function"?o(m):o||(0,e._)`{}`]),S.messages&&p.push([c.message,typeof _=="function"?_(m):_]),S.verbose&&p.push([c.schema,y],[c.parentSchema,(0,e._)`${j}${F}`],[n.default.data,$]),O&&p.push([c.propertyName,O])}}),lo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Kr(),r=Ce(),n=Qt(),s={message:"boolean schema is false"};function l(i){const{gen:h,schema:c,validateName:d}=i;c===!1?u(i,!1):typeof c=="object"&&c.$async===!0?h.return(n.default.data):(h.assign((0,r._)`${d}.errors`,null),h.return(!0))}t.topBoolOrEmptySchema=l;function a(i,h){const{gen:c,schema:d}=i;d===!1?(c.var(h,!1),u(i)):c.var(h,!0)}t.boolOrEmptySchema=a;function u(i,h){const{gen:c,data:d}=i,w={gen:c,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(w,s,void 0,h)}}),Ks=B(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(l){return typeof l=="string"&&r.has(l)}t.isJSONType=n;function s(){const l={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...l,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},l.number,l.string,l.array,l.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),Gs=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:l},a){const u=l.RULES.types[a];return u&&u!==!0&&r(s,u)}t.schemaHasRulesForType=e;function r(s,l){return l.rules.some(a=>n(s,a))}t.shouldUseGroup=r;function n(s,l){var a;return s[l.keyword]!==void 0||((a=l.definition.implements)===null||a===void 0?void 0:a.some(u=>s[u]!==void 0))}t.shouldUseRule=n}),Fr=B(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=Ks(),r=Gs(),n=Kr(),s=Ce(),l=Ue(),a;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(a||(t.DataType=a={}));function u(p){const v=i(p.type);if(v.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&v.push("null")}return v}t.getSchemaTypes=u;function i(p){const v=Array.isArray(p)?p:p?[p]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}t.getJSONTypes=i;function h(p,v){const{gen:$,data:y,opts:f}=p,S=d(v,f.coerceTypes),O=v.length>0&&!(S.length===0&&v.length===1&&(0,r.schemaHasRulesForType)(p,v[0]));if(O){const j=E(v,y,f.strictNumbers,a.Wrong);$.if(j,()=>{S.length?w(p,v,S):o(p)})}return O}t.coerceAndCheckDataType=h;var c=new Set(["string","number","integer","boolean","null"]);function d(p,v){return v?p.filter($=>c.has($)||v==="array"&&$==="array"):[]}function w(p,v,$){const{gen:y,data:f,opts:S}=p,O=y.let("dataType",(0,s._)`typeof ${f}`),j=y.let("coerced",(0,s._)`undefined`);S.coerceTypes==="array"&&y.if((0,s._)`${O} == 'object' && Array.isArray(${f}) && ${f}.length == 1`,()=>y.assign(f,(0,s._)`${f}[0]`).assign(O,(0,s._)`typeof ${f}`).if(E(v,f,S.strictNumbers),()=>y.assign(j,f))),y.if((0,s._)`${j} !== undefined`);for(const V of $)(c.has(V)||V==="array"&&S.coerceTypes==="array")&&F(V);y.else(),o(p),y.endIf(),y.if((0,s._)`${j} !== undefined`,()=>{y.assign(f,j),P(p,j)});function F(V){switch(V){case"string":y.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(j,(0,s._)`"" + ${f}`).elseIf((0,s._)`${f} === null`).assign(j,(0,s._)`""`);return;case"number":y.elseIf((0,s._)`${O} == "boolean" || ${f} === null
10
+ || (${O} == "string" && ${f} && ${f} == +${f})`).assign(j,(0,s._)`+${f}`);return;case"integer":y.elseIf((0,s._)`${O} === "boolean" || ${f} === null
11
+ || (${O} === "string" && ${f} && ${f} == +${f} && !(${f} % 1))`).assign(j,(0,s._)`+${f}`);return;case"boolean":y.elseIf((0,s._)`${f} === "false" || ${f} === 0 || ${f} === null`).assign(j,!1).elseIf((0,s._)`${f} === "true" || ${f} === 1`).assign(j,!0);return;case"null":y.elseIf((0,s._)`${f} === "" || ${f} === 0 || ${f} === false`),y.assign(j,null);return;case"array":y.elseIf((0,s._)`${O} === "string" || ${O} === "number"
12
+ || ${O} === "boolean" || ${f} === null`).assign(j,(0,s._)`[${f}]`)}}}function P({gen:p,parentData:v,parentDataProperty:$},y){p.if((0,s._)`${v} !== undefined`,()=>p.assign((0,s._)`${v}[${$}]`,y))}function b(p,v,$,y=a.Correct){const f=y===a.Correct?s.operators.EQ:s.operators.NEQ;let S;switch(p){case"null":return(0,s._)`${v} ${f} null`;case"array":S=(0,s._)`Array.isArray(${v})`;break;case"object":S=(0,s._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":S=O((0,s._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":S=O();break;default:return(0,s._)`typeof ${v} ${f} ${p}`}return y===a.Correct?S:(0,s.not)(S);function O(j=s.nil){return(0,s.and)((0,s._)`typeof ${v} == "number"`,j,$?(0,s._)`isFinite(${v})`:s.nil)}}t.checkDataType=b;function E(p,v,$,y){if(p.length===1)return b(p[0],v,$,y);let f;const S=(0,l.toHash)(p);if(S.array&&S.object){const O=(0,s._)`typeof ${v} != "object"`;f=S.null?O:(0,s._)`!${v} || ${O}`,delete S.null,delete S.array,delete S.object}else f=s.nil;S.number&&delete S.integer;for(const O in S)f=(0,s.and)(f,b(O,v,$,y));return f}t.checkDataTypes=E;var m={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:v})=>typeof p=="string"?(0,s._)`{type: ${p}}`:(0,s._)`{type: ${v}}`};function o(p){const v=_(p);(0,n.reportError)(v,m)}t.reportTypeError=o;function _(p){const{gen:v,data:$,schema:y}=p,f=(0,l.schemaRefOrVal)(p,y,"type");return{gen:v,keyword:"type",data:$,schema:y.type,schemaCode:f,schemaValue:f,parentSchema:y,params:{},it:p}}}),uo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Ce(),r=Ue();function n(l,a){const{properties:u,items:i}=l.schema;if(a==="object"&&u)for(const h in u)s(l,h,u[h].default);else a==="array"&&Array.isArray(i)&&i.forEach((h,c)=>s(l,c,h.default))}t.assignDefaults=n;function s(l,a,u){const{gen:i,compositeRule:h,data:c,opts:d}=l;if(u===void 0)return;const w=(0,e._)`${c}${(0,e.getProperty)(a)}`;if(h){(0,r.checkStrictMode)(l,`default is ignored for: ${w}`);return}let P=(0,e._)`${w} === undefined`;d.useDefaults==="empty"&&(P=(0,e._)`${P} || ${w} === null || ${w} === ""`),i.if(P,(0,e._)`${w} = ${(0,e.stringify)(u)}`)}}),It=B(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=Ce(),r=Ue(),n=Qt(),s=Ue();function l(p,v){const{gen:$,data:y,it:f}=p;$.if(d($,y,v,f.opts.ownProperties),()=>{p.setParams({missingProperty:(0,e._)`${v}`},!0),p.error()})}t.checkReportMissingProp=l;function a({gen:p,data:v,it:{opts:$}},y,f){return(0,e.or)(...y.map(S=>(0,e.and)(d(p,v,S,$.ownProperties),(0,e._)`${f} = ${S}`)))}t.checkMissingProp=a;function u(p,v){p.setParams({missingProperty:v},!0),p.error()}t.reportMissingProp=u;function i(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=i;function h(p,v,$){return(0,e._)`${i(p)}.call(${v}, ${$})`}t.isOwnProperty=h;function c(p,v,$,y){const f=(0,e._)`${v}${(0,e.getProperty)($)} !== undefined`;return y?(0,e._)`${f} && ${h(p,v,$)}`:f}t.propertyInData=c;function d(p,v,$,y){const f=(0,e._)`${v}${(0,e.getProperty)($)} === undefined`;return y?(0,e.or)(f,(0,e.not)(h(p,v,$))):f}t.noPropertyInData=d;function w(p){return p?Object.keys(p).filter(v=>v!=="__proto__"):[]}t.allSchemaProperties=w;function P(p,v){return w(v).filter($=>!(0,r.alwaysValidSchema)(p,v[$]))}t.schemaProperties=P;function b({schemaCode:p,data:v,it:{gen:$,topSchemaRef:y,schemaPath:f,errorPath:S},it:O},j,F,V){const X=V?(0,e._)`${p}, ${v}, ${y}${f}`:v,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,S)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&G.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const ee=(0,e._)`${X}, ${$.object(...G)}`;return F!==e.nil?(0,e._)`${j}.call(${F}, ${ee})`:(0,e._)`${j}(${ee})`}t.callValidateCode=b;var E=(0,e._)`new RegExp`;function m({gen:p,it:{opts:v}},$){const y=v.unicodeRegExp?"u":"",{regExp:f}=v.code,S=f($,y);return p.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${f.code==="new RegExp"?E:(0,s.useFunc)(p,f)}(${$}, ${y})`})}t.usePattern=m;function o(p){const{gen:v,data:$,keyword:y,it:f}=p,S=v.name("valid");if(f.allErrors){const j=v.let("valid",!0);return O(()=>v.assign(j,!1)),j}return v.var(S,!0),O(()=>v.break()),S;function O(j){const F=v.const("len",(0,e._)`${$}.length`);v.forRange("i",0,F,V=>{p.subschema({keyword:y,dataProp:V,dataPropType:r.Type.Num},S),v.if((0,e.not)(S),j)})}}t.validateArray=o;function _(p){const{gen:v,schema:$,keyword:y,it:f}=p;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(F=>(0,r.alwaysValidSchema)(f,F))&&!f.opts.unevaluated)return;const O=v.let("valid",!1),j=v.name("_valid");v.block(()=>$.forEach((F,V)=>{const X=p.subschema({keyword:y,schemaProp:V,compositeRule:!0},j);v.assign(O,(0,e._)`${O} || ${j}`),p.mergeValidEvaluated(X,j)||v.if((0,e.not)(O))})),p.result(O,()=>p.reset(),()=>p.error(!0))}t.validateUnion=_}),fo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Ce(),r=Qt(),n=It(),s=Kr();function l(P,b){const{gen:E,keyword:m,schema:o,parentSchema:_,it:p}=P,v=b.macro.call(p.self,o,_,p),$=c(E,m,v);p.opts.validateSchema!==!1&&p.self.validateSchema(v,!0);const y=E.name("valid");P.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${p.errSchemaPath}/${m}`,topSchemaRef:$,compositeRule:!0},y),P.pass(y,()=>P.error(!0))}t.macroKeywordCode=l;function a(P,b){var E;const{gen:m,keyword:o,schema:_,parentSchema:p,$data:v,it:$}=P;h($,b);const y=!v&&b.compile?b.compile.call($.self,_,p,$):b.validate,f=c(m,o,y),S=m.let("valid");P.block$data(S,O),P.ok((E=b.valid)!==null&&E!==void 0?E:S);function O(){if(b.errors===!1)V(),b.modifying&&u(P),X(()=>P.error());else{const G=b.async?j():F();b.modifying&&u(P),X(()=>i(P,G))}}function j(){const G=m.let("ruleErrs",null);return m.try(()=>V((0,e._)`await `),ee=>m.assign(S,!1).if((0,e._)`${ee} instanceof ${$.ValidationError}`,()=>m.assign(G,(0,e._)`${ee}.errors`),()=>m.throw(ee))),G}function F(){const G=(0,e._)`${f}.errors`;return m.assign(G,null),V(e.nil),G}function V(G=b.async?(0,e._)`await `:e.nil){const ee=$.opts.passContext?r.default.this:r.default.self,fe=!("compile"in b&&!v||b.schema===!1);m.assign(S,(0,e._)`${G}${(0,n.callValidateCode)(P,f,ee,fe)}`,b.modifying)}function X(G){var ee;m.if((0,e.not)((ee=b.valid)!==null&&ee!==void 0?ee:S),G)}}t.funcKeywordCode=a;function u(P){const{gen:b,data:E,it:m}=P;b.if(m.parentData,()=>b.assign(E,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function i(P,b){const{gen:E}=P;E.if((0,e._)`Array.isArray(${b})`,()=>{E.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,s.extendErrors)(P)},()=>P.error())}function h({schemaEnv:P},b){if(b.async&&!P.$async)throw new Error("async keyword in sync schema")}function c(P,b,E){if(E===void 0)throw new Error(`keyword "${b}" failed to compile`);return P.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(P,b,E=!1){return!b.length||b.some(m=>m==="array"?Array.isArray(P):m==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==m||E&&typeof P>"u")}t.validSchemaType=d;function w({schema:P,opts:b,self:E,errSchemaPath:m},o,_){if(Array.isArray(o.keyword)?!o.keyword.includes(_):o.keyword!==_)throw new Error("ajv implementation error");const p=o.dependencies;if(p!=null&&p.some(v=>!Object.prototype.hasOwnProperty.call(P,v)))throw new Error(`parent schema must have dependencies of ${_}: ${p.join(",")}`);if(o.validateSchema&&!o.validateSchema(P[_])){const $=`keyword "${_}" value is invalid at path "${m}": `+E.errorsText(o.validateSchema.errors);if(b.validateSchema==="log")E.logger.error($);else throw new Error($)}}t.validateKeywordUsage=w}),ho=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Ce(),r=Ue();function n(a,{keyword:u,schemaProp:i,schema:h,schemaPath:c,errSchemaPath:d,topSchemaRef:w}){if(u!==void 0&&h!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const P=a.schema[u];return i===void 0?{schema:P,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${a.errSchemaPath}/${u}`}:{schema:P[i],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(i)}`,errSchemaPath:`${a.errSchemaPath}/${u}/${(0,r.escapeFragment)(i)}`}}if(h!==void 0){if(c===void 0||d===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:h,schemaPath:c,topSchemaRef:w,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(a,u,{dataProp:i,dataPropType:h,data:c,dataTypes:d,propertyName:w}){if(c!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=u;if(i!==void 0){const{errorPath:E,dataPathArr:m,opts:o}=u,_=P.let("data",(0,e._)`${u.data}${(0,e.getProperty)(i)}`,!0);b(_),a.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(i,h,o.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${i}`,a.dataPathArr=[...m,a.parentDataProperty]}if(c!==void 0){const E=c instanceof e.Name?c:P.let("data",c,!0);b(E),w!==void 0&&(a.propertyName=w)}d&&(a.dataTypes=d);function b(E){a.data=E,a.dataLevel=u.dataLevel+1,a.dataTypes=[],u.definedProperties=new Set,a.parentData=u.data,a.dataNames=[...u.dataNames,E]}}t.extendSubschemaData=s;function l(a,{jtdDiscriminator:u,jtdMetadata:i,compositeRule:h,createErrors:c,allErrors:d}){h!==void 0&&(a.compositeRule=h),c!==void 0&&(a.createErrors=c),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=u,a.jtdMetadata=i}t.extendSubschemaMode=l}),Gr=B((t,e)=>{e.exports=function r(n,s){if(n===s)return!0;if(n&&s&&typeof n=="object"&&typeof s=="object"){if(n.constructor!==s.constructor)return!1;var l,a,u;if(Array.isArray(n)){if(l=n.length,l!=s.length)return!1;for(a=l;a--!==0;)if(!r(n[a],s[a]))return!1;return!0}if(n.constructor===RegExp)return n.source===s.source&&n.flags===s.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===s.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===s.toString();if(u=Object.keys(n),l=u.length,l!==Object.keys(s).length)return!1;for(a=l;a--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[a]))return!1;for(a=l;a--!==0;){var i=u[a];if(!r(n[i],s[i]))return!1}return!0}return n!==n&&s!==s}}),Ws=B((t,e)=>{var r=e.exports=function(l,a,u){typeof a=="function"&&(u=a,a={}),u=a.cb||u;var i=typeof u=="function"?u:u.pre||function(){},h=u.post||function(){};n(a,i,h,l,"",l)};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(l,a,u,i,h,c,d,w,P,b){if(i&&typeof i=="object"&&!Array.isArray(i)){a(i,h,c,d,w,P,b);for(var E in i){var m=i[E];if(Array.isArray(m)){if(E in r.arrayKeywords)for(var o=0;o<m.length;o++)n(l,a,u,m[o],h+"/"+E+"/"+o,c,h,E,i,o)}else if(E in r.propsKeywords){if(m&&typeof m=="object")for(var _ in m)n(l,a,u,m[_],h+"/"+E+"/"+s(_),c,h,E,i,_)}else(E in r.keywords||l.allKeys&&!(E in r.skipKeywords))&&n(l,a,u,m,h+"/"+E,c,h,E,i)}u(i,h,c,d,w,P,b)}}function s(l){return l.replace(/~/g,"~0").replace(/\//g,"~1")}}),Wr=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Ue(),r=Gr(),n=Ws(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function l(m,o=!0){return typeof m=="boolean"?!0:o===!0?!u(m):o?i(m)<=o:!1}t.inlineRef=l;var a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(m){for(const o in m){if(a.has(o))return!0;const _=m[o];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function i(m){let o=0;for(const _ in m){if(_==="$ref")return 1/0;if(o++,!s.has(_)&&(typeof m[_]=="object"&&(0,e.eachItem)(m[_],p=>o+=i(p)),o===1/0))return 1/0}return o}function h(m,o="",_){_!==!1&&(o=w(o));const p=m.parse(o);return c(m,p)}t.getFullPath=h;function c(m,o){return m.serialize(o).split("#")[0]+"#"}t._getFullPath=c;var d=/#\/?$/;function w(m){return m?m.replace(d,""):""}t.normalizeId=w;function P(m,o,_){return _=w(_),m.resolve(o,_)}t.resolveUrl=P;var b=/^[a-z_][-a-z0-9._]*$/i;function E(m,o){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:p}=this.opts,v=w(m[_]||o),$={"":v},y=h(p,v,!1),f={},S=new Set;return n(m,{allKeys:!0},(F,V,X,G)=>{if(G===void 0)return;const ee=y+V;let fe=$[G];typeof F[_]=="string"&&(fe=we.call(this,F[_])),Oe.call(this,F.$anchor),Oe.call(this,F.$dynamicAnchor),$[V]=fe;function we(se){const x=this.opts.uriResolver.resolve;if(se=w(fe?x(fe,se):se),S.has(se))throw j(se);S.add(se);let T=this.refs[se];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?O(F,T.schema,se):se!==w(ee)&&(se[0]==="#"?(O(F,f[se],se),f[se]=F):this.refs[se]=ee),se}function Oe(se){if(typeof se=="string"){if(!b.test(se))throw new Error(`invalid anchor "${se}"`);we.call(this,`#${se}`)}}}),f;function O(F,V,X){if(V!==void 0&&!r(F,V))throw j(X)}function j(F){return new Error(`reference "${F}" resolves to more than one schema`)}}t.getSchemaRefs=E}),Jr=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=lo(),r=Fr(),n=Gs(),s=Fr(),l=uo(),a=fo(),u=ho(),i=Ce(),h=Qt(),c=Wr(),d=Ue(),w=Kr();function P(N){if(y(N)&&(S(N),$(N))){o(N);return}b(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=P;function b({gen:N,validateName:I,schema:L,schemaEnv:z,opts:J},te){J.code.es5?N.func(I,(0,i._)`${h.default.data}, ${h.default.valCxt}`,z.$async,()=>{N.code((0,i._)`"use strict"; ${p(L,J)}`),m(N,J),N.code(te)}):N.func(I,(0,i._)`${h.default.data}, ${E(J)}`,z.$async,()=>N.code(p(L,J)).code(te))}function E(N){return(0,i._)`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${N.dynamicRef?(0,i._)`, ${h.default.dynamicAnchors}={}`:i.nil}}={}`}function m(N,I){N.if(h.default.valCxt,()=>{N.var(h.default.instancePath,(0,i._)`${h.default.valCxt}.${h.default.instancePath}`),N.var(h.default.parentData,(0,i._)`${h.default.valCxt}.${h.default.parentData}`),N.var(h.default.parentDataProperty,(0,i._)`${h.default.valCxt}.${h.default.parentDataProperty}`),N.var(h.default.rootData,(0,i._)`${h.default.valCxt}.${h.default.rootData}`),I.dynamicRef&&N.var(h.default.dynamicAnchors,(0,i._)`${h.default.valCxt}.${h.default.dynamicAnchors}`)},()=>{N.var(h.default.instancePath,(0,i._)`""`),N.var(h.default.parentData,(0,i._)`undefined`),N.var(h.default.parentDataProperty,(0,i._)`undefined`),N.var(h.default.rootData,h.default.data),I.dynamicRef&&N.var(h.default.dynamicAnchors,(0,i._)`{}`)})}function o(N){const{schema:I,opts:L,gen:z}=N;b(N,()=>{L.$comment&&I.$comment&&G(N),F(N),z.let(h.default.vErrors,null),z.let(h.default.errors,0),L.unevaluated&&_(N),O(N),ee(N)})}function _(N){const{gen:I,validateName:L}=N;N.evaluated=I.const("evaluated",(0,i._)`${L}.evaluated`),I.if((0,i._)`${N.evaluated}.dynamicProps`,()=>I.assign((0,i._)`${N.evaluated}.props`,(0,i._)`undefined`)),I.if((0,i._)`${N.evaluated}.dynamicItems`,()=>I.assign((0,i._)`${N.evaluated}.items`,(0,i._)`undefined`))}function p(N,I){const L=typeof N=="object"&&N[I.schemaId];return L&&(I.code.source||I.code.process)?(0,i._)`/*# sourceURL=${L} */`:i.nil}function v(N,I){if(y(N)&&(S(N),$(N))){f(N,I);return}(0,e.boolOrEmptySchema)(N,I)}function $({schema:N,self:I}){if(typeof N=="boolean")return!N;for(const L in N)if(I.RULES.all[L])return!0;return!1}function y(N){return typeof N.schema!="boolean"}function f(N,I){const{schema:L,gen:z,opts:J}=N;J.$comment&&L.$comment&&G(N),V(N),X(N);const te=z.const("_errs",h.default.errors);O(N,te),z.var(I,(0,i._)`${te} === ${h.default.errors}`)}function S(N){(0,d.checkUnknownRules)(N),j(N)}function O(N,I){if(N.opts.jtd)return we(N,[],!1,I);const L=(0,r.getSchemaTypes)(N.schema),z=(0,r.coerceAndCheckDataType)(N,L);we(N,L,!z,I)}function j(N){const{schema:I,errSchemaPath:L,opts:z,self:J}=N;I.$ref&&z.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(I,J.RULES)&&J.logger.warn(`$ref: keywords ignored in schema at path "${L}"`)}function F(N){const{schema:I,opts:L}=N;I.default!==void 0&&L.useDefaults&&L.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function V(N){const I=N.schema[N.opts.schemaId];I&&(N.baseId=(0,c.resolveUrl)(N.opts.uriResolver,N.baseId,I))}function X(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:N,schemaEnv:I,schema:L,errSchemaPath:z,opts:J}){const te=L.$comment;if(J.$comment===!0)N.code((0,i._)`${h.default.self}.logger.log(${te})`);else if(typeof J.$comment=="function"){const Ee=(0,i.str)`${z}/$comment`,Fe=N.scopeValue("root",{ref:I.root});N.code((0,i._)`${h.default.self}.opts.$comment(${te}, ${Ee}, ${Fe}.schema)`)}}function ee(N){const{gen:I,schemaEnv:L,validateName:z,ValidationError:J,opts:te}=N;L.$async?I.if((0,i._)`${h.default.errors} === 0`,()=>I.return(h.default.data),()=>I.throw((0,i._)`new ${J}(${h.default.vErrors})`)):(I.assign((0,i._)`${z}.errors`,h.default.vErrors),te.unevaluated&&fe(N),I.return((0,i._)`${h.default.errors} === 0`))}function fe({gen:N,evaluated:I,props:L,items:z}){L instanceof i.Name&&N.assign((0,i._)`${I}.props`,L),z instanceof i.Name&&N.assign((0,i._)`${I}.items`,z)}function we(N,I,L,z){const{gen:J,schema:te,data:Ee,allErrors:Fe,opts:Re,self:Ae}=N,{RULES:_e}=Ae;if(te.$ref&&(Re.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(te,_e))){J.block(()=>Q(N,"$ref",_e.all.$ref.definition));return}Re.jtd||se(N,I),J.block(()=>{for(const Ie of _e.rules)xe(Ie);xe(_e.post)});function xe(Ie){(0,n.shouldUseGroup)(te,Ie)&&(Ie.type?(J.if((0,s.checkDataType)(Ie.type,Ee,Re.strictNumbers)),Oe(N,Ie),I.length===1&&I[0]===Ie.type&&L&&(J.else(),(0,s.reportTypeError)(N)),J.endIf()):Oe(N,Ie),Fe||J.if((0,i._)`${h.default.errors} === ${z||0}`))}}function Oe(N,I){const{gen:L,schema:z,opts:{useDefaults:J}}=N;J&&(0,l.assignDefaults)(N,I.type),L.block(()=>{for(const te of I.rules)(0,n.shouldUseRule)(z,te)&&Q(N,te.keyword,te.definition,I.type)})}function se(N,I){N.schemaEnv.meta||!N.opts.strictTypes||(x(N,I),N.opts.allowUnionTypes||T(N,I),M(N,N.dataTypes))}function x(N,I){if(I.length){if(!N.dataTypes.length){N.dataTypes=I;return}I.forEach(L=>{g(N.dataTypes,L)||A(N,`type "${L}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,I)}}function T(N,I){I.length>1&&!(I.length===2&&I.includes("null"))&&A(N,"use allowUnionTypes to allow union type keyword")}function M(N,I){const L=N.self.RULES.all;for(const z in L){const J=L[z];if(typeof J=="object"&&(0,n.shouldUseRule)(N.schema,J)){const{type:te}=J.definition;te.length&&!te.some(Ee=>R(I,Ee))&&A(N,`missing type "${te.join(",")}" for keyword "${z}"`)}}}function R(N,I){return N.includes(I)||I==="number"&&N.includes("integer")}function g(N,I){return N.includes(I)||I==="integer"&&N.includes("number")}function k(N,I){const L=[];for(const z of N.dataTypes)g(I,z)?L.push(z):I.includes("integer")&&z==="number"&&L.push("integer");N.dataTypes=L}function A(N,I){const L=N.schemaEnv.baseId+N.errSchemaPath;I+=` at "${L}" (strictTypes)`,(0,d.checkStrictMode)(N,I,N.opts.strictTypes)}class W{constructor(I,L,z){if((0,a.validateKeywordUsage)(I,L,z),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=z,this.data=I.data,this.schema=I.schema[z],this.$data=L.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(I,this.schema,z,this.$data),this.schemaType=L.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=L,this.$data)this.schemaCode=I.gen.const("vSchema",ve(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,L.schemaType,L.allowUndefined))throw new Error(`${z} value must be ${JSON.stringify(L.schemaType)}`);("code"in L?L.trackErrors:L.errors!==!1)&&(this.errsCount=I.gen.const("_errs",h.default.errors))}result(I,L,z){this.failResult((0,i.not)(I),L,z)}failResult(I,L,z){this.gen.if(I),z?z():this.error(),L?(this.gen.else(),L(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,L){this.failResult((0,i.not)(I),void 0,L)}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:L}=this;this.fail((0,i._)`${L} !== undefined && (${(0,i.or)(this.invalid$data(),I)})`)}error(I,L,z){if(L){this.setParams(L),this._error(I,z),this.setParams({});return}this._error(I,z)}_error(I,L){(I?w.reportExtraError:w.reportError)(this,this.def.error,L)}$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(I){this.allErrors||this.gen.if(I)}setParams(I,L){L?Object.assign(this.params,I):this.params=I}block$data(I,L,z=i.nil){this.gen.block(()=>{this.check$data(I,z),L()})}check$data(I=i.nil,L=i.nil){if(!this.$data)return;const{gen:z,schemaCode:J,schemaType:te,def:Ee}=this;z.if((0,i.or)((0,i._)`${J} === undefined`,L)),I!==i.nil&&z.assign(I,!0),(te.length||Ee.validateSchema)&&(z.elseIf(this.invalid$data()),this.$dataError(),I!==i.nil&&z.assign(I,!1)),z.else()}invalid$data(){const{gen:I,schemaCode:L,schemaType:z,def:J,it:te}=this;return(0,i.or)(Ee(),Fe());function Ee(){if(z.length){if(!(L instanceof i.Name))throw new Error("ajv implementation error");const Re=Array.isArray(z)?z:[z];return(0,i._)`${(0,s.checkDataTypes)(Re,L,te.opts.strictNumbers,s.DataType.Wrong)}`}return i.nil}function Fe(){if(J.validateSchema){const Re=I.scopeValue("validate$data",{ref:J.validateSchema});return(0,i._)`!${Re}(${L})`}return i.nil}}subschema(I,L){const z=(0,u.getSubschema)(this.it,I);(0,u.extendSubschemaData)(z,this.it,I),(0,u.extendSubschemaMode)(z,I);const J={...this.it,...z,items:void 0,props:void 0};return v(J,L),J}mergeEvaluated(I,L){const{it:z,gen:J}=this;z.opts.unevaluated&&(z.props!==!0&&I.props!==void 0&&(z.props=d.mergeEvaluated.props(J,I.props,z.props,L)),z.items!==!0&&I.items!==void 0&&(z.items=d.mergeEvaluated.items(J,I.items,z.items,L)))}mergeValidEvaluated(I,L){const{it:z,gen:J}=this;if(z.opts.unevaluated&&(z.props!==!0||z.items!==!0))return J.if(L,()=>this.mergeEvaluated(I,i.Name)),!0}}t.KeywordCxt=W;function Q(N,I,L,z){const J=new W(N,L,I);"code"in L?L.code(J,z):J.$data&&L.validate?(0,a.funcKeywordCode)(J,L):"macro"in L?(0,a.macroKeywordCode)(J,L):(L.compile||L.validate)&&(0,a.funcKeywordCode)(J,L)}var ie=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(N,{dataLevel:I,dataNames:L,dataPathArr:z}){let J,te;if(N==="")return h.default.rootData;if(N[0]==="/"){if(!ie.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);J=N,te=h.default.rootData}else{const Ae=re.exec(N);if(!Ae)throw new Error(`Invalid JSON-pointer: ${N}`);const _e=+Ae[1];if(J=Ae[2],J==="#"){if(_e>=I)throw new Error(Re("property/index",_e));return z[I-_e]}if(_e>I)throw new Error(Re("data",_e));if(te=L[I-_e],!J)return te}let Ee=te;const Fe=J.split("/");for(const Ae of Fe)Ae&&(te=(0,i._)`${te}${(0,i.getProperty)((0,d.unescapeJsonPointer)(Ae))}`,Ee=(0,i._)`${Ee} && ${te}`);return Ee;function Re(Ae,_e){return`Cannot access ${Ae} ${_e} levels up, current level is ${I}`}}t.getData=ve}),Ln=B(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}),Qr=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Wr();class r extends Error{constructor(s,l,a,u){super(u||`can't resolve reference ${a} from id ${l}`),this.missingRef=(0,e.resolveUrl)(s,l,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),Vn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Ce(),r=Ln(),n=Qt(),s=Wr(),l=Ue(),a=Jr();class u{constructor(_){var p;this.refs={},this.dynamicAnchors={};let v;typeof _.schema=="object"&&(v=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(p=_.baseId)!==null&&p!==void 0?p:(0,s.normalizeId)(v==null?void 0:v[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=v==null?void 0:v.$async,this.refs={}}}t.SchemaEnv=u;function i(o){const _=d.call(this,o);if(_)return _;const p=(0,s.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:v,lines:$}=this.opts.code,{ownProperties:y}=this.opts,f=new e.CodeGen(this.scope,{es5:v,lines:$,ownProperties:y});let S;o.$async&&(S=f.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=f.scopeName("validate");o.validateName=O;const j={gen:f,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:f.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:S,schema:o.schema,schemaEnv:o,rootId:p,baseId:o.baseId||p,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let F;try{this._compilations.add(o),(0,a.validateFunctionCode)(j),f.optimize(this.opts.code.optimize);const V=f.toString();F=`${f.scopeRefs(n.default.scope)}return ${V}`,this.opts.code.process&&(F=this.opts.code.process(F,o));const G=new Function(`${n.default.self}`,`${n.default.scope}`,F)(this,this.scope.get());if(this.scope.value(O,{ref:G}),G.errors=null,G.schema=o.schema,G.schemaEnv=o,o.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:O,validateCode:V,scopeValues:f._values}),this.opts.unevaluated){const{props:ee,items:fe}=j;G.evaluated={props:ee instanceof e.Name?void 0:ee,items:fe instanceof e.Name?void 0:fe,dynamicProps:ee instanceof e.Name,dynamicItems:fe instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return o.validate=G,o}catch(V){throw delete o.validate,delete o.validateName,F&&this.logger.error("Error compiling schema, function code:",F),V}finally{this._compilations.delete(o)}}t.compileSchema=i;function h(o,_,p){var v;p=(0,s.resolveUrl)(this.opts.uriResolver,_,p);const $=o.refs[p];if($)return $;let y=P.call(this,o,p);if(y===void 0){const f=(v=o.localRefs)===null||v===void 0?void 0:v[p],{schemaId:S}=this.opts;f&&(y=new u({schema:f,schemaId:S,root:o,baseId:_}))}if(y!==void 0)return o.refs[p]=c.call(this,y)}t.resolveRef=h;function c(o){return(0,s.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:i.call(this,o)}function d(o){for(const _ of this._compilations)if(w(_,o))return _}t.getCompilingSchema=d;function w(o,_){return o.schema===_.schema&&o.root===_.root&&o.baseId===_.baseId}function P(o,_){let p;for(;typeof(p=this.refs[_])=="string";)_=p;return p||this.schemas[_]||b.call(this,o,_)}function b(o,_){const p=this.opts.uriResolver.parse(_),v=(0,s._getFullPath)(this.opts.uriResolver,p);let $=(0,s.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&v===$)return m.call(this,p,o);const y=(0,s.normalizeId)(v),f=this.refs[y]||this.schemas[y];if(typeof f=="string"){const S=b.call(this,o,f);return typeof(S==null?void 0:S.schema)!="object"?void 0:m.call(this,p,S)}if(typeof(f==null?void 0:f.schema)=="object"){if(f.validate||i.call(this,f),y===(0,s.normalizeId)(_)){const{schema:S}=f,{schemaId:O}=this.opts,j=S[O];return j&&($=(0,s.resolveUrl)(this.opts.uriResolver,$,j)),new u({schema:S,schemaId:O,root:o,baseId:$})}return m.call(this,p,f)}}t.resolveSchema=b;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(o,{baseId:_,schema:p,root:v}){var $;if((($=o.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const S of o.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const O=p[(0,l.unescapeFragment)(S)];if(O===void 0)return;p=O;const j=typeof p=="object"&&p[this.opts.schemaId];!E.has(S)&&j&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,j))}let y;if(typeof p!="boolean"&&p.$ref&&!(0,l.schemaHasRulesButRef)(p,this.RULES)){const S=(0,s.resolveUrl)(this.opts.uriResolver,_,p.$ref);y=b.call(this,v,S)}const{schemaId:f}=this.opts;if(y=y||new u({schema:p,schemaId:f,root:v,baseId:_}),y.schema!==y.root.schema)return y}}),po=B((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}}),Js=B((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 s(b){let E="",m=0,o=0;for(o=0;o<b.length;o++)if(m=b[o].charCodeAt(0),m!==48){if(!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";E+=b[o];break}for(o+=1;o<b.length;o++){if(m=b[o].charCodeAt(0),!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";E+=b[o]}return E}var l=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(b){return b.length=0,!0}function u(b,E,m){if(b.length){const o=s(b);if(o!=="")E.push(o);else return m.error=!0,!1;b.length=0}return!0}function i(b){let E=0;const m={error:!1,address:"",zone:""},o=[],_=[];let p=!1,v=!1,$=u;for(let y=0;y<b.length;y++){const f=b[y];if(!(f==="["||f==="]"))if(f===":"){if(p===!0&&(v=!0),!$(_,o,m))break;if(++E>7){m.error=!0;break}y>0&&b[y-1]===":"&&(p=!0),o.push(":");continue}else if(f==="%"){if(!$(_,o,m))break;$=a}else{_.push(f);continue}}return _.length&&($===a?m.zone=_.join(""):v?o.push(_.join("")):o.push(s(_))),m.address=o.join(""),m}function h(b){if(c(b,":")<2)return{host:b,isIPV6:!1};const E=i(b);if(E.error)return{host:b,isIPV6:!1};{let m=E.address,o=E.address;return E.zone&&(m+="%"+E.zone,o+="%25"+E.zone),{host:m,isIPV6:!0,escapedHost:o}}}function c(b,E){let m=0;for(let o=0;o<b.length;o++)b[o]===E&&m++;return m}function d(b){let E=b;const m=[];let o=-1,_=0;for(;_=E.length;){if(_===1){if(E===".")break;if(E==="/"){m.push("/");break}else{m.push(E);break}}else if(_===2){if(E[0]==="."){if(E[1]===".")break;if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&(E[1]==="."||E[1]==="/")){m.push("/");break}}else if(_===3&&E==="/.."){m.length!==0&&m.pop(),m.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),m.length!==0&&m.pop();continue}}if((o=E.indexOf("/",1))===-1){m.push(E);break}else m.push(E.slice(0,o)),E=E.slice(o)}return m.join("")}function w(b,E){const m=E!==!0?escape:unescape;return b.scheme!==void 0&&(b.scheme=m(b.scheme)),b.userinfo!==void 0&&(b.userinfo=m(b.userinfo)),b.host!==void 0&&(b.host=m(b.host)),b.path!==void 0&&(b.path=m(b.path)),b.query!==void 0&&(b.query=m(b.query)),b.fragment!==void 0&&(b.fragment=m(b.fragment)),b}function P(b){const E=[];if(b.userinfo!==void 0&&(E.push(b.userinfo),E.push("@")),b.host!==void 0){let m=unescape(b.host);if(!n(m)){const o=h(m);o.isIPV6===!0?m=`[${o.escapedHost}]`:m=b.host}E.push(m)}return(typeof b.port=="number"||typeof b.port=="string")&&(E.push(":"),E.push(String(b.port))),E.length?E.join(""):void 0}e.exports={nonSimpleDomain:l,recomposeAuthority:P,normalizeComponentEncoding:w,removeDotSegments:d,isIPv4:n,isUUID:r,normalizeIPv6:h,stringArrayToHexStripped:s}}),mo=B((t,e)=>{var{isUUID:r}=Js(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function l(f){return s.indexOf(f)!==-1}function a(f){return f.secure===!0?!0:f.secure===!1?!1:f.scheme?f.scheme.length===3&&(f.scheme[0]==="w"||f.scheme[0]==="W")&&(f.scheme[1]==="s"||f.scheme[1]==="S")&&(f.scheme[2]==="s"||f.scheme[2]==="S"):!1}function u(f){return f.host||(f.error=f.error||"HTTP URIs must have a host."),f}function i(f){const S=String(f.scheme).toLowerCase()==="https";return(f.port===(S?443:80)||f.port==="")&&(f.port=void 0),f.path||(f.path="/"),f}function h(f){return f.secure=a(f),f.resourceName=(f.path||"/")+(f.query?"?"+f.query:""),f.path=void 0,f.query=void 0,f}function c(f){if((f.port===(a(f)?443:80)||f.port==="")&&(f.port=void 0),typeof f.secure=="boolean"&&(f.scheme=f.secure?"wss":"ws",f.secure=void 0),f.resourceName){const[S,O]=f.resourceName.split("?");f.path=S&&S!=="/"?S:void 0,f.query=O,f.resourceName=void 0}return f.fragment=void 0,f}function d(f,S){if(!f.path)return f.error="URN can not be parsed",f;const O=f.path.match(n);if(O){const j=S.scheme||f.scheme||"urn";f.nid=O[1].toLowerCase(),f.nss=O[2];const F=`${j}:${S.nid||f.nid}`,V=y(F);f.path=void 0,V&&(f=V.parse(f,S))}else f.error=f.error||"URN can not be parsed.";return f}function w(f,S){if(f.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=S.scheme||f.scheme||"urn",j=f.nid.toLowerCase(),F=`${O}:${S.nid||j}`,V=y(F);V&&(f=V.serialize(f,S));const X=f,G=f.nss;return X.path=`${j||S.nid}:${G}`,S.skipEscape=!0,X}function P(f,S){const O=f;return O.uuid=O.nss,O.nss=void 0,!S.tolerant&&(!O.uuid||!r(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function b(f){const S=f;return S.nss=(f.uuid||"").toLowerCase(),S}var E={scheme:"http",domainHost:!0,parse:u,serialize:i},m={scheme:"https",domainHost:E.domainHost,parse:u,serialize:i},o={scheme:"ws",domainHost:!0,parse:h,serialize:c},_={scheme:"wss",domainHost:o.domainHost,parse:o.parse,serialize:o.serialize},p={scheme:"urn",parse:d,serialize:w,skipNormalize:!0},v={scheme:"urn:uuid",parse:P,serialize:b,skipNormalize:!0},$={http:E,https:m,ws:o,wss:_,urn:p,"urn:uuid":v};Object.setPrototypeOf($,null);function y(f){return f&&($[f]||$[f.toLowerCase()])||void 0}e.exports={wsIsSecure:a,SCHEMES:$,isValidSchemeName:l,getSchemeHandler:y}}),go=B((t,e)=>{var{normalizeIPv6:r,removeDotSegments:n,recomposeAuthority:s,normalizeComponentEncoding:l,isIPv4:a,nonSimpleDomain:u}=Js(),{SCHEMES:i,getSchemeHandler:h}=mo();function c(_,p){return typeof _=="string"?_=b(m(_,p),p):typeof _=="object"&&(_=m(b(_,p),p)),_}function d(_,p,v){const $=v?Object.assign({scheme:"null"},v):{scheme:"null"},y=w(m(_,$),m(p,$),$,!0);return $.skipEscape=!0,b(y,$)}function w(_,p,v,$){const y={};return $||(_=m(b(_,v),v),p=m(b(p,v),v)),v=v||{},!v.tolerant&&p.scheme?(y.scheme=p.scheme,y.userinfo=p.userinfo,y.host=p.host,y.port=p.port,y.path=n(p.path||""),y.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(y.userinfo=p.userinfo,y.host=p.host,y.port=p.port,y.path=n(p.path||""),y.query=p.query):(p.path?(p.path[0]==="/"?y.path=n(p.path):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?y.path="/"+p.path:_.path?y.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+p.path:y.path=p.path,y.path=n(y.path)),y.query=p.query):(y.path=_.path,p.query!==void 0?y.query=p.query:y.query=_.query),y.userinfo=_.userinfo,y.host=_.host,y.port=_.port),y.scheme=_.scheme),y.fragment=p.fragment,y}function P(_,p,v){return typeof _=="string"?(_=unescape(_),_=b(l(m(_,v),!0),{...v,skipEscape:!0})):typeof _=="object"&&(_=b(l(_,!0),{...v,skipEscape:!0})),typeof p=="string"?(p=unescape(p),p=b(l(m(p,v),!0),{...v,skipEscape:!0})):typeof p=="object"&&(p=b(l(p,!0),{...v,skipEscape:!0})),_.toLowerCase()===p.toLowerCase()}function b(_,p){const v={host:_.host,scheme:_.scheme,userinfo:_.userinfo,port:_.port,path:_.path,query:_.query,nid:_.nid,nss:_.nss,uuid:_.uuid,fragment:_.fragment,reference:_.reference,resourceName:_.resourceName,secure:_.secure,error:""},$=Object.assign({},p),y=[],f=h($.scheme||v.scheme);f&&f.serialize&&f.serialize(v,$),v.path!==void 0&&($.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),$.reference!=="suffix"&&v.scheme&&y.push(v.scheme,":");const S=s(v);if(S!==void 0&&($.reference!=="suffix"&&y.push("//"),y.push(S),v.path&&v.path[0]!=="/"&&y.push("/")),v.path!==void 0){let O=v.path;!$.absolutePath&&(!f||!f.absolutePath)&&(O=n(O)),S===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),y.push(O)}return v.query!==void 0&&y.push("?",v.query),v.fragment!==void 0&&y.push("#",v.fragment),y.join("")}var E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(_,p){const v=Object.assign({},p),$={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let y=!1;v.reference==="suffix"&&(v.scheme?_=v.scheme+":"+_:_="//"+_);const f=_.match(E);if(f){if($.scheme=f[1],$.userinfo=f[3],$.host=f[4],$.port=parseInt(f[5],10),$.path=f[6]||"",$.query=f[7],$.fragment=f[8],isNaN($.port)&&($.port=f[5]),$.host)if(a($.host)===!1){const j=r($.host);$.host=j.host.toLowerCase(),y=j.isIPV6}else y=!0;$.scheme===void 0&&$.userinfo===void 0&&$.host===void 0&&$.port===void 0&&$.query===void 0&&!$.path?$.reference="same-document":$.scheme===void 0?$.reference="relative":$.fragment===void 0?$.reference="absolute":$.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==$.reference&&($.error=$.error||"URI is not a "+v.reference+" reference.");const S=h(v.scheme||$.scheme);if(!v.unicodeSupport&&(!S||!S.unicodeSupport)&&$.host&&(v.domainHost||S&&S.domainHost)&&y===!1&&u($.host))try{$.host=URL.domainToASCII($.host.toLowerCase())}catch(O){$.error=$.error||"Host's domain name can not be converted to ASCII: "+O}(!S||S&&!S.skipNormalize)&&(_.indexOf("%")!==-1&&($.scheme!==void 0&&($.scheme=unescape($.scheme)),$.host!==void 0&&($.host=unescape($.host))),$.path&&($.path=escape(unescape($.path))),$.fragment&&($.fragment=encodeURI(decodeURIComponent($.fragment)))),S&&S.parse&&S.parse($,v)}else $.error=$.error||"URI can not be parsed.";return $}var o={SCHEMES:i,normalize:c,resolve:d,resolveComponent:w,equal:P,serialize:b,parse:m};e.exports=o,e.exports.default=o,e.exports.fastUri=o}),vo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=go();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),yo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Jr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Ce();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=Ln(),s=Qr(),l=Ks(),a=Vn(),u=Ce(),i=Wr(),h=Fr(),c=Ue(),d=po(),w=vo(),P=(x,T)=>new RegExp(x,T);P.code="new RegExp";var b=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},o={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function p(x){var T,M,R,g,k,A,W,Q,ie,re,ve,N,I,L,z,J,te,Ee,Fe,Re,Ae,_e,xe,Ie,vt;const Xe=x.strict,ht=(T=x.code)===null||T===void 0?void 0:T.optimize,$t=ht===!0||ht===void 0?1:ht||0,ct=(R=(M=x.code)===null||M===void 0?void 0:M.regExp)!==null&&R!==void 0?R:P,wt=(g=x.uriResolver)!==null&&g!==void 0?g:w.default;return{strictSchema:(A=(k=x.strictSchema)!==null&&k!==void 0?k:Xe)!==null&&A!==void 0?A:!0,strictNumbers:(Q=(W=x.strictNumbers)!==null&&W!==void 0?W:Xe)!==null&&Q!==void 0?Q:!0,strictTypes:(re=(ie=x.strictTypes)!==null&&ie!==void 0?ie:Xe)!==null&&re!==void 0?re:"log",strictTuples:(N=(ve=x.strictTuples)!==null&&ve!==void 0?ve:Xe)!==null&&N!==void 0?N:"log",strictRequired:(L=(I=x.strictRequired)!==null&&I!==void 0?I:Xe)!==null&&L!==void 0?L:!1,code:x.code?{...x.code,optimize:$t,regExp:ct}:{optimize:$t,regExp:ct},loopRequired:(z=x.loopRequired)!==null&&z!==void 0?z:_,loopEnum:(J=x.loopEnum)!==null&&J!==void 0?J:_,meta:(te=x.meta)!==null&&te!==void 0?te:!0,messages:(Ee=x.messages)!==null&&Ee!==void 0?Ee:!0,inlineRefs:(Fe=x.inlineRefs)!==null&&Fe!==void 0?Fe:!0,schemaId:(Re=x.schemaId)!==null&&Re!==void 0?Re:"$id",addUsedSchema:(Ae=x.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(_e=x.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=x.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ie=x.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(vt=x.int32range)!==null&&vt!==void 0?vt:!0,uriResolver:wt}}class v{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...p(T)};const{es5:M,lines:R}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:E,es5:M,lines:R}),this.logger=V(T.logger);const g=T.validateFormats;T.validateFormats=!1,this.RULES=(0,l.getRules)(),$.call(this,m,T,"NOT SUPPORTED"),$.call(this,o,T,"DEPRECATED","warn"),this._metaOpts=j.call(this),T.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),f.call(this),T.validateFormats=g}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:M,schemaId:R}=this.opts;let g=d;R==="id"&&(g={...d},g.id=g.$id,delete g.$id),M&&T&&this.addMetaSchema(g,g[R],!1)}defaultMeta(){const{meta:T,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[M]||T:void 0}validate(T,M){let R;if(typeof T=="string"){if(R=this.getSchema(T),!R)throw new Error(`no schema with key or ref "${T}"`)}else R=this.compile(T);const g=R(M);return"$async"in R||(this.errors=R.errors),g}compile(T,M){const R=this._addSchema(T,M);return R.validate||this._compileSchemaEnv(R)}compileAsync(T,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return g.call(this,T,M);async function g(re,ve){await k.call(this,re.$schema);const N=this._addSchema(re,ve);return N.validate||A.call(this,N)}async function k(re){re&&!this.getSchema(re)&&await g.call(this,{$ref:re},!0)}async function A(re){try{return this._compileSchemaEnv(re)}catch(ve){if(!(ve instanceof s.default))throw ve;return W.call(this,ve),await Q.call(this,ve.missingSchema),A.call(this,re)}}function W({missingSchema:re,missingRef:ve}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${ve} cannot be resolved`)}async function Q(re){const ve=await ie.call(this,re);this.refs[re]||await k.call(this,ve.$schema),this.refs[re]||this.addSchema(ve,re,M)}async function ie(re){const ve=this._loading[re];if(ve)return ve;try{return await(this._loading[re]=R(re))}finally{delete this._loading[re]}}}addSchema(T,M,R,g=this.opts.validateSchema){if(Array.isArray(T)){for(const A of T)this.addSchema(A,void 0,R,g);return this}let k;if(typeof T=="object"){const{schemaId:A}=this.opts;if(k=T[A],k!==void 0&&typeof k!="string")throw new Error(`schema ${A} must be string`)}return M=(0,i.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(T,R,M,g,!0),this}addMetaSchema(T,M,R=this.opts.validateSchema){return this.addSchema(T,M,!0,R),this}validateSchema(T,M){if(typeof T=="boolean")return!0;let R;if(R=T.$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 g=this.validate(R,T);if(!g&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return g}getSchema(T){let M;for(;typeof(M=y.call(this,T))=="string";)T=M;if(M===void 0){const{schemaId:R}=this.opts,g=new a.SchemaEnv({schema:{},schemaId:R});if(M=a.resolveSchema.call(this,g,T),!M)return;this.refs[T]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=y.call(this,T);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const M=T;this._cache.delete(M);let R=T[this.opts.schemaId];return R&&(R=(0,i.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const M of T)this.addKeyword(M);return this}addKeyword(T,M){let R;if(typeof T=="string")R=T,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=R);else if(typeof T=="object"&&M===void 0){if(M=T,R=M.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(G.call(this,R,M),!M)return(0,c.eachItem)(R,k=>ee.call(this,k)),this;we.call(this,M);const g={...M,type:(0,h.getJSONTypes)(M.type),schemaType:(0,h.getJSONTypes)(M.schemaType)};return(0,c.eachItem)(R,g.type.length===0?k=>ee.call(this,k,g):k=>g.type.forEach(A=>ee.call(this,k,g,A))),this}getKeyword(T){const M=this.RULES.all[T];return typeof M=="object"?M.definition:!!M}removeKeyword(T){const{RULES:M}=this;delete M.keywords[T],delete M.all[T];for(const R of M.rules){const g=R.rules.findIndex(k=>k.keyword===T);g>=0&&R.rules.splice(g,1)}return this}addFormat(T,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[T]=M,this}errorsText(T=this.errors,{separator:M=", ",dataVar:R="data"}={}){return!T||T.length===0?"No errors":T.map(g=>`${R}${g.instancePath} ${g.message}`).reduce((g,k)=>g+M+k)}$dataMetaSchema(T,M){const R=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const g of M){const k=g.split("/").slice(1);let A=T;for(const W of k)A=A[W];for(const W in R){const Q=R[W];if(typeof Q!="object")continue;const{$data:ie}=Q.definition,re=A[W];ie&&re&&(A[W]=se(re))}}return T}_removeAllSchemas(T,M){for(const R in T){const g=T[R];(!M||M.test(R))&&(typeof g=="string"?delete T[R]:g&&!g.meta&&(this._cache.delete(g.schema),delete T[R]))}}_addSchema(T,M,R,g=this.opts.validateSchema,k=this.opts.addUsedSchema){let A;const{schemaId:W}=this.opts;if(typeof T=="object")A=T[W];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let Q=this._cache.get(T);if(Q!==void 0)return Q;R=(0,i.normalizeId)(A||R);const ie=i.getSchemaRefs.call(this,T,R);return Q=new a.SchemaEnv({schema:T,schemaId:W,meta:M,baseId:R,localRefs:ie}),this._cache.set(Q.schema,Q),k&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=Q),g&&this.validateSchema(T,!0),Q}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):a.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,T)}finally{this.opts=M}}}v.ValidationError=n.default,v.MissingRefError=s.default,t.default=v;function $(x,T,M,R="error"){for(const g in x){const k=g;k in T&&this.logger[R](`${M}: option ${g}. ${x[k]}`)}}function y(x){return x=(0,i.normalizeId)(x),this.schemas[x]||this.refs[x]}function f(){const x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(const T in x)this.addSchema(x[T],T)}function S(){for(const x in this.opts.formats){const T=this.opts.formats[x];T&&this.addFormat(x,T)}}function O(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in x){const M=x[T];M.keyword||(M.keyword=T),this.addKeyword(M)}}function j(){const x={...this.opts};for(const T of b)delete x[T];return x}var F={log(){},warn(){},error(){}};function V(x){if(x===!1)return F;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function G(x,T){const{RULES:M}=this;if((0,c.eachItem)(x,R=>{if(M.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!X.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function ee(x,T,M){var R;const g=T==null?void 0:T.post;if(M&&g)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let A=g?k.post:k.rules.find(({type:Q})=>Q===M);if(A||(A={type:M,rules:[]},k.rules.push(A)),k.keywords[x]=!0,!T)return;const W={keyword:x,definition:{...T,type:(0,h.getJSONTypes)(T.type),schemaType:(0,h.getJSONTypes)(T.schemaType)}};T.before?fe.call(this,A,W,T.before):A.rules.push(W),k.all[x]=W,(R=T.implements)===null||R===void 0||R.forEach(Q=>this.addKeyword(Q))}function fe(x,T,M){const R=x.rules.findIndex(g=>g.keyword===M);R>=0?x.rules.splice(R,0,T):(x.rules.push(T),this.logger.warn(`rule ${M} is not defined`))}function we(x){let{metaSchema:T}=x;T!==void 0&&(x.$data&&this.opts.$data&&(T=se(T)),x.validateSchema=this.compile(T,!0))}var Oe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(x){return{anyOf:[x,Oe]}}}),_o=B(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}),wo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=Qr(),r=It(),n=Ce(),s=Qt(),l=Vn(),a=Ue(),u={keyword:"$ref",schemaType:"string",code(c){const{gen:d,schema:w,it:P}=c,{baseId:b,schemaEnv:E,validateName:m,opts:o,self:_}=P,{root:p}=E;if((w==="#"||w==="#/")&&b===p.baseId)return $();const v=l.resolveRef.call(_,p,b,w);if(v===void 0)throw new e.default(P.opts.uriResolver,b,w);if(v instanceof l.SchemaEnv)return y(v);return f(v);function $(){if(E===p)return h(c,m,E,E.$async);const S=d.scopeValue("root",{ref:p});return h(c,(0,n._)`${S}.validate`,p,p.$async)}function y(S){const O=i(c,S);h(c,O,S,S.$async)}function f(S){const O=d.scopeValue("schema",o.code.source===!0?{ref:S,code:(0,n.stringify)(S)}:{ref:S}),j=d.name("valid"),F=c.subschema({schema:S,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},j);c.mergeEvaluated(F),c.ok(j)}}};function i(c,d){const{gen:w}=c;return d.validate?w.scopeValue("validate",{ref:d.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=i;function h(c,d,w,P){const{gen:b,it:E}=c,{allErrors:m,schemaEnv:o,opts:_}=E,p=_.passContext?s.default.this:n.nil;P?v():$();function v(){if(!o.$async)throw new Error("async schema referenced by sync schema");const S=b.let("valid");b.try(()=>{b.code((0,n._)`await ${(0,r.callValidateCode)(c,d,p)}`),f(d),m||b.assign(S,!0)},O=>{b.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>b.throw(O)),y(O),m||b.assign(S,!1)}),c.ok(S)}function $(){c.result((0,r.callValidateCode)(c,d,p),()=>f(d),()=>y(d))}function y(S){const O=(0,n._)`${S}.errors`;b.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),b.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function f(S){var O;if(!E.opts.unevaluated)return;const j=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(E.props=a.mergeEvaluated.props(b,j.props,E.props));else{const F=b.var("props",(0,n._)`${S}.evaluated.props`);E.props=a.mergeEvaluated.props(b,F,E.props,n.Name)}if(E.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(E.items=a.mergeEvaluated.items(b,j.items,E.items));else{const F=b.var("items",(0,n._)`${S}.evaluated.items`);E.items=a.mergeEvaluated.items(b,F,E.items,n.Name)}}}t.callRef=h,t.default=u}),$o=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=_o(),r=wo(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),bo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),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}},s={message:({keyword:a,schemaCode:u})=>(0,e.str)`must be ${n[a].okStr} ${u}`,params:({keyword:a,schemaCode:u})=>(0,e._)`{comparison: ${n[a].okStr}, limit: ${u}}`},l={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(a){const{keyword:u,data:i,schemaCode:h}=a;a.fail$data((0,e._)`${i} ${n[u].fail} ${h} || isNaN(${i})`)}};t.default=l}),Eo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(s){const{gen:l,data:a,schemaCode:u,it:i}=s,h=i.opts.multipleOfPrecision,c=l.let("res"),d=h?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${h}`:(0,e._)`${c} !== parseInt(${c})`;s.fail$data((0,e._)`(${u} === 0 || (${c} = ${a}/${u}, ${d}))`)}};t.default=n}),So=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,l=0,a;for(;l<n;)s++,a=r.charCodeAt(l++),a>=55296&&a<=56319&&l<n&&(a=r.charCodeAt(l),(a&64512)===56320&&l++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),Po=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ue(),n=So(),s={message({keyword:a,schemaCode:u}){const i=a==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${u} characters`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(a){const{keyword:u,data:i,schemaCode:h,it:c}=a,d=u==="maxLength"?e.operators.GT:e.operators.LT,w=c.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,r.useFunc)(a.gen,n.default)}(${i})`;a.fail$data((0,e._)`${w} ${d} ${h}`)}};t.default=l}),ko=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ue(),n=Ce(),s={message:({schemaCode:a})=>(0,n.str)`must match pattern "${a}"`,params:({schemaCode:a})=>(0,n._)`{pattern: ${a}}`},l={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:u,data:i,$data:h,schema:c,schemaCode:d,it:w}=a,P=w.opts.unicodeRegExp?"u":"";if(h){const{regExp:b}=w.opts.code,E=b.code==="new RegExp"?(0,n._)`new RegExp`:(0,r.useFunc)(u,b),m=u.let("valid");u.try(()=>u.assign(m,(0,n._)`${E}(${d}, ${P}).test(${i})`),()=>u.assign(m,!1)),a.fail$data((0,n._)`!${m}`)}else{const b=(0,e.usePattern)(a,c);a.fail$data((0,n._)`!${b}.test(${i})`)}}};t.default=l}),Oo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message({keyword:s,schemaCode:l}){const a=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${l} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:a,schemaCode:u}=s,i=l==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${a}).length ${i} ${u}`)}};t.default=n}),No=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ce(),n=Ue(),s={message:({params:{missingProperty:a}})=>(0,r.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,r._)`{missingProperty: ${a}}`},l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(a){const{gen:u,schema:i,schemaCode:h,data:c,$data:d,it:w}=a,{opts:P}=w;if(!d&&i.length===0)return;const b=i.length>=P.loopRequired;if(w.allErrors?E():m(),P.strictRequired){const p=a.parentSchema.properties,{definedProperties:v}=a.it;for(const $ of i)if((p==null?void 0:p[$])===void 0&&!v.has($)){const y=w.schemaEnv.baseId+w.errSchemaPath,f=`required property "${$}" is not defined at "${y}" (strictRequired)`;(0,n.checkStrictMode)(w,f,w.opts.strictRequired)}}function E(){if(b||d)a.block$data(r.nil,o);else for(const p of i)(0,e.checkReportMissingProp)(a,p)}function m(){const p=u.let("missing");if(b||d){const v=u.let("valid",!0);a.block$data(v,()=>_(p,v)),a.ok(v)}else u.if((0,e.checkMissingProp)(a,i,p)),(0,e.reportMissingProp)(a,p),u.else()}function o(){u.forOf("prop",h,p=>{a.setParams({missingProperty:p}),u.if((0,e.noPropertyInData)(u,c,p,P.ownProperties),()=>a.error())})}function _(p,v){a.setParams({missingProperty:p}),u.forOf(p,h,()=>{u.assign(v,(0,e.propertyInData)(u,c,p,P.ownProperties)),u.if((0,r.not)(v),()=>{a.error(),u.break()})},r.nil)}}};t.default=l}),To=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message({keyword:s,schemaCode:l}){const a=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${l} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:a,schemaCode:u}=s,i=l==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${a}.length ${i} ${u}`)}};t.default=n}),Un=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Gr();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),Ro=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Fr(),r=Ce(),n=Ue(),s=Un(),l={message:({params:{i:u,j:i}})=>(0,r.str)`must NOT have duplicate items (items ## ${i} and ${u} are identical)`,params:({params:{i:u,j:i}})=>(0,r._)`{i: ${u}, j: ${i}}`},a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:l,code(u){const{gen:i,data:h,$data:c,schema:d,parentSchema:w,schemaCode:P,it:b}=u;if(!c&&!d)return;const E=i.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];u.block$data(E,o,(0,r._)`${P} === false`),u.ok(E);function o(){const $=i.let("i",(0,r._)`${h}.length`),y=i.let("j");u.setParams({i:$,j:y}),i.assign(E,!0),i.if((0,r._)`${$} > 1`,()=>(_()?p:v)($,y))}function _(){return m.length>0&&!m.some($=>$==="object"||$==="array")}function p($,y){const f=i.name("item"),S=(0,e.checkDataTypes)(m,f,b.opts.strictNumbers,e.DataType.Wrong),O=i.const("indices",(0,r._)`{}`);i.for((0,r._)`;${$}--;`,()=>{i.let(f,(0,r._)`${h}[${$}]`),i.if(S,(0,r._)`continue`),m.length>1&&i.if((0,r._)`typeof ${f} == "string"`,(0,r._)`${f} += "_"`),i.if((0,r._)`typeof ${O}[${f}] == "number"`,()=>{i.assign(y,(0,r._)`${O}[${f}]`),u.error(),i.assign(E,!1).break()}).code((0,r._)`${O}[${f}] = ${$}`)})}function v($,y){const f=(0,n.useFunc)(i,s.default),S=i.name("outer");i.label(S).for((0,r._)`;${$}--;`,()=>i.for((0,r._)`${y} = ${$}; ${y}--;`,()=>i.if((0,r._)`${f}(${h}[${$}], ${h}[${y}])`,()=>{u.error(),i.assign(E,!1).break(S)})))}}};t.default=a}),Io=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ue(),n=Un(),s={message:"must be equal to constant",params:({schemaCode:a})=>(0,e._)`{allowedValue: ${a}}`},l={keyword:"const",$data:!0,error:s,code(a){const{gen:u,data:i,$data:h,schemaCode:c,schema:d}=a;h||d&&typeof d=="object"?a.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${i}, ${c})`):a.fail((0,e._)`${d} !== ${i}`)}};t.default=l}),Co=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ue(),n=Un(),s={message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,e._)`{allowedValues: ${a}}`},l={keyword:"enum",schemaType:"array",$data:!0,error:s,code(a){const{gen:u,data:i,$data:h,schema:c,schemaCode:d,it:w}=a;if(!h&&c.length===0)throw new Error("enum must have non-empty array");const P=c.length>=w.opts.loopEnum;let b;const E=()=>b??(b=(0,r.useFunc)(u,n.default));let m;if(P||h)m=u.let("valid"),a.block$data(m,o);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const p=u.const("vSchema",d);m=(0,e.or)(...c.map((v,$)=>_(p,$)))}a.pass(m);function o(){u.assign(m,!1),u.forOf("v",d,p=>u.if((0,e._)`${E()}(${i}, ${p})`,()=>u.assign(m,!0).break()))}function _(p,v){const $=c[v];return typeof $=="object"&&$!==null?(0,e._)`${E()}(${i}, ${p}[${v}])`:(0,e._)`${i} === ${$}`}}};t.default=l}),Ao=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=bo(),r=Eo(),n=Po(),s=ko(),l=Oo(),a=No(),u=To(),i=Ro(),h=Io(),c=Co(),d=[e.default,r.default,n.default,s.default,l.default,a.default,u.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},h.default,c.default];t.default=d}),Qs=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Ce(),r=Ue(),n={message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(a){const{parentSchema:u,it:i}=a,{items:h}=u;if(!Array.isArray(h)){(0,r.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}l(a,h)}};function l(a,u){const{gen:i,schema:h,data:c,keyword:d,it:w}=a;w.items=!0;const P=i.const("len",(0,e._)`${c}.length`);if(h===!1)a.setParams({len:u.length}),a.pass((0,e._)`${P} <= ${u.length}`);else if(typeof h=="object"&&!(0,r.alwaysValidSchema)(w,h)){const E=i.var("valid",(0,e._)`${P} <= ${u.length}`);i.if((0,e.not)(E),()=>b(E)),a.ok(E)}function b(E){i.forRange("i",u.length,P,m=>{a.subschema({keyword:d,dataProp:m,dataPropType:r.Type.Num},E),w.allErrors||i.if((0,e.not)(E),()=>i.break())})}}t.validateAdditionalItems=l,t.default=s}),Xs=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Ce(),r=Ue(),n=It(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:u,it:i}=a;if(Array.isArray(u))return l(a,"additionalItems",u);i.items=!0,!(0,r.alwaysValidSchema)(i,u)&&a.ok((0,n.validateArray)(a))}};function l(a,u,i=a.schema){const{gen:h,parentSchema:c,data:d,keyword:w,it:P}=a;m(c),P.opts.unevaluated&&i.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(h,i.length,P.items));const b=h.name("valid"),E=h.const("len",(0,e._)`${d}.length`);i.forEach((o,_)=>{(0,r.alwaysValidSchema)(P,o)||(h.if((0,e._)`${E} > ${_}`,()=>a.subschema({keyword:w,schemaProp:_,dataProp:_},b)),a.ok(b))});function m(o){const{opts:_,errSchemaPath:p}=P,v=i.length,$=v===o.minItems&&(v===o.maxItems||o[u]===!1);if(_.strictTuples&&!$){const y=`"${w}" is ${v}-tuple, but minItems or maxItems/${u} are not specified or different at path "${p}"`;(0,r.checkStrictMode)(P,y,_.strictTuples)}}}t.validateTuple=l,t.default=s}),jo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xs(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Mo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ue(),n=It(),s=Qs(),l={message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:l,code(u){const{schema:i,parentSchema:h,it:c}=u,{prefixItems:d}=h;c.items=!0,!(0,r.alwaysValidSchema)(c,i)&&(d?(0,s.validateAdditionalItems)(u,d):u.ok((0,n.validateArray)(u)))}};t.default=a}),Do=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ue(),n={message:({params:{min:l,max:a}})=>a===void 0?(0,e.str)`must contain at least ${l} valid item(s)`:(0,e.str)`must contain at least ${l} and no more than ${a} valid item(s)`,params:({params:{min:l,max:a}})=>a===void 0?(0,e._)`{minContains: ${l}}`:(0,e._)`{minContains: ${l}, maxContains: ${a}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(l){const{gen:a,schema:u,parentSchema:i,data:h,it:c}=l;let d,w;const{minContains:P,maxContains:b}=i;c.opts.next?(d=P===void 0?1:P,w=b):d=1;const E=a.const("len",(0,e._)`${h}.length`);if(l.setParams({min:d,max:w}),w===void 0&&d===0){(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&d>w){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),l.fail();return}if((0,r.alwaysValidSchema)(c,u)){let v=(0,e._)`${E} >= ${d}`;w!==void 0&&(v=(0,e._)`${v} && ${E} <= ${w}`),l.pass(v);return}c.items=!0;const m=a.name("valid");w===void 0&&d===1?_(m,()=>a.if(m,()=>a.break())):d===0?(a.let(m,!0),w!==void 0&&a.if((0,e._)`${h}.length > 0`,o)):(a.let(m,!1),o()),l.result(m,()=>l.reset());function o(){const v=a.name("_valid"),$=a.let("count",0);_(v,()=>a.if(v,()=>p($)))}function _(v,$){a.forRange("i",0,E,y=>{l.subschema({keyword:"contains",dataProp:y,dataPropType:r.Type.Num,compositeRule:!0},v),$()})}function p(v){a.code((0,e._)`${v}++`),w===void 0?a.if((0,e._)`${v} >= ${d}`,()=>a.assign(m,!0).break()):(a.if((0,e._)`${v} > ${w}`,()=>a.assign(m,!1).break()),d===1?a.assign(m,!0):a.if((0,e._)`${v} >= ${d}`,()=>a.assign(m,!0)))}}};t.default=s}),qo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Ce(),r=Ue(),n=It();t.error={message:({params:{property:i,depsCount:h,deps:c}})=>{const d=h===1?"property":"properties";return(0,e.str)`must have ${d} ${c} when property ${i} is present`},params:({params:{property:i,depsCount:h,deps:c,missingProperty:d}})=>(0,e._)`{property: ${i},
13
+ missingProperty: ${d},
14
+ depsCount: ${h},
15
+ deps: ${c}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(i){const[h,c]=l(i);a(i,h),u(i,c)}};function l({schema:i}){const h={},c={};for(const d in i){if(d==="__proto__")continue;const w=Array.isArray(i[d])?h:c;w[d]=i[d]}return[h,c]}function a(i,h=i.schema){const{gen:c,data:d,it:w}=i;if(Object.keys(h).length===0)return;const P=c.let("missing");for(const b in h){const E=h[b];if(E.length===0)continue;const m=(0,n.propertyInData)(c,d,b,w.opts.ownProperties);i.setParams({property:b,depsCount:E.length,deps:E.join(", ")}),w.allErrors?c.if(m,()=>{for(const o of E)(0,n.checkReportMissingProp)(i,o)}):(c.if((0,e._)`${m} && (${(0,n.checkMissingProp)(i,E,P)})`),(0,n.reportMissingProp)(i,P),c.else())}}t.validatePropertyDeps=a;function u(i,h=i.schema){const{gen:c,data:d,keyword:w,it:P}=i,b=c.name("valid");for(const E in h)(0,r.alwaysValidSchema)(P,h[E])||(c.if((0,n.propertyInData)(c,d,E,P.opts.ownProperties),()=>{const m=i.subschema({keyword:w,schemaProp:E},b);i.mergeValidEvaluated(m,b)},()=>c.var(b,!0)),i.ok(b))}t.validateSchemaDeps=u,t.default=s}),Lo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ue(),n={message:"property name must be valid",params:({params:l})=>(0,e._)`{propertyName: ${l.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(l){const{gen:a,schema:u,data:i,it:h}=l;if((0,r.alwaysValidSchema)(h,u))return;const c=a.name("valid");a.forIn("key",i,d=>{l.setParams({propertyName:d}),l.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},c),a.if((0,e.not)(c),()=>{l.error(!0),h.allErrors||a.break()})}),l.ok(c)}};t.default=s}),Ys=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ce(),n=Qt(),s=Ue(),l={message:"must NOT have additional properties",params:({params:u})=>(0,r._)`{additionalProperty: ${u.additionalProperty}}`},a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:l,code(u){const{gen:i,schema:h,parentSchema:c,data:d,errsCount:w,it:P}=u;if(!w)throw new Error("ajv implementation error");const{allErrors:b,opts:E}=P;if(P.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(P,h))return;const m=(0,e.allSchemaProperties)(c.properties),o=(0,e.allSchemaProperties)(c.patternProperties);_(),u.ok((0,r._)`${w} === ${n.default.errors}`);function _(){i.forIn("key",d,f=>{!m.length&&!o.length?$(f):i.if(p(f),()=>$(f))})}function p(f){let S;if(m.length>8){const O=(0,s.schemaRefOrVal)(P,c.properties,"properties");S=(0,e.isOwnProperty)(i,O,f)}else m.length?S=(0,r.or)(...m.map(O=>(0,r._)`${f} === ${O}`)):S=r.nil;return o.length&&(S=(0,r.or)(S,...o.map(O=>(0,r._)`${(0,e.usePattern)(u,O)}.test(${f})`))),(0,r.not)(S)}function v(f){i.code((0,r._)`delete ${d}[${f}]`)}function $(f){if(E.removeAdditional==="all"||E.removeAdditional&&h===!1){v(f);return}if(h===!1){u.setParams({additionalProperty:f}),u.error(),b||i.break();return}if(typeof h=="object"&&!(0,s.alwaysValidSchema)(P,h)){const S=i.name("valid");E.removeAdditional==="failing"?(y(f,S,!1),i.if((0,r.not)(S),()=>{u.reset(),v(f)})):(y(f,S),b||i.if((0,r.not)(S),()=>i.break()))}}function y(f,S,O){const j={keyword:"additionalProperties",dataProp:f,dataPropType:s.Type.Str};O===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(j,S)}}};t.default=a}),Vo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Jr(),r=It(),n=Ue(),s=Ys(),l={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:u,schema:i,parentSchema:h,data:c,it:d}=a;d.opts.removeAdditional==="all"&&h.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(i);for(const o of w)d.definedProperties.add(o);d.opts.unevaluated&&w.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(u,(0,n.toHash)(w),d.props));const P=w.filter(o=>!(0,n.alwaysValidSchema)(d,i[o]));if(P.length===0)return;const b=u.name("valid");for(const o of P)E(o)?m(o):(u.if((0,r.propertyInData)(u,c,o,d.opts.ownProperties)),m(o),d.allErrors||u.else().var(b,!0),u.endIf()),a.it.definedProperties.add(o),a.ok(b);function E(o){return d.opts.useDefaults&&!d.compositeRule&&i[o].default!==void 0}function m(o){a.subschema({keyword:"properties",schemaProp:o,dataProp:o},b)}}};t.default=l}),Uo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ce(),n=Ue(),s=Ue(),l={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:u,schema:i,data:h,parentSchema:c,it:d}=a,{opts:w}=d,P=(0,e.allSchemaProperties)(i),b=P.filter($=>(0,n.alwaysValidSchema)(d,i[$]));if(P.length===0||b.length===P.length&&(!d.opts.unevaluated||d.props===!0))return;const E=w.strictSchema&&!w.allowMatchingProperties&&c.properties,m=u.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,s.evaluatedPropsToName)(u,d.props));const{props:o}=d;_();function _(){for(const $ of P)E&&p($),d.allErrors?v($):(u.var(m,!0),v($),u.if(m))}function p($){for(const y in E)new RegExp($).test(y)&&(0,n.checkStrictMode)(d,`property ${y} matches pattern ${$} (use allowMatchingProperties)`)}function v($){u.forIn("key",h,y=>{u.if((0,r._)`${(0,e.usePattern)(a,$)}.test(${y})`,()=>{const f=b.includes($);f||a.subschema({keyword:"patternProperties",schemaProp:$,dataProp:y,dataPropType:s.Type.Str},m),d.opts.unevaluated&&o!==!0?u.assign((0,r._)`${o}[${y}]`,!0):!f&&!d.allErrors&&u.if((0,r.not)(m),()=>u.break())})})}}};t.default=l}),Fo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ue(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:l,it:a}=n;if((0,e.alwaysValidSchema)(a,l)){n.fail();return}const u=s.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}),zo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),xo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ue(),n={message:"must match exactly one schema in oneOf",params:({params:l})=>(0,e._)`{passingSchemas: ${l.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(l){const{gen:a,schema:u,parentSchema:i,it:h}=l;if(!Array.isArray(u))throw new Error("ajv implementation error");if(h.opts.discriminator&&i.discriminator)return;const c=u,d=a.let("valid",!1),w=a.let("passing",null),P=a.name("_valid");l.setParams({passing:w}),a.block(b),l.result(d,()=>l.reset(),()=>l.error(!0));function b(){c.forEach((E,m)=>{let o;(0,r.alwaysValidSchema)(h,E)?a.var(P,!0):o=l.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},P),m>0&&a.if((0,e._)`${P} && ${d}`).assign(d,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),a.if(P,()=>{a.assign(d,!0),a.assign(w,m),o&&l.mergeEvaluated(o,e.Name)})})}}};t.default=s}),Bo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ue(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:l,it:a}=n;if(!Array.isArray(l))throw new Error("ajv implementation error");const u=s.name("valid");l.forEach((i,h)=>{if((0,e.alwaysValidSchema)(a,i))return;const c=n.subschema({keyword:"allOf",schemaProp:h},u);n.ok(u),n.mergeEvaluated(c)})}};t.default=r}),Ho=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ue(),n={message:({params:a})=>(0,e.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,e._)`{failingKeyword: ${a.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(a){const{gen:u,parentSchema:i,it:h}=a;i.then===void 0&&i.else===void 0&&(0,r.checkStrictMode)(h,'"if" without "then" and "else" is ignored');const c=l(h,"then"),d=l(h,"else");if(!c&&!d)return;const w=u.let("valid",!0),P=u.name("_valid");if(b(),a.reset(),c&&d){const m=u.let("ifClause");a.setParams({ifClause:m}),u.if(P,E("then",m),E("else",m))}else c?u.if(P,E("then")):u.if((0,e.not)(P),E("else"));a.pass(w,()=>a.error(!0));function b(){const m=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);a.mergeEvaluated(m)}function E(m,o){return()=>{const _=a.subschema({keyword:m},P);u.assign(w,P),a.mergeValidEvaluated(_,w),o?u.assign(o,(0,e._)`${m}`):a.setParams({ifClause:m})}}}};function l(a,u){const i=a.schema[u];return i!==void 0&&!(0,r.alwaysValidSchema)(a,i)}t.default=s}),Ko=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ue(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:l}){s.if===void 0&&(0,e.checkStrictMode)(l,`"${n}" without "if" is ignored`)}};t.default=r}),Go=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Qs(),r=jo(),n=Xs(),s=Mo(),l=Do(),a=qo(),u=Lo(),i=Ys(),h=Vo(),c=Uo(),d=Fo(),w=zo(),P=xo(),b=Bo(),E=Ho(),m=Ko();function o(_=!1){const p=[d.default,w.default,P.default,b.default,E.default,m.default,u.default,i.default,a.default,h.default,c.default];return _?p.push(r.default,s.default):p.push(e.default,n.default),p.push(l.default),p}t.default=o}),Wo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(s,l){const{gen:a,data:u,$data:i,schema:h,schemaCode:c,it:d}=s,{opts:w,errSchemaPath:P,schemaEnv:b,self:E}=d;if(!w.validateFormats)return;i?m():o();function m(){const _=a.scopeValue("formats",{ref:E.formats,code:w.code.formats}),p=a.const("fDef",(0,e._)`${_}[${c}]`),v=a.let("fType"),$=a.let("format");a.if((0,e._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>a.assign(v,(0,e._)`${p}.type || "string"`).assign($,(0,e._)`${p}.validate`),()=>a.assign(v,(0,e._)`"string"`).assign($,p)),s.fail$data((0,e.or)(y(),f()));function y(){return w.strictSchema===!1?e.nil:(0,e._)`${c} && !${$}`}function f(){const S=b.$async?(0,e._)`(${p}.async ? await ${$}(${u}) : ${$}(${u}))`:(0,e._)`${$}(${u})`,O=(0,e._)`(typeof ${$} == "function" ? ${S} : ${$}.test(${u}))`;return(0,e._)`${$} && ${$} !== true && ${v} === ${l} && !${O}`}}function o(){const _=E.formats[h];if(!_){y();return}if(_===!0)return;const[p,v,$]=f(_);p===l&&s.pass(S());function y(){if(w.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${h}" ignored in schema at path "${P}"`}}function f(O){const j=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(h)}`:void 0,F=a.scopeValue("formats",{key:h,ref:O,code:j});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${F}.validate`]:["string",O,F]}function S(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!b.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${u})`}return typeof v=="function"?(0,e._)`${$}(${u})`:(0,e._)`${$}.test(${u})`}}}};t.default=n}),Jo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Wo(),r=[e.default];t.default=r}),Qo=B(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"]}),Xo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=$o(),r=Ao(),n=Go(),s=Jo(),l=Qo(),a=[e.default,r.default,(0,n.default)(),s.default,l.metadataVocabulary,l.contentVocabulary];t.default=a}),Yo=B(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={}))}),Zo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Yo(),n=Vn(),s=Qr(),l=Ue(),a={message:({params:{discrError:i,tagName:h}})=>i===r.DiscrError.Tag?`tag "${h}" must be string`:`value of tag "${h}" must be in oneOf`,params:({params:{discrError:i,tag:h,tagName:c}})=>(0,e._)`{error: ${i}, tag: ${c}, tagValue: ${h}}`},u={keyword:"discriminator",type:"object",schemaType:"object",error:a,code(i){const{gen:h,data:c,schema:d,parentSchema:w,it:P}=i,{oneOf:b}=w;if(!P.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=d.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!b)throw new Error("discriminator: requires oneOf keyword");const m=h.let("valid",!1),o=h.const("tag",(0,e._)`${c}${(0,e.getProperty)(E)}`);h.if((0,e._)`typeof ${o} == "string"`,()=>_(),()=>i.error(!1,{discrError:r.DiscrError.Tag,tag:o,tagName:E})),i.ok(m);function _(){const $=v();h.if(!1);for(const y in $)h.elseIf((0,e._)`${o} === ${y}`),h.assign(m,p($[y]));h.else(),i.error(!1,{discrError:r.DiscrError.Mapping,tag:o,tagName:E}),h.endIf()}function p($){const y=h.name("valid"),f=i.subschema({keyword:"oneOf",schemaProp:$},y);return i.mergeEvaluated(f,e.Name),y}function v(){var $;const y={},f=O(w);let S=!0;for(let V=0;V<b.length;V++){let X=b[V];if(X!=null&&X.$ref&&!(0,l.schemaHasRulesButRef)(X,P.self.RULES)){const ee=X.$ref;if(X=n.resolveRef.call(P.self,P.schemaEnv.root,P.baseId,ee),X instanceof n.SchemaEnv&&(X=X.schema),X===void 0)throw new s.default(P.opts.uriResolver,P.baseId,ee)}const G=($=X==null?void 0:X.properties)===null||$===void 0?void 0:$[E];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);S=S&&(f||O(X)),j(G,V)}if(!S)throw new Error(`discriminator: "${E}" must be required`);return y;function O({required:V}){return Array.isArray(V)&&V.includes(E)}function j(V,X){if(V.const)F(V.const,X);else if(V.enum)for(const G of V.enum)F(G,X);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function F(V,X){if(typeof V!="string"||V in y)throw new Error(`discriminator: "${E}" values must be unique strings`);y[V]=X}}}};t.default=u}),ec=B((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}}),tc=B((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=yo(),n=Xo(),s=Zo(),l=ec(),a=["/properties"],u="http://json-schema.org/draft-07/schema";class i extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(l,a):l;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=i,e.exports=t=i,e.exports.Ajv=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var h=Jr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var c=Ce();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=Ln();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var w=Qr();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),rc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(O,j){return{validate:O,compare:j}}t.fullFormats={date:e(l,a),time:e(i,h),"date-time":e(d,w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:E,"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:S,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:o,int32:{type:"number",validate:v},int64:{type:"number",validate:$},float:{type:"number",validate:y},double:{type:"number",validate:y},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),"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,w),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(O){return O%4===0&&(O%100!==0||O%400===0)}var n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function l(O){const j=n.exec(O);if(!j)return!1;const F=+j[1],V=+j[2],X=+j[3];return V>=1&&V<=12&&X>=1&&X<=(V===2&&r(F)?29:s[V])}function a(O,j){if(O&&j)return O>j?1:O<j?-1:0}var u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function i(O,j){const F=u.exec(O);if(!F)return!1;const V=+F[1],X=+F[2],G=+F[3],ee=F[5];return(V<=23&&X<=59&&G<=59||V===23&&X===59&&G===60)&&(!j||ee!=="")}function h(O,j){if(!(O&&j))return;const F=u.exec(O),V=u.exec(j);if(F&&V)return O=F[1]+F[2]+F[3]+(F[4]||""),j=V[1]+V[2]+V[3]+(V[4]||""),O>j?1:O<j?-1:0}var c=/t|\s/i;function d(O){const j=O.split(c);return j.length===2&&l(j[0])&&i(j[1],!0)}function w(O,j){if(!(O&&j))return;const[F,V]=O.split(c),[X,G]=j.split(c),ee=a(F,X);if(ee!==void 0)return ee||h(V,G)}var P=/\/|:/,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 E(O){return P.test(O)&&b.test(O)}var m=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function o(O){return m.lastIndex=0,m.test(O)}var _=-2147483648,p=2**31-1;function v(O){return Number.isInteger(O)&&O<=p&&O>=_}function $(O){return Number.isInteger(O)}function y(){return!0}var f=/[^\\]\\Z/;function S(O){if(f.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}}),zr=B(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(_){if(super(),!t.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((p,v)=>`${p}${v}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((p,v)=>(v instanceof r&&(p[v.str]=(p[v.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function s(o,..._){const p=[o[0]];let v=0;for(;v<_.length;)u(p,_[v]),p.push(o[++v]);return new n(p)}t._=s;var l=new n("+");function a(o,..._){const p=[P(o[0])];let v=0;for(;v<_.length;)p.push(l),u(p,_[v]),p.push(l,P(o[++v]));return i(p),new n(p)}t.str=a;function u(o,_){_ instanceof n?o.push(..._._items):_ instanceof r?o.push(_):o.push(d(_))}t.addCodeArg=u;function i(o){let _=1;for(;_<o.length-1;){if(o[_]===l){const p=h(o[_-1],o[_+1]);if(p!==void 0){o.splice(_-1,3,p);continue}o[_++]="+"}_++}}function h(o,_){if(_==='""')return o;if(o==='""')return _;if(typeof o=="string")return _ instanceof r||o[o.length-1]!=='"'?void 0:typeof _!="string"?`${o.slice(0,-1)}${_}"`:_[0]==='"'?o.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(o instanceof r))return`"${o}${_.slice(1)}`}function c(o,_){return _.emptyStr()?o:o.emptyStr()?_:a`${o}${_}`}t.strConcat=c;function d(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:P(Array.isArray(o)?o.join(","):o)}function w(o){return new n(P(o))}t.stringify=w;function P(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=P;function b(o){return typeof o=="string"&&t.IDENTIFIER.test(o)?new n(`.${o}`):s`[${o}]`}t.getProperty=b;function E(o){if(typeof o=="string"&&t.IDENTIFIER.test(o))return new n(`${o}`);throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`)}t.getEsmExportName=E;function m(o){return new n(o.toString())}t.regexpCode=m}),vs=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=zr();class r extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var n;(function(i){i[i.Started=0]="Started",i[i.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 s{constructor({prefixes:h,parent:c}={}){this._names={},this._prefixes=h,this._parent=c}toName(h){return h instanceof e.Name?h:this.name(h)}name(h){return new e.Name(this._newName(h))}_newName(h){const c=this._names[h]||this._nameGroup(h);return`${h}${c.index++}`}_nameGroup(h){var c,d;if(!((d=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||d===void 0)&&d.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}t.Scope=s;class l extends e.Name{constructor(h,c){super(c),this.prefix=h}setValue(h,{property:c,itemIndex:d}){this.value=h,this.scopePath=(0,e._)`.${new e.Name(c)}[${d}]`}}t.ValueScopeName=l;var a=(0,e._)`\n`;class u extends s{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?a:e.nil}}get(){return this._scope}name(h){return new l(h,this._newName(h))}value(h,c){var d;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(h),{prefix:P}=w,b=(d=c.key)!==null&&d!==void 0?d:c.ref;let E=this._values[P];if(E){const _=E.get(b);if(_)return _}else E=this._values[P]=new Map;E.set(b,w);const m=this._scope[P]||(this._scope[P]=[]),o=m.length;return m[o]=c.ref,w.setValue(c,{property:P,itemIndex:o}),w}getValue(h,c){const d=this._values[h];if(d)return d.get(c)}scopeRefs(h,c=this._values){return this._reduceValues(c,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${h}${d.scopePath}`})}scopeCode(h=this._values,c,d){return this._reduceValues(h,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},c,d)}_reduceValues(h,c,d={},w){let P=e.nil;for(const b in h){const E=h[b];if(!E)continue;const m=d[b]=d[b]||new Map;E.forEach(o=>{if(m.has(o))return;m.set(o,n.Started);let _=c(o);if(_){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;P=(0,e._)`${P}${p} ${o} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(o))P=(0,e._)`${P}${_}${this.opts._n}`;else throw new r(o);m.set(o,n.Completed)})}return P}}t.ValueScope=u}),Te=B(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=zr(),r=vs(),n=zr();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 s=vs();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.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 l{optimizeNodes(){return this}optimizeNames(g,k){return this}}class a extends l{constructor(g,k,A){super(),this.varKind=g,this.name=k,this.rhs=A}render({es5:g,_n:k}){const A=g?r.varKinds.var:this.varKind,W=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${W};`+k}optimizeNames(g,k){if(g[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,g,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends l{constructor(g,k,A){super(),this.lhs=g,this.rhs=k,this.sideEffects=A}render({_n:g}){return`${this.lhs} = ${this.rhs};`+g}optimizeNames(g,k){if(!(this.lhs instanceof e.Name&&!g[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,g,k),this}get names(){const g=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(g,this.rhs)}}class i extends u{constructor(g,k,A,W){super(g,A,W),this.op=k}render({_n:g}){return`${this.lhs} ${this.op}= ${this.rhs};`+g}}class h extends l{constructor(g){super(),this.label=g,this.names={}}render({_n:g}){return`${this.label}:`+g}}class c extends l{constructor(g){super(),this.label=g,this.names={}}render({_n:g}){return`break${this.label?` ${this.label}`:""};`+g}}class d extends l{constructor(g){super(),this.error=g}render({_n:g}){return`throw ${this.error};`+g}get names(){return this.error.names}}class w extends l{constructor(g){super(),this.code=g}render({_n:g}){return`${this.code};`+g}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(g,k){return this.code=G(this.code,g,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class P extends l{constructor(g=[]){super(),this.nodes=g}render(g){return this.nodes.reduce((k,A)=>k+A.render(g),"")}optimizeNodes(){const{nodes:g}=this;let k=g.length;for(;k--;){const A=g[k].optimizeNodes();Array.isArray(A)?g.splice(k,1,...A):A?g[k]=A:g.splice(k,1)}return g.length>0?this:void 0}optimizeNames(g,k){const{nodes:A}=this;let W=A.length;for(;W--;){const Q=A[W];Q.optimizeNames(g,k)||(ee(g,Q.names),A.splice(W,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((g,k)=>V(g,k.names),{})}}class b extends P{render(g){return"{"+g._n+super.render(g)+"}"+g._n}}class E extends P{}class m extends b{}m.kind="else";class o extends b{constructor(g,k){super(k),this.condition=g}render(g){let k=`if(${this.condition})`+super.render(g);return this.else&&(k+="else "+this.else.render(g)),k}optimizeNodes(){super.optimizeNodes();const g=this.condition;if(g===!0)return this.nodes;let k=this.else;if(k){const A=k.optimizeNodes();k=this.else=Array.isArray(A)?new m(A):A}if(k)return g===!1?k instanceof o?k:k.nodes:this.nodes.length?this:new o(fe(g),k instanceof o?[k]:k.nodes);if(!(g===!1||!this.nodes.length))return this}optimizeNames(g,k){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(g,k),!!(super.optimizeNames(g,k)||this.else))return this.condition=G(this.condition,g,k),this}get names(){const g=super.names;return X(g,this.condition),this.else&&V(g,this.else.names),g}}o.kind="if";class _ extends b{}_.kind="for";class p extends _{constructor(g){super(),this.iteration=g}render(g){return`for(${this.iteration})`+super.render(g)}optimizeNames(g,k){if(super.optimizeNames(g,k))return this.iteration=G(this.iteration,g,k),this}get names(){return V(super.names,this.iteration.names)}}class v extends _{constructor(g,k,A,W){super(),this.varKind=g,this.name=k,this.from=A,this.to=W}render(g){const k=g.es5?r.varKinds.var:this.varKind,{name:A,from:W,to:Q}=this;return`for(${k} ${A}=${W}; ${A}<${Q}; ${A}++)`+super.render(g)}get names(){const g=X(super.names,this.from);return X(g,this.to)}}class $ extends _{constructor(g,k,A,W){super(),this.loop=g,this.varKind=k,this.name=A,this.iterable=W}render(g){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(g)}optimizeNames(g,k){if(super.optimizeNames(g,k))return this.iterable=G(this.iterable,g,k),this}get names(){return V(super.names,this.iterable.names)}}class y extends b{constructor(g,k,A){super(),this.name=g,this.args=k,this.async=A}render(g){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(g)}}y.kind="func";class f extends P{render(g){return"return "+super.render(g)}}f.kind="return";class S extends b{render(g){let k="try"+super.render(g);return this.catch&&(k+=this.catch.render(g)),this.finally&&(k+=this.finally.render(g)),k}optimizeNodes(){var g,k;return super.optimizeNodes(),(g=this.catch)===null||g===void 0||g.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(g,k){var A,W;return super.optimizeNames(g,k),(A=this.catch)===null||A===void 0||A.optimizeNames(g,k),(W=this.finally)===null||W===void 0||W.optimizeNames(g,k),this}get names(){const g=super.names;return this.catch&&V(g,this.catch.names),this.finally&&V(g,this.finally.names),g}}class O extends b{constructor(g){super(),this.error=g}render(g){return`catch(${this.error})`+super.render(g)}}O.kind="catch";class j extends b{render(g){return"finally"+super.render(g)}}j.kind="finally";class F{constructor(g,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
16
+ `:""},this._extScope=g,this._scope=new r.Scope({parent:g}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(g){return this._scope.name(g)}scopeName(g){return this._extScope.name(g)}scopeValue(g,k){const A=this._extScope.value(g,k);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(g,k){return this._extScope.getValue(g,k)}scopeRefs(g){return this._extScope.scopeRefs(g,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(g,k,A,W){const Q=this._scope.toName(k);return A!==void 0&&W&&(this._constants[Q.str]=A),this._leafNode(new a(g,Q,A)),Q}const(g,k,A){return this._def(r.varKinds.const,g,k,A)}let(g,k,A){return this._def(r.varKinds.let,g,k,A)}var(g,k,A){return this._def(r.varKinds.var,g,k,A)}assign(g,k,A){return this._leafNode(new u(g,k,A))}add(g,k){return this._leafNode(new i(g,t.operators.ADD,k))}code(g){return typeof g=="function"?g():g!==e.nil&&this._leafNode(new w(g)),this}object(...g){const k=["{"];for(const[A,W]of g)k.length>1&&k.push(","),k.push(A),(A!==W||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,W));return k.push("}"),new e._Code(k)}if(g,k,A){if(this._blockNode(new o(g)),k&&A)this.code(k).else().code(A).endIf();else if(k)this.code(k).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(g){return this._elseNode(new o(g))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(o,m)}_for(g,k){return this._blockNode(g),k&&this.code(k).endFor(),this}for(g,k){return this._for(new p(g),k)}forRange(g,k,A,W,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const ie=this._scope.toName(g);return this._for(new v(Q,ie,k,A),()=>W(ie))}forOf(g,k,A,W=r.varKinds.const){const Q=this._scope.toName(g);if(this.opts.es5){const ie=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ie}.length`,re=>{this.var(Q,(0,e._)`${ie}[${re}]`),A(Q)})}return this._for(new $("of",W,Q,k),()=>A(Q))}forIn(g,k,A,W=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(g,(0,e._)`Object.keys(${k})`,A);const Q=this._scope.toName(g);return this._for(new $("in",W,Q,k),()=>A(Q))}endFor(){return this._endBlockNode(_)}label(g){return this._leafNode(new h(g))}break(g){return this._leafNode(new c(g))}return(g){const k=new f;if(this._blockNode(k),this.code(g),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(f)}try(g,k,A){if(!k&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const W=new S;if(this._blockNode(W),this.code(g),k){const Q=this.name("e");this._currNode=W.catch=new O(Q),k(Q)}return A&&(this._currNode=W.finally=new j,this.code(A)),this._endBlockNode(O,j)}throw(g){return this._leafNode(new d(g))}block(g,k){return this._blockStarts.push(this._nodes.length),g&&this.code(g).endBlock(k),this}endBlock(g){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-k;if(A<0||g!==void 0&&A!==g)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${g} expected`);return this._nodes.length=k,this}func(g,k=e.nil,A,W){return this._blockNode(new y(g,k,A)),W&&this.code(W).endFunc(),this}endFunc(){return this._endBlockNode(y)}optimize(g=1){for(;g-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(g){return this._currNode.nodes.push(g),this}_blockNode(g){this._currNode.nodes.push(g),this._nodes.push(g)}_endBlockNode(g,k){const A=this._currNode;if(A instanceof g||k&&A instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${g.kind}/${k.kind}`:g.kind}"`)}_elseNode(g){const k=this._currNode;if(!(k instanceof o))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=g,this}get _root(){return this._nodes[0]}get _currNode(){const g=this._nodes;return g[g.length-1]}set _currNode(g){const k=this._nodes;k[k.length-1]=g}}t.CodeGen=F;function V(R,g){for(const k in g)R[k]=(R[k]||0)+(g[k]||0);return R}function X(R,g){return g instanceof e._CodeOrName?V(R,g.names):R}function G(R,g,k){if(R instanceof e.Name)return A(R);if(!W(R))return R;return new e._Code(R._items.reduce((Q,ie)=>(ie instanceof e.Name&&(ie=A(ie)),ie instanceof e._Code?Q.push(...ie._items):Q.push(ie),Q),[]));function A(Q){const ie=k[Q.str];return ie===void 0||g[Q.str]!==1?Q:(delete g[Q.str],ie)}function W(Q){return Q instanceof e._Code&&Q._items.some(ie=>ie instanceof e.Name&&g[ie.str]===1&&k[ie.str]!==void 0)}}function ee(R,g){for(const k in g)R[k]=(R[k]||0)-(g[k]||0)}function fe(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${M(R)}`}t.not=fe;var we=T(t.operators.AND);function Oe(...R){return R.reduce(we)}t.and=Oe;var se=T(t.operators.OR);function x(...R){return R.reduce(se)}t.or=x;function T(R){return(g,k)=>g===e.nil?k:k===e.nil?g:(0,e._)`${M(g)} ${R} ${M(k)}`}function M(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),ze=B(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=Te(),r=zr();function n(y){const f={};for(const S of y)f[S]=!0;return f}t.toHash=n;function s(y,f){return typeof f=="boolean"?f:Object.keys(f).length===0?!0:(l(y,f),!a(f,y.self.RULES.all))}t.alwaysValidSchema=s;function l(y,f=y.schema){const{opts:S,self:O}=y;if(!S.strictSchema||typeof f=="boolean")return;const j=O.RULES.keywords;for(const F in f)j[F]||$(y,`unknown keyword: "${F}"`)}t.checkUnknownRules=l;function a(y,f){if(typeof y=="boolean")return!y;for(const S in y)if(f[S])return!0;return!1}t.schemaHasRules=a;function u(y,f){if(typeof y=="boolean")return!y;for(const S in y)if(S!=="$ref"&&f.all[S])return!0;return!1}t.schemaHasRulesButRef=u;function i({topSchemaRef:y,schemaPath:f},S,O,j){if(!j){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${y}${f}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=i;function h(y){return w(decodeURIComponent(y))}t.unescapeFragment=h;function c(y){return encodeURIComponent(d(y))}t.escapeFragment=c;function d(y){return typeof y=="number"?`${y}`:y.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function w(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function P(y,f){if(Array.isArray(y))for(const S of y)f(S);else f(y)}t.eachItem=P;function b({mergeNames:y,mergeToName:f,mergeValues:S,resultToName:O}){return(j,F,V,X)=>{const G=V===void 0?F:V instanceof e.Name?(F instanceof e.Name?y(j,F,V):f(j,F,V),V):F instanceof e.Name?(f(j,V,F),F):S(F,V);return X===e.Name&&!(G instanceof e.Name)?O(j,G):G}}t.mergeEvaluated={props:b({mergeNames:(y,f,S)=>y.if((0,e._)`${S} !== true && ${f} !== undefined`,()=>{y.if((0,e._)`${f} === true`,()=>y.assign(S,!0),()=>y.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${f})`))}),mergeToName:(y,f,S)=>y.if((0,e._)`${S} !== true`,()=>{f===!0?y.assign(S,!0):(y.assign(S,(0,e._)`${S} || {}`),m(y,S,f))}),mergeValues:(y,f)=>y===!0?!0:{...y,...f},resultToName:E}),items:b({mergeNames:(y,f,S)=>y.if((0,e._)`${S} !== true && ${f} !== undefined`,()=>y.assign(S,(0,e._)`${f} === true ? true : ${S} > ${f} ? ${S} : ${f}`)),mergeToName:(y,f,S)=>y.if((0,e._)`${S} !== true`,()=>y.assign(S,f===!0?!0:(0,e._)`${S} > ${f} ? ${S} : ${f}`)),mergeValues:(y,f)=>y===!0?!0:Math.max(y,f),resultToName:(y,f)=>y.var("items",f)})};function E(y,f){if(f===!0)return y.var("props",!0);const S=y.var("props",(0,e._)`{}`);return f!==void 0&&m(y,S,f),S}t.evaluatedPropsToName=E;function m(y,f,S){Object.keys(S).forEach(O=>y.assign((0,e._)`${f}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var o={};function _(y,f){return y.scopeValue("func",{ref:f,code:o[f.code]||(o[f.code]=new r._Code(f.code))})}t.useFunc=_;var p;(function(y){y[y.Num=0]="Num",y[y.Str=1]="Str"})(p=t.Type||(t.Type={}));function v(y,f,S){if(y instanceof e.Name){const O=f===p.Num;return S?O?(0,e._)`"[" + ${y} + "]"`:(0,e._)`"['" + ${y} + "']"`:O?(0,e._)`"/" + ${y}`:(0,e._)`"/" + ${y}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(y).toString():"/"+d(y)}t.getErrorPath=v;function $(y,f,S=y.opts.strictSchema){if(S){if(f=`strict mode: ${f}`,S===!0)throw new Error(f);y.self.logger.warn(f)}}t.checkStrictMode=$}),Xt=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),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}),Xr=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Te(),r=ze(),n=Xt();t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:o})=>o?(0,e.str)`"${m}" keyword must be ${o} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,o=t.keywordError,_,p){const{it:v}=m,{gen:$,compositeRule:y,allErrors:f}=v,S=d(m,o,_);p??(y||f)?i($,S):h(v,(0,e._)`[${S}]`)}t.reportError=s;function l(m,o=t.keywordError,_){const{it:p}=m,{gen:v,compositeRule:$,allErrors:y}=p,f=d(m,o,_);i(v,f),$||y||h(p,n.default.vErrors)}t.reportExtraError=l;function a(m,o){m.assign(n.default.errors,o),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(o,()=>m.assign((0,e._)`${n.default.vErrors}.length`,o),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=a;function u({gen:m,keyword:o,schemaValue:_,data:p,errsCount:v,it:$}){if(v===void 0)throw new Error("ajv implementation error");const y=m.name("err");m.forRange("i",v,n.default.errors,f=>{m.const(y,(0,e._)`${n.default.vErrors}[${f}]`),m.if((0,e._)`${y}.instancePath === undefined`,()=>m.assign((0,e._)`${y}.instancePath`,(0,e.strConcat)(n.default.instancePath,$.errorPath))),m.assign((0,e._)`${y}.schemaPath`,(0,e.str)`${$.errSchemaPath}/${o}`),$.opts.verbose&&(m.assign((0,e._)`${y}.schema`,_),m.assign((0,e._)`${y}.data`,p))})}t.extendErrors=u;function i(m,o){const _=m.const("err",o);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${_}]`),(0,e._)`${n.default.vErrors}.push(${_})`),m.code((0,e._)`${n.default.errors}++`)}function h(m,o){const{gen:_,validateName:p,schemaEnv:v}=m;v.$async?_.throw((0,e._)`new ${m.ValidationError}(${o})`):(_.assign((0,e._)`${p}.errors`,o),_.return(!1))}var c={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 d(m,o,_){const{createErrors:p}=m.it;return p===!1?(0,e._)`{}`:w(m,o,_)}function w(m,o,_={}){const{gen:p,it:v}=m,$=[P(v,_),b(m,_)];return E(m,o,$),p.object(...$)}function P({errorPath:m},{instancePath:o}){const _=o?(0,e.str)`${m}${(0,r.getErrorPath)(o,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function b({keyword:m,it:{errSchemaPath:o}},{schemaPath:_,parentSchema:p}){let v=p?o:(0,e.str)`${o}/${m}`;return _&&(v=(0,e.str)`${v}${(0,r.getErrorPath)(_,r.Type.Str)}`),[c.schemaPath,v]}function E(m,{params:o,message:_},p){const{keyword:v,data:$,schemaValue:y,it:f}=m,{opts:S,propertyName:O,topSchemaRef:j,schemaPath:F}=f;p.push([c.keyword,v],[c.params,typeof o=="function"?o(m):o||(0,e._)`{}`]),S.messages&&p.push([c.message,typeof _=="function"?_(m):_]),S.verbose&&p.push([c.schema,y],[c.parentSchema,(0,e._)`${j}${F}`],[n.default.data,$]),O&&p.push([c.propertyName,O])}}),nc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Xr(),r=Te(),n=Xt(),s={message:"boolean schema is false"};function l(i){const{gen:h,schema:c,validateName:d}=i;c===!1?u(i,!1):typeof c=="object"&&c.$async===!0?h.return(n.default.data):(h.assign((0,r._)`${d}.errors`,null),h.return(!0))}t.topBoolOrEmptySchema=l;function a(i,h){const{gen:c,schema:d}=i;d===!1?(c.var(h,!1),u(i)):c.var(h,!0)}t.boolOrEmptySchema=a;function u(i,h){const{gen:c,data:d}=i,w={gen:c,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:i};(0,e.reportError)(w,s,void 0,h)}}),Zs=B(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(l){return typeof l=="string"&&r.has(l)}t.isJSONType=n;function s(){const l={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...l,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},l.number,l.string,l.array,l.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),ea=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:l},a){const u=l.RULES.types[a];return u&&u!==!0&&r(s,u)}t.schemaHasRulesForType=e;function r(s,l){return l.rules.some(a=>n(s,a))}t.shouldUseGroup=r;function n(s,l){var a;return s[l.keyword]!==void 0||((a=l.definition.implements)===null||a===void 0?void 0:a.some(u=>s[u]!==void 0))}t.shouldUseRule=n}),xr=B(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=Zs(),r=ea(),n=Xr(),s=Te(),l=ze(),a;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(a=t.DataType||(t.DataType={}));function u(p){const v=i(p.type);if(v.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&v.push("null")}return v}t.getSchemaTypes=u;function i(p){const v=Array.isArray(p)?p:p?[p]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}t.getJSONTypes=i;function h(p,v){const{gen:$,data:y,opts:f}=p,S=d(v,f.coerceTypes),O=v.length>0&&!(S.length===0&&v.length===1&&(0,r.schemaHasRulesForType)(p,v[0]));if(O){const j=E(v,y,f.strictNumbers,a.Wrong);$.if(j,()=>{S.length?w(p,v,S):o(p)})}return O}t.coerceAndCheckDataType=h;var c=new Set(["string","number","integer","boolean","null"]);function d(p,v){return v?p.filter($=>c.has($)||v==="array"&&$==="array"):[]}function w(p,v,$){const{gen:y,data:f,opts:S}=p,O=y.let("dataType",(0,s._)`typeof ${f}`),j=y.let("coerced",(0,s._)`undefined`);S.coerceTypes==="array"&&y.if((0,s._)`${O} == 'object' && Array.isArray(${f}) && ${f}.length == 1`,()=>y.assign(f,(0,s._)`${f}[0]`).assign(O,(0,s._)`typeof ${f}`).if(E(v,f,S.strictNumbers),()=>y.assign(j,f))),y.if((0,s._)`${j} !== undefined`);for(const V of $)(c.has(V)||V==="array"&&S.coerceTypes==="array")&&F(V);y.else(),o(p),y.endIf(),y.if((0,s._)`${j} !== undefined`,()=>{y.assign(f,j),P(p,j)});function F(V){switch(V){case"string":y.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(j,(0,s._)`"" + ${f}`).elseIf((0,s._)`${f} === null`).assign(j,(0,s._)`""`);return;case"number":y.elseIf((0,s._)`${O} == "boolean" || ${f} === null
17
+ || (${O} == "string" && ${f} && ${f} == +${f})`).assign(j,(0,s._)`+${f}`);return;case"integer":y.elseIf((0,s._)`${O} === "boolean" || ${f} === null
18
+ || (${O} === "string" && ${f} && ${f} == +${f} && !(${f} % 1))`).assign(j,(0,s._)`+${f}`);return;case"boolean":y.elseIf((0,s._)`${f} === "false" || ${f} === 0 || ${f} === null`).assign(j,!1).elseIf((0,s._)`${f} === "true" || ${f} === 1`).assign(j,!0);return;case"null":y.elseIf((0,s._)`${f} === "" || ${f} === 0 || ${f} === false`),y.assign(j,null);return;case"array":y.elseIf((0,s._)`${O} === "string" || ${O} === "number"
19
+ || ${O} === "boolean" || ${f} === null`).assign(j,(0,s._)`[${f}]`)}}}function P({gen:p,parentData:v,parentDataProperty:$},y){p.if((0,s._)`${v} !== undefined`,()=>p.assign((0,s._)`${v}[${$}]`,y))}function b(p,v,$,y=a.Correct){const f=y===a.Correct?s.operators.EQ:s.operators.NEQ;let S;switch(p){case"null":return(0,s._)`${v} ${f} null`;case"array":S=(0,s._)`Array.isArray(${v})`;break;case"object":S=(0,s._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":S=O((0,s._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":S=O();break;default:return(0,s._)`typeof ${v} ${f} ${p}`}return y===a.Correct?S:(0,s.not)(S);function O(j=s.nil){return(0,s.and)((0,s._)`typeof ${v} == "number"`,j,$?(0,s._)`isFinite(${v})`:s.nil)}}t.checkDataType=b;function E(p,v,$,y){if(p.length===1)return b(p[0],v,$,y);let f;const S=(0,l.toHash)(p);if(S.array&&S.object){const O=(0,s._)`typeof ${v} != "object"`;f=S.null?O:(0,s._)`!${v} || ${O}`,delete S.null,delete S.array,delete S.object}else f=s.nil;S.number&&delete S.integer;for(const O in S)f=(0,s.and)(f,b(O,v,$,y));return f}t.checkDataTypes=E;var m={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:v})=>typeof p=="string"?(0,s._)`{type: ${p}}`:(0,s._)`{type: ${v}}`};function o(p){const v=_(p);(0,n.reportError)(v,m)}t.reportTypeError=o;function _(p){const{gen:v,data:$,schema:y}=p,f=(0,l.schemaRefOrVal)(p,y,"type");return{gen:v,keyword:"type",data:$,schema:y.type,schemaCode:f,schemaValue:f,parentSchema:y,params:{},it:p}}}),sc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Te(),r=ze();function n(l,a){const{properties:u,items:i}=l.schema;if(a==="object"&&u)for(const h in u)s(l,h,u[h].default);else a==="array"&&Array.isArray(i)&&i.forEach((h,c)=>s(l,c,h.default))}t.assignDefaults=n;function s(l,a,u){const{gen:i,compositeRule:h,data:c,opts:d}=l;if(u===void 0)return;const w=(0,e._)`${c}${(0,e.getProperty)(a)}`;if(h){(0,r.checkStrictMode)(l,`default is ignored for: ${w}`);return}let P=(0,e._)`${w} === undefined`;d.useDefaults==="empty"&&(P=(0,e._)`${P} || ${w} === null || ${w} === ""`),i.if(P,(0,e._)`${w} = ${(0,e.stringify)(u)}`)}}),Ct=B(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=Te(),r=ze(),n=Xt(),s=ze();function l(p,v){const{gen:$,data:y,it:f}=p;$.if(d($,y,v,f.opts.ownProperties),()=>{p.setParams({missingProperty:(0,e._)`${v}`},!0),p.error()})}t.checkReportMissingProp=l;function a({gen:p,data:v,it:{opts:$}},y,f){return(0,e.or)(...y.map(S=>(0,e.and)(d(p,v,S,$.ownProperties),(0,e._)`${f} = ${S}`)))}t.checkMissingProp=a;function u(p,v){p.setParams({missingProperty:v},!0),p.error()}t.reportMissingProp=u;function i(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=i;function h(p,v,$){return(0,e._)`${i(p)}.call(${v}, ${$})`}t.isOwnProperty=h;function c(p,v,$,y){const f=(0,e._)`${v}${(0,e.getProperty)($)} !== undefined`;return y?(0,e._)`${f} && ${h(p,v,$)}`:f}t.propertyInData=c;function d(p,v,$,y){const f=(0,e._)`${v}${(0,e.getProperty)($)} === undefined`;return y?(0,e.or)(f,(0,e.not)(h(p,v,$))):f}t.noPropertyInData=d;function w(p){return p?Object.keys(p).filter(v=>v!=="__proto__"):[]}t.allSchemaProperties=w;function P(p,v){return w(v).filter($=>!(0,r.alwaysValidSchema)(p,v[$]))}t.schemaProperties=P;function b({schemaCode:p,data:v,it:{gen:$,topSchemaRef:y,schemaPath:f,errorPath:S},it:O},j,F,V){const X=V?(0,e._)`${p}, ${v}, ${y}${f}`:v,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,S)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&G.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const ee=(0,e._)`${X}, ${$.object(...G)}`;return F!==e.nil?(0,e._)`${j}.call(${F}, ${ee})`:(0,e._)`${j}(${ee})`}t.callValidateCode=b;var E=(0,e._)`new RegExp`;function m({gen:p,it:{opts:v}},$){const y=v.unicodeRegExp?"u":"",{regExp:f}=v.code,S=f($,y);return p.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${f.code==="new RegExp"?E:(0,s.useFunc)(p,f)}(${$}, ${y})`})}t.usePattern=m;function o(p){const{gen:v,data:$,keyword:y,it:f}=p,S=v.name("valid");if(f.allErrors){const j=v.let("valid",!0);return O(()=>v.assign(j,!1)),j}return v.var(S,!0),O(()=>v.break()),S;function O(j){const F=v.const("len",(0,e._)`${$}.length`);v.forRange("i",0,F,V=>{p.subschema({keyword:y,dataProp:V,dataPropType:r.Type.Num},S),v.if((0,e.not)(S),j)})}}t.validateArray=o;function _(p){const{gen:v,schema:$,keyword:y,it:f}=p;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(F=>(0,r.alwaysValidSchema)(f,F))&&!f.opts.unevaluated)return;const O=v.let("valid",!1),j=v.name("_valid");v.block(()=>$.forEach((F,V)=>{const X=p.subschema({keyword:y,schemaProp:V,compositeRule:!0},j);v.assign(O,(0,e._)`${O} || ${j}`),p.mergeValidEvaluated(X,j)||v.if((0,e.not)(O))})),p.result(O,()=>p.reset(),()=>p.error(!0))}t.validateUnion=_}),ac=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Te(),r=Xt(),n=Ct(),s=Xr();function l(P,b){const{gen:E,keyword:m,schema:o,parentSchema:_,it:p}=P,v=b.macro.call(p.self,o,_,p),$=c(E,m,v);p.opts.validateSchema!==!1&&p.self.validateSchema(v,!0);const y=E.name("valid");P.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${p.errSchemaPath}/${m}`,topSchemaRef:$,compositeRule:!0},y),P.pass(y,()=>P.error(!0))}t.macroKeywordCode=l;function a(P,b){var E;const{gen:m,keyword:o,schema:_,parentSchema:p,$data:v,it:$}=P;h($,b);const y=!v&&b.compile?b.compile.call($.self,_,p,$):b.validate,f=c(m,o,y),S=m.let("valid");P.block$data(S,O),P.ok((E=b.valid)!==null&&E!==void 0?E:S);function O(){if(b.errors===!1)V(),b.modifying&&u(P),X(()=>P.error());else{const G=b.async?j():F();b.modifying&&u(P),X(()=>i(P,G))}}function j(){const G=m.let("ruleErrs",null);return m.try(()=>V((0,e._)`await `),ee=>m.assign(S,!1).if((0,e._)`${ee} instanceof ${$.ValidationError}`,()=>m.assign(G,(0,e._)`${ee}.errors`),()=>m.throw(ee))),G}function F(){const G=(0,e._)`${f}.errors`;return m.assign(G,null),V(e.nil),G}function V(G=b.async?(0,e._)`await `:e.nil){const ee=$.opts.passContext?r.default.this:r.default.self,fe=!("compile"in b&&!v||b.schema===!1);m.assign(S,(0,e._)`${G}${(0,n.callValidateCode)(P,f,ee,fe)}`,b.modifying)}function X(G){var ee;m.if((0,e.not)((ee=b.valid)!==null&&ee!==void 0?ee:S),G)}}t.funcKeywordCode=a;function u(P){const{gen:b,data:E,it:m}=P;b.if(m.parentData,()=>b.assign(E,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function i(P,b){const{gen:E}=P;E.if((0,e._)`Array.isArray(${b})`,()=>{E.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,s.extendErrors)(P)},()=>P.error())}function h({schemaEnv:P},b){if(b.async&&!P.$async)throw new Error("async keyword in sync schema")}function c(P,b,E){if(E===void 0)throw new Error(`keyword "${b}" failed to compile`);return P.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(P,b,E=!1){return!b.length||b.some(m=>m==="array"?Array.isArray(P):m==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==m||E&&typeof P>"u")}t.validSchemaType=d;function w({schema:P,opts:b,self:E,errSchemaPath:m},o,_){if(Array.isArray(o.keyword)?!o.keyword.includes(_):o.keyword!==_)throw new Error("ajv implementation error");const p=o.dependencies;if(p!=null&&p.some(v=>!Object.prototype.hasOwnProperty.call(P,v)))throw new Error(`parent schema must have dependencies of ${_}: ${p.join(",")}`);if(o.validateSchema&&!o.validateSchema(P[_])){const $=`keyword "${_}" value is invalid at path "${m}": `+E.errorsText(o.validateSchema.errors);if(b.validateSchema==="log")E.logger.error($);else throw new Error($)}}t.validateKeywordUsage=w}),ic=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Te(),r=ze();function n(a,{keyword:u,schemaProp:i,schema:h,schemaPath:c,errSchemaPath:d,topSchemaRef:w}){if(u!==void 0&&h!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const P=a.schema[u];return i===void 0?{schema:P,schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${a.errSchemaPath}/${u}`}:{schema:P[i],schemaPath:(0,e._)`${a.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(i)}`,errSchemaPath:`${a.errSchemaPath}/${u}/${(0,r.escapeFragment)(i)}`}}if(h!==void 0){if(c===void 0||d===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:h,schemaPath:c,topSchemaRef:w,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(a,u,{dataProp:i,dataPropType:h,data:c,dataTypes:d,propertyName:w}){if(c!==void 0&&i!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=u;if(i!==void 0){const{errorPath:E,dataPathArr:m,opts:o}=u,_=P.let("data",(0,e._)`${u.data}${(0,e.getProperty)(i)}`,!0);b(_),a.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(i,h,o.jsPropertySyntax)}`,a.parentDataProperty=(0,e._)`${i}`,a.dataPathArr=[...m,a.parentDataProperty]}if(c!==void 0){const E=c instanceof e.Name?c:P.let("data",c,!0);b(E),w!==void 0&&(a.propertyName=w)}d&&(a.dataTypes=d);function b(E){a.data=E,a.dataLevel=u.dataLevel+1,a.dataTypes=[],u.definedProperties=new Set,a.parentData=u.data,a.dataNames=[...u.dataNames,E]}}t.extendSubschemaData=s;function l(a,{jtdDiscriminator:u,jtdMetadata:i,compositeRule:h,createErrors:c,allErrors:d}){h!==void 0&&(a.compositeRule=h),c!==void 0&&(a.createErrors=c),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=u,a.jtdMetadata=i}t.extendSubschemaMode=l}),Yr=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=ze(),r=Gr(),n=Ws(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function l(m,o=!0){return typeof m=="boolean"?!0:o===!0?!u(m):o?i(m)<=o:!1}t.inlineRef=l;var a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(m){for(const o in m){if(a.has(o))return!0;const _=m[o];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function i(m){let o=0;for(const _ in m){if(_==="$ref")return 1/0;if(o++,!s.has(_)&&(typeof m[_]=="object"&&(0,e.eachItem)(m[_],p=>o+=i(p)),o===1/0))return 1/0}return o}function h(m,o="",_){_!==!1&&(o=w(o));const p=m.parse(o);return c(m,p)}t.getFullPath=h;function c(m,o){return m.serialize(o).split("#")[0]+"#"}t._getFullPath=c;var d=/#\/?$/;function w(m){return m?m.replace(d,""):""}t.normalizeId=w;function P(m,o,_){return _=w(_),m.resolve(o,_)}t.resolveUrl=P;var b=/^[a-z_][-a-z0-9._]*$/i;function E(m,o){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:p}=this.opts,v=w(m[_]||o),$={"":v},y=h(p,v,!1),f={},S=new Set;return n(m,{allKeys:!0},(F,V,X,G)=>{if(G===void 0)return;const ee=y+V;let fe=$[G];typeof F[_]=="string"&&(fe=we.call(this,F[_])),Oe.call(this,F.$anchor),Oe.call(this,F.$dynamicAnchor),$[V]=fe;function we(se){const x=this.opts.uriResolver.resolve;if(se=w(fe?x(fe,se):se),S.has(se))throw j(se);S.add(se);let T=this.refs[se];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?O(F,T.schema,se):se!==w(ee)&&(se[0]==="#"?(O(F,f[se],se),f[se]=F):this.refs[se]=ee),se}function Oe(se){if(typeof se=="string"){if(!b.test(se))throw new Error(`invalid anchor "${se}"`);we.call(this,`#${se}`)}}}),f;function O(F,V,X){if(V!==void 0&&!r(F,V))throw j(X)}function j(F){return new Error(`reference "${F}" resolves to more than one schema`)}}t.getSchemaRefs=E}),Zr=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=nc(),r=xr(),n=ea(),s=xr(),l=sc(),a=ac(),u=ic(),i=Te(),h=Xt(),c=Yr(),d=ze(),w=Xr();function P(N){if(y(N)&&(S(N),$(N))){o(N);return}b(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=P;function b({gen:N,validateName:I,schema:L,schemaEnv:z,opts:J},te){J.code.es5?N.func(I,(0,i._)`${h.default.data}, ${h.default.valCxt}`,z.$async,()=>{N.code((0,i._)`"use strict"; ${p(L,J)}`),m(N,J),N.code(te)}):N.func(I,(0,i._)`${h.default.data}, ${E(J)}`,z.$async,()=>N.code(p(L,J)).code(te))}function E(N){return(0,i._)`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${N.dynamicRef?(0,i._)`, ${h.default.dynamicAnchors}={}`:i.nil}}={}`}function m(N,I){N.if(h.default.valCxt,()=>{N.var(h.default.instancePath,(0,i._)`${h.default.valCxt}.${h.default.instancePath}`),N.var(h.default.parentData,(0,i._)`${h.default.valCxt}.${h.default.parentData}`),N.var(h.default.parentDataProperty,(0,i._)`${h.default.valCxt}.${h.default.parentDataProperty}`),N.var(h.default.rootData,(0,i._)`${h.default.valCxt}.${h.default.rootData}`),I.dynamicRef&&N.var(h.default.dynamicAnchors,(0,i._)`${h.default.valCxt}.${h.default.dynamicAnchors}`)},()=>{N.var(h.default.instancePath,(0,i._)`""`),N.var(h.default.parentData,(0,i._)`undefined`),N.var(h.default.parentDataProperty,(0,i._)`undefined`),N.var(h.default.rootData,h.default.data),I.dynamicRef&&N.var(h.default.dynamicAnchors,(0,i._)`{}`)})}function o(N){const{schema:I,opts:L,gen:z}=N;b(N,()=>{L.$comment&&I.$comment&&G(N),F(N),z.let(h.default.vErrors,null),z.let(h.default.errors,0),L.unevaluated&&_(N),O(N),ee(N)})}function _(N){const{gen:I,validateName:L}=N;N.evaluated=I.const("evaluated",(0,i._)`${L}.evaluated`),I.if((0,i._)`${N.evaluated}.dynamicProps`,()=>I.assign((0,i._)`${N.evaluated}.props`,(0,i._)`undefined`)),I.if((0,i._)`${N.evaluated}.dynamicItems`,()=>I.assign((0,i._)`${N.evaluated}.items`,(0,i._)`undefined`))}function p(N,I){const L=typeof N=="object"&&N[I.schemaId];return L&&(I.code.source||I.code.process)?(0,i._)`/*# sourceURL=${L} */`:i.nil}function v(N,I){if(y(N)&&(S(N),$(N))){f(N,I);return}(0,e.boolOrEmptySchema)(N,I)}function $({schema:N,self:I}){if(typeof N=="boolean")return!N;for(const L in N)if(I.RULES.all[L])return!0;return!1}function y(N){return typeof N.schema!="boolean"}function f(N,I){const{schema:L,gen:z,opts:J}=N;J.$comment&&L.$comment&&G(N),V(N),X(N);const te=z.const("_errs",h.default.errors);O(N,te),z.var(I,(0,i._)`${te} === ${h.default.errors}`)}function S(N){(0,d.checkUnknownRules)(N),j(N)}function O(N,I){if(N.opts.jtd)return we(N,[],!1,I);const L=(0,r.getSchemaTypes)(N.schema),z=(0,r.coerceAndCheckDataType)(N,L);we(N,L,!z,I)}function j(N){const{schema:I,errSchemaPath:L,opts:z,self:J}=N;I.$ref&&z.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(I,J.RULES)&&J.logger.warn(`$ref: keywords ignored in schema at path "${L}"`)}function F(N){const{schema:I,opts:L}=N;I.default!==void 0&&L.useDefaults&&L.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function V(N){const I=N.schema[N.opts.schemaId];I&&(N.baseId=(0,c.resolveUrl)(N.opts.uriResolver,N.baseId,I))}function X(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:N,schemaEnv:I,schema:L,errSchemaPath:z,opts:J}){const te=L.$comment;if(J.$comment===!0)N.code((0,i._)`${h.default.self}.logger.log(${te})`);else if(typeof J.$comment=="function"){const Ee=(0,i.str)`${z}/$comment`,Fe=N.scopeValue("root",{ref:I.root});N.code((0,i._)`${h.default.self}.opts.$comment(${te}, ${Ee}, ${Fe}.schema)`)}}function ee(N){const{gen:I,schemaEnv:L,validateName:z,ValidationError:J,opts:te}=N;L.$async?I.if((0,i._)`${h.default.errors} === 0`,()=>I.return(h.default.data),()=>I.throw((0,i._)`new ${J}(${h.default.vErrors})`)):(I.assign((0,i._)`${z}.errors`,h.default.vErrors),te.unevaluated&&fe(N),I.return((0,i._)`${h.default.errors} === 0`))}function fe({gen:N,evaluated:I,props:L,items:z}){L instanceof i.Name&&N.assign((0,i._)`${I}.props`,L),z instanceof i.Name&&N.assign((0,i._)`${I}.items`,z)}function we(N,I,L,z){const{gen:J,schema:te,data:Ee,allErrors:Fe,opts:Re,self:Ae}=N,{RULES:_e}=Ae;if(te.$ref&&(Re.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(te,_e))){J.block(()=>Q(N,"$ref",_e.all.$ref.definition));return}Re.jtd||se(N,I),J.block(()=>{for(const Ie of _e.rules)xe(Ie);xe(_e.post)});function xe(Ie){(0,n.shouldUseGroup)(te,Ie)&&(Ie.type?(J.if((0,s.checkDataType)(Ie.type,Ee,Re.strictNumbers)),Oe(N,Ie),I.length===1&&I[0]===Ie.type&&L&&(J.else(),(0,s.reportTypeError)(N)),J.endIf()):Oe(N,Ie),Fe||J.if((0,i._)`${h.default.errors} === ${z||0}`))}}function Oe(N,I){const{gen:L,schema:z,opts:{useDefaults:J}}=N;J&&(0,l.assignDefaults)(N,I.type),L.block(()=>{for(const te of I.rules)(0,n.shouldUseRule)(z,te)&&Q(N,te.keyword,te.definition,I.type)})}function se(N,I){N.schemaEnv.meta||!N.opts.strictTypes||(x(N,I),N.opts.allowUnionTypes||T(N,I),M(N,N.dataTypes))}function x(N,I){if(I.length){if(!N.dataTypes.length){N.dataTypes=I;return}I.forEach(L=>{g(N.dataTypes,L)||A(N,`type "${L}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,I)}}function T(N,I){I.length>1&&!(I.length===2&&I.includes("null"))&&A(N,"use allowUnionTypes to allow union type keyword")}function M(N,I){const L=N.self.RULES.all;for(const z in L){const J=L[z];if(typeof J=="object"&&(0,n.shouldUseRule)(N.schema,J)){const{type:te}=J.definition;te.length&&!te.some(Ee=>R(I,Ee))&&A(N,`missing type "${te.join(",")}" for keyword "${z}"`)}}}function R(N,I){return N.includes(I)||I==="number"&&N.includes("integer")}function g(N,I){return N.includes(I)||I==="integer"&&N.includes("number")}function k(N,I){const L=[];for(const z of N.dataTypes)g(I,z)?L.push(z):I.includes("integer")&&z==="number"&&L.push("integer");N.dataTypes=L}function A(N,I){const L=N.schemaEnv.baseId+N.errSchemaPath;I+=` at "${L}" (strictTypes)`,(0,d.checkStrictMode)(N,I,N.opts.strictTypes)}class W{constructor(I,L,z){if((0,a.validateKeywordUsage)(I,L,z),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=z,this.data=I.data,this.schema=I.schema[z],this.$data=L.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(I,this.schema,z,this.$data),this.schemaType=L.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=L,this.$data)this.schemaCode=I.gen.const("vSchema",ve(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,L.schemaType,L.allowUndefined))throw new Error(`${z} value must be ${JSON.stringify(L.schemaType)}`);("code"in L?L.trackErrors:L.errors!==!1)&&(this.errsCount=I.gen.const("_errs",h.default.errors))}result(I,L,z){this.failResult((0,i.not)(I),L,z)}failResult(I,L,z){this.gen.if(I),z?z():this.error(),L?(this.gen.else(),L(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,L){this.failResult((0,i.not)(I),void 0,L)}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:L}=this;this.fail((0,i._)`${L} !== undefined && (${(0,i.or)(this.invalid$data(),I)})`)}error(I,L,z){if(L){this.setParams(L),this._error(I,z),this.setParams({});return}this._error(I,z)}_error(I,L){(I?w.reportExtraError:w.reportError)(this,this.def.error,L)}$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(I){this.allErrors||this.gen.if(I)}setParams(I,L){L?Object.assign(this.params,I):this.params=I}block$data(I,L,z=i.nil){this.gen.block(()=>{this.check$data(I,z),L()})}check$data(I=i.nil,L=i.nil){if(!this.$data)return;const{gen:z,schemaCode:J,schemaType:te,def:Ee}=this;z.if((0,i.or)((0,i._)`${J} === undefined`,L)),I!==i.nil&&z.assign(I,!0),(te.length||Ee.validateSchema)&&(z.elseIf(this.invalid$data()),this.$dataError(),I!==i.nil&&z.assign(I,!1)),z.else()}invalid$data(){const{gen:I,schemaCode:L,schemaType:z,def:J,it:te}=this;return(0,i.or)(Ee(),Fe());function Ee(){if(z.length){if(!(L instanceof i.Name))throw new Error("ajv implementation error");const Re=Array.isArray(z)?z:[z];return(0,i._)`${(0,s.checkDataTypes)(Re,L,te.opts.strictNumbers,s.DataType.Wrong)}`}return i.nil}function Fe(){if(J.validateSchema){const Re=I.scopeValue("validate$data",{ref:J.validateSchema});return(0,i._)`!${Re}(${L})`}return i.nil}}subschema(I,L){const z=(0,u.getSubschema)(this.it,I);(0,u.extendSubschemaData)(z,this.it,I),(0,u.extendSubschemaMode)(z,I);const J={...this.it,...z,items:void 0,props:void 0};return v(J,L),J}mergeEvaluated(I,L){const{it:z,gen:J}=this;z.opts.unevaluated&&(z.props!==!0&&I.props!==void 0&&(z.props=d.mergeEvaluated.props(J,I.props,z.props,L)),z.items!==!0&&I.items!==void 0&&(z.items=d.mergeEvaluated.items(J,I.items,z.items,L)))}mergeValidEvaluated(I,L){const{it:z,gen:J}=this;if(z.opts.unevaluated&&(z.props!==!0||z.items!==!0))return J.if(L,()=>this.mergeEvaluated(I,i.Name)),!0}}t.KeywordCxt=W;function Q(N,I,L,z){const J=new W(N,L,I);"code"in L?L.code(J,z):J.$data&&L.validate?(0,a.funcKeywordCode)(J,L):"macro"in L?(0,a.macroKeywordCode)(J,L):(L.compile||L.validate)&&(0,a.funcKeywordCode)(J,L)}var ie=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(N,{dataLevel:I,dataNames:L,dataPathArr:z}){let J,te;if(N==="")return h.default.rootData;if(N[0]==="/"){if(!ie.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);J=N,te=h.default.rootData}else{const Ae=re.exec(N);if(!Ae)throw new Error(`Invalid JSON-pointer: ${N}`);const _e=+Ae[1];if(J=Ae[2],J==="#"){if(_e>=I)throw new Error(Re("property/index",_e));return z[I-_e]}if(_e>I)throw new Error(Re("data",_e));if(te=L[I-_e],!J)return te}let Ee=te;const Fe=J.split("/");for(const Ae of Fe)Ae&&(te=(0,i._)`${te}${(0,i.getProperty)((0,d.unescapeJsonPointer)(Ae))}`,Ee=(0,i._)`${Ee} && ${te}`);return Ee;function Re(Ae,_e){return`Cannot access ${Ae} ${_e} levels up, current level is ${I}`}}t.getData=ve}),Fn=B(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}),zn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Yr();class r extends Error{constructor(s,l,a,u){super(u||`can't resolve reference ${a} from id ${l}`),this.missingRef=(0,e.resolveUrl)(s,l,a),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),xn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Te(),r=Fn(),n=Xt(),s=Yr(),l=ze(),a=Zr();class u{constructor(_){var p;this.refs={},this.dynamicAnchors={};let v;typeof _.schema=="object"&&(v=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(p=_.baseId)!==null&&p!==void 0?p:(0,s.normalizeId)(v==null?void 0:v[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=v==null?void 0:v.$async,this.refs={}}}t.SchemaEnv=u;function i(o){const _=d.call(this,o);if(_)return _;const p=(0,s.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:v,lines:$}=this.opts.code,{ownProperties:y}=this.opts,f=new e.CodeGen(this.scope,{es5:v,lines:$,ownProperties:y});let S;o.$async&&(S=f.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=f.scopeName("validate");o.validateName=O;const j={gen:f,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:f.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:S,schema:o.schema,schemaEnv:o,rootId:p,baseId:o.baseId||p,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let F;try{this._compilations.add(o),(0,a.validateFunctionCode)(j),f.optimize(this.opts.code.optimize);const V=f.toString();F=`${f.scopeRefs(n.default.scope)}return ${V}`,this.opts.code.process&&(F=this.opts.code.process(F,o));const G=new Function(`${n.default.self}`,`${n.default.scope}`,F)(this,this.scope.get());if(this.scope.value(O,{ref:G}),G.errors=null,G.schema=o.schema,G.schemaEnv=o,o.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:O,validateCode:V,scopeValues:f._values}),this.opts.unevaluated){const{props:ee,items:fe}=j;G.evaluated={props:ee instanceof e.Name?void 0:ee,items:fe instanceof e.Name?void 0:fe,dynamicProps:ee instanceof e.Name,dynamicItems:fe instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return o.validate=G,o}catch(V){throw delete o.validate,delete o.validateName,F&&this.logger.error("Error compiling schema, function code:",F),V}finally{this._compilations.delete(o)}}t.compileSchema=i;function h(o,_,p){var v;p=(0,s.resolveUrl)(this.opts.uriResolver,_,p);const $=o.refs[p];if($)return $;let y=P.call(this,o,p);if(y===void 0){const f=(v=o.localRefs)===null||v===void 0?void 0:v[p],{schemaId:S}=this.opts;f&&(y=new u({schema:f,schemaId:S,root:o,baseId:_}))}if(y!==void 0)return o.refs[p]=c.call(this,y)}t.resolveRef=h;function c(o){return(0,s.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:i.call(this,o)}function d(o){for(const _ of this._compilations)if(w(_,o))return _}t.getCompilingSchema=d;function w(o,_){return o.schema===_.schema&&o.root===_.root&&o.baseId===_.baseId}function P(o,_){let p;for(;typeof(p=this.refs[_])=="string";)_=p;return p||this.schemas[_]||b.call(this,o,_)}function b(o,_){const p=this.opts.uriResolver.parse(_),v=(0,s._getFullPath)(this.opts.uriResolver,p);let $=(0,s.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&v===$)return m.call(this,p,o);const y=(0,s.normalizeId)(v),f=this.refs[y]||this.schemas[y];if(typeof f=="string"){const S=b.call(this,o,f);return typeof(S==null?void 0:S.schema)!="object"?void 0:m.call(this,p,S)}if(typeof(f==null?void 0:f.schema)=="object"){if(f.validate||i.call(this,f),y===(0,s.normalizeId)(_)){const{schema:S}=f,{schemaId:O}=this.opts,j=S[O];return j&&($=(0,s.resolveUrl)(this.opts.uriResolver,$,j)),new u({schema:S,schemaId:O,root:o,baseId:$})}return m.call(this,p,f)}}t.resolveSchema=b;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(o,{baseId:_,schema:p,root:v}){var $;if((($=o.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const S of o.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const O=p[(0,l.unescapeFragment)(S)];if(O===void 0)return;p=O;const j=typeof p=="object"&&p[this.opts.schemaId];!E.has(S)&&j&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,j))}let y;if(typeof p!="boolean"&&p.$ref&&!(0,l.schemaHasRulesButRef)(p,this.RULES)){const S=(0,s.resolveUrl)(this.opts.uriResolver,_,p.$ref);y=b.call(this,v,S)}const{schemaId:f}=this.opts;if(y=y||new u({schema:p,schemaId:f,root:v,baseId:_}),y.schema!==y.root.schema)return y}}),oc=B((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}}),Bn=B((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 D=arguments.length,C=Array(D),U=0;U<D;U++)C[U]=arguments[U];if(C.length>1){C[0]=C[0].slice(0,-1);for(var H=C.length-1,K=1;K<H;++K)C[K]=C[K].slice(1,-1);return C[H]=C[H].slice(1),C.join("")}else return C[0]}function s(D){return"(?:"+D+")"}function l(D){return D===void 0?"undefined":D===null?"null":Object.prototype.toString.call(D).split(" ").pop().split("]").shift().toLowerCase()}function a(D){return D.toUpperCase()}function u(D){return D!=null?D instanceof Array?D:typeof D.length!="number"||D.split||D.setInterval||D.call?[D]:Array.prototype.slice.call(D):[]}function i(D,C){var U=D;if(C)for(var H in C)U[H]=C[H];return U}function h(D){var C="[A-Za-z]",U="[0-9]",H=n(U,"[A-Fa-f]"),K=s(s("%[EFef]"+H+"%"+H+H+"%"+H+H)+"|"+s("%[89A-Fa-f]"+H+"%"+H+H)+"|"+s("%"+H+H)),de="[\\:\\/\\?\\#\\[\\]\\@]",ge="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",je=n(de,ge),Ke=D?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ze=D?"[\\uE000-\\uF8FF]":"[]",ke=n(C,U,"[\\-\\.\\_\\~]",Ke);s(C+n(C,U,"[\\+\\-\\.]")+"*"),s(s(K+"|"+n(ke,ge,"[\\:]"))+"*");var He=s(s("25[0-5]")+"|"+s("2[0-4]"+U)+"|"+s("1"+U+U)+"|"+s("0?[1-9]"+U)+"|0?0?"+U),tt=s(He+"\\."+He+"\\."+He+"\\."+He),be=s(H+"{1,4}"),Le=s(s(be+"\\:"+be)+"|"+tt),rt=s(s(be+"\\:")+"{6}"+Le),Ge=s("\\:\\:"+s(be+"\\:")+"{5}"+Le),At=s(s(be)+"?\\:\\:"+s(be+"\\:")+"{4}"+Le),Et=s(s(s(be+"\\:")+"{0,1}"+be)+"?\\:\\:"+s(be+"\\:")+"{3}"+Le),St=s(s(s(be+"\\:")+"{0,2}"+be)+"?\\:\\:"+s(be+"\\:")+"{2}"+Le),Nt=s(s(s(be+"\\:")+"{0,3}"+be)+"?\\:\\:"+be+"\\:"+Le),Vt=s(s(s(be+"\\:")+"{0,4}"+be)+"?\\:\\:"+Le),Z=s(s(s(be+"\\:")+"{0,5}"+be)+"?\\:\\:"+be),le=s(s(s(be+"\\:")+"{0,6}"+be)+"?\\:\\:"),Se=s([rt,Ge,At,Et,St,Nt,Vt,Z,le].join("|")),Me=s(s(ke+"|"+K)+"+");s("[vV]"+H+"+\\."+n(ke,ge,"[\\:]")+"+"),s(s(K+"|"+n(ke,ge))+"*");var Qe=s(K+"|"+n(ke,ge,"[\\:\\@]"));return s(s(K+"|"+n(ke,ge,"[\\@]"))+"+"),s(s(Qe+"|"+n("[\\/\\?]",Ze))+"*"),{NOT_SCHEME:new RegExp(n("[^]",C,U,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",ke,ge),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",ke,ge),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",ke,ge),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",ke,ge),"g"),NOT_QUERY:new RegExp(n("[^\\%]",ke,ge,"[\\:\\@\\/\\?]",Ze),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",ke,ge,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",ke,ge),"g"),UNRESERVED:new RegExp(ke,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",ke,je),"g"),PCT_ENCODED:new RegExp(K,"g"),IPV4ADDRESS:new RegExp("^("+tt+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Se+")"+s(s("\\%25|\\%(?!"+H+"{2})")+"("+Me+")")+"?\\]?$")}}var c=h(!1),d=h(!0),w=function(){function D(C,U){var H=[],K=!0,de=!1,ge=void 0;try{for(var je=C[Symbol.iterator](),Ke;!(K=(Ke=je.next()).done)&&(H.push(Ke.value),!(U&&H.length===U));K=!0);}catch(Ze){de=!0,ge=Ze}finally{try{!K&&je.return&&je.return()}finally{if(de)throw ge}}return H}return function(C,U){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return D(C,U);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=function(D){if(Array.isArray(D)){for(var C=0,U=Array(D.length);C<D.length;C++)U[C]=D[C];return U}else return Array.from(D)},b=2147483647,E=36,m=1,o=26,_=38,p=700,v=72,$=128,y="-",f=/^xn--/,S=/[^\0-\x7E]/,O=/[\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"},F=E-m,V=Math.floor,X=String.fromCharCode;function G(D){throw new RangeError(j[D])}function ee(D,C){for(var U=[],H=D.length;H--;)U[H]=C(D[H]);return U}function fe(D,C){var U=D.split("@"),H="";U.length>1&&(H=U[0]+"@",D=U[1]),D=D.replace(O,".");var K=D.split("."),de=ee(K,C).join(".");return H+de}function we(D){for(var C=[],U=0,H=D.length;U<H;){var K=D.charCodeAt(U++);if(K>=55296&&K<=56319&&U<H){var de=D.charCodeAt(U++);(de&64512)==56320?C.push(((K&1023)<<10)+(de&1023)+65536):(C.push(K),U--)}else C.push(K)}return C}var Oe=function(C){return String.fromCodePoint.apply(String,P(C))},se=function(C){return C-48<10?C-22:C-65<26?C-65:C-97<26?C-97:E},x=function(C,U){return C+22+75*(C<26)-((U!=0)<<5)},T=function(C,U,H){var K=0;for(C=H?V(C/p):C>>1,C+=V(C/U);C>F*o>>1;K+=E)C=V(C/F);return V(K+(F+1)*C/(C+_))},M=function(C){var U=[],H=C.length,K=0,de=$,ge=v,je=C.lastIndexOf(y);je<0&&(je=0);for(var Ke=0;Ke<je;++Ke)C.charCodeAt(Ke)>=128&&G("not-basic"),U.push(C.charCodeAt(Ke));for(var Ze=je>0?je+1:0;Ze<H;){for(var ke=K,He=1,tt=E;;tt+=E){Ze>=H&&G("invalid-input");var be=se(C.charCodeAt(Ze++));(be>=E||be>V((b-K)/He))&&G("overflow"),K+=be*He;var Le=tt<=ge?m:tt>=ge+o?o:tt-ge;if(be<Le)break;var rt=E-Le;He>V(b/rt)&&G("overflow"),He*=rt}var Ge=U.length+1;ge=T(K-ke,Ge,ke==0),V(K/Ge)>b-de&&G("overflow"),de+=V(K/Ge),K%=Ge,U.splice(K++,0,de)}return String.fromCodePoint.apply(String,U)},R=function(C){var U=[];C=we(C);var H=C.length,K=$,de=0,ge=v,je=!0,Ke=!1,Ze=void 0;try{for(var ke=C[Symbol.iterator](),He;!(je=(He=ke.next()).done);je=!0){var tt=He.value;tt<128&&U.push(X(tt))}}catch(Gt){Ke=!0,Ze=Gt}finally{try{!je&&ke.return&&ke.return()}finally{if(Ke)throw Ze}}var be=U.length,Le=be;for(be&&U.push(y);Le<H;){var rt=b,Ge=!0,At=!1,Et=void 0;try{for(var St=C[Symbol.iterator](),Nt;!(Ge=(Nt=St.next()).done);Ge=!0){var Vt=Nt.value;Vt>=K&&Vt<rt&&(rt=Vt)}}catch(Gt){At=!0,Et=Gt}finally{try{!Ge&&St.return&&St.return()}finally{if(At)throw Et}}var Z=Le+1;rt-K>V((b-de)/Z)&&G("overflow"),de+=(rt-K)*Z,K=rt;var le=!0,Se=!1,Me=void 0;try{for(var Qe=C[Symbol.iterator](),yt;!(le=(yt=Qe.next()).done);le=!0){var Tt=yt.value;if(Tt<K&&++de>b&&G("overflow"),Tt==K){for(var Ut=de,lt=E;;lt+=E){var mt=lt<=ge?m:lt>=ge+o?o:lt-ge;if(Ut<mt)break;var cr=Ut-mt,lr=E-mt;U.push(X(x(mt+cr%lr,0))),Ut=V(cr/lr)}U.push(X(x(Ut,0))),ge=T(de,Z,Le==be),de=0,++Le}}}catch(Gt){Se=!0,Me=Gt}finally{try{!le&&Qe.return&&Qe.return()}finally{if(Se)throw Me}}++de,++K}return U.join("")},g=function(C){return fe(C,function(U){return f.test(U)?M(U.slice(4).toLowerCase()):U})},k=function(C){return fe(C,function(U){return S.test(U)?"xn--"+R(U):U})},A={version:"2.1.0",ucs2:{decode:we,encode:Oe},decode:M,encode:R,toASCII:k,toUnicode:g},W={};function Q(D){var C=D.charCodeAt(0),U=void 0;return C<16?U="%0"+C.toString(16).toUpperCase():C<128?U="%"+C.toString(16).toUpperCase():C<2048?U="%"+(C>>6|192).toString(16).toUpperCase()+"%"+(C&63|128).toString(16).toUpperCase():U="%"+(C>>12|224).toString(16).toUpperCase()+"%"+(C>>6&63|128).toString(16).toUpperCase()+"%"+(C&63|128).toString(16).toUpperCase(),U}function ie(D){for(var C="",U=0,H=D.length;U<H;){var K=parseInt(D.substr(U+1,2),16);if(K<128)C+=String.fromCharCode(K),U+=3;else if(K>=194&&K<224){if(H-U>=6){var de=parseInt(D.substr(U+4,2),16);C+=String.fromCharCode((K&31)<<6|de&63)}else C+=D.substr(U,6);U+=6}else if(K>=224){if(H-U>=9){var ge=parseInt(D.substr(U+4,2),16),je=parseInt(D.substr(U+7,2),16);C+=String.fromCharCode((K&15)<<12|(ge&63)<<6|je&63)}else C+=D.substr(U,9);U+=9}else C+=D.substr(U,3),U+=3}return C}function re(D,C){function U(H){var K=ie(H);return K.match(C.UNRESERVED)?K:H}return D.scheme&&(D.scheme=String(D.scheme).replace(C.PCT_ENCODED,U).toLowerCase().replace(C.NOT_SCHEME,"")),D.userinfo!==void 0&&(D.userinfo=String(D.userinfo).replace(C.PCT_ENCODED,U).replace(C.NOT_USERINFO,Q).replace(C.PCT_ENCODED,a)),D.host!==void 0&&(D.host=String(D.host).replace(C.PCT_ENCODED,U).toLowerCase().replace(C.NOT_HOST,Q).replace(C.PCT_ENCODED,a)),D.path!==void 0&&(D.path=String(D.path).replace(C.PCT_ENCODED,U).replace(D.scheme?C.NOT_PATH:C.NOT_PATH_NOSCHEME,Q).replace(C.PCT_ENCODED,a)),D.query!==void 0&&(D.query=String(D.query).replace(C.PCT_ENCODED,U).replace(C.NOT_QUERY,Q).replace(C.PCT_ENCODED,a)),D.fragment!==void 0&&(D.fragment=String(D.fragment).replace(C.PCT_ENCODED,U).replace(C.NOT_FRAGMENT,Q).replace(C.PCT_ENCODED,a)),D}function ve(D){return D.replace(/^0*(.*)/,"$1")||"0"}function N(D,C){var U=D.match(C.IPV4ADDRESS)||[],H=w(U,2),K=H[1];return K?K.split(".").map(ve).join("."):D}function I(D,C){var U=D.match(C.IPV6ADDRESS)||[],H=w(U,3),K=H[1],de=H[2];if(K){for(var ge=K.toLowerCase().split("::").reverse(),je=w(ge,2),Ke=je[0],Ze=je[1],ke=Ze?Ze.split(":").map(ve):[],He=Ke.split(":").map(ve),tt=C.IPV4ADDRESS.test(He[He.length-1]),be=tt?7:8,Le=He.length-be,rt=Array(be),Ge=0;Ge<be;++Ge)rt[Ge]=ke[Ge]||He[Le+Ge]||"";tt&&(rt[be-1]=N(rt[be-1],C));var At=rt.reduce(function(Z,le,Se){if(!le||le==="0"){var Me=Z[Z.length-1];Me&&Me.index+Me.length===Se?Me.length++:Z.push({index:Se,length:1})}return Z},[]),Et=At.sort(function(Z,le){return le.length-Z.length})[0],St=void 0;if(Et&&Et.length>1){var Nt=rt.slice(0,Et.index),Vt=rt.slice(Et.index+Et.length);St=Nt.join(":")+"::"+Vt.join(":")}else St=rt.join(":");return de&&(St+="%"+de),St}else return D}var L=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,z="".match(/(){0}/)[1]===void 0;function J(D){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U={},H=C.iri!==!1?d:c;C.reference==="suffix"&&(D=(C.scheme?C.scheme+":":"")+"//"+D);var K=D.match(L);if(K){z?(U.scheme=K[1],U.userinfo=K[3],U.host=K[4],U.port=parseInt(K[5],10),U.path=K[6]||"",U.query=K[7],U.fragment=K[8],isNaN(U.port)&&(U.port=K[5])):(U.scheme=K[1]||void 0,U.userinfo=D.indexOf("@")!==-1?K[3]:void 0,U.host=D.indexOf("//")!==-1?K[4]:void 0,U.port=parseInt(K[5],10),U.path=K[6]||"",U.query=D.indexOf("?")!==-1?K[7]:void 0,U.fragment=D.indexOf("#")!==-1?K[8]:void 0,isNaN(U.port)&&(U.port=D.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?K[4]:void 0)),U.host&&(U.host=I(N(U.host,H),H)),U.scheme===void 0&&U.userinfo===void 0&&U.host===void 0&&U.port===void 0&&!U.path&&U.query===void 0?U.reference="same-document":U.scheme===void 0?U.reference="relative":U.fragment===void 0?U.reference="absolute":U.reference="uri",C.reference&&C.reference!=="suffix"&&C.reference!==U.reference&&(U.error=U.error||"URI is not a "+C.reference+" reference.");var de=W[(C.scheme||U.scheme||"").toLowerCase()];if(!C.unicodeSupport&&(!de||!de.unicodeSupport)){if(U.host&&(C.domainHost||de&&de.domainHost))try{U.host=A.toASCII(U.host.replace(H.PCT_ENCODED,ie).toLowerCase())}catch(ge){U.error=U.error||"Host's domain name can not be converted to ASCII via punycode: "+ge}re(U,c)}else re(U,H);de&&de.parse&&de.parse(U,C)}else U.error=U.error||"URI can not be parsed.";return U}function te(D,C){var U=C.iri!==!1?d:c,H=[];return D.userinfo!==void 0&&(H.push(D.userinfo),H.push("@")),D.host!==void 0&&H.push(I(N(String(D.host),U),U).replace(U.IPV6ADDRESS,function(K,de,ge){return"["+de+(ge?"%25"+ge:"")+"]"})),(typeof D.port=="number"||typeof D.port=="string")&&(H.push(":"),H.push(String(D.port))),H.length?H.join(""):void 0}var Ee=/^\.\.?\//,Fe=/^\/\.(\/|$)/,Re=/^\/\.\.(\/|$)/,Ae=/^\/?(?:.|\n)*?(?=\/|$)/;function _e(D){for(var C=[];D.length;)if(D.match(Ee))D=D.replace(Ee,"");else if(D.match(Fe))D=D.replace(Fe,"/");else if(D.match(Re))D=D.replace(Re,"/"),C.pop();else if(D==="."||D==="..")D="";else{var U=D.match(Ae);if(U){var H=U[0];D=D.slice(H.length),C.push(H)}else throw new Error("Unexpected dot segment condition")}return C.join("")}function xe(D){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=C.iri?d:c,H=[],K=W[(C.scheme||D.scheme||"").toLowerCase()];if(K&&K.serialize&&K.serialize(D,C),D.host&&!U.IPV6ADDRESS.test(D.host)){if(C.domainHost||K&&K.domainHost)try{D.host=C.iri?A.toUnicode(D.host):A.toASCII(D.host.replace(U.PCT_ENCODED,ie).toLowerCase())}catch(je){D.error=D.error||"Host's domain name can not be converted to "+(C.iri?"Unicode":"ASCII")+" via punycode: "+je}}re(D,U),C.reference!=="suffix"&&D.scheme&&(H.push(D.scheme),H.push(":"));var de=te(D,C);if(de!==void 0&&(C.reference!=="suffix"&&H.push("//"),H.push(de),D.path&&D.path.charAt(0)!=="/"&&H.push("/")),D.path!==void 0){var ge=D.path;!C.absolutePath&&(!K||!K.absolutePath)&&(ge=_e(ge)),de===void 0&&(ge=ge.replace(/^\/\//,"/%2F")),H.push(ge)}return D.query!==void 0&&(H.push("?"),H.push(D.query)),D.fragment!==void 0&&(H.push("#"),H.push(D.fragment)),H.join("")}function Ie(D,C){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},H=arguments[3],K={};return H||(D=J(xe(D,U),U),C=J(xe(C,U),U)),U=U||{},!U.tolerant&&C.scheme?(K.scheme=C.scheme,K.userinfo=C.userinfo,K.host=C.host,K.port=C.port,K.path=_e(C.path||""),K.query=C.query):(C.userinfo!==void 0||C.host!==void 0||C.port!==void 0?(K.userinfo=C.userinfo,K.host=C.host,K.port=C.port,K.path=_e(C.path||""),K.query=C.query):(C.path?(C.path.charAt(0)==="/"?K.path=_e(C.path):((D.userinfo!==void 0||D.host!==void 0||D.port!==void 0)&&!D.path?K.path="/"+C.path:D.path?K.path=D.path.slice(0,D.path.lastIndexOf("/")+1)+C.path:K.path=C.path,K.path=_e(K.path)),K.query=C.query):(K.path=D.path,C.query!==void 0?K.query=C.query:K.query=D.query),K.userinfo=D.userinfo,K.host=D.host,K.port=D.port),K.scheme=D.scheme),K.fragment=C.fragment,K}function vt(D,C,U){var H=i({scheme:"null"},U);return xe(Ie(J(D,H),J(C,H),H,!0),H)}function Xe(D,C){return typeof D=="string"?D=xe(J(D,C),C):l(D)==="object"&&(D=J(xe(D,C),C)),D}function ht(D,C,U){return typeof D=="string"?D=xe(J(D,U),U):l(D)==="object"&&(D=xe(D,U)),typeof C=="string"?C=xe(J(C,U),U):l(C)==="object"&&(C=xe(C,U)),D===C}function $t(D,C){return D&&D.toString().replace(!C||!C.iri?c.ESCAPE:d.ESCAPE,Q)}function ct(D,C){return D&&D.toString().replace(!C||!C.iri?c.PCT_ENCODED:d.PCT_ENCODED,ie)}var wt={scheme:"http",domainHost:!0,parse:function(C,U){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C},serialize:function(C,U){var H=String(C.scheme).toLowerCase()==="https";return(C.port===(H?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}},_r={scheme:"https",domainHost:wt.domainHost,parse:wt.parse,serialize:wt.serialize};function wr(D){return typeof D.secure=="boolean"?D.secure:String(D.scheme).toLowerCase()==="wss"}var Yt={scheme:"ws",domainHost:!0,parse:function(C,U){var H=C;return H.secure=wr(H),H.resourceName=(H.path||"/")+(H.query?"?"+H.query:""),H.path=void 0,H.query=void 0,H},serialize:function(C,U){if((C.port===(wr(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){var H=C.resourceName.split("?"),K=w(H,2),de=K[0],ge=K[1];C.path=de&&de!=="/"?de:void 0,C.query=ge,C.resourceName=void 0}return C.fragment=void 0,C}},ir={scheme:"wss",domainHost:Yt.domainHost,parse:Yt.parse,serialize:Yt.serialize},nn={},$r="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",bt="[0-9A-Fa-f]",or=s(s("%[EFef]"+bt+"%"+bt+bt+"%"+bt+bt)+"|"+s("%[89A-Fa-f]"+bt+"%"+bt+bt)+"|"+s("%"+bt+bt)),br="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Er="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",sn=n(Er,'[\\"\\\\]'),Sr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Kt=new RegExp($r,"g"),q=new RegExp(or,"g"),Y=new RegExp(n("[^]",br,"[\\.]",'[\\"]',sn),"g"),ne=new RegExp(n("[^]",$r,Sr),"g"),$e=ne;function Je(D){var C=ie(D);return C.match(Kt)?C:D}var Ye={scheme:"mailto",parse:function(C,U){var H=C,K=H.to=H.path?H.path.split(","):[];if(H.path=void 0,H.query){for(var de=!1,ge={},je=H.query.split("&"),Ke=0,Ze=je.length;Ke<Ze;++Ke){var ke=je[Ke].split("=");switch(ke[0]){case"to":for(var He=ke[1].split(","),tt=0,be=He.length;tt<be;++tt)K.push(He[tt]);break;case"subject":H.subject=ct(ke[1],U);break;case"body":H.body=ct(ke[1],U);break;default:de=!0,ge[ct(ke[0],U)]=ct(ke[1],U);break}}de&&(H.headers=ge)}H.query=void 0;for(var Le=0,rt=K.length;Le<rt;++Le){var Ge=K[Le].split("@");if(Ge[0]=ct(Ge[0]),U.unicodeSupport)Ge[1]=ct(Ge[1],U).toLowerCase();else try{Ge[1]=A.toASCII(ct(Ge[1],U).toLowerCase())}catch(At){H.error=H.error||"Email address's domain name can not be converted to ASCII via punycode: "+At}K[Le]=Ge.join("@")}return H},serialize:function(C,U){var H=C,K=u(C.to);if(K){for(var de=0,ge=K.length;de<ge;++de){var je=String(K[de]),Ke=je.lastIndexOf("@"),Ze=je.slice(0,Ke).replace(q,Je).replace(q,a).replace(Y,Q),ke=je.slice(Ke+1);try{ke=U.iri?A.toUnicode(ke):A.toASCII(ct(ke,U).toLowerCase())}catch(Le){H.error=H.error||"Email address's domain name can not be converted to "+(U.iri?"Unicode":"ASCII")+" via punycode: "+Le}K[de]=Ze+"@"+ke}H.path=K.join(",")}var He=C.headers=C.headers||{};C.subject&&(He.subject=C.subject),C.body&&(He.body=C.body);var tt=[];for(var be in He)He[be]!==nn[be]&&tt.push(be.replace(q,Je).replace(q,a).replace(ne,Q)+"="+He[be].replace(q,Je).replace(q,a).replace($e,Q));return tt.length&&(H.query=tt.join("&")),H}},ue=/^([^\:]+)\:(.*)/,ce={scheme:"urn",parse:function(C,U){var H=C.path&&C.path.match(ue),K=C;if(H){var de=U.scheme||K.scheme||"urn",ge=H[1].toLowerCase(),je=H[2],Ke=de+":"+(U.nid||ge),Ze=W[Ke];K.nid=ge,K.nss=je,K.path=void 0,Ze&&(K=Ze.parse(K,U))}else K.error=K.error||"URN can not be parsed.";return K},serialize:function(C,U){var H=U.scheme||C.scheme||"urn",K=C.nid,de=H+":"+(U.nid||K),ge=W[de];ge&&(C=ge.serialize(C,U));var je=C,Ke=C.nss;return je.path=(K||U.nid)+":"+Ke,je}},ye=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,it={scheme:"urn:uuid",parse:function(C,U){var H=C;return H.uuid=H.nss,H.nss=void 0,!U.tolerant&&(!H.uuid||!H.uuid.match(ye))&&(H.error=H.error||"UUID is not valid."),H},serialize:function(C,U){var H=C;return H.nss=(C.uuid||"").toLowerCase(),H}};W[wt.scheme]=wt,W[_r.scheme]=_r,W[Yt.scheme]=Yt,W[ir.scheme]=ir,W[Ye.scheme]=Ye,W[ce.scheme]=ce,W[it.scheme]=it,r.SCHEMES=W,r.pctEncChar=Q,r.pctDecChars=ie,r.parse=J,r.removeDotSegments=_e,r.serialize=xe,r.resolveComponents=Ie,r.resolve=vt,r.normalize=Xe,r.equal=ht,r.escapeComponent=$t,r.unescapeComponent=ct,Object.defineProperty(r,"__esModule",{value:!0})})}),cc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Bn();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),lc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=Zr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Te();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=Fn(),s=zn(),l=Zs(),a=xn(),u=Te(),i=Yr(),h=xr(),c=ze(),d=oc(),w=cc(),P=(x,T)=>new RegExp(x,T);P.code="new RegExp";var b=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},o={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function p(x){var T,M,R,g,k,A,W,Q,ie,re,ve,N,I,L,z,J,te,Ee,Fe,Re,Ae,_e,xe,Ie,vt;const Xe=x.strict,ht=(T=x.code)===null||T===void 0?void 0:T.optimize,$t=ht===!0||ht===void 0?1:ht||0,ct=(R=(M=x.code)===null||M===void 0?void 0:M.regExp)!==null&&R!==void 0?R:P,wt=(g=x.uriResolver)!==null&&g!==void 0?g:w.default;return{strictSchema:(A=(k=x.strictSchema)!==null&&k!==void 0?k:Xe)!==null&&A!==void 0?A:!0,strictNumbers:(Q=(W=x.strictNumbers)!==null&&W!==void 0?W:Xe)!==null&&Q!==void 0?Q:!0,strictTypes:(re=(ie=x.strictTypes)!==null&&ie!==void 0?ie:Xe)!==null&&re!==void 0?re:"log",strictTuples:(N=(ve=x.strictTuples)!==null&&ve!==void 0?ve:Xe)!==null&&N!==void 0?N:"log",strictRequired:(L=(I=x.strictRequired)!==null&&I!==void 0?I:Xe)!==null&&L!==void 0?L:!1,code:x.code?{...x.code,optimize:$t,regExp:ct}:{optimize:$t,regExp:ct},loopRequired:(z=x.loopRequired)!==null&&z!==void 0?z:_,loopEnum:(J=x.loopEnum)!==null&&J!==void 0?J:_,meta:(te=x.meta)!==null&&te!==void 0?te:!0,messages:(Ee=x.messages)!==null&&Ee!==void 0?Ee:!0,inlineRefs:(Fe=x.inlineRefs)!==null&&Fe!==void 0?Fe:!0,schemaId:(Re=x.schemaId)!==null&&Re!==void 0?Re:"$id",addUsedSchema:(Ae=x.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(_e=x.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=x.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ie=x.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(vt=x.int32range)!==null&&vt!==void 0?vt:!0,uriResolver:wt}}class v{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...p(T)};const{es5:M,lines:R}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:E,es5:M,lines:R}),this.logger=V(T.logger);const g=T.validateFormats;T.validateFormats=!1,this.RULES=(0,l.getRules)(),$.call(this,m,T,"NOT SUPPORTED"),$.call(this,o,T,"DEPRECATED","warn"),this._metaOpts=j.call(this),T.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),f.call(this),T.validateFormats=g}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:M,schemaId:R}=this.opts;let g=d;R==="id"&&(g={...d},g.id=g.$id,delete g.$id),M&&T&&this.addMetaSchema(g,g[R],!1)}defaultMeta(){const{meta:T,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[M]||T:void 0}validate(T,M){let R;if(typeof T=="string"){if(R=this.getSchema(T),!R)throw new Error(`no schema with key or ref "${T}"`)}else R=this.compile(T);const g=R(M);return"$async"in R||(this.errors=R.errors),g}compile(T,M){const R=this._addSchema(T,M);return R.validate||this._compileSchemaEnv(R)}compileAsync(T,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return g.call(this,T,M);async function g(re,ve){await k.call(this,re.$schema);const N=this._addSchema(re,ve);return N.validate||A.call(this,N)}async function k(re){re&&!this.getSchema(re)&&await g.call(this,{$ref:re},!0)}async function A(re){try{return this._compileSchemaEnv(re)}catch(ve){if(!(ve instanceof s.default))throw ve;return W.call(this,ve),await Q.call(this,ve.missingSchema),A.call(this,re)}}function W({missingSchema:re,missingRef:ve}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${ve} cannot be resolved`)}async function Q(re){const ve=await ie.call(this,re);this.refs[re]||await k.call(this,ve.$schema),this.refs[re]||this.addSchema(ve,re,M)}async function ie(re){const ve=this._loading[re];if(ve)return ve;try{return await(this._loading[re]=R(re))}finally{delete this._loading[re]}}}addSchema(T,M,R,g=this.opts.validateSchema){if(Array.isArray(T)){for(const A of T)this.addSchema(A,void 0,R,g);return this}let k;if(typeof T=="object"){const{schemaId:A}=this.opts;if(k=T[A],k!==void 0&&typeof k!="string")throw new Error(`schema ${A} must be string`)}return M=(0,i.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(T,R,M,g,!0),this}addMetaSchema(T,M,R=this.opts.validateSchema){return this.addSchema(T,M,!0,R),this}validateSchema(T,M){if(typeof T=="boolean")return!0;let R;if(R=T.$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 g=this.validate(R,T);if(!g&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return g}getSchema(T){let M;for(;typeof(M=y.call(this,T))=="string";)T=M;if(M===void 0){const{schemaId:R}=this.opts,g=new a.SchemaEnv({schema:{},schemaId:R});if(M=a.resolveSchema.call(this,g,T),!M)return;this.refs[T]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=y.call(this,T);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const M=T;this._cache.delete(M);let R=T[this.opts.schemaId];return R&&(R=(0,i.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const M of T)this.addKeyword(M);return this}addKeyword(T,M){let R;if(typeof T=="string")R=T,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=R);else if(typeof T=="object"&&M===void 0){if(M=T,R=M.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(G.call(this,R,M),!M)return(0,c.eachItem)(R,k=>ee.call(this,k)),this;we.call(this,M);const g={...M,type:(0,h.getJSONTypes)(M.type),schemaType:(0,h.getJSONTypes)(M.schemaType)};return(0,c.eachItem)(R,g.type.length===0?k=>ee.call(this,k,g):k=>g.type.forEach(A=>ee.call(this,k,g,A))),this}getKeyword(T){const M=this.RULES.all[T];return typeof M=="object"?M.definition:!!M}removeKeyword(T){const{RULES:M}=this;delete M.keywords[T],delete M.all[T];for(const R of M.rules){const g=R.rules.findIndex(k=>k.keyword===T);g>=0&&R.rules.splice(g,1)}return this}addFormat(T,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[T]=M,this}errorsText(T=this.errors,{separator:M=", ",dataVar:R="data"}={}){return!T||T.length===0?"No errors":T.map(g=>`${R}${g.instancePath} ${g.message}`).reduce((g,k)=>g+M+k)}$dataMetaSchema(T,M){const R=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const g of M){const k=g.split("/").slice(1);let A=T;for(const W of k)A=A[W];for(const W in R){const Q=R[W];if(typeof Q!="object")continue;const{$data:ie}=Q.definition,re=A[W];ie&&re&&(A[W]=se(re))}}return T}_removeAllSchemas(T,M){for(const R in T){const g=T[R];(!M||M.test(R))&&(typeof g=="string"?delete T[R]:g&&!g.meta&&(this._cache.delete(g.schema),delete T[R]))}}_addSchema(T,M,R,g=this.opts.validateSchema,k=this.opts.addUsedSchema){let A;const{schemaId:W}=this.opts;if(typeof T=="object")A=T[W];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let Q=this._cache.get(T);if(Q!==void 0)return Q;R=(0,i.normalizeId)(A||R);const ie=i.getSchemaRefs.call(this,T,R);return Q=new a.SchemaEnv({schema:T,schemaId:W,meta:M,baseId:R,localRefs:ie}),this._cache.set(Q.schema,Q),k&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=Q),g&&this.validateSchema(T,!0),Q}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):a.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,T)}finally{this.opts=M}}}t.default=v,v.ValidationError=n.default,v.MissingRefError=s.default;function $(x,T,M,R="error"){for(const g in x){const k=g;k in T&&this.logger[R](`${M}: option ${g}. ${x[k]}`)}}function y(x){return x=(0,i.normalizeId)(x),this.schemas[x]||this.refs[x]}function f(){const x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(const T in x)this.addSchema(x[T],T)}function S(){for(const x in this.opts.formats){const T=this.opts.formats[x];T&&this.addFormat(x,T)}}function O(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in x){const M=x[T];M.keyword||(M.keyword=T),this.addKeyword(M)}}function j(){const x={...this.opts};for(const T of b)delete x[T];return x}var F={log(){},warn(){},error(){}};function V(x){if(x===!1)return F;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function G(x,T){const{RULES:M}=this;if((0,c.eachItem)(x,R=>{if(M.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!X.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function ee(x,T,M){var R;const g=T==null?void 0:T.post;if(M&&g)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let A=g?k.post:k.rules.find(({type:Q})=>Q===M);if(A||(A={type:M,rules:[]},k.rules.push(A)),k.keywords[x]=!0,!T)return;const W={keyword:x,definition:{...T,type:(0,h.getJSONTypes)(T.type),schemaType:(0,h.getJSONTypes)(T.schemaType)}};T.before?fe.call(this,A,W,T.before):A.rules.push(W),k.all[x]=W,(R=T.implements)===null||R===void 0||R.forEach(Q=>this.addKeyword(Q))}function fe(x,T,M){const R=x.rules.findIndex(g=>g.keyword===M);R>=0?x.rules.splice(R,0,T):(x.rules.push(T),this.logger.warn(`rule ${M} is not defined`))}function we(x){let{metaSchema:T}=x;T!==void 0&&(x.$data&&this.opts.$data&&(T=se(T)),x.validateSchema=this.compile(T,!0))}var Oe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(x){return{anyOf:[x,Oe]}}}),uc=B(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}),fc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=zn(),r=Ct(),n=Te(),s=Xt(),l=xn(),a=ze(),u={keyword:"$ref",schemaType:"string",code(c){const{gen:d,schema:w,it:P}=c,{baseId:b,schemaEnv:E,validateName:m,opts:o,self:_}=P,{root:p}=E;if((w==="#"||w==="#/")&&b===p.baseId)return $();const v=l.resolveRef.call(_,p,b,w);if(v===void 0)throw new e.default(P.opts.uriResolver,b,w);if(v instanceof l.SchemaEnv)return y(v);return f(v);function $(){if(E===p)return h(c,m,E,E.$async);const S=d.scopeValue("root",{ref:p});return h(c,(0,n._)`${S}.validate`,p,p.$async)}function y(S){const O=i(c,S);h(c,O,S,S.$async)}function f(S){const O=d.scopeValue("schema",o.code.source===!0?{ref:S,code:(0,n.stringify)(S)}:{ref:S}),j=d.name("valid"),F=c.subschema({schema:S,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},j);c.mergeEvaluated(F),c.ok(j)}}};function i(c,d){const{gen:w}=c;return d.validate?w.scopeValue("validate",{ref:d.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=i;function h(c,d,w,P){const{gen:b,it:E}=c,{allErrors:m,schemaEnv:o,opts:_}=E,p=_.passContext?s.default.this:n.nil;P?v():$();function v(){if(!o.$async)throw new Error("async schema referenced by sync schema");const S=b.let("valid");b.try(()=>{b.code((0,n._)`await ${(0,r.callValidateCode)(c,d,p)}`),f(d),m||b.assign(S,!0)},O=>{b.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>b.throw(O)),y(O),m||b.assign(S,!1)}),c.ok(S)}function $(){c.result((0,r.callValidateCode)(c,d,p),()=>f(d),()=>y(d))}function y(S){const O=(0,n._)`${S}.errors`;b.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),b.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function f(S){var O;if(!E.opts.unevaluated)return;const j=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(j&&!j.dynamicProps)j.props!==void 0&&(E.props=a.mergeEvaluated.props(b,j.props,E.props));else{const F=b.var("props",(0,n._)`${S}.evaluated.props`);E.props=a.mergeEvaluated.props(b,F,E.props,n.Name)}if(E.items!==!0)if(j&&!j.dynamicItems)j.items!==void 0&&(E.items=a.mergeEvaluated.items(b,j.items,E.items));else{const F=b.var("items",(0,n._)`${S}.evaluated.items`);E.items=a.mergeEvaluated.items(b,F,E.items,n.Name)}}}t.callRef=h,t.default=u}),dc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=uc(),r=fc(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),hc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),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}},s={message:({keyword:a,schemaCode:u})=>(0,e.str)`must be ${n[a].okStr} ${u}`,params:({keyword:a,schemaCode:u})=>(0,e._)`{comparison: ${n[a].okStr}, limit: ${u}}`},l={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(a){const{keyword:u,data:i,schemaCode:h}=a;a.fail$data((0,e._)`${i} ${n[u].fail} ${h} || isNaN(${i})`)}};t.default=l}),pc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r={message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(s){const{gen:l,data:a,schemaCode:u,it:i}=s,h=i.opts.multipleOfPrecision,c=l.let("res"),d=h?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${h}`:(0,e._)`${c} !== parseInt(${c})`;s.fail$data((0,e._)`(${u} === 0 || (${c} = ${a}/${u}, ${d}))`)}};t.default=n}),mc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,l=0,a;for(;l<n;)s++,a=r.charCodeAt(l++),a>=55296&&a<=56319&&l<n&&(a=r.charCodeAt(l),(a&64512)===56320&&l++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),gc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=ze(),n=mc(),s={message({keyword:a,schemaCode:u}){const i=a==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${u} characters`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(a){const{keyword:u,data:i,schemaCode:h,it:c}=a,d=u==="maxLength"?e.operators.GT:e.operators.LT,w=c.opts.unicode===!1?(0,e._)`${i}.length`:(0,e._)`${(0,r.useFunc)(a.gen,n.default)}(${i})`;a.fail$data((0,e._)`${w} ${d} ${h}`)}};t.default=l}),vc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Te(),n={message:({schemaCode:l})=>(0,r.str)`must match pattern "${l}"`,params:({schemaCode:l})=>(0,r._)`{pattern: ${l}}`},s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:n,code(l){const{data:a,$data:u,schema:i,schemaCode:h,it:c}=l,d=c.opts.unicodeRegExp?"u":"",w=u?(0,r._)`(new RegExp(${h}, ${d}))`:(0,e.usePattern)(l,i);l.fail$data((0,r._)`!${w}.test(${a})`)}};t.default=s}),yc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r={message({keyword:s,schemaCode:l}){const a=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${l} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:a,schemaCode:u}=s,i=l==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${a}).length ${i} ${u}`)}};t.default=n}),_c=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Te(),n=ze(),s={message:({params:{missingProperty:a}})=>(0,r.str)`must have required property '${a}'`,params:({params:{missingProperty:a}})=>(0,r._)`{missingProperty: ${a}}`},l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(a){const{gen:u,schema:i,schemaCode:h,data:c,$data:d,it:w}=a,{opts:P}=w;if(!d&&i.length===0)return;const b=i.length>=P.loopRequired;if(w.allErrors?E():m(),P.strictRequired){const p=a.parentSchema.properties,{definedProperties:v}=a.it;for(const $ of i)if((p==null?void 0:p[$])===void 0&&!v.has($)){const y=w.schemaEnv.baseId+w.errSchemaPath,f=`required property "${$}" is not defined at "${y}" (strictRequired)`;(0,n.checkStrictMode)(w,f,w.opts.strictRequired)}}function E(){if(b||d)a.block$data(r.nil,o);else for(const p of i)(0,e.checkReportMissingProp)(a,p)}function m(){const p=u.let("missing");if(b||d){const v=u.let("valid",!0);a.block$data(v,()=>_(p,v)),a.ok(v)}else u.if((0,e.checkMissingProp)(a,i,p)),(0,e.reportMissingProp)(a,p),u.else()}function o(){u.forOf("prop",h,p=>{a.setParams({missingProperty:p}),u.if((0,e.noPropertyInData)(u,c,p,P.ownProperties),()=>a.error())})}function _(p,v){a.setParams({missingProperty:p}),u.forOf(p,h,()=>{u.assign(v,(0,e.propertyInData)(u,c,p,P.ownProperties)),u.if((0,r.not)(v),()=>{a.error(),u.break()})},r.nil)}}};t.default=l}),wc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r={message({keyword:s,schemaCode:l}){const a=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${l} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:a,schemaCode:u}=s,i=l==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${a}.length ${i} ${u}`)}};t.default=n}),Hn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Gr();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),$c=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=xr(),r=Te(),n=ze(),s=Hn(),l={message:({params:{i:u,j:i}})=>(0,r.str)`must NOT have duplicate items (items ## ${i} and ${u} are identical)`,params:({params:{i:u,j:i}})=>(0,r._)`{i: ${u}, j: ${i}}`},a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:l,code(u){const{gen:i,data:h,$data:c,schema:d,parentSchema:w,schemaCode:P,it:b}=u;if(!c&&!d)return;const E=i.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];u.block$data(E,o,(0,r._)`${P} === false`),u.ok(E);function o(){const $=i.let("i",(0,r._)`${h}.length`),y=i.let("j");u.setParams({i:$,j:y}),i.assign(E,!0),i.if((0,r._)`${$} > 1`,()=>(_()?p:v)($,y))}function _(){return m.length>0&&!m.some($=>$==="object"||$==="array")}function p($,y){const f=i.name("item"),S=(0,e.checkDataTypes)(m,f,b.opts.strictNumbers,e.DataType.Wrong),O=i.const("indices",(0,r._)`{}`);i.for((0,r._)`;${$}--;`,()=>{i.let(f,(0,r._)`${h}[${$}]`),i.if(S,(0,r._)`continue`),m.length>1&&i.if((0,r._)`typeof ${f} == "string"`,(0,r._)`${f} += "_"`),i.if((0,r._)`typeof ${O}[${f}] == "number"`,()=>{i.assign(y,(0,r._)`${O}[${f}]`),u.error(),i.assign(E,!1).break()}).code((0,r._)`${O}[${f}] = ${$}`)})}function v($,y){const f=(0,n.useFunc)(i,s.default),S=i.name("outer");i.label(S).for((0,r._)`;${$}--;`,()=>i.for((0,r._)`${y} = ${$}; ${y}--;`,()=>i.if((0,r._)`${f}(${h}[${$}], ${h}[${y}])`,()=>{u.error(),i.assign(E,!1).break(S)})))}}};t.default=a}),bc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=ze(),n=Hn(),s={message:"must be equal to constant",params:({schemaCode:a})=>(0,e._)`{allowedValue: ${a}}`},l={keyword:"const",$data:!0,error:s,code(a){const{gen:u,data:i,$data:h,schemaCode:c,schema:d}=a;h||d&&typeof d=="object"?a.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${i}, ${c})`):a.fail((0,e._)`${d} !== ${i}`)}};t.default=l}),Ec=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=ze(),n=Hn(),s={message:"must be equal to one of the allowed values",params:({schemaCode:a})=>(0,e._)`{allowedValues: ${a}}`},l={keyword:"enum",schemaType:"array",$data:!0,error:s,code(a){const{gen:u,data:i,$data:h,schema:c,schemaCode:d,it:w}=a;if(!h&&c.length===0)throw new Error("enum must have non-empty array");const P=c.length>=w.opts.loopEnum;let b;const E=()=>b??(b=(0,r.useFunc)(u,n.default));let m;if(P||h)m=u.let("valid"),a.block$data(m,o);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const p=u.const("vSchema",d);m=(0,e.or)(...c.map((v,$)=>_(p,$)))}a.pass(m);function o(){u.assign(m,!1),u.forOf("v",d,p=>u.if((0,e._)`${E()}(${i}, ${p})`,()=>u.assign(m,!0).break()))}function _(p,v){const $=c[v];return typeof $=="object"&&$!==null?(0,e._)`${E()}(${i}, ${p}[${v}])`:(0,e._)`${i} === ${$}`}}};t.default=l}),Sc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=hc(),r=pc(),n=gc(),s=vc(),l=yc(),a=_c(),u=wc(),i=$c(),h=bc(),c=Ec(),d=[e.default,r.default,n.default,s.default,l.default,a.default,u.default,i.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},h.default,c.default];t.default=d}),ta=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Te(),r=ze(),n={message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(a){const{parentSchema:u,it:i}=a,{items:h}=u;if(!Array.isArray(h)){(0,r.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas');return}l(a,h)}};function l(a,u){const{gen:i,schema:h,data:c,keyword:d,it:w}=a;w.items=!0;const P=i.const("len",(0,e._)`${c}.length`);if(h===!1)a.setParams({len:u.length}),a.pass((0,e._)`${P} <= ${u.length}`);else if(typeof h=="object"&&!(0,r.alwaysValidSchema)(w,h)){const E=i.var("valid",(0,e._)`${P} <= ${u.length}`);i.if((0,e.not)(E),()=>b(E)),a.ok(E)}function b(E){i.forRange("i",u.length,P,m=>{a.subschema({keyword:d,dataProp:m,dataPropType:r.Type.Num},E),w.allErrors||i.if((0,e.not)(E),()=>i.break())})}}t.validateAdditionalItems=l,t.default=s}),ra=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Te(),r=ze(),n=Ct(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){const{schema:u,it:i}=a;if(Array.isArray(u))return l(a,"additionalItems",u);i.items=!0,!(0,r.alwaysValidSchema)(i,u)&&a.ok((0,n.validateArray)(a))}};function l(a,u,i=a.schema){const{gen:h,parentSchema:c,data:d,keyword:w,it:P}=a;m(c),P.opts.unevaluated&&i.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(h,i.length,P.items));const b=h.name("valid"),E=h.const("len",(0,e._)`${d}.length`);i.forEach((o,_)=>{(0,r.alwaysValidSchema)(P,o)||(h.if((0,e._)`${E} > ${_}`,()=>a.subschema({keyword:w,schemaProp:_,dataProp:_},b)),a.ok(b))});function m(o){const{opts:_,errSchemaPath:p}=P,v=i.length,$=v===o.minItems&&(v===o.maxItems||o[u]===!1);if(_.strictTuples&&!$){const y=`"${w}" is ${v}-tuple, but minItems or maxItems/${u} are not specified or different at path "${p}"`;(0,r.checkStrictMode)(P,y,_.strictTuples)}}}t.validateTuple=l,t.default=s}),Pc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ra(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),kc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=ze(),n=Ct(),s=ta(),l={message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:l,code(u){const{schema:i,parentSchema:h,it:c}=u,{prefixItems:d}=h;c.items=!0,!(0,r.alwaysValidSchema)(c,i)&&(d?(0,s.validateAdditionalItems)(u,d):u.ok((0,n.validateArray)(u)))}};t.default=a}),Oc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=ze(),n={message:({params:{min:l,max:a}})=>a===void 0?(0,e.str)`must contain at least ${l} valid item(s)`:(0,e.str)`must contain at least ${l} and no more than ${a} valid item(s)`,params:({params:{min:l,max:a}})=>a===void 0?(0,e._)`{minContains: ${l}}`:(0,e._)`{minContains: ${l}, maxContains: ${a}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(l){const{gen:a,schema:u,parentSchema:i,data:h,it:c}=l;let d,w;const{minContains:P,maxContains:b}=i;c.opts.next?(d=P===void 0?1:P,w=b):d=1;const E=a.const("len",(0,e._)`${h}.length`);if(l.setParams({min:d,max:w}),w===void 0&&d===0){(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&d>w){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),l.fail();return}if((0,r.alwaysValidSchema)(c,u)){let v=(0,e._)`${E} >= ${d}`;w!==void 0&&(v=(0,e._)`${v} && ${E} <= ${w}`),l.pass(v);return}c.items=!0;const m=a.name("valid");w===void 0&&d===1?_(m,()=>a.if(m,()=>a.break())):d===0?(a.let(m,!0),w!==void 0&&a.if((0,e._)`${h}.length > 0`,o)):(a.let(m,!1),o()),l.result(m,()=>l.reset());function o(){const v=a.name("_valid"),$=a.let("count",0);_(v,()=>a.if(v,()=>p($)))}function _(v,$){a.forRange("i",0,E,y=>{l.subschema({keyword:"contains",dataProp:y,dataPropType:r.Type.Num,compositeRule:!0},v),$()})}function p(v){a.code((0,e._)`${v}++`),w===void 0?a.if((0,e._)`${v} >= ${d}`,()=>a.assign(m,!0).break()):(a.if((0,e._)`${v} > ${w}`,()=>a.assign(m,!1).break()),d===1?a.assign(m,!0):a.if((0,e._)`${v} >= ${d}`,()=>a.assign(m,!0)))}}};t.default=s}),Nc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Te(),r=ze(),n=Ct();t.error={message:({params:{property:i,depsCount:h,deps:c}})=>{const d=h===1?"property":"properties";return(0,e.str)`must have ${d} ${c} when property ${i} is present`},params:({params:{property:i,depsCount:h,deps:c,missingProperty:d}})=>(0,e._)`{property: ${i},
20
+ missingProperty: ${d},
21
+ depsCount: ${h},
22
+ deps: ${c}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(i){const[h,c]=l(i);a(i,h),u(i,c)}};function l({schema:i}){const h={},c={};for(const d in i){if(d==="__proto__")continue;const w=Array.isArray(i[d])?h:c;w[d]=i[d]}return[h,c]}function a(i,h=i.schema){const{gen:c,data:d,it:w}=i;if(Object.keys(h).length===0)return;const P=c.let("missing");for(const b in h){const E=h[b];if(E.length===0)continue;const m=(0,n.propertyInData)(c,d,b,w.opts.ownProperties);i.setParams({property:b,depsCount:E.length,deps:E.join(", ")}),w.allErrors?c.if(m,()=>{for(const o of E)(0,n.checkReportMissingProp)(i,o)}):(c.if((0,e._)`${m} && (${(0,n.checkMissingProp)(i,E,P)})`),(0,n.reportMissingProp)(i,P),c.else())}}t.validatePropertyDeps=a;function u(i,h=i.schema){const{gen:c,data:d,keyword:w,it:P}=i,b=c.name("valid");for(const E in h)(0,r.alwaysValidSchema)(P,h[E])||(c.if((0,n.propertyInData)(c,d,E,P.opts.ownProperties),()=>{const m=i.subschema({keyword:w,schemaProp:E},b);i.mergeValidEvaluated(m,b)},()=>c.var(b,!0)),i.ok(b))}t.validateSchemaDeps=u,t.default=s}),Tc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=ze(),n={message:"property name must be valid",params:({params:l})=>(0,e._)`{propertyName: ${l.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(l){const{gen:a,schema:u,data:i,it:h}=l;if((0,r.alwaysValidSchema)(h,u))return;const c=a.name("valid");a.forIn("key",i,d=>{l.setParams({propertyName:d}),l.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},c),a.if((0,e.not)(c),()=>{l.error(!0),h.allErrors||a.break()})}),l.ok(c)}};t.default=s}),na=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Te(),n=Xt(),s=ze(),l={message:"must NOT have additional properties",params:({params:u})=>(0,r._)`{additionalProperty: ${u.additionalProperty}}`},a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:l,code(u){const{gen:i,schema:h,parentSchema:c,data:d,errsCount:w,it:P}=u;if(!w)throw new Error("ajv implementation error");const{allErrors:b,opts:E}=P;if(P.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(P,h))return;const m=(0,e.allSchemaProperties)(c.properties),o=(0,e.allSchemaProperties)(c.patternProperties);_(),u.ok((0,r._)`${w} === ${n.default.errors}`);function _(){i.forIn("key",d,f=>{!m.length&&!o.length?$(f):i.if(p(f),()=>$(f))})}function p(f){let S;if(m.length>8){const O=(0,s.schemaRefOrVal)(P,c.properties,"properties");S=(0,e.isOwnProperty)(i,O,f)}else m.length?S=(0,r.or)(...m.map(O=>(0,r._)`${f} === ${O}`)):S=r.nil;return o.length&&(S=(0,r.or)(S,...o.map(O=>(0,r._)`${(0,e.usePattern)(u,O)}.test(${f})`))),(0,r.not)(S)}function v(f){i.code((0,r._)`delete ${d}[${f}]`)}function $(f){if(E.removeAdditional==="all"||E.removeAdditional&&h===!1){v(f);return}if(h===!1){u.setParams({additionalProperty:f}),u.error(),b||i.break();return}if(typeof h=="object"&&!(0,s.alwaysValidSchema)(P,h)){const S=i.name("valid");E.removeAdditional==="failing"?(y(f,S,!1),i.if((0,r.not)(S),()=>{u.reset(),v(f)})):(y(f,S),b||i.if((0,r.not)(S),()=>i.break()))}}function y(f,S,O){const j={keyword:"additionalProperties",dataProp:f,dataPropType:s.Type.Str};O===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(j,S)}}};t.default=a}),Rc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Zr(),r=Ct(),n=ze(),s=na(),l={keyword:"properties",type:"object",schemaType:"object",code(a){const{gen:u,schema:i,parentSchema:h,data:c,it:d}=a;d.opts.removeAdditional==="all"&&h.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(i);for(const o of w)d.definedProperties.add(o);d.opts.unevaluated&&w.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(u,(0,n.toHash)(w),d.props));const P=w.filter(o=>!(0,n.alwaysValidSchema)(d,i[o]));if(P.length===0)return;const b=u.name("valid");for(const o of P)E(o)?m(o):(u.if((0,r.propertyInData)(u,c,o,d.opts.ownProperties)),m(o),d.allErrors||u.else().var(b,!0),u.endIf()),a.it.definedProperties.add(o),a.ok(b);function E(o){return d.opts.useDefaults&&!d.compositeRule&&i[o].default!==void 0}function m(o){a.subschema({keyword:"properties",schemaProp:o,dataProp:o},b)}}};t.default=l}),Ic=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Te(),n=ze(),s=ze(),l={keyword:"patternProperties",type:"object",schemaType:"object",code(a){const{gen:u,schema:i,data:h,parentSchema:c,it:d}=a,{opts:w}=d,P=(0,e.allSchemaProperties)(i),b=P.filter($=>(0,n.alwaysValidSchema)(d,i[$]));if(P.length===0||b.length===P.length&&(!d.opts.unevaluated||d.props===!0))return;const E=w.strictSchema&&!w.allowMatchingProperties&&c.properties,m=u.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,s.evaluatedPropsToName)(u,d.props));const{props:o}=d;_();function _(){for(const $ of P)E&&p($),d.allErrors?v($):(u.var(m,!0),v($),u.if(m))}function p($){for(const y in E)new RegExp($).test(y)&&(0,n.checkStrictMode)(d,`property ${y} matches pattern ${$} (use allowMatchingProperties)`)}function v($){u.forIn("key",h,y=>{u.if((0,r._)`${(0,e.usePattern)(a,$)}.test(${y})`,()=>{const f=b.includes($);f||a.subschema({keyword:"patternProperties",schemaProp:$,dataProp:y,dataPropType:s.Type.Str},m),d.opts.unevaluated&&o!==!0?u.assign((0,r._)`${o}[${y}]`,!0):!f&&!d.allErrors&&u.if((0,r.not)(m),()=>u.break())})})}}};t.default=l}),Cc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:l,it:a}=n;if((0,e.alwaysValidSchema)(a,l)){n.fail();return}const u=s.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}),Ac=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),jc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=ze(),n={message:"must match exactly one schema in oneOf",params:({params:l})=>(0,e._)`{passingSchemas: ${l.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(l){const{gen:a,schema:u,parentSchema:i,it:h}=l;if(!Array.isArray(u))throw new Error("ajv implementation error");if(h.opts.discriminator&&i.discriminator)return;const c=u,d=a.let("valid",!1),w=a.let("passing",null),P=a.name("_valid");l.setParams({passing:w}),a.block(b),l.result(d,()=>l.reset(),()=>l.error(!0));function b(){c.forEach((E,m)=>{let o;(0,r.alwaysValidSchema)(h,E)?a.var(P,!0):o=l.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},P),m>0&&a.if((0,e._)`${P} && ${d}`).assign(d,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),a.if(P,()=>{a.assign(d,!0),a.assign(w,m),o&&l.mergeEvaluated(o,e.Name)})})}}};t.default=s}),Mc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:l,it:a}=n;if(!Array.isArray(l))throw new Error("ajv implementation error");const u=s.name("valid");l.forEach((i,h)=>{if((0,e.alwaysValidSchema)(a,i))return;const c=n.subschema({keyword:"allOf",schemaProp:h},u);n.ok(u),n.mergeEvaluated(c)})}};t.default=r}),Dc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=ze(),n={message:({params:a})=>(0,e.str)`must match "${a.ifClause}" schema`,params:({params:a})=>(0,e._)`{failingKeyword: ${a.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(a){const{gen:u,parentSchema:i,it:h}=a;i.then===void 0&&i.else===void 0&&(0,r.checkStrictMode)(h,'"if" without "then" and "else" is ignored');const c=l(h,"then"),d=l(h,"else");if(!c&&!d)return;const w=u.let("valid",!0),P=u.name("_valid");if(b(),a.reset(),c&&d){const m=u.let("ifClause");a.setParams({ifClause:m}),u.if(P,E("then",m),E("else",m))}else c?u.if(P,E("then")):u.if((0,e.not)(P),E("else"));a.pass(w,()=>a.error(!0));function b(){const m=a.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);a.mergeEvaluated(m)}function E(m,o){return()=>{const _=a.subschema({keyword:m},P);u.assign(w,P),a.mergeValidEvaluated(_,w),o?u.assign(o,(0,e._)`${m}`):a.setParams({ifClause:m})}}}};function l(a,u){const i=a.schema[u];return i!==void 0&&!(0,r.alwaysValidSchema)(a,i)}t.default=s}),qc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:l}){s.if===void 0&&(0,e.checkStrictMode)(l,`"${n}" without "if" is ignored`)}};t.default=r}),Lc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ta(),r=Pc(),n=ra(),s=kc(),l=Oc(),a=Nc(),u=Tc(),i=na(),h=Rc(),c=Ic(),d=Cc(),w=Ac(),P=jc(),b=Mc(),E=Dc(),m=qc();function o(_=!1){const p=[d.default,w.default,P.default,b.default,E.default,m.default,u.default,i.default,a.default,h.default,c.default];return _?p.push(r.default,s.default):p.push(e.default,n.default),p.push(l.default),p}t.default=o}),Vc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r={message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(s,l){const{gen:a,data:u,$data:i,schema:h,schemaCode:c,it:d}=s,{opts:w,errSchemaPath:P,schemaEnv:b,self:E}=d;if(!w.validateFormats)return;i?m():o();function m(){const _=a.scopeValue("formats",{ref:E.formats,code:w.code.formats}),p=a.const("fDef",(0,e._)`${_}[${c}]`),v=a.let("fType"),$=a.let("format");a.if((0,e._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>a.assign(v,(0,e._)`${p}.type || "string"`).assign($,(0,e._)`${p}.validate`),()=>a.assign(v,(0,e._)`"string"`).assign($,p)),s.fail$data((0,e.or)(y(),f()));function y(){return w.strictSchema===!1?e.nil:(0,e._)`${c} && !${$}`}function f(){const S=b.$async?(0,e._)`(${p}.async ? await ${$}(${u}) : ${$}(${u}))`:(0,e._)`${$}(${u})`,O=(0,e._)`(typeof ${$} == "function" ? ${S} : ${$}.test(${u}))`;return(0,e._)`${$} && ${$} !== true && ${v} === ${l} && !${O}`}}function o(){const _=E.formats[h];if(!_){y();return}if(_===!0)return;const[p,v,$]=f(_);p===l&&s.pass(S());function y(){if(w.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${h}" ignored in schema at path "${P}"`}}function f(O){const j=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(h)}`:void 0,F=a.scopeValue("formats",{key:h,ref:O,code:j});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${F}.validate`]:["string",O,F]}function S(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!b.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${u})`}return typeof v=="function"?(0,e._)`${$}(${u})`:(0,e._)`${$}.test(${u})`}}}};t.default=n}),Uc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Vc(),r=[e.default];t.default=r}),Fc=B(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"]}),zc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=dc(),r=Sc(),n=Lc(),s=Uc(),l=Fc(),a=[e.default,r.default,(0,n.default)(),s.default,l.metadataVocabulary,l.contentVocabulary];t.default=a}),xc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))}),Bc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=xc(),n=xn(),s=ze(),l={message:({params:{discrError:u,tagName:i}})=>u===r.DiscrError.Tag?`tag "${i}" must be string`:`value of tag "${i}" must be in oneOf`,params:({params:{discrError:u,tag:i,tagName:h}})=>(0,e._)`{error: ${u}, tag: ${h}, tagValue: ${i}}`},a={keyword:"discriminator",type:"object",schemaType:"object",error:l,code(u){const{gen:i,data:h,schema:c,parentSchema:d,it:w}=u,{oneOf:P}=d;if(!w.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=c.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!P)throw new Error("discriminator: requires oneOf keyword");const E=i.let("valid",!1),m=i.const("tag",(0,e._)`${h}${(0,e.getProperty)(b)}`);i.if((0,e._)`typeof ${m} == "string"`,()=>o(),()=>u.error(!1,{discrError:r.DiscrError.Tag,tag:m,tagName:b})),u.ok(E);function o(){const v=p();i.if(!1);for(const $ in v)i.elseIf((0,e._)`${m} === ${$}`),i.assign(E,_(v[$]));i.else(),u.error(!1,{discrError:r.DiscrError.Mapping,tag:m,tagName:b}),i.endIf()}function _(v){const $=i.name("valid"),y=u.subschema({keyword:"oneOf",schemaProp:v},$);return u.mergeEvaluated(y,e.Name),$}function p(){var v;const $={},y=S(d);let f=!0;for(let F=0;F<P.length;F++){let V=P[F];V!=null&&V.$ref&&!(0,s.schemaHasRulesButRef)(V,w.self.RULES)&&(V=n.resolveRef.call(w.self,w.schemaEnv.root,w.baseId,V==null?void 0:V.$ref),V instanceof n.SchemaEnv&&(V=V.schema));const X=(v=V==null?void 0:V.properties)===null||v===void 0?void 0:v[b];if(typeof X!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);f=f&&(y||S(V)),O(X,F)}if(!f)throw new Error(`discriminator: "${b}" must be required`);return $;function S({required:F}){return Array.isArray(F)&&F.includes(b)}function O(F,V){if(F.const)j(F.const,V);else if(F.enum)for(const X of F.enum)j(X,V);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function j(F,V){if(typeof F!="string"||F in $)throw new Error(`discriminator: "${b}" values must be unique strings`);$[F]=V}}}};t.default=a}),Hc=B((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}}),Kc=B((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=lc(),n=zc(),s=Bc(),l=Hc(),a=["/properties"],u="http://json-schema.org/draft-07/schema";class i extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(l,a):l;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=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var h=Zr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var c=Te();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var d=Fn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var w=zn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),Gc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=Kc(),r=Te(),n=r.operators,s={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}},l={message:({keyword:u,schemaCode:i})=>r.str`should be ${s[u].okStr} ${i}`,params:({keyword:u,schemaCode:i})=>r._`{comparison: ${s[u].okStr}, limit: ${i}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:l,code(u){const{gen:i,data:h,schemaCode:c,keyword:d,it:w}=u,{opts:P,self:b}=w;if(!P.validateFormats)return;const E=new e.KeywordCxt(w,b.RULES.all.format.definition,"format");E.$data?m():o();function m(){const p=i.scopeValue("formats",{ref:b.formats,code:P.code.formats}),v=i.const("fmt",r._`${p}[${E.schemaCode}]`);u.fail$data(r.or(r._`typeof ${v} != "object"`,r._`${v} instanceof RegExp`,r._`typeof ${v}.compare != "function"`,_(v)))}function o(){const p=E.schema,v=b.formats[p];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${d}": format "${p}" does not define "compare" function`);const $=i.scopeValue("formats",{key:p,ref:v,code:P.code.formats?r._`${P.code.formats}${r.getProperty(p)}`:void 0});u.fail$data(_($))}function _(p){return r._`${p}.compare(${h}, ${c}) ${s[d].fail} 0`}},dependencies:["format"]};var a=u=>(u.addKeyword(t.formatLimitDefinition),u);t.default=a}),Wc=B((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=rc(),n=Gc(),s=Te(),l=new s.Name("fullFormats"),a=new s.Name("fastFormats"),u=(h,c={keywords:!0})=>{if(Array.isArray(c))return i(h,c,r.fullFormats,l),h;const[d,w]=c.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,l],P=c.formats||r.formatNames;return i(h,P,d,w),c.keywords&&n.default(h),h};u.get=(h,c="full")=>{const w=(c==="fast"?r.fastFormats:r.fullFormats)[h];if(!w)throw new Error(`Unknown format "${h}"`);return w};function i(h,c,d,w){var P,b;(P=(b=h.opts.code).formats)!==null&&P!==void 0||(b.formats=s._`require("ajv-formats/dist/formats").${w}`);for(const E of c)h.addFormat(E,d[E])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u}),Jc=B((t,e)=>{(function(r,n){typeof e=="object"&&e.exports?e.exports=n():r.nearley=n()})(t,function(){function r(c,d,w){return this.id=++r.highestId,this.name=c,this.symbols=d,this.postprocess=w,this}r.highestId=0,r.prototype.toString=function(c){var d=typeof c>"u"?this.symbols.map(h).join(" "):this.symbols.slice(0,c).map(h).join(" ")+" ● "+this.symbols.slice(c).map(h).join(" ");return this.name+" → "+d};function n(c,d,w,P){this.rule=c,this.dot=d,this.reference=w,this.data=[],this.wantedBy=P,this.isComplete=this.dot===c.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(c){var d=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return d.left=this,d.right=c,d.isComplete&&(d.data=d.build(),d.right=void 0),d},n.prototype.build=function(){var c=[],d=this;do c.push(d.right.data),d=d.left;while(d.left);return c.reverse(),c},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,u.fail))};function s(c,d){this.grammar=c,this.index=d,this.states=[],this.wants={},this.scannable=[],this.completed={}}s.prototype.process=function(c){for(var d=this.states,w=this.wants,P=this.completed,b=0;b<d.length;b++){var E=d[b];if(E.isComplete){if(E.finish(),E.data!==u.fail){for(var m=E.wantedBy,o=m.length;o--;){var _=m[o];this.complete(_,E)}if(E.reference===this.index){var p=E.rule.name;(this.completed[p]=this.completed[p]||[]).push(E)}}}else{var p=E.rule.symbols[E.dot];if(typeof p!="string"){this.scannable.push(E);continue}if(w[p]){if(w[p].push(E),P.hasOwnProperty(p))for(var v=P[p],o=0;o<v.length;o++){var $=v[o];this.complete(E,$)}}else w[p]=[E],this.predict(p)}}},s.prototype.predict=function(c){for(var d=this.grammar.byName[c]||[],w=0;w<d.length;w++){var P=d[w],b=this.wants[c],E=new n(P,0,this.index,b);this.states.push(E)}},s.prototype.complete=function(c,d){var w=c.nextState(d);this.states.push(w)};function l(c,d){this.rules=c,this.start=d||this.rules[0].name;var w=this.byName={};this.rules.forEach(function(P){w.hasOwnProperty(P.name)||(w[P.name]=[]),w[P.name].push(P)})}l.fromCompiled=function(P,d){var w=P.Lexer;P.ParserStart&&(d=P.ParserStart,P=P.ParserRules);var P=P.map(function(E){return new r(E.name,E.symbols,E.postprocess)}),b=new l(P,d);return b.lexer=w,b};function a(){this.reset("")}a.prototype.reset=function(c,d){this.buffer=c,this.index=0,this.line=d?d.line:1,this.lastLineBreak=d?-d.col:0},a.prototype.next=function(){if(this.index<this.buffer.length){var c=this.buffer[this.index++];return c===`
23
+ `&&(this.line+=1,this.lastLineBreak=this.index),{value:c}}},a.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},a.prototype.formatError=function(c,d){var w=this.buffer;if(typeof w=="string"){var P=w.split(`
24
+ `).slice(Math.max(0,this.line-5),this.line),b=w.indexOf(`
25
+ `,this.index);b===-1&&(b=w.length);var E=this.index-this.lastLineBreak,m=String(this.line).length;return d+=" at line "+this.line+" col "+E+`:
26
+
27
+ `,d+=P.map(function(_,p){return o(this.line-P.length+p+1,m)+" "+_},this).join(`
28
+ `),d+=`
29
+ `+o("",m+E)+`^
30
+ `,d}else return d+" at index "+(this.index-1);function o(_,p){var v=String(_);return Array(p-v.length+1).join(" ")+v}};function u(c,d,w){if(c instanceof l)var P=c,w=d;else var P=l.fromCompiled(c,d);this.grammar=P,this.options={keepHistory:!1,lexer:P.lexer||new a};for(var b in w||{})this.options[b]=w[b];this.lexer=this.options.lexer,this.lexerState=void 0;var E=new s(P,0);this.table=[E],E.wants[P.start]=[],E.predict(P.start),E.process(),this.current=0}u.fail={},u.prototype.feed=function(c){var d=this.lexer;d.reset(c,this.lexerState);for(var w;;){try{if(w=d.next(),!w)break}catch(S){var m=new s(this.grammar,this.current+1);this.table.push(m);var P=new Error(this.reportLexerError(S));throw P.offset=this.current,P.token=S.token,P}var b=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var E=this.current+1,m=new s(this.grammar,E);this.table.push(m);for(var o=w.text!==void 0?w.text:w.value,_=d.constructor===a?w.value:w,p=b.scannable,v=p.length;v--;){var $=p[v],y=$.rule.symbols[$.dot];if(y.test?y.test(_):y.type?y.type===w.type:y.literal===o){var f=$.nextState({data:_,token:w,isToken:!0,reference:E-1});m.states.push(f)}}if(m.process(),m.states.length===0){var P=new Error(this.reportError(w));throw P.offset=this.current,P.token=w,P}this.options.keepHistory&&(b.lexerState=d.save()),this.current++}return b&&(this.lexerState=d.save()),this.results=this.finish(),this},u.prototype.reportLexerError=function(c){var d,w,P=c.token;return P?(d="input "+JSON.stringify(P.text[0])+" (lexer error)",w=this.lexer.formatError(P,"Syntax error")):(d="input (lexer error)",w=c.message),this.reportErrorCommon(w,d)},u.prototype.reportError=function(c){var d=(c.type?c.type+" token: ":"")+JSON.stringify(c.value!==void 0?c.value:c),w=this.lexer.formatError(c,"Syntax error");return this.reportErrorCommon(w,d)},u.prototype.reportErrorCommon=function(c,d){var w=[];w.push(c);var P=this.table.length-2,b=this.table[P],E=b.states.filter(function(o){var _=o.rule.symbols[o.dot];return _&&typeof _!="string"});if(E.length===0)w.push("Unexpected "+d+`. I did not expect any more input. Here is the state of my parse table:
31
+ `),this.displayStateStack(b.states,w);else{w.push("Unexpected "+d+`. Instead, I was expecting to see one of the following:
32
+ `);var m=E.map(function(o){return this.buildFirstStateStack(o,[])||[o]},this);m.forEach(function(o){var _=o[0],p=_.rule.symbols[_.dot],v=this.getSymbolDisplay(p);w.push("A "+v+" based on:"),this.displayStateStack(o,w)},this)}return w.push(""),w.join(`
33
+ `)},u.prototype.displayStateStack=function(c,d){for(var w,P=0,b=0;b<c.length;b++){var E=c[b],m=E.rule.toString(E.dot);m===w?P++:(P>0&&d.push(" ^ "+P+" more lines identical to this"),P=0,d.push(" "+m)),w=m}},u.prototype.getSymbolDisplay=function(c){return i(c)},u.prototype.buildFirstStateStack=function(c,d){if(d.indexOf(c)!==-1)return null;if(c.wantedBy.length===0)return[c];var w=c.wantedBy[0],P=[c].concat(d),b=this.buildFirstStateStack(w,P);return b===null?null:[c].concat(b)},u.prototype.save=function(){var c=this.table[this.current];return c.lexerState=this.lexerState,c},u.prototype.restore=function(c){var d=c.index;this.current=d,this.table[d]=c,this.table.splice(d+1),this.lexerState=c.lexerState,this.results=this.finish()},u.prototype.rewind=function(c){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[c])},u.prototype.finish=function(){var c=[],d=this.grammar.start,w=this.table[this.table.length-1];return w.states.forEach(function(P){P.rule.name===d&&P.dot===P.rule.symbols.length&&P.reference===0&&P.data!==u.fail&&c.push(P)}),c.map(function(P){return P.data})};function i(c){var d=typeof c;if(d==="string")return c;if(d==="object"){if(c.literal)return JSON.stringify(c.literal);if(c instanceof RegExp)return"character matching "+c;if(c.type)return c.type+" token";if(c.test)return"token matching "+String(c.test);throw new Error("Unknown symbol type: "+c)}}function h(c){var d=typeof c;if(d==="string")return c;if(d==="object"){if(c.literal)return JSON.stringify(c.literal);if(c instanceof RegExp)return c.toString();if(c.type)return"%"+c.type;if(c.test)return"<"+String(c.test)+">";throw new Error("Unknown symbol type: "+c)}}return{Parser:u,Grammar:l,Rule:r}})}),Qc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(l){return l[0]}var r=l=>[].concat(...l.map(a=>Array.isArray(a)?r(a):a));function n(l){return l?Array.isArray(l)?r(l).join(""):l:""}var s={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:l=>l.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(l){return l.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(l){return l.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:l=>l[0].concat([l[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:l=>l[0].concat([l[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:l=>l[0].concat([l[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:l=>l[0].concat([l[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(l){return{DomainName:n(l[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(l){return{AddressLiteral:n(l[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(l){return{localPart:n(l[0]),domainPart:n(l[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(l){return{DotString:n(l[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(l){return{QuotedString:n(l[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:l=>l[0].concat([l[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:l=>l[0].concat([l[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:l=>l[0].concat([l[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(l){return l.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:l=>l[0].concat([l[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:l=>l.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:l=>l.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=s}),Kn=B(t=>{var e=t&&t.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;var r=Jc(),n=e(Qc());n.default.ParserStart="Mailbox";var s=r.Grammar.fromCompiled(n.default);function l(c){if(c.length>986)throw new Error("address too long");const w=new r.Parser(s);if(w.feed(c),w.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");const P=c.lastIndexOf("@"),b=c.substring(P+1);if(b[0]!=="["){if(b.length>253)throw new Error("domain too long");const E=b.split(".");if(E.length<2)throw new Error("domain not fully qualified");if(E[E.length-1].length<2)throw new Error("top level domain label too short");if(E.sort(function(m,o){return o.length-m.length}),E[0].length>63)throw new Error("domain label too long")}return w.results[0]}t.parse=l;function a(c){return function(){const P=c.indexOf("+");return P===-1?c:c.substr(0,P)}().replace(/\./g,"").toLowerCase()}t.normalize_dot_string=a;function u(c){var d,w;const P=l(c),b=(d=P.domainPart.AddressLiteral)!==null&&d!==void 0?d:P.domainPart.DomainName.toLowerCase();return`${(w=P.localPart.QuotedString)!==null&&w!==void 0?w:a(P.localPart.DotString)}@${b}`}t.normalize=u;function i(c){return`"${c.substr(1).substr(0,c.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.canonicalize_quoted_string=i;function h(c){var d;const w=l(c),P=(d=w.domainPart.AddressLiteral)!==null&&d!==void 0?d:w.domainPart.DomainName.toLowerCase();return`${w.localPart.QuotedString?i(w.localPart.QuotedString):w.localPart.DotString}@${P}`}t.canonicalize=h}),Xc=B((t,e)=>{var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,a=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},u=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var w=r.call(d,"constructor"),P=d.constructor&&d.constructor.prototype&&r.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!w&&!P)return!1;var b;for(b in d);return typeof b>"u"||r.call(d,b)},i=function(d,w){s&&w.name==="__proto__"?s(d,w.name,{enumerable:!0,configurable:!0,value:w.newValue,writable:!0}):d[w.name]=w.newValue},h=function(d,w){if(w==="__proto__")if(r.call(d,w)){if(l)return l(d,w).value}else return;return d[w]};e.exports=function c(){var d,w,P,b,E,m,o=arguments[0],_=1,p=arguments.length,v=!1;for(typeof o=="boolean"&&(v=o,o=arguments[1]||{},_=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});_<p;++_)if(d=arguments[_],d!=null)for(w in d)P=h(o,w),b=h(d,w),o!==b&&(v&&b&&(u(b)||(E=a(b)))?(E?(E=!1,m=P&&a(P)?P:[]):m=P&&u(P)?P:{},i(o,{name:w,newValue:c(v,m,b)})):typeof b<"u"&&i(o,{name:w,newValue:b}));return o}}),Yc=B((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"}]}]}),Zc=B((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"}]}),el=B((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"}]}]}),tl=B((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"}]}),sa=B((t,e)=>{var r=Xc(),n={permanent:Yc(),provosional:Zc(),historical:el()},s={};Object.keys(n).forEach(function(l){n[l].forEach(function(a){s[a.scheme]=r(a,{type:l})})}),n.unofficial=tl().filter(function(l){return!s[l.scheme]}),n.unofficial.forEach(function(l){s[l.scheme]=r(l,{type:"unofficial"})}),e.exports=r(n,{allByName:s})}),rl=B((t,e)=>{var{parse:r}=Bn(),{addressParser:n}=Kn(),s=sa();function l(a){try{return n(a),!0}catch{return!1}}e.exports=a=>{const u=r(a);return!!(u.scheme==="mailto"&&u.to.every(l)||u.reference==="absolute"&&s.allByName[u.scheme])}}),nl=B((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)?)?$/}),sl=B((t,e)=>{var{parse:r}=Kn();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),aa={};oo(aa,{default:()=>la});function ia(t){return this[t]}function al(t,e){this[t]=ll.bind(null,e)}var oa,ca,vr,Gn,Wn,il=(t,e,r)=>{var n=Gn(e);for(let s of n)!Wn.call(t,s)&&s!=="default"&&vr(t,s,{get:ia.bind(e,s),enumerable:!0})},ol,ys=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=ol??(ol=new WeakMap),l=s.get(t);if(l)return l}r=t!=null?oa(ca(t)):{};let a=e||!t||!t.__esModule?vr(r,"default",{value:t,enumerable:!0}):r;for(let u of Gn(t))Wn.call(a,u)||vr(a,u,{get:ia.bind(t,u),enumerable:!0});return n&&s.set(t,a),a},cl=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ll=t=>t,ul=(t,e)=>{for(var r in e)vr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:al.bind(e,r)})},mn,gn,vn,la,fl=co(()=>{oa=Object.create,{getPrototypeOf:ca,defineProperty:vr,getOwnPropertyNames:Gn}=Object,Wn=Object.prototype.hasOwnProperty,mn=cl((t,e)=>{var r=/^xn--/,n=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},a=Math.floor,u=String.fromCharCode;function i($){throw RangeError(l[$])}function h($,y){let f=[],S=$.length;for(;S--;)f[S]=y($[S]);return f}function c($,y){let f=$.split("@"),S="";f.length>1&&(S=f[0]+"@",$=f[1]),$=$.replace(s,".");let O=$.split("."),j=h(O,y).join(".");return S+j}function d($){let y=[],f=0,S=$.length;for(;f<S;){let O=$.charCodeAt(f++);if(O>=55296&&O<=56319&&f<S){let j=$.charCodeAt(f++);(j&64512)==56320?y.push(((O&1023)<<10)+(j&1023)+65536):(y.push(O),f--)}else y.push(O)}return y}var w=$=>String.fromCodePoint(...$),P=function($){return $>=48&&$<58?26+($-48):$>=65&&$<91?$-65:$>=97&&$<123?$-97:36},b=function($,y){return $+22+75*($<26)-((y!=0)<<5)},E=function($,y,f){let S=0;for($=f?a($/700):$>>1,$+=a($/y);$>455;S+=36)$=a($/35);return a(S+36*$/($+38))},m=function($){let y=[],f=$.length,S=0,O=128,j=72,F=$.lastIndexOf("-");F<0&&(F=0);for(let V=0;V<F;++V)$.charCodeAt(V)>=128&&i("not-basic"),y.push($.charCodeAt(V));for(let V=F>0?F+1:0;V<f;){let X=S;for(let ee=1,fe=36;;fe+=36){V>=f&&i("invalid-input");let we=P($.charCodeAt(V++));we>=36&&i("invalid-input"),we>a((2147483647-S)/ee)&&i("overflow"),S+=we*ee;let Oe=fe<=j?1:fe>=j+26?26:fe-j;if(we<Oe)break;let se=36-Oe;ee>a(2147483647/se)&&i("overflow"),ee*=se}let G=y.length+1;j=E(S-X,G,X==0),a(S/G)>2147483647-O&&i("overflow"),O+=a(S/G),S%=G,y.splice(S++,0,O)}return String.fromCodePoint(...y)},o=function($){let y=[];$=d($);let f=$.length,S=128,O=0,j=72;for(let X of $)X<128&&y.push(u(X));let F=y.length,V=F;for(F&&y.push("-");V<f;){let X=2147483647;for(let ee of $)ee>=S&&ee<X&&(X=ee);let G=V+1;X-S>a((2147483647-O)/G)&&i("overflow"),O+=(X-S)*G,S=X;for(let ee of $)if(ee<S&&++O>2147483647&&i("overflow"),ee===S){let fe=O;for(let we=36;;we+=36){let Oe=we<=j?1:we>=j+26?26:we-j;if(fe<Oe)break;let se=fe-Oe,x=36-Oe;y.push(u(b(Oe+se%x,0))),fe=a(se/x)}y.push(u(b(fe,0))),j=E(O,G,V===F),O=0,++V}++O,++S}return y.join("")},_=function($){return c($,function(y){return r.test(y)?m(y.slice(4).toLowerCase()):y})},p=function($){return c($,function(y){return n.test(y)?"xn--"+o(y):y})},v={version:"2.3.1",ucs2:{decode:d,encode:w},decode:m,encode:o,toASCII:p,toUnicode:_};e.exports=v}),gn={},ul(gn,{default:()=>vn.default}),il(gn,ys(mn(),1)),vn=ys(mn(),1),la=vn.default}),dl=B((t,e)=>{var{toASCII:r}=(fl(),so(aa)),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=s=>{const l=r(s);return l.replace(/\.$/,"").length<=253&&n.test(l)}}),hl=B((t,e)=>{var{parse:r}=Bn(),{addressParser:n}=Kn(),s=sa();function l(a){try{return n(a),!0}catch{return!1}}e.exports=a=>{const u=r(a);return u.scheme==="mailto"&&u.to.every(l)||u.reference==="absolute"&&u.path!==void 0&&s.allByName[u.scheme]?!0:u.scheme&&!s.allByName[u.scheme]?!1:u.path!==void 0&&(u.reference==="relative"||u.reference==="same-document"||u.reference==="uri")}}),pl=B((t,e)=>{t.iri=rl(),t.duration=nl(),t["idn-email"]=sl(),t["idn-hostname"]=dl(),t["iri-reference"]=hl()}),ml=B((t,e)=>{var r=pl();e.exports=(n,s={})=>{const l=Object.keys(r);let a=l;if(s.formats){if(!Array.isArray(s.formats))throw new Error("options.formats must be an array");a=s.formats}return l.filter(u=>a.includes(u)).forEach(u=>{n.addFormat(u,r[u])}),n}}),gl=B((t,e)=>{var r=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function l(h,c,d){this.fn=h,this.context=c,this.once=d||!1}function a(h,c,d,w,P){if(typeof d!="function")throw new TypeError("The listener must be a function");var b=new l(d,w||h,P),E=n?n+c:c;return h._events[E]?h._events[E].fn?h._events[E]=[h._events[E],b]:h._events[E].push(b):(h._events[E]=b,h._eventsCount++),h}function u(h,c){--h._eventsCount===0?h._events=new s:delete h._events[c]}function i(){this._events=new s,this._eventsCount=0}i.prototype.eventNames=function(){var c=[],d,w;if(this._eventsCount===0)return c;for(w in d=this._events)r.call(d,w)&&c.push(n?w.slice(1):w);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},i.prototype.listeners=function(c){var d=n?n+c:c,w=this._events[d];if(!w)return[];if(w.fn)return[w.fn];for(var P=0,b=w.length,E=new Array(b);P<b;P++)E[P]=w[P].fn;return E},i.prototype.listenerCount=function(c){var d=n?n+c:c,w=this._events[d];return w?w.fn?1:w.length:0},i.prototype.emit=function(c,d,w,P,b,E){var m=n?n+c:c;if(!this._events[m])return!1;var o=this._events[m],_=arguments.length,p,v;if(o.fn){switch(o.once&&this.removeListener(c,o.fn,void 0,!0),_){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,d),!0;case 3:return o.fn.call(o.context,d,w),!0;case 4:return o.fn.call(o.context,d,w,P),!0;case 5:return o.fn.call(o.context,d,w,P,b),!0;case 6:return o.fn.call(o.context,d,w,P,b,E),!0}for(v=1,p=new Array(_-1);v<_;v++)p[v-1]=arguments[v];o.fn.apply(o.context,p)}else{var $=o.length,y;for(v=0;v<$;v++)switch(o[v].once&&this.removeListener(c,o[v].fn,void 0,!0),_){case 1:o[v].fn.call(o[v].context);break;case 2:o[v].fn.call(o[v].context,d);break;case 3:o[v].fn.call(o[v].context,d,w);break;case 4:o[v].fn.call(o[v].context,d,w,P);break;default:if(!p)for(y=1,p=new Array(_-1);y<_;y++)p[y-1]=arguments[y];o[v].fn.apply(o[v].context,p)}}return!0},i.prototype.on=function(c,d,w){return a(this,c,d,w,!1)},i.prototype.once=function(c,d,w){return a(this,c,d,w,!0)},i.prototype.removeListener=function(c,d,w,P){var b=n?n+c:c;if(!this._events[b])return this;if(!d)return u(this,b),this;var E=this._events[b];if(E.fn)E.fn===d&&(!P||E.once)&&(!w||E.context===w)&&u(this,b);else{for(var m=0,o=[],_=E.length;m<_;m++)(E[m].fn!==d||P&&!E[m].once||w&&E[m].context!==w)&&o.push(E[m]);o.length?this._events[b]=o.length===1?o[0]:o:u(this,b)}return this},i.prototype.removeAllListeners=function(c){var d;return c?(d=n?n+c:c,this._events[d]&&u(this,d)):(this._events=new s,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=n,i.EventEmitter=i,typeof e<"u"&&(e.exports=i)}),vl="https://www.w3.org/ns/activitystreams",yl="https://sockethub.org/ns/context/v1.jsonld",_l="error",wl="https://sockethub.org/ns/context/platform/error/v1.jsonld",$l="sockethub:internal",bl="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",Jn=new Map,ua=new Map,fa=new Map;function El(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function Sl(t){return El(t["@context"])}function da(t,e,r,n){Jn.set(e,t),ua.set(e,r),fa.set(e,n)}function Qn(t){const r=Sl(t).filter(n=>Jn.has(n));return r.length!==1?null:r[0]}function Pl(t){return Jn.get(t)}function kl(t){return ua.get(t)}function Ol(t){return fa.get(t)}var ha={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"]}}}},Nl=Object.keys(ha),pa=["person","room","service","feed","website","platform"],ma=["person","room","service","feed","website","platform","address"],Tl=pa.map(t=>({$ref:`#/definitions/type/${t}`})),Rl=ma.map(t=>({$ref:`#/definitions/type/${t}`})),Il={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:vl}},{contains:{const:yl}}]},Cl={type:"string"},Al={$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":Il,id:{type:"string"},type:Cl,actor:{type:"object",oneOf:Tl},target:{type:"object",oneOf:Rl},object:{type:"object"},published:{type:"string",format:"date-time"}},definitions:{type:ha}},jl=Hr(tc()),Ml=Hr(Wc()),Dl=Hr(ml());function ql(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 dr(t){const e=[];t!=null&&t.type&&e.push(t.type);const r=t;for(const n in r){const s=r[n];s&&typeof s=="object"&&"type"in s&&e.push(...dr(s))}return e}function Ll(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function Vl(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function Ul(t,e){const r=Ll(t),n=Vl(t);if(!n)return-1;const s=e[n];return!s||!r||!s.includes(r)?-1:t.instancePath.split("/").length}function Fl(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:dr(t)};const e=t;return{actor:dr(e.actor),target:dr(e.target),object:e.object?dr(e.object):[]}}function zl(t,e,r){const n=Fl(t);let s=0,l=-1;for(let a=0;a<e.length;a++){const u=Ul(e[a],n);u>l&&(l=u,s=a)}return l>=0?ql(e[s]):Bl(e[e.length-1],r)}function xl(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 Bl(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],s=n==="actor"?pa:n==="target"?ma:Nl,l=xl(s,e),a=l.length>0?l:s;r=`${t.instancePath}: ${t.message}: ${a.join(", ")}`}else r=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return"additionalProperty"in t.params&&(r+=`: ${t.params.additionalProperty}`),r}var Mt=new jl.default({strictTypes:!1,allErrors:!0});Ml.default(Mt);Dl.default(Mt);var Dt="https://sockethub.org/schemas/v0",On={},Hl={},_s=!1;On[`${Dt}/activity-stream`]=Al;for(const t in On)Mt.addSchema(On[t],t);function ws(t,e){da(t,e,`${Dt}/context/${t}/messages`,`${Dt}/context/${t}/credentials`);const r=`${Dt}/context/${t}/messages`;Mt.getSchema(r)||Mt.addSchema({},r);const n=`${Dt}/context/${t}/credentials`;Mt.getSchema(n)||Mt.addSchema({},n)}function Kl(){_s||(ws(_l,wl),ws($l,bl),_s=!0)}Kl();function Br(t,e){const r=Mt.getSchema(t);if(!r)return`schema ${t} not found`;if(!r(e)){let s=zl(e,r.errors,Hl);if(Array.isArray(e["@context"])){const l=Qn(e);if(l){const a=Pl(l);a&&(s=`[${a}] ${s}`)}}return s}return""}function Gl(t){const e=Br(`${Dt}/activity-stream`,t);if(e)return e;const r=Qn(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=kl(r);return n?Br(n,t):`platform context URL ${r} does not have a registered message schema`}function Wl(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=Br(`${Dt}/activity-stream`,t);if(e)return e;const r=Qn(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=Ol(r);return n?Br(n,t):`platform context URL ${r} does not have a registered credentials schema`}function $s(t,e){const r=`${Dt}/context/${e}`;Mt.getSchema(r)||Mt.addSchema(t,r)}function Jl(t,e){da(t,e,`${Dt}/context/${t}/messages`,`${Dt}/context/${t}/credentials`)}var bs={actor:"id",target:"id",object:"content"};function Ql(t,e){return typeof t=="string"?{[e]:t}:Array.isArray(t)?t.map(r=>typeof r=="string"?{id:r}:r):t}function yn(t){const e={...t};for(const r of Object.keys(bs))r in e&&(e[r]=Ql(e[r],bs[r]));return e}var Xl=Hr(gl()),Yl=Xl.default;class en{constructor(e,r={}){nt(this,"events",{credentials:new Map,connect:new Map,join:new Map});nt(this,"_socket");nt(this,"socket");nt(this,"debug",!0);nt(this,"options");nt(this,"platformRegistry",new Map);nt(this,"asContextUrl");nt(this,"sockethubContextUrl");nt(this,"sockethubVersion");nt(this,"initState","idle");nt(this,"hasReadyOnce",!1);nt(this,"initCycle");nt(this,"initTokenCounter",0);nt(this,"initTimeoutTimer");nt(this,"waitingWarningTimer");nt(this,"waitingWarningIntervalMs",1e4);nt(this,"readyWaiters",[]);nt(this,"outboundQueue",[]);nt(this,"outboundSequence",0);nt(this,"registryFingerprint");nt(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 s,l;const n=e==null?void 0:e.trim();if(n)return(l=(s=this.platformRegistry.get(n))==null?void 0:s.schemas)==null?void 0:l[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 s={resolve:r,reject:n};e>0&&(s.timer=setTimeout(()=>{this.readyWaiters=this.readyWaiters.filter(l=>l!==s),n(new Error(`SockethubClient ready() timed out after ${e}ms`))},e)),this.readyWaiters.push(s),this.socket.connected&&this.initState==="idle"&&this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)})}validateActivity(e){return e.type==="credentials"?Wl(e):Gl(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 s=Array.from(this.platformRegistry.keys()).sort();throw new Error(`unknown platform '${r}'. Registered platforms: ${s.join(", ")}`)}return[this.asContextUrl,this.sockethubContextUrl,n.contextUrl]}createPublicEmitter(){const e=new Yl;return e._emit=e.emit,e.emit=(r,n,s)=>{this.handlePublicEmit(r,n,s)},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 a,u,i,h;if(!e||typeof e!="object")return;const r=e,n=(a=r.contexts)==null?void 0:a.as,s=(u=r.contexts)==null?void 0:u.sockethub;if(typeof n!="string"||typeof s!="string"||!Array.isArray(r.platforms))return;this.sockethubVersion=typeof r.version=="string"?r.version:"unknown",this.asContextUrl=n,this.sockethubContextUrl=s,this.platformRegistry.clear();for(const c of r.platforms)if(!(!c||typeof c!="object"||typeof c.id!="string"||typeof c.version!="string"||typeof c.contextUrl!="string")){this.platformRegistry.set(c.id,{...c,version:c.version,types:Array.isArray(c.types)?c.types:[],schemas:c.schemas||{}}),Jl(c.id,c.contextUrl);try{const d=(i=c.schemas)==null?void 0:i.credentials;d&&typeof d=="object"&&!Array.isArray(d)&&$s(d,`${c.id}/credentials`);const w=(h=c.schemas)==null?void 0:h.messages;w&&typeof w=="object"&&!Array.isArray(w)&&$s(w,`${c.id}/messages`)}catch(d){const w=d instanceof Error?d.message:String(d);console.warn(`[SockethubClient] Failed to register schemas for platform ${c.id}: ${w}`)}}const l=this.buildPlatformRegistryPayload();return this.registryFingerprint=typeof r.fingerprint=="string"?r.fingerprint:void 0,this.socket._emit("schemas",l),l}eventCredentials(e){if(e.object&&e.object.type==="credentials"){const r=e.actor.id||e.actor;this.events.credentials.set(r,e)}}eventMessage(e){if(!this._socket.connected)return;const r=en.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 s;const r=((s=e.actor)==null?void 0:s.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`${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 s=`Initialization timed out after ${this.options.initTimeoutMs}ms waiting for schemas`;console.warn(`[SockethubClient] ${s}; queued outbound messages: ${this.outboundQueue.length}. Waiting for schemas event from server.`),this.emitInitError(s,"timeout",!1),this.startWaitingWarnings()},this.options.initTimeoutMs);try{this.requestSchemaRegistry()}catch(s){this.initState="init_error";const l=s instanceof Error?s.message:String(s);this.emitInitError(l,"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 s=this.buildReadyInfo(e);if(!s){const l=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(l.message,"schemas-apply",!0),this.rejectReadyWaiters(l);return}this.socket._emit("ready",s),this.latestReadyInfo=s,this.resolveReadyWaiters(s),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 s={event:e,content:r,callback:n,enqueuedAt:Date.now(),sequence:this.outboundSequence++};if(!this.isReady()){this.enqueueOutbound(s);return}this.sendOutbound(s)}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,s)=>n.sequence-s.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=yn(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 s=n instanceof Error?n.message:String(n);this.emitClientError(e.event,e.callback,s)}}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",yn(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 s=yn(n);let l=s==null?void 0:s.id;if(this.hasActorId(s)){const a=s.actor;l=typeof a=="string"?a:a.id}this.log(`replaying ${e} for ${l}`),this._socket.emit(e,s)}}}(t=>{t.SockethubClient=en})(typeof globalThis=="object"?globalThis:{});const Lt=Object.create(null);Lt.open="0";Lt.close="1";Lt.ping="2";Lt.pong="3";Lt.message="4";Lt.upgrade="5";Lt.noop="6";const Ir=Object.create(null);Object.keys(Lt).forEach(t=>{Ir[Lt[t]]=t});const Nn={type:"error",data:"parser error"},ga=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",va=typeof ArrayBuffer=="function",ya=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Xn=({type:t,data:e},r,n)=>ga&&e instanceof Blob?r?n(e):Es(e,n):va&&(e instanceof ArrayBuffer||ya(e))?r?n(e):Es(new Blob([e]),n):n(Lt[t]+(e||"")),Es=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function Ss(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let _n;function Zl(t,e){if(ga&&t.data instanceof Blob)return t.data.arrayBuffer().then(Ss).then(e);if(va&&(t.data instanceof ArrayBuffer||ya(t.data)))return e(Ss(t.data));Xn(t,!1,r=>{_n||(_n=new TextEncoder),e(_n.encode(r))})}const Ps="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Ps.length;t++)hr[Ps.charCodeAt(t)]=t;const eu=t=>{let e=t.length*.75,r=t.length,n,s=0,l,a,u,i;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const h=new ArrayBuffer(e),c=new Uint8Array(h);for(n=0;n<r;n+=4)l=hr[t.charCodeAt(n)],a=hr[t.charCodeAt(n+1)],u=hr[t.charCodeAt(n+2)],i=hr[t.charCodeAt(n+3)],c[s++]=l<<2|a>>4,c[s++]=(a&15)<<4|u>>2,c[s++]=(u&3)<<6|i&63;return h},tu=typeof ArrayBuffer=="function",Yn=(t,e)=>{if(typeof t!="string")return{type:"message",data:_a(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:ru(t.substring(1),e)}:Ir[r]?t.length>1?{type:Ir[r],data:t.substring(1)}:{type:Ir[r]}:Nn},ru=(t,e)=>{if(tu){const r=eu(t);return _a(r,e)}else return{base64:!0,data:t}},_a=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},wa="",nu=(t,e)=>{const r=t.length,n=new Array(r);let s=0;t.forEach((l,a)=>{Xn(l,!1,u=>{n[a]=u,++s===r&&e(n.join(wa))})})},su=(t,e)=>{const r=t.split(wa),n=[];for(let s=0;s<r.length;s++){const l=Yn(r[s],e);if(n.push(l),l.type==="error")break}return n};function au(){return new TransformStream({transform(t,e){Zl(t,r=>{const n=r.length;let s;if(n<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,n);else if(n<65536){s=new Uint8Array(3);const l=new DataView(s.buffer);l.setUint8(0,126),l.setUint16(1,n)}else{s=new Uint8Array(9);const l=new DataView(s.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(r)})}})}let wn;function Nr(t){return t.reduce((e,r)=>e+r.length,0)}function Tr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let s=0;s<e;s++)r[s]=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 iu(t,e){wn||(wn=new TextDecoder);const r=[];let n=0,s=-1,l=!1;return new TransformStream({transform(a,u){for(r.push(a);;){if(n===0){if(Nr(r)<1)break;const i=Tr(r,1);l=(i[0]&128)===128,s=i[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(Nr(r)<2)break;const i=Tr(r,2);s=new DataView(i.buffer,i.byteOffset,i.length).getUint16(0),n=3}else if(n===2){if(Nr(r)<8)break;const i=Tr(r,8),h=new DataView(i.buffer,i.byteOffset,i.length),c=h.getUint32(0);if(c>Math.pow(2,21)-1){u.enqueue(Nn);break}s=c*Math.pow(2,32)+h.getUint32(4),n=3}else{if(Nr(r)<s)break;const i=Tr(r,s);u.enqueue(Yn(l?i:wn.decode(i),e)),n=0}if(s===0||s>t){u.enqueue(Nn);break}}}})}const $a=4;function ot(t){if(t)return ou(t)}function ou(t){for(var e in ot.prototype)t[e]=ot.prototype[e];return t}ot.prototype.on=ot.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ot.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ot.prototype.off=ot.prototype.removeListener=ot.prototype.removeAllListeners=ot.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,s=0;s<r.length;s++)if(n=r[s],n===e||n.fn===e){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ot.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,s=r.length;n<s;++n)r[n].apply(this,e)}return this};ot.prototype.emitReserved=ot.prototype.emit;ot.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ot.prototype.hasListeners=function(t){return!!this.listeners(t).length};const tn=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ot=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),cu="arraybuffer";function ba(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const lu=Ot.setTimeout,uu=Ot.clearTimeout;function rn(t,e){e.useNativeTimers?(t.setTimeoutFn=lu.bind(Ot),t.clearTimeoutFn=uu.bind(Ot)):(t.setTimeoutFn=Ot.setTimeout.bind(Ot),t.clearTimeoutFn=Ot.clearTimeout.bind(Ot))}const fu=1.33;function du(t){return typeof t=="string"?hu(t):Math.ceil((t.byteLength||t.size)*fu)}function hu(t){let e=0,r=0;for(let n=0,s=t.length;n<s;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 Ea(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function pu(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function mu(t){let e={},r=t.split("&");for(let n=0,s=r.length;n<s;n++){let l=r[n].split("=");e[decodeURIComponent(l[0])]=decodeURIComponent(l[1])}return e}class gu extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class Zn extends ot{constructor(e){super(),this.writable=!1,rn(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 gu(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=Yn(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=pu(e);return r.length?"?"+r:""}}class vu extends Zn{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)};su(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,nu(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]=Ea()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let Sa=!1;try{Sa=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const yu=Sa;function _u(){}class wu extends vu{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",(s,l)=>{this.onError("xhr post error",s,l)})}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 qt extends ot{constructor(e,r,n){super(),this.createRequest=e,rn(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=ba(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 s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&n.setRequestHeader(s,this._opts.extraHeaders[s])}}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 s;n.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.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(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=qt.requestsCount++,qt.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=_u,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete qt.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()}}qt.requestsCount=0;qt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ks);else if(typeof addEventListener=="function"){const t="onpagehide"in Ot?"pagehide":"unload";addEventListener(t,ks,!1)}}function ks(){for(let t in qt.requests)qt.requests.hasOwnProperty(t)&&qt.requests[t].abort()}const $u=function(){const t=Pa({xdomain:!1});return t&&t.responseType!==null}();class bu extends wu{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=$u&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new qt(Pa,this.uri(),e)}}function Pa(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||yu))return new XMLHttpRequest}catch{}if(!e)try{return new Ot[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ka=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Eu extends Zn{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=ka?{}:ba(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(s){return this.emitReserved("error",s)}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],s=r===e.length-1;Xn(n,this.supportsBinary,l=>{try{this.doWrite(n,l)}catch{}s&&tn(()=>{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]=Ea()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const $n=Ot.WebSocket||Ot.MozWebSocket;class Su extends Eu{createSocket(e,r,n){return ka?new $n(e,r,n):r?new $n(e,r):new $n(e)}doWrite(e,r){this.ws.send(r)}}class Pu extends Zn{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=iu(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),s=au();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const l=()=>{n.read().then(({done:u,value:i})=>{u||(this.onPacket(i),l())}).catch(u=>{})};l();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],s=r===e.length-1;this._writer.write(n).then(()=>{s&&tn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const ku={websocket:Su,webtransport:Pu,polling:bu},Ou=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nu=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Tn(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 s=Ou.exec(t||""),l={},a=14;for(;a--;)l[Nu[a]]=s[a]||"";return r!=-1&&n!=-1&&(l.source=e,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=Tu(l,l.path),l.queryKey=Ru(l,l.query),l}function Tu(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 Ru(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,l){s&&(r[s]=l)}),r}const Rn=typeof addEventListener=="function"&&typeof removeEventListener=="function",Cr=[];Rn&&addEventListener("offline",()=>{Cr.forEach(t=>t())},!1);class Jt extends ot{constructor(e,r){if(super(),this.binaryType=cu,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=Tn(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=Tn(r.host).host);rn(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 s=n.prototype.name;this.transports.push(s),this._transportsByName[s]=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=mu(this.opts.query)),Rn&&(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"})},Cr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=$a,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&&Jt.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",Jt.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 s=this.writeBuffer[n].data;if(s&&(r+=du(s)),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,tn(()=>{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,s){if(typeof r=="function"&&(s=r,r=void 0),typeof n=="function"&&(s=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const l={type:e,data:r,options:n};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),s&&this.once("flush",s),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(Jt.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(),Rn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Cr.indexOf(this._offlineEventListener);n!==-1&&Cr.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Jt.protocol=$a;class Iu extends Jt{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;Jt.priorWebsocketSuccess=!1;const s=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Jt.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(c(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=r.name,this.emitReserved("upgradeError",w)}}))};function l(){n||(n=!0,c(),r.close(),r=null)}const a=d=>{const w=new Error("probe error: "+d);w.transport=r.name,l(),this.emitReserved("upgradeError",w)};function u(){a("transport closed")}function i(){a("socket closed")}function h(d){r&&d.name!==r.name&&l()}const c=()=>{r.removeListener("open",s),r.removeListener("error",a),r.removeListener("close",u),this.off("close",i),this.off("upgrading",h)};r.once("open",s),r.once("error",a),r.once("close",u),this.once("close",i),this.once("upgrading",h),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 Cu=class extends Iu{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(s=>ku[s]).filter(s=>!!s)),super(e,n)}};function Au(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=Tn(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 l=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+l+":"+n.port+e,n.href=n.protocol+"://"+l+(r&&r.port===n.port?"":":"+n.port),n}const ju=typeof ArrayBuffer=="function",Mu=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Oa=Object.prototype.toString,Du=typeof Blob=="function"||typeof Blob<"u"&&Oa.call(Blob)==="[object BlobConstructor]",qu=typeof File=="function"||typeof File<"u"&&Oa.call(File)==="[object FileConstructor]";function es(t){return ju&&(t instanceof ArrayBuffer||Mu(t))||Du&&t instanceof Blob||qu&&t instanceof File}function Ar(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Ar(t[r]))return!0;return!1}if(es(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ar(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Ar(t[r]))return!0;return!1}function Lu(t){const e=[],r=t.data,n=t;return n.data=In(r,e),n.attachments=e.length,{packet:n,buffers:e}}function In(t,e){if(!t)return t;if(es(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]=In(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]=In(t[n],e));return r}return t}function Vu(t,e){return t.data=Cn(t.data,e),delete t.attachments,t}function Cn(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]=Cn(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Cn(t[r],e));return t}const Uu=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Fu=5;var De;(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"})(De||(De={}));class zu{constructor(e){this.replacer=e}encode(e){return(e.type===De.EVENT||e.type===De.ACK)&&Ar(e)?this.encodeAsBinary({type:e.type===De.EVENT?De.BINARY_EVENT:De.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===De.BINARY_EVENT||e.type===De.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=Lu(e),n=this.encodeAsString(r.packet),s=r.buffers;return s.unshift(n),s}}function Os(t){return Object.prototype.toString.call(t)==="[object Object]"}class ts extends ot{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===De.BINARY_EVENT;n||r.type===De.BINARY_ACK?(r.type=n?De.EVENT:De.ACK,this.reconstructor=new xu(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(es(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(De[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===De.BINARY_EVENT||n.type===De.BINARY_ACK){const l=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const a=e.substring(l,r);if(a!=Number(a)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(a)}if(e.charAt(r+1)==="/"){const l=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(l,r)}else n.nsp="/";const s=e.charAt(r+1);if(s!==""&&Number(s)==s){const l=r+1;for(;++r;){const a=e.charAt(r);if(a==null||Number(a)!=a){--r;break}if(r===e.length)break}n.id=Number(e.substring(l,r+1))}if(e.charAt(++r)){const l=this.tryParse(e.substr(r));if(ts.isPayloadValid(n.type,l))n.data=l;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 De.CONNECT:return Os(r);case De.DISCONNECT:return r===void 0;case De.CONNECT_ERROR:return typeof r=="string"||Os(r);case De.EVENT:case De.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Uu.indexOf(r[0])===-1);case De.ACK:case De.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xu{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=Vu(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Bu=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ts,Encoder:zu,get PacketType(){return De},protocol:Fu},Symbol.toStringTag,{value:"Module"}));function Rt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Hu=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Na extends ot{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=[Rt(e,"open",this.onopen.bind(this)),Rt(e,"packet",this.onpacket.bind(this)),Rt(e,"error",this.onerror.bind(this)),Rt(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,s,l;if(Hu.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 a={type:De.EVENT,data:r};if(a.options={},a.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const c=this.ids++,d=r.pop();this._registerAckCallback(c,d),a.id=c}const u=(s=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||s===void 0?void 0:s.writable,i=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!u||(i?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,r){var n;const s=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(s===void 0){this.acks[e]=r;return}const l=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"))},s),a=(...u)=>{this.io.clearTimeoutFn(l),r.apply(this,u)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...r){return new Promise((n,s)=>{const l=(a,u)=>a?s(a):n(u);l.withError=!0,r.push(l),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((s,...l)=>(this._queue[0],s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(s)):(this._queue.shift(),r&&r(null,...l)),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:De.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 De.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 De.EVENT:case De.BINARY_EVENT:this.onevent(e);break;case De.ACK:case De.BINARY_ACK:this.onack(e);break;case De.DISCONNECT:this.ondisconnect();break;case De.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(...s){n||(n=!0,r.packet({type:De.ACK,id:e,data:s}))}}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:De.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 ar(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}ar.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};ar.prototype.reset=function(){this.attempts=0};ar.prototype.setMin=function(t){this.ms=t};ar.prototype.setMax=function(t){this.max=t};ar.prototype.setJitter=function(t){this.jitter=t};class An extends ot{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,rn(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 ar({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const s=r.parser||Bu;this.encoder=new s.Encoder,this.decoder=new s.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 Cu(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const s=Rt(r,"open",function(){n.onopen(),e&&e()}),l=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),e?e(u):this.maybeReconnectOnOpen()},a=Rt(r,"error",l);if(this._timeout!==!1){const u=this._timeout,i=this.setTimeoutFn(()=>{s(),l(new Error("timeout")),r.close()},u);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}return this.subs.push(s),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Rt(e,"ping",this.onping.bind(this)),Rt(e,"data",this.ondata.bind(this)),Rt(e,"error",this.onerror.bind(this)),Rt(e,"close",this.onclose.bind(this)),Rt(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){tn(()=>{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 Na(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(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):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 ur={};function jr(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=Au(t,e.path||"/socket.io"),n=r.source,s=r.id,l=r.path,a=ur[s]&&l in ur[s].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||a;let i;return u?i=new An(n,e):(ur[s]||(ur[s]=new An(n,e)),i=ur[s]),r.query&&!e.query&&(e.query=r.queryKey),i.socket(r.path,e)}Object.assign(jr,{Manager:An,Socket:Na,io:jr,connect:jr});let Pt;const Ku=yr(!1),Gu={sockethub:{port:10550,host:"localhost",path:"/sockethub"},public:{protocol:"http",host:"localhost",port:10550,path:"/"}};async function Ta(){if(!Pt)throw new Error("Sockethub client is not initialized yet");await Pt.ready()}async function of(t){return await Ta(),Pt.contextFor(t)}function cf(t){return{id:t.id,type:t.type,name:t.name??t.id}}async function lf(t){return await Ta(),console.log("sending ->",t),new Promise((e,r)=>{Pt.socket.emit("message",hn("SEND",t),n=>{if(console.log("received <-",n),hn("RESP",n),n.totalItems&&n.items)for(const s of n.items.reverse())hn("RESP",s,!0);Vs(n,!0),n.error?r(n.error):e(n)})})}function bn(t){return e=>{const r=t==="connect";Ku.update(()=>r),console.log(`sockethub ${t} [connected: ${r}]`,e||"")}}function Wu(t){console.log("handle incoming: ",t),Vs(t,!1)}function Ns(t=Gu){Pt=new en(jr(`${t.public.protocol}://${t.public.host}:${t.public.port}`,{path:t.sockethub.path}),{initTimeoutMs:1e4}),Pt.socket.on("connect",bn("connect")),Pt.socket.on("error",bn("error")),Pt.socket.on("disconnect",bn("disconnect")),Pt.socket.on("message",Wu),Pt.socket.on("schemas",e=>{console.log("schemas received:",e),pn("schemas",e)}),Pt.socket.on("ready",e=>{console.log("client ready:",e),pn("ready",e)}),Pt.socket.on("init_error",e=>{console.error("client init error:",e),pn("init_error",e)})}typeof globalThis=="object"&&"window"in globalThis&&(console.log("connecting to sockethub"),fetch("/config.json").then(async t=>{const e=await t.json();Ns(e)}).catch(()=>{Ns()}));export{nf as I,sf as L,cf as a,Ku as b,of as c,Pt as d,Ta as e,Pn as f,Ls as g,bi as h,qs as i,lf as s};