@sockethub/examples 1.0.0-beta.0 → 1.0.0-beta.2

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 (64) hide show
  1. package/build/_app/immutable/assets/0.DcfK0tAS.css +1 -0
  2. package/build/_app/immutable/chunks/BJctjvPM.js +1 -0
  3. package/build/_app/immutable/chunks/BbNltU0J.js +1 -0
  4. package/build/_app/immutable/chunks/{1CEAjNji.js → BoJm-rJp.js} +2 -2
  5. package/build/_app/immutable/chunks/BrzeKAzG.js +2 -0
  6. package/build/_app/immutable/chunks/CDWD0DpS.js +1 -0
  7. package/build/_app/immutable/chunks/CT5jku5V.js +1 -0
  8. package/build/_app/immutable/chunks/{BgSSi_nq.js → CUkP7wPG.js} +1 -1
  9. package/build/_app/immutable/chunks/Cdx-st7a.js +1 -0
  10. package/build/_app/immutable/chunks/Cl-XOB7Z.js +1 -0
  11. package/build/_app/immutable/chunks/Cy27bMkS.js +1 -0
  12. package/build/_app/immutable/chunks/DbhdhNIA.js +37 -0
  13. package/build/_app/immutable/chunks/DmYLKglP.js +3 -0
  14. package/build/_app/immutable/chunks/Dn5i8FcP.js +1 -0
  15. package/build/_app/immutable/chunks/{OZH1Z0a6.js → k-cRz8DS.js} +1 -1
  16. package/build/_app/immutable/entry/app.9VcJfFEV.js +2 -0
  17. package/build/_app/immutable/entry/start.CjxPNHHO.js +1 -0
  18. package/build/_app/immutable/nodes/0.CxDeLLNM.js +39 -0
  19. package/build/_app/immutable/nodes/1.vrN-G10-.js +1 -0
  20. package/build/_app/immutable/nodes/10.CkEG6ShK.js +1 -0
  21. package/build/_app/immutable/nodes/11.Dr5oRP_F.js +1 -0
  22. package/build/_app/immutable/nodes/12.Dhj1Bcc5.js +1 -0
  23. package/build/_app/immutable/nodes/2.CtT9BzdB.js +5 -0
  24. package/build/_app/immutable/nodes/3.DvLQTmd4.js +1 -0
  25. package/build/_app/immutable/nodes/4.Cy-sRRDt.js +1 -0
  26. package/build/_app/immutable/nodes/5.CC9kaqH_.js +2 -0
  27. package/build/_app/immutable/nodes/6.ChLUpcIN.js +1 -0
  28. package/build/_app/immutable/nodes/{5.BHW8yhED.js → 7.Dp-S3Ioq.js} +1 -1
  29. package/build/_app/immutable/nodes/8.f8bTdAen.js +1 -0
  30. package/build/_app/immutable/nodes/{4.2xkip1qG.js → 9.BfkSU2iC.js} +1 -1
  31. package/build/_app/version.json +1 -1
  32. package/build/caldav.html +10 -10
  33. package/build/carddav.html +10 -10
  34. package/build/dummy.html +10 -10
  35. package/build/email.html +40 -0
  36. package/build/feeds.html +10 -10
  37. package/build/index.html +10 -10
  38. package/build/instagram.html +40 -0
  39. package/build/irc.html +10 -10
  40. package/build/messenger.html +40 -0
  41. package/build/metadata.html +10 -10
  42. package/build/xmpp.html +10 -10
  43. package/package.json +4 -4
  44. package/build/_app/immutable/assets/0.D81t2HYN.css +0 -1
  45. package/build/_app/immutable/chunks/C8dk2-j7.js +0 -1
  46. package/build/_app/immutable/chunks/CQSki_LV.js +0 -1
  47. package/build/_app/immutable/chunks/CdjPbSmN.js +0 -1
  48. package/build/_app/immutable/chunks/ChAAmblw.js +0 -1
  49. package/build/_app/immutable/chunks/D6O50hAO.js +0 -1
  50. package/build/_app/immutable/chunks/DQqZ5wJX.js +0 -37
  51. package/build/_app/immutable/chunks/DmF1jPXz.js +0 -1
  52. package/build/_app/immutable/chunks/Fuku2EMA.js +0 -1
  53. package/build/_app/immutable/chunks/YlCvXWJE.js +0 -2
  54. package/build/_app/immutable/chunks/mJhlxSRc.js +0 -1
  55. package/build/_app/immutable/entry/app.B5l5H9Jr.js +0 -2
  56. package/build/_app/immutable/entry/start.DvXUWyvA.js +0 -1
  57. package/build/_app/immutable/nodes/0.CsTQ1Eeu.js +0 -39
  58. package/build/_app/immutable/nodes/1.C0f2sebm.js +0 -1
  59. package/build/_app/immutable/nodes/2.UFZ_HUkg.js +0 -5
  60. package/build/_app/immutable/nodes/3.QCGY1WED.js +0 -1
  61. package/build/_app/immutable/nodes/6.BM3C0ZGx.js +0 -1
  62. package/build/_app/immutable/nodes/7.isUySRo5.js +0 -1
  63. package/build/_app/immutable/nodes/8.DYw6a0EN.js +0 -1
  64. package/build/_app/immutable/nodes/9.DyF8lTV5.js +0 -1
@@ -1,37 +0,0 @@
1
- var va=Object.defineProperty;var ya=(t,e,r)=>e in t?va(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Xe=(t,e,r)=>ya(t,typeof e!="symbol"?e+"":e,r);import{M as Dr,R as Zn,X as ar,D as ot,aG as ir,S as zr,g as ie,i as _a,U as wa,V as ba,W as Es,Y as sr,O as rr,ao as es,aU as $a,az as Ss,B as qr,aW as Bt,N as br,Q as Ea,a2 as Ps,_ as ni,aS as ts,aX as si,aY as Sa,aZ as Pa,a_ as ka,J as ii,L as ai,a$ as bn,aO as Br,aR as Oa,K as Hr,I as oi,b0 as ci,b1 as Na,t as dt,a1 as Ta,b2 as Ra,aV as Ia,aP as Ca,T as Aa,b3 as ja,b4 as ui,ai as rs,b5 as Ma,G as Da,H as qa,A as La,F as Va,b6 as Ua,b7 as Fa,b8 as za,b9 as Ba,ba as Ha,bb as Ka,bc as xa,bd as Ga,be as Wa,w as cr,a0 as Ja,p as Ht,s as qe,c as me,r as he,n as li,a as Kt,u as st,f as bt,bf as Qa,bg as Xa,bh as Ya,bi as Za,b as wt,v as $n,e as eo,d as tr,h as En,al as to}from"./OZH1Z0a6.js";import{B as ro,a as no,s as so,i as gt,l as Kr,p as nr,d as io,_ as ao}from"./DmF1jPXz.js";import{b as ks,e as oo,i as co,g as uo,d as rn,n as lo,j as fo,f as it,a as ze,s as tt,c as Jt,t as ho}from"./YlCvXWJE.js";import{i as fi}from"./CQSki_LV.js";function di(t,e){return e}function po(t,e,r){for(var n=[],s=e.length,c,i=e.length,u=0;u<s;u++){let d=e[u];ai(d,()=>{if(c){if(c.pending.delete(d),c.done.add(d),c.pending.size===0){var w=t.outrogroups;zn(ts(c.done)),w.delete(c),w.size===0&&(t.outrogroups=null)}}else i-=1},!1)}if(i===0){var a=n.length===0&&r!==null;if(a){var f=r,l=f.parentNode;Oa(l),l.append(f),t.items.clear()}zn(e,!a)}else c={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(c)}function zn(t,e=!0){for(var r=0;r<t.length;r++)Hr(t[r],e)}var Os;function Bn(t,e,r,n,s,c=null){var i=t,u=new Map,a=(e&ci)!==0;if(a){var f=t;i=ot?ar(ir(f)):f.appendChild(Dr())}ot&&zr();var l=null,d=_a(()=>{var o=r();return si(o)?o:o==null?[]:ts(o)}),w,S=!0;function $(){m.fallback=l,mo(m,w,i,e,n),l!==null&&(w.length===0?(l.f&Bt)===0?ii(l):(l.f^=Bt,gr(l,null,i)):ai(l,()=>{l=null}))}var E=Zn(()=>{w=ie(d);var o=w.length;let _=!1;if(ot){var p=wa(i)===ba;p!==(o===0)&&(i=Es(),ar(i),sr(!1),_=!0)}for(var y=new Set,b=qr,g=Ea(),h=0;h<o;h+=1){ot&&rr.nodeType===es&&rr.data===$a&&(i=rr,_=!0,sr(!1));var P=w[h],O=n(P,h),A=S?null:u.get(O);A?(A.v&&Ss(A.v,P),A.i&&Ss(A.i,h),g&&b.skipped_effects.delete(A.e)):(A=go(u,S?i:Os??(Os=Dr()),P,O,h,s,e,r),S||(A.e.f|=Bt),u.set(O,A)),y.add(O)}if(o===0&&c&&!l&&(S?l=br(()=>c(i)):(l=br(()=>c(Os??(Os=Dr()))),l.f|=Bt)),ot&&o>0&&ar(Es()),!S)if(g){for(const[F,L]of u)y.has(F)||b.skipped_effects.add(L.e);b.oncommit($),b.ondiscard(()=>{})}else $();_&&sr(!0),ie(d)}),m={effect:E,items:u,outrogroups:null,fallback:l};S=!1,ot&&(i=rr)}function mo(t,e,r,n,s){var A,F,L,X,G,ee,fe,we,Oe;var c=(n&Na)!==0,i=e.length,u=t.items,a=t.effect.first,f,l=null,d,w=[],S=[],$,E,m,o;if(c)for(o=0;o<i;o+=1)$=e[o],E=s($,o),m=u.get(E).e,(m.f&Bt)===0&&((F=(A=m.nodes)==null?void 0:A.a)==null||F.measure(),(d??(d=new Set)).add(m));for(o=0;o<i;o+=1){if($=e[o],E=s($,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&Bt)!==0)if(m.f^=Bt,m===a)gr(m,null,r);else{var _=l?l.next:a;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,l,m),Wt(t,m,_),gr(m,_,r),l=m,w=[],S=[],a=l.next;continue}if((m.f&bn)!==0&&(ii(m),c&&((X=(L=m.nodes)==null?void 0:L.a)==null||X.unfix(),(d??(d=new Set)).delete(m))),m!==a){if(f!==void 0&&f.has(m)){if(w.length<S.length){var p=S[0],y;l=p.prev;var b=w[0],g=w[w.length-1];for(y=0;y<w.length;y+=1)gr(w[y],p,r);for(y=0;y<S.length;y+=1)f.delete(S[y]);Wt(t,b.prev,g.next),Wt(t,l,b),Wt(t,g,p),a=p,l=g,o-=1,w=[],S=[]}else f.delete(m),gr(m,a,r),Wt(t,m.prev,m.next),Wt(t,m,l===null?t.effect.first:l.next),Wt(t,l,m),l=m;continue}for(w=[],S=[];a!==null&&a!==m;)(f??(f=new Set)).add(a),S.push(a),a=a.next;if(a===null)continue}(m.f&Bt)===0&&w.push(m),l=m,a=m.next}if(t.outrogroups!==null){for(const se of t.outrogroups)se.pending.size===0&&(zn(ts(se.done)),(G=t.outrogroups)==null||G.delete(se));t.outrogroups.size===0&&(t.outrogroups=null)}if(a!==null||f!==void 0){var h=[];if(f!==void 0)for(m of f)(m.f&bn)===0&&h.push(m);for(;a!==null;)(a.f&bn)===0&&a!==t.fallback&&h.push(a),a=a.next;var P=h.length;if(P>0){var O=(n&ci)!==0&&i===0?r:null;if(c){for(o=0;o<P;o+=1)(fe=(ee=h[o].nodes)==null?void 0:ee.a)==null||fe.measure();for(o=0;o<P;o+=1)(Oe=(we=h[o].nodes)==null?void 0:we.a)==null||Oe.fix()}po(t,h,O)}}c&&oi(()=>{var se,B;if(d!==void 0)for(m of d)(B=(se=m.nodes)==null?void 0:se.a)==null||B.apply()})}function go(t,e,r,n,s,c,i,u){var a=(i&Sa)!==0?(i&Pa)===0?ni(r,!1,!1):Ps(r):null,f=(i&ka)!==0?Ps(s):null;return{v:a,i:f,e:br(()=>(c(e,a??r,f??s,u),()=>{t.delete(n)}))}}function gr(t,e,r){if(t.nodes)for(var n=t.nodes.start,s=t.nodes.end,c=e&&(e.f&Bt)===0?e.nodes.start:r;n!==null;){var i=Br(n);if(c.before(n),n===s)return;n=i}}function Wt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function vo(t,e,r=!1,n=!1,s=!1){var c=t,i="";dt(()=>{var u=Ta;if(i===(i=e()??"")){ot&&zr();return}if(u.nodes!==null&&(Ra(u.nodes.start,u.nodes.end),u.nodes=null),i!==""){if(ot){rr.data;for(var a=zr(),f=a;a!==null&&(a.nodeType!==es||a.data!=="");)f=a,a=Br(a);if(a===null)throw Ia(),Ca;ks(rr,f),c=ar(a);return}var l=i+"";r?l=`<svg>${l}</svg>`:n&&(l=`<math>${l}</math>`);var d=oo(l);if((r||n)&&(d=ir(d)),ks(ir(d),d.lastChild),r||n)for(;ir(d);)c.before(ir(d));else c.before(d)}})}function yo(t,e,r,n,s){var u;ot&&zr();var c=(u=e.$$slots)==null?void 0:u[r],i=!1;c===!0&&(c=e.children,i=!0),c===void 0?s!==null&&s(t):c(t,i?()=>n:n)}function $d(t,e,...r){var n=new ro(t);Zn(()=>{const s=e()??null;n.ensure(s,s&&(c=>s(c,...r)))},Aa)}function _o(t,e){let r=null,n=ot;var s;if(ot){r=rr;for(var c=ir(document.head);c!==null&&(c.nodeType!==es||c.data!==t);)c=Br(c);if(c===null)sr(!1);else{var i=Br(c);c.remove(),ar(i)}}ot||(s=document.head.appendChild(Dr()));try{Zn(()=>e(s),ja)}finally{n&&(sr(!0),ar(r))}}function wo(t,e){var r=void 0,n;ui(()=>{r!==(r=e())&&(n&&(Hr(n),n=null),r&&(n=br(()=>{rs(()=>r(t))})))})}function hi(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=hi(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function bo(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=hi(t))&&(n&&(n+=" "),n+=e);return n}function $o(t){return typeof t=="object"?bo(t):t??""}const Ns=[...`
2
- \r\f \v\uFEFF`];function Eo(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var s in r)if(r[s])n=n?n+" "+s:s;else if(n.length)for(var c=s.length,i=0;(i=n.indexOf(s,i))>=0;){var u=i+c;(i===0||Ns.includes(n[i-1]))&&(u===n.length||Ns.includes(n[u]))?n=(i===0?"":n.substring(0,i))+n.substring(u+1):i=u}}return n===""?null:n}function Ts(t,e=!1){var r=e?" !important;":";",n="";for(var s in t){var c=t[s];c!=null&&c!==""&&(n+=" "+s+": "+c+r)}return n}function Sn(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function So(t,e){if(e){var r="",n,s;if(Array.isArray(e)?(n=e[0],s=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var c=!1,i=0,u=!1,a=[];n&&a.push(...Object.keys(n).map(Sn)),s&&a.push(...Object.keys(s).map(Sn));var f=0,l=-1;const E=t.length;for(var d=0;d<E;d++){var w=t[d];if(u?w==="/"&&t[d-1]==="*"&&(u=!1):c?c===w&&(c=!1):w==="/"&&t[d+1]==="*"?u=!0:w==='"'||w==="'"?c=w:w==="("?i++:w===")"&&i--,!u&&c===!1&&i===0){if(w===":"&&l===-1)l=d;else if(w===";"||d===E-1){if(l!==-1){var S=Sn(t.substring(f,l).trim());if(!a.includes(S)){w!==";"&&d++;var $=t.substring(f,d).trim();r+=" "+$+";"}}f=d+1,l=-1}}}}return n&&(r+=Ts(n)),s&&(r+=Ts(s,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function or(t,e,r,n,s,c){var i=t.__className;if(ot||i!==r||i===void 0){var u=Eo(r,n,c);(!ot||u!==t.getAttribute("class"))&&(u==null?t.removeAttribute("class"):e?t.className=u:t.setAttribute("class",u)),t.__className=r}else if(c&&s!==c)for(var a in c){var f=!!c[a];(s==null||f!==!!s[a])&&t.classList.toggle(a,f)}return c}function Pn(t,e={},r,n){for(var s in r){var c=r[s];e[s]!==c&&(r[s]==null?t.style.removeProperty(s):t.style.setProperty(s,c,n))}}function Po(t,e,r,n){var s=t.__style;if(ot||s!==e){var c=So(e,n);(!ot||c!==t.getAttribute("style"))&&(c==null?t.removeAttribute("style"):t.style.cssText=c),t.__style=e}else n&&(Array.isArray(n)?(Pn(t,r==null?void 0:r[0],n[0]),Pn(t,r==null?void 0:r[1],n[1],"important")):Pn(t,r,n));return n}function xr(t,e,r=!1){if(t.multiple){if(e==null)return;if(!si(e))return Ma();for(var n of t.options)n.selected=e.includes(wr(n));return}for(n of t.options){var s=wr(n);if(Da(s,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function pi(t){var e=new MutationObserver(()=>{xr(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),qa(()=>{e.disconnect()})}function Ed(t,e,r=e){var n=new WeakSet,s=!0;La(t,"change",c=>{var i=c?"[selected]":":checked",u;if(t.multiple)u=[].map.call(t.querySelectorAll(i),wr);else{var a=t.querySelector(i)??t.querySelector("option:not([disabled])");u=a&&wr(a)}r(u),qr!==null&&n.add(qr)}),rs(()=>{var c=e();if(t===document.activeElement){var i=Va??qr;if(n.has(i))return}if(xr(t,c,s),s&&c===void 0){var u=t.querySelector(":checked");u!==null&&(c=wr(u),r(c))}t.__value=c,s=!1}),pi(t)}function wr(t){return"__value"in t?t.__value:t.value}const vr=Symbol("class"),pr=Symbol("style"),mi=Symbol("is custom element"),gi=Symbol("is html");function ko(t){if(ot){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;$r(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var s=t.checked;$r(t,"checked",null),t.checked=s}}};t.__on_r=r,oi(r),Ha()}}function Oo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function $r(t,e,r,n){var s=vi(t);ot&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||s[e]!==(s[e]=r)&&(e==="loading"&&(t[Ga]=r),r==null?t.removeAttribute(e):typeof r!="string"&&yi(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function No(t,e,r,n,s=!1,c=!1){if(ot&&s&&t.tagName==="INPUT"){var i=t,u=i.type==="checkbox"?"defaultChecked":"defaultValue";u in r||ko(i)}var a=vi(t),f=a[mi],l=!a[gi];let d=ot&&f;d&&sr(!1);var w=e||{},S=t.tagName==="OPTION";for(var $ in e)$ in r||(r[$]=null);r.class?r.class=$o(r.class):r.class=null,r[pr]&&(r.style??(r.style=null));var E=yi(t);for(const g in r){let h=r[g];if(S&&g==="value"&&h==null){t.value=t.__value="",w[g]=h;continue}if(g==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";or(t,m,h,n,e==null?void 0:e[vr],r[vr]),w[g]=h,w[vr]=r[vr];continue}if(g==="style"){Po(t,h,e==null?void 0:e[pr],r[pr]),w[g]=h,w[pr]=r[pr];continue}var o=w[g];if(!(h===o&&!(h===void 0&&t.hasAttribute(g)))){w[g]=h;var _=g[0]+g[1];if(_!=="$$")if(_==="on"){const P={},O="$$"+g;let A=g.slice(2);var p=fo(A);if(co(A)&&(A=A.slice(0,-7),P.capture=!0),!p&&o){if(h!=null)continue;t.removeEventListener(A,w[O],P),w[O]=null}if(h!=null)if(p)t[`__${A}`]=h,rn([A]);else{let F=function(L){w[g].call(this,L)};w[O]=uo(A,t,F,P)}else p&&(t[`__${A}`]=void 0)}else if(g==="style")$r(t,g,h);else if(g==="autofocus")za(t,!!h);else if(!f&&(g==="__value"||g==="value"&&h!=null))t.value=t.__value=h;else if(g==="selected"&&S)Oo(t,h);else{var y=g;l||(y=lo(y));var b=y==="defaultValue"||y==="defaultChecked";if(h==null&&!f&&!b)if(a[g]=null,y==="value"||y==="checked"){let P=t;const O=e===void 0;if(y==="value"){let A=P.defaultValue;P.removeAttribute(y),P.defaultValue=A,P.value=P.__value=O?A:null}else{let A=P.defaultChecked;P.removeAttribute(y),P.defaultChecked=A,P.checked=O?A:!1}}else t.removeAttribute(g);else b||E.includes(y)&&(f||typeof h!="string")?(t[y]=h,y in a&&(a[y]=Ba)):typeof h!="function"&&$r(t,y,h)}}}return d&&sr(!0),w}function To(t,e,r=[],n=[],s=[],c,i=!1,u=!1){Ua(s,r,n,a=>{var f=void 0,l={},d=t.nodeName==="SELECT",w=!1;if(ui(()=>{var $=e(...a.map(ie)),E=No(t,f,$,c,i,u);w&&d&&"value"in $&&xr(t,$.value);for(let o of Object.getOwnPropertySymbols(l))$[o]||Hr(l[o]);for(let o of Object.getOwnPropertySymbols($)){var m=$[o];o.description===Fa&&(!f||m!==f[o])&&(l[o]&&Hr(l[o]),l[o]=br(()=>wo(t,()=>m))),E[o]=m}f=E}),d){var S=t;rs(()=>{xr(S,f.value,!0),pi(S)})}w=!0})}function vi(t){return t.__attributes??(t.__attributes={[mi]:t.nodeName.includes("-"),[gi]:t.namespaceURI===Ka})}var Rs=new Map;function yi(t){var e=t.getAttribute("is")||t.nodeName,r=Rs.get(e);if(r)return r;Rs.set(e,r=[]);for(var n,s=t,c=Element.prototype;c!==s;){n=Wa(s);for(var i in n)n[i].set&&r.push(i);s=xa(s)}return r}const Hn=cr([]),Ar=new Map;function _i(t,e=!1){var r,n,s;if(console.log("displayMessage called:",{type:t.type,platform:Wr(t["@context"]),isResponse:e,actor:t.actor,content:(r=t.object)==null?void 0:r.content}),t.type==="send"&&((n=t.object)==null?void 0:n.type)==="message"){const c=typeof t.actor=="string"?t.actor:((s=t.actor)==null?void 0:s.name)||"",i=t.object.content||"",u=`${c}:${i}`,a=Date.now(),f=Ar.get(u);if(f&&a-f<2e3){console.log("Skipping duplicate message:",u);return}Ar.set(u,a);for(const[l,d]of Ar)a-d>5e3&&Ar.delete(l);Hn.set([...Ja(Hn),[c,i]]),console.log("Message displayed:",{actorName:c,content:i,isResponse:e,platform:Wr(t["@context"])})}}var Ro=it("<li> </li>"),Io=it('<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 Sd(t,e){Ht(e,!1);const r=()=>no(Hn,"$messages",n),[n,s]=so();fi();var c=Io(),i=qe(me(c),2),u=me(i);Bn(u,5,r,di,(a,f)=>{var l=Ro(),d=me(l);he(l),dt(()=>tt(d,`${ie(f)[0]??""}: ${ie(f)[1]??""}`)),ze(a,l)}),he(u),li(2),he(i),he(c),ze(t,c),Kt(),s()}function Co(t,e,r){var s,c,i;const n=((s=e[r])==null?void 0:s.requestId)??r;return{sent:(c=t[n])==null?void 0:c[0],response:(i=t[r])==null?void 0:i[1]}}var Ao=it("<span> </span>");function ns(t,e){Ht(e,!0);const r=st(()=>Wr(e.entry["@context"]));var n=Ao(),s=me(n);he(n),dt(()=>tt(s,`[${ie(r)??"unknown"??""}:${e.entry.type??""}]`)),ze(t,n),Kt()}var jo=it("<!> <span> </span> <span> </span>",1);function Mo(t,e){Ht(e,!0);var r=jo(),n=bt(r);ns(n,{get entry(){return e.entry}});var s=qe(n,2),c=me(s);he(s);var i=qe(s,2),u=me(i,!0);he(i),dt(()=>{var a,f,l;tt(c,`#${e.id??""}
3
- ${(typeof e.entry.actor=="string"?e.entry.actor:((a=e.entry.actor)==null?void 0:a.name)||((f=e.entry.actor)==null?void 0:f.id))??""}:`),tt(u,((l=e.entry.object)==null?void 0:l.content)||"")}),ze(t,r),Kt()}var Do=it('<span class="font-medium">📰 Fetched feed:</span> <span> </span> <span class="text-gray-500"> </span>',1),qo=it("<span> </span>"),Lo=it('<span class="text-gray-500 text-xs italic"> </span>'),Vo=it('<span class="text-gray-500"> </span> <!> <span><a rel="noreferrer" target="_blank" class="text-blue-600 hover:text-blue-800 underline"> </a></span> <!>',1),Uo=it("<!> <!>",1);function Fo(t,e){Ht(e,!0);const r=st(()=>e.entry.totalItems!==void 0),n=st(()=>{var l;return ie(r)?e.entry.summary:(l=e.entry.object)==null?void 0:l.url}),s=st(()=>{var l,d;return typeof e.entry.actor=="string"?e.entry.actor:((l=e.entry.actor)==null?void 0:l.name)||((d=e.entry.actor)==null?void 0:d.id)});var c=Uo(),i=bt(c);ns(i,{get entry(){return e.entry}});var u=qe(i,2);{var a=l=>{var d=Do(),w=qe(bt(d),2),S=me(w,!0);he(w);var $=qe(w,2),E=me($);he($),dt(()=>{tt(S,ie(n)),tt(E,`(${e.entry.totalItems??""} ${e.entry.totalItems===1?"item":"items"})`)}),ze(l,d)},f=l=>{var d=Vo(),w=bt(d),S=me(w);he(w);var $=qe(w,2);{var E=b=>{var g=qo(),h=me(g);he(g),dt(()=>tt(h,`${ie(s)??""}:`)),ze(b,g)};gt($,b=>{ie(s)&&b(E)})}var m=qe($,2),o=me(m),_=me(o,!0);he(o),he(m);var p=qe(m,2);{var y=b=>{var g=Lo(),h=me(g,!0);he(g),dt(P=>tt(h,P),[()=>{var P;return(P=e.entry.object)==null?void 0:P.published.split("T")[0]}]),ze(b,g)};gt(p,b=>{var g;(g=e.entry.object)!=null&&g.published&&b(y)})}dt(()=>{var b,g,h;tt(S,`#${e.id??""}`),$r(o,"href",(b=e.entry.object)==null?void 0:b.url),tt(_,((g=e.entry.object)==null?void 0:g.title)||(typeof e.entry.target=="string"?e.entry.target:(h=e.entry.target)==null?void 0:h.id))}),ze(l,d)};gt(u,l=>{ie(r)?l(a):l(f,!1)})}ze(t,c),Kt()}var zo=it("<!> <span> </span>",1);function Bo(t,e){Ht(e,!0);var r=zo(),n=bt(r);ns(n,{get entry(){return e.entry}});var s=qe(n,2),c=me(s);he(s),dt(()=>{var i,u;return tt(c,`#${e.id??""}
4
- ${(typeof e.entry.actor=="string"?e.entry.actor:((i=e.entry.actor)==null?void 0:i.name)||((u=e.entry.actor)==null?void 0:u.id))??""}`)}),ze(t,r),Kt()}var Ho=it('<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full"> </span>'),Ko=it('<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs font-medium rounded-full"> </span>'),xo=it('<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>'),Go=it('<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 Is(t,e){Ht(e,!0);const r=st(()=>Wr(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":""),c=st(()=>e.hasSend&&e.hasResponse?"bg-green-500":e.hasSend?"bg-orange-400":"bg-green-500");var i=Go(),u=me(i),a=me(u),f=me(a),l=qe(f,2),d=me(l,!0);he(l),he(a);var w=qe(a,2),S=me(w),$=me(S),E=me($),m=me(E,!0);he(E);var o=qe(E,2);{var _=L=>{var X=Ho(),G=me(X,!0);he(X),dt(ee=>tt(G,ee),[()=>ie(r).toUpperCase()]),ze(L,X)};gt(o,L=>{ie(r)&&L(_)})}var p=qe(o,2);{var y=L=>{var X=Ko(),G=me(X,!0);he(X),dt(()=>tt(G,e.entry.type)),ze(L,X)};gt(p,L=>{e.entry.type&&L(y)})}he($);var b=qe($,2);b.__click=function(...L){var X;(X=e.buttonAction)==null||X.apply(this,L)},he(S);var g=qe(S,2),h=me(g);{var P=L=>{Mo(L,{get id(){return e.id},get entry(){return e.entry}})},O=L=>{var X=Jt(),G=bt(X);{var ee=we=>{Fo(we,{get id(){return e.id},get entry(){return e.entry}})},fe=we=>{Bo(we,{get id(){return e.id},get entry(){return e.entry}})};gt(G,we=>{ie(r)==="feeds"?we(ee):we(fe,!1)},!0)}ze(L,X)};gt(h,L=>{ie(r)==="dummy"?L(P):L(O,!1)})}he(g);var A=qe(g,2);{var F=L=>{var X=xo(),G=me(X),ee=qe(me(G),4),fe=me(ee,!0);he(ee),he(G),he(X),dt(()=>tt(fe,e.entry.error)),ze(L,X)};gt(A,L=>{e.entry.error&&L(F)})}he(w),he(u),he(i),dt(()=>{or(f,1,`w-3 h-3 ${ie(c)??""} rounded-full`),tt(d,ie(n)||`#${e.id}`),tt(m,ie(s))}),ze(t,i),Kt()}rn(["click"]);var Wo=it('<div class="mt-2 p-2 bg-red-50 border border-red-200 rounded-lg"><span class="text-red-700 text-xs"> </span></div>'),Jo=it('<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 Qo(t,e){Ht(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(h){if(!h||typeof h!="object")return"";const P=h;if(e.entry._logType==="schemas"){const A=(Array.isArray(P.platforms)?P.platforms:[]).map(L=>L==null?void 0:L.id).filter(Boolean);return`API v${typeof P.apiVersion=="number"?P.apiVersion:"unknown"} — ${A.length} platform${A.length!==1?"s":""}: ${A.join(", ")}`}if(e.entry._logType==="ready"){const O=typeof P.reason=="string"?P.reason:"",A=typeof P.apiVersion=="number"?P.apiVersion:"unknown",F=Array.isArray(P.platforms)?P.platforms.length:0;return`${O} — Sockethub API v${A}, ${F} platform${F!==1?"s":""}`}if(e.entry._logType==="init_error"){const O=typeof P.error=="string"?P.error:"unknown",A=typeof P.phase=="string"?P.phase:"",F=P.retrying?" (retrying)":"";return`${A}: ${O}${F}`}return JSON.stringify(h).slice(0,120)}const c=st(()=>s(e.entry.payload)),i=st(()=>new Date(e.entry._timestamp).toLocaleTimeString());var u=Jo(),a=me(u),f=me(a),l=me(f),d=qe(l,2),w=me(d,!0);he(d),he(f);var S=qe(f,2),$=me(S),E=me($),m=me(E),o=me(m,!0);he(m),he(E);var _=qe(E,2);_.__click=function(...h){var P;(P=e.buttonAction)==null||P.apply(this,h)},he($);var p=qe($,2),y=me(p,!0);he(p);var b=qe(p,2);{var g=h=>{var P=Wo(),O=me(P),A=me(O,!0);he(O),he(P),dt(()=>{var F;return tt(A,((F=e.entry.payload)==null?void 0:F.error)??"")}),ze(h,P)};gt(b,h=>{e.entry._logType==="init_error"&&h(g)})}he(S),he(a),he(u),dt(()=>{or(l,1,`w-3 h-3 ${e.entry._logType==="init_error"?"bg-red-500":"bg-indigo-500"} rounded-full`),tt(w,ie(i)),or(m,1,`px-2 py-1 ${ie(n).bg??""} ${ie(n).color??""} text-xs font-semibold rounded-full`),tt(o,ie(n).label),tt(y,ie(c))}),ze(t,u),Kt()}rn(["click"]);function Xo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var kn,Cs;function Yo(){if(Cs)return kn;Cs=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],be=typeof ne;(be==="object"||be==="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 be in q)ne[be]=q[be];return Y.forEach(function(be){for(const Je in be)ne[Je]=be[Je]}),ne}const s="</span>",c=q=>!!q.scope,i=(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((be,Je)=>`${be}${"_".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(!c(Y))return;const ne=i(Y.scope,{prefix:this.classPrefix});this.span(ne)}closeNode(Y){c(Y)&&(this.buffer+=s)}value(){return this.buffer}span(Y){this.buffer+=`<span class="${Y}">`}}const a=(q={})=>{const Y={children:[]};return Object.assign(Y,q),Y};class f{constructor(){this.rootNode=a(),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=a({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(be=>this._walk(Y,be)),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=>{f._collapse(ne)}))}}class l extends f{constructor(Y){super(),this.options=Y}addText(Y){Y!==""&&this.add(Y)}startScope(Y){this.openNode(Y)}endScope(){this.closeNode()}__addSublanguage(Y,ne){const be=Y.root;ne&&(be.scope=`language:${ne}`),this.add(be)}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 S(q){return E("(?:",q,")*")}function $(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(be=>d(be)).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 y=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function b(q,{joinWith:Y}){let ne=0;return q.map(be=>{ne+=1;const Je=ne;let Ze=d(be),le="";for(;Ze.length>0;){const ce=y.exec(Ze);if(!ce){le+=Ze;break}le+=Ze.substring(0,ce.index),Ze=Ze.substring(ce.index+ce[0].length),ce[0][0]==="\\"&&ce[1]?le+="\\"+String(Number(ce[1])+Je):(le+=ce[0],ce[0]==="("&&ne++)}return le}).map(be=>`(${be})`).join(Y)}const g=/\b\B/,h="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",O="\\b\\d+(\\.\\d+)?",A="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",F="\\b(0b[01]+)",L="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",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,be)=>{ne.index!==0&&be.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 be=n({scope:"comment",begin:q,end:Y,contains:[]},ne);be.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 be.contains.push({begin:E(/[ ]+/,"(",Je,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),be},se=Oe("//","$"),B=Oe("/\\*","\\*/"),T=Oe("#","$"),M={scope:"number",begin:O,relevance:0},R={scope:"number",begin:A,relevance:0},v={scope:"number",begin:F,relevance:0},k={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[G,{begin:/\[/,end:/\]/,relevance:0,contains:[G]}]},j={scope:"title",begin:h,relevance:0},W={scope:"title",begin:P,relevance:0},Q={begin:"\\.\\s*"+P,relevance:0};var re=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:G,BINARY_NUMBER_MODE:v,BINARY_NUMBER_RE:F,COMMENT:Oe,C_BLOCK_COMMENT_MODE:B,C_LINE_COMMENT_MODE:se,C_NUMBER_MODE:R,C_NUMBER_RE:A,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:h,MATCH_NOTHING_RE:g,METHOD_GUARD:Q,NUMBER_MODE:M,NUMBER_RE:O,PHRASAL_WORDS_MODE:we,QUOTE_STRING_MODE:fe,REGEXP_MODE:k,RE_STARTERS_RE:L,SHEBANG:X,TITLE_MODE:j,UNDERSCORE_IDENT_RE:P,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 V(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(be=>{delete q[be]}),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"],Ue="keyword";function Re(q,Y,ne=Ue){const be=Object.create(null);return typeof q=="string"?Je(ne,q.split(" ")):Array.isArray(q)?Je(ne,q):Object.keys(q).forEach(function(Ze){Object.assign(be,Re(q[Ze],Y,Ze))}),be;function Je(Ze,le){Y&&(le=le.map(ce=>ce.toLowerCase())),le.forEach(function(ce){const ye=ce.split("|");be[ye[0]]=[Ze,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 Be={},Ie=q=>{console.error(q)},yt=(q,...Y)=>{console.log(`WARN: ${q}`,...Y)},Ye=(q,Y)=>{Be[`${q}/${Y}`]||(console.log(`Deprecated as of ${q}. ${Y}`),Be[`${q}/${Y}`]=!0)},ht=new Error;function Et(q,Y,{key:ne}){let be=0;const Je=q[ne],Ze={},le={};for(let ce=1;ce<=Y.length;ce++)le[ce+be]=Je[ce],Ze[ce+be]=!0,be+=_(Y[ce-1]);q[ne]=le,q[ne]._emit=Ze,q[ne]._multi=!0}function ut(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;Et(q,q.begin,{key:"beginScope"}),q.begin=b(q.begin,{joinWith:""})}}function $t(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;Et(q,q.end,{key:"endScope"}),q.end=b(q.end,{joinWith:""})}}function Pr(q){q.scope&&typeof q.scope=="object"&&q.scope!==null&&(q.beginScope=q.scope,delete q.scope)}function kr(q){Pr(q),typeof q.beginScope=="string"&&(q.beginScope={_wrap:q.beginScope}),typeof q.endScope=="string"&&(q.endScope={_wrap:q.endScope}),ut(q),$t(q)}function Zt(q){function Y(le,ce){return new RegExp(d(le),"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(b(ce,{joinWith:"|"}),!0),this.lastIndex=0}exec(ce){this.matcherRe.lastIndex=this.lastIndex;const ye=this.matcherRe.exec(ce);if(!ye)return null;const at=ye.findIndex((C,U)=>U>0&&C!==void 0),D=this.matchIndexes[at];return ye.splice(0,at),Object.assign(ye,D)}}class be{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(([at,D])=>ye.addRule(at,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 at=ye.exec(ce);if(this.resumingScanAtSamePosition()&&!(at&&at.index===this.lastIndex)){const D=this.getMatcher(0);D.lastIndex=this.lastIndex+1,at=D.exec(ce)}return at&&(this.regexIndex+=at.position+1,this.regexIndex===this.count&&this.considerAll()),at}}function Je(le){const ce=new be;return le.contains.forEach(ye=>ce.addRule(ye.begin,{rule:ye,type:"begin"})),le.terminatorEnd&&ce.addRule(le.terminatorEnd,{type:"end"}),le.illegal&&ce.addRule(le.illegal,{type:"illegal"}),ce}function Ze(le,ce){const ye=le;if(le.isCompiled)return ye;[N,z,kr,te].forEach(D=>D(le,ce)),q.compilerExtensions.forEach(D=>D(le,ce)),le.__beforeBegin=null,[I,V,J].forEach(D=>D(le,ce)),le.isCompiled=!0;let at=null;return typeof le.keywords=="object"&&le.keywords.$pattern&&(le.keywords=Object.assign({},le.keywords),at=le.keywords.$pattern,delete le.keywords.$pattern),at=at||/\w+/,le.keywords&&(le.keywords=Re(le.keywords,q.case_insensitive)),ye.keywordPatternRe=Y(at,!0),ce&&(le.begin||(le.begin=/\B|\b/),ye.beginRe=Y(ye.begin),!le.end&&!le.endsWithParent&&(le.end=/\B|\b/),le.end&&(ye.endRe=Y(ye.end)),ye.terminatorEnd=d(ye.end)||"",le.endsWithParent&&ce.terminatorEnd&&(ye.terminatorEnd+=(le.end?"|":"")+ce.terminatorEnd)),le.illegal&&(ye.illegalRe=Y(le.illegal)),le.contains||(le.contains=[]),le.contains=[].concat(...le.contains.map(function(D){return gn(D==="self"?le:D)})),le.contains.forEach(function(D){Ze(D,ye)}),le.starts&&Ze(le.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||{}),Ze(q)}function lr(q){return q?q.endsWithParent||lr(q.starts):!1}function gn(q){return q.variants&&!q.cachedVariants&&(q.cachedVariants=q.variants.map(function(Y){return n(q,{variants:null},Y)})),q.cachedVariants?q.cachedVariants:lr(q)?n(q,{starts:q.starts?n(q.starts):null}):Object.isFrozen(q)?n(q):q}var Or="11.11.1";class St extends Error{constructor(Y,ne){super(Y),this.name="HTMLInjectionError",this.html=ne}}const fr=r,Nr=n,Tr=Symbol("nomatch"),vn=7,Rr=function(q){const Y=Object.create(null),ne=Object.create(null),be=[];let Je=!0;const Ze="Could not find the language '{}', did you forget to load/include a language module?",le={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:l};function ye(Z){return ce.noHighlightRe.test(Z)}function at(Z){let ue=Z.className+" ";ue+=Z.parentNode?Z.parentNode.className:"";const Se=ce.languageDetectRe.exec(ue);if(Se){const Me=Le(Se[1]);return Me||(yt(Ze.replace("{}",Se[1])),yt("Falling back to no-highlight mode for this block.",Z)),Me?Se[1]:"no-highlight"}return ue.split(/\s+/).find(Me=>ye(Me)||Le(Me))}function D(Z,ue,Se){let Me="",Qe="";typeof ue=="object"?(Me=Z,Se=ue.ignoreIllegals,Qe=ue.language):(Ye("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ye("10.7.0",`Please use highlight(code, options) instead.
5
- https://github.com/highlightjs/highlight.js/issues/2277`),Qe=Z,Me=ue),Se===void 0&&(Se=!0);const _t={code:Me,language:Qe};Nt("before:highlight",_t);const Tt=_t.result?_t.result:C(_t.language,_t.code,Se);return Tt.code=_t.code,Nt("after:highlight",Tt),Tt}function C(Z,ue,Se,Me){const Qe=Object.create(null);function _t(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 He=jt.case_insensitive?pe[0].toLowerCase():pe[0],pt=_t(Pe,He);if(pt){const[Ft,ma]=pt;if(ft.addText(Ne),Ne="",Qe[He]=(Qe[He]||0)+1,Qe[He]<=vn&&(Cr+=ma),Ft.startsWith("_"))Ne+=pe[0];else{const ga=jt.classNameAliases[Ft]||Ft;vt(pe[0],ga)}}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,$s[Pe.subLanguage]),$s[Pe.subLanguage]=oe._top}else oe=K(We,Pe.subLanguage.length?Pe.subLanguage:null);Pe.relevance>0&&(Cr+=oe.relevance),ft.__addSublanguage(oe._emitter,oe.language)}function lt(){Pe.subLanguage!=null?Ut():Tt(),We=""}function vt(oe,pe){oe!==""&&(ft.startScope(pe),ft.addText(oe),ft.endScope())}function dr(oe,pe){let Ne=1;const He=pe.length-1;for(;Ne<=He;){if(!oe._emit[Ne]){Ne++;continue}const pt=jt.classNameAliases[oe[Ne]]||oe[Ne],Ft=pe[Ne];pt?vt(Ft,pt):(We=Ft,Tt(),We=""),Ne++}}function hr(oe,pe){return oe.scope&&typeof oe.scope=="string"&&ft.openNode(jt.classNameAliases[oe.scope]||oe.scope),oe.beginScope&&(oe.beginScope._wrap?(vt(We,jt.classNameAliases[oe.beginScope._wrap]||oe.beginScope._wrap),We=""):oe.beginScope._multi&&(dr(oe.beginScope,pe),We="")),Pe=Object.create(oe,{parent:{value:Pe}}),Pe}function Gt(oe,pe,Ne){let He=p(oe.endRe,Ne);if(He){if(oe["on:end"]){const pt=new e(oe);oe["on:end"](pe,pt),pt.isMatchIgnored&&(He=!1)}if(He){for(;oe.endsParent&&oe.parent;)oe=oe.parent;return oe}}if(oe.endsWithParent)return Gt(oe.parent,pe,Ne)}function la(oe){return Pe.matcher.regexIndex===0?(We+=oe[0],1):(wn=!0,0)}function fa(oe){const pe=oe[0],Ne=oe.rule,He=new e(Ne),pt=[Ne.__beforeBegin,Ne["on:begin"]];for(const Ft of pt)if(Ft&&(Ft(oe,He),He.isMatchIgnored))return la(pe);return Ne.skip?We+=pe:(Ne.excludeBegin&&(We+=pe),lt(),!Ne.returnBegin&&!Ne.excludeBegin&&(We=pe)),hr(Ne,oe),Ne.returnBegin?0:pe.length}function da(oe){const pe=oe[0],Ne=ue.substring(oe.index),He=Gt(Pe,oe,Ne);if(!He)return Tr;const pt=Pe;Pe.endScope&&Pe.endScope._wrap?(lt(),vt(pe,Pe.endScope._wrap)):Pe.endScope&&Pe.endScope._multi?(lt(),dr(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&&(Cr+=Pe.relevance),Pe=Pe.parent;while(Pe!==He.parent);return He.starts&&hr(He.starts,oe),pt.returnEnd?0:pe.length}function ha(){const oe=[];for(let pe=Pe;pe!==jt;pe=pe.parent)pe.scope&&oe.unshift(pe.scope);oe.forEach(pe=>ft.openNode(pe))}let Ir={};function bs(oe,pe){const Ne=pe&&pe[0];if(We+=oe,Ne==null)return lt(),0;if(Ir.type==="begin"&&pe.type==="end"&&Ir.index===pe.index&&Ne===""){if(We+=ue.slice(pe.index,pe.index+1),!Je){const He=new Error(`0 width match regex (${Z})`);throw He.languageName=Z,He.badRule=Ir.rule,He}return 1}if(Ir=pe,pe.type==="begin")return fa(pe);if(pe.type==="illegal"&&!Se){const He=new Error('Illegal lexeme "'+Ne+'" for mode "'+(Pe.scope||"<unnamed>")+'"');throw He.mode=Pe,He}else if(pe.type==="end"){const He=da(pe);if(He!==Tr)return He}if(pe.type==="illegal"&&Ne==="")return We+=`
6
- `,1;if(_n>1e5&&_n>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(Ze.replace("{}",Z)),new Error('Unknown language: "'+Z+'"');const pa=Zt(jt);let yn="",Pe=Me||pa;const $s={},ft=new ce.__emitter(ce);ha();let We="",Cr=0,er=0,_n=0,wn=!1;try{if(jt.__emitTokens)jt.__emitTokens(ue,ft);else{for(Pe.matcher.considerAll();;){_n++,wn?wn=!1:Pe.matcher.considerAll(),Pe.matcher.lastIndex=er;const oe=Pe.matcher.exec(ue);if(!oe)break;const pe=ue.substring(er,oe.index),Ne=bs(pe,oe);er=oe.index+Ne}bs(ue.substring(er))}return ft.finalize(),yn=ft.toHTML(),{language:Z,value:yn,relevance:Cr,illegal:!1,_emitter:ft,_top:Pe}}catch(oe){if(oe.message&&oe.message.includes("Illegal"))return{language:Z,value:fr(ue),illegal:!0,relevance:0,_illegalBy:{message:oe.message,index:er,context:ue.slice(er-100,er+100),mode:oe.mode,resultSoFar:yn},_emitter:ft};if(Je)return{language:Z,value:fr(ue),illegal:!1,relevance:0,errorRaised:oe,_emitter:ft,_top:Pe};throw oe}}function U(Z){const ue={value:fr(Z),illegal:!1,relevance:0,_top:le,_emitter:new ce.__emitter(ce)};return ue._emitter.addText(Z),ue}function K(Z,ue){ue=ue||ce.languages||Object.keys(Y);const Se=U(Z),Me=ue.filter(Le).filter(Ge).map(lt=>C(lt,Z,!1));Me.unshift(Se);const Qe=Me.sort((lt,vt)=>{if(lt.relevance!==vt.relevance)return vt.relevance-lt.relevance;if(lt.language&&vt.language){if(Le(lt.language).supersetOf===vt.language)return 1;if(Le(vt.language).supersetOf===lt.language)return-1}return 0}),[_t,Tt]=Qe,Ut=_t;return Ut.secondBest=Tt,Ut}function x(Z,ue,Se){const Me=ue&&ne[ue]||Se;Z.classList.add("hljs"),Z.classList.add(`language-${Me}`)}function de(Z){let ue=null;const Se=at(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 St("One of your code blocks includes unescaped HTML.",Z.innerHTML);ue=Z;const Me=ue.textContent,Qe=Se?D(Me,{language:Se,ignoreIllegals:!0}):K(Me);Z.innerHTML=Qe.value,Z.dataset.highlighted="yes",x(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=Nr(ce,Z)}const je=()=>{ke(),Ye("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function xe(){ke(),Ye("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let et=!1;function ke(){function Z(){ke()}if(document.readyState==="loading"){et||window.addEventListener("DOMContentLoaded",Z,!1),et=!0;return}document.querySelectorAll(ce.cssSelector).forEach(de)}function Ke(Z,ue){let Se=null;try{Se=ue(q)}catch(Me){if(Ie("Language definition for '{}' could not be registered.".replace("{}",Z)),Je)Ie(Me);else throw Me;Se=le}Se.name||(Se.name=Z),Y[Z]=Se,Se.rawDefinition=ue.bind(null,q),Se.aliases&&nt(Se.aliases,{languageName:Z})}function rt(Z){delete Y[Z];for(const ue of Object.keys(ne))ne[ue]===Z&&delete ne[ue]}function $e(){return Object.keys(Y)}function Le(Z){return Z=(Z||"").toLowerCase(),Y[Z]||Y[ne[Z]]}function nt(Z,{languageName:ue}){typeof Z=="string"&&(Z=[Z]),Z.forEach(Se=>{ne[Se.toLowerCase()]=ue})}function Ge(Z){const ue=Le(Z);return ue&&!ue.disableAutodetect}function At(Z){Z["before:highlightBlock"]&&!Z["before:highlightElement"]&&(Z["before:highlightElement"]=ue=>{Z["before:highlightBlock"](Object.assign({block:ue.el},ue))}),Z["after:highlightBlock"]&&!Z["after:highlightElement"]&&(Z["after:highlightElement"]=ue=>{Z["after:highlightBlock"](Object.assign({block:ue.el},ue))})}function Pt(Z){At(Z),be.push(Z)}function kt(Z){const ue=be.indexOf(Z);ue!==-1&&be.splice(ue,1)}function Nt(Z,ue){const Se=Z;be.forEach(function(Me){Me[Se]&&Me[Se](ue)})}function Vt(Z){return Ye("10.7.0","highlightBlock will be removed entirely in v12.0"),Ye("10.7.0","Please use highlightElement now."),de(Z)}Object.assign(q,{highlight:D,highlightAuto:K,highlightAll:ke,highlightElement:de,highlightBlock:Vt,configure:ge,initHighlighting:je,initHighlightingOnLoad:xe,registerLanguage:Ke,unregisterLanguage:rt,listLanguages:$e,getLanguage:Le,registerAliases:nt,autoDetection:Ge,inherit:Nr,addPlugin:Pt,removePlugin:kt}),q.debugMode=function(){Je=!1},q.safeMode=function(){Je=!0},q.versionString=Or,q.regex={concat:E,lookahead:w,either:o,optional:$,anyNumberOfTimes:S};for(const Z in re)typeof re[Z]=="object"&&t(re[Z]);return Object.assign(q,re),q},xt=Rr({});return xt.newInstance=()=>Rr({}),kn=xt,xt.HighlightJS=xt,xt.default=xt,kn}var Zo=Yo();const As=Xo(Zo);var ec=it("<pre><code><!></code></pre>");function tc(t,e){const r=Kr(e,["children","$$slots","$$events","$$legacy"]),n=Kr(r,["code","highlighted","languageName","langtag"]);let s=nr(e,"code",8),c=nr(e,"highlighted",8),i=nr(e,"languageName",8,"plaintext"),u=nr(e,"langtag",8,!1);var a=ec();To(a,()=>({"data-language":i(),...n,[vr]:{langtag:u()}}),void 0,void 0,void 0,"svelte-4jgeki");var f=me(a);or(f,1,"",null,{},{hljs:!0});var l=me(f);{var d=S=>{var $=Jt(),E=bt($);vo(E,c),ze(S,$)},w=S=>{var $=ho();dt(()=>tt($,s())),ze(S,$)};gt(l,S=>{c()?S(d):S(w,!1)})}he(f),he(a),ze(t,a)}function js(t,e){const r=Kr(e,["children","$$slots","$$events","$$legacy"]),n=Kr(r,["language","code","langtag"]);Ht(e,!1);let s=nr(e,"language",8),c=nr(e,"code",8),i=nr(e,"langtag",8,!1);const u=Qa();let a=ni("");Xa(()=>{ie(a)&&u("highlight",{highlighted:ie(a)})}),Ya(()=>($n(s()),$n(c())),()=>{As.registerLanguage(s().name,s().register),wt(a,As.highlight(c(),{language:s().name}).value)}),Za(),fi();var f=Jt(),l=bt(f);yo(l,e,"default",{get highlighted(){return ie(a)}},d=>{tc(d,io(()=>n,{get languageName(){return $n(s()),eo(()=>s().name)},get langtag(){return i()},get highlighted(){return ie(a)},get code(){return c()}}))}),ze(t,f),Kt()}function rc(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 Ms={name:"json",register:rc},wi=cr({}),bi=cr({});let Gr=0;function On(t,e,r=!1,n){let s;const c=++Gr;e.id?s=e.id:s=`${c}`,e.id=s,r&&(s=`${s}-${++Gr}`);const i=Date.now();return bi.update(u=>(u[s]||(u[s]={timestamp:i,sortKey:c,requestId:n}),u)),wi.update(u=>{if(!u[s])t==="SEND"?u[s]=[e,{}]:u[s]=[{},e];else{const a=t==="SEND"?0:1;u[s][a]=e}return u}),e}const $i=cr([]);function Nn(t,e){const r={_logType:t,_logId:`${t}-${++Gr}`,_sortKey:Gr,_timestamp:Date.now(),payload:e};$i.update(n=>[r,...n])}var nc=it(`<style>body {
7
- overflow: hidden;
8
- }</style>`),sc=it('<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>'),ic=it('<ul class="divide-y divide-gray-100"></ul>'),ac=it('<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>'),oc=it(`<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.
9
- 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 Pd(t,e){Ht(e,!0);let r=tr(En({})),n=tr(En({})),s=tr(En([])),c=tr(!1),i=tr(""),u=tr(""),a=tr("ActivityStreams Data Exchange");wi.subscribe(M=>{wt(r,M,!0)}),bi.subscribe(M=>{wt(n,M,!0)}),$i.subscribe(M=>{wt(s,M,!0)});const f=st(()=>{const M=[];for(const[R,v]of Object.entries(ie(r)??{})){const k=ie(n)[R];M.push({kind:"activity",id:R,sortKey:(k==null?void 0:k.sortKey)??0,tuple:v,timestamp:(k==null?void 0:k.timestamp)??0})}for(const R of ie(s))M.push({kind:"schema",sortKey:R._sortKey,entry:R});return M.sort((R,v)=>v.sortKey-R.sortKey),M});function l(M){return()=>{const{sent:R,response:v}=Co(ie(r),ie(n),M);wt(a,"ActivityStreams Data Exchange"),wt(c,!0),wt(i,R?JSON.stringify(R,null,2):"",!0),wt(u,v&&Object.keys(v).length>0?JSON.stringify(v,null,2):"",!0)}}function d(M){return()=>{wt(a,`Schema Event: ${M._logType}`),wt(c,!0),wt(i,JSON.stringify(M.payload,null,2),!0),wt(u,"")}}var w=oc();_o("asm1x0",M=>{var R=Jt(),v=bt(R);{var k=j=>{var W=nc();ze(j,W)};gt(v,j=>{ie(c)&&j(k)})}ze(M,R)});var S=bt(w),$=qe(me(S),2),E=qe(me($),2),m=me(E);{var o=M=>{var R=sc();ze(M,R)},_=M=>{var R=ic();Bn(R,21,()=>ie(f),v=>v.kind==="schema"?v.entry._logId:v.id,(v,k)=>{var j=Jt(),W=bt(j);{var Q=re=>{{let ve=st(()=>d(ie(k).entry));Qo(re,{get entry(){return ie(k).entry},get buttonAction(){return ie(ve)}})}},ae=re=>{var ve=Jt(),N=bt(ve);{var I=z=>{var J=Jt(),te=bt(J);Bn(te,17,()=>Object.entries(ie(k).tuple[ie(k).tuple.length-1]),di,(Ee,Ue)=>{var Re=st(()=>to(ie(Ue),2));let Ae=()=>ie(Re)[0],_e=()=>ie(Re)[1];var Be=Jt(),Ie=bt(Be);{var yt=Ye=>{{let ht=st(()=>l(`${ie(k).id}-${Ae()}`)),Et=st(()=>Object.prototype.hasOwnProperty.call(ie(k).tuple[0],"@context")),ut=st(()=>typeof ie(r)[ie(k).id][1]<"u"),$t=st(()=>`${ie(k).id}-${Ae()}`);Is(Ye,{get buttonAction(){return ie(ht)},get hasSend(){return ie(Et)},get hasResponse(){return ie(ut)},get id(){return ie($t)},get entry(){return _e()},get timestamp(){return ie(k).timestamp}})}};gt(Ie,Ye=>{_e()&&Ye(yt)})}ze(Ee,Be)}),ze(z,J)},V=z=>{const J=st(()=>Object.prototype.hasOwnProperty.call(ie(k).tuple[0],"@context")),te=st(()=>Object.prototype.hasOwnProperty.call(ie(k).tuple[1],"@context"));{let Ee=st(()=>l(ie(k).id)),Ue=st(()=>ie(te)?ie(k).tuple[1]:ie(k).tuple[0]);Is(z,{get buttonAction(){return ie(Ee)},get id(){return ie(k).id},get hasSend(){return ie(J)},get hasResponse(){return ie(te)},get entry(){return ie(Ue)},get timestamp(){return ie(k).timestamp}})}};gt(N,z=>{Array.isArray(ie(k).tuple[ie(k).tuple.length-1])?z(I):z(V,!1)},!0)}ze(re,ve)};gt(W,re=>{ie(k).kind==="schema"?re(Q):re(ae,!1)})}ze(v,j)}),he(R),ze(M,R)};gt(m,M=>{ie(f).length===0?M(o):M(_,!1)})}he(E),he($),he(S);var p=qe(S,2),y=me(p),b=me(y),g=me(b),h=me(g),P=qe(me(h));he(h);var O=qe(h,2);O.__click=()=>wt(c,!1),he(g),li(2),he(b);var A=qe(b,2),F=me(A),L=me(F),X=me(L),G=me(X,!0);he(X);var ee=qe(X);he(L);var fe=qe(L,2),we=me(fe);js(we,{get language(){return Ms},get code(){return ie(i)}}),he(fe),he(F);var Oe=qe(F,2);{var se=M=>{var R=ac(),v=qe(me(R),2),k=me(v);js(k,{get language(){return Ms},get code(){return ie(u)}}),he(v),he(R),ze(M,R)};gt(Oe,M=>{ie(u)&&M(se)})}he(A);var B=qe(A,2),T=me(B);T.__click=()=>wt(c,!1),he(B),he(y),he(p),dt(()=>{or(p,1,`${ie(c)?"flex items-center justify-center":"hidden"} bg-black bg-opacity-50 fixed top-0 left-0 w-full h-full z-50 p-4`),tt(P,` ${ie(a)??""}`),tt(G,ie(u)?"📤":"📋"),tt(ee,` ${ie(u)?"Sent to Sockethub":"Event Payload"}`)}),ze(t,w),Kt()}rn(["click"]);var Ds="https://sockethub.org/ns/context/platform/";function Wr(t){if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.startsWith(Ds)){const r=e.slice(Ds.length),n=r.indexOf("/");if(n>0)return r.slice(0,n)}}}var cc=Object.create,uc=Object.getPrototypeOf,Jr=Object.defineProperty,Ei=Object.getOwnPropertyNames,lc=Object.getOwnPropertyDescriptor,Si=Object.prototype.hasOwnProperty;function Pi(t){return this[t]}var fc,Sr=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=fc??(fc=new WeakMap),c=s.get(t);if(c)return c}r=t!=null?cc(uc(t)):{};const i=Jr(r,"default",{value:t,enumerable:!0});if(t&&typeof t=="object"||typeof t=="function")for(let u of Ei(t))Si.call(i,u)||Jr(i,u,{get:Pi.bind(t,u),enumerable:!0});return n&&s.set(t,i),i},dc=t=>{var e=(qs??(qs=new WeakMap)).get(t),r;if(e)return e;if(e=Jr({},"__esModule",{value:!0}),t&&typeof t=="object"||typeof t=="function")for(var n of Ei(t))Si.call(e,n)||Jr(e,n,{get:Pi.bind(t,n),enumerable:!(r=lc(t,n))||r.enumerable});return qs.set(t,e),e},qs,H=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hc=(t,e,r)=>()=>{if(t)try{e=t(t=0)}catch(n){r=[n]}if(r)throw r[0];return e},Qr=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(_){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,y)=>`${p}${y}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((p,y)=>(y instanceof r&&(p[y.str]=(p[y.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function s(o,..._){const p=[o[0]];let y=0;for(;y<_.length;)u(p,_[y]),p.push(o[++y]);return new n(p)}t._=s;var c=new n("+");function i(o,..._){const p=[S(o[0])];let y=0;for(;y<_.length;)p.push(c),u(p,_[y]),p.push(c,S(o[++y]));return a(p),new n(p)}t.str=i;function u(o,_){_ instanceof n?o.push(..._._items):_ instanceof r?o.push(_):o.push(d(_))}t.addCodeArg=u;function a(o){let _=1;for(;_<o.length-1;){if(o[_]===c){const p=f(o[_-1],o[_+1]);if(p!==void 0){o.splice(_-1,3,p);continue}o[_++]="+"}_++}}function f(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 l(o,_){return _.emptyStr()?o:o.emptyStr()?_:i`${o}${_}`}t.strConcat=l;function d(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:S(Array.isArray(o)?o.join(","):o)}function w(o){return new n(S(o))}t.stringify=w;function S(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=S;function $(o){return typeof o=="string"&&t.IDENTIFIER.test(o)?new n(`.${o}`):s`[${o}]`}t.getProperty=$;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}),Ls=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Qr();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(a){a[a.Started=0]="Started",a[a.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:f,parent:l}={}){this._names={},this._prefixes=f,this._parent=l}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const l=this._names[f]||this._nameGroup(f);return`${f}${l.index++}`}_nameGroup(f){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class c extends e.Name{constructor(f,l){super(l),this.prefix=f}setValue(f,{property:l,itemIndex:d}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(l)}[${d}]`}}t.ValueScopeName=c;var i=(0,e._)`\n`;class u extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?i:e.nil}}get(){return this._scope}name(f){return new c(f,this._newName(f))}value(f,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(f),{prefix:S}=w,$=(d=l.key)!==null&&d!==void 0?d:l.ref;let E=this._values[S];if(E){const _=E.get($);if(_)return _}else E=this._values[S]=new Map;E.set($,w);const m=this._scope[S]||(this._scope[S]=[]),o=m.length;return m[o]=l.ref,w.setValue(l,{property:S,itemIndex:o}),w}getValue(f,l){const d=this._values[f];if(d)return d.get(l)}scopeRefs(f,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${f}${d.scopePath}`})}scopeCode(f=this._values,l,d){return this._reduceValues(f,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},l,d)}_reduceValues(f,l,d={},w){let S=e.nil;for(const $ in f){const E=f[$];if(!E)continue;const m=d[$]=d[$]||new Map;E.forEach(o=>{if(m.has(o))return;m.set(o,n.Started);let _=l(o);if(_){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;S=(0,e._)`${S}${p} ${o} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(o))S=(0,e._)`${S}${_}${this.opts._n}`;else throw new r(o);m.set(o,n.Completed)})}return S}}t.ValueScope=u}),Ce=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Qr(),r=Ls(),n=Qr();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=Ls();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 c{optimizeNodes(){return this}optimizeNames(v,k){return this}}class i extends c{constructor(v,k,j){super(),this.varKind=v,this.name=k,this.rhs=j}render({es5:v,_n:k}){const j=v?r.varKinds.var:this.varKind,W=this.rhs===void 0?"":` = ${this.rhs}`;return`${j} ${this.name}${W};`+k}optimizeNames(v,k){if(v[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,v,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends c{constructor(v,k,j){super(),this.lhs=v,this.rhs=k,this.sideEffects=j}render({_n:v}){return`${this.lhs} = ${this.rhs};`+v}optimizeNames(v,k){if(!(this.lhs instanceof e.Name&&!v[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,v,k),this}get names(){const v=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(v,this.rhs)}}class a extends u{constructor(v,k,j,W){super(v,j,W),this.op=k}render({_n:v}){return`${this.lhs} ${this.op}= ${this.rhs};`+v}}class f extends c{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`${this.label}:`+v}}class l extends c{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`break${this.label?` ${this.label}`:""};`+v}}class d extends c{constructor(v){super(),this.error=v}render({_n:v}){return`throw ${this.error};`+v}get names(){return this.error.names}}class w extends c{constructor(v){super(),this.code=v}render({_n:v}){return`${this.code};`+v}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(v,k){return this.code=G(this.code,v,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class S extends c{constructor(v=[]){super(),this.nodes=v}render(v){return this.nodes.reduce((k,j)=>k+j.render(v),"")}optimizeNodes(){const{nodes:v}=this;let k=v.length;for(;k--;){const j=v[k].optimizeNodes();Array.isArray(j)?v.splice(k,1,...j):j?v[k]=j:v.splice(k,1)}return v.length>0?this:void 0}optimizeNames(v,k){const{nodes:j}=this;let W=j.length;for(;W--;){const Q=j[W];Q.optimizeNames(v,k)||(ee(v,Q.names),j.splice(W,1))}return j.length>0?this:void 0}get names(){return this.nodes.reduce((v,k)=>L(v,k.names),{})}}class $ extends S{render(v){return"{"+v._n+super.render(v)+"}"+v._n}}class E extends S{}class m extends ${}m.kind="else";class o extends ${constructor(v,k){super(k),this.condition=v}render(v){let k=`if(${this.condition})`+super.render(v);return this.else&&(k+="else "+this.else.render(v)),k}optimizeNodes(){super.optimizeNodes();const v=this.condition;if(v===!0)return this.nodes;let k=this.else;if(k){const j=k.optimizeNodes();k=this.else=Array.isArray(j)?new m(j):j}if(k)return v===!1?k instanceof o?k:k.nodes:this.nodes.length?this:new o(fe(v),k instanceof o?[k]:k.nodes);if(!(v===!1||!this.nodes.length))return this}optimizeNames(v,k){var j;if(this.else=(j=this.else)===null||j===void 0?void 0:j.optimizeNames(v,k),!!(super.optimizeNames(v,k)||this.else))return this.condition=G(this.condition,v,k),this}get names(){const v=super.names;return X(v,this.condition),this.else&&L(v,this.else.names),v}}o.kind="if";class _ extends ${}_.kind="for";class p extends _{constructor(v){super(),this.iteration=v}render(v){return`for(${this.iteration})`+super.render(v)}optimizeNames(v,k){if(super.optimizeNames(v,k))return this.iteration=G(this.iteration,v,k),this}get names(){return L(super.names,this.iteration.names)}}class y extends _{constructor(v,k,j,W){super(),this.varKind=v,this.name=k,this.from=j,this.to=W}render(v){const k=v.es5?r.varKinds.var:this.varKind,{name:j,from:W,to:Q}=this;return`for(${k} ${j}=${W}; ${j}<${Q}; ${j}++)`+super.render(v)}get names(){const v=X(super.names,this.from);return X(v,this.to)}}class b extends _{constructor(v,k,j,W){super(),this.loop=v,this.varKind=k,this.name=j,this.iterable=W}render(v){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(v)}optimizeNames(v,k){if(super.optimizeNames(v,k))return this.iterable=G(this.iterable,v,k),this}get names(){return L(super.names,this.iterable.names)}}class g extends ${constructor(v,k,j){super(),this.name=v,this.args=k,this.async=j}render(v){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(v)}}g.kind="func";class h extends S{render(v){return"return "+super.render(v)}}h.kind="return";class P extends ${render(v){let k="try"+super.render(v);return this.catch&&(k+=this.catch.render(v)),this.finally&&(k+=this.finally.render(v)),k}optimizeNodes(){var v,k;return super.optimizeNodes(),(v=this.catch)===null||v===void 0||v.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(v,k){var j,W;return super.optimizeNames(v,k),(j=this.catch)===null||j===void 0||j.optimizeNames(v,k),(W=this.finally)===null||W===void 0||W.optimizeNames(v,k),this}get names(){const v=super.names;return this.catch&&L(v,this.catch.names),this.finally&&L(v,this.finally.names),v}}class O extends ${constructor(v){super(),this.error=v}render(v){return`catch(${this.error})`+super.render(v)}}O.kind="catch";class A extends ${render(v){return"finally"+super.render(v)}}A.kind="finally";class F{constructor(v,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
10
- `:""},this._extScope=v,this._scope=new r.Scope({parent:v}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(v){return this._scope.name(v)}scopeName(v){return this._extScope.name(v)}scopeValue(v,k){const j=this._extScope.value(v,k);return(this._values[j.prefix]||(this._values[j.prefix]=new Set)).add(j),j}getScopeValue(v,k){return this._extScope.getValue(v,k)}scopeRefs(v){return this._extScope.scopeRefs(v,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(v,k,j,W){const Q=this._scope.toName(k);return j!==void 0&&W&&(this._constants[Q.str]=j),this._leafNode(new i(v,Q,j)),Q}const(v,k,j){return this._def(r.varKinds.const,v,k,j)}let(v,k,j){return this._def(r.varKinds.let,v,k,j)}var(v,k,j){return this._def(r.varKinds.var,v,k,j)}assign(v,k,j){return this._leafNode(new u(v,k,j))}add(v,k){return this._leafNode(new a(v,t.operators.ADD,k))}code(v){return typeof v=="function"?v():v!==e.nil&&this._leafNode(new w(v)),this}object(...v){const k=["{"];for(const[j,W]of v)k.length>1&&k.push(","),k.push(j),(j!==W||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,W));return k.push("}"),new e._Code(k)}if(v,k,j){if(this._blockNode(new o(v)),k&&j)this.code(k).else().code(j).endIf();else if(k)this.code(k).endIf();else if(j)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(v){return this._elseNode(new o(v))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(o,m)}_for(v,k){return this._blockNode(v),k&&this.code(k).endFor(),this}for(v,k){return this._for(new p(v),k)}forRange(v,k,j,W,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const ae=this._scope.toName(v);return this._for(new y(Q,ae,k,j),()=>W(ae))}forOf(v,k,j,W=r.varKinds.const){const Q=this._scope.toName(v);if(this.opts.es5){const ae=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ae}.length`,re=>{this.var(Q,(0,e._)`${ae}[${re}]`),j(Q)})}return this._for(new b("of",W,Q,k),()=>j(Q))}forIn(v,k,j,W=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(v,(0,e._)`Object.keys(${k})`,j);const Q=this._scope.toName(v);return this._for(new b("in",W,Q,k),()=>j(Q))}endFor(){return this._endBlockNode(_)}label(v){return this._leafNode(new f(v))}break(v){return this._leafNode(new l(v))}return(v){const k=new h;if(this._blockNode(k),this.code(v),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(h)}try(v,k,j){if(!k&&!j)throw new Error('CodeGen: "try" without "catch" and "finally"');const W=new P;if(this._blockNode(W),this.code(v),k){const Q=this.name("e");this._currNode=W.catch=new O(Q),k(Q)}return j&&(this._currNode=W.finally=new A,this.code(j)),this._endBlockNode(O,A)}throw(v){return this._leafNode(new d(v))}block(v,k){return this._blockStarts.push(this._nodes.length),v&&this.code(v).endBlock(k),this}endBlock(v){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const j=this._nodes.length-k;if(j<0||v!==void 0&&j!==v)throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${v} expected`);return this._nodes.length=k,this}func(v,k=e.nil,j,W){return this._blockNode(new g(v,k,j)),W&&this.code(W).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(v=1){for(;v-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(v){return this._currNode.nodes.push(v),this}_blockNode(v){this._currNode.nodes.push(v),this._nodes.push(v)}_endBlockNode(v,k){const j=this._currNode;if(j instanceof v||k&&j instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${v.kind}/${k.kind}`:v.kind}"`)}_elseNode(v){const k=this._currNode;if(!(k instanceof o))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=v,this}get _root(){return this._nodes[0]}get _currNode(){const v=this._nodes;return v[v.length-1]}set _currNode(v){const k=this._nodes;k[k.length-1]=v}}t.CodeGen=F;function L(R,v){for(const k in v)R[k]=(R[k]||0)+(v[k]||0);return R}function X(R,v){return v instanceof e._CodeOrName?L(R,v.names):R}function G(R,v,k){if(R instanceof e.Name)return j(R);if(!W(R))return R;return new e._Code(R._items.reduce((Q,ae)=>(ae instanceof e.Name&&(ae=j(ae)),ae instanceof e._Code?Q.push(...ae._items):Q.push(ae),Q),[]));function j(Q){const ae=k[Q.str];return ae===void 0||v[Q.str]!==1?Q:(delete v[Q.str],ae)}function W(Q){return Q instanceof e._Code&&Q._items.some(ae=>ae instanceof e.Name&&v[ae.str]===1&&k[ae.str]!==void 0)}}function ee(R,v){for(const k in v)R[k]=(R[k]||0)-(v[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 B(...R){return R.reduce(se)}t.or=B;function T(R){return(v,k)=>v===e.nil?k:k===e.nil?v:(0,e._)`${M(v)} ${R} ${M(k)}`}function M(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),Ve=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Ce(),r=Qr();function n(g){const h={};for(const P of g)h[P]=!0;return h}t.toHash=n;function s(g,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(c(g,h),!i(h,g.self.RULES.all))}t.alwaysValidSchema=s;function c(g,h=g.schema){const{opts:P,self:O}=g;if(!P.strictSchema||typeof h=="boolean")return;const A=O.RULES.keywords;for(const F in h)A[F]||b(g,`unknown keyword: "${F}"`)}t.checkUnknownRules=c;function i(g,h){if(typeof g=="boolean")return!g;for(const P in g)if(h[P])return!0;return!1}t.schemaHasRules=i;function u(g,h){if(typeof g=="boolean")return!g;for(const P in g)if(P!=="$ref"&&h.all[P])return!0;return!1}t.schemaHasRulesButRef=u;function a({topSchemaRef:g,schemaPath:h},P,O,A){if(!A){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,e._)`${P}`}return(0,e._)`${g}${h}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function f(g){return w(decodeURIComponent(g))}t.unescapeFragment=f;function l(g){return encodeURIComponent(d(g))}t.escapeFragment=l;function d(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function w(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function S(g,h){if(Array.isArray(g))for(const P of g)h(P);else h(g)}t.eachItem=S;function $({mergeNames:g,mergeToName:h,mergeValues:P,resultToName:O}){return(A,F,L,X)=>{const G=L===void 0?F:L instanceof e.Name?(F instanceof e.Name?g(A,F,L):h(A,F,L),L):F instanceof e.Name?(h(A,L,F),F):P(F,L);return X===e.Name&&!(G instanceof e.Name)?O(A,G):G}}t.mergeEvaluated={props:$({mergeNames:(g,h,P)=>g.if((0,e._)`${P} !== true && ${h} !== undefined`,()=>{g.if((0,e._)`${h} === true`,()=>g.assign(P,!0),()=>g.assign(P,(0,e._)`${P} || {}`).code((0,e._)`Object.assign(${P}, ${h})`))}),mergeToName:(g,h,P)=>g.if((0,e._)`${P} !== true`,()=>{h===!0?g.assign(P,!0):(g.assign(P,(0,e._)`${P} || {}`),m(g,P,h))}),mergeValues:(g,h)=>g===!0?!0:{...g,...h},resultToName:E}),items:$({mergeNames:(g,h,P)=>g.if((0,e._)`${P} !== true && ${h} !== undefined`,()=>g.assign(P,(0,e._)`${h} === true ? true : ${P} > ${h} ? ${P} : ${h}`)),mergeToName:(g,h,P)=>g.if((0,e._)`${P} !== true`,()=>g.assign(P,h===!0?!0:(0,e._)`${P} > ${h} ? ${P} : ${h}`)),mergeValues:(g,h)=>g===!0?!0:Math.max(g,h),resultToName:(g,h)=>g.var("items",h)})};function E(g,h){if(h===!0)return g.var("props",!0);const P=g.var("props",(0,e._)`{}`);return h!==void 0&&m(g,P,h),P}t.evaluatedPropsToName=E;function m(g,h,P){Object.keys(P).forEach(O=>g.assign((0,e._)`${h}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var o={};function _(g,h){return g.scopeValue("func",{ref:h,code:o[h.code]||(o[h.code]=new r._Code(h.code))})}t.useFunc=_;var p;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(p||(t.Type=p={}));function y(g,h,P){if(g instanceof e.Name){const O=h===p.Num;return P?O?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:O?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,e.getProperty)(g).toString():"/"+d(g)}t.getErrorPath=y;function b(g,h,P=g.opts.strictSchema){if(P){if(h=`strict mode: ${h}`,P===!0)throw new Error(h);g.self.logger.warn(h)}}t.checkStrictMode=b}),Xt=H(function(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}),nn=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Ce(),r=Ve(),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:y}=m,{gen:b,compositeRule:g,allErrors:h}=y,P=d(m,o,_);p??(g||h)?a(b,P):f(y,(0,e._)`[${P}]`)}t.reportError=s;function c(m,o=t.keywordError,_){const{it:p}=m,{gen:y,compositeRule:b,allErrors:g}=p,h=d(m,o,_);a(y,h),b||g||f(p,n.default.vErrors)}t.reportExtraError=c;function i(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=i;function u({gen:m,keyword:o,schemaValue:_,data:p,errsCount:y,it:b}){if(y===void 0)throw new Error("ajv implementation error");const g=m.name("err");m.forRange("i",y,n.default.errors,h=>{m.const(g,(0,e._)`${n.default.vErrors}[${h}]`),m.if((0,e._)`${g}.instancePath === undefined`,()=>m.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,b.errorPath))),m.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${o}`),b.opts.verbose&&(m.assign((0,e._)`${g}.schema`,_),m.assign((0,e._)`${g}.data`,p))})}t.extendErrors=u;function a(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 f(m,o){const{gen:_,validateName:p,schemaEnv:y}=m;y.$async?_.throw((0,e._)`new ${m.ValidationError}(${o})`):(_.assign((0,e._)`${p}.errors`,o),_.return(!1))}var l={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:y}=m,b=[S(y,_),$(m,_)];return E(m,o,b),p.object(...b)}function S({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 $({keyword:m,it:{errSchemaPath:o}},{schemaPath:_,parentSchema:p}){let y=p?o:(0,e.str)`${o}/${m}`;return _&&(y=(0,e.str)`${y}${(0,r.getErrorPath)(_,r.Type.Str)}`),[l.schemaPath,y]}function E(m,{params:o,message:_},p){const{keyword:y,data:b,schemaValue:g,it:h}=m,{opts:P,propertyName:O,topSchemaRef:A,schemaPath:F}=h;p.push([l.keyword,y],[l.params,typeof o=="function"?o(m):o||(0,e._)`{}`]),P.messages&&p.push([l.message,typeof _=="function"?_(m):_]),P.verbose&&p.push([l.schema,g],[l.parentSchema,(0,e._)`${A}${F}`],[n.default.data,b]),O&&p.push([l.propertyName,O])}}),pc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=nn(),r=Ce(),n=Xt(),s={message:"boolean schema is false"};function c(a){const{gen:f,schema:l,validateName:d}=a;l===!1?u(a,!1):typeof l=="object"&&l.$async===!0?f.return(n.default.data):(f.assign((0,r._)`${d}.errors`,null),f.return(!0))}t.topBoolOrEmptySchema=c;function i(a,f){const{gen:l,schema:d}=a;d===!1?(l.var(f,!1),u(a)):l.var(f,!0)}t.boolOrEmptySchema=i;function u(a,f){const{gen:l,data:d}=a,w={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(w,s,void 0,f)}}),ki=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(c){return typeof c=="string"&&r.has(c)}t.isJSONType=n;function s(){const c={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...c,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},c.number,c.string,c.array,c.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),Oi=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:c},i){const u=c.RULES.types[i];return u&&u!==!0&&r(s,u)}t.schemaHasRulesForType=e;function r(s,c){return c.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,c){var i;return s[c.keyword]!==void 0||((i=c.definition.implements)===null||i===void 0?void 0:i.some(u=>s[u]!==void 0))}t.shouldUseRule=n}),Xr=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=ki(),r=Oi(),n=nn(),s=Ce(),c=Ve(),i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i||(t.DataType=i={}));function u(p){const y=a(p.type);if(y.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!y.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&y.push("null")}return y}t.getSchemaTypes=u;function a(p){const y=Array.isArray(p)?p:p?[p]:[];if(y.every(e.isJSONType))return y;throw new Error("type must be JSONType or JSONType[]: "+y.join(","))}t.getJSONTypes=a;function f(p,y){const{gen:b,data:g,opts:h}=p,P=d(y,h.coerceTypes),O=y.length>0&&!(P.length===0&&y.length===1&&(0,r.schemaHasRulesForType)(p,y[0]));if(O){const A=E(y,g,h.strictNumbers,i.Wrong);b.if(A,()=>{P.length?w(p,y,P):o(p)})}return O}t.coerceAndCheckDataType=f;var l=new Set(["string","number","integer","boolean","null"]);function d(p,y){return y?p.filter(b=>l.has(b)||y==="array"&&b==="array"):[]}function w(p,y,b){const{gen:g,data:h,opts:P}=p,O=g.let("dataType",(0,s._)`typeof ${h}`),A=g.let("coerced",(0,s._)`undefined`);P.coerceTypes==="array"&&g.if((0,s._)`${O} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>g.assign(h,(0,s._)`${h}[0]`).assign(O,(0,s._)`typeof ${h}`).if(E(y,h,P.strictNumbers),()=>g.assign(A,h))),g.if((0,s._)`${A} !== undefined`);for(const L of b)(l.has(L)||L==="array"&&P.coerceTypes==="array")&&F(L);g.else(),o(p),g.endIf(),g.if((0,s._)`${A} !== undefined`,()=>{g.assign(h,A),S(p,A)});function F(L){switch(L){case"string":g.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(A,(0,s._)`"" + ${h}`).elseIf((0,s._)`${h} === null`).assign(A,(0,s._)`""`);return;case"number":g.elseIf((0,s._)`${O} == "boolean" || ${h} === null
11
- || (${O} == "string" && ${h} && ${h} == +${h})`).assign(A,(0,s._)`+${h}`);return;case"integer":g.elseIf((0,s._)`${O} === "boolean" || ${h} === null
12
- || (${O} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(A,(0,s._)`+${h}`);return;case"boolean":g.elseIf((0,s._)`${h} === "false" || ${h} === 0 || ${h} === null`).assign(A,!1).elseIf((0,s._)`${h} === "true" || ${h} === 1`).assign(A,!0);return;case"null":g.elseIf((0,s._)`${h} === "" || ${h} === 0 || ${h} === false`),g.assign(A,null);return;case"array":g.elseIf((0,s._)`${O} === "string" || ${O} === "number"
13
- || ${O} === "boolean" || ${h} === null`).assign(A,(0,s._)`[${h}]`)}}}function S({gen:p,parentData:y,parentDataProperty:b},g){p.if((0,s._)`${y} !== undefined`,()=>p.assign((0,s._)`${y}[${b}]`,g))}function $(p,y,b,g=i.Correct){const h=g===i.Correct?s.operators.EQ:s.operators.NEQ;let P;switch(p){case"null":return(0,s._)`${y} ${h} null`;case"array":P=(0,s._)`Array.isArray(${y})`;break;case"object":P=(0,s._)`${y} && typeof ${y} == "object" && !Array.isArray(${y})`;break;case"integer":P=O((0,s._)`!(${y} % 1) && !isNaN(${y})`);break;case"number":P=O();break;default:return(0,s._)`typeof ${y} ${h} ${p}`}return g===i.Correct?P:(0,s.not)(P);function O(A=s.nil){return(0,s.and)((0,s._)`typeof ${y} == "number"`,A,b?(0,s._)`isFinite(${y})`:s.nil)}}t.checkDataType=$;function E(p,y,b,g){if(p.length===1)return $(p[0],y,b,g);let h;const P=(0,c.toHash)(p);if(P.array&&P.object){const O=(0,s._)`typeof ${y} != "object"`;h=P.null?O:(0,s._)`!${y} || ${O}`,delete P.null,delete P.array,delete P.object}else h=s.nil;P.number&&delete P.integer;for(const O in P)h=(0,s.and)(h,$(O,y,b,g));return h}t.checkDataTypes=E;var m={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:y})=>typeof p=="string"?(0,s._)`{type: ${p}}`:(0,s._)`{type: ${y}}`};function o(p){const y=_(p);(0,n.reportError)(y,m)}t.reportTypeError=o;function _(p){const{gen:y,data:b,schema:g}=p,h=(0,c.schemaRefOrVal)(p,g,"type");return{gen:y,keyword:"type",data:b,schema:g.type,schemaCode:h,schemaValue:h,parentSchema:g,params:{},it:p}}}),mc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Ce(),r=Ve();function n(c,i){const{properties:u,items:a}=c.schema;if(i==="object"&&u)for(const f in u)s(c,f,u[f].default);else i==="array"&&Array.isArray(a)&&a.forEach((f,l)=>s(c,l,f.default))}t.assignDefaults=n;function s(c,i,u){const{gen:a,compositeRule:f,data:l,opts:d}=c;if(u===void 0)return;const w=(0,e._)`${l}${(0,e.getProperty)(i)}`;if(f){(0,r.checkStrictMode)(c,`default is ignored for: ${w}`);return}let S=(0,e._)`${w} === undefined`;d.useDefaults==="empty"&&(S=(0,e._)`${S} || ${w} === null || ${w} === ""`),a.if(S,(0,e._)`${w} = ${(0,e.stringify)(u)}`)}}),It=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Ce(),r=Ve(),n=Xt(),s=Ve();function c(p,y){const{gen:b,data:g,it:h}=p;b.if(d(b,g,y,h.opts.ownProperties),()=>{p.setParams({missingProperty:(0,e._)`${y}`},!0),p.error()})}t.checkReportMissingProp=c;function i({gen:p,data:y,it:{opts:b}},g,h){return(0,e.or)(...g.map(P=>(0,e.and)(d(p,y,P,b.ownProperties),(0,e._)`${h} = ${P}`)))}t.checkMissingProp=i;function u(p,y){p.setParams({missingProperty:y},!0),p.error()}t.reportMissingProp=u;function a(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function f(p,y,b){return(0,e._)`${a(p)}.call(${y}, ${b})`}t.isOwnProperty=f;function l(p,y,b,g){const h=(0,e._)`${y}${(0,e.getProperty)(b)} !== undefined`;return g?(0,e._)`${h} && ${f(p,y,b)}`:h}t.propertyInData=l;function d(p,y,b,g){const h=(0,e._)`${y}${(0,e.getProperty)(b)} === undefined`;return g?(0,e.or)(h,(0,e.not)(f(p,y,b))):h}t.noPropertyInData=d;function w(p){return p?Object.keys(p).filter(y=>y!=="__proto__"):[]}t.allSchemaProperties=w;function S(p,y){return w(y).filter(b=>!(0,r.alwaysValidSchema)(p,y[b]))}t.schemaProperties=S;function $({schemaCode:p,data:y,it:{gen:b,topSchemaRef:g,schemaPath:h,errorPath:P},it:O},A,F,L){const X=L?(0,e._)`${p}, ${y}, ${g}${h}`:y,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,P)],[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}, ${b.object(...G)}`;return F!==e.nil?(0,e._)`${A}.call(${F}, ${ee})`:(0,e._)`${A}(${ee})`}t.callValidateCode=$;var E=(0,e._)`new RegExp`;function m({gen:p,it:{opts:y}},b){const g=y.unicodeRegExp?"u":"",{regExp:h}=y.code,P=h(b,g);return p.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,e._)`${h.code==="new RegExp"?E:(0,s.useFunc)(p,h)}(${b}, ${g})`})}t.usePattern=m;function o(p){const{gen:y,data:b,keyword:g,it:h}=p,P=y.name("valid");if(h.allErrors){const A=y.let("valid",!0);return O(()=>y.assign(A,!1)),A}return y.var(P,!0),O(()=>y.break()),P;function O(A){const F=y.const("len",(0,e._)`${b}.length`);y.forRange("i",0,F,L=>{p.subschema({keyword:g,dataProp:L,dataPropType:r.Type.Num},P),y.if((0,e.not)(P),A)})}}t.validateArray=o;function _(p){const{gen:y,schema:b,keyword:g,it:h}=p;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(F=>(0,r.alwaysValidSchema)(h,F))&&!h.opts.unevaluated)return;const O=y.let("valid",!1),A=y.name("_valid");y.block(()=>b.forEach((F,L)=>{const X=p.subschema({keyword:g,schemaProp:L,compositeRule:!0},A);y.assign(O,(0,e._)`${O} || ${A}`),p.mergeValidEvaluated(X,A)||y.if((0,e.not)(O))})),p.result(O,()=>p.reset(),()=>p.error(!0))}t.validateUnion=_}),gc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Ce(),r=Xt(),n=It(),s=nn();function c(S,$){const{gen:E,keyword:m,schema:o,parentSchema:_,it:p}=S,y=$.macro.call(p.self,o,_,p),b=l(E,m,y);p.opts.validateSchema!==!1&&p.self.validateSchema(y,!0);const g=E.name("valid");S.subschema({schema:y,schemaPath:e.nil,errSchemaPath:`${p.errSchemaPath}/${m}`,topSchemaRef:b,compositeRule:!0},g),S.pass(g,()=>S.error(!0))}t.macroKeywordCode=c;function i(S,$){var E;const{gen:m,keyword:o,schema:_,parentSchema:p,$data:y,it:b}=S;f(b,$);const g=!y&&$.compile?$.compile.call(b.self,_,p,b):$.validate,h=l(m,o,g),P=m.let("valid");S.block$data(P,O),S.ok((E=$.valid)!==null&&E!==void 0?E:P);function O(){if($.errors===!1)L(),$.modifying&&u(S),X(()=>S.error());else{const G=$.async?A():F();$.modifying&&u(S),X(()=>a(S,G))}}function A(){const G=m.let("ruleErrs",null);return m.try(()=>L((0,e._)`await `),ee=>m.assign(P,!1).if((0,e._)`${ee} instanceof ${b.ValidationError}`,()=>m.assign(G,(0,e._)`${ee}.errors`),()=>m.throw(ee))),G}function F(){const G=(0,e._)`${h}.errors`;return m.assign(G,null),L(e.nil),G}function L(G=$.async?(0,e._)`await `:e.nil){const ee=b.opts.passContext?r.default.this:r.default.self,fe=!("compile"in $&&!y||$.schema===!1);m.assign(P,(0,e._)`${G}${(0,n.callValidateCode)(S,h,ee,fe)}`,$.modifying)}function X(G){var ee;m.if((0,e.not)((ee=$.valid)!==null&&ee!==void 0?ee:P),G)}}t.funcKeywordCode=i;function u(S){const{gen:$,data:E,it:m}=S;$.if(m.parentData,()=>$.assign(E,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function a(S,$){const{gen:E}=S;E.if((0,e._)`Array.isArray(${$})`,()=>{E.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${$} : ${r.default.vErrors}.concat(${$})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(S)},()=>S.error())}function f({schemaEnv:S},$){if($.async&&!S.$async)throw new Error("async keyword in sync schema")}function l(S,$,E){if(E===void 0)throw new Error(`keyword "${$}" failed to compile`);return S.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(S,$,E=!1){return!$.length||$.some(m=>m==="array"?Array.isArray(S):m==="object"?S&&typeof S=="object"&&!Array.isArray(S):typeof S==m||E&&typeof S>"u")}t.validSchemaType=d;function w({schema:S,opts:$,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(y=>!Object.prototype.hasOwnProperty.call(S,y)))throw new Error(`parent schema must have dependencies of ${_}: ${p.join(",")}`);if(o.validateSchema&&!o.validateSchema(S[_])){const b=`keyword "${_}" value is invalid at path "${m}": `+E.errorsText(o.validateSchema.errors);if($.validateSchema==="log")E.logger.error(b);else throw new Error(b)}}t.validateKeywordUsage=w}),vc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Ce(),r=Ve();function n(i,{keyword:u,schemaProp:a,schema:f,schemaPath:l,errSchemaPath:d,topSchemaRef:w}){if(u!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const S=i.schema[u];return a===void 0?{schema:S,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${u}`}:{schema:S[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${u}/${(0,r.escapeFragment)(a)}`}}if(f!==void 0){if(l===void 0||d===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:l,topSchemaRef:w,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,u,{dataProp:a,dataPropType:f,data:l,dataTypes:d,propertyName:w}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:S}=u;if(a!==void 0){const{errorPath:E,dataPathArr:m,opts:o}=u,_=S.let("data",(0,e._)`${u.data}${(0,e.getProperty)(a)}`,!0);$(_),i.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(a,f,o.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...m,i.parentDataProperty]}if(l!==void 0){const E=l instanceof e.Name?l:S.let("data",l,!0);$(E),w!==void 0&&(i.propertyName=w)}d&&(i.dataTypes=d);function $(E){i.data=E,i.dataLevel=u.dataLevel+1,i.dataTypes=[],u.definedProperties=new Set,i.parentData=u.data,i.dataNames=[...u.dataNames,E]}}t.extendSubschemaData=s;function c(i,{jtdDiscriminator:u,jtdMetadata:a,compositeRule:f,createErrors:l,allErrors:d}){f!==void 0&&(i.compositeRule=f),l!==void 0&&(i.createErrors=l),d!==void 0&&(i.allErrors=d),i.jtdDiscriminator=u,i.jtdMetadata=a}t.extendSubschemaMode=c}),sn=H(function(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 c,i,u;if(Array.isArray(n)){if(c=n.length,c!=s.length)return!1;for(i=c;i--!==0;)if(!r(n[i],s[i]))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),c=u.length,c!==Object.keys(s).length)return!1;for(i=c;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[i]))return!1;for(i=c;i--!==0;){var a=u[i];if(!r(n[a],s[a]))return!1}return!0}return n!==n&&s!==s}}),Ni=H(function(t,e){var r=e.exports=function(c,i,u){typeof i=="function"&&(u=i,i={}),u=i.cb||u;var a=typeof u=="function"?u:u.pre||function(){},f=u.post||function(){};n(i,a,f,c,"",c)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function n(c,i,u,a,f,l,d,w,S,$){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,f,l,d,w,S,$);for(var E in a){var m=a[E];if(Array.isArray(m)){if(E in r.arrayKeywords)for(var o=0;o<m.length;o++)n(c,i,u,m[o],f+"/"+E+"/"+o,l,f,E,a,o)}else if(E in r.propsKeywords){if(m&&typeof m=="object")for(var _ in m)n(c,i,u,m[_],f+"/"+E+"/"+s(_),l,f,E,a,_)}else(E in r.keywords||c.allKeys&&!(E in r.skipKeywords))&&n(c,i,u,m,f+"/"+E,l,f,E,a)}u(a,f,l,d,w,S,$)}}function s(c){return c.replace(/~/g,"~0").replace(/\//g,"~1")}}),an=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Ve(),r=sn(),n=Ni(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(m,o=!0){return typeof m=="boolean"?!0:o===!0?!u(m):o?a(m)<=o:!1}t.inlineRef=c;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(m){for(const o in m){if(i.has(o))return!0;const _=m[o];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function a(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+=a(p)),o===1/0))return 1/0}return o}function f(m,o="",_){_!==!1&&(o=w(o));const p=m.parse(o);return l(m,p)}t.getFullPath=f;function l(m,o){return m.serialize(o).split("#")[0]+"#"}t._getFullPath=l;var d=/#\/?$/;function w(m){return m?m.replace(d,""):""}t.normalizeId=w;function S(m,o,_){return _=w(_),m.resolve(o,_)}t.resolveUrl=S;var $=/^[a-z_][-a-z0-9._]*$/i;function E(m,o){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:p}=this.opts,y=w(m[_]||o),b={"":y},g=f(p,y,!1),h={},P=new Set;return n(m,{allKeys:!0},(F,L,X,G)=>{if(G===void 0)return;const ee=g+L;let fe=b[G];typeof F[_]=="string"&&(fe=we.call(this,F[_])),Oe.call(this,F.$anchor),Oe.call(this,F.$dynamicAnchor),b[L]=fe;function we(se){const B=this.opts.uriResolver.resolve;if(se=w(fe?B(fe,se):se),P.has(se))throw A(se);P.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,h[se],se),h[se]=F):this.refs[se]=ee),se}function Oe(se){if(typeof se=="string"){if(!$.test(se))throw new Error(`invalid anchor "${se}"`);we.call(this,`#${se}`)}}}),h;function O(F,L,X){if(L!==void 0&&!r(F,L))throw A(X)}function A(F){return new Error(`reference "${F}" resolves to more than one schema`)}}t.getSchemaRefs=E}),on=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=pc(),r=Xr(),n=Oi(),s=Xr(),c=mc(),i=gc(),u=vc(),a=Ce(),f=Xt(),l=an(),d=Ve(),w=nn();function S(N){if(g(N)&&(P(N),b(N))){o(N);return}$(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=S;function $({gen:N,validateName:I,schema:V,schemaEnv:z,opts:J},te){J.code.es5?N.func(I,(0,a._)`${f.default.data}, ${f.default.valCxt}`,z.$async,()=>{N.code((0,a._)`"use strict"; ${p(V,J)}`),m(N,J),N.code(te)}):N.func(I,(0,a._)`${f.default.data}, ${E(J)}`,z.$async,()=>N.code(p(V,J)).code(te))}function E(N){return(0,a._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${N.dynamicRef?(0,a._)`, ${f.default.dynamicAnchors}={}`:a.nil}}={}`}function m(N,I){N.if(f.default.valCxt,()=>{N.var(f.default.instancePath,(0,a._)`${f.default.valCxt}.${f.default.instancePath}`),N.var(f.default.parentData,(0,a._)`${f.default.valCxt}.${f.default.parentData}`),N.var(f.default.parentDataProperty,(0,a._)`${f.default.valCxt}.${f.default.parentDataProperty}`),N.var(f.default.rootData,(0,a._)`${f.default.valCxt}.${f.default.rootData}`),I.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{N.var(f.default.instancePath,(0,a._)`""`),N.var(f.default.parentData,(0,a._)`undefined`),N.var(f.default.parentDataProperty,(0,a._)`undefined`),N.var(f.default.rootData,f.default.data),I.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`{}`)})}function o(N){const{schema:I,opts:V,gen:z}=N;$(N,()=>{V.$comment&&I.$comment&&G(N),F(N),z.let(f.default.vErrors,null),z.let(f.default.errors,0),V.unevaluated&&_(N),O(N),ee(N)})}function _(N){const{gen:I,validateName:V}=N;N.evaluated=I.const("evaluated",(0,a._)`${V}.evaluated`),I.if((0,a._)`${N.evaluated}.dynamicProps`,()=>I.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),I.if((0,a._)`${N.evaluated}.dynamicItems`,()=>I.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function p(N,I){const V=typeof N=="object"&&N[I.schemaId];return V&&(I.code.source||I.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function y(N,I){if(g(N)&&(P(N),b(N))){h(N,I);return}(0,e.boolOrEmptySchema)(N,I)}function b({schema:N,self:I}){if(typeof N=="boolean")return!N;for(const V in N)if(I.RULES.all[V])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function h(N,I){const{schema:V,gen:z,opts:J}=N;J.$comment&&V.$comment&&G(N),L(N),X(N);const te=z.const("_errs",f.default.errors);O(N,te),z.var(I,(0,a._)`${te} === ${f.default.errors}`)}function P(N){(0,d.checkUnknownRules)(N),A(N)}function O(N,I){if(N.opts.jtd)return we(N,[],!1,I);const V=(0,r.getSchemaTypes)(N.schema),z=(0,r.coerceAndCheckDataType)(N,V);we(N,V,!z,I)}function A(N){const{schema:I,errSchemaPath:V,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 "${V}"`)}function F(N){const{schema:I,opts:V}=N;I.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function L(N){const I=N.schema[N.opts.schemaId];I&&(N.baseId=(0,l.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:V,errSchemaPath:z,opts:J}){const te=V.$comment;if(J.$comment===!0)N.code((0,a._)`${f.default.self}.logger.log(${te})`);else if(typeof J.$comment=="function"){const Ee=(0,a.str)`${z}/$comment`,Ue=N.scopeValue("root",{ref:I.root});N.code((0,a._)`${f.default.self}.opts.$comment(${te}, ${Ee}, ${Ue}.schema)`)}}function ee(N){const{gen:I,schemaEnv:V,validateName:z,ValidationError:J,opts:te}=N;V.$async?I.if((0,a._)`${f.default.errors} === 0`,()=>I.return(f.default.data),()=>I.throw((0,a._)`new ${J}(${f.default.vErrors})`)):(I.assign((0,a._)`${z}.errors`,f.default.vErrors),te.unevaluated&&fe(N),I.return((0,a._)`${f.default.errors} === 0`))}function fe({gen:N,evaluated:I,props:V,items:z}){V instanceof a.Name&&N.assign((0,a._)`${I}.props`,V),z instanceof a.Name&&N.assign((0,a._)`${I}.items`,z)}function we(N,I,V,z){const{gen:J,schema:te,data:Ee,allErrors:Ue,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)Be(Ie);Be(_e.post)});function Be(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&&V&&(J.else(),(0,s.reportTypeError)(N)),J.endIf()):Oe(N,Ie),Ue||J.if((0,a._)`${f.default.errors} === ${z||0}`))}}function Oe(N,I){const{gen:V,schema:z,opts:{useDefaults:J}}=N;J&&(0,c.assignDefaults)(N,I.type),V.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||(B(N,I),N.opts.allowUnionTypes||T(N,I),M(N,N.dataTypes))}function B(N,I){if(I.length){if(!N.dataTypes.length){N.dataTypes=I;return}I.forEach(V=>{v(N.dataTypes,V)||j(N,`type "${V}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,I)}}function T(N,I){I.length>1&&!(I.length===2&&I.includes("null"))&&j(N,"use allowUnionTypes to allow union type keyword")}function M(N,I){const V=N.self.RULES.all;for(const z in V){const J=V[z];if(typeof J=="object"&&(0,n.shouldUseRule)(N.schema,J)){const{type:te}=J.definition;te.length&&!te.some(Ee=>R(I,Ee))&&j(N,`missing type "${te.join(",")}" for keyword "${z}"`)}}}function R(N,I){return N.includes(I)||I==="number"&&N.includes("integer")}function v(N,I){return N.includes(I)||I==="integer"&&N.includes("number")}function k(N,I){const V=[];for(const z of N.dataTypes)v(I,z)?V.push(z):I.includes("integer")&&z==="number"&&V.push("integer");N.dataTypes=V}function j(N,I){const V=N.schemaEnv.baseId+N.errSchemaPath;I+=` at "${V}" (strictTypes)`,(0,d.checkStrictMode)(N,I,N.opts.strictTypes)}class W{constructor(I,V,z){if((0,i.validateKeywordUsage)(I,V,z),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=z,this.data=I.data,this.schema=I.schema[z],this.$data=V.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(I,this.schema,z,this.$data),this.schemaType=V.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=V,this.$data)this.schemaCode=I.gen.const("vSchema",ve(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${z} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=I.gen.const("_errs",f.default.errors))}result(I,V,z){this.failResult((0,a.not)(I),V,z)}failResult(I,V,z){this.gen.if(I),z?z():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,V){this.failResult((0,a.not)(I),void 0,V)}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:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),I)})`)}error(I,V,z){if(V){this.setParams(V),this._error(I,z),this.setParams({});return}this._error(I,z)}_error(I,V){(I?w.reportExtraError:w.reportError)(this,this.def.error,V)}$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,V){V?Object.assign(this.params,I):this.params=I}block$data(I,V,z=a.nil){this.gen.block(()=>{this.check$data(I,z),V()})}check$data(I=a.nil,V=a.nil){if(!this.$data)return;const{gen:z,schemaCode:J,schemaType:te,def:Ee}=this;z.if((0,a.or)((0,a._)`${J} === undefined`,V)),I!==a.nil&&z.assign(I,!0),(te.length||Ee.validateSchema)&&(z.elseIf(this.invalid$data()),this.$dataError(),I!==a.nil&&z.assign(I,!1)),z.else()}invalid$data(){const{gen:I,schemaCode:V,schemaType:z,def:J,it:te}=this;return(0,a.or)(Ee(),Ue());function Ee(){if(z.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Re=Array.isArray(z)?z:[z];return(0,a._)`${(0,s.checkDataTypes)(Re,V,te.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ue(){if(J.validateSchema){const Re=I.scopeValue("validate$data",{ref:J.validateSchema});return(0,a._)`!${Re}(${V})`}return a.nil}}subschema(I,V){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 y(J,V),J}mergeEvaluated(I,V){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,V)),z.items!==!0&&I.items!==void 0&&(z.items=d.mergeEvaluated.items(J,I.items,z.items,V)))}mergeValidEvaluated(I,V){const{it:z,gen:J}=this;if(z.opts.unevaluated&&(z.props!==!0||z.items!==!0))return J.if(V,()=>this.mergeEvaluated(I,a.Name)),!0}}t.KeywordCxt=W;function Q(N,I,V,z){const J=new W(N,V,I);"code"in V?V.code(J,z):J.$data&&V.validate?(0,i.funcKeywordCode)(J,V):"macro"in V?(0,i.macroKeywordCode)(J,V):(V.compile||V.validate)&&(0,i.funcKeywordCode)(J,V)}var ae=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(N,{dataLevel:I,dataNames:V,dataPathArr:z}){let J,te;if(N==="")return f.default.rootData;if(N[0]==="/"){if(!ae.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);J=N,te=f.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=V[I-_e],!J)return te}let Ee=te;const Ue=J.split("/");for(const Ae of Ue)Ae&&(te=(0,a._)`${te}${(0,a.getProperty)((0,d.unescapeJsonPointer)(Ae))}`,Ee=(0,a._)`${Ee} && ${te}`);return Ee;function Re(Ae,_e){return`Cannot access ${Ae} ${_e} levels up, current level is ${I}`}}t.getData=ve}),ss=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),cn=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=an();class r extends Error{constructor(s,c,i,u){super(u||`can't resolve reference ${i} from id ${c}`),this.missingRef=(0,e.resolveUrl)(s,c,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),is=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Ce(),r=ss(),n=Xt(),s=an(),c=Ve(),i=on();class u{constructor(_){var p;this.refs={},this.dynamicAnchors={};let y;typeof _.schema=="object"&&(y=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(p=_.baseId)!==null&&p!==void 0?p:(0,s.normalizeId)(y==null?void 0:y[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=y==null?void 0:y.$async,this.refs={}}}t.SchemaEnv=u;function a(o){const _=d.call(this,o);if(_)return _;const p=(0,s.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:y,lines:b}=this.opts.code,{ownProperties:g}=this.opts,h=new e.CodeGen(this.scope,{es5:y,lines:b,ownProperties:g});let P;o.$async&&(P=h.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=h.scopeName("validate");o.validateName=O;const A={gen:h,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:h.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:P,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,i.validateFunctionCode)(A),h.optimize(this.opts.code.optimize);const L=h.toString();F=`${h.scopeRefs(n.default.scope)}return ${L}`,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:L,scopeValues:h._values}),this.opts.unevaluated){const{props:ee,items:fe}=A;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(L){throw delete o.validate,delete o.validateName,F&&this.logger.error("Error compiling schema, function code:",F),L}finally{this._compilations.delete(o)}}t.compileSchema=a;function f(o,_,p){var y;p=(0,s.resolveUrl)(this.opts.uriResolver,_,p);const b=o.refs[p];if(b)return b;let g=S.call(this,o,p);if(g===void 0){const h=(y=o.localRefs)===null||y===void 0?void 0:y[p],{schemaId:P}=this.opts;h&&(g=new u({schema:h,schemaId:P,root:o,baseId:_}))}if(g!==void 0)return o.refs[p]=l.call(this,g)}t.resolveRef=f;function l(o){return(0,s.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:a.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 S(o,_){let p;for(;typeof(p=this.refs[_])=="string";)_=p;return p||this.schemas[_]||$.call(this,o,_)}function $(o,_){const p=this.opts.uriResolver.parse(_),y=(0,s._getFullPath)(this.opts.uriResolver,p);let b=(0,s.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&y===b)return m.call(this,p,o);const g=(0,s.normalizeId)(y),h=this.refs[g]||this.schemas[g];if(typeof h=="string"){const P=$.call(this,o,h);return typeof(P==null?void 0:P.schema)!="object"?void 0:m.call(this,p,P)}if(typeof(h==null?void 0:h.schema)=="object"){if(h.validate||a.call(this,h),g===(0,s.normalizeId)(_)){const{schema:P}=h,{schemaId:O}=this.opts,A=P[O];return A&&(b=(0,s.resolveUrl)(this.opts.uriResolver,b,A)),new u({schema:P,schemaId:O,root:o,baseId:b})}return m.call(this,p,h)}}t.resolveSchema=$;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(o,{baseId:_,schema:p,root:y}){var b;if(((b=o.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const P of o.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const O=p[(0,c.unescapeFragment)(P)];if(O===void 0)return;p=O;const A=typeof p=="object"&&p[this.opts.schemaId];!E.has(P)&&A&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,A))}let g;if(typeof p!="boolean"&&p.$ref&&!(0,c.schemaHasRulesButRef)(p,this.RULES)){const P=(0,s.resolveUrl)(this.opts.uriResolver,_,p.$ref);g=$.call(this,y,P)}const{schemaId:h}=this.opts;if(g=g||new u({schema:p,schemaId:h,root:y,baseId:_}),g.schema!==g.root.schema)return g}}),yc=H(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),Ti=H(function(t,e){var r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function s($){let E="",m=0,o=0;for(o=0;o<$.length;o++)if(m=$[o].charCodeAt(0),m!==48){if(!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";E+=$[o];break}for(o+=1;o<$.length;o++){if(m=$[o].charCodeAt(0),!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";E+=$[o]}return E}var c=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i($){return $.length=0,!0}function u($,E,m){if($.length){const o=s($);if(o!=="")E.push(o);else return m.error=!0,!1;$.length=0}return!0}function a($){let E=0;const m={error:!1,address:"",zone:""},o=[],_=[];let p=!1,y=!1,b=u;for(let g=0;g<$.length;g++){const h=$[g];if(!(h==="["||h==="]"))if(h===":"){if(p===!0&&(y=!0),!b(_,o,m))break;if(++E>7){m.error=!0;break}g>0&&$[g-1]===":"&&(p=!0),o.push(":");continue}else if(h==="%"){if(!b(_,o,m))break;b=i}else{_.push(h);continue}}return _.length&&(b===i?m.zone=_.join(""):y?o.push(_.join("")):o.push(s(_))),m.address=o.join(""),m}function f($){if(l($,":")<2)return{host:$,isIPV6:!1};const E=a($);if(E.error)return{host:$,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 l($,E){let m=0;for(let o=0;o<$.length;o++)$[o]===E&&m++;return m}function d($){let E=$;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($,E){const m=E!==!0?escape:unescape;return $.scheme!==void 0&&($.scheme=m($.scheme)),$.userinfo!==void 0&&($.userinfo=m($.userinfo)),$.host!==void 0&&($.host=m($.host)),$.path!==void 0&&($.path=m($.path)),$.query!==void 0&&($.query=m($.query)),$.fragment!==void 0&&($.fragment=m($.fragment)),$}function S($){const E=[];if($.userinfo!==void 0&&(E.push($.userinfo),E.push("@")),$.host!==void 0){let m=unescape($.host);if(!n(m)){const o=f(m);o.isIPV6===!0?m=`[${o.escapedHost}]`:m=$.host}E.push(m)}return(typeof $.port=="number"||typeof $.port=="string")&&(E.push(":"),E.push(String($.port))),E.length?E.join(""):void 0}e.exports={nonSimpleDomain:c,recomposeAuthority:S,normalizeComponentEncoding:w,removeDotSegments:d,isIPv4:n,isUUID:r,normalizeIPv6:f,stringArrayToHexStripped:s}}),_c=H(function(t,e){var{isUUID:r}=Ti(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function c(h){return s.indexOf(h)!==-1}function i(h){return h.secure===!0?!0:h.secure===!1?!1:h.scheme?h.scheme.length===3&&(h.scheme[0]==="w"||h.scheme[0]==="W")&&(h.scheme[1]==="s"||h.scheme[1]==="S")&&(h.scheme[2]==="s"||h.scheme[2]==="S"):!1}function u(h){return h.host||(h.error=h.error||"HTTP URIs must have a host."),h}function a(h){const P=String(h.scheme).toLowerCase()==="https";return(h.port===(P?443:80)||h.port==="")&&(h.port=void 0),h.path||(h.path="/"),h}function f(h){return h.secure=i(h),h.resourceName=(h.path||"/")+(h.query?"?"+h.query:""),h.path=void 0,h.query=void 0,h}function l(h){if((h.port===(i(h)?443:80)||h.port==="")&&(h.port=void 0),typeof h.secure=="boolean"&&(h.scheme=h.secure?"wss":"ws",h.secure=void 0),h.resourceName){const[P,O]=h.resourceName.split("?");h.path=P&&P!=="/"?P:void 0,h.query=O,h.resourceName=void 0}return h.fragment=void 0,h}function d(h,P){if(!h.path)return h.error="URN can not be parsed",h;const O=h.path.match(n);if(O){const A=P.scheme||h.scheme||"urn";h.nid=O[1].toLowerCase(),h.nss=O[2];const F=`${A}:${P.nid||h.nid}`,L=g(F);h.path=void 0,L&&(h=L.parse(h,P))}else h.error=h.error||"URN can not be parsed.";return h}function w(h,P){if(h.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=P.scheme||h.scheme||"urn",A=h.nid.toLowerCase(),F=`${O}:${P.nid||A}`,L=g(F);L&&(h=L.serialize(h,P));const X=h,G=h.nss;return X.path=`${A||P.nid}:${G}`,P.skipEscape=!0,X}function S(h,P){const O=h;return O.uuid=O.nss,O.nss=void 0,!P.tolerant&&(!O.uuid||!r(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function $(h){const P=h;return P.nss=(h.uuid||"").toLowerCase(),P}var E={scheme:"http",domainHost:!0,parse:u,serialize:a},m={scheme:"https",domainHost:E.domainHost,parse:u,serialize:a},o={scheme:"ws",domainHost:!0,parse:f,serialize:l},_={scheme:"wss",domainHost:o.domainHost,parse:o.parse,serialize:o.serialize},p={scheme:"urn",parse:d,serialize:w,skipNormalize:!0},y={scheme:"urn:uuid",parse:S,serialize:$,skipNormalize:!0},b={http:E,https:m,ws:o,wss:_,urn:p,"urn:uuid":y};Object.setPrototypeOf(b,null);function g(h){return h&&(b[h]||b[h.toLowerCase()])||void 0}e.exports={wsIsSecure:i,SCHEMES:b,isValidSchemeName:c,getSchemeHandler:g}}),wc=H(function(t,e){var{normalizeIPv6:r,removeDotSegments:n,recomposeAuthority:s,normalizeComponentEncoding:c,isIPv4:i,nonSimpleDomain:u}=Ti(),{SCHEMES:a,getSchemeHandler:f}=_c();function l(_,p){return typeof _=="string"?_=$(m(_,p),p):typeof _=="object"&&(_=m($(_,p),p)),_}function d(_,p,y){const b=y?Object.assign({scheme:"null"},y):{scheme:"null"},g=w(m(_,b),m(p,b),b,!0);return b.skipEscape=!0,$(g,b)}function w(_,p,y,b){const g={};return b||(_=m($(_,y),y),p=m($(p,y),y)),y=y||{},!y.tolerant&&p.scheme?(g.scheme=p.scheme,g.userinfo=p.userinfo,g.host=p.host,g.port=p.port,g.path=n(p.path||""),g.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(g.userinfo=p.userinfo,g.host=p.host,g.port=p.port,g.path=n(p.path||""),g.query=p.query):(p.path?(p.path[0]==="/"?g.path=n(p.path):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?g.path="/"+p.path:_.path?g.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+p.path:g.path=p.path,g.path=n(g.path)),g.query=p.query):(g.path=_.path,p.query!==void 0?g.query=p.query:g.query=_.query),g.userinfo=_.userinfo,g.host=_.host,g.port=_.port),g.scheme=_.scheme),g.fragment=p.fragment,g}function S(_,p,y){return typeof _=="string"?(_=unescape(_),_=$(c(m(_,y),!0),{...y,skipEscape:!0})):typeof _=="object"&&(_=$(c(_,!0),{...y,skipEscape:!0})),typeof p=="string"?(p=unescape(p),p=$(c(m(p,y),!0),{...y,skipEscape:!0})):typeof p=="object"&&(p=$(c(p,!0),{...y,skipEscape:!0})),_.toLowerCase()===p.toLowerCase()}function $(_,p){const y={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:""},b=Object.assign({},p),g=[],h=f(b.scheme||y.scheme);h&&h.serialize&&h.serialize(y,b),y.path!==void 0&&(b.skipEscape?y.path=unescape(y.path):(y.path=escape(y.path),y.scheme!==void 0&&(y.path=y.path.split("%3A").join(":")))),b.reference!=="suffix"&&y.scheme&&g.push(y.scheme,":");const P=s(y);if(P!==void 0&&(b.reference!=="suffix"&&g.push("//"),g.push(P),y.path&&y.path[0]!=="/"&&g.push("/")),y.path!==void 0){let O=y.path;!b.absolutePath&&(!h||!h.absolutePath)&&(O=n(O)),P===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),g.push(O)}return y.query!==void 0&&g.push("?",y.query),y.fragment!==void 0&&g.push("#",y.fragment),g.join("")}var E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(_,p){const y=Object.assign({},p),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let g=!1;y.reference==="suffix"&&(y.scheme?_=y.scheme+":"+_:_="//"+_);const h=_.match(E);if(h){if(b.scheme=h[1],b.userinfo=h[3],b.host=h[4],b.port=parseInt(h[5],10),b.path=h[6]||"",b.query=h[7],b.fragment=h[8],isNaN(b.port)&&(b.port=h[5]),b.host)if(i(b.host)===!1){const A=r(b.host);b.host=A.host.toLowerCase(),g=A.isIPV6}else g=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",y.reference&&y.reference!=="suffix"&&y.reference!==b.reference&&(b.error=b.error||"URI is not a "+y.reference+" reference.");const P=f(y.scheme||b.scheme);if(!y.unicodeSupport&&(!P||!P.unicodeSupport)&&b.host&&(y.domainHost||P&&P.domainHost)&&g===!1&&u(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(O){b.error=b.error||"Host's domain name can not be converted to ASCII: "+O}(!P||P&&!P.skipNormalize)&&(_.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),P&&P.parse&&P.parse(b,y)}else b.error=b.error||"URI can not be parsed.";return b}var o={SCHEMES:a,normalize:l,resolve:d,resolveComponent:w,equal:S,serialize:$,parse:m};e.exports=o,e.exports.default=o,e.exports.fastUri=o}),bc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=wc();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),$c=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=on();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=ss(),s=cn(),c=ki(),i=is(),u=Ce(),a=an(),f=Xr(),l=Ve(),d=yc(),w=bc(),S=(B,T)=>new RegExp(B,T);S.code="new RegExp";var $=["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(B){var T,M,R,v,k,j,W,Q,ae,re,ve,N,I,V,z,J,te,Ee,Ue,Re,Ae,_e,Be,Ie,yt;const Ye=B.strict,ht=(T=B.code)===null||T===void 0?void 0:T.optimize,Et=ht===!0||ht===void 0?1:ht||0,ut=(R=(M=B.code)===null||M===void 0?void 0:M.regExp)!==null&&R!==void 0?R:S,$t=(v=B.uriResolver)!==null&&v!==void 0?v:w.default;return{strictSchema:(j=(k=B.strictSchema)!==null&&k!==void 0?k:Ye)!==null&&j!==void 0?j:!0,strictNumbers:(Q=(W=B.strictNumbers)!==null&&W!==void 0?W:Ye)!==null&&Q!==void 0?Q:!0,strictTypes:(re=(ae=B.strictTypes)!==null&&ae!==void 0?ae:Ye)!==null&&re!==void 0?re:"log",strictTuples:(N=(ve=B.strictTuples)!==null&&ve!==void 0?ve:Ye)!==null&&N!==void 0?N:"log",strictRequired:(V=(I=B.strictRequired)!==null&&I!==void 0?I:Ye)!==null&&V!==void 0?V:!1,code:B.code?{...B.code,optimize:Et,regExp:ut}:{optimize:Et,regExp:ut},loopRequired:(z=B.loopRequired)!==null&&z!==void 0?z:_,loopEnum:(J=B.loopEnum)!==null&&J!==void 0?J:_,meta:(te=B.meta)!==null&&te!==void 0?te:!0,messages:(Ee=B.messages)!==null&&Ee!==void 0?Ee:!0,inlineRefs:(Ue=B.inlineRefs)!==null&&Ue!==void 0?Ue:!0,schemaId:(Re=B.schemaId)!==null&&Re!==void 0?Re:"$id",addUsedSchema:(Ae=B.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(_e=B.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(Be=B.validateFormats)!==null&&Be!==void 0?Be:!0,unicodeRegExp:(Ie=B.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(yt=B.int32range)!==null&&yt!==void 0?yt:!0,uriResolver:$t}}class y{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=L(T.logger);const v=T.validateFormats;T.validateFormats=!1,this.RULES=(0,c.getRules)(),b.call(this,m,T,"NOT SUPPORTED"),b.call(this,o,T,"DEPRECATED","warn"),this._metaOpts=A.call(this),T.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),h.call(this),T.validateFormats=v}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:M,schemaId:R}=this.opts;let v=d;R==="id"&&(v={...d},v.id=v.$id,delete v.$id),M&&T&&this.addMetaSchema(v,v[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 v=R(M);return"$async"in R||(this.errors=R.errors),v}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 v.call(this,T,M);async function v(re,ve){await k.call(this,re.$schema);const N=this._addSchema(re,ve);return N.validate||j.call(this,N)}async function k(re){re&&!this.getSchema(re)&&await v.call(this,{$ref:re},!0)}async function j(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),j.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 ae.call(this,re);this.refs[re]||await k.call(this,ve.$schema),this.refs[re]||this.addSchema(ve,re,M)}async function ae(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,v=this.opts.validateSchema){if(Array.isArray(T)){for(const j of T)this.addSchema(j,void 0,R,v);return this}let k;if(typeof T=="object"){const{schemaId:j}=this.opts;if(k=T[j],k!==void 0&&typeof k!="string")throw new Error(`schema ${j} must be string`)}return M=(0,a.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(T,R,M,v,!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 v=this.validate(R,T);if(!v&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return v}getSchema(T){let M;for(;typeof(M=g.call(this,T))=="string";)T=M;if(M===void 0){const{schemaId:R}=this.opts,v=new i.SchemaEnv({schema:{},schemaId:R});if(M=i.resolveSchema.call(this,v,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=g.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,a.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,l.eachItem)(R,k=>ee.call(this,k)),this;we.call(this,M);const v={...M,type:(0,f.getJSONTypes)(M.type),schemaType:(0,f.getJSONTypes)(M.schemaType)};return(0,l.eachItem)(R,v.type.length===0?k=>ee.call(this,k,v):k=>v.type.forEach(j=>ee.call(this,k,v,j))),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 v=R.rules.findIndex(k=>k.keyword===T);v>=0&&R.rules.splice(v,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(v=>`${R}${v.instancePath} ${v.message}`).reduce((v,k)=>v+M+k)}$dataMetaSchema(T,M){const R=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const v of M){const k=v.split("/").slice(1);let j=T;for(const W of k)j=j[W];for(const W in R){const Q=R[W];if(typeof Q!="object")continue;const{$data:ae}=Q.definition,re=j[W];ae&&re&&(j[W]=se(re))}}return T}_removeAllSchemas(T,M){for(const R in T){const v=T[R];(!M||M.test(R))&&(typeof v=="string"?delete T[R]:v&&!v.meta&&(this._cache.delete(v.schema),delete T[R]))}}_addSchema(T,M,R,v=this.opts.validateSchema,k=this.opts.addUsedSchema){let j;const{schemaId:W}=this.opts;if(typeof T=="object")j=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,a.normalizeId)(j||R);const ae=a.getSchemaRefs.call(this,T,R);return Q=new i.SchemaEnv({schema:T,schemaId:W,meta:M,baseId:R,localRefs:ae}),this._cache.set(Q.schema,Q),k&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=Q),v&&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):i.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{i.compileSchema.call(this,T)}finally{this.opts=M}}}y.ValidationError=n.default,y.MissingRefError=s.default,t.default=y;function b(B,T,M,R="error"){for(const v in B){const k=v;k in T&&this.logger[R](`${M}: option ${v}. ${B[k]}`)}}function g(B){return B=(0,a.normalizeId)(B),this.schemas[B]||this.refs[B]}function h(){const B=this.opts.schemas;if(B)if(Array.isArray(B))this.addSchema(B);else for(const T in B)this.addSchema(B[T],T)}function P(){for(const B in this.opts.formats){const T=this.opts.formats[B];T&&this.addFormat(B,T)}}function O(B){if(Array.isArray(B)){this.addVocabulary(B);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in B){const M=B[T];M.keyword||(M.keyword=T),this.addKeyword(M)}}function A(){const B={...this.opts};for(const T of $)delete B[T];return B}var F={log(){},warn(){},error(){}};function L(B){if(B===!1)return F;if(B===void 0)return console;if(B.log&&B.warn&&B.error)return B;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function G(B,T){const{RULES:M}=this;if((0,l.eachItem)(B,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(B,T,M){var R;const v=T==null?void 0:T.post;if(M&&v)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let j=v?k.post:k.rules.find(({type:Q})=>Q===M);if(j||(j={type:M,rules:[]},k.rules.push(j)),k.keywords[B]=!0,!T)return;const W={keyword:B,definition:{...T,type:(0,f.getJSONTypes)(T.type),schemaType:(0,f.getJSONTypes)(T.schemaType)}};T.before?fe.call(this,j,W,T.before):j.rules.push(W),k.all[B]=W,(R=T.implements)===null||R===void 0||R.forEach(Q=>this.addKeyword(Q))}function fe(B,T,M){const R=B.rules.findIndex(v=>v.keyword===M);R>=0?B.rules.splice(R,0,T):(B.rules.push(T),this.logger.warn(`rule ${M} is not defined`))}function we(B){let{metaSchema:T}=B;T!==void 0&&(B.$data&&this.opts.$data&&(T=se(T)),B.validateSchema=this.compile(T,!0))}var Oe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(B){return{anyOf:[B,Oe]}}}),Ec=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),Sc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=cn(),r=It(),n=Ce(),s=Xt(),c=is(),i=Ve(),u={keyword:"$ref",schemaType:"string",code(l){const{gen:d,schema:w,it:S}=l,{baseId:$,schemaEnv:E,validateName:m,opts:o,self:_}=S,{root:p}=E;if((w==="#"||w==="#/")&&$===p.baseId)return b();const y=c.resolveRef.call(_,p,$,w);if(y===void 0)throw new e.default(S.opts.uriResolver,$,w);if(y instanceof c.SchemaEnv)return g(y);return h(y);function b(){if(E===p)return f(l,m,E,E.$async);const P=d.scopeValue("root",{ref:p});return f(l,(0,n._)`${P}.validate`,p,p.$async)}function g(P){const O=a(l,P);f(l,O,P,P.$async)}function h(P){const O=d.scopeValue("schema",o.code.source===!0?{ref:P,code:(0,n.stringify)(P)}:{ref:P}),A=d.name("valid"),F=l.subschema({schema:P,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},A);l.mergeEvaluated(F),l.ok(A)}}};function a(l,d){const{gen:w}=l;return d.validate?w.scopeValue("validate",{ref:d.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=a;function f(l,d,w,S){const{gen:$,it:E}=l,{allErrors:m,schemaEnv:o,opts:_}=E,p=_.passContext?s.default.this:n.nil;S?y():b();function y(){if(!o.$async)throw new Error("async schema referenced by sync schema");const P=$.let("valid");$.try(()=>{$.code((0,n._)`await ${(0,r.callValidateCode)(l,d,p)}`),h(d),m||$.assign(P,!0)},O=>{$.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>$.throw(O)),g(O),m||$.assign(P,!1)}),l.ok(P)}function b(){l.result((0,r.callValidateCode)(l,d,p),()=>h(d),()=>g(d))}function g(P){const O=(0,n._)`${P}.errors`;$.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),$.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function h(P){var O;if(!E.opts.unevaluated)return;const A=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(E.props=i.mergeEvaluated.props($,A.props,E.props));else{const F=$.var("props",(0,n._)`${P}.evaluated.props`);E.props=i.mergeEvaluated.props($,F,E.props,n.Name)}if(E.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(E.items=i.mergeEvaluated.items($,A.items,E.items));else{const F=$.var("items",(0,n._)`${P}.evaluated.items`);E.items=i.mergeEvaluated.items($,F,E.items,n.Name)}}}t.callRef=f,t.default=u}),Pc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ec(),r=Sc(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),kc=H(function(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:i,schemaCode:u})=>(0,e.str)`must be ${n[i].okStr} ${u}`,params:({keyword:i,schemaCode:u})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${u}}`},c={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:f}=i;i.fail$data((0,e._)`${a} ${n[u].fail} ${f} || isNaN(${a})`)}};t.default=c}),Oc=H(function(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:c,data:i,schemaCode:u,it:a}=s,f=a.opts.multipleOfPrecision,l=c.let("res"),d=f?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${f}`:(0,e._)`${l} !== parseInt(${l})`;s.fail$data((0,e._)`(${u} === 0 || (${l} = ${i}/${u}, ${d}))`)}};t.default=n}),Nc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,c=0,i;for(;c<n;)s++,i=r.charCodeAt(c++),i>=55296&&i<=56319&&c<n&&(i=r.charCodeAt(c),(i&64512)===56320&&c++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),Tc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ve(),n=Nc(),s={message({keyword:i,schemaCode:u}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${u} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},c={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:f,it:l}=i,d=u==="maxLength"?e.operators.GT:e.operators.LT,w=l.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${w} ${d} ${f}`)}};t.default=c}),Rc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ve(),n=Ce(),s={message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},c={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schema:l,schemaCode:d,it:w}=i,S=w.opts.unicodeRegExp?"u":"";if(f){const{regExp:$}=w.opts.code,E=$.code==="new RegExp"?(0,n._)`new RegExp`:(0,r.useFunc)(u,$),m=u.let("valid");u.try(()=>u.assign(m,(0,n._)`${E}(${d}, ${S}).test(${a})`),()=>u.assign(m,!1)),i.fail$data((0,n._)`!${m}`)}else{const $=(0,e.usePattern)(i,l);i.fail$data((0,n._)`!${$}.test(${a})`)}}};t.default=c}),Ic=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message({keyword:s,schemaCode:c}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${c} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:c,data:i,schemaCode:u}=s,a=c==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${u}`)}};t.default=n}),Cc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ce(),n=Ve(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,schema:a,schemaCode:f,data:l,$data:d,it:w}=i,{opts:S}=w;if(!d&&a.length===0)return;const $=a.length>=S.loopRequired;if(w.allErrors?E():m(),S.strictRequired){const p=i.parentSchema.properties,{definedProperties:y}=i.it;for(const b of a)if((p==null?void 0:p[b])===void 0&&!y.has(b)){const g=w.schemaEnv.baseId+w.errSchemaPath,h=`required property "${b}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)(w,h,w.opts.strictRequired)}}function E(){if($||d)i.block$data(r.nil,o);else for(const p of a)(0,e.checkReportMissingProp)(i,p)}function m(){const p=u.let("missing");if($||d){const y=u.let("valid",!0);i.block$data(y,()=>_(p,y)),i.ok(y)}else u.if((0,e.checkMissingProp)(i,a,p)),(0,e.reportMissingProp)(i,p),u.else()}function o(){u.forOf("prop",f,p=>{i.setParams({missingProperty:p}),u.if((0,e.noPropertyInData)(u,l,p,S.ownProperties),()=>i.error())})}function _(p,y){i.setParams({missingProperty:p}),u.forOf(p,f,()=>{u.assign(y,(0,e.propertyInData)(u,l,p,S.ownProperties)),u.if((0,r.not)(y),()=>{i.error(),u.break()})},r.nil)}}};t.default=c}),Ac=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message({keyword:s,schemaCode:c}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${c} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:c,data:i,schemaCode:u}=s,a=c==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${u}`)}};t.default=n}),as=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=sn();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),jc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Xr(),r=Ce(),n=Ve(),s=as(),c={message:({params:{i:u,j:a}})=>(0,r.str)`must NOT have duplicate items (items ## ${a} and ${u} are identical)`,params:({params:{i:u,j:a}})=>(0,r._)`{i: ${u}, j: ${a}}`},i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:c,code(u){const{gen:a,data:f,$data:l,schema:d,parentSchema:w,schemaCode:S,it:$}=u;if(!l&&!d)return;const E=a.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];u.block$data(E,o,(0,r._)`${S} === false`),u.ok(E);function o(){const b=a.let("i",(0,r._)`${f}.length`),g=a.let("j");u.setParams({i:b,j:g}),a.assign(E,!0),a.if((0,r._)`${b} > 1`,()=>(_()?p:y)(b,g))}function _(){return m.length>0&&!m.some(b=>b==="object"||b==="array")}function p(b,g){const h=a.name("item"),P=(0,e.checkDataTypes)(m,h,$.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${b}--;`,()=>{a.let(h,(0,r._)`${f}[${b}]`),a.if(P,(0,r._)`continue`),m.length>1&&a.if((0,r._)`typeof ${h} == "string"`,(0,r._)`${h} += "_"`),a.if((0,r._)`typeof ${O}[${h}] == "number"`,()=>{a.assign(g,(0,r._)`${O}[${h}]`),u.error(),a.assign(E,!1).break()}).code((0,r._)`${O}[${h}] = ${b}`)})}function y(b,g){const h=(0,n.useFunc)(a,s.default),P=a.name("outer");a.label(P).for((0,r._)`;${b}--;`,()=>a.for((0,r._)`${g} = ${b}; ${g}--;`,()=>a.if((0,r._)`${h}(${f}[${b}], ${f}[${g}])`,()=>{u.error(),a.assign(E,!1).break(P)})))}}};t.default=i}),Mc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ve(),n=as(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},c={keyword:"const",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schemaCode:l,schema:d}=i;f||d&&typeof d=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${a}, ${l})`):i.fail((0,e._)`${d} !== ${a}`)}};t.default=c}),Dc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ve(),n=as(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},c={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schema:l,schemaCode:d,it:w}=i;if(!f&&l.length===0)throw new Error("enum must have non-empty array");const S=l.length>=w.opts.loopEnum;let $;const E=()=>$??($=(0,r.useFunc)(u,n.default));let m;if(S||f)m=u.let("valid"),i.block$data(m,o);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const p=u.const("vSchema",d);m=(0,e.or)(...l.map((y,b)=>_(p,b)))}i.pass(m);function o(){u.assign(m,!1),u.forOf("v",d,p=>u.if((0,e._)`${E()}(${a}, ${p})`,()=>u.assign(m,!0).break()))}function _(p,y){const b=l[y];return typeof b=="object"&&b!==null?(0,e._)`${E()}(${a}, ${p}[${y}])`:(0,e._)`${a} === ${b}`}}};t.default=c}),qc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=kc(),r=Oc(),n=Tc(),s=Rc(),c=Ic(),i=Cc(),u=Ac(),a=jc(),f=Mc(),l=Dc(),d=[e.default,r.default,n.default,s.default,c.default,i.default,u.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=d}),Ri=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Ce(),r=Ve(),n={message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(i){const{parentSchema:u,it:a}=i,{items:f}=u;if(!Array.isArray(f)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}c(i,f)}};function c(i,u){const{gen:a,schema:f,data:l,keyword:d,it:w}=i;w.items=!0;const S=a.const("len",(0,e._)`${l}.length`);if(f===!1)i.setParams({len:u.length}),i.pass((0,e._)`${S} <= ${u.length}`);else if(typeof f=="object"&&!(0,r.alwaysValidSchema)(w,f)){const E=a.var("valid",(0,e._)`${S} <= ${u.length}`);a.if((0,e.not)(E),()=>$(E)),i.ok(E)}function $(E){a.forRange("i",u.length,S,m=>{i.subschema({keyword:d,dataProp:m,dataPropType:r.Type.Num},E),w.allErrors||a.if((0,e.not)(E),()=>a.break())})}}t.validateAdditionalItems=c,t.default=s}),Ii=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Ce(),r=Ve(),n=It(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:u,it:a}=i;if(Array.isArray(u))return c(i,"additionalItems",u);a.items=!0,!(0,r.alwaysValidSchema)(a,u)&&i.ok((0,n.validateArray)(i))}};function c(i,u,a=i.schema){const{gen:f,parentSchema:l,data:d,keyword:w,it:S}=i;m(l),S.opts.unevaluated&&a.length&&S.items!==!0&&(S.items=r.mergeEvaluated.items(f,a.length,S.items));const $=f.name("valid"),E=f.const("len",(0,e._)`${d}.length`);a.forEach((o,_)=>{(0,r.alwaysValidSchema)(S,o)||(f.if((0,e._)`${E} > ${_}`,()=>i.subschema({keyword:w,schemaProp:_,dataProp:_},$)),i.ok($))});function m(o){const{opts:_,errSchemaPath:p}=S,y=a.length,b=y===o.minItems&&(y===o.maxItems||o[u]===!1);if(_.strictTuples&&!b){const g=`"${w}" is ${y}-tuple, but minItems or maxItems/${u} are not specified or different at path "${p}"`;(0,r.checkStrictMode)(S,g,_.strictTuples)}}}t.validateTuple=c,t.default=s}),Lc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ii(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Vc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ve(),n=It(),s=Ri(),c={message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:c,code(u){const{schema:a,parentSchema:f,it:l}=u,{prefixItems:d}=f;l.items=!0,!(0,r.alwaysValidSchema)(l,a)&&(d?(0,s.validateAdditionalItems)(u,d):u.ok((0,n.validateArray)(u)))}};t.default=i}),Uc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ve(),n={message:({params:{min:c,max:i}})=>i===void 0?(0,e.str)`must contain at least ${c} valid item(s)`:(0,e.str)`must contain at least ${c} and no more than ${i} valid item(s)`,params:({params:{min:c,max:i}})=>i===void 0?(0,e._)`{minContains: ${c}}`:(0,e._)`{minContains: ${c}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(c){const{gen:i,schema:u,parentSchema:a,data:f,it:l}=c;let d,w;const{minContains:S,maxContains:$}=a;l.opts.next?(d=S===void 0?1:S,w=$):d=1;const E=i.const("len",(0,e._)`${f}.length`);if(c.setParams({min:d,max:w}),w===void 0&&d===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&d>w){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),c.fail();return}if((0,r.alwaysValidSchema)(l,u)){let y=(0,e._)`${E} >= ${d}`;w!==void 0&&(y=(0,e._)`${y} && ${E} <= ${w}`),c.pass(y);return}l.items=!0;const m=i.name("valid");w===void 0&&d===1?_(m,()=>i.if(m,()=>i.break())):d===0?(i.let(m,!0),w!==void 0&&i.if((0,e._)`${f}.length > 0`,o)):(i.let(m,!1),o()),c.result(m,()=>c.reset());function o(){const y=i.name("_valid"),b=i.let("count",0);_(y,()=>i.if(y,()=>p(b)))}function _(y,b){i.forRange("i",0,E,g=>{c.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},y),b()})}function p(y){i.code((0,e._)`${y}++`),w===void 0?i.if((0,e._)`${y} >= ${d}`,()=>i.assign(m,!0).break()):(i.if((0,e._)`${y} > ${w}`,()=>i.assign(m,!1).break()),d===1?i.assign(m,!0):i.if((0,e._)`${y} >= ${d}`,()=>i.assign(m,!0)))}}};t.default=s}),Fc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Ce(),r=Ve(),n=It();t.error={message:({params:{property:a,depsCount:f,deps:l}})=>{const d=f===1?"property":"properties";return(0,e.str)`must have ${d} ${l} when property ${a} is present`},params:({params:{property:a,depsCount:f,deps:l,missingProperty:d}})=>(0,e._)`{property: ${a},
14
- missingProperty: ${d},
15
- depsCount: ${f},
16
- deps: ${l}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[f,l]=c(a);i(a,f),u(a,l)}};function c({schema:a}){const f={},l={};for(const d in a){if(d==="__proto__")continue;const w=Array.isArray(a[d])?f:l;w[d]=a[d]}return[f,l]}function i(a,f=a.schema){const{gen:l,data:d,it:w}=a;if(Object.keys(f).length===0)return;const S=l.let("missing");for(const $ in f){const E=f[$];if(E.length===0)continue;const m=(0,n.propertyInData)(l,d,$,w.opts.ownProperties);a.setParams({property:$,depsCount:E.length,deps:E.join(", ")}),w.allErrors?l.if(m,()=>{for(const o of E)(0,n.checkReportMissingProp)(a,o)}):(l.if((0,e._)`${m} && (${(0,n.checkMissingProp)(a,E,S)})`),(0,n.reportMissingProp)(a,S),l.else())}}t.validatePropertyDeps=i;function u(a,f=a.schema){const{gen:l,data:d,keyword:w,it:S}=a,$=l.name("valid");for(const E in f)(0,r.alwaysValidSchema)(S,f[E])||(l.if((0,n.propertyInData)(l,d,E,S.opts.ownProperties),()=>{const m=a.subschema({keyword:w,schemaProp:E},$);a.mergeValidEvaluated(m,$)},()=>l.var($,!0)),a.ok($))}t.validateSchemaDeps=u,t.default=s}),zc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ve(),n={message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(c){const{gen:i,schema:u,data:a,it:f}=c;if((0,r.alwaysValidSchema)(f,u))return;const l=i.name("valid");i.forIn("key",a,d=>{c.setParams({propertyName:d}),c.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),i.if((0,e.not)(l),()=>{c.error(!0),f.allErrors||i.break()})}),c.ok(l)}};t.default=s}),Ci=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ce(),n=Xt(),s=Ve(),c={message:"must NOT have additional properties",params:({params:u})=>(0,r._)`{additionalProperty: ${u.additionalProperty}}`},i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:c,code(u){const{gen:a,schema:f,parentSchema:l,data:d,errsCount:w,it:S}=u;if(!w)throw new Error("ajv implementation error");const{allErrors:$,opts:E}=S;if(S.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(S,f))return;const m=(0,e.allSchemaProperties)(l.properties),o=(0,e.allSchemaProperties)(l.patternProperties);_(),u.ok((0,r._)`${w} === ${n.default.errors}`);function _(){a.forIn("key",d,h=>{!m.length&&!o.length?b(h):a.if(p(h),()=>b(h))})}function p(h){let P;if(m.length>8){const O=(0,s.schemaRefOrVal)(S,l.properties,"properties");P=(0,e.isOwnProperty)(a,O,h)}else m.length?P=(0,r.or)(...m.map(O=>(0,r._)`${h} === ${O}`)):P=r.nil;return o.length&&(P=(0,r.or)(P,...o.map(O=>(0,r._)`${(0,e.usePattern)(u,O)}.test(${h})`))),(0,r.not)(P)}function y(h){a.code((0,r._)`delete ${d}[${h}]`)}function b(h){if(E.removeAdditional==="all"||E.removeAdditional&&f===!1){y(h);return}if(f===!1){u.setParams({additionalProperty:h}),u.error(),$||a.break();return}if(typeof f=="object"&&!(0,s.alwaysValidSchema)(S,f)){const P=a.name("valid");E.removeAdditional==="failing"?(g(h,P,!1),a.if((0,r.not)(P),()=>{u.reset(),y(h)})):(g(h,P),$||a.if((0,r.not)(P),()=>a.break()))}}function g(h,P,O){const A={keyword:"additionalProperties",dataProp:h,dataPropType:s.Type.Str};O===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(A,P)}}};t.default=i}),Bc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=on(),r=It(),n=Ve(),s=Ci(),c={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,parentSchema:f,data:l,it:d}=i;d.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(a);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 S=w.filter(o=>!(0,n.alwaysValidSchema)(d,a[o]));if(S.length===0)return;const $=u.name("valid");for(const o of S)E(o)?m(o):(u.if((0,r.propertyInData)(u,l,o,d.opts.ownProperties)),m(o),d.allErrors||u.else().var($,!0),u.endIf()),i.it.definedProperties.add(o),i.ok($);function E(o){return d.opts.useDefaults&&!d.compositeRule&&a[o].default!==void 0}function m(o){i.subschema({keyword:"properties",schemaProp:o,dataProp:o},$)}}};t.default=c}),Hc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ce(),n=Ve(),s=Ve(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,data:f,parentSchema:l,it:d}=i,{opts:w}=d,S=(0,e.allSchemaProperties)(a),$=S.filter(b=>(0,n.alwaysValidSchema)(d,a[b]));if(S.length===0||$.length===S.length&&(!d.opts.unevaluated||d.props===!0))return;const E=w.strictSchema&&!w.allowMatchingProperties&&l.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 b of S)E&&p(b),d.allErrors?y(b):(u.var(m,!0),y(b),u.if(m))}function p(b){for(const g in E)new RegExp(b).test(g)&&(0,n.checkStrictMode)(d,`property ${g} matches pattern ${b} (use allowMatchingProperties)`)}function y(b){u.forIn("key",f,g=>{u.if((0,r._)`${(0,e.usePattern)(i,b)}.test(${g})`,()=>{const h=$.includes(b);h||i.subschema({keyword:"patternProperties",schemaProp:b,dataProp:g,dataPropType:s.Type.Str},m),d.opts.unevaluated&&o!==!0?u.assign((0,r._)`${o}[${g}]`,!0):!h&&!d.allErrors&&u.if((0,r.not)(m),()=>u.break())})})}}};t.default=c}),Kc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ve(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:c,it:i}=n;if((0,e.alwaysValidSchema)(i,c)){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}),xc=H(function(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}),Gc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ve(),n={message:"must match exactly one schema in oneOf",params:({params:c})=>(0,e._)`{passingSchemas: ${c.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(c){const{gen:i,schema:u,parentSchema:a,it:f}=c;if(!Array.isArray(u))throw new Error("ajv implementation error");if(f.opts.discriminator&&a.discriminator)return;const l=u,d=i.let("valid",!1),w=i.let("passing",null),S=i.name("_valid");c.setParams({passing:w}),i.block($),c.result(d,()=>c.reset(),()=>c.error(!0));function $(){l.forEach((E,m)=>{let o;(0,r.alwaysValidSchema)(f,E)?i.var(S,!0):o=c.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},S),m>0&&i.if((0,e._)`${S} && ${d}`).assign(d,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),i.if(S,()=>{i.assign(d,!0),i.assign(w,m),o&&c.mergeEvaluated(o,e.Name)})})}}};t.default=s}),Wc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ve(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:c,it:i}=n;if(!Array.isArray(c))throw new Error("ajv implementation error");const u=s.name("valid");c.forEach((a,f)=>{if((0,e.alwaysValidSchema)(i,a))return;const l=n.subschema({keyword:"allOf",schemaProp:f},u);n.ok(u),n.mergeEvaluated(l)})}};t.default=r}),Jc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=Ve(),n={message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(i){const{gen:u,parentSchema:a,it:f}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const l=c(f,"then"),d=c(f,"else");if(!l&&!d)return;const w=u.let("valid",!0),S=u.name("_valid");if($(),i.reset(),l&&d){const m=u.let("ifClause");i.setParams({ifClause:m}),u.if(S,E("then",m),E("else",m))}else l?u.if(S,E("then")):u.if((0,e.not)(S),E("else"));i.pass(w,()=>i.error(!0));function $(){const m=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},S);i.mergeEvaluated(m)}function E(m,o){return()=>{const _=i.subschema({keyword:m},S);u.assign(w,S),i.mergeValidEvaluated(_,w),o?u.assign(o,(0,e._)`${m}`):i.setParams({ifClause:m})}}}};function c(i,u){const a=i.schema[u];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),Qc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ve(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:c}){s.if===void 0&&(0,e.checkStrictMode)(c,`"${n}" without "if" is ignored`)}};t.default=r}),Xc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ri(),r=Lc(),n=Ii(),s=Vc(),c=Uc(),i=Fc(),u=zc(),a=Ci(),f=Bc(),l=Hc(),d=Kc(),w=xc(),S=Gc(),$=Wc(),E=Jc(),m=Qc();function o(_=!1){const p=[d.default,w.default,S.default,$.default,E.default,m.default,u.default,a.default,i.default,f.default,l.default];return _?p.push(r.default,s.default):p.push(e.default,n.default),p.push(c.default),p}t.default=o}),Yc=H(function(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,c){const{gen:i,data:u,$data:a,schema:f,schemaCode:l,it:d}=s,{opts:w,errSchemaPath:S,schemaEnv:$,self:E}=d;if(!w.validateFormats)return;a?m():o();function m(){const _=i.scopeValue("formats",{ref:E.formats,code:w.code.formats}),p=i.const("fDef",(0,e._)`${_}[${l}]`),y=i.let("fType"),b=i.let("format");i.if((0,e._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(y,(0,e._)`${p}.type || "string"`).assign(b,(0,e._)`${p}.validate`),()=>i.assign(y,(0,e._)`"string"`).assign(b,p)),s.fail$data((0,e.or)(g(),h()));function g(){return w.strictSchema===!1?e.nil:(0,e._)`${l} && !${b}`}function h(){const P=$.$async?(0,e._)`(${p}.async ? await ${b}(${u}) : ${b}(${u}))`:(0,e._)`${b}(${u})`,O=(0,e._)`(typeof ${b} == "function" ? ${P} : ${b}.test(${u}))`;return(0,e._)`${b} && ${b} !== true && ${y} === ${c} && !${O}`}}function o(){const _=E.formats[f];if(!_){g();return}if(_===!0)return;const[p,y,b]=h(_);p===c&&s.pass(P());function g(){if(w.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${S}"`}}function h(O){const A=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(f)}`:void 0,F=i.scopeValue("formats",{key:f,ref:O,code:A});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${F}.validate`]:["string",O,F]}function P(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!$.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${u})`}return typeof y=="function"?(0,e._)`${b}(${u})`:(0,e._)`${b}.test(${u})`}}}};t.default=n}),Zc=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Yc(),r=[e.default];t.default=r}),eu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),tu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Pc(),r=qc(),n=Xc(),s=Zc(),c=eu(),i=[e.default,r.default,(0,n.default)(),s.default,c.metadataVocabulary,c.contentVocabulary];t.default=i}),ru=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0;var e;(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(t.DiscrError=e={}))}),nu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ru(),n=is(),s=cn(),c=Ve(),i={message:({params:{discrError:a,tagName:f}})=>a===r.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:a,tag:f,tagName:l}})=>(0,e._)`{error: ${a}, tag: ${l}, tagValue: ${f}}`},u={keyword:"discriminator",type:"object",schemaType:"object",error:i,code(a){const{gen:f,data:l,schema:d,parentSchema:w,it:S}=a,{oneOf:$}=w;if(!S.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(!$)throw new Error("discriminator: requires oneOf keyword");const m=f.let("valid",!1),o=f.const("tag",(0,e._)`${l}${(0,e.getProperty)(E)}`);f.if((0,e._)`typeof ${o} == "string"`,()=>_(),()=>a.error(!1,{discrError:r.DiscrError.Tag,tag:o,tagName:E})),a.ok(m);function _(){const b=y();f.if(!1);for(const g in b)f.elseIf((0,e._)`${o} === ${g}`),f.assign(m,p(b[g]));f.else(),a.error(!1,{discrError:r.DiscrError.Mapping,tag:o,tagName:E}),f.endIf()}function p(b){const g=f.name("valid"),h=a.subschema({keyword:"oneOf",schemaProp:b},g);return a.mergeEvaluated(h,e.Name),g}function y(){var b;const g={},h=O(w);let P=!0;for(let L=0;L<$.length;L++){let X=$[L];if(X!=null&&X.$ref&&!(0,c.schemaHasRulesButRef)(X,S.self.RULES)){const ee=X.$ref;if(X=n.resolveRef.call(S.self,S.schemaEnv.root,S.baseId,ee),X instanceof n.SchemaEnv&&(X=X.schema),X===void 0)throw new s.default(S.opts.uriResolver,S.baseId,ee)}const G=(b=X==null?void 0:X.properties)===null||b===void 0?void 0:b[E];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);P=P&&(h||O(X)),A(G,L)}if(!P)throw new Error(`discriminator: "${E}" must be required`);return g;function O({required:L}){return Array.isArray(L)&&L.includes(E)}function A(L,X){if(L.const)F(L.const,X);else if(L.enum)for(const G of L.enum)F(G,X);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function F(L,X){if(typeof L!="string"||L in g)throw new Error(`discriminator: "${E}" values must be unique strings`);g[L]=X}}}};t.default=u}),su=H(function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),Ai=H(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=$c(),n=tu(),s=nu(),c=su(),i=["/properties"],u="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(c,i):c;this.addMetaSchema($,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=a,e.exports=t=a,e.exports.Ajv=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var f=on();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var l=Ce();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=ss();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var w=cn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),iu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(O,A){return{validate:O,compare:A}}t.fullFormats={date:e(c,i),time:e(a,f),"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:P,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:y},int64:{type:"number",validate:b},float:{type:"number",validate:g},double:{type:"number",validate:g},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"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 c(O){const A=n.exec(O);if(!A)return!1;const F=+A[1],L=+A[2],X=+A[3];return L>=1&&L<=12&&X>=1&&X<=(L===2&&r(F)?29:s[L])}function i(O,A){if(O&&A)return O>A?1:O<A?-1:0}var u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function a(O,A){const F=u.exec(O);if(!F)return!1;const L=+F[1],X=+F[2],G=+F[3],ee=F[5];return(L<=23&&X<=59&&G<=59||L===23&&X===59&&G===60)&&(!A||ee!=="")}function f(O,A){if(!(O&&A))return;const F=u.exec(O),L=u.exec(A);if(F&&L)return O=F[1]+F[2]+F[3]+(F[4]||""),A=L[1]+L[2]+L[3]+(L[4]||""),O>A?1:O<A?-1:0}var l=/t|\s/i;function d(O){const A=O.split(l);return A.length===2&&c(A[0])&&a(A[1],!0)}function w(O,A){if(!(O&&A))return;const[F,L]=O.split(l),[X,G]=A.split(l),ee=i(F,X);if(ee!==void 0)return ee||f(L,G)}var S=/\/|:/,$=/^(?:[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 S.test(O)&&$.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 y(O){return Number.isInteger(O)&&O<=p&&O>=_}function b(O){return Number.isInteger(O)}function g(){return!0}var h=/[^\\]\\Z/;function P(O){if(h.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}}),Yr=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(_){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,y)=>`${p}${y}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((p,y)=>(y instanceof r&&(p[y.str]=(p[y.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function s(o,..._){const p=[o[0]];let y=0;for(;y<_.length;)u(p,_[y]),p.push(o[++y]);return new n(p)}t._=s;var c=new n("+");function i(o,..._){const p=[S(o[0])];let y=0;for(;y<_.length;)p.push(c),u(p,_[y]),p.push(c,S(o[++y]));return a(p),new n(p)}t.str=i;function u(o,_){_ instanceof n?o.push(..._._items):_ instanceof r?o.push(_):o.push(d(_))}t.addCodeArg=u;function a(o){let _=1;for(;_<o.length-1;){if(o[_]===c){const p=f(o[_-1],o[_+1]);if(p!==void 0){o.splice(_-1,3,p);continue}o[_++]="+"}_++}}function f(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 l(o,_){return _.emptyStr()?o:o.emptyStr()?_:i`${o}${_}`}t.strConcat=l;function d(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:S(Array.isArray(o)?o.join(","):o)}function w(o){return new n(S(o))}t.stringify=w;function S(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=S;function $(o){return typeof o=="string"&&t.IDENTIFIER.test(o)?new n(`.${o}`):s`[${o}]`}t.getProperty=$;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=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Yr();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(a){a[a.Started=0]="Started",a[a.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:f,parent:l}={}){this._names={},this._prefixes=f,this._parent=l}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const l=this._names[f]||this._nameGroup(f);return`${f}${l.index++}`}_nameGroup(f){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class c extends e.Name{constructor(f,l){super(l),this.prefix=f}setValue(f,{property:l,itemIndex:d}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(l)}[${d}]`}}t.ValueScopeName=c;var i=(0,e._)`\n`;class u extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?i:e.nil}}get(){return this._scope}name(f){return new c(f,this._newName(f))}value(f,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(f),{prefix:S}=w,$=(d=l.key)!==null&&d!==void 0?d:l.ref;let E=this._values[S];if(E){const _=E.get($);if(_)return _}else E=this._values[S]=new Map;E.set($,w);const m=this._scope[S]||(this._scope[S]=[]),o=m.length;return m[o]=l.ref,w.setValue(l,{property:S,itemIndex:o}),w}getValue(f,l){const d=this._values[f];if(d)return d.get(l)}scopeRefs(f,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${f}${d.scopePath}`})}scopeCode(f=this._values,l,d){return this._reduceValues(f,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},l,d)}_reduceValues(f,l,d={},w){let S=e.nil;for(const $ in f){const E=f[$];if(!E)continue;const m=d[$]=d[$]||new Map;E.forEach(o=>{if(m.has(o))return;m.set(o,n.Started);let _=l(o);if(_){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;S=(0,e._)`${S}${p} ${o} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(o))S=(0,e._)`${S}${_}${this.opts._n}`;else throw new r(o);m.set(o,n.Completed)})}return S}}t.ValueScope=u}),Te=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Yr(),r=Vs(),n=Yr();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 c{optimizeNodes(){return this}optimizeNames(v,k){return this}}class i extends c{constructor(v,k,j){super(),this.varKind=v,this.name=k,this.rhs=j}render({es5:v,_n:k}){const j=v?r.varKinds.var:this.varKind,W=this.rhs===void 0?"":` = ${this.rhs}`;return`${j} ${this.name}${W};`+k}optimizeNames(v,k){if(v[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,v,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends c{constructor(v,k,j){super(),this.lhs=v,this.rhs=k,this.sideEffects=j}render({_n:v}){return`${this.lhs} = ${this.rhs};`+v}optimizeNames(v,k){if(!(this.lhs instanceof e.Name&&!v[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,v,k),this}get names(){const v=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(v,this.rhs)}}class a extends u{constructor(v,k,j,W){super(v,j,W),this.op=k}render({_n:v}){return`${this.lhs} ${this.op}= ${this.rhs};`+v}}class f extends c{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`${this.label}:`+v}}class l extends c{constructor(v){super(),this.label=v,this.names={}}render({_n:v}){return`break${this.label?` ${this.label}`:""};`+v}}class d extends c{constructor(v){super(),this.error=v}render({_n:v}){return`throw ${this.error};`+v}get names(){return this.error.names}}class w extends c{constructor(v){super(),this.code=v}render({_n:v}){return`${this.code};`+v}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(v,k){return this.code=G(this.code,v,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class S extends c{constructor(v=[]){super(),this.nodes=v}render(v){return this.nodes.reduce((k,j)=>k+j.render(v),"")}optimizeNodes(){const{nodes:v}=this;let k=v.length;for(;k--;){const j=v[k].optimizeNodes();Array.isArray(j)?v.splice(k,1,...j):j?v[k]=j:v.splice(k,1)}return v.length>0?this:void 0}optimizeNames(v,k){const{nodes:j}=this;let W=j.length;for(;W--;){const Q=j[W];Q.optimizeNames(v,k)||(ee(v,Q.names),j.splice(W,1))}return j.length>0?this:void 0}get names(){return this.nodes.reduce((v,k)=>L(v,k.names),{})}}class $ extends S{render(v){return"{"+v._n+super.render(v)+"}"+v._n}}class E extends S{}class m extends ${}m.kind="else";class o extends ${constructor(v,k){super(k),this.condition=v}render(v){let k=`if(${this.condition})`+super.render(v);return this.else&&(k+="else "+this.else.render(v)),k}optimizeNodes(){super.optimizeNodes();const v=this.condition;if(v===!0)return this.nodes;let k=this.else;if(k){const j=k.optimizeNodes();k=this.else=Array.isArray(j)?new m(j):j}if(k)return v===!1?k instanceof o?k:k.nodes:this.nodes.length?this:new o(fe(v),k instanceof o?[k]:k.nodes);if(!(v===!1||!this.nodes.length))return this}optimizeNames(v,k){var j;if(this.else=(j=this.else)===null||j===void 0?void 0:j.optimizeNames(v,k),!!(super.optimizeNames(v,k)||this.else))return this.condition=G(this.condition,v,k),this}get names(){const v=super.names;return X(v,this.condition),this.else&&L(v,this.else.names),v}}o.kind="if";class _ extends ${}_.kind="for";class p extends _{constructor(v){super(),this.iteration=v}render(v){return`for(${this.iteration})`+super.render(v)}optimizeNames(v,k){if(super.optimizeNames(v,k))return this.iteration=G(this.iteration,v,k),this}get names(){return L(super.names,this.iteration.names)}}class y extends _{constructor(v,k,j,W){super(),this.varKind=v,this.name=k,this.from=j,this.to=W}render(v){const k=v.es5?r.varKinds.var:this.varKind,{name:j,from:W,to:Q}=this;return`for(${k} ${j}=${W}; ${j}<${Q}; ${j}++)`+super.render(v)}get names(){const v=X(super.names,this.from);return X(v,this.to)}}class b extends _{constructor(v,k,j,W){super(),this.loop=v,this.varKind=k,this.name=j,this.iterable=W}render(v){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(v)}optimizeNames(v,k){if(super.optimizeNames(v,k))return this.iterable=G(this.iterable,v,k),this}get names(){return L(super.names,this.iterable.names)}}class g extends ${constructor(v,k,j){super(),this.name=v,this.args=k,this.async=j}render(v){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(v)}}g.kind="func";class h extends S{render(v){return"return "+super.render(v)}}h.kind="return";class P extends ${render(v){let k="try"+super.render(v);return this.catch&&(k+=this.catch.render(v)),this.finally&&(k+=this.finally.render(v)),k}optimizeNodes(){var v,k;return super.optimizeNodes(),(v=this.catch)===null||v===void 0||v.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(v,k){var j,W;return super.optimizeNames(v,k),(j=this.catch)===null||j===void 0||j.optimizeNames(v,k),(W=this.finally)===null||W===void 0||W.optimizeNames(v,k),this}get names(){const v=super.names;return this.catch&&L(v,this.catch.names),this.finally&&L(v,this.finally.names),v}}class O extends ${constructor(v){super(),this.error=v}render(v){return`catch(${this.error})`+super.render(v)}}O.kind="catch";class A extends ${render(v){return"finally"+super.render(v)}}A.kind="finally";class F{constructor(v,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
17
- `:""},this._extScope=v,this._scope=new r.Scope({parent:v}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(v){return this._scope.name(v)}scopeName(v){return this._extScope.name(v)}scopeValue(v,k){const j=this._extScope.value(v,k);return(this._values[j.prefix]||(this._values[j.prefix]=new Set)).add(j),j}getScopeValue(v,k){return this._extScope.getValue(v,k)}scopeRefs(v){return this._extScope.scopeRefs(v,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(v,k,j,W){const Q=this._scope.toName(k);return j!==void 0&&W&&(this._constants[Q.str]=j),this._leafNode(new i(v,Q,j)),Q}const(v,k,j){return this._def(r.varKinds.const,v,k,j)}let(v,k,j){return this._def(r.varKinds.let,v,k,j)}var(v,k,j){return this._def(r.varKinds.var,v,k,j)}assign(v,k,j){return this._leafNode(new u(v,k,j))}add(v,k){return this._leafNode(new a(v,t.operators.ADD,k))}code(v){return typeof v=="function"?v():v!==e.nil&&this._leafNode(new w(v)),this}object(...v){const k=["{"];for(const[j,W]of v)k.length>1&&k.push(","),k.push(j),(j!==W||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,W));return k.push("}"),new e._Code(k)}if(v,k,j){if(this._blockNode(new o(v)),k&&j)this.code(k).else().code(j).endIf();else if(k)this.code(k).endIf();else if(j)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(v){return this._elseNode(new o(v))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(o,m)}_for(v,k){return this._blockNode(v),k&&this.code(k).endFor(),this}for(v,k){return this._for(new p(v),k)}forRange(v,k,j,W,Q=this.opts.es5?r.varKinds.var:r.varKinds.let){const ae=this._scope.toName(v);return this._for(new y(Q,ae,k,j),()=>W(ae))}forOf(v,k,j,W=r.varKinds.const){const Q=this._scope.toName(v);if(this.opts.es5){const ae=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ae}.length`,re=>{this.var(Q,(0,e._)`${ae}[${re}]`),j(Q)})}return this._for(new b("of",W,Q,k),()=>j(Q))}forIn(v,k,j,W=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(v,(0,e._)`Object.keys(${k})`,j);const Q=this._scope.toName(v);return this._for(new b("in",W,Q,k),()=>j(Q))}endFor(){return this._endBlockNode(_)}label(v){return this._leafNode(new f(v))}break(v){return this._leafNode(new l(v))}return(v){const k=new h;if(this._blockNode(k),this.code(v),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(h)}try(v,k,j){if(!k&&!j)throw new Error('CodeGen: "try" without "catch" and "finally"');const W=new P;if(this._blockNode(W),this.code(v),k){const Q=this.name("e");this._currNode=W.catch=new O(Q),k(Q)}return j&&(this._currNode=W.finally=new A,this.code(j)),this._endBlockNode(O,A)}throw(v){return this._leafNode(new d(v))}block(v,k){return this._blockStarts.push(this._nodes.length),v&&this.code(v).endBlock(k),this}endBlock(v){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const j=this._nodes.length-k;if(j<0||v!==void 0&&j!==v)throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${v} expected`);return this._nodes.length=k,this}func(v,k=e.nil,j,W){return this._blockNode(new g(v,k,j)),W&&this.code(W).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(v=1){for(;v-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(v){return this._currNode.nodes.push(v),this}_blockNode(v){this._currNode.nodes.push(v),this._nodes.push(v)}_endBlockNode(v,k){const j=this._currNode;if(j instanceof v||k&&j instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${v.kind}/${k.kind}`:v.kind}"`)}_elseNode(v){const k=this._currNode;if(!(k instanceof o))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=v,this}get _root(){return this._nodes[0]}get _currNode(){const v=this._nodes;return v[v.length-1]}set _currNode(v){const k=this._nodes;k[k.length-1]=v}}t.CodeGen=F;function L(R,v){for(const k in v)R[k]=(R[k]||0)+(v[k]||0);return R}function X(R,v){return v instanceof e._CodeOrName?L(R,v.names):R}function G(R,v,k){if(R instanceof e.Name)return j(R);if(!W(R))return R;return new e._Code(R._items.reduce((Q,ae)=>(ae instanceof e.Name&&(ae=j(ae)),ae instanceof e._Code?Q.push(...ae._items):Q.push(ae),Q),[]));function j(Q){const ae=k[Q.str];return ae===void 0||v[Q.str]!==1?Q:(delete v[Q.str],ae)}function W(Q){return Q instanceof e._Code&&Q._items.some(ae=>ae instanceof e.Name&&v[ae.str]===1&&k[ae.str]!==void 0)}}function ee(R,v){for(const k in v)R[k]=(R[k]||0)-(v[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 B(...R){return R.reduce(se)}t.or=B;function T(R){return(v,k)=>v===e.nil?k:k===e.nil?v:(0,e._)`${M(v)} ${R} ${M(k)}`}function M(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),Fe=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Te(),r=Yr();function n(g){const h={};for(const P of g)h[P]=!0;return h}t.toHash=n;function s(g,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(c(g,h),!i(h,g.self.RULES.all))}t.alwaysValidSchema=s;function c(g,h=g.schema){const{opts:P,self:O}=g;if(!P.strictSchema||typeof h=="boolean")return;const A=O.RULES.keywords;for(const F in h)A[F]||b(g,`unknown keyword: "${F}"`)}t.checkUnknownRules=c;function i(g,h){if(typeof g=="boolean")return!g;for(const P in g)if(h[P])return!0;return!1}t.schemaHasRules=i;function u(g,h){if(typeof g=="boolean")return!g;for(const P in g)if(P!=="$ref"&&h.all[P])return!0;return!1}t.schemaHasRulesButRef=u;function a({topSchemaRef:g,schemaPath:h},P,O,A){if(!A){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,e._)`${P}`}return(0,e._)`${g}${h}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function f(g){return w(decodeURIComponent(g))}t.unescapeFragment=f;function l(g){return encodeURIComponent(d(g))}t.escapeFragment=l;function d(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function w(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function S(g,h){if(Array.isArray(g))for(const P of g)h(P);else h(g)}t.eachItem=S;function $({mergeNames:g,mergeToName:h,mergeValues:P,resultToName:O}){return(A,F,L,X)=>{const G=L===void 0?F:L instanceof e.Name?(F instanceof e.Name?g(A,F,L):h(A,F,L),L):F instanceof e.Name?(h(A,L,F),F):P(F,L);return X===e.Name&&!(G instanceof e.Name)?O(A,G):G}}t.mergeEvaluated={props:$({mergeNames:(g,h,P)=>g.if((0,e._)`${P} !== true && ${h} !== undefined`,()=>{g.if((0,e._)`${h} === true`,()=>g.assign(P,!0),()=>g.assign(P,(0,e._)`${P} || {}`).code((0,e._)`Object.assign(${P}, ${h})`))}),mergeToName:(g,h,P)=>g.if((0,e._)`${P} !== true`,()=>{h===!0?g.assign(P,!0):(g.assign(P,(0,e._)`${P} || {}`),m(g,P,h))}),mergeValues:(g,h)=>g===!0?!0:{...g,...h},resultToName:E}),items:$({mergeNames:(g,h,P)=>g.if((0,e._)`${P} !== true && ${h} !== undefined`,()=>g.assign(P,(0,e._)`${h} === true ? true : ${P} > ${h} ? ${P} : ${h}`)),mergeToName:(g,h,P)=>g.if((0,e._)`${P} !== true`,()=>g.assign(P,h===!0?!0:(0,e._)`${P} > ${h} ? ${P} : ${h}`)),mergeValues:(g,h)=>g===!0?!0:Math.max(g,h),resultToName:(g,h)=>g.var("items",h)})};function E(g,h){if(h===!0)return g.var("props",!0);const P=g.var("props",(0,e._)`{}`);return h!==void 0&&m(g,P,h),P}t.evaluatedPropsToName=E;function m(g,h,P){Object.keys(P).forEach(O=>g.assign((0,e._)`${h}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var o={};function _(g,h){return g.scopeValue("func",{ref:h,code:o[h.code]||(o[h.code]=new r._Code(h.code))})}t.useFunc=_;var p;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(p=t.Type||(t.Type={}));function y(g,h,P){if(g instanceof e.Name){const O=h===p.Num;return P?O?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:O?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,e.getProperty)(g).toString():"/"+d(g)}t.getErrorPath=y;function b(g,h,P=g.opts.strictSchema){if(P){if(h=`strict mode: ${h}`,P===!0)throw new Error(h);g.self.logger.warn(h)}}t.checkStrictMode=b}),Yt=H(function(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}),un=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Te(),r=Fe(),n=Yt();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:y}=m,{gen:b,compositeRule:g,allErrors:h}=y,P=d(m,o,_);p??(g||h)?a(b,P):f(y,(0,e._)`[${P}]`)}t.reportError=s;function c(m,o=t.keywordError,_){const{it:p}=m,{gen:y,compositeRule:b,allErrors:g}=p,h=d(m,o,_);a(y,h),b||g||f(p,n.default.vErrors)}t.reportExtraError=c;function i(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=i;function u({gen:m,keyword:o,schemaValue:_,data:p,errsCount:y,it:b}){if(y===void 0)throw new Error("ajv implementation error");const g=m.name("err");m.forRange("i",y,n.default.errors,h=>{m.const(g,(0,e._)`${n.default.vErrors}[${h}]`),m.if((0,e._)`${g}.instancePath === undefined`,()=>m.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,b.errorPath))),m.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${o}`),b.opts.verbose&&(m.assign((0,e._)`${g}.schema`,_),m.assign((0,e._)`${g}.data`,p))})}t.extendErrors=u;function a(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 f(m,o){const{gen:_,validateName:p,schemaEnv:y}=m;y.$async?_.throw((0,e._)`new ${m.ValidationError}(${o})`):(_.assign((0,e._)`${p}.errors`,o),_.return(!1))}var l={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:y}=m,b=[S(y,_),$(m,_)];return E(m,o,b),p.object(...b)}function S({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 $({keyword:m,it:{errSchemaPath:o}},{schemaPath:_,parentSchema:p}){let y=p?o:(0,e.str)`${o}/${m}`;return _&&(y=(0,e.str)`${y}${(0,r.getErrorPath)(_,r.Type.Str)}`),[l.schemaPath,y]}function E(m,{params:o,message:_},p){const{keyword:y,data:b,schemaValue:g,it:h}=m,{opts:P,propertyName:O,topSchemaRef:A,schemaPath:F}=h;p.push([l.keyword,y],[l.params,typeof o=="function"?o(m):o||(0,e._)`{}`]),P.messages&&p.push([l.message,typeof _=="function"?_(m):_]),P.verbose&&p.push([l.schema,g],[l.parentSchema,(0,e._)`${A}${F}`],[n.default.data,b]),O&&p.push([l.propertyName,O])}}),au=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=un(),r=Te(),n=Yt(),s={message:"boolean schema is false"};function c(a){const{gen:f,schema:l,validateName:d}=a;l===!1?u(a,!1):typeof l=="object"&&l.$async===!0?f.return(n.default.data):(f.assign((0,r._)`${d}.errors`,null),f.return(!0))}t.topBoolOrEmptySchema=c;function i(a,f){const{gen:l,schema:d}=a;d===!1?(l.var(f,!1),u(a)):l.var(f,!0)}t.boolOrEmptySchema=i;function u(a,f){const{gen:l,data:d}=a,w={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(w,s,void 0,f)}}),ji=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(c){return typeof c=="string"&&r.has(c)}t.isJSONType=n;function s(){const c={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...c,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},c.number,c.string,c.array,c.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),Mi=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:c},i){const u=c.RULES.types[i];return u&&u!==!0&&r(s,u)}t.schemaHasRulesForType=e;function r(s,c){return c.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,c){var i;return s[c.keyword]!==void 0||((i=c.definition.implements)===null||i===void 0?void 0:i.some(u=>s[u]!==void 0))}t.shouldUseRule=n}),Zr=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=ji(),r=Mi(),n=un(),s=Te(),c=Fe(),i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i=t.DataType||(t.DataType={}));function u(p){const y=a(p.type);if(y.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!y.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&y.push("null")}return y}t.getSchemaTypes=u;function a(p){const y=Array.isArray(p)?p:p?[p]:[];if(y.every(e.isJSONType))return y;throw new Error("type must be JSONType or JSONType[]: "+y.join(","))}t.getJSONTypes=a;function f(p,y){const{gen:b,data:g,opts:h}=p,P=d(y,h.coerceTypes),O=y.length>0&&!(P.length===0&&y.length===1&&(0,r.schemaHasRulesForType)(p,y[0]));if(O){const A=E(y,g,h.strictNumbers,i.Wrong);b.if(A,()=>{P.length?w(p,y,P):o(p)})}return O}t.coerceAndCheckDataType=f;var l=new Set(["string","number","integer","boolean","null"]);function d(p,y){return y?p.filter(b=>l.has(b)||y==="array"&&b==="array"):[]}function w(p,y,b){const{gen:g,data:h,opts:P}=p,O=g.let("dataType",(0,s._)`typeof ${h}`),A=g.let("coerced",(0,s._)`undefined`);P.coerceTypes==="array"&&g.if((0,s._)`${O} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>g.assign(h,(0,s._)`${h}[0]`).assign(O,(0,s._)`typeof ${h}`).if(E(y,h,P.strictNumbers),()=>g.assign(A,h))),g.if((0,s._)`${A} !== undefined`);for(const L of b)(l.has(L)||L==="array"&&P.coerceTypes==="array")&&F(L);g.else(),o(p),g.endIf(),g.if((0,s._)`${A} !== undefined`,()=>{g.assign(h,A),S(p,A)});function F(L){switch(L){case"string":g.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(A,(0,s._)`"" + ${h}`).elseIf((0,s._)`${h} === null`).assign(A,(0,s._)`""`);return;case"number":g.elseIf((0,s._)`${O} == "boolean" || ${h} === null
18
- || (${O} == "string" && ${h} && ${h} == +${h})`).assign(A,(0,s._)`+${h}`);return;case"integer":g.elseIf((0,s._)`${O} === "boolean" || ${h} === null
19
- || (${O} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(A,(0,s._)`+${h}`);return;case"boolean":g.elseIf((0,s._)`${h} === "false" || ${h} === 0 || ${h} === null`).assign(A,!1).elseIf((0,s._)`${h} === "true" || ${h} === 1`).assign(A,!0);return;case"null":g.elseIf((0,s._)`${h} === "" || ${h} === 0 || ${h} === false`),g.assign(A,null);return;case"array":g.elseIf((0,s._)`${O} === "string" || ${O} === "number"
20
- || ${O} === "boolean" || ${h} === null`).assign(A,(0,s._)`[${h}]`)}}}function S({gen:p,parentData:y,parentDataProperty:b},g){p.if((0,s._)`${y} !== undefined`,()=>p.assign((0,s._)`${y}[${b}]`,g))}function $(p,y,b,g=i.Correct){const h=g===i.Correct?s.operators.EQ:s.operators.NEQ;let P;switch(p){case"null":return(0,s._)`${y} ${h} null`;case"array":P=(0,s._)`Array.isArray(${y})`;break;case"object":P=(0,s._)`${y} && typeof ${y} == "object" && !Array.isArray(${y})`;break;case"integer":P=O((0,s._)`!(${y} % 1) && !isNaN(${y})`);break;case"number":P=O();break;default:return(0,s._)`typeof ${y} ${h} ${p}`}return g===i.Correct?P:(0,s.not)(P);function O(A=s.nil){return(0,s.and)((0,s._)`typeof ${y} == "number"`,A,b?(0,s._)`isFinite(${y})`:s.nil)}}t.checkDataType=$;function E(p,y,b,g){if(p.length===1)return $(p[0],y,b,g);let h;const P=(0,c.toHash)(p);if(P.array&&P.object){const O=(0,s._)`typeof ${y} != "object"`;h=P.null?O:(0,s._)`!${y} || ${O}`,delete P.null,delete P.array,delete P.object}else h=s.nil;P.number&&delete P.integer;for(const O in P)h=(0,s.and)(h,$(O,y,b,g));return h}t.checkDataTypes=E;var m={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:y})=>typeof p=="string"?(0,s._)`{type: ${p}}`:(0,s._)`{type: ${y}}`};function o(p){const y=_(p);(0,n.reportError)(y,m)}t.reportTypeError=o;function _(p){const{gen:y,data:b,schema:g}=p,h=(0,c.schemaRefOrVal)(p,g,"type");return{gen:y,keyword:"type",data:b,schema:g.type,schemaCode:h,schemaValue:h,parentSchema:g,params:{},it:p}}}),ou=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Te(),r=Fe();function n(c,i){const{properties:u,items:a}=c.schema;if(i==="object"&&u)for(const f in u)s(c,f,u[f].default);else i==="array"&&Array.isArray(a)&&a.forEach((f,l)=>s(c,l,f.default))}t.assignDefaults=n;function s(c,i,u){const{gen:a,compositeRule:f,data:l,opts:d}=c;if(u===void 0)return;const w=(0,e._)`${l}${(0,e.getProperty)(i)}`;if(f){(0,r.checkStrictMode)(c,`default is ignored for: ${w}`);return}let S=(0,e._)`${w} === undefined`;d.useDefaults==="empty"&&(S=(0,e._)`${S} || ${w} === null || ${w} === ""`),a.if(S,(0,e._)`${w} = ${(0,e.stringify)(u)}`)}}),Ct=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Te(),r=Fe(),n=Yt(),s=Fe();function c(p,y){const{gen:b,data:g,it:h}=p;b.if(d(b,g,y,h.opts.ownProperties),()=>{p.setParams({missingProperty:(0,e._)`${y}`},!0),p.error()})}t.checkReportMissingProp=c;function i({gen:p,data:y,it:{opts:b}},g,h){return(0,e.or)(...g.map(P=>(0,e.and)(d(p,y,P,b.ownProperties),(0,e._)`${h} = ${P}`)))}t.checkMissingProp=i;function u(p,y){p.setParams({missingProperty:y},!0),p.error()}t.reportMissingProp=u;function a(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function f(p,y,b){return(0,e._)`${a(p)}.call(${y}, ${b})`}t.isOwnProperty=f;function l(p,y,b,g){const h=(0,e._)`${y}${(0,e.getProperty)(b)} !== undefined`;return g?(0,e._)`${h} && ${f(p,y,b)}`:h}t.propertyInData=l;function d(p,y,b,g){const h=(0,e._)`${y}${(0,e.getProperty)(b)} === undefined`;return g?(0,e.or)(h,(0,e.not)(f(p,y,b))):h}t.noPropertyInData=d;function w(p){return p?Object.keys(p).filter(y=>y!=="__proto__"):[]}t.allSchemaProperties=w;function S(p,y){return w(y).filter(b=>!(0,r.alwaysValidSchema)(p,y[b]))}t.schemaProperties=S;function $({schemaCode:p,data:y,it:{gen:b,topSchemaRef:g,schemaPath:h,errorPath:P},it:O},A,F,L){const X=L?(0,e._)`${p}, ${y}, ${g}${h}`:y,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,P)],[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}, ${b.object(...G)}`;return F!==e.nil?(0,e._)`${A}.call(${F}, ${ee})`:(0,e._)`${A}(${ee})`}t.callValidateCode=$;var E=(0,e._)`new RegExp`;function m({gen:p,it:{opts:y}},b){const g=y.unicodeRegExp?"u":"",{regExp:h}=y.code,P=h(b,g);return p.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,e._)`${h.code==="new RegExp"?E:(0,s.useFunc)(p,h)}(${b}, ${g})`})}t.usePattern=m;function o(p){const{gen:y,data:b,keyword:g,it:h}=p,P=y.name("valid");if(h.allErrors){const A=y.let("valid",!0);return O(()=>y.assign(A,!1)),A}return y.var(P,!0),O(()=>y.break()),P;function O(A){const F=y.const("len",(0,e._)`${b}.length`);y.forRange("i",0,F,L=>{p.subschema({keyword:g,dataProp:L,dataPropType:r.Type.Num},P),y.if((0,e.not)(P),A)})}}t.validateArray=o;function _(p){const{gen:y,schema:b,keyword:g,it:h}=p;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(F=>(0,r.alwaysValidSchema)(h,F))&&!h.opts.unevaluated)return;const O=y.let("valid",!1),A=y.name("_valid");y.block(()=>b.forEach((F,L)=>{const X=p.subschema({keyword:g,schemaProp:L,compositeRule:!0},A);y.assign(O,(0,e._)`${O} || ${A}`),p.mergeValidEvaluated(X,A)||y.if((0,e.not)(O))})),p.result(O,()=>p.reset(),()=>p.error(!0))}t.validateUnion=_}),cu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Te(),r=Yt(),n=Ct(),s=un();function c(S,$){const{gen:E,keyword:m,schema:o,parentSchema:_,it:p}=S,y=$.macro.call(p.self,o,_,p),b=l(E,m,y);p.opts.validateSchema!==!1&&p.self.validateSchema(y,!0);const g=E.name("valid");S.subschema({schema:y,schemaPath:e.nil,errSchemaPath:`${p.errSchemaPath}/${m}`,topSchemaRef:b,compositeRule:!0},g),S.pass(g,()=>S.error(!0))}t.macroKeywordCode=c;function i(S,$){var E;const{gen:m,keyword:o,schema:_,parentSchema:p,$data:y,it:b}=S;f(b,$);const g=!y&&$.compile?$.compile.call(b.self,_,p,b):$.validate,h=l(m,o,g),P=m.let("valid");S.block$data(P,O),S.ok((E=$.valid)!==null&&E!==void 0?E:P);function O(){if($.errors===!1)L(),$.modifying&&u(S),X(()=>S.error());else{const G=$.async?A():F();$.modifying&&u(S),X(()=>a(S,G))}}function A(){const G=m.let("ruleErrs",null);return m.try(()=>L((0,e._)`await `),ee=>m.assign(P,!1).if((0,e._)`${ee} instanceof ${b.ValidationError}`,()=>m.assign(G,(0,e._)`${ee}.errors`),()=>m.throw(ee))),G}function F(){const G=(0,e._)`${h}.errors`;return m.assign(G,null),L(e.nil),G}function L(G=$.async?(0,e._)`await `:e.nil){const ee=b.opts.passContext?r.default.this:r.default.self,fe=!("compile"in $&&!y||$.schema===!1);m.assign(P,(0,e._)`${G}${(0,n.callValidateCode)(S,h,ee,fe)}`,$.modifying)}function X(G){var ee;m.if((0,e.not)((ee=$.valid)!==null&&ee!==void 0?ee:P),G)}}t.funcKeywordCode=i;function u(S){const{gen:$,data:E,it:m}=S;$.if(m.parentData,()=>$.assign(E,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function a(S,$){const{gen:E}=S;E.if((0,e._)`Array.isArray(${$})`,()=>{E.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${$} : ${r.default.vErrors}.concat(${$})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(S)},()=>S.error())}function f({schemaEnv:S},$){if($.async&&!S.$async)throw new Error("async keyword in sync schema")}function l(S,$,E){if(E===void 0)throw new Error(`keyword "${$}" failed to compile`);return S.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(S,$,E=!1){return!$.length||$.some(m=>m==="array"?Array.isArray(S):m==="object"?S&&typeof S=="object"&&!Array.isArray(S):typeof S==m||E&&typeof S>"u")}t.validSchemaType=d;function w({schema:S,opts:$,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(y=>!Object.prototype.hasOwnProperty.call(S,y)))throw new Error(`parent schema must have dependencies of ${_}: ${p.join(",")}`);if(o.validateSchema&&!o.validateSchema(S[_])){const b=`keyword "${_}" value is invalid at path "${m}": `+E.errorsText(o.validateSchema.errors);if($.validateSchema==="log")E.logger.error(b);else throw new Error(b)}}t.validateKeywordUsage=w}),uu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Te(),r=Fe();function n(i,{keyword:u,schemaProp:a,schema:f,schemaPath:l,errSchemaPath:d,topSchemaRef:w}){if(u!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const S=i.schema[u];return a===void 0?{schema:S,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${u}`}:{schema:S[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${u}/${(0,r.escapeFragment)(a)}`}}if(f!==void 0){if(l===void 0||d===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:l,topSchemaRef:w,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,u,{dataProp:a,dataPropType:f,data:l,dataTypes:d,propertyName:w}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:S}=u;if(a!==void 0){const{errorPath:E,dataPathArr:m,opts:o}=u,_=S.let("data",(0,e._)`${u.data}${(0,e.getProperty)(a)}`,!0);$(_),i.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(a,f,o.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...m,i.parentDataProperty]}if(l!==void 0){const E=l instanceof e.Name?l:S.let("data",l,!0);$(E),w!==void 0&&(i.propertyName=w)}d&&(i.dataTypes=d);function $(E){i.data=E,i.dataLevel=u.dataLevel+1,i.dataTypes=[],u.definedProperties=new Set,i.parentData=u.data,i.dataNames=[...u.dataNames,E]}}t.extendSubschemaData=s;function c(i,{jtdDiscriminator:u,jtdMetadata:a,compositeRule:f,createErrors:l,allErrors:d}){f!==void 0&&(i.compositeRule=f),l!==void 0&&(i.createErrors=l),d!==void 0&&(i.allErrors=d),i.jtdDiscriminator=u,i.jtdMetadata=a}t.extendSubschemaMode=c}),ln=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Fe(),r=sn(),n=Ni(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function c(m,o=!0){return typeof m=="boolean"?!0:o===!0?!u(m):o?a(m)<=o:!1}t.inlineRef=c;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(m){for(const o in m){if(i.has(o))return!0;const _=m[o];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function a(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+=a(p)),o===1/0))return 1/0}return o}function f(m,o="",_){_!==!1&&(o=w(o));const p=m.parse(o);return l(m,p)}t.getFullPath=f;function l(m,o){return m.serialize(o).split("#")[0]+"#"}t._getFullPath=l;var d=/#\/?$/;function w(m){return m?m.replace(d,""):""}t.normalizeId=w;function S(m,o,_){return _=w(_),m.resolve(o,_)}t.resolveUrl=S;var $=/^[a-z_][-a-z0-9._]*$/i;function E(m,o){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:p}=this.opts,y=w(m[_]||o),b={"":y},g=f(p,y,!1),h={},P=new Set;return n(m,{allKeys:!0},(F,L,X,G)=>{if(G===void 0)return;const ee=g+L;let fe=b[G];typeof F[_]=="string"&&(fe=we.call(this,F[_])),Oe.call(this,F.$anchor),Oe.call(this,F.$dynamicAnchor),b[L]=fe;function we(se){const B=this.opts.uriResolver.resolve;if(se=w(fe?B(fe,se):se),P.has(se))throw A(se);P.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,h[se],se),h[se]=F):this.refs[se]=ee),se}function Oe(se){if(typeof se=="string"){if(!$.test(se))throw new Error(`invalid anchor "${se}"`);we.call(this,`#${se}`)}}}),h;function O(F,L,X){if(L!==void 0&&!r(F,L))throw A(X)}function A(F){return new Error(`reference "${F}" resolves to more than one schema`)}}t.getSchemaRefs=E}),fn=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=au(),r=Zr(),n=Mi(),s=Zr(),c=ou(),i=cu(),u=uu(),a=Te(),f=Yt(),l=ln(),d=Fe(),w=un();function S(N){if(g(N)&&(P(N),b(N))){o(N);return}$(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=S;function $({gen:N,validateName:I,schema:V,schemaEnv:z,opts:J},te){J.code.es5?N.func(I,(0,a._)`${f.default.data}, ${f.default.valCxt}`,z.$async,()=>{N.code((0,a._)`"use strict"; ${p(V,J)}`),m(N,J),N.code(te)}):N.func(I,(0,a._)`${f.default.data}, ${E(J)}`,z.$async,()=>N.code(p(V,J)).code(te))}function E(N){return(0,a._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${N.dynamicRef?(0,a._)`, ${f.default.dynamicAnchors}={}`:a.nil}}={}`}function m(N,I){N.if(f.default.valCxt,()=>{N.var(f.default.instancePath,(0,a._)`${f.default.valCxt}.${f.default.instancePath}`),N.var(f.default.parentData,(0,a._)`${f.default.valCxt}.${f.default.parentData}`),N.var(f.default.parentDataProperty,(0,a._)`${f.default.valCxt}.${f.default.parentDataProperty}`),N.var(f.default.rootData,(0,a._)`${f.default.valCxt}.${f.default.rootData}`),I.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{N.var(f.default.instancePath,(0,a._)`""`),N.var(f.default.parentData,(0,a._)`undefined`),N.var(f.default.parentDataProperty,(0,a._)`undefined`),N.var(f.default.rootData,f.default.data),I.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`{}`)})}function o(N){const{schema:I,opts:V,gen:z}=N;$(N,()=>{V.$comment&&I.$comment&&G(N),F(N),z.let(f.default.vErrors,null),z.let(f.default.errors,0),V.unevaluated&&_(N),O(N),ee(N)})}function _(N){const{gen:I,validateName:V}=N;N.evaluated=I.const("evaluated",(0,a._)`${V}.evaluated`),I.if((0,a._)`${N.evaluated}.dynamicProps`,()=>I.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),I.if((0,a._)`${N.evaluated}.dynamicItems`,()=>I.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function p(N,I){const V=typeof N=="object"&&N[I.schemaId];return V&&(I.code.source||I.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function y(N,I){if(g(N)&&(P(N),b(N))){h(N,I);return}(0,e.boolOrEmptySchema)(N,I)}function b({schema:N,self:I}){if(typeof N=="boolean")return!N;for(const V in N)if(I.RULES.all[V])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function h(N,I){const{schema:V,gen:z,opts:J}=N;J.$comment&&V.$comment&&G(N),L(N),X(N);const te=z.const("_errs",f.default.errors);O(N,te),z.var(I,(0,a._)`${te} === ${f.default.errors}`)}function P(N){(0,d.checkUnknownRules)(N),A(N)}function O(N,I){if(N.opts.jtd)return we(N,[],!1,I);const V=(0,r.getSchemaTypes)(N.schema),z=(0,r.coerceAndCheckDataType)(N,V);we(N,V,!z,I)}function A(N){const{schema:I,errSchemaPath:V,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 "${V}"`)}function F(N){const{schema:I,opts:V}=N;I.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function L(N){const I=N.schema[N.opts.schemaId];I&&(N.baseId=(0,l.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:V,errSchemaPath:z,opts:J}){const te=V.$comment;if(J.$comment===!0)N.code((0,a._)`${f.default.self}.logger.log(${te})`);else if(typeof J.$comment=="function"){const Ee=(0,a.str)`${z}/$comment`,Ue=N.scopeValue("root",{ref:I.root});N.code((0,a._)`${f.default.self}.opts.$comment(${te}, ${Ee}, ${Ue}.schema)`)}}function ee(N){const{gen:I,schemaEnv:V,validateName:z,ValidationError:J,opts:te}=N;V.$async?I.if((0,a._)`${f.default.errors} === 0`,()=>I.return(f.default.data),()=>I.throw((0,a._)`new ${J}(${f.default.vErrors})`)):(I.assign((0,a._)`${z}.errors`,f.default.vErrors),te.unevaluated&&fe(N),I.return((0,a._)`${f.default.errors} === 0`))}function fe({gen:N,evaluated:I,props:V,items:z}){V instanceof a.Name&&N.assign((0,a._)`${I}.props`,V),z instanceof a.Name&&N.assign((0,a._)`${I}.items`,z)}function we(N,I,V,z){const{gen:J,schema:te,data:Ee,allErrors:Ue,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)Be(Ie);Be(_e.post)});function Be(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&&V&&(J.else(),(0,s.reportTypeError)(N)),J.endIf()):Oe(N,Ie),Ue||J.if((0,a._)`${f.default.errors} === ${z||0}`))}}function Oe(N,I){const{gen:V,schema:z,opts:{useDefaults:J}}=N;J&&(0,c.assignDefaults)(N,I.type),V.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||(B(N,I),N.opts.allowUnionTypes||T(N,I),M(N,N.dataTypes))}function B(N,I){if(I.length){if(!N.dataTypes.length){N.dataTypes=I;return}I.forEach(V=>{v(N.dataTypes,V)||j(N,`type "${V}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,I)}}function T(N,I){I.length>1&&!(I.length===2&&I.includes("null"))&&j(N,"use allowUnionTypes to allow union type keyword")}function M(N,I){const V=N.self.RULES.all;for(const z in V){const J=V[z];if(typeof J=="object"&&(0,n.shouldUseRule)(N.schema,J)){const{type:te}=J.definition;te.length&&!te.some(Ee=>R(I,Ee))&&j(N,`missing type "${te.join(",")}" for keyword "${z}"`)}}}function R(N,I){return N.includes(I)||I==="number"&&N.includes("integer")}function v(N,I){return N.includes(I)||I==="integer"&&N.includes("number")}function k(N,I){const V=[];for(const z of N.dataTypes)v(I,z)?V.push(z):I.includes("integer")&&z==="number"&&V.push("integer");N.dataTypes=V}function j(N,I){const V=N.schemaEnv.baseId+N.errSchemaPath;I+=` at "${V}" (strictTypes)`,(0,d.checkStrictMode)(N,I,N.opts.strictTypes)}class W{constructor(I,V,z){if((0,i.validateKeywordUsage)(I,V,z),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=z,this.data=I.data,this.schema=I.schema[z],this.$data=V.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(I,this.schema,z,this.$data),this.schemaType=V.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=V,this.$data)this.schemaCode=I.gen.const("vSchema",ve(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${z} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=I.gen.const("_errs",f.default.errors))}result(I,V,z){this.failResult((0,a.not)(I),V,z)}failResult(I,V,z){this.gen.if(I),z?z():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,V){this.failResult((0,a.not)(I),void 0,V)}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:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),I)})`)}error(I,V,z){if(V){this.setParams(V),this._error(I,z),this.setParams({});return}this._error(I,z)}_error(I,V){(I?w.reportExtraError:w.reportError)(this,this.def.error,V)}$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,V){V?Object.assign(this.params,I):this.params=I}block$data(I,V,z=a.nil){this.gen.block(()=>{this.check$data(I,z),V()})}check$data(I=a.nil,V=a.nil){if(!this.$data)return;const{gen:z,schemaCode:J,schemaType:te,def:Ee}=this;z.if((0,a.or)((0,a._)`${J} === undefined`,V)),I!==a.nil&&z.assign(I,!0),(te.length||Ee.validateSchema)&&(z.elseIf(this.invalid$data()),this.$dataError(),I!==a.nil&&z.assign(I,!1)),z.else()}invalid$data(){const{gen:I,schemaCode:V,schemaType:z,def:J,it:te}=this;return(0,a.or)(Ee(),Ue());function Ee(){if(z.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Re=Array.isArray(z)?z:[z];return(0,a._)`${(0,s.checkDataTypes)(Re,V,te.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ue(){if(J.validateSchema){const Re=I.scopeValue("validate$data",{ref:J.validateSchema});return(0,a._)`!${Re}(${V})`}return a.nil}}subschema(I,V){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 y(J,V),J}mergeEvaluated(I,V){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,V)),z.items!==!0&&I.items!==void 0&&(z.items=d.mergeEvaluated.items(J,I.items,z.items,V)))}mergeValidEvaluated(I,V){const{it:z,gen:J}=this;if(z.opts.unevaluated&&(z.props!==!0||z.items!==!0))return J.if(V,()=>this.mergeEvaluated(I,a.Name)),!0}}t.KeywordCxt=W;function Q(N,I,V,z){const J=new W(N,V,I);"code"in V?V.code(J,z):J.$data&&V.validate?(0,i.funcKeywordCode)(J,V):"macro"in V?(0,i.macroKeywordCode)(J,V):(V.compile||V.validate)&&(0,i.funcKeywordCode)(J,V)}var ae=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(N,{dataLevel:I,dataNames:V,dataPathArr:z}){let J,te;if(N==="")return f.default.rootData;if(N[0]==="/"){if(!ae.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);J=N,te=f.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=V[I-_e],!J)return te}let Ee=te;const Ue=J.split("/");for(const Ae of Ue)Ae&&(te=(0,a._)`${te}${(0,a.getProperty)((0,d.unescapeJsonPointer)(Ae))}`,Ee=(0,a._)`${Ee} && ${te}`);return Ee;function Re(Ae,_e){return`Cannot access ${Ae} ${_e} levels up, current level is ${I}`}}t.getData=ve}),os=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),cs=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ln();class r extends Error{constructor(s,c,i,u){super(u||`can't resolve reference ${i} from id ${c}`),this.missingRef=(0,e.resolveUrl)(s,c,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),us=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Te(),r=os(),n=Yt(),s=ln(),c=Fe(),i=fn();class u{constructor(_){var p;this.refs={},this.dynamicAnchors={};let y;typeof _.schema=="object"&&(y=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(p=_.baseId)!==null&&p!==void 0?p:(0,s.normalizeId)(y==null?void 0:y[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=y==null?void 0:y.$async,this.refs={}}}t.SchemaEnv=u;function a(o){const _=d.call(this,o);if(_)return _;const p=(0,s.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:y,lines:b}=this.opts.code,{ownProperties:g}=this.opts,h=new e.CodeGen(this.scope,{es5:y,lines:b,ownProperties:g});let P;o.$async&&(P=h.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=h.scopeName("validate");o.validateName=O;const A={gen:h,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:h.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:P,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,i.validateFunctionCode)(A),h.optimize(this.opts.code.optimize);const L=h.toString();F=`${h.scopeRefs(n.default.scope)}return ${L}`,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:L,scopeValues:h._values}),this.opts.unevaluated){const{props:ee,items:fe}=A;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(L){throw delete o.validate,delete o.validateName,F&&this.logger.error("Error compiling schema, function code:",F),L}finally{this._compilations.delete(o)}}t.compileSchema=a;function f(o,_,p){var y;p=(0,s.resolveUrl)(this.opts.uriResolver,_,p);const b=o.refs[p];if(b)return b;let g=S.call(this,o,p);if(g===void 0){const h=(y=o.localRefs)===null||y===void 0?void 0:y[p],{schemaId:P}=this.opts;h&&(g=new u({schema:h,schemaId:P,root:o,baseId:_}))}if(g!==void 0)return o.refs[p]=l.call(this,g)}t.resolveRef=f;function l(o){return(0,s.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:a.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 S(o,_){let p;for(;typeof(p=this.refs[_])=="string";)_=p;return p||this.schemas[_]||$.call(this,o,_)}function $(o,_){const p=this.opts.uriResolver.parse(_),y=(0,s._getFullPath)(this.opts.uriResolver,p);let b=(0,s.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&y===b)return m.call(this,p,o);const g=(0,s.normalizeId)(y),h=this.refs[g]||this.schemas[g];if(typeof h=="string"){const P=$.call(this,o,h);return typeof(P==null?void 0:P.schema)!="object"?void 0:m.call(this,p,P)}if(typeof(h==null?void 0:h.schema)=="object"){if(h.validate||a.call(this,h),g===(0,s.normalizeId)(_)){const{schema:P}=h,{schemaId:O}=this.opts,A=P[O];return A&&(b=(0,s.resolveUrl)(this.opts.uriResolver,b,A)),new u({schema:P,schemaId:O,root:o,baseId:b})}return m.call(this,p,h)}}t.resolveSchema=$;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(o,{baseId:_,schema:p,root:y}){var b;if(((b=o.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const P of o.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const O=p[(0,c.unescapeFragment)(P)];if(O===void 0)return;p=O;const A=typeof p=="object"&&p[this.opts.schemaId];!E.has(P)&&A&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,A))}let g;if(typeof p!="boolean"&&p.$ref&&!(0,c.schemaHasRulesButRef)(p,this.RULES)){const P=(0,s.resolveUrl)(this.opts.uriResolver,_,p.$ref);g=$.call(this,y,P)}const{schemaId:h}=this.opts;if(g=g||new u({schema:p,schemaId:h,root:y,baseId:_}),g.schema!==g.root.schema)return g}}),lu=H(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),ls=H(function(t,e){(function(r,n){typeof t=="object"&&typeof e<"u"?n(t):typeof define=="function"&&define.amd?define(["exports"],n):n(r.URI=r.URI||{})})(t,function(r){function n(){for(var 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 K=C.length-1,x=1;x<K;++x)C[x]=C[x].slice(1,-1);return C[K]=C[K].slice(1),C.join("")}else return C[0]}function s(D){return"(?:"+D+")"}function c(D){return D===void 0?"undefined":D===null?"null":Object.prototype.toString.call(D).split(" ").pop().split("]").shift().toLowerCase()}function i(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 a(D,C){var U=D;if(C)for(var K in C)U[K]=C[K];return U}function f(D){var C="[A-Za-z]",U="[0-9]",K=n(U,"[A-Fa-f]"),x=s(s("%[EFef]"+K+"%"+K+K+"%"+K+K)+"|"+s("%[89A-Fa-f]"+K+"%"+K+K)+"|"+s("%"+K+K)),de="[\\:\\/\\?\\#\\[\\]\\@]",ge="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",je=n(de,ge),xe=D?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",et=D?"[\\uE000-\\uF8FF]":"[]",ke=n(C,U,"[\\-\\.\\_\\~]",xe);s(C+n(C,U,"[\\+\\-\\.]")+"*"),s(s(x+"|"+n(ke,ge,"[\\:]"))+"*");var Ke=s(s("25[0-5]")+"|"+s("2[0-4]"+U)+"|"+s("1"+U+U)+"|"+s("0?[1-9]"+U)+"|0?0?"+U),rt=s(Ke+"\\."+Ke+"\\."+Ke+"\\."+Ke),$e=s(K+"{1,4}"),Le=s(s($e+"\\:"+$e)+"|"+rt),nt=s(s($e+"\\:")+"{6}"+Le),Ge=s("\\:\\:"+s($e+"\\:")+"{5}"+Le),At=s(s($e)+"?\\:\\:"+s($e+"\\:")+"{4}"+Le),Pt=s(s(s($e+"\\:")+"{0,1}"+$e)+"?\\:\\:"+s($e+"\\:")+"{3}"+Le),kt=s(s(s($e+"\\:")+"{0,2}"+$e)+"?\\:\\:"+s($e+"\\:")+"{2}"+Le),Nt=s(s(s($e+"\\:")+"{0,3}"+$e)+"?\\:\\:"+$e+"\\:"+Le),Vt=s(s(s($e+"\\:")+"{0,4}"+$e)+"?\\:\\:"+Le),Z=s(s(s($e+"\\:")+"{0,5}"+$e)+"?\\:\\:"+$e),ue=s(s(s($e+"\\:")+"{0,6}"+$e)+"?\\:\\:"),Se=s([nt,Ge,At,Pt,kt,Nt,Vt,Z,ue].join("|")),Me=s(s(ke+"|"+x)+"+");s("[vV]"+K+"+\\."+n(ke,ge,"[\\:]")+"+"),s(s(x+"|"+n(ke,ge))+"*");var Qe=s(x+"|"+n(ke,ge,"[\\:\\@]"));return s(s(x+"|"+n(ke,ge,"[\\@]"))+"+"),s(s(Qe+"|"+n("[\\/\\?]",et))+"*"),{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,"[\\:\\@\\/\\?]",et),"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(x,"g"),IPV4ADDRESS:new RegExp("^("+rt+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Se+")"+s(s("\\%25|\\%(?!"+K+"{2})")+"("+Me+")")+"?\\]?$")}}var l=f(!1),d=f(!0),w=function(){function D(C,U){var K=[],x=!0,de=!1,ge=void 0;try{for(var je=C[Symbol.iterator](),xe;!(x=(xe=je.next()).done)&&(K.push(xe.value),!(U&&K.length===U));x=!0);}catch(et){de=!0,ge=et}finally{try{!x&&je.return&&je.return()}finally{if(de)throw ge}}return K}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")}}(),S=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)},$=2147483647,E=36,m=1,o=26,_=38,p=700,y=72,b=128,g="-",h=/^xn--/,P=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,A={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,L=Math.floor,X=String.fromCharCode;function G(D){throw new RangeError(A[D])}function ee(D,C){for(var U=[],K=D.length;K--;)U[K]=C(D[K]);return U}function fe(D,C){var U=D.split("@"),K="";U.length>1&&(K=U[0]+"@",D=U[1]),D=D.replace(O,".");var x=D.split("."),de=ee(x,C).join(".");return K+de}function we(D){for(var C=[],U=0,K=D.length;U<K;){var x=D.charCodeAt(U++);if(x>=55296&&x<=56319&&U<K){var de=D.charCodeAt(U++);(de&64512)==56320?C.push(((x&1023)<<10)+(de&1023)+65536):(C.push(x),U--)}else C.push(x)}return C}var Oe=function(C){return String.fromCodePoint.apply(String,S(C))},se=function(C){return C-48<10?C-22:C-65<26?C-65:C-97<26?C-97:E},B=function(C,U){return C+22+75*(C<26)-((U!=0)<<5)},T=function(C,U,K){var x=0;for(C=K?L(C/p):C>>1,C+=L(C/U);C>F*o>>1;x+=E)C=L(C/F);return L(x+(F+1)*C/(C+_))},M=function(C){var U=[],K=C.length,x=0,de=b,ge=y,je=C.lastIndexOf(g);je<0&&(je=0);for(var xe=0;xe<je;++xe)C.charCodeAt(xe)>=128&&G("not-basic"),U.push(C.charCodeAt(xe));for(var et=je>0?je+1:0;et<K;){for(var ke=x,Ke=1,rt=E;;rt+=E){et>=K&&G("invalid-input");var $e=se(C.charCodeAt(et++));($e>=E||$e>L(($-x)/Ke))&&G("overflow"),x+=$e*Ke;var Le=rt<=ge?m:rt>=ge+o?o:rt-ge;if($e<Le)break;var nt=E-Le;Ke>L($/nt)&&G("overflow"),Ke*=nt}var Ge=U.length+1;ge=T(x-ke,Ge,ke==0),L(x/Ge)>$-de&&G("overflow"),de+=L(x/Ge),x%=Ge,U.splice(x++,0,de)}return String.fromCodePoint.apply(String,U)},R=function(C){var U=[];C=we(C);var K=C.length,x=b,de=0,ge=y,je=!0,xe=!1,et=void 0;try{for(var ke=C[Symbol.iterator](),Ke;!(je=(Ke=ke.next()).done);je=!0){var rt=Ke.value;rt<128&&U.push(X(rt))}}catch(Gt){xe=!0,et=Gt}finally{try{!je&&ke.return&&ke.return()}finally{if(xe)throw et}}var $e=U.length,Le=$e;for($e&&U.push(g);Le<K;){var nt=$,Ge=!0,At=!1,Pt=void 0;try{for(var kt=C[Symbol.iterator](),Nt;!(Ge=(Nt=kt.next()).done);Ge=!0){var Vt=Nt.value;Vt>=x&&Vt<nt&&(nt=Vt)}}catch(Gt){At=!0,Pt=Gt}finally{try{!Ge&&kt.return&&kt.return()}finally{if(At)throw Pt}}var Z=Le+1;nt-x>L(($-de)/Z)&&G("overflow"),de+=(nt-x)*Z,x=nt;var ue=!0,Se=!1,Me=void 0;try{for(var Qe=C[Symbol.iterator](),_t;!(ue=(_t=Qe.next()).done);ue=!0){var Tt=_t.value;if(Tt<x&&++de>$&&G("overflow"),Tt==x){for(var Ut=de,lt=E;;lt+=E){var vt=lt<=ge?m:lt>=ge+o?o:lt-ge;if(Ut<vt)break;var dr=Ut-vt,hr=E-vt;U.push(X(B(vt+dr%hr,0))),Ut=L(dr/hr)}U.push(X(B(Ut,0))),ge=T(de,Z,Le==$e),de=0,++Le}}}catch(Gt){Se=!0,Me=Gt}finally{try{!ue&&Qe.return&&Qe.return()}finally{if(Se)throw Me}}++de,++x}return U.join("")},v=function(C){return fe(C,function(U){return h.test(U)?M(U.slice(4).toLowerCase()):U})},k=function(C){return fe(C,function(U){return P.test(U)?"xn--"+R(U):U})},j={version:"2.1.0",ucs2:{decode:we,encode:Oe},decode:M,encode:R,toASCII:k,toUnicode:v},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 ae(D){for(var C="",U=0,K=D.length;U<K;){var x=parseInt(D.substr(U+1,2),16);if(x<128)C+=String.fromCharCode(x),U+=3;else if(x>=194&&x<224){if(K-U>=6){var de=parseInt(D.substr(U+4,2),16);C+=String.fromCharCode((x&31)<<6|de&63)}else C+=D.substr(U,6);U+=6}else if(x>=224){if(K-U>=9){var ge=parseInt(D.substr(U+4,2),16),je=parseInt(D.substr(U+7,2),16);C+=String.fromCharCode((x&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(K){var x=ae(K);return x.match(C.UNRESERVED)?x:K}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,i)),D.host!==void 0&&(D.host=String(D.host).replace(C.PCT_ENCODED,U).toLowerCase().replace(C.NOT_HOST,Q).replace(C.PCT_ENCODED,i)),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,i)),D.query!==void 0&&(D.query=String(D.query).replace(C.PCT_ENCODED,U).replace(C.NOT_QUERY,Q).replace(C.PCT_ENCODED,i)),D.fragment!==void 0&&(D.fragment=String(D.fragment).replace(C.PCT_ENCODED,U).replace(C.NOT_FRAGMENT,Q).replace(C.PCT_ENCODED,i)),D}function ve(D){return D.replace(/^0*(.*)/,"$1")||"0"}function N(D,C){var U=D.match(C.IPV4ADDRESS)||[],K=w(U,2),x=K[1];return x?x.split(".").map(ve).join("."):D}function I(D,C){var U=D.match(C.IPV6ADDRESS)||[],K=w(U,3),x=K[1],de=K[2];if(x){for(var ge=x.toLowerCase().split("::").reverse(),je=w(ge,2),xe=je[0],et=je[1],ke=et?et.split(":").map(ve):[],Ke=xe.split(":").map(ve),rt=C.IPV4ADDRESS.test(Ke[Ke.length-1]),$e=rt?7:8,Le=Ke.length-$e,nt=Array($e),Ge=0;Ge<$e;++Ge)nt[Ge]=ke[Ge]||Ke[Le+Ge]||"";rt&&(nt[$e-1]=N(nt[$e-1],C));var At=nt.reduce(function(Z,ue,Se){if(!ue||ue==="0"){var Me=Z[Z.length-1];Me&&Me.index+Me.length===Se?Me.length++:Z.push({index:Se,length:1})}return Z},[]),Pt=At.sort(function(Z,ue){return ue.length-Z.length})[0],kt=void 0;if(Pt&&Pt.length>1){var Nt=nt.slice(0,Pt.index),Vt=nt.slice(Pt.index+Pt.length);kt=Nt.join(":")+"::"+Vt.join(":")}else kt=nt.join(":");return de&&(kt+="%"+de),kt}else return D}var V=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\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={},K=C.iri!==!1?d:l;C.reference==="suffix"&&(D=(C.scheme?C.scheme+":":"")+"//"+D);var x=D.match(V);if(x){z?(U.scheme=x[1],U.userinfo=x[3],U.host=x[4],U.port=parseInt(x[5],10),U.path=x[6]||"",U.query=x[7],U.fragment=x[8],isNaN(U.port)&&(U.port=x[5])):(U.scheme=x[1]||void 0,U.userinfo=D.indexOf("@")!==-1?x[3]:void 0,U.host=D.indexOf("//")!==-1?x[4]:void 0,U.port=parseInt(x[5],10),U.path=x[6]||"",U.query=D.indexOf("?")!==-1?x[7]:void 0,U.fragment=D.indexOf("#")!==-1?x[8]:void 0,isNaN(U.port)&&(U.port=D.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?x[4]:void 0)),U.host&&(U.host=I(N(U.host,K),K)),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=j.toASCII(U.host.replace(K.PCT_ENCODED,ae).toLowerCase())}catch(ge){U.error=U.error||"Host's domain name can not be converted to ASCII via punycode: "+ge}re(U,l)}else re(U,K);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:l,K=[];return D.userinfo!==void 0&&(K.push(D.userinfo),K.push("@")),D.host!==void 0&&K.push(I(N(String(D.host),U),U).replace(U.IPV6ADDRESS,function(x,de,ge){return"["+de+(ge?"%25"+ge:"")+"]"})),(typeof D.port=="number"||typeof D.port=="string")&&(K.push(":"),K.push(String(D.port))),K.length?K.join(""):void 0}var Ee=/^\.\.?\//,Ue=/^\/\.(\/|$)/,Re=/^\/\.\.(\/|$)/,Ae=/^\/?(?:.|\n)*?(?=\/|$)/;function _e(D){for(var C=[];D.length;)if(D.match(Ee))D=D.replace(Ee,"");else if(D.match(Ue))D=D.replace(Ue,"/");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 K=U[0];D=D.slice(K.length),C.push(K)}else throw new Error("Unexpected dot segment condition")}return C.join("")}function Be(D){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=C.iri?d:l,K=[],x=W[(C.scheme||D.scheme||"").toLowerCase()];if(x&&x.serialize&&x.serialize(D,C),D.host&&!U.IPV6ADDRESS.test(D.host)){if(C.domainHost||x&&x.domainHost)try{D.host=C.iri?j.toUnicode(D.host):j.toASCII(D.host.replace(U.PCT_ENCODED,ae).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&&(K.push(D.scheme),K.push(":"));var de=te(D,C);if(de!==void 0&&(C.reference!=="suffix"&&K.push("//"),K.push(de),D.path&&D.path.charAt(0)!=="/"&&K.push("/")),D.path!==void 0){var ge=D.path;!C.absolutePath&&(!x||!x.absolutePath)&&(ge=_e(ge)),de===void 0&&(ge=ge.replace(/^\/\//,"/%2F")),K.push(ge)}return D.query!==void 0&&(K.push("?"),K.push(D.query)),D.fragment!==void 0&&(K.push("#"),K.push(D.fragment)),K.join("")}function Ie(D,C){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},K=arguments[3],x={};return K||(D=J(Be(D,U),U),C=J(Be(C,U),U)),U=U||{},!U.tolerant&&C.scheme?(x.scheme=C.scheme,x.userinfo=C.userinfo,x.host=C.host,x.port=C.port,x.path=_e(C.path||""),x.query=C.query):(C.userinfo!==void 0||C.host!==void 0||C.port!==void 0?(x.userinfo=C.userinfo,x.host=C.host,x.port=C.port,x.path=_e(C.path||""),x.query=C.query):(C.path?(C.path.charAt(0)==="/"?x.path=_e(C.path):((D.userinfo!==void 0||D.host!==void 0||D.port!==void 0)&&!D.path?x.path="/"+C.path:D.path?x.path=D.path.slice(0,D.path.lastIndexOf("/")+1)+C.path:x.path=C.path,x.path=_e(x.path)),x.query=C.query):(x.path=D.path,C.query!==void 0?x.query=C.query:x.query=D.query),x.userinfo=D.userinfo,x.host=D.host,x.port=D.port),x.scheme=D.scheme),x.fragment=C.fragment,x}function yt(D,C,U){var K=a({scheme:"null"},U);return Be(Ie(J(D,K),J(C,K),K,!0),K)}function Ye(D,C){return typeof D=="string"?D=Be(J(D,C),C):c(D)==="object"&&(D=J(Be(D,C),C)),D}function ht(D,C,U){return typeof D=="string"?D=Be(J(D,U),U):c(D)==="object"&&(D=Be(D,U)),typeof C=="string"?C=Be(J(C,U),U):c(C)==="object"&&(C=Be(C,U)),D===C}function Et(D,C){return D&&D.toString().replace(!C||!C.iri?l.ESCAPE:d.ESCAPE,Q)}function ut(D,C){return D&&D.toString().replace(!C||!C.iri?l.PCT_ENCODED:d.PCT_ENCODED,ae)}var $t={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 K=String(C.scheme).toLowerCase()==="https";return(C.port===(K?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}},Pr={scheme:"https",domainHost:$t.domainHost,parse:$t.parse,serialize:$t.serialize};function kr(D){return typeof D.secure=="boolean"?D.secure:String(D.scheme).toLowerCase()==="wss"}var Zt={scheme:"ws",domainHost:!0,parse:function(C,U){var K=C;return K.secure=kr(K),K.resourceName=(K.path||"/")+(K.query?"?"+K.query:""),K.path=void 0,K.query=void 0,K},serialize:function(C,U){if((C.port===(kr(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 K=C.resourceName.split("?"),x=w(K,2),de=x[0],ge=x[1];C.path=de&&de!=="/"?de:void 0,C.query=ge,C.resourceName=void 0}return C.fragment=void 0,C}},lr={scheme:"wss",domainHost:Zt.domainHost,parse:Zt.parse,serialize:Zt.serialize},gn={},Or="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",St="[0-9A-Fa-f]",fr=s(s("%[EFef]"+St+"%"+St+St+"%"+St+St)+"|"+s("%[89A-Fa-f]"+St+"%"+St+St)+"|"+s("%"+St+St)),Nr="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Tr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",vn=n(Tr,'[\\"\\\\]'),Rr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",xt=new RegExp(Or,"g"),q=new RegExp(fr,"g"),Y=new RegExp(n("[^]",Nr,"[\\.]",'[\\"]',vn),"g"),ne=new RegExp(n("[^]",Or,Rr),"g"),be=ne;function Je(D){var C=ae(D);return C.match(xt)?C:D}var Ze={scheme:"mailto",parse:function(C,U){var K=C,x=K.to=K.path?K.path.split(","):[];if(K.path=void 0,K.query){for(var de=!1,ge={},je=K.query.split("&"),xe=0,et=je.length;xe<et;++xe){var ke=je[xe].split("=");switch(ke[0]){case"to":for(var Ke=ke[1].split(","),rt=0,$e=Ke.length;rt<$e;++rt)x.push(Ke[rt]);break;case"subject":K.subject=ut(ke[1],U);break;case"body":K.body=ut(ke[1],U);break;default:de=!0,ge[ut(ke[0],U)]=ut(ke[1],U);break}}de&&(K.headers=ge)}K.query=void 0;for(var Le=0,nt=x.length;Le<nt;++Le){var Ge=x[Le].split("@");if(Ge[0]=ut(Ge[0]),U.unicodeSupport)Ge[1]=ut(Ge[1],U).toLowerCase();else try{Ge[1]=j.toASCII(ut(Ge[1],U).toLowerCase())}catch(At){K.error=K.error||"Email address's domain name can not be converted to ASCII via punycode: "+At}x[Le]=Ge.join("@")}return K},serialize:function(C,U){var K=C,x=u(C.to);if(x){for(var de=0,ge=x.length;de<ge;++de){var je=String(x[de]),xe=je.lastIndexOf("@"),et=je.slice(0,xe).replace(q,Je).replace(q,i).replace(Y,Q),ke=je.slice(xe+1);try{ke=U.iri?j.toUnicode(ke):j.toASCII(ut(ke,U).toLowerCase())}catch(Le){K.error=K.error||"Email address's domain name can not be converted to "+(U.iri?"Unicode":"ASCII")+" via punycode: "+Le}x[de]=et+"@"+ke}K.path=x.join(",")}var Ke=C.headers=C.headers||{};C.subject&&(Ke.subject=C.subject),C.body&&(Ke.body=C.body);var rt=[];for(var $e in Ke)Ke[$e]!==gn[$e]&&rt.push($e.replace(q,Je).replace(q,i).replace(ne,Q)+"="+Ke[$e].replace(q,Je).replace(q,i).replace(be,Q));return rt.length&&(K.query=rt.join("&")),K}},le=/^([^\:]+)\:(.*)/,ce={scheme:"urn",parse:function(C,U){var K=C.path&&C.path.match(le),x=C;if(K){var de=U.scheme||x.scheme||"urn",ge=K[1].toLowerCase(),je=K[2],xe=de+":"+(U.nid||ge),et=W[xe];x.nid=ge,x.nss=je,x.path=void 0,et&&(x=et.parse(x,U))}else x.error=x.error||"URN can not be parsed.";return x},serialize:function(C,U){var K=U.scheme||C.scheme||"urn",x=C.nid,de=K+":"+(U.nid||x),ge=W[de];ge&&(C=ge.serialize(C,U));var je=C,xe=C.nss;return je.path=(x||U.nid)+":"+xe,je}},ye=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,at={scheme:"urn:uuid",parse:function(C,U){var K=C;return K.uuid=K.nss,K.nss=void 0,!U.tolerant&&(!K.uuid||!K.uuid.match(ye))&&(K.error=K.error||"UUID is not valid."),K},serialize:function(C,U){var K=C;return K.nss=(C.uuid||"").toLowerCase(),K}};W[$t.scheme]=$t,W[Pr.scheme]=Pr,W[Zt.scheme]=Zt,W[lr.scheme]=lr,W[Ze.scheme]=Ze,W[ce.scheme]=ce,W[at.scheme]=at,r.SCHEMES=W,r.pctEncChar=Q,r.pctDecChars=ae,r.parse=J,r.removeDotSegments=_e,r.serialize=Be,r.resolveComponents=Ie,r.resolve=yt,r.normalize=Ye,r.equal=ht,r.escapeComponent=Et,r.unescapeComponent=ut,Object.defineProperty(r,"__esModule",{value:!0})})}),fu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ls();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),du=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=fn();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=os(),s=cs(),c=ji(),i=us(),u=Te(),a=ln(),f=Zr(),l=Fe(),d=lu(),w=fu(),S=(B,T)=>new RegExp(B,T);S.code="new RegExp";var $=["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(B){var T,M,R,v,k,j,W,Q,ae,re,ve,N,I,V,z,J,te,Ee,Ue,Re,Ae,_e,Be,Ie,yt;const Ye=B.strict,ht=(T=B.code)===null||T===void 0?void 0:T.optimize,Et=ht===!0||ht===void 0?1:ht||0,ut=(R=(M=B.code)===null||M===void 0?void 0:M.regExp)!==null&&R!==void 0?R:S,$t=(v=B.uriResolver)!==null&&v!==void 0?v:w.default;return{strictSchema:(j=(k=B.strictSchema)!==null&&k!==void 0?k:Ye)!==null&&j!==void 0?j:!0,strictNumbers:(Q=(W=B.strictNumbers)!==null&&W!==void 0?W:Ye)!==null&&Q!==void 0?Q:!0,strictTypes:(re=(ae=B.strictTypes)!==null&&ae!==void 0?ae:Ye)!==null&&re!==void 0?re:"log",strictTuples:(N=(ve=B.strictTuples)!==null&&ve!==void 0?ve:Ye)!==null&&N!==void 0?N:"log",strictRequired:(V=(I=B.strictRequired)!==null&&I!==void 0?I:Ye)!==null&&V!==void 0?V:!1,code:B.code?{...B.code,optimize:Et,regExp:ut}:{optimize:Et,regExp:ut},loopRequired:(z=B.loopRequired)!==null&&z!==void 0?z:_,loopEnum:(J=B.loopEnum)!==null&&J!==void 0?J:_,meta:(te=B.meta)!==null&&te!==void 0?te:!0,messages:(Ee=B.messages)!==null&&Ee!==void 0?Ee:!0,inlineRefs:(Ue=B.inlineRefs)!==null&&Ue!==void 0?Ue:!0,schemaId:(Re=B.schemaId)!==null&&Re!==void 0?Re:"$id",addUsedSchema:(Ae=B.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(_e=B.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(Be=B.validateFormats)!==null&&Be!==void 0?Be:!0,unicodeRegExp:(Ie=B.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(yt=B.int32range)!==null&&yt!==void 0?yt:!0,uriResolver:$t}}class y{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=L(T.logger);const v=T.validateFormats;T.validateFormats=!1,this.RULES=(0,c.getRules)(),b.call(this,m,T,"NOT SUPPORTED"),b.call(this,o,T,"DEPRECATED","warn"),this._metaOpts=A.call(this),T.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),h.call(this),T.validateFormats=v}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:M,schemaId:R}=this.opts;let v=d;R==="id"&&(v={...d},v.id=v.$id,delete v.$id),M&&T&&this.addMetaSchema(v,v[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 v=R(M);return"$async"in R||(this.errors=R.errors),v}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 v.call(this,T,M);async function v(re,ve){await k.call(this,re.$schema);const N=this._addSchema(re,ve);return N.validate||j.call(this,N)}async function k(re){re&&!this.getSchema(re)&&await v.call(this,{$ref:re},!0)}async function j(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),j.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 ae.call(this,re);this.refs[re]||await k.call(this,ve.$schema),this.refs[re]||this.addSchema(ve,re,M)}async function ae(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,v=this.opts.validateSchema){if(Array.isArray(T)){for(const j of T)this.addSchema(j,void 0,R,v);return this}let k;if(typeof T=="object"){const{schemaId:j}=this.opts;if(k=T[j],k!==void 0&&typeof k!="string")throw new Error(`schema ${j} must be string`)}return M=(0,a.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(T,R,M,v,!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 v=this.validate(R,T);if(!v&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return v}getSchema(T){let M;for(;typeof(M=g.call(this,T))=="string";)T=M;if(M===void 0){const{schemaId:R}=this.opts,v=new i.SchemaEnv({schema:{},schemaId:R});if(M=i.resolveSchema.call(this,v,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=g.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,a.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,l.eachItem)(R,k=>ee.call(this,k)),this;we.call(this,M);const v={...M,type:(0,f.getJSONTypes)(M.type),schemaType:(0,f.getJSONTypes)(M.schemaType)};return(0,l.eachItem)(R,v.type.length===0?k=>ee.call(this,k,v):k=>v.type.forEach(j=>ee.call(this,k,v,j))),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 v=R.rules.findIndex(k=>k.keyword===T);v>=0&&R.rules.splice(v,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(v=>`${R}${v.instancePath} ${v.message}`).reduce((v,k)=>v+M+k)}$dataMetaSchema(T,M){const R=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const v of M){const k=v.split("/").slice(1);let j=T;for(const W of k)j=j[W];for(const W in R){const Q=R[W];if(typeof Q!="object")continue;const{$data:ae}=Q.definition,re=j[W];ae&&re&&(j[W]=se(re))}}return T}_removeAllSchemas(T,M){for(const R in T){const v=T[R];(!M||M.test(R))&&(typeof v=="string"?delete T[R]:v&&!v.meta&&(this._cache.delete(v.schema),delete T[R]))}}_addSchema(T,M,R,v=this.opts.validateSchema,k=this.opts.addUsedSchema){let j;const{schemaId:W}=this.opts;if(typeof T=="object")j=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,a.normalizeId)(j||R);const ae=a.getSchemaRefs.call(this,T,R);return Q=new i.SchemaEnv({schema:T,schemaId:W,meta:M,baseId:R,localRefs:ae}),this._cache.set(Q.schema,Q),k&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=Q),v&&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):i.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{i.compileSchema.call(this,T)}finally{this.opts=M}}}t.default=y,y.ValidationError=n.default,y.MissingRefError=s.default;function b(B,T,M,R="error"){for(const v in B){const k=v;k in T&&this.logger[R](`${M}: option ${v}. ${B[k]}`)}}function g(B){return B=(0,a.normalizeId)(B),this.schemas[B]||this.refs[B]}function h(){const B=this.opts.schemas;if(B)if(Array.isArray(B))this.addSchema(B);else for(const T in B)this.addSchema(B[T],T)}function P(){for(const B in this.opts.formats){const T=this.opts.formats[B];T&&this.addFormat(B,T)}}function O(B){if(Array.isArray(B)){this.addVocabulary(B);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in B){const M=B[T];M.keyword||(M.keyword=T),this.addKeyword(M)}}function A(){const B={...this.opts};for(const T of $)delete B[T];return B}var F={log(){},warn(){},error(){}};function L(B){if(B===!1)return F;if(B===void 0)return console;if(B.log&&B.warn&&B.error)return B;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function G(B,T){const{RULES:M}=this;if((0,l.eachItem)(B,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(B,T,M){var R;const v=T==null?void 0:T.post;if(M&&v)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let j=v?k.post:k.rules.find(({type:Q})=>Q===M);if(j||(j={type:M,rules:[]},k.rules.push(j)),k.keywords[B]=!0,!T)return;const W={keyword:B,definition:{...T,type:(0,f.getJSONTypes)(T.type),schemaType:(0,f.getJSONTypes)(T.schemaType)}};T.before?fe.call(this,j,W,T.before):j.rules.push(W),k.all[B]=W,(R=T.implements)===null||R===void 0||R.forEach(Q=>this.addKeyword(Q))}function fe(B,T,M){const R=B.rules.findIndex(v=>v.keyword===M);R>=0?B.rules.splice(R,0,T):(B.rules.push(T),this.logger.warn(`rule ${M} is not defined`))}function we(B){let{metaSchema:T}=B;T!==void 0&&(B.$data&&this.opts.$data&&(T=se(T)),B.validateSchema=this.compile(T,!0))}var Oe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(B){return{anyOf:[B,Oe]}}}),hu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),pu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=cs(),r=Ct(),n=Te(),s=Yt(),c=us(),i=Fe(),u={keyword:"$ref",schemaType:"string",code(l){const{gen:d,schema:w,it:S}=l,{baseId:$,schemaEnv:E,validateName:m,opts:o,self:_}=S,{root:p}=E;if((w==="#"||w==="#/")&&$===p.baseId)return b();const y=c.resolveRef.call(_,p,$,w);if(y===void 0)throw new e.default(S.opts.uriResolver,$,w);if(y instanceof c.SchemaEnv)return g(y);return h(y);function b(){if(E===p)return f(l,m,E,E.$async);const P=d.scopeValue("root",{ref:p});return f(l,(0,n._)`${P}.validate`,p,p.$async)}function g(P){const O=a(l,P);f(l,O,P,P.$async)}function h(P){const O=d.scopeValue("schema",o.code.source===!0?{ref:P,code:(0,n.stringify)(P)}:{ref:P}),A=d.name("valid"),F=l.subschema({schema:P,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},A);l.mergeEvaluated(F),l.ok(A)}}};function a(l,d){const{gen:w}=l;return d.validate?w.scopeValue("validate",{ref:d.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=a;function f(l,d,w,S){const{gen:$,it:E}=l,{allErrors:m,schemaEnv:o,opts:_}=E,p=_.passContext?s.default.this:n.nil;S?y():b();function y(){if(!o.$async)throw new Error("async schema referenced by sync schema");const P=$.let("valid");$.try(()=>{$.code((0,n._)`await ${(0,r.callValidateCode)(l,d,p)}`),h(d),m||$.assign(P,!0)},O=>{$.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>$.throw(O)),g(O),m||$.assign(P,!1)}),l.ok(P)}function b(){l.result((0,r.callValidateCode)(l,d,p),()=>h(d),()=>g(d))}function g(P){const O=(0,n._)`${P}.errors`;$.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),$.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function h(P){var O;if(!E.opts.unevaluated)return;const A=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(E.props=i.mergeEvaluated.props($,A.props,E.props));else{const F=$.var("props",(0,n._)`${P}.evaluated.props`);E.props=i.mergeEvaluated.props($,F,E.props,n.Name)}if(E.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(E.items=i.mergeEvaluated.items($,A.items,E.items));else{const F=$.var("items",(0,n._)`${P}.evaluated.items`);E.items=i.mergeEvaluated.items($,F,E.items,n.Name)}}}t.callRef=f,t.default=u}),mu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=hu(),r=pu(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),gu=H(function(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:i,schemaCode:u})=>(0,e.str)`must be ${n[i].okStr} ${u}`,params:({keyword:i,schemaCode:u})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${u}}`},c={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:f}=i;i.fail$data((0,e._)`${a} ${n[u].fail} ${f} || isNaN(${a})`)}};t.default=c}),vu=H(function(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:c,data:i,schemaCode:u,it:a}=s,f=a.opts.multipleOfPrecision,l=c.let("res"),d=f?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${f}`:(0,e._)`${l} !== parseInt(${l})`;s.fail$data((0,e._)`(${u} === 0 || (${l} = ${i}/${u}, ${d}))`)}};t.default=n}),yu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,c=0,i;for(;c<n;)s++,i=r.charCodeAt(c++),i>=55296&&i<=56319&&c<n&&(i=r.charCodeAt(c),(i&64512)===56320&&c++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),_u=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=Fe(),n=yu(),s={message({keyword:i,schemaCode:u}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${u} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},c={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:f,it:l}=i,d=u==="maxLength"?e.operators.GT:e.operators.LT,w=l.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${w} ${d} ${f}`)}};t.default=c}),wu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Te(),n={message:({schemaCode:c})=>(0,r.str)`must match pattern "${c}"`,params:({schemaCode:c})=>(0,r._)`{pattern: ${c}}`},s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:n,code(c){const{data:i,$data:u,schema:a,schemaCode:f,it:l}=c,d=l.opts.unicodeRegExp?"u":"",w=u?(0,r._)`(new RegExp(${f}, ${d}))`:(0,e.usePattern)(c,a);c.fail$data((0,r._)`!${w}.test(${i})`)}};t.default=s}),bu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r={message({keyword:s,schemaCode:c}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${c} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:c,data:i,schemaCode:u}=s,a=c==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${u}`)}};t.default=n}),$u=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Te(),n=Fe(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},c={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,schema:a,schemaCode:f,data:l,$data:d,it:w}=i,{opts:S}=w;if(!d&&a.length===0)return;const $=a.length>=S.loopRequired;if(w.allErrors?E():m(),S.strictRequired){const p=i.parentSchema.properties,{definedProperties:y}=i.it;for(const b of a)if((p==null?void 0:p[b])===void 0&&!y.has(b)){const g=w.schemaEnv.baseId+w.errSchemaPath,h=`required property "${b}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)(w,h,w.opts.strictRequired)}}function E(){if($||d)i.block$data(r.nil,o);else for(const p of a)(0,e.checkReportMissingProp)(i,p)}function m(){const p=u.let("missing");if($||d){const y=u.let("valid",!0);i.block$data(y,()=>_(p,y)),i.ok(y)}else u.if((0,e.checkMissingProp)(i,a,p)),(0,e.reportMissingProp)(i,p),u.else()}function o(){u.forOf("prop",f,p=>{i.setParams({missingProperty:p}),u.if((0,e.noPropertyInData)(u,l,p,S.ownProperties),()=>i.error())})}function _(p,y){i.setParams({missingProperty:p}),u.forOf(p,f,()=>{u.assign(y,(0,e.propertyInData)(u,l,p,S.ownProperties)),u.if((0,r.not)(y),()=>{i.error(),u.break()})},r.nil)}}};t.default=c}),Eu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r={message({keyword:s,schemaCode:c}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${c} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:c,data:i,schemaCode:u}=s,a=c==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${u}`)}};t.default=n}),fs=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=sn();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),Su=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Zr(),r=Te(),n=Fe(),s=fs(),c={message:({params:{i:u,j:a}})=>(0,r.str)`must NOT have duplicate items (items ## ${a} and ${u} are identical)`,params:({params:{i:u,j:a}})=>(0,r._)`{i: ${u}, j: ${a}}`},i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:c,code(u){const{gen:a,data:f,$data:l,schema:d,parentSchema:w,schemaCode:S,it:$}=u;if(!l&&!d)return;const E=a.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];u.block$data(E,o,(0,r._)`${S} === false`),u.ok(E);function o(){const b=a.let("i",(0,r._)`${f}.length`),g=a.let("j");u.setParams({i:b,j:g}),a.assign(E,!0),a.if((0,r._)`${b} > 1`,()=>(_()?p:y)(b,g))}function _(){return m.length>0&&!m.some(b=>b==="object"||b==="array")}function p(b,g){const h=a.name("item"),P=(0,e.checkDataTypes)(m,h,$.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${b}--;`,()=>{a.let(h,(0,r._)`${f}[${b}]`),a.if(P,(0,r._)`continue`),m.length>1&&a.if((0,r._)`typeof ${h} == "string"`,(0,r._)`${h} += "_"`),a.if((0,r._)`typeof ${O}[${h}] == "number"`,()=>{a.assign(g,(0,r._)`${O}[${h}]`),u.error(),a.assign(E,!1).break()}).code((0,r._)`${O}[${h}] = ${b}`)})}function y(b,g){const h=(0,n.useFunc)(a,s.default),P=a.name("outer");a.label(P).for((0,r._)`;${b}--;`,()=>a.for((0,r._)`${g} = ${b}; ${g}--;`,()=>a.if((0,r._)`${h}(${f}[${b}], ${f}[${g}])`,()=>{u.error(),a.assign(E,!1).break(P)})))}}};t.default=i}),Pu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=Fe(),n=fs(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},c={keyword:"const",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schemaCode:l,schema:d}=i;f||d&&typeof d=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${a}, ${l})`):i.fail((0,e._)`${d} !== ${a}`)}};t.default=c}),ku=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=Fe(),n=fs(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},c={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schema:l,schemaCode:d,it:w}=i;if(!f&&l.length===0)throw new Error("enum must have non-empty array");const S=l.length>=w.opts.loopEnum;let $;const E=()=>$??($=(0,r.useFunc)(u,n.default));let m;if(S||f)m=u.let("valid"),i.block$data(m,o);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const p=u.const("vSchema",d);m=(0,e.or)(...l.map((y,b)=>_(p,b)))}i.pass(m);function o(){u.assign(m,!1),u.forOf("v",d,p=>u.if((0,e._)`${E()}(${a}, ${p})`,()=>u.assign(m,!0).break()))}function _(p,y){const b=l[y];return typeof b=="object"&&b!==null?(0,e._)`${E()}(${a}, ${p}[${y}])`:(0,e._)`${a} === ${b}`}}};t.default=c}),Ou=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=gu(),r=vu(),n=_u(),s=wu(),c=bu(),i=$u(),u=Eu(),a=Su(),f=Pu(),l=ku(),d=[e.default,r.default,n.default,s.default,c.default,i.default,u.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=d}),Di=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Te(),r=Fe(),n={message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(i){const{parentSchema:u,it:a}=i,{items:f}=u;if(!Array.isArray(f)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}c(i,f)}};function c(i,u){const{gen:a,schema:f,data:l,keyword:d,it:w}=i;w.items=!0;const S=a.const("len",(0,e._)`${l}.length`);if(f===!1)i.setParams({len:u.length}),i.pass((0,e._)`${S} <= ${u.length}`);else if(typeof f=="object"&&!(0,r.alwaysValidSchema)(w,f)){const E=a.var("valid",(0,e._)`${S} <= ${u.length}`);a.if((0,e.not)(E),()=>$(E)),i.ok(E)}function $(E){a.forRange("i",u.length,S,m=>{i.subschema({keyword:d,dataProp:m,dataPropType:r.Type.Num},E),w.allErrors||a.if((0,e.not)(E),()=>a.break())})}}t.validateAdditionalItems=c,t.default=s}),qi=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Te(),r=Fe(),n=Ct(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:u,it:a}=i;if(Array.isArray(u))return c(i,"additionalItems",u);a.items=!0,!(0,r.alwaysValidSchema)(a,u)&&i.ok((0,n.validateArray)(i))}};function c(i,u,a=i.schema){const{gen:f,parentSchema:l,data:d,keyword:w,it:S}=i;m(l),S.opts.unevaluated&&a.length&&S.items!==!0&&(S.items=r.mergeEvaluated.items(f,a.length,S.items));const $=f.name("valid"),E=f.const("len",(0,e._)`${d}.length`);a.forEach((o,_)=>{(0,r.alwaysValidSchema)(S,o)||(f.if((0,e._)`${E} > ${_}`,()=>i.subschema({keyword:w,schemaProp:_,dataProp:_},$)),i.ok($))});function m(o){const{opts:_,errSchemaPath:p}=S,y=a.length,b=y===o.minItems&&(y===o.maxItems||o[u]===!1);if(_.strictTuples&&!b){const g=`"${w}" is ${y}-tuple, but minItems or maxItems/${u} are not specified or different at path "${p}"`;(0,r.checkStrictMode)(S,g,_.strictTuples)}}}t.validateTuple=c,t.default=s}),Nu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=qi(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Tu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=Fe(),n=Ct(),s=Di(),c={message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:c,code(u){const{schema:a,parentSchema:f,it:l}=u,{prefixItems:d}=f;l.items=!0,!(0,r.alwaysValidSchema)(l,a)&&(d?(0,s.validateAdditionalItems)(u,d):u.ok((0,n.validateArray)(u)))}};t.default=i}),Ru=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=Fe(),n={message:({params:{min:c,max:i}})=>i===void 0?(0,e.str)`must contain at least ${c} valid item(s)`:(0,e.str)`must contain at least ${c} and no more than ${i} valid item(s)`,params:({params:{min:c,max:i}})=>i===void 0?(0,e._)`{minContains: ${c}}`:(0,e._)`{minContains: ${c}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(c){const{gen:i,schema:u,parentSchema:a,data:f,it:l}=c;let d,w;const{minContains:S,maxContains:$}=a;l.opts.next?(d=S===void 0?1:S,w=$):d=1;const E=i.const("len",(0,e._)`${f}.length`);if(c.setParams({min:d,max:w}),w===void 0&&d===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&d>w){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),c.fail();return}if((0,r.alwaysValidSchema)(l,u)){let y=(0,e._)`${E} >= ${d}`;w!==void 0&&(y=(0,e._)`${y} && ${E} <= ${w}`),c.pass(y);return}l.items=!0;const m=i.name("valid");w===void 0&&d===1?_(m,()=>i.if(m,()=>i.break())):d===0?(i.let(m,!0),w!==void 0&&i.if((0,e._)`${f}.length > 0`,o)):(i.let(m,!1),o()),c.result(m,()=>c.reset());function o(){const y=i.name("_valid"),b=i.let("count",0);_(y,()=>i.if(y,()=>p(b)))}function _(y,b){i.forRange("i",0,E,g=>{c.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},y),b()})}function p(y){i.code((0,e._)`${y}++`),w===void 0?i.if((0,e._)`${y} >= ${d}`,()=>i.assign(m,!0).break()):(i.if((0,e._)`${y} > ${w}`,()=>i.assign(m,!1).break()),d===1?i.assign(m,!0):i.if((0,e._)`${y} >= ${d}`,()=>i.assign(m,!0)))}}};t.default=s}),Iu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Te(),r=Fe(),n=Ct();t.error={message:({params:{property:a,depsCount:f,deps:l}})=>{const d=f===1?"property":"properties";return(0,e.str)`must have ${d} ${l} when property ${a} is present`},params:({params:{property:a,depsCount:f,deps:l,missingProperty:d}})=>(0,e._)`{property: ${a},
21
- missingProperty: ${d},
22
- depsCount: ${f},
23
- deps: ${l}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[f,l]=c(a);i(a,f),u(a,l)}};function c({schema:a}){const f={},l={};for(const d in a){if(d==="__proto__")continue;const w=Array.isArray(a[d])?f:l;w[d]=a[d]}return[f,l]}function i(a,f=a.schema){const{gen:l,data:d,it:w}=a;if(Object.keys(f).length===0)return;const S=l.let("missing");for(const $ in f){const E=f[$];if(E.length===0)continue;const m=(0,n.propertyInData)(l,d,$,w.opts.ownProperties);a.setParams({property:$,depsCount:E.length,deps:E.join(", ")}),w.allErrors?l.if(m,()=>{for(const o of E)(0,n.checkReportMissingProp)(a,o)}):(l.if((0,e._)`${m} && (${(0,n.checkMissingProp)(a,E,S)})`),(0,n.reportMissingProp)(a,S),l.else())}}t.validatePropertyDeps=i;function u(a,f=a.schema){const{gen:l,data:d,keyword:w,it:S}=a,$=l.name("valid");for(const E in f)(0,r.alwaysValidSchema)(S,f[E])||(l.if((0,n.propertyInData)(l,d,E,S.opts.ownProperties),()=>{const m=a.subschema({keyword:w,schemaProp:E},$);a.mergeValidEvaluated(m,$)},()=>l.var($,!0)),a.ok($))}t.validateSchemaDeps=u,t.default=s}),Cu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=Fe(),n={message:"property name must be valid",params:({params:c})=>(0,e._)`{propertyName: ${c.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(c){const{gen:i,schema:u,data:a,it:f}=c;if((0,r.alwaysValidSchema)(f,u))return;const l=i.name("valid");i.forIn("key",a,d=>{c.setParams({propertyName:d}),c.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),i.if((0,e.not)(l),()=>{c.error(!0),f.allErrors||i.break()})}),c.ok(l)}};t.default=s}),Li=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Te(),n=Yt(),s=Fe(),c={message:"must NOT have additional properties",params:({params:u})=>(0,r._)`{additionalProperty: ${u.additionalProperty}}`},i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:c,code(u){const{gen:a,schema:f,parentSchema:l,data:d,errsCount:w,it:S}=u;if(!w)throw new Error("ajv implementation error");const{allErrors:$,opts:E}=S;if(S.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(S,f))return;const m=(0,e.allSchemaProperties)(l.properties),o=(0,e.allSchemaProperties)(l.patternProperties);_(),u.ok((0,r._)`${w} === ${n.default.errors}`);function _(){a.forIn("key",d,h=>{!m.length&&!o.length?b(h):a.if(p(h),()=>b(h))})}function p(h){let P;if(m.length>8){const O=(0,s.schemaRefOrVal)(S,l.properties,"properties");P=(0,e.isOwnProperty)(a,O,h)}else m.length?P=(0,r.or)(...m.map(O=>(0,r._)`${h} === ${O}`)):P=r.nil;return o.length&&(P=(0,r.or)(P,...o.map(O=>(0,r._)`${(0,e.usePattern)(u,O)}.test(${h})`))),(0,r.not)(P)}function y(h){a.code((0,r._)`delete ${d}[${h}]`)}function b(h){if(E.removeAdditional==="all"||E.removeAdditional&&f===!1){y(h);return}if(f===!1){u.setParams({additionalProperty:h}),u.error(),$||a.break();return}if(typeof f=="object"&&!(0,s.alwaysValidSchema)(S,f)){const P=a.name("valid");E.removeAdditional==="failing"?(g(h,P,!1),a.if((0,r.not)(P),()=>{u.reset(),y(h)})):(g(h,P),$||a.if((0,r.not)(P),()=>a.break()))}}function g(h,P,O){const A={keyword:"additionalProperties",dataProp:h,dataPropType:s.Type.Str};O===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(A,P)}}};t.default=i}),Au=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=fn(),r=Ct(),n=Fe(),s=Li(),c={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,parentSchema:f,data:l,it:d}=i;d.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(a);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 S=w.filter(o=>!(0,n.alwaysValidSchema)(d,a[o]));if(S.length===0)return;const $=u.name("valid");for(const o of S)E(o)?m(o):(u.if((0,r.propertyInData)(u,l,o,d.opts.ownProperties)),m(o),d.allErrors||u.else().var($,!0),u.endIf()),i.it.definedProperties.add(o),i.ok($);function E(o){return d.opts.useDefaults&&!d.compositeRule&&a[o].default!==void 0}function m(o){i.subschema({keyword:"properties",schemaProp:o,dataProp:o},$)}}};t.default=c}),ju=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Te(),n=Fe(),s=Fe(),c={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,data:f,parentSchema:l,it:d}=i,{opts:w}=d,S=(0,e.allSchemaProperties)(a),$=S.filter(b=>(0,n.alwaysValidSchema)(d,a[b]));if(S.length===0||$.length===S.length&&(!d.opts.unevaluated||d.props===!0))return;const E=w.strictSchema&&!w.allowMatchingProperties&&l.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 b of S)E&&p(b),d.allErrors?y(b):(u.var(m,!0),y(b),u.if(m))}function p(b){for(const g in E)new RegExp(b).test(g)&&(0,n.checkStrictMode)(d,`property ${g} matches pattern ${b} (use allowMatchingProperties)`)}function y(b){u.forIn("key",f,g=>{u.if((0,r._)`${(0,e.usePattern)(i,b)}.test(${g})`,()=>{const h=$.includes(b);h||i.subschema({keyword:"patternProperties",schemaProp:b,dataProp:g,dataPropType:s.Type.Str},m),d.opts.unevaluated&&o!==!0?u.assign((0,r._)`${o}[${g}]`,!0):!h&&!d.allErrors&&u.if((0,r.not)(m),()=>u.break())})})}}};t.default=c}),Mu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:c,it:i}=n;if((0,e.alwaysValidSchema)(i,c)){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}),Du=H(function(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}),qu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=Fe(),n={message:"must match exactly one schema in oneOf",params:({params:c})=>(0,e._)`{passingSchemas: ${c.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(c){const{gen:i,schema:u,parentSchema:a,it:f}=c;if(!Array.isArray(u))throw new Error("ajv implementation error");if(f.opts.discriminator&&a.discriminator)return;const l=u,d=i.let("valid",!1),w=i.let("passing",null),S=i.name("_valid");c.setParams({passing:w}),i.block($),c.result(d,()=>c.reset(),()=>c.error(!0));function $(){l.forEach((E,m)=>{let o;(0,r.alwaysValidSchema)(f,E)?i.var(S,!0):o=c.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},S),m>0&&i.if((0,e._)`${S} && ${d}`).assign(d,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),i.if(S,()=>{i.assign(d,!0),i.assign(w,m),o&&c.mergeEvaluated(o,e.Name)})})}}};t.default=s}),Lu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:c,it:i}=n;if(!Array.isArray(c))throw new Error("ajv implementation error");const u=s.name("valid");c.forEach((a,f)=>{if((0,e.alwaysValidSchema)(i,a))return;const l=n.subschema({keyword:"allOf",schemaProp:f},u);n.ok(u),n.mergeEvaluated(l)})}};t.default=r}),Vu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=Fe(),n={message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(i){const{gen:u,parentSchema:a,it:f}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const l=c(f,"then"),d=c(f,"else");if(!l&&!d)return;const w=u.let("valid",!0),S=u.name("_valid");if($(),i.reset(),l&&d){const m=u.let("ifClause");i.setParams({ifClause:m}),u.if(S,E("then",m),E("else",m))}else l?u.if(S,E("then")):u.if((0,e.not)(S),E("else"));i.pass(w,()=>i.error(!0));function $(){const m=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},S);i.mergeEvaluated(m)}function E(m,o){return()=>{const _=i.subschema({keyword:m},S);u.assign(w,S),i.mergeValidEvaluated(_,w),o?u.assign(o,(0,e._)`${m}`):i.setParams({ifClause:m})}}}};function c(i,u){const a=i.schema[u];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),Uu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:c}){s.if===void 0&&(0,e.checkStrictMode)(c,`"${n}" without "if" is ignored`)}};t.default=r}),Fu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Di(),r=Nu(),n=qi(),s=Tu(),c=Ru(),i=Iu(),u=Cu(),a=Li(),f=Au(),l=ju(),d=Mu(),w=Du(),S=qu(),$=Lu(),E=Vu(),m=Uu();function o(_=!1){const p=[d.default,w.default,S.default,$.default,E.default,m.default,u.default,a.default,i.default,f.default,l.default];return _?p.push(r.default,s.default):p.push(e.default,n.default),p.push(c.default),p}t.default=o}),zu=H(function(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,c){const{gen:i,data:u,$data:a,schema:f,schemaCode:l,it:d}=s,{opts:w,errSchemaPath:S,schemaEnv:$,self:E}=d;if(!w.validateFormats)return;a?m():o();function m(){const _=i.scopeValue("formats",{ref:E.formats,code:w.code.formats}),p=i.const("fDef",(0,e._)`${_}[${l}]`),y=i.let("fType"),b=i.let("format");i.if((0,e._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(y,(0,e._)`${p}.type || "string"`).assign(b,(0,e._)`${p}.validate`),()=>i.assign(y,(0,e._)`"string"`).assign(b,p)),s.fail$data((0,e.or)(g(),h()));function g(){return w.strictSchema===!1?e.nil:(0,e._)`${l} && !${b}`}function h(){const P=$.$async?(0,e._)`(${p}.async ? await ${b}(${u}) : ${b}(${u}))`:(0,e._)`${b}(${u})`,O=(0,e._)`(typeof ${b} == "function" ? ${P} : ${b}.test(${u}))`;return(0,e._)`${b} && ${b} !== true && ${y} === ${c} && !${O}`}}function o(){const _=E.formats[f];if(!_){g();return}if(_===!0)return;const[p,y,b]=h(_);p===c&&s.pass(P());function g(){if(w.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${S}"`}}function h(O){const A=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(f)}`:void 0,F=i.scopeValue("formats",{key:f,ref:O,code:A});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${F}.validate`]:["string",O,F]}function P(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!$.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${u})`}return typeof y=="function"?(0,e._)`${b}(${u})`:(0,e._)`${b}.test(${u})`}}}};t.default=n}),Bu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=zu(),r=[e.default];t.default=r}),Hu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),Ku=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=mu(),r=Ou(),n=Fu(),s=Bu(),c=Hu(),i=[e.default,r.default,(0,n.default)(),s.default,c.metadataVocabulary,c.contentVocabulary];t.default=i}),xu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))}),Gu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Te(),r=xu(),n=us(),s=Fe(),c={message:({params:{discrError:u,tagName:a}})=>u===r.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:u,tag:a,tagName:f}})=>(0,e._)`{error: ${u}, tag: ${f}, tagValue: ${a}}`},i={keyword:"discriminator",type:"object",schemaType:"object",error:c,code(u){const{gen:a,data:f,schema:l,parentSchema:d,it:w}=u,{oneOf:S}=d;if(!w.opts.discriminator)throw new Error("discriminator: requires discriminator option");const $=l.propertyName;if(typeof $!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!S)throw new Error("discriminator: requires oneOf keyword");const E=a.let("valid",!1),m=a.const("tag",(0,e._)`${f}${(0,e.getProperty)($)}`);a.if((0,e._)`typeof ${m} == "string"`,()=>o(),()=>u.error(!1,{discrError:r.DiscrError.Tag,tag:m,tagName:$})),u.ok(E);function o(){const y=p();a.if(!1);for(const b in y)a.elseIf((0,e._)`${m} === ${b}`),a.assign(E,_(y[b]));a.else(),u.error(!1,{discrError:r.DiscrError.Mapping,tag:m,tagName:$}),a.endIf()}function _(y){const b=a.name("valid"),g=u.subschema({keyword:"oneOf",schemaProp:y},b);return u.mergeEvaluated(g,e.Name),b}function p(){var y;const b={},g=P(d);let h=!0;for(let F=0;F<S.length;F++){let L=S[F];L!=null&&L.$ref&&!(0,s.schemaHasRulesButRef)(L,w.self.RULES)&&(L=n.resolveRef.call(w.self,w.schemaEnv.root,w.baseId,L==null?void 0:L.$ref),L instanceof n.SchemaEnv&&(L=L.schema));const X=(y=L==null?void 0:L.properties)===null||y===void 0?void 0:y[$];if(typeof X!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${$}"`);h=h&&(g||P(L)),O(X,F)}if(!h)throw new Error(`discriminator: "${$}" must be required`);return b;function P({required:F}){return Array.isArray(F)&&F.includes($)}function O(F,L){if(F.const)A(F.const,L);else if(F.enum)for(const X of F.enum)A(X,L);else throw new Error(`discriminator: "properties/${$}" must have "const" or "enum"`)}function A(F,L){if(typeof F!="string"||F in b)throw new Error(`discriminator: "${$}" values must be unique strings`);b[F]=L}}}};t.default=i}),Wu=H(function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),Ju=H(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=du(),n=Ku(),s=Gu(),c=Wu(),i=["/properties"],u="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(c,i):c;this.addMetaSchema($,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=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var f=fn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var l=Te();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=os();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var w=cs();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),Qu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=Ju(),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}},c={message:({keyword:u,schemaCode:a})=>r.str`should be ${s[u].okStr} ${a}`,params:({keyword:u,schemaCode:a})=>r._`{comparison: ${s[u].okStr}, limit: ${a}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:c,code(u){const{gen:a,data:f,schemaCode:l,keyword:d,it:w}=u,{opts:S,self:$}=w;if(!S.validateFormats)return;const E=new e.KeywordCxt(w,$.RULES.all.format.definition,"format");E.$data?m():o();function m(){const p=a.scopeValue("formats",{ref:$.formats,code:S.code.formats}),y=a.const("fmt",r._`${p}[${E.schemaCode}]`);u.fail$data(r.or(r._`typeof ${y} != "object"`,r._`${y} instanceof RegExp`,r._`typeof ${y}.compare != "function"`,_(y)))}function o(){const p=E.schema,y=$.formats[p];if(!y||y===!0)return;if(typeof y!="object"||y instanceof RegExp||typeof y.compare!="function")throw new Error(`"${d}": format "${p}" does not define "compare" function`);const b=a.scopeValue("formats",{key:p,ref:y,code:S.code.formats?r._`${S.code.formats}${r.getProperty(p)}`:void 0});u.fail$data(_(b))}function _(p){return r._`${p}.compare(${f}, ${l}) ${s[d].fail} 0`}},dependencies:["format"]};var i=u=>(u.addKeyword(t.formatLimitDefinition),u);t.default=i}),Xu=H(function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var r=iu(),n=Qu(),s=Te(),c=new s.Name("fullFormats"),i=new s.Name("fastFormats"),u=(f,l={keywords:!0})=>{if(Array.isArray(l))return a(f,l,r.fullFormats,c),f;const[d,w]=l.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,c],S=l.formats||r.formatNames;return a(f,S,d,w),l.keywords&&n.default(f),f};u.get=(f,l="full")=>{const w=(l==="fast"?r.fastFormats:r.fullFormats)[f];if(!w)throw new Error(`Unknown format "${f}"`);return w};function a(f,l,d,w){var S,$;(S=($=f.opts.code).formats)!==null&&S!==void 0||($.formats=s._`require("ajv-formats/dist/formats").${w}`);for(const E of l)f.addFormat(E,d[E])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u}),Yu=H(function(t,e){(function(r,n){typeof e=="object"&&e.exports?e.exports=n():r.nearley=n()})(t,function(){function r(l,d,w){return this.id=++r.highestId,this.name=l,this.symbols=d,this.postprocess=w,this}r.highestId=0,r.prototype.toString=function(l){var d=typeof l>"u"?this.symbols.map(f).join(" "):this.symbols.slice(0,l).map(f).join(" ")+" ● "+this.symbols.slice(l).map(f).join(" ");return this.name+" → "+d};function n(l,d,w,S){this.rule=l,this.dot=d,this.reference=w,this.data=[],this.wantedBy=S,this.isComplete=this.dot===l.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(l){var d=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return d.left=this,d.right=l,d.isComplete&&(d.data=d.build(),d.right=void 0),d},n.prototype.build=function(){var l=[],d=this;do l.push(d.right.data),d=d.left;while(d.left);return l.reverse(),l},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,u.fail))};function s(l,d){this.grammar=l,this.index=d,this.states=[],this.wants={},this.scannable=[],this.completed={}}s.prototype.process=function(l){for(var d=this.states,w=this.wants,S=this.completed,$=0;$<d.length;$++){var E=d[$];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),S.hasOwnProperty(p))for(var y=S[p],o=0;o<y.length;o++){var b=y[o];this.complete(E,b)}}else w[p]=[E],this.predict(p)}}},s.prototype.predict=function(l){for(var d=this.grammar.byName[l]||[],w=0;w<d.length;w++){var S=d[w],$=this.wants[l],E=new n(S,0,this.index,$);this.states.push(E)}},s.prototype.complete=function(l,d){var w=l.nextState(d);this.states.push(w)};function c(l,d){this.rules=l,this.start=d||this.rules[0].name;var w=this.byName={};this.rules.forEach(function(S){w.hasOwnProperty(S.name)||(w[S.name]=[]),w[S.name].push(S)})}c.fromCompiled=function(S,d){var w=S.Lexer;S.ParserStart&&(d=S.ParserStart,S=S.ParserRules);var S=S.map(function(E){return new r(E.name,E.symbols,E.postprocess)}),$=new c(S,d);return $.lexer=w,$};function i(){this.reset("")}i.prototype.reset=function(l,d){this.buffer=l,this.index=0,this.line=d?d.line:1,this.lastLineBreak=d?-d.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var l=this.buffer[this.index++];return l===`
24
- `&&(this.line+=1,this.lastLineBreak=this.index),{value:l}}},i.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},i.prototype.formatError=function(l,d){var w=this.buffer;if(typeof w=="string"){var S=w.split(`
25
- `).slice(Math.max(0,this.line-5),this.line),$=w.indexOf(`
26
- `,this.index);$===-1&&($=w.length);var E=this.index-this.lastLineBreak,m=String(this.line).length;return d+=" at line "+this.line+" col "+E+`:
27
-
28
- `,d+=S.map(function(_,p){return o(this.line-S.length+p+1,m)+" "+_},this).join(`
29
- `),d+=`
30
- `+o("",m+E)+`^
31
- `,d}else return d+" at index "+(this.index-1);function o(_,p){var y=String(_);return Array(p-y.length+1).join(" ")+y}};function u(l,d,w){if(l instanceof c)var S=l,w=d;else var S=c.fromCompiled(l,d);this.grammar=S,this.options={keepHistory:!1,lexer:S.lexer||new i};for(var $ in w||{})this.options[$]=w[$];this.lexer=this.options.lexer,this.lexerState=void 0;var E=new s(S,0);this.table=[E],E.wants[S.start]=[],E.predict(S.start),E.process(),this.current=0}u.fail={},u.prototype.feed=function(l){var d=this.lexer;d.reset(l,this.lexerState);for(var w;;){try{if(w=d.next(),!w)break}catch(P){var m=new s(this.grammar,this.current+1);this.table.push(m);var S=new Error(this.reportLexerError(P));throw S.offset=this.current,S.token=P.token,S}var $=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===i?w.value:w,p=$.scannable,y=p.length;y--;){var b=p[y],g=b.rule.symbols[b.dot];if(g.test?g.test(_):g.type?g.type===w.type:g.literal===o){var h=b.nextState({data:_,token:w,isToken:!0,reference:E-1});m.states.push(h)}}if(m.process(),m.states.length===0){var S=new Error(this.reportError(w));throw S.offset=this.current,S.token=w,S}this.options.keepHistory&&($.lexerState=d.save()),this.current++}return $&&(this.lexerState=d.save()),this.results=this.finish(),this},u.prototype.reportLexerError=function(l){var d,w,S=l.token;return S?(d="input "+JSON.stringify(S.text[0])+" (lexer error)",w=this.lexer.formatError(S,"Syntax error")):(d="input (lexer error)",w=l.message),this.reportErrorCommon(w,d)},u.prototype.reportError=function(l){var d=(l.type?l.type+" token: ":"")+JSON.stringify(l.value!==void 0?l.value:l),w=this.lexer.formatError(l,"Syntax error");return this.reportErrorCommon(w,d)},u.prototype.reportErrorCommon=function(l,d){var w=[];w.push(l);var S=this.table.length-2,$=this.table[S],E=$.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:
32
- `),this.displayStateStack($.states,w);else{w.push("Unexpected "+d+`. Instead, I was expecting to see one of the following:
33
- `);var m=E.map(function(o){return this.buildFirstStateStack(o,[])||[o]},this);m.forEach(function(o){var _=o[0],p=_.rule.symbols[_.dot],y=this.getSymbolDisplay(p);w.push("A "+y+" based on:"),this.displayStateStack(o,w)},this)}return w.push(""),w.join(`
34
- `)},u.prototype.displayStateStack=function(l,d){for(var w,S=0,$=0;$<l.length;$++){var E=l[$],m=E.rule.toString(E.dot);m===w?S++:(S>0&&d.push(" ^ "+S+" more lines identical to this"),S=0,d.push(" "+m)),w=m}},u.prototype.getSymbolDisplay=function(l){return a(l)},u.prototype.buildFirstStateStack=function(l,d){if(d.indexOf(l)!==-1)return null;if(l.wantedBy.length===0)return[l];var w=l.wantedBy[0],S=[l].concat(d),$=this.buildFirstStateStack(w,S);return $===null?null:[l].concat($)},u.prototype.save=function(){var l=this.table[this.current];return l.lexerState=this.lexerState,l},u.prototype.restore=function(l){var d=l.index;this.current=d,this.table[d]=l,this.table.splice(d+1),this.lexerState=l.lexerState,this.results=this.finish()},u.prototype.rewind=function(l){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[l])},u.prototype.finish=function(){var l=[],d=this.grammar.start,w=this.table[this.table.length-1];return w.states.forEach(function(S){S.rule.name===d&&S.dot===S.rule.symbols.length&&S.reference===0&&S.data!==u.fail&&l.push(S)}),l.map(function(S){return S.data})};function a(l){var d=typeof l;if(d==="string")return l;if(d==="object"){if(l.literal)return JSON.stringify(l.literal);if(l instanceof RegExp)return"character matching "+l;if(l.type)return l.type+" token";if(l.test)return"token matching "+String(l.test);throw new Error("Unknown symbol type: "+l)}}function f(l){var d=typeof l;if(d==="string")return l;if(d==="object"){if(l.literal)return JSON.stringify(l.literal);if(l instanceof RegExp)return l.toString();if(l.type)return"%"+l.type;if(l.test)return"<"+String(l.test)+">";throw new Error("Unknown symbol type: "+l)}}return{Parser:u,Grammar:c,Rule:r}})}),Zu=H(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(c){return c[0]}var r=c=>[].concat(...c.map(i=>Array.isArray(i)?r(i):i));function n(c){return c?Array.isArray(c)?r(c).join(""):c:""}var s={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:c=>c.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(c){return c.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(c){return c.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:e},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:e},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:c=>c[0].concat([c[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:e},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:c=>c[0].concat([c[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:e},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(c){return{DomainName:n(c[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(c){return{AddressLiteral:n(c[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(c){return{localPart:n(c[0]),domainPart:n(c[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(c){return{DotString:n(c[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(c){return{QuotedString:n(c[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:c=>c[0].concat([c[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:c=>c[0].concat([c[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:c=>c[0].concat([c[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:e},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(c){return c.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:c=>c[0].concat([c[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:e},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:c=>c.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:c=>c.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:e},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:e},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:e}],ParserStart:"Reverse_path"};t.default=s}),ds=H(function(t){var e=t&&t.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;var r=Yu(),n=e(Zu());n.default.ParserStart="Mailbox";var s=r.Grammar.fromCompiled(n.default);function c(l){if(l.length>986)throw new Error("address too long");const w=new r.Parser(s);if(w.feed(l),w.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");const S=l.lastIndexOf("@"),$=l.substring(S+1);if($[0]!=="["){if($.length>253)throw new Error("domain too long");const E=$.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=c;function i(l){return function(){const S=l.indexOf("+");return S===-1?l:l.substr(0,S)}().replace(/\./g,"").toLowerCase()}t.normalize_dot_string=i;function u(l){var d,w;const S=c(l),$=(d=S.domainPart.AddressLiteral)!==null&&d!==void 0?d:S.domainPart.DomainName.toLowerCase();return`${(w=S.localPart.QuotedString)!==null&&w!==void 0?w:i(S.localPart.DotString)}@${$}`}t.normalize=u;function a(l){return`"${l.substr(1).substr(0,l.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.canonicalize_quoted_string=a;function f(l){var d;const w=c(l),S=(d=w.domainPart.AddressLiteral)!==null&&d!==void 0?d:w.domainPart.DomainName.toLowerCase();return`${w.localPart.QuotedString?a(w.localPart.QuotedString):w.localPart.DotString}@${S}`}t.canonicalize=f}),el=H(function(t,e){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,i=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"),S=d.constructor&&d.constructor.prototype&&r.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!w&&!S)return!1;var $;for($ in d);return typeof $>"u"||r.call(d,$)},a=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},f=function(d,w){if(w==="__proto__")if(r.call(d,w)){if(c)return c(d,w).value}else return;return d[w]};e.exports=function l(){var d,w,S,$,E,m,o=arguments[0],_=1,p=arguments.length,y=!1;for(typeof o=="boolean"&&(y=o,o=arguments[1]||{},_=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});_<p;++_)if(d=arguments[_],d!=null)for(w in d)S=f(o,w),$=f(d,w),o!==$&&(y&&$&&(u($)||(E=i($)))?(E?(E=!1,m=S&&i(S)?S:[]):m=S&&u(S)?S:{},a(o,{name:w,newValue:l(y,m,$)})):typeof $<"u"&&a(o,{name:w,newValue:$}));return o}}),tl=H(function(t,e){e.exports=[{scheme:"aaa",description:"Diameter Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"aaas",description:"Diameter Protocol with Secure Transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"about",description:"about",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6694"}]},{scheme:"acap",description:"application configuration access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2244"}]},{scheme:"acct",description:"acct",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7565"}]},{scheme:"cap",description:"Calendar Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4324"}]},{scheme:"cid",description:"content identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"coap",description:"coap",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"coaps",description:"coaps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"crid",description:"TV-Anytime Content Reference Identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4078"}]},{scheme:"data",description:"data",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2397"}]},{scheme:"dav",description:"dav",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"dict",description:"dictionary service protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2229"}]},{scheme:"dns",description:"Domain Name System",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4501"}]},{scheme:"example",description:"example",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7595"}]},{scheme:"file",description:"Host-specific file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"ftp",description:"File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"geo",description:"Geographic Locations",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5870"}]},{scheme:"go",description:"go",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3368"}]},{scheme:"gopher",description:"The Gopher Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4266"}]},{scheme:"h323",description:"H.323",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3508"}]},{scheme:"http",description:"Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"https",description:"Hypertext Transfer Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"iax",description:"Inter-Asterisk eXchange Version 2",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5456"}]},{scheme:"icap",description:"Internet Content Adaptation Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3507"}]},{scheme:"im",description:"Instant Messaging",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3860"}]},{scheme:"imap",description:"internet message access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5092"}]},{scheme:"info",description:`Information Assets with Identifiers in Public Namespaces.
35
- (section 3) defines an "info" registry
36
- of public namespaces, which is maintained by NISO and can be accessed
37
- 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"}]}]}),rl=H(function(t,e){e.exports=[{scheme:"acr",description:"acr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/acr"},{scheme:"adiumxtra",description:"adiumxtra",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/adiumxtra"},{scheme:"afp",description:"afp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/afp"},{scheme:"afs",description:"Andrew File System global file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"aim",description:"aim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aim"},{scheme:"appdata",description:"appdata",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/appdata"},{scheme:"apt",description:"apt",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/apt"},{scheme:"attachment",description:"attachment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/attachment"},{scheme:"aw",description:"aw",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aw"},{scheme:"barion",description:"barion",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/barion"},{scheme:"beshare",description:"beshare",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/beshare"},{scheme:"bitcoin",description:"bitcoin",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bitcoin"},{scheme:"blob",description:"blob",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/blob"},{scheme:"bolo",description:"bolo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bolo"},{scheme:"callto",description:"callto",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/callto"},{scheme:"chrome",description:"chrome",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome"},{scheme:"chrome-extension",description:"chrome-extension",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome-extension"},{scheme:"com-eventbrite-attendee",description:"com-eventbrite-attendee",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/com-eventbrite-attendee"},{scheme:"content",description:"content",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/content"},{scheme:"cvs",description:"cvs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/cvs"},{scheme:"dis",description:"dis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dis"},{scheme:"dlna-playcontainer",description:"dlna-playcontainer",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playcontainer"},{scheme:"dlna-playsingle",description:"dlna-playsingle",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playsingle"},{scheme:"dntp",description:"dntp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dntp"},{scheme:"dtn",description:"DTNRG research and development",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5050"}]},{scheme:"dvb",description:"dvb",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mcroberts-uri-dvb"}]},{scheme:"ed2k",description:"ed2k",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ed2k"},{scheme:"facetime",description:"facetime",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/facetime"},{scheme:"feed",description:"feed",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feed"},{scheme:"feedready",description:"feedready",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feedready"},{scheme:"finger",description:"finger",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/finger"},{scheme:"fish",description:"fish",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/fish"},{scheme:"gg",description:"gg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gg"},{scheme:"git",description:"git",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/git"},{scheme:"gizmoproject",description:"gizmoproject",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gizmoproject"},{scheme:"gtalk",description:"gtalk",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gtalk"},{scheme:"ham",description:"ham",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7046"}]},{scheme:"hcp",description:"hcp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/hcp"},{scheme:"icon",description:"icon",reference:[{type:"draft",href:"http://www.iana.org/go/draft-lafayette-icon-uri-scheme"}]},{scheme:"iotdisco",description:"iotdisco",reference:[{type:"uri",href:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco.pdf"}],template:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco"},{scheme:"ipn",description:"ipn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6260"}]},{scheme:"irc",description:"irc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc"},{scheme:"irc6",description:"irc6",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc6"},{scheme:"ircs",description:"ircs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ircs"},{scheme:"isostore",description:"isostore",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/isostore"},{scheme:"itms",description:"itms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/itms"},{scheme:"jar",description:"jar",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/jar"},{scheme:"jms",description:"Java Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6167"}]},{scheme:"keyparc",description:"keyparc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/keyparc"},{scheme:"lastfm",description:"lastfm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/lastfm"},{scheme:"ldaps",description:"ldaps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ldaps"},{scheme:"magnet",description:"magnet",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/magnet"},{scheme:"maps",description:"maps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/maps"},{scheme:"market",description:"market",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/market"},{scheme:"message",description:"message",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/message"},{scheme:"mms",description:"mms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mms"},{scheme:"ms-access",description:"ms-access",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-access"},{scheme:"ms-drive-to",description:"ms-drive-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-drive-to"},{scheme:"ms-enrollment",description:"ms-enrollment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-enrollment"},{scheme:"ms-excel",description:"ms-excel",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-excel"},{scheme:"ms-getoffice",description:"ms-getoffice",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-getoffice"},{scheme:"ms-help",description:"ms-help",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-help"},{scheme:"ms-infopath",description:"ms-infopath",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-infopath"},{scheme:"ms-media-stream-id",description:"ms-media-stream-id",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-media-stream-id"},{scheme:"ms-powerpoint",description:"ms-powerpoint",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-powerpoint"},{scheme:"ms-project",description:"ms-project",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-project"},{scheme:"ms-publisher",description:"ms-publisher",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-publisher"},{scheme:"ms-search-repair",description:"ms-search-repair",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-search-repair"},{scheme:"ms-secondary-screen-controller",description:"ms-secondary-screen-controller",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-controller"},{scheme:"ms-secondary-screen-setup",description:"ms-secondary-screen-setup",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-setup"},{scheme:"ms-settings",description:"ms-settings",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings"},{scheme:"ms-settings-airplanemode",description:"ms-settings-airplanemode",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-airplanemode"},{scheme:"ms-settings-bluetooth",description:"ms-settings-bluetooth",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-bluetooth"},{scheme:"ms-settings-camera",description:"ms-settings-camera",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-camera"},{scheme:"ms-settings-cellular",description:"ms-settings-cellular",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cellular"},{scheme:"ms-settings-cloudstorage",description:"ms-settings-cloudstorage",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cloudstorage"},{scheme:"ms-settings-connectabledevices",description:"ms-settings-connectabledevices",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-connectabledevices"},{scheme:"ms-settings-displays-topology",description:"ms-settings-displays-topology",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-displays-topology"},{scheme:"ms-settings-emailandaccounts",description:"ms-settings-emailandaccounts",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-emailandaccounts"},{scheme:"ms-settings-language",description:"ms-settings-language",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-language"},{scheme:"ms-settings-location",description:"ms-settings-location",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-location"},{scheme:"ms-settings-lock",description:"ms-settings-lock",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-lock"},{scheme:"ms-settings-nfctransactions",description:"ms-settings-nfctransactions",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-nfctransactions"},{scheme:"ms-settings-notifications",description:"ms-settings-notifications",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-notifications"},{scheme:"ms-settings-power",description:"ms-settings-power",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-power"},{scheme:"ms-settings-privacy",description:"ms-settings-privacy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-privacy"},{scheme:"ms-settings-proximity",description:"ms-settings-proximity",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-proximity"},{scheme:"ms-settings-screenrotation",description:"ms-settings-screenrotation",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-screenrotation"},{scheme:"ms-settings-wifi",description:"ms-settings-wifi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-wifi"},{scheme:"ms-settings-workplace",description:"ms-settings-workplace",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-workplace"},{scheme:"ms-spd",description:"ms-spd",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-spd"},{scheme:"ms-transit-to",description:"ms-transit-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-transit-to"},{scheme:"ms-visio",description:"ms-visio",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-visio"},{scheme:"ms-walk-to",description:"ms-walk-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-walk-to"},{scheme:"ms-word",description:"ms-word",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-word"},{scheme:"msnim",description:"msnim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/msnim"},{scheme:"mumble",description:"mumble",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mumble"},{scheme:"mvn",description:"mvn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mvn"},{scheme:"notes",description:"notes",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/notes"},{scheme:"oid",description:"oid",reference:[{type:"draft",href:"http://www.iana.org/go/draft-larmouth-oid-iri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/oid"},{scheme:"palm",description:"palm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/palm"},{scheme:"paparazzi",description:"paparazzi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/paparazzi"},{scheme:"platform",description:"platform",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/platform"},{scheme:"proxy",description:"proxy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/proxy"},{scheme:"psyc",description:"psyc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/psyc"},{scheme:"query",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/query"},{scheme:"redis",description:"redis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/redis"},{scheme:"rediss",description:"rediss",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rediss"},{scheme:"res",description:"res",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/res"},{scheme:"resource",description:"resource",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/resource"},{scheme:"rmi",description:"rmi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rmi"},{scheme:"rsync",description:"rsync",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5781"}]},{scheme:"rtmfp",description:"rtmfp",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7425"}],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmfp"},{scheme:"rtmp",description:"rtmp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmp"},{scheme:"secondlife",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/secondlife"},{scheme:"sftp",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sftp"},{scheme:"sgn",description:"sgn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sgn"},{scheme:"skype",description:"skype",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/skype"},{scheme:"smb",description:"smb",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/smb"},{scheme:"smtp",description:"smtp",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/smtp"},{scheme:"soldat",description:"soldat",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/soldat"},{scheme:"spotify",description:"spotify",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/spotify"},{scheme:"ssh",description:"ssh",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ssh"},{scheme:"steam",description:"steam",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/steam"},{scheme:"submit",description:"submit",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/submit"},{scheme:"svn",description:"svn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/svn"},{scheme:"teamspeak",description:"teamspeak",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teamspeak"},{scheme:"teliaeid",description:"teliaeid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teliaeid"},{scheme:"things",description:"things",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/things"},{scheme:"tool",description:"tool",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/tool"},{scheme:"udp",description:"udp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/udp"},{scheme:"unreal",description:"unreal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/unreal"},{scheme:"ut2004",description:"ut2004",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ut2004"},{scheme:"v-event",description:"v-event",reference:[{type:"draft",href:"http://www.iana.org/go/draft-menderico-v-event-uri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/v-event"},{scheme:"ventrilo",description:"ventrilo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ventrilo"},{scheme:"view-source",description:"view-source",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/view-source"},{scheme:"webcal",description:"webcal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/webcal"},{scheme:"wpid",description:"wpid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wpid"},{scheme:"wtai",description:"wtai",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wtai"},{scheme:"wyciwyg",description:"wyciwyg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wyciwyg"},{scheme:"xfire",description:"xfire",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xfire"},{scheme:"xri",description:"xri",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xri"},{scheme:"ymsgr",description:"ymsgr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ymsgr"}]}),nl=H(function(t,e){e.exports=[{scheme:"fax",description:"fax",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"filesystem",description:"filesystem",reference:[],template:"http://www.iana.org/assignments/uri-schemes/historic/filesystem"},{scheme:"mailserver",description:"Access to data available from mail servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6196"}]},{scheme:"modem",description:"modem",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"pack",description:"pack",reference:[{type:"draft",href:"http://www.iana.org/go/draft-shur-pack-uri-scheme"}],template:"http://www.iana.org/assignments/uri-schemes/historic/pack"},{scheme:"prospero",description:"Prospero Directory Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4157"}]},{scheme:"snews",description:"NNTP over SSL/TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"videotex",description:"videotex",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mavrakis-videotex-url-spec"},{type:"rfc",href:"http://www.iana.org/go/rfc2122"},{type:"rfc",href:"http://www.iana.org/go/rfc3986"}],template:"http://www.iana.org/assignments/uri-schemes/historic/videotex"},{scheme:"wais",description:"Wide Area Information Servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4156"}]},{scheme:"z39.50",description:"Z39.50 information access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"},{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),sl=H(function(t,e){e.exports=[{scheme:"android-app"},{scheme:"webpack"},{scheme:"s3",description:"Amazon Web Services S3 bucket"},{scheme:"gs",description:"Google Cloud Storage"},{scheme:"mqtt",description:"Message Queuing Telemetry Transport Protocol"},{scheme:"modbus+tcp",description:"Modbus over TCP"}]}),Vi=H(function(t,e){var r=el(),n={permanent:tl(),provosional:rl(),historical:nl()},s={};Object.keys(n).forEach(function(c){n[c].forEach(function(i){s[i.scheme]=r(i,{type:c})})}),n.unofficial=sl().filter(function(c){return!s[c.scheme]}),n.unofficial.forEach(function(c){s[c.scheme]=r(c,{type:"unofficial"})}),e.exports=r(n,{allByName:s})}),il=H(function(t,e){var{parse:r}=ls(),{addressParser:n}=ds(),s=Vi();function c(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const u=r(i);return!!(u.scheme==="mailto"&&u.to.every(c)||u.reference==="absolute"&&s.allByName[u.scheme])}}),al=H(function(t,e){e.exports=/^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/}),ol=H(function(t,e){var{parse:r}=ds();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),cl={};function Ui(t){return this[t]}function ul(t,e){this[t]=hl.bind(null,e)}var Fi,zi,Er,hs,en,ll=(t,e,r)=>{var n=e&&typeof e=="object"||typeof e=="function"?hs(e):[];for(let s of n)!en.call(t,s)&&s!=="default"&&Er(t,s,{get:Ui.bind(e,s),enumerable:!0})},fl,Us=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=fl??(fl=new WeakMap),c=s.get(t);if(c)return c}r=t!=null?Fi(zi(t)):{};let i=e||!t||!t.__esModule||!en.call(t,"default")?Er(r,"default",{value:t,enumerable:!0}):r;if(t&&typeof t=="object"||typeof t=="function")for(let u of hs(t))en.call(i,u)||Er(i,u,{get:Ui.bind(t,u),enumerable:!0});return n&&s.set(t,i),i},dl=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hl=t=>t,pl=(t,e)=>{for(var r in e)Er(t,r,{get:e[r],enumerable:!0,configurable:!0,set:ul.bind(e,r)})},Tn,Rn,In,ml,gl=hc(()=>{Fi=Object.create,{getPrototypeOf:zi,defineProperty:Er,getOwnPropertyNames:hs}=Object,en=Object.prototype.hasOwnProperty,Tn=dl(function(t,e){var r=/^xn--/,n=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},i=Math.floor,u=String.fromCharCode;function a(b){throw RangeError(c[b])}function f(b,g){let h=[],P=b.length;for(;P--;)h[P]=g(b[P]);return h}function l(b,g){let h=b.split("@"),P="";h.length>1&&(P=h[0]+"@",b=h[1]),b=b.replace(s,".");let O=b.split("."),A=f(O,g).join(".");return P+A}function d(b){let g=[],h=0,P=b.length;for(;h<P;){let O=b.charCodeAt(h++);if(O>=55296&&O<=56319&&h<P){let A=b.charCodeAt(h++);(A&64512)==56320?g.push(((O&1023)<<10)+(A&1023)+65536):(g.push(O),h--)}else g.push(O)}return g}var w=b=>String.fromCodePoint(...b),S=function(b){return b>=48&&b<58?26+(b-48):b>=65&&b<91?b-65:b>=97&&b<123?b-97:36},$=function(b,g){return b+22+75*(b<26)-((g!=0)<<5)},E=function(b,g,h){let P=0;for(b=h?i(b/700):b>>1,b+=i(b/g);b>455;P+=36)b=i(b/35);return i(P+36*b/(b+38))},m=function(b){let g=[],h=b.length,P=0,O=128,A=72,F=b.lastIndexOf("-");F<0&&(F=0);for(let L=0;L<F;++L)b.charCodeAt(L)>=128&&a("not-basic"),g.push(b.charCodeAt(L));for(let L=F>0?F+1:0;L<h;){let X=P;for(let ee=1,fe=36;;fe+=36){L>=h&&a("invalid-input");let we=S(b.charCodeAt(L++));we>=36&&a("invalid-input"),we>i((2147483647-P)/ee)&&a("overflow"),P+=we*ee;let Oe=fe<=A?1:fe>=A+26?26:fe-A;if(we<Oe)break;let se=36-Oe;ee>i(2147483647/se)&&a("overflow"),ee*=se}let G=g.length+1;A=E(P-X,G,X==0),i(P/G)>2147483647-O&&a("overflow"),O+=i(P/G),P%=G,g.splice(P++,0,O)}return String.fromCodePoint(...g)},o=function(b){let g=[];b=d(b);let h=b.length,P=128,O=0,A=72;for(let X of b)X<128&&g.push(u(X));let F=g.length,L=F;for(F&&g.push("-");L<h;){let X=2147483647;for(let ee of b)ee>=P&&ee<X&&(X=ee);let G=L+1;X-P>i((2147483647-O)/G)&&a("overflow"),O+=(X-P)*G,P=X;for(let ee of b)if(ee<P&&++O>2147483647&&a("overflow"),ee===P){let fe=O;for(let we=36;;we+=36){let Oe=we<=A?1:we>=A+26?26:we-A;if(fe<Oe)break;let se=fe-Oe,B=36-Oe;g.push(u($(Oe+se%B,0))),fe=i(se/B)}g.push(u($(fe,0))),A=E(O,G,L===F),O=0,++L}++O,++P}return g.join("")},_=function(b){return l(b,function(g){return r.test(g)?m(g.slice(4).toLowerCase()):g})},p=function(b){return l(b,function(g){return n.test(g)?"xn--"+o(g):g})},y={version:"2.3.1",ucs2:{decode:d,encode:w},decode:m,encode:o,toASCII:p,toUnicode:_};e.exports=y}),Rn={},pl(Rn,{default:()=>In.default}),ll(Rn,Us(Tn())),In=Us(Tn()),ml=In.default}),vl=H(function(t,e){var{toASCII:r}=(gl(),dc(cl)),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 c=r(s);return c.replace(/\.$/,"").length<=253&&n.test(c)}}),yl=H(function(t,e){var{parse:r}=ls(),{addressParser:n}=ds(),s=Vi();function c(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const u=r(i);return u.scheme==="mailto"&&u.to.every(c)||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")}}),_l=H(function(t,e){t.iri=il(),t.duration=al(),t["idn-email"]=ol(),t["idn-hostname"]=vl(),t["iri-reference"]=yl()}),wl=H(function(t,e){var r=_l();e.exports=(n,s={})=>{const c=Object.keys(r);let i=c;if(s.formats){if(!Array.isArray(s.formats))throw new Error("options.formats must be an array");i=s.formats}return c.filter(u=>i.includes(u)).forEach(u=>{n.addFormat(u,r[u])}),n}}),bl=H(function(t,e){var r=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function c(f,l,d){this.fn=f,this.context=l,this.once=d||!1}function i(f,l,d,w,S){if(typeof d!="function")throw new TypeError("The listener must be a function");var $=new c(d,w||f,S),E=n?n+l:l;return f._events[E]?f._events[E].fn?f._events[E]=[f._events[E],$]:f._events[E].push($):(f._events[E]=$,f._eventsCount++),f}function u(f,l){--f._eventsCount===0?f._events=new s:delete f._events[l]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],d,w;if(this._eventsCount===0)return l;for(w in d=this._events)r.call(d,w)&&l.push(n?w.slice(1):w);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(d)):l},a.prototype.listeners=function(l){var d=n?n+l:l,w=this._events[d];if(!w)return[];if(w.fn)return[w.fn];for(var S=0,$=w.length,E=new Array($);S<$;S++)E[S]=w[S].fn;return E},a.prototype.listenerCount=function(l){var d=n?n+l:l,w=this._events[d];return w?w.fn?1:w.length:0},a.prototype.emit=function(l,d,w,S,$,E){var m=n?n+l:l;if(!this._events[m])return!1;var o=this._events[m],_=arguments.length,p,y;if(o.fn){switch(o.once&&this.removeListener(l,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,S),!0;case 5:return o.fn.call(o.context,d,w,S,$),!0;case 6:return o.fn.call(o.context,d,w,S,$,E),!0}for(y=1,p=new Array(_-1);y<_;y++)p[y-1]=arguments[y];o.fn.apply(o.context,p)}else{var b=o.length,g;for(y=0;y<b;y++)switch(o[y].once&&this.removeListener(l,o[y].fn,void 0,!0),_){case 1:o[y].fn.call(o[y].context);break;case 2:o[y].fn.call(o[y].context,d);break;case 3:o[y].fn.call(o[y].context,d,w);break;case 4:o[y].fn.call(o[y].context,d,w,S);break;default:if(!p)for(g=1,p=new Array(_-1);g<_;g++)p[g-1]=arguments[g];o[y].fn.apply(o[y].context,p)}}return!0},a.prototype.on=function(l,d,w){return i(this,l,d,w,!1)},a.prototype.once=function(l,d,w){return i(this,l,d,w,!0)},a.prototype.removeListener=function(l,d,w,S){var $=n?n+l:l;if(!this._events[$])return this;if(!d)return u(this,$),this;var E=this._events[$];if(E.fn)E.fn===d&&(!S||E.once)&&(!w||E.context===w)&&u(this,$);else{for(var m=0,o=[],_=E.length;m<_;m++)(E[m].fn!==d||S&&!E[m].once||w&&E[m].context!==w)&&o.push(E[m]);o.length?this._events[$]=o.length===1?o[0]:o:u(this,$)}return this},a.prototype.removeAllListeners=function(l){var d;return l?(d=n?n+l:l,this._events[d]&&u(this,d)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,typeof e<"u"&&(e.exports=a)}),$l="https://www.w3.org/ns/activitystreams",El="https://sockethub.org/ns/context/v1.jsonld",Sl="error",Pl="https://sockethub.org/ns/context/platform/error/v1.jsonld",kl="sockethub:internal",Ol="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",ps=new Map,Bi=new Map,Hi=new Map;function Nl(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function Tl(t){return Nl(t["@context"])}function Ki(t,e,r,n){ps.set(e,t),Bi.set(e,r),Hi.set(e,n)}function dn(t){const r=Tl(t).filter(n=>ps.has(n));return r.length!==1?null:r[0]}function xi(t){return ps.get(t)}function Rl(t){return Bi.get(t)}function Il(t){return Hi.get(t)}var Gi={feed:{required:["id","type"],additionalProperties:!0,properties:{type:{enum:["feed"]},id:{type:"string",format:"iri"},name:{type:"string"},description:{type:"string"},author:{type:"string"},favicon:{type:"string"}}},person:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["person"]},name:{type:"string"}}},room:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["room"]},name:{type:"string"}}},service:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["service"]},name:{type:"string"}}},platform:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["platform"]},name:{type:"string"}}},website:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["website"]},name:{type:"string"}}},address:{required:["type"],additionalProperties:!1,properties:{type:{enum:["address"]}}},calendar:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["calendar"]},name:{type:"string"},components:{type:"array",items:{enum:["event","task"]}}}},addressBook:{required:["id","type"],additionalProperties:!1,properties:{id:{type:"string",format:"iri"},type:{enum:["addressBook"]}}}},Cl=Object.keys(Gi),Wi=["person","room","service","feed","website","platform"],Ji=["person","room","service","feed","website","platform","address","calendar","addressBook"],Al=Wi.map(t=>({$ref:`#/definitions/type/${t}`})),jl=Ji.map(t=>({$ref:`#/definitions/type/${t}`})),Ml={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:$l}},{contains:{const:El}}]},Dl={type:"string"},ql={$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":Ml,id:{type:"string"},type:Dl,actor:{type:"object",oneOf:Al},target:{type:"object",oneOf:jl},object:{type:"object"},published:{type:"string",format:"date-time"}},definitions:{type:Gi}},Ll={version:"3.0.0-beta.0"};function Vl(t,e){return t.replace("/v/",`/${e}/`)}var Ul={$id:"https://sockethub.org/schemas/v/sockethub-config.json"};Vl(Ul.$id,Ll.version);var Fl=Sr(Ai()),Fs={type:"integer",minimum:0},zl={type:"string",minLength:1},zs={type:"string",pattern:"^/(?![/\\\\])[^\\s\\\\]*$"},Bl={$id:"https://sockethub.org/schemas/v/service-descriptor.json",description:"Sockethub service descriptor",type:"object",required:["name","apiVersion","platforms"],additionalProperties:!0,properties:{name:{const:"sockethub"},apiVersion:Fs,endpoints:{type:"object",required:["socketIO"],additionalProperties:!0,properties:{socketIO:zs,httpActions:zs}},platforms:{type:"array",items:{type:"object",required:["id","apiVersion"],additionalProperties:!0,properties:{id:zl,apiVersion:Fs}}}}},Hl=new Fl.default({strictTypes:!1,allErrors:!0}),Bs;function Kl(t){return Bs??(Bs=Hl.compile(Bl)),Bs(t)}var xl=Sr(Ai()),Gl=Sr(Xu()),Wl=Sr(wl());function Jl(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 yr(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(...yr(s))}return e}function Ql(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function Xl(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function Yl(t,e){const r=Ql(t),n=Xl(t);if(!n)return-1;const s=e[n];return!s||!r||!s.includes(r)?-1:t.instancePath.split("/").length}function Zl(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:yr(t)};const e=t;return{actor:yr(e.actor),target:yr(e.target),object:e.object?yr(e.object):[]}}function ef(t,e,r){const n=Zl(t);let s=0,c=-1;for(let i=0;i<e.length;i++){const u=Yl(e[i],n);u>c&&(c=u,s=i)}return c>=0?Jl(e[s]):rf(e[e.length-1],r)}function tf(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 rf(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],s=n==="actor"?Wi:n==="target"?Ji:Cl,c=tf(s,e),i=c.length>0?c:s;r=`${t.instancePath}: ${t.message}: ${i.join(", ")}`}else r=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return"additionalProperty"in t.params&&(r+=`: ${t.params.additionalProperty}`),r}var Mt=new xl.default({strictTypes:!1,allErrors:!0});Gl.default(Mt);Wl.default(Mt);var Dt="https://sockethub.org/schemas/v0",Kn={},nf={},Hs=!1;Kn[`${Dt}/activity-stream`]=ql;for(const t in Kn)Mt.addSchema(Kn[t],t);function Ks(t,e){Ki(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 sf(){Hs||(Ks(Sl,Pl),Ks(kl,Ol),Hs=!0)}sf();function tn(t,e){const r=Mt.getSchema(t);if(!r)return`schema ${t} not found`;if(!r(e)){let s=ef(e,r.errors,nf);if(Array.isArray(e["@context"])){const c=dn(e);if(c){const i=xi(c);i&&(s=`[${i}] ${s}`)}}return s}return""}function af(t){const e=tn(`${Dt}/activity-stream`,t);if(e)return e;const r=dn(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=Rl(r);return n?tn(n,t):`platform context URL ${r} does not have a registered message schema`}function of(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=tn(`${Dt}/activity-stream`,t);if(e)return e;const r=dn(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=Il(r);return n?tn(n,t):`platform context URL ${r} does not have a registered credentials schema`}function xs(t,e){const r=`${Dt}/context/${e}`;Mt.getSchema(r)||Mt.addSchema(t,r)}function cf(t,e){Ki(t,e,`${Dt}/context/${t}/messages`,`${Dt}/context/${t}/credentials`)}function xn(t){const e=dn(t);return e?xi(e)??null:null}var Gs={actor:"id",target:"id",object:"content"};function uf(t,e){return typeof t=="string"?{[e]:t}:Array.isArray(t)?t.map(r=>typeof r=="string"?{id:r}:r):t}function Cn(t){const e={...t};for(const r of Object.keys(Gs))r in e&&(e[r]=uf(e[r],Gs[r]));return e}var lf=Sr(bl()),ff=lf.default,df=/^v?(\d+)(?:\.\d+){0,2}(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function An(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Ws(t){return typeof t=="number"&&Number.isSafeInteger(t)&&t>=0}function Js(t){if(!t||typeof t!="object")return;const{apiVersion:e,version:r}=t;if(Ws(e))return e;if(typeof r=="string"){const n=df.exec(r.trim()),s=n?Number(n[1]):void 0;if(Ws(s))return s}}function hf(t){var i,u;if(!t||typeof t!="object")return;const e=t,r=(i=e.contexts)==null?void 0:i.as,n=(u=e.contexts)==null?void 0:u.sockethub;if(typeof r!="string"||typeof n!="string"||!Array.isArray(e.platforms))return;const s=Js(e);if(s===void 0)return;const c=new Map;for(const a of e.platforms){if(!a||typeof a!="object"||typeof a.id!="string"||typeof a.contextUrl!="string"||typeof a.contextVersion!="string"||typeof a.schemaVersion!="string")continue;const f=Js(a);if(f===void 0)continue;const l=An(a.schemas)?a.schemas:{};c.set(a.id,{id:a.id,apiVersion:f,contextUrl:a.contextUrl,contextVersion:a.contextVersion,schemaVersion:a.schemaVersion,types:Array.isArray(a.types)?a.types.filter(d=>typeof d=="string"):[],schemas:{credentials:An(l.credentials)?l.credentials:void 0,messages:An(l.messages)?l.messages:void 0}})}return{apiVersion:s,asContextUrl:r,sockethubContextUrl:n,platforms:c}}function pf(t){cf(t.id,t.contextUrl);try{t.schemas.credentials&&xs(t.schemas.credentials,`${t.id}/credentials`),t.schemas.messages&&xs(t.schemas.messages,`${t.id}/messages`)}catch(e){const r=e instanceof Error?e.message:String(e);console.warn(`[SockethubClient] Failed to register schemas for platform ${t.id}: ${r}`)}}class zt extends Error{constructor(e,r){super(e,r),this.name="DiscoveryError"}}async function mf(t,e={}){let r;try{r=new URL(t)}catch(f){throw new zt(`Sockethub discovery needs an absolute base URL, got ${JSON.stringify(t)}`,{cause:f})}if(r.protocol!=="http:"&&r.protocol!=="https:")throw new zt(`Sockethub discovery needs an http(s) base URL, got ${JSON.stringify(t)}`);const n=e.fetch??globalThis.fetch;if(typeof n!="function")throw new zt("Sockethub discovery needs fetch(); pass one in the options");const s=new AbortController,c=e.discoveryTimeoutMs??1e4,i=setTimeout(()=>s.abort(),c),u=()=>s.signal.aborted;let a;try{let f;try{f=await n(r.href,{headers:{accept:"application/json"},signal:s.signal})}catch(l){const d=u()?`timed out after ${c}ms`:l instanceof Error?l.message:String(l);throw new zt(`Sockethub discovery failed: could not reach ${r.href} (${d})`,{cause:l})}if(!f.ok)throw new zt(`Sockethub discovery failed: ${r.href} answered ${f.status}`);try{a=await f.json()}catch(l){throw new zt(u()?`Sockethub discovery failed: ${r.href} timed out after ${c}ms while sending the descriptor`:`Sockethub discovery failed: ${r.href} did not return JSON; is it a Sockethub server?`,{cause:l})}}finally{clearTimeout(i)}if(!Kl(a))throw new zt(`Sockethub discovery failed: ${r.href} did not return a valid service descriptor`);return a}function gf(t,e){const r=new URL(e,t);if(r.origin!==new URL(t).origin)throw new zt(`Sockethub discovery failed: endpoint path ${JSON.stringify(e)} resolves to ${r.origin}, not ${t}`);return r.href}async function vf(t){if(t)return t;const e=globalThis.io;if(typeof e=="function")return e;try{const r=await ao(()=>import("./C8dk2-j7.js"),[],import.meta.url);if(typeof r.io=="function")return r.io}catch{}throw new Error("SockethubClient.connect() needs socket.io-client: install it, load /socket.io.js, or pass `io` in the options")}function jn(t){return typeof t=="object"&&t!==null&&"error"in t&&!!t.error}function ms(t){return"actor"in t&&t.actor!==null&&typeof t.actor=="object"&&"id"in t.actor&&typeof t.actor.id=="string"}function Qs(t){var e,r;return(t==null?void 0:t.type)==="update"&&((e=t.object)==null?void 0:e.type)==="address"&&ms(t)&&typeof t.target=="object"&&typeof((r=t.target)==null?void 0:r.id)=="string"&&t.target.id!==t.actor.id}function Mn(t){var s;const e=((s=t.actor)==null?void 0:s.id)||t.actor;if(!e)throw new Error(`actor property not present for message type: ${t==null?void 0:t.type}`);const r=t.target?t.target.id||t.target:"";return`${xn(t)??""}:${e}-${r}`}class yf{constructor(){Xe(this,"events",{credentials:new Map,connect:new Map,join:new Map})}recordCredentials(e){e.object&&e.object.type==="credentials"&&this.events.credentials.set(Mn(e),e)}recordMessage(e){const r=Mn(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)}moveActor(e){const r=e.actor.id,n=e.target,s=n.id,c=typeof n.name=="string"?n.name:void 0,i=xn(e)??"",u=[];for(const a of Object.values(this.events))for(const[f,l]of[...a]){if(!ms(l)||l.actor.id!==r||(xn(l)??"")!==i)continue;const d={...l,actor:{...l.actor,id:s,...c?{name:c}:{}}};a.delete(f),a.set(Mn(d),d),u.push([r,s])}return u}}class hn{constructor(e,r={},n){Xe(this,"replayStore",new yf);Xe(this,"_socket");Xe(this,"socket");Xe(this,"debug",!0);Xe(this,"descriptor");Xe(this,"serverOrigin");Xe(this,"options");Xe(this,"platformRegistry",new Map);Xe(this,"asContextUrl");Xe(this,"sockethubContextUrl");Xe(this,"apiVersion");Xe(this,"initState","idle");Xe(this,"hasReadyOnce",!1);Xe(this,"initCycle");Xe(this,"initTokenCounter",0);Xe(this,"initTimeoutTimer");Xe(this,"waitingWarningTimer");Xe(this,"waitingWarningIntervalMs",1e4);Xe(this,"readyWaiters",[]);Xe(this,"outboundQueue",[]);Xe(this,"outboundSequence",0);Xe(this,"registryFingerprint");Xe(this,"latestReadyInfo");if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.descriptor=n==null?void 0:n.descriptor,this.serverOrigin=n==null?void 0:n.serverOrigin,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))}endpointUrl(e){var n,s;const r=(s=(n=this.descriptor)==null?void 0:n.endpoints)==null?void 0:s[e];if(!(!this.serverOrigin||!r))return gf(this.serverOrigin,r)}static async connect(e,r={}){var S;const{io:n,socketOptions:s,fetch:c,discoveryTimeoutMs:i,...u}=r,a=await mf(e,{fetch:c,discoveryTimeoutMs:i}),f=(S=a.endpoints)==null?void 0:S.socketIO;if(!f)throw new zt(`Sockethub discovery failed: ${e} does not advertise a Socket.IO endpoint (older server?); pass a socket to the constructor instead`);const l=new URL(e).origin,w=(await vf(n))(l,{...s,path:f});return new hn(w,u,{descriptor:a,serverOrigin:l})}clearCredentials(){this.replayStore.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,c;const n=e==null?void 0:e.trim();if(n)return(c=(s=this.platformRegistry.get(n))==null?void 0:s.schemas)==null?void 0:c[r]}async waitForSchemas(e=2e3){return await this.ready(e),this.buildPlatformRegistryPayload()}ready(e=this.options.initTimeoutMs){return this.isReady()&&this.latestReadyInfo?Promise.resolve(this.latestReadyInfo):new Promise((r,n)=>{const s={resolve:r,reject:n};e>0&&(s.timer=setTimeout(()=>{this.readyWaiters=this.readyWaiters.filter(c=>c!==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"?of(e):af(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 ff;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){const r=hf(e);if(!r)return;this.apiVersion=r.apiVersion,this.asContextUrl=r.asContextUrl,this.sockethubContextUrl=r.sockethubContextUrl,this.platformRegistry=r.platforms;for(const c of r.platforms.values())pf(c);const n=this.buildPlatformRegistryPayload(),s=e;return this.registryFingerprint=typeof s.fingerprint=="string"?s.fingerprint:void 0,this.socket._emit("schemas",n),n}buildPlatformRegistryPayload(){return{apiVersion:this.apiVersion,contexts:this.asContextUrl&&this.sockethubContextUrl?{as:this.asContextUrl,sockethub:this.sockethubContextUrl}:void 0,platforms:this.getRegisteredPlatforms()}}buildReadyInfo(e){if(!(this.apiVersion===void 0||!this.asContextUrl||!this.sockethubContextUrl))return{state:"ready",reason:e,apiVersion:this.apiVersion,contexts:{as:this.asContextUrl,sockethub:this.sockethubContextUrl},platforms:this.getRegisteredPlatforms().map(r=>({id:r.id,apiVersion:r.apiVersion,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 c=s instanceof Error?s.message:String(s);this.emitInitError(c,"schemas-request",!1),this.startWaitingWarnings()}}markReady(e){const r=this.initCycle,n=!!(r!=null&&r.replayOnReady);this.initCycle=void 0,this.clearInitTimers(),this.initState="ready",this.hasReadyOnce=!0;const s=this.buildReadyInfo(e);if(!s){const c=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(c.message,"schemas-apply",!0),this.rejectReadyWaiters(c);return}if(this.socket._emit("ready",s),this.latestReadyInfo=s,this.resolveReadyWaiters(s),n){const{credentials:c,connect:i,join:u}=this.replayStore.events;this.replay("credentials",c),this.replay("message",i),this.replay("message",u)}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=Cn(e.content),r&&typeof r=="object"){const s=r;e.event==="credentials"&&!s.type&&(s.type="credentials"),s.actor&&typeof s.actor=="object"&&!s.actor.type&&(s.actor.type="person")}if(this.platformRegistry.size>0){const s=this.validateActivity(r);if(s){this.emitClientError(e.event,e.callback,`SockethubClient validation failed: ${s}`);return}}}let n=e.callback;e.event==="credentials"?this.replayStore.recordCredentials(r):e.event==="message"&&(this._socket.connected&&this.replayStore.recordMessage(r),n=this.rememberRequestedRename(r,n)),this._socket.emit(e.event,r,n)}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=>{const r=Cn(e);this.followActorRename(r),this.socket._emit("message",r)})}followActorRename(e){jn(e)||Qs(e)&&this.moveReplayState(e)}rememberRequestedRename(e,r){return Qs(e)?(...n)=>{const[s,c]=n;s instanceof Error||jn(s)||jn(c)||this.moveReplayState(e),typeof r=="function"&&r(...n)}:r}moveReplayState(e){for(const[r,n]of this.replayStore.moveActor(e))this.log(`replay state moved from ${r} to ${n}`)}replay(e,r){for(const n of r.values()){const s=Cn(n);let c=s==null?void 0:s.id;if(ms(s)){const i=s.actor;c=typeof i=="string"?i:i.id}this.log(`replaying ${e} for ${c}`),this._socket.emit(e,s)}}}(t=>{t.SockethubClient=hn})(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 Lr=Object.create(null);Object.keys(Lt).forEach(t=>{Lr[Lt[t]]=t});const Gn={type:"error",data:"parser error"},Qi=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Xi=typeof ArrayBuffer=="function",Yi=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,gs=({type:t,data:e},r,n)=>Qi&&e instanceof Blob?r?n(e):Xs(e,n):Xi&&(e instanceof ArrayBuffer||Yi(e))?r?n(e):Xs(new Blob([e]),n):n(Lt[t]+(e||"")),Xs=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function Ys(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Dn;function _f(t,e){if(Qi&&t.data instanceof Blob)return t.data.arrayBuffer().then(Ys).then(e);if(Xi&&(t.data instanceof ArrayBuffer||Yi(t.data)))return e(Ys(t.data));gs(t,!1,r=>{Dn||(Dn=new TextEncoder),e(Dn.encode(r))})}const Zs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_r=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Zs.length;t++)_r[Zs.charCodeAt(t)]=t;const wf=t=>{let e=t.length*.75,r=t.length,n,s=0,c,i,u,a;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),l=new Uint8Array(f);for(n=0;n<r;n+=4)c=_r[t.charCodeAt(n)],i=_r[t.charCodeAt(n+1)],u=_r[t.charCodeAt(n+2)],a=_r[t.charCodeAt(n+3)],l[s++]=c<<2|i>>4,l[s++]=(i&15)<<4|u>>2,l[s++]=(u&3)<<6|a&63;return f},bf=typeof ArrayBuffer=="function",vs=(t,e)=>{if(typeof t!="string")return{type:"message",data:Zi(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:$f(t.substring(1),e)}:Lr[r]?t.length>1?{type:Lr[r],data:t.substring(1)}:{type:Lr[r]}:Gn},$f=(t,e)=>{if(bf){const r=wf(t);return Zi(r,e)}else return{base64:!0,data:t}},Zi=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},ea="",Ef=(t,e)=>{const r=t.length,n=new Array(r);let s=0;t.forEach((c,i)=>{gs(c,!1,u=>{n[i]=u,++s===r&&e(n.join(ea))})})},Sf=(t,e)=>{const r=t.split(ea),n=[];for(let s=0;s<r.length;s++){const c=vs(r[s],e);if(n.push(c),c.type==="error")break}return n};function Pf(){return new TransformStream({transform(t,e){_f(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 c=new DataView(s.buffer);c.setUint8(0,126),c.setUint16(1,n)}else{s=new Uint8Array(9);const c=new DataView(s.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(r)})}})}let qn;function jr(t){return t.reduce((e,r)=>e+r.length,0)}function Mr(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 kf(t,e){qn||(qn=new TextDecoder);const r=[];let n=0,s=-1,c=!1;return new TransformStream({transform(i,u){for(r.push(i);;){if(n===0){if(jr(r)<1)break;const a=Mr(r,1);c=(a[0]&128)===128,s=a[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(jr(r)<2)break;const a=Mr(r,2);s=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),n=3}else if(n===2){if(jr(r)<8)break;const a=Mr(r,8),f=new DataView(a.buffer,a.byteOffset,a.length),l=f.getUint32(0);if(l>Math.pow(2,21)-1){u.enqueue(Gn);break}s=l*Math.pow(2,32)+f.getUint32(4),n=3}else{if(jr(r)<s)break;const a=Mr(r,s);u.enqueue(vs(c?a:qn.decode(a),e)),n=0}if(s===0||s>t){u.enqueue(Gn);break}}}})}const ta=4;function ct(t){if(t)return Of(t)}function Of(t){for(var e in ct.prototype)t[e]=ct.prototype[e];return t}ct.prototype.on=ct.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ct.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ct.prototype.off=ct.prototype.removeListener=ct.prototype.removeAllListeners=ct.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};ct.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};ct.prototype.emitReserved=ct.prototype.emit;ct.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ct.prototype.hasListeners=function(t){return!!this.listeners(t).length};const pn=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")(),Nf="arraybuffer";function ra(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const Tf=Ot.setTimeout,Rf=Ot.clearTimeout;function mn(t,e){e.useNativeTimers?(t.setTimeoutFn=Tf.bind(Ot),t.clearTimeoutFn=Rf.bind(Ot)):(t.setTimeoutFn=Ot.setTimeout.bind(Ot),t.clearTimeoutFn=Ot.clearTimeout.bind(Ot))}const If=1.33;function Cf(t){return typeof t=="string"?Af(t):Math.ceil((t.byteLength||t.size)*If)}function Af(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 na(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function jf(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function Mf(t){let e={},r=t.split("&");for(let n=0,s=r.length;n<s;n++){let c=r[n].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return e}class Df extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class ys extends ct{constructor(e){super(),this.writable=!1,mn(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 Df(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=vs(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=jf(e);return r.length?"?"+r:""}}class qf extends ys{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)};Sf(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,Ef(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]=na()),!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 Lf=sa;function Vf(){}class Uf extends qf{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,c)=>{this.onError("xhr post error",s,c)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class qt extends ct{constructor(e,r,n){super(),this.createRequest=e,mn(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=ra(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=Vf,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",ei);else if(typeof addEventListener=="function"){const t="onpagehide"in Ot?"pagehide":"unload";addEventListener(t,ei,!1)}}function ei(){for(let t in qt.requests)qt.requests.hasOwnProperty(t)&&qt.requests[t].abort()}const Ff=function(){const t=ia({xdomain:!1});return t&&t.responseType!==null}();class zf extends Uf{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=Ff&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new qt(ia,this.uri(),e)}}function ia(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Lf))return new XMLHttpRequest}catch{}if(!e)try{return new Ot[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const aa=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bf extends ys{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=aa?{}:ra(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;gs(n,this.supportsBinary,c=>{try{this.doWrite(n,c)}catch{}s&&pn(()=>{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]=na()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const Ln=Ot.WebSocket||Ot.MozWebSocket;class Hf extends Bf{createSocket(e,r,n){return aa?new Ln(e,r,n):r?new Ln(e,r):new Ln(e)}doWrite(e,r){this.ws.send(r)}}class Kf extends ys{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=kf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),s=Pf();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const c=()=>{n.read().then(({done:u,value:a})=>{u||(this.onPacket(a),c())}).catch(u=>{})};c();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).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&&pn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const xf={websocket:Hf,webtransport:Kf,polling:zf},Gf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Wf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Wn(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=Gf.exec(t||""),c={},i=14;for(;i--;)c[Wf[i]]=s[i]||"";return r!=-1&&n!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=Jf(c,c.path),c.queryKey=Qf(c,c.query),c}function Jf(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 Qf(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,c){s&&(r[s]=c)}),r}const Jn=typeof addEventListener=="function"&&typeof removeEventListener=="function",Vr=[];Jn&&addEventListener("offline",()=>{Vr.forEach(t=>t())},!1);class Qt extends ct{constructor(e,r){if(super(),this.binaryType=Nf,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=Wn(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=Wn(r.host).host);mn(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=Mf(this.opts.query)),Jn&&(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"})},Vr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=ta,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&&Qt.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",Qt.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+=Cf(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,pn(()=>{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 c={type:e,data:r,options:n};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),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(Qt.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(),Jn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Vr.indexOf(this._offlineEventListener);n!==-1&&Vr.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Qt.protocol=ta;class Xf extends Qt{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;Qt.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;Qt.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(l(),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 c(){n||(n=!0,l(),r.close(),r=null)}const i=d=>{const w=new Error("probe error: "+d);w.transport=r.name,c(),this.emitReserved("upgradeError",w)};function u(){i("transport closed")}function a(){i("socket closed")}function f(d){r&&d.name!==r.name&&c()}const l=()=>{r.removeListener("open",s),r.removeListener("error",i),r.removeListener("close",u),this.off("close",a),this.off("upgrading",f)};r.once("open",s),r.once("error",i),r.once("close",u),this.once("close",a),this.once("upgrading",f),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 Yf=class extends Xf{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=>xf[s]).filter(s=>!!s)),super(e,n)}};function Zf(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=Wn(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const c=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port+e,n.href=n.protocol+"://"+c+(r&&r.port===n.port?"":":"+n.port),n}const ed=typeof ArrayBuffer=="function",td=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,oa=Object.prototype.toString,rd=typeof Blob=="function"||typeof Blob<"u"&&oa.call(Blob)==="[object BlobConstructor]",nd=typeof File=="function"||typeof File<"u"&&oa.call(File)==="[object FileConstructor]";function _s(t){return ed&&(t instanceof ArrayBuffer||td(t))||rd&&t instanceof Blob||nd&&t instanceof File}function Ur(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Ur(t[r]))return!0;return!1}if(_s(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ur(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Ur(t[r]))return!0;return!1}function sd(t){const e=[],r=t.data,n=t;return n.data=Qn(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Qn(t,e){if(!t)return t;if(_s(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]=Qn(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]=Qn(t[n],e));return r}return t}function id(t,e){return t.data=Xn(t.data,e),delete t.attachments,t}function Xn(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]=Xn(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Xn(t[r],e));return t}const ad=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],od=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 cd{constructor(e){this.replacer=e}encode(e){return(e.type===De.EVENT||e.type===De.ACK)&&Ur(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=sd(e),n=this.encodeAsString(r.packet),s=r.buffers;return s.unshift(n),s}}function ti(t){return Object.prototype.toString.call(t)==="[object Object]"}class ws extends ct{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 ud(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(_s(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 c=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const i=e.substring(c,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(i)}if(e.charAt(r+1)==="/"){const c=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(c,r)}else n.nsp="/";const s=e.charAt(r+1);if(s!==""&&Number(s)==s){const c=r+1;for(;++r;){const i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(c,r+1))}if(e.charAt(++r)){const c=this.tryParse(e.substr(r));if(ws.isPayloadValid(n.type,c))n.data=c;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case De.CONNECT:return ti(r);case De.DISCONNECT:return r===void 0;case De.CONNECT_ERROR:return typeof r=="string"||ti(r);case De.EVENT:case De.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&ad.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 ud{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=id(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ld=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ws,Encoder:cd,get PacketType(){return De},protocol:od},Symbol.toStringTag,{value:"Module"}));function Rt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const fd=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ca extends ct{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,c;if(fd.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 i={type:De.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const l=this.ids++,d=r.pop();this._registerAckCallback(l,d),i.id=l}const u=(s=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||s===void 0?void 0:s.writable,a=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!u||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),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 c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let u=0;u<this.sendBuffer.length;u++)this.sendBuffer[u].id===e&&this.sendBuffer.splice(u,1);r.call(this,new Error("operation has timed out"))},s),i=(...u)=>{this.io.clearTimeoutFn(c),r.apply(this,u)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,s)=>{const c=(i,u)=>i?s(i):n(u);c.withError=!0,r.push(c),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...c)=>(this._queue[0],s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(s)):(this._queue.shift(),r&&r(null,...c)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type: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 ur(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}ur.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};ur.prototype.reset=function(){this.attempts=0};ur.prototype.setMin=function(t){this.ms=t};ur.prototype.setMax=function(t){this.max=t};ur.prototype.setJitter=function(t){this.jitter=t};class Yn extends ct{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,mn(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 ur({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||ld;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 Yf(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()}),c=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),e?e(u):this.maybeReconnectOnOpen()},i=Rt(r,"error",c);if(this._timeout!==!1){const u=this._timeout,a=this.setTimeoutFn(()=>{s(),c(new Error("timeout")),r.close()},u);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(s),this.subs.push(i),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){pn(()=>{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 ca(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 mr={};function Fr(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=Zf(t,e.path||"/socket.io"),n=r.source,s=r.id,c=r.path,i=mr[s]&&c in mr[s].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||i;let a;return u?a=new Yn(n,e):(mr[s]||(mr[s]=new Yn(n,e)),a=mr[s]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(Fr,{Manager:Yn,Socket:ca,io:Fr,connect:Fr});const Vn={},ri=cr(void 0);function Od(t){return[...t].sort((e,r)=>e.id==="dummy"||r.id==="dummy"?e.id===r.id?0:e.id==="dummy"?-1:1:e.id.localeCompare(r.id))}function dd(t=globalThis.location,e=Vn==null?void 0:Vn.VITE_SOCKETHUB_URL){if(typeof e=="string"&&e.trim()!=="")return e.trim();const r=t==null?void 0:t.origin;return r&&r!=="null"?r:void 0}function hd(t){return t instanceof Error?t.message:String(t)}let mt;const pd=cr(!1);async function ua(){if(!mt)throw new Error("Sockethub client is not initialized yet");await mt.ready()}async function Nd(t){return await ua(),mt.contextFor(t)}function Td(t){return{id:t.id,type:t.type,name:t.name??t.id}}async function Rd(t){return await ua(),console.log("sending ->",t),new Promise((e,r)=>{const n=On("SEND",t);mt.socket.emit("message",n,s=>{if(console.log("received <-",s),On("RESP",s),s.totalItems&&s.items)for(const c of s.items.reverse())On("RESP",c,!0,n.id);_i(s,!0),s.error?r(s.error):e(s)})})}function Un(t){return e=>{const r=t==="connect";pd.update(()=>r),console.log(`sockethub ${t} [connected: ${r}]`,e||"")}}function md(t){console.log("handle incoming: ",t),_i(t,!1)}async function gd(t){try{mt=await hn.connect(t,{io:Fr,initTimeoutMs:1e4})}catch(e){console.error("sockethub discovery failed",e),ri.set({state:"unavailable",reason:hd(e)});return}mt.descriptor&&mt.serverOrigin&&ri.set({state:"available",descriptor:mt.descriptor,serverOrigin:mt.serverOrigin}),mt.socket.on("connect",Un("connect")),mt.socket.on("error",Un("error")),mt.socket.on("disconnect",Un("disconnect")),mt.socket.on("message",md),mt.socket.on("schemas",e=>{console.log("schemas received:",e),Nn("schemas",e)}),mt.socket.on("ready",e=>{console.log("client ready:",e),Nn("ready",e)}),mt.socket.on("init_error",e=>{console.error("client init error:",e),Nn("init_error",e)})}const Fn=dd();Fn&&(console.log("connecting to sockethub via discovery at",Fn),gd(Fn));export{ct as E,Sd as I,Pd as L,qf as P,Yf as S,Hf as W,zf as X,Td as a,Ed as b,Nd as c,ua as d,Bn as e,mt as f,$r as g,or as h,di as i,ri as j,Od as k,gf as l,$d as m,pd as n,$o as o,_o as p,vo as q,ko as r,Rd as s,Wn as t,De as u,mn as v,ld as w,pn as x,od as y,Kf as z};