From 90eda6bacf3ada797e5763449644fe4957c5b137 Mon Sep 17 00:00:00 2001 From: steve Date: Fri, 12 Jun 2026 07:16:55 +0000 Subject: [PATCH] Add a contact detail pane to the Contacts page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Selecting a contact in the list now shows all of its details in a pane to the right, mirroring the Packets screen's inspector. - Contacts tab is a two-pane flex split: the list (toolbar + table) on the left, a "Contact" detail pane on the right; each scrolls independently at full height so the detail stays put while scrolling a long list. - Row click selects (tr.clickable/tr.selected highlight); the delete checkbox uses @click.stop so it doesn't disturb the detail selection. - Detail shows every contact column: name, type, full public key, flags, out path (flood / direct / (N hops)), path hash mode, location, last advert, last modified, first seen, last synced. No new API — the list already returns SELECT *; selection is tracked by pubkey so it survives reloads and resolves to none if the row is deleted. - Rebuild webapi/static assets. Co-Authored-By: Claude Opus 4.8 (1M context) --- web-ui/src/views/Manage.vue | 225 ++++++++++++++++-------- webapi/static/assets/index-BSVA6z0U.js | 37 ---- webapi/static/assets/index-DE4RDvEI.css | 1 + webapi/static/assets/index-DH8osFpl.css | 1 - webapi/static/assets/index-X_PLn7Dl.js | 37 ++++ webapi/static/index.html | 4 +- 6 files changed, 192 insertions(+), 113 deletions(-) delete mode 100644 webapi/static/assets/index-BSVA6z0U.js create mode 100644 webapi/static/assets/index-DE4RDvEI.css delete mode 100644 webapi/static/assets/index-DH8osFpl.css create mode 100644 webapi/static/assets/index-X_PLn7Dl.js diff --git a/web-ui/src/views/Manage.vue b/web-ui/src/views/Manage.vue index a4c919d..d762a93 100644 --- a/web-ui/src/views/Manage.vue +++ b/web-ui/src/views/Manage.vue @@ -462,6 +462,41 @@ const contactKnownTypes = ref(new Set()) // accumulates as rows arrive const contactSort = ref({ col: 'adv_name', dir: 'asc' }) const selectedContacts = ref(new Set()) // public_keys marked for deletion +// ---- contact detail pane (click a row to inspect) ---- +// Track by pubkey (not the row object) so the selection survives a contacts +// reload; detailContact resolves to null if the row is gone (e.g. deleted). +const detailPubkey = ref(null) +const detailContact = computed( + () => (data.value.contacts || []).find((c) => c.public_key === detailPubkey.value) || null, +) +function selectContact(c) { + detailPubkey.value = c.public_key +} +// Ordered [label, value, mono?] rows rendered in the detail pane. +const contactDetailFields = computed(() => { + const c = detailContact.value + if (!c) return [] + let outPath + if (c.out_path_len === -1) outPath = 'flood (no path)' + else if (c.out_path_len === 0) outPath = 'direct (0 hops)' + else if (c.out_path) outPath = `${c.out_path} (${c.out_path_len} hop${c.out_path_len === 1 ? '' : 's'})` + else outPath = `${c.out_path_len ?? '?'} hop(s)` + const loc = c.adv_lat != null && c.adv_lon != null ? `${c.adv_lat}, ${c.adv_lon}` : '—' + return [ + ['name', c.adv_name || '—', false], + ['type', typeLabel(c.type), false], + ['public key', c.public_key, true], + ['flags', c.flags ?? '—', false], + ['out path', outPath, true], + ['path hash mode', c.out_path_hash_mode ?? '—', false], + ['location (lat, lon)', loc, false], + ['last advert', fmtLocalDateTime(c.last_advert) || '—', false], + ['last modified', fmtLocalDateTime(c.lastmod) || '—', false], + ['first seen', fmtLocalDateTime(c.first_seen_at) || '—', false], + ['last synced', fmtLocalDateTime(c.last_synced_at) || '—', false], + ] +}) + const contactTypes = computed(() => [...contactKnownTypes.value].sort()) const contactAllChecked = computed(() => contactExcluded.value.size === 0) const contactTypeChecked = (label) => !contactExcluded.value.has(label) @@ -877,82 +912,108 @@ onMounted(() => loadTab('stats')) -
-
- - -
+ + diff --git a/webapi/static/assets/index-BSVA6z0U.js b/webapi/static/assets/index-BSVA6z0U.js deleted file mode 100644 index f8c8fb4..0000000 --- a/webapi/static/assets/index-BSVA6z0U.js +++ /dev/null @@ -1,37 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();/** -* @vue/shared v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function lo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Se={},nn=[],wt=()=>{},Sl=()=>!1,rs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),is=e=>e.startsWith("onUpdate:"),Ue=Object.assign,ro=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ei=Object.prototype.hasOwnProperty,ye=(e,t)=>ei.call(e,t),Z=Array.isArray,sn=e=>Ln(e)==="[object Map]",fn=e=>Ln(e)==="[object Set]",So=e=>Ln(e)==="[object Date]",le=e=>typeof e=="function",Pe=e=>typeof e=="string",at=e=>typeof e=="symbol",xe=e=>e!==null&&typeof e=="object",El=e=>(xe(e)||le(e))&&le(e.then)&&le(e.catch),Rl=Object.prototype.toString,Ln=e=>Rl.call(e),ti=e=>Ln(e).slice(8,-1),Al=e=>Ln(e)==="[object Object]",cs=e=>Pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,wn=lo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),as=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ni=/-\w/g,Je=as(e=>e.replace(ni,t=>t.slice(1).toUpperCase())),si=/\B([A-Z])/g,Bt=as(e=>e.replace(si,"-$1").toLowerCase()),us=as(e=>e.charAt(0).toUpperCase()+e.slice(1)),Es=as(e=>e?`on${us(e)}`:""),bt=(e,t)=>!Object.is(e,t),Wn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},fs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Eo;const ds=()=>Eo||(Eo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function io(e){if(Z(e)){const t={};for(let n=0;n{if(n){const s=n.split(li);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function rt(e){let t="";if(Pe(e))t=e;else if(Z(e))for(let n=0;nUt(n,t))}const Pl=e=>!!(e&&e.__v_isRef===!0),A=e=>Pe(e)?e:e==null?"":Z(e)||xe(e)&&(e.toString===Rl||!le(e.toString))?Pl(e)?A(e.value):JSON.stringify(e,Il,2):String(e),Il=(e,t)=>Pl(t)?Il(e,t.value):sn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],l)=>(n[Rs(s,l)+" =>"]=o,n),{})}:fn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Rs(n))}:at(t)?Rs(t):xe(t)&&!Z(t)&&!Al(t)?String(t):t,Rs=(e,t="")=>{var n;return at(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let De;class Nl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&De&&(De.active?(this.parent=De,this.index=(De.scopes||(De.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!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;t0&&--this._on===0){if(De===this)De=this.prevScope;else{let t=De;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(Cn){let t=Cn;for(Cn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;xn;){let t=xn;for(xn=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 Vl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ul(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),fo(s),di(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Bs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Fl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Fl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Pn)||(e.globalVersion=Pn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Bs(e))))return;e.flags|=2;const t=e.dep,n=Ee,s=ft;Ee=e,ft=!0;try{Vl(e);const o=e.fn(e._value);(t.version===0||bt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ee=n,ft=s,Ul(e),e.flags&=-3}}function fo(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)fo(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function di(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ft=!0;const Hl=[];function Pt(){Hl.push(ft),ft=!1}function It(){const e=Hl.pop();ft=e===void 0?!0:e}function Ro(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let Pn=0;class hi{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 ho{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(!Ee||!ft||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new hi(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.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=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=s)}return n}trigger(t){this.version++,Pn++,this.notify(t)}notify(t){ao();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{uo()}}}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 Qn=new WeakMap,Jt=Symbol(""),Ks=Symbol(""),In=Symbol("");function Ke(e,t,n){if(ft&&Ee){let s=Qn.get(e);s||Qn.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new ho),o.map=s,o.key=n),o.track()}}function Rt(e,t,n,s,o,l){const r=Qn.get(e);if(!r){Pn++;return}const i=c=>{c&&c.trigger()};if(ao(),t==="clear")r.forEach(i);else{const c=Z(e),d=c&&cs(n);if(c&&n==="length"){const a=Number(s);r.forEach((h,g)=>{(g==="length"||g===In||!at(g)&&g>=a)&&i(h)})}else switch((n!==void 0||r.has(void 0))&&i(r.get(n)),d&&i(r.get(In)),t){case"add":c?d&&i(r.get("length")):(i(r.get(Jt)),sn(e)&&i(r.get(Ks)));break;case"delete":c||(i(r.get(Jt)),sn(e)&&i(r.get(Ks)));break;case"set":sn(e)&&i(r.get(Jt));break}}uo()}function pi(e,t){const n=Qn.get(e);return n&&n.get(t)}function Xt(e){const t=pe(e);return t===e?t:(Ke(t,"iterate",In),tt(e)?t:t.map(dt))}function hs(e){return Ke(e=pe(e),"iterate",In),e}function _t(e,t){return Nt(e)?ln(Tt(e)?dt(t):t):dt(t)}const mi={__proto__:null,[Symbol.iterator](){return Os(this,Symbol.iterator,e=>_t(this,e))},concat(...e){return Xt(this).concat(...e.map(t=>Z(t)?Xt(t):t))},entries(){return Os(this,"entries",e=>(e[1]=_t(this,e[1]),e))},every(e,t){return Ct(this,"every",e,t,void 0,arguments)},filter(e,t){return Ct(this,"filter",e,t,n=>n.map(s=>_t(this,s)),arguments)},find(e,t){return Ct(this,"find",e,t,n=>_t(this,n),arguments)},findIndex(e,t){return Ct(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ct(this,"findLast",e,t,n=>_t(this,n),arguments)},findLastIndex(e,t){return Ct(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ct(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ts(this,"includes",e)},indexOf(...e){return Ts(this,"indexOf",e)},join(e){return Xt(this).join(e)},lastIndexOf(...e){return Ts(this,"lastIndexOf",e)},map(e,t){return Ct(this,"map",e,t,void 0,arguments)},pop(){return vn(this,"pop")},push(...e){return vn(this,"push",e)},reduce(e,...t){return Ao(this,"reduce",e,t)},reduceRight(e,...t){return Ao(this,"reduceRight",e,t)},shift(){return vn(this,"shift")},some(e,t){return Ct(this,"some",e,t,void 0,arguments)},splice(...e){return vn(this,"splice",e)},toReversed(){return Xt(this).toReversed()},toSorted(e){return Xt(this).toSorted(e)},toSpliced(...e){return Xt(this).toSpliced(...e)},unshift(...e){return vn(this,"unshift",e)},values(){return Os(this,"values",e=>_t(this,e))}};function Os(e,t,n){const s=hs(e),o=s[t]();return s!==e&&!tt(e)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.done||(l.value=n(l.value)),l}),o}const vi=Array.prototype;function Ct(e,t,n,s,o,l){const r=hs(e),i=r!==e&&!tt(e),c=r[t];if(c!==vi[t]){const h=c.apply(e,l);return i?dt(h):h}let d=n;r!==e&&(i?d=function(h,g){return n.call(this,_t(e,h),g,e)}:n.length>2&&(d=function(h,g){return n.call(this,h,g,e)}));const a=c.call(r,d,s);return i&&o?o(a):a}function Ao(e,t,n,s){const o=hs(e),l=o!==e&&!tt(e);let r=n,i=!1;o!==e&&(l?(i=s.length===0,r=function(d,a,h){return i&&(i=!1,d=_t(e,d)),n.call(this,d,_t(e,a),h,e)}):n.length>3&&(r=function(d,a,h){return n.call(this,d,a,h,e)}));const c=o[t](r,...s);return i?_t(e,c):c}function Ts(e,t,n){const s=pe(e);Ke(s,"iterate",In);const o=s[t](...n);return(o===-1||o===!1)&&ps(n[0])?(n[0]=pe(n[0]),s[t](...n)):o}function vn(e,t,n=[]){Pt(),ao();const s=pe(e)[t].apply(e,n);return uo(),It(),s}const gi=lo("__proto__,__v_isRef,__isVue"),Kl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(at));function _i(e){at(e)||(e=String(e));const t=pe(this);return Ke(t,"has",e),t.hasOwnProperty(e)}class Gl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return l;if(n==="__v_raw")return s===(o?l?Ai:Jl:l?zl:ql).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=Z(t);if(!o){let c;if(r&&(c=mi[n]))return c;if(n==="hasOwnProperty")return _i}const i=Reflect.get(t,n,Ie(t)?t:s);if((at(n)?Kl.has(n):gi(n))||(o||Ke(t,"get",n),l))return i;if(Ie(i)){const c=r&&cs(n)?i:i.value;return o&&xe(c)?Ws(c):c}return xe(i)?o?Ws(i):jn(i):i}}class Wl extends Gl{constructor(t=!1){super(!1,t)}set(t,n,s,o){let l=t[n];const r=Z(t)&&cs(n);if(!this._isShallow){const d=Nt(l);if(!tt(s)&&!Nt(s)&&(l=pe(l),s=pe(s)),!r&&Ie(l)&&!Ie(s))return d||(l.value=s),!0}const i=r?Number(n)e,Bn=e=>Reflect.getPrototypeOf(e);function Ci(e,t,n){return function(...s){const o=this.__v_raw,l=pe(o),r=sn(l),i=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,d=o[e](...s),a=n?Gs:t?ln:dt;return!t&&Ke(l,"iterate",c?Ks:Jt),Ue(Object.create(d),{next(){const{value:h,done:g}=d.next();return g?{value:h,done:g}:{value:i?[a(h[0]),a(h[1])]:a(h),done:g}}})}}function Kn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ki(e,t){const n={get(o){const l=this.__v_raw,r=pe(l),i=pe(o);e||(bt(o,i)&&Ke(r,"get",o),Ke(r,"get",i));const{has:c}=Bn(r),d=t?Gs:e?ln:dt;if(c.call(r,o))return d(l.get(o));if(c.call(r,i))return d(l.get(i));l!==r&&l.get(o)},get size(){const o=this.__v_raw;return!e&&Ke(pe(o),"iterate",Jt),o.size},has(o){const l=this.__v_raw,r=pe(l),i=pe(o);return e||(bt(o,i)&&Ke(r,"has",o),Ke(r,"has",i)),o===i?l.has(o):l.has(o)||l.has(i)},forEach(o,l){const r=this,i=r.__v_raw,c=pe(i),d=t?Gs:e?ln:dt;return!e&&Ke(c,"iterate",Jt),i.forEach((a,h)=>o.call(l,d(a),d(h),r))}};return Ue(n,e?{add:Kn("add"),set:Kn("set"),delete:Kn("delete"),clear:Kn("clear")}:{add(o){const l=pe(this),r=Bn(l),i=pe(o),c=!t&&!tt(o)&&!Nt(o)?i:o;return r.has.call(l,c)||bt(o,c)&&r.has.call(l,o)||bt(i,c)&&r.has.call(l,i)||(l.add(c),Rt(l,"add",c,c)),this},set(o,l){!t&&!tt(l)&&!Nt(l)&&(l=pe(l));const r=pe(this),{has:i,get:c}=Bn(r);let d=i.call(r,o);d||(o=pe(o),d=i.call(r,o));const a=c.call(r,o);return r.set(o,l),d?bt(l,a)&&Rt(r,"set",o,l):Rt(r,"add",o,l),this},delete(o){const l=pe(this),{has:r,get:i}=Bn(l);let c=r.call(l,o);c||(o=pe(o),c=r.call(l,o)),i&&i.call(l,o);const d=l.delete(o);return c&&Rt(l,"delete",o,void 0),d},clear(){const o=pe(this),l=o.size!==0,r=o.clear();return l&&Rt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Ci(o,e,t)}),n}function po(e,t){const n=ki(e,t);return(s,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(ye(n,o)&&o in s?n:s,o,l)}const Si={get:po(!1,!1)},Ei={get:po(!1,!0)},Ri={get:po(!0,!1)};const ql=new WeakMap,zl=new WeakMap,Jl=new WeakMap,Ai=new WeakMap;function Oi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function jn(e){return Nt(e)?e:mo(e,!1,bi,Si,ql)}function Yl(e){return mo(e,!1,xi,Ei,zl)}function Ws(e){return mo(e,!0,wi,Ri,Jl)}function mo(e,t,n,s,o){if(!xe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=o.get(e);if(l)return l;const r=Oi(ti(e));if(r===0)return e;const i=new Proxy(e,r===2?s:n);return o.set(e,i),i}function Tt(e){return Nt(e)?Tt(e.__v_raw):!!(e&&e.__v_isReactive)}function Nt(e){return!!(e&&e.__v_isReadonly)}function tt(e){return!!(e&&e.__v_isShallow)}function ps(e){return e?!!e.__v_raw:!1}function pe(e){const t=e&&e.__v_raw;return t?pe(t):e}function vo(e){return!ye(e,"__v_skip")&&Object.isExtensible(e)&&Ol(e,"__v_skip",!0),e}const dt=e=>xe(e)?jn(e):e,ln=e=>xe(e)?Ws(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function ne(e){return Ql(e,!1)}function Ti(e){return Ql(e,!0)}function Ql(e,t){return Ie(e)?e:new Pi(e,t)}class Pi{constructor(t,n){this.dep=new ho,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:pe(t),this._value=n?t:dt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||tt(t)||Nt(t);t=s?t:pe(t),bt(t,n)&&(this._rawValue=t,this._value=s?t:dt(t),this.dep.trigger())}}function Vt(e){return Ie(e)?e.value:e}const Ii={get:(e,t,n)=>t==="__v_raw"?e:Vt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ie(o)&&!Ie(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Xl(e){return Tt(e)?e:new Proxy(e,Ii)}function Ni(e){const t=Z(e)?new Array(e.length):{};for(const n in e)t[n]=Mi(e,n);return t}class $i{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=at(n)?n:String(n),this._raw=pe(t);let o=!0,l=t;if(!Z(t)||at(this._key)||!cs(this._key))do o=!ps(l)||tt(l);while(o&&(l=l.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=Vt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ie(this._raw[this._key])){const n=this._object[this._key];if(Ie(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return pi(this._raw,this._key)}}function Mi(e,t,n){return new $i(e,t,n)}class Di{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ho(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Pn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ee!==this)return jl(this,!0),!0}get value(){const t=this.dep.track();return Fl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Li(e,t,n=!1){let s,o;return le(e)?s=e:(s=e.get,o=e.set),new Di(s,o,n)}const Gn={},Xn=new WeakMap;let qt;function ji(e,t=!1,n=qt){if(n){let s=Xn.get(n);s||Xn.set(n,s=[]),s.push(e)}}function Vi(e,t,n=Se){const{immediate:s,deep:o,once:l,scheduler:r,augmentJob:i,call:c}=n,d=H=>o?H:tt(H)||o===!1||o===0?At(H,1):At(H);let a,h,g,y,I=!1,O=!1;if(Ie(e)?(h=()=>e.value,I=tt(e)):Tt(e)?(h=()=>d(e),I=!0):Z(e)?(O=!0,I=e.some(H=>Tt(H)||tt(H)),h=()=>e.map(H=>{if(Ie(H))return H.value;if(Tt(H))return d(H);if(le(H))return c?c(H,2):H()})):le(e)?t?h=c?()=>c(e,2):e:h=()=>{if(g){Pt();try{g()}finally{It()}}const H=qt;qt=a;try{return c?c(e,3,[y]):e(y)}finally{qt=H}}:h=wt,t&&o){const H=h,$=o===!0?1/0:o;h=()=>At(H(),$)}const U=Ml(),J=()=>{a.stop(),U&&U.active&&ro(U.effects,a)};if(l&&t){const H=t;t=(...$)=>{H(...$),J()}}let N=O?new Array(e.length).fill(Gn):Gn;const K=H=>{if(!(!(a.flags&1)||!a.dirty&&!H))if(t){const $=a.run();if(o||I||(O?$.some((Y,B)=>bt(Y,N[B])):bt($,N))){g&&g();const Y=qt;qt=a;try{const B=[$,N===Gn?void 0:O&&N[0]===Gn?[]:N,y];N=$,c?c(t,3,B):t(...B)}finally{qt=Y}}}else a.run()};return i&&i(K),a=new Dl(h),a.scheduler=r?()=>r(K,!1):K,y=H=>ji(H,!1,a),g=a.onStop=()=>{const H=Xn.get(a);if(H){if(c)c(H,4);else for(const $ of H)$();Xn.delete(a)}},t?s?K(!0):N=a.run():r?r(K.bind(null,!0),!0):a.run(),J.pause=a.pause.bind(a),J.resume=a.resume.bind(a),J.stop=J,J}function At(e,t=1/0,n){if(t<=0||!xe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ie(e))At(e.value,t,n);else if(Z(e))for(let s=0;s{At(s,t,n)});else if(Al(e)){for(const s in e)At(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&At(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Vn(e,t,n,s){try{return s?e(...s):e()}catch(o){ms(o,t,n)}}function ht(e,t,n,s){if(le(e)){const o=Vn(e,t,n,s);return o&&El(o)&&o.catch(l=>{ms(l,t,n)}),o}if(Z(e)){const o=[];for(let l=0;l>>1,o=ze[s],l=Nn(o);l=Nn(n)?ze.push(e):ze.splice(Fi(t),0,e),e.flags|=1,er()}}function er(){Zn||(Zn=Zl.then(nr))}function Hi(e){Z(e)?on.push(...e):Lt&&e.id===-1?Lt.splice(en+1,0,e):e.flags&1||(on.push(e),e.flags|=1),er()}function Oo(e,t,n=gt+1){for(;nNn(n)-Nn(s));if(on.length=0,Lt){Lt.push(...t);return}for(Lt=t,en=0;ene.id==null?e.flags&2?-1:1/0:e.id;function nr(e){try{for(gt=0;gt{s._d&&ss(-1);const l=es(t);let r;try{r=e(...o)}finally{es(l),s._d&&ss(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Be(e,t){if(Ze===null)return e;const n=ws(Ze),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&le(t)?t.call(s&&s.proxy):t}}function Bi(){return!!(Or()||Yt)}const Ki=Symbol.for("v-scx"),Gi=()=>it(Ki);function kn(e,t,n){return or(e,t,n)}function or(e,t,n=Se){const{immediate:s,deep:o,flush:l,once:r}=n,i=Ue({},n),c=t&&s||!t&&l!=="post";let d;if(Mn){if(l==="sync"){const y=Gi();d=y.__watcherHandles||(y.__watcherHandles=[])}else if(!c){const y=()=>{};return y.stop=wt,y.resume=wt,y.pause=wt,y}}const a=Ge;i.call=(y,I,O)=>ht(y,a,I,O);let h=!1;l==="post"?i.scheduler=y=>{Xe(y,a&&a.suspense)}:l!=="sync"&&(h=!0,i.scheduler=(y,I)=>{I?y():go(y)}),i.augmentJob=y=>{t&&(y.flags|=4),h&&(y.flags|=2,a&&(y.id=a.uid,y.i=a))};const g=Vi(e,t,i);return Mn&&(d?d.push(g):c&&g()),g}function Wi(e,t,n){const s=this.proxy,o=Pe(e)?e.includes(".")?lr(s,e):()=>s[e]:e.bind(s,s);let l;le(t)?l=t:(l=t.handler,n=t);const r=Fn(this),i=or(o,l.bind(s),n);return r(),i}function lr(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Ps=Symbol("_leaveCb");function _o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,_o(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 rr(e,t){return le(e)?Ue({name:e.name},t,{setup:e}):e}function ir(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function To(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ts=new WeakMap;function Sn(e,t,n,s,o=!1){if(Z(e)){e.forEach((O,U)=>Sn(O,t&&(Z(t)?t[U]:t),n,s,o));return}if(En(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Sn(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?ws(s.component):s.el,r=o?null:l,{i,r:c}=e,d=t&&t.r,a=i.refs===Se?i.refs={}:i.refs,h=i.setupState,g=pe(h),y=h===Se?Sl:O=>To(a,O)?!1:ye(g,O),I=(O,U)=>!(U&&To(a,U));if(d!=null&&d!==c){if(Po(t),Pe(d))a[d]=null,y(d)&&(h[d]=null);else if(Ie(d)){const O=t;I(d,O.k)&&(d.value=null),O.k&&(a[O.k]=null)}}if(le(c))Vn(c,i,12,[r,a]);else{const O=Pe(c),U=Ie(c);if(O||U){const J=()=>{if(e.f){const N=O?y(c)?h[c]:a[c]:I()||!e.k?c.value:a[e.k];if(o)Z(N)&&ro(N,l);else if(Z(N))N.includes(l)||N.push(l);else if(O)a[c]=[l],y(c)&&(h[c]=a[c]);else{const K=[l];I(c,e.k)&&(c.value=K),e.k&&(a[e.k]=K)}}else O?(a[c]=r,y(c)&&(h[c]=r)):U&&(I(c,e.k)&&(c.value=r),e.k&&(a[e.k]=r))};if(r){const N=()=>{J(),ts.delete(e)};N.id=-1,ts.set(e,N),Xe(N,n)}else Po(e),J()}}}function Po(e){const t=ts.get(e);t&&(t.flags|=8,ts.delete(e))}ds().requestIdleCallback;ds().cancelIdleCallback;const En=e=>!!e.type.__asyncLoader,cr=e=>e.type.__isKeepAlive;function Ji(e,t){ar(e,"a",t)}function Yi(e,t){ar(e,"da",t)}function ar(e,t,n=Ge){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(vs(t,s,n),n){let o=n.parent;for(;o&&o.parent;)cr(o.parent.vnode)&&Qi(s,t,n,o),o=o.parent}}function Qi(e,t,n,s){const o=vs(t,e,s,!0);_s(()=>{ro(s[t],o)},n)}function vs(e,t,n=Ge,s=!1){if(n){const o=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{Pt();const i=Fn(n),c=ht(t,n,e,r);return i(),It(),c});return s?o.unshift(l):o.push(l),l}}const $t=e=>(t,n=Ge)=>{(!Mn||e==="sp")&&vs(e,(...s)=>t(...s),n)},Xi=$t("bm"),gs=$t("m"),Zi=$t("bu"),ec=$t("u"),tc=$t("bum"),_s=$t("um"),nc=$t("sp"),sc=$t("rtg"),oc=$t("rtc");function lc(e,t=Ge){vs("ec",e,t)}const rc="components";function Io(e,t){return cc(rc,e,!0,t)||e}const ic=Symbol.for("v-ndc");function cc(e,t,n=!0,s=!1){const o=Ze||Ge;if(o){const l=o.type;{const i=qc(l,!1);if(i&&(i===t||i===Je(t)||i===us(Je(t))))return l}const r=No(o[e]||l[e],t)||No(o.appContext[e],t);return!r&&s?l:r}}function No(e,t){return e&&(e[t]||e[Je(t)]||e[us(Je(t))])}function me(e,t,n,s){let o;const l=n,r=Z(e);if(r||Pe(e)){const i=r&&Tt(e);let c=!1,d=!1;i&&(c=!tt(e),d=Nt(e),e=hs(e)),o=new Array(e.length);for(let a=0,h=e.length;at(i,c,void 0,l));else{const i=Object.keys(e);o=new Array(i.length);for(let c=0,d=i.length;ce?Tr(e)?ws(e):qs(e.parent):null,Rn=Ue(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=>qs(e.parent),$root:e=>qs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>fr(e),$forceUpdate:e=>e.f||(e.f=()=>{go(e.update)}),$nextTick:e=>e.n||(e.n=Un.bind(e.proxy)),$watch:e=>Wi.bind(e)}),Is=(e,t)=>e!==Se&&!e.__isScriptSetup&&ye(e,t),ac={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:l,accessCache:r,type:i,appContext:c}=e;if(t[0]!=="$"){const g=r[t];if(g!==void 0)switch(g){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return l[t]}else{if(Is(s,t))return r[t]=1,s[t];if(o!==Se&&ye(o,t))return r[t]=2,o[t];if(ye(l,t))return r[t]=3,l[t];if(n!==Se&&ye(n,t))return r[t]=4,n[t];zs&&(r[t]=0)}}const d=Rn[t];let a,h;if(d)return t==="$attrs"&&Ke(e.attrs,"get",""),d(e);if((a=i.__cssModules)&&(a=a[t]))return a;if(n!==Se&&ye(n,t))return r[t]=4,n[t];if(h=c.config.globalProperties,ye(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:l}=e;return Is(o,t)?(o[t]=n,!0):s!==Se&&ye(s,t)?(s[t]=n,!0):ye(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:l,type:r}},i){let c;return!!(n[i]||e!==Se&&i[0]!=="$"&&ye(e,i)||Is(t,i)||ye(l,i)||ye(s,i)||ye(Rn,i)||ye(o.config.globalProperties,i)||(c=r.__cssModules)&&c[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ye(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function $o(e){return Z(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let zs=!0;function uc(e){const t=fr(e),n=e.proxy,s=e.ctx;zs=!1,t.beforeCreate&&Mo(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:r,watch:i,provide:c,inject:d,created:a,beforeMount:h,mounted:g,beforeUpdate:y,updated:I,activated:O,deactivated:U,beforeDestroy:J,beforeUnmount:N,destroyed:K,unmounted:H,render:$,renderTracked:Y,renderTriggered:B,errorCaptured:oe,serverPrefetch:re,expose:Ce,inheritAttrs:G,components:Q,directives:de,filters:se}=t;if(d&&fc(d,s,null),r)for(const ee in r){const ue=r[ee];le(ue)&&(s[ee]=ue.bind(n))}if(o){const ee=o.call(n,n);xe(ee)&&(e.data=jn(ee))}if(zs=!0,l)for(const ee in l){const ue=l[ee],ut=le(ue)?ue.bind(n,n):le(ue.get)?ue.get.bind(n,n):wt,je=!le(ue)&&le(ue.set)?ue.set.bind(n):wt,Fe=we({get:ut,set:je});Object.defineProperty(s,ee,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:Ae=>Fe.value=Ae})}if(i)for(const ee in i)ur(i[ee],s,n,ee);if(c){const ee=le(c)?c.call(n):c;Reflect.ownKeys(ee).forEach(ue=>{zn(ue,ee[ue])})}a&&Mo(a,e,"c");function ce(ee,ue){Z(ue)?ue.forEach(ut=>ee(ut.bind(n))):ue&&ee(ue.bind(n))}if(ce(Xi,h),ce(gs,g),ce(Zi,y),ce(ec,I),ce(Ji,O),ce(Yi,U),ce(lc,oe),ce(oc,Y),ce(sc,B),ce(tc,N),ce(_s,H),ce(nc,re),Z(Ce))if(Ce.length){const ee=e.exposed||(e.exposed={});Ce.forEach(ue=>{Object.defineProperty(ee,ue,{get:()=>n[ue],set:ut=>n[ue]=ut,enumerable:!0})})}else e.exposed||(e.exposed={});$&&e.render===wt&&(e.render=$),G!=null&&(e.inheritAttrs=G),Q&&(e.components=Q),de&&(e.directives=de),re&&ir(e)}function fc(e,t,n=wt){Z(e)&&(e=Js(e));for(const s in e){const o=e[s];let l;xe(o)?"default"in o?l=it(o.from||s,o.default,!0):l=it(o.from||s):l=it(o),Ie(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[s]=l}}function Mo(e,t,n){ht(Z(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ur(e,t,n,s){let o=s.includes(".")?lr(n,s):()=>n[s];if(Pe(e)){const l=t[e];le(l)&&kn(o,l)}else if(le(e))kn(o,e.bind(n));else if(xe(e))if(Z(e))e.forEach(l=>ur(l,t,n,s));else{const l=le(e.handler)?e.handler.bind(n):t[e.handler];le(l)&&kn(o,l,e)}}function fr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:l,config:{optionMergeStrategies:r}}=e.appContext,i=l.get(t);let c;return i?c=i:!o.length&&!n&&!s?c=t:(c={},o.length&&o.forEach(d=>ns(c,d,r,!0)),ns(c,t,r)),xe(t)&&l.set(t,c),c}function ns(e,t,n,s=!1){const{mixins:o,extends:l}=t;l&&ns(e,l,n,!0),o&&o.forEach(r=>ns(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const i=dc[r]||n&&n[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const dc={data:Do,props:Lo,emits:Lo,methods:yn,computed:yn,beforeCreate:We,created:We,beforeMount:We,mounted:We,beforeUpdate:We,updated:We,beforeDestroy:We,beforeUnmount:We,destroyed:We,unmounted:We,activated:We,deactivated:We,errorCaptured:We,serverPrefetch:We,components:yn,directives:yn,watch:pc,provide:Do,inject:hc};function Do(e,t){return t?e?function(){return Ue(le(e)?e.call(this,this):e,le(t)?t.call(this,this):t)}:t:e}function hc(e,t){return yn(Js(e),Js(t))}function Js(e){if(Z(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Je(t)}Modifiers`]||e[`${Bt(t)}Modifiers`];function _c(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Se;let o=n;const l=t.startsWith("update:"),r=l&&gc(s,t.slice(7));r&&(r.trim&&(o=n.map(a=>Pe(a)?a.trim():a)),r.number&&(o=n.map(fs)));let i,c=s[i=Es(t)]||s[i=Es(Je(t))];!c&&l&&(c=s[i=Es(Bt(t))]),c&&ht(c,e,6,o);const d=s[i+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,ht(d,e,6,o)}}const yc=new WeakMap;function hr(e,t,n=!1){const s=n?yc:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const l=e.emits;let r={},i=!1;if(!le(e)){const c=d=>{const a=hr(d,t,!0);a&&(i=!0,Ue(r,a))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!l&&!i?(xe(e)&&s.set(e,null),null):(Z(l)?l.forEach(c=>r[c]=null):Ue(r,l),xe(e)&&s.set(e,r),r)}function ys(e,t){return!e||!rs(t)?!1:(t=t.slice(2).replace(/Once$/,""),ye(e,t[0].toLowerCase()+t.slice(1))||ye(e,Bt(t))||ye(e,t))}function jo(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[l],slots:r,attrs:i,emit:c,render:d,renderCache:a,props:h,data:g,setupState:y,ctx:I,inheritAttrs:O}=e,U=es(e);let J,N;try{if(n.shapeFlag&4){const H=o||s,$=H;J=yt(d.call($,H,a,h,y,g,I)),N=i}else{const H=t;J=yt(H.length>1?H(h,{attrs:i,slots:r,emit:c}):H(h,null)),N=t.props?i:bc(i)}}catch(H){An.length=0,ms(H,e,1),J=Le(Ft)}let K=J;if(N&&O!==!1){const H=Object.keys(N),{shapeFlag:$}=K;H.length&&$&7&&(l&&H.some(is)&&(N=wc(N,l)),K=rn(K,N,!1,!0))}return n.dirs&&(K=rn(K,null,!1,!0),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition&&_o(K,n.transition),J=K,es(U),J}const bc=e=>{let t;for(const n in e)(n==="class"||n==="style"||rs(n))&&((t||(t={}))[n]=e[n]);return t},wc=(e,t)=>{const n={};for(const s in e)(!is(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function xc(e,t,n){const{props:s,children:o,component:l}=e,{props:r,children:i,patchFlag:c}=t,d=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Vo(s,r,d):!!r;if(c&8){const a=t.dynamicProps;for(let h=0;hObject.create(mr),gr=e=>Object.getPrototypeOf(e)===mr;function kc(e,t,n,s=!1){const o={},l=vr();e.propsDefaults=Object.create(null),_r(e,t,o,l);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);n?e.props=s?o:Yl(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function Sc(e,t,n,s){const{props:o,attrs:l,vnode:{patchFlag:r}}=e,i=pe(o),[c]=e.propsOptions;let d=!1;if((s||r>0)&&!(r&16)){if(r&8){const a=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[g,y]=yr(h,t,!0);Ue(r,g),y&&i.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!l&&!c)return xe(e)&&s.set(e,nn),nn;if(Z(l))for(let a=0;ae==="_"||e==="_ctx"||e==="$stable",bo=e=>Z(e)?e.map(yt):[yt(e)],Rc=(e,t,n)=>{if(t._n)return t;const s=qn((...o)=>bo(t(...o)),n);return s._c=!1,s},br=(e,t,n)=>{const s=e._ctx;for(const o in e){if(yo(o))continue;const l=e[o];if(le(l))t[o]=Rc(o,l,s);else if(l!=null){const r=bo(l);t[o]=()=>r}}},wr=(e,t)=>{const n=bo(t);e.slots.default=()=>n},xr=(e,t,n)=>{for(const s in t)(n||!yo(s))&&(e[s]=t[s])},Ac=(e,t,n)=>{const s=e.slots=vr();if(e.vnode.shapeFlag&32){const o=t._;o?(xr(s,t,n),n&&Ol(s,"_",o,!0)):br(t,s)}else t&&wr(e,t)},Oc=(e,t,n)=>{const{vnode:s,slots:o}=e;let l=!0,r=Se;if(s.shapeFlag&32){const i=t._;i?n&&i===1?l=!1:xr(o,t,n):(l=!t.$stable,br(t,o)),r=t}else t&&(wr(e,t),r={default:1});if(l)for(const i in o)!yo(i)&&r[i]==null&&delete o[i]},Xe=$c;function Tc(e){return Pc(e)}function Pc(e,t){const n=ds();n.__VUE__=!0;const{insert:s,remove:o,patchProp:l,createElement:r,createText:i,createComment:c,setText:d,setElementText:a,parentNode:h,nextSibling:g,setScopeId:y=wt,insertStaticContent:I}=e,O=(f,p,v,x=null,E=null,w=null,M=void 0,P=null,T=!!p.dynamicChildren)=>{if(f===p)return;f&&!gn(f,p)&&(x=C(f),Ae(f,E,w,!0),f=null),p.patchFlag===-2&&(T=!1,p.dynamicChildren=null);const{type:R,ref:q,shapeFlag:D}=p;switch(R){case bs:U(f,p,v,x);break;case Ft:J(f,p,v,x);break;case $s:f==null&&N(p,v,x,M);break;case te:Q(f,p,v,x,E,w,M,P,T);break;default:D&1?$(f,p,v,x,E,w,M,P,T):D&6?de(f,p,v,x,E,w,M,P,T):(D&64||D&128)&&R.process(f,p,v,x,E,w,M,P,T,z)}q!=null&&E?Sn(q,f&&f.ref,w,p||f,!p):q==null&&f&&f.ref!=null&&Sn(f.ref,null,w,f,!0)},U=(f,p,v,x)=>{if(f==null)s(p.el=i(p.children),v,x);else{const E=p.el=f.el;p.children!==f.children&&d(E,p.children)}},J=(f,p,v,x)=>{f==null?s(p.el=c(p.children||""),v,x):p.el=f.el},N=(f,p,v,x)=>{[f.el,f.anchor]=I(f.children,p,v,x,f.el,f.anchor)},K=({el:f,anchor:p},v,x)=>{let E;for(;f&&f!==p;)E=g(f),s(f,v,x),f=E;s(p,v,x)},H=({el:f,anchor:p})=>{let v;for(;f&&f!==p;)v=g(f),o(f),f=v;o(p)},$=(f,p,v,x,E,w,M,P,T)=>{if(p.type==="svg"?M="svg":p.type==="math"&&(M="mathml"),f==null)Y(p,v,x,E,w,M,P,T);else{const R=f.el&&f.el._isVueCE?f.el:null;try{R&&R._beginPatch(),re(f,p,E,w,M,P,T)}finally{R&&R._endPatch()}}},Y=(f,p,v,x,E,w,M,P)=>{let T,R;const{props:q,shapeFlag:D,transition:V,dirs:X}=f;if(T=f.el=r(f.type,w,q&&q.is,q),D&8?a(T,f.children):D&16&&oe(f.children,T,null,x,E,Ns(f,w),M,P),X&&Gt(f,null,x,"created"),B(T,f,f.scopeId,M,x),q){for(const be in q)be!=="value"&&!wn(be)&&l(T,be,null,q[be],w,x);"value"in q&&l(T,"value",null,q.value,w),(R=q.onVnodeBeforeMount)&&vt(R,x,f)}X&&Gt(f,null,x,"beforeMount");const he=Ic(E,V);he&&V.beforeEnter(T),s(T,p,v),((R=q&&q.onVnodeMounted)||he||X)&&Xe(()=>{try{R&&vt(R,x,f),he&&V.enter(T),X&&Gt(f,null,x,"mounted")}finally{}},E)},B=(f,p,v,x,E)=>{if(v&&y(f,v),x)for(let w=0;w{for(let R=T;R{const P=p.el=f.el;let{patchFlag:T,dynamicChildren:R,dirs:q}=p;T|=f.patchFlag&16;const D=f.props||Se,V=p.props||Se;let X;if(v&&Wt(v,!1),(X=V.onVnodeBeforeUpdate)&&vt(X,v,p,f),q&&Gt(p,f,v,"beforeUpdate"),v&&Wt(v,!0),(D.innerHTML&&V.innerHTML==null||D.textContent&&V.textContent==null)&&a(P,""),R?Ce(f.dynamicChildren,R,P,v,x,Ns(p,E),w):M||ue(f,p,P,null,v,x,Ns(p,E),w,!1),T>0){if(T&16)G(P,D,V,v,E);else if(T&2&&D.class!==V.class&&l(P,"class",null,V.class,E),T&4&&l(P,"style",D.style,V.style,E),T&8){const he=p.dynamicProps;for(let be=0;be{X&&vt(X,v,p,f),q&&Gt(p,f,v,"updated")},x)},Ce=(f,p,v,x,E,w,M)=>{for(let P=0;P{if(p!==v){if(p!==Se)for(const w in p)!wn(w)&&!(w in v)&&l(f,w,p[w],null,E,x);for(const w in v){if(wn(w))continue;const M=v[w],P=p[w];M!==P&&w!=="value"&&l(f,w,P,M,E,x)}"value"in v&&l(f,"value",p.value,v.value,E)}},Q=(f,p,v,x,E,w,M,P,T)=>{const R=p.el=f?f.el:i(""),q=p.anchor=f?f.anchor:i("");let{patchFlag:D,dynamicChildren:V,slotScopeIds:X}=p;X&&(P=P?P.concat(X):X),f==null?(s(R,v,x),s(q,v,x),oe(p.children||[],v,q,E,w,M,P,T)):D>0&&D&64&&V&&f.dynamicChildren&&f.dynamicChildren.length===V.length?(Ce(f.dynamicChildren,V,v,E,w,M,P),(p.key!=null||E&&p===E.subTree)&&Cr(f,p,!0)):ue(f,p,v,q,E,w,M,P,T)},de=(f,p,v,x,E,w,M,P,T)=>{p.slotScopeIds=P,f==null?p.shapeFlag&512?E.ctx.activate(p,v,x,M,T):se(p,v,x,E,w,M,T):ke(f,p,T)},se=(f,p,v,x,E,w,M)=>{const P=f.component=Hc(f,x,E);if(cr(f)&&(P.ctx.renderer=z),Bc(P,!1,M),P.asyncDep){if(E&&E.registerDep(P,ce,M),!f.el){const T=P.subTree=Le(Ft);J(null,T,p,v),f.placeholder=T.el}}else ce(P,f,p,v,E,w,M)},ke=(f,p,v)=>{const x=p.component=f.component;if(xc(f,p,v))if(x.asyncDep&&!x.asyncResolved){ee(x,p,v);return}else x.next=p,x.update();else p.el=f.el,x.vnode=p},ce=(f,p,v,x,E,w,M)=>{const P=()=>{if(f.isMounted){let{next:D,bu:V,u:X,parent:he,vnode:be}=f;{const Ve=kr(f);if(Ve){D&&(D.el=be.el,ee(f,D,M)),Ve.asyncDep.then(()=>{Xe(()=>{f.isUnmounted||R()},E)});return}}let ve=D,Oe;Wt(f,!1),D?(D.el=be.el,ee(f,D,M)):D=be,V&&Wn(V),(Oe=D.props&&D.props.onVnodeBeforeUpdate)&&vt(Oe,he,D,be),Wt(f,!0);const Ne=jo(f),nt=f.subTree;f.subTree=Ne,O(nt,Ne,h(nt.el),C(nt),f,E,w),D.el=Ne.el,ve===null&&Cc(f,Ne.el),X&&Xe(X,E),(Oe=D.props&&D.props.onVnodeUpdated)&&Xe(()=>vt(Oe,he,D,be),E)}else{let D;const{el:V,props:X}=p,{bm:he,m:be,parent:ve,root:Oe,type:Ne}=f,nt=En(p);Wt(f,!1),he&&Wn(he),!nt&&(D=X&&X.onVnodeBeforeMount)&&vt(D,ve,p),Wt(f,!0);{Oe.ce&&Oe.ce._hasShadowRoot()&&Oe.ce._injectChildStyle(Ne,f.parent?f.parent.type:void 0);const Ve=f.subTree=jo(f);O(null,Ve,v,x,f,E,w),p.el=Ve.el}if(be&&Xe(be,E),!nt&&(D=X&&X.onVnodeMounted)){const Ve=p;Xe(()=>vt(D,ve,Ve),E)}(p.shapeFlag&256||ve&&En(ve.vnode)&&ve.vnode.shapeFlag&256)&&f.a&&Xe(f.a,E),f.isMounted=!0,p=v=x=null}};f.scope.on();const T=f.effect=new Dl(P);f.scope.off();const R=f.update=T.run.bind(T),q=f.job=T.runIfDirty.bind(T);q.i=f,q.id=f.uid,T.scheduler=()=>go(q),Wt(f,!0),R()},ee=(f,p,v)=>{p.component=f;const x=f.vnode.props;f.vnode=p,f.next=null,Sc(f,p.props,x,v),Oc(f,p.children,v),Pt(),Oo(f),It()},ue=(f,p,v,x,E,w,M,P,T=!1)=>{const R=f&&f.children,q=f?f.shapeFlag:0,D=p.children,{patchFlag:V,shapeFlag:X}=p;if(V>0){if(V&128){je(R,D,v,x,E,w,M,P,T);return}else if(V&256){ut(R,D,v,x,E,w,M,P,T);return}}X&8?(q&16&&Qe(R,E,w),D!==R&&a(v,D)):q&16?X&16?je(R,D,v,x,E,w,M,P,T):Qe(R,E,w,!0):(q&8&&a(v,""),X&16&&oe(D,v,x,E,w,M,P,T))},ut=(f,p,v,x,E,w,M,P,T)=>{f=f||nn,p=p||nn;const R=f.length,q=p.length,D=Math.min(R,q);let V;for(V=0;Vq?Qe(f,E,w,!0,!1,D):oe(p,v,x,E,w,M,P,T,D)},je=(f,p,v,x,E,w,M,P,T)=>{let R=0;const q=p.length;let D=f.length-1,V=q-1;for(;R<=D&&R<=V;){const X=f[R],he=p[R]=T?Et(p[R]):yt(p[R]);if(gn(X,he))O(X,he,v,null,E,w,M,P,T);else break;R++}for(;R<=D&&R<=V;){const X=f[D],he=p[V]=T?Et(p[V]):yt(p[V]);if(gn(X,he))O(X,he,v,null,E,w,M,P,T);else break;D--,V--}if(R>D){if(R<=V){const X=V+1,he=XV)for(;R<=D;)Ae(f[R],E,w,!0),R++;else{const X=R,he=R,be=new Map;for(R=he;R<=V;R++){const He=p[R]=T?Et(p[R]):yt(p[R]);He.key!=null&&be.set(He.key,R)}let ve,Oe=0;const Ne=V-he+1;let nt=!1,Ve=0;const Kt=new Array(Ne);for(R=0;R=Ne){Ae(He,E,w,!0);continue}let st;if(He.key!=null)st=be.get(He.key);else for(ve=he;ve<=V;ve++)if(Kt[ve-he]===0&&gn(He,p[ve])){st=ve;break}st===void 0?Ae(He,E,w,!0):(Kt[st-he]=R+1,st>=Ve?Ve=st:nt=!0,O(He,p[st],v,null,E,w,M,P,T),Oe++)}const Qt=nt?Nc(Kt):nn;for(ve=Qt.length-1,R=Ne-1;R>=0;R--){const He=he+R,st=p[He],dn=p[He+1],hn=He+1{const{el:w,type:M,transition:P,children:T,shapeFlag:R}=f;if(R&6){Fe(f.component.subTree,p,v,x);return}if(R&128){f.suspense.move(p,v,x);return}if(R&64){M.move(f,p,v,z);return}if(M===te){s(w,p,v);for(let D=0;DP.enter(w),E));else{const{leave:D,delayLeave:V,afterLeave:X}=P,he=()=>{f.ctx.isUnmounted?o(w):s(w,p,v)},be=()=>{const ve=w._isLeaving||!!w[Ps];w._isLeaving&&w[Ps](!0),P.persisted&&!ve?he():D(w,()=>{he(),X&&X()})};V?V(w,he,be):be()}else s(w,p,v)},Ae=(f,p,v,x=!1,E=!1)=>{const{type:w,props:M,ref:P,children:T,dynamicChildren:R,shapeFlag:q,patchFlag:D,dirs:V,cacheIndex:X,memo:he}=f;if(D===-2&&(E=!1),P!=null&&(Pt(),Sn(P,null,v,f,!0),It()),X!=null&&(p.renderCache[X]=void 0),q&256){p.ctx.deactivate(f);return}const be=q&1&&V,ve=!En(f);let Oe;if(ve&&(Oe=M&&M.onVnodeBeforeUnmount)&&vt(Oe,p,f),q&6)xt(f.component,v,x);else{if(q&128){f.suspense.unmount(v,x);return}be&&Gt(f,null,p,"beforeUnmount"),q&64?f.type.remove(f,p,v,z,x):R&&!R.hasOnce&&(w!==te||D>0&&D&64)?Qe(R,p,v,!1,!0):(w===te&&D&384||!E&&q&16)&&Qe(T,p,v),x&&Ye(f)}const Ne=he!=null&&X==null;(ve&&(Oe=M&&M.onVnodeUnmounted)||be||Ne)&&Xe(()=>{Oe&&vt(Oe,p,f),be&&Gt(f,null,p,"unmounted"),Ne&&(f.el=null)},v)},Ye=f=>{const{type:p,el:v,anchor:x,transition:E}=f;if(p===te){mt(v,x);return}if(p===$s){H(f);return}const w=()=>{o(v),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(f.shapeFlag&1&&E&&!E.persisted){const{leave:M,delayLeave:P}=E,T=()=>M(v,w);P?P(f.el,w,T):T()}else w()},mt=(f,p)=>{let v;for(;f!==p;)v=g(f),o(f),f=v;o(p)},xt=(f,p,v)=>{const{bum:x,scope:E,job:w,subTree:M,um:P,m:T,a:R}=f;Fo(T),Fo(R),x&&Wn(x),E.stop(),w&&(w.flags|=8,Ae(M,f,p,v)),P&&Xe(P,p),Xe(()=>{f.isUnmounted=!0},p)},Qe=(f,p,v,x=!1,E=!1,w=0)=>{for(let M=w;M{if(f.shapeFlag&6)return C(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const p=g(f.anchor||f.el),v=p&&p[qi];return v?g(v):p};let F=!1;const j=(f,p,v)=>{let x;f==null?p._vnode&&(Ae(p._vnode,null,null,!0),x=p._vnode.component):O(p._vnode||null,f,p,null,null,null,v),p._vnode=f,F||(F=!0,Oo(x),tr(),F=!1)},z={p:O,um:Ae,m:Fe,r:Ye,mt:se,mc:oe,pc:ue,pbc:Ce,n:C,o:e};return{render:j,hydrate:void 0,createApp:vc(j)}}function Ns({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 Wt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ic(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cr(e,t,n=!1){const s=e.children,o=t.children;if(Z(s)&&Z(o))for(let l=0;l>1,e[n[i]]0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,r=n[l-1];l-- >0;)n[l]=r,r=t[r];return n}function kr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:kr(t)}function Fo(e){if(e)for(let t=0;te.__isSuspense;function $c(e,t){t&&t.pendingBranch?Z(e)?t.effects.push(...e):t.effects.push(e):Hi(e)}const te=Symbol.for("v-fgt"),bs=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),$s=Symbol.for("v-stc"),An=[];let et=null;function k(e=!1){An.push(et=e?null:[])}function Mc(){An.pop(),et=An[An.length-1]||null}let $n=1;function ss(e,t=!1){$n+=e,e<0&&et&&t&&(et.hasOnce=!0)}function Rr(e){return e.dynamicChildren=$n>0?et||nn:null,Mc(),$n>0&&et&&et.push(e),e}function S(e,t,n,s,o,l){return Rr(u(e,t,n,s,o,l,!0))}function Dc(e,t,n,s,o){return Rr(Le(e,t,n,s,o,!0))}function os(e){return e?e.__v_isVNode===!0:!1}function gn(e,t){return e.type===t.type&&e.key===t.key}const Ar=({key:e})=>e??null,Jn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Pe(e)||Ie(e)||le(e)?{i:Ze,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,l=e===te?0:1,r=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ar(t),ref:t&&Jn(t),scopeId:sr,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:l,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ze};return i?(wo(c,n),l&128&&e.normalize(c)):n&&(c.shapeFlag|=Pe(n)?8:16),$n>0&&!r&&et&&(c.patchFlag>0||l&6)&&c.patchFlag!==32&&et.push(c),c}const Le=Lc;function Lc(e,t=null,n=null,s=0,o=null,l=!1){if((!e||e===ic)&&(e=Ft),os(e)){const i=rn(e,t,!0);return n&&wo(i,n),$n>0&&!l&&et&&(i.shapeFlag&6?et[et.indexOf(e)]=i:et.push(i)),i.patchFlag=-2,i}if(zc(e)&&(e=e.__vccOpts),t){t=jc(t);let{class:i,style:c}=t;i&&!Pe(i)&&(t.class=rt(i)),xe(c)&&(ps(c)&&!Z(c)&&(c=Ue({},c)),t.style=io(c))}const r=Pe(e)?1:Er(e)?128:zi(e)?64:xe(e)?4:le(e)?2:0;return u(e,t,n,s,o,r,l,!0)}function jc(e){return e?ps(e)||gr(e)?Ue({},e):e:null}function rn(e,t,n=!1,s=!1){const{props:o,ref:l,patchFlag:r,children:i,transition:c}=e,d=t?Vc(o||{},t):o,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ar(d),ref:t&&t.ref?n&&l?Z(l)?l.concat(Jn(t)):[l,Jn(t)]:Jn(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==te?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&rn(e.ssContent),ssFallback:e.ssFallback&&rn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&_o(a,c.clone(a)),a}function ge(e=" ",t=0){return Le(bs,null,e,t)}function Re(e="",t=!1){return t?(k(),Dc(Ft,null,e)):Le(Ft,null,e)}function yt(e){return e==null||typeof e=="boolean"?Le(Ft):Z(e)?Le(te,null,e.slice()):os(e)?Et(e):Le(bs,null,String(e))}function Et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:rn(e)}function wo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Z(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),wo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!gr(t)?t._ctx=Ze:o===3&&Ze&&(Ze.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else le(t)?(t={default:t,_ctx:Ze},n=32):(t=String(t),s&64?(n=16,t=[ge(t)]):n=8);e.children=t,e.shapeFlag|=n}function Vc(...e){const t={};for(let n=0;nGe||Ze;let ls,Qs;{const e=ds(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),l=>{o.length>1?o.forEach(r=>r(l)):o[0](l)}};ls=t("__VUE_INSTANCE_SETTERS__",n=>Ge=n),Qs=t("__VUE_SSR_SETTERS__",n=>Mn=n)}const Fn=e=>{const t=Ge;return ls(e),e.scope.on(),()=>{e.scope.off(),ls(t)}},Ho=()=>{Ge&&Ge.scope.off(),ls(null)};function Tr(e){return e.vnode.shapeFlag&4}let Mn=!1;function Bc(e,t=!1,n=!1){t&&Qs(t);const{props:s,children:o}=e.vnode,l=Tr(e);kc(e,s,l,t),Ac(e,o,n||t);const r=l?Kc(e,t):void 0;return t&&Qs(!1),r}function Kc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ac);const{setup:s}=n;if(s){Pt();const o=e.setupContext=s.length>1?Wc(e):null,l=Fn(e),r=Vn(s,e,0,[e.props,o]),i=El(r);if(It(),l(),(i||e.sp)&&!En(e)&&ir(e),i){if(r.then(Ho,Ho),t)return r.then(c=>{Bo(e,c)}).catch(c=>{ms(c,e,0)});e.asyncDep=r}else Bo(e,r)}else Pr(e)}function Bo(e,t,n){le(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:xe(t)&&(e.setupState=Xl(t)),Pr(e)}function Pr(e,t,n){const s=e.type;e.render||(e.render=s.render||wt);{const o=Fn(e);Pt();try{uc(e)}finally{It(),o()}}}const Gc={get(e,t){return Ke(e,"get",""),e[t]}};function Wc(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Gc),slots:e.slots,emit:e.emit,expose:t}}function ws(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Xl(vo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rn)return Rn[n](e)},has(t,n){return n in t||n in Rn}})):e.proxy}function qc(e,t=!0){return le(e)?e.displayName||e.name:e.name||t&&e.__name}function zc(e){return le(e)&&"__vccOpts"in e}const we=(e,t)=>Li(e,t,Mn);function Ir(e,t,n){try{ss(-1);const s=arguments.length;return s===2?xe(t)&&!Z(t)?os(t)?Le(e,null,[t]):Le(e,t):Le(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&os(n)&&(n=[n]),Le(e,t,n))}finally{ss(1)}}const Jc="3.5.35";/** -* @vue/runtime-dom v3.5.35 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Xs;const Ko=typeof window<"u"&&window.trustedTypes;if(Ko)try{Xs=Ko.createPolicy("vue",{createHTML:e=>e})}catch{}const Nr=Xs?e=>Xs.createHTML(e):e=>e,Yc="http://www.w3.org/2000/svg",Qc="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,Go=St&&St.createElement("template"),Xc={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 o=t==="svg"?St.createElementNS(Yc,e):t==="mathml"?St.createElementNS(Qc,e):n?St.createElement(e,{is:n}):St.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>St.createTextNode(e),createComment:e=>St.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>St.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,l){const r=n?n.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{Go.innerHTML=Nr(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const i=Go.content;if(s==="svg"||s==="mathml"){const c=i.firstChild;for(;c.firstChild;)i.appendChild(c.firstChild);i.removeChild(c)}t.insertBefore(i,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zc=Symbol("_vtc");function ea(e,t,n){const s=e[Zc];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wo=Symbol("_vod"),ta=Symbol("_vsh"),na=Symbol(""),sa=/(?:^|;)\s*display\s*:/;function oa(e,t,n){const s=e.style,o=Pe(n);let l=!1;if(n&&!o){if(t)if(Pe(t))for(const r of t.split(";")){const i=r.slice(0,r.indexOf(":")).trim();n[i]==null&&bn(s,i,"")}else for(const r in t)n[r]==null&&bn(s,r,"");for(const r in n){r==="display"&&(l=!0);const i=n[r];i!=null?ra(e,r,!Pe(t)&&t?t[r]:void 0,i)||bn(s,r,i):bn(s,r,"")}}else if(o){if(t!==n){const r=s[na];r&&(n+=";"+r),s.cssText=n,l=sa.test(n)}}else t&&e.removeAttribute("style");Wo in e&&(e[Wo]=l?s.display:"",e[ta]&&(s.display="none"))}const qo=/\s*!important$/;function bn(e,t,n){if(Z(n))n.forEach(s=>bn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=la(e,t);qo.test(n)?e.setProperty(Bt(s),n.replace(qo,""),"important"):e[s]=n}}const zo=["Webkit","Moz","ms"],Ms={};function la(e,t){const n=Ms[t];if(n)return n;let s=Je(t);if(s!=="filter"&&s in e)return Ms[t]=s;s=us(s);for(let o=0;oDs||(ua.then(()=>Ds=0),Ds=Date.now());function da(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Z(o)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const r=o.slice(),i=[s];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ha=(e,t,n,s,o,l)=>{const r=o==="svg";t==="class"?ea(e,s,r):t==="style"?oa(e,n,s):rs(t)?is(t)||ca(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pa(e,t,s,r))?(Qo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Yo(e,t,s,r,l,t!=="value")):e._isVueCE&&(ma(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Pe(s)))?Qo(e,Je(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Yo(e,t,s,r))};function pa(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&el(t)&&le(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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return el(t)&&Pe(n)?!1:t in e}function ma(e,t){const n=e._def.props;if(!n)return!1;const s=Je(t);return Array.isArray(n)?n.some(o=>Je(o)===s):Object.keys(n).some(o=>Je(o)===s)}const Ht=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Z(t)?n=>Wn(t,n):t};function va(e){e.target.composing=!0}function tl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ct=Symbol("_assign");function nl(e,t,n){return t&&(e=e.trim()),n&&(e=fs(e)),e}const lt={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[ct]=Ht(o);const l=s||o.props&&o.props.type==="number";Ot(e,t?"change":"input",r=>{r.target.composing||e[ct](nl(e.value,n,l))}),(n||l)&&Ot(e,"change",()=>{e.value=nl(e.value,n,l)}),t||(Ot(e,"compositionstart",va),Ot(e,"compositionend",tl),Ot(e,"change",tl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:l}},r){if(e[ct]=Ht(r),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?fs(e.value):e.value,c=t??"";if(i===c)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===c)||(e.value=c)}},ga={deep:!0,created(e,t,n){e[ct]=Ht(n),Ot(e,"change",()=>{const s=e._modelValue,o=cn(e),l=e.checked,r=e[ct];if(Z(s)){const i=co(s,o),c=i!==-1;if(l&&!c)r(s.concat(o));else if(!l&&c){const d=[...s];d.splice(i,1),r(d)}}else if(fn(s)){const i=new Set(s);l?i.add(o):i.delete(o),r(i)}else r($r(e,l))})},mounted:sl,beforeUpdate(e,t,n){e[ct]=Ht(n),sl(e,t,n)}};function sl(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Z(t))o=co(t,s.props.value)>-1;else if(fn(t))o=t.has(s.props.value);else{if(t===n)return;o=Ut(t,$r(e,!0))}e.checked!==o&&(e.checked=o)}const ol={created(e,{value:t},n){e.checked=Ut(t,n.props.value),e[ct]=Ht(n),Ot(e,"change",()=>{e[ct](cn(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[ct]=Ht(s),t!==n&&(e.checked=Ut(t,s.props.value))}},_a={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=fn(t);Ot(e,"change",()=>{const l=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?fs(cn(r)):cn(r));e[ct](e.multiple?o?new Set(l):l:l[0]),e._assigning=!0,Un(()=>{e._assigning=!1})}),e[ct]=Ht(s)},mounted(e,{value:t}){ll(e,t)},beforeUpdate(e,t,n){e[ct]=Ht(n)},updated(e,{value:t}){e._assigning||ll(e,t)}};function ll(e,t){const n=e.multiple,s=Z(t);if(!(n&&!s&&!fn(t))){for(let o=0,l=e.options.length;oString(d)===String(i)):r.selected=co(t,i)>-1}else r.selected=t.has(i);else if(Ut(cn(r),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function cn(e){return"_value"in e?e._value:e.value}function $r(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ya=["ctrl","shift","alt","meta"],ba={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)=>ya.some(n=>e[`${n}Key`]&&!t.includes(n))},Ls=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...l)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const l=Bt(o.key);if(t.some(r=>r===l||wa[r]===l))return e(o)})},xa=Ue({patchProp:ha},Xc);let rl;function Ca(){return rl||(rl=Tc(xa))}const ka=(...e)=>{const t=Ca().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Ea(s);if(!o)return;const l=t._component;!le(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=n(o,!1,Sa(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t};function Sa(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ea(e){return Pe(e)?document.querySelector(e):e}/*! - * pinia v2.3.1 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let Mr;const xs=e=>Mr=e,Dr=Symbol();function Zs(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var On;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(On||(On={}));function Ra(){const e=$l(!0),t=e.run(()=>ne({}));let n=[],s=[];const o=vo({install(l){xs(o),o._a=l,l.provide(Dr,o),l.config.globalProperties.$pinia=o,s.forEach(r=>n.push(r)),s=[]},use(l){return this._a?n.push(l):s.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Lr=()=>{};function il(e,t,n,s=Lr){e.push(t);const o=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),s())};return!n&&Ml()&&fi(o),o}function Zt(e,...t){e.slice().forEach(n=>{n(...t)})}const Aa=e=>e(),cl=Symbol(),js=Symbol();function eo(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];Zs(o)&&Zs(s)&&e.hasOwnProperty(n)&&!Ie(s)&&!Tt(s)?e[n]=eo(o,s):e[n]=s}return e}const Oa=Symbol();function Ta(e){return!Zs(e)||!e.hasOwnProperty(Oa)}const{assign:Dt}=Object;function Pa(e){return!!(Ie(e)&&e.effect)}function Ia(e,t,n,s){const{state:o,actions:l,getters:r}=t,i=n.state.value[e];let c;function d(){i||(n.state.value[e]=o?o():{});const a=Ni(n.state.value[e]);return Dt(a,l,Object.keys(r||{}).reduce((h,g)=>(h[g]=vo(we(()=>{xs(n);const y=n._s.get(e);return r[g].call(y,y)})),h),{}))}return c=jr(e,d,t,n,s,!0),c}function jr(e,t,n={},s,o,l){let r;const i=Dt({actions:{}},n),c={deep:!0};let d,a,h=[],g=[],y;const I=s.state.value[e];!l&&!I&&(s.state.value[e]={});let O;function U(oe){let re;d=a=!1,typeof oe=="function"?(oe(s.state.value[e]),re={type:On.patchFunction,storeId:e,events:y}):(eo(s.state.value[e],oe),re={type:On.patchObject,payload:oe,storeId:e,events:y});const Ce=O=Symbol();Un().then(()=>{O===Ce&&(d=!0)}),a=!0,Zt(h,re,s.state.value[e])}const J=l?function(){const{state:re}=n,Ce=re?re():{};this.$patch(G=>{Dt(G,Ce)})}:Lr;function N(){r.stop(),h=[],g=[],s._s.delete(e)}const K=(oe,re="")=>{if(cl in oe)return oe[js]=re,oe;const Ce=function(){xs(s);const G=Array.from(arguments),Q=[],de=[];function se(ee){Q.push(ee)}function ke(ee){de.push(ee)}Zt(g,{args:G,name:Ce[js],store:$,after:se,onError:ke});let ce;try{ce=oe.apply(this&&this.$id===e?this:$,G)}catch(ee){throw Zt(de,ee),ee}return ce instanceof Promise?ce.then(ee=>(Zt(Q,ee),ee)).catch(ee=>(Zt(de,ee),Promise.reject(ee))):(Zt(Q,ce),ce)};return Ce[cl]=!0,Ce[js]=re,Ce},H={_p:s,$id:e,$onAction:il.bind(null,g),$patch:U,$reset:J,$subscribe(oe,re={}){const Ce=il(h,oe,re.detached,()=>G()),G=r.run(()=>kn(()=>s.state.value[e],Q=>{(re.flush==="sync"?a:d)&&oe({storeId:e,type:On.direct,events:y},Q)},Dt({},c,re)));return Ce},$dispose:N},$=jn(H);s._s.set(e,$);const B=(s._a&&s._a.runWithContext||Aa)(()=>s._e.run(()=>(r=$l()).run(()=>t({action:K}))));for(const oe in B){const re=B[oe];if(Ie(re)&&!Pa(re)||Tt(re))l||(I&&Ta(re)&&(Ie(re)?re.value=I[oe]:eo(re,I[oe])),s.state.value[e][oe]=re);else if(typeof re=="function"){const Ce=K(re,oe);B[oe]=Ce,i.actions[oe]=re}}return Dt($,B),Dt(pe($),B),Object.defineProperty($,"$state",{get:()=>s.state.value[e],set:oe=>{U(re=>{Dt(re,oe)})}}),s._p.forEach(oe=>{Dt($,r.run(()=>oe({store:$,app:s._a,pinia:s,options:i})))}),I&&l&&n.hydrate&&n.hydrate($.$state,I),d=!0,a=!0,$}/*! #__NO_SIDE_EFFECTS__ */function Na(e,t,n){let s,o;const l=typeof t=="function";s=e,o=l?n:t;function r(i,c){const d=Bi();return i=i||(d?it(Dr,null):null),i&&xs(i),i=Mr,i._s.has(s)||(l?jr(s,t,o,i):Ia(s,o,i)),i._s.get(s)}return r.$id=s,r}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */const tn=typeof document<"u";function Vr(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function $a(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Vr(e.default)}const _e=Object.assign;function Vs(e,t){const n={};for(const s in t){const o=t[s];n[s]=pt(o)?o.map(e):e(o)}return n}const Tn=()=>{},pt=Array.isArray;function al(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Ur=/#/g,Ma=/&/g,Da=/\//g,La=/=/g,ja=/\?/g,Fr=/\+/g,Va=/%5B/g,Ua=/%5D/g,Hr=/%5E/g,Fa=/%60/g,Br=/%7B/g,Ha=/%7C/g,Kr=/%7D/g,Ba=/%20/g;function xo(e){return e==null?"":encodeURI(""+e).replace(Ha,"|").replace(Va,"[").replace(Ua,"]")}function Ka(e){return xo(e).replace(Br,"{").replace(Kr,"}").replace(Hr,"^")}function to(e){return xo(e).replace(Fr,"%2B").replace(Ba,"+").replace(Ur,"%23").replace(Ma,"%26").replace(Fa,"`").replace(Br,"{").replace(Kr,"}").replace(Hr,"^")}function Ga(e){return to(e).replace(La,"%3D")}function Wa(e){return xo(e).replace(Ur,"%23").replace(ja,"%3F")}function qa(e){return Wa(e).replace(Da,"%2F")}function Dn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const za=/\/$/,Ja=e=>e.replace(za,"");function Us(e,t,n="/"){let s,o={},l="",r="";const i=t.indexOf("#");let c=t.indexOf("?");return c=i>=0&&c>i?-1:c,c>=0&&(s=t.slice(0,c),l=t.slice(c,i>0?i:t.length),o=e(l.slice(1))),i>=0&&(s=s||t.slice(0,i),r=t.slice(i,t.length)),s=Za(s??t,n),{fullPath:s+l+r,path:s,query:o,hash:Dn(r)}}function Ya(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ul(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Qa(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&an(t.matched[s],n.matched[o])&&Gr(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function an(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Gr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Xa(e[n],t[n]))return!1;return!0}function Xa(e,t){return pt(e)?fl(e,t):pt(t)?fl(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function fl(e,t){return pt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function Za(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let l=n.length-1,r,i;for(r=0;r1&&l--;else break;return n.slice(0,l).join("/")+"/"+s.slice(r).join("/")}const Mt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let no=function(e){return e.pop="pop",e.push="push",e}({}),Fs=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function eu(e){if(!e)if(tn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Ja(e)}const tu=/^[^#]+#/;function nu(e,t){return e.replace(tu,"#")+t}function su(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Cs=()=>({left:window.scrollX,top:window.scrollY});function ou(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=su(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function dl(e,t){return(history.state?history.state.position-t:-1)+e}const so=new Map;function lu(e,t){so.set(e,t)}function ru(e){const t=so.get(e);return so.delete(e),t}function iu(e){return typeof e=="string"||e&&typeof e=="object"}function Wr(e){return typeof e=="string"||typeof e=="symbol"}let Te=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const qr=Symbol("");Te.MATCHER_NOT_FOUND+"",Te.NAVIGATION_GUARD_REDIRECT+"",Te.NAVIGATION_ABORTED+"",Te.NAVIGATION_CANCELLED+"",Te.NAVIGATION_DUPLICATED+"";function un(e,t){return _e(new Error,{type:e,[qr]:!0},t)}function kt(e,t){return e instanceof Error&&qr in e&&(t==null||!!(e.type&t))}const cu=["params","query","hash"];function au(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of cu)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function uu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&to(o)):[s&&to(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function fu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=pt(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const du=Symbol(""),pl=Symbol(""),ks=Symbol(""),Co=Symbol(""),oo=Symbol("");function _n(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function jt(e,t,n,s,o,l=r=>r()){const r=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((i,c)=>{const d=g=>{g===!1?c(un(Te.NAVIGATION_ABORTED,{from:n,to:t})):g instanceof Error?c(g):iu(g)?c(un(Te.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(r&&s.enterCallbacks[o]===r&&typeof g=="function"&&r.push(g),i())},a=l(()=>e.call(s&&s.instances[o],t,n,d));let h=Promise.resolve(a);e.length<3&&(h=h.then(d)),h.catch(g=>c(g))})}function Hs(e,t,n,s,o=l=>l()){const l=[];for(const r of e)for(const i in r.components){let c=r.components[i];if(!(t!=="beforeRouteEnter"&&!r.instances[i]))if(Vr(c)){const d=(c.__vccOpts||c)[t];d&&l.push(jt(d,n,s,r,i,o))}else{let d=c();l.push(()=>d.then(a=>{if(!a)throw new Error(`Couldn't resolve component "${i}" at "${r.path}"`);const h=$a(a)?a.default:a;r.mods[i]=a,r.components[i]=h;const g=(h.__vccOpts||h)[t];return g&&jt(g,n,s,r,i,o)()}))}}return l}function hu(e,t){const n=[],s=[],o=[],l=Math.max(t.matched.length,e.matched.length);for(let r=0;ran(d,i))?s.push(i):n.push(i));const c=e.matched[r];c&&(t.matched.find(d=>an(d,c))||o.push(c))}return[n,s,o]}/*! - * vue-router v4.6.4 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let pu=()=>location.protocol+"//"+location.host;function zr(e,t){const{pathname:n,search:s,hash:o}=t,l=e.indexOf("#");if(l>-1){let r=o.includes(e.slice(l))?e.slice(l).length:1,i=o.slice(r);return i[0]!=="/"&&(i="/"+i),ul(i,"")}return ul(n,e)+s+o}function mu(e,t,n,s){let o=[],l=[],r=null;const i=({state:g})=>{const y=zr(e,location),I=n.value,O=t.value;let U=0;if(g){if(n.value=y,t.value=g,r&&r===I){r=null;return}U=O?g.position-O.position:0}else s(y);o.forEach(J=>{J(n.value,I,{delta:U,type:no.pop,direction:U?U>0?Fs.forward:Fs.back:Fs.unknown})})};function c(){r=n.value}function d(g){o.push(g);const y=()=>{const I=o.indexOf(g);I>-1&&o.splice(I,1)};return l.push(y),y}function a(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(_e({},g.state,{scroll:Cs()}),"")}}function h(){for(const g of l)g();l=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",a),document.removeEventListener("visibilitychange",a)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",a),document.addEventListener("visibilitychange",a),{pauseListeners:c,listen:d,destroy:h}}function ml(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?Cs():null}}function vu(e){const{history:t,location:n}=window,s={value:zr(e,n)},o={value:t.state};o.value||l(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(c,d,a){const h=e.indexOf("#"),g=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+c:pu()+e+c;try{t[a?"replaceState":"pushState"](d,"",g),o.value=d}catch(y){console.error(y),n[a?"replace":"assign"](g)}}function r(c,d){l(c,_e({},t.state,ml(o.value.back,c,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=c}function i(c,d){const a=_e({},o.value,t.state,{forward:c,scroll:Cs()});l(a.current,a,!0),l(c,_e({},ml(s.value,c,null),{position:a.position+1},d),!1),s.value=c}return{location:s,state:o,push:i,replace:r}}function gu(e){e=eu(e);const t=vu(e),n=mu(e,t.state,t.location,t.replace);function s(l,r=!0){r||n.pauseListeners(),history.go(l)}const o=_e({location:"",base:e,go:s,createHref:nu.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function _u(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),gu(e)}let zt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Me=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Me||{});const yu={type:zt.Static,value:""},bu=/[a-zA-Z0-9_]/;function wu(e){if(!e)return[[]];if(e==="/")return[[yu]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${n})/"${d}": ${y}`)}let n=Me.Static,s=n;const o=[];let l;function r(){l&&o.push(l),l=[]}let i=0,c,d="",a="";function h(){d&&(n===Me.Static?l.push({type:zt.Static,value:d}):n===Me.Param||n===Me.ParamRegExp||n===Me.ParamRegExpEnd?(l.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),l.push({type:zt.Param,value:d,regexp:a,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),d="")}function g(){d+=c}for(;it.length?t.length===1&&t[0]===qe.Static+qe.Segment?1:-1:0}function Jr(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const Eu={strict:!1,end:!0,sensitive:!1};function Ru(e,t,n){const s=ku(wu(e.path),n),o=_e(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Au(e,t){const n=[],s=new Map;t=al(Eu,t);function o(h){return s.get(h)}function l(h,g,y){const I=!y,O=yl(h);O.aliasOf=y&&y.record;const U=al(t,h),J=[O];if("alias"in h){const H=typeof h.alias=="string"?[h.alias]:h.alias;for(const $ of H)J.push(yl(_e({},O,{components:y?y.record.components:O.components,path:$,aliasOf:y?y.record:O})))}let N,K;for(const H of J){const{path:$}=H;if(g&&$[0]!=="/"){const Y=g.record.path,B=Y[Y.length-1]==="/"?"":"/";H.path=g.record.path+($&&B+$)}if(N=Ru(H,g,U),y?y.alias.push(N):(K=K||N,K!==N&&K.alias.push(N),I&&h.name&&!bl(N)&&r(h.name)),Yr(N)&&c(N),O.children){const Y=O.children;for(let B=0;B{r(K)}:Tn}function r(h){if(Wr(h)){const g=s.get(h);g&&(s.delete(h),n.splice(n.indexOf(g),1),g.children.forEach(r),g.alias.forEach(r))}else{const g=n.indexOf(h);g>-1&&(n.splice(g,1),h.record.name&&s.delete(h.record.name),h.children.forEach(r),h.alias.forEach(r))}}function i(){return n}function c(h){const g=Pu(h,n);n.splice(g,0,h),h.record.name&&!bl(h)&&s.set(h.record.name,h)}function d(h,g){let y,I={},O,U;if("name"in h&&h.name){if(y=s.get(h.name),!y)throw un(Te.MATCHER_NOT_FOUND,{location:h});U=y.record.name,I=_e(_l(g.params,y.keys.filter(K=>!K.optional).concat(y.parent?y.parent.keys.filter(K=>K.optional):[]).map(K=>K.name)),h.params&&_l(h.params,y.keys.map(K=>K.name))),O=y.stringify(I)}else if(h.path!=null)O=h.path,y=n.find(K=>K.re.test(O)),y&&(I=y.parse(O),U=y.record.name);else{if(y=g.name?s.get(g.name):n.find(K=>K.re.test(g.path)),!y)throw un(Te.MATCHER_NOT_FOUND,{location:h,currentLocation:g});U=y.record.name,I=_e({},g.params,h.params),O=y.stringify(I)}const J=[];let N=y;for(;N;)J.unshift(N.record),N=N.parent;return{name:U,path:O,params:I,matched:J,meta:Tu(J)}}e.forEach(h=>l(h));function a(){n.length=0,s.clear()}return{addRoute:l,resolve:d,removeRoute:r,clearRoutes:a,getRoutes:i,getRecordMatcher:o}}function _l(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function yl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ou(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ou(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function bl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Tu(e){return e.reduce((t,n)=>_e(t,n.meta),{})}function Pu(e,t){let n=0,s=t.length;for(;n!==s;){const l=n+s>>1;Jr(e,t[l])<0?s=l:n=l+1}const o=Iu(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function Iu(e){let t=e;for(;t=t.parent;)if(Yr(t)&&Jr(e,t)===0)return t}function Yr({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function wl(e){const t=it(ks),n=it(Co),s=we(()=>{const c=Vt(e.to);return t.resolve(c)}),o=we(()=>{const{matched:c}=s.value,{length:d}=c,a=c[d-1],h=n.matched;if(!a||!h.length)return-1;const g=h.findIndex(an.bind(null,a));if(g>-1)return g;const y=xl(c[d-2]);return d>1&&xl(a)===y&&h[h.length-1].path!==y?h.findIndex(an.bind(null,c[d-2])):g}),l=we(()=>o.value>-1&&Lu(n.params,s.value.params)),r=we(()=>o.value>-1&&o.value===n.matched.length-1&&Gr(n.params,s.value.params));function i(c={}){if(Du(c)){const d=t[Vt(e.replace)?"replace":"push"](Vt(e.to)).catch(Tn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:we(()=>s.value.href),isActive:l,isExactActive:r,navigate:i}}function Nu(e){return e.length===1?e[0]:e}const $u=rr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:wl,setup(e,{slots:t}){const n=jn(wl(e)),{options:s}=it(ks),o=we(()=>({[Cl(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[Cl(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&Nu(t.default(n));return e.custom?l:Ir("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},l)}}}),Mu=$u;function Du(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Lu(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!pt(o)||o.length!==s.length||s.some((l,r)=>l.valueOf()!==o[r].valueOf()))return!1}return!0}function xl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Cl=(e,t,n)=>e??t??n,ju=rr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=it(oo),o=we(()=>e.route||s.value),l=it(pl,0),r=we(()=>{let d=Vt(l);const{matched:a}=o.value;let h;for(;(h=a[d])&&!h.components;)d++;return d}),i=we(()=>o.value.matched[r.value]);zn(pl,we(()=>r.value+1)),zn(du,i),zn(oo,o);const c=ne();return kn(()=>[c.value,i.value,e.name],([d,a,h],[g,y,I])=>{a&&(a.instances[h]=d,y&&y!==a&&d&&d===g&&(a.leaveGuards.size||(a.leaveGuards=y.leaveGuards),a.updateGuards.size||(a.updateGuards=y.updateGuards))),d&&a&&(!y||!an(a,y)||!g)&&(a.enterCallbacks[h]||[]).forEach(O=>O(d))},{flush:"post"}),()=>{const d=o.value,a=e.name,h=i.value,g=h&&h.components[a];if(!g)return kl(n.default,{Component:g,route:d});const y=h.props[a],I=y?y===!0?d.params:typeof y=="function"?y(d):y:null,U=Ir(g,_e({},I,t,{onVnodeUnmounted:J=>{J.component.isUnmounted&&(h.instances[a]=null)},ref:c}));return kl(n.default,{Component:U,route:d})||U}}});function kl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Vu=ju;function Uu(e){const t=Au(e.routes,e),n=e.parseQuery||uu,s=e.stringifyQuery||hl,o=e.history,l=_n(),r=_n(),i=_n(),c=Ti(Mt);let d=Mt;tn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=Vs.bind(null,C=>""+C),h=Vs.bind(null,qa),g=Vs.bind(null,Dn);function y(C,F){let j,z;return Wr(C)?(j=t.getRecordMatcher(C),z=F):z=C,t.addRoute(z,j)}function I(C){const F=t.getRecordMatcher(C);F&&t.removeRoute(F)}function O(){return t.getRoutes().map(C=>C.record)}function U(C){return!!t.getRecordMatcher(C)}function J(C,F){if(F=_e({},F||c.value),typeof C=="string"){const v=Us(n,C,F.path),x=t.resolve({path:v.path},F),E=o.createHref(v.fullPath);return _e(v,x,{params:g(x.params),hash:Dn(v.hash),redirectedFrom:void 0,href:E})}let j;if(C.path!=null)j=_e({},C,{path:Us(n,C.path,F.path).path});else{const v=_e({},C.params);for(const x in v)v[x]==null&&delete v[x];j=_e({},C,{params:h(v)}),F.params=h(F.params)}const z=t.resolve(j,F),fe=C.hash||"";z.params=a(g(z.params));const f=Ya(s,_e({},C,{hash:Ka(fe),path:z.path})),p=o.createHref(f);return _e({fullPath:f,hash:fe,query:s===hl?fu(C.query):C.query||{}},z,{redirectedFrom:void 0,href:p})}function N(C){return typeof C=="string"?Us(n,C,c.value.path):_e({},C)}function K(C,F){if(d!==C)return un(Te.NAVIGATION_CANCELLED,{from:F,to:C})}function H(C){return B(C)}function $(C){return H(_e(N(C),{replace:!0}))}function Y(C,F){const j=C.matched[C.matched.length-1];if(j&&j.redirect){const{redirect:z}=j;let fe=typeof z=="function"?z(C,F):z;return typeof fe=="string"&&(fe=fe.includes("?")||fe.includes("#")?fe=N(fe):{path:fe},fe.params={}),_e({query:C.query,hash:C.hash,params:fe.path!=null?{}:C.params},fe)}}function B(C,F){const j=d=J(C),z=c.value,fe=C.state,f=C.force,p=C.replace===!0,v=Y(j,z);if(v)return B(_e(N(v),{state:typeof v=="object"?_e({},fe,v.state):fe,force:f,replace:p}),F||j);const x=j;x.redirectedFrom=F;let E;return!f&&Qa(s,z,j)&&(E=un(Te.NAVIGATION_DUPLICATED,{to:x,from:z}),Fe(z,z,!0,!1)),(E?Promise.resolve(E):Ce(x,z)).catch(w=>kt(w)?kt(w,Te.NAVIGATION_GUARD_REDIRECT)?w:je(w):ue(w,x,z)).then(w=>{if(w){if(kt(w,Te.NAVIGATION_GUARD_REDIRECT))return B(_e({replace:p},N(w.to),{state:typeof w.to=="object"?_e({},fe,w.to.state):fe,force:f}),F||x)}else w=Q(x,z,!0,p,fe);return G(x,z,w),w})}function oe(C,F){const j=K(C,F);return j?Promise.reject(j):Promise.resolve()}function re(C){const F=mt.values().next().value;return F&&typeof F.runWithContext=="function"?F.runWithContext(C):C()}function Ce(C,F){let j;const[z,fe,f]=hu(C,F);j=Hs(z.reverse(),"beforeRouteLeave",C,F);for(const v of z)v.leaveGuards.forEach(x=>{j.push(jt(x,C,F))});const p=oe.bind(null,C,F);return j.push(p),Qe(j).then(()=>{j=[];for(const v of l.list())j.push(jt(v,C,F));return j.push(p),Qe(j)}).then(()=>{j=Hs(fe,"beforeRouteUpdate",C,F);for(const v of fe)v.updateGuards.forEach(x=>{j.push(jt(x,C,F))});return j.push(p),Qe(j)}).then(()=>{j=[];for(const v of f)if(v.beforeEnter)if(pt(v.beforeEnter))for(const x of v.beforeEnter)j.push(jt(x,C,F));else j.push(jt(v.beforeEnter,C,F));return j.push(p),Qe(j)}).then(()=>(C.matched.forEach(v=>v.enterCallbacks={}),j=Hs(f,"beforeRouteEnter",C,F,re),j.push(p),Qe(j))).then(()=>{j=[];for(const v of r.list())j.push(jt(v,C,F));return j.push(p),Qe(j)}).catch(v=>kt(v,Te.NAVIGATION_CANCELLED)?v:Promise.reject(v))}function G(C,F,j){i.list().forEach(z=>re(()=>z(C,F,j)))}function Q(C,F,j,z,fe){const f=K(C,F);if(f)return f;const p=F===Mt,v=tn?history.state:{};j&&(z||p?o.replace(C.fullPath,_e({scroll:p&&v&&v.scroll},fe)):o.push(C.fullPath,fe)),c.value=C,Fe(C,F,j,p),je()}let de;function se(){de||(de=o.listen((C,F,j)=>{if(!xt.listening)return;const z=J(C),fe=Y(z,xt.currentRoute.value);if(fe){B(_e(fe,{replace:!0,force:!0}),z).catch(Tn);return}d=z;const f=c.value;tn&&lu(dl(f.fullPath,j.delta),Cs()),Ce(z,f).catch(p=>kt(p,Te.NAVIGATION_ABORTED|Te.NAVIGATION_CANCELLED)?p:kt(p,Te.NAVIGATION_GUARD_REDIRECT)?(B(_e(N(p.to),{force:!0}),z).then(v=>{kt(v,Te.NAVIGATION_ABORTED|Te.NAVIGATION_DUPLICATED)&&!j.delta&&j.type===no.pop&&o.go(-1,!1)}).catch(Tn),Promise.reject()):(j.delta&&o.go(-j.delta,!1),ue(p,z,f))).then(p=>{p=p||Q(z,f,!1),p&&(j.delta&&!kt(p,Te.NAVIGATION_CANCELLED)?o.go(-j.delta,!1):j.type===no.pop&&kt(p,Te.NAVIGATION_ABORTED|Te.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),G(z,f,p)}).catch(Tn)}))}let ke=_n(),ce=_n(),ee;function ue(C,F,j){je(C);const z=ce.list();return z.length?z.forEach(fe=>fe(C,F,j)):console.error(C),Promise.reject(C)}function ut(){return ee&&c.value!==Mt?Promise.resolve():new Promise((C,F)=>{ke.add([C,F])})}function je(C){return ee||(ee=!C,se(),ke.list().forEach(([F,j])=>C?j(C):F()),ke.reset()),C}function Fe(C,F,j,z){const{scrollBehavior:fe}=e;if(!tn||!fe)return Promise.resolve();const f=!j&&ru(dl(C.fullPath,0))||(z||!j)&&history.state&&history.state.scroll||null;return Un().then(()=>fe(C,F,f)).then(p=>p&&ou(p)).catch(p=>ue(p,C,F))}const Ae=C=>o.go(C);let Ye;const mt=new Set,xt={currentRoute:c,listening:!0,addRoute:y,removeRoute:I,clearRoutes:t.clearRoutes,hasRoute:U,getRoutes:O,resolve:J,options:e,push:H,replace:$,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:l.add,beforeResolve:r.add,afterEach:i.add,onError:ce.add,isReady:ut,install(C){C.component("RouterLink",Mu),C.component("RouterView",Vu),C.config.globalProperties.$router=xt,Object.defineProperty(C.config.globalProperties,"$route",{enumerable:!0,get:()=>Vt(c)}),tn&&!Ye&&c.value===Mt&&(Ye=!0,H(o.location).catch(z=>{}));const F={};for(const z in Mt)Object.defineProperty(F,z,{get:()=>c.value[z],enumerable:!0});C.provide(ks,xt),C.provide(Co,Yl(F)),C.provide(oo,c);const j=C.unmount;mt.add(C),C.unmount=function(){mt.delete(C),mt.size<1&&(d=Mt,de&&de(),de=null,c.value=Mt,Ye=!1,ee=!1),j()}}};function Qe(C){return C.reduce((F,j)=>F.then(()=>re(j)),Promise.resolve())}return xt}function Qr(){return it(ks)}function Fu(e){return it(Co)}const Hn=Na("auth",{state:()=>({token:localStorage.getItem("mcbot_token")||"",identity:localStorage.getItem("mcbot_identity")||""}),actions:{set(e,t){this.token=e,this.identity=t||"",localStorage.setItem("mcbot_token",e),localStorage.setItem("mcbot_identity",this.identity)},clear(){this.token="",this.identity="",localStorage.removeItem("mcbot_token"),localStorage.removeItem("mcbot_identity")}}}),Hu={key:0,class:"nav"},Bu={class:"who"},Ku={__name:"App",setup(e){const t=Hn(),n=Fu(),s=Qr(),o=we(()=>n.path!=="/login");function l(){t.clear(),s.push("/login")}return(r,i)=>{const c=Io("router-link"),d=Io("router-view");return k(),S(te,null,[o.value?(k(),S("nav",Hu,[i[3]||(i[3]=u("span",{class:"brand"},"mcbot",-1)),Le(c,{to:"/messages"},{default:qn(()=>[...i[0]||(i[0]=[ge("Messages",-1)])]),_:1}),Le(c,{to:"/packets"},{default:qn(()=>[...i[1]||(i[1]=[ge("Packets",-1)])]),_:1}),Le(c,{to:"/manage"},{default:qn(()=>[...i[2]||(i[2]=[ge("Manage",-1)])]),_:1}),i[4]||(i[4]=u("span",{class:"spacer"},null,-1)),u("span",Bu,A(Vt(t).identity||"authenticated"),1),u("button",{onClick:l},"Log out")])):Re("",!0),Le(d)],64)}}};async function ae(e,t={}){const n=Hn(),s={...t.headers||{}};n.token&&(s.Authorization=`Bearer ${n.token}`),t.json!==void 0&&(s["Content-Type"]="application/json",t={...t,body:JSON.stringify(t.json)},delete t.json);const o=await fetch(`/api${e}`,{...t,headers:s});if(o.status===401)throw n.clear(),location.hash.startsWith("#/login")||(location.hash="#/login"),new Error("unauthorized");if(!o.ok){let l=o.statusText;try{l=(await o.json()).detail||l}catch{}throw new Error(l)}return o.json()}function Xr(e){const t=Hn();return`${location.protocol==="https:"?"wss":"ws"}://${location.host}/api${e}?token=${encodeURIComponent(t.token)}`}const Gu={class:"login-wrap"},Wu={class:"login-card"},qu={key:0,class:"err"},zu=["disabled"],Ju={__name:"Login",setup(e){const t=Hn(),n=Qr(),s=ne(""),o=ne(""),l=ne(""),r=ne(""),i=ne(!1);async function c(){r.value="",i.value=!0;try{const a=await ae("/login",{method:"POST",json:{username:s.value,password:o.value}});t.set(a.token,a.user?`user:${a.user}`:""),n.push("/")}catch(a){r.value=a.message||"login failed"}finally{i.value=!1}}async function d(){if(r.value="",!!l.value.trim()){t.set(l.value.trim(),"");try{const a=await ae("/me");t.set(l.value.trim(),a.identity),n.push("/")}catch{t.clear(),r.value="invalid token"}}}return(a,h)=>(k(),S("div",Gu,[u("div",Wu,[h[3]||(h[3]=u("h2",null,"mcbot admin",-1)),r.value?(k(),S("div",qu,A(r.value),1)):Re("",!0),h[4]||(h[4]=u("label",null,"Username",-1)),Be(u("input",{"onUpdate:modelValue":h[0]||(h[0]=g=>s.value=g),onKeyup:Yn(c,["enter"]),autofocus:""},null,544),[[lt,s.value]]),h[5]||(h[5]=u("label",null,"Password",-1)),Be(u("input",{"onUpdate:modelValue":h[1]||(h[1]=g=>o.value=g),type:"password",onKeyup:Yn(c,["enter"])},null,544),[[lt,o.value]]),u("button",{disabled:i.value,onClick:c},"Log in",8,zu),h[6]||(h[6]=u("label",{style:{"margin-top":"10px"}},"…or paste an API token",-1)),Be(u("input",{"onUpdate:modelValue":h[2]||(h[2]=g=>l.value=g),placeholder:"bearer token",onKeyup:Yn(d,["enter"])},null,544),[[lt,l.value]]),u("button",{onClick:d},"Use token")])]))}},Yu={class:"panes"},Qu={class:"pane",style:{flex:"0 0 170px"}},Xu={class:"body"},Zu=["onClick"],ef={class:"pane",style:{flex:"1"}},tf={key:0,class:"toolbar"},nf={key:0,class:"err"},sf={key:1,class:"muted"},of={class:"body"},lf={key:0,class:"decoded"},rf={class:"kv"},cf={class:"mono"},af={class:"kv"},uf={class:"k"},ff={key:1},df={class:"toolbar"},hf={class:"chk"},pf={class:"chk"},mf=["disabled"],vf={style:{"border-top":"1px solid var(--border, #333)"}},gf={class:"toolbar"},_f=["disabled"],yf={key:0,class:"decoded"},bf={class:"kv"},wf={class:"muted"},xf={class:"mono"},Cf={class:"toolbar"},kf={class:"chk"},Sf={class:"chk"},Ef=["disabled"],Rf={class:"decoded"},Af={style:{margin:"12px 0 4px"}},Of={class:"kv"},Tf={class:"k"},Pf={class:"kv"},If={class:"k mono"},Nf={key:2},$f={class:"toolbar"},Mf={class:"mono muted"},Df=["onClick"],Lf={key:3},jf={class:"toolbar"},Vf={id:"newUserContacts"},Uf=["value"],Ff=["value"],Hf=["disabled"],Bf={class:"mono muted"},Kf=["onChange"],Gf=["value"],Wf={class:"chips"},qf=["onClick"],zf={style:{"white-space":"normal"}},Jf=["onClick"],Yf=["onClick"],Qf=["onClick"],Xf={key:4},Zf={class:"toolbar"},ed={key:0,class:"muted"},td={key:0,class:"muted"},nd=["checked","disabled","onChange"],sd=["onChange"],od=["value"],ld={class:"chips"},rd=["onClick"],id=["disabled","onClick"],cd={key:5},ad=["checked","onChange"],ud=["checked","onChange"],fd=["checked","onChange"],dd=["value","onChange"],hd=["onChange"],pd=["value"],md={class:"chips"},vd={key:0,class:"muted"},gd=["onClick"],_d={key:6},yd={class:"toolbar"},bd={class:"chk"},wd=["checked"],xd=["checked","onChange"],Cd=["disabled"],kd={class:"muted"},Sd={key:0},Ed={key:0},Rd={key:0},Ad={key:0},Od={key:0},Td={key:0},Pd=["checked","onChange"],Id=["title"],Nd={key:7},$d=["title"],Md={key:8,class:"empty"},Dd={__name:"Manage",setup(e){const t=[{key:"stats",label:"Overview"},{key:"radio",label:"Radio"},{key:"contacts",label:"Contacts"},{key:"channels",label:"Channels"},{key:"users",label:"Users"},{key:"groups",label:"Groups"},{key:"command-config",label:"Commands"},{key:"audit",label:"Audit log"}],n=ne("stats"),s=ne({}),o=ne([]),l=ne([]),r=ne([]),i=ne(""),c=ne(""),d=ne({name:"",key:""}),a=ne({name:"",commands:""}),h=ne({sel:"",group:""}),g={stats:"/stats",radio:"/device-info",contacts:"/contacts?limit=500",channels:"/channels",users:"/users",groups:"/groups","command-config":"/command-config",audit:"/audit?limit=200"};function y(_,m){const W=m.items||m;if(_==="command-config"&&Array.isArray(W))for(const ie of W){let b=[];try{b=ie.allowed_channels?JSON.parse(ie.allowed_channels):[]}catch{b=[]}ie._chans=b}return W}async function I(_,m=!1){if(n.value=_,i.value="",c.value="",!(s.value[_]&&!m))try{const W=await ae(g[_]);if(s.value[_]=y(_,W),_==="contacts"&&nt(s.value[_]),(_==="users"||_==="groups"||_==="contacts")&&!o.value.length){const ie=await ae("/groups");o.value=ie.items.map(b=>b.name)}if(_==="users"&&!s.value.contacts){const ie=await ae(g.contacts);s.value.contacts=y("contacts",ie)}if(_==="groups"&&!l.value.length){const ie=await ae("/command-config");l.value=ie.items.map(b=>b.command).sort()}if(_==="command-config"&&!r.value.length){const ie=await ae("/channels");r.value=ie.items.map(b=>b.name)}}catch(W){i.value=W.message}}const O=_=>I(_,!0);async function U(_,m,W=[]){i.value="",c.value="";try{await _,m&&(c.value=m)}catch(ie){i.value=ie.message}for(const ie of W)await O(ie)}function J(_){const m=s.value["command-config"];if(!m)return;const W=m.findIndex(b=>b.command===_.command);if(W===-1)return;let ie=[];try{ie=_.allowed_channels?JSON.parse(_.allowed_channels):[]}catch{ie=[]}m[W]={...m[W],..._,_chans:ie}}async function N(_,m){i.value="",c.value="";try{const W=await ae(`/command-config/${encodeURIComponent(_)}`,{method:"PATCH",json:m});J(W),c.value=`${_}: saved`}catch(W){i.value=W.message,await O("command-config")}}function K(_,m){!m||_._chans.includes(m)||N(_.command,{allowed_channels:[..._._chans,m]})}function H(_,m){N(_.command,{allowed_channels:_._chans.filter(W=>W!==m)})}async function $(){const _={name:d.value.name.trim()};d.value.key.trim()&&(_.key=d.value.key.trim()),_.name&&(await U(ae("/channels",{method:"POST",json:_}),`added ${_.name}`,["channels"]),i.value||(d.value={name:"",key:""}))}function Y(_){confirm(`Remove channel ${_}? This clears its radio slot.`)&&U(ae(`/channels/${encodeURIComponent(_)}`,{method:"DELETE"}),`removed ${_}`,["channels"])}function B(_,m){m&&U(ae(`/users/${_}/groups`,{method:"POST",json:{group:m}}),"group added",["users"])}function oe(_,m){U(ae(`/users/${_}/groups/${encodeURIComponent(m)}`,{method:"DELETE"}),"group removed",["users"])}function re(_,m){const W=prompt("New alias:",m||"");W!==null&&U(ae(`/users/${_}`,{method:"PATCH",json:{name:W}}),"renamed",["users"])}function Ce(_,m){confirm(`Delete user ${m||_.slice(0,12)} from the bot?`)&&U(ae(`/users/${_}`,{method:"DELETE"}),"deleted",["users"])}function G(_){const m=(_.groups||[]).includes("blocked"),W=m?ae(`/users/${_.pubkey}/block`,{method:"DELETE"}):ae(`/users/${_.pubkey}/block`,{method:"POST"});U(W,m?"unblocked":"blocked",["users"])}async function Q(){const _=a.value.name.trim();if(!_)return;const m=a.value.commands.split(",").map(W=>W.trim()).filter(Boolean);await U(ae("/groups",{method:"POST",json:{name:_,commands:m}}),`group ${_} created`,["groups"]),i.value||(a.value={name:"",commands:""})}function de(_){confirm(`Delete group ${_}?`)&&U(ae(`/groups/${encodeURIComponent(_)}`,{method:"DELETE"}),"deleted",["groups"])}function se(_,m){m&&U(ae(`/groups/${encodeURIComponent(_)}/commands`,{method:"POST",json:{command:m}}),`granted ${m} to ${_}`,["groups"])}function ke(_,m){m&&U(ae(`/groups/${encodeURIComponent(_)}/commands/${encodeURIComponent(m)}`,{method:"DELETE"}),`revoked ${m} from ${_}`,["groups"])}function ce(_,m){U(ae(`/groups/${encodeURIComponent(_)}/all-users`,{method:m?"POST":"DELETE"}),m?`${_}: now includes all users`:`${_}: explicit members only`,["groups"])}const ee=ne("zero"),ue=ne(!1);async function ut(){ue.value||(ue.value=!0,await U(ae("/radio/advert",{method:"POST",json:{flood:ee.value==="flood"}}),`${ee.value==="flood"?"flood":"zero-hop"} advert sent`),ue.value=!1)}const je=ne(null),Fe=ne(!1),Ae=ne(!1),Ye=ne({enabled:!0,headroom:8});async function mt(){if(!Fe.value){Fe.value=!0,i.value="";try{const _=await ae("/radio/contacts-status");je.value=_,Ye.value={enabled:_.policy.enabled,headroom:_.policy.headroom}}catch(_){i.value=_.message}Fe.value=!1}}async function xt(){await U(ae("/radio/contacts-policy",{method:"POST",json:{enabled:Ye.value.enabled,headroom:Number(Ye.value.headroom)}}),"Eviction policy updated (runtime only — set radio_evict_* in mcbot.conf to persist)"),await mt()}async function Qe(){if(!Ae.value){Ae.value=!0,i.value="",c.value="";try{const _=await ae("/radio/evict-contacts",{method:"POST",json:{dry_run:!0}}),m=_.evicted||[];if(!m.length){c.value=`Nothing to evict (used ${_.used}/${_.max??"?"}).`,Ae.value=!1;return}const W=m.map($e=>$e.name||$e.pubkey.slice(0,12)),ie=W.slice(0,20).join(` -`),b=W.length>20?` -…and ${W.length-20} more`:"";if(!confirm(`Evict ${m.length} stale contact(s) from the radio? - -${ie}${b}`)){Ae.value=!1;return}const L=await ae("/radio/evict-contacts",{method:"POST",json:{}});c.value=`Evicted ${L.evicted.length} contact(s)`+(L.failed?`, ${L.failed} failed`:"")+(L.shortfall?`, ${L.shortfall} short (protected)`:"")}catch(_){i.value=_.message}Ae.value=!1,await mt()}}const C=[{title:"Identity",keys:[["self_info.name","Name"],["self_info.public_key","Public key",{mono:!0}],["device_info.model","Model"],["device_info.ver","Firmware version"],["device_info.fw ver","Firmware code"],["device_info.fw_build","Firmware build"]]},{title:"Radio",keys:[["self_info.radio_freq","Frequency",{unit:"MHz"}],["self_info.radio_bw","Bandwidth",{unit:"kHz"}],["self_info.radio_sf","Spreading factor"],["self_info.radio_cr","Coding rate"],["self_info.tx_power","TX power",{unit:"dBm"}],["self_info.max_tx_power","Max TX power",{unit:"dBm"}],["device_info.path_hash_mode","Out path-hash mode",{fmt:_=>`${Number(_)+1} byte(s)/hop`}]]},{title:"Advertising",keys:[["self_info.adv_type","Advertised type"],["self_info.adv_lat","Latitude"],["self_info.adv_lon","Longitude"],["self_info.adv_loc_policy","Location-share policy"]]},{title:"Capacity",keys:[["device_info.max_channels","Max channels"],["device_info.max_contacts","Max contacts"]]},{title:"Battery / memory",keys:[["battery.level","Battery",{unit:"mV"}],["battery.total_kb","Total memory",{unit:"kB"}],["battery.used_kb","Used memory",{unit:"kB"}]]},{title:"Other",keys:[["device_info.ble_pin","BLE PIN"],["device_info.repeat","Repeater mode"],["self_info.manual_add_contacts","Manual contact add"],["self_info.multi_acks","Multi-acks"],["self_info.telemetry_mode_base","Telemetry: base"],["self_info.telemetry_mode_env","Telemetry: env"],["self_info.telemetry_mode_loc","Telemetry: location"]]}],F=new Set(C.flatMap(_=>_.keys.map(m=>m[0])));function j(_){if(_==null)return null;try{return JSON.parse(_)}catch{return _}}function z(_,m){const W=j(_.value);if(W==null||W==="")return"";if(m!=null&&m.fmt)return m.fmt(W);let ie=typeof W=="object"?JSON.stringify(W):String(W);return m!=null&&m.unit&&(ie=`${ie} ${m.unit}`),ie}const fe=we(()=>{const _=new Map;for(const m of s.value.radio||[])_.set(m.key,m);return _}),f=we(()=>[...s.value.radio||[]].filter(_=>!F.has(_.key)).sort((_,m)=>_.key.localeCompare(m.key))),p={1:"Comp",2:"Rptr",3:"Room",4:"Sens"};function v(_){return _==null?"?":p[_]||String(_)}function x(_){return _&&_.length>14?`${_.slice(0,6)}...${_.slice(-6)}`:_||""}function E(_){if(!_)return"";const m=new Date(_*1e3),W=ie=>String(ie).padStart(2,"0");return`${m.getFullYear()}-${W(m.getMonth()+1)}-${W(m.getDate())} ${W(m.getHours())}:${W(m.getMinutes())}`}const w=we(()=>o.value.filter(_=>_!=="public"&&_!=="blocked"));function M(_){return`${_.adv_name||"(unnamed)"} — ${_.public_key}`}function P(){const _=h.value.sel.trim();if(!_)return"";const m=(s.value.contacts||[]).find(W=>M(W)===_);return m?m.public_key:/^[0-9a-fA-F]{64}$/.test(_)?_.toLowerCase():""}async function T(){const _=P();if(!_){alert("Pick a contact from the list (or paste a 64-hex pubkey).");return}if(!h.value.group){alert("Choose an initial group.");return}i.value="",c.value="";try{await ae("/users",{method:"POST",json:{pubkey:_,group:h.value.group}}),c.value=`bot user created and added to ${h.value.group}`,h.value={sel:"",group:""},await O("users")}catch(m){alert(m.message)}}const R=ne(""),q=ne(new Set),D=ne(new Set),V=ne({col:"adv_name",dir:"asc"}),X=ne(new Set),he=we(()=>[...D.value].sort()),be=we(()=>q.value.size===0),ve=_=>!q.value.has(_);function Oe(_){q.value=_?new Set:new Set(D.value)}function Ne(_,m){const W=new Set(q.value);m?W.delete(_):W.add(_),q.value=W}function nt(_){let m=null;for(const W of _){const ie=v(W.type);D.value.has(ie)||(m=m||new Set(D.value),m.add(ie))}m&&(D.value=m)}function Ve(_){V.value.col===_?V.value={col:_,dir:V.value.dir==="asc"?"desc":"asc"}:V.value={col:_,dir:"asc"}}function Kt(_){const m=new Set(X.value);m.has(_)?m.delete(_):m.add(_),X.value=m}const Qt=we(()=>(s.value.contacts||[]).filter(_=>X.value.has(_.public_key))),He=we(()=>Qt.value.length>0);async function st(){const _=Qt.value;if(!_.length)return;const m=_.map(ot=>ot.adv_name||ot.public_key.slice(0,12)),W=m.slice(0,20).join(` -`),ie=m.length>20?` -…and ${m.length-20} more`:"";if(!confirm(`Delete ${_.length} contact(s)? - -${W}${ie}`))return;i.value="",c.value="";let b=0,L=0,$e="";for(const ot of _)try{await ae(`/contacts/${encodeURIComponent(ot.public_key)}`,{method:"DELETE"}),b++}catch(Ss){L++,$e=`${Ss.message} (${ot.adv_name||ot.public_key.slice(0,12)})`}X.value=new Set,await O("contacts"),c.value=L?`Deleted ${b}, ${L} failed`:`Deleted ${b} contact(s)`,$e&&(i.value=$e)}const dn=we(()=>{const _=s.value.contacts||[],m=R.value.toLowerCase().trim(),W=q.value,ie=_.filter(ot=>W.size&&W.has(v(ot.type))?!1:m?(ot.public_key||"").toLowerCase().includes(m)||(ot.adv_name||"").toLowerCase().includes(m):!0),{col:b,dir:L}=V.value,$e=L==="asc"?1:-1;return ie.sort((ot,Ss)=>{const pn=ot[b],mn=Ss[b];return pn==null&&mn==null?0:pn==null?1:mn==null?-1:typeof pn=="number"&&typeof mn=="number"?(pn-mn)*$e:String(pn).localeCompare(String(mn))*$e}),ie});function hn(_){return _&&_.length?Object.keys(_[0]).filter(m=>!m.startsWith("_")):[]}function ko(_){return _==null?"":Array.isArray(_)?_.join(", "):typeof _=="object"?JSON.stringify(_):String(_)}return gs(()=>I("stats")),(_,m)=>{var W,ie;return k(),S("div",Yu,[u("div",Qu,[m[18]||(m[18]=u("h3",null,"Manage",-1)),u("div",Xu,[u("table",null,[u("tbody",null,[(k(),S(te,null,me(t,b=>u("tr",{key:b.key,class:rt(["clickable",{selected:n.value===b.key}]),onClick:L=>I(b.key)},[u("td",null,A(b.label),1)],10,Zu)),64))])])])]),u("div",ef,[u("h3",null,A((W=t.find(b=>b.key===n.value))==null?void 0:W.label),1),i.value||c.value?(k(),S("div",tf,[i.value?(k(),S("span",nf,A(i.value),1)):Re("",!0),c.value?(k(),S("span",sf,A(c.value),1)):Re("",!0)])):Re("",!0),u("div",of,[n.value==="stats"&&s.value.stats?(k(),S("div",lf,[u("div",rf,[m[19]||(m[19]=u("div",{class:"k"},"identity",-1)),u("div",cf,A(((ie=s.value.stats.identity)==null?void 0:ie.pubkey)||"—"),1),m[20]||(m[20]=u("div",{class:"k"},"events seen",-1)),u("div",null,A(s.value.stats.event_count),1),m[21]||(m[21]=u("div",{class:"k"},"commands loaded",-1)),u("div",null,A(s.value.stats.commands_loaded),1)]),m[22]||(m[22]=u("h4",null,"Counts",-1)),u("div",af,[(k(!0),S(te,null,me(s.value.stats.counts,(b,L)=>(k(),S(te,{key:L},[u("div",uf,A(L),1),u("div",null,A(b),1)],64))),128))])])):n.value==="radio"?(k(),S("div",ff,[u("div",df,[u("label",hf,[Be(u("input",{type:"radio",value:"zero","onUpdate:modelValue":m[0]||(m[0]=b=>ee.value=b)},null,512),[[ol,ee.value]]),m[23]||(m[23]=ge(" Zero hop ",-1))]),u("label",pf,[Be(u("input",{type:"radio",value:"flood","onUpdate:modelValue":m[1]||(m[1]=b=>ee.value=b)},null,512),[[ol,ee.value]]),m[24]||(m[24]=ge(" Flood ",-1))]),u("button",{disabled:ue.value,onClick:ut},A(ue.value?"Sending…":"Advert"),9,mf),m[25]||(m[25]=u("span",{class:"muted"}," Zero-hop reaches direct neighbors only; flood propagates through the mesh. ",-1))]),u("div",vf,[u("div",gf,[m[26]||(m[26]=u("strong",null,"Contact table",-1)),u("button",{disabled:Fe.value,onClick:mt},A(Fe.value?"Checking…":"Check contact table"),9,_f),m[27]||(m[27]=u("span",{class:"muted"},"Reads the radio's contact list (takes a few seconds).",-1))]),je.value?(k(),S("div",yf,[u("div",bf,[m[28]||(m[28]=u("div",{class:"k"},"Used / max",-1)),u("div",null,[ge(A(je.value.used)+" / "+A(je.value.max??"?")+" ",1),u("span",wf,"("+A(je.value.free??"?")+" free)",1)]),m[29]||(m[29]=u("div",{class:"k"},"Protected / evictable",-1)),u("div",null,A(je.value.protected)+" protected, "+A(je.value.eligible)+" evictable",1),m[30]||(m[30]=u("div",{class:"k"},"Firmware autoadd byte",-1)),u("div",xf,A(je.value.autoadd_raw??"n/a"),1)]),u("div",Cf,[u("label",kf,[Be(u("input",{type:"checkbox","onUpdate:modelValue":m[2]||(m[2]=b=>Ye.value.enabled=b)},null,512),[[ga,Ye.value.enabled]]),m[31]||(m[31]=ge(" Auto-evict (startup + when full) ",-1))]),u("label",Sf,[m[32]||(m[32]=ge(" Headroom ",-1)),Be(u("input",{type:"number",min:"1",max:"100","onUpdate:modelValue":m[3]||(m[3]=b=>Ye.value.headroom=b),style:{width:"4em"}},null,512),[[lt,Ye.value.headroom,void 0,{number:!0}]])]),u("button",{onClick:xt},"Apply"),u("button",{disabled:Ae.value,onClick:Qe},A(Ae.value?"Evicting…":"Evict to headroom now"),9,Ef)]),m[33]||(m[33]=u("p",{class:"muted",style:{margin:"4px 12px 8px"}}," Evicts the stalest contacts from the radio (bot users, owners, and recent DM peers are protected; the bot's database keeps the full archive). Policy changes here are runtime only — set radio_evict_* in mcbot.conf to persist across restarts. ",-1))])):Re("",!0)]),u("div",Rf,[(k(),S(te,null,me(C,b=>(k(),S(te,{key:b.title},[u("h4",Af,A(b.title),1),u("div",Of,[(k(!0),S(te,null,me(b.keys,L=>{var $e;return k(),S(te,{key:L[0]},[u("div",Tf,A(L[1]),1),u("div",{class:rt({mono:($e=L[2])==null?void 0:$e.mono})},A(z(fe.value.get(L[0])||{},L[2])||"—"),3)],64)}),128))])],64))),64)),f.value.length?(k(),S(te,{key:0},[m[34]||(m[34]=u("h4",{style:{margin:"12px 0 4px"}},"Unrecognized",-1)),u("div",Pf,[(k(!0),S(te,null,me(f.value,b=>(k(),S(te,{key:b.key},[u("div",If,A(b.key),1),u("div",null,A(z(b)||"—"),1)],64))),128))])],64)):Re("",!0)])])):n.value==="channels"?(k(),S("div",Nf,[u("div",$f,[Be(u("input",{"onUpdate:modelValue":m[4]||(m[4]=b=>d.value.name=b),placeholder:"name (e.g. #bot or MyChan)",style:{flex:"1"}},null,512),[[lt,d.value.name]]),Be(u("input",{"onUpdate:modelValue":m[5]||(m[5]=b=>d.value.key=b),placeholder:"hex key (non-# only)",style:{flex:"1"}},null,512),[[lt,d.value.key]]),u("button",{onClick:$},"Add channel")]),u("table",null,[m[35]||(m[35]=u("thead",null,[u("tr",null,[u("th",null,"idx"),u("th",null,"name"),u("th",null,"secret"),u("th")])],-1)),u("tbody",null,[(k(!0),S(te,null,me(s.value.channels,b=>(k(),S("tr",{key:b.channel_idx},[u("td",null,A(b.channel_idx),1),u("td",null,A(b.name),1),u("td",Mf,A((b.secret_hex||"").slice(0,12))+"…",1),u("td",null,[u("button",{onClick:L=>Y(b.name)},"remove",8,Df)])]))),128))])])])):n.value==="users"?(k(),S("div",Lf,[u("div",jf,[Be(u("input",{"onUpdate:modelValue":m[6]||(m[6]=b=>h.value.sel=b),list:"newUserContacts",placeholder:"add bot user: search a contact…",style:{flex:"0 0 320px"}},null,512),[[lt,h.value.sel]]),u("datalist",Vf,[(k(!0),S(te,null,me(s.value.contacts||[],b=>(k(),S("option",{key:b.public_key,value:M(b)},null,8,Uf))),128))]),Be(u("select",{"onUpdate:modelValue":m[7]||(m[7]=b=>h.value.group=b)},[m[36]||(m[36]=u("option",{value:""},"initial group…",-1)),(k(!0),S(te,null,me(w.value,b=>(k(),S("option",{key:b,value:b},A(b),9,Ff))),128))],512),[[_a,h.value.group]]),u("button",{disabled:!P()||!h.value.group,onClick:T}," Add bot user ",8,Hf)]),u("table",null,[m[38]||(m[38]=u("thead",null,[u("tr",null,[u("th",null,"name"),u("th",null,"pubkey"),u("th",{style:{width:"130px"}},"add group"),u("th",null,"groups"),u("th",null,"actions")])],-1)),u("tbody",null,[(k(!0),S(te,null,me(s.value.users,b=>(k(),S("tr",{key:b.pubkey},[u("td",null,A(b.name||"?"),1),u("td",Bf,A(b.pubkey.slice(0,12)),1),u("td",null,[u("select",{onChange:L=>{B(b.pubkey,L.target.value),L.target.value=""}},[m[37]||(m[37]=u("option",{value:""},"+ group…",-1)),(k(!0),S(te,null,me(o.value,L=>(k(),S("option",{key:L,value:L},A(L),9,Gf))),128))],40,Kf)]),u("td",Wf,[(k(!0),S(te,null,me(b.groups,L=>(k(),S("span",{key:L,class:"tag"},[ge(A(L)+" ",1),u("a",{href:"#",onClick:Ls($e=>oe(b.pubkey,L),["prevent"]),title:"remove"},"×",8,qf)]))),128))]),u("td",zf,[u("button",{onClick:L=>re(b.pubkey,b.name)},"rename",8,Jf),u("button",{onClick:L=>G(b)},A((b.groups||[]).includes("blocked")?"unblock":"block"),9,Yf),u("button",{onClick:L=>Ce(b.pubkey,b.name)},"delete",8,Qf)])]))),128))])])])):n.value==="groups"?(k(),S("div",Xf,[u("div",Zf,[Be(u("input",{"onUpdate:modelValue":m[8]||(m[8]=b=>a.value.name=b),placeholder:"new group name"},null,512),[[lt,a.value.name]]),Be(u("input",{"onUpdate:modelValue":m[9]||(m[9]=b=>a.value.commands=b),placeholder:"commands (comma list, optional)",style:{flex:"1"}},null,512),[[lt,a.value.commands]]),u("button",{onClick:Q},"Create group")]),u("table",null,[m[41]||(m[41]=u("thead",null,[u("tr",null,[u("th",null,"name"),u("th",null,"users"),u("th",{title:"Every user is a member (the * membership)"},"all users"),u("th",{style:{width:"150px"}},"grant command"),u("th",null,"commands"),u("th")])],-1)),u("tbody",null,[(k(!0),S(te,null,me(s.value.groups,b=>(k(),S("tr",{key:b.name},[u("td",null,[ge(A(b.name),1),b.is_system?(k(),S("span",ed," [sys]")):Re("",!0)]),u("td",null,[ge(A(b.nusers),1),b.all_users?(k(),S("span",td," +*")):Re("",!0)]),u("td",null,[u("input",{type:"checkbox",checked:b.all_users,disabled:b.name==="blocked",title:"Include all users (*) in this group",onChange:L=>ce(b.name,L.target.checked)},null,40,nd)]),u("td",null,[u("select",{onChange:L=>{se(b.name,L.target.value),L.target.value=""}},[m[39]||(m[39]=u("option",{value:""},"+ command…",-1)),m[40]||(m[40]=u("option",{value:"*"},"* (all commands)",-1)),(k(!0),S(te,null,me(l.value,L=>(k(),S("option",{key:L,value:L},A(L),9,od))),128))],40,sd)]),u("td",ld,[(k(!0),S(te,null,me(b.commands,L=>(k(),S("span",{key:L,class:"tag"},[ge(A(L)+" ",1),u("a",{href:"#",onClick:Ls($e=>ke(b.name,L),["prevent"]),title:"revoke"},"×",8,rd)]))),128))]),u("td",null,[u("button",{disabled:b.is_system,onClick:L=>de(b.name)},"delete",8,id)])]))),128))])])])):n.value==="command-config"?(k(),S("div",cd,[u("table",null,[m[43]||(m[43]=u("thead",null,[u("tr",null,[u("th",null,"command"),u("th",null,"enabled"),u("th",null,"allow_dm"),u("th",null,"dm_only"),u("th",null,"cooldown"),u("th",{style:{width:"140px"}},"allow channel"),u("th",null,"allowed channels")])],-1)),u("tbody",null,[(k(!0),S(te,null,me(s.value["command-config"],b=>(k(),S("tr",{key:b.command},[u("td",null,A(b.command),1),u("td",null,[u("input",{type:"checkbox",checked:!!b.enabled,onChange:L=>N(b.command,{enabled:L.target.checked})},null,40,ad)]),u("td",null,[u("input",{type:"checkbox",checked:!!b.allow_dm,onChange:L=>N(b.command,{allow_dm:L.target.checked})},null,40,ud)]),u("td",null,[u("input",{type:"checkbox",checked:!!b.dm_only,onChange:L=>N(b.command,{dm_only:L.target.checked})},null,40,fd)]),u("td",null,[u("input",{type:"number",value:b.cooldown_seconds,style:{width:"64px"},onChange:L=>N(b.command,{cooldown_seconds:Number(L.target.value)})},null,40,dd)]),u("td",null,[u("select",{onChange:L=>{K(b,L.target.value),L.target.value=""}},[m[42]||(m[42]=u("option",{value:""},"+ channel…",-1)),(k(!0),S(te,null,me(r.value,L=>(k(),S("option",{key:L,value:L},A(L),9,pd))),128))],40,hd)]),u("td",md,[b._chans.length?Re("",!0):(k(),S("span",vd,"(any)")),(k(!0),S(te,null,me(b._chans,L=>(k(),S("span",{key:L,class:"tag"},[ge(A(L)+" ",1),u("a",{href:"#",onClick:Ls($e=>H(b,L),["prevent"]),title:"remove"},"×",8,gd)]))),128))])]))),128))])])])):n.value==="contacts"?(k(),S("div",_d,[u("div",yd,[Be(u("input",{"onUpdate:modelValue":m[10]||(m[10]=b=>R.value=b),placeholder:"search name or pubkey…",style:{flex:"0 0 260px"}},null,512),[[lt,R.value]]),u("label",bd,[u("input",{type:"checkbox",checked:be.value,onChange:m[11]||(m[11]=b=>Oe(b.target.checked))},null,40,wd),m[44]||(m[44]=ge(" All ",-1))]),(k(!0),S(te,null,me(he.value,b=>(k(),S("label",{key:b,class:"chk"},[u("input",{type:"checkbox",checked:ve(b),onChange:L=>Ne(b,L.target.checked)},null,40,xd),ge(" "+A(b),1)]))),128)),u("button",{disabled:!He.value,onClick:st}," Delete"+A(He.value?` (${Qt.value.length})`:""),9,Cd),u("span",kd,A(dn.value.length)+" shown",1)]),u("table",null,[u("thead",null,[u("tr",null,[m[51]||(m[51]=u("th",{style:{width:"24px"}},null,-1)),u("th",{class:"sortable",onClick:m[12]||(m[12]=b=>Ve("public_key"))},[m[45]||(m[45]=ge(" pubkey",-1)),V.value.col==="public_key"?(k(),S("span",Sd,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),u("th",{class:"sortable",onClick:m[13]||(m[13]=b=>Ve("adv_name"))},[m[46]||(m[46]=ge(" name",-1)),V.value.col==="adv_name"?(k(),S("span",Ed,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),u("th",{class:"sortable",onClick:m[14]||(m[14]=b=>Ve("type"))},[m[47]||(m[47]=ge(" type",-1)),V.value.col==="type"?(k(),S("span",Rd,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),u("th",{class:"sortable",onClick:m[15]||(m[15]=b=>Ve("adv_lat"))},[m[48]||(m[48]=ge(" lat",-1)),V.value.col==="adv_lat"?(k(),S("span",Ad,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),u("th",{class:"sortable",onClick:m[16]||(m[16]=b=>Ve("adv_lon"))},[m[49]||(m[49]=ge(" lon",-1)),V.value.col==="adv_lon"?(k(),S("span",Od,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),u("th",{class:"sortable",onClick:m[17]||(m[17]=b=>Ve("last_synced_at"))},[m[50]||(m[50]=ge(" last synced",-1)),V.value.col==="last_synced_at"?(k(),S("span",Td,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)])])]),u("tbody",null,[(k(!0),S(te,null,me(dn.value,b=>(k(),S("tr",{key:b.public_key},[u("td",null,[u("input",{type:"checkbox",checked:X.value.has(b.public_key),onChange:L=>Kt(b.public_key)},null,40,Pd)]),u("td",{class:"mono",title:b.public_key},A(x(b.public_key)),9,Id),u("td",null,A(b.adv_name||""),1),u("td",null,A(v(b.type)),1),u("td",null,A(b.adv_lat??""),1),u("td",null,A(b.adv_lon??""),1),u("td",null,A(E(b.last_synced_at)),1)]))),128))])])])):Array.isArray(s.value[n.value])?(k(),S("table",Nd,[u("thead",null,[u("tr",null,[(k(!0),S(te,null,me(hn(s.value[n.value]),b=>(k(),S("th",{key:b},A(b),1))),128))])]),u("tbody",null,[(k(!0),S(te,null,me(s.value[n.value],(b,L)=>(k(),S("tr",{key:L},[(k(!0),S(te,null,me(hn(s.value[n.value]),$e=>(k(),S("td",{key:$e,title:ko(b[$e])},A(ko(b[$e])),9,$d))),128))]))),128))])])):(k(),S("div",Md,"loading…"))])])])}}},Ld={class:"panes"},jd={class:"side-col"},Vd={class:"pane",style:{flex:"1 1 0","min-height":"160px"}},Ud={class:"body"},Fd=["onClick"],Hd={class:"muted"},Bd={class:"pane",style:{flex:"1 1 0","min-height":"200px"}},Kd={class:"toolbar"},Gd={class:"body"},Wd=["onClick"],qd={class:"muted mono"},zd={class:"pane",style:{flex:"1"}},Jd={key:0,class:"err",style:{padding:"10px"}},Yd={key:1,class:"empty"},Qd={class:"meta"},Xd={class:"who"},Zd={key:0},eh=["href"],th={key:1,class:"mention"},nh={class:"toolbar"},sh=["placeholder","disabled"],oh=["disabled"],lh={key:0,class:"err",style:{padding:"0 12px 8px"}},rh={__name:"Messages",setup(e){const t=ne([]),n=ne(null),s=ne(null),o=ne([]),l=ne(null),r=ne([]),i=ne(""),c=ne(""),d=ne(""),a=ne(!1),h=ne("");let g=null;const y=we(()=>{const G=i.value.toLowerCase();return G?r.value.filter(Q=>(Q.adv_name||"").toLowerCase().includes(G)||(Q.public_key||"").toLowerCase().includes(G)):r.value}),I=we(()=>{if(typeof n.value=="number"){const G=t.value.find(Q=>Q.channel_idx===n.value);return{kind:"channel",idx:n.value,label:(G==null?void 0:G.name)||`#${n.value}`}}return n.value==="dm"&&s.value?{kind:"dm",pubkey:s.value.public_key,label:s.value.adv_name||s.value.public_key.slice(0,12)}:null}),O=we(()=>I.value?`Message ${I.value.label}…`:"Pick a channel or a contact to send to…");async function U(){t.value=(await ae("/channels")).items,n.value===null&&t.value.length&&K(t.value[0].channel_idx)}async function J(){r.value=(await ae("/contacts?limit=500")).items}async function N(){await Un();const G=l.value;G&&(G.scrollTop=G.scrollHeight)}async function K(G){n.value=G,s.value=null;const Q=await ae(`/channel-messages?channel_idx=${G}&limit=100`);o.value=Q.items.slice().reverse(),await N()}async function H(){n.value="dm",s.value=null;const G=await ae("/direct-messages?limit=100");o.value=G.items.slice().reverse(),await N()}async function $(G){n.value="dm",s.value=G;const Q=await ae(`/direct-messages?pubkey=${encodeURIComponent(G.public_key)}&limit=100`);o.value=Q.items.slice().reverse(),await N()}async function Y(){const G=d.value.trim();if(!(!G||!I.value||a.value)){a.value=!0,h.value="";try{I.value.kind==="channel"?await ae("/send/channel",{method:"POST",json:{channel_idx:I.value.idx,text:G}}):await ae("/send/dm",{method:"POST",json:{pubkey:I.value.pubkey,text:G}}),d.value=""}catch(Q){h.value=Q.message}finally{a.value=!1}}}function B(G){return G?new Date(G*1e3).toLocaleTimeString():""}function oe(G,Q){if(!G||!Q)return G||"";const de=`${Q}: `;return G.startsWith(de)?G.slice(de.length):G}const re=/(https?:\/\/[^\s<>]+)|@\[([^\]]+)\]/g;function Ce(G){const Q=oe(G.text,G.sender_name),de=[];let se=0,ke;for(re.lastIndex=0;(ke=re.exec(Q))!==null;){if(ke.index>se&&de.push({type:"text",value:Q.slice(se,ke.index)}),ke[1]){const ce=ke[1].match(/^(.*?)([.,;:!?)]+)$/);ce?(de.push({type:"link",value:ce[1]}),de.push({type:"text",value:ce[2]})):de.push({type:"link",value:ke[1]})}else de.push({type:"mention",value:ke[2]});se=re.lastIndex}return se{try{await U(),await J()}catch(G){c.value=G.message}g=new WebSocket(Xr("/ws/messages")),g.onmessage=G=>{const Q=JSON.parse(G.data),de=l.value,se=de?de.scrollHeight-de.scrollTop-de.clientHeight<60:!0;let ke=!1;n.value==="dm"&&Q.kind==="dm"?(!s.value||Q.sender_pubkey===s.value.public_key)&&(o.value.push(Q),ke=!0):Q.kind==="channel"&&Q.channel_idx===n.value&&(o.value.push(Q),ke=!0),o.value.length>300&&o.value.shift(),ke&&se&&N()}}),_s(()=>g&&g.close()),(G,Q)=>{var de;return k(),S("div",Ld,[u("div",jd,[u("div",Vd,[Q[3]||(Q[3]=u("h3",null,"Channels",-1)),u("div",Ud,[u("table",null,[u("tbody",null,[(k(!0),S(te,null,me(t.value,se=>(k(),S("tr",{key:se.channel_idx,class:rt(["clickable",{selected:n.value===se.channel_idx}]),onClick:ke=>K(se.channel_idx)},[u("td",null,[ge(A(se.name)+" ",1),u("span",Hd,"#"+A(se.channel_idx),1)])],10,Fd))),128)),u("tr",{class:rt(["clickable",{selected:n.value==="dm"&&!s.value}]),onClick:H},[...Q[2]||(Q[2]=[u("td",null,"✉ Direct messages",-1)])],2)])])])]),u("div",Bd,[u("h3",null,"Contacts ("+A(r.value.length)+")",1),u("div",Kd,[Be(u("input",{"onUpdate:modelValue":Q[0]||(Q[0]=se=>i.value=se),placeholder:"search",style:{flex:"1"}},null,512),[[lt,i.value]])]),u("div",Gd,[u("table",null,[u("tbody",null,[(k(!0),S(te,null,me(y.value,se=>(k(),S("tr",{key:se.public_key,class:rt(["clickable",{selected:s.value&&s.value.public_key===se.public_key}]),onClick:ke=>$(se),title:"Open a DM conversation with this contact"},[u("td",null,[ge(A(se.adv_name||"(unnamed)"),1),Q[4]||(Q[4]=u("br",null,null,-1)),u("span",qd,A(se.public_key.slice(0,12)),1)])],10,Wd))),128))])])])])]),u("div",zd,[u("h3",null,A(n.value==="dm"?s.value?`DM · ${s.value.adv_name||s.value.public_key.slice(0,12)}`:"Direct messages":((de=t.value.find(se=>se.channel_idx===n.value))==null?void 0:de.name)||"Messages"),1),u("div",{class:"body",ref_key:"msgBody",ref:l},[c.value?(k(),S("div",Jd,A(c.value),1)):Re("",!0),o.value.length?Re("",!0):(k(),S("div",Yd,"no messages")),(k(!0),S(te,null,me(o.value,se=>{var ke;return k(),S("div",{key:se.id,class:rt(["msg",{out:se.is_outgoing}])},[u("div",Qd,[u("span",Xd,A(se.is_outgoing?"→ me":se.sender_name||((ke=se.sender_pubkey)==null?void 0:ke.slice(0,12))||"?"),1),ge(" · "+A(B(se.received_at))+" ",1),se.snr!=null?(k(),S("span",Zd,"· snr "+A(se.snr),1)):Re("",!0)]),u("div",null,[(k(!0),S(te,null,me(Ce(se),(ce,ee)=>(k(),S(te,{key:ee},[ce.type==="link"?(k(),S("a",{key:0,href:ce.value,target:"_blank",rel:"noopener noreferrer"},A(ce.value),9,eh)):ce.type==="mention"?(k(),S("span",th,"@["+A(ce.value)+"]",1)):(k(),S(te,{key:2},[ge(A(ce.value),1)],64))],64))),128))])],2)}),128))],512),u("div",nh,[Be(u("input",{style:{flex:"1"},placeholder:O.value,"onUpdate:modelValue":Q[1]||(Q[1]=se=>d.value=se),disabled:!I.value||a.value,onKeyup:Yn(Y,["enter"])},null,40,sh),[[lt,d.value]]),u("button",{disabled:!I.value||a.value||!d.value.trim(),onClick:Y},A(a.value?"Sending…":"Send"),9,oh)]),h.value?(k(),S("div",lh,A(h.value),1)):Re("",!0)])])}}},ih={class:"hexdump"},ch=["onMouseenter"],ah={key:0},uh={key:1},fh={key:0,class:"empty"},dh={__name:"HexDump",props:{hex:{type:String,default:""},activeRange:{type:Object,default:null}},emits:["hover-offset"],setup(e,{emit:t}){const n=e,s=t,o=we(()=>{const r=(n.hex||"").replace(/\s+/g,""),i=[];for(let c=0;c+2<=r.length;c+=2)i.push(r.slice(c,c+2));return i});function l(r){const i=n.activeRange;return i&&r>=i.offset&&r(k(),S("div",ih,[(k(!0),S(te,null,me(o.value,(c,d)=>(k(),S("span",{key:d,class:rt(["hexbyte",{active:l(d)}]),onMouseenter:a=>s("hover-offset",d),onMouseleave:i[0]||(i[0]=a=>s("hover-offset",null))},[ge(A(c),1),(d+1)%16===0?(k(),S("span",ah,[...i[1]||(i[1]=[u("br",null,null,-1)])])):(k(),S("span",uh))],42,ch))),128)),o.value.length?Re("",!0):(k(),S("div",fh,"no raw bytes"))]))}},hh=["onMouseenter"],ph={class:"fname"},mh={class:"fmeta"},vh={class:"fval"},gh={key:0,class:"fval muted"},_h={key:1,class:"fmeta"},yh={key:0,class:"decoded"},bh={class:"kv"},wh={class:"k"},xh={class:"mono"},Ch={__name:"FieldBreakout",props:{fields:{type:Array,default:()=>[]},decoded:{type:Object,default:null},activeIndex:{type:Number,default:-1}},emits:["hover-field"],setup(e,{emit:t}){const n=t;function s(o){return o==null?"":typeof o=="object"?JSON.stringify(o):String(o)}return(o,l)=>(k(),S("div",null,[(k(!0),S(te,null,me(e.fields,(r,i)=>(k(),S("div",{key:i,class:rt(["field-row",{active:i===e.activeIndex}]),onMouseenter:c=>n("hover-field",i),onMouseleave:l[0]||(l[0]=c=>n("hover-field",-1))},[u("div",ph,A(r.name),1),u("div",mh,"offset "+A(r.offset)+" · "+A(r.length)+" byte(s)",1),u("div",vh,A(r.hex),1),r.value!==null&&r.value!==void 0?(k(),S("div",gh,A(s(r.value)),1)):Re("",!0),r.description?(k(),S("div",_h,A(r.description),1)):Re("",!0)],42,hh))),128)),e.decoded?(k(),S("div",yh,[l[1]||(l[1]=u("h4",{style:{margin:"6px 0"}},"Decoded payload",-1)),u("div",bh,[(k(!0),S(te,null,me(e.decoded,(r,i)=>(k(),S(te,{key:i},[u("div",wh,A(i),1),u("div",xh,A(s(r)),1)],64))),128))])])):Re("",!0)]))}},kh={class:"panes"},Sh={class:"pane",style:{flex:"1.3"}},Eh={class:"toolbar"},Rh={class:"chk"},Ah=["checked"],Oh=["checked","onChange"],Th={class:"muted"},Ph={key:0,class:"err"},Ih={class:"body"},Nh=["onClick"],$h={class:"pane",style:{flex:"1"}},Mh={class:"body"},Dh={key:0,class:"empty"},Lh={key:1,class:"empty"},jh={key:0,class:"err",style:{padding:"0 12px"}},Vh={key:3,class:"empty"},Uh={__name:"Packets",setup(e){const t=ne([]),n=ne(new Set),s=ne(new Set),o=ne(null),l=ne(null),r=ne(-1),i=ne("");let c=null;const d=we(()=>[...s.value].sort()),a=we(()=>n.value.size===0),h=$=>!n.value.has($),g=we(()=>n.value.size===0?t.value:t.value.filter($=>!n.value.has($.packet_type)));function y($){let Y=null;for(const B of $)B.packet_type&&!s.value.has(B.packet_type)&&(Y=Y||new Set(s.value),Y.add(B.packet_type));Y&&(s.value=Y)}function I($){n.value=$?new Set:new Set(s.value)}function O($,Y){const B=new Set(n.value);Y?B.delete($):B.add($),n.value=B}const U=we(()=>{if(!l.value||r.value<0)return null;const $=l.value.fields[r.value];return $?{offset:$.offset,length:$.length}:null});async function J(){try{const $=await ae("/packets?limit=200");t.value=$.items,y($.items)}catch($){i.value=$.message}}async function N($){if(o.value=$,l.value=null,r.value=-1,!!$.has_raw)try{l.value=await ae("/packets/decode",{method:"POST",json:{packet_id:$.id}})}catch(Y){i.value=Y.message}}function K($){if($===null||!l.value){r.value=-1;return}const Y=l.value.fields.findIndex(B=>$>=B.offset&&${J(),c=new WebSocket(Xr("/ws/packets")),c.onmessage=$=>{const Y=JSON.parse($.data);t.value.unshift(Y),t.value.length>500&&t.value.pop(),y([Y])}}),_s(()=>c&&c.close()),($,Y)=>(k(),S("div",kh,[u("div",Sh,[Y[4]||(Y[4]=u("h3",null,"Packets (live)",-1)),u("div",Eh,[u("label",Rh,[u("input",{type:"checkbox",checked:a.value,onChange:Y[0]||(Y[0]=B=>I(B.target.checked))},null,40,Ah),Y[2]||(Y[2]=ge(" All ",-1))]),(k(!0),S(te,null,me(d.value,B=>(k(),S("label",{key:B,class:"chk"},[u("input",{type:"checkbox",checked:h(B),onChange:oe=>O(B,oe.target.checked)},null,40,Oh),ge(" "+A(B),1)]))),128)),u("span",Th,A(g.value.length)+" shown",1),i.value?(k(),S("span",Ph,A(i.value),1)):Re("",!0)]),u("div",Ih,[u("table",null,[Y[3]||(Y[3]=u("thead",null,[u("tr",null,[u("th",null,"time"),u("th",null,"type"),u("th",null,"from"),u("th",null,"ch"),u("th",null,"text"),u("th",null,"raw")])],-1)),u("tbody",null,[(k(!0),S(te,null,me(g.value,B=>(k(),S("tr",{key:B.id,class:rt(["clickable",{selected:o.value&&o.value.id===B.id}]),onClick:oe=>N(B)},[u("td",null,A(H(B.received_at)),1),u("td",null,A(B.packet_type),1),u("td",null,A(B.sender_name||B.sender_pubkey_prefix||""),1),u("td",null,A(B.channel_idx??""),1),u("td",null,A(B.text||""),1),u("td",null,A(B.has_raw?"●":""),1)],10,Nh))),128))])])])]),u("div",$h,[Y[6]||(Y[6]=u("h3",null,"Inspector",-1)),u("div",Mh,[o.value?o.value.has_raw?l.value?(k(),S(te,{key:2},[Le(dh,{hex:l.value.raw_hex,"active-range":U.value,onHoverOffset:K},null,8,["hex","active-range"]),l.value.error?(k(),S("div",jh,A(l.value.error),1)):Re("",!0),Le(Ch,{fields:l.value.fields,decoded:l.value.decoded,"active-index":r.value,onHoverField:Y[1]||(Y[1]=B=>r.value=B)},null,8,["fields","decoded","active-index"])],64)):(k(),S("div",Vh,"decoding…")):(k(),S("div",Lh,[...Y[5]||(Y[5]=[ge(" no raw bytes for this packet",-1),u("br",null,null,-1),u("span",{class:"muted"},"(only RX_LOG_DATA packets carry on-air bytes)",-1)])])):(k(),S("div",Dh,"select a packet"))])])]))}},Fh=[{path:"/login",component:Ju,meta:{public:!0}},{path:"/",redirect:"/messages"},{path:"/manage",component:Dd},{path:"/messages",component:rh},{path:"/packets",component:Uh}],Zr=Uu({history:_u(),routes:Fh});Zr.beforeEach(e=>{const t=Hn();if(!e.meta.public&&!t.token)return"/login";if(e.path==="/login"&&t.token)return"/"});ka(Ku).use(Ra()).use(Zr).mount("#app"); diff --git a/webapi/static/assets/index-DE4RDvEI.css b/webapi/static/assets/index-DE4RDvEI.css new file mode 100644 index 0000000..a789540 --- /dev/null +++ b/webapi/static/assets/index-DE4RDvEI.css @@ -0,0 +1 @@ +.contacts-split[data-v-9be56ce0]{display:flex;gap:10px;height:100%;min-height:0;padding:10px;box-sizing:border-box}.contact-detail[data-v-9be56ce0]{flex:1;min-width:240px;max-width:440px}:root{--bg: #0f1419;--panel: #161c24;--panel2: #1c242e;--border: #2a3340;--text: #cdd6e0;--muted: #7d8a99;--accent: #4aa3ff;--accent-dim: #1f3a55;--ok: #4ec98a;--warn: #e0b341;--err: #e06b6b;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}*{box-sizing:border-box}html,body,#app{height:100%;margin:0}body{background:var(--bg);color:var(--text);font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}a{color:var(--accent);text-decoration:none}#app{display:flex;flex-direction:column}.nav{display:flex;align-items:center;gap:4px;padding:8px 14px;background:var(--panel);border-bottom:1px solid var(--border)}.nav .brand{font-weight:700;margin-right:16px;color:#fff}.nav a{padding:6px 12px;border-radius:6px;color:var(--muted)}.nav a.router-link-active{background:var(--accent-dim);color:#fff}.nav .spacer{flex:1}.nav .who{color:var(--muted);font-size:12px;margin-right:10px}.page{flex:1;min-height:0;padding:14px;overflow:auto}.panes{flex:1;min-height:0;display:flex;gap:10px;padding:10px}.pane{background:var(--panel);border:1px solid var(--border);border-radius:8px;display:flex;flex-direction:column;min-height:0;overflow:hidden}.pane>h3{margin:0;padding:8px 12px;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);border-bottom:1px solid var(--border)}.pane>.body{flex:1;min-height:0;overflow:auto}.side-col{flex:0 0 240px;display:flex;flex-direction:column;gap:10px;min-height:0}button{background:var(--accent-dim);color:#fff;border:1px solid var(--border);border-radius:6px;padding:6px 12px;cursor:pointer;font:inherit}button:hover{border-color:var(--accent)}button:disabled{opacity:.5;cursor:not-allowed}input,select,textarea{background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:6px 9px;font:inherit}input:focus,select:focus,textarea:focus{outline:1px solid var(--accent)}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:5px 9px;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}th{color:var(--muted);position:sticky;top:0;background:var(--panel)}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:hover{color:var(--text)}tr.clickable{cursor:pointer}tr.clickable:hover td{background:var(--panel2)}tr.selected td{background:var(--accent-dim)}.mono{font-family:var(--mono)}.muted{color:var(--muted)}.tag{display:inline-block;padding:1px 7px;border-radius:10px;background:var(--panel2);border:1px solid var(--border);font-size:11px;margin:0 3px 3px 0}td.chips{white-space:normal;overflow:visible;max-width:none}.toolbar{display:flex;gap:8px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--border);flex-wrap:wrap}.toolbar label.chk{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}.toolbar label.chk input{margin:0}.err{color:var(--err)}.empty{padding:20px;color:var(--muted);text-align:center}.login-wrap{display:flex;align-items:center;justify-content:center;flex:1}.login-card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:26px;width:320px;display:flex;flex-direction:column;gap:12px}.login-card h2{margin:0 0 6px}.login-card label{font-size:12px;color:var(--muted)}.login-card input{width:100%}.msg{padding:6px 12px;border-bottom:1px solid var(--border)}.msg .meta{font-size:11px;color:var(--muted)}.msg.out{background:#13241b}.msg .who{color:var(--accent);font-weight:600}.msg .mention{color:var(--accent);font-weight:600;background:var(--accent-dim);padding:0 4px;border-radius:4px}.msg a{word-break:break-all}.hexdump{font-family:var(--mono);font-size:13px;padding:10px;line-height:1.7}.hexbyte{padding:1px 2px;border-radius:3px;cursor:default}.hexbyte.active{background:var(--accent);color:#00121f}.field-row{padding:6px 12px;border-bottom:1px solid var(--border);cursor:default}.field-row.active{background:var(--accent-dim)}.field-row .fname{font-weight:600}.field-row .fmeta{font-size:11px;color:var(--muted)}.field-row .fval{font-family:var(--mono);font-size:12px;word-break:break-all}.decoded{padding:10px 12px}.decoded pre{white-space:pre-wrap;word-break:break-all;margin:0}.kv{display:grid;grid-template-columns:max-content 1fr;gap:2px 12px}.kv .k{color:var(--muted)} diff --git a/webapi/static/assets/index-DH8osFpl.css b/webapi/static/assets/index-DH8osFpl.css deleted file mode 100644 index 86ec13b..0000000 --- a/webapi/static/assets/index-DH8osFpl.css +++ /dev/null @@ -1 +0,0 @@ -:root{--bg: #0f1419;--panel: #161c24;--panel2: #1c242e;--border: #2a3340;--text: #cdd6e0;--muted: #7d8a99;--accent: #4aa3ff;--accent-dim: #1f3a55;--ok: #4ec98a;--warn: #e0b341;--err: #e06b6b;--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}*{box-sizing:border-box}html,body,#app{height:100%;margin:0}body{background:var(--bg);color:var(--text);font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}a{color:var(--accent);text-decoration:none}#app{display:flex;flex-direction:column}.nav{display:flex;align-items:center;gap:4px;padding:8px 14px;background:var(--panel);border-bottom:1px solid var(--border)}.nav .brand{font-weight:700;margin-right:16px;color:#fff}.nav a{padding:6px 12px;border-radius:6px;color:var(--muted)}.nav a.router-link-active{background:var(--accent-dim);color:#fff}.nav .spacer{flex:1}.nav .who{color:var(--muted);font-size:12px;margin-right:10px}.page{flex:1;min-height:0;padding:14px;overflow:auto}.panes{flex:1;min-height:0;display:flex;gap:10px;padding:10px}.pane{background:var(--panel);border:1px solid var(--border);border-radius:8px;display:flex;flex-direction:column;min-height:0;overflow:hidden}.pane>h3{margin:0;padding:8px 12px;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);border-bottom:1px solid var(--border)}.pane>.body{flex:1;min-height:0;overflow:auto}.side-col{flex:0 0 240px;display:flex;flex-direction:column;gap:10px;min-height:0}button{background:var(--accent-dim);color:#fff;border:1px solid var(--border);border-radius:6px;padding:6px 12px;cursor:pointer;font:inherit}button:hover{border-color:var(--accent)}button:disabled{opacity:.5;cursor:not-allowed}input,select,textarea{background:var(--panel2);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:6px 9px;font:inherit}input:focus,select:focus,textarea:focus{outline:1px solid var(--accent)}table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:5px 9px;border-bottom:1px solid var(--border);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}th{color:var(--muted);position:sticky;top:0;background:var(--panel)}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:hover{color:var(--text)}tr.clickable{cursor:pointer}tr.clickable:hover td{background:var(--panel2)}tr.selected td{background:var(--accent-dim)}.mono{font-family:var(--mono)}.muted{color:var(--muted)}.tag{display:inline-block;padding:1px 7px;border-radius:10px;background:var(--panel2);border:1px solid var(--border);font-size:11px;margin:0 3px 3px 0}td.chips{white-space:normal;overflow:visible;max-width:none}.toolbar{display:flex;gap:8px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--border);flex-wrap:wrap}.toolbar label.chk{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--muted);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}.toolbar label.chk input{margin:0}.err{color:var(--err)}.empty{padding:20px;color:var(--muted);text-align:center}.login-wrap{display:flex;align-items:center;justify-content:center;flex:1}.login-card{background:var(--panel);border:1px solid var(--border);border-radius:10px;padding:26px;width:320px;display:flex;flex-direction:column;gap:12px}.login-card h2{margin:0 0 6px}.login-card label{font-size:12px;color:var(--muted)}.login-card input{width:100%}.msg{padding:6px 12px;border-bottom:1px solid var(--border)}.msg .meta{font-size:11px;color:var(--muted)}.msg.out{background:#13241b}.msg .who{color:var(--accent);font-weight:600}.msg .mention{color:var(--accent);font-weight:600;background:var(--accent-dim);padding:0 4px;border-radius:4px}.msg a{word-break:break-all}.hexdump{font-family:var(--mono);font-size:13px;padding:10px;line-height:1.7}.hexbyte{padding:1px 2px;border-radius:3px;cursor:default}.hexbyte.active{background:var(--accent);color:#00121f}.field-row{padding:6px 12px;border-bottom:1px solid var(--border);cursor:default}.field-row.active{background:var(--accent-dim)}.field-row .fname{font-weight:600}.field-row .fmeta{font-size:11px;color:var(--muted)}.field-row .fval{font-family:var(--mono);font-size:12px;word-break:break-all}.decoded{padding:10px 12px}.decoded pre{white-space:pre-wrap;word-break:break-all;margin:0}.kv{display:grid;grid-template-columns:max-content 1fr;gap:2px 12px}.kv .k{color:var(--muted)} diff --git a/webapi/static/assets/index-X_PLn7Dl.js b/webapi/static/assets/index-X_PLn7Dl.js new file mode 100644 index 0000000..8304ce3 --- /dev/null +++ b/webapi/static/assets/index-X_PLn7Dl.js @@ -0,0 +1,37 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();/** +* @vue/shared v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function lo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Se={},nn=[],wt=()=>{},Al=()=>!1,is=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),as=e=>e.startsWith("onUpdate:"),Ue=Object.assign,ro=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},oi=Object.prototype.hasOwnProperty,we=(e,t)=>oi.call(e,t),ee=Array.isArray,sn=e=>Mn(e)==="[object Map]",fn=e=>Mn(e)==="[object Set]",Ao=e=>Mn(e)==="[object Date]",le=e=>typeof e=="function",Pe=e=>typeof e=="string",ct=e=>typeof e=="symbol",xe=e=>e!==null&&typeof e=="object",Ol=e=>(xe(e)||le(e))&&le(e.then)&&le(e.catch),Tl=Object.prototype.toString,Mn=e=>Tl.call(e),li=e=>Mn(e).slice(8,-1),Pl=e=>Mn(e)==="[object Object]",cs=e=>Pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yn=lo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),us=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ri=/-\w/g,Je=us(e=>e.replace(ri,t=>t.slice(1).toUpperCase())),ii=/\B([A-Z])/g,Bt=us(e=>e.replace(ii,"-$1").toLowerCase()),fs=us(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=us(e=>e?`on${fs(e)}`:""),bt=(e,t)=>!Object.is(e,t),qn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ds=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Oo;const hs=()=>Oo||(Oo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function io(e){if(ee(e)){const t={};for(let n=0;n{if(n){const s=n.split(ci);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ze(e){let t="";if(Pe(e))t=e;else if(ee(e))for(let n=0;nUt(n,t))}const $l=e=>!!(e&&e.__v_isRef===!0),A=e=>Pe(e)?e:e==null?"":ee(e)||xe(e)&&(e.toString===Tl||!le(e.toString))?$l(e)?A(e.value):JSON.stringify(e,Ml,2):String(e),Ml=(e,t)=>$l(t)?Ml(e,t.value):sn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],l)=>(n[As(s,l)+" =>"]=o,n),{})}:fn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>As(n))}:ct(t)?As(t):xe(t)&&!ee(t)&&!Pl(t)?String(t):t,As=(e,t="")=>{var n;return ct(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let De;class Dl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&De&&(De.active?(this.parent=De,this.index=(De.scopes||(De.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!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;t0&&--this._on===0){if(De===this)De=this.prevScope;else{let t=De;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(wn){let t=wn;for(wn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;bn;){let t=bn;for(bn=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 Hl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Bl(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),fo(s),vi(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Bs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Kl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Kl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===On)||(e.globalVersion=On,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Bs(e))))return;e.flags|=2;const t=e.dep,n=Ee,s=ft;Ee=e,ft=!0;try{Hl(e);const o=e.fn(e._value);(t.version===0||bt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ee=n,ft=s,Bl(e),e.flags&=-3}}function fo(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)fo(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function vi(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ft=!0;const Gl=[];function Pt(){Gl.push(ft),ft=!1}function It(){const e=Gl.pop();ft=e===void 0?!0:e}function To(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ee;Ee=void 0;try{t()}finally{Ee=n}}}let On=0;class gi{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 ho{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(!Ee||!ft||Ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ee)n=this.activeLink=new gi(Ee,this),Ee.deps?(n.prevDep=Ee.depsTail,Ee.depsTail.nextDep=n,Ee.depsTail=n):Ee.deps=Ee.depsTail=n,Wl(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=Ee.depsTail,n.nextDep=void 0,Ee.depsTail.nextDep=n,Ee.depsTail=n,Ee.deps===n&&(Ee.deps=s)}return n}trigger(t){this.version++,On++,this.notify(t)}notify(t){co();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{uo()}}}function Wl(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)Wl(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Xn=new WeakMap,Jt=Symbol(""),Ks=Symbol(""),Tn=Symbol("");function Be(e,t,n){if(ft&&Ee){let s=Xn.get(e);s||Xn.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new ho),o.map=s,o.key=n),o.track()}}function Rt(e,t,n,s,o,l){const r=Xn.get(e);if(!r){On++;return}const i=a=>{a&&a.trigger()};if(co(),t==="clear")r.forEach(i);else{const a=ee(e),d=a&&cs(n);if(a&&n==="length"){const u=Number(s);r.forEach((h,_)=>{(_==="length"||_===Tn||!ct(_)&&_>=u)&&i(h)})}else switch((n!==void 0||r.has(void 0))&&i(r.get(n)),d&&i(r.get(Tn)),t){case"add":a?d&&i(r.get("length")):(i(r.get(Jt)),sn(e)&&i(r.get(Ks)));break;case"delete":a||(i(r.get(Jt)),sn(e)&&i(r.get(Ks)));break;case"set":sn(e)&&i(r.get(Jt));break}}uo()}function _i(e,t){const n=Xn.get(e);return n&&n.get(t)}function Xt(e){const t=ve(e);return t===e?t:(Be(t,"iterate",Tn),nt(e)?t:t.map(dt))}function ps(e){return Be(e=ve(e),"iterate",Tn),e}function _t(e,t){return Nt(e)?ln(Tt(e)?dt(t):t):dt(t)}const yi={__proto__:null,[Symbol.iterator](){return Ts(this,Symbol.iterator,e=>_t(this,e))},concat(...e){return Xt(this).concat(...e.map(t=>ee(t)?Xt(t):t))},entries(){return Ts(this,"entries",e=>(e[1]=_t(this,e[1]),e))},every(e,t){return kt(this,"every",e,t,void 0,arguments)},filter(e,t){return kt(this,"filter",e,t,n=>n.map(s=>_t(this,s)),arguments)},find(e,t){return kt(this,"find",e,t,n=>_t(this,n),arguments)},findIndex(e,t){return kt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return kt(this,"findLast",e,t,n=>_t(this,n),arguments)},findLastIndex(e,t){return kt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return kt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ps(this,"includes",e)},indexOf(...e){return Ps(this,"indexOf",e)},join(e){return Xt(this).join(e)},lastIndexOf(...e){return Ps(this,"lastIndexOf",e)},map(e,t){return kt(this,"map",e,t,void 0,arguments)},pop(){return pn(this,"pop")},push(...e){return pn(this,"push",e)},reduce(e,...t){return Po(this,"reduce",e,t)},reduceRight(e,...t){return Po(this,"reduceRight",e,t)},shift(){return pn(this,"shift")},some(e,t){return kt(this,"some",e,t,void 0,arguments)},splice(...e){return pn(this,"splice",e)},toReversed(){return Xt(this).toReversed()},toSorted(e){return Xt(this).toSorted(e)},toSpliced(...e){return Xt(this).toSpliced(...e)},unshift(...e){return pn(this,"unshift",e)},values(){return Ts(this,"values",e=>_t(this,e))}};function Ts(e,t,n){const s=ps(e),o=s[t]();return s!==e&&!nt(e)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.done||(l.value=n(l.value)),l}),o}const bi=Array.prototype;function kt(e,t,n,s,o,l){const r=ps(e),i=r!==e&&!nt(e),a=r[t];if(a!==bi[t]){const h=a.apply(e,l);return i?dt(h):h}let d=n;r!==e&&(i?d=function(h,_){return n.call(this,_t(e,h),_,e)}:n.length>2&&(d=function(h,_){return n.call(this,h,_,e)}));const u=a.call(r,d,s);return i&&o?o(u):u}function Po(e,t,n,s){const o=ps(e),l=o!==e&&!nt(e);let r=n,i=!1;o!==e&&(l?(i=s.length===0,r=function(d,u,h){return i&&(i=!1,d=_t(e,d)),n.call(this,d,_t(e,u),h,e)}):n.length>3&&(r=function(d,u,h){return n.call(this,d,u,h,e)}));const a=o[t](r,...s);return i?_t(e,a):a}function Ps(e,t,n){const s=ve(e);Be(s,"iterate",Tn);const o=s[t](...n);return(o===-1||o===!1)&&ms(n[0])?(n[0]=ve(n[0]),s[t](...n)):o}function pn(e,t,n=[]){Pt(),co();const s=ve(e)[t].apply(e,n);return uo(),It(),s}const wi=lo("__proto__,__v_isRef,__isVue"),ql=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function xi(e){ct(e)||(e=String(e));const t=ve(this);return Be(t,"has",e),t.hasOwnProperty(e)}class zl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return l;if(n==="__v_raw")return s===(o?l?Ii:Xl:l?Ql:Yl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=ee(t);if(!o){let a;if(r&&(a=yi[n]))return a;if(n==="hasOwnProperty")return xi}const i=Reflect.get(t,n,Ie(t)?t:s);if((ct(n)?ql.has(n):wi(n))||(o||Be(t,"get",n),l))return i;if(Ie(i)){const a=r&&cs(n)?i:i.value;return o&&xe(a)?Ws(a):a}return xe(i)?o?Ws(i):Dn(i):i}}class Jl extends zl{constructor(t=!1){super(!1,t)}set(t,n,s,o){let l=t[n];const r=ee(t)&&cs(n);if(!this._isShallow){const d=Nt(l);if(!nt(s)&&!Nt(s)&&(l=ve(l),s=ve(s)),!r&&Ie(l)&&!Ie(s))return d||(l.value=s),!0}const i=r?Number(n)e,Bn=e=>Reflect.getPrototypeOf(e);function Ri(e,t,n){return function(...s){const o=this.__v_raw,l=ve(o),r=sn(l),i=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,d=o[e](...s),u=n?Gs:t?ln:dt;return!t&&Be(l,"iterate",a?Ks:Jt),Ue(Object.create(d),{next(){const{value:h,done:_}=d.next();return _?{value:h,done:_}:{value:i?[u(h[0]),u(h[1])]:u(h),done:_}}})}}function Kn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ai(e,t){const n={get(o){const l=this.__v_raw,r=ve(l),i=ve(o);e||(bt(o,i)&&Be(r,"get",o),Be(r,"get",i));const{has:a}=Bn(r),d=t?Gs:e?ln:dt;if(a.call(r,o))return d(l.get(o));if(a.call(r,i))return d(l.get(i));l!==r&&l.get(o)},get size(){const o=this.__v_raw;return!e&&Be(ve(o),"iterate",Jt),o.size},has(o){const l=this.__v_raw,r=ve(l),i=ve(o);return e||(bt(o,i)&&Be(r,"has",o),Be(r,"has",i)),o===i?l.has(o):l.has(o)||l.has(i)},forEach(o,l){const r=this,i=r.__v_raw,a=ve(i),d=t?Gs:e?ln:dt;return!e&&Be(a,"iterate",Jt),i.forEach((u,h)=>o.call(l,d(u),d(h),r))}};return Ue(n,e?{add:Kn("add"),set:Kn("set"),delete:Kn("delete"),clear:Kn("clear")}:{add(o){const l=ve(this),r=Bn(l),i=ve(o),a=!t&&!nt(o)&&!Nt(o)?i:o;return r.has.call(l,a)||bt(o,a)&&r.has.call(l,o)||bt(i,a)&&r.has.call(l,i)||(l.add(a),Rt(l,"add",a,a)),this},set(o,l){!t&&!nt(l)&&!Nt(l)&&(l=ve(l));const r=ve(this),{has:i,get:a}=Bn(r);let d=i.call(r,o);d||(o=ve(o),d=i.call(r,o));const u=a.call(r,o);return r.set(o,l),d?bt(l,u)&&Rt(r,"set",o,l):Rt(r,"add",o,l),this},delete(o){const l=ve(this),{has:r,get:i}=Bn(l);let a=r.call(l,o);a||(o=ve(o),a=r.call(l,o)),i&&i.call(l,o);const d=l.delete(o);return a&&Rt(l,"delete",o,void 0),d},clear(){const o=ve(this),l=o.size!==0,r=o.clear();return l&&Rt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Ri(o,e,t)}),n}function po(e,t){const n=Ai(e,t);return(s,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(we(n,o)&&o in s?n:s,o,l)}const Oi={get:po(!1,!1)},Ti={get:po(!1,!0)},Pi={get:po(!0,!1)};const Yl=new WeakMap,Ql=new WeakMap,Xl=new WeakMap,Ii=new WeakMap;function Ni(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Dn(e){return Nt(e)?e:mo(e,!1,Ci,Oi,Yl)}function Zl(e){return mo(e,!1,Ei,Ti,Ql)}function Ws(e){return mo(e,!0,Si,Pi,Xl)}function mo(e,t,n,s,o){if(!xe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=o.get(e);if(l)return l;const r=Ni(li(e));if(r===0)return e;const i=new Proxy(e,r===2?s:n);return o.set(e,i),i}function Tt(e){return Nt(e)?Tt(e.__v_raw):!!(e&&e.__v_isReactive)}function Nt(e){return!!(e&&e.__v_isReadonly)}function nt(e){return!!(e&&e.__v_isShallow)}function ms(e){return e?!!e.__v_raw:!1}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}function vo(e){return!we(e,"__v_skip")&&Object.isExtensible(e)&&Il(e,"__v_skip",!0),e}const dt=e=>xe(e)?Dn(e):e,ln=e=>xe(e)?Ws(e):e;function Ie(e){return e?e.__v_isRef===!0:!1}function ne(e){return er(e,!1)}function $i(e){return er(e,!0)}function er(e,t){return Ie(e)?e:new Mi(e,t)}class Mi{constructor(t,n){this.dep=new ho,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ve(t),this._value=n?t:dt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||nt(t)||Nt(t);t=s?t:ve(t),bt(t,n)&&(this._rawValue=t,this._value=s?t:dt(t),this.dep.trigger())}}function Vt(e){return Ie(e)?e.value:e}const Di={get:(e,t,n)=>t==="__v_raw"?e:Vt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ie(o)&&!Ie(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function tr(e){return Tt(e)?e:new Proxy(e,Di)}function Li(e){const t=ee(e)?new Array(e.length):{};for(const n in e)t[n]=Vi(e,n);return t}class ji{constructor(t,n,s){this._object=t,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._key=ct(n)?n:String(n),this._raw=ve(t);let o=!0,l=t;if(!ee(t)||ct(this._key)||!cs(this._key))do o=!ms(l)||nt(l);while(o&&(l=l.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=Vt(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Ie(this._raw[this._key])){const n=this._object[this._key];if(Ie(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return _i(this._raw,this._key)}}function Vi(e,t,n){return new ji(e,t,n)}class Ui{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ho(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=On-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ee!==this)return Fl(this,!0),!0}get value(){const t=this.dep.track();return Kl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Fi(e,t,n=!1){let s,o;return le(e)?s=e:(s=e.get,o=e.set),new Ui(s,o,n)}const Gn={},Zn=new WeakMap;let qt;function Hi(e,t=!1,n=qt){if(n){let s=Zn.get(n);s||Zn.set(n,s=[]),s.push(e)}}function Bi(e,t,n=Se){const{immediate:s,deep:o,once:l,scheduler:r,augmentJob:i,call:a}=n,d=H=>o?H:nt(H)||o===!1||o===0?At(H,1):At(H);let u,h,_,b,I=!1,O=!1;if(Ie(e)?(h=()=>e.value,I=nt(e)):Tt(e)?(h=()=>d(e),I=!0):ee(e)?(O=!0,I=e.some(H=>Tt(H)||nt(H)),h=()=>e.map(H=>{if(Ie(H))return H.value;if(Tt(H))return d(H);if(le(H))return a?a(H,2):H()})):le(e)?t?h=a?()=>a(e,2):e:h=()=>{if(_){Pt();try{_()}finally{It()}}const H=qt;qt=u;try{return a?a(e,3,[b]):e(b)}finally{qt=H}}:h=wt,t&&o){const H=h,$=o===!0?1/0:o;h=()=>At(H(),$)}const U=jl(),J=()=>{u.stop(),U&&U.active&&ro(U.effects,u)};if(l&&t){const H=t;t=(...$)=>{H(...$),J()}}let N=O?new Array(e.length).fill(Gn):Gn;const K=H=>{if(!(!(u.flags&1)||!u.dirty&&!H))if(t){const $=u.run();if(o||I||(O?$.some((Y,B)=>bt(Y,N[B])):bt($,N))){_&&_();const Y=qt;qt=u;try{const B=[$,N===Gn?void 0:O&&N[0]===Gn?[]:N,b];N=$,a?a(t,3,B):t(...B)}finally{qt=Y}}}else u.run()};return i&&i(K),u=new Vl(h),u.scheduler=r?()=>r(K,!1):K,b=H=>Hi(H,!1,u),_=u.onStop=()=>{const H=Zn.get(u);if(H){if(a)a(H,4);else for(const $ of H)$();Zn.delete(u)}},t?s?K(!0):N=u.run():r?r(K.bind(null,!0),!0):u.run(),J.pause=u.pause.bind(u),J.resume=u.resume.bind(u),J.stop=J,J}function At(e,t=1/0,n){if(t<=0||!xe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ie(e))At(e.value,t,n);else if(ee(e))for(let s=0;s{At(s,t,n)});else if(Pl(e)){for(const s in e)At(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&At(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Ln(e,t,n,s){try{return s?e(...s):e()}catch(o){vs(o,t,n)}}function ht(e,t,n,s){if(le(e)){const o=Ln(e,t,n,s);return o&&Ol(o)&&o.catch(l=>{vs(l,t,n)}),o}if(ee(e)){const o=[];for(let l=0;l>>1,o=ze[s],l=Pn(o);l=Pn(n)?ze.push(e):ze.splice(Gi(t),0,e),e.flags|=1,sr()}}function sr(){es||(es=nr.then(lr))}function Wi(e){ee(e)?on.push(...e):Lt&&e.id===-1?Lt.splice(en+1,0,e):e.flags&1||(on.push(e),e.flags|=1),sr()}function Io(e,t,n=gt+1){for(;nPn(n)-Pn(s));if(on.length=0,Lt){Lt.push(...t);return}for(Lt=t,en=0;ene.id==null?e.flags&2?-1:1/0:e.id;function lr(e){try{for(gt=0;gt{s._d&&os(-1);const l=ts(t);let r;try{r=e(...o)}finally{ts(l),s._d&&os(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function He(e,t){if(et===null)return e;const n=xs(et),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&le(t)?t.call(s&&s.proxy):t}}function qi(){return!!(Ir()||Yt)}const zi=Symbol.for("v-scx"),Ji=()=>it(zi);function xn(e,t,n){return ir(e,t,n)}function ir(e,t,n=Se){const{immediate:s,deep:o,flush:l,once:r}=n,i=Ue({},n),a=t&&s||!t&&l!=="post";let d;if(Nn){if(l==="sync"){const b=Ji();d=b.__watcherHandles||(b.__watcherHandles=[])}else if(!a){const b=()=>{};return b.stop=wt,b.resume=wt,b.pause=wt,b}}const u=Ke;i.call=(b,I,O)=>ht(b,u,I,O);let h=!1;l==="post"?i.scheduler=b=>{Xe(b,u&&u.suspense)}:l!=="sync"&&(h=!0,i.scheduler=(b,I)=>{I?b():go(b)}),i.augmentJob=b=>{t&&(b.flags|=4),h&&(b.flags|=2,u&&(b.id=u.uid,b.i=u))};const _=Bi(e,t,i);return Nn&&(d?d.push(_):a&&_()),_}function Yi(e,t,n){const s=this.proxy,o=Pe(e)?e.includes(".")?ar(s,e):()=>s[e]:e.bind(s,s);let l;le(t)?l=t:(l=t.handler,n=t);const r=Vn(this),i=ir(o,l.bind(s),n);return r(),i}function ar(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Is=Symbol("_leaveCb");function _o(e,t){e.shapeFlag&6&&e.component?(e.transition=t,_o(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 cr(e,t){return le(e)?Ue({name:e.name},t,{setup:e}):e}function ur(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function No(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ns=new WeakMap;function kn(e,t,n,s,o=!1){if(ee(e)){e.forEach((O,U)=>kn(O,t&&(ee(t)?t[U]:t),n,s,o));return}if(Cn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&kn(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?xs(s.component):s.el,r=o?null:l,{i,r:a}=e,d=t&&t.r,u=i.refs===Se?i.refs={}:i.refs,h=i.setupState,_=ve(h),b=h===Se?Al:O=>No(u,O)?!1:we(_,O),I=(O,U)=>!(U&&No(u,U));if(d!=null&&d!==a){if($o(t),Pe(d))u[d]=null,b(d)&&(h[d]=null);else if(Ie(d)){const O=t;I(d,O.k)&&(d.value=null),O.k&&(u[O.k]=null)}}if(le(a))Ln(a,i,12,[r,u]);else{const O=Pe(a),U=Ie(a);if(O||U){const J=()=>{if(e.f){const N=O?b(a)?h[a]:u[a]:I()||!e.k?a.value:u[e.k];if(o)ee(N)&&ro(N,l);else if(ee(N))N.includes(l)||N.push(l);else if(O)u[a]=[l],b(a)&&(h[a]=u[a]);else{const K=[l];I(a,e.k)&&(a.value=K),e.k&&(u[e.k]=K)}}else O?(u[a]=r,b(a)&&(h[a]=r)):U&&(I(a,e.k)&&(a.value=r),e.k&&(u[e.k]=r))};if(r){const N=()=>{J(),ns.delete(e)};N.id=-1,ns.set(e,N),Xe(N,n)}else $o(e),J()}}}function $o(e){const t=ns.get(e);t&&(t.flags|=8,ns.delete(e))}hs().requestIdleCallback;hs().cancelIdleCallback;const Cn=e=>!!e.type.__asyncLoader,fr=e=>e.type.__isKeepAlive;function Zi(e,t){dr(e,"a",t)}function ea(e,t){dr(e,"da",t)}function dr(e,t,n=Ke){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(gs(t,s,n),n){let o=n.parent;for(;o&&o.parent;)fr(o.parent.vnode)&&ta(s,t,n,o),o=o.parent}}function ta(e,t,n,s){const o=gs(t,e,s,!0);ys(()=>{ro(s[t],o)},n)}function gs(e,t,n=Ke,s=!1){if(n){const o=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{Pt();const i=Vn(n),a=ht(t,n,e,r);return i(),It(),a});return s?o.unshift(l):o.push(l),l}}const $t=e=>(t,n=Ke)=>{(!Nn||e==="sp")&&gs(e,(...s)=>t(...s),n)},na=$t("bm"),_s=$t("m"),sa=$t("bu"),oa=$t("u"),la=$t("bum"),ys=$t("um"),ra=$t("sp"),ia=$t("rtg"),aa=$t("rtc");function ca(e,t=Ke){gs("ec",e,t)}const ua="components";function Mo(e,t){return da(ua,e,!0,t)||e}const fa=Symbol.for("v-ndc");function da(e,t,n=!0,s=!1){const o=et||Ke;if(o){const l=o.type;{const i=Qa(l,!1);if(i&&(i===t||i===Je(t)||i===fs(Je(t))))return l}const r=Do(o[e]||l[e],t)||Do(o.appContext[e],t);return!r&&s?l:r}}function Do(e,t){return e&&(e[t]||e[Je(t)]||e[fs(Je(t))])}function me(e,t,n,s){let o;const l=n,r=ee(e);if(r||Pe(e)){const i=r&&Tt(e);let a=!1,d=!1;i&&(a=!nt(e),d=Nt(e),e=ps(e)),o=new Array(e.length);for(let u=0,h=e.length;ut(i,a,void 0,l));else{const i=Object.keys(e);o=new Array(i.length);for(let a=0,d=i.length;ae?Nr(e)?xs(e):qs(e.parent):null,Sn=Ue(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=>qs(e.parent),$root:e=>qs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pr(e),$forceUpdate:e=>e.f||(e.f=()=>{go(e.update)}),$nextTick:e=>e.n||(e.n=jn.bind(e.proxy)),$watch:e=>Yi.bind(e)}),Ns=(e,t)=>e!==Se&&!e.__isScriptSetup&&we(e,t),ha={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:l,accessCache:r,type:i,appContext:a}=e;if(t[0]!=="$"){const _=r[t];if(_!==void 0)switch(_){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return l[t]}else{if(Ns(s,t))return r[t]=1,s[t];if(o!==Se&&we(o,t))return r[t]=2,o[t];if(we(l,t))return r[t]=3,l[t];if(n!==Se&&we(n,t))return r[t]=4,n[t];zs&&(r[t]=0)}}const d=Sn[t];let u,h;if(d)return t==="$attrs"&&Be(e.attrs,"get",""),d(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(n!==Se&&we(n,t))return r[t]=4,n[t];if(h=a.config.globalProperties,we(h,t))return h[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:l}=e;return Ns(o,t)?(o[t]=n,!0):s!==Se&&we(s,t)?(s[t]=n,!0):we(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:l,type:r}},i){let a;return!!(n[i]||e!==Se&&i[0]!=="$"&&we(e,i)||Ns(t,i)||we(l,i)||we(s,i)||we(Sn,i)||we(o.config.globalProperties,i)||(a=r.__cssModules)&&a[i])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:we(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Lo(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let zs=!0;function pa(e){const t=pr(e),n=e.proxy,s=e.ctx;zs=!1,t.beforeCreate&&jo(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:r,watch:i,provide:a,inject:d,created:u,beforeMount:h,mounted:_,beforeUpdate:b,updated:I,activated:O,deactivated:U,beforeDestroy:J,beforeUnmount:N,destroyed:K,unmounted:H,render:$,renderTracked:Y,renderTriggered:B,errorCaptured:oe,serverPrefetch:re,expose:ke,inheritAttrs:W,components:Q,directives:he,filters:se}=t;if(d&&ma(d,s,null),r)for(const te in r){const ue=r[te];le(ue)&&(s[te]=ue.bind(n))}if(o){const te=o.call(n,n);xe(te)&&(e.data=Dn(te))}if(zs=!0,l)for(const te in l){const ue=l[te],ut=le(ue)?ue.bind(n,n):le(ue.get)?ue.get.bind(n,n):wt,je=!le(ue)&&le(ue.set)?ue.set.bind(n):wt,Fe=ge({get:ut,set:je});Object.defineProperty(s,te,{enumerable:!0,configurable:!0,get:()=>Fe.value,set:Ae=>Fe.value=Ae})}if(i)for(const te in i)hr(i[te],s,n,te);if(a){const te=le(a)?a.call(n):a;Reflect.ownKeys(te).forEach(ue=>{Jn(ue,te[ue])})}u&&jo(u,e,"c");function ae(te,ue){ee(ue)?ue.forEach(ut=>te(ut.bind(n))):ue&&te(ue.bind(n))}if(ae(na,h),ae(_s,_),ae(sa,b),ae(oa,I),ae(Zi,O),ae(ea,U),ae(ca,oe),ae(aa,Y),ae(ia,B),ae(la,N),ae(ys,H),ae(ra,re),ee(ke))if(ke.length){const te=e.exposed||(e.exposed={});ke.forEach(ue=>{Object.defineProperty(te,ue,{get:()=>n[ue],set:ut=>n[ue]=ut,enumerable:!0})})}else e.exposed||(e.exposed={});$&&e.render===wt&&(e.render=$),W!=null&&(e.inheritAttrs=W),Q&&(e.components=Q),he&&(e.directives=he),re&&ur(e)}function ma(e,t,n=wt){ee(e)&&(e=Js(e));for(const s in e){const o=e[s];let l;xe(o)?"default"in o?l=it(o.from||s,o.default,!0):l=it(o.from||s):l=it(o),Ie(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[s]=l}}function jo(e,t,n){ht(ee(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function hr(e,t,n,s){let o=s.includes(".")?ar(n,s):()=>n[s];if(Pe(e)){const l=t[e];le(l)&&xn(o,l)}else if(le(e))xn(o,e.bind(n));else if(xe(e))if(ee(e))e.forEach(l=>hr(l,t,n,s));else{const l=le(e.handler)?e.handler.bind(n):t[e.handler];le(l)&&xn(o,l,e)}}function pr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:l,config:{optionMergeStrategies:r}}=e.appContext,i=l.get(t);let a;return i?a=i:!o.length&&!n&&!s?a=t:(a={},o.length&&o.forEach(d=>ss(a,d,r,!0)),ss(a,t,r)),xe(t)&&l.set(t,a),a}function ss(e,t,n,s=!1){const{mixins:o,extends:l}=t;l&&ss(e,l,n,!0),o&&o.forEach(r=>ss(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const i=va[r]||n&&n[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const va={data:Vo,props:Uo,emits:Uo,methods:gn,computed:gn,beforeCreate:We,created:We,beforeMount:We,mounted:We,beforeUpdate:We,updated:We,beforeDestroy:We,beforeUnmount:We,destroyed:We,unmounted:We,activated:We,deactivated:We,errorCaptured:We,serverPrefetch:We,components:gn,directives:gn,watch:_a,provide:Vo,inject:ga};function Vo(e,t){return t?e?function(){return Ue(le(e)?e.call(this,this):e,le(t)?t.call(this,this):t)}:t:e}function ga(e,t){return gn(Js(e),Js(t))}function Js(e){if(ee(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Je(t)}Modifiers`]||e[`${Bt(t)}Modifiers`];function xa(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Se;let o=n;const l=t.startsWith("update:"),r=l&&wa(s,t.slice(7));r&&(r.trim&&(o=n.map(u=>Pe(u)?u.trim():u)),r.number&&(o=n.map(ds)));let i,a=s[i=Rs(t)]||s[i=Rs(Je(t))];!a&&l&&(a=s[i=Rs(Bt(t))]),a&&ht(a,e,6,o);const d=s[i+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,ht(d,e,6,o)}}const ka=new WeakMap;function vr(e,t,n=!1){const s=n?ka:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const l=e.emits;let r={},i=!1;if(!le(e)){const a=d=>{const u=vr(d,t,!0);u&&(i=!0,Ue(r,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!l&&!i?(xe(e)&&s.set(e,null),null):(ee(l)?l.forEach(a=>r[a]=null):Ue(r,l),xe(e)&&s.set(e,r),r)}function bs(e,t){return!e||!is(t)?!1:(t=t.slice(2).replace(/Once$/,""),we(e,t[0].toLowerCase()+t.slice(1))||we(e,Bt(t))||we(e,t))}function Fo(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[l],slots:r,attrs:i,emit:a,render:d,renderCache:u,props:h,data:_,setupState:b,ctx:I,inheritAttrs:O}=e,U=ts(e);let J,N;try{if(n.shapeFlag&4){const H=o||s,$=H;J=yt(d.call($,H,u,h,b,_,I)),N=i}else{const H=t;J=yt(H.length>1?H(h,{attrs:i,slots:r,emit:a}):H(h,null)),N=t.props?i:Ca(i)}}catch(H){En.length=0,vs(H,e,1),J=Le(Ft)}let K=J;if(N&&O!==!1){const H=Object.keys(N),{shapeFlag:$}=K;H.length&&$&7&&(l&&H.some(as)&&(N=Sa(N,l)),K=rn(K,N,!1,!0))}return n.dirs&&(K=rn(K,null,!1,!0),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition&&_o(K,n.transition),J=K,ts(U),J}const Ca=e=>{let t;for(const n in e)(n==="class"||n==="style"||is(n))&&((t||(t={}))[n]=e[n]);return t},Sa=(e,t)=>{const n={};for(const s in e)(!as(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ea(e,t,n){const{props:s,children:o,component:l}=e,{props:r,children:i,patchFlag:a}=t,d=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Ho(s,r,d):!!r;if(a&8){const u=t.dynamicProps;for(let h=0;hObject.create(_r),br=e=>Object.getPrototypeOf(e)===_r;function Aa(e,t,n,s=!1){const o={},l=yr();e.propsDefaults=Object.create(null),wr(e,t,o,l);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);n?e.props=s?o:Zl(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function Oa(e,t,n,s){const{props:o,attrs:l,vnode:{patchFlag:r}}=e,i=ve(o),[a]=e.propsOptions;let d=!1;if((s||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let h=0;h{a=!0;const[_,b]=xr(h,t,!0);Ue(r,_),b&&i.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!l&&!a)return xe(e)&&s.set(e,nn),nn;if(ee(l))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",bo=e=>ee(e)?e.map(yt):[yt(e)],Pa=(e,t,n)=>{if(t._n)return t;const s=zn((...o)=>bo(t(...o)),n);return s._c=!1,s},kr=(e,t,n)=>{const s=e._ctx;for(const o in e){if(yo(o))continue;const l=e[o];if(le(l))t[o]=Pa(o,l,s);else if(l!=null){const r=bo(l);t[o]=()=>r}}},Cr=(e,t)=>{const n=bo(t);e.slots.default=()=>n},Sr=(e,t,n)=>{for(const s in t)(n||!yo(s))&&(e[s]=t[s])},Ia=(e,t,n)=>{const s=e.slots=yr();if(e.vnode.shapeFlag&32){const o=t._;o?(Sr(s,t,n),n&&Il(s,"_",o,!0)):kr(t,s)}else t&&Cr(e,t)},Na=(e,t,n)=>{const{vnode:s,slots:o}=e;let l=!0,r=Se;if(s.shapeFlag&32){const i=t._;i?n&&i===1?l=!1:Sr(o,t,n):(l=!t.$stable,kr(t,o)),r=t}else t&&(Cr(e,t),r={default:1});if(l)for(const i in o)!yo(i)&&r[i]==null&&delete o[i]},Xe=ja;function $a(e){return Ma(e)}function Ma(e,t){const n=hs();n.__VUE__=!0;const{insert:s,remove:o,patchProp:l,createElement:r,createText:i,createComment:a,setText:d,setElementText:u,parentNode:h,nextSibling:_,setScopeId:b=wt,insertStaticContent:I}=e,O=(f,p,g,x=null,E=null,w=null,M=void 0,P=null,T=!!p.dynamicChildren)=>{if(f===p)return;f&&!mn(f,p)&&(x=S(f),Ae(f,E,w,!0),f=null),p.patchFlag===-2&&(T=!1,p.dynamicChildren=null);const{type:R,ref:q,shapeFlag:D}=p;switch(R){case ws:U(f,p,g,x);break;case Ft:J(f,p,g,x);break;case Ms:f==null&&N(p,g,x,M);break;case Z:Q(f,p,g,x,E,w,M,P,T);break;default:D&1?$(f,p,g,x,E,w,M,P,T):D&6?he(f,p,g,x,E,w,M,P,T):(D&64||D&128)&&R.process(f,p,g,x,E,w,M,P,T,z)}q!=null&&E?kn(q,f&&f.ref,w,p||f,!p):q==null&&f&&f.ref!=null&&kn(f.ref,null,w,f,!0)},U=(f,p,g,x)=>{if(f==null)s(p.el=i(p.children),g,x);else{const E=p.el=f.el;p.children!==f.children&&d(E,p.children)}},J=(f,p,g,x)=>{f==null?s(p.el=a(p.children||""),g,x):p.el=f.el},N=(f,p,g,x)=>{[f.el,f.anchor]=I(f.children,p,g,x,f.el,f.anchor)},K=({el:f,anchor:p},g,x)=>{let E;for(;f&&f!==p;)E=_(f),s(f,g,x),f=E;s(p,g,x)},H=({el:f,anchor:p})=>{let g;for(;f&&f!==p;)g=_(f),o(f),f=g;o(p)},$=(f,p,g,x,E,w,M,P,T)=>{if(p.type==="svg"?M="svg":p.type==="math"&&(M="mathml"),f==null)Y(p,g,x,E,w,M,P,T);else{const R=f.el&&f.el._isVueCE?f.el:null;try{R&&R._beginPatch(),re(f,p,E,w,M,P,T)}finally{R&&R._endPatch()}}},Y=(f,p,g,x,E,w,M,P)=>{let T,R;const{props:q,shapeFlag:D,transition:V,dirs:X}=f;if(T=f.el=r(f.type,w,q&&q.is,q),D&8?u(T,f.children):D&16&&oe(f.children,T,null,x,E,$s(f,w),M,P),X&&Gt(f,null,x,"created"),B(T,f,f.scopeId,M,x),q){for(const pe in q)pe!=="value"&&!yn(pe)&&l(T,pe,null,q[pe],w,x);"value"in q&&l(T,"value",null,q.value,w),(R=q.onVnodeBeforeMount)&&vt(R,x,f)}X&&Gt(f,null,x,"beforeMount");const de=Da(E,V);de&&V.beforeEnter(T),s(T,p,g),((R=q&&q.onVnodeMounted)||de||X)&&Xe(()=>{try{R&&vt(R,x,f),de&&V.enter(T),X&&Gt(f,null,x,"mounted")}finally{}},E)},B=(f,p,g,x,E)=>{if(g&&b(f,g),x)for(let w=0;w{for(let R=T;R{const P=p.el=f.el;let{patchFlag:T,dynamicChildren:R,dirs:q}=p;T|=f.patchFlag&16;const D=f.props||Se,V=p.props||Se;let X;if(g&&Wt(g,!1),(X=V.onVnodeBeforeUpdate)&&vt(X,g,p,f),q&&Gt(p,f,g,"beforeUpdate"),g&&Wt(g,!0),(D.innerHTML&&V.innerHTML==null||D.textContent&&V.textContent==null)&&u(P,""),R?ke(f.dynamicChildren,R,P,g,x,$s(p,E),w):M||ue(f,p,P,null,g,x,$s(p,E),w,!1),T>0){if(T&16)W(P,D,V,g,E);else if(T&2&&D.class!==V.class&&l(P,"class",null,V.class,E),T&4&&l(P,"style",D.style,V.style,E),T&8){const de=p.dynamicProps;for(let pe=0;pe{X&&vt(X,g,p,f),q&&Gt(p,f,g,"updated")},x)},ke=(f,p,g,x,E,w,M)=>{for(let P=0;P{if(p!==g){if(p!==Se)for(const w in p)!yn(w)&&!(w in g)&&l(f,w,p[w],null,E,x);for(const w in g){if(yn(w))continue;const M=g[w],P=p[w];M!==P&&w!=="value"&&l(f,w,P,M,E,x)}"value"in g&&l(f,"value",p.value,g.value,E)}},Q=(f,p,g,x,E,w,M,P,T)=>{const R=p.el=f?f.el:i(""),q=p.anchor=f?f.anchor:i("");let{patchFlag:D,dynamicChildren:V,slotScopeIds:X}=p;X&&(P=P?P.concat(X):X),f==null?(s(R,g,x),s(q,g,x),oe(p.children||[],g,q,E,w,M,P,T)):D>0&&D&64&&V&&f.dynamicChildren&&f.dynamicChildren.length===V.length?(ke(f.dynamicChildren,V,g,E,w,M,P),(p.key!=null||E&&p===E.subTree)&&Er(f,p,!0)):ue(f,p,g,q,E,w,M,P,T)},he=(f,p,g,x,E,w,M,P,T)=>{p.slotScopeIds=P,f==null?p.shapeFlag&512?E.ctx.activate(p,g,x,M,T):se(p,g,x,E,w,M,T):Ce(f,p,T)},se=(f,p,g,x,E,w,M)=>{const P=f.component=Wa(f,x,E);if(fr(f)&&(P.ctx.renderer=z),qa(P,!1,M),P.asyncDep){if(E&&E.registerDep(P,ae,M),!f.el){const T=P.subTree=Le(Ft);J(null,T,p,g),f.placeholder=T.el}}else ae(P,f,p,g,E,w,M)},Ce=(f,p,g)=>{const x=p.component=f.component;if(Ea(f,p,g))if(x.asyncDep&&!x.asyncResolved){te(x,p,g);return}else x.next=p,x.update();else p.el=f.el,x.vnode=p},ae=(f,p,g,x,E,w,M)=>{const P=()=>{if(f.isMounted){let{next:D,bu:V,u:X,parent:de,vnode:pe}=f;{const ot=Rr(f);if(ot){D&&(D.el=pe.el,te(f,D,M)),ot.asyncDep.then(()=>{Xe(()=>{f.isUnmounted||R()},E)});return}}let _e=D,Oe;Wt(f,!1),D?(D.el=pe.el,te(f,D,M)):D=pe,V&&qn(V),(Oe=D.props&&D.props.onVnodeBeforeUpdate)&&vt(Oe,de,D,pe),Wt(f,!0);const Ne=Fo(f),st=f.subTree;f.subTree=Ne,O(st,Ne,h(st.el),S(st),f,E,w),D.el=Ne.el,_e===null&&Ra(f,Ne.el),X&&Xe(X,E),(Oe=D.props&&D.props.onVnodeUpdated)&&Xe(()=>vt(Oe,de,D,pe),E)}else{let D;const{el:V,props:X}=p,{bm:de,m:pe,parent:_e,root:Oe,type:Ne}=f,st=Cn(p);Wt(f,!1),de&&qn(de),!st&&(D=X&&X.onVnodeBeforeMount)&&vt(D,_e,p),Wt(f,!0);{Oe.ce&&Oe.ce._hasShadowRoot()&&Oe.ce._injectChildStyle(Ne,f.parent?f.parent.type:void 0);const ot=f.subTree=Fo(f);O(null,ot,g,x,f,E,w),p.el=ot.el}if(pe&&Xe(pe,E),!st&&(D=X&&X.onVnodeMounted)){const ot=p;Xe(()=>vt(D,_e,ot),E)}(p.shapeFlag&256||_e&&Cn(_e.vnode)&&_e.vnode.shapeFlag&256)&&f.a&&Xe(f.a,E),f.isMounted=!0,p=g=x=null}};f.scope.on();const T=f.effect=new Vl(P);f.scope.off();const R=f.update=T.run.bind(T),q=f.job=T.runIfDirty.bind(T);q.i=f,q.id=f.uid,T.scheduler=()=>go(q),Wt(f,!0),R()},te=(f,p,g)=>{p.component=f;const x=f.vnode.props;f.vnode=p,f.next=null,Oa(f,p.props,x,g),Na(f,p.children,g),Pt(),Io(f),It()},ue=(f,p,g,x,E,w,M,P,T=!1)=>{const R=f&&f.children,q=f?f.shapeFlag:0,D=p.children,{patchFlag:V,shapeFlag:X}=p;if(V>0){if(V&128){je(R,D,g,x,E,w,M,P,T);return}else if(V&256){ut(R,D,g,x,E,w,M,P,T);return}}X&8?(q&16&&Qe(R,E,w),D!==R&&u(g,D)):q&16?X&16?je(R,D,g,x,E,w,M,P,T):Qe(R,E,w,!0):(q&8&&u(g,""),X&16&&oe(D,g,x,E,w,M,P,T))},ut=(f,p,g,x,E,w,M,P,T)=>{f=f||nn,p=p||nn;const R=f.length,q=p.length,D=Math.min(R,q);let V;for(V=0;Vq?Qe(f,E,w,!0,!1,D):oe(p,g,x,E,w,M,P,T,D)},je=(f,p,g,x,E,w,M,P,T)=>{let R=0;const q=p.length;let D=f.length-1,V=q-1;for(;R<=D&&R<=V;){const X=f[R],de=p[R]=T?Et(p[R]):yt(p[R]);if(mn(X,de))O(X,de,g,null,E,w,M,P,T);else break;R++}for(;R<=D&&R<=V;){const X=f[D],de=p[V]=T?Et(p[V]):yt(p[V]);if(mn(X,de))O(X,de,g,null,E,w,M,P,T);else break;D--,V--}if(R>D){if(R<=V){const X=V+1,de=XV)for(;R<=D;)Ae(f[R],E,w,!0),R++;else{const X=R,de=R,pe=new Map;for(R=de;R<=V;R++){const Ge=p[R]=T?Et(p[R]):yt(p[R]);Ge.key!=null&&pe.set(Ge.key,R)}let _e,Oe=0;const Ne=V-de+1;let st=!1,ot=0;const Kt=new Array(Ne);for(R=0;R=Ne){Ae(Ge,E,w,!0);continue}let Ve;if(Ge.key!=null)Ve=pe.get(Ge.key);else for(_e=de;_e<=V;_e++)if(Kt[_e-de]===0&&mn(Ge,p[_e])){Ve=_e;break}Ve===void 0?Ae(Ge,E,w,!0):(Kt[Ve-de]=R+1,Ve>=ot?ot=Ve:st=!0,O(Ge,p[Ve],g,null,E,w,M,P,T),Oe++)}const Fn=st?La(Kt):nn;for(_e=Fn.length-1,R=Ne-1;R>=0;R--){const Ge=de+R,Ve=p[Ge],Hn=p[Ge+1],Qt=Ge+1{const{el:w,type:M,transition:P,children:T,shapeFlag:R}=f;if(R&6){Fe(f.component.subTree,p,g,x);return}if(R&128){f.suspense.move(p,g,x);return}if(R&64){M.move(f,p,g,z);return}if(M===Z){s(w,p,g);for(let D=0;DP.enter(w),E));else{const{leave:D,delayLeave:V,afterLeave:X}=P,de=()=>{f.ctx.isUnmounted?o(w):s(w,p,g)},pe=()=>{const _e=w._isLeaving||!!w[Is];w._isLeaving&&w[Is](!0),P.persisted&&!_e?de():D(w,()=>{de(),X&&X()})};V?V(w,de,pe):pe()}else s(w,p,g)},Ae=(f,p,g,x=!1,E=!1)=>{const{type:w,props:M,ref:P,children:T,dynamicChildren:R,shapeFlag:q,patchFlag:D,dirs:V,cacheIndex:X,memo:de}=f;if(D===-2&&(E=!1),P!=null&&(Pt(),kn(P,null,g,f,!0),It()),X!=null&&(p.renderCache[X]=void 0),q&256){p.ctx.deactivate(f);return}const pe=q&1&&V,_e=!Cn(f);let Oe;if(_e&&(Oe=M&&M.onVnodeBeforeUnmount)&&vt(Oe,p,f),q&6)xt(f.component,g,x);else{if(q&128){f.suspense.unmount(g,x);return}pe&&Gt(f,null,p,"beforeUnmount"),q&64?f.type.remove(f,p,g,z,x):R&&!R.hasOnce&&(w!==Z||D>0&&D&64)?Qe(R,p,g,!1,!0):(w===Z&&D&384||!E&&q&16)&&Qe(T,p,g),x&&Ye(f)}const Ne=de!=null&&X==null;(_e&&(Oe=M&&M.onVnodeUnmounted)||pe||Ne)&&Xe(()=>{Oe&&vt(Oe,p,f),pe&&Gt(f,null,p,"unmounted"),Ne&&(f.el=null)},g)},Ye=f=>{const{type:p,el:g,anchor:x,transition:E}=f;if(p===Z){mt(g,x);return}if(p===Ms){H(f);return}const w=()=>{o(g),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(f.shapeFlag&1&&E&&!E.persisted){const{leave:M,delayLeave:P}=E,T=()=>M(g,w);P?P(f.el,w,T):T()}else w()},mt=(f,p)=>{let g;for(;f!==p;)g=_(f),o(f),f=g;o(p)},xt=(f,p,g)=>{const{bum:x,scope:E,job:w,subTree:M,um:P,m:T,a:R}=f;Ko(T),Ko(R),x&&qn(x),E.stop(),w&&(w.flags|=8,Ae(M,f,p,g)),P&&Xe(P,p),Xe(()=>{f.isUnmounted=!0},p)},Qe=(f,p,g,x=!1,E=!1,w=0)=>{for(let M=w;M{if(f.shapeFlag&6)return S(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const p=_(f.anchor||f.el),g=p&&p[Qi];return g?_(g):p};let F=!1;const j=(f,p,g)=>{let x;f==null?p._vnode&&(Ae(p._vnode,null,null,!0),x=p._vnode.component):O(p._vnode||null,f,p,null,null,null,g),p._vnode=f,F||(F=!0,Io(x),or(),F=!1)},z={p:O,um:Ae,m:Fe,r:Ye,mt:se,mc:oe,pc:ue,pbc:ke,n:S,o:e};return{render:j,hydrate:void 0,createApp:ba(j)}}function $s({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 Wt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Da(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Er(e,t,n=!1){const s=e.children,o=t.children;if(ee(s)&&ee(o))for(let l=0;l>1,e[n[i]]0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,r=n[l-1];l-- >0;)n[l]=r,r=t[r];return n}function Rr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Rr(t)}function Ko(e){if(e)for(let t=0;te.__isSuspense;function ja(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):Wi(e)}const Z=Symbol.for("v-fgt"),ws=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),Ms=Symbol.for("v-stc"),En=[];let tt=null;function k(e=!1){En.push(tt=e?null:[])}function Va(){En.pop(),tt=En[En.length-1]||null}let In=1;function os(e,t=!1){In+=e,e<0&&tt&&t&&(tt.hasOnce=!0)}function Tr(e){return e.dynamicChildren=In>0?tt||nn:null,Va(),In>0&&tt&&tt.push(e),e}function C(e,t,n,s,o,l){return Tr(c(e,t,n,s,o,l,!0))}function Ua(e,t,n,s,o){return Tr(Le(e,t,n,s,o,!0))}function ls(e){return e?e.__v_isVNode===!0:!1}function mn(e,t){return e.type===t.type&&e.key===t.key}const Pr=({key:e})=>e??null,Yn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Pe(e)||Ie(e)||le(e)?{i:et,r:e,k:t,f:!!n}:e:null);function c(e,t=null,n=null,s=0,o=null,l=e===Z?0:1,r=!1,i=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Pr(t),ref:t&&Yn(t),scopeId:rr,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:l,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:et};return i?(wo(a,n),l&128&&e.normalize(a)):n&&(a.shapeFlag|=Pe(n)?8:16),In>0&&!r&&tt&&(a.patchFlag>0||l&6)&&a.patchFlag!==32&&tt.push(a),a}const Le=Fa;function Fa(e,t=null,n=null,s=0,o=null,l=!1){if((!e||e===fa)&&(e=Ft),ls(e)){const i=rn(e,t,!0);return n&&wo(i,n),In>0&&!l&&tt&&(i.shapeFlag&6?tt[tt.indexOf(e)]=i:tt.push(i)),i.patchFlag=-2,i}if(Xa(e)&&(e=e.__vccOpts),t){t=Ha(t);let{class:i,style:a}=t;i&&!Pe(i)&&(t.class=Ze(i)),xe(a)&&(ms(a)&&!ee(a)&&(a=Ue({},a)),t.style=io(a))}const r=Pe(e)?1:Or(e)?128:Xi(e)?64:xe(e)?4:le(e)?2:0;return c(e,t,n,s,o,r,l,!0)}function Ha(e){return e?ms(e)||br(e)?Ue({},e):e:null}function rn(e,t,n=!1,s=!1){const{props:o,ref:l,patchFlag:r,children:i,transition:a}=e,d=t?Ba(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Pr(d),ref:t&&t.ref?n&&l?ee(l)?l.concat(Yn(t)):[l,Yn(t)]:Yn(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Z?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&rn(e.ssContent),ssFallback:e.ssFallback&&rn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&_o(u,a.clone(u)),u}function ye(e=" ",t=0){return Le(ws,null,e,t)}function Re(e="",t=!1){return t?(k(),Ua(Ft,null,e)):Le(Ft,null,e)}function yt(e){return e==null||typeof e=="boolean"?Le(Ft):ee(e)?Le(Z,null,e.slice()):ls(e)?Et(e):Le(ws,null,String(e))}function Et(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:rn(e)}function wo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),wo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!br(t)?t._ctx=et:o===3&&et&&(et.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else le(t)?(t={default:t,_ctx:et},n=32):(t=String(t),s&64?(n=16,t=[ye(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ba(...e){const t={};for(let n=0;nKe||et;let rs,Qs;{const e=hs(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),l=>{o.length>1?o.forEach(r=>r(l)):o[0](l)}};rs=t("__VUE_INSTANCE_SETTERS__",n=>Ke=n),Qs=t("__VUE_SSR_SETTERS__",n=>Nn=n)}const Vn=e=>{const t=Ke;return rs(e),e.scope.on(),()=>{e.scope.off(),rs(t)}},Go=()=>{Ke&&Ke.scope.off(),rs(null)};function Nr(e){return e.vnode.shapeFlag&4}let Nn=!1;function qa(e,t=!1,n=!1){t&&Qs(t);const{props:s,children:o}=e.vnode,l=Nr(e);Aa(e,s,l,t),Ia(e,o,n||t);const r=l?za(e,t):void 0;return t&&Qs(!1),r}function za(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ha);const{setup:s}=n;if(s){Pt();const o=e.setupContext=s.length>1?Ya(e):null,l=Vn(e),r=Ln(s,e,0,[e.props,o]),i=Ol(r);if(It(),l(),(i||e.sp)&&!Cn(e)&&ur(e),i){if(r.then(Go,Go),t)return r.then(a=>{Wo(e,a)}).catch(a=>{vs(a,e,0)});e.asyncDep=r}else Wo(e,r)}else $r(e)}function Wo(e,t,n){le(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:xe(t)&&(e.setupState=tr(t)),$r(e)}function $r(e,t,n){const s=e.type;e.render||(e.render=s.render||wt);{const o=Vn(e);Pt();try{pa(e)}finally{It(),o()}}}const Ja={get(e,t){return Be(e,"get",""),e[t]}};function Ya(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Ja),slots:e.slots,emit:e.emit,expose:t}}function xs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tr(vo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Sn)return Sn[n](e)},has(t,n){return n in t||n in Sn}})):e.proxy}function Qa(e,t=!0){return le(e)?e.displayName||e.name:e.name||t&&e.__name}function Xa(e){return le(e)&&"__vccOpts"in e}const ge=(e,t)=>Fi(e,t,Nn);function Mr(e,t,n){try{os(-1);const s=arguments.length;return s===2?xe(t)&&!ee(t)?ls(t)?Le(e,null,[t]):Le(e,t):Le(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&ls(n)&&(n=[n]),Le(e,t,n))}finally{os(1)}}const Za="3.5.35";/** +* @vue/runtime-dom v3.5.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Xs;const qo=typeof window<"u"&&window.trustedTypes;if(qo)try{Xs=qo.createPolicy("vue",{createHTML:e=>e})}catch{}const Dr=Xs?e=>Xs.createHTML(e):e=>e,ec="http://www.w3.org/2000/svg",tc="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,zo=St&&St.createElement("template"),nc={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 o=t==="svg"?St.createElementNS(ec,e):t==="mathml"?St.createElementNS(tc,e):n?St.createElement(e,{is:n}):St.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>St.createTextNode(e),createComment:e=>St.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>St.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,l){const r=n?n.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{zo.innerHTML=Dr(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const i=zo.content;if(s==="svg"||s==="mathml"){const a=i.firstChild;for(;a.firstChild;)i.appendChild(a.firstChild);i.removeChild(a)}t.insertBefore(i,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},sc=Symbol("_vtc");function oc(e,t,n){const s=e[sc];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Jo=Symbol("_vod"),lc=Symbol("_vsh"),rc=Symbol(""),ic=/(?:^|;)\s*display\s*:/;function ac(e,t,n){const s=e.style,o=Pe(n);let l=!1;if(n&&!o){if(t)if(Pe(t))for(const r of t.split(";")){const i=r.slice(0,r.indexOf(":")).trim();n[i]==null&&_n(s,i,"")}else for(const r in t)n[r]==null&&_n(s,r,"");for(const r in n){r==="display"&&(l=!0);const i=n[r];i!=null?uc(e,r,!Pe(t)&&t?t[r]:void 0,i)||_n(s,r,i):_n(s,r,"")}}else if(o){if(t!==n){const r=s[rc];r&&(n+=";"+r),s.cssText=n,l=ic.test(n)}}else t&&e.removeAttribute("style");Jo in e&&(e[Jo]=l?s.display:"",e[lc]&&(s.display="none"))}const Yo=/\s*!important$/;function _n(e,t,n){if(ee(n))n.forEach(s=>_n(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=cc(e,t);Yo.test(n)?e.setProperty(Bt(s),n.replace(Yo,""),"important"):e[s]=n}}const Qo=["Webkit","Moz","ms"],Ds={};function cc(e,t){const n=Ds[t];if(n)return n;let s=Je(t);if(s!=="filter"&&s in e)return Ds[t]=s;s=fs(s);for(let o=0;oLs||(pc.then(()=>Ls=0),Ls=Date.now());function vc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(ee(o)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const r=o.slice(),i=[s];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,gc=(e,t,n,s,o,l)=>{const r=o==="svg";t==="class"?oc(e,s,r):t==="style"?ac(e,n,s):is(t)?as(t)||dc(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):_c(e,t,s,r))?(el(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Zo(e,t,s,r,l,t!=="value")):e._isVueCE&&(yc(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Pe(s)))?el(e,Je(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Zo(e,t,s,r))};function _c(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&sl(t)&&le(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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return sl(t)&&Pe(n)?!1:t in e}function yc(e,t){const n=e._def.props;if(!n)return!1;const s=Je(t);return Array.isArray(n)?n.some(o=>Je(o)===s):Object.keys(n).some(o=>Je(o)===s)}const Ht=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ee(t)?n=>qn(t,n):t};function bc(e){e.target.composing=!0}function ol(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const at=Symbol("_assign");function ll(e,t,n){return t&&(e=e.trim()),n&&(e=ds(e)),e}const rt={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[at]=Ht(o);const l=s||o.props&&o.props.type==="number";Ot(e,t?"change":"input",r=>{r.target.composing||e[at](ll(e.value,n,l))}),(n||l)&&Ot(e,"change",()=>{e.value=ll(e.value,n,l)}),t||(Ot(e,"compositionstart",bc),Ot(e,"compositionend",ol),Ot(e,"change",ol))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:l}},r){if(e[at]=Ht(r),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?ds(e.value):e.value,a=t??"";if(i===a)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===a)||(e.value=a)}},wc={deep:!0,created(e,t,n){e[at]=Ht(n),Ot(e,"change",()=>{const s=e._modelValue,o=an(e),l=e.checked,r=e[at];if(ee(s)){const i=ao(s,o),a=i!==-1;if(l&&!a)r(s.concat(o));else if(!l&&a){const d=[...s];d.splice(i,1),r(d)}}else if(fn(s)){const i=new Set(s);l?i.add(o):i.delete(o),r(i)}else r(Lr(e,l))})},mounted:rl,beforeUpdate(e,t,n){e[at]=Ht(n),rl(e,t,n)}};function rl(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(ee(t))o=ao(t,s.props.value)>-1;else if(fn(t))o=t.has(s.props.value);else{if(t===n)return;o=Ut(t,Lr(e,!0))}e.checked!==o&&(e.checked=o)}const il={created(e,{value:t},n){e.checked=Ut(t,n.props.value),e[at]=Ht(n),Ot(e,"change",()=>{e[at](an(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[at]=Ht(s),t!==n&&(e.checked=Ut(t,s.props.value))}},xc={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=fn(t);Ot(e,"change",()=>{const l=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?ds(an(r)):an(r));e[at](e.multiple?o?new Set(l):l:l[0]),e._assigning=!0,jn(()=>{e._assigning=!1})}),e[at]=Ht(s)},mounted(e,{value:t}){al(e,t)},beforeUpdate(e,t,n){e[at]=Ht(n)},updated(e,{value:t}){e._assigning||al(e,t)}};function al(e,t){const n=e.multiple,s=ee(t);if(!(n&&!s&&!fn(t))){for(let o=0,l=e.options.length;oString(d)===String(i)):r.selected=ao(t,i)>-1}else r.selected=t.has(i);else if(Ut(an(r),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function an(e){return"_value"in e?e._value:e.value}function Lr(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const kc=["ctrl","shift","alt","meta"],Cc={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)=>kc.some(n=>e[`${n}Key`]&&!t.includes(n))},Wn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...l)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const l=Bt(o.key);if(t.some(r=>r===l||Sc[r]===l))return e(o)})},Ec=Ue({patchProp:gc},nc);let cl;function Rc(){return cl||(cl=$a(Ec))}const Ac=(...e)=>{const t=Rc().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Tc(s);if(!o)return;const l=t._component;!le(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=n(o,!1,Oc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t};function Oc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Tc(e){return Pe(e)?document.querySelector(e):e}/*! + * pinia v2.3.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let jr;const ks=e=>jr=e,Vr=Symbol();function Zs(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Rn;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Rn||(Rn={}));function Pc(){const e=Ll(!0),t=e.run(()=>ne({}));let n=[],s=[];const o=vo({install(l){ks(o),o._a=l,l.provide(Vr,o),l.config.globalProperties.$pinia=o,s.forEach(r=>n.push(r)),s=[]},use(l){return this._a?n.push(l):s.push(l),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Ur=()=>{};function ul(e,t,n,s=Ur){e.push(t);const o=()=>{const l=e.indexOf(t);l>-1&&(e.splice(l,1),s())};return!n&&jl()&&mi(o),o}function Zt(e,...t){e.slice().forEach(n=>{n(...t)})}const Ic=e=>e(),fl=Symbol(),js=Symbol();function eo(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];Zs(o)&&Zs(s)&&e.hasOwnProperty(n)&&!Ie(s)&&!Tt(s)?e[n]=eo(o,s):e[n]=s}return e}const Nc=Symbol();function $c(e){return!Zs(e)||!e.hasOwnProperty(Nc)}const{assign:Dt}=Object;function Mc(e){return!!(Ie(e)&&e.effect)}function Dc(e,t,n,s){const{state:o,actions:l,getters:r}=t,i=n.state.value[e];let a;function d(){i||(n.state.value[e]=o?o():{});const u=Li(n.state.value[e]);return Dt(u,l,Object.keys(r||{}).reduce((h,_)=>(h[_]=vo(ge(()=>{ks(n);const b=n._s.get(e);return r[_].call(b,b)})),h),{}))}return a=Fr(e,d,t,n,s,!0),a}function Fr(e,t,n={},s,o,l){let r;const i=Dt({actions:{}},n),a={deep:!0};let d,u,h=[],_=[],b;const I=s.state.value[e];!l&&!I&&(s.state.value[e]={});let O;function U(oe){let re;d=u=!1,typeof oe=="function"?(oe(s.state.value[e]),re={type:Rn.patchFunction,storeId:e,events:b}):(eo(s.state.value[e],oe),re={type:Rn.patchObject,payload:oe,storeId:e,events:b});const ke=O=Symbol();jn().then(()=>{O===ke&&(d=!0)}),u=!0,Zt(h,re,s.state.value[e])}const J=l?function(){const{state:re}=n,ke=re?re():{};this.$patch(W=>{Dt(W,ke)})}:Ur;function N(){r.stop(),h=[],_=[],s._s.delete(e)}const K=(oe,re="")=>{if(fl in oe)return oe[js]=re,oe;const ke=function(){ks(s);const W=Array.from(arguments),Q=[],he=[];function se(te){Q.push(te)}function Ce(te){he.push(te)}Zt(_,{args:W,name:ke[js],store:$,after:se,onError:Ce});let ae;try{ae=oe.apply(this&&this.$id===e?this:$,W)}catch(te){throw Zt(he,te),te}return ae instanceof Promise?ae.then(te=>(Zt(Q,te),te)).catch(te=>(Zt(he,te),Promise.reject(te))):(Zt(Q,ae),ae)};return ke[fl]=!0,ke[js]=re,ke},H={_p:s,$id:e,$onAction:ul.bind(null,_),$patch:U,$reset:J,$subscribe(oe,re={}){const ke=ul(h,oe,re.detached,()=>W()),W=r.run(()=>xn(()=>s.state.value[e],Q=>{(re.flush==="sync"?u:d)&&oe({storeId:e,type:Rn.direct,events:b},Q)},Dt({},a,re)));return ke},$dispose:N},$=Dn(H);s._s.set(e,$);const B=(s._a&&s._a.runWithContext||Ic)(()=>s._e.run(()=>(r=Ll()).run(()=>t({action:K}))));for(const oe in B){const re=B[oe];if(Ie(re)&&!Mc(re)||Tt(re))l||(I&&$c(re)&&(Ie(re)?re.value=I[oe]:eo(re,I[oe])),s.state.value[e][oe]=re);else if(typeof re=="function"){const ke=K(re,oe);B[oe]=ke,i.actions[oe]=re}}return Dt($,B),Dt(ve($),B),Object.defineProperty($,"$state",{get:()=>s.state.value[e],set:oe=>{U(re=>{Dt(re,oe)})}}),s._p.forEach(oe=>{Dt($,r.run(()=>oe({store:$,app:s._a,pinia:s,options:i})))}),I&&l&&n.hydrate&&n.hydrate($.$state,I),d=!0,u=!0,$}/*! #__NO_SIDE_EFFECTS__ */function Lc(e,t,n){let s,o;const l=typeof t=="function";s=e,o=l?n:t;function r(i,a){const d=qi();return i=i||(d?it(Vr,null):null),i&&ks(i),i=jr,i._s.has(s)||(l?Fr(s,t,o,i):Dc(s,o,i)),i._s.get(s)}return r.$id=s,r}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const tn=typeof document<"u";function Hr(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function jc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Hr(e.default)}const be=Object.assign;function Vs(e,t){const n={};for(const s in t){const o=t[s];n[s]=pt(o)?o.map(e):e(o)}return n}const An=()=>{},pt=Array.isArray;function dl(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}const Br=/#/g,Vc=/&/g,Uc=/\//g,Fc=/=/g,Hc=/\?/g,Kr=/\+/g,Bc=/%5B/g,Kc=/%5D/g,Gr=/%5E/g,Gc=/%60/g,Wr=/%7B/g,Wc=/%7C/g,qr=/%7D/g,qc=/%20/g;function xo(e){return e==null?"":encodeURI(""+e).replace(Wc,"|").replace(Bc,"[").replace(Kc,"]")}function zc(e){return xo(e).replace(Wr,"{").replace(qr,"}").replace(Gr,"^")}function to(e){return xo(e).replace(Kr,"%2B").replace(qc,"+").replace(Br,"%23").replace(Vc,"%26").replace(Gc,"`").replace(Wr,"{").replace(qr,"}").replace(Gr,"^")}function Jc(e){return to(e).replace(Fc,"%3D")}function Yc(e){return xo(e).replace(Br,"%23").replace(Hc,"%3F")}function Qc(e){return Yc(e).replace(Uc,"%2F")}function $n(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const Xc=/\/$/,Zc=e=>e.replace(Xc,"");function Us(e,t,n="/"){let s,o={},l="",r="";const i=t.indexOf("#");let a=t.indexOf("?");return a=i>=0&&a>i?-1:a,a>=0&&(s=t.slice(0,a),l=t.slice(a,i>0?i:t.length),o=e(l.slice(1))),i>=0&&(s=s||t.slice(0,i),r=t.slice(i,t.length)),s=su(s??t,n),{fullPath:s+l+r,path:s,query:o,hash:$n(r)}}function eu(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function hl(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function tu(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&cn(t.matched[s],n.matched[o])&&zr(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function cn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function zr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!nu(e[n],t[n]))return!1;return!0}function nu(e,t){return pt(e)?pl(e,t):pt(t)?pl(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function pl(e,t){return pt(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function su(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let l=n.length-1,r,i;for(r=0;r1&&l--;else break;return n.slice(0,l).join("/")+"/"+s.slice(r).join("/")}const Mt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let no=function(e){return e.pop="pop",e.push="push",e}({}),Fs=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function ou(e){if(!e)if(tn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Zc(e)}const lu=/^[^#]+#/;function ru(e,t){return e.replace(lu,"#")+t}function iu(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Cs=()=>({left:window.scrollX,top:window.scrollY});function au(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=iu(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ml(e,t){return(history.state?history.state.position-t:-1)+e}const so=new Map;function cu(e,t){so.set(e,t)}function uu(e){const t=so.get(e);return so.delete(e),t}function fu(e){return typeof e=="string"||e&&typeof e=="object"}function Jr(e){return typeof e=="string"||typeof e=="symbol"}let Te=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Yr=Symbol("");Te.MATCHER_NOT_FOUND+"",Te.NAVIGATION_GUARD_REDIRECT+"",Te.NAVIGATION_ABORTED+"",Te.NAVIGATION_CANCELLED+"",Te.NAVIGATION_DUPLICATED+"";function un(e,t){return be(new Error,{type:e,[Yr]:!0},t)}function Ct(e,t){return e instanceof Error&&Yr in e&&(t==null||!!(e.type&t))}const du=["params","query","hash"];function hu(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of du)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function pu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&to(o)):[s&&to(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function mu(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=pt(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}const vu=Symbol(""),gl=Symbol(""),Ss=Symbol(""),ko=Symbol(""),oo=Symbol("");function vn(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function jt(e,t,n,s,o,l=r=>r()){const r=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((i,a)=>{const d=_=>{_===!1?a(un(Te.NAVIGATION_ABORTED,{from:n,to:t})):_ instanceof Error?a(_):fu(_)?a(un(Te.NAVIGATION_GUARD_REDIRECT,{from:t,to:_})):(r&&s.enterCallbacks[o]===r&&typeof _=="function"&&r.push(_),i())},u=l(()=>e.call(s&&s.instances[o],t,n,d));let h=Promise.resolve(u);e.length<3&&(h=h.then(d)),h.catch(_=>a(_))})}function Hs(e,t,n,s,o=l=>l()){const l=[];for(const r of e)for(const i in r.components){let a=r.components[i];if(!(t!=="beforeRouteEnter"&&!r.instances[i]))if(Hr(a)){const d=(a.__vccOpts||a)[t];d&&l.push(jt(d,n,s,r,i,o))}else{let d=a();l.push(()=>d.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${r.path}"`);const h=jc(u)?u.default:u;r.mods[i]=u,r.components[i]=h;const _=(h.__vccOpts||h)[t];return _&&jt(_,n,s,r,i,o)()}))}}return l}function gu(e,t){const n=[],s=[],o=[],l=Math.max(t.matched.length,e.matched.length);for(let r=0;rcn(d,i))?s.push(i):n.push(i));const a=e.matched[r];a&&(t.matched.find(d=>cn(d,a))||o.push(a))}return[n,s,o]}/*! + * vue-router v4.6.4 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let _u=()=>location.protocol+"//"+location.host;function Qr(e,t){const{pathname:n,search:s,hash:o}=t,l=e.indexOf("#");if(l>-1){let r=o.includes(e.slice(l))?e.slice(l).length:1,i=o.slice(r);return i[0]!=="/"&&(i="/"+i),hl(i,"")}return hl(n,e)+s+o}function yu(e,t,n,s){let o=[],l=[],r=null;const i=({state:_})=>{const b=Qr(e,location),I=n.value,O=t.value;let U=0;if(_){if(n.value=b,t.value=_,r&&r===I){r=null;return}U=O?_.position-O.position:0}else s(b);o.forEach(J=>{J(n.value,I,{delta:U,type:no.pop,direction:U?U>0?Fs.forward:Fs.back:Fs.unknown})})};function a(){r=n.value}function d(_){o.push(_);const b=()=>{const I=o.indexOf(_);I>-1&&o.splice(I,1)};return l.push(b),b}function u(){if(document.visibilityState==="hidden"){const{history:_}=window;if(!_.state)return;_.replaceState(be({},_.state,{scroll:Cs()}),"")}}function h(){for(const _ of l)_();l=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:a,listen:d,destroy:h}}function _l(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?Cs():null}}function bu(e){const{history:t,location:n}=window,s={value:Qr(e,n)},o={value:t.state};o.value||l(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(a,d,u){const h=e.indexOf("#"),_=h>-1?(n.host&&document.querySelector("base")?e:e.slice(h))+a:_u()+e+a;try{t[u?"replaceState":"pushState"](d,"",_),o.value=d}catch(b){console.error(b),n[u?"replace":"assign"](_)}}function r(a,d){l(a,be({},t.state,_l(o.value.back,a,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=a}function i(a,d){const u=be({},o.value,t.state,{forward:a,scroll:Cs()});l(u.current,u,!0),l(a,be({},_l(s.value,a,null),{position:u.position+1},d),!1),s.value=a}return{location:s,state:o,push:i,replace:r}}function wu(e){e=ou(e);const t=bu(e),n=yu(e,t.state,t.location,t.replace);function s(l,r=!0){r||n.pauseListeners(),history.go(l)}const o=be({location:"",base:e,go:s,createHref:ru.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function xu(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),wu(e)}let zt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Me=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Me||{});const ku={type:zt.Static,value:""},Cu=/[a-zA-Z0-9_]/;function Su(e){if(!e)return[[]];if(e==="/")return[[ku]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${n})/"${d}": ${b}`)}let n=Me.Static,s=n;const o=[];let l;function r(){l&&o.push(l),l=[]}let i=0,a,d="",u="";function h(){d&&(n===Me.Static?l.push({type:zt.Static,value:d}):n===Me.Param||n===Me.ParamRegExp||n===Me.ParamRegExpEnd?(l.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),l.push({type:zt.Param,value:d,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),d="")}function _(){d+=a}for(;it.length?t.length===1&&t[0]===qe.Static+qe.Segment?1:-1:0}function Xr(e,t){let n=0;const s=e.score,o=t.score;for(;n0&&t[t.length-1]<0}const Tu={strict:!1,end:!0,sensitive:!1};function Pu(e,t,n){const s=Au(Su(e.path),n),o=be(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Iu(e,t){const n=[],s=new Map;t=dl(Tu,t);function o(h){return s.get(h)}function l(h,_,b){const I=!b,O=xl(h);O.aliasOf=b&&b.record;const U=dl(t,h),J=[O];if("alias"in h){const H=typeof h.alias=="string"?[h.alias]:h.alias;for(const $ of H)J.push(xl(be({},O,{components:b?b.record.components:O.components,path:$,aliasOf:b?b.record:O})))}let N,K;for(const H of J){const{path:$}=H;if(_&&$[0]!=="/"){const Y=_.record.path,B=Y[Y.length-1]==="/"?"":"/";H.path=_.record.path+($&&B+$)}if(N=Pu(H,_,U),b?b.alias.push(N):(K=K||N,K!==N&&K.alias.push(N),I&&h.name&&!kl(N)&&r(h.name)),Zr(N)&&a(N),O.children){const Y=O.children;for(let B=0;B{r(K)}:An}function r(h){if(Jr(h)){const _=s.get(h);_&&(s.delete(h),n.splice(n.indexOf(_),1),_.children.forEach(r),_.alias.forEach(r))}else{const _=n.indexOf(h);_>-1&&(n.splice(_,1),h.record.name&&s.delete(h.record.name),h.children.forEach(r),h.alias.forEach(r))}}function i(){return n}function a(h){const _=Mu(h,n);n.splice(_,0,h),h.record.name&&!kl(h)&&s.set(h.record.name,h)}function d(h,_){let b,I={},O,U;if("name"in h&&h.name){if(b=s.get(h.name),!b)throw un(Te.MATCHER_NOT_FOUND,{location:h});U=b.record.name,I=be(wl(_.params,b.keys.filter(K=>!K.optional).concat(b.parent?b.parent.keys.filter(K=>K.optional):[]).map(K=>K.name)),h.params&&wl(h.params,b.keys.map(K=>K.name))),O=b.stringify(I)}else if(h.path!=null)O=h.path,b=n.find(K=>K.re.test(O)),b&&(I=b.parse(O),U=b.record.name);else{if(b=_.name?s.get(_.name):n.find(K=>K.re.test(_.path)),!b)throw un(Te.MATCHER_NOT_FOUND,{location:h,currentLocation:_});U=b.record.name,I=be({},_.params,h.params),O=b.stringify(I)}const J=[];let N=b;for(;N;)J.unshift(N.record),N=N.parent;return{name:U,path:O,params:I,matched:J,meta:$u(J)}}e.forEach(h=>l(h));function u(){n.length=0,s.clear()}return{addRoute:l,resolve:d,removeRoute:r,clearRoutes:u,getRoutes:i,getRecordMatcher:o}}function wl(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function xl(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Nu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Nu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function kl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function $u(e){return e.reduce((t,n)=>be(t,n.meta),{})}function Mu(e,t){let n=0,s=t.length;for(;n!==s;){const l=n+s>>1;Xr(e,t[l])<0?s=l:n=l+1}const o=Du(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function Du(e){let t=e;for(;t=t.parent;)if(Zr(t)&&Xr(e,t)===0)return t}function Zr({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Cl(e){const t=it(Ss),n=it(ko),s=ge(()=>{const a=Vt(e.to);return t.resolve(a)}),o=ge(()=>{const{matched:a}=s.value,{length:d}=a,u=a[d-1],h=n.matched;if(!u||!h.length)return-1;const _=h.findIndex(cn.bind(null,u));if(_>-1)return _;const b=Sl(a[d-2]);return d>1&&Sl(u)===b&&h[h.length-1].path!==b?h.findIndex(cn.bind(null,a[d-2])):_}),l=ge(()=>o.value>-1&&Fu(n.params,s.value.params)),r=ge(()=>o.value>-1&&o.value===n.matched.length-1&&zr(n.params,s.value.params));function i(a={}){if(Uu(a)){const d=t[Vt(e.replace)?"replace":"push"](Vt(e.to)).catch(An);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:ge(()=>s.value.href),isActive:l,isExactActive:r,navigate:i}}function Lu(e){return e.length===1?e[0]:e}const ju=cr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Cl,setup(e,{slots:t}){const n=Dn(Cl(e)),{options:s}=it(Ss),o=ge(()=>({[El(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[El(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&Lu(t.default(n));return e.custom?l:Mr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},l)}}}),Vu=ju;function Uu(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Fu(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!pt(o)||o.length!==s.length||s.some((l,r)=>l.valueOf()!==o[r].valueOf()))return!1}return!0}function Sl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const El=(e,t,n)=>e??t??n,Hu=cr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=it(oo),o=ge(()=>e.route||s.value),l=it(gl,0),r=ge(()=>{let d=Vt(l);const{matched:u}=o.value;let h;for(;(h=u[d])&&!h.components;)d++;return d}),i=ge(()=>o.value.matched[r.value]);Jn(gl,ge(()=>r.value+1)),Jn(vu,i),Jn(oo,o);const a=ne();return xn(()=>[a.value,i.value,e.name],([d,u,h],[_,b,I])=>{u&&(u.instances[h]=d,b&&b!==u&&d&&d===_&&(u.leaveGuards.size||(u.leaveGuards=b.leaveGuards),u.updateGuards.size||(u.updateGuards=b.updateGuards))),d&&u&&(!b||!cn(u,b)||!_)&&(u.enterCallbacks[h]||[]).forEach(O=>O(d))},{flush:"post"}),()=>{const d=o.value,u=e.name,h=i.value,_=h&&h.components[u];if(!_)return Rl(n.default,{Component:_,route:d});const b=h.props[u],I=b?b===!0?d.params:typeof b=="function"?b(d):b:null,U=Mr(_,be({},I,t,{onVnodeUnmounted:J=>{J.component.isUnmounted&&(h.instances[u]=null)},ref:a}));return Rl(n.default,{Component:U,route:d})||U}}});function Rl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Bu=Hu;function Ku(e){const t=Iu(e.routes,e),n=e.parseQuery||pu,s=e.stringifyQuery||vl,o=e.history,l=vn(),r=vn(),i=vn(),a=$i(Mt);let d=Mt;tn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Vs.bind(null,S=>""+S),h=Vs.bind(null,Qc),_=Vs.bind(null,$n);function b(S,F){let j,z;return Jr(S)?(j=t.getRecordMatcher(S),z=F):z=S,t.addRoute(z,j)}function I(S){const F=t.getRecordMatcher(S);F&&t.removeRoute(F)}function O(){return t.getRoutes().map(S=>S.record)}function U(S){return!!t.getRecordMatcher(S)}function J(S,F){if(F=be({},F||a.value),typeof S=="string"){const g=Us(n,S,F.path),x=t.resolve({path:g.path},F),E=o.createHref(g.fullPath);return be(g,x,{params:_(x.params),hash:$n(g.hash),redirectedFrom:void 0,href:E})}let j;if(S.path!=null)j=be({},S,{path:Us(n,S.path,F.path).path});else{const g=be({},S.params);for(const x in g)g[x]==null&&delete g[x];j=be({},S,{params:h(g)}),F.params=h(F.params)}const z=t.resolve(j,F),fe=S.hash||"";z.params=u(_(z.params));const f=eu(s,be({},S,{hash:zc(fe),path:z.path})),p=o.createHref(f);return be({fullPath:f,hash:fe,query:s===vl?mu(S.query):S.query||{}},z,{redirectedFrom:void 0,href:p})}function N(S){return typeof S=="string"?Us(n,S,a.value.path):be({},S)}function K(S,F){if(d!==S)return un(Te.NAVIGATION_CANCELLED,{from:F,to:S})}function H(S){return B(S)}function $(S){return H(be(N(S),{replace:!0}))}function Y(S,F){const j=S.matched[S.matched.length-1];if(j&&j.redirect){const{redirect:z}=j;let fe=typeof z=="function"?z(S,F):z;return typeof fe=="string"&&(fe=fe.includes("?")||fe.includes("#")?fe=N(fe):{path:fe},fe.params={}),be({query:S.query,hash:S.hash,params:fe.path!=null?{}:S.params},fe)}}function B(S,F){const j=d=J(S),z=a.value,fe=S.state,f=S.force,p=S.replace===!0,g=Y(j,z);if(g)return B(be(N(g),{state:typeof g=="object"?be({},fe,g.state):fe,force:f,replace:p}),F||j);const x=j;x.redirectedFrom=F;let E;return!f&&tu(s,z,j)&&(E=un(Te.NAVIGATION_DUPLICATED,{to:x,from:z}),Fe(z,z,!0,!1)),(E?Promise.resolve(E):ke(x,z)).catch(w=>Ct(w)?Ct(w,Te.NAVIGATION_GUARD_REDIRECT)?w:je(w):ue(w,x,z)).then(w=>{if(w){if(Ct(w,Te.NAVIGATION_GUARD_REDIRECT))return B(be({replace:p},N(w.to),{state:typeof w.to=="object"?be({},fe,w.to.state):fe,force:f}),F||x)}else w=Q(x,z,!0,p,fe);return W(x,z,w),w})}function oe(S,F){const j=K(S,F);return j?Promise.reject(j):Promise.resolve()}function re(S){const F=mt.values().next().value;return F&&typeof F.runWithContext=="function"?F.runWithContext(S):S()}function ke(S,F){let j;const[z,fe,f]=gu(S,F);j=Hs(z.reverse(),"beforeRouteLeave",S,F);for(const g of z)g.leaveGuards.forEach(x=>{j.push(jt(x,S,F))});const p=oe.bind(null,S,F);return j.push(p),Qe(j).then(()=>{j=[];for(const g of l.list())j.push(jt(g,S,F));return j.push(p),Qe(j)}).then(()=>{j=Hs(fe,"beforeRouteUpdate",S,F);for(const g of fe)g.updateGuards.forEach(x=>{j.push(jt(x,S,F))});return j.push(p),Qe(j)}).then(()=>{j=[];for(const g of f)if(g.beforeEnter)if(pt(g.beforeEnter))for(const x of g.beforeEnter)j.push(jt(x,S,F));else j.push(jt(g.beforeEnter,S,F));return j.push(p),Qe(j)}).then(()=>(S.matched.forEach(g=>g.enterCallbacks={}),j=Hs(f,"beforeRouteEnter",S,F,re),j.push(p),Qe(j))).then(()=>{j=[];for(const g of r.list())j.push(jt(g,S,F));return j.push(p),Qe(j)}).catch(g=>Ct(g,Te.NAVIGATION_CANCELLED)?g:Promise.reject(g))}function W(S,F,j){i.list().forEach(z=>re(()=>z(S,F,j)))}function Q(S,F,j,z,fe){const f=K(S,F);if(f)return f;const p=F===Mt,g=tn?history.state:{};j&&(z||p?o.replace(S.fullPath,be({scroll:p&&g&&g.scroll},fe)):o.push(S.fullPath,fe)),a.value=S,Fe(S,F,j,p),je()}let he;function se(){he||(he=o.listen((S,F,j)=>{if(!xt.listening)return;const z=J(S),fe=Y(z,xt.currentRoute.value);if(fe){B(be(fe,{replace:!0,force:!0}),z).catch(An);return}d=z;const f=a.value;tn&&cu(ml(f.fullPath,j.delta),Cs()),ke(z,f).catch(p=>Ct(p,Te.NAVIGATION_ABORTED|Te.NAVIGATION_CANCELLED)?p:Ct(p,Te.NAVIGATION_GUARD_REDIRECT)?(B(be(N(p.to),{force:!0}),z).then(g=>{Ct(g,Te.NAVIGATION_ABORTED|Te.NAVIGATION_DUPLICATED)&&!j.delta&&j.type===no.pop&&o.go(-1,!1)}).catch(An),Promise.reject()):(j.delta&&o.go(-j.delta,!1),ue(p,z,f))).then(p=>{p=p||Q(z,f,!1),p&&(j.delta&&!Ct(p,Te.NAVIGATION_CANCELLED)?o.go(-j.delta,!1):j.type===no.pop&&Ct(p,Te.NAVIGATION_ABORTED|Te.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),W(z,f,p)}).catch(An)}))}let Ce=vn(),ae=vn(),te;function ue(S,F,j){je(S);const z=ae.list();return z.length?z.forEach(fe=>fe(S,F,j)):console.error(S),Promise.reject(S)}function ut(){return te&&a.value!==Mt?Promise.resolve():new Promise((S,F)=>{Ce.add([S,F])})}function je(S){return te||(te=!S,se(),Ce.list().forEach(([F,j])=>S?j(S):F()),Ce.reset()),S}function Fe(S,F,j,z){const{scrollBehavior:fe}=e;if(!tn||!fe)return Promise.resolve();const f=!j&&uu(ml(S.fullPath,0))||(z||!j)&&history.state&&history.state.scroll||null;return jn().then(()=>fe(S,F,f)).then(p=>p&&au(p)).catch(p=>ue(p,S,F))}const Ae=S=>o.go(S);let Ye;const mt=new Set,xt={currentRoute:a,listening:!0,addRoute:b,removeRoute:I,clearRoutes:t.clearRoutes,hasRoute:U,getRoutes:O,resolve:J,options:e,push:H,replace:$,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:l.add,beforeResolve:r.add,afterEach:i.add,onError:ae.add,isReady:ut,install(S){S.component("RouterLink",Vu),S.component("RouterView",Bu),S.config.globalProperties.$router=xt,Object.defineProperty(S.config.globalProperties,"$route",{enumerable:!0,get:()=>Vt(a)}),tn&&!Ye&&a.value===Mt&&(Ye=!0,H(o.location).catch(z=>{}));const F={};for(const z in Mt)Object.defineProperty(F,z,{get:()=>a.value[z],enumerable:!0});S.provide(Ss,xt),S.provide(ko,Zl(F)),S.provide(oo,a);const j=S.unmount;mt.add(S),S.unmount=function(){mt.delete(S),mt.size<1&&(d=Mt,he&&he(),he=null,a.value=Mt,Ye=!1,te=!1),j()}}};function Qe(S){return S.reduce((F,j)=>F.then(()=>re(j)),Promise.resolve())}return xt}function ei(){return it(Ss)}function Gu(e){return it(ko)}const Un=Lc("auth",{state:()=>({token:localStorage.getItem("mcbot_token")||"",identity:localStorage.getItem("mcbot_identity")||""}),actions:{set(e,t){this.token=e,this.identity=t||"",localStorage.setItem("mcbot_token",e),localStorage.setItem("mcbot_identity",this.identity)},clear(){this.token="",this.identity="",localStorage.removeItem("mcbot_token"),localStorage.removeItem("mcbot_identity")}}}),Wu={key:0,class:"nav"},qu={class:"who"},zu={__name:"App",setup(e){const t=Un(),n=Gu(),s=ei(),o=ge(()=>n.path!=="/login");function l(){t.clear(),s.push("/login")}return(r,i)=>{const a=Mo("router-link"),d=Mo("router-view");return k(),C(Z,null,[o.value?(k(),C("nav",Wu,[i[3]||(i[3]=c("span",{class:"brand"},"mcbot",-1)),Le(a,{to:"/messages"},{default:zn(()=>[...i[0]||(i[0]=[ye("Messages",-1)])]),_:1}),Le(a,{to:"/packets"},{default:zn(()=>[...i[1]||(i[1]=[ye("Packets",-1)])]),_:1}),Le(a,{to:"/manage"},{default:zn(()=>[...i[2]||(i[2]=[ye("Manage",-1)])]),_:1}),i[4]||(i[4]=c("span",{class:"spacer"},null,-1)),c("span",qu,A(Vt(t).identity||"authenticated"),1),c("button",{onClick:l},"Log out")])):Re("",!0),Le(d)],64)}}};async function ce(e,t={}){const n=Un(),s={...t.headers||{}};n.token&&(s.Authorization=`Bearer ${n.token}`),t.json!==void 0&&(s["Content-Type"]="application/json",t={...t,body:JSON.stringify(t.json)},delete t.json);const o=await fetch(`/api${e}`,{...t,headers:s});if(o.status===401)throw n.clear(),location.hash.startsWith("#/login")||(location.hash="#/login"),new Error("unauthorized");if(!o.ok){let l=o.statusText;try{l=(await o.json()).detail||l}catch{}throw new Error(l)}return o.json()}function ti(e){const t=Un();return`${location.protocol==="https:"?"wss":"ws"}://${location.host}/api${e}?token=${encodeURIComponent(t.token)}`}const Ju={class:"login-wrap"},Yu={class:"login-card"},Qu={key:0,class:"err"},Xu=["disabled"],Zu={__name:"Login",setup(e){const t=Un(),n=ei(),s=ne(""),o=ne(""),l=ne(""),r=ne(""),i=ne(!1);async function a(){r.value="",i.value=!0;try{const u=await ce("/login",{method:"POST",json:{username:s.value,password:o.value}});t.set(u.token,u.user?`user:${u.user}`:""),n.push("/")}catch(u){r.value=u.message||"login failed"}finally{i.value=!1}}async function d(){if(r.value="",!!l.value.trim()){t.set(l.value.trim(),"");try{const u=await ce("/me");t.set(l.value.trim(),u.identity),n.push("/")}catch{t.clear(),r.value="invalid token"}}}return(u,h)=>(k(),C("div",Ju,[c("div",Yu,[h[3]||(h[3]=c("h2",null,"mcbot admin",-1)),r.value?(k(),C("div",Qu,A(r.value),1)):Re("",!0),h[4]||(h[4]=c("label",null,"Username",-1)),He(c("input",{"onUpdate:modelValue":h[0]||(h[0]=_=>s.value=_),onKeyup:Qn(a,["enter"]),autofocus:""},null,544),[[rt,s.value]]),h[5]||(h[5]=c("label",null,"Password",-1)),He(c("input",{"onUpdate:modelValue":h[1]||(h[1]=_=>o.value=_),type:"password",onKeyup:Qn(a,["enter"])},null,544),[[rt,o.value]]),c("button",{disabled:i.value,onClick:a},"Log in",8,Xu),h[6]||(h[6]=c("label",{style:{"margin-top":"10px"}},"…or paste an API token",-1)),He(c("input",{"onUpdate:modelValue":h[2]||(h[2]=_=>l.value=_),placeholder:"bearer token",onKeyup:Qn(d,["enter"])},null,544),[[rt,l.value]]),c("button",{onClick:d},"Use token")])]))}},ef=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},tf={class:"panes"},nf={class:"pane",style:{flex:"0 0 170px"}},sf={class:"body"},of=["onClick"],lf={class:"pane",style:{flex:"1"}},rf={key:0,class:"toolbar"},af={key:0,class:"err"},cf={key:1,class:"muted"},uf={class:"body"},ff={key:0,class:"decoded"},df={class:"kv"},hf={class:"mono"},pf={class:"kv"},mf={class:"k"},vf={key:1},gf={class:"toolbar"},_f={class:"chk"},yf={class:"chk"},bf=["disabled"],wf={style:{"border-top":"1px solid var(--border, #333)"}},xf={class:"toolbar"},kf=["disabled"],Cf={key:0,class:"decoded"},Sf={class:"kv"},Ef={class:"muted"},Rf={class:"mono"},Af={class:"toolbar"},Of={class:"chk"},Tf={class:"chk"},Pf=["disabled"],If={class:"decoded"},Nf={style:{margin:"12px 0 4px"}},$f={class:"kv"},Mf={class:"k"},Df={class:"kv"},Lf={class:"k mono"},jf={key:2},Vf={class:"toolbar"},Uf={class:"mono muted"},Ff=["onClick"],Hf={key:3},Bf={class:"toolbar"},Kf={id:"newUserContacts"},Gf=["value"],Wf=["value"],qf=["disabled"],zf={class:"mono muted"},Jf=["onChange"],Yf=["value"],Qf={class:"chips"},Xf=["onClick"],Zf={style:{"white-space":"normal"}},ed=["onClick"],td=["onClick"],nd=["onClick"],sd={key:4},od={class:"toolbar"},ld={key:0,class:"muted"},rd={key:0,class:"muted"},id=["checked","disabled","onChange"],ad=["onChange"],cd=["value"],ud={class:"chips"},fd=["onClick"],dd=["disabled","onClick"],hd={key:5},pd=["checked","onChange"],md=["checked","onChange"],vd=["checked","onChange"],gd=["value","onChange"],_d=["onChange"],yd=["value"],bd={class:"chips"},wd={key:0,class:"muted"},xd=["onClick"],kd={key:6,class:"contacts-split"},Cd={class:"pane",style:{flex:"1.6","min-width":"0"}},Sd={class:"toolbar"},Ed={class:"chk"},Rd=["checked"],Ad=["checked","onChange"],Od=["disabled"],Td={class:"muted"},Pd={class:"body"},Id={key:0},Nd={key:0},$d={key:0},Md={key:0},Dd={key:0},Ld={key:0},jd=["onClick"],Vd=["checked","onChange"],Ud=["title"],Fd={class:"pane contact-detail"},Hd={class:"body"},Bd={key:0,class:"empty"},Kd={key:1,class:"decoded"},Gd={class:"kv"},Wd={class:"k"},qd={key:7},zd=["title"],Jd={key:8,class:"empty"},Yd={__name:"Manage",setup(e){const t=[{key:"stats",label:"Overview"},{key:"radio",label:"Radio"},{key:"contacts",label:"Contacts"},{key:"channels",label:"Channels"},{key:"users",label:"Users"},{key:"groups",label:"Groups"},{key:"command-config",label:"Commands"},{key:"audit",label:"Audit log"}],n=ne("stats"),s=ne({}),o=ne([]),l=ne([]),r=ne([]),i=ne(""),a=ne(""),d=ne({name:"",key:""}),u=ne({name:"",commands:""}),h=ne({sel:"",group:""}),_={stats:"/stats",radio:"/device-info",contacts:"/contacts?limit=500",channels:"/channels",users:"/users",groups:"/groups","command-config":"/command-config",audit:"/audit?limit=200"};function b(v,m){const G=m.items||m;if(v==="command-config"&&Array.isArray(G))for(const ie of G){let y=[];try{y=ie.allowed_channels?JSON.parse(ie.allowed_channels):[]}catch{y=[]}ie._chans=y}return G}async function I(v,m=!1){if(n.value=v,i.value="",a.value="",!(s.value[v]&&!m))try{const G=await ce(_[v]);if(s.value[v]=b(v,G),v==="contacts"&&Ge(s.value[v]),(v==="users"||v==="groups"||v==="contacts")&&!o.value.length){const ie=await ce("/groups");o.value=ie.items.map(y=>y.name)}if(v==="users"&&!s.value.contacts){const ie=await ce(_.contacts);s.value.contacts=b("contacts",ie)}if(v==="groups"&&!l.value.length){const ie=await ce("/command-config");l.value=ie.items.map(y=>y.command).sort()}if(v==="command-config"&&!r.value.length){const ie=await ce("/channels");r.value=ie.items.map(y=>y.name)}}catch(G){i.value=G.message}}const O=v=>I(v,!0);async function U(v,m,G=[]){i.value="",a.value="";try{await v,m&&(a.value=m)}catch(ie){i.value=ie.message}for(const ie of G)await O(ie)}function J(v){const m=s.value["command-config"];if(!m)return;const G=m.findIndex(y=>y.command===v.command);if(G===-1)return;let ie=[];try{ie=v.allowed_channels?JSON.parse(v.allowed_channels):[]}catch{ie=[]}m[G]={...m[G],...v,_chans:ie}}async function N(v,m){i.value="",a.value="";try{const G=await ce(`/command-config/${encodeURIComponent(v)}`,{method:"PATCH",json:m});J(G),a.value=`${v}: saved`}catch(G){i.value=G.message,await O("command-config")}}function K(v,m){!m||v._chans.includes(m)||N(v.command,{allowed_channels:[...v._chans,m]})}function H(v,m){N(v.command,{allowed_channels:v._chans.filter(G=>G!==m)})}async function $(){const v={name:d.value.name.trim()};d.value.key.trim()&&(v.key=d.value.key.trim()),v.name&&(await U(ce("/channels",{method:"POST",json:v}),`added ${v.name}`,["channels"]),i.value||(d.value={name:"",key:""}))}function Y(v){confirm(`Remove channel ${v}? This clears its radio slot.`)&&U(ce(`/channels/${encodeURIComponent(v)}`,{method:"DELETE"}),`removed ${v}`,["channels"])}function B(v,m){m&&U(ce(`/users/${v}/groups`,{method:"POST",json:{group:m}}),"group added",["users"])}function oe(v,m){U(ce(`/users/${v}/groups/${encodeURIComponent(m)}`,{method:"DELETE"}),"group removed",["users"])}function re(v,m){const G=prompt("New alias:",m||"");G!==null&&U(ce(`/users/${v}`,{method:"PATCH",json:{name:G}}),"renamed",["users"])}function ke(v,m){confirm(`Delete user ${m||v.slice(0,12)} from the bot?`)&&U(ce(`/users/${v}`,{method:"DELETE"}),"deleted",["users"])}function W(v){const m=(v.groups||[]).includes("blocked"),G=m?ce(`/users/${v.pubkey}/block`,{method:"DELETE"}):ce(`/users/${v.pubkey}/block`,{method:"POST"});U(G,m?"unblocked":"blocked",["users"])}async function Q(){const v=u.value.name.trim();if(!v)return;const m=u.value.commands.split(",").map(G=>G.trim()).filter(Boolean);await U(ce("/groups",{method:"POST",json:{name:v,commands:m}}),`group ${v} created`,["groups"]),i.value||(u.value={name:"",commands:""})}function he(v){confirm(`Delete group ${v}?`)&&U(ce(`/groups/${encodeURIComponent(v)}`,{method:"DELETE"}),"deleted",["groups"])}function se(v,m){m&&U(ce(`/groups/${encodeURIComponent(v)}/commands`,{method:"POST",json:{command:m}}),`granted ${m} to ${v}`,["groups"])}function Ce(v,m){m&&U(ce(`/groups/${encodeURIComponent(v)}/commands/${encodeURIComponent(m)}`,{method:"DELETE"}),`revoked ${m} from ${v}`,["groups"])}function ae(v,m){U(ce(`/groups/${encodeURIComponent(v)}/all-users`,{method:m?"POST":"DELETE"}),m?`${v}: now includes all users`:`${v}: explicit members only`,["groups"])}const te=ne("zero"),ue=ne(!1);async function ut(){ue.value||(ue.value=!0,await U(ce("/radio/advert",{method:"POST",json:{flood:te.value==="flood"}}),`${te.value==="flood"?"flood":"zero-hop"} advert sent`),ue.value=!1)}const je=ne(null),Fe=ne(!1),Ae=ne(!1),Ye=ne({enabled:!0,headroom:8});async function mt(){if(!Fe.value){Fe.value=!0,i.value="";try{const v=await ce("/radio/contacts-status");je.value=v,Ye.value={enabled:v.policy.enabled,headroom:v.policy.headroom}}catch(v){i.value=v.message}Fe.value=!1}}async function xt(){await U(ce("/radio/contacts-policy",{method:"POST",json:{enabled:Ye.value.enabled,headroom:Number(Ye.value.headroom)}}),"Eviction policy updated (runtime only — set radio_evict_* in mcbot.conf to persist)"),await mt()}async function Qe(){if(!Ae.value){Ae.value=!0,i.value="",a.value="";try{const v=await ce("/radio/evict-contacts",{method:"POST",json:{dry_run:!0}}),m=v.evicted||[];if(!m.length){a.value=`Nothing to evict (used ${v.used}/${v.max??"?"}).`,Ae.value=!1;return}const G=m.map($e=>$e.name||$e.pubkey.slice(0,12)),ie=G.slice(0,20).join(` +`),y=G.length>20?` +…and ${G.length-20} more`:"";if(!confirm(`Evict ${m.length} stale contact(s) from the radio? + +${ie}${y}`)){Ae.value=!1;return}const L=await ce("/radio/evict-contacts",{method:"POST",json:{}});a.value=`Evicted ${L.evicted.length} contact(s)`+(L.failed?`, ${L.failed} failed`:"")+(L.shortfall?`, ${L.shortfall} short (protected)`:"")}catch(v){i.value=v.message}Ae.value=!1,await mt()}}const S=[{title:"Identity",keys:[["self_info.name","Name"],["self_info.public_key","Public key",{mono:!0}],["device_info.model","Model"],["device_info.ver","Firmware version"],["device_info.fw ver","Firmware code"],["device_info.fw_build","Firmware build"]]},{title:"Radio",keys:[["self_info.radio_freq","Frequency",{unit:"MHz"}],["self_info.radio_bw","Bandwidth",{unit:"kHz"}],["self_info.radio_sf","Spreading factor"],["self_info.radio_cr","Coding rate"],["self_info.tx_power","TX power",{unit:"dBm"}],["self_info.max_tx_power","Max TX power",{unit:"dBm"}],["device_info.path_hash_mode","Out path-hash mode",{fmt:v=>`${Number(v)+1} byte(s)/hop`}]]},{title:"Advertising",keys:[["self_info.adv_type","Advertised type"],["self_info.adv_lat","Latitude"],["self_info.adv_lon","Longitude"],["self_info.adv_loc_policy","Location-share policy"]]},{title:"Capacity",keys:[["device_info.max_channels","Max channels"],["device_info.max_contacts","Max contacts"]]},{title:"Battery / memory",keys:[["battery.level","Battery",{unit:"mV"}],["battery.total_kb","Total memory",{unit:"kB"}],["battery.used_kb","Used memory",{unit:"kB"}]]},{title:"Other",keys:[["device_info.ble_pin","BLE PIN"],["device_info.repeat","Repeater mode"],["self_info.manual_add_contacts","Manual contact add"],["self_info.multi_acks","Multi-acks"],["self_info.telemetry_mode_base","Telemetry: base"],["self_info.telemetry_mode_env","Telemetry: env"],["self_info.telemetry_mode_loc","Telemetry: location"]]}],F=new Set(S.flatMap(v=>v.keys.map(m=>m[0])));function j(v){if(v==null)return null;try{return JSON.parse(v)}catch{return v}}function z(v,m){const G=j(v.value);if(G==null||G==="")return"";if(m!=null&&m.fmt)return m.fmt(G);let ie=typeof G=="object"?JSON.stringify(G):String(G);return m!=null&&m.unit&&(ie=`${ie} ${m.unit}`),ie}const fe=ge(()=>{const v=new Map;for(const m of s.value.radio||[])v.set(m.key,m);return v}),f=ge(()=>[...s.value.radio||[]].filter(v=>!F.has(v.key)).sort((v,m)=>v.key.localeCompare(m.key))),p={1:"Comp",2:"Rptr",3:"Room",4:"Sens"};function g(v){return v==null?"?":p[v]||String(v)}function x(v){return v&&v.length>14?`${v.slice(0,6)}...${v.slice(-6)}`:v||""}function E(v){if(!v)return"";const m=new Date(v*1e3),G=ie=>String(ie).padStart(2,"0");return`${m.getFullYear()}-${G(m.getMonth()+1)}-${G(m.getDate())} ${G(m.getHours())}:${G(m.getMinutes())}`}const w=ge(()=>o.value.filter(v=>v!=="public"&&v!=="blocked"));function M(v){return`${v.adv_name||"(unnamed)"} — ${v.public_key}`}function P(){const v=h.value.sel.trim();if(!v)return"";const m=(s.value.contacts||[]).find(G=>M(G)===v);return m?m.public_key:/^[0-9a-fA-F]{64}$/.test(v)?v.toLowerCase():""}async function T(){const v=P();if(!v){alert("Pick a contact from the list (or paste a 64-hex pubkey).");return}if(!h.value.group){alert("Choose an initial group.");return}i.value="",a.value="";try{await ce("/users",{method:"POST",json:{pubkey:v,group:h.value.group}}),a.value=`bot user created and added to ${h.value.group}`,h.value={sel:"",group:""},await O("users")}catch(m){alert(m.message)}}const R=ne(""),q=ne(new Set),D=ne(new Set),V=ne({col:"adv_name",dir:"asc"}),X=ne(new Set),de=ne(null),pe=ge(()=>(s.value.contacts||[]).find(v=>v.public_key===de.value)||null);function _e(v){de.value=v.public_key}const Oe=ge(()=>{const v=pe.value;if(!v)return[];let m;v.out_path_len===-1?m="flood (no path)":v.out_path_len===0?m="direct (0 hops)":v.out_path?m=`${v.out_path} (${v.out_path_len} hop${v.out_path_len===1?"":"s"})`:m=`${v.out_path_len??"?"} hop(s)`;const G=v.adv_lat!=null&&v.adv_lon!=null?`${v.adv_lat}, ${v.adv_lon}`:"—";return[["name",v.adv_name||"—",!1],["type",g(v.type),!1],["public key",v.public_key,!0],["flags",v.flags??"—",!1],["out path",m,!0],["path hash mode",v.out_path_hash_mode??"—",!1],["location (lat, lon)",G,!1],["last advert",E(v.last_advert)||"—",!1],["last modified",E(v.lastmod)||"—",!1],["first seen",E(v.first_seen_at)||"—",!1],["last synced",E(v.last_synced_at)||"—",!1]]}),Ne=ge(()=>[...D.value].sort()),st=ge(()=>q.value.size===0),ot=v=>!q.value.has(v);function Kt(v){q.value=v?new Set:new Set(D.value)}function Fn(v,m){const G=new Set(q.value);m?G.delete(v):G.add(v),q.value=G}function Ge(v){let m=null;for(const G of v){const ie=g(G.type);D.value.has(ie)||(m=m||new Set(D.value),m.add(ie))}m&&(D.value=m)}function Ve(v){V.value.col===v?V.value={col:v,dir:V.value.dir==="asc"?"desc":"asc"}:V.value={col:v,dir:"asc"}}function Hn(v){const m=new Set(X.value);m.has(v)?m.delete(v):m.add(v),X.value=m}const Qt=ge(()=>(s.value.contacts||[]).filter(v=>X.value.has(v.public_key))),Co=ge(()=>Qt.value.length>0);async function si(){const v=Qt.value;if(!v.length)return;const m=v.map(lt=>lt.adv_name||lt.public_key.slice(0,12)),G=m.slice(0,20).join(` +`),ie=m.length>20?` +…and ${m.length-20} more`:"";if(!confirm(`Delete ${v.length} contact(s)? + +${G}${ie}`))return;i.value="",a.value="";let y=0,L=0,$e="";for(const lt of v)try{await ce(`/contacts/${encodeURIComponent(lt.public_key)}`,{method:"DELETE"}),y++}catch(Es){L++,$e=`${Es.message} (${lt.adv_name||lt.public_key.slice(0,12)})`}X.value=new Set,await O("contacts"),a.value=L?`Deleted ${y}, ${L} failed`:`Deleted ${y} contact(s)`,$e&&(i.value=$e)}const So=ge(()=>{const v=s.value.contacts||[],m=R.value.toLowerCase().trim(),G=q.value,ie=v.filter(lt=>G.size&&G.has(g(lt.type))?!1:m?(lt.public_key||"").toLowerCase().includes(m)||(lt.adv_name||"").toLowerCase().includes(m):!0),{col:y,dir:L}=V.value,$e=L==="asc"?1:-1;return ie.sort((lt,Es)=>{const dn=lt[y],hn=Es[y];return dn==null&&hn==null?0:dn==null?1:hn==null?-1:typeof dn=="number"&&typeof hn=="number"?(dn-hn)*$e:String(dn).localeCompare(String(hn))*$e}),ie});function Eo(v){return v&&v.length?Object.keys(v[0]).filter(m=>!m.startsWith("_")):[]}function Ro(v){return v==null?"":Array.isArray(v)?v.join(", "):typeof v=="object"?JSON.stringify(v):String(v)}return _s(()=>I("stats")),(v,m)=>{var G,ie;return k(),C("div",tf,[c("div",nf,[m[19]||(m[19]=c("h3",null,"Manage",-1)),c("div",sf,[c("table",null,[c("tbody",null,[(k(),C(Z,null,me(t,y=>c("tr",{key:y.key,class:Ze(["clickable",{selected:n.value===y.key}]),onClick:L=>I(y.key)},[c("td",null,A(y.label),1)],10,of)),64))])])])]),c("div",lf,[c("h3",null,A((G=t.find(y=>y.key===n.value))==null?void 0:G.label),1),i.value||a.value?(k(),C("div",rf,[i.value?(k(),C("span",af,A(i.value),1)):Re("",!0),a.value?(k(),C("span",cf,A(a.value),1)):Re("",!0)])):Re("",!0),c("div",uf,[n.value==="stats"&&s.value.stats?(k(),C("div",ff,[c("div",df,[m[20]||(m[20]=c("div",{class:"k"},"identity",-1)),c("div",hf,A(((ie=s.value.stats.identity)==null?void 0:ie.pubkey)||"—"),1),m[21]||(m[21]=c("div",{class:"k"},"events seen",-1)),c("div",null,A(s.value.stats.event_count),1),m[22]||(m[22]=c("div",{class:"k"},"commands loaded",-1)),c("div",null,A(s.value.stats.commands_loaded),1)]),m[23]||(m[23]=c("h4",null,"Counts",-1)),c("div",pf,[(k(!0),C(Z,null,me(s.value.stats.counts,(y,L)=>(k(),C(Z,{key:L},[c("div",mf,A(L),1),c("div",null,A(y),1)],64))),128))])])):n.value==="radio"?(k(),C("div",vf,[c("div",gf,[c("label",_f,[He(c("input",{type:"radio",value:"zero","onUpdate:modelValue":m[0]||(m[0]=y=>te.value=y)},null,512),[[il,te.value]]),m[24]||(m[24]=ye(" Zero hop ",-1))]),c("label",yf,[He(c("input",{type:"radio",value:"flood","onUpdate:modelValue":m[1]||(m[1]=y=>te.value=y)},null,512),[[il,te.value]]),m[25]||(m[25]=ye(" Flood ",-1))]),c("button",{disabled:ue.value,onClick:ut},A(ue.value?"Sending…":"Advert"),9,bf),m[26]||(m[26]=c("span",{class:"muted"}," Zero-hop reaches direct neighbors only; flood propagates through the mesh. ",-1))]),c("div",wf,[c("div",xf,[m[27]||(m[27]=c("strong",null,"Contact table",-1)),c("button",{disabled:Fe.value,onClick:mt},A(Fe.value?"Checking…":"Check contact table"),9,kf),m[28]||(m[28]=c("span",{class:"muted"},"Reads the radio's contact list (takes a few seconds).",-1))]),je.value?(k(),C("div",Cf,[c("div",Sf,[m[29]||(m[29]=c("div",{class:"k"},"Used / max",-1)),c("div",null,[ye(A(je.value.used)+" / "+A(je.value.max??"?")+" ",1),c("span",Ef,"("+A(je.value.free??"?")+" free)",1)]),m[30]||(m[30]=c("div",{class:"k"},"Protected / evictable",-1)),c("div",null,A(je.value.protected)+" protected, "+A(je.value.eligible)+" evictable",1),m[31]||(m[31]=c("div",{class:"k"},"Firmware autoadd byte",-1)),c("div",Rf,A(je.value.autoadd_raw??"n/a"),1)]),c("div",Af,[c("label",Of,[He(c("input",{type:"checkbox","onUpdate:modelValue":m[2]||(m[2]=y=>Ye.value.enabled=y)},null,512),[[wc,Ye.value.enabled]]),m[32]||(m[32]=ye(" Auto-evict (startup + when full) ",-1))]),c("label",Tf,[m[33]||(m[33]=ye(" Headroom ",-1)),He(c("input",{type:"number",min:"1",max:"100","onUpdate:modelValue":m[3]||(m[3]=y=>Ye.value.headroom=y),style:{width:"4em"}},null,512),[[rt,Ye.value.headroom,void 0,{number:!0}]])]),c("button",{onClick:xt},"Apply"),c("button",{disabled:Ae.value,onClick:Qe},A(Ae.value?"Evicting…":"Evict to headroom now"),9,Pf)]),m[34]||(m[34]=c("p",{class:"muted",style:{margin:"4px 12px 8px"}}," Evicts the stalest contacts from the radio (bot users, owners, and recent DM peers are protected; the bot's database keeps the full archive). Policy changes here are runtime only — set radio_evict_* in mcbot.conf to persist across restarts. ",-1))])):Re("",!0)]),c("div",If,[(k(),C(Z,null,me(S,y=>(k(),C(Z,{key:y.title},[c("h4",Nf,A(y.title),1),c("div",$f,[(k(!0),C(Z,null,me(y.keys,L=>{var $e;return k(),C(Z,{key:L[0]},[c("div",Mf,A(L[1]),1),c("div",{class:Ze({mono:($e=L[2])==null?void 0:$e.mono})},A(z(fe.value.get(L[0])||{},L[2])||"—"),3)],64)}),128))])],64))),64)),f.value.length?(k(),C(Z,{key:0},[m[35]||(m[35]=c("h4",{style:{margin:"12px 0 4px"}},"Unrecognized",-1)),c("div",Df,[(k(!0),C(Z,null,me(f.value,y=>(k(),C(Z,{key:y.key},[c("div",Lf,A(y.key),1),c("div",null,A(z(y)||"—"),1)],64))),128))])],64)):Re("",!0)])])):n.value==="channels"?(k(),C("div",jf,[c("div",Vf,[He(c("input",{"onUpdate:modelValue":m[4]||(m[4]=y=>d.value.name=y),placeholder:"name (e.g. #bot or MyChan)",style:{flex:"1"}},null,512),[[rt,d.value.name]]),He(c("input",{"onUpdate:modelValue":m[5]||(m[5]=y=>d.value.key=y),placeholder:"hex key (non-# only)",style:{flex:"1"}},null,512),[[rt,d.value.key]]),c("button",{onClick:$},"Add channel")]),c("table",null,[m[36]||(m[36]=c("thead",null,[c("tr",null,[c("th",null,"idx"),c("th",null,"name"),c("th",null,"secret"),c("th")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(s.value.channels,y=>(k(),C("tr",{key:y.channel_idx},[c("td",null,A(y.channel_idx),1),c("td",null,A(y.name),1),c("td",Uf,A((y.secret_hex||"").slice(0,12))+"…",1),c("td",null,[c("button",{onClick:L=>Y(y.name)},"remove",8,Ff)])]))),128))])])])):n.value==="users"?(k(),C("div",Hf,[c("div",Bf,[He(c("input",{"onUpdate:modelValue":m[6]||(m[6]=y=>h.value.sel=y),list:"newUserContacts",placeholder:"add bot user: search a contact…",style:{flex:"0 0 320px"}},null,512),[[rt,h.value.sel]]),c("datalist",Kf,[(k(!0),C(Z,null,me(s.value.contacts||[],y=>(k(),C("option",{key:y.public_key,value:M(y)},null,8,Gf))),128))]),He(c("select",{"onUpdate:modelValue":m[7]||(m[7]=y=>h.value.group=y)},[m[37]||(m[37]=c("option",{value:""},"initial group…",-1)),(k(!0),C(Z,null,me(w.value,y=>(k(),C("option",{key:y,value:y},A(y),9,Wf))),128))],512),[[xc,h.value.group]]),c("button",{disabled:!P()||!h.value.group,onClick:T}," Add bot user ",8,qf)]),c("table",null,[m[39]||(m[39]=c("thead",null,[c("tr",null,[c("th",null,"name"),c("th",null,"pubkey"),c("th",{style:{width:"130px"}},"add group"),c("th",null,"groups"),c("th",null,"actions")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(s.value.users,y=>(k(),C("tr",{key:y.pubkey},[c("td",null,A(y.name||"?"),1),c("td",zf,A(y.pubkey.slice(0,12)),1),c("td",null,[c("select",{onChange:L=>{B(y.pubkey,L.target.value),L.target.value=""}},[m[38]||(m[38]=c("option",{value:""},"+ group…",-1)),(k(!0),C(Z,null,me(o.value,L=>(k(),C("option",{key:L,value:L},A(L),9,Yf))),128))],40,Jf)]),c("td",Qf,[(k(!0),C(Z,null,me(y.groups,L=>(k(),C("span",{key:L,class:"tag"},[ye(A(L)+" ",1),c("a",{href:"#",onClick:Wn($e=>oe(y.pubkey,L),["prevent"]),title:"remove"},"×",8,Xf)]))),128))]),c("td",Zf,[c("button",{onClick:L=>re(y.pubkey,y.name)},"rename",8,ed),c("button",{onClick:L=>W(y)},A((y.groups||[]).includes("blocked")?"unblock":"block"),9,td),c("button",{onClick:L=>ke(y.pubkey,y.name)},"delete",8,nd)])]))),128))])])])):n.value==="groups"?(k(),C("div",sd,[c("div",od,[He(c("input",{"onUpdate:modelValue":m[8]||(m[8]=y=>u.value.name=y),placeholder:"new group name"},null,512),[[rt,u.value.name]]),He(c("input",{"onUpdate:modelValue":m[9]||(m[9]=y=>u.value.commands=y),placeholder:"commands (comma list, optional)",style:{flex:"1"}},null,512),[[rt,u.value.commands]]),c("button",{onClick:Q},"Create group")]),c("table",null,[m[42]||(m[42]=c("thead",null,[c("tr",null,[c("th",null,"name"),c("th",null,"users"),c("th",{title:"Every user is a member (the * membership)"},"all users"),c("th",{style:{width:"150px"}},"grant command"),c("th",null,"commands"),c("th")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(s.value.groups,y=>(k(),C("tr",{key:y.name},[c("td",null,[ye(A(y.name),1),y.is_system?(k(),C("span",ld," [sys]")):Re("",!0)]),c("td",null,[ye(A(y.nusers),1),y.all_users?(k(),C("span",rd," +*")):Re("",!0)]),c("td",null,[c("input",{type:"checkbox",checked:y.all_users,disabled:y.name==="blocked",title:"Include all users (*) in this group",onChange:L=>ae(y.name,L.target.checked)},null,40,id)]),c("td",null,[c("select",{onChange:L=>{se(y.name,L.target.value),L.target.value=""}},[m[40]||(m[40]=c("option",{value:""},"+ command…",-1)),m[41]||(m[41]=c("option",{value:"*"},"* (all commands)",-1)),(k(!0),C(Z,null,me(l.value,L=>(k(),C("option",{key:L,value:L},A(L),9,cd))),128))],40,ad)]),c("td",ud,[(k(!0),C(Z,null,me(y.commands,L=>(k(),C("span",{key:L,class:"tag"},[ye(A(L)+" ",1),c("a",{href:"#",onClick:Wn($e=>Ce(y.name,L),["prevent"]),title:"revoke"},"×",8,fd)]))),128))]),c("td",null,[c("button",{disabled:y.is_system,onClick:L=>he(y.name)},"delete",8,dd)])]))),128))])])])):n.value==="command-config"?(k(),C("div",hd,[c("table",null,[m[44]||(m[44]=c("thead",null,[c("tr",null,[c("th",null,"command"),c("th",null,"enabled"),c("th",null,"allow_dm"),c("th",null,"dm_only"),c("th",null,"cooldown"),c("th",{style:{width:"140px"}},"allow channel"),c("th",null,"allowed channels")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(s.value["command-config"],y=>(k(),C("tr",{key:y.command},[c("td",null,A(y.command),1),c("td",null,[c("input",{type:"checkbox",checked:!!y.enabled,onChange:L=>N(y.command,{enabled:L.target.checked})},null,40,pd)]),c("td",null,[c("input",{type:"checkbox",checked:!!y.allow_dm,onChange:L=>N(y.command,{allow_dm:L.target.checked})},null,40,md)]),c("td",null,[c("input",{type:"checkbox",checked:!!y.dm_only,onChange:L=>N(y.command,{dm_only:L.target.checked})},null,40,vd)]),c("td",null,[c("input",{type:"number",value:y.cooldown_seconds,style:{width:"64px"},onChange:L=>N(y.command,{cooldown_seconds:Number(L.target.value)})},null,40,gd)]),c("td",null,[c("select",{onChange:L=>{K(y,L.target.value),L.target.value=""}},[m[43]||(m[43]=c("option",{value:""},"+ channel…",-1)),(k(!0),C(Z,null,me(r.value,L=>(k(),C("option",{key:L,value:L},A(L),9,yd))),128))],40,_d)]),c("td",bd,[y._chans.length?Re("",!0):(k(),C("span",wd,"(any)")),(k(!0),C(Z,null,me(y._chans,L=>(k(),C("span",{key:L,class:"tag"},[ye(A(L)+" ",1),c("a",{href:"#",onClick:Wn($e=>H(y,L),["prevent"]),title:"remove"},"×",8,xd)]))),128))])]))),128))])])])):n.value==="contacts"?(k(),C("div",kd,[c("div",Cd,[c("div",Sd,[He(c("input",{"onUpdate:modelValue":m[10]||(m[10]=y=>R.value=y),placeholder:"search name or pubkey…",style:{flex:"0 0 260px"}},null,512),[[rt,R.value]]),c("label",Ed,[c("input",{type:"checkbox",checked:st.value,onChange:m[11]||(m[11]=y=>Kt(y.target.checked))},null,40,Rd),m[45]||(m[45]=ye(" All ",-1))]),(k(!0),C(Z,null,me(Ne.value,y=>(k(),C("label",{key:y,class:"chk"},[c("input",{type:"checkbox",checked:ot(y),onChange:L=>Fn(y,L.target.checked)},null,40,Ad),ye(" "+A(y),1)]))),128)),c("button",{disabled:!Co.value,onClick:si}," Delete"+A(Co.value?` (${Qt.value.length})`:""),9,Od),c("span",Td,A(So.value.length)+" shown",1)]),c("div",Pd,[c("table",null,[c("thead",null,[c("tr",null,[m[52]||(m[52]=c("th",{style:{width:"24px"}},null,-1)),c("th",{class:"sortable",onClick:m[12]||(m[12]=y=>Ve("public_key"))},[m[46]||(m[46]=ye(" pubkey",-1)),V.value.col==="public_key"?(k(),C("span",Id,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),c("th",{class:"sortable",onClick:m[13]||(m[13]=y=>Ve("adv_name"))},[m[47]||(m[47]=ye(" name",-1)),V.value.col==="adv_name"?(k(),C("span",Nd,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),c("th",{class:"sortable",onClick:m[14]||(m[14]=y=>Ve("type"))},[m[48]||(m[48]=ye(" type",-1)),V.value.col==="type"?(k(),C("span",$d,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),c("th",{class:"sortable",onClick:m[15]||(m[15]=y=>Ve("adv_lat"))},[m[49]||(m[49]=ye(" lat",-1)),V.value.col==="adv_lat"?(k(),C("span",Md,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),c("th",{class:"sortable",onClick:m[16]||(m[16]=y=>Ve("adv_lon"))},[m[50]||(m[50]=ye(" lon",-1)),V.value.col==="adv_lon"?(k(),C("span",Dd,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)]),c("th",{class:"sortable",onClick:m[17]||(m[17]=y=>Ve("last_synced_at"))},[m[51]||(m[51]=ye(" last synced",-1)),V.value.col==="last_synced_at"?(k(),C("span",Ld,A(V.value.dir==="asc"?"▲":"▼"),1)):Re("",!0)])])]),c("tbody",null,[(k(!0),C(Z,null,me(So.value,y=>(k(),C("tr",{key:y.public_key,class:Ze(["clickable",{selected:pe.value&&pe.value.public_key===y.public_key}]),onClick:L=>_e(y)},[c("td",null,[c("input",{type:"checkbox",checked:X.value.has(y.public_key),onChange:L=>Hn(y.public_key),onClick:m[18]||(m[18]=Wn(()=>{},["stop"]))},null,40,Vd)]),c("td",{class:"mono",title:y.public_key},A(x(y.public_key)),9,Ud),c("td",null,A(y.adv_name||""),1),c("td",null,A(g(y.type)),1),c("td",null,A(y.adv_lat??""),1),c("td",null,A(y.adv_lon??""),1),c("td",null,A(E(y.last_synced_at)),1)],10,jd))),128))])])])]),c("div",Fd,[m[53]||(m[53]=c("h3",null,"Contact",-1)),c("div",Hd,[pe.value?(k(),C("div",Kd,[c("div",Gd,[(k(!0),C(Z,null,me(Oe.value,y=>(k(),C(Z,{key:y[0]},[c("div",Wd,A(y[0]),1),c("div",{class:Ze({mono:y[2]}),style:{"word-break":"break-all"}},A(y[1]),3)],64))),128))])])):(k(),C("div",Bd,"select a contact"))])])])):Array.isArray(s.value[n.value])?(k(),C("table",qd,[c("thead",null,[c("tr",null,[(k(!0),C(Z,null,me(Eo(s.value[n.value]),y=>(k(),C("th",{key:y},A(y),1))),128))])]),c("tbody",null,[(k(!0),C(Z,null,me(s.value[n.value],(y,L)=>(k(),C("tr",{key:L},[(k(!0),C(Z,null,me(Eo(s.value[n.value]),$e=>(k(),C("td",{key:$e,title:Ro(y[$e])},A(Ro(y[$e])),9,zd))),128))]))),128))])])):(k(),C("div",Jd,"loading…"))])])])}}},Qd=ef(Yd,[["__scopeId","data-v-9be56ce0"]]),Xd={class:"panes"},Zd={class:"side-col"},eh={class:"pane",style:{flex:"1 1 0","min-height":"160px"}},th={class:"body"},nh=["onClick"],sh={class:"muted"},oh={class:"pane",style:{flex:"1 1 0","min-height":"200px"}},lh={class:"toolbar"},rh={class:"body"},ih=["onClick"],ah={class:"muted mono"},ch={class:"pane",style:{flex:"1"}},uh={key:0,class:"err",style:{padding:"10px"}},fh={key:1,class:"empty"},dh={class:"meta"},hh={class:"who"},ph={key:0},mh=["href"],vh={key:1,class:"mention"},gh={class:"toolbar"},_h=["placeholder","disabled"],yh=["disabled"],bh={key:0,class:"err",style:{padding:"0 12px 8px"}},wh={__name:"Messages",setup(e){const t=ne([]),n=ne(null),s=ne(null),o=ne([]),l=ne(null),r=ne([]),i=ne(""),a=ne(""),d=ne(""),u=ne(!1),h=ne("");let _=null;const b=ge(()=>{const W=i.value.toLowerCase();return W?r.value.filter(Q=>(Q.adv_name||"").toLowerCase().includes(W)||(Q.public_key||"").toLowerCase().includes(W)):r.value}),I=ge(()=>{if(typeof n.value=="number"){const W=t.value.find(Q=>Q.channel_idx===n.value);return{kind:"channel",idx:n.value,label:(W==null?void 0:W.name)||`#${n.value}`}}return n.value==="dm"&&s.value?{kind:"dm",pubkey:s.value.public_key,label:s.value.adv_name||s.value.public_key.slice(0,12)}:null}),O=ge(()=>I.value?`Message ${I.value.label}…`:"Pick a channel or a contact to send to…");async function U(){t.value=(await ce("/channels")).items,n.value===null&&t.value.length&&K(t.value[0].channel_idx)}async function J(){r.value=(await ce("/contacts?limit=500")).items}async function N(){await jn();const W=l.value;W&&(W.scrollTop=W.scrollHeight)}async function K(W){n.value=W,s.value=null;const Q=await ce(`/channel-messages?channel_idx=${W}&limit=100`);o.value=Q.items.slice().reverse(),await N()}async function H(){n.value="dm",s.value=null;const W=await ce("/direct-messages?limit=100");o.value=W.items.slice().reverse(),await N()}async function $(W){n.value="dm",s.value=W;const Q=await ce(`/direct-messages?pubkey=${encodeURIComponent(W.public_key)}&limit=100`);o.value=Q.items.slice().reverse(),await N()}async function Y(){const W=d.value.trim();if(!(!W||!I.value||u.value)){u.value=!0,h.value="";try{I.value.kind==="channel"?await ce("/send/channel",{method:"POST",json:{channel_idx:I.value.idx,text:W}}):await ce("/send/dm",{method:"POST",json:{pubkey:I.value.pubkey,text:W}}),d.value=""}catch(Q){h.value=Q.message}finally{u.value=!1}}}function B(W){return W?new Date(W*1e3).toLocaleTimeString():""}function oe(W,Q){if(!W||!Q)return W||"";const he=`${Q}: `;return W.startsWith(he)?W.slice(he.length):W}const re=/(https?:\/\/[^\s<>]+)|@\[([^\]]+)\]/g;function ke(W){const Q=oe(W.text,W.sender_name),he=[];let se=0,Ce;for(re.lastIndex=0;(Ce=re.exec(Q))!==null;){if(Ce.index>se&&he.push({type:"text",value:Q.slice(se,Ce.index)}),Ce[1]){const ae=Ce[1].match(/^(.*?)([.,;:!?)]+)$/);ae?(he.push({type:"link",value:ae[1]}),he.push({type:"text",value:ae[2]})):he.push({type:"link",value:Ce[1]})}else he.push({type:"mention",value:Ce[2]});se=re.lastIndex}return se{try{await U(),await J()}catch(W){a.value=W.message}_=new WebSocket(ti("/ws/messages")),_.onmessage=W=>{const Q=JSON.parse(W.data),he=l.value,se=he?he.scrollHeight-he.scrollTop-he.clientHeight<60:!0;let Ce=!1;n.value==="dm"&&Q.kind==="dm"?(!s.value||Q.sender_pubkey===s.value.public_key)&&(o.value.push(Q),Ce=!0):Q.kind==="channel"&&Q.channel_idx===n.value&&(o.value.push(Q),Ce=!0),o.value.length>300&&o.value.shift(),Ce&&se&&N()}}),ys(()=>_&&_.close()),(W,Q)=>{var he;return k(),C("div",Xd,[c("div",Zd,[c("div",eh,[Q[3]||(Q[3]=c("h3",null,"Channels",-1)),c("div",th,[c("table",null,[c("tbody",null,[(k(!0),C(Z,null,me(t.value,se=>(k(),C("tr",{key:se.channel_idx,class:Ze(["clickable",{selected:n.value===se.channel_idx}]),onClick:Ce=>K(se.channel_idx)},[c("td",null,[ye(A(se.name)+" ",1),c("span",sh,"#"+A(se.channel_idx),1)])],10,nh))),128)),c("tr",{class:Ze(["clickable",{selected:n.value==="dm"&&!s.value}]),onClick:H},[...Q[2]||(Q[2]=[c("td",null,"✉ Direct messages",-1)])],2)])])])]),c("div",oh,[c("h3",null,"Contacts ("+A(r.value.length)+")",1),c("div",lh,[He(c("input",{"onUpdate:modelValue":Q[0]||(Q[0]=se=>i.value=se),placeholder:"search",style:{flex:"1"}},null,512),[[rt,i.value]])]),c("div",rh,[c("table",null,[c("tbody",null,[(k(!0),C(Z,null,me(b.value,se=>(k(),C("tr",{key:se.public_key,class:Ze(["clickable",{selected:s.value&&s.value.public_key===se.public_key}]),onClick:Ce=>$(se),title:"Open a DM conversation with this contact"},[c("td",null,[ye(A(se.adv_name||"(unnamed)"),1),Q[4]||(Q[4]=c("br",null,null,-1)),c("span",ah,A(se.public_key.slice(0,12)),1)])],10,ih))),128))])])])])]),c("div",ch,[c("h3",null,A(n.value==="dm"?s.value?`DM · ${s.value.adv_name||s.value.public_key.slice(0,12)}`:"Direct messages":((he=t.value.find(se=>se.channel_idx===n.value))==null?void 0:he.name)||"Messages"),1),c("div",{class:"body",ref_key:"msgBody",ref:l},[a.value?(k(),C("div",uh,A(a.value),1)):Re("",!0),o.value.length?Re("",!0):(k(),C("div",fh,"no messages")),(k(!0),C(Z,null,me(o.value,se=>{var Ce;return k(),C("div",{key:se.id,class:Ze(["msg",{out:se.is_outgoing}])},[c("div",dh,[c("span",hh,A(se.is_outgoing?"→ me":se.sender_name||((Ce=se.sender_pubkey)==null?void 0:Ce.slice(0,12))||"?"),1),ye(" · "+A(B(se.received_at))+" ",1),se.snr!=null?(k(),C("span",ph,"· snr "+A(se.snr),1)):Re("",!0)]),c("div",null,[(k(!0),C(Z,null,me(ke(se),(ae,te)=>(k(),C(Z,{key:te},[ae.type==="link"?(k(),C("a",{key:0,href:ae.value,target:"_blank",rel:"noopener noreferrer"},A(ae.value),9,mh)):ae.type==="mention"?(k(),C("span",vh,"@["+A(ae.value)+"]",1)):(k(),C(Z,{key:2},[ye(A(ae.value),1)],64))],64))),128))])],2)}),128))],512),c("div",gh,[He(c("input",{style:{flex:"1"},placeholder:O.value,"onUpdate:modelValue":Q[1]||(Q[1]=se=>d.value=se),disabled:!I.value||u.value,onKeyup:Qn(Y,["enter"])},null,40,_h),[[rt,d.value]]),c("button",{disabled:!I.value||u.value||!d.value.trim(),onClick:Y},A(u.value?"Sending…":"Send"),9,yh)]),h.value?(k(),C("div",bh,A(h.value),1)):Re("",!0)])])}}},xh={class:"hexdump"},kh=["onMouseenter"],Ch={key:0},Sh={key:1},Eh={key:0,class:"empty"},Rh={__name:"HexDump",props:{hex:{type:String,default:""},activeRange:{type:Object,default:null}},emits:["hover-offset"],setup(e,{emit:t}){const n=e,s=t,o=ge(()=>{const r=(n.hex||"").replace(/\s+/g,""),i=[];for(let a=0;a+2<=r.length;a+=2)i.push(r.slice(a,a+2));return i});function l(r){const i=n.activeRange;return i&&r>=i.offset&&r(k(),C("div",xh,[(k(!0),C(Z,null,me(o.value,(a,d)=>(k(),C("span",{key:d,class:Ze(["hexbyte",{active:l(d)}]),onMouseenter:u=>s("hover-offset",d),onMouseleave:i[0]||(i[0]=u=>s("hover-offset",null))},[ye(A(a),1),(d+1)%16===0?(k(),C("span",Ch,[...i[1]||(i[1]=[c("br",null,null,-1)])])):(k(),C("span",Sh))],42,kh))),128)),o.value.length?Re("",!0):(k(),C("div",Eh,"no raw bytes"))]))}},Ah=["onMouseenter"],Oh={class:"fname"},Th={class:"fmeta"},Ph={class:"fval"},Ih={key:0,class:"fval muted"},Nh={key:1,class:"fmeta"},$h={key:0,class:"decoded"},Mh={class:"kv"},Dh={class:"k"},Lh={class:"mono"},jh={__name:"FieldBreakout",props:{fields:{type:Array,default:()=>[]},decoded:{type:Object,default:null},activeIndex:{type:Number,default:-1}},emits:["hover-field"],setup(e,{emit:t}){const n=t;function s(o){return o==null?"":typeof o=="object"?JSON.stringify(o):String(o)}return(o,l)=>(k(),C("div",null,[(k(!0),C(Z,null,me(e.fields,(r,i)=>(k(),C("div",{key:i,class:Ze(["field-row",{active:i===e.activeIndex}]),onMouseenter:a=>n("hover-field",i),onMouseleave:l[0]||(l[0]=a=>n("hover-field",-1))},[c("div",Oh,A(r.name),1),c("div",Th,"offset "+A(r.offset)+" · "+A(r.length)+" byte(s)",1),c("div",Ph,A(r.hex),1),r.value!==null&&r.value!==void 0?(k(),C("div",Ih,A(s(r.value)),1)):Re("",!0),r.description?(k(),C("div",Nh,A(r.description),1)):Re("",!0)],42,Ah))),128)),e.decoded?(k(),C("div",$h,[l[1]||(l[1]=c("h4",{style:{margin:"6px 0"}},"Decoded payload",-1)),c("div",Mh,[(k(!0),C(Z,null,me(e.decoded,(r,i)=>(k(),C(Z,{key:i},[c("div",Dh,A(i),1),c("div",Lh,A(s(r)),1)],64))),128))])])):Re("",!0)]))}},Vh={class:"panes"},Uh={class:"pane",style:{flex:"1.3"}},Fh={class:"toolbar"},Hh={class:"chk"},Bh=["checked"],Kh=["checked","onChange"],Gh={class:"muted"},Wh={key:0,class:"err"},qh={class:"body"},zh=["onClick"],Jh={class:"pane",style:{flex:"1"}},Yh={class:"body"},Qh={key:0,class:"empty"},Xh={key:1,class:"empty"},Zh={key:0,class:"err",style:{padding:"0 12px"}},ep={key:3,class:"empty"},tp={__name:"Packets",setup(e){const t=ne([]),n=ne(new Set),s=ne(new Set),o=ne(null),l=ne(null),r=ne(-1),i=ne("");let a=null;const d=ge(()=>[...s.value].sort()),u=ge(()=>n.value.size===0),h=$=>!n.value.has($),_=ge(()=>n.value.size===0?t.value:t.value.filter($=>!n.value.has($.packet_type)));function b($){let Y=null;for(const B of $)B.packet_type&&!s.value.has(B.packet_type)&&(Y=Y||new Set(s.value),Y.add(B.packet_type));Y&&(s.value=Y)}function I($){n.value=$?new Set:new Set(s.value)}function O($,Y){const B=new Set(n.value);Y?B.delete($):B.add($),n.value=B}const U=ge(()=>{if(!l.value||r.value<0)return null;const $=l.value.fields[r.value];return $?{offset:$.offset,length:$.length}:null});async function J(){try{const $=await ce("/packets?limit=200");t.value=$.items,b($.items)}catch($){i.value=$.message}}async function N($){if(o.value=$,l.value=null,r.value=-1,!!$.has_raw)try{l.value=await ce("/packets/decode",{method:"POST",json:{packet_id:$.id}})}catch(Y){i.value=Y.message}}function K($){if($===null||!l.value){r.value=-1;return}const Y=l.value.fields.findIndex(B=>$>=B.offset&&${J(),a=new WebSocket(ti("/ws/packets")),a.onmessage=$=>{const Y=JSON.parse($.data);t.value.unshift(Y),t.value.length>500&&t.value.pop(),b([Y])}}),ys(()=>a&&a.close()),($,Y)=>(k(),C("div",Vh,[c("div",Uh,[Y[4]||(Y[4]=c("h3",null,"Packets (live)",-1)),c("div",Fh,[c("label",Hh,[c("input",{type:"checkbox",checked:u.value,onChange:Y[0]||(Y[0]=B=>I(B.target.checked))},null,40,Bh),Y[2]||(Y[2]=ye(" All ",-1))]),(k(!0),C(Z,null,me(d.value,B=>(k(),C("label",{key:B,class:"chk"},[c("input",{type:"checkbox",checked:h(B),onChange:oe=>O(B,oe.target.checked)},null,40,Kh),ye(" "+A(B),1)]))),128)),c("span",Gh,A(_.value.length)+" shown",1),i.value?(k(),C("span",Wh,A(i.value),1)):Re("",!0)]),c("div",qh,[c("table",null,[Y[3]||(Y[3]=c("thead",null,[c("tr",null,[c("th",null,"time"),c("th",null,"type"),c("th",null,"from"),c("th",null,"ch"),c("th",null,"text"),c("th",null,"raw")])],-1)),c("tbody",null,[(k(!0),C(Z,null,me(_.value,B=>(k(),C("tr",{key:B.id,class:Ze(["clickable",{selected:o.value&&o.value.id===B.id}]),onClick:oe=>N(B)},[c("td",null,A(H(B.received_at)),1),c("td",null,A(B.packet_type),1),c("td",null,A(B.sender_name||B.sender_pubkey_prefix||""),1),c("td",null,A(B.channel_idx??""),1),c("td",null,A(B.text||""),1),c("td",null,A(B.has_raw?"●":""),1)],10,zh))),128))])])])]),c("div",Jh,[Y[6]||(Y[6]=c("h3",null,"Inspector",-1)),c("div",Yh,[o.value?o.value.has_raw?l.value?(k(),C(Z,{key:2},[Le(Rh,{hex:l.value.raw_hex,"active-range":U.value,onHoverOffset:K},null,8,["hex","active-range"]),l.value.error?(k(),C("div",Zh,A(l.value.error),1)):Re("",!0),Le(jh,{fields:l.value.fields,decoded:l.value.decoded,"active-index":r.value,onHoverField:Y[1]||(Y[1]=B=>r.value=B)},null,8,["fields","decoded","active-index"])],64)):(k(),C("div",ep,"decoding…")):(k(),C("div",Xh,[...Y[5]||(Y[5]=[ye(" no raw bytes for this packet",-1),c("br",null,null,-1),c("span",{class:"muted"},"(only RX_LOG_DATA packets carry on-air bytes)",-1)])])):(k(),C("div",Qh,"select a packet"))])])]))}},np=[{path:"/login",component:Zu,meta:{public:!0}},{path:"/",redirect:"/messages"},{path:"/manage",component:Qd},{path:"/messages",component:wh},{path:"/packets",component:tp}],ni=Ku({history:xu(),routes:np});ni.beforeEach(e=>{const t=Un();if(!e.meta.public&&!t.token)return"/login";if(e.path==="/login"&&t.token)return"/"});Ac(zu).use(Pc()).use(ni).mount("#app"); diff --git a/webapi/static/index.html b/webapi/static/index.html index 4999907..d232203 100644 --- a/webapi/static/index.html +++ b/webapi/static/index.html @@ -4,8 +4,8 @@ mcbot admin - - + +