@m64/nats-agent-dashboard 0.1.0

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.
@@ -0,0 +1,108 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>NATS Agent Dashboard</title>
7
+ <script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function Jo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Rt={},Jr=[],ir=()=>{},wl=()=>!1,Ui=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Bi=e=>e.startsWith("onUpdate:"),hn=Object.assign,$o=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Df=Object.prototype.hasOwnProperty,wt=(e,t)=>Df.call(e,t),qe=Array.isArray,$r=e=>Zs(e)==="[object Map]",ji=e=>Zs(e)==="[object Set]",Ra=e=>Zs(e)==="[object Date]",$e=e=>typeof e=="function",$t=e=>typeof e=="string",Wn=e=>typeof e=="symbol",Ot=e=>e!==null&&typeof e=="object",xl=e=>(Ot(e)||$e(e))&&$e(e.then)&&$e(e.catch),Sl=Object.prototype.toString,Zs=e=>Sl.call(e),Uf=e=>Zs(e).slice(8,-1),Al=e=>Zs(e)==="[object Object]",Qo=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Us=Jo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Fi=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Bf=/-\w/g,Kn=Fi(e=>e.replace(Bf,t=>t.slice(1).toUpperCase())),jf=/\B([A-Z])/g,Hr=Fi(e=>e.replace(jf,"-$1").toLowerCase()),Tl=Fi(e=>e.charAt(0).toUpperCase()+e.slice(1)),ro=Fi(e=>e?`on${Tl(e)}`:""),sr=(e,t)=>!Object.is(e,t),li=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},kl=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},qi=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Na;const Hi=()=>Na||(Na=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ls(e){if(qe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=$t(s)?Kf(s):ls(s);if(r)for(const i in r)t[i]=r[i]}return t}else if($t(e)||Ot(e))return e}const Ff=/;(?![^(]*\))/g,qf=/:([^]+)/,Hf=/\/\*[^]*?\*\//g;function Kf(e){const t={};return e.replace(Hf,"").split(Ff).forEach(n=>{if(n){const s=n.split(qf);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Nn(e){let t="";if($t(e))t=e;else if(qe(e))for(let n=0;n<e.length;n++){const s=Nn(e[n]);s&&(t+=s+" ")}else if(Ot(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const zf="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Gf=Jo(zf);function Ol(e){return!!e||e===""}function Wf(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Js(e[s],t[s]);return n}function Js(e,t){if(e===t)return!0;let n=Ra(e),s=Ra(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Wn(e),s=Wn(t),n||s)return e===t;if(n=qe(e),s=qe(t),n||s)return n&&s?Wf(e,t):!1;if(n=Ot(e),s=Ot(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const c=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(c&&!l||!c&&l||!Js(e[o],t[o]))return!1}}return String(e)===String(t)}function Vf(e,t){return e.findIndex(n=>Js(n,t))}const Cl=e=>!!(e&&e.__v_isRef===!0),nt=e=>$t(e)?e:e==null?"":qe(e)||Ot(e)&&(e.toString===Sl||!$e(e.toString))?Cl(e)?nt(e.value):JSON.stringify(e,Pl,2):String(e),Pl=(e,t)=>Cl(t)?Pl(e,t.value):$r(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[so(s,i)+" =>"]=r,n),{})}:ji(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>so(n))}:Wn(t)?so(t):Ot(t)&&!qe(t)&&!Al(t)?String(t):t,so=(e,t="")=>{var n;return Wn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Tn;class Yf{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Tn,!t&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Tn;try{return Tn=this,t()}finally{Tn=n}}}on(){++this._on===1&&(this.prevScope=Tn,Tn=this)}off(){this._on>0&&--this._on===0&&(Tn=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Xf(){return Tn}let Mt;const io=new WeakSet;class Il{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Tn&&Tn.active&&Tn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,io.has(this)&&(io.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Nl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ma(this),Ml(this);const t=Mt,n=zn;Mt=this,zn=!0;try{return this.fn()}finally{Ll(this),Mt=t,zn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)na(t);this.deps=this.depsTail=void 0,Ma(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?io.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Lo(this)&&this.run()}get dirty(){return Lo(this)}}let Rl=0,Bs,js;function Nl(e,t=!1){if(e.flags|=8,t){e.next=js,js=e;return}e.next=Bs,Bs=e}function ea(){Rl++}function ta(){if(--Rl>0)return;if(js){let t=js;for(js=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Bs;){let t=Bs;for(Bs=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Ml(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ll(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),na(s),Zf(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Lo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Dl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Dl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ks)||(e.globalVersion=Ks,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Lo(e))))return;e.flags|=2;const t=e.dep,n=Mt,s=zn;Mt=e,zn=!0;try{Ml(e);const r=e.fn(e._value);(t.version===0||sr(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Mt=n,zn=s,Ll(e),e.flags&=-3}}function na(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)na(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Zf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let zn=!0;const Ul=[];function vr(){Ul.push(zn),zn=!1}function Er(){const e=Ul.pop();zn=e===void 0?!0:e}function Ma(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Mt;Mt=void 0;try{t()}finally{Mt=n}}}let Ks=0;class Jf{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ra{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Mt||!zn||Mt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Mt)n=this.activeLink=new Jf(Mt,this),Mt.deps?(n.prevDep=Mt.depsTail,Mt.depsTail.nextDep=n,Mt.depsTail=n):Mt.deps=Mt.depsTail=n,Bl(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Mt.depsTail,n.nextDep=void 0,Mt.depsTail.nextDep=n,Mt.depsTail=n,Mt.deps===n&&(Mt.deps=s)}return n}trigger(t){this.version++,Ks++,this.notify(t)}notify(t){ea();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ta()}}}function Bl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Bl(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Do=new WeakMap,jr=Symbol(""),Uo=Symbol(""),zs=Symbol("");function un(e,t,n){if(zn&&Mt){let s=Do.get(e);s||Do.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new ra),r.map=s,r.key=n),r.track()}}function br(e,t,n,s,r,i){const o=Do.get(e);if(!o){Ks++;return}const c=l=>{l&&l.trigger()};if(ea(),t==="clear")o.forEach(c);else{const l=qe(e),d=l&&Qo(n);if(l&&n==="length"){const u=Number(s);o.forEach((h,f)=>{(f==="length"||f===zs||!Wn(f)&&f>=u)&&c(h)})}else switch((n!==void 0||o.has(void 0))&&c(o.get(n)),d&&c(o.get(zs)),t){case"add":l?d&&c(o.get("length")):(c(o.get(jr)),$r(e)&&c(o.get(Uo)));break;case"delete":l||(c(o.get(jr)),$r(e)&&c(o.get(Uo)));break;case"set":$r(e)&&c(o.get(jr));break}}ta()}function Wr(e){const t=Et(e);return t===e?t:(un(t,"iterate",zs),Rn(e)?t:t.map(Vn))}function Ki(e){return un(e=Et(e),"iterate",zs),e}function nr(e,t){return wr(e)?ss(Fr(e)?Vn(t):t):Vn(t)}const $f={__proto__:null,[Symbol.iterator](){return oo(this,Symbol.iterator,e=>nr(this,e))},concat(...e){return Wr(this).concat(...e.map(t=>qe(t)?Wr(t):t))},entries(){return oo(this,"entries",e=>(e[1]=nr(this,e[1]),e))},every(e,t){return fr(this,"every",e,t,void 0,arguments)},filter(e,t){return fr(this,"filter",e,t,n=>n.map(s=>nr(this,s)),arguments)},find(e,t){return fr(this,"find",e,t,n=>nr(this,n),arguments)},findIndex(e,t){return fr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return fr(this,"findLast",e,t,n=>nr(this,n),arguments)},findLastIndex(e,t){return fr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return fr(this,"forEach",e,t,void 0,arguments)},includes(...e){return ao(this,"includes",e)},indexOf(...e){return ao(this,"indexOf",e)},join(e){return Wr(this).join(e)},lastIndexOf(...e){return ao(this,"lastIndexOf",e)},map(e,t){return fr(this,"map",e,t,void 0,arguments)},pop(){return ds(this,"pop")},push(...e){return ds(this,"push",e)},reduce(e,...t){return La(this,"reduce",e,t)},reduceRight(e,...t){return La(this,"reduceRight",e,t)},shift(){return ds(this,"shift")},some(e,t){return fr(this,"some",e,t,void 0,arguments)},splice(...e){return ds(this,"splice",e)},toReversed(){return Wr(this).toReversed()},toSorted(e){return Wr(this).toSorted(e)},toSpliced(...e){return Wr(this).toSpliced(...e)},unshift(...e){return ds(this,"unshift",e)},values(){return oo(this,"values",e=>nr(this,e))}};function oo(e,t,n){const s=Ki(e),r=s[t]();return s!==e&&!Rn(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Qf=Array.prototype;function fr(e,t,n,s,r,i){const o=Ki(e),c=o!==e&&!Rn(e),l=o[t];if(l!==Qf[t]){const h=l.apply(e,i);return c?Vn(h):h}let d=n;o!==e&&(c?d=function(h,f){return n.call(this,nr(e,h),f,e)}:n.length>2&&(d=function(h,f){return n.call(this,h,f,e)}));const u=l.call(o,d,s);return c&&r?r(u):u}function La(e,t,n,s){const r=Ki(e),i=r!==e&&!Rn(e);let o=n,c=!1;r!==e&&(i?(c=s.length===0,o=function(d,u,h){return c&&(c=!1,d=nr(e,d)),n.call(this,d,nr(e,u),h,e)}):n.length>3&&(o=function(d,u,h){return n.call(this,d,u,h,e)}));const l=r[t](o,...s);return c?nr(e,l):l}function ao(e,t,n){const s=Et(e);un(s,"iterate",zs);const r=s[t](...n);return(r===-1||r===!1)&&oa(n[0])?(n[0]=Et(n[0]),s[t](...n)):r}function ds(e,t,n=[]){vr(),ea();const s=Et(e)[t].apply(e,n);return ta(),Er(),s}const ed=Jo("__proto__,__v_isRef,__isVue"),jl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Wn));function td(e){Wn(e)||(e=String(e));const t=Et(this);return un(t,"has",e),t.hasOwnProperty(e)}class Fl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?fd:zl:i?Kl:Hl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=qe(t);if(!r){let l;if(o&&(l=$f[n]))return l;if(n==="hasOwnProperty")return td}const c=Reflect.get(t,n,dn(t)?t:s);if((Wn(n)?jl.has(n):ed(n))||(r||un(t,"get",n),i))return c;if(dn(c)){const l=o&&Qo(n)?c:c.value;return r&&Ot(l)?jo(l):l}return Ot(c)?r?jo(c):nn(c):c}}class ql extends Fl{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=qe(t)&&Qo(n);if(!this._isShallow){const d=wr(i);if(!Rn(s)&&!wr(s)&&(i=Et(i),s=Et(s)),!o&&dn(i)&&!dn(s))return d||(i.value=s),!0}const c=o?Number(n)<t.length:wt(t,n),l=Reflect.set(t,n,s,dn(t)?t:r);return t===Et(r)&&(c?sr(s,i)&&br(t,"set",n,s):br(t,"add",n,s)),l}deleteProperty(t,n){const s=wt(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&br(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Wn(n)||!jl.has(n))&&un(t,"has",n),s}ownKeys(t){return un(t,"iterate",qe(t)?"length":jr),Reflect.ownKeys(t)}}class nd extends Fl{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const rd=new ql,sd=new nd,id=new ql(!0);const Bo=e=>e,ri=e=>Reflect.getPrototypeOf(e);function od(e,t,n){return function(...s){const r=this.__v_raw,i=Et(r),o=$r(i),c=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,d=r[e](...s),u=n?Bo:t?ss:Vn;return!t&&un(i,"iterate",l?Uo:jr),hn(Object.create(d),{next(){const{value:h,done:f}=d.next();return f?{value:h,done:f}:{value:c?[u(h[0]),u(h[1])]:u(h),done:f}}})}}function si(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ad(e,t){const n={get(r){const i=this.__v_raw,o=Et(i),c=Et(r);e||(sr(r,c)&&un(o,"get",r),un(o,"get",c));const{has:l}=ri(o),d=t?Bo:e?ss:Vn;if(l.call(o,r))return d(i.get(r));if(l.call(o,c))return d(i.get(c));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&un(Et(r),"iterate",jr),r.size},has(r){const i=this.__v_raw,o=Et(i),c=Et(r);return e||(sr(r,c)&&un(o,"has",r),un(o,"has",c)),r===c?i.has(r):i.has(r)||i.has(c)},forEach(r,i){const o=this,c=o.__v_raw,l=Et(c),d=t?Bo:e?ss:Vn;return!e&&un(l,"iterate",jr),c.forEach((u,h)=>r.call(i,d(u),d(h),o))}};return hn(n,e?{add:si("add"),set:si("set"),delete:si("delete"),clear:si("clear")}:{add(r){const i=Et(this),o=ri(i),c=Et(r),l=!t&&!Rn(r)&&!wr(r)?c:r;return o.has.call(i,l)||sr(r,l)&&o.has.call(i,r)||sr(c,l)&&o.has.call(i,c)||(i.add(l),br(i,"add",l,l)),this},set(r,i){!t&&!Rn(i)&&!wr(i)&&(i=Et(i));const o=Et(this),{has:c,get:l}=ri(o);let d=c.call(o,r);d||(r=Et(r),d=c.call(o,r));const u=l.call(o,r);return o.set(r,i),d?sr(i,u)&&br(o,"set",r,i):br(o,"add",r,i),this},delete(r){const i=Et(this),{has:o,get:c}=ri(i);let l=o.call(i,r);l||(r=Et(r),l=o.call(i,r)),c&&c.call(i,r);const d=i.delete(r);return l&&br(i,"delete",r,void 0),d},clear(){const r=Et(this),i=r.size!==0,o=r.clear();return i&&br(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=od(r,e,t)}),n}function sa(e,t){const n=ad(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(wt(n,r)&&r in s?n:s,r,i)}const cd={get:sa(!1,!1)},ld={get:sa(!1,!0)},ud={get:sa(!0,!1)};const Hl=new WeakMap,Kl=new WeakMap,zl=new WeakMap,fd=new WeakMap;function dd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hd(e){return e.__v_skip||!Object.isExtensible(e)?0:dd(Uf(e))}function nn(e){return wr(e)?e:ia(e,!1,rd,cd,Hl)}function pd(e){return ia(e,!1,id,ld,Kl)}function jo(e){return ia(e,!0,sd,ud,zl)}function ia(e,t,n,s,r){if(!Ot(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=hd(e);if(i===0)return e;const o=r.get(e);if(o)return o;const c=new Proxy(e,i===2?s:n);return r.set(e,c),c}function Fr(e){return wr(e)?Fr(e.__v_raw):!!(e&&e.__v_isReactive)}function wr(e){return!!(e&&e.__v_isReadonly)}function Rn(e){return!!(e&&e.__v_isShallow)}function oa(e){return e?!!e.__v_raw:!1}function Et(e){const t=e&&e.__v_raw;return t?Et(t):e}function gd(e){return!wt(e,"__v_skip")&&Object.isExtensible(e)&&kl(e,"__v_skip",!0),e}const Vn=e=>Ot(e)?nn(e):e,ss=e=>Ot(e)?jo(e):e;function dn(e){return e?e.__v_isRef===!0:!1}function on(e){return bd(e,!1)}function bd(e,t){return dn(e)?e:new md(e,t)}class md{constructor(t,n){this.dep=new ra,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Et(t),this._value=n?t:Vn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Rn(t)||wr(t);t=s?t:Et(t),sr(t,n)&&(this._rawValue=t,this._value=s?t:Vn(t),this.dep.trigger())}}function Kt(e){return dn(e)?e.value:e}const _d={get:(e,t,n)=>t==="__v_raw"?e:Kt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return dn(r)&&!dn(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Gl(e){return Fr(e)?e:new Proxy(e,_d)}class yd{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ra(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ks-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Mt!==this)return Nl(this,!0),!0}get value(){const t=this.dep.track();return Dl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function vd(e,t,n=!1){let s,r;return $e(e)?s=e:(s=e.get,r=e.set),new yd(s,r,n)}const ii={},vi=new WeakMap;let Dr;function Ed(e,t=!1,n=Dr){if(n){let s=vi.get(n);s||vi.set(n,s=[]),s.push(e)}}function wd(e,t,n=Rt){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:c,call:l}=n,d=A=>r?A:Rn(A)||r===!1||r===0?mr(A,1):mr(A);let u,h,f,g,b=!1,w=!1;if(dn(e)?(h=()=>e.value,b=Rn(e)):Fr(e)?(h=()=>d(e),b=!0):qe(e)?(w=!0,b=e.some(A=>Fr(A)||Rn(A)),h=()=>e.map(A=>{if(dn(A))return A.value;if(Fr(A))return d(A);if($e(A))return l?l(A,2):A()})):$e(e)?t?h=l?()=>l(e,2):e:h=()=>{if(f){vr();try{f()}finally{Er()}}const A=Dr;Dr=u;try{return l?l(e,3,[g]):e(g)}finally{Dr=A}}:h=ir,t&&r){const A=h,D=r===!0?1/0:r;h=()=>mr(A(),D)}const y=Xf(),x=()=>{u.stop(),y&&y.active&&$o(y.effects,u)};if(i&&t){const A=t;t=(...D)=>{A(...D),x()}}let T=w?new Array(e.length).fill(ii):ii;const L=A=>{if(!(!(u.flags&1)||!u.dirty&&!A))if(t){const D=u.run();if(r||b||(w?D.some((v,N)=>sr(v,T[N])):sr(D,T))){f&&f();const v=Dr;Dr=u;try{const N=[D,T===ii?void 0:w&&T[0]===ii?[]:T,g];T=D,l?l(t,3,N):t(...N)}finally{Dr=v}}}else u.run()};return c&&c(L),u=new Il(h),u.scheduler=o?()=>o(L,!1):L,g=A=>Ed(A,!1,u),f=u.onStop=()=>{const A=vi.get(u);if(A){if(l)l(A,4);else for(const D of A)D();vi.delete(u)}},t?s?L(!0):T=u.run():o?o(L.bind(null,!0),!0):u.run(),x.pause=u.pause.bind(u),x.resume=u.resume.bind(u),x.stop=x,x}function mr(e,t=1/0,n){if(t<=0||!Ot(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,dn(e))mr(e.value,t,n);else if(qe(e))for(let s=0;s<e.length;s++)mr(e[s],t,n);else if(ji(e)||$r(e))e.forEach(s=>{mr(s,t,n)});else if(Al(e)){for(const s in e)mr(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&mr(e[s],t,n)}return e}function $s(e,t,n,s){try{return s?e(...s):e()}catch(r){zi(r,t,n)}}function ar(e,t,n,s){if($e(e)){const r=$s(e,t,n,s);return r&&xl(r)&&r.catch(i=>{zi(i,t,n)}),r}if(qe(e)){const r=[];for(let i=0;i<e.length;i++)r.push(ar(e[i],t,n,s));return r}}function zi(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Rt;if(t){let c=t.parent;const l=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;c;){const u=c.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,l,d)===!1)return}c=c.parent}if(i){vr(),$s(i,null,10,[e,l,d]),Er();return}}xd(e,n,r,s,o)}function xd(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const mn=[];let tr=-1;const Qr=[];let Tr=null,Zr=0;const Wl=Promise.resolve();let Ei=null;function Gs(e){const t=Ei||Wl;return e?t.then(this?e.bind(this):e):t}function Sd(e){let t=tr+1,n=mn.length;for(;t<n;){const s=t+n>>>1,r=mn[s],i=Ws(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function aa(e){if(!(e.flags&1)){const t=Ws(e),n=mn[mn.length-1];!n||!(e.flags&2)&&t>=Ws(n)?mn.push(e):mn.splice(Sd(t),0,e),e.flags|=1,Vl()}}function Vl(){Ei||(Ei=Wl.then(Xl))}function Ad(e){qe(e)?Qr.push(...e):Tr&&e.id===-1?Tr.splice(Zr+1,0,e):e.flags&1||(Qr.push(e),e.flags|=1),Vl()}function Da(e,t,n=tr+1){for(;n<mn.length;n++){const s=mn[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;mn.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Yl(e){if(Qr.length){const t=[...new Set(Qr)].sort((n,s)=>Ws(n)-Ws(s));if(Qr.length=0,Tr){Tr.push(...t);return}for(Tr=t,Zr=0;Zr<Tr.length;Zr++){const n=Tr[Zr];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Tr=null,Zr=0}}const Ws=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Xl(e){try{for(tr=0;tr<mn.length;tr++){const t=mn[tr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),$s(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;tr<mn.length;tr++){const t=mn[tr];t&&(t.flags&=-2)}tr=-1,mn.length=0,Yl(),Ei=null,(mn.length||Qr.length)&&Xl()}}let fn=null,Zl=null;function wi(e){const t=fn;return fn=e,Zl=e&&e.type.__scopeId||null,t}function yn(e,t=fn,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Va(-1);const i=wi(t);let o;try{o=e(...r)}finally{wi(i),s._d&&Va(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function bn(e,t){if(fn===null)return e;const n=Yi(fn),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,c,l=Rt]=t[r];i&&($e(i)&&(i={mounted:i,updated:i}),i.deep&&mr(o),s.push({dir:i,instance:n,value:o,oldValue:void 0,arg:c,modifiers:l}))}return e}function Or(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const c=r[o];i&&(c.oldValue=i[o].value);let l=c.dir[s];l&&(vr(),ar(l,n,8,[e.el,c,e,t]),Er())}}function Td(e,t){if(_n){let n=_n.provides;const s=_n.parent&&_n.parent.provides;s===n&&(n=_n.provides=Object.create(s)),n[e]=t}}function ui(e,t,n=!1){const s=Sh();if(s||ns){let r=ns?ns._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&$e(t)?t.call(s&&s.proxy):t}}const kd=Symbol.for("v-scx"),Od=()=>ui(kd);function yr(e,t,n){return Jl(e,t,n)}function Jl(e,t,n=Rt){const{immediate:s,deep:r,flush:i,once:o}=n,c=hn({},n),l=t&&s||!t&&i!=="post";let d;if(Ys){if(i==="sync"){const g=Od();d=g.__watcherHandles||(g.__watcherHandles=[])}else if(!l){const g=()=>{};return g.stop=ir,g.resume=ir,g.pause=ir,g}}const u=_n;c.call=(g,b,w)=>ar(g,u,b,w);let h=!1;i==="post"?c.scheduler=g=>{An(g,u&&u.suspense)}:i!=="sync"&&(h=!0,c.scheduler=(g,b)=>{b?g():aa(g)}),c.augmentJob=g=>{t&&(g.flags|=4),h&&(g.flags|=2,u&&(g.id=u.uid,g.i=u))};const f=wd(e,t,c);return Ys&&(d?d.push(f):l&&f()),f}function Cd(e,t,n){const s=this.proxy,r=$t(e)?e.includes(".")?$l(s,e):()=>s[e]:e.bind(s,s);let i;$e(t)?i=t:(i=t.handler,n=t);const o=ei(this),c=Jl(r,i.bind(s),n);return o(),c}function $l(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const Pd=Symbol("_vte"),Id=e=>e.__isTeleport,Rd=Symbol("_leaveCb");function ca(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ca(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ql(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ua(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const xi=new WeakMap;function Fs(e,t,n,s,r=!1){if(qe(e)){e.forEach((w,y)=>Fs(w,t&&(qe(t)?t[y]:t),n,s,r));return}if(es(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Fs(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Yi(s.component):s.el,o=r?null:i,{i:c,r:l}=e,d=t&&t.r,u=c.refs===Rt?c.refs={}:c.refs,h=c.setupState,f=Et(h),g=h===Rt?wl:w=>Ua(u,w)?!1:wt(f,w),b=(w,y)=>!(y&&Ua(u,y));if(d!=null&&d!==l){if(Ba(t),$t(d))u[d]=null,g(d)&&(h[d]=null);else if(dn(d)){const w=t;b(d,w.k)&&(d.value=null),w.k&&(u[w.k]=null)}}if($e(l))$s(l,c,12,[o,u]);else{const w=$t(l),y=dn(l);if(w||y){const x=()=>{if(e.f){const T=w?g(l)?h[l]:u[l]:b()||!e.k?l.value:u[e.k];if(r)qe(T)&&$o(T,i);else if(qe(T))T.includes(i)||T.push(i);else if(w)u[l]=[i],g(l)&&(h[l]=u[l]);else{const L=[i];b(l,e.k)&&(l.value=L),e.k&&(u[e.k]=L)}}else w?(u[l]=o,g(l)&&(h[l]=o)):y&&(b(l,e.k)&&(l.value=o),e.k&&(u[e.k]=o))};if(o){const T=()=>{x(),xi.delete(e)};T.id=-1,xi.set(e,T),An(T,n)}else Ba(e),x()}}}function Ba(e){const t=xi.get(e);t&&(t.flags|=8,xi.delete(e))}Hi().requestIdleCallback;Hi().cancelIdleCallback;const es=e=>!!e.type.__asyncLoader,eu=e=>e.type.__isKeepAlive;function Nd(e,t){tu(e,"a",t)}function Md(e,t){tu(e,"da",t)}function tu(e,t,n=_n){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Gi(t,s,n),n){let r=n.parent;for(;r&&r.parent;)eu(r.parent.vnode)&&Ld(s,t,n,r),r=r.parent}}function Ld(e,t,n,s){const r=Gi(t,e,s,!0);nu(()=>{$o(s[t],r)},n)}function Gi(e,t,n=_n,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{vr();const c=ei(n),l=ar(t,n,e,o);return c(),Er(),l});return s?r.unshift(i):r.push(i),i}}const Sr=e=>(t,n=_n)=>{(!Ys||e==="sp")&&Gi(e,(...s)=>t(...s),n)},Dd=Sr("bm"),kr=Sr("m"),Ud=Sr("bu"),Bd=Sr("u"),Qs=Sr("bum"),nu=Sr("um"),jd=Sr("sp"),Fd=Sr("rtg"),qd=Sr("rtc");function Hd(e,t=_n){Gi("ec",e,t)}const Kd=Symbol.for("v-ndc");function or(e,t,n,s){let r;const i=n,o=qe(e);if(o||$t(e)){const c=o&&Fr(e);let l=!1,d=!1;c&&(l=!Rn(e),d=wr(e),e=Ki(e)),r=new Array(e.length);for(let u=0,h=e.length;u<h;u++)r[u]=t(l?d?ss(Vn(e[u])):Vn(e[u]):e[u],u,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let c=0;c<e;c++)r[c]=t(c+1,c,void 0,i)}else if(Ot(e))if(e[Symbol.iterator])r=Array.from(e,(c,l)=>t(c,l,void 0,i));else{const c=Object.keys(e);r=new Array(c.length);for(let l=0,d=c.length;l<d;l++){const u=c[l];r[l]=t(e[u],u,l,i)}}else r=[];return r}function ts(e,t,n={},s,r){if(fn.ce||fn.parent&&es(fn.parent)&&fn.parent.ce){const d=Object.keys(n).length>0;return t!=="default"&&(n.name=t),ie(),zt(Ut,null,[kt("slot",n,s&&s())],d?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),ie();const o=i&&ru(i(n)),c=n.key||o&&o.key,l=zt(Ut,{key:(c&&!Wn(c)?c:`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return i&&i._c&&(i._d=!0),l}function ru(e){return e.some(t=>fa(t)?!(t.type===xr||t.type===Ut&&!ru(t.children)):!0)?e:null}const Fo=e=>e?xu(e)?Yi(e):Fo(e.parent):null,qs=hn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Fo(e.parent),$root:e=>Fo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>iu(e),$forceUpdate:e=>e.f||(e.f=()=>{aa(e.update)}),$nextTick:e=>e.n||(e.n=Gs.bind(e.proxy)),$watch:e=>Cd.bind(e)}),co=(e,t)=>e!==Rt&&!e.__isScriptSetup&&wt(e,t),zd={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:c,appContext:l}=e;if(t[0]!=="$"){const f=o[t];if(f!==void 0)switch(f){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(co(s,t))return o[t]=1,s[t];if(r!==Rt&&wt(r,t))return o[t]=2,r[t];if(wt(i,t))return o[t]=3,i[t];if(n!==Rt&&wt(n,t))return o[t]=4,n[t];qo&&(o[t]=0)}}const d=qs[t];let u,h;if(d)return t==="$attrs"&&un(e.attrs,"get",""),d(e);if((u=c.__cssModules)&&(u=u[t]))return u;if(n!==Rt&&wt(n,t))return o[t]=4,n[t];if(h=l.config.globalProperties,wt(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return co(r,t)?(r[t]=n,!0):s!==Rt&&wt(s,t)?(s[t]=n,!0):wt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},c){let l;return!!(n[c]||e!==Rt&&c[0]!=="$"&&wt(e,c)||co(t,c)||wt(i,c)||wt(s,c)||wt(qs,c)||wt(r.config.globalProperties,c)||(l=o.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:wt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ja(e){return qe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let qo=!0;function Gd(e){const t=iu(e),n=e.proxy,s=e.ctx;qo=!1,t.beforeCreate&&Fa(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:c,provide:l,inject:d,created:u,beforeMount:h,mounted:f,beforeUpdate:g,updated:b,activated:w,deactivated:y,beforeDestroy:x,beforeUnmount:T,destroyed:L,unmounted:A,render:D,renderTracked:v,renderTriggered:N,errorCaptured:I,serverPrefetch:z,expose:ae,inheritAttrs:ke,components:Ye,directives:it,filters:Ie}=t;if(d&&Wd(d,s,null),o)for(const je in o){const me=o[je];$e(me)&&(s[je]=me.bind(n))}if(r){const je=r.call(n,n);Ot(je)&&(e.data=nn(je))}if(qo=!0,i)for(const je in i){const me=i[je],rt=$e(me)?me.bind(n,n):$e(me.get)?me.get.bind(n,n):ir,Bt=!$e(me)&&$e(me.set)?me.set.bind(n):ir,Xe=ct({get:rt,set:Bt});Object.defineProperty(s,je,{enumerable:!0,configurable:!0,get:()=>Xe.value,set:Ct=>Xe.value=Ct})}if(c)for(const je in c)su(c[je],s,n,je);if(l){const je=$e(l)?l.call(n):l;Reflect.ownKeys(je).forEach(me=>{Td(me,je[me])})}u&&Fa(u,e,"c");function We(je,me){qe(me)?me.forEach(rt=>je(rt.bind(n))):me&&je(me.bind(n))}if(We(Dd,h),We(kr,f),We(Ud,g),We(Bd,b),We(Nd,w),We(Md,y),We(Hd,I),We(qd,v),We(Fd,N),We(Qs,T),We(nu,A),We(jd,z),qe(ae))if(ae.length){const je=e.exposed||(e.exposed={});ae.forEach(me=>{Object.defineProperty(je,me,{get:()=>n[me],set:rt=>n[me]=rt,enumerable:!0})})}else e.exposed||(e.exposed={});D&&e.render===ir&&(e.render=D),ke!=null&&(e.inheritAttrs=ke),Ye&&(e.components=Ye),it&&(e.directives=it),z&&Ql(e)}function Wd(e,t,n=ir){qe(e)&&(e=Ho(e));for(const s in e){const r=e[s];let i;Ot(r)?"default"in r?i=ui(r.from||s,r.default,!0):i=ui(r.from||s):i=ui(r),dn(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Fa(e,t,n){ar(qe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function su(e,t,n,s){let r=s.includes(".")?$l(n,s):()=>n[s];if($t(e)){const i=t[e];$e(i)&&yr(r,i)}else if($e(e))yr(r,e.bind(n));else if(Ot(e))if(qe(e))e.forEach(i=>su(i,t,n,s));else{const i=$e(e.handler)?e.handler.bind(n):t[e.handler];$e(i)&&yr(r,i,e)}}function iu(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,c=i.get(t);let l;return c?l=c:!r.length&&!n&&!s?l=t:(l={},r.length&&r.forEach(d=>Si(l,d,o,!0)),Si(l,t,o)),Ot(t)&&i.set(t,l),l}function Si(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Si(e,i,n,!0),r&&r.forEach(o=>Si(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const c=Vd[o]||n&&n[o];e[o]=c?c(e[o],t[o]):t[o]}return e}const Vd={data:qa,props:Ha,emits:Ha,methods:Ls,computed:Ls,beforeCreate:gn,created:gn,beforeMount:gn,mounted:gn,beforeUpdate:gn,updated:gn,beforeDestroy:gn,beforeUnmount:gn,destroyed:gn,unmounted:gn,activated:gn,deactivated:gn,errorCaptured:gn,serverPrefetch:gn,components:Ls,directives:Ls,watch:Xd,provide:qa,inject:Yd};function qa(e,t){return t?e?function(){return hn($e(e)?e.call(this,this):e,$e(t)?t.call(this,this):t)}:t:e}function Yd(e,t){return Ls(Ho(e),Ho(t))}function Ho(e){if(qe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function gn(e,t){return e?[...new Set([].concat(e,t))]:t}function Ls(e,t){return e?hn(Object.create(null),e,t):t}function Ha(e,t){return e?qe(e)&&qe(t)?[...new Set([...e,...t])]:hn(Object.create(null),ja(e),ja(t??{})):t}function Xd(e,t){if(!e)return t;if(!t)return e;const n=hn(Object.create(null),e);for(const s in t)n[s]=gn(e[s],t[s]);return n}function ou(){return{app:null,config:{isNativeTag:wl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Zd=0;function Jd(e,t){return function(s,r=null){$e(s)||(s=hn({},s)),r!=null&&!Ot(r)&&(r=null);const i=ou(),o=new WeakSet,c=[];let l=!1;const d=i.app={_uid:Zd++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:Ph,get config(){return i.config},set config(u){},use(u,...h){return o.has(u)||(u&&$e(u.install)?(o.add(u),u.install(d,...h)):$e(u)&&(o.add(u),u(d,...h))),d},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),d},component(u,h){return h?(i.components[u]=h,d):i.components[u]},directive(u,h){return h?(i.directives[u]=h,d):i.directives[u]},mount(u,h,f){if(!l){const g=d._ceVNode||kt(s,r);return g.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),e(g,u,f),l=!0,d._container=u,u.__vue_app__=d,Yi(g.component)}},onUnmount(u){c.push(u)},unmount(){l&&(ar(c,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(u,h){return i.provides[u]=h,d},runWithContext(u){const h=ns;ns=d;try{return u()}finally{ns=h}}};return d}}let ns=null;const $d=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Kn(t)}Modifiers`]||e[`${Hr(t)}Modifiers`];function Qd(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Rt;let r=n;const i=t.startsWith("update:"),o=i&&$d(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>$t(u)?u.trim():u)),o.number&&(r=n.map(qi)));let c,l=s[c=ro(t)]||s[c=ro(Kn(t))];!l&&i&&(l=s[c=ro(Hr(t))]),l&&ar(l,e,6,r);const d=s[c+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,ar(d,e,6,r)}}const eh=new WeakMap;function au(e,t,n=!1){const s=n?eh:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},c=!1;if(!$e(e)){const l=d=>{const u=au(d,t,!0);u&&(c=!0,hn(o,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!c?(Ot(e)&&s.set(e,null),null):(qe(i)?i.forEach(l=>o[l]=null):hn(o,i),Ot(e)&&s.set(e,o),o)}function Wi(e,t){return!e||!Ui(t)?!1:(t=t.slice(2).replace(/Once$/,""),wt(e,t[0].toLowerCase()+t.slice(1))||wt(e,Hr(t))||wt(e,t))}function Ka(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:c,emit:l,render:d,renderCache:u,props:h,data:f,setupState:g,ctx:b,inheritAttrs:w}=e,y=wi(e);let x,T;try{if(n.shapeFlag&4){const A=r||s,D=A;x=rr(d.call(D,A,u,h,g,f,b)),T=c}else{const A=t;x=rr(A.length>1?A(h,{attrs:c,slots:o,emit:l}):A(h,null)),T=t.props?c:th(c)}}catch(A){Hs.length=0,zi(A,e,1),x=kt(xr)}let L=x;if(T&&w!==!1){const A=Object.keys(T),{shapeFlag:D}=L;A.length&&D&7&&(i&&A.some(Bi)&&(T=nh(T,i)),L=is(L,T,!1,!0))}return n.dirs&&(L=is(L,null,!1,!0),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition&&ca(L,n.transition),x=L,wi(y),x}const th=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ui(n))&&((t||(t={}))[n]=e[n]);return t},nh=(e,t)=>{const n={};for(const s in e)(!Bi(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function rh(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:c,patchFlag:l}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?za(s,o,d):!!o;if(l&8){const u=t.dynamicProps;for(let h=0;h<u.length;h++){const f=u[h];if(cu(o,s,f)&&!Wi(d,f))return!0}}}else return(r||c)&&(!c||!c.$stable)?!0:s===o?!1:s?o?za(s,o,d):!0:!!o;return!1}function za(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(cu(t,e,i)&&!Wi(n,i))return!0}return!1}function cu(e,t,n){const s=e[n],r=t[n];return n==="style"&&Ot(s)&&Ot(r)?!Js(s,r):s!==r}function sh({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const lu={},uu=()=>Object.create(lu),fu=e=>Object.getPrototypeOf(e)===lu;function ih(e,t,n,s=!1){const r={},i=uu();e.propsDefaults=Object.create(null),du(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:pd(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function oh(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,c=Et(r),[l]=e.propsOptions;let d=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let h=0;h<u.length;h++){let f=u[h];if(Wi(e.emitsOptions,f))continue;const g=t[f];if(l)if(wt(i,f))g!==i[f]&&(i[f]=g,d=!0);else{const b=Kn(f);r[b]=Ko(l,c,b,g,e,!1)}else g!==i[f]&&(i[f]=g,d=!0)}}}else{du(e,t,r,i)&&(d=!0);let u;for(const h in c)(!t||!wt(t,h)&&((u=Hr(h))===h||!wt(t,u)))&&(l?n&&(n[h]!==void 0||n[u]!==void 0)&&(r[h]=Ko(l,c,h,void 0,e,!0)):delete r[h]);if(i!==c)for(const h in i)(!t||!wt(t,h))&&(delete i[h],d=!0)}d&&br(e.attrs,"set","")}function du(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,c;if(t)for(let l in t){if(Us(l))continue;const d=t[l];let u;r&&wt(r,u=Kn(l))?!i||!i.includes(u)?n[u]=d:(c||(c={}))[u]=d:Wi(e.emitsOptions,l)||(!(l in s)||d!==s[l])&&(s[l]=d,o=!0)}if(i){const l=Et(n),d=c||Rt;for(let u=0;u<i.length;u++){const h=i[u];n[h]=Ko(r,l,h,d[h],e,!wt(d,h))}}return o}function Ko(e,t,n,s,r,i){const o=e[n];if(o!=null){const c=wt(o,"default");if(c&&s===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&$e(l)){const{propsDefaults:d}=r;if(n in d)s=d[n];else{const u=ei(r);s=d[n]=l.call(null,t),u()}}else s=l;r.ce&&r.ce._setProp(n,s)}o[0]&&(i&&!c?s=!1:o[1]&&(s===""||s===Hr(n))&&(s=!0))}return s}const ah=new WeakMap;function hu(e,t,n=!1){const s=n?ah:t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},c=[];let l=!1;if(!$e(e)){const u=h=>{l=!0;const[f,g]=hu(h,t,!0);hn(o,f),g&&c.push(...g)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return Ot(e)&&s.set(e,Jr),Jr;if(qe(i))for(let u=0;u<i.length;u++){const h=Kn(i[u]);Ga(h)&&(o[h]=Rt)}else if(i)for(const u in i){const h=Kn(u);if(Ga(h)){const f=i[u],g=o[h]=qe(f)||$e(f)?{type:f}:hn({},f),b=g.type;let w=!1,y=!0;if(qe(b))for(let x=0;x<b.length;++x){const T=b[x],L=$e(T)&&T.name;if(L==="Boolean"){w=!0;break}else L==="String"&&(y=!1)}else w=$e(b)&&b.name==="Boolean";g[0]=w,g[1]=y,(w||wt(g,"default"))&&c.push(h)}}const d=[o,c];return Ot(e)&&s.set(e,d),d}function Ga(e){return e[0]!=="$"&&!Us(e)}const la=e=>e==="_"||e==="_ctx"||e==="$stable",ua=e=>qe(e)?e.map(rr):[rr(e)],ch=(e,t,n)=>{if(t._n)return t;const s=yn((...r)=>ua(t(...r)),n);return s._c=!1,s},pu=(e,t,n)=>{const s=e._ctx;for(const r in e){if(la(r))continue;const i=e[r];if($e(i))t[r]=ch(r,i,s);else if(i!=null){const o=ua(i);t[r]=()=>o}}},gu=(e,t)=>{const n=ua(t);e.slots.default=()=>n},bu=(e,t,n)=>{for(const s in t)(n||!la(s))&&(e[s]=t[s])},lh=(e,t,n)=>{const s=e.slots=uu();if(e.vnode.shapeFlag&32){const r=t._;r?(bu(s,t,n),n&&kl(s,"_",r,!0)):pu(t,s)}else t&&gu(e,t)},uh=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=Rt;if(s.shapeFlag&32){const c=t._;c?n&&c===1?i=!1:bu(r,t,n):(i=!t.$stable,pu(t,r)),o=t}else t&&(gu(e,t),o={default:1});if(i)for(const c in r)!la(c)&&o[c]==null&&delete r[c]},An=gh;function fh(e){return dh(e)}function dh(e,t){const n=Hi();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:c,createComment:l,setText:d,setElementText:u,parentNode:h,nextSibling:f,setScopeId:g=ir,insertStaticContent:b}=e,w=(k,P,K,ee=null,$=null,te=null,ue=void 0,le=null,ce=!!P.dynamicChildren)=>{if(k===P)return;k&&!hs(k,P)&&(ee=xn(k),Ct(k,$,te,!0),k=null),P.patchFlag===-2&&(ce=!1,P.dynamicChildren=null);const{type:ne,ref:Re,shapeFlag:pe}=P;switch(ne){case Vi:y(k,P,K,ee);break;case xr:x(k,P,K,ee);break;case fi:k==null&&T(P,K,ee,ue);break;case Ut:Ye(k,P,K,ee,$,te,ue,le,ce);break;default:pe&1?D(k,P,K,ee,$,te,ue,le,ce):pe&6?it(k,P,K,ee,$,te,ue,le,ce):(pe&64||pe&128)&&ne.process(k,P,K,ee,$,te,ue,le,ce,Qt)}Re!=null&&$?Fs(Re,k&&k.ref,te,P||k,!P):Re==null&&k&&k.ref!=null&&Fs(k.ref,null,te,k,!0)},y=(k,P,K,ee)=>{if(k==null)s(P.el=c(P.children),K,ee);else{const $=P.el=k.el;P.children!==k.children&&d($,P.children)}},x=(k,P,K,ee)=>{k==null?s(P.el=l(P.children||""),K,ee):P.el=k.el},T=(k,P,K,ee)=>{[k.el,k.anchor]=b(k.children,P,K,ee,k.el,k.anchor)},L=({el:k,anchor:P},K,ee)=>{let $;for(;k&&k!==P;)$=f(k),s(k,K,ee),k=$;s(P,K,ee)},A=({el:k,anchor:P})=>{let K;for(;k&&k!==P;)K=f(k),r(k),k=K;r(P)},D=(k,P,K,ee,$,te,ue,le,ce)=>{if(P.type==="svg"?ue="svg":P.type==="math"&&(ue="mathml"),k==null)v(P,K,ee,$,te,ue,le,ce);else{const ne=k.el&&k.el._isVueCE?k.el:null;try{ne&&ne._beginPatch(),z(k,P,$,te,ue,le,ce)}finally{ne&&ne._endPatch()}}},v=(k,P,K,ee,$,te,ue,le)=>{let ce,ne;const{props:Re,shapeFlag:pe,transition:we,dirs:Ne}=k;if(ce=k.el=o(k.type,te,Re&&Re.is,Re),pe&8?u(ce,k.children):pe&16&&I(k.children,ce,null,ee,$,lo(k,te),ue,le),Ne&&Or(k,null,ee,"created"),N(ce,k,k.scopeId,ue,ee),Re){for(const Be in Re)Be!=="value"&&!Us(Be)&&i(ce,Be,null,Re[Be],te,ee);"value"in Re&&i(ce,"value",null,Re.value,te),(ne=Re.onVnodeBeforeMount)&&Zn(ne,ee,k)}Ne&&Or(k,null,ee,"beforeMount");const Ue=hh($,we);Ue&&we.beforeEnter(ce),s(ce,P,K),((ne=Re&&Re.onVnodeMounted)||Ue||Ne)&&An(()=>{ne&&Zn(ne,ee,k),Ue&&we.enter(ce),Ne&&Or(k,null,ee,"mounted")},$)},N=(k,P,K,ee,$)=>{if(K&&g(k,K),ee)for(let te=0;te<ee.length;te++)g(k,ee[te]);if($){let te=$.subTree;if(P===te||vu(te.type)&&(te.ssContent===P||te.ssFallback===P)){const ue=$.vnode;N(k,ue,ue.scopeId,ue.slotScopeIds,$.parent)}}},I=(k,P,K,ee,$,te,ue,le,ce=0)=>{for(let ne=ce;ne<k.length;ne++){const Re=k[ne]=le?gr(k[ne]):rr(k[ne]);w(null,Re,P,K,ee,$,te,ue,le)}},z=(k,P,K,ee,$,te,ue)=>{const le=P.el=k.el;let{patchFlag:ce,dynamicChildren:ne,dirs:Re}=P;ce|=k.patchFlag&16;const pe=k.props||Rt,we=P.props||Rt;let Ne;if(K&&Cr(K,!1),(Ne=we.onVnodeBeforeUpdate)&&Zn(Ne,K,P,k),Re&&Or(P,k,K,"beforeUpdate"),K&&Cr(K,!0),(pe.innerHTML&&we.innerHTML==null||pe.textContent&&we.textContent==null)&&u(le,""),ne?ae(k.dynamicChildren,ne,le,K,ee,lo(P,$),te):ue||me(k,P,le,null,K,ee,lo(P,$),te,!1),ce>0){if(ce&16)ke(le,pe,we,K,$);else if(ce&2&&pe.class!==we.class&&i(le,"class",null,we.class,$),ce&4&&i(le,"style",pe.style,we.style,$),ce&8){const Ue=P.dynamicProps;for(let Be=0;Be<Ue.length;Be++){const lt=Ue[Be],Tt=pe[lt],jt=we[lt];(jt!==Tt||lt==="value")&&i(le,lt,Tt,jt,$,K)}}ce&1&&k.children!==P.children&&u(le,P.children)}else!ue&&ne==null&&ke(le,pe,we,K,$);((Ne=we.onVnodeUpdated)||Re)&&An(()=>{Ne&&Zn(Ne,K,P,k),Re&&Or(P,k,K,"updated")},ee)},ae=(k,P,K,ee,$,te,ue)=>{for(let le=0;le<P.length;le++){const ce=k[le],ne=P[le],Re=ce.el&&(ce.type===Ut||!hs(ce,ne)||ce.shapeFlag&198)?h(ce.el):K;w(ce,ne,Re,null,ee,$,te,ue,!0)}},ke=(k,P,K,ee,$)=>{if(P!==K){if(P!==Rt)for(const te in P)!Us(te)&&!(te in K)&&i(k,te,P[te],null,$,ee);for(const te in K){if(Us(te))continue;const ue=K[te],le=P[te];ue!==le&&te!=="value"&&i(k,te,le,ue,$,ee)}"value"in K&&i(k,"value",P.value,K.value,$)}},Ye=(k,P,K,ee,$,te,ue,le,ce)=>{const ne=P.el=k?k.el:c(""),Re=P.anchor=k?k.anchor:c("");let{patchFlag:pe,dynamicChildren:we,slotScopeIds:Ne}=P;Ne&&(le=le?le.concat(Ne):Ne),k==null?(s(ne,K,ee),s(Re,K,ee),I(P.children||[],K,Re,$,te,ue,le,ce)):pe>0&&pe&64&&we&&k.dynamicChildren&&k.dynamicChildren.length===we.length?(ae(k.dynamicChildren,we,K,$,te,ue,le),(P.key!=null||$&&P===$.subTree)&&mu(k,P,!0)):me(k,P,K,Re,$,te,ue,le,ce)},it=(k,P,K,ee,$,te,ue,le,ce)=>{P.slotScopeIds=le,k==null?P.shapeFlag&512?$.ctx.activate(P,K,ee,ue,ce):Ie(P,K,ee,$,te,ue,ce):mt(k,P,ce)},Ie=(k,P,K,ee,$,te,ue)=>{const le=k.component=xh(k,ee,$);if(eu(k)&&(le.ctx.renderer=Qt),Ah(le,!1,ue),le.asyncDep){if($&&$.registerDep(le,We,ue),!k.el){const ce=le.subTree=kt(xr);x(null,ce,P,K),k.placeholder=ce.el}}else We(le,k,P,K,$,te,ue)},mt=(k,P,K)=>{const ee=P.component=k.component;if(rh(k,P,K))if(ee.asyncDep&&!ee.asyncResolved){je(ee,P,K);return}else ee.next=P,ee.update();else P.el=k.el,ee.vnode=P},We=(k,P,K,ee,$,te,ue)=>{const le=()=>{if(k.isMounted){let{next:pe,bu:we,u:Ne,parent:Ue,vnode:Be}=k;{const en=_u(k);if(en){pe&&(pe.el=Be.el,je(k,pe,ue)),en.asyncDep.then(()=>{An(()=>{k.isUnmounted||ne()},$)});return}}let lt=pe,Tt;Cr(k,!1),pe?(pe.el=Be.el,je(k,pe,ue)):pe=Be,we&&li(we),(Tt=pe.props&&pe.props.onVnodeBeforeUpdate)&&Zn(Tt,Ue,pe,Be),Cr(k,!0);const jt=Ka(k),Xt=k.subTree;k.subTree=jt,w(Xt,jt,h(Xt.el),xn(Xt),k,$,te),pe.el=jt.el,lt===null&&sh(k,jt.el),Ne&&An(Ne,$),(Tt=pe.props&&pe.props.onVnodeUpdated)&&An(()=>Zn(Tt,Ue,pe,Be),$)}else{let pe;const{el:we,props:Ne}=P,{bm:Ue,m:Be,parent:lt,root:Tt,type:jt}=k,Xt=es(P);Cr(k,!1),Ue&&li(Ue),!Xt&&(pe=Ne&&Ne.onVnodeBeforeMount)&&Zn(pe,lt,P),Cr(k,!0);{Tt.ce&&Tt.ce._hasShadowRoot()&&Tt.ce._injectChildStyle(jt,k.parent?k.parent.type:void 0);const en=k.subTree=Ka(k);w(null,en,K,ee,k,$,te),P.el=en.el}if(Be&&An(Be,$),!Xt&&(pe=Ne&&Ne.onVnodeMounted)){const en=P;An(()=>Zn(pe,lt,en),$)}(P.shapeFlag&256||lt&&es(lt.vnode)&&lt.vnode.shapeFlag&256)&&k.a&&An(k.a,$),k.isMounted=!0,P=K=ee=null}};k.scope.on();const ce=k.effect=new Il(le);k.scope.off();const ne=k.update=ce.run.bind(ce),Re=k.job=ce.runIfDirty.bind(ce);Re.i=k,Re.id=k.uid,ce.scheduler=()=>aa(Re),Cr(k,!0),ne()},je=(k,P,K)=>{P.component=k;const ee=k.vnode.props;k.vnode=P,k.next=null,oh(k,P.props,ee,K),uh(k,P.children,K),vr(),Da(k),Er()},me=(k,P,K,ee,$,te,ue,le,ce=!1)=>{const ne=k&&k.children,Re=k?k.shapeFlag:0,pe=P.children,{patchFlag:we,shapeFlag:Ne}=P;if(we>0){if(we&128){Bt(ne,pe,K,ee,$,te,ue,le,ce);return}else if(we&256){rt(ne,pe,K,ee,$,te,ue,le,ce);return}}Ne&8?(Re&16&&Nt(ne,$,te),pe!==ne&&u(K,pe)):Re&16?Ne&16?Bt(ne,pe,K,ee,$,te,ue,le,ce):Nt(ne,$,te,!0):(Re&8&&u(K,""),Ne&16&&I(pe,K,ee,$,te,ue,le,ce))},rt=(k,P,K,ee,$,te,ue,le,ce)=>{k=k||Jr,P=P||Jr;const ne=k.length,Re=P.length,pe=Math.min(ne,Re);let we;for(we=0;we<pe;we++){const Ne=P[we]=ce?gr(P[we]):rr(P[we]);w(k[we],Ne,K,null,$,te,ue,le,ce)}ne>Re?Nt(k,$,te,!0,!1,pe):I(P,K,ee,$,te,ue,le,ce,pe)},Bt=(k,P,K,ee,$,te,ue,le,ce)=>{let ne=0;const Re=P.length;let pe=k.length-1,we=Re-1;for(;ne<=pe&&ne<=we;){const Ne=k[ne],Ue=P[ne]=ce?gr(P[ne]):rr(P[ne]);if(hs(Ne,Ue))w(Ne,Ue,K,null,$,te,ue,le,ce);else break;ne++}for(;ne<=pe&&ne<=we;){const Ne=k[pe],Ue=P[we]=ce?gr(P[we]):rr(P[we]);if(hs(Ne,Ue))w(Ne,Ue,K,null,$,te,ue,le,ce);else break;pe--,we--}if(ne>pe){if(ne<=we){const Ne=we+1,Ue=Ne<Re?P[Ne].el:ee;for(;ne<=we;)w(null,P[ne]=ce?gr(P[ne]):rr(P[ne]),K,Ue,$,te,ue,le,ce),ne++}}else if(ne>we)for(;ne<=pe;)Ct(k[ne],$,te,!0),ne++;else{const Ne=ne,Ue=ne,Be=new Map;for(ne=Ue;ne<=we;ne++){const _t=P[ne]=ce?gr(P[ne]):rr(P[ne]);_t.key!=null&&Be.set(_t.key,ne)}let lt,Tt=0;const jt=we-Ue+1;let Xt=!1,en=0;const sn=new Array(jt);for(ne=0;ne<jt;ne++)sn[ne]=0;for(ne=Ne;ne<=pe;ne++){const _t=k[ne];if(Tt>=jt){Ct(_t,$,te,!0);continue}let Lt;if(_t.key!=null)Lt=Be.get(_t.key);else for(lt=Ue;lt<=we;lt++)if(sn[lt-Ue]===0&&hs(_t,P[lt])){Lt=lt;break}Lt===void 0?Ct(_t,$,te,!0):(sn[Lt-Ue]=ne+1,Lt>=en?en=Lt:Xt=!0,w(_t,P[Lt],K,null,$,te,ue,le,ce),Tt++)}const an=Xt?ph(sn):Jr;for(lt=an.length-1,ne=jt-1;ne>=0;ne--){const _t=Ue+ne,Lt=P[_t],On=P[_t+1],cn=_t+1<Re?On.el||yu(On):ee;sn[ne]===0?w(null,Lt,K,cn,$,te,ue,le,ce):Xt&&(lt<0||ne!==an[lt]?Xe(Lt,K,cn,2):lt--)}}},Xe=(k,P,K,ee,$=null)=>{const{el:te,type:ue,transition:le,children:ce,shapeFlag:ne}=k;if(ne&6){Xe(k.component.subTree,P,K,ee);return}if(ne&128){k.suspense.move(P,K,ee);return}if(ne&64){ue.move(k,P,K,Qt);return}if(ue===Ut){s(te,P,K);for(let pe=0;pe<ce.length;pe++)Xe(ce[pe],P,K,ee);s(k.anchor,P,K);return}if(ue===fi){L(k,P,K);return}if(ee!==2&&ne&1&&le)if(ee===0)le.beforeEnter(te),s(te,P,K),An(()=>le.enter(te),$);else{const{leave:pe,delayLeave:we,afterLeave:Ne}=le,Ue=()=>{k.ctx.isUnmounted?r(te):s(te,P,K)},Be=()=>{te._isLeaving&&te[Rd](!0),pe(te,()=>{Ue(),Ne&&Ne()})};we?we(te,Ue,Be):Be()}else s(te,P,K)},Ct=(k,P,K,ee=!1,$=!1)=>{const{type:te,props:ue,ref:le,children:ce,dynamicChildren:ne,shapeFlag:Re,patchFlag:pe,dirs:we,cacheIndex:Ne,memo:Ue}=k;if(pe===-2&&($=!1),le!=null&&(vr(),Fs(le,null,K,k,!0),Er()),Ne!=null&&(P.renderCache[Ne]=void 0),Re&256){P.ctx.deactivate(k);return}const Be=Re&1&&we,lt=!es(k);let Tt;if(lt&&(Tt=ue&&ue.onVnodeBeforeUnmount)&&Zn(Tt,P,k),Re&6)Pe(k.component,K,ee);else{if(Re&128){k.suspense.unmount(K,ee);return}Be&&Or(k,null,P,"beforeUnmount"),Re&64?k.type.remove(k,P,K,Qt,ee):ne&&!ne.hasOnce&&(te!==Ut||pe>0&&pe&64)?Nt(ne,P,K,!1,!0):(te===Ut&&pe&384||!$&&Re&16)&&Nt(ce,P,K),ee&&Qe(k)}const jt=Ue!=null&&Ne==null;(lt&&(Tt=ue&&ue.onVnodeUnmounted)||Be||jt)&&An(()=>{Tt&&Zn(Tt,P,k),Be&&Or(k,null,P,"unmounted"),jt&&(k.el=null)},K)},Qe=k=>{const{type:P,el:K,anchor:ee,transition:$}=k;if(P===Ut){tn(K,ee);return}if(P===fi){A(k);return}const te=()=>{r(K),$&&!$.persisted&&$.afterLeave&&$.afterLeave()};if(k.shapeFlag&1&&$&&!$.persisted){const{leave:ue,delayLeave:le}=$,ce=()=>ue(K,te);le?le(k.el,te,ce):ce()}else te()},tn=(k,P)=>{let K;for(;k!==P;)K=f(k),r(k),k=K;r(P)},Pe=(k,P,K)=>{const{bum:ee,scope:$,job:te,subTree:ue,um:le,m:ce,a:ne}=k;Wa(ce),Wa(ne),ee&&li(ee),$.stop(),te&&(te.flags|=8,Ct(ue,k,P,K)),le&&An(le,P),An(()=>{k.isUnmounted=!0},P)},Nt=(k,P,K,ee=!1,$=!1,te=0)=>{for(let ue=te;ue<k.length;ue++)Ct(k[ue],P,K,ee,$)},xn=k=>{if(k.shapeFlag&6)return xn(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const P=f(k.anchor||k.el),K=P&&P[Pd];return K?f(K):P};let rn=!1;const Dn=(k,P,K)=>{let ee;k==null?P._vnode&&(Ct(P._vnode,null,null,!0),ee=P._vnode.component):w(P._vnode||null,k,P,null,null,null,K),P._vnode=k,rn||(rn=!0,Da(ee),Yl(),rn=!1)},Qt={p:w,um:Ct,m:Xe,r:Qe,mt:Ie,mc:I,pc:me,pbc:ae,n:xn,o:e};return{render:Dn,hydrate:void 0,createApp:Jd(Dn)}}function lo({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Cr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function hh(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function mu(e,t,n=!1){const s=e.children,r=t.children;if(qe(s)&&qe(r))for(let i=0;i<s.length;i++){const o=s[i];let c=r[i];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=r[i]=gr(r[i]),c.el=o.el),!n&&c.patchFlag!==-2&&mu(o,c)),c.type===Vi&&(c.patchFlag===-1&&(c=r[i]=gr(c)),c.el=o.el),c.type===xr&&!c.el&&(c.el=o.el)}}function ph(e){const t=e.slice(),n=[0];let s,r,i,o,c;const l=e.length;for(s=0;s<l;s++){const d=e[s];if(d!==0){if(r=n[n.length-1],e[r]<d){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)c=i+o>>1,e[n[c]]<d?i=c+1:o=c;d<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function _u(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:_u(t)}function Wa(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function yu(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?yu(t.subTree):null}const vu=e=>e.__isSuspense;function gh(e,t){t&&t.pendingBranch?qe(e)?t.effects.push(...e):t.effects.push(e):Ad(e)}const Ut=Symbol.for("v-fgt"),Vi=Symbol.for("v-txt"),xr=Symbol.for("v-cmt"),fi=Symbol.for("v-stc"),Hs=[];let In=null;function ie(e=!1){Hs.push(In=e?null:[])}function bh(){Hs.pop(),In=Hs[Hs.length-1]||null}let Vs=1;function Va(e,t=!1){Vs+=e,e<0&&In&&t&&(In.hasOnce=!0)}function Eu(e){return e.dynamicChildren=Vs>0?In||Jr:null,bh(),Vs>0&&In&&In.push(e),e}function be(e,t,n,s,r,i){return Eu(F(e,t,n,s,r,i,!0))}function zt(e,t,n,s,r){return Eu(kt(e,t,n,s,r,!0))}function fa(e){return e?e.__v_isVNode===!0:!1}function hs(e,t){return e.type===t.type&&e.key===t.key}const wu=({key:e})=>e??null,di=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?$t(e)||dn(e)||$e(e)?{i:fn,r:e,k:t,f:!!n}:e:null);function F(e,t=null,n=null,s=0,r=null,i=e===Ut?0:1,o=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&wu(t),ref:t&&di(t),scopeId:Zl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:fn};return c?(da(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=$t(n)?8:16),Vs>0&&!o&&In&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&In.push(l),l}const kt=mh;function mh(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Kd)&&(e=xr),fa(e)){const c=is(e,t,!0);return n&&da(c,n),Vs>0&&!i&&In&&(c.shapeFlag&6?In[In.indexOf(e)]=c:In.push(c)),c.patchFlag=-2,c}if(Ch(e)&&(e=e.__vccOpts),t){t=_h(t);let{class:c,style:l}=t;c&&!$t(c)&&(t.class=Nn(c)),Ot(l)&&(oa(l)&&!qe(l)&&(l=hn({},l)),t.style=ls(l))}const o=$t(e)?1:vu(e)?128:Id(e)?64:Ot(e)?4:$e(e)?2:0;return F(e,t,n,s,r,o,i,!0)}function _h(e){return e?oa(e)||fu(e)?hn({},e):e:null}function is(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:c,transition:l}=e,d=t?vh(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&wu(d),ref:t&&t.ref?n&&i?qe(i)?i.concat(di(t)):[i,di(t)]:di(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:c,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ut?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&is(e.ssContent),ssFallback:e.ssFallback&&is(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&ca(u,l.clone(u)),u}function pt(e=" ",t=0){return kt(Vi,null,e,t)}function yh(e,t){const n=kt(fi,null,e);return n.staticCount=t,n}function ft(e="",t=!1){return t?(ie(),zt(xr,null,e)):kt(xr,null,e)}function rr(e){return e==null||typeof e=="boolean"?kt(xr):qe(e)?kt(Ut,null,e.slice()):fa(e)?gr(e):kt(Vi,null,String(e))}function gr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:is(e)}function da(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(qe(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),da(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!fu(t)?t._ctx=fn:r===3&&fn&&(fn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $e(t)?(t={default:t,_ctx:fn},n=32):(t=String(t),s&64?(n=16,t=[pt(t)]):n=8);e.children=t,e.shapeFlag|=n}function vh(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=Nn([t.class,s.class]));else if(r==="style")t.style=ls([t.style,s.style]);else if(Ui(r)){const i=t[r],o=s[r];o&&i!==o&&!(qe(i)&&i.includes(o))?t[r]=i?[].concat(i,o):o:o==null&&i==null&&!Bi(r)&&(t[r]=o)}else r!==""&&(t[r]=s[r])}return t}function Zn(e,t,n,s=null){ar(e,t,7,[n,s])}const Eh=ou();let wh=0;function xh(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Eh,i={uid:wh++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Yf(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:hu(s,r),emitsOptions:au(s,r),emit:null,emitted:null,propsDefaults:Rt,inheritAttrs:s.inheritAttrs,ctx:Rt,data:Rt,props:Rt,attrs:Rt,slots:Rt,refs:Rt,setupState:Rt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Qd.bind(null,i),e.ce&&e.ce(i),i}let _n=null;const Sh=()=>_n||fn;let Ai,zo;{const e=Hi(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Ai=t("__VUE_INSTANCE_SETTERS__",n=>_n=n),zo=t("__VUE_SSR_SETTERS__",n=>Ys=n)}const ei=e=>{const t=_n;return Ai(e),e.scope.on(),()=>{e.scope.off(),Ai(t)}},Ya=()=>{_n&&_n.scope.off(),Ai(null)};function xu(e){return e.vnode.shapeFlag&4}let Ys=!1;function Ah(e,t=!1,n=!1){t&&zo(t);const{props:s,children:r}=e.vnode,i=xu(e);ih(e,s,i,t),lh(e,r,n||t);const o=i?Th(e,t):void 0;return t&&zo(!1),o}function Th(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,zd);const{setup:s}=n;if(s){vr();const r=e.setupContext=s.length>1?Oh(e):null,i=ei(e),o=$s(s,e,0,[e.props,r]),c=xl(o);if(Er(),i(),(c||e.sp)&&!es(e)&&Ql(e),c){if(o.then(Ya,Ya),t)return o.then(l=>{Xa(e,l)}).catch(l=>{zi(l,e,0)});e.asyncDep=o}else Xa(e,o)}else Su(e)}function Xa(e,t,n){$e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ot(t)&&(e.setupState=Gl(t)),Su(e)}function Su(e,t,n){const s=e.type;e.render||(e.render=s.render||ir);{const r=ei(e);vr();try{Gd(e)}finally{Er(),r()}}}const kh={get(e,t){return un(e,"get",""),e[t]}};function Oh(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,kh),slots:e.slots,emit:e.emit,expose:t}}function Yi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Gl(gd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in qs)return qs[n](e)},has(t,n){return n in t||n in qs}})):e.proxy}function Ch(e){return $e(e)&&"__vccOpts"in e}const ct=(e,t)=>vd(e,t,Ys),Ph="3.5.32";let Go;const Za=typeof window<"u"&&window.trustedTypes;if(Za)try{Go=Za.createPolicy("vue",{createHTML:e=>e})}catch{}const Au=Go?e=>Go.createHTML(e):e=>e,Ih="http://www.w3.org/2000/svg",Rh="http://www.w3.org/1998/Math/MathML",pr=typeof document<"u"?document:null,Ja=pr&&pr.createElement("template"),Nh={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?pr.createElementNS(Ih,e):t==="mathml"?pr.createElementNS(Rh,e):n?pr.createElement(e,{is:n}):pr.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>pr.createTextNode(e),createComment:e=>pr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>pr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Ja.innerHTML=Au(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const c=Ja.content;if(s==="svg"||s==="mathml"){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Mh=Symbol("_vtc");function Lh(e,t,n){const s=e[Mh];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const $a=Symbol("_vod"),Dh=Symbol("_vsh"),Uh=Symbol(""),Bh=/(?:^|;)\s*display\s*:/;function jh(e,t,n){const s=e.style,r=$t(n);let i=!1;if(n&&!r){if(t)if($t(t))for(const o of t.split(";")){const c=o.slice(0,o.indexOf(":")).trim();n[c]==null&&hi(s,c,"")}else for(const o in t)n[o]==null&&hi(s,o,"");for(const o in n)o==="display"&&(i=!0),hi(s,o,n[o])}else if(r){if(t!==n){const o=s[Uh];o&&(n+=";"+o),s.cssText=n,i=Bh.test(n)}}else t&&e.removeAttribute("style");$a in e&&(e[$a]=i?s.display:"",e[Dh]&&(s.display="none"))}const Qa=/\s*!important$/;function hi(e,t,n){if(qe(n))n.forEach(s=>hi(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Fh(e,t);Qa.test(n)?e.setProperty(Hr(s),n.replace(Qa,""),"important"):e[s]=n}}const ec=["Webkit","Moz","ms"],uo={};function Fh(e,t){const n=uo[t];if(n)return n;let s=Kn(t);if(s!=="filter"&&s in e)return uo[t]=s;s=Tl(s);for(let r=0;r<ec.length;r++){const i=ec[r]+s;if(i in e)return uo[t]=i}return t}const tc="http://www.w3.org/1999/xlink";function nc(e,t,n,s,r,i=Gf(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(tc,t.slice(6,t.length)):e.setAttributeNS(tc,t,n):n==null||i&&!Ol(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Wn(n)?String(n):n)}function rc(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Au(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const c=i==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(c!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=Ol(n):n==null&&c==="string"?(n="",o=!0):c==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function Ur(e,t,n,s){e.addEventListener(t,n,s)}function qh(e,t,n,s){e.removeEventListener(t,n,s)}const sc=Symbol("_vei");function Hh(e,t,n,s,r=null){const i=e[sc]||(e[sc]={}),o=i[t];if(s&&o)o.value=s;else{const[c,l]=Kh(t);if(s){const d=i[t]=Wh(s,r);Ur(e,c,d,l)}else o&&(qh(e,c,o,l),i[t]=void 0)}}const ic=/(?:Once|Passive|Capture)$/;function Kh(e){let t;if(ic.test(e)){t={};let s;for(;s=e.match(ic);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Hr(e.slice(2)),t]}let fo=0;const zh=Promise.resolve(),Gh=()=>fo||(zh.then(()=>fo=0),fo=Date.now());function Wh(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;ar(Vh(s,n.value),t,5,[s])};return n.value=e,n.attached=Gh(),n}function Vh(e,t){if(qe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const oc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Yh=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Lh(e,s,o):t==="style"?jh(e,n,s):Ui(t)?Bi(t)||Hh(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Xh(e,t,s,o))?(rc(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&nc(e,t,s,o,i,t!=="value")):e._isVueCE&&(Zh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!$t(s)))?rc(e,Kn(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),nc(e,t,s,o))};function Xh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&oc(t)&&$e(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return oc(t)&&$t(n)?!1:t in e}function Zh(e,t){const n=e._def.props;if(!n)return!1;const s=Kn(t);return Array.isArray(n)?n.some(r=>Kn(r)===s):Object.keys(n).some(r=>Kn(r)===s)}const Ti=e=>{const t=e.props["onUpdate:modelValue"]||!1;return qe(t)?n=>li(t,n):t};function Jh(e){e.target.composing=!0}function ac(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const rs=Symbol("_assign");function cc(e,t,n){return t&&(e=e.trim()),n&&(e=qi(e)),e}const Hn={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[rs]=Ti(r);const i=s||r.props&&r.props.type==="number";Ur(e,t?"change":"input",o=>{o.target.composing||e[rs](cc(e.value,n,i))}),(n||i)&&Ur(e,"change",()=>{e.value=cc(e.value,n,i)}),t||(Ur(e,"compositionstart",Jh),Ur(e,"compositionend",ac),Ur(e,"change",ac))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[rs]=Ti(o),e.composing)return;const c=(i||e.type==="number")&&!/^0\d/.test(e.value)?qi(e.value):e.value,l=t??"";if(c===l)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===l)||(e.value=l)}},pi={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=ji(t);Ur(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?qi(ki(o)):ki(o));e[rs](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,Gs(()=>{e._assigning=!1})}),e[rs]=Ti(s)},mounted(e,{value:t}){lc(e,t)},beforeUpdate(e,t,n){e[rs]=Ti(n)},updated(e,{value:t}){e._assigning||lc(e,t)}};function lc(e,t){const n=e.multiple,s=qe(t);if(!(n&&!s&&!ji(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],c=ki(o);if(n)if(s){const l=typeof c;l==="string"||l==="number"?o.selected=t.some(d=>String(d)===String(c)):o.selected=Vf(t,c)>-1}else o.selected=t.has(c);else if(Js(ki(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ki(e){return"_value"in e?e._value:e.value}const $h=["ctrl","shift","alt","meta"],Qh={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>$h.some(n=>e[`${n}Key`]&&!t.includes(n))},us=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...i)=>{for(let o=0;o<t.length;o++){const c=Qh[t[o]];if(c&&c(r,t))return}return e(r,...i)}))},ep=hn({patchProp:Yh},Nh);let uc;function tp(){return uc||(uc=fh(ep))}const np=((...e)=>{const t=tp().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=sp(s);if(!r)return;const i=t._component;!$e(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,rp(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function rp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function sp(e){return $t(e)?document.querySelector(e):e}function ip(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function op(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function s(){var r=!1;try{r=this instanceof s}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}),n}var ho={},Pr={},ps={},Jt={},po={},fc;function Ln(){return fc||(fc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TD=e.TE=e.Empty=void 0,e.encode=n,e.decode=s,e.Empty=new Uint8Array(0),e.TE=new TextEncoder,e.TD=new TextDecoder;function t(...r){let i=0;for(let l=0;l<r.length;l++)i+=r[l].length;const o=new Uint8Array(i);let c=0;for(let l=0;l<r.length;l++)o.set(r[l],c),c+=r[l].length;return o}function n(...r){const i=[];for(let o=0;o<r.length;o++)i.push(e.TE.encode(r[o]));return i.length===0?e.Empty:i.length===1?i[0]:t(...i)}function s(r){return!r||r.length===0?"":e.TD.decode(r)}})(po)),po}var yt={},dc;function Yn(){if(dc)return yt;dc=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.errors=yt.PermissionViolationError=yt.NoRespondersError=yt.TimeoutError=yt.RequestError=yt.ProtocolError=yt.ConnectionError=yt.DrainingConnectionError=yt.ClosedConnectionError=yt.AuthorizationError=yt.UserAuthenticationExpiredError=yt.InvalidOperationError=yt.InvalidArgumentError=yt.InvalidSubjectError=void 0;class e extends Error{constructor(b,w){super(`illegal subject: '${b}'`,w),this.name="InvalidSubjectError"}}yt.InvalidSubjectError=e;class t extends Error{constructor(b,w){super(b,w),this.name="InvalidArgumentError"}static format(b,w,y){return Array.isArray(w)&&w.length>1&&(w=w[0]),Array.isArray(b)?(b=b.map(x=>`'${x}'`),b=b.join(",")):b=`'${b}'`,new t(`${b} ${w}`,y)}}yt.InvalidArgumentError=t;class n extends Error{constructor(b,w){super(b,w),this.name="InvalidOperationError"}}yt.InvalidOperationError=n;class s extends Error{constructor(b,w){super(b,w),this.name="UserAuthenticationExpiredError"}static parse(b){return b.toLowerCase().indexOf("user authentication expired")!==-1?new s(b):null}}yt.UserAuthenticationExpiredError=s;class r extends Error{constructor(b,w){super(b,w),this.name="AuthorizationError"}static parse(b){const w=["authorization violation","account authentication expired","authentication timeout"],y=b.toLowerCase();for(let x=0;x<w.length;x++)if(y.indexOf(w[x])!==-1)return new r(b);return null}}yt.AuthorizationError=r;class i extends Error{constructor(){super("closed connection"),this.name="ClosedConnectionError"}}yt.ClosedConnectionError=i;class o extends Error{constructor(){super("connection draining"),this.name="DrainingConnectionError"}}yt.DrainingConnectionError=o;class c extends Error{constructor(b,w){super(b,w),this.name="ConnectionError"}}yt.ConnectionError=c;class l extends Error{constructor(b,w){super(b,w),this.name="ProtocolError"}}yt.ProtocolError=l;class d extends Error{constructor(b="",w){super(b,w),this.name="RequestError"}isNoResponders(){return this.cause instanceof h}}yt.RequestError=d;class u extends Error{constructor(b){super("timeout",b),this.name="TimeoutError"}}yt.TimeoutError=u;class h extends Error{subject;constructor(b,w){super(`no responders: '${b}'`,w),this.subject=b,this.name="NoResponders"}}yt.NoRespondersError=h;class f extends Error{operation;subject;queue;constructor(b,w,y,x,T){super(b,T),this.name="PermissionViolationError",this.operation=w,this.subject=y,this.queue=x}static parse(b){if((b?b.toLowerCase():"").indexOf("permissions violation")===-1)return null;let y="publish",x="",T;const L=b.match(/(Publish|Subscription) to "(\S+)"/);if(L&&(y=L[1].toLowerCase(),x=L[2],y==="subscription")){const A=b.match(/using queue "(\S+)"/);A&&(T=A[1])}return new f(b,y,x,T)}}return yt.PermissionViolationError=f,yt.errors={AuthorizationError:r,ClosedConnectionError:i,ConnectionError:c,DrainingConnectionError:o,InvalidArgumentError:t,InvalidOperationError:n,InvalidSubjectError:e,NoRespondersError:h,PermissionViolationError:f,ProtocolError:l,RequestError:d,TimeoutError:u,UserAuthenticationExpiredError:s},yt}var hc;function cr(){if(hc)return Jt;hc=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.SimpleMutex=Jt.Perf=void 0,Jt.extend=n,Jt.render=s,Jt.timeout=r,Jt.delay=i,Jt.deadline=o,Jt.deferred=c,Jt.debugDeferred=l,Jt.shuffle=d,Jt.collect=u,Jt.jitter=g,Jt.backoff=b,Jt.nanos=w,Jt.millis=y;const e=Ln(),t=Yn();function n(x,...T){for(let L=0;L<T.length;L++){const A=T[L];Object.keys(A).forEach(function(D){x[D]=A[D]})}return x}function s(x){return e.TD.decode(x).replace(/\n/g,"␊").replace(/\r/g,"␍")}function r(x,T=!0){const L=T?new t.TimeoutError:null;let A,D;const v=new Promise((N,I)=>{A={cancel:()=>{D&&clearTimeout(D)}},D=setTimeout(()=>{I(L===null?new t.TimeoutError:L)},x)});return Object.assign(v,A)}function i(x=0){let T;const L=new Promise(A=>{const D=setTimeout(()=>{A()},x);T={cancel:()=>{D&&(clearTimeout(D),A())}}});return Object.assign(L,T)}async function o(x,T=1e3){const L=c(),A=setTimeout(()=>{L.reject(new t.TimeoutError)},T);try{return await Promise.race([x,L])}finally{clearTimeout(A)}}function c(){let x={};const T=new Promise((L,A)=>{x={resolve:L,reject:A}});return Object.assign(T,x)}function l(){let x={};const T=new Promise((L,A)=>{x={resolve:D=>{console.trace("resolve",D),L(D)},reject:D=>{console.trace("reject"),A(D)}}});return Object.assign(T,x)}function d(x){for(let T=x.length-1;T>0;T--){const L=Math.floor(Math.random()*(T+1));[x[T],x[L]]=[x[L],x[T]]}return x}async function u(x){const T=[];for await(const L of x)T.push(L);return T}class h{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark(T){this.timers.set(T,performance.now())}measure(T,L,A){const D=this.timers.get(L);if(D===void 0)throw new Error(`${L} is not defined`);const v=this.timers.get(A);if(v===void 0)throw new Error(`${A} is not defined`);this.measures.set(T,v-D)}getEntries(){const T=[];return this.measures.forEach((L,A)=>{T.push({name:A,duration:L})}),T}}Jt.Perf=h;class f{max;current;waiting;constructor(T=1){this.max=T,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();const T=c();return this.waiting.push(T),T}unlock(){this.current--,this.waiting.pop()?.resolve()}}Jt.SimpleMutex=f;function g(x){return x===0?0:Math.floor(x/2+Math.random()*x)}function b(x=[0,250,250,500,500,3e3,5e3]){Array.isArray(x)||(x=[0,250,250,500,500,3e3,5e3]);const T=x.length-1;return{backoff(L){return g(L>T?x[T]:x[L])}}}function w(x){return x*1e6}function y(x){return Math.floor(x/1e6)}return Jt}var Cn={},go={},Bn={},bo={},Ir={},pc;function ap(){if(pc)return Ir;pc=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.nuid=Ir.Nuid=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",t=36,n=12,s=10,r=0xcfd41b9100000,i=33,o=333,c=n+s;function l(h){for(let f=0;f<h.length;f++)h[f]=Math.floor(Math.random()*255)}function d(h){globalThis?.crypto?.getRandomValues?globalThis.crypto.getRandomValues(h):l(h)}class u{buf;seq;inc;inited;constructor(){this.buf=new Uint8Array(c),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){this.seq=Math.floor(Math.random()*r),this.inc=Math.floor(Math.random()*(o-i)+i)}setPre(){const f=new Uint8Array(n);d(f);for(let g=0;g<n;g++){const b=f[g]%t;this.buf[g]=e.charCodeAt(b)}}fillSeq(){let f=this.seq;for(let g=c-1;g>=n;g--)this.buf[g]=e.charCodeAt(f%t),f=Math.floor(f/t)}next(){return this.inited||this.init(),this.seq+=this.inc,this.seq>r&&(this.setPre(),this.initSeqAndInc()),this.fillSeq(),String.fromCharCode.apply(String,this.buf)}reset(){this.init()}}return Ir.Nuid=u,Ir.nuid=new u,Ir}var gc;function Xi(){return gc||(gc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nuid=e.Nuid=void 0;var t=ap();Object.defineProperty(e,"Nuid",{enumerable:!0,get:function(){return t.Nuid}}),Object.defineProperty(e,"nuid",{enumerable:!0,get:function(){return t.nuid}})})(bo)),bo}var bc;function Kr(){if(bc)return Bn;bc=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.DEFAULT_HOST=Bn.DEFAULT_PORT=Bn.Match=void 0,Bn.syncIterator=n,Bn.createInbox=s;const e=Xi(),t=Yn();Bn.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function n(r){const i=r[Symbol.asyncIterator]();return{async next(){const o=await i.next();return o.done?Promise.resolve(null):Promise.resolve(o.value)}}}function s(r=""){if(r=r||"_INBOX",typeof r!="string")throw new TypeError("prefix must be a string");return r.split(".").forEach(i=>{if(i==="*"||i===">")throw t.InvalidArgumentError.format("prefix",`cannot have wildcards ('${r}')`)}),`${r}.${e.nuid.next()}`}return Bn.DEFAULT_PORT=4222,Bn.DEFAULT_HOST="127.0.0.1",Bn}var gs={},mc;function Zi(){if(mc)return gs;mc=1,Object.defineProperty(gs,"__esModule",{value:!0}),gs.DataBuffer=void 0;const e=Ln();class t{buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...s){let r=0;for(let c=0;c<s.length;c++)r+=s[c].length;const i=new Uint8Array(r);let o=0;for(let c=0;c<s.length;c++)i.set(s[c],o),o+=s[c].length;return i}static fromAscii(s){return s||(s=""),e.TE.encode(s)}static toAscii(s){return e.TD.decode(s)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){const s=new Uint8Array(this.byteLength);let r=0;for(let i=0;i<this.buffers.length;i++)s.set(this.buffers[i],r),r+=this.buffers[i].length;this.buffers.length=0,this.buffers.push(s)}}shift(){if(this.buffers.length){const s=this.buffers.shift();if(s)return this.byteLength-=s.length,s}return new Uint8Array(0)}drain(s){if(this.buffers.length){this.pack();const r=this.buffers.pop();if(r){const i=this.byteLength;(s===void 0||s>i)&&(s=i);const o=r.subarray(0,s);return i>s&&this.buffers.push(r.subarray(s)),this.byteLength=i-s,o}}return new Uint8Array(0)}fill(s,...r){s&&(this.buffers.push(s),this.byteLength+=s.length);for(let i=0;i<r.length;i++)r[i]&&r[i].length&&(this.buffers.push(r[i]),this.byteLength+=r[i].length)}peek(){return this.buffers.length?(this.pack(),this.buffers[0]):new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}return gs.DataBuffer=t,gs}var _c;function os(){return _c||(_c=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LF=e.CR=e.CRLF=e.CR_LF_LEN=e.CR_LF=void 0,e.setTransportFactory=i,e.defaultPort=o,e.getUrlParseFn=c,e.newTransport=l,e.getResolveFn=d,e.protoLen=u,e.extractProtocolMessage=h;const t=Ln(),n=Kr(),s=Zi();let r;function i(f){r=f}function o(){return r!==void 0&&r.defaultPort!==void 0?r.defaultPort:n.DEFAULT_PORT}function c(){return r!==void 0&&r.urlParseFn?r.urlParseFn:void 0}function l(){if(!r||typeof r.factory!="function")throw new Error("transport fn is not set");return r.factory()}function d(){return r!==void 0&&r.dnsResolveFn?r.dnsResolveFn:void 0}e.CR_LF=`\r
8
+ `,e.CR_LF_LEN=e.CR_LF.length,e.CRLF=s.DataBuffer.fromAscii(e.CR_LF),e.CR=new Uint8Array(e.CRLF)[0],e.LF=new Uint8Array(e.CRLF)[1];function u(f){for(let g=0;g<f.length;g++){const b=g+1;if(f.byteLength>b&&f[g]===e.CR&&f[b]===e.LF)return b+1}return 0}function h(f){const g=u(f);if(g>0){const w=new Uint8Array(f).slice(0,g);return t.TD.decode(w)}return""}})(go)),go}var dr={},Vr={},yc;function Tu(){if(yc)return Vr;yc=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.ipV4=d,Vr.isIP=u,Vr.parseIP=h;const e=4,t=16,n=48,s=57,r=65,i=70,o=97,c=102,l=16777215;function d(y,x,T,L){const A=new Uint8Array(t);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((v,N)=>{A[N]=v}),A[12]=y,A[13]=x,A[14]=T,A[15]=L,A}function u(y){return h(y)!==void 0}function h(y){for(let x=0;x<y.length;x++)switch(y[x]){case".":return f(y);case":":return g(y)}}function f(y){const x=new Uint8Array(e);for(let T=0;T<e;T++){if(y.length===0)return;if(T>0){if(y[0]!==".")return;y=y.substring(1)}const{n:L,c:A,ok:D}=b(y);if(!D||L>255)return;y=y.substring(A),x[T]=L}return d(x[0],x[1],x[2],x[3])}function g(y){const x=new Uint8Array(t);let T=-1;if(y.length>=2&&y[0]===":"&&y[1]===":"&&(T=0,y=y.substring(2),y.length===0))return x;let L=0;for(;L<t;){const{n:A,c:D,ok:v}=w(y);if(!v||A>65535)return;if(D<y.length&&y[D]==="."){if(T<0&&L!=t-e||L+e>t)return;const N=f(y);if(N===void 0)return;x[L]=N[12],x[L+1]=N[13],x[L+2]=N[14],x[L+3]=N[15],y="",L+=e;break}if(x[L]=A>>8,x[L+1]=A,L+=2,y=y.substring(D),y.length===0)break;if(y[0]!==":"||y.length==1)return;if(y=y.substring(1),y[0]===":"){if(T>=0)return;if(T=L,y=y.substring(1),y.length===0)break}}if(y.length===0){if(L<t){if(T<0)return;const A=t-L;for(let D=L-1;D>=T;D--)x[D+A]=x[D];for(let D=T+A-1;D>=T;D--)x[D]=0}else if(T>=0)return;return x}}function b(y){let x=0,T=0;for(x=0;x<y.length&&n<=y.charCodeAt(x)&&y.charCodeAt(x)<=s;x++)if(T=T*10+(y.charCodeAt(x)-n),T>=l)return{n:l,c:x,ok:!1};return x===0?{n:0,c:0,ok:!1}:{n:T,c:x,ok:!0}}function w(y){let x=0,T=0;for(T=0;T<y.length;T++){if(n<=y.charCodeAt(T)&&y.charCodeAt(T)<=s)x*=16,x+=y.charCodeAt(T)-n;else if(o<=y.charCodeAt(T)&&y.charCodeAt(T)<=c)x*=16,x+=y.charCodeAt(T)-o+10;else if(r<=y.charCodeAt(T)&&y.charCodeAt(T)<=i)x*=16,x+=y.charCodeAt(T)-r+10;else break;if(x>=l)return{n:0,c:T,ok:!1}}return T===0?{n:0,c:T,ok:!1}:{n:x,c:T,ok:!0}}return Vr}var vc;function ku(){if(vc)return dr;vc=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.Servers=dr.ServerImpl=void 0,dr.isIPV4OrHostname=r,dr.hostPort=c;const e=os(),t=cr(),n=Tu(),s=Kr();function r(u){return u.indexOf("[")!==-1||u.indexOf("::")!==-1?!1:u.indexOf(".")!==-1||u.split(":").length<=2}function i(u){return!r(u)}function o(u){const h="::FFFF:",f=u.toUpperCase().indexOf(h);if(f!==-1&&u.indexOf(".")!==-1){let g=u.substring(f+h.length);return g=g.replace("[",""),g.replace("]","")}return u}function c(u){u=u.trim(),u.match(/^(.*:\/\/)(.*)/m)&&(u=u.replace(/^(.*:\/\/)(.*)/gm,"$2")),u=o(u),i(u)&&u.indexOf("[")===-1&&(u=`[${u}]`);const h=i(u)?u.match(/(]:)(\d+)/):u.match(/(:)(\d+)/),f=h&&h.length===3&&h[1]&&h[2]?parseInt(h[2]):s.DEFAULT_PORT,g=f===80?"https":"http",b=new URL(`${g}://${u}`);b.port=`${f}`;let w=b.hostname;return w.charAt(0)==="["&&(w=w.substring(1,w.length-1)),{listen:b.host,hostname:w,port:f}}class l{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor(h,f=!1){this.src=h,this.tlsName="";const g=c(h);this.listen=g.listen,this.hostname=g.hostname,this.port=g.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=f}toString(){return this.listen}async resolve(h){if(!h.fn||h.resolve===!1)return[this];const f=[];if((0,n.isIP)(this.hostname))return[this];{const g=await h.fn(this.hostname);h.debug&&console.log(`resolve ${this.hostname} = ${g.join(",")}`);for(const b of g){const w=this.port===80?"https":"http",y=new URL(`${w}://${i(b)?"["+b+"]":b}`);y.port=`${this.port}`;const x=new l(y.host,!1);x.tlsName=this.hostname,f.push(x)}}return h.randomize&&(0,t.shuffle)(f),this.resolves=f,f}}dr.ServerImpl=l;class d{firstSelect;servers;currentServer;tlsName;randomize;constructor(h=[],f={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=f.randomize||!1;const g=(0,e.getUrlParseFn)();h&&(h.forEach(b=>{b=g?g(b):b,this.servers.push(new l(b))}),this.randomize&&(this.servers=(0,t.shuffle)(this.servers))),this.servers.length===0&&this.addServer(`${s.DEFAULT_HOST}:${(0,e.defaultPort)()}`,!1),this.currentServer=this.servers[0]}clear(){this.servers.length=0}updateTLSName(){const h=this.getCurrentServer();(0,n.isIP)(h.hostname)||(this.tlsName=h.hostname,this.servers.forEach(f=>{f.gossiped&&(f.tlsName=this.tlsName)}))}getCurrentServer(){return this.currentServer}addServer(h,f=!1){const g=(0,e.getUrlParseFn)();h=g?g(h):h;const b=new l(h,f);(0,n.isIP)(b.hostname)&&(b.tlsName=this.tlsName),this.servers.push(b)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;const h=this.servers.shift();return h&&(this.servers.push(h),this.currentServer=h),h}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer(h){if(h){const f=this.servers.indexOf(h);this.servers.splice(f,1)}}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update(h,f){const g=[];let b=[];const w=(0,e.getUrlParseFn)(),y=new Map;h.connect_urls&&h.connect_urls.length>0&&h.connect_urls.forEach(T=>{T=w?w(T,f):T;const L=new l(T,!0);y.set(T,L)});const x=[];return this.servers.forEach((T,L)=>{const A=T.listen;T.gossiped&&this.currentServer.listen!==A&&y.get(A)===void 0&&x.push(L),y.delete(A)}),x.reverse(),x.forEach(T=>{const L=this.servers.splice(T,1);b=b.concat(L[0].listen)}),y.forEach((T,L)=>{this.servers.push(T),g.push(L)}),{added:g,deleted:b}}}return dr.Servers=d,dr}var bs={},Ec;function ha(){if(Ec)return bs;Ec=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.QueuedIteratorImpl=void 0;const e=cr(),t=Yn();class n{inflight;processed;received;noIterator;iterClosed;done;signal;yields;filtered;pendingFiltered;ctx;_data;err;time;profile;yielding;didBreak;constructor(){this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=(0,e.deferred)(),this.yields=[],this.iterClosed=(0,e.deferred)(),this.time=0,this.yielding=!1,this.didBreak=!1,this.profile=!1}[Symbol.asyncIterator](){return this.iterate()}push(r){if(!this.done){if(this.didBreak){if(typeof r=="function"){const i=r;try{i()}catch{}}return}typeof r=="function"&&this.pendingFiltered++,this.yields.push(r),this.signal.resolve()}}async*iterate(){if(this.noIterator)throw new t.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new t.InvalidOperationError("iterator is already yielding");this.yielding=!0;try{for(;;){if(this.yields.length===0&&await this.signal,this.err)throw this.err;const r=this.yields;this.inflight=r.length,this.yields=[];for(let i=0;i<r.length;i++){if(typeof r[i]=="function"){this.pendingFiltered--;const c=r[i];try{c()}catch(l){throw l}if(this.err)throw this.err;continue}this.processed++,this.inflight--;const o=this.profile?Date.now():0;yield r[i],this.time=this.profile?Date.now()-o:0}if(this.done)break;this.yields.length===0&&(r.length=0,this.yields=r,this.signal=(0,e.deferred)())}}finally{this.didBreak=!0,this.stop()}}stop(r){this.done||(this.err=r,this.done=!0,this.signal.resolve(),this.iterClosed.resolve(r))}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}return bs.QueuedIteratorImpl=n,bs}var ms={},wc;function Ou(){if(wc)return ms;wc=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.MuxSubscription=void 0;const e=Kr(),t=Yn();class n{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init(r){return this.baseInbox=`${(0,e.createInbox)(r)}.`,this.baseInbox}add(r){isNaN(r.received)||(r.received=0),this.reqs.set(r.token,r)}get(r){return this.reqs.get(r)}cancel(r){this.reqs.delete(r.token)}getToken(r){const i=r.subject||"";return i.indexOf(this.baseInbox)===0?i.substring(this.baseInbox.length):null}all(){return Array.from(this.reqs.values())}handleError(r,i){if(r)return this.all().forEach(o=>{o.resolver(i,{})}),!0;if(i.operation==="publish"){const o=this.all().find(c=>c.requestSubject===i.subject);if(o)return o.resolver(i,{}),!0}return!1}dispatcher(){return(r,i)=>{const o=this.getToken(i);if(o){const c=this.get(o);c&&(r===null&&(r=i?.data?.length===0&&i.headers?.code===503?new t.NoRespondersError(c.requestSubject):null),c.resolver(r,i))}}}close(){const r=new t.RequestError("connection closed");this.reqs.forEach(i=>{i.resolver(r,{})})}}return ms.MuxSubscription=n,ms}var _s={},xc;function Cu(){if(xc)return _s;xc=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.Heartbeat=void 0;const e=cr();class t{ph;interval;maxOut;timer;pendings;constructor(s,r,i){this.ph=s,this.interval=r,this.maxOut=i,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel(s){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this._reset(),s&&this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:"ping",pendingPings:this.pendings.length+1}),this.pendings.length===this.maxOut){this.cancel(!0);return}const s=(0,e.deferred)();this.ph.flush(s).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push(s),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(s=>(s.resolve(),!1))}}return _s.Heartbeat=t,_s}var mo={},_o={},Sc;function Pu(){return Sc||(Sc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DenoBuffer=e.MAX_SIZE=e.AssertionError=void 0,e.assert=s,e.concat=o,e.append=c,e.readAll=d,e.writeAll=u;const t=Ln();class n extends Error{constructor(f){super(f),this.name="AssertionError"}}e.AssertionError=n;function s(h,f="Assertion failed."){if(!h)throw new n(f)}const r=32*1024;e.MAX_SIZE=2**32-2;function i(h,f,g=0){const b=f.byteLength-g;return h.byteLength>b&&(h=h.subarray(0,b)),f.set(h,g),h.byteLength}function o(h,f){if(h===void 0&&f===void 0)return new Uint8Array(0);if(h===void 0)return f;if(f===void 0)return h;const g=new Uint8Array(h.length+f.length);return g.set(h,0),g.set(f,h.length),g}function c(h,f){return o(h,Uint8Array.of(f))}class l{_buf;_off;constructor(f){if(this._off=0,f==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array(f)}bytes(f={copy:!0}){return f.copy===!1?this._buf.subarray(this._off):this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate(f){if(f===0){this.reset();return}if(f<0||f>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+f)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice(f){const g=this._buf.byteLength;return f<=this.capacity-g?(this._reslice(g+f),g):-1}_reslice(f){s(f<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,f)}readByte(){const f=new Uint8Array(1);return this.read(f)?f[0]:null}read(f){if(this.empty())return this.reset(),f.byteLength===0?0:null;const g=i(this._buf.subarray(this._off),f);return this._off+=g,g}writeByte(f){return this.write(Uint8Array.of(f))}writeString(f){return this.write(t.TE.encode(f))}write(f){const g=this._grow(f.byteLength);return i(f,this._buf,g)}_grow(f){const g=this.length;g===0&&this._off!==0&&this.reset();const b=this._tryGrowByReslice(f);if(b>=0)return b;const w=this.capacity;if(f<=Math.floor(w/2)-g)i(this._buf.subarray(this._off),this._buf);else{if(w+f>e.MAX_SIZE)throw new Error("The buffer cannot be grown beyond the maximum size.");{const y=new Uint8Array(Math.min(2*w+f,e.MAX_SIZE));i(this._buf.subarray(this._off),y),this._buf=y}}return this._off=0,this._reslice(Math.min(g+f,e.MAX_SIZE)),g}grow(f){if(f<0)throw Error("Buffer._grow: negative count");const g=this._grow(f);this._reslice(g)}readFrom(f){let g=0;const b=new Uint8Array(r);for(;;){const w=this.capacity-this.length<r,y=w?b:new Uint8Array(this._buf.buffer,this.length),x=f.read(y);if(x===null)return g;w?this.write(y.subarray(0,x)):this._reslice(this.length+x),g+=x}}}e.DenoBuffer=l;function d(h){const f=new l;return f.readFrom(h),f.bytes()}function u(h,f){let g=0;for(;g<f.length;)g+=h.write(f.subarray(g))}})(_o)),_o}var Ac;function Iu(){return Ac||(Ac=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.cc=e.State=e.Parser=e.Kind=void 0,e.describe=s;const t=Pu(),n=Ln();e.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function s(l){let d,u="";switch(l.kind){case e.Kind.MSG:d="MSG";break;case e.Kind.OK:d="OK";break;case e.Kind.ERR:d="ERR",u=n.TD.decode(l.data);break;case e.Kind.PING:d="PING";break;case e.Kind.PONG:d="PONG";break;case e.Kind.INFO:d="INFO",u=n.TD.decode(l.data)}return`${d}: ${u}`}function r(){const l={};return l.sid=-1,l.hdr=-1,l.size=-1,l}const i=48,o=57;class c{dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor(d){this.dispatcher=d,this.state=e.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse(d){let u;for(u=0;u<d.length;u++){const h=d[u];switch(this.state){case e.State.OP_START:switch(h){case e.cc.M:case e.cc.m:this.state=e.State.OP_M,this.hdr=-1,this.ma=r();break;case e.cc.H:case e.cc.h:this.state=e.State.OP_H,this.hdr=0,this.ma=r();break;case e.cc.P:case e.cc.p:this.state=e.State.OP_P;break;case e.cc.PLUS:this.state=e.State.OP_PLUS;break;case e.cc.MINUS:this.state=e.State.OP_MINUS;break;case e.cc.I:case e.cc.i:this.state=e.State.OP_I;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_H:switch(h){case e.cc.M:case e.cc.m:this.state=e.State.OP_M;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_M:switch(h){case e.cc.S:case e.cc.s:this.state=e.State.OP_MS;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_MS:switch(h){case e.cc.G:case e.cc.g:this.state=e.State.OP_MSG;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_MSG:switch(h){case e.cc.SPACE:case e.cc.TAB:this.state=e.State.OP_MSG_SPC;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_MSG_SPC:switch(h){case e.cc.SPACE:case e.cc.TAB:continue;default:this.state=e.State.MSG_ARG,this.as=u}break;case e.State.MSG_ARG:switch(h){case e.cc.CR:this.drop=1;break;case e.cc.NL:{const f=this.argBuf?this.argBuf.bytes():d.subarray(this.as,u-this.drop);this.processMsgArgs(f),this.drop=0,this.as=u+1,this.state=e.State.MSG_PAYLOAD,u=this.as+this.ma.size-1;break}default:this.argBuf&&this.argBuf.writeByte(h)}break;case e.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){const f=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:e.Kind.MSG,msg:this.ma,data:f}),this.argBuf=void 0,this.msgBuf=void 0,this.state=e.State.MSG_END}else{let f=this.ma.size-this.msgBuf.length;const g=d.length-u;g<f&&(f=g),f>0?(this.msgBuf.write(d.subarray(u,u+f)),u=u+f-1):this.msgBuf.writeByte(h)}else u-this.as>=this.ma.size&&(this.dispatcher.push({kind:e.Kind.MSG,msg:this.ma,data:d.subarray(this.as,u)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=e.State.MSG_END);break;case e.State.MSG_END:if(h===e.cc.NL)this.drop=0,this.as=u+1,this.state=e.State.OP_START;else continue;break;case e.State.OP_PLUS:switch(h){case e.cc.O:case e.cc.o:this.state=e.State.OP_PLUS_O;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_PLUS_O:switch(h){case e.cc.K:case e.cc.k:this.state=e.State.OP_PLUS_OK;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_PLUS_OK:h===e.cc.NL&&(this.dispatcher.push({kind:e.Kind.OK}),this.drop=0,this.state=e.State.OP_START);break;case e.State.OP_MINUS:switch(h){case e.cc.E:case e.cc.e:this.state=e.State.OP_MINUS_E;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_MINUS_E:switch(h){case e.cc.R:case e.cc.r:this.state=e.State.OP_MINUS_ER;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_MINUS_ER:switch(h){case e.cc.R:case e.cc.r:this.state=e.State.OP_MINUS_ERR;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_MINUS_ERR:switch(h){case e.cc.SPACE:case e.cc.TAB:this.state=e.State.OP_MINUS_ERR_SPC;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_MINUS_ERR_SPC:switch(h){case e.cc.SPACE:case e.cc.TAB:continue;default:this.state=e.State.MINUS_ERR_ARG,this.as=u}break;case e.State.MINUS_ERR_ARG:switch(h){case e.cc.CR:this.drop=1;break;case e.cc.NL:{let f;this.argBuf?(f=this.argBuf.bytes(),this.argBuf=void 0):f=d.subarray(this.as,u-this.drop),this.dispatcher.push({kind:e.Kind.ERR,data:f}),this.drop=0,this.as=u+1,this.state=e.State.OP_START;break}default:this.argBuf&&this.argBuf.write(Uint8Array.of(h))}break;case e.State.OP_P:switch(h){case e.cc.I:case e.cc.i:this.state=e.State.OP_PI;break;case e.cc.O:case e.cc.o:this.state=e.State.OP_PO;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_PO:switch(h){case e.cc.N:case e.cc.n:this.state=e.State.OP_PON;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_PON:switch(h){case e.cc.G:case e.cc.g:this.state=e.State.OP_PONG;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_PONG:h===e.cc.NL&&(this.dispatcher.push({kind:e.Kind.PONG}),this.drop=0,this.state=e.State.OP_START);break;case e.State.OP_PI:switch(h){case e.cc.N:case e.cc.n:this.state=e.State.OP_PIN;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_PIN:switch(h){case e.cc.G:case e.cc.g:this.state=e.State.OP_PING;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_PING:h===e.cc.NL&&(this.dispatcher.push({kind:e.Kind.PING}),this.drop=0,this.state=e.State.OP_START);break;case e.State.OP_I:switch(h){case e.cc.N:case e.cc.n:this.state=e.State.OP_IN;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_IN:switch(h){case e.cc.F:case e.cc.f:this.state=e.State.OP_INF;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_INF:switch(h){case e.cc.O:case e.cc.o:this.state=e.State.OP_INFO;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_INFO:switch(h){case e.cc.SPACE:case e.cc.TAB:this.state=e.State.OP_INFO_SPC;break;default:throw this.fail(d.subarray(u))}break;case e.State.OP_INFO_SPC:switch(h){case e.cc.SPACE:case e.cc.TAB:continue;default:this.state=e.State.INFO_ARG,this.as=u}break;case e.State.INFO_ARG:switch(h){case e.cc.CR:this.drop=1;break;case e.cc.NL:{let f;this.argBuf?(f=this.argBuf.bytes(),this.argBuf=void 0):f=d.subarray(this.as,u-this.drop),this.dispatcher.push({kind:e.Kind.INFO,data:f}),this.drop=0,this.as=u+1,this.state=e.State.OP_START;break}default:this.argBuf&&this.argBuf.writeByte(h)}break;default:throw this.fail(d.subarray(u))}}(this.state===e.State.MSG_ARG||this.state===e.State.MINUS_ERR_ARG||this.state===e.State.INFO_ARG)&&!this.argBuf&&(this.argBuf=new t.DenoBuffer(d.subarray(this.as,u-this.drop))),this.state===e.State.MSG_PAYLOAD&&!this.msgBuf&&(this.argBuf||this.cloneMsgArg(),this.msgBuf=new t.DenoBuffer(d.subarray(this.as)))}cloneMsgArg(){const d=this.ma.subject.length,u=this.ma.reply?this.ma.reply.length:0,h=new Uint8Array(d+u);h.set(this.ma.subject),this.ma.reply&&h.set(this.ma.reply,d),this.argBuf=new t.DenoBuffer(h),this.ma.subject=h.subarray(0,d),this.ma.reply&&(this.ma.reply=h.subarray(d))}processMsgArgs(d){if(this.hdr>=0)return this.processHeaderMsgArgs(d);const u=[];let h=-1;for(let f=0;f<d.length;f++)switch(d[f]){case e.cc.SPACE:case e.cc.TAB:case e.cc.CR:case e.cc.NL:h>=0&&(u.push(d.subarray(h,f)),h=-1);break;default:h<0&&(h=f)}switch(h>=0&&u.push(d.subarray(h)),u.length){case 3:this.ma.subject=u[0],this.ma.sid=this.protoParseInt(u[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(u[2]);break;case 4:this.ma.subject=u[0],this.ma.sid=this.protoParseInt(u[1]),this.ma.reply=u[2],this.ma.size=this.protoParseInt(u[3]);break;default:throw this.fail(d,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(d,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail(d,"processMsgArgs Bad or Missing Size Error")}fail(d,u=""){return u?u=`${u} [${this.state}]`:u=`parse error [${this.state}]`,new Error(`${u}: ${n.TD.decode(d)}`)}processHeaderMsgArgs(d){const u=[];let h=-1;for(let f=0;f<d.length;f++)switch(d[f]){case e.cc.SPACE:case e.cc.TAB:case e.cc.CR:case e.cc.NL:h>=0&&(u.push(d.subarray(h,f)),h=-1);break;default:h<0&&(h=f)}switch(h>=0&&u.push(d.subarray(h)),u.length){case 4:this.ma.subject=u[0],this.ma.sid=this.protoParseInt(u[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(u[2]),this.ma.size=this.protoParseInt(u[3]);break;case 5:this.ma.subject=u[0],this.ma.sid=this.protoParseInt(u[1]),this.ma.reply=u[2],this.ma.hdr=this.protoParseInt(u[3]),this.ma.size=this.protoParseInt(u[4]);break;default:throw this.fail(d,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(d,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail(d,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail(d,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt(d){if(d.length===0)return-1;let u=0;for(let h=0;h<d.length;h++){if(d[h]<i||d[h]>o)return-1;u=u*10+(d[h]-i)}return u}}e.Parser=c,e.State={OP_START:0,OP_PLUS:1,OP_PLUS_O:2,OP_PLUS_OK:3,OP_MINUS:4,OP_MINUS_E:5,OP_MINUS_ER:6,OP_MINUS_ERR:7,OP_MINUS_ERR_SPC:8,MINUS_ERR_ARG:9,OP_M:10,OP_MS:11,OP_MSG:12,OP_MSG_SPC:13,MSG_ARG:14,MSG_PAYLOAD:15,MSG_END:16,OP_H:17,OP_P:18,OP_PI:19,OP_PIN:20,OP_PING:21,OP_PO:22,OP_PON:23,OP_PONG:24,OP_I:25,OP_IN:26,OP_INF:27,OP_INFO:28,OP_INFO_SPC:29,INFO_ARG:30},e.cc={CR:13,E:69,e:101,F:70,f:102,G:71,g:103,H:72,h:104,I:73,i:105,K:75,k:107,M:77,m:109,MINUS:45,N:78,n:110,NL:10,O:79,o:111,P:80,p:112,PLUS:43,R:82,r:114,S:83,s:115,SPACE:32,TAB:9}})(mo)),mo}var ys={},Rr={},Tc;function pa(){if(Tc)return Rr;Tc=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.MsgHdrsImpl=void 0,Rr.canonicalMIMEHeaderKey=s,Rr.headers=r;const e=Ln(),t=Kr(),n=Yn();function s(c){let x=!0;const T=new Array(c.length);for(let L=0;L<c.length;L++){let A=c.charCodeAt(L);if(A===58||A<33||A>126)throw n.InvalidArgumentError.format("header",`'${c[L]}' is not a valid character in a header name`);x&&97<=A&&A<=122?A-=32:!x&&65<=A&&A<=90&&(A+=32),T[L]=A,x=A==45}return String.fromCharCode(...T)}function r(c=0,l=""){if(c===0&&l!=="")throw n.InvalidArgumentError.format("code","is required");if(c>0&&l==="")throw n.InvalidArgumentError.format("description","is required");return new o(c,l)}const i="NATS/1.0";class o{_code;headers;_description;constructor(l=0,d=""){this._code=l,this._description=d,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals(l){if(l&&this.headers.size===l.headers.size&&this._code===l._code){for(const[d,u]of this.headers){const h=l.values(d);if(u.length!==h.length)return!1;const f=[...u].sort(),g=[...h].sort();for(let b=0;b<f.length;b++)if(f[b]!==g[b])return!1}return!0}return!1}static decode(l){const d=new o,h=e.TD.decode(l).split(`\r
9
+ `),f=h[0];if(f!==i){let g=f.replace(i,"").trim();if(g.length>0){d._code=parseInt(g,10),isNaN(d._code)&&(d._code=0);const b=d._code.toString();g=g.replace(b,""),d._description=g.trim()}}return h.length>=1&&h.slice(1).map(g=>{if(g){const b=g.indexOf(":");if(b>-1){const w=g.slice(0,b),y=g.slice(b+1).trim();d.append(w,y)}}}),d}toString(){if(this.headers.size===0&&this._code===0)return"";let l=i;this._code>0&&this._description!==""&&(l+=` ${this._code} ${this._description}`);for(const[d,u]of this.headers)for(let h=0;h<u.length;h++)l=`${l}\r
10
+ ${d}: ${u[h]}`;return`${l}\r
11
+ \r
12
+ `}encode(){return e.TE.encode(this.toString())}static validHeaderValue(l){if(/[\r\n]/.test(l))throw n.InvalidArgumentError.format("header","values cannot contain \\r or \\n");return l.trim()}keys(){const l=[];for(const d of this.headers.keys())l.push(d);return l}findKeys(l,d=t.Match.Exact){const u=this.keys();switch(d){case t.Match.Exact:return u.filter(h=>h===l);case t.Match.CanonicalMIME:return l=s(l),u.filter(h=>h===l);default:{const h=l.toLowerCase();return u.filter(f=>h===f.toLowerCase())}}}get(l,d=t.Match.Exact){const u=this.findKeys(l,d);if(u.length){const h=this.headers.get(u[0]);if(h)return Array.isArray(h)?h[0]:h}return""}last(l,d=t.Match.Exact){const u=this.findKeys(l,d);if(u.length){const h=this.headers.get(u[0]);if(h)return Array.isArray(h)?h[h.length-1]:h}return""}has(l,d=t.Match.Exact){return this.findKeys(l,d).length>0}set(l,d,u=t.Match.Exact){this.delete(l,u),this.append(l,d,u)}append(l,d,u=t.Match.Exact){const h=s(l);u===t.Match.CanonicalMIME&&(l=h);const f=this.findKeys(l,u);l=f.length>0?f[0]:l;const g=o.validHeaderValue(d);let b=this.headers.get(l);b||(b=[],this.headers.set(l,b)),b.push(g)}values(l,d=t.Match.Exact){const u=[];return this.findKeys(l,d).forEach(f=>{const g=this.headers.get(f);g&&u.push(...g)}),u}delete(l,d=t.Match.Exact){this.findKeys(l,d).forEach(h=>{this.headers.delete(h)})}get hasError(){return this._code>=300}get status(){return`${this._code} ${this._description}`.trim()}toRecord(){const l={};return this.keys().forEach(d=>{l[d]=this.values(d)}),l}get code(){return this._code}get description(){return this._description}static fromRecord(l){const d=new o;for(const u in l){const h=l[u];d.headers.set(u,Array.isArray(h)?h:[`${h}`])}return d}}return Rr.MsgHdrsImpl=o,Rr}var kc;function Ru(){if(kc)return ys;kc=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.MsgImpl=void 0;const e=pa(),t=Ln();class n{_headers;_msg;_rdata;_reply;_subject;publisher;constructor(r,i,o){this._msg=r,this._rdata=i,this.publisher=o}get subject(){return this._subject?this._subject:(this._subject=t.TD.decode(this._msg.subject),this._subject)}get reply(){return this._reply?this._reply:(this._reply=t.TD.decode(this._msg.reply),this._reply)}get sid(){return this._msg.sid}get headers(){if(this._msg.hdr>-1&&!this._headers){const r=this._rdata.subarray(0,this._msg.hdr);this._headers=e.MsgHdrsImpl.decode(r)}return this._headers}get data(){return this._rdata?this._msg.hdr>-1?this._rdata.subarray(this._msg.hdr):this._rdata:new Uint8Array(0)}respond(r=t.Empty,i){return this.reply?(this.publisher.publish(this.reply,r,i),!0):!1}size(){const r=this._msg.subject.length,i=this._msg.reply?.length||0,o=this._msg.size===-1?0:this._msg.size;return r+i+o}json(r){return JSON.parse(this.string(),r)}string(){return t.TD.decode(this.data)}requestInfo(){const r=this.headers?.get("Nats-Request-Info");return r?JSON.parse(r,function(i,o){return(i==="start"||i==="stop")&&o!==""?new Date(Date.parse(o)):o}):null}}return ys.MsgImpl=n,ys}var yo={},Oc;function ga(){return Oc||(Oc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Features=e.Feature=void 0,e.parseSemVer=t,e.compare=n;function t(r=""){const i=r.match(/(\d+).(\d+).(\d+)/);if(i)return{major:parseInt(i[1]),minor:parseInt(i[2]),micro:parseInt(i[3])};throw new Error(`'${r}' is not a semver value`)}function n(r,i){return r.major<i.major?-1:r.major>i.major?1:r.minor<i.minor?-1:r.minor>i.minor?1:r.micro<i.micro?-1:r.micro>i.micro?1:0}e.Feature={JS_KV:"js_kv",JS_OBJECTSTORE:"js_objectstore",JS_PULL_MAX_BYTES:"js_pull_max_bytes",JS_NEW_CONSUMER_CREATE_API:"js_new_consumer_create",JS_ALLOW_DIRECT:"js_allow_direct",JS_MULTIPLE_CONSUMER_FILTER:"js_multiple_consumer_filter",JS_SIMPLIFICATION:"js_simplification",JS_STREAM_CONSUMER_METADATA:"js_stream_consumer_metadata",JS_CONSUMER_FILTER_SUBJECTS:"js_consumer_filter_subjects",JS_STREAM_FIRST_SEQ:"js_stream_first_seq",JS_STREAM_SUBJECT_TRANSFORM:"js_stream_subject_transform",JS_STREAM_SOURCE_SUBJECT_TRANSFORM:"js_stream_source_subject_transform",JS_STREAM_COMPRESSION:"js_stream_compression",JS_DEFAULT_CONSUMER_LIMITS:"js_default_consumer_limits",JS_BATCH_DIRECT_GET:"js_batch_direct_get",JS_PRIORITY_GROUPS:"js_priority_groups"};class s{server;features;disabled;constructor(i){this.features=new Map,this.disabled=[],this.update(i)}resetDisabled(){this.disabled.length=0,this.update(this.server)}disable(i){this.disabled.push(i),this.update(this.server)}isDisabled(i){return this.disabled.indexOf(i)!==-1}update(i){typeof i=="string"&&(i=t(i)),this.server=i,this.set(e.Feature.JS_KV,"2.6.2"),this.set(e.Feature.JS_OBJECTSTORE,"2.6.3"),this.set(e.Feature.JS_PULL_MAX_BYTES,"2.8.3"),this.set(e.Feature.JS_NEW_CONSUMER_CREATE_API,"2.9.0"),this.set(e.Feature.JS_ALLOW_DIRECT,"2.9.0"),this.set(e.Feature.JS_MULTIPLE_CONSUMER_FILTER,"2.10.0"),this.set(e.Feature.JS_SIMPLIFICATION,"2.9.4"),this.set(e.Feature.JS_STREAM_CONSUMER_METADATA,"2.10.0"),this.set(e.Feature.JS_CONSUMER_FILTER_SUBJECTS,"2.10.0"),this.set(e.Feature.JS_STREAM_FIRST_SEQ,"2.10.0"),this.set(e.Feature.JS_STREAM_SUBJECT_TRANSFORM,"2.10.0"),this.set(e.Feature.JS_STREAM_SOURCE_SUBJECT_TRANSFORM,"2.10.0"),this.set(e.Feature.JS_STREAM_COMPRESSION,"2.10.0"),this.set(e.Feature.JS_DEFAULT_CONSUMER_LIMITS,"2.10.0"),this.set(e.Feature.JS_BATCH_DIRECT_GET,"2.11.0"),this.set(e.Feature.JS_PRIORITY_GROUPS,"2.11.0"),this.disabled.forEach(o=>{this.features.delete(o)})}set(i,o){this.features.set(i,{min:o,ok:n(this.server,t(o))>=0})}get(i){return this.features.get(i)||{min:"unknown",ok:!1}}supports(i){return this.get(i)?.ok||!1}require(i){return typeof i=="string"&&(i=t(i)),n(this.server,i)>=0}}e.Features=s})(yo)),yo}var vo={},Jn={},jn={},Eo={},Ht={},Nr={},vs={},Es={},Cc;function Mu(){if(Cc)return Es;Cc=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.crc16=void 0;const e=new Uint16Array([0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920]);let t=class Nu{static checksum(s){let r=0;for(let i=0;i<s.byteLength;i++){const o=s[i];r=r<<8&65535^e[(r>>8^o)&255]}return r}static validate(s,r){return Nu.checksum(s)==r}};return Es.crc16=t,Es}var ws={},Pc;function Lu(){if(Pc)return ws;Pc=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.base32=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let t=class{static encode(s){let r=0,i=0;const o=new Uint8Array(s),c=new Uint8Array(s.byteLength*2);let l=0;for(let d=0;d<o.byteLength;d++)for(i=i<<8|o[d],r+=8;r>=5;){const u=i>>>r-5&31;c[l++]=e.charAt(u).charCodeAt(0),r-=5}if(r>0){const d=i<<5-r&31;c[l++]=e.charAt(d).charCodeAt(0)}return c.slice(0,l)}static decode(s){let r=0,i=0,o=0;const c=new Uint8Array(s),l=new Uint8Array(c.byteLength*5/8|0);for(let d=0;d<c.byteLength;d++){const u=String.fromCharCode(c[d]),h=e.indexOf(u);if(h===-1)throw new Error("Illegal Base32 character: "+c[d]);i=i<<5|h,r+=5,r>=8&&(l[o++]=i>>>r-8&255,r-=8)}return l.slice(0,o)}};return ws.base32=t,ws}var Ic;function Ji(){if(Ic)return vs;Ic=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.Codec=void 0;const e=Mu(),t=as(),n=Lu();class s{static encode(i,o){if(!o||!(o instanceof Uint8Array))throw new t.NKeysError(t.NKeysErrorCode.SerializationError);if(!t.Prefixes.isValidPrefix(i))throw new t.NKeysError(t.NKeysErrorCode.InvalidPrefixByte);return s._encode(!1,i,o)}static encodeSeed(i,o){if(!o)throw new t.NKeysError(t.NKeysErrorCode.ApiError);if(!t.Prefixes.isValidPublicPrefix(i))throw new t.NKeysError(t.NKeysErrorCode.InvalidPrefixByte);if(o.byteLength!==32)throw new t.NKeysError(t.NKeysErrorCode.InvalidSeedLen);return s._encode(!0,i,o)}static decode(i,o){if(!t.Prefixes.isValidPrefix(i))throw new t.NKeysError(t.NKeysErrorCode.InvalidPrefixByte);const c=s._decode(o);if(c[0]!==i)throw new t.NKeysError(t.NKeysErrorCode.InvalidPrefixByte);return c.slice(1)}static decodeSeed(i){const o=s._decode(i),c=s._decodePrefix(o);if(c[0]!=t.Prefix.Seed)throw new t.NKeysError(t.NKeysErrorCode.InvalidSeed);if(!t.Prefixes.isValidPublicPrefix(c[1]))throw new t.NKeysError(t.NKeysErrorCode.InvalidPrefixByte);return{buf:o.slice(2),prefix:c[1]}}static _encode(i,o,c){const l=i?2:1,d=c.byteLength,h=l+d+2,f=l+d,g=new Uint8Array(h);if(i){const y=s._encodePrefix(t.Prefix.Seed,o);g.set(y)}else g[0]=o;g.set(c,l);const b=e.crc16.checksum(g.slice(0,f));return new DataView(g.buffer).setUint16(f,b,!0),n.base32.encode(g)}static _decode(i){if(i.byteLength<4)throw new t.NKeysError(t.NKeysErrorCode.InvalidEncoding);let o;try{o=n.base32.decode(i)}catch(h){throw new t.NKeysError(t.NKeysErrorCode.InvalidEncoding,{cause:h})}const c=o.byteLength-2,d=new DataView(o.buffer).getUint16(c,!0),u=o.slice(0,c);if(!e.crc16.validate(u,d))throw new t.NKeysError(t.NKeysErrorCode.InvalidChecksum);return u}static _encodePrefix(i,o){const c=i|o>>5,l=(o&31)<<3;return new Uint8Array([c,l])}static _decodePrefix(i){const o=i[0]&248,c=(i[0]&7)<<5|(i[1]&248)>>3;return new Uint8Array([o,c])}}return vs.Codec=s,vs}var Yr={};function cp(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wo={exports:{}};const lp={},up=Object.freeze(Object.defineProperty({__proto__:null,default:lp},Symbol.toStringTag,{value:"Module"})),fp=op(up);var Rc;function dp(){return Rc||(Rc=1,(function(e){(function(t){var n=function(p){var m,_=new Float64Array(16);if(p)for(m=0;m<p.length;m++)_[m]=p[m];return _},s=function(){throw new Error("no PRNG")},r=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var o=n(),c=n([1]),l=n([56129,1]),d=n([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),u=n([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=n([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=n([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=n([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(p,m,_,a){p[m]=_>>24&255,p[m+1]=_>>16&255,p[m+2]=_>>8&255,p[m+3]=_&255,p[m+4]=a>>24&255,p[m+5]=a>>16&255,p[m+6]=a>>8&255,p[m+7]=a&255}function w(p,m,_,a,E){var R,U=0;for(R=0;R<E;R++)U|=p[m+R]^_[a+R];return(1&U-1>>>8)-1}function y(p,m,_,a){return w(p,m,_,a,16)}function x(p,m,_,a){return w(p,m,_,a,32)}function T(p,m,_,a){for(var E=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,R=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,U=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,W=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,oe=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,Ae=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,ge=m[0]&255|(m[1]&255)<<8|(m[2]&255)<<16|(m[3]&255)<<24,Ze=m[4]&255|(m[5]&255)<<8|(m[6]&255)<<16|(m[7]&255)<<24,Ee=m[8]&255|(m[9]&255)<<8|(m[10]&255)<<16|(m[11]&255)<<24,re=m[12]&255|(m[13]&255)<<8|(m[14]&255)<<16|(m[15]&255)<<24,S=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,q=_[16]&255|(_[17]&255)<<8|(_[18]&255)<<16|(_[19]&255)<<24,Q=_[20]&255|(_[21]&255)<<8|(_[22]&255)<<16|(_[23]&255)<<24,_e=_[24]&255|(_[25]&255)<<8|(_[26]&255)<<16|(_[27]&255)<<24,Oe=_[28]&255|(_[29]&255)<<8|(_[30]&255)<<16|(_[31]&255)<<24,xe=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,de=E,ve=R,he=U,j=W,H=oe,Z=Ae,M=ge,B=Ze,X=Ee,V=re,Y=S,J=q,Ce=Q,He=_e,Ve=Oe,Ke=xe,O,Je=0;Je<20;Je+=2)O=de+Ce|0,H^=O<<7|O>>>25,O=H+de|0,X^=O<<9|O>>>23,O=X+H|0,Ce^=O<<13|O>>>19,O=Ce+X|0,de^=O<<18|O>>>14,O=Z+ve|0,V^=O<<7|O>>>25,O=V+Z|0,He^=O<<9|O>>>23,O=He+V|0,ve^=O<<13|O>>>19,O=ve+He|0,Z^=O<<18|O>>>14,O=Y+M|0,Ve^=O<<7|O>>>25,O=Ve+Y|0,he^=O<<9|O>>>23,O=he+Ve|0,M^=O<<13|O>>>19,O=M+he|0,Y^=O<<18|O>>>14,O=Ke+J|0,j^=O<<7|O>>>25,O=j+Ke|0,B^=O<<9|O>>>23,O=B+j|0,J^=O<<13|O>>>19,O=J+B|0,Ke^=O<<18|O>>>14,O=de+j|0,ve^=O<<7|O>>>25,O=ve+de|0,he^=O<<9|O>>>23,O=he+ve|0,j^=O<<13|O>>>19,O=j+he|0,de^=O<<18|O>>>14,O=Z+H|0,M^=O<<7|O>>>25,O=M+Z|0,B^=O<<9|O>>>23,O=B+M|0,H^=O<<13|O>>>19,O=H+B|0,Z^=O<<18|O>>>14,O=Y+V|0,J^=O<<7|O>>>25,O=J+Y|0,X^=O<<9|O>>>23,O=X+J|0,V^=O<<13|O>>>19,O=V+X|0,Y^=O<<18|O>>>14,O=Ke+Ve|0,Ce^=O<<7|O>>>25,O=Ce+Ke|0,He^=O<<9|O>>>23,O=He+Ce|0,Ve^=O<<13|O>>>19,O=Ve+He|0,Ke^=O<<18|O>>>14;de=de+E|0,ve=ve+R|0,he=he+U|0,j=j+W|0,H=H+oe|0,Z=Z+Ae|0,M=M+ge|0,B=B+Ze|0,X=X+Ee|0,V=V+re|0,Y=Y+S|0,J=J+q|0,Ce=Ce+Q|0,He=He+_e|0,Ve=Ve+Oe|0,Ke=Ke+xe|0,p[0]=de>>>0&255,p[1]=de>>>8&255,p[2]=de>>>16&255,p[3]=de>>>24&255,p[4]=ve>>>0&255,p[5]=ve>>>8&255,p[6]=ve>>>16&255,p[7]=ve>>>24&255,p[8]=he>>>0&255,p[9]=he>>>8&255,p[10]=he>>>16&255,p[11]=he>>>24&255,p[12]=j>>>0&255,p[13]=j>>>8&255,p[14]=j>>>16&255,p[15]=j>>>24&255,p[16]=H>>>0&255,p[17]=H>>>8&255,p[18]=H>>>16&255,p[19]=H>>>24&255,p[20]=Z>>>0&255,p[21]=Z>>>8&255,p[22]=Z>>>16&255,p[23]=Z>>>24&255,p[24]=M>>>0&255,p[25]=M>>>8&255,p[26]=M>>>16&255,p[27]=M>>>24&255,p[28]=B>>>0&255,p[29]=B>>>8&255,p[30]=B>>>16&255,p[31]=B>>>24&255,p[32]=X>>>0&255,p[33]=X>>>8&255,p[34]=X>>>16&255,p[35]=X>>>24&255,p[36]=V>>>0&255,p[37]=V>>>8&255,p[38]=V>>>16&255,p[39]=V>>>24&255,p[40]=Y>>>0&255,p[41]=Y>>>8&255,p[42]=Y>>>16&255,p[43]=Y>>>24&255,p[44]=J>>>0&255,p[45]=J>>>8&255,p[46]=J>>>16&255,p[47]=J>>>24&255,p[48]=Ce>>>0&255,p[49]=Ce>>>8&255,p[50]=Ce>>>16&255,p[51]=Ce>>>24&255,p[52]=He>>>0&255,p[53]=He>>>8&255,p[54]=He>>>16&255,p[55]=He>>>24&255,p[56]=Ve>>>0&255,p[57]=Ve>>>8&255,p[58]=Ve>>>16&255,p[59]=Ve>>>24&255,p[60]=Ke>>>0&255,p[61]=Ke>>>8&255,p[62]=Ke>>>16&255,p[63]=Ke>>>24&255}function L(p,m,_,a){for(var E=a[0]&255|(a[1]&255)<<8|(a[2]&255)<<16|(a[3]&255)<<24,R=_[0]&255|(_[1]&255)<<8|(_[2]&255)<<16|(_[3]&255)<<24,U=_[4]&255|(_[5]&255)<<8|(_[6]&255)<<16|(_[7]&255)<<24,W=_[8]&255|(_[9]&255)<<8|(_[10]&255)<<16|(_[11]&255)<<24,oe=_[12]&255|(_[13]&255)<<8|(_[14]&255)<<16|(_[15]&255)<<24,Ae=a[4]&255|(a[5]&255)<<8|(a[6]&255)<<16|(a[7]&255)<<24,ge=m[0]&255|(m[1]&255)<<8|(m[2]&255)<<16|(m[3]&255)<<24,Ze=m[4]&255|(m[5]&255)<<8|(m[6]&255)<<16|(m[7]&255)<<24,Ee=m[8]&255|(m[9]&255)<<8|(m[10]&255)<<16|(m[11]&255)<<24,re=m[12]&255|(m[13]&255)<<8|(m[14]&255)<<16|(m[15]&255)<<24,S=a[8]&255|(a[9]&255)<<8|(a[10]&255)<<16|(a[11]&255)<<24,q=_[16]&255|(_[17]&255)<<8|(_[18]&255)<<16|(_[19]&255)<<24,Q=_[20]&255|(_[21]&255)<<8|(_[22]&255)<<16|(_[23]&255)<<24,_e=_[24]&255|(_[25]&255)<<8|(_[26]&255)<<16|(_[27]&255)<<24,Oe=_[28]&255|(_[29]&255)<<8|(_[30]&255)<<16|(_[31]&255)<<24,xe=a[12]&255|(a[13]&255)<<8|(a[14]&255)<<16|(a[15]&255)<<24,de=E,ve=R,he=U,j=W,H=oe,Z=Ae,M=ge,B=Ze,X=Ee,V=re,Y=S,J=q,Ce=Q,He=_e,Ve=Oe,Ke=xe,O,Je=0;Je<20;Je+=2)O=de+Ce|0,H^=O<<7|O>>>25,O=H+de|0,X^=O<<9|O>>>23,O=X+H|0,Ce^=O<<13|O>>>19,O=Ce+X|0,de^=O<<18|O>>>14,O=Z+ve|0,V^=O<<7|O>>>25,O=V+Z|0,He^=O<<9|O>>>23,O=He+V|0,ve^=O<<13|O>>>19,O=ve+He|0,Z^=O<<18|O>>>14,O=Y+M|0,Ve^=O<<7|O>>>25,O=Ve+Y|0,he^=O<<9|O>>>23,O=he+Ve|0,M^=O<<13|O>>>19,O=M+he|0,Y^=O<<18|O>>>14,O=Ke+J|0,j^=O<<7|O>>>25,O=j+Ke|0,B^=O<<9|O>>>23,O=B+j|0,J^=O<<13|O>>>19,O=J+B|0,Ke^=O<<18|O>>>14,O=de+j|0,ve^=O<<7|O>>>25,O=ve+de|0,he^=O<<9|O>>>23,O=he+ve|0,j^=O<<13|O>>>19,O=j+he|0,de^=O<<18|O>>>14,O=Z+H|0,M^=O<<7|O>>>25,O=M+Z|0,B^=O<<9|O>>>23,O=B+M|0,H^=O<<13|O>>>19,O=H+B|0,Z^=O<<18|O>>>14,O=Y+V|0,J^=O<<7|O>>>25,O=J+Y|0,X^=O<<9|O>>>23,O=X+J|0,V^=O<<13|O>>>19,O=V+X|0,Y^=O<<18|O>>>14,O=Ke+Ve|0,Ce^=O<<7|O>>>25,O=Ce+Ke|0,He^=O<<9|O>>>23,O=He+Ce|0,Ve^=O<<13|O>>>19,O=Ve+He|0,Ke^=O<<18|O>>>14;p[0]=de>>>0&255,p[1]=de>>>8&255,p[2]=de>>>16&255,p[3]=de>>>24&255,p[4]=Z>>>0&255,p[5]=Z>>>8&255,p[6]=Z>>>16&255,p[7]=Z>>>24&255,p[8]=Y>>>0&255,p[9]=Y>>>8&255,p[10]=Y>>>16&255,p[11]=Y>>>24&255,p[12]=Ke>>>0&255,p[13]=Ke>>>8&255,p[14]=Ke>>>16&255,p[15]=Ke>>>24&255,p[16]=M>>>0&255,p[17]=M>>>8&255,p[18]=M>>>16&255,p[19]=M>>>24&255,p[20]=B>>>0&255,p[21]=B>>>8&255,p[22]=B>>>16&255,p[23]=B>>>24&255,p[24]=X>>>0&255,p[25]=X>>>8&255,p[26]=X>>>16&255,p[27]=X>>>24&255,p[28]=V>>>0&255,p[29]=V>>>8&255,p[30]=V>>>16&255,p[31]=V>>>24&255}function A(p,m,_,a){T(p,m,_,a)}function D(p,m,_,a){L(p,m,_,a)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function N(p,m,_,a,E,R,U){var W=new Uint8Array(16),oe=new Uint8Array(64),Ae,ge;for(ge=0;ge<16;ge++)W[ge]=0;for(ge=0;ge<8;ge++)W[ge]=R[ge];for(;E>=64;){for(A(oe,W,U,v),ge=0;ge<64;ge++)p[m+ge]=_[a+ge]^oe[ge];for(Ae=1,ge=8;ge<16;ge++)Ae=Ae+(W[ge]&255)|0,W[ge]=Ae&255,Ae>>>=8;E-=64,m+=64,a+=64}if(E>0)for(A(oe,W,U,v),ge=0;ge<E;ge++)p[m+ge]=_[a+ge]^oe[ge];return 0}function I(p,m,_,a,E){var R=new Uint8Array(16),U=new Uint8Array(64),W,oe;for(oe=0;oe<16;oe++)R[oe]=0;for(oe=0;oe<8;oe++)R[oe]=a[oe];for(;_>=64;){for(A(U,R,E,v),oe=0;oe<64;oe++)p[m+oe]=U[oe];for(W=1,oe=8;oe<16;oe++)W=W+(R[oe]&255)|0,R[oe]=W&255,W>>>=8;_-=64,m+=64}if(_>0)for(A(U,R,E,v),oe=0;oe<_;oe++)p[m+oe]=U[oe];return 0}function z(p,m,_,a,E){var R=new Uint8Array(32);D(R,a,E,v);for(var U=new Uint8Array(8),W=0;W<8;W++)U[W]=a[W+16];return I(p,m,_,U,R)}function ae(p,m,_,a,E,R,U){var W=new Uint8Array(32);D(W,R,U,v);for(var oe=new Uint8Array(8),Ae=0;Ae<8;Ae++)oe[Ae]=R[Ae+16];return N(p,m,_,a,E,oe,W)}var ke=function(p){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var m,_,a,E,R,U,W,oe;m=p[0]&255|(p[1]&255)<<8,this.r[0]=m&8191,_=p[2]&255|(p[3]&255)<<8,this.r[1]=(m>>>13|_<<3)&8191,a=p[4]&255|(p[5]&255)<<8,this.r[2]=(_>>>10|a<<6)&7939,E=p[6]&255|(p[7]&255)<<8,this.r[3]=(a>>>7|E<<9)&8191,R=p[8]&255|(p[9]&255)<<8,this.r[4]=(E>>>4|R<<12)&255,this.r[5]=R>>>1&8190,U=p[10]&255|(p[11]&255)<<8,this.r[6]=(R>>>14|U<<2)&8191,W=p[12]&255|(p[13]&255)<<8,this.r[7]=(U>>>11|W<<5)&8065,oe=p[14]&255|(p[15]&255)<<8,this.r[8]=(W>>>8|oe<<8)&8191,this.r[9]=oe>>>5&127,this.pad[0]=p[16]&255|(p[17]&255)<<8,this.pad[1]=p[18]&255|(p[19]&255)<<8,this.pad[2]=p[20]&255|(p[21]&255)<<8,this.pad[3]=p[22]&255|(p[23]&255)<<8,this.pad[4]=p[24]&255|(p[25]&255)<<8,this.pad[5]=p[26]&255|(p[27]&255)<<8,this.pad[6]=p[28]&255|(p[29]&255)<<8,this.pad[7]=p[30]&255|(p[31]&255)<<8};ke.prototype.blocks=function(p,m,_){for(var a=this.fin?0:2048,E,R,U,W,oe,Ae,ge,Ze,Ee,re,S,q,Q,_e,Oe,xe,de,ve,he,j=this.h[0],H=this.h[1],Z=this.h[2],M=this.h[3],B=this.h[4],X=this.h[5],V=this.h[6],Y=this.h[7],J=this.h[8],Ce=this.h[9],He=this.r[0],Ve=this.r[1],Ke=this.r[2],O=this.r[3],Je=this.r[4],dt=this.r[5],ht=this.r[6],ze=this.r[7],ut=this.r[8],Ge=this.r[9];_>=16;)E=p[m+0]&255|(p[m+1]&255)<<8,j+=E&8191,R=p[m+2]&255|(p[m+3]&255)<<8,H+=(E>>>13|R<<3)&8191,U=p[m+4]&255|(p[m+5]&255)<<8,Z+=(R>>>10|U<<6)&8191,W=p[m+6]&255|(p[m+7]&255)<<8,M+=(U>>>7|W<<9)&8191,oe=p[m+8]&255|(p[m+9]&255)<<8,B+=(W>>>4|oe<<12)&8191,X+=oe>>>1&8191,Ae=p[m+10]&255|(p[m+11]&255)<<8,V+=(oe>>>14|Ae<<2)&8191,ge=p[m+12]&255|(p[m+13]&255)<<8,Y+=(Ae>>>11|ge<<5)&8191,Ze=p[m+14]&255|(p[m+15]&255)<<8,J+=(ge>>>8|Ze<<8)&8191,Ce+=Ze>>>5|a,Ee=0,re=Ee,re+=j*He,re+=H*(5*Ge),re+=Z*(5*ut),re+=M*(5*ze),re+=B*(5*ht),Ee=re>>>13,re&=8191,re+=X*(5*dt),re+=V*(5*Je),re+=Y*(5*O),re+=J*(5*Ke),re+=Ce*(5*Ve),Ee+=re>>>13,re&=8191,S=Ee,S+=j*Ve,S+=H*He,S+=Z*(5*Ge),S+=M*(5*ut),S+=B*(5*ze),Ee=S>>>13,S&=8191,S+=X*(5*ht),S+=V*(5*dt),S+=Y*(5*Je),S+=J*(5*O),S+=Ce*(5*Ke),Ee+=S>>>13,S&=8191,q=Ee,q+=j*Ke,q+=H*Ve,q+=Z*He,q+=M*(5*Ge),q+=B*(5*ut),Ee=q>>>13,q&=8191,q+=X*(5*ze),q+=V*(5*ht),q+=Y*(5*dt),q+=J*(5*Je),q+=Ce*(5*O),Ee+=q>>>13,q&=8191,Q=Ee,Q+=j*O,Q+=H*Ke,Q+=Z*Ve,Q+=M*He,Q+=B*(5*Ge),Ee=Q>>>13,Q&=8191,Q+=X*(5*ut),Q+=V*(5*ze),Q+=Y*(5*ht),Q+=J*(5*dt),Q+=Ce*(5*Je),Ee+=Q>>>13,Q&=8191,_e=Ee,_e+=j*Je,_e+=H*O,_e+=Z*Ke,_e+=M*Ve,_e+=B*He,Ee=_e>>>13,_e&=8191,_e+=X*(5*Ge),_e+=V*(5*ut),_e+=Y*(5*ze),_e+=J*(5*ht),_e+=Ce*(5*dt),Ee+=_e>>>13,_e&=8191,Oe=Ee,Oe+=j*dt,Oe+=H*Je,Oe+=Z*O,Oe+=M*Ke,Oe+=B*Ve,Ee=Oe>>>13,Oe&=8191,Oe+=X*He,Oe+=V*(5*Ge),Oe+=Y*(5*ut),Oe+=J*(5*ze),Oe+=Ce*(5*ht),Ee+=Oe>>>13,Oe&=8191,xe=Ee,xe+=j*ht,xe+=H*dt,xe+=Z*Je,xe+=M*O,xe+=B*Ke,Ee=xe>>>13,xe&=8191,xe+=X*Ve,xe+=V*He,xe+=Y*(5*Ge),xe+=J*(5*ut),xe+=Ce*(5*ze),Ee+=xe>>>13,xe&=8191,de=Ee,de+=j*ze,de+=H*ht,de+=Z*dt,de+=M*Je,de+=B*O,Ee=de>>>13,de&=8191,de+=X*Ke,de+=V*Ve,de+=Y*He,de+=J*(5*Ge),de+=Ce*(5*ut),Ee+=de>>>13,de&=8191,ve=Ee,ve+=j*ut,ve+=H*ze,ve+=Z*ht,ve+=M*dt,ve+=B*Je,Ee=ve>>>13,ve&=8191,ve+=X*O,ve+=V*Ke,ve+=Y*Ve,ve+=J*He,ve+=Ce*(5*Ge),Ee+=ve>>>13,ve&=8191,he=Ee,he+=j*Ge,he+=H*ut,he+=Z*ze,he+=M*ht,he+=B*dt,Ee=he>>>13,he&=8191,he+=X*Je,he+=V*O,he+=Y*Ke,he+=J*Ve,he+=Ce*He,Ee+=he>>>13,he&=8191,Ee=(Ee<<2)+Ee|0,Ee=Ee+re|0,re=Ee&8191,Ee=Ee>>>13,S+=Ee,j=re,H=S,Z=q,M=Q,B=_e,X=Oe,V=xe,Y=de,J=ve,Ce=he,m+=16,_-=16;this.h[0]=j,this.h[1]=H,this.h[2]=Z,this.h[3]=M,this.h[4]=B,this.h[5]=X,this.h[6]=V,this.h[7]=Y,this.h[8]=J,this.h[9]=Ce},ke.prototype.finish=function(p,m){var _=new Uint16Array(10),a,E,R,U;if(this.leftover){for(U=this.leftover,this.buffer[U++]=1;U<16;U++)this.buffer[U]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(a=this.h[1]>>>13,this.h[1]&=8191,U=2;U<10;U++)this.h[U]+=a,a=this.h[U]>>>13,this.h[U]&=8191;for(this.h[0]+=a*5,a=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=a,a=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=a,_[0]=this.h[0]+5,a=_[0]>>>13,_[0]&=8191,U=1;U<10;U++)_[U]=this.h[U]+a,a=_[U]>>>13,_[U]&=8191;for(_[9]-=8192,E=(a^1)-1,U=0;U<10;U++)_[U]&=E;for(E=~E,U=0;U<10;U++)this.h[U]=this.h[U]&E|_[U];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,R=this.h[0]+this.pad[0],this.h[0]=R&65535,U=1;U<8;U++)R=(this.h[U]+this.pad[U]|0)+(R>>>16)|0,this.h[U]=R&65535;p[m+0]=this.h[0]>>>0&255,p[m+1]=this.h[0]>>>8&255,p[m+2]=this.h[1]>>>0&255,p[m+3]=this.h[1]>>>8&255,p[m+4]=this.h[2]>>>0&255,p[m+5]=this.h[2]>>>8&255,p[m+6]=this.h[3]>>>0&255,p[m+7]=this.h[3]>>>8&255,p[m+8]=this.h[4]>>>0&255,p[m+9]=this.h[4]>>>8&255,p[m+10]=this.h[5]>>>0&255,p[m+11]=this.h[5]>>>8&255,p[m+12]=this.h[6]>>>0&255,p[m+13]=this.h[6]>>>8&255,p[m+14]=this.h[7]>>>0&255,p[m+15]=this.h[7]>>>8&255},ke.prototype.update=function(p,m,_){var a,E;if(this.leftover){for(E=16-this.leftover,E>_&&(E=_),a=0;a<E;a++)this.buffer[this.leftover+a]=p[m+a];if(_-=E,m+=E,this.leftover+=E,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(_>=16&&(E=_-_%16,this.blocks(p,m,E),m+=E,_-=E),_){for(a=0;a<_;a++)this.buffer[this.leftover+a]=p[m+a];this.leftover+=_}};function Ye(p,m,_,a,E,R){var U=new ke(R);return U.update(_,a,E),U.finish(p,m),0}function it(p,m,_,a,E,R){var U=new Uint8Array(16);return Ye(U,0,_,a,E,R),y(p,m,U,0)}function Ie(p,m,_,a,E){var R;if(_<32)return-1;for(ae(p,0,m,0,_,a,E),Ye(p,16,p,32,_-32,p),R=0;R<16;R++)p[R]=0;return 0}function mt(p,m,_,a,E){var R,U=new Uint8Array(32);if(_<32||(z(U,0,32,a,E),it(m,16,m,32,_-32,U)!==0))return-1;for(ae(p,0,m,0,_,a,E),R=0;R<32;R++)p[R]=0;return 0}function We(p,m){var _;for(_=0;_<16;_++)p[_]=m[_]|0}function je(p){var m,_,a=1;for(m=0;m<16;m++)_=p[m]+a+65535,a=Math.floor(_/65536),p[m]=_-a*65536;p[0]+=a-1+37*(a-1)}function me(p,m,_){for(var a,E=~(_-1),R=0;R<16;R++)a=E&(p[R]^m[R]),p[R]^=a,m[R]^=a}function rt(p,m){var _,a,E,R=n(),U=n();for(_=0;_<16;_++)U[_]=m[_];for(je(U),je(U),je(U),a=0;a<2;a++){for(R[0]=U[0]-65517,_=1;_<15;_++)R[_]=U[_]-65535-(R[_-1]>>16&1),R[_-1]&=65535;R[15]=U[15]-32767-(R[14]>>16&1),E=R[15]>>16&1,R[14]&=65535,me(U,R,1-E)}for(_=0;_<16;_++)p[2*_]=U[_]&255,p[2*_+1]=U[_]>>8}function Bt(p,m){var _=new Uint8Array(32),a=new Uint8Array(32);return rt(_,p),rt(a,m),x(_,0,a,0)}function Xe(p){var m=new Uint8Array(32);return rt(m,p),m[0]&1}function Ct(p,m){var _;for(_=0;_<16;_++)p[_]=m[2*_]+(m[2*_+1]<<8);p[15]&=32767}function Qe(p,m,_){for(var a=0;a<16;a++)p[a]=m[a]+_[a]}function tn(p,m,_){for(var a=0;a<16;a++)p[a]=m[a]-_[a]}function Pe(p,m,_){var a,E,R=0,U=0,W=0,oe=0,Ae=0,ge=0,Ze=0,Ee=0,re=0,S=0,q=0,Q=0,_e=0,Oe=0,xe=0,de=0,ve=0,he=0,j=0,H=0,Z=0,M=0,B=0,X=0,V=0,Y=0,J=0,Ce=0,He=0,Ve=0,Ke=0,O=_[0],Je=_[1],dt=_[2],ht=_[3],ze=_[4],ut=_[5],Ge=_[6],qt=_[7],bt=_[8],Te=_[9],Dt=_[10],et=_[11],Fe=_[12],Wt=_[13],Ft=_[14],Zt=_[15];a=m[0],R+=a*O,U+=a*Je,W+=a*dt,oe+=a*ht,Ae+=a*ze,ge+=a*ut,Ze+=a*Ge,Ee+=a*qt,re+=a*bt,S+=a*Te,q+=a*Dt,Q+=a*et,_e+=a*Fe,Oe+=a*Wt,xe+=a*Ft,de+=a*Zt,a=m[1],U+=a*O,W+=a*Je,oe+=a*dt,Ae+=a*ht,ge+=a*ze,Ze+=a*ut,Ee+=a*Ge,re+=a*qt,S+=a*bt,q+=a*Te,Q+=a*Dt,_e+=a*et,Oe+=a*Fe,xe+=a*Wt,de+=a*Ft,ve+=a*Zt,a=m[2],W+=a*O,oe+=a*Je,Ae+=a*dt,ge+=a*ht,Ze+=a*ze,Ee+=a*ut,re+=a*Ge,S+=a*qt,q+=a*bt,Q+=a*Te,_e+=a*Dt,Oe+=a*et,xe+=a*Fe,de+=a*Wt,ve+=a*Ft,he+=a*Zt,a=m[3],oe+=a*O,Ae+=a*Je,ge+=a*dt,Ze+=a*ht,Ee+=a*ze,re+=a*ut,S+=a*Ge,q+=a*qt,Q+=a*bt,_e+=a*Te,Oe+=a*Dt,xe+=a*et,de+=a*Fe,ve+=a*Wt,he+=a*Ft,j+=a*Zt,a=m[4],Ae+=a*O,ge+=a*Je,Ze+=a*dt,Ee+=a*ht,re+=a*ze,S+=a*ut,q+=a*Ge,Q+=a*qt,_e+=a*bt,Oe+=a*Te,xe+=a*Dt,de+=a*et,ve+=a*Fe,he+=a*Wt,j+=a*Ft,H+=a*Zt,a=m[5],ge+=a*O,Ze+=a*Je,Ee+=a*dt,re+=a*ht,S+=a*ze,q+=a*ut,Q+=a*Ge,_e+=a*qt,Oe+=a*bt,xe+=a*Te,de+=a*Dt,ve+=a*et,he+=a*Fe,j+=a*Wt,H+=a*Ft,Z+=a*Zt,a=m[6],Ze+=a*O,Ee+=a*Je,re+=a*dt,S+=a*ht,q+=a*ze,Q+=a*ut,_e+=a*Ge,Oe+=a*qt,xe+=a*bt,de+=a*Te,ve+=a*Dt,he+=a*et,j+=a*Fe,H+=a*Wt,Z+=a*Ft,M+=a*Zt,a=m[7],Ee+=a*O,re+=a*Je,S+=a*dt,q+=a*ht,Q+=a*ze,_e+=a*ut,Oe+=a*Ge,xe+=a*qt,de+=a*bt,ve+=a*Te,he+=a*Dt,j+=a*et,H+=a*Fe,Z+=a*Wt,M+=a*Ft,B+=a*Zt,a=m[8],re+=a*O,S+=a*Je,q+=a*dt,Q+=a*ht,_e+=a*ze,Oe+=a*ut,xe+=a*Ge,de+=a*qt,ve+=a*bt,he+=a*Te,j+=a*Dt,H+=a*et,Z+=a*Fe,M+=a*Wt,B+=a*Ft,X+=a*Zt,a=m[9],S+=a*O,q+=a*Je,Q+=a*dt,_e+=a*ht,Oe+=a*ze,xe+=a*ut,de+=a*Ge,ve+=a*qt,he+=a*bt,j+=a*Te,H+=a*Dt,Z+=a*et,M+=a*Fe,B+=a*Wt,X+=a*Ft,V+=a*Zt,a=m[10],q+=a*O,Q+=a*Je,_e+=a*dt,Oe+=a*ht,xe+=a*ze,de+=a*ut,ve+=a*Ge,he+=a*qt,j+=a*bt,H+=a*Te,Z+=a*Dt,M+=a*et,B+=a*Fe,X+=a*Wt,V+=a*Ft,Y+=a*Zt,a=m[11],Q+=a*O,_e+=a*Je,Oe+=a*dt,xe+=a*ht,de+=a*ze,ve+=a*ut,he+=a*Ge,j+=a*qt,H+=a*bt,Z+=a*Te,M+=a*Dt,B+=a*et,X+=a*Fe,V+=a*Wt,Y+=a*Ft,J+=a*Zt,a=m[12],_e+=a*O,Oe+=a*Je,xe+=a*dt,de+=a*ht,ve+=a*ze,he+=a*ut,j+=a*Ge,H+=a*qt,Z+=a*bt,M+=a*Te,B+=a*Dt,X+=a*et,V+=a*Fe,Y+=a*Wt,J+=a*Ft,Ce+=a*Zt,a=m[13],Oe+=a*O,xe+=a*Je,de+=a*dt,ve+=a*ht,he+=a*ze,j+=a*ut,H+=a*Ge,Z+=a*qt,M+=a*bt,B+=a*Te,X+=a*Dt,V+=a*et,Y+=a*Fe,J+=a*Wt,Ce+=a*Ft,He+=a*Zt,a=m[14],xe+=a*O,de+=a*Je,ve+=a*dt,he+=a*ht,j+=a*ze,H+=a*ut,Z+=a*Ge,M+=a*qt,B+=a*bt,X+=a*Te,V+=a*Dt,Y+=a*et,J+=a*Fe,Ce+=a*Wt,He+=a*Ft,Ve+=a*Zt,a=m[15],de+=a*O,ve+=a*Je,he+=a*dt,j+=a*ht,H+=a*ze,Z+=a*ut,M+=a*Ge,B+=a*qt,X+=a*bt,V+=a*Te,Y+=a*Dt,J+=a*et,Ce+=a*Fe,He+=a*Wt,Ve+=a*Ft,Ke+=a*Zt,R+=38*ve,U+=38*he,W+=38*j,oe+=38*H,Ae+=38*Z,ge+=38*M,Ze+=38*B,Ee+=38*X,re+=38*V,S+=38*Y,q+=38*J,Q+=38*Ce,_e+=38*He,Oe+=38*Ve,xe+=38*Ke,E=1,a=R+E+65535,E=Math.floor(a/65536),R=a-E*65536,a=U+E+65535,E=Math.floor(a/65536),U=a-E*65536,a=W+E+65535,E=Math.floor(a/65536),W=a-E*65536,a=oe+E+65535,E=Math.floor(a/65536),oe=a-E*65536,a=Ae+E+65535,E=Math.floor(a/65536),Ae=a-E*65536,a=ge+E+65535,E=Math.floor(a/65536),ge=a-E*65536,a=Ze+E+65535,E=Math.floor(a/65536),Ze=a-E*65536,a=Ee+E+65535,E=Math.floor(a/65536),Ee=a-E*65536,a=re+E+65535,E=Math.floor(a/65536),re=a-E*65536,a=S+E+65535,E=Math.floor(a/65536),S=a-E*65536,a=q+E+65535,E=Math.floor(a/65536),q=a-E*65536,a=Q+E+65535,E=Math.floor(a/65536),Q=a-E*65536,a=_e+E+65535,E=Math.floor(a/65536),_e=a-E*65536,a=Oe+E+65535,E=Math.floor(a/65536),Oe=a-E*65536,a=xe+E+65535,E=Math.floor(a/65536),xe=a-E*65536,a=de+E+65535,E=Math.floor(a/65536),de=a-E*65536,R+=E-1+37*(E-1),E=1,a=R+E+65535,E=Math.floor(a/65536),R=a-E*65536,a=U+E+65535,E=Math.floor(a/65536),U=a-E*65536,a=W+E+65535,E=Math.floor(a/65536),W=a-E*65536,a=oe+E+65535,E=Math.floor(a/65536),oe=a-E*65536,a=Ae+E+65535,E=Math.floor(a/65536),Ae=a-E*65536,a=ge+E+65535,E=Math.floor(a/65536),ge=a-E*65536,a=Ze+E+65535,E=Math.floor(a/65536),Ze=a-E*65536,a=Ee+E+65535,E=Math.floor(a/65536),Ee=a-E*65536,a=re+E+65535,E=Math.floor(a/65536),re=a-E*65536,a=S+E+65535,E=Math.floor(a/65536),S=a-E*65536,a=q+E+65535,E=Math.floor(a/65536),q=a-E*65536,a=Q+E+65535,E=Math.floor(a/65536),Q=a-E*65536,a=_e+E+65535,E=Math.floor(a/65536),_e=a-E*65536,a=Oe+E+65535,E=Math.floor(a/65536),Oe=a-E*65536,a=xe+E+65535,E=Math.floor(a/65536),xe=a-E*65536,a=de+E+65535,E=Math.floor(a/65536),de=a-E*65536,R+=E-1+37*(E-1),p[0]=R,p[1]=U,p[2]=W,p[3]=oe,p[4]=Ae,p[5]=ge,p[6]=Ze,p[7]=Ee,p[8]=re,p[9]=S,p[10]=q,p[11]=Q,p[12]=_e,p[13]=Oe,p[14]=xe,p[15]=de}function Nt(p,m){Pe(p,m,m)}function xn(p,m){var _=n(),a;for(a=0;a<16;a++)_[a]=m[a];for(a=253;a>=0;a--)Nt(_,_),a!==2&&a!==4&&Pe(_,_,m);for(a=0;a<16;a++)p[a]=_[a]}function rn(p,m){var _=n(),a;for(a=0;a<16;a++)_[a]=m[a];for(a=250;a>=0;a--)Nt(_,_),a!==1&&Pe(_,_,m);for(a=0;a<16;a++)p[a]=_[a]}function Dn(p,m,_){var a=new Uint8Array(32),E=new Float64Array(80),R,U,W=n(),oe=n(),Ae=n(),ge=n(),Ze=n(),Ee=n();for(U=0;U<31;U++)a[U]=m[U];for(a[31]=m[31]&127|64,a[0]&=248,Ct(E,_),U=0;U<16;U++)oe[U]=E[U],ge[U]=W[U]=Ae[U]=0;for(W[0]=ge[0]=1,U=254;U>=0;--U)R=a[U>>>3]>>>(U&7)&1,me(W,oe,R),me(Ae,ge,R),Qe(Ze,W,Ae),tn(W,W,Ae),Qe(Ae,oe,ge),tn(oe,oe,ge),Nt(ge,Ze),Nt(Ee,W),Pe(W,Ae,W),Pe(Ae,oe,Ze),Qe(Ze,W,Ae),tn(W,W,Ae),Nt(oe,W),tn(Ae,ge,Ee),Pe(W,Ae,l),Qe(W,W,ge),Pe(Ae,Ae,W),Pe(W,ge,Ee),Pe(ge,oe,E),Nt(oe,Ze),me(W,oe,R),me(Ae,ge,R);for(U=0;U<16;U++)E[U+16]=W[U],E[U+32]=Ae[U],E[U+48]=oe[U],E[U+64]=ge[U];var re=E.subarray(32),S=E.subarray(16);return xn(re,re),Pe(S,S,re),rt(p,S),0}function Qt(p,m){return Dn(p,m,i)}function Ar(p,m){return s(m,32),Qt(p,m)}function k(p,m,_){var a=new Uint8Array(32);return Dn(a,_,m),D(p,r,a,v)}var P=Ie,K=mt;function ee(p,m,_,a,E,R){var U=new Uint8Array(32);return k(U,E,R),P(p,m,_,a,U)}function $(p,m,_,a,E,R){var U=new Uint8Array(32);return k(U,E,R),K(p,m,_,a,U)}var te=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ue(p,m,_,a){for(var E=new Int32Array(16),R=new Int32Array(16),U,W,oe,Ae,ge,Ze,Ee,re,S,q,Q,_e,Oe,xe,de,ve,he,j,H,Z,M,B,X,V,Y,J,Ce=p[0],He=p[1],Ve=p[2],Ke=p[3],O=p[4],Je=p[5],dt=p[6],ht=p[7],ze=m[0],ut=m[1],Ge=m[2],qt=m[3],bt=m[4],Te=m[5],Dt=m[6],et=m[7],Fe=0;a>=128;){for(H=0;H<16;H++)Z=8*H+Fe,E[H]=_[Z+0]<<24|_[Z+1]<<16|_[Z+2]<<8|_[Z+3],R[H]=_[Z+4]<<24|_[Z+5]<<16|_[Z+6]<<8|_[Z+7];for(H=0;H<80;H++)if(U=Ce,W=He,oe=Ve,Ae=Ke,ge=O,Ze=Je,Ee=dt,re=ht,S=ze,q=ut,Q=Ge,_e=qt,Oe=bt,xe=Te,de=Dt,ve=et,M=ht,B=et,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=(O>>>14|bt<<18)^(O>>>18|bt<<14)^(bt>>>9|O<<23),B=(bt>>>14|O<<18)^(bt>>>18|O<<14)^(O>>>9|bt<<23),X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,M=O&Je^~O&dt,B=bt&Te^~bt&Dt,X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,M=te[H*2],B=te[H*2+1],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,M=E[H%16],B=R[H%16],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,he=Y&65535|J<<16,j=X&65535|V<<16,M=he,B=j,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=(Ce>>>28|ze<<4)^(ze>>>2|Ce<<30)^(ze>>>7|Ce<<25),B=(ze>>>28|Ce<<4)^(Ce>>>2|ze<<30)^(Ce>>>7|ze<<25),X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,M=Ce&He^Ce&Ve^He&Ve,B=ze&ut^ze&Ge^ut&Ge,X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,re=Y&65535|J<<16,ve=X&65535|V<<16,M=Ae,B=_e,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=he,B=j,X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,Ae=Y&65535|J<<16,_e=X&65535|V<<16,He=U,Ve=W,Ke=oe,O=Ae,Je=ge,dt=Ze,ht=Ee,Ce=re,ut=S,Ge=q,qt=Q,bt=_e,Te=Oe,Dt=xe,et=de,ze=ve,H%16===15)for(Z=0;Z<16;Z++)M=E[Z],B=R[Z],X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=E[(Z+9)%16],B=R[(Z+9)%16],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,he=E[(Z+1)%16],j=R[(Z+1)%16],M=(he>>>1|j<<31)^(he>>>8|j<<24)^he>>>7,B=(j>>>1|he<<31)^(j>>>8|he<<24)^(j>>>7|he<<25),X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,he=E[(Z+14)%16],j=R[(Z+14)%16],M=(he>>>19|j<<13)^(j>>>29|he<<3)^he>>>6,B=(j>>>19|he<<13)^(he>>>29|j<<3)^(j>>>6|he<<26),X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,E[Z]=Y&65535|J<<16,R[Z]=X&65535|V<<16;M=Ce,B=ze,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=p[0],B=m[0],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,p[0]=Ce=Y&65535|J<<16,m[0]=ze=X&65535|V<<16,M=He,B=ut,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=p[1],B=m[1],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,p[1]=He=Y&65535|J<<16,m[1]=ut=X&65535|V<<16,M=Ve,B=Ge,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=p[2],B=m[2],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,p[2]=Ve=Y&65535|J<<16,m[2]=Ge=X&65535|V<<16,M=Ke,B=qt,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=p[3],B=m[3],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,p[3]=Ke=Y&65535|J<<16,m[3]=qt=X&65535|V<<16,M=O,B=bt,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=p[4],B=m[4],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,p[4]=O=Y&65535|J<<16,m[4]=bt=X&65535|V<<16,M=Je,B=Te,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=p[5],B=m[5],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,p[5]=Je=Y&65535|J<<16,m[5]=Te=X&65535|V<<16,M=dt,B=Dt,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=p[6],B=m[6],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,p[6]=dt=Y&65535|J<<16,m[6]=Dt=X&65535|V<<16,M=ht,B=et,X=B&65535,V=B>>>16,Y=M&65535,J=M>>>16,M=p[7],B=m[7],X+=B&65535,V+=B>>>16,Y+=M&65535,J+=M>>>16,V+=X>>>16,Y+=V>>>16,J+=Y>>>16,p[7]=ht=Y&65535|J<<16,m[7]=et=X&65535|V<<16,Fe+=128,a-=128}return a}function le(p,m,_){var a=new Int32Array(8),E=new Int32Array(8),R=new Uint8Array(256),U,W=_;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,E[0]=4089235720,E[1]=2227873595,E[2]=4271175723,E[3]=1595750129,E[4]=2917565137,E[5]=725511199,E[6]=4215389547,E[7]=327033209,ue(a,E,m,_),_%=128,U=0;U<_;U++)R[U]=m[W-_+U];for(R[_]=128,_=256-128*(_<112?1:0),R[_-9]=0,b(R,_-8,W/536870912|0,W<<3),ue(a,E,R,_),U=0;U<8;U++)b(p,8*U,a[U],E[U]);return 0}function ce(p,m){var _=n(),a=n(),E=n(),R=n(),U=n(),W=n(),oe=n(),Ae=n(),ge=n();tn(_,p[1],p[0]),tn(ge,m[1],m[0]),Pe(_,_,ge),Qe(a,p[0],p[1]),Qe(ge,m[0],m[1]),Pe(a,a,ge),Pe(E,p[3],m[3]),Pe(E,E,u),Pe(R,p[2],m[2]),Qe(R,R,R),tn(U,a,_),tn(W,R,E),Qe(oe,R,E),Qe(Ae,a,_),Pe(p[0],U,W),Pe(p[1],Ae,oe),Pe(p[2],oe,W),Pe(p[3],U,Ae)}function ne(p,m,_){var a;for(a=0;a<4;a++)me(p[a],m[a],_)}function Re(p,m){var _=n(),a=n(),E=n();xn(E,m[2]),Pe(_,m[0],E),Pe(a,m[1],E),rt(p,a),p[31]^=Xe(_)<<7}function pe(p,m,_){var a,E;for(We(p[0],o),We(p[1],c),We(p[2],c),We(p[3],o),E=255;E>=0;--E)a=_[E/8|0]>>(E&7)&1,ne(p,m,a),ce(m,p),ce(p,p),ne(p,m,a)}function we(p,m){var _=[n(),n(),n(),n()];We(_[0],h),We(_[1],f),We(_[2],c),Pe(_[3],h,f),pe(p,_,m)}function Ne(p,m,_){var a=new Uint8Array(64),E=[n(),n(),n(),n()],R;for(_||s(m,32),le(a,m,32),a[0]&=248,a[31]&=127,a[31]|=64,we(E,a),Re(p,E),R=0;R<32;R++)m[R+32]=p[R];return 0}var Ue=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Be(p,m){var _,a,E,R;for(a=63;a>=32;--a){for(_=0,E=a-32,R=a-12;E<R;++E)m[E]+=_-16*m[a]*Ue[E-(a-32)],_=Math.floor((m[E]+128)/256),m[E]-=_*256;m[E]+=_,m[a]=0}for(_=0,E=0;E<32;E++)m[E]+=_-(m[31]>>4)*Ue[E],_=m[E]>>8,m[E]&=255;for(E=0;E<32;E++)m[E]-=_*Ue[E];for(a=0;a<32;a++)m[a+1]+=m[a]>>8,p[a]=m[a]&255}function lt(p){var m=new Float64Array(64),_;for(_=0;_<64;_++)m[_]=p[_];for(_=0;_<64;_++)p[_]=0;Be(p,m)}function Tt(p,m,_,a){var E=new Uint8Array(64),R=new Uint8Array(64),U=new Uint8Array(64),W,oe,Ae=new Float64Array(64),ge=[n(),n(),n(),n()];le(E,a,32),E[0]&=248,E[31]&=127,E[31]|=64;var Ze=_+64;for(W=0;W<_;W++)p[64+W]=m[W];for(W=0;W<32;W++)p[32+W]=E[32+W];for(le(U,p.subarray(32),_+32),lt(U),we(ge,U),Re(p,ge),W=32;W<64;W++)p[W]=a[W];for(le(R,p,_+64),lt(R),W=0;W<64;W++)Ae[W]=0;for(W=0;W<32;W++)Ae[W]=U[W];for(W=0;W<32;W++)for(oe=0;oe<32;oe++)Ae[W+oe]+=R[W]*E[oe];return Be(p.subarray(32),Ae),Ze}function jt(p,m){var _=n(),a=n(),E=n(),R=n(),U=n(),W=n(),oe=n();return We(p[2],c),Ct(p[1],m),Nt(E,p[1]),Pe(R,E,d),tn(E,E,p[2]),Qe(R,p[2],R),Nt(U,R),Nt(W,U),Pe(oe,W,U),Pe(_,oe,E),Pe(_,_,R),rn(_,_),Pe(_,_,E),Pe(_,_,R),Pe(_,_,R),Pe(p[0],_,R),Nt(a,p[0]),Pe(a,a,R),Bt(a,E)&&Pe(p[0],p[0],g),Nt(a,p[0]),Pe(a,a,R),Bt(a,E)?-1:(Xe(p[0])===m[31]>>7&&tn(p[0],o,p[0]),Pe(p[3],p[0],p[1]),0)}function Xt(p,m,_,a){var E,R=new Uint8Array(32),U=new Uint8Array(64),W=[n(),n(),n(),n()],oe=[n(),n(),n(),n()];if(_<64||jt(oe,a))return-1;for(E=0;E<_;E++)p[E]=m[E];for(E=0;E<32;E++)p[E+32]=a[E];if(le(U,p,_),lt(U),pe(W,oe,U),we(oe,m.subarray(32)),ce(W,oe),Re(R,W),_-=64,x(m,0,R,0)){for(E=0;E<_;E++)p[E]=0;return-1}for(E=0;E<_;E++)p[E]=m[E+64];return _}var en=32,sn=24,an=32,_t=16,Lt=32,On=32,cn=32,Xn=32,Un=32,lr=sn,Gr=an,Sn=_t,C=64,G=32,se=64,Le=32,Pt=64;t.lowlevel={crypto_core_hsalsa20:D,crypto_stream_xor:ae,crypto_stream:z,crypto_stream_salsa20_xor:N,crypto_stream_salsa20:I,crypto_onetimeauth:Ye,crypto_onetimeauth_verify:it,crypto_verify_16:y,crypto_verify_32:x,crypto_secretbox:Ie,crypto_secretbox_open:mt,crypto_scalarmult:Dn,crypto_scalarmult_base:Qt,crypto_box_beforenm:k,crypto_box_afternm:P,crypto_box:ee,crypto_box_open:$,crypto_box_keypair:Ar,crypto_hash:le,crypto_sign:Tt,crypto_sign_keypair:Ne,crypto_sign_open:Xt,crypto_secretbox_KEYBYTES:en,crypto_secretbox_NONCEBYTES:sn,crypto_secretbox_ZEROBYTES:an,crypto_secretbox_BOXZEROBYTES:_t,crypto_scalarmult_BYTES:Lt,crypto_scalarmult_SCALARBYTES:On,crypto_box_PUBLICKEYBYTES:cn,crypto_box_SECRETKEYBYTES:Xn,crypto_box_BEFORENMBYTES:Un,crypto_box_NONCEBYTES:lr,crypto_box_ZEROBYTES:Gr,crypto_box_BOXZEROBYTES:Sn,crypto_sign_BYTES:C,crypto_sign_PUBLICKEYBYTES:G,crypto_sign_SECRETKEYBYTES:se,crypto_sign_SEEDBYTES:Le,crypto_hash_BYTES:Pt,gf:n,D:d,L:Ue,pack25519:rt,unpack25519:Ct,M:Pe,A:Qe,S:Nt,Z:tn,pow2523:rn,add:ce,set25519:We,modL:Be,scalarmult:pe,scalarbase:we};function It(p,m){if(p.length!==en)throw new Error("bad key size");if(m.length!==sn)throw new Error("bad nonce size")}function Se(p,m){if(p.length!==cn)throw new Error("bad public key size");if(m.length!==Xn)throw new Error("bad secret key size")}function fe(){for(var p=0;p<arguments.length;p++)if(!(arguments[p]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function De(p){for(var m=0;m<p.length;m++)p[m]=0}t.randomBytes=function(p){var m=new Uint8Array(p);return s(m,p),m},t.secretbox=function(p,m,_){fe(p,m,_),It(_,m);for(var a=new Uint8Array(an+p.length),E=new Uint8Array(a.length),R=0;R<p.length;R++)a[R+an]=p[R];return Ie(E,a,a.length,m,_),E.subarray(_t)},t.secretbox.open=function(p,m,_){fe(p,m,_),It(_,m);for(var a=new Uint8Array(_t+p.length),E=new Uint8Array(a.length),R=0;R<p.length;R++)a[R+_t]=p[R];return a.length<32||mt(E,a,a.length,m,_)!==0?null:E.subarray(an)},t.secretbox.keyLength=en,t.secretbox.nonceLength=sn,t.secretbox.overheadLength=_t,t.scalarMult=function(p,m){if(fe(p,m),p.length!==On)throw new Error("bad n size");if(m.length!==Lt)throw new Error("bad p size");var _=new Uint8Array(Lt);return Dn(_,p,m),_},t.scalarMult.base=function(p){if(fe(p),p.length!==On)throw new Error("bad n size");var m=new Uint8Array(Lt);return Qt(m,p),m},t.scalarMult.scalarLength=On,t.scalarMult.groupElementLength=Lt,t.box=function(p,m,_,a){var E=t.box.before(_,a);return t.secretbox(p,m,E)},t.box.before=function(p,m){fe(p,m),Se(p,m);var _=new Uint8Array(Un);return k(_,p,m),_},t.box.after=t.secretbox,t.box.open=function(p,m,_,a){var E=t.box.before(_,a);return t.secretbox.open(p,m,E)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var p=new Uint8Array(cn),m=new Uint8Array(Xn);return Ar(p,m),{publicKey:p,secretKey:m}},t.box.keyPair.fromSecretKey=function(p){if(fe(p),p.length!==Xn)throw new Error("bad secret key size");var m=new Uint8Array(cn);return Qt(m,p),{publicKey:m,secretKey:new Uint8Array(p)}},t.box.publicKeyLength=cn,t.box.secretKeyLength=Xn,t.box.sharedKeyLength=Un,t.box.nonceLength=lr,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(p,m){if(fe(p,m),m.length!==se)throw new Error("bad secret key size");var _=new Uint8Array(C+p.length);return Tt(_,p,p.length,m),_},t.sign.open=function(p,m){if(fe(p,m),m.length!==G)throw new Error("bad public key size");var _=new Uint8Array(p.length),a=Xt(_,p,p.length,m);if(a<0)return null;for(var E=new Uint8Array(a),R=0;R<E.length;R++)E[R]=_[R];return E},t.sign.detached=function(p,m){for(var _=t.sign(p,m),a=new Uint8Array(C),E=0;E<a.length;E++)a[E]=_[E];return a},t.sign.detached.verify=function(p,m,_){if(fe(p,m,_),m.length!==C)throw new Error("bad signature size");if(_.length!==G)throw new Error("bad public key size");var a=new Uint8Array(C+p.length),E=new Uint8Array(C+p.length),R;for(R=0;R<C;R++)a[R]=m[R];for(R=0;R<p.length;R++)a[R+C]=p[R];return Xt(E,a,a.length,_)>=0},t.sign.keyPair=function(){var p=new Uint8Array(G),m=new Uint8Array(se);return Ne(p,m),{publicKey:p,secretKey:m}},t.sign.keyPair.fromSecretKey=function(p){if(fe(p),p.length!==se)throw new Error("bad secret key size");for(var m=new Uint8Array(G),_=0;_<m.length;_++)m[_]=p[32+_];return{publicKey:m,secretKey:new Uint8Array(p)}},t.sign.keyPair.fromSeed=function(p){if(fe(p),p.length!==Le)throw new Error("bad seed size");for(var m=new Uint8Array(G),_=new Uint8Array(se),a=0;a<32;a++)_[a]=p[a];return Ne(m,_,!0),{publicKey:m,secretKey:_}},t.sign.publicKeyLength=G,t.sign.secretKeyLength=se,t.sign.seedLength=Le,t.sign.signatureLength=C,t.hash=function(p){fe(p);var m=new Uint8Array(Pt);return le(m,p,p.length),m},t.hash.hashLength=Pt,t.verify=function(p,m){return fe(p,m),p.length===0||m.length===0||p.length!==m.length?!1:w(p,0,m,0,p.length)===0},t.setPRNG=function(p){s=p},(function(){var p=typeof self<"u"?self.crypto||self.msCrypto:null;if(p&&p.getRandomValues){var m=65536;t.setPRNG(function(_,a){var E,R=new Uint8Array(a);for(E=0;E<a;E+=m)p.getRandomValues(R.subarray(E,E+Math.min(a-E,m)));for(E=0;E<a;E++)_[E]=R[E];De(R)})}else typeof cp<"u"&&(p=fp,p&&p.randomBytes&&t.setPRNG(function(_,a){var E,R=p.randomBytes(a);for(E=0;E<a;E++)_[E]=R[E];De(R)}))})()})(e.exports?e.exports:self.nacl=self.nacl||{})})(wo)),wo.exports}var Nc;function $i(){if(Nc)return Yr;Nc=1;var e=Yr&&Yr.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Yr,"__esModule",{value:!0});const t=e(dp());return Yr.default=t.default,Yr}var Mc;function hp(){if(Mc)return Nr;Mc=1;var e=Nr&&Nr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.KP=void 0;const t=Ji(),n=as(),s=e($i());class r{seed;constructor(o){this.seed=o}getRawSeed(){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);return t.Codec.decodeSeed(this.seed).buf}getSeed(){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);return this.seed}getPublicKey(){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);const o=t.Codec.decodeSeed(this.seed),c=s.default.sign.keyPair.fromSeed(this.getRawSeed()),l=t.Codec.encode(o.prefix,c.publicKey);return new TextDecoder().decode(l)}getPrivateKey(){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);const o=s.default.sign.keyPair.fromSeed(this.getRawSeed());return t.Codec.encode(n.Prefix.Private,o.secretKey)}sign(o){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);const c=s.default.sign.keyPair.fromSeed(this.getRawSeed());return s.default.sign.detached(o,c.secretKey)}verify(o,c){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);const l=s.default.sign.keyPair.fromSeed(this.getRawSeed());return s.default.sign.detached.verify(o,c,l.publicKey)}clear(){this.seed&&(this.seed.fill(0),this.seed=void 0)}seal(o,c,l){throw new n.NKeysError(n.NKeysErrorCode.InvalidNKeyOperation)}open(o,c){throw new n.NKeysError(n.NKeysErrorCode.InvalidNKeyOperation)}}return Nr.KP=r,Nr}var Mr={},Lc;function pp(){if(Lc)return Mr;Lc=1;var e=Mr&&Mr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.PublicKey=void 0;const t=Ji(),n=as(),s=e($i());class r{publicKey;constructor(o){this.publicKey=o}getPublicKey(){if(!this.publicKey)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);return new TextDecoder().decode(this.publicKey)}getPrivateKey(){throw this.publicKey?new n.NKeysError(n.NKeysErrorCode.PublicKeyOnly):new n.NKeysError(n.NKeysErrorCode.ClearedPair)}getSeed(){throw this.publicKey?new n.NKeysError(n.NKeysErrorCode.PublicKeyOnly):new n.NKeysError(n.NKeysErrorCode.ClearedPair)}sign(o){throw this.publicKey?new n.NKeysError(n.NKeysErrorCode.CannotSign):new n.NKeysError(n.NKeysErrorCode.ClearedPair)}verify(o,c){if(!this.publicKey)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);const l=t.Codec._decode(this.publicKey);return s.default.sign.detached.verify(o,c,l.slice(1))}clear(){this.publicKey&&(this.publicKey.fill(0),this.publicKey=void 0)}seal(o,c,l){throw new n.NKeysError(n.NKeysErrorCode.InvalidNKeyOperation)}open(o,c){throw new n.NKeysError(n.NKeysErrorCode.InvalidNKeyOperation)}}return Mr.PublicKey=r,Mr}var xs={},Dc;function gp(){return Dc||(Dc=1,(function(e){var t=xs&&xs.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.CurveKP=e.curveNonceLen=e.curveKeyLen=void 0;const n=as(),s=t($i()),r=Ji(),i=as(),o=Lu(),c=Mu();e.curveKeyLen=32;const l=35;e.curveNonceLen=24;const d=[120,107,118,49];class u{seed;constructor(f){this.seed=f}clear(){this.seed&&(this.seed.fill(0),this.seed=void 0)}getPrivateKey(){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);return r.Codec.encode(i.Prefix.Private,this.seed)}getPublicKey(){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);const f=s.default.scalarMult.base(this.seed),g=r.Codec.encode(i.Prefix.Curve,f);return new TextDecoder().decode(g)}getSeed(){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);return r.Codec.encodeSeed(i.Prefix.Curve,this.seed)}sign(){throw new n.NKeysError(n.NKeysErrorCode.InvalidCurveOperation)}verify(){throw new n.NKeysError(n.NKeysErrorCode.InvalidCurveOperation)}decodePubCurveKey(f){try{const g=o.base32.decode(new TextEncoder().encode(f));if(g.byteLength!==l)throw new n.NKeysError(n.NKeysErrorCode.InvalidCurveKey);if(g[0]!==i.Prefix.Curve)throw new n.NKeysError(n.NKeysErrorCode.InvalidPublicKey);const b=g.byteLength-2,y=new DataView(g.buffer).getUint16(b,!0),x=g.slice(0,b);if(!c.crc16.validate(x,y))throw new n.NKeysError(n.NKeysErrorCode.InvalidChecksum);return x.slice(1)}catch(g){throw new n.NKeysError(n.NKeysErrorCode.InvalidRecipient,{cause:g})}}seal(f,g,b){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);b||(b=s.default.randomBytes(e.curveNonceLen));const w=this.decodePubCurveKey(g),y=new Uint8Array(d.length+e.curveNonceLen);y.set(d,0),y.set(b,d.length);const x=s.default.box(f,b,w,this.seed),T=new Uint8Array(y.length+x.length);return T.set(y),T.set(x,y.length),T}open(f,g){if(!this.seed)throw new n.NKeysError(n.NKeysErrorCode.ClearedPair);if(f.length<=e.curveNonceLen+d.length)throw new n.NKeysError(n.NKeysErrorCode.InvalidEncrypted);for(let y=0;y<d.length;y++)if(f[y]!==d[y])throw new n.NKeysError(n.NKeysErrorCode.InvalidEncrypted);const b=this.decodePubCurveKey(g);f=f.slice(d.length);const w=f.slice(0,e.curveNonceLen);return f=f.slice(e.curveNonceLen),s.default.box.open(f,w,b,this.seed)}}e.CurveKP=u})(xs)),xs}var Uc;function as(){if(Uc)return Ht;Uc=1;var e=Ht&&Ht.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.NKeysError=Ht.NKeysErrorCode=Ht.Prefixes=Ht.Prefix=void 0,Ht.createPair=o,Ht.createOperator=c,Ht.createAccount=l,Ht.createUser=d,Ht.createCluster=u,Ht.createServer=h,Ht.createCurve=f,Ht.fromPublic=g,Ht.fromCurveSeed=b,Ht.fromSeed=w;const t=hp(),n=pp(),s=Ji(),r=gp(),i=e($i());function o(A){const D=A===y.Curve?r.curveKeyLen:32,v=i.default.randomBytes(D),N=s.Codec.encodeSeed(A,new Uint8Array(v));return A===y.Curve?new r.CurveKP(new Uint8Array(v)):new t.KP(N)}function c(){return o(y.Operator)}function l(){return o(y.Account)}function d(){return o(y.User)}function u(){return o(y.Cluster)}function h(){return o(y.Server)}function f(){return o(y.Curve)}function g(A){const D=new TextEncoder().encode(A),v=s.Codec._decode(D),N=x.parsePrefix(v[0]);if(x.isValidPublicPrefix(N))return new n.PublicKey(D);throw new L(T.InvalidPublicKey)}function b(A){const D=s.Codec.decodeSeed(A);if(D.prefix!==y.Curve)throw new L(T.InvalidCurveSeed);if(D.buf.byteLength!==r.curveKeyLen)throw new L(T.InvalidSeedLen);return new r.CurveKP(D.buf)}function w(A){return s.Codec.decodeSeed(A).prefix===y.Curve?b(A):new t.KP(A)}var y;(function(A){A[A.Unknown=-1]="Unknown",A[A.Seed=144]="Seed",A[A.Private=120]="Private",A[A.Operator=112]="Operator",A[A.Server=104]="Server",A[A.Cluster=16]="Cluster",A[A.Account=0]="Account",A[A.User=160]="User",A[A.Curve=184]="Curve"})(y||(Ht.Prefix=y={}));class x{static isValidPublicPrefix(D){return D==y.Server||D==y.Operator||D==y.Cluster||D==y.Account||D==y.User||D==y.Curve}static startsWithValidPrefix(D){const v=D[0];return v=="S"||v=="P"||v=="O"||v=="N"||v=="C"||v=="A"||v=="U"||v=="X"}static isValidPrefix(D){return this.parsePrefix(D)!==y.Unknown}static parsePrefix(D){switch(D){case y.Seed:return y.Seed;case y.Private:return y.Private;case y.Operator:return y.Operator;case y.Server:return y.Server;case y.Cluster:return y.Cluster;case y.Account:return y.Account;case y.User:return y.User;case y.Curve:return y.Curve;default:return y.Unknown}}}Ht.Prefixes=x;var T;(function(A){A.InvalidPrefixByte="nkeys: invalid prefix byte",A.InvalidKey="nkeys: invalid key",A.InvalidPublicKey="nkeys: invalid public key",A.InvalidSeedLen="nkeys: invalid seed length",A.InvalidSeed="nkeys: invalid seed",A.InvalidCurveSeed="nkeys: invalid curve seed",A.InvalidCurveKey="nkeys: not a valid curve key",A.InvalidCurveOperation="nkeys: curve key is not valid for sign/verify",A.InvalidNKeyOperation="keys: only curve key can seal/open",A.InvalidEncoding="nkeys: invalid encoded key",A.InvalidRecipient="nkeys: not a valid recipient public curve key",A.InvalidEncrypted="nkeys: encrypted input is not valid",A.CannotSign="nkeys: cannot sign, no private key available",A.PublicKeyOnly="nkeys: no seed or private key available",A.InvalidChecksum="nkeys: invalid checksum",A.SerializationError="nkeys: serialization error",A.ApiError="nkeys: api error",A.ClearedPair="nkeys: pair is cleared"})(T||(Ht.NKeysErrorCode=T={}));class L extends Error{code;constructor(D,v){super(D,v),this.code=D}}return Ht.NKeysError=L,Ht}var Xr={},Bc;function bp(){if(Bc)return Xr;Bc=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.encode=e,Xr.decode=t,Xr.dump=n;function e(s){return btoa(String.fromCharCode(...s))}function t(s){const r=atob(s),i=new Uint8Array(r.length);for(let o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return i}function n(s,r){r&&console.log(r);const i=[];for(let o=0;o<s.byteLength;o++){o%8===0&&i.push(`
13
+ `);let c=s[o].toString(16);c.length===1&&(c="0"+c),i.push(c)}console.log(i.join(" "))}return Xr}var Ss={},jc;function mp(){return jc||(jc=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.version=void 0,Ss.version="2.0.3"),Ss}var Fc;function _p(){return Fc||(Fc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.encode=e.decode=e.Prefixes=e.Prefix=e.NKeysErrorCode=e.NKeysError=e.fromSeed=e.fromPublic=e.fromCurveSeed=e.createUser=e.createServer=e.createPair=e.createOperator=e.createCurve=e.createCluster=e.createAccount=void 0;var t=as();Object.defineProperty(e,"createAccount",{enumerable:!0,get:function(){return t.createAccount}}),Object.defineProperty(e,"createCluster",{enumerable:!0,get:function(){return t.createCluster}}),Object.defineProperty(e,"createCurve",{enumerable:!0,get:function(){return t.createCurve}}),Object.defineProperty(e,"createOperator",{enumerable:!0,get:function(){return t.createOperator}}),Object.defineProperty(e,"createPair",{enumerable:!0,get:function(){return t.createPair}}),Object.defineProperty(e,"createServer",{enumerable:!0,get:function(){return t.createServer}}),Object.defineProperty(e,"createUser",{enumerable:!0,get:function(){return t.createUser}}),Object.defineProperty(e,"fromCurveSeed",{enumerable:!0,get:function(){return t.fromCurveSeed}}),Object.defineProperty(e,"fromPublic",{enumerable:!0,get:function(){return t.fromPublic}}),Object.defineProperty(e,"fromSeed",{enumerable:!0,get:function(){return t.fromSeed}}),Object.defineProperty(e,"NKeysError",{enumerable:!0,get:function(){return t.NKeysError}}),Object.defineProperty(e,"NKeysErrorCode",{enumerable:!0,get:function(){return t.NKeysErrorCode}}),Object.defineProperty(e,"Prefix",{enumerable:!0,get:function(){return t.Prefix}}),Object.defineProperty(e,"Prefixes",{enumerable:!0,get:function(){return t.Prefixes}});var n=bp();Object.defineProperty(e,"decode",{enumerable:!0,get:function(){return n.decode}}),Object.defineProperty(e,"encode",{enumerable:!0,get:function(){return n.encode}});var s=mp();Object.defineProperty(e,"version",{enumerable:!0,get:function(){return s.version}})})(Eo)),Eo}var qc;function Du(){if(qc)return jn;qc=1;var e=jn&&jn.__createBinding||(Object.create?(function(s,r,i,o){o===void 0&&(o=i);var c=Object.getOwnPropertyDescriptor(r,i);(!c||("get"in c?!r.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return r[i]}}),Object.defineProperty(s,o,c)}):(function(s,r,i,o){o===void 0&&(o=i),s[o]=r[i]})),t=jn&&jn.__setModuleDefault||(Object.create?(function(s,r){Object.defineProperty(s,"default",{enumerable:!0,value:r})}):function(s,r){s.default=r}),n=jn&&jn.__importStar||(function(){var s=function(r){return s=Object.getOwnPropertyNames||function(i){var o=[];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(o[o.length]=c);return o},s(r)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var o=s(r),c=0;c<o.length;c++)o[c]!=="default"&&e(i,r,o[c]);return t(i,r),i}})();return Object.defineProperty(jn,"__esModule",{value:!0}),jn.nkeys=void 0,jn.nkeys=n(_p()),jn}var Hc;function Uu(){if(Hc)return Jn;Hc=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.multiAuthenticator=n,Jn.noAuthFn=s,Jn.usernamePasswordAuthenticator=r,Jn.tokenAuthenticator=i,Jn.nkeyAuthenticator=o,Jn.jwtAuthenticator=c,Jn.credsAuthenticator=l;const e=Du(),t=Ln();function n(d){return u=>{let h={};return d.forEach(f=>{const g=f(u)||{};h=Object.assign(h,g)}),h}}function s(){return()=>{}}function r(d,u){return()=>{const h=typeof d=="function"?d():d,f=typeof u=="function"?u():u;return{user:h,pass:f}}}function i(d){return()=>({auth_token:typeof d=="function"?d():d})}function o(d){return u=>{const h=typeof d=="function"?d():d,f=h?e.nkeys.fromSeed(h):void 0,g=f?f.getPublicKey():"",b=t.TE.encode(u||""),w=f!==void 0&&u?f.sign(b):void 0,y=w?e.nkeys.encode(w):"";return{nkey:g,sig:y}}}function c(d,u){return h=>{const f=typeof d=="function"?d():d,g=o(u),{nkey:b,sig:w}=g(h);return{jwt:f,nkey:b,sig:w}}}function l(d){const u=typeof d!="function"?()=>d:d,h=()=>{const b=/\s*(?:(?:[-]{3,}[^\n]*[-]{3,}\n)(.+)(?:\n\s*[-]{3,}[^\n]*[-]{3,}\n))/ig,w=t.TD.decode(u());let y=b.exec(w);if(!y)throw new Error("unable to parse credentials");const x=y[1].trim();if(y=b.exec(w),!y)throw new Error("unable to parse credentials");const T=t.TE.encode(y[1].trim());return{jwt:x,seed:T}};return c(()=>{const{jwt:b}=h();return b},()=>{const{seed:b}=h();return b})}return Jn}var Kc;function Qi(){return Kc||(Kc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_RECONNECT_TIME_WAIT=e.DEFAULT_MAX_PING_OUT=e.DEFAULT_PING_INTERVAL=e.DEFAULT_JITTER_TLS=e.DEFAULT_JITTER=e.DEFAULT_MAX_RECONNECT_ATTEMPTS=void 0,e.defaultOptions=o,e.hasWsProtocol=c,e.buildAuthenticator=l,e.parseOptions=d,e.checkOptions=u,e.checkUnsupportedOption=h;const t=cr(),n=os(),s=Kr(),r=Uu(),i=Yn();e.DEFAULT_MAX_RECONNECT_ATTEMPTS=10,e.DEFAULT_JITTER=100,e.DEFAULT_JITTER_TLS=1e3,e.DEFAULT_PING_INTERVAL=120*1e3,e.DEFAULT_MAX_PING_OUT=2,e.DEFAULT_RECONNECT_TIME_WAIT=2*1e3;function o(){return{maxPingOut:e.DEFAULT_MAX_PING_OUT,maxReconnectAttempts:e.DEFAULT_MAX_RECONNECT_ATTEMPTS,noRandomize:!1,pedantic:!1,pingInterval:e.DEFAULT_PING_INTERVAL,reconnect:!0,reconnectJitter:e.DEFAULT_JITTER,reconnectJitterTLS:e.DEFAULT_JITTER_TLS,reconnectTimeWait:e.DEFAULT_RECONNECT_TIME_WAIT,tls:void 0,verbose:!1,waitOnFirstConnect:!1,ignoreAuthErrorAbort:!1}}function c(f){if(f){let{servers:g}=f;if(typeof g=="string"&&(g=[g]),g)for(let b=0;b<g.length;b++){const w=g[b].toLowerCase();if(w.startsWith("ws://")||w.startsWith("wss://"))return!0}}return!1}function l(f){const g=[];return typeof f.authenticator=="function"&&g.push(f.authenticator),Array.isArray(f.authenticator)&&g.push(...f.authenticator),f.token&&g.push((0,r.tokenAuthenticator)(f.token)),f.user&&g.push((0,r.usernamePasswordAuthenticator)(f.user,f.pass)),g.length===0?(0,r.noAuthFn)():(0,r.multiAuthenticator)(g)}function d(f){const g=`${s.DEFAULT_HOST}:${(0,n.defaultPort)()}`;if(f=f||{servers:[g]},f.servers=f.servers||[],typeof f.servers=="string"&&(f.servers=[f.servers]),f.servers.length>0&&f.port)throw i.InvalidArgumentError.format(["servers","port"],"are mutually exclusive");f.servers.length===0&&f.port&&(f.servers=[`${s.DEFAULT_HOST}:${f.port}`]),f.servers&&f.servers.length===0&&(f.servers=[g]);const b=(0,t.extend)(o(),f);if(b.authenticator=l(b),["reconnectDelayHandler","authenticator"].forEach(w=>{if(b[w]&&typeof b[w]!="function")throw TypeError(`'${w}' must be a function`)}),b.reconnectDelayHandler||(b.reconnectDelayHandler=()=>{let w=b.tls?b.reconnectJitterTLS:b.reconnectJitter;return w&&(w++,w=Math.floor(Math.random()*w)),b.reconnectTimeWait+w}),b.inboxPrefix&&(0,s.createInbox)(b.inboxPrefix),b.resolve===void 0&&(b.resolve=typeof(0,n.getResolveFn)()=="function"),b.resolve&&typeof(0,n.getResolveFn)()!="function")throw i.InvalidArgumentError.format("resolve","is not supported in the current runtime");return b}function u(f,g){const{proto:b,tls_required:w,tls_available:y}=f;if((b===void 0||b<1)&&g.noEcho)throw new i.errors.ConnectionError("server does not support 'noEcho'");const x=w||y||!1;if(g.tls&&!x)throw new i.errors.ConnectionError("server does not support 'tls'")}function h(f,g){if(g)throw i.InvalidArgumentError.format(f,"is not supported")}})(vo)),vo}var zc;function Oi(){if(zc)return Cn;zc=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.ProtocolHandler=Cn.Subscriptions=Cn.SubscriptionImpl=Cn.Connect=Cn.INFO=void 0;const e=Ln(),t=os(),n=cr(),s=Zi(),r=ku(),i=ha(),o=Ou(),c=Cu(),l=Iu(),d=Ru(),u=ga(),h=Qi(),f=Yn(),g=1024*32;Cn.INFO=/^INFO\s+([^\r\n]+)\r\n/i;const b=(0,e.encode)(`PONG\r
14
+ `),w=(0,e.encode)(`PING\r
15
+ `);class y{echo;no_responders;protocol;verbose;pedantic;jwt;nkey;sig;user;pass;auth_token;tls_required;name;lang;version;headers;constructor(v,N,I){this.protocol=1,this.version=v.version,this.lang=v.lang,this.echo=N.noEcho?!1:void 0,this.verbose=N.verbose,this.pedantic=N.pedantic,this.tls_required=N.tls?!0:void 0,this.name=N.name;const z=(N&&typeof N.authenticator=="function"?N.authenticator(I):{})||{};(0,n.extend)(this,z)}}Cn.Connect=y;class x{slow;cb;notified;constructor(v,N){this.slow=v,this.cb=N,this.notified=!1}maybeNotify(v){v<=this.slow?this.notified=!1:this.notified||(this.cb(v),this.notified=!0)}}class T extends i.QueuedIteratorImpl{sid;queue;draining;max;subject;drained;protocol;timer;info;cleanupFn;closed;requestSubject;slow;constructor(v,N,I={}){super(),(0,n.extend)(this,I),this.protocol=v,this.subject=N,this.draining=!1,this.noIterator=typeof I.callback=="function",this.closed=(0,n.deferred)();const z=!v.options?.noAsyncTraces;I.timeout&&(this.timer=(0,n.timeout)(I.timeout,z),this.timer.then(()=>{this.timer=void 0}).catch(ae=>{this.stop(ae),this.noIterator&&this.callback(ae,{})})),this.noIterator||this.iterClosed.then(ae=>{this.closed.resolve(ae),this.unsubscribe()})}setSlowNotificationFn(v,N){if(this.slow=void 0,N){if(this.noIterator)throw new Error("callbacks don't support slow notifications");this.slow=new x(v,N)}}callback(v,N){this.cancelTimeout(),v?this.stop(v):this.push(N),!v&&this.slow&&this.slow.maybeNotify(this.getPending())}close(v){if(!this.isClosed()){this.cancelTimeout();const N=()=>{if(this.stop(),this.cleanupFn)try{this.cleanupFn(this,this.info)}catch{}this.closed.resolve(v)};this.noIterator?N():this.push(N)}}unsubscribe(v){this.protocol.unsubscribe(this,v)}cancelTimeout(){this.timer&&(this.timer.cancel(),this.timer=void 0)}drain(){return this.protocol.isClosed()?Promise.reject(new f.errors.ClosedConnectionError):this.isClosed()?Promise.reject(new f.errors.InvalidOperationError("subscription is already closed")):(this.drained||(this.draining=!0,this.protocol.unsub(this),this.drained=this.protocol.flush((0,n.deferred)()).then(()=>{this.protocol.subscriptions.cancel(this)}).catch(()=>{this.protocol.subscriptions.cancel(this)})),this.drained)}isDraining(){return this.draining}isClosed(){return this.done}getSubject(){return this.subject}getMax(){return this.max}getID(){return this.sid}}Cn.SubscriptionImpl=T;class L{mux;subs;sidCounter;constructor(){this.sidCounter=0,this.mux=null,this.subs=new Map}size(){return this.subs.size}add(v){return this.sidCounter++,v.sid=this.sidCounter,this.subs.set(v.sid,v),v}setMux(v){return this.mux=v,v}getMux(){return this.mux}get(v){return this.subs.get(v)}resub(v){return this.sidCounter++,this.subs.delete(v.sid),v.sid=this.sidCounter,this.subs.set(v.sid,v),v}all(){return Array.from(this.subs.values())}cancel(v){v&&(v.close(),this.subs.delete(v.sid))}handleError(v){const N=this.all();let I;return v.operation==="subscription"?I=N.find(z=>z.subject===v.subject&&z.queue===v.queue):v.operation==="publish"&&(I=N.find(z=>z.requestSubject===v.subject)),I?(I.callback(v,{}),I.close(v),this.subs.delete(I.sid),I!==this.mux):!1}close(){this.subs.forEach(v=>{v.close()})}}Cn.Subscriptions=L;class A{connected;connectedOnce;infoReceived;info;muxSubscriptions;options;outbound;pongs;subscriptions;transport;noMorePublishing;connectError;publisher;_closed;closed;listeners;heartbeats;parser;outMsgs;inMsgs;outBytes;inBytes;pendingLimit;lastError;abortReconnect;whyClosed;servers;server;features;connectPromise;dialDelay;raceTimer;constructor(v,N){this._closed=!1,this.connected=!1,this.connectedOnce=!1,this.infoReceived=!1,this.noMorePublishing=!1,this.abortReconnect=!1,this.listeners=[],this.pendingLimit=g,this.outMsgs=0,this.inMsgs=0,this.outBytes=0,this.inBytes=0,this.options=v,this.publisher=N,this.subscriptions=new L,this.muxSubscriptions=new o.MuxSubscription,this.outbound=new s.DataBuffer,this.pongs=[],this.whyClosed="",this.pendingLimit=v.pendingLimit||this.pendingLimit,this.features=new u.Features({major:0,minor:0,micro:0}),this.connectPromise=null,this.dialDelay=null;const I=typeof v.servers=="string"?[v.servers]:v.servers;this.servers=new r.Servers(I,{randomize:!v.noRandomize}),this.closed=(0,n.deferred)(),this.parser=new l.Parser(this),this.heartbeats=new c.Heartbeat(this,this.options.pingInterval||h.DEFAULT_PING_INTERVAL,this.options.maxPingOut||h.DEFAULT_MAX_PING_OUT)}resetOutbound(){this.outbound.reset();const v=this.pongs;this.pongs=[];const N=new f.errors.RequestError("connection disconnected");N.stack="",v.forEach(I=>{I.reject(N)}),this.parser=new l.Parser(this),this.infoReceived=!1}dispatchStatus(v){this.listeners.forEach(N=>{N.push(v)})}prepare(){this.transport&&this.transport.discard(),this.info=void 0,this.resetOutbound();const v=(0,n.deferred)();return v.catch(()=>{}),this.pongs.unshift(v),this.connectError=N=>{v.reject(N)},this.transport=(0,t.newTransport)(),this.transport.closed().then(async N=>{if(this.connected=!1,!this.isClosed()){await this.disconnected(this.transport.closeError||this.lastError);return}}),v}disconnect(){this.dispatchStatus({type:"staleConnection"}),this.transport.disconnect()}reconnect(){return this.connected&&(this.dispatchStatus({type:"forceReconnect"}),this.transport.disconnect()),Promise.resolve()}async disconnected(v){this.dispatchStatus({type:"disconnect",server:this.servers.getCurrentServer().toString()}),this.options.reconnect?await this.dialLoop().then(()=>{this.dispatchStatus({type:"reconnect",server:this.servers.getCurrentServer().toString()}),this.lastError instanceof f.errors.UserAuthenticationExpiredError&&(this.lastError=void 0)}).catch(N=>{this.close(N).catch()}):await this.close(v).catch()}async dial(v){const N=this.prepare();try{this.raceTimer=(0,n.timeout)(this.options.timeout||2e4);const I=this.transport.connect(v,this.options);await Promise.race([I,this.raceTimer]),(async()=>{try{for await(const z of this.transport)this.parser.parse(z)}catch(z){console.log("reader closed",z)}})().then()}catch(I){N.reject(I)}try{await Promise.race([this.raceTimer,N]),this.raceTimer?.cancel(),this.connected=!0,this.connectError=void 0,this.sendSubscriptions(),this.connectedOnce=!0,this.server.didConnect=!0,this.server.reconnects=0,this.flushPending(),this.heartbeats.start()}catch(I){throw this.raceTimer?.cancel(),await this.transport.close(I),I}}async _doDial(v){const{resolve:N}=this.options,I=await v.resolve({fn:(0,t.getResolveFn)(),debug:this.options.debug,randomize:!this.options.noRandomize,resolve:N});let z=null;for(const ae of I)try{z=null,this.dispatchStatus({type:"reconnecting"}),await this.dial(ae);return}catch(ke){z=ke}throw z}dialLoop(){return this.connectPromise===null&&(this.connectPromise=this.dodialLoop(),this.connectPromise.then(()=>{}).catch(()=>{}).finally(()=>{this.connectPromise=null})),this.connectPromise}async dodialLoop(){let v;for(;;){this._closed&&this.servers.clear();const N=this.options.reconnectDelayHandler?this.options.reconnectDelayHandler():h.DEFAULT_RECONNECT_TIME_WAIT;let I=N;const z=this.selectServer();if(!z||this.abortReconnect)throw v||(this.lastError?this.lastError:new f.errors.ConnectionError("connection refused"));const ae=Date.now();if(z.lastConnect===0||z.lastConnect+N<=ae){z.lastConnect=Date.now();try{await this._doDial(z);break}catch(ke){if(v=ke,!this.connectedOnce){if(this.options.waitOnFirstConnect)continue;this.servers.removeCurrentServer()}z.reconnects++;const Ye=this.options.maxReconnectAttempts||0;Ye!==-1&&z.reconnects>=Ye&&this.servers.removeCurrentServer()}}else I=Math.min(I,z.lastConnect+N-ae),this.dialDelay=(0,n.delay)(I),await this.dialDelay}}static async connect(v,N){const I=new A(v,N);return await I.dialLoop(),I}static toError(v){let N=f.errors.PermissionViolationError.parse(v);return N||(N=f.errors.UserAuthenticationExpiredError.parse(v),N)||(N=f.errors.AuthorizationError.parse(v),N)?N:new f.errors.ProtocolError(v)}processMsg(v,N){if(this.inMsgs++,this.inBytes+=N.length,!this.subscriptions.sidCounter)return;const I=this.subscriptions.get(v.sid);I&&(I.received+=1,I.callback&&I.callback(null,new d.MsgImpl(v,N,this)),I.max!==void 0&&I.received>=I.max&&I.unsubscribe())}processError(v){let N=(0,e.decode)(v);N.startsWith("'")&&N.endsWith("'")&&(N=N.slice(1,N.length-1));const I=A.toError(N);if(I.constructor===f.errors.PermissionViolationError){const z=I,ae=this.subscriptions.getMux(),ke=ae?z.subject===ae.subject:!1;this.subscriptions.handleError(z),this.muxSubscriptions.handleError(ke,z),ke&&this.subscriptions.setMux(null)}this.dispatchStatus({type:"error",error:I}),this.handleError(I)}handleError(v){(v instanceof f.errors.UserAuthenticationExpiredError||v instanceof f.errors.AuthorizationError)&&this.handleAuthError(v),v instanceof f.errors.PermissionViolationError||(this.lastError=v)}handleAuthError(v){(this.lastError instanceof f.errors.UserAuthenticationExpiredError||this.lastError instanceof f.errors.AuthorizationError)&&this.options.ignoreAuthErrorAbort===!1&&(this.abortReconnect=!0),this.connectError?this.connectError(v):this.disconnect()}processPing(){this.transport.send(b)}processPong(){const v=this.pongs.shift();v&&v.resolve()}processInfo(v){const N=JSON.parse((0,e.decode)(v));this.info=N;const I=this.options&&this.options.ignoreClusterUpdates?void 0:this.servers.update(N,this.transport.isEncrypted());if(!this.infoReceived){this.features.update((0,u.parseSemVer)(N.version)),this.infoReceived=!0,this.transport.isEncrypted()&&this.servers.updateTLSName();const{version:ae,lang:ke}=this.transport;try{const Ye=new y({version:ae,lang:ke},this.options,N.nonce);N.headers&&(Ye.headers=!0,Ye.no_responders=!0);const it=JSON.stringify(Ye);this.transport.send((0,e.encode)(`CONNECT ${it}${t.CR_LF}`)),this.transport.send(w)}catch(Ye){this.close(Ye).catch()}}if(I){const{added:ae,deleted:ke}=I;this.dispatchStatus({type:"update",added:ae,deleted:ke})}N.ldm!==void 0&&N.ldm&&this.dispatchStatus({type:"ldm",server:this.servers.getCurrentServer().toString()})}push(v){switch(v.kind){case l.Kind.MSG:{const{msg:N,data:I}=v;this.processMsg(N,I);break}case l.Kind.OK:break;case l.Kind.ERR:this.processError(v.data);break;case l.Kind.PING:this.processPing();break;case l.Kind.PONG:this.processPong();break;case l.Kind.INFO:this.processInfo(v.data);break}}sendCommand(v,...N){const I=this.outbound.length();let z;typeof v=="string"?z=(0,e.encode)(v):z=v,this.outbound.fill(z,...N),I===0?queueMicrotask(()=>{this.flushPending()}):this.outbound.size()>=this.pendingLimit&&this.flushPending()}publish(v,N=e.Empty,I){let z;if(N instanceof Uint8Array)z=N;else if(typeof N=="string")z=e.TE.encode(N);else throw new TypeError("payload types can be strings or Uint8Array");let ae=z.length;I=I||{},I.reply=I.reply||"";let ke=e.Empty,Ye=0;if(I.headers&&(this.info&&!this.info.headers&&f.InvalidArgumentError.format("headers","are not available on this server"),ke=I.headers.encode(),Ye=ke.length,ae=z.length+Ye),this.info&&ae>this.info.max_payload)throw f.InvalidArgumentError.format("payload","max_payload size exceeded");this.outBytes+=ae,this.outMsgs++;let it;I.headers?(I.reply?it=`HPUB ${v} ${I.reply} ${Ye} ${ae}\r
16
+ `:it=`HPUB ${v} ${Ye} ${ae}\r
17
+ `,this.sendCommand(it,ke,z,t.CRLF)):(I.reply?it=`PUB ${v} ${I.reply} ${ae}\r
18
+ `:it=`PUB ${v} ${ae}\r
19
+ `,this.sendCommand(it,z,t.CRLF))}request(v){return this.initMux(),this.muxSubscriptions.add(v),v}subscribe(v){return this.subscriptions.add(v),this._subunsub(v),v}_sub(v){v.queue?this.sendCommand(`SUB ${v.subject} ${v.queue} ${v.sid}\r
20
+ `):this.sendCommand(`SUB ${v.subject} ${v.sid}\r
21
+ `)}_subunsub(v){return this._sub(v),v.max&&this.unsubscribe(v,v.max),v}unsubscribe(v,N){this.unsub(v,N),(v.max===void 0||v.received>=v.max)&&this.subscriptions.cancel(v)}unsub(v,N){!v||this.isClosed()||(N?this.sendCommand(`UNSUB ${v.sid} ${N}\r
22
+ `):this.sendCommand(`UNSUB ${v.sid}\r
23
+ `),v.max=N)}resub(v,N){!v||this.isClosed()||(this.unsub(v),v.subject=N,this.subscriptions.resub(v),this._sub(v))}flush(v){return v||(v=(0,n.deferred)()),this.pongs.push(v),this.outbound.fill(w),this.flushPending(),v}sendSubscriptions(){const v=[];this.subscriptions.all().forEach(N=>{const I=N;I.queue?v.push(`SUB ${I.subject} ${I.queue} ${I.sid}${t.CR_LF}`):v.push(`SUB ${I.subject} ${I.sid}${t.CR_LF}`)}),v.length&&this.transport.send((0,e.encode)(v.join("")))}async close(v){if(this._closed)return;this.whyClosed=new Error("close trace").stack||"",this.heartbeats.cancel(),this.connectError&&(this.connectError(v),this.connectError=void 0),this.muxSubscriptions.close(),this.subscriptions.close();const N=[];for(let I=0;I<this.listeners.length;I++){const z=this.listeners[I];z&&(z.push({type:"close"}),z.stop(),N.push(z.iterClosed))}N.length&&await Promise.all(N),this._closed=!0,await this.transport.close(v),this.raceTimer?.cancel(),this.dialDelay?.cancel(),this.closed.resolve(v)}isClosed(){return this._closed}async drain(){const v=this.subscriptions.all(),N=[];v.forEach(I=>{N.push(I.drain())});try{await Promise.allSettled(N)}catch{}finally{this.noMorePublishing=!0,await this.flush()}return this.close()}flushPending(){if(!(!this.infoReceived||!this.connected)&&this.outbound.size()){const v=this.outbound.drain();this.transport.send(v)}}initMux(){if(!this.subscriptions.getMux()){const N=this.muxSubscriptions.init(this.options.inboxPrefix),I=new T(this,`${N}*`);I.callback=this.muxSubscriptions.dispatcher(),this.subscriptions.setMux(I),this.subscribe(I)}}selectServer(){const v=this.servers.selectServer();if(v!==void 0)return this.server=v,this.server}getServer(){return this.server}}return Cn.ProtocolHandler=A,Cn}var hr={},Gc;function Bu(){if(Gc)return hr;Gc=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.RequestOne=hr.RequestMany=hr.BaseRequest=void 0;const e=cr(),t=Xi(),n=Yn();class s{token;received;ctx;requestSubject;mux;constructor(c,l,d=!0){this.mux=c,this.requestSubject=l,this.received=0,this.token=t.nuid.next(),d&&(this.ctx=new n.RequestError)}}hr.BaseRequest=s;class r extends s{callback;done;timer;max;opts;constructor(c,l,d={maxWait:1e3}){if(super(c,l),this.opts=d,typeof this.opts.callback!="function")throw new TypeError("callback must be a function");this.callback=this.opts.callback,this.max=typeof d.maxMessages=="number"&&d.maxMessages>0?d.maxMessages:-1,this.done=(0,e.deferred)(),this.done.then(()=>{this.callback(null,null)}),this.timer=setTimeout(()=>{this.cancel()},d.maxWait)}cancel(c){c&&this.callback(c,null),clearTimeout(this.timer),this.mux.cancel(this),this.done.resolve()}resolver(c,l){c?(this.ctx&&(c.stack+=`
24
+
25
+ ${this.ctx.stack}`),this.cancel(c)):(this.callback(null,l),this.opts.strategy==="count"&&(this.max--,this.max===0&&this.cancel()),this.opts.strategy==="stall"&&(clearTimeout(this.timer),this.timer=setTimeout(()=>{this.cancel()},this.opts.stall||300)),this.opts.strategy==="sentinel"&&l&&l.data.length===0&&this.cancel())}}hr.RequestMany=r;class i extends s{deferred;timer;constructor(c,l,d={timeout:1e3},u=!0){super(c,l,u),this.deferred=(0,e.deferred)(),this.timer=(0,e.timeout)(d.timeout,u)}resolver(c,l){this.timer&&this.timer.cancel(),c?(c instanceof n.TimeoutError||(this.ctx?(this.ctx.message=c.message,this.ctx.cause=c,c=this.ctx):c=new n.errors.RequestError(c.message,{cause:c})),this.deferred.reject(c)):this.deferred.resolve(l),this.cancel()}cancel(c){this.timer&&this.timer.cancel(),this.mux.cancel(this),this.deferred.reject(c||new n.RequestError("cancelled"))}}return hr.RequestOne=i,hr}var Wc;function ju(){if(Wc)return ps;Wc=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.NatsConnectionImpl=void 0;const e=cr(),t=Oi(),n=Ln(),s=pa(),r=ga(),i=Qi(),o=ha(),c=Bu(),l=Kr(),d=Yn(),u=/[ \n\r\t]/;class h{options;protocol;draining;closeListeners;constructor(b){this.draining=!1,this.options=(0,i.parseOptions)(b)}static connect(b={}){return new Promise((w,y)=>{const x=new h(b);t.ProtocolHandler.connect(x.options,x).then(T=>{x.protocol=T,w(x)}).catch(T=>{y(T)})})}closed(){return this.protocol.closed}async close(){await this.protocol.close()}_check(b,w,y){if(this.isClosed())throw new d.errors.ClosedConnectionError;if(w&&this.isDraining())throw new d.errors.DrainingConnectionError;if(y&&this.protocol.noMorePublishing)throw new d.errors.DrainingConnectionError;if(b=b||"",b.length===0||u.test(b))throw new d.errors.InvalidSubjectError(b)}publish(b,w,y){if(this._check(b,!1,!0),y?.reply&&this._check(y.reply,!1,!0),typeof y?.traceOnly=="boolean"){const x=y.headers||(0,s.headers)();x.set("Nats-Trace-Only","true"),y.headers=x}if(typeof y?.traceDestination=="string"){const x=y.headers||(0,s.headers)();x.set("Nats-Trace-Dest",y.traceDestination),y.headers=x}this.protocol.publish(b,w,y)}publishMessage(b){return this.publish(b.subject,b.data,{reply:b.reply,headers:b.headers})}respondMessage(b){return b.reply?(this.publish(b.reply,b.data,{reply:b.reply,headers:b.headers}),!0):!1}subscribe(b,w={}){this._check(b,!0,!1);const y=new t.SubscriptionImpl(this.protocol,b,w);return typeof w.callback!="function"&&typeof w.slow=="number"&&y.setSlowNotificationFn(w.slow,x=>{this.protocol.dispatchStatus({type:"slowConsumer",sub:y,pending:x})}),this.protocol.subscribe(y),y}_resub(b,w,y){this._check(w,!0,!1);const x=b;x.max=y,y&&(x.max=y+x.received),this.protocol.resub(x,w)}requestMany(b,w=n.Empty,y={maxWait:1e3,maxMessages:-1}){const x=!this.protocol.options.noAsyncTraces;try{this._check(b,!0,!0)}catch(D){return Promise.reject(D)}if(y.strategy=y.strategy||"timer",y.maxWait=y.maxWait||1e3,y.maxWait<1)return Promise.reject(d.InvalidArgumentError.format("timeout","must be greater than 0"));const T=new o.QueuedIteratorImpl;function L(D){T.push(()=>{T.stop(D)})}function A(D,v){D||v===null?L(D===null?void 0:D):T.push(v)}if(y.noMux){const D=x?new Error().stack:null;let v=typeof y.maxMessages=="number"&&y.maxMessages>0?y.maxMessages:-1;const N=this.subscribe((0,l.createInbox)(this.options.inboxPrefix),{callback:(Ie,mt)=>{if(mt?.data?.length===0&&mt?.headers?.status==="503"&&(Ie=new d.errors.NoRespondersError(b)),Ie){D&&(Ie.stack+=`
26
+
27
+ ${D}`),I(Ie);return}A(null,mt),y.strategy==="count"&&(v--,v===0&&I()),y.strategy==="stall"&&(it(),Ye=setTimeout(()=>{I()},300)),y.strategy==="sentinel"&&mt&&mt.data.length===0&&I()}});N.requestSubject=b,N.closed.then(()=>{L()}).catch(Ie=>{T.stop(Ie)});const I=Ie=>{Ie&&T.push(()=>{throw Ie}),it(),N.drain().then(()=>{L()}).catch(mt=>{L()})};T.iterClosed.then(()=>{it(),N?.unsubscribe()}).catch(Ie=>{it(),N?.unsubscribe()});const{headers:z,traceDestination:ae,traceOnly:ke}=y;try{this.publish(b,w,{reply:N.getSubject(),headers:z,traceDestination:ae,traceOnly:ke})}catch(Ie){I(Ie)}let Ye=setTimeout(()=>{I()},y.maxWait);const it=()=>{Ye&&clearTimeout(Ye)}}else{const D=y;D.callback=A,T.iterClosed.then(()=>{v.cancel()}).catch(ae=>{v.cancel(ae)});const v=new c.RequestMany(this.protocol.muxSubscriptions,b,D);this.protocol.request(v);const{headers:N,traceDestination:I,traceOnly:z}=y;try{this.publish(b,w,{reply:`${this.protocol.muxSubscriptions.baseInbox}${v.token}`,headers:N,traceDestination:I,traceOnly:z})}catch(ae){v.cancel(ae)}}return Promise.resolve(T)}request(b,w,y={timeout:1e3,noMux:!1}){try{this._check(b,!0,!0)}catch(T){return Promise.reject(T)}const x=!this.protocol.options.noAsyncTraces;if(y.timeout=y.timeout||1e3,y.timeout<1)return Promise.reject(d.InvalidArgumentError.format("timeout","must be greater than 0"));if(!y.noMux&&y.reply)return Promise.reject(d.InvalidArgumentError.format(["reply","noMux"],"are mutually exclusive"));if(y.noMux){const T=y.reply?y.reply:(0,l.createInbox)(this.options.inboxPrefix),L=(0,e.deferred)(),A=x?new d.errors.RequestError(""):null,D=this.subscribe(T,{max:1,timeout:y.timeout,callback:(v,N)=>{N&&N.data?.length===0&&N.headers?.code===503&&(v=new d.errors.NoRespondersError(b)),v?(v instanceof d.TimeoutError||(A?(A.message=v.message,A.cause=v,v=A):v=new d.errors.RequestError(v.message,{cause:v})),L.reject(v),D.unsubscribe()):L.resolve(N)}});return D.requestSubject=b,this.protocol.publish(b,w,{reply:T,headers:y.headers}),L}else{const T=new c.RequestOne(this.protocol.muxSubscriptions,b,y,x);this.protocol.request(T);const{headers:L,traceDestination:A,traceOnly:D}=y;try{this.publish(b,w,{reply:`${this.protocol.muxSubscriptions.baseInbox}${T.token}`,headers:L,traceDestination:A,traceOnly:D})}catch(N){T.cancel(N)}const v=Promise.race([T.timer,T.deferred]);return v.catch(()=>{T.cancel()}),v}}flush(){return this.isClosed()?Promise.reject(new d.errors.ClosedConnectionError):this.protocol.flush()}drain(){return this.isClosed()?Promise.reject(new d.errors.ClosedConnectionError):this.isDraining()?Promise.reject(new d.errors.DrainingConnectionError):(this.draining=!0,this.protocol.drain())}isClosed(){return this.protocol.isClosed()}isDraining(){return this.draining}getServer(){const b=this.protocol.getServer();return b?b.listen:""}status(){const b=new o.QueuedIteratorImpl;return b.iterClosed.then(()=>{const w=this.protocol.listeners.indexOf(b);w>-1&&this.protocol.listeners.splice(w,1)}),this.protocol.listeners.push(b),b}get info(){return this.protocol.isClosed()?void 0:this.protocol.info}async context(){return(await this.request("$SYS.REQ.USER.INFO")).json((w,y)=>w==="time"?new Date(Date.parse(y)):y)}stats(){return{inBytes:this.protocol.inBytes,outBytes:this.protocol.outBytes,inMsgs:this.protocol.inMsgs,outMsgs:this.protocol.outMsgs}}getServerVersion(){const b=this.info;return b?(0,r.parseSemVer)(b.version):void 0}async rtt(){if(this.isClosed())throw new d.errors.ClosedConnectionError;if(!this.protocol.connected)throw new d.errors.RequestError("connection disconnected");const b=Date.now();return await this.flush(),Date.now()-b}get features(){return this.protocol.features}reconnect(){return this.isClosed()?Promise.reject(new d.errors.ClosedConnectionError):this.isDraining()?Promise.reject(new d.errors.DrainingConnectionError):this.protocol.reconnect()}addCloseListener(b){this.closeListeners===void 0&&(this.closeListeners=new f(this.closed())),this.closeListeners.add(b)}removeCloseListener(b){this.closeListeners&&this.closeListeners.remove(b)}}ps.NatsConnectionImpl=h;class f{listeners;constructor(b){this.listeners=[],b.then(w=>{this.notify(w)})}add(b){this.listeners.push(b)}remove(b){this.listeners=this.listeners.filter(w=>w!==b)}notify(b){this.listeners.forEach(w=>{if(typeof w.connectionClosedCallback=="function")try{w.connectionClosedCallback(b)}catch{}}),this.listeners=[]}}return ps}var $n={},xo={},Vc;function Fu(){return Vc||(Vc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Empty=void 0;var t=Ln();Object.defineProperty(e,"Empty",{enumerable:!0,get:function(){return t.Empty}})})(xo)),xo}var Yc;function yp(){if(Yc)return $n;Yc=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.Bench=$n.Metric=void 0,$n.throughput=i,$n.msgThroughput=o,$n.humanizeBytes=c;const e=Fu(),t=Xi(),n=cr();class s{name;duration;date;payload;msgs;lang;version;bytes;asyncRequests;min;max;constructor(u,h){this.name=u,this.duration=h,this.date=Date.now(),this.payload=0,this.msgs=0,this.bytes=0}toString(){const u=this.duration/1e3,h=Math.round(this.msgs/u),f=this.asyncRequests?"asyncRequests":"";let g="";return this.max&&(g=`${this.min}/${this.max}`),`${this.name}${f?" [asyncRequests]":""} ${l(h)} msgs/sec - [${u.toFixed(2)} secs] ~ ${i(this.bytes,u)} ${g}`}toCsv(){return`"${this.name}",${new Date(this.date).toISOString()},${this.lang},${this.version},${this.msgs},${this.payload},${this.bytes},${this.duration},${this.asyncRequests?this.asyncRequests:!1}
28
+ `}static header(){return`Test,Date,Lang,Version,Count,MsgPayload,Bytes,Millis,Async
29
+ `}}$n.Metric=s;class r{nc;callbacks;msgs;size;subject;asyncRequests;pub;sub;req;rep;perf;payload;constructor(u,h={msgs:1e5,size:128,subject:"",asyncRequests:!1,pub:!1,sub:!1,req:!1,rep:!1}){if(this.nc=u,this.callbacks=h.callbacks||!1,this.msgs=h.msgs||0,this.size=h.size||0,this.subject=h.subject||t.nuid.next(),this.asyncRequests=h.asyncRequests||!1,this.pub=h.pub||!1,this.sub=h.sub||!1,this.req=h.req||!1,this.rep=h.rep||!1,this.perf=new n.Perf,this.payload=this.size?new Uint8Array(this.size):e.Empty,!this.pub&&!this.sub&&!this.req&&!this.rep)throw new Error("no options selected")}async run(){return this.nc.closed().then(u=>{if(u)throw u}),this.callbacks?await this.runCallbacks():await this.runAsync(),this.processMetrics()}processMetrics(){const u=this.nc,{lang:h,version:f}=u.protocol.transport;this.pub&&this.sub&&this.perf.measure("pubsub","pubStart","subStop"),this.req&&this.rep&&this.perf.measure("reqrep","reqStart","reqStop");const g=this.perf.getEntries(),b=g.find(v=>v.name==="pubsub"),w=g.find(v=>v.name==="reqrep"),y=g.find(v=>v.name==="req"),x=g.find(v=>v.name==="rep"),T=g.find(v=>v.name==="pub"),L=g.find(v=>v.name==="sub"),A=this.nc.stats(),D=[];if(b){const{name:v,duration:N}=b,I=new s(v,N);I.msgs=this.msgs*2,I.bytes=A.inBytes+A.outBytes,I.lang=h,I.version=f,I.payload=this.payload.length,D.push(I)}if(w){const{name:v,duration:N}=w,I=new s(v,N);I.msgs=this.msgs*2,I.bytes=A.inBytes+A.outBytes,I.lang=h,I.version=f,I.payload=this.payload.length,D.push(I)}if(T){const{name:v,duration:N}=T,I=new s(v,N);I.msgs=this.msgs,I.bytes=A.outBytes,I.lang=h,I.version=f,I.payload=this.payload.length,D.push(I)}if(L){const{name:v,duration:N}=L,I=new s(v,N);I.msgs=this.msgs,I.bytes=A.inBytes,I.lang=h,I.version=f,I.payload=this.payload.length,D.push(I)}if(x){const{name:v,duration:N}=x,I=new s(v,N);I.msgs=this.msgs,I.bytes=A.inBytes+A.outBytes,I.lang=h,I.version=f,I.payload=this.payload.length,D.push(I)}if(y){const{name:v,duration:N}=y,I=new s(v,N);I.msgs=this.msgs,I.bytes=A.inBytes+A.outBytes,I.lang=h,I.version=f,I.payload=this.payload.length,D.push(I)}return D}async runCallbacks(){const u=[];if(this.sub){const h=(0,n.deferred)();u.push(h);let f=0;this.nc.subscribe(this.subject,{max:this.msgs,callback:()=>{f++,f===1&&this.perf.mark("subStart"),f===this.msgs&&(this.perf.mark("subStop"),this.perf.measure("sub","subStart","subStop"),h.resolve())}})}if(this.rep){const h=(0,n.deferred)();u.push(h);let f=0;this.nc.subscribe(this.subject,{max:this.msgs,callback:(g,b)=>{b.respond(this.payload),f++,f===1&&this.perf.mark("repStart"),f===this.msgs&&(this.perf.mark("repStop"),this.perf.measure("rep","repStart","repStop"),h.resolve())}})}if(this.pub){const h=(async()=>{this.perf.mark("pubStart");for(let f=0;f<this.msgs;f++)this.nc.publish(this.subject,this.payload);await this.nc.flush(),this.perf.mark("pubStop"),this.perf.measure("pub","pubStart","pubStop")})();u.push(h)}if(this.req){const h=(async()=>{if(this.asyncRequests){this.perf.mark("reqStart");const f=[];for(let g=0;g<this.msgs;g++)f.push(this.nc.request(this.subject,this.payload,{timeout:2e4}));await Promise.all(f),this.perf.mark("reqStop"),this.perf.measure("req","reqStart","reqStop")}else{this.perf.mark("reqStart");for(let f=0;f<this.msgs;f++)await this.nc.request(this.subject);this.perf.mark("reqStop"),this.perf.measure("req","reqStart","reqStop")}})();u.push(h)}await Promise.all(u)}async runAsync(){const u=[];if(this.rep){let h=!1;const f=this.nc.subscribe(this.subject,{max:this.msgs}),g=(async()=>{for await(const b of f)h||(this.perf.mark("repStart"),h=!0),b.respond(this.payload);await this.nc.flush(),this.perf.mark("repStop"),this.perf.measure("rep","repStart","repStop")})();u.push(g)}if(this.sub){let h=!1;const f=this.nc.subscribe(this.subject,{max:this.msgs}),g=(async()=>{for await(const b of f)h||(this.perf.mark("subStart"),h=!0);this.perf.mark("subStop"),this.perf.measure("sub","subStart","subStop")})();u.push(g)}if(this.pub){const h=(async()=>{this.perf.mark("pubStart");for(let f=0;f<this.msgs;f++)this.nc.publish(this.subject,this.payload);await this.nc.flush(),this.perf.mark("pubStop"),this.perf.measure("pub","pubStart","pubStop")})();u.push(h)}if(this.req){const h=(async()=>{if(this.asyncRequests){this.perf.mark("reqStart");const f=[];for(let g=0;g<this.msgs;g++)f.push(this.nc.request(this.subject,this.payload,{timeout:2e4}));await Promise.all(f),this.perf.mark("reqStop"),this.perf.measure("req","reqStart","reqStop")}else{this.perf.mark("reqStart");for(let f=0;f<this.msgs;f++)await this.nc.request(this.subject);this.perf.mark("reqStop"),this.perf.measure("req","reqStart","reqStop")}})();u.push(h)}await Promise.all(u)}}$n.Bench=r;function i(d,u){return`${c(d/u)}/sec`}function o(d,u){return`${Math.floor(d/u)} msgs/sec`}function c(d,u=!1){const h=u?1e3:1024,f=u?["k","M","G","T","P","E"]:["K","M","G","T","P","E"],g=u?"iB":"B";if(d<h)return`${d.toFixed(2)} ${g}`;const b=parseInt(Math.log(d)/Math.log(h)+""),w=parseInt(b-1+"");return`${(d/Math.pow(h,b)).toFixed(2)} ${f[w]}${g}`}function l(d){return d.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return $n}var As={},Xc;function vp(){if(Xc)return As;Xc=1,Object.defineProperty(As,"__esModule",{value:!0}),As.IdleHeartbeatMonitor=void 0;class e{interval;maxOut;cancelAfter;timer;autoCancelTimer;last;missed;count;callback;constructor(n,s,r={maxOut:2}){this.interval=n,this.maxOut=r?.maxOut||2,this.cancelAfter=r?.cancelAfter||0,this.last=Date.now(),this.missed=0,this.count=0,this.callback=s,this._schedule()}cancel(){this.autoCancelTimer&&clearTimeout(this.autoCancelTimer),this.timer&&clearInterval(this.timer),this.timer=0,this.autoCancelTimer=0,this.missed=0}work(){this.last=Date.now(),this.missed=0}_change(n,s=0,r=2){this.interval=n,this.maxOut=r,this.cancelAfter=s,this.restart()}restart(){this.cancel(),this._schedule()}_schedule(){this.cancelAfter>0&&(this.autoCancelTimer=setTimeout(()=>{this.cancel()},this.cancelAfter)),this.timer=setInterval(()=>{if(this.count++,Date.now()-this.last>this.interval&&this.missed++,this.missed>=this.maxOut)try{this.callback(this.missed)===!0&&this.cancel()}catch(n){console.log(n)}},this.interval)}}return As.IdleHeartbeatMonitor=e,As}var Lr={},Ts={},Zc;function Ep(){return Zc||(Zc=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.version=void 0,Ts.version="3.3.1"),Ts}var Jc;function wp(){if(Jc)return Lr;Jc=1,Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.WsTransport=void 0,Lr.wsUrlParseFn=h,Lr.wsconnect=f;const e=cr(),t=os(),n=Qi(),s=Zi(),r=Oi(),i=ju(),o=Ep(),c=Yn(),l=o.version,d="nats.ws";class u{version;lang;closeError;connected;done;socket;options;socketClosed;encrypted;peeked;yields;signal;closedNotification;constructor(){this.version=l,this.lang=d,this.connected=!1,this.done=!1,this.socketClosed=!1,this.encrypted=!1,this.peeked=!1,this.yields=[],this.signal=(0,e.deferred)(),this.closedNotification=(0,e.deferred)()}async connect(b,w){const y=(0,e.deferred)();this.options=w;const x=b.src;if(w.wsFactory){const{socket:T,encrypted:L}=await w.wsFactory(b.src,w);this.socket=T,this.encrypted=L}else this.encrypted=x.indexOf("wss://")===0,this.socket=new WebSocket(x);return this.socket.binaryType="arraybuffer",this.socket.onopen=()=>{this.done&&this._closed(new Error("aborted"))},this.socket.onmessage=T=>{if(this.done)return;if(this.yields.push(new Uint8Array(T.data)),this.peeked){this.signal.resolve();return}const L=s.DataBuffer.concat(...this.yields),A=(0,t.extractProtocolMessage)(L);if(A!==""){const D=r.INFO.exec(A);if(!D){w.debug&&console.error("!!!",(0,e.render)(L)),y.reject(new Error("unexpected response from server"));return}try{const v=JSON.parse(D[1]);(0,n.checkOptions)(v,this.options),this.peeked=!0,this.connected=!0,this.signal.resolve(),y.resolve()}catch(v){y.reject(v);return}}},this.socket.onclose=T=>{let L;!T.wasClean&&T.reason!==""&&(L=new Error(T.reason)),this._closed(L),this._cleanup()},this.socket.onerror=T=>{if(this.done)return;const L=T,A=new c.errors.ConnectionError(L.message);y.reject(A),this._cleanup()},y}_cleanup(){this.socketClosed===!1&&(this.socketClosed=!0,this.socket.onopen=null,this.socket.onmessage=null,this.socket.onerror=null,this.socket.onclose=null,this.closedNotification.resolve(this.closeError))}disconnect(){this._closed(void 0,!0)}async _closed(b,w=!0){if(this.done){try{this.socket.close()}catch{}return}if(this.closeError=b,!b)for(;!this.socketClosed&&this.socket.bufferedAmount>0;)await(0,e.delay)(100);this.done=!0;try{this.socket.close()}catch{}return this.closedNotification}get isClosed(){return this.done}[Symbol.asyncIterator](){return this.iterate()}async*iterate(){for(;;){if(this.done)return;this.yields.length===0&&await this.signal;const b=this.yields;this.yields=[];for(let w=0;w<b.length;w++)this.options.debug&&console.info(`> ${(0,e.render)(b[w])}`),yield b[w];if(this.done)break;this.yields.length===0&&(b.length=0,this.yields=b,this.signal=(0,e.deferred)())}}isEncrypted(){return this.connected&&this.encrypted}send(b){if(!this.done)try{this.socket.send(b.buffer),this.options.debug&&console.info(`< ${(0,e.render)(b)}`);return}catch(w){this.options.debug&&console.error(`!!! ${(0,e.render)(b)}: ${w}`)}}close(b){return this._closed(b,!1)}closed(){return this.closedNotification}discard(){this.socket?.close()}}Lr.WsTransport=u;function h(g,b){/^(.*:\/\/)(.*)/.test(g)||(typeof b=="boolean"?g=`${b===!0?"https":"http"}://${g}`:g=`https://${g}`);let y=new URL(g);const x=y.protocol.toLowerCase();x==="ws:"&&(b=!1),x==="wss:"&&(b=!0),x!=="https:"&&x!=="http"&&(g=g.replace(/^(.*:\/\/)(.*)/gm,"$2"),y=new URL(`http://${g}`));let T,L;const A=y.hostname,D=y.pathname,v=y.search||"";switch(x){case"http:":case"ws:":case"nats:":L=y.port||"80",T="ws:";break;case"https:":case"wss:":case"tls:":L=y.port||"443",T="wss:";break;default:L=y.port||b===!0?"443":"80",T=b===!0?"wss:":"ws:";break}return`${T}//${A}:${L}${D}${v}`}function f(g={}){return(0,t.setTransportFactory)({defaultPort:443,urlParseFn:h,factory:()=>{if(g.tls)throw c.InvalidArgumentError.format("tls","is not configurable on w3c websocket connections");return new u}}),i.NatsConnectionImpl.connect(g)}return Lr}var $c;function ba(){return $c||($c=1,(function(e){var t=Pr&&Pr.__createBinding||(Object.create?(function(mt,We,je,me){me===void 0&&(me=je);var rt=Object.getOwnPropertyDescriptor(We,je);(!rt||("get"in rt?!We.__esModule:rt.writable||rt.configurable))&&(rt={enumerable:!0,get:function(){return We[je]}}),Object.defineProperty(mt,me,rt)}):(function(mt,We,je,me){me===void 0&&(me=je),mt[me]=We[je]})),n=Pr&&Pr.__exportStar||function(mt,We){for(var je in mt)je!=="default"&&!Object.prototype.hasOwnProperty.call(We,je)&&t(We,mt,je)};Object.defineProperty(e,"__esModule",{value:!0}),e.Metric=e.Bench=e.writeAll=e.readAll=e.MAX_SIZE=e.DenoBuffer=e.State=e.Parser=e.Kind=e.describe=e.QueuedIteratorImpl=e.usernamePasswordAuthenticator=e.tokenAuthenticator=e.nkeyAuthenticator=e.jwtAuthenticator=e.credsAuthenticator=e.RequestOne=e.parseOptions=e.hasWsProtocol=e.defaultOptions=e.DEFAULT_MAX_RECONNECT_ATTEMPTS=e.checkUnsupportedOption=e.checkOptions=e.buildAuthenticator=e.DataBuffer=e.MuxSubscription=e.Heartbeat=e.MsgHdrsImpl=e.headers=e.canonicalMIMEHeaderKey=e.timeout=e.SimpleMutex=e.render=e.nanos=e.millis=e.extend=e.delay=e.deferred=e.deadline=e.collect=e.backoff=e.ProtocolHandler=e.INFO=e.Connect=e.setTransportFactory=e.getResolveFn=e.MsgImpl=e.nuid=e.Nuid=e.NatsConnectionImpl=void 0,e.UserAuthenticationExpiredError=e.TimeoutError=e.RequestError=e.ProtocolError=e.PermissionViolationError=e.NoRespondersError=e.InvalidSubjectError=e.InvalidOperationError=e.InvalidArgumentError=e.errors=e.DrainingConnectionError=e.ConnectionError=e.ClosedConnectionError=e.AuthorizationError=e.wsUrlParseFn=e.wsconnect=e.Servers=e.isIPV4OrHostname=e.IdleHeartbeatMonitor=e.Subscriptions=e.SubscriptionImpl=e.syncIterator=e.Match=e.createInbox=e.protoLen=e.extractProtocolMessage=e.Empty=e.parseSemVer=e.Features=e.Feature=e.compare=e.parseIP=e.isIP=e.ipV4=e.TE=e.TD=void 0;var s=ju();Object.defineProperty(e,"NatsConnectionImpl",{enumerable:!0,get:function(){return s.NatsConnectionImpl}});var r=Xi();Object.defineProperty(e,"Nuid",{enumerable:!0,get:function(){return r.Nuid}}),Object.defineProperty(e,"nuid",{enumerable:!0,get:function(){return r.nuid}});var i=Ru();Object.defineProperty(e,"MsgImpl",{enumerable:!0,get:function(){return i.MsgImpl}});var o=os();Object.defineProperty(e,"getResolveFn",{enumerable:!0,get:function(){return o.getResolveFn}}),Object.defineProperty(e,"setTransportFactory",{enumerable:!0,get:function(){return o.setTransportFactory}});var c=Oi();Object.defineProperty(e,"Connect",{enumerable:!0,get:function(){return c.Connect}}),Object.defineProperty(e,"INFO",{enumerable:!0,get:function(){return c.INFO}}),Object.defineProperty(e,"ProtocolHandler",{enumerable:!0,get:function(){return c.ProtocolHandler}});var l=cr();Object.defineProperty(e,"backoff",{enumerable:!0,get:function(){return l.backoff}}),Object.defineProperty(e,"collect",{enumerable:!0,get:function(){return l.collect}}),Object.defineProperty(e,"deadline",{enumerable:!0,get:function(){return l.deadline}}),Object.defineProperty(e,"deferred",{enumerable:!0,get:function(){return l.deferred}}),Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return l.delay}}),Object.defineProperty(e,"extend",{enumerable:!0,get:function(){return l.extend}}),Object.defineProperty(e,"millis",{enumerable:!0,get:function(){return l.millis}}),Object.defineProperty(e,"nanos",{enumerable:!0,get:function(){return l.nanos}}),Object.defineProperty(e,"render",{enumerable:!0,get:function(){return l.render}}),Object.defineProperty(e,"SimpleMutex",{enumerable:!0,get:function(){return l.SimpleMutex}}),Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return l.timeout}});var d=pa();Object.defineProperty(e,"canonicalMIMEHeaderKey",{enumerable:!0,get:function(){return d.canonicalMIMEHeaderKey}}),Object.defineProperty(e,"headers",{enumerable:!0,get:function(){return d.headers}}),Object.defineProperty(e,"MsgHdrsImpl",{enumerable:!0,get:function(){return d.MsgHdrsImpl}});var u=Cu();Object.defineProperty(e,"Heartbeat",{enumerable:!0,get:function(){return u.Heartbeat}});var h=Ou();Object.defineProperty(e,"MuxSubscription",{enumerable:!0,get:function(){return h.MuxSubscription}});var f=Zi();Object.defineProperty(e,"DataBuffer",{enumerable:!0,get:function(){return f.DataBuffer}});var g=Qi();Object.defineProperty(e,"buildAuthenticator",{enumerable:!0,get:function(){return g.buildAuthenticator}}),Object.defineProperty(e,"checkOptions",{enumerable:!0,get:function(){return g.checkOptions}}),Object.defineProperty(e,"checkUnsupportedOption",{enumerable:!0,get:function(){return g.checkUnsupportedOption}}),Object.defineProperty(e,"DEFAULT_MAX_RECONNECT_ATTEMPTS",{enumerable:!0,get:function(){return g.DEFAULT_MAX_RECONNECT_ATTEMPTS}}),Object.defineProperty(e,"defaultOptions",{enumerable:!0,get:function(){return g.defaultOptions}}),Object.defineProperty(e,"hasWsProtocol",{enumerable:!0,get:function(){return g.hasWsProtocol}}),Object.defineProperty(e,"parseOptions",{enumerable:!0,get:function(){return g.parseOptions}});var b=Bu();Object.defineProperty(e,"RequestOne",{enumerable:!0,get:function(){return b.RequestOne}});var w=Uu();Object.defineProperty(e,"credsAuthenticator",{enumerable:!0,get:function(){return w.credsAuthenticator}}),Object.defineProperty(e,"jwtAuthenticator",{enumerable:!0,get:function(){return w.jwtAuthenticator}}),Object.defineProperty(e,"nkeyAuthenticator",{enumerable:!0,get:function(){return w.nkeyAuthenticator}}),Object.defineProperty(e,"tokenAuthenticator",{enumerable:!0,get:function(){return w.tokenAuthenticator}}),Object.defineProperty(e,"usernamePasswordAuthenticator",{enumerable:!0,get:function(){return w.usernamePasswordAuthenticator}}),n(Du(),e);var y=ha();Object.defineProperty(e,"QueuedIteratorImpl",{enumerable:!0,get:function(){return y.QueuedIteratorImpl}});var x=Iu();Object.defineProperty(e,"describe",{enumerable:!0,get:function(){return x.describe}}),Object.defineProperty(e,"Kind",{enumerable:!0,get:function(){return x.Kind}}),Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return x.Parser}}),Object.defineProperty(e,"State",{enumerable:!0,get:function(){return x.State}});var T=Pu();Object.defineProperty(e,"DenoBuffer",{enumerable:!0,get:function(){return T.DenoBuffer}}),Object.defineProperty(e,"MAX_SIZE",{enumerable:!0,get:function(){return T.MAX_SIZE}}),Object.defineProperty(e,"readAll",{enumerable:!0,get:function(){return T.readAll}}),Object.defineProperty(e,"writeAll",{enumerable:!0,get:function(){return T.writeAll}});var L=yp();Object.defineProperty(e,"Bench",{enumerable:!0,get:function(){return L.Bench}}),Object.defineProperty(e,"Metric",{enumerable:!0,get:function(){return L.Metric}});var A=Ln();Object.defineProperty(e,"TD",{enumerable:!0,get:function(){return A.TD}}),Object.defineProperty(e,"TE",{enumerable:!0,get:function(){return A.TE}});var D=Tu();Object.defineProperty(e,"ipV4",{enumerable:!0,get:function(){return D.ipV4}}),Object.defineProperty(e,"isIP",{enumerable:!0,get:function(){return D.isIP}}),Object.defineProperty(e,"parseIP",{enumerable:!0,get:function(){return D.parseIP}});var v=ga();Object.defineProperty(e,"compare",{enumerable:!0,get:function(){return v.compare}}),Object.defineProperty(e,"Feature",{enumerable:!0,get:function(){return v.Feature}}),Object.defineProperty(e,"Features",{enumerable:!0,get:function(){return v.Features}}),Object.defineProperty(e,"parseSemVer",{enumerable:!0,get:function(){return v.parseSemVer}});var N=Fu();Object.defineProperty(e,"Empty",{enumerable:!0,get:function(){return N.Empty}});var I=os();Object.defineProperty(e,"extractProtocolMessage",{enumerable:!0,get:function(){return I.extractProtocolMessage}}),Object.defineProperty(e,"protoLen",{enumerable:!0,get:function(){return I.protoLen}});var z=Kr();Object.defineProperty(e,"createInbox",{enumerable:!0,get:function(){return z.createInbox}}),Object.defineProperty(e,"Match",{enumerable:!0,get:function(){return z.Match}}),Object.defineProperty(e,"syncIterator",{enumerable:!0,get:function(){return z.syncIterator}});var ae=Oi();Object.defineProperty(e,"SubscriptionImpl",{enumerable:!0,get:function(){return ae.SubscriptionImpl}}),Object.defineProperty(e,"Subscriptions",{enumerable:!0,get:function(){return ae.Subscriptions}});var ke=vp();Object.defineProperty(e,"IdleHeartbeatMonitor",{enumerable:!0,get:function(){return ke.IdleHeartbeatMonitor}});var Ye=ku();Object.defineProperty(e,"isIPV4OrHostname",{enumerable:!0,get:function(){return Ye.isIPV4OrHostname}}),Object.defineProperty(e,"Servers",{enumerable:!0,get:function(){return Ye.Servers}});var it=wp();Object.defineProperty(e,"wsconnect",{enumerable:!0,get:function(){return it.wsconnect}}),Object.defineProperty(e,"wsUrlParseFn",{enumerable:!0,get:function(){return it.wsUrlParseFn}});var Ie=Yn();Object.defineProperty(e,"AuthorizationError",{enumerable:!0,get:function(){return Ie.AuthorizationError}}),Object.defineProperty(e,"ClosedConnectionError",{enumerable:!0,get:function(){return Ie.ClosedConnectionError}}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:function(){return Ie.ConnectionError}}),Object.defineProperty(e,"DrainingConnectionError",{enumerable:!0,get:function(){return Ie.DrainingConnectionError}}),Object.defineProperty(e,"errors",{enumerable:!0,get:function(){return Ie.errors}}),Object.defineProperty(e,"InvalidArgumentError",{enumerable:!0,get:function(){return Ie.InvalidArgumentError}}),Object.defineProperty(e,"InvalidOperationError",{enumerable:!0,get:function(){return Ie.InvalidOperationError}}),Object.defineProperty(e,"InvalidSubjectError",{enumerable:!0,get:function(){return Ie.InvalidSubjectError}}),Object.defineProperty(e,"NoRespondersError",{enumerable:!0,get:function(){return Ie.NoRespondersError}}),Object.defineProperty(e,"PermissionViolationError",{enumerable:!0,get:function(){return Ie.PermissionViolationError}}),Object.defineProperty(e,"ProtocolError",{enumerable:!0,get:function(){return Ie.ProtocolError}}),Object.defineProperty(e,"RequestError",{enumerable:!0,get:function(){return Ie.RequestError}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return Ie.TimeoutError}}),Object.defineProperty(e,"UserAuthenticationExpiredError",{enumerable:!0,get:function(){return Ie.UserAuthenticationExpiredError}})})(Pr)),Pr}var Qc;function xp(){return Qc||(Qc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.wsconnect=e.usernamePasswordAuthenticator=e.UserAuthenticationExpiredError=e.tokenAuthenticator=e.TimeoutError=e.syncIterator=e.RequestError=e.ProtocolError=e.PermissionViolationError=e.nuid=e.Nuid=e.NoRespondersError=e.nkeys=e.nkeyAuthenticator=e.nanos=e.MsgHdrsImpl=e.millis=e.Metric=e.Match=e.jwtAuthenticator=e.InvalidSubjectError=e.InvalidOperationError=e.InvalidArgumentError=e.headers=e.hasWsProtocol=e.errors=e.Empty=e.DrainingConnectionError=e.delay=e.deferred=e.deadline=e.credsAuthenticator=e.createInbox=e.ConnectionError=e.ClosedConnectionError=e.canonicalMIMEHeaderKey=e.buildAuthenticator=e.Bench=e.backoff=e.AuthorizationError=void 0;var t=ba();Object.defineProperty(e,"AuthorizationError",{enumerable:!0,get:function(){return t.AuthorizationError}}),Object.defineProperty(e,"backoff",{enumerable:!0,get:function(){return t.backoff}}),Object.defineProperty(e,"Bench",{enumerable:!0,get:function(){return t.Bench}}),Object.defineProperty(e,"buildAuthenticator",{enumerable:!0,get:function(){return t.buildAuthenticator}}),Object.defineProperty(e,"canonicalMIMEHeaderKey",{enumerable:!0,get:function(){return t.canonicalMIMEHeaderKey}}),Object.defineProperty(e,"ClosedConnectionError",{enumerable:!0,get:function(){return t.ClosedConnectionError}}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:function(){return t.ConnectionError}}),Object.defineProperty(e,"createInbox",{enumerable:!0,get:function(){return t.createInbox}}),Object.defineProperty(e,"credsAuthenticator",{enumerable:!0,get:function(){return t.credsAuthenticator}}),Object.defineProperty(e,"deadline",{enumerable:!0,get:function(){return t.deadline}}),Object.defineProperty(e,"deferred",{enumerable:!0,get:function(){return t.deferred}}),Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return t.delay}}),Object.defineProperty(e,"DrainingConnectionError",{enumerable:!0,get:function(){return t.DrainingConnectionError}}),Object.defineProperty(e,"Empty",{enumerable:!0,get:function(){return t.Empty}}),Object.defineProperty(e,"errors",{enumerable:!0,get:function(){return t.errors}}),Object.defineProperty(e,"hasWsProtocol",{enumerable:!0,get:function(){return t.hasWsProtocol}}),Object.defineProperty(e,"headers",{enumerable:!0,get:function(){return t.headers}}),Object.defineProperty(e,"InvalidArgumentError",{enumerable:!0,get:function(){return t.InvalidArgumentError}}),Object.defineProperty(e,"InvalidOperationError",{enumerable:!0,get:function(){return t.InvalidOperationError}}),Object.defineProperty(e,"InvalidSubjectError",{enumerable:!0,get:function(){return t.InvalidSubjectError}}),Object.defineProperty(e,"jwtAuthenticator",{enumerable:!0,get:function(){return t.jwtAuthenticator}}),Object.defineProperty(e,"Match",{enumerable:!0,get:function(){return t.Match}}),Object.defineProperty(e,"Metric",{enumerable:!0,get:function(){return t.Metric}}),Object.defineProperty(e,"millis",{enumerable:!0,get:function(){return t.millis}}),Object.defineProperty(e,"MsgHdrsImpl",{enumerable:!0,get:function(){return t.MsgHdrsImpl}}),Object.defineProperty(e,"nanos",{enumerable:!0,get:function(){return t.nanos}}),Object.defineProperty(e,"nkeyAuthenticator",{enumerable:!0,get:function(){return t.nkeyAuthenticator}}),Object.defineProperty(e,"nkeys",{enumerable:!0,get:function(){return t.nkeys}}),Object.defineProperty(e,"NoRespondersError",{enumerable:!0,get:function(){return t.NoRespondersError}}),Object.defineProperty(e,"Nuid",{enumerable:!0,get:function(){return t.Nuid}}),Object.defineProperty(e,"nuid",{enumerable:!0,get:function(){return t.nuid}}),Object.defineProperty(e,"PermissionViolationError",{enumerable:!0,get:function(){return t.PermissionViolationError}}),Object.defineProperty(e,"ProtocolError",{enumerable:!0,get:function(){return t.ProtocolError}}),Object.defineProperty(e,"RequestError",{enumerable:!0,get:function(){return t.RequestError}}),Object.defineProperty(e,"syncIterator",{enumerable:!0,get:function(){return t.syncIterator}}),Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return t.TimeoutError}}),Object.defineProperty(e,"tokenAuthenticator",{enumerable:!0,get:function(){return t.tokenAuthenticator}}),Object.defineProperty(e,"UserAuthenticationExpiredError",{enumerable:!0,get:function(){return t.UserAuthenticationExpiredError}}),Object.defineProperty(e,"usernamePasswordAuthenticator",{enumerable:!0,get:function(){return t.usernamePasswordAuthenticator}}),Object.defineProperty(e,"wsconnect",{enumerable:!0,get:function(){return t.wsconnect}})})(ho)),ho}var qu=xp();const Hu="nats-dashboard-config";function Sp(){let e={};try{const t=localStorage.getItem(Hu);e=t?JSON.parse(t):{}}catch{}try{const t=new URLSearchParams(window.location.search),n=t.get("nats");n&&(e.natsUrl=n);const s=t.get("owner");s&&(e.owner=s,e.ownerLocked=!0)}catch{}return e}const Vt=nn({natsUrl:"wss://demo.nats.io:8443",discoveryInterval:5e3,owner:"",ownerLocked:!1,...Sp()});function Ap(){try{localStorage.setItem(Hu,JSON.stringify({natsUrl:Vt.natsUrl,discoveryInterval:Vt.discoveryInterval,owner:Vt.owner,ownerLocked:Vt.ownerLocked}))}catch(e){console.warn("[natsConnection] failed to persist config:",e)}}yr(Vt,Ap,{deep:!0});const tt=nn({nc:null,status:"idle",error:null,serverInfo:null,connectedAt:null});let Ci=!1;function Tp(e){return/^wss?:\/\//.test(e)}async function Ku(){if(!Tp(Vt.natsUrl))throw tt.status="error",tt.error=`Invalid URL: must start with ws:// or wss:// (got "${Vt.natsUrl}")`,new Error(tt.error);tt.nc&&await ma(),tt.status="connecting",tt.error=null;try{const e=await qu.wsconnect({servers:Vt.natsUrl,name:"nats-agent-dashboard",reconnect:!0,maxReconnectAttempts:-1,reconnectTimeWait:1e3});tt.nc=e,tt.status="connected",tt.error=null,tt.serverInfo=e.info??null,tt.connectedAt=Date.now(),Ci=!1,kp(e),e.closed().then(t=>{Ci||(t&&(tt.error=t.message),tt.status="disconnected",tt.nc=null)}).catch(()=>{})}catch(e){throw tt.status="error",tt.error=e?.message??String(e),tt.nc=null,e}}async function kp(e){try{for await(const t of e.status()){if(Ci)break;switch(t.type){case"disconnect":case"staleConnection":tt.status="reconnecting";break;case"reconnecting":tt.status="reconnecting";break;case"reconnect":tt.status="connected",tt.error=null;break;case"error":case"serverError":tt.error=t.error?.message??String(t.error??t);break;case"update":break;case"close":tt.status="disconnected";break;default:break}}}catch{}}async function ma(){Ci=!0;const e=tt.nc;if(tt.nc=null,tt.status="idle",tt.error=null,tt.serverInfo=null,tt.connectedAt=null,e)try{await e.close()}catch{}}async function Op(){await ma(),await Ku()}const Yt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Cp=["title"],Pp={class:"status-label"},Ip={__name:"ConnectionStatus",setup(e){const t=ct(()=>{switch(tt.status){case"connected":return"online";case"connecting":case"reconnecting":return"checking";case"error":case"disconnected":return"offline";default:return"idle"}}),n=ct(()=>{switch(tt.status){case"connected":return`Connected to ${Vt.natsUrl}`;case"connecting":return"Connecting…";case"reconnecting":return"Reconnecting…";case"disconnected":return"Disconnected";case"error":return tt.error||"Connection error";default:return"Not connected"}});return(s,r)=>(ie(),be("div",{class:Nn(["status-indicator",t.value]),title:Kt(tt).error||""},[r[0]||(r[0]=F("span",{class:"status-dot"},null,-1)),F("span",Pp,nt(n.value),1)],10,Cp))}},Rp=Yt(Ip,[["__scopeId","data-v-a1e6c04d"]]);var So={},Ao={},To={},ko={},el;function _a(){return el||(el=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceVerb=e.ServiceError=e.ServiceErrorCodeHeader=e.ServiceErrorHeader=e.ServiceResponseType=void 0,e.ServiceResponseType={STATS:"io.nats.micro.v1.stats_response",INFO:"io.nats.micro.v1.info_response",PING:"io.nats.micro.v1.ping_response"},e.ServiceErrorHeader="Nats-Service-Error",e.ServiceErrorCodeHeader="Nats-Service-Error-Code";class t extends Error{code;constructor(s,r){super(r),this.code=s}static isServiceError(s){return t.toServiceError(s)!==null}static toServiceError(s){const r=s?.headers?.get(e.ServiceErrorCodeHeader)||"";if(r!==""){const i=parseInt(r)||400,o=s?.headers?.get(e.ServiceErrorHeader)||"";return new t(i,o.length?o:r)}return null}}e.ServiceError=t,e.ServiceVerb={PING:"PING",STATS:"STATS",INFO:"INFO"}})(ko)),ko}var tl;function zu(){return tl||(tl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceImpl=e.ServiceGroupImpl=e.ServiceMsgImpl=e.ServiceApiPrefix=void 0;const t=ba(),n=_a();function s(h,f=""){if(f==="")throw Error(`${h} name required`);const g=r(f);if(g.length)throw new Error(`invalid ${h} name - ${h} name ${g}`)}function r(h=""){if(!h)throw Error("name required");const f=/^[-\w]+$/g;if(h.match(f)===null){for(const b of h.split(""))if(b.match(f)===null)return`cannot contain '${b}'`}return""}e.ServiceApiPrefix="$SRV";class i{msg;constructor(f){this.msg=f}get data(){return this.msg.data}get sid(){return this.msg.sid}get subject(){return this.msg.subject}get reply(){return this.msg.reply||""}get headers(){return this.msg.headers}respond(f,g){return this.msg.respond(f,g)}respondError(f,g,b,w){return w=w||{},w.headers=w.headers||(0,t.headers)(),w.headers?.set(n.ServiceErrorCodeHeader,`${f}`),w.headers?.set(n.ServiceErrorHeader,g),this.msg.respond(b,w)}json(f){return this.msg.json(f)}string(){return this.msg.string()}}e.ServiceMsgImpl=i;class o{subject;queue;srv;constructor(f,g="",b=""){g!==""&&l("service group",g);let w="";if(f instanceof d)this.srv=f,w="";else if(f instanceof o){const y=f;this.srv=y.srv,b===void 0&&(b=y.queue),w=y.subject}else throw new Error("unknown ServiceGroup type");this.subject=this.calcSubject(w,g),this.queue=b}calcSubject(f,g=""){return g===""?f:f!==""?`${f}.${g}`:g}addEndpoint(f="",g){g=g||{subject:f};const b=typeof g=="function"?{handler:g,subject:f}:g;s("endpoint",f);let{subject:w,handler:y,metadata:x,queue:T}=b;w=w||f,T=T||this.queue,c("endpoint subject",w),w=this.calcSubject(this.subject,w);const L={name:f,subject:w,queue:T,handler:y,metadata:x};return this.srv._addEndpoint(L)}addGroup(f="",g){return g===void 0&&(g=this.queue),new o(this,f,g)}}e.ServiceGroupImpl=o;function c(h,f){if(f==="")throw new Error(`${h} cannot be empty`);if(f.indexOf(" ")!==-1)throw new Error(`${h} cannot contain spaces: '${f}'`);const g=f.split(".");g.forEach((b,w)=>{if(b===">"&&w!==g.length-1)throw new Error(`${h} cannot have internal '>': '${f}'`)})}function l(h,f){if(f.indexOf(" ")!==-1)throw new Error(`${h} cannot contain spaces: '${f}'`);f.split(".").forEach(b=>{if(b===">")throw new Error(`${h} name cannot contain internal '>': '${f}'`)})}class d{nc;_id;config;handlers;internal;_stopped;_done;started;closeListener;static controlSubject(f,g="",b="",w){const y=w??e.ServiceApiPrefix;return g===""&&b===""?`${y}.${f}`:(s("control subject name",g),b!==""?(s("control subject id",b),`${y}.${f}.${g}.${b}`):`${y}.${f}.${g}`)}constructor(f,g={name:"",version:""}){this.nc=f,this.config=Object.assign({},g),this.config.queue===void 0&&(this.config.queue="q"),g.metadata=Object.freeze(g.metadata||{}),s("name",this.config.name),this.config.queue&&s("queue",this.config.queue),(0,t.parseSemVer)(this.config.version),this._id=t.nuid.next(),this.internal=[],this._done=(0,t.deferred)(),this._stopped=!1,this.handlers=[],this.started=new Date().toISOString(),this.reset(),this.closeListener={connectionClosedCallback:b=>{this.close(b).catch()}},this.nc.addCloseListener(this.closeListener)}get subjects(){return this.handlers.filter(f=>f.internal===!1).map(f=>f.subject)}get id(){return this._id}get name(){return this.config.name}get description(){return this.config.description??""}get version(){return this.config.version}get metadata(){return this.config.metadata}errorToHeader(f){const g=(0,t.headers)();if(f instanceof n.ServiceError){const b=f;g.set(n.ServiceErrorHeader,b.message),g.set(n.ServiceErrorCodeHeader,`${b.code}`)}else g.set(n.ServiceErrorHeader,f.message),g.set(n.ServiceErrorCodeHeader,"500");return g}setupHandler(f,g=!1){const b=g?"":f.queue?f.queue:this.config.queue,{name:w,subject:y,handler:x}=f,T=f;T.internal=g,g&&this.internal.push(T),T.stats=new u(w,y,b),T.queue=b;const L=x?(A,D)=>{if(A){this.close(A);return}const v=Date.now();try{x(A,new i(D))}catch(N){T.stats.countError(N),D?.respond(t.Empty,{headers:this.errorToHeader(N)})}finally{T.stats.countLatency(v)}}:void 0;return T.sub=this.nc.subscribe(y,{callback:L,queue:b}),T.sub.closed.then(()=>{this._stopped||this.close(new Error(`required subscription ${f.subject} stopped`)).catch()}).catch(A=>{if(!this._stopped){const D=new Error(`required subscription ${f.subject} errored: ${A.message}`);D.stack=A.stack,this.close(D).catch()}}),T}info(){return{type:n.ServiceResponseType.INFO,name:this.name,id:this.id,version:this.version,description:this.description,metadata:this.metadata,endpoints:this.endpoints()}}endpoints(){return this.handlers.map(f=>{const{subject:g,metadata:b,name:w,queue:y}=f;return{subject:g,metadata:b,name:w,queue_group:y}})}async stats(){const f=[];for(const g of this.handlers){if(typeof this.config.statsHandler=="function")try{g.stats.data=await this.config.statsHandler(g)}catch(b){g.stats.countError(b)}f.push(g.stats.stats(g.qi))}return{type:n.ServiceResponseType.STATS,name:this.name,id:this.id,version:this.version,started:this.started,metadata:this.metadata,endpoints:f}}addInternalHandler(f,g){const b=`${f}`.toUpperCase();this._doAddInternalHandler(`${b}-all`,f,g),this._doAddInternalHandler(`${b}-kind`,f,g,this.name),this._doAddInternalHandler(`${b}`,f,g,this.name,this.id)}_doAddInternalHandler(f,g,b,w="",y=""){const x={};x.name=f,x.subject=d.controlSubject(g,w,y),x.handler=b,this.setupHandler(x,!0)}start(){const f=(y,x)=>y?(this.close(y),Promise.reject(y)):this.stats().then(T=>(x?.respond(JSON.stringify(T)),Promise.resolve())),g=(y,x)=>y?(this.close(y),Promise.reject(y)):(x?.respond(JSON.stringify(this.info())),Promise.resolve()),b=JSON.stringify(this.ping()),w=(y,x)=>y?(this.close(y).then().catch(),Promise.reject(y)):(x.respond(b),Promise.resolve());return this.addInternalHandler(n.ServiceVerb.PING,w),this.addInternalHandler(n.ServiceVerb.STATS,f),this.addInternalHandler(n.ServiceVerb.INFO,g),this.handlers.forEach(y=>{const{subject:x}=y;typeof x=="string"&&y.handler!==null&&this.setupHandler(y)}),Promise.resolve(this)}close(f){if(this._stopped)return this._done;this._stopped=!0,this.nc.removeCloseListener(this.closeListener);let g=[];return this.nc.isClosed()||(g=this.handlers.concat(this.internal).map(b=>b.sub.drain())),Promise.allSettled(g).then(()=>{this._done.resolve(f||null)}),this._done}get stopped(){return this._done}get isStopped(){return this._stopped}stop(f){return this.close(f)}ping(){return{type:n.ServiceResponseType.PING,name:this.name,id:this.id,version:this.version,metadata:this.metadata}}reset(){if(this.started=new Date().toISOString(),this.handlers)for(const f of this.handlers)f.stats.reset(f.qi)}addGroup(f,g){return new o(this,f,g)}addEndpoint(f,g){return new o(this).addEndpoint(f,g)}_addEndpoint(f){const g=new t.QueuedIteratorImpl;g.profile=!0,g.noIterator=typeof f.handler=="function",g.noIterator||(f.handler=(w,y)=>{w?this.stop(w).catch():g.push(new i(y))},g.iterClosed.then(()=>{this.close().catch()}));const b=this.setupHandler(f,!1);return b.sub.closed.then(w=>{w?this.stop(w):g.stop()}),b.qi=g,this.handlers.push(b),g}}e.ServiceImpl=d;class u{name;subject;average_processing_time;num_requests;processing_time;num_errors;last_error;data;metadata;queue;constructor(f,g,b=""){this.name=f,this.subject=g,this.average_processing_time=0,this.num_errors=0,this.num_requests=0,this.processing_time=0,this.queue=b}reset(f){this.num_requests=0,this.processing_time=0,this.average_processing_time=0,this.num_errors=0,this.last_error=void 0,this.data=void 0;const g=f;g&&(g.time=0,g.processed=0)}countLatency(f){this.num_requests++,this.processing_time+=(0,t.nanos)(Date.now()-f),this.average_processing_time=Math.round(this.processing_time/this.num_requests)}countError(f){this.num_errors++,this.last_error=f.message}_stats(){const{name:f,subject:g,average_processing_time:b,num_errors:w,num_requests:y,processing_time:x,last_error:T,data:L,queue:A}=this;return{name:f,subject:g,average_processing_time:b,num_errors:w,num_requests:y,processing_time:x,last_error:T,data:L,queue_group:A}}stats(f){const g=f;return g?.noIterator===!1&&(this.processing_time=(0,t.nanos)(g.time),this.num_requests=g.processed,this.average_processing_time=this.processing_time>0&&this.num_requests>0?this.processing_time/this.num_requests:0),this._stats()}}})(To)),To}var ks={},nl;function Np(){if(nl)return ks;nl=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.ServiceClientImpl=void 0;const e=ba(),t=zu(),n=_a();class s{nc;prefix;opts;constructor(i,o={strategy:"stall",maxWait:2e3},c){this.nc=i,this.prefix=c,this.opts=o}ping(i="",o=""){return this.q(n.ServiceVerb.PING,i,o)}stats(i="",o=""){return this.q(n.ServiceVerb.STATS,i,o)}info(i="",o=""){return this.q(n.ServiceVerb.INFO,i,o)}async q(i,o="",c=""){const l=new e.QueuedIteratorImpl,d=t.ServiceImpl.controlSubject(i,o,c,this.prefix),u=await this.nc.requestMany(d,e.Empty,this.opts);return(async()=>{for await(const h of u)try{const f=h.json();l.push(f)}catch(f){l.push(()=>{l.stop(f)})}l.push(()=>{l.stop()})})().catch(h=>{l.stop(h)}),l}}return ks.ServiceClientImpl=s,ks}var rl;function Mp(){return rl||(rl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Svcm=e.ServiceVerb=e.ServiceResponseType=e.ServiceErrorHeader=e.ServiceErrorCodeHeader=e.ServiceError=void 0;const t=zu(),n=Np();var s=_a();Object.defineProperty(e,"ServiceError",{enumerable:!0,get:function(){return s.ServiceError}}),Object.defineProperty(e,"ServiceErrorCodeHeader",{enumerable:!0,get:function(){return s.ServiceErrorCodeHeader}}),Object.defineProperty(e,"ServiceErrorHeader",{enumerable:!0,get:function(){return s.ServiceErrorHeader}}),Object.defineProperty(e,"ServiceResponseType",{enumerable:!0,get:function(){return s.ServiceResponseType}}),Object.defineProperty(e,"ServiceVerb",{enumerable:!0,get:function(){return s.ServiceVerb}});class r{nc;constructor(o){this.nc=o}add(o){try{return new t.ServiceImpl(this.nc,o).start()}catch(c){return Promise.reject(c)}}client(o,c){return new n.ServiceClientImpl(this.nc,o,c)}}e.Svcm=r})(Ao)),Ao}var sl;function Lp(){return sl||(sl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Svcm=e.ServiceVerb=e.ServiceResponseType=e.ServiceErrorHeader=e.ServiceErrorCodeHeader=e.ServiceError=void 0;var t=Mp();Object.defineProperty(e,"ServiceError",{enumerable:!0,get:function(){return t.ServiceError}}),Object.defineProperty(e,"ServiceErrorCodeHeader",{enumerable:!0,get:function(){return t.ServiceErrorCodeHeader}}),Object.defineProperty(e,"ServiceErrorHeader",{enumerable:!0,get:function(){return t.ServiceErrorHeader}}),Object.defineProperty(e,"ServiceResponseType",{enumerable:!0,get:function(){return t.ServiceResponseType}}),Object.defineProperty(e,"ServiceVerb",{enumerable:!0,get:function(){return t.ServiceVerb}}),Object.defineProperty(e,"Svcm",{enumerable:!0,get:function(){return t.Svcm}})})(So)),So}var Dp=Lp();const kn=nn(new Map),_r=nn({running:!1,lastError:null,lastDiscoveryAt:null,lastDiscoveryDurationMs:null,cycleCount:0}),at={PI_CHANNEL:"pi-channel",PI_EXEC_INTAKE:"pi-exec-intake",PI_EXEC_SESSION:"pi-exec-session",CLAUDE_CHANNEL:"claude-channel",OPENCLAW:"openclaw",OTHER:"other"},Gu=[at.PI_CHANNEL,at.PI_EXEC_SESSION,at.PI_EXEC_INTAKE,at.CLAUDE_CHANNEL,at.OPENCLAW,at.OTHER],Up={[at.PI_CHANNEL]:"PI Interactive",[at.PI_EXEC_SESSION]:"PI Exec Sessions",[at.PI_EXEC_INTAKE]:"PI Exec Control",[at.CLAUDE_CHANNEL]:"Claude Code",[at.OPENCLAW]:"OpenClaw",[at.OTHER]:"Other"};function Bp(e){const t=e.metadata??{},s=e.endpoints?.[0]?.subject??null;let r=at.OTHER,i=e.name,o=e.description??"",c=t.owner??"",l=t.org??"",d=t.cwd??"",u="";if(e.name==="pi-channel"&&t.platform==="pi")r=at.PI_CHANNEL,i=t.session||e.description||e.name,o=d||"";else if(e.name==="pi-exec"&&t.type==="intake")r=at.PI_EXEC_INTAKE,i=`control (${c||"?"})`,o=s||"";else if(e.name==="pi-exec"&&t.type==="session")r=at.PI_EXEC_SESSION,u=t.sessionId??"",i=u||e.description||e.name,o=d||"";else if(e.name==="claude-channel")r=at.CLAUDE_CHANNEL,i=t.session||e.description||e.name,o=s||"";else if(s?.startsWith("agents.oc."))r=at.OPENCLAW,i=e.name,o=e.description||s;else if(s?.startsWith("agents."))r=at.OTHER,i=e.name,o=s||e.description;else return null;return{id:e.id,serviceName:e.name,version:e.version,bucket:r,displayName:i,secondaryLine:o,description:e.description??"",owner:c,org:l,cwd:d,sessionId:u,subject:s,inspectSubject:s?`${s}.inspect`:null,metadata:{...t},endpoints:e.endpoints??[],lastSeen:Date.now(),missCount:0,model:void 0,thinkingLevel:void 0,remainingLifetime:void 0,activeRequest:void 0,queuedRequests:void 0,maxLifetime:void 0,createdAt:void 0,lastActivity:void 0}}async function Xs(){if(!tt.nc)return;const e=Date.now();try{const n=new Dp.Svcm(tt.nc).client({maxWait:2e3,strategy:"timer"}),s=new Set,r=await n.info();for await(const i of r){const o=Bp(i);if(!o)continue;const c=kn.get(i.id);c?(c.serviceName=o.serviceName,c.version=o.version,c.bucket=o.bucket,c.displayName=o.displayName,c.secondaryLine=o.secondaryLine,c.description=o.description,c.owner=o.owner,c.org=o.org,c.cwd=o.cwd,c.sessionId=o.sessionId,c.subject=o.subject,c.inspectSubject=o.inspectSubject,c.metadata=o.metadata,c.endpoints=o.endpoints,c.lastSeen=o.lastSeen,c.missCount=0):kn.set(i.id,nn(o)),s.add(i.id),!Vt.ownerLocked&&!Vt.owner&&o.owner&&(Vt.owner=o.owner)}for(const[i,o]of kn)s.has(i)||(o.missCount=(o.missCount??0)+1,o.missCount>=2&&kn.delete(i));_r.lastError=null,_r.lastDiscoveryAt=Date.now(),_r.lastDiscoveryDurationMs=Date.now()-e,_r.cycleCount++}catch(t){_r.lastError=t?.message??String(t)}}let gi=null;function jp(){Wu(),_r.running=!0,Xs(),gi=setInterval(Xs,Vt.discoveryInterval)}function Wu(){gi&&clearInterval(gi),gi=null,_r.running=!1}function Fp(){kn.clear()}function qp(){const e=new Map;for(const t of Gu)e.set(t,[]);for(const t of kn.values())(e.get(t.bucket)??e.get(at.OTHER)).push(t);for(const t of e.values())t.sort((n,s)=>{const r=(n.displayName??"").localeCompare(s.displayName??"");return r!==0?r:(n.id??"").localeCompare(s.id??"")});return e}function ti(e){return e?kn.get(e):null}function Hp(e){for(const t of kn.values())if(t.bucket===at.PI_EXEC_INTAKE&&t.owner===e)return t;for(const t of kn.values())if(t.bucket===at.PI_EXEC_INTAKE)return t;return null}function ya(){return Array.from(kn.values()).filter(e=>e.bucket===at.PI_EXEC_INTAKE)}const Gt=nn({selectedAgentId:null,rightPanel:"prompt",showSettings:!1,showCreateSession:!1,leftSidebarOpen:!0,rightSidebarOpen:!0});function Kp(e){if(Gt.selectedAgentId=e,!e)return;const t=ti(e);t&&(t.bucket===at.PI_EXEC_INTAKE?Gt.rightPanel!=="createSession"&&Gt.rightPanel!=="fanout"&&(Gt.rightPanel="createSession"):Gt.rightPanel="prompt")}function zp(){Gt.selectedAgentId=null}const Gp={class:"topbar"},Wp={class:"topbar-left"},Vp={class:"brand"},Yp={class:"brand-text"},Xp={class:"brand-sub"},Zp={class:"topbar-center"},Jp={__name:"TopBar",setup(e){const t=ct(()=>kn.size);function n(){Gt.showSettings=!0}return(s,r)=>(ie(),be("header",Gp,[F("div",Wp,[F("div",Vp,[r[1]||(r[1]=yh('<div class="brand-mark" data-v-65b4156b><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-65b4156b><circle cx="12" cy="12" r="3" data-v-65b4156b></circle><circle cx="4" cy="4" r="2" data-v-65b4156b></circle><circle cx="20" cy="4" r="2" data-v-65b4156b></circle><circle cx="4" cy="20" r="2" data-v-65b4156b></circle><circle cx="20" cy="20" r="2" data-v-65b4156b></circle><line x1="6" y1="5.5" x2="10.5" y2="10.5" data-v-65b4156b></line><line x1="18" y1="5.5" x2="13.5" y2="10.5" data-v-65b4156b></line><line x1="6" y1="18.5" x2="10.5" y2="13.5" data-v-65b4156b></line><line x1="18" y1="18.5" x2="13.5" y2="13.5" data-v-65b4156b></line></svg></div>',1)),F("div",Yp,[r[0]||(r[0]=F("span",{class:"brand-name"},"NATS Agent Dashboard",-1)),F("span",Xp,nt(t.value)+" agents discovered",1)])])]),F("div",Zp,[kt(Rp)]),F("div",{class:"topbar-right"},[F("button",{class:"icon-btn",onClick:n,title:"Settings","aria-label":"Settings"},[...r[2]||(r[2]=[F("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"},[F("circle",{cx:"12",cy:"12",r:"3"}),F("path",{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83
30
+ 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65
31
+ 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65
32
+ 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0
33
+ 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0
34
+ .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1
35
+ 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2
36
+ 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0
37
+ 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0
38
+ 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0
39
+ 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65
40
+ 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1
41
+ 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z`})],-1)])])])]))}},$p=Yt(Jp,[["__scopeId","data-v-65b4156b"]]),Qp={key:0,class:"modal-header"},eg={class:"modal-title"},tg={class:"modal-body"},ng={key:1,class:"modal-footer"},rg={__name:"Modal",props:{title:{type:String,default:""},width:{type:String,default:"480px"}},emits:["close"],setup(e,{emit:t}){const n=t;function s(r){r.key==="Escape"&&n("close")}return kr(()=>{document.addEventListener("keydown",s),document.body.style.overflow="hidden"}),Qs(()=>{document.removeEventListener("keydown",s),document.body.style.overflow=""}),(r,i)=>(ie(),be("div",{class:"modal-backdrop",onClick:i[1]||(i[1]=us(o=>r.$emit("close"),["self"]))},[F("div",{class:"modal",style:ls({maxWidth:e.width})},[e.title||r.$slots.header?(ie(),be("header",Qp,[ts(r.$slots,"header",{},()=>[F("h2",eg,nt(e.title),1)]),F("button",{class:"modal-close",onClick:i[0]||(i[0]=o=>r.$emit("close")),"aria-label":"Close"}," × ")])):ft("",!0),F("div",tg,[ts(r.$slots,"default",{},void 0)]),r.$slots.footer?(ie(),be("footer",ng,[ts(r.$slots,"footer",{},void 0)])):ft("",!0)],4)]))}},sg=Yt(rg,[["__scopeId","data-v-d4a0fa2a"]]),ig=["type","disabled"],og={key:0,class:"btn-spinner","aria-hidden":"true"},ag={__name:"Button",props:{variant:{type:String,default:"primary"},size:{type:String,default:"md"},type:{type:String,default:"button"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:Boolean,default:!1}},setup(e){return(t,n)=>(ie(),be("button",{type:e.type,disabled:e.disabled||e.loading,class:Nn(["btn",[`btn-${e.variant}`,`btn-${e.size}`,{"btn-icon":e.icon,"is-loading":e.loading}]])},[e.loading?(ie(),be("span",og)):ts(t.$slots,"default",{key:1},void 0)],10,ig))}},Gn=Yt(ag,[["__scopeId","data-v-948153e8"]]),cg={class:"field"},lg={class:"field"},ug={class:"field"},fg={key:0,class:"settings-error"},dg={__name:"SettingsModal",emits:["close"],setup(e,{emit:t}){const n=t,s=on({natsUrl:Vt.natsUrl,discoveryInterval:Vt.discoveryInterval,owner:Vt.owner}),r=on(!1),i=on(null);async function o(){if(i.value=null,!/^wss?:\/\//.test(s.value.natsUrl)){i.value="NATS URL must start with ws:// or wss://";return}const c=Number(s.value.discoveryInterval);if(!Number.isFinite(c)||c<500){i.value="Discovery interval must be a number ≥ 500ms";return}r.value=!0;try{Vt.natsUrl=s.value.natsUrl.trim(),Vt.discoveryInterval=c,Vt.owner=s.value.owner.trim(),Vt.ownerLocked=!!s.value.owner.trim(),await Op(),n("close")}catch(l){i.value=l?.message??String(l)}finally{r.value=!1}}return(c,l)=>(ie(),zt(sg,{title:"Settings",width:"520px",onClose:l[4]||(l[4]=d=>c.$emit("close"))},{footer:yn(()=>[kt(Gn,{variant:"ghost",onClick:l[3]||(l[3]=d=>c.$emit("close"))},{default:yn(()=>[...l[11]||(l[11]=[pt("Cancel",-1)])]),_:1}),kt(Gn,{variant:"primary",loading:r.value,onClick:o},{default:yn(()=>[...l[12]||(l[12]=[pt(" Save & reconnect ",-1)])]),_:1},8,["loading"])]),default:yn(()=>[F("form",{class:"settings-form",onSubmit:us(o,["prevent"])},[F("label",cg,[l[5]||(l[5]=F("span",{class:"field-label"},"NATS WebSocket URL",-1)),bn(F("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>s.value.natsUrl=d),type:"text",placeholder:"wss://demo.nats.io:8443",autocomplete:"off"},null,512),[[Hn,s.value.natsUrl]]),l[6]||(l[6]=F("span",{class:"field-hint"},[pt(" Must start with "),F("code",null,"ws://"),pt(" or "),F("code",null,"wss://"),pt(". Default is "),F("code",null,"wss://demo.nats.io:8443"),pt(" (the public Synadia demo server) — change to "),F("code",null,"ws://localhost:8080"),pt(" to point at a local "),F("code",null,"nats-server"),pt(". ")],-1))]),F("label",lg,[l[7]||(l[7]=F("span",{class:"field-label"},"Discovery interval (ms)",-1)),bn(F("input",{"onUpdate:modelValue":l[1]||(l[1]=d=>s.value.discoveryInterval=d),type:"number",min:"500",step:"500"},null,512),[[Hn,s.value.discoveryInterval,void 0,{number:!0}]]),l[8]||(l[8]=F("span",{class:"field-hint"},[pt(" How often to refresh "),F("code",null,"$SRV.PING"),pt(". Lower = snappier grid, higher = less chatter. ")],-1))]),F("label",ug,[l[9]||(l[9]=F("span",{class:"field-label"},"Owner override",-1)),bn(F("input",{"onUpdate:modelValue":l[2]||(l[2]=d=>s.value.owner=d),type:"text",placeholder:"(auto-detect from agents)",autocomplete:"off"},null,512),[[Hn,s.value.owner]]),l[10]||(l[10]=F("span",{class:"field-hint"},[pt(" Used to construct the "),F("code",null,"agents.pi-exec.{owner}"),pt(" control subject when creating sessions. Leave blank to auto-detect. ")],-1))]),i.value?(ie(),be("div",fg,nt(i.value),1)):ft("",!0)],32)]),_:1}))}},hg=Yt(dg,[["__scopeId","data-v-3daeb809"]]),pg={__name:"AgentBadge",props:{bucket:{type:String,required:!0}},setup(e){const t=e,n={[at.PI_CHANNEL]:{fg:"var(--memory-fact)",label:"pi-channel"},[at.PI_EXEC_SESSION]:{fg:"var(--accent-primary)",label:"pi-exec"},[at.PI_EXEC_INTAKE]:{fg:"var(--memory-preference)",label:"control"},[at.CLAUDE_CHANNEL]:{fg:"var(--memory-note)",label:"claude"},[at.OPENCLAW]:{fg:"var(--tag-red)",label:"openclaw"},[at.OTHER]:{fg:"var(--text-muted)",label:"other"}},s=ct(()=>n[t.bucket]??n[at.OTHER]);return(r,i)=>(ie(),be("span",{class:"badge",style:ls({"--badge-fg":s.value.fg})},[i[0]||(i[0]=F("span",{class:"badge-dot"},null,-1)),pt(" "+nt(s.value.label),1)],4))}},Vu=Yt(pg,[["__scopeId","data-v-d82aaeca"]]),gg={__name:"AgentStatusDot",props:{busy:{type:Boolean,default:!1}},setup(e){return(t,n)=>(ie(),be("span",{class:Nn(["status-dot",{busy:e.busy}])},null,2))}},bg=Yt(gg,[["__scopeId","data-v-bcf2ff51"]]);function mg(e,t="dashboard"){return JSON.stringify({from:t,body:e})}async function _g(e,t,{timeout:n=5e3}={}){const s=tt.nc;if(!s)throw new Error("NATS not connected");return(await s.request(e,t,{timeout:n})).string()}async function Yu(e,t,n){const s=await _g(e,t,n);try{return JSON.parse(s)}catch(r){throw new Error(`Expected JSON reply on ${e}: ${r.message}`)}}async function va(e,t,n={}){const{onChunk:s,signal:r,timeout:i=600*1e3,idleTimeout:o=120*1e3}=n,c=tt.nc;if(!c)throw new Error("NATS not connected");if(r?.aborted)throw new DOMException("Request aborted before start","AbortError");const l=qu.createInbox(),d=c.subscribe(l);let u="",h=Date.now(),f=null;const g=setTimeout(()=>{f=f||new Error(`streamingRequest timed out after ${i}ms on ${e}`),d.unsubscribe()},i),b=setInterval(()=>{Date.now()-h>o&&(f=f||new Error(`streamingRequest idle for ${o}ms on ${e}`),d.unsubscribe())},1e3),w=()=>{f=f||new DOMException("Request aborted","AbortError"),d.unsubscribe()};r&&r.addEventListener("abort",w,{once:!0});try{c.publish(e,t,{reply:l});for await(const y of d){const x=y.string();if(h=Date.now(),x==="")return u;u+=x;try{s?.(x,u)}catch(T){console.warn("[useNatsRequest] onChunk threw:",T)}}if(f)throw f;return u}finally{if(clearTimeout(g),clearInterval(b),r&&r.removeEventListener("abort",w),!d.isClosed?.())try{d.unsubscribe()}catch{}}}const Xu=nn({lastError:null,lastRefreshAt:null});let bi=null;async function yg(e){if(e?.subject)try{const t=await Yu(e.subject,JSON.stringify({sessionMode:"list"}),{timeout:3e3}),n=Array.isArray(t?.sessions)?t.sessions:[],s=new Map;for(const r of n)s.set(r.sessionId,r);for(const r of kn.values()){if(r.bucket!==at.PI_EXEC_SESSION||r.owner!==e.owner)continue;const i=s.get(r.sessionId);i&&(r.model=i.model,r.thinkingLevel=i.thinkingLevel,r.maxLifetime=i.maxLifetime,r.remainingLifetime=i.remainingLifetime,r.activeRequest=!!i.activeRequest,r.queuedRequests=i.queuedRequests??0,r.createdAt=i.createdAt,r.lastActivity=i.lastActivity)}}catch(t){Xu.lastError=`${e.subject}: ${t?.message??t}`}}async function Pi(){if(!tt.nc)return;const e=ya();e.length!==0&&(await Promise.all(e.map(yg)),Xu.lastRefreshAt=Date.now())}function vg(){Zu(),bi=setInterval(Pi,Vt.discoveryInterval),setTimeout(Pi,500)}function Zu(){bi&&clearInterval(bi),bi=null}const mi=nn(new Map);let Eg=1;function Ii(){return Eg++}function Ju(e){return mi.has(e)||mi.set(e,nn({messages:[],streaming:!1,abort:null,error:null})),mi.get(e)}function $u(e){const t=mi.get(e);if(t){if(t.abort)try{t.abort.abort()}catch{}t.messages=[],t.streaming=!1,t.abort=null,t.error=null}}const wg={class:"stop-wrap"},xg={key:0,class:"stop-error mono"},Sg={__name:"SessionStopButton",props:{agent:{type:Object,required:!0}},setup(e){const t=e,n=on(!1),s=on(null);async function r(){if(n.value||!confirm(`Stop session "${t.agent.sessionId}"?`))return;const i=Hp(t.agent.owner);if(!i){s.value=`No pi-exec control found for owner "${t.agent.owner}"`;return}n.value=!0,s.value=null;try{const o=await Yu(i.subject,JSON.stringify({sessionMode:"stop",sessionId:t.agent.sessionId}),{timeout:5e3});o?.error&&(s.value=`${o.error}${o.sessionId?`: ${o.sessionId}`:""}`),$u(t.agent.id),await Xs(),await Pi()}catch(o){s.value=o?.message??String(o)}finally{n.value=!1}}return(i,o)=>(ie(),be("div",wg,[kt(Gn,{variant:"danger",size:"sm",loading:n.value,onClick:us(r,["stop"])},{default:yn(()=>[...o[0]||(o[0]=[pt("Stop",-1)])]),_:1},8,["loading"]),s.value?(ie(),be("span",xg,nt(s.value),1)):ft("",!0)]))}},Ag=Yt(Sg,[["__scopeId","data-v-f91ab885"]]),Tg={class:"card-header"},kg={class:"card-body"},Og={class:"card-title"},Cg={key:0,class:"card-owner"},Pg={class:"mono"},Ig={class:"mono"},Rg=["title"],Ng=["title"],Mg={key:3,class:"card-stats"},Lg={key:0,class:"stat"},Dg={class:"mono"},Ug={key:1,class:"stat"},Bg={class:"mono"},jg=["title"],Fg={key:2,class:"stat"},qg={class:"mono"},Hg={__name:"AgentCard",props:{agent:{type:Object,required:!0}},setup(e){const t=e,n=ct(()=>Gt.selectedAgentId===t.agent.id),s=ct(()=>t.agent.bucket===at.PI_EXEC_SESSION),r=ct(()=>t.agent.bucket===at.PI_EXEC_INTAKE),i=ct(()=>!!t.agent.subject&&!r.value),o=ct(()=>{const d=t.agent.remainingLifetime;if(d==null)return null;if(d<=0)return"expired";const u=Math.floor(d/60),h=d%60;return u>0?`${u}m ${h}s`:`${h}s`}),c=ct(()=>{const d=t.agent.remainingLifetime,u=t.agent.maxLifetime;return d==null||!u?null:Math.max(0,Math.min(100,Math.round(d/u*100)))});function l(){t.agent.subject&&Kp(t.agent.id)}return(d,u)=>(ie(),be("article",{class:Nn(["agent-card",{selected:n.value,promptable:i.value,clickable:!!e.agent.subject,"is-intake":r.value}]),onClick:l},[F("header",Tg,[kt(Vu,{bucket:e.agent.bucket},null,8,["bucket"]),kt(bg,{busy:e.agent.activeRequest===!0},null,8,["busy"])]),F("div",kg,[F("h3",Og,nt(e.agent.displayName||e.agent.serviceName),1),e.agent.owner?(ie(),be("p",Cg,[u[3]||(u[3]=F("span",{class:"dim"},"owner",-1)),F("span",Pg,nt(e.agent.owner),1),e.agent.org?(ie(),be(Ut,{key:0},[u[1]||(u[1]=F("span",{class:"dim"},"·",-1)),u[2]||(u[2]=F("span",{class:"dim"},"org",-1)),F("span",Ig,nt(e.agent.org),1)],64)):ft("",!0)])):ft("",!0),e.agent.cwd?(ie(),be("p",{key:1,class:"card-cwd mono",title:e.agent.cwd},nt(e.agent.cwd),9,Rg)):ft("",!0),e.agent.subject?(ie(),be("p",{key:2,class:"card-subject mono",title:e.agent.subject},[u[4]||(u[4]=F("span",{class:"dim"},"›",-1)),pt(nt(e.agent.subject),1)],8,Ng)):ft("",!0),s.value?(ie(),be("dl",Mg,[e.agent.model?(ie(),be("div",Lg,[u[5]||(u[5]=F("dt",null,"model",-1)),F("dd",Dg,nt(e.agent.model),1)])):ft("",!0),o.value!==null?(ie(),be("div",Ug,[u[6]||(u[6]=F("dt",null,"lifetime",-1)),F("dd",null,[F("span",Bg,nt(o.value),1),c.value!==null?(ie(),be("span",{key:0,class:"lifetime-bar",title:`${c.value}% remaining`},[F("span",{class:"lifetime-fill",style:ls({width:c.value+"%"})},null,4)],8,jg)):ft("",!0)])])):ft("",!0),e.agent.queuedRequests!=null&&e.agent.queuedRequests>0?(ie(),be("div",Fg,[u[7]||(u[7]=F("dt",null,"queue",-1)),F("dd",qg,nt(e.agent.queuedRequests),1)])):ft("",!0)])):ft("",!0)]),s.value?(ie(),be("footer",{key:0,class:"card-footer",onClick:u[0]||(u[0]=us(()=>{},["stop"]))},[kt(Ag,{agent:e.agent},null,8,["agent"])])):ft("",!0)],2))}},Kg=Yt(Hg,[["__scopeId","data-v-16dd6554"]]),zg={class:"group"},Gg={class:"group-header"},Wg={class:"group-title"},Vg={class:"group-count"},Yg={class:"group-grid"},Xg={__name:"AgentGroup",props:{label:{type:String,required:!0},agents:{type:Array,required:!0}},setup(e){return(t,n)=>(ie(),be("section",zg,[F("header",Gg,[F("h2",Wg,nt(e.label),1),F("span",Vg,nt(e.agents.length),1)]),F("div",Yg,[(ie(!0),be(Ut,null,or(e.agents,s=>(ie(),zt(Kg,{key:s.id,agent:s},null,8,["agent"]))),128))])]))}},Zg=Yt(Xg,[["__scopeId","data-v-0a88ef69"]]),Jg={class:"empty-state"},$g={class:"empty-icon"},Qg={key:0,class:"empty-title"},eb={key:1,class:"empty-message"},tb={key:2,class:"empty-actions"},nb={__name:"EmptyState",props:{title:{type:String,default:""},message:{type:String,default:""}},setup(e){return(t,n)=>(ie(),be("div",Jg,[F("div",$g,[ts(t.$slots,"icon",{},()=>[n[0]||(n[0]=F("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},[F("circle",{cx:"12",cy:"12",r:"9"}),F("path",{d:"M9 9h.01M15 9h.01M9 15h6"})],-1))])]),e.title?(ie(),be("h3",Qg,nt(e.title),1)):ft("",!0),e.message?(ie(),be("p",eb,nt(e.message),1)):ft("",!0),t.$slots.actions?(ie(),be("div",tb,[ts(t.$slots,"actions",{},void 0)])):ft("",!0)]))}},cs=Yt(nb,[["__scopeId","data-v-4019dff3"]]),rb={class:"grid-pane"},sb={class:"grid-header"},ib={class:"grid-sub"},ob={key:0,class:"dim mono"},ab={class:"grid-body"},cb={key:0},lb={key:1,class:"groups"},ub={__name:"AgentGrid",setup(e){const t=ct(()=>(kn.size,qp())),n=ct(()=>{const i=[];for(const o of Gu){const c=t.value.get(o)??[];c.length>0&&i.push({bucket:o,label:Up[o],agents:c})}return i}),s=ct(()=>n.value.length===0),r=ct(()=>tt.status!=="connected");return(i,o)=>(ie(),be("div",rb,[F("header",sb,[F("div",null,[o[2]||(o[2]=F("h1",{class:"grid-title"},"Agent Network",-1)),F("p",ib,[o[1]||(o[1]=pt(" Live view of every NATS micro-service that looks like an AI agent. ",-1)),Kt(_r).lastDiscoveryAt?(ie(),be("span",ob," · last refresh "+nt(Math.round((Date.now()-Kt(_r).lastDiscoveryAt)/1e3))+"s ago ",1)):ft("",!0)])])]),F("div",ab,[s.value?(ie(),be("div",cb,[r.value?(ie(),zt(cs,{key:0,title:"Not connected",message:Kt(tt).error||"Open Settings to set the NATS WebSocket URL and retry."},{actions:yn(()=>[kt(Gn,{onClick:o[0]||(o[0]=c=>Kt(Gt).showSettings=!0)},{default:yn(()=>[...o[3]||(o[3]=[pt("Open Settings",-1)])]),_:1})]),_:1},8,["message"])):(ie(),zt(cs,{key:1,title:"No agents found",message:"No NATS micro-services responded to $SRV.PING. Spin up an agent (pi-channel, pi-exec bridge, claude-channel, or OpenClaw) and it will appear here automatically."}))])):(ie(),be("div",lb,[(ie(!0),be(Ut,null,or(n.value,c=>(ie(),zt(Zg,{key:c.bucket,label:c.label,agents:c.agents},null,8,["label","agents"]))),128))]))])]))}},fb=Yt(ub,[["__scopeId","data-v-14836f6a"]]);function Ea(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var zr=Ea();function Qu(e){zr=e}var Br={exec:()=>null};function gt(e,t=""){let n=typeof e=="string"?e:e.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(vn.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,t)};return s}var db=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),vn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},hb=/^(?:[ \t]*(?:\n|$))+/,pb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,gb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ni=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wa=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ef=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tf=gt(ef).replace(/bull/g,wa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),mb=gt(ef).replace(/bull/g,wa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),xa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_b=/^[^\n]+/,Sa=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,yb=gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),vb=gt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,wa).getRegex(),eo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Aa=/\x3C!--(?:-?>|[\s\S]*?(?:-->|$))/,Eb=gt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Aa).replace("tag",eo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nf=gt(xa).replace("hr",ni).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",eo).getRegex(),wb=gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nf).getRegex(),Ta={blockquote:wb,code:pb,def:yb,fences:gb,heading:bb,hr:ni,html:Eb,lheading:tf,list:vb,newline:hb,paragraph:nf,table:Br,text:_b},il=gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ni).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",eo).getRegex(),xb={...Ta,lheading:mb,table:il,paragraph:gt(xa).replace("hr",ni).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",il).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",eo).getRegex()},Sb={...Ta,html:gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Aa).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Br,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:gt(xa).replace("hr",ni).replace("heading",` *#{1,6} *[^
42
+ ]`).replace("lheading",tf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ab=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Tb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rf=/^( {2,}|\\)\n(?!\s*$)/,kb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,fs=/[\p{P}\p{S}]/u,to=/[\s\p{P}\p{S}]/u,ka=/[^\s\p{P}\p{S}]/u,Ob=gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,to).getRegex(),sf=/(?!~)[\p{P}\p{S}]/u,Cb=/(?!~)[\s\p{P}\p{S}]/u,Pb=/(?:[^\s\p{P}\p{S}]|~)/u,Ib=gt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",db?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),of=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Rb=gt(of,"u").replace(/punct/g,fs).getRegex(),Nb=gt(of,"u").replace(/punct/g,sf).getRegex(),af="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Mb=gt(af,"gu").replace(/notPunctSpace/g,ka).replace(/punctSpace/g,to).replace(/punct/g,fs).getRegex(),Lb=gt(af,"gu").replace(/notPunctSpace/g,Pb).replace(/punctSpace/g,Cb).replace(/punct/g,sf).getRegex(),Db=gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ka).replace(/punctSpace/g,to).replace(/punct/g,fs).getRegex(),Ub=gt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,fs).getRegex(),Bb="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",jb=gt(Bb,"gu").replace(/notPunctSpace/g,ka).replace(/punctSpace/g,to).replace(/punct/g,fs).getRegex(),Fb=gt(/\\(punct)/,"gu").replace(/punct/g,fs).getRegex(),qb=gt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Hb=gt(Aa).replace("(?:-->|$)","-->").getRegex(),Kb=gt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Hb).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ri=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,zb=gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ri).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cf=gt(/^!?\[(label)\]\[(ref)\]/).replace("label",Ri).replace("ref",Sa).getRegex(),lf=gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sa).getRegex(),Gb=gt("reflink|nolink(?!\\()","g").replace("reflink",cf).replace("nolink",lf).getRegex(),ol=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Oa={_backpedal:Br,anyPunctuation:Fb,autolink:qb,blockSkip:Ib,br:rf,code:Tb,del:Br,delLDelim:Br,delRDelim:Br,emStrongLDelim:Rb,emStrongRDelimAst:Mb,emStrongRDelimUnd:Db,escape:Ab,link:zb,nolink:lf,punctuation:Ob,reflink:cf,reflinkSearch:Gb,tag:Kb,text:kb,url:Br},Wb={...Oa,link:gt(/^!?\[(label)\]\((.*?)\)/).replace("label",Ri).getRegex(),reflink:gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ri).getRegex()},Wo={...Oa,emStrongRDelimAst:Lb,emStrongLDelim:Nb,delLDelim:Ub,delRDelim:jb,url:gt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ol).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:gt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ol).getRegex()},Vb={...Wo,br:gt(rf).replace("{2,}","*").getRegex(),text:gt(Wo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},oi={normal:Ta,gfm:xb,pedantic:Sb},Os={normal:Oa,gfm:Wo,breaks:Vb,pedantic:Wb},Yb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},al=e=>Yb[e];function Qn(e,t){if(t){if(vn.escapeTest.test(e))return e.replace(vn.escapeReplace,al)}else if(vn.escapeTestNoEncode.test(e))return e.replace(vn.escapeReplaceNoEncode,al);return e}function cl(e){try{e=encodeURI(e).replace(vn.percentDecode,"%")}catch{return null}return e}function ll(e,t){let n=e.replace(vn.findPipe,(i,o,c)=>{let l=!1,d=o;for(;--d>=0&&c[d]==="\\";)l=!l;return l?"|":" |"}),s=n.split(vn.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(vn.slashPipe,"|");return s}function Cs(e,t,n){let s=e.length;if(s===0)return"";let r=0;for(;r<s&&e.charAt(s-r-1)===t;)r++;return e.slice(0,s-r)}function Xb(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return n>0?-2:-1}function Zb(e,t=0){let n=t,s="";for(let r of e)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function ul(e,t,n,s,r){let i=t.href,o=t.title||null,c=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:c,tokens:s.inlineTokens(c)};return s.state.inLink=!1,l}function Jb(e,t,n){let s=e.match(n.other.indentCodeCompensation);if(s===null)return t;let r=s[1];return t.split(`
43
+ `).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[c]=o;return c.length>=r.length?i.slice(r.length):i}).join(`
44
+ `)}var Ni=class{options;rules;lexer;constructor(e){this.options=e||zr}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Cs(n,`
45
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=Jb(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=Cs(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Cs(t[0],`
46
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Cs(t[0],`
47
+ `).split(`
48
+ `),s="",r="",i=[];for(;n.length>0;){let o=!1,c=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))c.push(n[l]),o=!0;else if(!o)c.push(n[l]);else break;n=n.slice(l);let d=c.join(`
49
+ `),u=d.replace(this.rules.other.blockquoteSetextReplace,`
50
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
51
+ ${d}`:d,r=r?`${r}
52
+ ${u}`:u;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,i,!0),this.lexer.state.top=h,n.length===0)break;let f=i.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let g=f,b=g.raw+`
53
+ `+n.join(`
54
+ `),w=this.blockquote(b);i[i.length-1]=w,s=s.substring(0,s.length-g.raw.length)+w.raw,r=r.substring(0,r.length-g.text.length)+w.text;break}else if(f?.type==="list"){let g=f,b=g.raw+`
55
+ `+n.join(`
56
+ `),w=this.list(b);i[i.length-1]=w,s=s.substring(0,s.length-f.raw.length)+w.raw,r=r.substring(0,r.length-g.raw.length)+w.raw,n=b.substring(i.at(-1).raw.length).split(`
57
+ `);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=!1;for(;e;){let l=!1,d="",u="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let h=Zb(t[2].split(`
58
+ `,1)[0],t[1].length),f=e.split(`
59
+ `,1)[0],g=!h.trim(),b=0;if(this.options.pedantic?(b=2,u=h.trimStart()):g?b=t[1].length+1:(b=h.search(this.rules.other.nonSpaceChar),b=b>4?1:b,u=h.slice(b),b+=t[1].length),g&&this.rules.other.blankLine.test(f)&&(d+=f+`
60
+ `,e=e.substring(f.length+1),l=!0),!l){let w=this.rules.other.nextBulletRegex(b),y=this.rules.other.hrRegex(b),x=this.rules.other.fencesBeginRegex(b),T=this.rules.other.headingBeginRegex(b),L=this.rules.other.htmlBeginRegex(b),A=this.rules.other.blockquoteBeginRegex(b);for(;e;){let D=e.split(`
61
+ `,1)[0],v;if(f=D,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),v=f):v=f.replace(this.rules.other.tabCharGlobal," "),x.test(f)||T.test(f)||L.test(f)||A.test(f)||w.test(f)||y.test(f))break;if(v.search(this.rules.other.nonSpaceChar)>=b||!f.trim())u+=`
62
+ `+v.slice(b);else{if(g||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||x.test(h)||T.test(h)||y.test(h))break;u+=`
63
+ `+f}g=!f.trim(),d+=D+`
64
+ `,e=e.substring(D.length+1),h=v.slice(b)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(o=!0)),r.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),r.raw+=d}let c=r.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l of r.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let u={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=u.checked,r.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=u.raw+l.tokens[0].raw,l.tokens[0].text=u.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(u)):l.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):l.tokens.unshift(u)}}if(!r.loose){let d=l.tokens.filter(h=>h.type==="space"),u=d.length>0&&d.some(h=>this.rules.other.anyLine.test(h.raw));r.loose=u}}if(r.loose)for(let l of r.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ll(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
65
+ `):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let o of s)this.rules.other.tableAlignRight.test(o)?i.align.push("right"):this.rules.other.tableAlignCenter.test(o)?i.align.push("center"):this.rules.other.tableAlignLeft.test(o)?i.align.push("left"):i.align.push(null);for(let o=0;o<n.length;o++)i.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:i.align[o]});for(let o of r)i.rows.push(ll(o,i.header.length).map((c,l)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[l]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
66
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Cs(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=Xb(t[2],"()");if(i===-2)return;if(i>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],r=i[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),ul(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return ul(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,c=r,l=0,d=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+r);(s=d.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){c+=o;continue}else if((s[5]||s[6])&&r%3&&!((r+o)%3)){l+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c+l);let u=[...s[0]][0].length,h=e.slice(0,r+s.index+u+o);if(Math.min(r,o)%2){let g=h.slice(1,-1);return{type:"em",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}let f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,c=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+r);(s=l.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(o=[...i].length,o!==r))continue;if(s[3]||s[4]){c+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c);let d=[...s[0]][0].length,u=e.slice(0,r+s.index+d+o),h=u.slice(r,-r);return{type:"del",raw:u,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]==="@")n=t[0],s="mailto:"+n;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);n=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Fn=class Vo{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||zr,this.options.tokenizer=this.options.tokenizer||new Ni,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:vn,block:oi.normal,inline:Os.normal};this.options.pedantic?(n.block=oi.pedantic,n.inline=Os.pedantic):this.options.gfm&&(n.block=oi.gfm,this.options.breaks?n.inline=Os.breaks:n.inline=Os.gfm),this.tokenizer.rules=n}static get rules(){return{block:oi,inline:Os}}static lex(t,n){return new Vo(n).lex(t)}static lexInline(t,n){return new Vo(n).inlineTokens(t)}lex(t){t=t.replace(vn.carriageReturn,`
67
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],s=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(vn.tabCharGlobal," ").replace(vn.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(o=>(r=o.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let o=n.at(-1);r.raw.length===1&&o!==void 0?o.raw+=`
68
+ `:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
69
+ `)?"":`
70
+ `)+r.raw,o.text+=`
71
+ `+r.text,this.inlineQueue.at(-1).src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
72
+ `)?"":`
73
+ `)+r.raw,o.text+=`
74
+ `+r.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},n.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}let i=t;if(this.options.extensions?.startBlock){let o=1/0,c=t.slice(1),l;this.options.extensions.startBlock.forEach(d=>{l=d.call({lexer:this},c),typeof l=="number"&&l>=0&&(o=Math.min(o,l))}),o<1/0&&o>=0&&(i=t.substring(0,o+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let o=n.at(-1);s&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
75
+ `)?"":`
76
+ `)+r.raw,o.text+=`
77
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(r),s=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
78
+ `)?"":`
79
+ `)+r.raw,o.text+=`
80
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(r);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let s=t,r=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)l.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=r[2]?r[2].length:0,s=s.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let o=!1,c="";for(;t;){o||(c=""),o=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let u=n.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(t,s,c)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(t,s,c)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),n.push(l);continue}let d=t;if(this.options.extensions?.startInline){let u=1/0,h=t.slice(1),f;this.options.extensions.startInline.forEach(g=>{f=g.call({lexer:this},h),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(d=t.substring(0,u+1))}if(l=this.tokenizer.inlineText(d)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(c=l.raw.slice(-1)),o=!0;let u=n.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):n.push(l);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return n}},Mi=class{options;parser;constructor(e){this.options=e||zr}space(e){return""}code({text:e,lang:t,escaped:n}){let s=(t||"").match(vn.notSpaceStart)?.[0],r=e.replace(vn.endingNewline,"")+`
81
+ `;return s?'<pre><code class="language-'+Qn(s)+'">'+(n?r:Qn(r,!0))+`</code></pre>
82
+ `:"<pre><code>"+(n?r:Qn(r,!0))+`</code></pre>
83
+ `}blockquote({tokens:e}){return`<blockquote>
84
+ ${this.parser.parse(e)}</blockquote>
85
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
86
+ `}hr(e){return`<hr>
87
+ `}list(e){let t=e.ordered,n=e.start,s="";for(let o=0;o<e.items.length;o++){let c=e.items[o];s+=this.listitem(c)}let r=t?"ol":"ul",i=t&&n!==1?' start="'+n+'"':"";return"<"+r+i+`>
88
+ `+s+"</"+r+`>
89
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
90
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
91
+ `}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s="";for(let r=0;r<e.rows.length;r++){let i=e.rows[r];n="";for(let o=0;o<i.length;o++)n+=this.tablecell(i[o]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
92
+ <thead>
93
+ `+t+`</thead>
94
+ `+s+`</table>
95
+ `}tablerow({text:e}){return`<tr>
96
+ ${e}</tr>
97
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
98
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Qn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),r=cl(e);if(r===null)return s;e=r;let i='<a href="'+e+'"';return t&&(i+=' title="'+Qn(t)+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=cl(e);if(r===null)return Qn(n);e=r;let i=`<img src="${e}" alt="${Qn(n)}"`;return t&&(i+=` title="${Qn(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Qn(e.text)}},Ca=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},qn=class Yo{options;renderer;textRenderer;constructor(t){this.options=t||zr,this.options.renderer=this.options.renderer||new Mi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ca}static parse(t,n){return new Yo(n).parse(t)}static parseInline(t,n){return new Yo(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let s=0;s<t.length;s++){let r=t[s];if(this.options.extensions?.renderers?.[r.type]){let o=r,c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){n+=c||"";continue}}let i=r;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let o='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let c=this.options.extensions.renderers[i.type].call({parser:this},i);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){s+=c||"";continue}}let o=i;switch(o.type){case"escape":{s+=n.text(o);break}case"html":{s+=n.html(o);break}case"link":{s+=n.link(o);break}case"image":{s+=n.image(o);break}case"checkbox":{s+=n.checkbox(o);break}case"strong":{s+=n.strong(o);break}case"em":{s+=n.em(o);break}case"codespan":{s+=n.codespan(o);break}case"br":{s+=n.br(o);break}case"del":{s+=n.del(o);break}case"text":{s+=n.text(o);break}default:{let c='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}},Ds=class{options;block;constructor(e){this.options=e||zr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Fn.lex:Fn.lexInline}provideParser(e=this.block){return e?qn.parse:qn.parseInline}},$b=class{defaults=Ea();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=qn;Renderer=Mi;TextRenderer=Ca;Lexer=Fn;Tokenizer=Ni;Hooks=Ds;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{let r=s;for(let i of r.header)n=n.concat(this.walkTokens(i.tokens,t));for(let i of r.rows)for(let o of i)n=n.concat(this.walkTokens(o.tokens,t));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,t));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let o=r[i].flat(1/0);n=n.concat(this.walkTokens(o,t))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=t.renderers[r.name];i?t.renderers[r.name]=function(...o){let c=r.renderer.apply(this,o);return c===!1&&(c=i.apply(this,o)),c}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[r.level];i?i.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new Mi(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,c=n.renderer[o],l=r[o];r[o]=(...d)=>{let u=c.apply(r,d);return u===!1&&(u=l.apply(r,d)),u||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Ni(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,c=n.tokenizer[o],l=r[o];r[o]=(...d)=>{let u=c.apply(r,d);return u===!1&&(u=l.apply(r,d)),u}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new Ds;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,c=n.hooks[o],l=r[o];Ds.passThroughHooks.has(i)?r[o]=d=>{if(this.defaults.async&&Ds.passThroughHooksRespectAsync.has(i))return(async()=>{let h=await c.call(r,d);return l.call(r,h)})();let u=c.call(r,d);return l.call(r,u)}:r[o]=(...d)=>{if(this.defaults.async)return(async()=>{let h=await c.apply(r,d);return h===!1&&(h=await l.apply(r,d)),h})();let u=c.apply(r,d);return u===!1&&(u=l.apply(r,d)),u}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(o){let c=[];return c.push(i.call(this,o)),r&&(c=c.concat(r.call(this,o))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Fn.lex(e,t??this.defaults)}parser(e,t){return qn.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let o=r.hooks?await r.hooks.preprocess(t):t,c=await(r.hooks?await r.hooks.provideLexer(e):e?Fn.lex:Fn.lexInline)(o,r),l=r.hooks?await r.hooks.processAllTokens(c):c;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let d=await(r.hooks?await r.hooks.provideParser(e):e?qn.parse:qn.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(d):d})().catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let o=(r.hooks?r.hooks.provideLexer(e):e?Fn.lex:Fn.lexInline)(t,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let c=(r.hooks?r.hooks.provideParser(e):e?qn.parse:qn.parseInline)(o,r);return r.hooks&&(c=r.hooks.postprocess(c)),c}catch(o){return i(o)}}}onError(e,t){return n=>{if(n.message+=`
99
+ Please report this to https://github.com/markedjs/marked.`,e){let s="<p>An error occurred:</p><pre>"+Qn(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},qr=new $b;function vt(e,t){return qr.parse(e,t)}vt.options=vt.setOptions=function(e){return qr.setOptions(e),vt.defaults=qr.defaults,Qu(vt.defaults),vt};vt.getDefaults=Ea;vt.defaults=zr;vt.use=function(...e){return qr.use(...e),vt.defaults=qr.defaults,Qu(vt.defaults),vt};vt.walkTokens=function(e,t){return qr.walkTokens(e,t)};vt.parseInline=qr.parseInline;vt.Parser=qn;vt.parser=qn.parse;vt.Renderer=Mi;vt.TextRenderer=Ca;vt.Lexer=Fn;vt.lexer=Fn.lex;vt.Tokenizer=Ni;vt.Hooks=Ds;vt.parse=vt;vt.options;vt.setOptions;vt.use;vt.walkTokens;vt.parseInline;qn.parse;Fn.lex;const{entries:uf,setPrototypeOf:fl,isFrozen:Qb,getPrototypeOf:em,getOwnPropertyDescriptor:tm}=Object;let{freeze:En,seal:Mn,create:_i}=Object,{apply:Xo,construct:Zo}=typeof Reflect<"u"&&Reflect;En||(En=function(t){return t});Mn||(Mn=function(t){return t});Xo||(Xo=function(t,n){for(var s=arguments.length,r=new Array(s>2?s-2:0),i=2;i<s;i++)r[i-2]=arguments[i];return t.apply(n,r)});Zo||(Zo=function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r<n;r++)s[r-1]=arguments[r];return new t(...s)});const ai=wn(Array.prototype.forEach),nm=wn(Array.prototype.lastIndexOf),dl=wn(Array.prototype.pop),Ps=wn(Array.prototype.push),rm=wn(Array.prototype.splice),yi=wn(String.prototype.toLowerCase),Oo=wn(String.prototype.toString),Co=wn(String.prototype.match),Is=wn(String.prototype.replace),sm=wn(String.prototype.indexOf),im=wn(String.prototype.trim),Pn=wn(Object.prototype.hasOwnProperty),pn=wn(RegExp.prototype.test),Rs=om(TypeError);function wn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,s=new Array(n>1?n-1:0),r=1;r<n;r++)s[r-1]=arguments[r];return Xo(e,t,s)}}function om(e){return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return Zo(e,n)}}function ot(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yi;fl&&fl(e,null);let s=t.length;for(;s--;){let r=t[s];if(typeof r=="string"){const i=n(r);i!==r&&(Qb(t)||(t[s]=i),r=i)}e[r]=!0}return e}function am(e){for(let t=0;t<e.length;t++)Pn(e,t)||(e[t]=null);return e}function er(e){const t=_i(null);for(const[n,s]of uf(e))Pn(e,n)&&(Array.isArray(s)?t[n]=am(s):s&&typeof s=="object"&&s.constructor===Object?t[n]=er(s):t[n]=s);return t}function Ns(e,t){for(;e!==null;){const s=tm(e,t);if(s){if(s.get)return wn(s.get);if(typeof s.value=="function")return wn(s.value)}e=em(e)}function n(){return null}return n}const hl=En(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Po=En(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Io=En(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),cm=En(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ro=En(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),lm=En(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pl=En(["#text"]),gl=En(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),No=En(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),bl=En(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ci=En(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),um=Mn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),fm=Mn(/<%[\w\W]*|[\w\W]*%>/gm),dm=Mn(/\$\{[\w\W]*/gm),hm=Mn(/^data-[\-\w.\u00B7-\uFFFF]+$/),pm=Mn(/^aria-[\-\w]+$/),ff=Mn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gm=Mn(/^(?:\w+script|data):/i),bm=Mn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),df=Mn(/^html$/i),mm=Mn(/^[a-z][.\w]*(-[.\w]+)+$/i);var ml=Object.freeze({__proto__:null,ARIA_ATTR:pm,ATTR_WHITESPACE:bm,CUSTOM_ELEMENT:mm,DATA_ATTR:hm,DOCTYPE_NAME:df,ERB_EXPR:fm,IS_ALLOWED_URI:ff,IS_SCRIPT_OR_DATA:gm,MUSTACHE_EXPR:um,TMPLIT_EXPR:dm});const Ms={element:1,text:3,progressingInstruction:7,comment:8,document:9},_m=function(){return typeof window>"u"?null:window},ym=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(s=n.getAttribute(r));const i="dompurify"+(s?"#"+s:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},_l=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_m();const t=re=>hf(re);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==Ms.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const s=n,r=s.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:c,Element:l,NodeFilter:d,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:g}=e,b=l.prototype,w=Ns(b,"cloneNode"),y=Ns(b,"remove"),x=Ns(b,"nextSibling"),T=Ns(b,"childNodes"),L=Ns(b,"parentNode");if(typeof o=="function"){const re=n.createElement("template");re.content&&re.content.ownerDocument&&(n=re.content.ownerDocument)}let A,D="";const{implementation:v,createNodeIterator:N,createDocumentFragment:I,getElementsByTagName:z}=n,{importNode:ae}=s;let ke=_l();t.isSupported=typeof uf=="function"&&typeof L=="function"&&v&&v.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Ye,ERB_EXPR:it,TMPLIT_EXPR:Ie,DATA_ATTR:mt,ARIA_ATTR:We,IS_SCRIPT_OR_DATA:je,ATTR_WHITESPACE:me,CUSTOM_ELEMENT:rt}=ml;let{IS_ALLOWED_URI:Bt}=ml,Xe=null;const Ct=ot({},[...hl,...Po,...Io,...Ro,...pl]);let Qe=null;const tn=ot({},[...gl,...No,...bl,...ci]);let Pe=Object.seal(_i(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Nt=null,xn=null;const rn=Object.seal(_i(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Dn=!0,Qt=!0,Ar=!1,k=!0,P=!1,K=!0,ee=!1,$=!1,te=!1,ue=!1,le=!1,ce=!1,ne=!0,Re=!1;const pe="user-content-";let we=!0,Ne=!1,Ue={},Be=null;const lt=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Tt=null;const jt=ot({},["audio","video","img","source","image","track"]);let Xt=null;const en=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),sn="http://www.w3.org/1998/Math/MathML",an="http://www.w3.org/2000/svg",_t="http://www.w3.org/1999/xhtml";let Lt=_t,On=!1,cn=null;const Xn=ot({},[sn,an,_t],Oo);let Un=ot({},["mi","mo","mn","ms","mtext"]),lr=ot({},["annotation-xml"]);const Gr=ot({},["title","style","font","a","script"]);let Sn=null;const C=["application/xhtml+xml","text/html"],G="text/html";let se=null,Le=null;const Pt=n.createElement("form"),It=function(S){return S instanceof RegExp||S instanceof Function},Se=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Le&&Le===S)){if((!S||typeof S!="object")&&(S={}),S=er(S),Sn=C.indexOf(S.PARSER_MEDIA_TYPE)===-1?G:S.PARSER_MEDIA_TYPE,se=Sn==="application/xhtml+xml"?Oo:yi,Xe=Pn(S,"ALLOWED_TAGS")?ot({},S.ALLOWED_TAGS,se):Ct,Qe=Pn(S,"ALLOWED_ATTR")?ot({},S.ALLOWED_ATTR,se):tn,cn=Pn(S,"ALLOWED_NAMESPACES")?ot({},S.ALLOWED_NAMESPACES,Oo):Xn,Xt=Pn(S,"ADD_URI_SAFE_ATTR")?ot(er(en),S.ADD_URI_SAFE_ATTR,se):en,Tt=Pn(S,"ADD_DATA_URI_TAGS")?ot(er(jt),S.ADD_DATA_URI_TAGS,se):jt,Be=Pn(S,"FORBID_CONTENTS")?ot({},S.FORBID_CONTENTS,se):lt,Nt=Pn(S,"FORBID_TAGS")?ot({},S.FORBID_TAGS,se):er({}),xn=Pn(S,"FORBID_ATTR")?ot({},S.FORBID_ATTR,se):er({}),Ue=Pn(S,"USE_PROFILES")?S.USE_PROFILES:!1,Dn=S.ALLOW_ARIA_ATTR!==!1,Qt=S.ALLOW_DATA_ATTR!==!1,Ar=S.ALLOW_UNKNOWN_PROTOCOLS||!1,k=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,P=S.SAFE_FOR_TEMPLATES||!1,K=S.SAFE_FOR_XML!==!1,ee=S.WHOLE_DOCUMENT||!1,ue=S.RETURN_DOM||!1,le=S.RETURN_DOM_FRAGMENT||!1,ce=S.RETURN_TRUSTED_TYPE||!1,te=S.FORCE_BODY||!1,ne=S.SANITIZE_DOM!==!1,Re=S.SANITIZE_NAMED_PROPS||!1,we=S.KEEP_CONTENT!==!1,Ne=S.IN_PLACE||!1,Bt=S.ALLOWED_URI_REGEXP||ff,Lt=S.NAMESPACE||_t,Un=S.MATHML_TEXT_INTEGRATION_POINTS||Un,lr=S.HTML_INTEGRATION_POINTS||lr,Pe=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&It(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Pe.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&It(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Pe.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Pe.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),P&&(Qt=!1),le&&(ue=!0),Ue&&(Xe=ot({},pl),Qe=_i(null),Ue.html===!0&&(ot(Xe,hl),ot(Qe,gl)),Ue.svg===!0&&(ot(Xe,Po),ot(Qe,No),ot(Qe,ci)),Ue.svgFilters===!0&&(ot(Xe,Io),ot(Qe,No),ot(Qe,ci)),Ue.mathMl===!0&&(ot(Xe,Ro),ot(Qe,bl),ot(Qe,ci))),Pn(S,"ADD_TAGS")||(rn.tagCheck=null),Pn(S,"ADD_ATTR")||(rn.attributeCheck=null),S.ADD_TAGS&&(typeof S.ADD_TAGS=="function"?rn.tagCheck=S.ADD_TAGS:(Xe===Ct&&(Xe=er(Xe)),ot(Xe,S.ADD_TAGS,se))),S.ADD_ATTR&&(typeof S.ADD_ATTR=="function"?rn.attributeCheck=S.ADD_ATTR:(Qe===tn&&(Qe=er(Qe)),ot(Qe,S.ADD_ATTR,se))),S.ADD_URI_SAFE_ATTR&&ot(Xt,S.ADD_URI_SAFE_ATTR,se),S.FORBID_CONTENTS&&(Be===lt&&(Be=er(Be)),ot(Be,S.FORBID_CONTENTS,se)),S.ADD_FORBID_CONTENTS&&(Be===lt&&(Be=er(Be)),ot(Be,S.ADD_FORBID_CONTENTS,se)),we&&(Xe["#text"]=!0),ee&&ot(Xe,["html","head","body"]),Xe.table&&(ot(Xe,["tbody"]),delete Nt.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Rs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Rs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=S.TRUSTED_TYPES_POLICY,D=A.createHTML("")}else A===void 0&&(A=ym(g,r)),A!==null&&typeof D=="string"&&(D=A.createHTML(""));En&&En(S),Le=S}},fe=ot({},[...Po,...Io,...cm]),De=ot({},[...Ro,...lm]),p=function(S){let q=L(S);(!q||!q.tagName)&&(q={namespaceURI:Lt,tagName:"template"});const Q=yi(S.tagName),_e=yi(q.tagName);return cn[S.namespaceURI]?S.namespaceURI===an?q.namespaceURI===_t?Q==="svg":q.namespaceURI===sn?Q==="svg"&&(_e==="annotation-xml"||Un[_e]):!!fe[Q]:S.namespaceURI===sn?q.namespaceURI===_t?Q==="math":q.namespaceURI===an?Q==="math"&&lr[_e]:!!De[Q]:S.namespaceURI===_t?q.namespaceURI===an&&!lr[_e]||q.namespaceURI===sn&&!Un[_e]?!1:!De[Q]&&(Gr[Q]||!fe[Q]):!!(Sn==="application/xhtml+xml"&&cn[S.namespaceURI]):!1},m=function(S){Ps(t.removed,{element:S});try{L(S).removeChild(S)}catch{y(S)}},_=function(S,q){try{Ps(t.removed,{attribute:q.getAttributeNode(S),from:q})}catch{Ps(t.removed,{attribute:null,from:q})}if(q.removeAttribute(S),S==="is")if(ue||le)try{m(q)}catch{}else try{q.setAttribute(S,"")}catch{}},a=function(S){let q=null,Q=null;if(te)S="<remove></remove>"+S;else{const xe=Co(S,/^[\r\n\t ]+/);Q=xe&&xe[0]}Sn==="application/xhtml+xml"&&Lt===_t&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const _e=A?A.createHTML(S):S;if(Lt===_t)try{q=new f().parseFromString(_e,Sn)}catch{}if(!q||!q.documentElement){q=v.createDocument(Lt,"template",null);try{q.documentElement.innerHTML=On?D:_e}catch{}}const Oe=q.body||q.documentElement;return S&&Q&&Oe.insertBefore(n.createTextNode(Q),Oe.childNodes[0]||null),Lt===_t?z.call(q,ee?"html":"body")[0]:ee?q.documentElement:Oe},E=function(S){return N.call(S.ownerDocument||S,S,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},R=function(S){return S instanceof h&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof u)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},U=function(S){return typeof c=="function"&&S instanceof c};function W(re,S,q){ai(re,Q=>{Q.call(t,S,q,Le)})}const oe=function(S){let q=null;if(W(ke.beforeSanitizeElements,S,null),R(S))return m(S),!0;const Q=se(S.nodeName);if(W(ke.uponSanitizeElement,S,{tagName:Q,allowedTags:Xe}),K&&S.hasChildNodes()&&!U(S.firstElementChild)&&pn(/<[/\w!]/g,S.innerHTML)&&pn(/<[/\w!]/g,S.textContent)||S.nodeType===Ms.progressingInstruction||K&&S.nodeType===Ms.comment&&pn(/<[/\w]/g,S.data))return m(S),!0;if(!(rn.tagCheck instanceof Function&&rn.tagCheck(Q))&&(!Xe[Q]||Nt[Q])){if(!Nt[Q]&&ge(Q)&&(Pe.tagNameCheck instanceof RegExp&&pn(Pe.tagNameCheck,Q)||Pe.tagNameCheck instanceof Function&&Pe.tagNameCheck(Q)))return!1;if(we&&!Be[Q]){const _e=L(S)||S.parentNode,Oe=T(S)||S.childNodes;if(Oe&&_e){const xe=Oe.length;for(let de=xe-1;de>=0;--de){const ve=w(Oe[de],!0);ve.__removalCount=(S.__removalCount||0)+1,_e.insertBefore(ve,x(S))}}}return m(S),!0}return S instanceof l&&!p(S)||(Q==="noscript"||Q==="noembed"||Q==="noframes")&&pn(/<\/no(script|embed|frames)/i,S.innerHTML)?(m(S),!0):(P&&S.nodeType===Ms.text&&(q=S.textContent,ai([Ye,it,Ie],_e=>{q=Is(q,_e," ")}),S.textContent!==q&&(Ps(t.removed,{element:S.cloneNode()}),S.textContent=q)),W(ke.afterSanitizeElements,S,null),!1)},Ae=function(S,q,Q){if(xn[q]||ne&&(q==="id"||q==="name")&&(Q in n||Q in Pt))return!1;if(!(Qt&&!xn[q]&&pn(mt,q))){if(!(Dn&&pn(We,q))){if(!(rn.attributeCheck instanceof Function&&rn.attributeCheck(q,S))){if(!Qe[q]||xn[q]){if(!(ge(S)&&(Pe.tagNameCheck instanceof RegExp&&pn(Pe.tagNameCheck,S)||Pe.tagNameCheck instanceof Function&&Pe.tagNameCheck(S))&&(Pe.attributeNameCheck instanceof RegExp&&pn(Pe.attributeNameCheck,q)||Pe.attributeNameCheck instanceof Function&&Pe.attributeNameCheck(q,S))||q==="is"&&Pe.allowCustomizedBuiltInElements&&(Pe.tagNameCheck instanceof RegExp&&pn(Pe.tagNameCheck,Q)||Pe.tagNameCheck instanceof Function&&Pe.tagNameCheck(Q))))return!1}else if(!Xt[q]){if(!pn(Bt,Is(Q,me,""))){if(!((q==="src"||q==="xlink:href"||q==="href")&&S!=="script"&&sm(Q,"data:")===0&&Tt[S])){if(!(Ar&&!pn(je,Is(Q,me,"")))){if(Q)return!1}}}}}}}return!0},ge=function(S){return S!=="annotation-xml"&&Co(S,rt)},Ze=function(S){W(ke.beforeSanitizeAttributes,S,null);const{attributes:q}=S;if(!q||R(S))return;const Q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Qe,forceKeepAttr:void 0};let _e=q.length;for(;_e--;){const Oe=q[_e],{name:xe,namespaceURI:de,value:ve}=Oe,he=se(xe),j=ve;let H=xe==="value"?j:im(j);if(Q.attrName=he,Q.attrValue=H,Q.keepAttr=!0,Q.forceKeepAttr=void 0,W(ke.uponSanitizeAttribute,S,Q),H=Q.attrValue,Re&&(he==="id"||he==="name")&&(_(xe,S),H=pe+H),K&&pn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,H)){_(xe,S);continue}if(he==="attributename"&&Co(H,"href")){_(xe,S);continue}if(Q.forceKeepAttr)continue;if(!Q.keepAttr){_(xe,S);continue}if(!k&&pn(/\/>/i,H)){_(xe,S);continue}P&&ai([Ye,it,Ie],M=>{H=Is(H,M," ")});const Z=se(S.nodeName);if(!Ae(Z,he,H)){_(xe,S);continue}if(A&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!de)switch(g.getAttributeType(Z,he)){case"TrustedHTML":{H=A.createHTML(H);break}case"TrustedScriptURL":{H=A.createScriptURL(H);break}}if(H!==j)try{de?S.setAttributeNS(de,xe,H):S.setAttribute(xe,H),R(S)?m(S):dl(t.removed)}catch{_(xe,S)}}W(ke.afterSanitizeAttributes,S,null)},Ee=function re(S){let q=null;const Q=E(S);for(W(ke.beforeSanitizeShadowDOM,S,null);q=Q.nextNode();)W(ke.uponSanitizeShadowNode,q,null),oe(q),Ze(q),q.content instanceof i&&re(q.content);W(ke.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(re){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},q=null,Q=null,_e=null,Oe=null;if(On=!re,On&&(re="\x3C!-->"),typeof re!="string"&&!U(re))if(typeof re.toString=="function"){if(re=re.toString(),typeof re!="string")throw Rs("dirty is not a string, aborting")}else throw Rs("toString is not a function");if(!t.isSupported)return re;if($||Se(S),t.removed=[],typeof re=="string"&&(Ne=!1),Ne){if(re.nodeName){const ve=se(re.nodeName);if(!Xe[ve]||Nt[ve])throw Rs("root node is forbidden and cannot be sanitized in-place")}}else if(re instanceof c)q=a("\x3C!---->"),Q=q.ownerDocument.importNode(re,!0),Q.nodeType===Ms.element&&Q.nodeName==="BODY"||Q.nodeName==="HTML"?q=Q:q.appendChild(Q);else{if(!ue&&!P&&!ee&&re.indexOf("<")===-1)return A&&ce?A.createHTML(re):re;if(q=a(re),!q)return ue?null:ce?D:""}q&&te&&m(q.firstChild);const xe=E(Ne?re:q);for(;_e=xe.nextNode();)oe(_e),Ze(_e),_e.content instanceof i&&Ee(_e.content);if(Ne)return re;if(ue){if(le)for(Oe=I.call(q.ownerDocument);q.firstChild;)Oe.appendChild(q.firstChild);else Oe=q;return(Qe.shadowroot||Qe.shadowrootmode)&&(Oe=ae.call(s,Oe,!0)),Oe}let de=ee?q.outerHTML:q.innerHTML;return ee&&Xe["!doctype"]&&q.ownerDocument&&q.ownerDocument.doctype&&q.ownerDocument.doctype.name&&pn(df,q.ownerDocument.doctype.name)&&(de="<!DOCTYPE "+q.ownerDocument.doctype.name+`>
100
+ `+de),P&&ai([Ye,it,Ie],ve=>{de=Is(de,ve," ")}),A&&ce?A.createHTML(de):de},t.setConfig=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Se(re),$=!0},t.clearConfig=function(){Le=null,$=!1},t.isValidAttribute=function(re,S,q){Le||Se({});const Q=se(re),_e=se(S);return Ae(Q,_e,q)},t.addHook=function(re,S){typeof S=="function"&&Ps(ke[re],S)},t.removeHook=function(re,S){if(S!==void 0){const q=nm(ke[re],S);return q===-1?void 0:rm(ke[re],q,1)[0]}return dl(ke[re])},t.removeHooks=function(re){ke[re]=[]},t.removeAllHooks=function(){ke=_l()},t}var vm=hf(),Mo,yl;function Em(){if(yl)return Mo;yl=1;function e(C){return C instanceof Map?C.clear=C.delete=C.set=function(){throw new Error("map is read-only")}:C instanceof Set&&(C.add=C.clear=C.delete=function(){throw new Error("set is read-only")}),Object.freeze(C),Object.getOwnPropertyNames(C).forEach(G=>{const se=C[G],Le=typeof se;(Le==="object"||Le==="function")&&!Object.isFrozen(se)&&e(se)}),C}class t{constructor(G){G.data===void 0&&(G.data={}),this.data=G.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(C){return C.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function s(C,...G){const se=Object.create(null);for(const Le in C)se[Le]=C[Le];return G.forEach(function(Le){for(const Pt in Le)se[Pt]=Le[Pt]}),se}const r="</span>",i=C=>!!C.scope,o=(C,{prefix:G})=>{if(C.startsWith("language:"))return C.replace("language:","language-");if(C.includes(".")){const se=C.split(".");return[`${G}${se.shift()}`,...se.map((Le,Pt)=>`${Le}${"_".repeat(Pt+1)}`)].join(" ")}return`${G}${C}`};class c{constructor(G,se){this.buffer="",this.classPrefix=se.classPrefix,G.walk(this)}addText(G){this.buffer+=n(G)}openNode(G){if(!i(G))return;const se=o(G.scope,{prefix:this.classPrefix});this.span(se)}closeNode(G){i(G)&&(this.buffer+=r)}value(){return this.buffer}span(G){this.buffer+=`<span class="${G}">`}}const l=(C={})=>{const G={children:[]};return Object.assign(G,C),G};class d{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(G){this.top.children.push(G)}openNode(G){const se=l({scope:G});this.add(se),this.stack.push(se)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(G){return this.constructor._walk(G,this.rootNode)}static _walk(G,se){return typeof se=="string"?G.addText(se):se.children&&(G.openNode(se),se.children.forEach(Le=>this._walk(G,Le)),G.closeNode(se)),G}static _collapse(G){typeof G!="string"&&G.children&&(G.children.every(se=>typeof se=="string")?G.children=[G.children.join("")]:G.children.forEach(se=>{d._collapse(se)}))}}class u extends d{constructor(G){super(),this.options=G}addText(G){G!==""&&this.add(G)}startScope(G){this.openNode(G)}endScope(){this.closeNode()}__addSublanguage(G,se){const Le=G.root;se&&(Le.scope=`language:${se}`),this.add(Le)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function h(C){return C?typeof C=="string"?C:C.source:null}function f(C){return w("(?=",C,")")}function g(C){return w("(?:",C,")*")}function b(C){return w("(?:",C,")?")}function w(...C){return C.map(se=>h(se)).join("")}function y(C){const G=C[C.length-1];return typeof G=="object"&&G.constructor===Object?(C.splice(C.length-1,1),G):{}}function x(...C){return"("+(y(C).capture?"":"?:")+C.map(Le=>h(Le)).join("|")+")"}function T(C){return new RegExp(C.toString()+"|").exec("").length-1}function L(C,G){const se=C&&C.exec(G);return se&&se.index===0}const A=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(C,{joinWith:G}){let se=0;return C.map(Le=>{se+=1;const Pt=se;let It=h(Le),Se="";for(;It.length>0;){const fe=A.exec(It);if(!fe){Se+=It;break}Se+=It.substring(0,fe.index),It=It.substring(fe.index+fe[0].length),fe[0][0]==="\\"&&fe[1]?Se+="\\"+String(Number(fe[1])+Pt):(Se+=fe[0],fe[0]==="("&&se++)}return Se}).map(Le=>`(${Le})`).join(G)}const v=/\b\B/,N="[a-zA-Z]\\w*",I="[a-zA-Z_]\\w*",z="\\b\\d+(\\.\\d+)?",ae="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ke="\\b(0b[01]+)",Ye="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",it=(C={})=>{const G=/^#![ ]*\//;return C.binary&&(C.begin=w(G,/.*\b/,C.binary,/\b.*/)),s({scope:"meta",begin:G,end:/$/,relevance:0,"on:begin":(se,Le)=>{se.index!==0&&Le.ignoreMatch()}},C)},Ie={begin:"\\\\[\\s\\S]",relevance:0},mt={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Ie]},We={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Ie]},je={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/},me=function(C,G,se={}){const Le=s({scope:"comment",begin:C,end:G,contains:[]},se);Le.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 Pt=x("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 Le.contains.push({begin:w(/[ ]+/,"(",Pt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Le},rt=me("//","$"),Bt=me("/\\*","\\*/"),Xe=me("#","$"),Ct={scope:"number",begin:z,relevance:0},Qe={scope:"number",begin:ae,relevance:0},tn={scope:"number",begin:ke,relevance:0},Pe={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Ie,{begin:/\[/,end:/\]/,relevance:0,contains:[Ie]}]},Nt={scope:"title",begin:N,relevance:0},xn={scope:"title",begin:I,relevance:0},rn={begin:"\\.\\s*"+I,relevance:0};var Qt=Object.freeze({__proto__:null,APOS_STRING_MODE:mt,BACKSLASH_ESCAPE:Ie,BINARY_NUMBER_MODE:tn,BINARY_NUMBER_RE:ke,COMMENT:me,C_BLOCK_COMMENT_MODE:Bt,C_LINE_COMMENT_MODE:rt,C_NUMBER_MODE:Qe,C_NUMBER_RE:ae,END_SAME_AS_BEGIN:function(C){return Object.assign(C,{"on:begin":(G,se)=>{se.data._beginMatch=G[1]},"on:end":(G,se)=>{se.data._beginMatch!==G[1]&&se.ignoreMatch()}})},HASH_COMMENT_MODE:Xe,IDENT_RE:N,MATCH_NOTHING_RE:v,METHOD_GUARD:rn,NUMBER_MODE:Ct,NUMBER_RE:z,PHRASAL_WORDS_MODE:je,QUOTE_STRING_MODE:We,REGEXP_MODE:Pe,RE_STARTERS_RE:Ye,SHEBANG:it,TITLE_MODE:Nt,UNDERSCORE_IDENT_RE:I,UNDERSCORE_TITLE_MODE:xn});function Ar(C,G){C.input[C.index-1]==="."&&G.ignoreMatch()}function k(C,G){C.className!==void 0&&(C.scope=C.className,delete C.className)}function P(C,G){G&&C.beginKeywords&&(C.begin="\\b("+C.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",C.__beforeBegin=Ar,C.keywords=C.keywords||C.beginKeywords,delete C.beginKeywords,C.relevance===void 0&&(C.relevance=0))}function K(C,G){Array.isArray(C.illegal)&&(C.illegal=x(...C.illegal))}function ee(C,G){if(C.match){if(C.begin||C.end)throw new Error("begin & end are not supported with match");C.begin=C.match,delete C.match}}function $(C,G){C.relevance===void 0&&(C.relevance=1)}const te=(C,G)=>{if(!C.beforeMatch)return;if(C.starts)throw new Error("beforeMatch cannot be used with starts");const se=Object.assign({},C);Object.keys(C).forEach(Le=>{delete C[Le]}),C.keywords=se.keywords,C.begin=w(se.beforeMatch,f(se.begin)),C.starts={relevance:0,contains:[Object.assign(se,{endsParent:!0})]},C.relevance=0,delete se.beforeMatch},ue=["of","and","for","in","not","or","if","then","parent","list","value"],le="keyword";function ce(C,G,se=le){const Le=Object.create(null);return typeof C=="string"?Pt(se,C.split(" ")):Array.isArray(C)?Pt(se,C):Object.keys(C).forEach(function(It){Object.assign(Le,ce(C[It],G,It))}),Le;function Pt(It,Se){G&&(Se=Se.map(fe=>fe.toLowerCase())),Se.forEach(function(fe){const De=fe.split("|");Le[De[0]]=[It,ne(De[0],De[1])]})}}function ne(C,G){return G?Number(G):Re(C)?0:1}function Re(C){return ue.includes(C.toLowerCase())}const pe={},we=C=>{console.error(C)},Ne=(C,...G)=>{console.log(`WARN: ${C}`,...G)},Ue=(C,G)=>{pe[`${C}/${G}`]||(console.log(`Deprecated as of ${C}. ${G}`),pe[`${C}/${G}`]=!0)},Be=new Error;function lt(C,G,{key:se}){let Le=0;const Pt=C[se],It={},Se={};for(let fe=1;fe<=G.length;fe++)Se[fe+Le]=Pt[fe],It[fe+Le]=!0,Le+=T(G[fe-1]);C[se]=Se,C[se]._emit=It,C[se]._multi=!0}function Tt(C){if(Array.isArray(C.begin)){if(C.skip||C.excludeBegin||C.returnBegin)throw we("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Be;if(typeof C.beginScope!="object"||C.beginScope===null)throw we("beginScope must be object"),Be;lt(C,C.begin,{key:"beginScope"}),C.begin=D(C.begin,{joinWith:""})}}function jt(C){if(Array.isArray(C.end)){if(C.skip||C.excludeEnd||C.returnEnd)throw we("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Be;if(typeof C.endScope!="object"||C.endScope===null)throw we("endScope must be object"),Be;lt(C,C.end,{key:"endScope"}),C.end=D(C.end,{joinWith:""})}}function Xt(C){C.scope&&typeof C.scope=="object"&&C.scope!==null&&(C.beginScope=C.scope,delete C.scope)}function en(C){Xt(C),typeof C.beginScope=="string"&&(C.beginScope={_wrap:C.beginScope}),typeof C.endScope=="string"&&(C.endScope={_wrap:C.endScope}),Tt(C),jt(C)}function sn(C){function G(Se,fe){return new RegExp(h(Se),"m"+(C.case_insensitive?"i":"")+(C.unicodeRegex?"u":"")+(fe?"g":""))}class se{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(fe,De){De.position=this.position++,this.matchIndexes[this.matchAt]=De,this.regexes.push([De,fe]),this.matchAt+=T(fe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const fe=this.regexes.map(De=>De[1]);this.matcherRe=G(D(fe,{joinWith:"|"}),!0),this.lastIndex=0}exec(fe){this.matcherRe.lastIndex=this.lastIndex;const De=this.matcherRe.exec(fe);if(!De)return null;const p=De.findIndex((_,a)=>a>0&&_!==void 0),m=this.matchIndexes[p];return De.splice(0,p),Object.assign(De,m)}}class Le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(fe){if(this.multiRegexes[fe])return this.multiRegexes[fe];const De=new se;return this.rules.slice(fe).forEach(([p,m])=>De.addRule(p,m)),De.compile(),this.multiRegexes[fe]=De,De}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(fe,De){this.rules.push([fe,De]),De.type==="begin"&&this.count++}exec(fe){const De=this.getMatcher(this.regexIndex);De.lastIndex=this.lastIndex;let p=De.exec(fe);if(this.resumingScanAtSamePosition()&&!(p&&p.index===this.lastIndex)){const m=this.getMatcher(0);m.lastIndex=this.lastIndex+1,p=m.exec(fe)}return p&&(this.regexIndex+=p.position+1,this.regexIndex===this.count&&this.considerAll()),p}}function Pt(Se){const fe=new Le;return Se.contains.forEach(De=>fe.addRule(De.begin,{rule:De,type:"begin"})),Se.terminatorEnd&&fe.addRule(Se.terminatorEnd,{type:"end"}),Se.illegal&&fe.addRule(Se.illegal,{type:"illegal"}),fe}function It(Se,fe){const De=Se;if(Se.isCompiled)return De;[k,ee,en,te].forEach(m=>m(Se,fe)),C.compilerExtensions.forEach(m=>m(Se,fe)),Se.__beforeBegin=null,[P,K,$].forEach(m=>m(Se,fe)),Se.isCompiled=!0;let p=null;return typeof Se.keywords=="object"&&Se.keywords.$pattern&&(Se.keywords=Object.assign({},Se.keywords),p=Se.keywords.$pattern,delete Se.keywords.$pattern),p=p||/\w+/,Se.keywords&&(Se.keywords=ce(Se.keywords,C.case_insensitive)),De.keywordPatternRe=G(p,!0),fe&&(Se.begin||(Se.begin=/\B|\b/),De.beginRe=G(De.begin),!Se.end&&!Se.endsWithParent&&(Se.end=/\B|\b/),Se.end&&(De.endRe=G(De.end)),De.terminatorEnd=h(De.end)||"",Se.endsWithParent&&fe.terminatorEnd&&(De.terminatorEnd+=(Se.end?"|":"")+fe.terminatorEnd)),Se.illegal&&(De.illegalRe=G(Se.illegal)),Se.contains||(Se.contains=[]),Se.contains=[].concat(...Se.contains.map(function(m){return _t(m==="self"?Se:m)})),Se.contains.forEach(function(m){It(m,De)}),Se.starts&&It(Se.starts,fe),De.matcher=Pt(De),De}if(C.compilerExtensions||(C.compilerExtensions=[]),C.contains&&C.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return C.classNameAliases=s(C.classNameAliases||{}),It(C)}function an(C){return C?C.endsWithParent||an(C.starts):!1}function _t(C){return C.variants&&!C.cachedVariants&&(C.cachedVariants=C.variants.map(function(G){return s(C,{variants:null},G)})),C.cachedVariants?C.cachedVariants:an(C)?s(C,{starts:C.starts?s(C.starts):null}):Object.isFrozen(C)?s(C):C}var Lt="11.11.1";class On extends Error{constructor(G,se){super(G),this.name="HTMLInjectionError",this.html=se}}const cn=n,Xn=s,Un=Symbol("nomatch"),lr=7,Gr=function(C){const G=Object.create(null),se=Object.create(null),Le=[];let Pt=!0;const It="Could not find the language '{}', did you forget to load/include a language module?",Se={disableAutodetect:!0,name:"Plain text",contains:[]};let fe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:u};function De(j){return fe.noHighlightRe.test(j)}function p(j){let H=j.className+" ";H+=j.parentNode?j.parentNode.className:"";const Z=fe.languageDetectRe.exec(H);if(Z){const M=q(Z[1]);return M||(Ne(It.replace("{}",Z[1])),Ne("Falling back to no-highlight mode for this block.",j)),M?Z[1]:"no-highlight"}return H.split(/\s+/).find(M=>De(M)||q(M))}function m(j,H,Z){let M="",B="";typeof H=="object"?(M=j,Z=H.ignoreIllegals,B=H.language):(Ue("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ue("10.7.0",`Please use highlight(code, options) instead.
101
+ https://github.com/highlightjs/highlight.js/issues/2277`),B=j,M=H),Z===void 0&&(Z=!0);const X={code:M,language:B};ve("before:highlight",X);const V=X.result?X.result:_(X.language,X.code,Z);return V.code=X.code,ve("after:highlight",V),V}function _(j,H,Z,M){const B=Object.create(null);function X(ye,Me){return ye.keywords[Me]}function V(){if(!Te.keywords){et.addText(Fe);return}let ye=0;Te.keywordPatternRe.lastIndex=0;let Me=Te.keywordPatternRe.exec(Fe),st="";for(;Me;){st+=Fe.substring(ye,Me.index);const xt=Ge.case_insensitive?Me[0].toLowerCase():Me[0],ln=X(Te,xt);if(ln){const[ur,Mf]=ln;if(et.addText(st),st="",B[xt]=(B[xt]||0)+1,B[xt]<=lr&&(Wt+=Mf),ur.startsWith("_"))st+=Me[0];else{const Lf=Ge.classNameAliases[ur]||ur;Ce(Me[0],Lf)}}else st+=Me[0];ye=Te.keywordPatternRe.lastIndex,Me=Te.keywordPatternRe.exec(Fe)}st+=Fe.substring(ye),et.addText(st)}function Y(){if(Fe==="")return;let ye=null;if(typeof Te.subLanguage=="string"){if(!G[Te.subLanguage]){et.addText(Fe);return}ye=_(Te.subLanguage,Fe,!0,Dt[Te.subLanguage]),Dt[Te.subLanguage]=ye._top}else ye=E(Fe,Te.subLanguage.length?Te.subLanguage:null);Te.relevance>0&&(Wt+=ye.relevance),et.__addSublanguage(ye._emitter,ye.language)}function J(){Te.subLanguage!=null?Y():V(),Fe=""}function Ce(ye,Me){ye!==""&&(et.startScope(Me),et.addText(ye),et.endScope())}function He(ye,Me){let st=1;const xt=Me.length-1;for(;st<=xt;){if(!ye._emit[st]){st++;continue}const ln=Ge.classNameAliases[ye[st]]||ye[st],ur=Me[st];ln?Ce(ur,ln):(Fe=ur,V(),Fe=""),st++}}function Ve(ye,Me){return ye.scope&&typeof ye.scope=="string"&&et.openNode(Ge.classNameAliases[ye.scope]||ye.scope),ye.beginScope&&(ye.beginScope._wrap?(Ce(Fe,Ge.classNameAliases[ye.beginScope._wrap]||ye.beginScope._wrap),Fe=""):ye.beginScope._multi&&(He(ye.beginScope,Me),Fe="")),Te=Object.create(ye,{parent:{value:Te}}),Te}function Ke(ye,Me,st){let xt=L(ye.endRe,st);if(xt){if(ye["on:end"]){const ln=new t(ye);ye["on:end"](Me,ln),ln.isMatchIgnored&&(xt=!1)}if(xt){for(;ye.endsParent&&ye.parent;)ye=ye.parent;return ye}}if(ye.endsWithParent)return Ke(ye.parent,Me,st)}function O(ye){return Te.matcher.regexIndex===0?(Fe+=ye[0],1):(no=!0,0)}function Je(ye){const Me=ye[0],st=ye.rule,xt=new t(st),ln=[st.__beforeBegin,st["on:begin"]];for(const ur of ln)if(ur&&(ur(ye,xt),xt.isMatchIgnored))return O(Me);return st.skip?Fe+=Me:(st.excludeBegin&&(Fe+=Me),J(),!st.returnBegin&&!st.excludeBegin&&(Fe=Me)),Ve(st,ye),st.returnBegin?0:Me.length}function dt(ye){const Me=ye[0],st=H.substring(ye.index),xt=Ke(Te,ye,st);if(!xt)return Un;const ln=Te;Te.endScope&&Te.endScope._wrap?(J(),Ce(Me,Te.endScope._wrap)):Te.endScope&&Te.endScope._multi?(J(),He(Te.endScope,ye)):ln.skip?Fe+=Me:(ln.returnEnd||ln.excludeEnd||(Fe+=Me),J(),ln.excludeEnd&&(Fe=Me));do Te.scope&&et.closeNode(),!Te.skip&&!Te.subLanguage&&(Wt+=Te.relevance),Te=Te.parent;while(Te!==xt.parent);return xt.starts&&Ve(xt.starts,ye),ln.returnEnd?0:Me.length}function ht(){const ye=[];for(let Me=Te;Me!==Ge;Me=Me.parent)Me.scope&&ye.unshift(Me.scope);ye.forEach(Me=>et.openNode(Me))}let ze={};function ut(ye,Me){const st=Me&&Me[0];if(Fe+=ye,st==null)return J(),0;if(ze.type==="begin"&&Me.type==="end"&&ze.index===Me.index&&st===""){if(Fe+=H.slice(Me.index,Me.index+1),!Pt){const xt=new Error(`0 width match regex (${j})`);throw xt.languageName=j,xt.badRule=ze.rule,xt}return 1}if(ze=Me,Me.type==="begin")return Je(Me);if(Me.type==="illegal"&&!Z){const xt=new Error('Illegal lexeme "'+st+'" for mode "'+(Te.scope||"<unnamed>")+'"');throw xt.mode=Te,xt}else if(Me.type==="end"){const xt=dt(Me);if(xt!==Un)return xt}if(Me.type==="illegal"&&st==="")return Fe+=`
102
+ `,1;if(Zt>1e5&&Zt>Me.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Fe+=st,st.length}const Ge=q(j);if(!Ge)throw we(It.replace("{}",j)),new Error('Unknown language: "'+j+'"');const qt=sn(Ge);let bt="",Te=M||qt;const Dt={},et=new fe.__emitter(fe);ht();let Fe="",Wt=0,Ft=0,Zt=0,no=!1;try{if(Ge.__emitTokens)Ge.__emitTokens(H,et);else{for(Te.matcher.considerAll();;){Zt++,no?no=!1:Te.matcher.considerAll(),Te.matcher.lastIndex=Ft;const ye=Te.matcher.exec(H);if(!ye)break;const Me=H.substring(Ft,ye.index),st=ut(Me,ye);Ft=ye.index+st}ut(H.substring(Ft))}return et.finalize(),bt=et.toHTML(),{language:j,value:bt,relevance:Wt,illegal:!1,_emitter:et,_top:Te}}catch(ye){if(ye.message&&ye.message.includes("Illegal"))return{language:j,value:cn(H),illegal:!0,relevance:0,_illegalBy:{message:ye.message,index:Ft,context:H.slice(Ft-100,Ft+100),mode:ye.mode,resultSoFar:bt},_emitter:et};if(Pt)return{language:j,value:cn(H),illegal:!1,relevance:0,errorRaised:ye,_emitter:et,_top:Te};throw ye}}function a(j){const H={value:cn(j),illegal:!1,relevance:0,_top:Se,_emitter:new fe.__emitter(fe)};return H._emitter.addText(j),H}function E(j,H){H=H||fe.languages||Object.keys(G);const Z=a(j),M=H.filter(q).filter(_e).map(J=>_(J,j,!1));M.unshift(Z);const B=M.sort((J,Ce)=>{if(J.relevance!==Ce.relevance)return Ce.relevance-J.relevance;if(J.language&&Ce.language){if(q(J.language).supersetOf===Ce.language)return 1;if(q(Ce.language).supersetOf===J.language)return-1}return 0}),[X,V]=B,Y=X;return Y.secondBest=V,Y}function R(j,H,Z){const M=H&&se[H]||Z;j.classList.add("hljs"),j.classList.add(`language-${M}`)}function U(j){let H=null;const Z=p(j);if(De(Z))return;if(ve("before:highlightElement",{el:j,language:Z}),j.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",j);return}if(j.children.length>0&&(fe.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(j)),fe.throwUnescapedHTML))throw new On("One of your code blocks includes unescaped HTML.",j.innerHTML);H=j;const M=H.textContent,B=Z?m(M,{language:Z,ignoreIllegals:!0}):E(M);j.innerHTML=B.value,j.dataset.highlighted="yes",R(j,Z,B.language),j.result={language:B.language,re:B.relevance,relevance:B.relevance},B.secondBest&&(j.secondBest={language:B.secondBest.language,relevance:B.secondBest.relevance}),ve("after:highlightElement",{el:j,result:B,text:M})}function W(j){fe=Xn(fe,j)}const oe=()=>{Ze(),Ue("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ae(){Ze(),Ue("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ge=!1;function Ze(){function j(){Ze()}if(document.readyState==="loading"){ge||window.addEventListener("DOMContentLoaded",j,!1),ge=!0;return}document.querySelectorAll(fe.cssSelector).forEach(U)}function Ee(j,H){let Z=null;try{Z=H(C)}catch(M){if(we("Language definition for '{}' could not be registered.".replace("{}",j)),Pt)we(M);else throw M;Z=Se}Z.name||(Z.name=j),G[j]=Z,Z.rawDefinition=H.bind(null,C),Z.aliases&&Q(Z.aliases,{languageName:j})}function re(j){delete G[j];for(const H of Object.keys(se))se[H]===j&&delete se[H]}function S(){return Object.keys(G)}function q(j){return j=(j||"").toLowerCase(),G[j]||G[se[j]]}function Q(j,{languageName:H}){typeof j=="string"&&(j=[j]),j.forEach(Z=>{se[Z.toLowerCase()]=H})}function _e(j){const H=q(j);return H&&!H.disableAutodetect}function Oe(j){j["before:highlightBlock"]&&!j["before:highlightElement"]&&(j["before:highlightElement"]=H=>{j["before:highlightBlock"](Object.assign({block:H.el},H))}),j["after:highlightBlock"]&&!j["after:highlightElement"]&&(j["after:highlightElement"]=H=>{j["after:highlightBlock"](Object.assign({block:H.el},H))})}function xe(j){Oe(j),Le.push(j)}function de(j){const H=Le.indexOf(j);H!==-1&&Le.splice(H,1)}function ve(j,H){const Z=j;Le.forEach(function(M){M[Z]&&M[Z](H)})}function he(j){return Ue("10.7.0","highlightBlock will be removed entirely in v12.0"),Ue("10.7.0","Please use highlightElement now."),U(j)}Object.assign(C,{highlight:m,highlightAuto:E,highlightAll:Ze,highlightElement:U,highlightBlock:he,configure:W,initHighlighting:oe,initHighlightingOnLoad:Ae,registerLanguage:Ee,unregisterLanguage:re,listLanguages:S,getLanguage:q,registerAliases:Q,autoDetection:_e,inherit:Xn,addPlugin:xe,removePlugin:de}),C.debugMode=function(){Pt=!1},C.safeMode=function(){Pt=!0},C.versionString=Lt,C.regex={concat:w,lookahead:f,either:x,optional:b,anyNumberOfTimes:g};for(const j in Qt)typeof Qt[j]=="object"&&e(Qt[j]);return Object.assign(C,Qt),C},Sn=Gr({});return Sn.newInstance=()=>Gr({}),Mo=Sn,Sn.HighlightJS=Sn,Sn.default=Sn,Mo}var wm=Em();const At=ip(wm),vl="[A-Za-z$_][0-9A-Za-z$_]*",xm=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Sm=["true","false","null","undefined","NaN","Infinity"],pf=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],gf=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],bf=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Am=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Tm=[].concat(bf,pf,gf);function mf(e){const t=e.regex,n=(me,{after:rt})=>{const Bt="</"+me[0].slice(1);return me.input.indexOf(Bt,rt)!==-1},s=vl,r={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(me,rt)=>{const Bt=me[0].length+me.index,Xe=me.input[Bt];if(Xe==="<"||Xe===","){rt.ignoreMatch();return}Xe===">"&&(n(me,{after:Bt})||rt.ignoreMatch());let Ct;const Qe=me.input.substring(Bt);if(Ct=Qe.match(/^\s*=/)){rt.ignoreMatch();return}if((Ct=Qe.match(/^\s+extends\s+/))&&Ct.index===0){rt.ignoreMatch();return}}},c={$pattern:vl,keyword:xm,literal:Sm,built_in:Tm,"variable.language":Am},l="[0-9](_?[0-9])*",d=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${u})((${d})|\\.)?|(${d}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},L=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,w,y,{match:/\$\d+/},h];f.contains=L.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(L)});const A=[].concat(T,f.contains),D=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(A)}]),v={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},N={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},I={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...pf,...gf]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ae={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/},ke={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Ye(me){return t.concat("(?!",me.join("|"),")")}const it={match:t.concat(/\b/,Ye([...bf,"super","import"].map(me=>`${me}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Ie={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},mt={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},We="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",je={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(We)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,w,y,T,{match:/\$\d+/},h,I,{scope:"attr",match:s+t.lookahead(":"),relevance:0},je,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:We,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},ae,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},Ie,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},it,ke,N,mt,{match:/\$[(.]/}]}}const Li="[A-Za-z$_][0-9A-Za-z$_]*",_f=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],yf=["true","false","null","undefined","NaN","Infinity"],vf=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Ef=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wf=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],xf=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Sf=[].concat(wf,vf,Ef);function km(e){const t=e.regex,n=(me,{after:rt})=>{const Bt="</"+me[0].slice(1);return me.input.indexOf(Bt,rt)!==-1},s=Li,r={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(me,rt)=>{const Bt=me[0].length+me.index,Xe=me.input[Bt];if(Xe==="<"||Xe===","){rt.ignoreMatch();return}Xe===">"&&(n(me,{after:Bt})||rt.ignoreMatch());let Ct;const Qe=me.input.substring(Bt);if(Ct=Qe.match(/^\s*=/)){rt.ignoreMatch();return}if((Ct=Qe.match(/^\s+extends\s+/))&&Ct.index===0){rt.ignoreMatch();return}}},c={$pattern:Li,keyword:_f,literal:yf,built_in:Sf,"variable.language":xf},l="[0-9](_?[0-9])*",d=`\\.(${l})`,u="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${u})((${d})|\\.)?|(${d}))[eE][+-]?(${l})\\b`},{begin:`\\b(${u})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},g={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},b={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,f]},T={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},L=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,w,y,{match:/\$\d+/},h];f.contains=L.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(L)});const A=[].concat(T,f.contains),D=A.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(A)}]),v={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},N={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,t.concat(s,"(",t.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},I={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...vf,...Ef]}},z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ae={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/},ke={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Ye(me){return t.concat("(?!",me.join("|"),")")}const it={match:t.concat(/\b/,Ye([...wf,"super","import"].map(me=>`${me}\\s*\\(`)),s,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Ie={begin:t.concat(/\./,t.lookahead(t.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},mt={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},We="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",je={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(We)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:I},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,b,w,y,T,{match:/\$\d+/},h,I,{scope:"attr",match:s+t.lookahead(":"),relevance:0},je,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:We,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},ae,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,e.inherit(e.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},Ie,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},it,ke,N,mt,{match:/\$[(.]/}]}}function Af(e){const t=e.regex,n=km(e),s=Li,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],i={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],d={$pattern:Li,keyword:_f.concat(l),literal:yf,built_in:Sf.concat(r),"variable.language":xf},u={className:"meta",begin:"@"+s},h=(w,y,x)=>{const T=w.contains.findIndex(L=>L.label===y);if(T===-1)throw new Error("can not find mode to replace");w.contains.splice(T,1,x)};Object.assign(n.keywords,d),n.exports.PARAMS_CONTAINS.push(u);const f=n.contains.find(w=>w.scope==="attr"),g=Object.assign({},f,{match:t.concat(s,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,g]),n.contains=n.contains.concat([u,i,o,g]),h(n,"shebang",e.SHEBANG()),h(n,"use_strict",c);const b=n.contains.find(w=>w.label==="func.def");return b.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function Tf(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},d={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},u={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,l,u,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,l,u,d]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,u,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,u,d]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",g=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,b=`\\b|${s.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${g}))[eE][+-]?(${f})[jJ]?(?=${b})`},{begin:`(${g})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${b})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${b})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${b})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${b})`},{begin:`\\b(${f})[jJ](?=${b})`}]},y={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},x={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",l,w,h,e.HASH_COMMENT_MODE]}]};return d.contains=[h,w,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[l,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,y,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[x]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,x,h]}]}}function Om(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},s=["true","false","null"],r={scope:"literal",beginKeywords:s.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:s},contains:[t,n,e.QUOTE_STRING_MODE,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Pa(e){const t=e.regex,n={},s={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const r={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,r]};r.contains.push(c);const l={match:/\\"/},d={className:"string",begin:/'/,end:/'/},u={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],g=e.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),b={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],x={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],L=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],A=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],D=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:y,built_in:[...T,...L,"set","shopt",...A,...D]},contains:[g,e.SHEBANG(),b,h,i,o,x,c,l,d,u,n]}}const Cm=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Pm=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Im=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Rm=[...Pm,...Im],Nm=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Mm=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Lm=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Dm=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Um(e){const t=e.regex,n=Cm(e),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",i=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",c=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,s,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Mm.join("|")+")"},{begin:":(:)?("+Lm.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Dm.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:r,attribute:Nm.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Rm.join("|")+")\\b"}]}}function kf(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(i,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),d={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,l,c,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,l,c]}]}]},e.COMMENT(/\x3C!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:d}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Bm(e){const t=e.regex,n=e.COMMENT("--","$"),s={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},r={begin:/"/,end:/"/,contains:[{match:/""/}]},i=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],c=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],d=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],u=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],g=u,b=[...d,...l].filter(D=>!u.includes(D)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},y={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},x={match:t.concat(/\b/,t.either(...g),/\s*\(/),relevance:0,keywords:{built_in:g}};function T(D){return t.concat(/\b/,t.either(...D.map(v=>v.replace(/\s+/,"\\s+"))),/\b/)}const L={scope:"keyword",match:T(f),relevance:0};function A(D,{exceptions:v,when:N}={}){const I=N;return v=v||[],D.map(z=>z.match(/\|\d+$/)||v.includes(z)?z:I(z)?`${z}|0`:z)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:A(b,{when:D=>D.length<3}),literal:i,type:c,built_in:h},contains:[{scope:"type",match:T(o)},L,x,w,s,r,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,y]}}function Of(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},s={begin:"^[-\\*]{3,}",end:"$"},r={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},i={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},d={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},u={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(d,{contains:[]}),f=e.inherit(u,{contains:[]});d.contains.push(f),u.contains.push(h);let g=[n,l];return[d,u,h,f].forEach(x=>{x.contains=x.contains.concat(g)}),g=g.concat(d,u),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:g},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:g}]}]},n,i,d,u,{className:"quote",begin:"^>\\s+",contains:g,end:"$"},r,s,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Cf(e){const i={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:i,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:i,illegal:/["']/}]}]}}function Pf(e){const t=e.regex,n=/(r#)?/,s=t.concat(n,e.UNDERSCORE_IDENT_RE),r=t.concat(n,e.IDENT_RE),i={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,r,t.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",c=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],d=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],u=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:u,keyword:c,literal:l,built_in:d},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,s],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,s],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,s,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,s],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:d,type:u}},{className:"punctuation",begin:"->"},i]}}function jm(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="("+s+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(d,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},g=t.optional(r)+e.IDENT_RE+"\\s*\\(",y={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},x=[h,c,n,e.C_BLOCK_COMMENT_MODE,u,d],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:y,contains:x.concat([{begin:/\(/,end:/\)/,keywords:y,contains:x.concat(["self"]),relevance:0}]),relevance:0},L={begin:"("+o+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:y,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:y,relevance:0},{begin:g,returnBegin:!0,contains:[e.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,u,c,{begin:/\(/,end:/\)/,keywords:y,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,u,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:y,disableAutodetect:!0,illegal:"</",contains:[].concat(T,L,x,[h,{begin:e.IDENT_RE+"::",keywords:y},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:d,keywords:y}}}function If(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),s="decltype\\(auto\\)",r="[a-zA-Z_]\\w*::",o="(?!struct)("+s+"|"+t.optional(r)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},u={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(d,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:t.optional(r)+e.IDENT_RE,relevance:0},g=t.optional(r)+e.IDENT_RE+"\\s*\\(",b=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],y=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],x=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],A={type:w,keyword:b,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:y},D={className:"function.dispatch",relevance:0,keywords:{_hint:x},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},v=[D,h,c,n,e.C_BLOCK_COMMENT_MODE,u,d],N={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:A,contains:v.concat([{begin:/\(/,end:/\)/,keywords:A,contains:v.concat(["self"]),relevance:0}]),relevance:0},I={className:"function",begin:"("+o+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:A,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:s,keywords:A,relevance:0},{begin:g,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[d,u]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,u,c,{begin:/\(/,end:/\)/,keywords:A,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,u,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:A,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(N,I,D,v,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:A,contains:["self",c]},{begin:e.IDENT_RE+"::",keywords:A},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}At.registerLanguage("javascript",mf);At.registerLanguage("js",mf);At.registerLanguage("typescript",Af);At.registerLanguage("ts",Af);At.registerLanguage("python",Tf);At.registerLanguage("py",Tf);At.registerLanguage("json",Om);At.registerLanguage("bash",Pa);At.registerLanguage("sh",Pa);At.registerLanguage("shell",Pa);At.registerLanguage("css",Um);At.registerLanguage("html",kf);At.registerLanguage("xml",kf);At.registerLanguage("sql",Bm);At.registerLanguage("markdown",Of);At.registerLanguage("md",Of);At.registerLanguage("go",Cf);At.registerLanguage("golang",Cf);At.registerLanguage("rust",Pf);At.registerLanguage("rs",Pf);At.registerLanguage("c",jm);At.registerLanguage("cpp",If);At.registerLanguage("c++",If);At.registerLanguage("zig",()=>({name:"Zig",keywords:{keyword:["align","allowzero","and","anyframe","anytype","asm","async","await","break","catch","comptime","const","continue","defer","else","enum","errdefer","error","export","extern","fn","for","if","inline","noalias","nosuspend","null","opaque","or","orelse","packed","pub","resume","return","struct","suspend","switch","test","threadlocal","try","undefined","union","unreachable","usingnamespace","var","volatile","while"].join(" "),literal:"true false null undefined",built_in:["u8","u16","u32","u64","u128","usize","i8","i16","i32","i64","i128","isize","f16","f32","f64","f128","bool","void","anyerror","anyopaque","anytype","comptime_int","comptime_float","noreturn","type"].join(" ")},contains:[At.C_LINE_COMMENT_MODE,At.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"',end:'"',contains:[{begin:"\\\\."}]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"\\b(0x[0-9a-fA-F_]+|0b[01_]+|0o[0-7_]+|[0-9][0-9_]*)",relevance:0},{className:"function",beginKeywords:"fn",end:"\\(",excludeEnd:!0,contains:[{className:"title",begin:"[a-zA-Z_][a-zA-Z0-9_]*"}]},{className:"type",begin:"@[a-zA-Z_][a-zA-Z0-9_]*"}]}));function Fm(e,t){if(t&&At.getLanguage(t))try{return At.highlight(e,{language:t}).value}catch(n){console.warn("Highlight error:",n)}try{return At.highlightAuto(e).value}catch{return Di(e)}}function Di(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}const Ia=new vt.Renderer;Ia.code=function({text:e,lang:t}){const n=t||"text",s=Fm(e,t),r=encodeURIComponent(e);return'<div class="md-code-block" data-language="'+n+'"><div class="md-code-header"><span class="md-code-lang">'+Di(n)+'</span><button class="md-code-copy" data-code="'+r+'">Copy</button></div><pre><code class="hljs">'+s+"</code></pre></div>"};Ia.link=function({href:e,title:t,text:n}){const s=t?` title="${Di(t)}"`:"";return`<a href="${Di(e)}"${s} target="_blank" rel="noopener noreferrer">${n}</a>`};vt.setOptions({gfm:!0,breaks:!0,renderer:Ia});const qm={ALLOWED_TAGS:["h1","h2","h3","h4","h5","h6","p","br","hr","ul","ol","li","blockquote","pre","code","table","thead","tbody","tr","th","td","a","strong","em","s","del","div","span","button"],ALLOWED_ATTR:["class","style","href","target","rel","title","data-language","data-code"],ALLOW_DATA_ATTR:!0};function Rf(){function e(t){if(!t)return"";const n=vt.parse(t);return vm.sanitize(n,qm)}return{renderMarkdown:e}}const Hm={key:0,class:"bubble-header"},Km={class:"bubble-role"},zm={key:0,class:"bubble-thinking"},Gm={class:"bubble-time mono"},Wm=["innerHTML"],Vm={key:1,class:"cursor"},Ym={key:2,class:"bubble-error"},Xm={key:3,class:"bubble-footer"},Zm={class:"bubble-time mono"},Jm={__name:"MessageBubble",props:{message:{type:Object,required:!0}},setup(e){const{renderMarkdown:t}=Rf(),n=e,s=on(null),r=ct(()=>n.message.role==="user"),i=ct(()=>n.message.role==="system"),o=ct(()=>n.message.role==="agent"),c=ct(()=>t(n.message.content)),l=ct(()=>o.value&&n.message.streaming),d=ct(()=>n.message.timestamp?new Date(n.message.timestamp).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):"");function u(h){const f=h.target.closest(".md-code-copy");if(!f)return;h.stopPropagation();const g=decodeURIComponent(f.dataset.code||"");navigator.clipboard.writeText(g).then(()=>{f.textContent="Copied!",f.classList.add("copied"),setTimeout(()=>{f.textContent="Copy",f.classList.remove("copied")},1500)})}return kr(()=>{s.value&&s.value.addEventListener("click",u)}),Qs(()=>{s.value&&s.value.removeEventListener("click",u)}),(h,f)=>(ie(),be("div",{ref_key:"bubbleRef",ref:s,class:Nn(["bubble",{user:r.value,agent:o.value,system:i.value,streaming:e.message.streaming,errored:!!e.message.error}])},[r.value?ft("",!0):(ie(),be("header",Hm,[F("span",Km,nt(i.value?"system":"agent"),1),e.message.streaming&&!e.message.content?(ie(),be("div",zm,[...f[0]||(f[0]=[F("span",null,null,-1),F("span",null,null,-1),F("span",null,null,-1)])])):ft("",!0),F("span",Gm,nt(d.value),1)])),F("div",{class:"bubble-content markdown-content",innerHTML:c.value},null,8,Wm),l.value&&e.message.content?(ie(),be("span",Vm,"▍")):ft("",!0),e.message.error?(ie(),be("footer",Ym,nt(e.message.error),1)):ft("",!0),r.value?(ie(),be("footer",Xm,[F("span",Zm,nt(d.value),1)])):ft("",!0)],2))}},$m=Yt(Jm,[["__scopeId","data-v-4cb8ee44"]]),Qm={class:"message-stack"},e0={__name:"MessageList",props:{messages:{type:Array,required:!0}},setup(e){const t=e,n=on(null),s=on(!0);function r(){const c=n.value;return c?c.scrollHeight-c.scrollTop-c.clientHeight<80:!0}function i(){s.value=r()}async function o(){await Gs();const c=n.value;c&&(c.scrollTop=c.scrollHeight)}return yr(()=>t.messages.length,()=>{s.value&&o()}),yr(()=>t.messages[t.messages.length-1]?.content,()=>{s.value&&o()}),kr(o),(c,l)=>(ie(),be("div",{ref_key:"scrollRef",ref:n,class:"message-list",onScroll:i},[F("div",Qm,[(ie(!0),be(Ut,null,or(e.messages,d=>(ie(),zt($m,{key:d.id,message:d},null,8,["message"]))),128))])],544))}},t0=Yt(e0,[["__scopeId","data-v-a9226756"]]),n0=["placeholder","disabled"],r0={__name:"PromptInput",props:{busy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:"Type a prompt…"}},emits:["submit","stop"],setup(e,{emit:t}){const n=e,s=t,r=on(""),i=on(null);function o(){const u=i.value;u&&(u.style.height="auto",u.style.height=Math.min(u.scrollHeight,200)+"px")}yr(r,()=>Gs(o));function c(){const u=r.value.trim();!u||n.busy||n.disabled||(s("submit",u),r.value="",Gs(o))}function l(u){u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),c())}function d(){s("stop")}return(u,h)=>(ie(),be("div",{class:Nn(["input-area",{disabled:e.disabled}])},[bn(F("textarea",{ref_key:"textarea",ref:i,"onUpdate:modelValue":h[0]||(h[0]=f=>r.value=f),class:"input-textarea",placeholder:e.placeholder,disabled:e.disabled,rows:"1",onKeydown:l},null,40,n0),[[Hn,r.value]]),e.busy?(ie(),zt(Gn,{key:0,variant:"danger",size:"md",onClick:d,title:"Stop streaming"},{default:yn(()=>[...h[1]||(h[1]=[pt("Stop",-1)])]),_:1})):(ie(),zt(Gn,{key:1,variant:"primary",size:"md",disabled:!r.value.trim()||e.disabled,onClick:c},{default:yn(()=>[...h[2]||(h[2]=[pt("Send",-1)])]),_:1},8,["disabled"]))],2))}},s0=Yt(r0,[["__scopeId","data-v-2010aa45"]]),i0={class:"prompt-panel"},o0={key:0,class:"panel-header"},a0={class:"header-left"},c0={class:"header-titles"},l0={class:"header-title"},u0=["title"],f0={__name:"PromptPanel",setup(e){const t=ct(()=>ti(Gt.selectedAgentId)),n=ct(()=>{const l=Gt.selectedAgentId;return l?Ju(l):null}),s=ct(()=>t.value?.subject||"");async function r(l){const d=t.value,u=n.value;if(!d||!u||!d.subject)return;const h=nn({id:Ii(),role:"user",content:l,timestamp:Date.now(),streaming:!1,error:null});u.messages.push(h);const f=nn({id:Ii(),role:"agent",content:"",timestamp:Date.now(),streaming:!0,error:null});u.messages.push(f),u.streaming=!0,u.error=null;const g=new AbortController;u.abort=g;try{await va(d.subject,mg(l),{signal:g.signal,onChunk:b=>{f.content+=b}})}catch(b){b?.name==="AbortError"?f.error="(stopped)":(f.error=b?.message??String(b),u.error=f.error)}finally{f.streaming=!1,u.streaming=!1,u.abort=null}}function i(){const l=n.value;l?.abort&&l.abort.abort()}function o(){Gt.selectedAgentId&&$u(Gt.selectedAgentId)}function c(){zp()}return(l,d)=>(ie(),be("div",i0,[t.value?(ie(),be("header",o0,[F("div",a0,[kt(Vu,{bucket:t.value.bucket},null,8,["bucket"]),F("div",c0,[F("h2",l0,nt(t.value.displayName),1),F("p",{class:"header-subject mono",title:s.value},nt(s.value),9,u0)])]),F("div",{class:"header-right"},[F("button",{class:"header-action",onClick:o,title:"Clear conversation"},"Clear"),F("button",{class:"header-action",onClick:c,title:"Close"},"×")])])):ft("",!0),t.value?(ie(),be(Ut,{key:2},[kt(t0,{messages:n.value.messages},null,8,["messages"]),kt(s0,{busy:n.value.streaming,onSubmit:r,onStop:i},null,8,["busy"])],64)):(ie(),zt(cs,{key:1,title:"Pick an agent",message:"Select an agent from the grid on the left to start prompting it. The same wire protocol works for every runtime."}))]))}},d0=Yt(f0,[["__scopeId","data-v-6466169a"]]),h0={class:"run-header"},p0={class:"run-cwd-wrap"},g0={class:"run-status"},b0={class:"status-text"},m0={class:"run-cwd"},_0={key:0,class:"run-error mono"},y0=["innerHTML"],v0={key:1,class:"run-pending"},E0={__name:"FanoutResultCard",props:{run:{type:Object,required:!0}},setup(e){const{renderMarkdown:t}=Rf(),n=e,s=on(null),r=ct(()=>t(n.run.content||"")),i=ct(()=>n.run.status);function o(l){const d=l.target.closest(".md-code-copy");if(!d)return;l.stopPropagation();const u=decodeURIComponent(d.dataset.code||"");navigator.clipboard.writeText(u).then(()=>{d.textContent="Copied!",d.classList.add("copied"),setTimeout(()=>{d.textContent="Copy",d.classList.remove("copied")},1500)})}kr(()=>{s.value&&s.value.addEventListener("click",o)}),Qs(()=>{s.value&&s.value.removeEventListener("click",o)});function c(){n.run.abort&&n.run.abort.abort()}return(l,d)=>(ie(),be("div",{ref_key:"cardRef",ref:s,class:Nn(["run-card",`status-${e.run.status}`])},[F("header",h0,[F("div",p0,[F("div",g0,[F("span",{class:Nn(["status-dot",`dot-${e.run.status}`])},null,2),F("span",b0,nt(i.value),1)]),F("code",m0,nt(e.run.cwd),1)]),e.run.status==="running"?(ie(),be("button",{key:0,class:"abort-btn",onClick:c,title:"Stop"},"Stop")):ft("",!0)]),e.run.error?(ie(),be("div",_0,nt(e.run.error),1)):ft("",!0),F("div",{class:"run-body markdown-content",innerHTML:r.value},null,8,y0),e.run.status==="pending"&&!e.run.content?(ie(),be("div",v0," Waiting for first chunk… ")):ft("",!0)],2))}},w0=Yt(E0,[["__scopeId","data-v-e4d0818e"]]),St=nn({prompt:"",cwds:[""],intakeId:"",runs:[],running:!1});let x0=1;function S0(){return`run-${x0++}`}function El(){St.cwds.push("")}function A0(e){if(St.cwds.length===1){St.cwds[0]="";return}St.cwds.splice(e,1)}function Nf(){for(const e of St.runs)if(e.abort&&e.status==="running")try{e.abort.abort()}catch{}}function T0(){Nf(),St.runs=[]}const k0={class:"fanout-pane"},O0={key:0,class:"pane-body"},C0={key:0,class:"field"},P0=["value"],I0={class:"field"},R0={class:"cwd-list"},N0=["onUpdate:modelValue"],M0=["onClick"],L0={class:"actions"},D0={key:2,class:"results"},U0={class:"results-title"},B0={class:"dim mono"},j0={class:"results-grid"},F0={__name:"FanoutPanel",setup(e){const t=ct(()=>ya()),n=ct(()=>t.value.length===0?null:t.value.find(d=>d.id===St.intakeId)??t.value[0]);function s(){const d=ti(Gt.selectedAgentId);if(d?.bucket===at.PI_EXEC_INTAKE){St.intakeId=d.id;return}!St.intakeId&&t.value.length>0&&(St.intakeId=t.value[0].id)}kr(s),yr(()=>Gt.selectedAgentId,s);const r=ct(()=>St.cwds.map(d=>d.trim()).filter(d=>d.length>0)),i=ct(()=>!St.running&&!!St.prompt.trim()&&r.value.length>0&&!!n.value);async function o(d,u){const h=nn({id:S0(),cwd:d,status:"pending",content:"",error:null,abort:new AbortController,finishedAt:null});St.runs.push(h);const f={sessionMode:"run",body:St.prompt,cwd:d,from:"dashboard-fanout"};try{h.status="running",await va(u.subject,JSON.stringify(f),{signal:h.abort.signal,onChunk:g=>{h.content+=g}}),h.status="done"}catch(g){g?.name==="AbortError"?(h.status="error",h.error="(aborted)"):(h.status="error",h.error=g?.message??String(g))}finally{h.finishedAt=Date.now(),h.abort=null}}async function c(){if(!i.value)return;const d=n.value;if(d){T0(),St.running=!0;try{await Promise.all(r.value.map(u=>o(u,d)))}finally{St.running=!1}}}function l(){Nf()}return(d,u)=>(ie(),be("div",k0,[u[8]||(u[8]=F("header",{class:"pane-header"},[F("h2",null,"Fan-out"),F("p",null,[pt("Run the same prompt across multiple working directories in parallel. Each run is an independent "),F("code",null,'sessionMode: "run"'),pt(" against the chosen pi-exec control.")])],-1)),t.value.length===0?(ie(),be("div",O0,[kt(cs,{title:"No pi-exec control on the bus",message:"Start a nats-pi-bridge instance and it will appear here."})])):(ie(),be("form",{key:1,class:"form",onSubmit:us(c,["prevent"])},[t.value.length>1?(ie(),be("label",C0,[u[3]||(u[3]=F("span",{class:"field-label"},"Control",-1)),bn(F("select",{"onUpdate:modelValue":u[0]||(u[0]=h=>Kt(St).intakeId=h)},[(ie(!0),be(Ut,null,or(t.value,h=>(ie(),be("option",{key:h.id,value:h.id},nt(h.subject),9,P0))),128))],512),[[pi,Kt(St).intakeId]])])):ft("",!0),F("label",I0,[u[4]||(u[4]=F("span",{class:"field-label"},"Prompt",-1)),bn(F("textarea",{"onUpdate:modelValue":u[1]||(u[1]=h=>Kt(St).prompt=h),rows:"3",placeholder:"Run the test suite and report failures"},null,512),[[Hn,Kt(St).prompt]])]),F("div",R0,[u[5]||(u[5]=F("span",{class:"field-label"},"Working directories",-1)),(ie(!0),be(Ut,null,or(Kt(St).cwds,(h,f)=>(ie(),be("div",{key:f,class:"cwd-row"},[bn(F("input",{"onUpdate:modelValue":g=>Kt(St).cwds[f]=g,type:"text",placeholder:"/path/to/repo",autocomplete:"off"},null,8,N0),[[Hn,Kt(St).cwds[f]]]),F("button",{type:"button",class:"cwd-remove",onClick:g=>Kt(A0)(f),title:"Remove"},"×",8,M0)]))),128)),F("button",{type:"button",class:"cwd-add",onClick:u[2]||(u[2]=(...h)=>Kt(El)&&Kt(El)(...h))},"+ Add directory")]),F("div",L0,[Kt(St).running?(ie(),zt(Gn,{key:0,variant:"danger",type:"button",onClick:l},{default:yn(()=>[...u[6]||(u[6]=[pt("Stop all",-1)])]),_:1})):(ie(),zt(Gn,{key:1,variant:"primary",type:"submit",disabled:!i.value},{default:yn(()=>[pt("Run fan-out ("+nt(r.value.length)+")",1)]),_:1},8,["disabled"]))])],32)),Kt(St).runs.length>0?(ie(),be("div",D0,[F("h3",U0,[u[7]||(u[7]=pt(" Results ",-1)),F("span",B0,nt(Kt(St).runs.filter(h=>h.status==="done").length)+" / "+nt(Kt(St).runs.length),1)]),F("div",j0,[(ie(!0),be(Ut,null,or(Kt(St).runs,h=>(ie(),zt(w0,{key:h.id,run:h},null,8,["run"]))),128))])])):ft("",!0)]))}},q0=Yt(F0,[["__scopeId","data-v-24e0e991"]]),H0={class:"create-pane"},K0={key:0,class:"pane-body"},z0={key:0,class:"field"},G0=["value"],W0={class:"field"},V0={class:"field"},Y0={class:"row"},X0={class:"field flex-1"},Z0=["placeholder"],J0={class:"field"},$0={class:"row"},Q0={class:"field flex-1"},e_=["value"],t_={class:"field"},n_=["value"],r_={key:1,class:"field"},s_={class:"actions"},i_={key:2,class:"error-box mono"},o_={key:3,class:"response"},a_={class:"response-header"},c_={class:"mono"},l_={class:"response-body"},u_={__name:"SessionCreateForm",setup(e){const t=ct(()=>ya()),n=on(""),s=["","anthropic/claude-sonnet-4-6","anthropic/claude-opus-4-6","anthropic/claude-haiku-4-5","openai/gpt-5","__custom__"];function r(I){return I===""?"(use system default)":I==="__custom__"?"custom…":I}const i=["","off","minimal","low","medium","high","xhigh"];function o(I){return I===""?"(use system default)":I}const c=on({cwd:"",prompt:"",sessionId:"",modelChoice:"",modelCustom:"",thinkingLevel:"",maxLifetime:1800}),l=on("idle"),d=on(""),u=on(null),h=on(null);let f=null;const g=ct(()=>c.value.modelChoice==="__custom__"),b=ct(()=>g.value?c.value.modelCustom.trim():c.value.modelChoice),w=ct(()=>l.value==="sending"||l.value==="streaming"||!c.value.cwd.trim()||!c.value.prompt.trim()||g.value&&!c.value.modelCustom.trim()?!1:!!y.value),y=ct(()=>t.value.length===0?null:t.value.find(I=>I.id===n.value)??t.value[0]);function x(){const I=ti(Gt.selectedAgentId);if(I?.bucket===at.PI_EXEC_INTAKE){n.value=I.id;return}!n.value&&t.value.length>0&&(n.value=t.value[0].id)}kr(x),yr(()=>Gt.selectedAgentId,x);function T(){return`dash-${Math.random().toString(36).slice(2,8)}`}async function L(){if(!w.value)return;const I=y.value;if(!I){u.value="No pi-exec control available";return}const z=c.value.sessionId.trim()||T(),ae={sessionMode:"session",body:c.value.prompt,cwd:c.value.cwd.trim(),sessionId:z,from:"dashboard"};b.value&&(ae.model=b.value),c.value.thinkingLevel&&(ae.thinkingLevel=c.value.thinkingLevel);const ke=Number(c.value.maxLifetime);Number.isFinite(ke)&&ke>0&&(ae.maxLifetime=ke),l.value="sending",u.value=null,d.value="",h.value=z,f=new AbortController;const Ye=c.value.prompt,it=Date.now();try{l.value="streaming",await va(I.subject,JSON.stringify(ae),{signal:f.signal,onChunk:mt=>{d.value+=mt}}),l.value="done",await Xs(),await Pi();let Ie=v(z,I.owner);Ie||(await new Promise(mt=>setTimeout(mt,400)),await Xs(),Ie=v(z,I.owner)),Ie&&N(Ie.id,Ye,d.value,it)}catch(Ie){Ie?.name==="AbortError"?l.value="idle":(u.value=Ie?.message??String(Ie),l.value="error")}finally{f=null}}function A(){f&&f.abort()}function D(){c.value.prompt="",d.value="",l.value="idle",u.value=null,h.value=null}function v(I,z){let ae=null;for(const ke of kn.values())ke.bucket===at.PI_EXEC_SESSION&&ke.sessionId===I&&ke.owner===z&&(!ae||(ke.lastSeen??0)>(ae.lastSeen??0))&&(ae=ke);return ae}function N(I,z,ae,ke){const Ye=Ju(I),it=[nn({id:Ii(),role:"user",content:z,timestamp:ke,streaming:!1,error:null}),nn({id:Ii(),role:"agent",content:ae,timestamp:Date.now(),streaming:!1,error:null})];Ye.messages.unshift(...it)}return(I,z)=>(ie(),be("div",H0,[z[21]||(z[21]=F("header",{class:"pane-header"},[F("h2",null,"Create pi-exec session"),F("p",null,[pt("Spawn a fresh PI agent on the headless bridge. The session stays alive on the bus until you stop it or its "),F("code",null,"maxLifetime"),pt(" expires.")])],-1)),t.value.length===0?(ie(),be("div",K0,[kt(cs,{title:"No pi-exec control on the bus",message:"Start a nats-pi-bridge instance and it will appear here."})])):(ie(),be("form",{key:1,class:"form",onSubmit:us(L,["prevent"])},[t.value.length>1?(ie(),be("label",z0,[z[8]||(z[8]=F("span",{class:"field-label"},"Control",-1)),bn(F("select",{"onUpdate:modelValue":z[0]||(z[0]=ae=>n.value=ae)},[(ie(!0),be(Ut,null,or(t.value,ae=>(ie(),be("option",{key:ae.id,value:ae.id},nt(ae.subject),9,G0))),128))],512),[[pi,n.value]])])):ft("",!0),F("label",W0,[z[9]||(z[9]=F("span",{class:"field-label"},"Working directory",-1)),bn(F("input",{"onUpdate:modelValue":z[1]||(z[1]=ae=>c.value.cwd=ae),type:"text",placeholder:"/home/me/code/my-project",autocomplete:"off"},null,512),[[Hn,c.value.cwd]])]),F("label",V0,[z[10]||(z[10]=F("span",{class:"field-label"},"Initial prompt",-1)),bn(F("textarea",{"onUpdate:modelValue":z[2]||(z[2]=ae=>c.value.prompt=ae),rows:"3",placeholder:"What should the agent do first?"},null,512),[[Hn,c.value.prompt]])]),F("div",Y0,[F("label",X0,[z[11]||(z[11]=F("span",{class:"field-label"},"Session ID",-1)),bn(F("input",{"onUpdate:modelValue":z[3]||(z[3]=ae=>c.value.sessionId=ae),type:"text",placeholder:`auto: ${T()}`,autocomplete:"off"},null,8,Z0),[[Hn,c.value.sessionId]])]),F("label",J0,[z[12]||(z[12]=F("span",{class:"field-label"},"Max lifetime (s)",-1)),bn(F("input",{"onUpdate:modelValue":z[4]||(z[4]=ae=>c.value.maxLifetime=ae),type:"number",min:"0",step:"60"},null,512),[[Hn,c.value.maxLifetime,void 0,{number:!0}]])])]),F("div",$0,[F("label",Q0,[z[13]||(z[13]=F("span",{class:"field-label"},"Model",-1)),bn(F("select",{"onUpdate:modelValue":z[5]||(z[5]=ae=>c.value.modelChoice=ae)},[(ie(),be(Ut,null,or(s,ae=>F("option",{key:ae,value:ae},nt(r(ae)),9,e_)),64))],512),[[pi,c.value.modelChoice]])]),F("label",t_,[z[14]||(z[14]=F("span",{class:"field-label"},"Thinking",-1)),bn(F("select",{"onUpdate:modelValue":z[6]||(z[6]=ae=>c.value.thinkingLevel=ae)},[(ie(),be(Ut,null,or(i,ae=>F("option",{key:ae,value:ae},nt(o(ae)),9,n_)),64))],512),[[pi,c.value.thinkingLevel]])])]),z[20]||(z[20]=F("p",{class:"field-hint"},[pt(" Leave model and thinking on "),F("em",null,"(use system default)"),pt(" to inherit the bridge's own "),F("code",null,"~/.pi/agent/auth.cfg"),pt(" + "),F("code",null,"settings.json"),pt(". Setting an explicit model only works if the bridge has the matching API key for that provider. ")],-1)),g.value?(ie(),be("label",r_,[z[15]||(z[15]=F("span",{class:"field-label"},"Custom model",-1)),bn(F("input",{"onUpdate:modelValue":z[7]||(z[7]=ae=>c.value.modelCustom=ae),type:"text",placeholder:"provider/model-name",autocomplete:"off"},null,512),[[Hn,c.value.modelCustom]])])):ft("",!0),F("div",s_,[l.value==="streaming"?(ie(),zt(Gn,{key:0,variant:"danger",onClick:A,type:"button"},{default:yn(()=>[...z[16]||(z[16]=[pt("Stop",-1)])]),_:1})):(ie(),zt(Gn,{key:1,variant:"primary",disabled:!w.value,loading:l.value==="sending",type:"submit"},{default:yn(()=>[...z[17]||(z[17]=[pt("Create session",-1)])]),_:1},8,["disabled","loading"])),l.value==="done"||l.value==="error"?(ie(),zt(Gn,{key:2,variant:"ghost",type:"button",onClick:D},{default:yn(()=>[...z[18]||(z[18]=[pt("New",-1)])]),_:1})):ft("",!0)]),u.value?(ie(),be("div",i_,nt(u.value),1)):ft("",!0),d.value?(ie(),be("div",o_,[F("div",a_,[z[19]||(z[19]=F("span",{class:"dim"},"initial response · session",-1)),F("span",c_,nt(h.value),1)]),F("pre",l_,nt(d.value),1)])):ft("",!0)],32))]))}},f_=Yt(u_,[["__scopeId","data-v-c7cc038d"]]),d_={class:"right-panel"},h_={key:0,class:"empty-wrap"},p_={key:0,class:"tab-bar"},g_=["onClick"],b_={class:"tab-body"},m_={__name:"RightPanel",setup(e){const t={prompt:{id:"prompt",label:"Prompt"},createSession:{id:"createSession",label:"New Session"},fanout:{id:"fanout",label:"Fan-out"}},n=ct(()=>ti(Gt.selectedAgentId)),s=ct(()=>n.value?n.value.bucket===at.PI_EXEC_INTAKE?[t.createSession,t.fanout]:[t.prompt]:[]),r=ct(()=>s.value.length===0?null:(s.value.find(c=>c.id===Gt.rightPanel)??s.value[0]).id);function i(o){Gt.rightPanel=o}return(o,c)=>(ie(),be("div",d_,[s.value.length===0?(ie(),be("div",h_,[kt(cs,{title:"Pick something",message:"Click any agent on the left to prompt it. Click a pi-exec control to create a new headless session or fan out across multiple directories."})])):(ie(),be(Ut,{key:1},[s.value.length>1?(ie(),be("nav",p_,[(ie(!0),be(Ut,null,or(s.value,l=>(ie(),be("button",{key:l.id,class:Nn(["tab",{active:r.value===l.id}]),onClick:d=>i(l.id)},nt(l.label),11,g_))),128))])):ft("",!0),F("div",b_,[r.value==="prompt"?(ie(),zt(d0,{key:0})):r.value==="createSession"?(ie(),zt(f_,{key:1})):r.value==="fanout"?(ie(),zt(q0,{key:2})):ft("",!0)])],64))]))}},__=Yt(m_,[["__scopeId","data-v-0e3eedf4"]]),y_={class:"app-shell"},v_={class:"app-body"},E_={class:"main-pane"},w_={class:"side-pane"},x_={__name:"Shell",setup(e){return kr(async()=>{try{await Ku()}catch(t){console.warn("[Shell] initial connect failed:",t)}jp(),vg()}),Qs(async()=>{Zu(),Wu(),Fp(),await ma()}),(t,n)=>(ie(),be("div",y_,[kt($p),F("div",v_,[F("main",E_,[kt(fb)]),F("aside",w_,[kt(__)])]),Kt(Gt).showSettings?(ie(),zt(hg,{key:0,onClose:n[0]||(n[0]=s=>Kt(Gt).showSettings=!1)})):ft("",!0)]))}},S_=Yt(x_,[["__scopeId","data-v-4d71c63b"]]),A_={__name:"App",setup(e){return(t,n)=>(ie(),zt(S_))}};np(A_).mount("#app");</script>
103
+ <style rel="stylesheet" crossorigin>:root{--bg-deep: #0a0a10;--bg-primary: #0d0d14;--bg-secondary: #14141f;--bg-tertiary: #1a1a28;--bg-elevated: #202030;--bg-hover: #252535;--text-primary: #e8e8f0;--text-secondary: #9090a8;--text-muted: #606078;--text-dim: #404050;--accent-primary: #667eea;--accent-secondary: #764ba2;--accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);--accent-glow: rgba(102, 126, 234, .15);--accent-glow-strong: rgba(102, 126, 234, .3);--success: #4ade80;--success-dim: rgba(74, 222, 128, .15);--warning: #fbbf24;--warning-dim: rgba(251, 191, 36, .15);--error: #f87171;--error-dim: rgba(248, 113, 113, .15);--info: #60a5fa;--info-dim: rgba(96, 165, 250, .15);--memory-fact: #818cf8;--memory-preference: #a78bfa;--memory-note: #67e8f9;--memory-episode: #fcd34d;--memory-project: #f472b6;--event-memory: #a78bfa;--event-thought: #34d399;--event-governor: #fbbf24;--event-system: #60a5fa;--event-chat: #818cf8;--tag-red: #ef4444;--tag-orange: #f97316;--tag-yellow: #eab308;--tag-green: #22c55e;--tag-teal: #14b8a6;--tag-blue: #3b82f6;--tag-violet: #8b5cf6;--tag-pink: #ec4899;--tag-gray: #6b7280;--tag-lavender: #a78bfa;--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;--text-xs: .75rem;--text-sm: .8125rem;--text-base: .9375rem;--text-lg: 1.0625rem;--text-xl: 1.25rem;--text-2xl: 1.5rem;--leading-tight: 1.3;--leading-normal: 1.5;--leading-relaxed: 1.7;--space-xs: .25rem;--space-sm: .5rem;--space-md: .75rem;--space-lg: 1rem;--space-xl: 1.5rem;--space-2xl: 2rem;--sidebar-width: 320px;--sidebar-collapsed: 48px;--topbar-height: 56px;--panel-gap: 12px;--border-radius: 8px;--border-radius-sm: 4px;--border-radius-lg: 12px;--border-subtle: 1px solid rgba(255, 255, 255, .06);--border-light: 1px solid rgba(255, 255, 255, .1);--border-accent: 1px solid var(--accent-primary);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);--shadow-md: 0 4px 12px rgba(0, 0, 0, .4);--shadow-lg: 0 8px 24px rgba(0, 0, 0, .5);--shadow-glow: 0 0 20px var(--accent-glow);--transition-fast: .1s ease;--transition-normal: .15s ease;--transition-slow: .25s ease;--z-base: 0;--z-elevated: 10;--z-dropdown: 100;--z-modal: 1000;--z-toast: 2000}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html{font-size:16px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}body{font-family:var(--font-sans);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--text-primary);background:var(--bg-deep);min-height:100vh;overflow:hidden}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:var(--leading-tight);color:var(--text-primary)}h1{font-size:var(--text-2xl)}h2{font-size:var(--text-xl)}h3{font-size:var(--text-lg)}p{color:var(--text-secondary)}a{color:var(--accent-primary);text-decoration:none;transition:color var(--transition-fast)}a:hover{color:var(--accent-secondary)}code,pre,.mono{font-family:var(--font-mono)}code{font-size:.9em;padding:.125em .375em;background:var(--bg-tertiary);border-radius:var(--border-radius-sm);color:var(--accent-primary)}pre{padding:var(--space-lg);background:var(--bg-secondary);border-radius:var(--border-radius);overflow-x:auto;font-size:var(--text-sm);line-height:var(--leading-relaxed)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--bg-elevated);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--bg-hover)}*{scrollbar-width:thin;scrollbar-color:var(--bg-elevated) transparent}::selection{background:var(--accent-glow-strong);color:var(--text-primary)}:focus-visible{outline:2px solid var(--accent-primary);outline-offset:2px}button{font-family:inherit;font-size:inherit;color:inherit;background:none;border:none;cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}input,textarea,select{font-family:inherit;font-size:inherit;color:inherit;background:var(--bg-secondary);border:var(--border-subtle);border-radius:var(--border-radius);padding:var(--space-sm) var(--space-md);transition:border-color var(--transition-fast),box-shadow var(--transition-fast)}input:focus,textarea:focus,select:focus{outline:none;border-color:var(--accent-primary);box-shadow:0 0 0 3px var(--accent-glow)}textarea{resize:vertical;min-height:80px}.text-muted{color:var(--text-muted)}.text-dim{color:var(--text-dim)}.text-accent{color:var(--accent-primary)}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.text-error{color:var(--error)}.bg-elevated{background:var(--bg-elevated)}.bg-secondary{background:var(--bg-secondary)}.mono{font-family:var(--font-mono)}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-fade-in{animation:fadeIn var(--transition-normal) ease}.animate-slide-up{animation:slideUp var(--transition-slow) ease}.animate-pulse{animation:pulse 2s infinite}.markdown-content{line-height:var(--leading-normal);white-space:normal!important}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{font-weight:600;color:var(--text-primary);margin:var(--space-md) 0 var(--space-sm) 0;line-height:var(--leading-tight)}.markdown-content h1{font-size:var(--text-lg);padding-bottom:var(--space-xs);border-bottom:1px solid rgba(255,255,255,.08)}.markdown-content h2,.markdown-content h3{font-size:var(--text-base);color:var(--text-secondary)}.markdown-content h4,.markdown-content h5,.markdown-content h6{font-size:var(--text-sm);color:var(--text-muted)}.markdown-content h1:first-child,.markdown-content h2:first-child,.markdown-content h3:first-child,.markdown-content h4:first-child,.markdown-content h5:first-child,.markdown-content h6:first-child{margin-top:0}.markdown-content p{margin:0;color:var(--text-primary)}.markdown-content p+p{margin-top:var(--space-sm)}.markdown-content p+.md-code-block,.markdown-content .md-code-block+p{margin-top:var(--space-sm)}.markdown-content a{color:var(--accent-primary);text-decoration:none;border-bottom:1px solid transparent;transition:border-color var(--transition-fast)}.markdown-content a:hover{border-bottom-color:var(--accent-primary)}.markdown-content strong{font-weight:600;color:var(--text-primary)}.markdown-content em{font-style:italic;color:var(--text-secondary)}.markdown-content s,.markdown-content del{text-decoration:line-through;color:var(--text-muted)}.markdown-content code:not(.hljs){font-family:var(--font-mono);font-size:.875em;padding:.15em .4em;background:var(--bg-tertiary);border-radius:var(--border-radius-sm);color:var(--accent-primary)}.markdown-content .md-code-block{margin:var(--space-sm) 0;border-radius:var(--border-radius);overflow:hidden;background:var(--bg-deep);border:1px solid rgba(255,255,255,.06)}.markdown-content .md-code-block:first-child{margin-top:0}.markdown-content .md-code-block:last-child{margin-bottom:0}.markdown-content .md-code-header{display:flex;align-items:center;justify-content:space-between;padding:var(--space-xs) var(--space-md);background:var(--bg-tertiary);border-bottom:1px solid rgba(255,255,255,.06)}.markdown-content .md-code-lang{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}.markdown-content .md-code-copy{font-family:var(--font-mono);font-size:var(--text-xs);padding:2px 8px;background:transparent;border:1px solid rgba(255,255,255,.1);border-radius:var(--border-radius-sm);color:var(--text-muted);cursor:pointer;transition:all var(--transition-fast)}.markdown-content .md-code-copy:hover{background:var(--bg-hover);color:var(--text-secondary);border-color:#fff3}.markdown-content .md-code-copy.copied{background:var(--success-dim);color:var(--success);border-color:var(--success)}.markdown-content .md-code-block pre{margin:0;padding:var(--space-sm) var(--space-md);overflow-x:auto;background:transparent;border-radius:0;white-space:pre}.markdown-content .md-code-block code{font-family:var(--font-mono);font-size:var(--text-sm);line-height:var(--leading-relaxed);background:transparent;padding:0;color:var(--text-primary)}.markdown-content ul,.markdown-content ol{margin:var(--space-sm) 0;padding-left:var(--space-xl)}.markdown-content ul:first-child,.markdown-content ol:first-child{margin-top:0}.markdown-content ul:last-child,.markdown-content ol:last-child{margin-bottom:0}.markdown-content li{margin:var(--space-xs) 0;color:var(--text-primary)}.markdown-content ul{list-style-type:disc}.markdown-content ul ul{list-style-type:circle}.markdown-content ul ul ul{list-style-type:square}.markdown-content ol{list-style-type:decimal}.markdown-content li>ul,.markdown-content li>ol{margin:0;margin-top:var(--space-xs)}.markdown-content blockquote{margin:var(--space-sm) 0;padding:var(--space-sm) var(--space-md);border-left:3px solid var(--accent-primary);background:#667eea0d;color:var(--text-secondary)}.markdown-content blockquote:first-child{margin-top:0}.markdown-content blockquote:last-child{margin-bottom:0}.markdown-content blockquote p{margin:0;color:inherit}.markdown-content hr{margin:var(--space-lg) 0;border:none;height:1px;background:linear-gradient(90deg,transparent,rgba(255,255,255,.1) 20%,rgba(255,255,255,.1) 80%,transparent)}.markdown-content table{width:100%;margin:var(--space-md) 0;border-collapse:collapse;font-size:var(--text-sm)}.markdown-content th,.markdown-content td{padding:var(--space-sm) var(--space-md);text-align:left;border-bottom:1px solid rgba(255,255,255,.06)}.markdown-content th{font-weight:600;color:var(--text-secondary);background:var(--bg-tertiary);text-transform:uppercase;font-size:var(--text-xs);letter-spacing:.05em}.markdown-content td{color:var(--text-primary)}.markdown-content tr:hover td{background:#ffffff05}.markdown-content table thead th:first-child{border-top-left-radius:var(--border-radius-sm)}.markdown-content table thead th:last-child{border-top-right-radius:var(--border-radius-sm)}.hljs{color:var(--text-primary);background:transparent}.hljs-comment,.hljs-quote{color:var(--text-dim);font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-addition{color:#818cf8}.hljs-string,.hljs-doctag,.hljs-regexp{color:var(--success)}.hljs-number,.hljs-literal,.hljs-bullet{color:var(--warning)}.hljs-title,.hljs-section,.hljs-name{color:var(--accent-secondary)}.hljs-variable,.hljs-template-variable,.hljs-attribute,.hljs-params{color:var(--info)}.hljs-type,.hljs-class .hljs-title,.hljs-built_in{color:var(--memory-fact)}.hljs-tag{color:var(--memory-note)}.hljs-attr{color:var(--memory-preference)}.hljs-symbol,.hljs-meta,.hljs-selector-id,.hljs-selector-class{color:var(--text-secondary)}.hljs-deletion{color:var(--error);background:var(--error-dim)}.hljs-addition{background:var(--success-dim)}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{color:var(--accent-primary);text-decoration:underline}.hljs-punctuation,.hljs-operator{color:var(--text-secondary)}.hljs-property{color:var(--info)}.hljs-constant{color:var(--warning)}.hljs-template-tag,.hljs-subst{color:var(--text-primary)}.status-indicator[data-v-a1e6c04d]{display:inline-flex;align-items:center;gap:var(--space-sm);padding:var(--space-xs) var(--space-md);border-radius:999px;background:var(--bg-secondary);border:var(--border-subtle);font-size:var(--text-xs);color:var(--text-secondary);font-family:var(--font-mono);max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-dot[data-v-a1e6c04d]{width:8px;height:8px;border-radius:50%;background:var(--text-dim);flex-shrink:0}.status-indicator.online .status-dot[data-v-a1e6c04d]{background:var(--success);box-shadow:0 0 8px var(--success)}.status-indicator.online[data-v-a1e6c04d]{color:var(--text-primary);border-color:#4ade8040}.status-indicator.checking .status-dot[data-v-a1e6c04d]{background:var(--warning);animation:pulse 1.2s ease-in-out infinite}.status-indicator.checking[data-v-a1e6c04d]{color:var(--warning)}.status-indicator.offline .status-dot[data-v-a1e6c04d]{background:var(--error)}.status-indicator.offline[data-v-a1e6c04d]{color:var(--error)}.status-label[data-v-a1e6c04d]{overflow:hidden;text-overflow:ellipsis}.topbar[data-v-65b4156b]{display:flex;align-items:center;justify-content:space-between;height:var(--topbar-height);padding:0 var(--space-lg);background:var(--bg-primary);border-bottom:var(--border-subtle);flex-shrink:0}.topbar-left[data-v-65b4156b],.topbar-right[data-v-65b4156b]{display:flex;align-items:center;gap:var(--space-md);flex-shrink:0}.topbar-center[data-v-65b4156b]{flex:1;display:flex;justify-content:center;min-width:0}.brand[data-v-65b4156b]{display:flex;align-items:center;gap:var(--space-md)}.brand-mark[data-v-65b4156b]{width:32px;height:32px;border-radius:var(--border-radius);background:var(--accent-gradient);display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:var(--shadow-sm),0 0 12px var(--accent-glow)}.brand-mark svg[data-v-65b4156b]{width:18px;height:18px}.brand-text[data-v-65b4156b]{display:flex;flex-direction:column;line-height:1.2}.brand-name[data-v-65b4156b]{font-size:var(--text-sm);font-weight:600;background:var(--accent-gradient);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;letter-spacing:.01em}.brand-sub[data-v-65b4156b]{font-size:var(--text-xs);color:var(--text-muted);font-family:var(--font-mono)}.icon-btn[data-v-65b4156b]{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:var(--border-radius);color:var(--text-muted);transition:all var(--transition-fast)}.icon-btn[data-v-65b4156b]:hover{background:var(--bg-hover);color:var(--text-primary)}.icon-btn svg[data-v-65b4156b]{width:18px;height:18px}.modal-backdrop[data-v-d4a0fa2a]{position:fixed;inset:0;background:#0009;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-xl);animation:fadeIn-d4a0fa2a var(--transition-normal) ease}.modal[data-v-d4a0fa2a]{background:var(--bg-primary);border:var(--border-light);border-radius:var(--border-radius-lg);box-shadow:var(--shadow-lg);width:100%;max-height:calc(100vh - 4rem);display:flex;flex-direction:column;animation:slideUp-d4a0fa2a var(--transition-slow) ease;overflow:hidden}.modal-header[data-v-d4a0fa2a]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-md) var(--space-lg);border-bottom:var(--border-subtle);background:var(--bg-secondary)}.modal-title[data-v-d4a0fa2a]{font-size:var(--text-base);font-weight:600;color:var(--text-primary)}.modal-close[data-v-d4a0fa2a]{font-size:24px;line-height:1;color:var(--text-muted);width:32px;height:32px;border-radius:var(--border-radius-sm);display:flex;align-items:center;justify-content:center;transition:all var(--transition-fast)}.modal-close[data-v-d4a0fa2a]:hover{background:var(--bg-hover);color:var(--text-primary)}.modal-body[data-v-d4a0fa2a]{padding:var(--space-lg);overflow-y:auto;flex:1}.modal-footer[data-v-d4a0fa2a]{padding:var(--space-md) var(--space-lg);border-top:var(--border-subtle);background:var(--bg-secondary);display:flex;justify-content:flex-end;gap:var(--space-sm)}@keyframes fadeIn-d4a0fa2a{0%{opacity:0}to{opacity:1}}@keyframes slideUp-d4a0fa2a{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.btn[data-v-948153e8]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-xs);border-radius:var(--border-radius);font-family:inherit;font-weight:500;white-space:nowrap;-webkit-user-select:none;user-select:none;cursor:pointer;transition:all var(--transition-fast);border:1px solid transparent;line-height:1}.btn-sm[data-v-948153e8]{padding:5px 10px;font-size:var(--text-xs)}.btn-md[data-v-948153e8]{padding:8px 14px;font-size:var(--text-sm)}.btn-lg[data-v-948153e8]{padding:11px 20px;font-size:var(--text-base)}.btn-icon[data-v-948153e8]{padding:6px}.btn-icon.btn-sm[data-v-948153e8]{padding:4px}.btn-icon.btn-lg[data-v-948153e8]{padding:10px}.btn-primary[data-v-948153e8]{background:var(--accent-gradient);color:#fff;box-shadow:var(--shadow-sm)}.btn-primary[data-v-948153e8]:hover:not(:disabled){transform:translateY(-1px);box-shadow:var(--shadow-md),var(--shadow-glow)}.btn-ghost[data-v-948153e8]{background:transparent;color:var(--text-secondary);border-color:#ffffff1a}.btn-ghost[data-v-948153e8]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-primary);border-color:#ffffff2e}.btn-subtle[data-v-948153e8]{background:var(--bg-secondary);color:var(--text-secondary);border-color:#ffffff0f}.btn-subtle[data-v-948153e8]:hover:not(:disabled){background:var(--bg-tertiary);color:var(--text-primary)}.btn-danger[data-v-948153e8]{background:var(--error-dim);color:var(--error);border-color:#f871714d}.btn-danger[data-v-948153e8]:hover:not(:disabled){background:#f8717140;border-color:var(--error)}.btn[data-v-948153e8]:disabled,.btn.is-loading[data-v-948153e8]{opacity:.6;cursor:not-allowed;transform:none!important;box-shadow:none!important}.btn-spinner[data-v-948153e8]{width:12px;height:12px;border:2px solid rgba(255,255,255,.3);border-top-color:currentColor;border-radius:50%;animation:spin-948153e8 .8s linear infinite}@keyframes spin-948153e8{to{transform:rotate(360deg)}}.settings-form[data-v-3daeb809]{display:flex;flex-direction:column;gap:var(--space-lg)}.field[data-v-3daeb809]{display:flex;flex-direction:column;gap:var(--space-xs)}.field-label[data-v-3daeb809]{font-size:var(--text-xs);font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.06em}.field input[data-v-3daeb809]{font-family:var(--font-mono);font-size:var(--text-sm)}.field-hint[data-v-3daeb809]{font-size:var(--text-xs);color:var(--text-muted);line-height:var(--leading-normal)}.field-hint code[data-v-3daeb809]{background:var(--bg-tertiary);padding:1px 4px;border-radius:var(--border-radius-sm)}.settings-error[data-v-3daeb809]{padding:var(--space-sm) var(--space-md);background:var(--error-dim);border:1px solid rgba(248,113,113,.3);border-radius:var(--border-radius);color:var(--error);font-size:var(--text-sm)}.badge[data-v-d82aaeca]{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-mono);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;padding:3px 8px;border-radius:999px;color:var(--badge-fg);background:color-mix(in srgb,var(--badge-fg) 12%,transparent);border:1px solid color-mix(in srgb,var(--badge-fg) 35%,transparent)}.badge-dot[data-v-d82aaeca]{width:5px;height:5px;border-radius:50%;background:var(--badge-fg);box-shadow:0 0 6px var(--badge-fg)}.status-dot[data-v-bcf2ff51]{width:8px;height:8px;border-radius:50%;background:var(--success);box-shadow:0 0 8px var(--success);flex-shrink:0}.status-dot.busy[data-v-bcf2ff51]{background:var(--warning);box-shadow:0 0 8px var(--warning);animation:pulse 1.5s ease-in-out infinite}.stop-wrap[data-v-f91ab885]{display:flex;align-items:center;gap:var(--space-sm)}.stop-error[data-v-f91ab885]{font-size:10px;color:var(--error);font-family:var(--font-mono)}.agent-card[data-v-16dd6554]{position:relative;display:flex;flex-direction:column;background:var(--bg-secondary);border:var(--border-subtle);border-radius:var(--border-radius);padding:var(--space-md);gap:var(--space-sm);transition:all var(--transition-fast);overflow:hidden}.agent-card.clickable[data-v-16dd6554]{cursor:pointer}.agent-card.clickable[data-v-16dd6554]:hover{transform:translateY(-2px);border-color:#667eea66;background:var(--bg-tertiary);box-shadow:var(--shadow-md)}.agent-card.selected[data-v-16dd6554]{border-color:var(--accent-primary);background:var(--bg-tertiary);box-shadow:0 0 0 1px var(--accent-primary),0 0 18px var(--accent-glow)}.agent-card.is-intake[data-v-16dd6554]{background:linear-gradient(180deg,var(--bg-secondary) 0%,rgba(167,139,250,.05) 100%);border-color:#a78bfa2e}.agent-card.is-intake.clickable[data-v-16dd6554]:hover{border-color:#a78bfa80}.agent-card.is-intake.selected[data-v-16dd6554]{border-color:var(--memory-preference);box-shadow:0 0 0 1px var(--memory-preference),0 0 18px #a78bfa40}.card-header[data-v-16dd6554]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm)}.card-body[data-v-16dd6554]{display:flex;flex-direction:column;gap:var(--space-xs);min-width:0}.card-title[data-v-16dd6554]{font-size:var(--text-base);font-weight:600;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-owner[data-v-16dd6554]{display:flex;align-items:center;gap:4px;font-size:var(--text-xs);color:var(--text-secondary);margin:0}.dim[data-v-16dd6554]{color:var(--text-dim);text-transform:uppercase;font-size:9px;letter-spacing:.08em}.mono[data-v-16dd6554]{font-family:var(--font-mono)}.card-cwd[data-v-16dd6554],.card-secondary[data-v-16dd6554]{font-size:var(--text-xs);color:var(--text-muted);margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-subject[data-v-16dd6554]{font-size:11px;color:var(--text-dim);margin:2px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-subject .dim[data-v-16dd6554]{text-transform:none;font-size:inherit;letter-spacing:0;margin-right:4px;color:var(--accent-primary);opacity:.6}.card-stats[data-v-16dd6554]{display:flex;flex-direction:column;gap:4px;margin:var(--space-xs) 0 0;font-size:var(--text-xs)}.stat[data-v-16dd6554]{display:flex;align-items:center;gap:var(--space-sm)}.stat dt[data-v-16dd6554]{width:60px;text-transform:uppercase;font-size:9px;letter-spacing:.08em;color:var(--text-dim)}.stat dd[data-v-16dd6554]{flex:1;display:flex;align-items:center;gap:var(--space-sm);color:var(--text-secondary);margin:0;min-width:0}.lifetime-bar[data-v-16dd6554]{flex:1;height:4px;background:var(--bg-elevated);border-radius:2px;overflow:hidden;max-width:80px}.lifetime-fill[data-v-16dd6554]{display:block;height:100%;background:var(--accent-gradient);transition:width var(--transition-normal)}.card-footer[data-v-16dd6554]{display:flex;justify-content:flex-end;margin-top:auto;padding-top:var(--space-xs);border-top:var(--border-subtle)}.group[data-v-0a88ef69]{display:flex;flex-direction:column;gap:var(--space-md)}.group-header[data-v-0a88ef69]{display:flex;align-items:baseline;gap:var(--space-sm);padding-bottom:var(--space-xs);border-bottom:var(--border-subtle)}.group-title[data-v-0a88ef69]{font-size:var(--text-sm);font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.08em}.group-count[data-v-0a88ef69]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--text-muted);background:var(--bg-secondary);border:var(--border-subtle);padding:1px 8px;border-radius:999px}.group-grid[data-v-0a88ef69]{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:var(--space-md)}.empty-state[data-v-4019dff3]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--space-2xl) var(--space-lg);color:var(--text-muted);text-align:center;gap:var(--space-sm);min-height:200px}.empty-icon[data-v-4019dff3]{width:56px;height:56px;display:flex;align-items:center;justify-content:center;background:var(--bg-secondary);border:var(--border-subtle);border-radius:50%;color:var(--text-dim);margin-bottom:var(--space-xs)}.empty-icon svg[data-v-4019dff3]{width:24px;height:24px}.empty-title[data-v-4019dff3]{font-size:var(--text-base);font-weight:600;color:var(--text-secondary)}.empty-message[data-v-4019dff3]{font-size:var(--text-sm);color:var(--text-muted);max-width:320px}.empty-actions[data-v-4019dff3]{margin-top:var(--space-md);display:flex;gap:var(--space-sm)}.grid-pane[data-v-14836f6a]{display:flex;flex-direction:column;height:100%;overflow:hidden}.grid-header[data-v-14836f6a]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-lg) var(--space-xl) var(--space-md);border-bottom:var(--border-subtle)}.grid-title[data-v-14836f6a]{font-size:var(--text-xl);font-weight:600;color:var(--text-primary);margin:0}.grid-sub[data-v-14836f6a]{font-size:var(--text-sm);color:var(--text-muted);margin:4px 0 0}.dim[data-v-14836f6a]{color:var(--text-dim);font-size:var(--text-xs)}.mono[data-v-14836f6a]{font-family:var(--font-mono)}.grid-body[data-v-14836f6a]{flex:1;overflow-y:auto;padding:var(--space-lg) var(--space-xl)}.groups[data-v-14836f6a]{display:flex;flex-direction:column;gap:var(--space-2xl)}.bubble[data-v-4cb8ee44]{max-width:92%;padding:var(--space-md) var(--space-lg);border-radius:var(--border-radius-lg);position:relative;display:flex;flex-direction:column;gap:var(--space-xs);animation:slideUp-4cb8ee44 var(--transition-slow) ease}.bubble.user[data-v-4cb8ee44]{align-self:flex-end;background:var(--accent-primary);color:#fff;border-bottom-right-radius:var(--border-radius-sm);max-width:80%}.bubble.agent[data-v-4cb8ee44]{align-self:flex-start;background:var(--bg-secondary);border:var(--border-subtle);border-bottom-left-radius:var(--border-radius-sm)}.bubble.system[data-v-4cb8ee44]{align-self:center;background:var(--bg-tertiary);border:1px solid rgba(255,255,255,.08);font-family:var(--font-mono);font-size:var(--text-xs);color:var(--text-muted);max-width:90%;text-align:center}.bubble.errored[data-v-4cb8ee44]{border-color:var(--error);background:var(--error-dim)}.bubble-header[data-v-4cb8ee44]{display:flex;align-items:center;gap:var(--space-sm);font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim);font-family:var(--font-mono)}.bubble-role[data-v-4cb8ee44]{font-weight:600}.bubble-time[data-v-4cb8ee44]{margin-left:auto;font-size:10px;color:var(--text-dim)}.bubble-thinking[data-v-4cb8ee44]{display:inline-flex;gap:3px;align-items:center}.bubble-thinking span[data-v-4cb8ee44]{width:5px;height:5px;border-radius:50%;background:var(--accent-primary);animation:thinkpulse-4cb8ee44 1.4s ease-in-out infinite}.bubble-thinking span[data-v-4cb8ee44]:nth-child(2){animation-delay:.15s}.bubble-thinking span[data-v-4cb8ee44]:nth-child(3){animation-delay:.3s}@keyframes thinkpulse-4cb8ee44{0%,80%,to{opacity:.3;transform:scale(.7)}40%{opacity:1;transform:scale(1)}}.bubble-content[data-v-4cb8ee44]{font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--text-primary);word-wrap:break-word}.bubble.user .bubble-content[data-v-4cb8ee44]{color:#fff}.cursor[data-v-4cb8ee44]{display:inline-block;margin-left:1px;color:var(--accent-primary);animation:blink-4cb8ee44 .8s infinite;font-weight:600}@keyframes blink-4cb8ee44{0%,50%{opacity:1}51%,to{opacity:0}}.bubble-footer[data-v-4cb8ee44]{display:flex;justify-content:flex-end;margin-top:2px}.bubble.user .bubble-time[data-v-4cb8ee44]{color:#ffffffb3}.bubble-error[data-v-4cb8ee44]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--error);border-top:1px solid rgba(248,113,113,.3);padding-top:var(--space-xs)}.mono[data-v-4cb8ee44]{font-family:var(--font-mono)}@keyframes slideUp-4cb8ee44{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.message-list[data-v-a9226756]{flex:1;overflow-y:auto;padding:var(--space-lg);background:var(--bg-deep)}.message-stack[data-v-a9226756]{display:flex;flex-direction:column;gap:var(--space-md);min-height:100%}.input-area[data-v-2010aa45]{display:flex;align-items:flex-end;gap:var(--space-sm);padding:var(--space-md);background:var(--bg-secondary);border-top:var(--border-subtle)}.input-textarea[data-v-2010aa45]{flex:1;min-height:38px;max-height:200px;padding:var(--space-sm) var(--space-md);background:var(--bg-primary);border:var(--border-subtle);border-radius:var(--border-radius);font-family:inherit;font-size:var(--text-sm);color:var(--text-primary);resize:none;line-height:var(--leading-normal);overflow-y:auto;transition:border-color var(--transition-fast),box-shadow var(--transition-fast)}.input-textarea[data-v-2010aa45]:focus{outline:none;border-color:var(--accent-primary);box-shadow:0 0 0 3px var(--accent-glow)}.input-textarea[data-v-2010aa45]:disabled{opacity:.6;cursor:not-allowed}.input-area.disabled[data-v-2010aa45]{opacity:.7}.prompt-panel[data-v-6466169a]{display:flex;flex-direction:column;height:100%;overflow:hidden}.panel-header[data-v-6466169a]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-md);padding:var(--space-md) var(--space-lg);background:var(--bg-secondary);border-bottom:var(--border-subtle);flex-shrink:0}.header-left[data-v-6466169a]{display:flex;align-items:center;gap:var(--space-md);min-width:0;flex:1}.header-titles[data-v-6466169a]{display:flex;flex-direction:column;min-width:0}.header-title[data-v-6466169a]{font-size:var(--text-base);font-weight:600;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header-subject[data-v-6466169a]{font-size:var(--text-xs);color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mono[data-v-6466169a]{font-family:var(--font-mono)}.header-right[data-v-6466169a]{display:flex;gap:var(--space-xs);flex-shrink:0}.header-action[data-v-6466169a]{padding:4px 10px;font-size:var(--text-xs);color:var(--text-muted);background:transparent;border:1px solid rgba(255,255,255,.1);border-radius:var(--border-radius-sm);transition:all var(--transition-fast)}.header-action[data-v-6466169a]:hover{background:var(--bg-hover);color:var(--text-primary);border-color:#ffffff2e}.run-card[data-v-e4d0818e]{display:flex;flex-direction:column;gap:var(--space-sm);background:var(--bg-secondary);border:var(--border-subtle);border-radius:var(--border-radius);overflow:hidden;transition:all var(--transition-fast)}.run-card.status-running[data-v-e4d0818e]{border-color:#667eea66;box-shadow:0 0 0 1px var(--accent-primary),0 0 16px var(--accent-glow)}.run-card.status-done[data-v-e4d0818e]{border-color:#4ade8040}.run-card.status-error[data-v-e4d0818e]{border-color:#f8717159}.run-header[data-v-e4d0818e]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-md);padding:var(--space-sm) var(--space-md);background:var(--bg-tertiary);border-bottom:var(--border-subtle);flex-shrink:0}.run-cwd-wrap[data-v-e4d0818e]{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.run-status[data-v-e4d0818e]{display:flex;align-items:center;gap:6px;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:var(--text-dim);font-family:var(--font-mono)}.status-dot[data-v-e4d0818e]{width:6px;height:6px;border-radius:50%}.dot-pending[data-v-e4d0818e]{background:var(--text-dim)}.dot-running[data-v-e4d0818e]{background:var(--accent-primary);box-shadow:0 0 6px var(--accent-primary);animation:pulse 1.4s ease-in-out infinite}.dot-done[data-v-e4d0818e]{background:var(--success);box-shadow:0 0 6px var(--success)}.dot-error[data-v-e4d0818e]{background:var(--error);box-shadow:0 0 6px var(--error)}.status-text[data-v-e4d0818e]{color:var(--text-secondary)}.run-cwd[data-v-e4d0818e]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.abort-btn[data-v-e4d0818e]{font-family:var(--font-mono);font-size:10px;padding:3px 8px;background:var(--error-dim);color:var(--error);border:1px solid rgba(248,113,113,.3);border-radius:var(--border-radius-sm);transition:all var(--transition-fast)}.abort-btn[data-v-e4d0818e]:hover{background:#f8717133;border-color:var(--error)}.run-error[data-v-e4d0818e]{margin:0 var(--space-md);padding:var(--space-xs) var(--space-sm);background:var(--error-dim);border-left:3px solid var(--error);color:var(--error);font-size:var(--text-xs);white-space:pre-wrap}.run-body[data-v-e4d0818e]{padding:var(--space-md);max-height:360px;overflow-y:auto;font-size:var(--text-sm);color:var(--text-primary)}.run-pending[data-v-e4d0818e]{padding:var(--space-md);font-size:var(--text-xs);color:var(--text-dim);font-style:italic}.mono[data-v-e4d0818e]{font-family:var(--font-mono)}.fanout-pane[data-v-24e0e991]{display:flex;flex-direction:column;height:100%;overflow-y:auto}.pane-header[data-v-24e0e991]{padding:var(--space-lg) var(--space-lg) var(--space-md);border-bottom:var(--border-subtle)}.pane-header h2[data-v-24e0e991]{font-size:var(--text-base);font-weight:600;color:var(--text-primary)}.pane-header p[data-v-24e0e991]{font-size:var(--text-xs);color:var(--text-muted);margin-top:var(--space-xs);line-height:var(--leading-normal)}.pane-header code[data-v-24e0e991]{font-size:.9em;background:var(--bg-tertiary);padding:1px 4px;border-radius:var(--border-radius-sm)}.pane-body[data-v-24e0e991]{padding:var(--space-lg)}.form[data-v-24e0e991]{display:flex;flex-direction:column;gap:var(--space-md);padding:var(--space-lg);border-bottom:var(--border-subtle)}.field[data-v-24e0e991]{display:flex;flex-direction:column;gap:var(--space-xs)}.field-label[data-v-24e0e991]{font-size:10px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.08em}.field textarea[data-v-24e0e991]{resize:vertical;min-height:70px}.cwd-list[data-v-24e0e991]{display:flex;flex-direction:column;gap:var(--space-sm)}.cwd-row[data-v-24e0e991]{display:flex;align-items:center;gap:var(--space-sm)}.cwd-row input[data-v-24e0e991]{flex:1;font-family:var(--font-mono);font-size:var(--text-sm)}.cwd-remove[data-v-24e0e991]{width:28px;height:28px;border-radius:var(--border-radius-sm);color:var(--text-muted);font-size:18px;line-height:1;background:transparent;border:1px solid rgba(255,255,255,.06);transition:all var(--transition-fast)}.cwd-remove[data-v-24e0e991]:hover{background:var(--error-dim);color:var(--error);border-color:var(--error)}.cwd-add[data-v-24e0e991]{align-self:flex-start;font-size:var(--text-xs);color:var(--text-muted);padding:4px 10px;border:1px dashed rgba(255,255,255,.15);border-radius:var(--border-radius-sm);transition:all var(--transition-fast);font-family:var(--font-mono)}.cwd-add[data-v-24e0e991]:hover{color:var(--accent-primary);border-color:var(--accent-primary);background:var(--accent-glow)}.actions[data-v-24e0e991]{display:flex;gap:var(--space-sm);margin-top:var(--space-sm)}.results[data-v-24e0e991]{padding:var(--space-lg);display:flex;flex-direction:column;gap:var(--space-md)}.results-title[data-v-24e0e991]{font-size:var(--text-xs);font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.08em;display:flex;align-items:baseline;gap:var(--space-sm)}.results-grid[data-v-24e0e991]{display:flex;flex-direction:column;gap:var(--space-md)}.dim[data-v-24e0e991]{color:var(--text-dim)}.mono[data-v-24e0e991]{font-family:var(--font-mono)}.create-pane[data-v-c7cc038d]{display:flex;flex-direction:column;height:100%;overflow-y:auto}.pane-header[data-v-c7cc038d]{padding:var(--space-lg) var(--space-lg) var(--space-md);border-bottom:var(--border-subtle)}.pane-header h2[data-v-c7cc038d]{font-size:var(--text-base);font-weight:600;color:var(--text-primary)}.pane-header p[data-v-c7cc038d]{font-size:var(--text-xs);color:var(--text-muted);margin-top:var(--space-xs);line-height:var(--leading-normal)}.pane-header code[data-v-c7cc038d]{font-size:.9em;background:var(--bg-tertiary);padding:1px 4px;border-radius:var(--border-radius-sm)}.pane-body[data-v-c7cc038d]{padding:var(--space-lg)}.form[data-v-c7cc038d]{display:flex;flex-direction:column;gap:var(--space-md);padding:var(--space-lg)}.field[data-v-c7cc038d]{display:flex;flex-direction:column;gap:var(--space-xs)}.field-label[data-v-c7cc038d]{font-size:10px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.08em}.field input[data-v-c7cc038d],.field select[data-v-c7cc038d],.field textarea[data-v-c7cc038d]{font-family:var(--font-mono);font-size:var(--text-sm)}.field textarea[data-v-c7cc038d]{font-family:inherit;resize:vertical;min-height:70px}.field-hint[data-v-c7cc038d]{font-size:var(--text-xs);color:var(--text-muted);line-height:var(--leading-normal);margin:-4px 0 0}.field-hint code[data-v-c7cc038d]{font-size:.9em;background:var(--bg-tertiary);padding:1px 4px;border-radius:var(--border-radius-sm)}.field-hint em[data-v-c7cc038d]{color:var(--text-secondary);font-style:normal}.row[data-v-c7cc038d]{display:flex;gap:var(--space-md)}.flex-1[data-v-c7cc038d]{flex:1}.actions[data-v-c7cc038d]{display:flex;gap:var(--space-sm);margin-top:var(--space-sm)}.error-box[data-v-c7cc038d]{padding:var(--space-sm) var(--space-md);background:var(--error-dim);border:1px solid rgba(248,113,113,.3);border-radius:var(--border-radius);color:var(--error);font-size:var(--text-xs);white-space:pre-wrap}.response[data-v-c7cc038d]{background:var(--bg-deep);border:var(--border-subtle);border-radius:var(--border-radius);overflow:hidden}.response-header[data-v-c7cc038d]{display:flex;align-items:center;gap:var(--space-sm);padding:var(--space-xs) var(--space-md);background:var(--bg-tertiary);border-bottom:var(--border-subtle);font-size:10px}.dim[data-v-c7cc038d]{color:var(--text-dim);text-transform:uppercase;letter-spacing:.08em}.mono[data-v-c7cc038d]{font-family:var(--font-mono);color:var(--text-secondary)}.response-body[data-v-c7cc038d]{margin:0;padding:var(--space-md);font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--text-primary);white-space:pre-wrap;background:transparent;border-radius:0;max-height:320px;overflow-y:auto}.right-panel[data-v-0e3eedf4]{display:flex;flex-direction:column;height:100%;overflow:hidden}.tab-bar[data-v-0e3eedf4]{display:flex;align-items:center;gap:var(--space-xs);padding:var(--space-sm) var(--space-md);background:var(--bg-secondary);border-bottom:var(--border-subtle);flex-shrink:0}.tab[data-v-0e3eedf4]{font-size:var(--text-xs);font-weight:500;text-transform:uppercase;letter-spacing:.06em;padding:6px 12px;border-radius:var(--border-radius-sm);color:var(--text-muted);background:transparent;transition:all var(--transition-fast)}.tab[data-v-0e3eedf4]:hover{color:var(--text-secondary);background:var(--bg-hover)}.tab.active[data-v-0e3eedf4]{color:var(--accent-primary);background:var(--accent-glow);box-shadow:inset 0 0 0 1px #667eea4d}.tab-body[data-v-0e3eedf4]{flex:1;overflow:hidden;display:flex;flex-direction:column}.empty-wrap[data-v-0e3eedf4]{flex:1;display:flex;align-items:center;justify-content:center}.app-shell[data-v-4d71c63b]{display:flex;flex-direction:column;height:100vh;overflow:hidden}.app-body[data-v-4d71c63b]{display:flex;flex:1;overflow:hidden;gap:var(--panel-gap);padding:var(--panel-gap)}.main-pane[data-v-4d71c63b]{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;background:var(--bg-primary);border:var(--border-subtle);border-radius:var(--border-radius);overflow:hidden}.side-pane[data-v-4d71c63b]{flex:0 0 480px;display:flex;flex-direction:column;background:var(--bg-primary);border:var(--border-subtle);border-radius:var(--border-radius);overflow:hidden}@media(max-width:1100px){.side-pane[data-v-4d71c63b]{flex-basis:380px}}</style>
104
+ </head>
105
+ <body>
106
+ <div id="app"></div>
107
+ </body>
108
+ </html>