From 150758b0bf9dcad204e6cf9c3747355718146b43 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Mon, 13 Jul 2026 23:28:23 +0200 Subject: [PATCH] Add bounding-box region picker to the API Server plugin panel Give the superadmin Plugins panel the same OpenSky "Default bounding box" experience as the Web App: a grouped preset dropdown (World / Continents / Countries) plus a Custom option for manual lamin,lomin,lamax,lomax entry. Introduce a "bbox" config-field type (rendering hint only; unknown types still degrade to a text input) and mark the OpenSky bbox field with it. Values that match a preset render as the region name. Co-Authored-By: Claude Opus 4.8 --- .../api/dist/assets/index--4fMszzi.js | 17 +++++ .../api/dist/assets/index-BPK80y5V.js | 17 ----- API Server/internal/api/dist/index.html | 2 +- .../plugins/builtin/opensky/opensky.go | 2 +- API Server/panel/src/App.vue | 65 +++++++++++++++++++ 5 files changed, 84 insertions(+), 19 deletions(-) create mode 100644 API Server/internal/api/dist/assets/index--4fMszzi.js delete mode 100644 API Server/internal/api/dist/assets/index-BPK80y5V.js diff --git a/API Server/internal/api/dist/assets/index--4fMszzi.js b/API Server/internal/api/dist/assets/index--4fMszzi.js new file mode 100644 index 0000000..5ecbe51 --- /dev/null +++ b/API Server/internal/api/dist/assets/index--4fMszzi.js @@ -0,0 +1,17 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}})();/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function An(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ne={},Nt=[],tt=()=>{},$o=()=>!1,Ks=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),zs=e=>e.startsWith("onUpdate:"),Se=Object.assign,On=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Qi=Object.prototype.hasOwnProperty,Q=(e,t)=>Qi.call(e,t),N=Array.isArray,Ft=e=>ms(e)==="[object Map]",Wt=e=>ms(e)==="[object Set]",eo=e=>ms(e)==="[object Date]",B=e=>typeof e=="function",ce=e=>typeof e=="string",st=e=>typeof e=="symbol",te=e=>e!==null&&typeof e=="object",jo=e=>(te(e)||B(e))&&B(e.then)&&B(e.catch),Do=Object.prototype.toString,ms=e=>Do.call(e),el=e=>ms(e).slice(8,-1),Lo=e=>ms(e)==="[object Object]",Rn=e=>ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ss=An(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ws=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},tl=/-\w/g,Be=Ws(e=>e.replace(tl,t=>t.slice(1).toUpperCase())),sl=/\B([A-Z])/g,xt=Ws(e=>e.replace(sl,"-$1").toLowerCase()),No=Ws(e=>e.charAt(0).toUpperCase()+e.slice(1)),on=Ws(e=>e?`on${No(e)}`:""),et=(e,t)=>!Object.is(e,t),Is=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Gs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let to;const qs=()=>to||(to=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function In(e){if(N(e)){const t={};for(let s=0;s{if(s){const n=s.split(ol);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ue(e){let t="";if(ce(e))t=e;else if(N(e))for(let s=0;svt(s,t))}const Ho=e=>!!(e&&e.__v_isRef===!0),O=e=>ce(e)?e:e==null?"":N(e)||te(e)&&(e.toString===Do||!B(e.toString))?Ho(e)?O(e.value):JSON.stringify(e,Bo,2):String(e),Bo=(e,t)=>Ho(t)?Bo(e,t.value):Ft(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],i)=>(s[ln(n,i)+" =>"]=o,s),{})}:Wt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>ln(s))}:st(t)?ln(t):te(t)&&!N(t)&&!Lo(t)?String(t):t,ln=(e,t="")=>{var s;return st(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ve;class ul{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&&ve&&(ve.active?(this.parent=ve,this.index=(ve.scopes||(ve.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t0&&--this._on===0){if(ve===this)ve=this.prevScope;else{let t=ve;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 s,n;for(s=0,n=this.effects.length;s0)return;if(os){let t=os;for(os=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ns;){let t=ns;for(ns=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Go(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function qo(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),jn(n),dl(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function vn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Jo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Jo(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===cs)||(e.globalVersion=cs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!vn(e))))return;e.flags|=2;const t=e.dep,s=re,n=Ke;re=e,Ke=!0;try{Go(e);const o=e.fn(e._value);(t.version===0||et(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{re=s,Ke=n,qo(e),e.flags&=-3}}function jn(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)jn(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function dl(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ke=!0;const Yo=[];function nt(){Yo.push(Ke),Ke=!1}function ot(){const e=Yo.pop();Ke=e===void 0?!0:e}function so(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=re;re=void 0;try{t()}finally{re=s}}}let cs=0;class pl{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dn{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(!re||!Ke||re===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==re)s=this.activeLink=new pl(re,this),re.deps?(s.prevDep=re.depsTail,re.depsTail.nextDep=s,re.depsTail=s):re.deps=re.depsTail=s,Xo(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=re.depsTail,s.nextDep=void 0,re.depsTail.nextDep=s,re.depsTail=s,re.deps===s&&(re.deps=n)}return s}trigger(t){this.version++,cs++,this.notify(t)}notify(t){Un();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{$n()}}}function Xo(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Xo(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const bn=new WeakMap,Tt=Symbol(""),yn=Symbol(""),us=Symbol("");function we(e,t,s){if(Ke&&re){let n=bn.get(e);n||bn.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Dn),o.map=n,o.key=s),o.track()}}function ut(e,t,s,n,o,i){const l=bn.get(e);if(!l){cs++;return}const r=c=>{c&&c.trigger()};if(Un(),t==="clear")l.forEach(r);else{const c=N(e),g=c&&Rn(s);if(c&&s==="length"){const h=Number(n);l.forEach((y,R)=>{(R==="length"||R===us||!st(R)&&R>=h)&&r(y)})}else switch((s!==void 0||l.has(void 0))&&r(l.get(s)),g&&r(l.get(us)),t){case"add":c?g&&r(l.get("length")):(r(l.get(Tt)),Ft(e)&&r(l.get(yn)));break;case"delete":c||(r(l.get(Tt)),Ft(e)&&r(l.get(yn)));break;case"set":Ft(e)&&r(l.get(Tt));break}}$n()}function jt(e){const t=Z(e);return t===e?t:(we(t,"iterate",us),Ve(e)?t:t.map(ze))}function Js(e){return we(e=Z(e),"iterate",us),e}function Ze(e,t){return pt(e)?Bt(Pt(e)?ze(t):t):ze(t)}const hl={__proto__:null,[Symbol.iterator](){return an(this,Symbol.iterator,e=>Ze(this,e))},concat(...e){return jt(this).concat(...e.map(t=>N(t)?jt(t):t))},entries(){return an(this,"entries",e=>(e[1]=Ze(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Ze(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Ze(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Ze(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return cn(this,"includes",e)},indexOf(...e){return cn(this,"indexOf",e)},join(e){return jt(this).join(e)},lastIndexOf(...e){return cn(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Jt(this,"pop")},push(...e){return Jt(this,"push",e)},reduce(e,...t){return no(this,"reduce",e,t)},reduceRight(e,...t){return no(this,"reduceRight",e,t)},shift(){return Jt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Jt(this,"splice",e)},toReversed(){return jt(this).toReversed()},toSorted(e){return jt(this).toSorted(e)},toSpliced(...e){return jt(this).toSpliced(...e)},unshift(...e){return Jt(this,"unshift",e)},values(){return an(this,"values",e=>Ze(this,e))}};function an(e,t,s){const n=Js(e),o=n[t]();return n!==e&&!Ve(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=s(i.value)),i}),o}const ml=Array.prototype;function rt(e,t,s,n,o,i){const l=Js(e),r=l!==e&&!Ve(e),c=l[t];if(c!==ml[t]){const y=c.apply(e,i);return r?ze(y):y}let g=s;l!==e&&(r?g=function(y,R){return s.call(this,Ze(e,y),R,e)}:s.length>2&&(g=function(y,R){return s.call(this,y,R,e)}));const h=c.call(l,g,n);return r&&o?o(h):h}function no(e,t,s,n){const o=Js(e),i=o!==e&&!Ve(e);let l=s,r=!1;o!==e&&(i?(r=n.length===0,l=function(g,h,y){return r&&(r=!1,g=Ze(e,g)),s.call(this,g,Ze(e,h),y,e)}):s.length>3&&(l=function(g,h,y){return s.call(this,g,h,y,e)}));const c=o[t](l,...n);return r?Ze(e,c):c}function cn(e,t,s){const n=Z(e);we(n,"iterate",us);const o=n[t](...s);return(o===-1||o===!1)&&Vn(s[0])?(s[0]=Z(s[0]),n[t](...s)):o}function Jt(e,t,s=[]){nt(),Un();const n=Z(e)[t].apply(e,s);return $n(),ot(),n}const gl=An("__proto__,__v_isRef,__isVue"),Zo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(st));function vl(e){st(e)||(e=String(e));const t=Z(this);return we(t,"has",e),t.hasOwnProperty(e)}class Qo{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(o?i?Tl:ni:i?si:ti).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=N(t);if(!o){let c;if(l&&(c=hl[s]))return c;if(s==="hasOwnProperty")return vl}const r=Reflect.get(t,s,Ce(t)?t:n);if((st(s)?Zo.has(s):gl(s))||(o||we(t,"get",s),i))return r;if(Ce(r)){const c=l&&Rn(s)?r:r.value;return o&&te(c)?_n(c):c}return te(r)?o?_n(r):Nn(r):r}}class ei extends Qo{constructor(t=!1){super(!1,t)}set(t,s,n,o){let i=t[s];const l=N(t)&&Rn(s);if(!this._isShallow){const g=pt(i);if(!Ve(n)&&!pt(n)&&(i=Z(i),n=Z(n)),!l&&Ce(i)&&!Ce(n))return g||(i.value=n),!0}const r=l?Number(s)e,Ts=e=>Reflect.getPrototypeOf(e);function wl(e,t,s){return function(...n){const o=this.__v_raw,i=Z(o),l=Ft(i),r=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,g=o[e](...n),h=s?xn:t?Bt:ze;return!t&&we(i,"iterate",c?yn:Tt),Se(Object.create(g),{next(){const{value:y,done:R}=g.next();return R?{value:y,done:R}:{value:r?[h(y[0]),h(y[1])]:h(y),done:R}}})}}function Ps(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Cl(e,t){const s={get(o){const i=this.__v_raw,l=Z(i),r=Z(o);e||(et(o,r)&&we(l,"get",o),we(l,"get",r));const{has:c}=Ts(l),g=t?xn:e?Bt:ze;if(c.call(l,o))return g(i.get(o));if(c.call(l,r))return g(i.get(r));i!==l&&i.get(o)},get size(){const o=this.__v_raw;return!e&&we(Z(o),"iterate",Tt),o.size},has(o){const i=this.__v_raw,l=Z(i),r=Z(o);return e||(et(o,r)&&we(l,"has",o),we(l,"has",r)),o===r?i.has(o):i.has(o)||i.has(r)},forEach(o,i){const l=this,r=l.__v_raw,c=Z(r),g=t?xn:e?Bt:ze;return!e&&we(c,"iterate",Tt),r.forEach((h,y)=>o.call(i,g(h),g(y),l))}};return Se(s,e?{add:Ps("add"),set:Ps("set"),delete:Ps("delete"),clear:Ps("clear")}:{add(o){const i=Z(this),l=Ts(i),r=Z(o),c=!t&&!Ve(o)&&!pt(o)?r:o;return l.has.call(i,c)||et(o,c)&&l.has.call(i,o)||et(r,c)&&l.has.call(i,r)||(i.add(c),ut(i,"add",c,c)),this},set(o,i){!t&&!Ve(i)&&!pt(i)&&(i=Z(i));const l=Z(this),{has:r,get:c}=Ts(l);let g=r.call(l,o);g||(o=Z(o),g=r.call(l,o));const h=c.call(l,o);return l.set(o,i),g?et(i,h)&&ut(l,"set",o,i):ut(l,"add",o,i),this},delete(o){const i=Z(this),{has:l,get:r}=Ts(i);let c=l.call(i,o);c||(o=Z(o),c=l.call(i,o)),r&&r.call(i,o);const g=i.delete(o);return c&&ut(i,"delete",o,void 0),g},clear(){const o=Z(this),i=o.size!==0,l=o.clear();return i&&ut(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=wl(o,e,t)}),s}function Ln(e,t){const s=Cl(e,t);return(n,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(Q(s,o)&&o in n?s:n,o,i)}const Sl={get:Ln(!1,!1)},kl={get:Ln(!1,!0)},El={get:Ln(!0,!1)};const ti=new WeakMap,si=new WeakMap,ni=new WeakMap,Tl=new WeakMap;function Pl(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Nn(e){return pt(e)?e:Fn(e,!1,yl,Sl,ti)}function Al(e){return Fn(e,!1,_l,kl,si)}function _n(e){return Fn(e,!0,xl,El,ni)}function Fn(e,t,s,n,o){if(!te(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const l=Pl(el(e));if(l===0)return e;const r=new Proxy(e,l===2?n:s);return o.set(e,r),r}function Pt(e){return pt(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function Ve(e){return!!(e&&e.__v_isShallow)}function Vn(e){return e?!!e.__v_raw:!1}function Z(e){const t=e&&e.__v_raw;return t?Z(t):e}function Ol(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&Fo(e,"__v_skip",!0),e}const ze=e=>te(e)?Nn(e):e,Bt=e=>te(e)?_n(e):e;function Ce(e){return e?e.__v_isRef===!0:!1}function D(e){return Rl(e,!1)}function Rl(e,t){return Ce(e)?e:new Il(e,t)}class Il{constructor(t,s){this.dep=new Dn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Z(t),this._value=s?t:ze(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ve(t)||pt(t);t=n?t:Z(t),et(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function Qt(e){return Ce(e)?e.value:e}const Ml={get:(e,t,s)=>t==="__v_raw"?e:Qt(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Ce(o)&&!Ce(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function oi(e){return Pt(e)?e:new Proxy(e,Ml)}class Ul{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Dn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=cs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&re!==this)return Wo(this,!0),!0}get value(){const t=this.dep.track();return Jo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function $l(e,t,s=!1){let n,o;return B(e)?n=e:(n=e.get,o=e.set),new Ul(n,o,s)}const As={},js=new WeakMap;let Et;function jl(e,t=!1,s=Et){if(s){let n=js.get(s);n||js.set(s,n=[]),n.push(e)}}function Dl(e,t,s=ne){const{immediate:n,deep:o,once:i,scheduler:l,augmentJob:r,call:c}=s,g=j=>o?j:Ve(j)||o===!1||o===0?ft(j,1):ft(j);let h,y,R,M,q=!1,U=!1;if(Ce(e)?(y=()=>e.value,q=Ve(e)):Pt(e)?(y=()=>g(e),q=!0):N(e)?(U=!0,q=e.some(j=>Pt(j)||Ve(j)),y=()=>e.map(j=>{if(Ce(j))return j.value;if(Pt(j))return g(j);if(B(j))return c?c(j,2):j()})):B(e)?t?y=c?()=>c(e,2):e:y=()=>{if(R){nt();try{R()}finally{ot()}}const j=Et;Et=h;try{return c?c(e,3,[M]):e(M)}finally{Et=j}}:y=tt,t&&o){const j=y,z=o===!0?1/0:o;y=()=>ft(j(),z)}const W=fl(),Y=()=>{h.stop(),W&&W.active&&On(W.effects,h)};if(i&&t){const j=t;t=(...z)=>{const Ie=j(...z);return Y(),Ie}}let V=U?new Array(e.length).fill(As):As;const X=j=>{if(!(!(h.flags&1)||!h.dirty&&!j))if(t){const z=h.run();if(j||o||q||(U?z.some((Ie,De)=>et(Ie,V[De])):et(z,V))){R&&R();const Ie=Et;Et=h;try{const De=[z,V===As?void 0:U&&V[0]===As?[]:V,M];V=z,c?c(t,3,De):t(...De)}finally{Et=Ie}}}else h.run()};return r&&r(X),h=new Ko(y),h.scheduler=l?()=>l(X,!1):X,M=j=>jl(j,!1,h),R=h.onStop=()=>{const j=js.get(h);if(j){if(c)c(j,4);else for(const z of j)z();js.delete(h)}},t?n?X(!0):V=h.run():l?l(X.bind(null,!0),!0):h.run(),Y.pause=h.pause.bind(h),Y.resume=h.resume.bind(h),Y.stop=Y,Y}function ft(e,t=1/0,s){if(t<=0||!te(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ce(e))ft(e.value,t,s);else if(N(e))for(let n=0;n{ft(n,t,s)});else if(Lo(e)){for(const n in e)ft(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ft(e[n],t,s)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function gs(e,t,s,n){try{return n?e(...n):e()}catch(o){Ys(o,t,s)}}function We(e,t,s,n){if(B(e)){const o=gs(e,t,s,n);return o&&jo(o)&&o.catch(i=>{Ys(i,t,s)}),o}if(N(e)){const o=[];for(let i=0;i>>1,o=Pe[n],i=fs(o);i=fs(s)?Pe.push(e):Pe.splice(Nl(t),0,e),e.flags|=1,ri()}}function ri(){Ds||(Ds=ii.then(ci))}function Fl(e){N(e)?Vt.push(...e):gt&&e.id===-1?gt.splice(Dt+1,0,e):e.flags&1||(Vt.push(e),e.flags|=1),ri()}function oo(e,t,s=Xe+1){for(;sfs(s)-fs(n));if(Vt.length=0,gt){gt.push(...t);return}for(gt=t,Dt=0;Dte.id==null?e.flags&2?-1:1/0:e.id;function ci(e){try{for(Xe=0;Xe{n._d&&go(-1);const i=Ls(t);let l;try{l=e(...o)}finally{Ls(i),n._d&&go(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(Fe===null)return e;const s=en(Fe),n=e.dirs||(e.dirs=[]);for(let o=0;o1)return s&&B(t)?t.call(n&&n.proxy):t}}const Bl=Symbol.for("v-scx"),Kl=()=>Ms(Bl);function un(e,t,s){return fi(e,t,s)}function fi(e,t,s=ne){const{immediate:n,deep:o,flush:i,once:l}=s,r=Se({},s),c=t&&n||!t&&i!=="post";let g;if(ps){if(i==="sync"){const M=Kl();g=M.__watcherHandles||(M.__watcherHandles=[])}else if(!c){const M=()=>{};return M.stop=tt,M.resume=tt,M.pause=tt,M}}const h=Ae;r.call=(M,q,U)=>We(M,h,q,U);let y=!1;i==="post"?r.scheduler=M=>{Re(M,h&&h.suspense)}:i!=="sync"&&(y=!0,r.scheduler=(M,q)=>{q?M():Hn(M)}),r.augmentJob=M=>{t&&(M.flags|=4),y&&(M.flags|=2,h&&(M.id=h.uid,M.i=h))};const R=Dl(e,t,r);return ps&&(g?g.push(R):c&&R()),R}function zl(e,t,s){const n=this.proxy,o=ce(e)?e.includes(".")?di(n,e):()=>n[e]:e.bind(n,n);let i;B(t)?i=t:(i=t.handler,s=t);const l=vs(this),r=fi(o,i.bind(n),s);return l(),r}function di(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;oe.__isTeleport,fn=Symbol("_leaveCb");function Bn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Bn(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 pi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function io(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Ns=new WeakMap;function is(e,t,s,n,o=!1){if(N(e)){e.forEach((U,W)=>is(U,t&&(N(t)?t[W]:t),s,n,o));return}if(ls(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&is(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?en(n.component):n.el,l=o?null:i,{i:r,r:c}=e,g=t&&t.r,h=r.refs===ne?r.refs={}:r.refs,y=r.setupState,R=Z(y),M=y===ne?$o:U=>io(h,U)?!1:Q(R,U),q=(U,W)=>!(W&&io(h,W));if(g!=null&&g!==c){if(lo(t),ce(g))h[g]=null,M(g)&&(y[g]=null);else if(Ce(g)){const U=t;q(g,U.k)&&(g.value=null),U.k&&(h[U.k]=null)}}if(B(c)){nt();try{gs(c,r,12,[l,h])}finally{ot()}}else{const U=ce(c),W=Ce(c);if(U||W){const Y=()=>{if(e.f){const V=U?M(c)?y[c]:h[c]:q()||!e.k?c.value:h[e.k];if(o)N(V)&&On(V,i);else if(N(V))V.includes(i)||V.push(i);else if(U)h[c]=[i],M(c)&&(y[c]=h[c]);else{const X=[i];q(c,e.k)&&(c.value=X),e.k&&(h[e.k]=X)}}else U?(h[c]=l,M(c)&&(y[c]=l)):W&&(q(c,e.k)&&(c.value=l),e.k&&(h[e.k]=l))};if(l){const V=()=>{Y(),Ns.delete(e)};V.id=-1,Ns.set(e,V),Re(V,s)}else lo(e),Y()}}}function lo(e){const t=Ns.get(e);t&&(t.flags|=8,Ns.delete(e))}qs().requestIdleCallback;qs().cancelIdleCallback;const ls=e=>!!e.type.__asyncLoader,hi=e=>e.type.__isKeepAlive;function ql(e,t){mi(e,"a",t)}function Jl(e,t){mi(e,"da",t)}function mi(e,t,s=Ae){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Xs(t,n,s),s){let o=s.parent;for(;o&&o.parent;)hi(o.parent.vnode)&&Yl(n,t,s,o),o=o.parent}}function Yl(e,t,s,n){const o=Xs(t,e,n,!0);Kn(()=>{On(n[t],o)},s)}function Xs(e,t,s=Ae,n=!1){if(s){const o=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...l)=>{nt();const r=vs(s),c=We(t,s,e,l);return r(),ot(),c});return n?o.unshift(i):o.push(i),i}}const ht=e=>(t,s=Ae)=>{(!ps||e==="sp")&&Xs(e,(...n)=>t(...n),s)},Xl=ht("bm"),gi=ht("m"),Zl=ht("bu"),Ql=ht("u"),er=ht("bum"),Kn=ht("um"),tr=ht("sp"),sr=ht("rtg"),nr=ht("rtc");function or(e,t=Ae){Xs("ec",e,t)}const ir=Symbol.for("v-ndc");function xe(e,t,s,n){let o;const i=s,l=N(e);if(l||ce(e)){const r=l&&Pt(e);let c=!1,g=!1;r&&(c=!Ve(e),g=pt(e),e=Js(e)),o=new Array(e.length);for(let h=0,y=e.length;ht(r,c,void 0,i));else{const r=Object.keys(e);o=new Array(r.length);for(let c=0,g=r.length;ce?Di(e)?en(e):wn(e.parent):null,rs=Se(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=>wn(e.parent),$root:e=>wn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>bi(e),$forceUpdate:e=>e.f||(e.f=()=>{Hn(e.update)}),$nextTick:e=>e.n||(e.n=li.bind(e.proxy)),$watch:e=>zl.bind(e)}),dn=(e,t)=>e!==ne&&!e.__isScriptSetup&&Q(e,t),lr={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:i,accessCache:l,type:r,appContext:c}=e;if(t[0]!=="$"){const R=l[t];if(R!==void 0)switch(R){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return i[t]}else{if(dn(n,t))return l[t]=1,n[t];if(o!==ne&&Q(o,t))return l[t]=2,o[t];if(Q(i,t))return l[t]=3,i[t];if(s!==ne&&Q(s,t))return l[t]=4,s[t];Cn&&(l[t]=0)}}const g=rs[t];let h,y;if(g)return t==="$attrs"&&we(e.attrs,"get",""),g(e);if((h=r.__cssModules)&&(h=h[t]))return h;if(s!==ne&&Q(s,t))return l[t]=4,s[t];if(y=c.config.globalProperties,Q(y,t))return y[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:i}=e;return dn(o,t)?(o[t]=s,!0):n!==ne&&Q(n,t)?(n[t]=s,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:i,type:l}},r){let c;return!!(s[r]||e!==ne&&r[0]!=="$"&&Q(e,r)||dn(t,r)||Q(i,r)||Q(n,r)||Q(rs,r)||Q(o.config.globalProperties,r)||(c=l.__cssModules)&&c[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Q(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function ro(e){return N(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Cn=!0;function rr(e){const t=bi(e),s=e.proxy,n=e.ctx;Cn=!1,t.beforeCreate&&ao(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:l,watch:r,provide:c,inject:g,created:h,beforeMount:y,mounted:R,beforeUpdate:M,updated:q,activated:U,deactivated:W,beforeDestroy:Y,beforeUnmount:V,destroyed:X,unmounted:j,render:z,renderTracked:Ie,renderTriggered:De,errorCaptured:Ge,serverPrefetch:Le,expose:Oe,inheritAttrs:de,components:qe,directives:ke,filters:be}=t;if(g&&ar(g,n,null),l)for(const oe in l){const J=l[oe];B(J)&&(n[oe]=J.bind(s))}if(o){const oe=o.call(s,s);te(oe)&&(e.data=Nn(oe))}if(Cn=!0,i)for(const oe in i){const J=i[oe],Je=B(J)?J.bind(s,s):B(J.get)?J.get.bind(s,s):tt,At=!B(J)&&B(J.set)?J.set.bind(s):tt,ye=Tn({get:Je,set:At});Object.defineProperty(n,oe,{enumerable:!0,configurable:!0,get:()=>ye.value,set:ge=>ye.value=ge})}if(r)for(const oe in r)vi(r[oe],n,s,oe);if(c){const oe=B(c)?c.call(s):c;Reflect.ownKeys(oe).forEach(J=>{Hl(J,oe[J])})}h&&ao(h,e,"c");function me(oe,J){N(J)?J.forEach(Je=>oe(Je.bind(s))):J&&oe(J.bind(s))}if(me(Xl,y),me(gi,R),me(Zl,M),me(Ql,q),me(ql,U),me(Jl,W),me(or,Ge),me(nr,Ie),me(sr,De),me(er,V),me(Kn,j),me(tr,Le),N(Oe))if(Oe.length){const oe=e.exposed||(e.exposed={});Oe.forEach(J=>{Object.defineProperty(oe,J,{get:()=>s[J],set:Je=>s[J]=Je,enumerable:!0})})}else e.exposed||(e.exposed={});z&&e.render===tt&&(e.render=z),de!=null&&(e.inheritAttrs=de),qe&&(e.components=qe),ke&&(e.directives=ke),Le&&pi(e)}function ar(e,t,s=tt){N(e)&&(e=Sn(e));for(const n in e){const o=e[n];let i;te(o)?"default"in o?i=Ms(o.from||n,o.default,!0):i=Ms(o.from||n):i=Ms(o),Ce(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function ao(e,t,s){We(N(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function vi(e,t,s,n){let o=n.includes(".")?di(s,n):()=>s[n];if(ce(e)){const i=t[e];B(i)&&un(o,i)}else if(B(e))un(o,e.bind(s));else if(te(e))if(N(e))e.forEach(i=>vi(i,t,s,n));else{const i=B(e.handler)?e.handler.bind(s):t[e.handler];B(i)&&un(o,i,e)}}function bi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let c;return r?c=r:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(g=>Fs(c,g,l,!0)),Fs(c,t,l)),te(t)&&i.set(t,c),c}function Fs(e,t,s,n=!1){const{mixins:o,extends:i}=t;i&&Fs(e,i,s,!0),o&&o.forEach(l=>Fs(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const r=cr[l]||s&&s[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const cr={data:co,props:uo,emits:uo,methods:es,computed:es,beforeCreate:Te,created:Te,beforeMount:Te,mounted:Te,beforeUpdate:Te,updated:Te,beforeDestroy:Te,beforeUnmount:Te,destroyed:Te,unmounted:Te,activated:Te,deactivated:Te,errorCaptured:Te,serverPrefetch:Te,components:es,directives:es,watch:fr,provide:co,inject:ur};function co(e,t){return t?e?function(){return Se(B(e)?e.call(this,this):e,B(t)?t.call(this,this):t)}:t:e}function ur(e,t){return es(Sn(e),Sn(t))}function Sn(e){if(N(e)){const t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Be(t)}Modifiers`]||e[`${xt(t)}Modifiers`];function mr(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ne;let o=s;const i=t.startsWith("update:"),l=i&&hr(n,t.slice(7));l&&(l.trim&&(o=s.map(h=>ce(h)?h.trim():h)),l.number&&(o=s.map(Gs)));let r,c=n[r=on(t)]||n[r=on(Be(t))];!c&&i&&(c=n[r=on(xt(t))]),c&&We(c,e,6,o);const g=n[r+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,We(g,e,6,o)}}const gr=new WeakMap;function xi(e,t,s=!1){const n=s?gr:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const i=e.emits;let l={},r=!1;if(!B(e)){const c=g=>{const h=xi(g,t,!0);h&&(r=!0,Se(l,h))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!r?(te(e)&&n.set(e,null),null):(N(i)?i.forEach(c=>l[c]=null):Se(l,i),te(e)&&n.set(e,l),l)}function Zs(e,t){return!e||!Ks(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,xt(t))||Q(e,t))}function fo(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[i],slots:l,attrs:r,emit:c,render:g,renderCache:h,props:y,data:R,setupState:M,ctx:q,inheritAttrs:U}=e,W=Ls(e);let Y,V;try{if(s.shapeFlag&4){const j=o||n,z=j;Y=Qe(g.call(z,j,h,y,M,R,q)),V=r}else{const j=t;Y=Qe(j.length>1?j(y,{attrs:r,slots:l,emit:c}):j(y,null)),V=t.props?r:vr(r)}}catch(j){as.length=0,Ys(j,e,1),Y=je(bt)}let X=Y;if(V&&U!==!1){const j=Object.keys(V),{shapeFlag:z}=X;j.length&&z&7&&(i&&j.some(zs)&&(V=br(V,i)),X=Kt(X,V,!1,!0))}return s.dirs&&(X=Kt(X,null,!1,!0),X.dirs=X.dirs?X.dirs.concat(s.dirs):s.dirs),s.transition&&Bn(X,s.transition),Y=X,Ls(W),Y}const vr=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ks(s))&&((t||(t={}))[s]=e[s]);return t},br=(e,t)=>{const s={};for(const n in e)(!zs(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function yr(e,t,s){const{props:n,children:o,component:i}=e,{props:l,children:r,patchFlag:c}=t,g=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?po(n,l,g):!!l;if(c&8){const h=t.dynamicProps;for(let y=0;yObject.create(wi),Si=e=>Object.getPrototypeOf(e)===wi;function _r(e,t,s,n=!1){const o={},i=Ci();e.propsDefaults=Object.create(null),ki(e,t,o,i);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:Al(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function wr(e,t,s,n){const{props:o,attrs:i,vnode:{patchFlag:l}}=e,r=Z(o),[c]=e.propsOptions;let g=!1;if((n||l>0)&&!(l&16)){if(l&8){const h=e.vnode.dynamicProps;for(let y=0;y{c=!0;const[R,M]=Ei(y,t,!0);Se(l,R),M&&r.push(...M)};!s&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!c)return te(e)&&n.set(e,Nt),Nt;if(N(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",Wn=e=>N(e)?e.map(Qe):[Qe(e)],Sr=(e,t,s)=>{if(t._n)return t;const n=Vl((...o)=>Wn(t(...o)),s);return n._c=!1,n},Ti=(e,t,s)=>{const n=e._ctx;for(const o in e){if(zn(o))continue;const i=e[o];if(B(i))t[o]=Sr(o,i,n);else if(i!=null){const l=Wn(i);t[o]=()=>l}}},Pi=(e,t)=>{const s=Wn(t);e.slots.default=()=>s},Ai=(e,t,s)=>{for(const n in t)(s||!zn(n))&&(e[n]=t[n])},kr=(e,t,s)=>{const n=e.slots=Ci();if(e.vnode.shapeFlag&32){const o=t._;o?(Ai(n,t,s),s&&Fo(n,"_",o,!0)):Ti(t,n)}else t&&Pi(e,t)},Er=(e,t,s)=>{const{vnode:n,slots:o}=e;let i=!0,l=ne;if(n.shapeFlag&32){const r=t._;r?s&&r===1?i=!1:Ai(o,t,s):(i=!t.$stable,Ti(t,o)),l=t}else t&&(Pi(e,t),l={default:1});if(i)for(const r in o)!zn(r)&&l[r]==null&&delete o[r]},Re=Rr;function Tr(e){return Pr(e)}function Pr(e,t){const s=qs();s.__VUE__=!0;const{insert:n,remove:o,patchProp:i,createElement:l,createText:r,createComment:c,setText:g,setElementText:h,parentNode:y,nextSibling:R,setScopeId:M=tt,insertStaticContent:q}=e,U=(a,p,v,w=null,_=null,x=null,P=void 0,k=null,S=!!p.dynamicChildren)=>{if(a===p)return;a&&!Yt(a,p)&&(w=Ot(a),ge(a,_,x,!0),a=null),p.patchFlag===-2&&(S=!1,p.dynamicChildren=null);const{type:b,ref:I,shapeFlag:A}=p;switch(b){case Qs:W(a,p,v,w);break;case bt:Y(a,p,v,w);break;case Us:a==null&&V(p,v,w,P);break;case se:qe(a,p,v,w,_,x,P,k,S);break;default:A&1?z(a,p,v,w,_,x,P,k,S):A&6?ke(a,p,v,w,_,x,P,k,S):(A&64||A&128)&&b.process(a,p,v,w,_,x,P,k,S,Ct)}I!=null&&_?is(I,a&&a.ref,x,p||a,!p):I==null&&a&&a.ref!=null&&is(a.ref,null,x,a,!0)},W=(a,p,v,w)=>{if(a==null)n(p.el=r(p.children),v,w);else{const _=p.el=a.el;p.children!==a.children&&g(_,p.children)}},Y=(a,p,v,w)=>{a==null?n(p.el=c(p.children||""),v,w):p.el=a.el},V=(a,p,v,w)=>{[a.el,a.anchor]=q(a.children,p,v,w,a.el,a.anchor)},X=({el:a,anchor:p},v,w)=>{let _;for(;a&&a!==p;)_=R(a),n(a,v,w),a=_;n(p,v,w)},j=({el:a,anchor:p})=>{let v;for(;a&&a!==p;)v=R(a),o(a),a=v;o(p)},z=(a,p,v,w,_,x,P,k,S)=>{if(p.type==="svg"?P="svg":p.type==="math"&&(P="mathml"),a==null)Ie(p,v,w,_,x,P,k,S);else{const b=a.el&&a.el._isVueCE?a.el:null;try{b&&b._beginPatch(),Le(a,p,_,x,P,k,S)}finally{b&&b._endPatch()}}},Ie=(a,p,v,w,_,x,P,k)=>{let S,b;const{props:I,shapeFlag:A,transition:$,dirs:L}=a;if(S=a.el=l(a.type,x,I&&I.is,I),A&8?h(S,a.children):A&16&&Ge(a.children,S,null,w,_,pn(a,x),P,k),L&&St(a,null,w,"created"),De(S,a,a.scopeId,P,w),I){for(const G in I)G!=="value"&&!ss(G)&&i(S,G,null,I[G],x,w);"value"in I&&i(S,"value",null,I.value,x),(b=I.onVnodeBeforeMount)&&Ye(b,w,a)}L&&St(a,null,w,"beforeMount");const K=Ar(_,$);K&&$.beforeEnter(S),n(S,p,v),((b=I&&I.onVnodeMounted)||K||L)&&Re(()=>{try{b&&Ye(b,w,a),K&&$.enter(S),L&&St(a,null,w,"mounted")}finally{}},_)},De=(a,p,v,w,_)=>{if(v&&M(a,v),w)for(let x=0;x{for(let b=S;b{const k=p.el=a.el;let{patchFlag:S,dynamicChildren:b,dirs:I}=p;S|=a.patchFlag&16;const A=a.props||ne,$=p.props||ne;let L;if(v&&kt(v,!1),(L=$.onVnodeBeforeUpdate)&&Ye(L,v,p,a),I&&St(p,a,v,"beforeUpdate"),v&&kt(v,!0),b&&(!a.dynamicChildren||a.dynamicChildren.length!==b.length)&&(S=0,P=!1,b=null),(A.innerHTML&&$.innerHTML==null||A.textContent&&$.textContent==null)&&h(k,""),b?Oe(a.dynamicChildren,b,k,v,w,pn(p,_),x):P||J(a,p,k,null,v,w,pn(p,_),x,!1),S>0){if(S&16)de(k,A,$,v,_);else if(S&2&&A.class!==$.class&&i(k,"class",null,$.class,_),S&4&&i(k,"style",A.style,$.style,_),S&8){const K=p.dynamicProps;for(let G=0;G{L&&Ye(L,v,p,a),I&&St(p,a,v,"updated")},w)},Oe=(a,p,v,w,_,x,P)=>{for(let k=0;k{if(p!==v){if(p!==ne)for(const x in p)!ss(x)&&!(x in v)&&i(a,x,p[x],null,_,w);for(const x in v){if(ss(x))continue;const P=v[x],k=p[x];P!==k&&x!=="value"&&i(a,x,k,P,_,w)}"value"in v&&i(a,"value",p.value,v.value,_)}},qe=(a,p,v,w,_,x,P,k,S)=>{const b=p.el=a?a.el:r(""),I=p.anchor=a?a.anchor:r("");let{patchFlag:A,dynamicChildren:$,slotScopeIds:L}=p;L&&(k=k?k.concat(L):L),a==null?(n(b,v,w),n(I,v,w),Ge(p.children||[],v,I,_,x,P,k,S)):A>0&&A&64&&$&&a.dynamicChildren&&a.dynamicChildren.length===$.length?(Oe(a.dynamicChildren,$,v,_,x,P,k),(p.key!=null||_&&p===_.subTree)&&Oi(a,p,!0)):J(a,p,v,I,_,x,P,k,S)},ke=(a,p,v,w,_,x,P,k,S)=>{p.slotScopeIds=k,a==null?p.shapeFlag&512?_.ctx.activate(p,v,w,P,S):be(p,v,w,_,x,P,S):Gt(a,p,S)},be=(a,p,v,w,_,x,P)=>{const k=a.component=Fr(a,w,_);if(hi(a)&&(k.ctx.renderer=Ct),Hr(k,!1,P),k.asyncDep){if(_&&_.registerDep(k,me,P),!a.el){const S=k.subTree=je(bt);Y(null,S,p,v),a.placeholder=S.el}}else me(k,a,p,v,_,x,P)},Gt=(a,p,v)=>{const w=p.component=a.component;if(yr(a,p,v))if(w.asyncDep&&!w.asyncResolved){oe(w,p,v);return}else w.next=p,w.update();else p.el=a.el,w.vnode=p},me=(a,p,v,w,_,x,P)=>{const k=()=>{if(a.isMounted){let{next:A,bu:$,u:L,parent:K,vnode:G}=a;{const ue=Ri(a);if(ue){A&&(A.el=G.el,oe(a,A,P)),ue.asyncDep.then(()=>{Re(()=>{a.isUnmounted||b()},_)});return}}let F=A,ee;kt(a,!1),A?(A.el=G.el,oe(a,A,P)):A=G,$&&Is($),(ee=A.props&&A.props.onVnodeBeforeUpdate)&&Ye(ee,K,A,G),kt(a,!0);const ae=fo(a),Ee=a.subTree;a.subTree=ae,U(Ee,ae,y(Ee.el),Ot(Ee),a,_,x),A.el=ae.el,F===null&&xr(a,ae.el),L&&Re(L,_),(ee=A.props&&A.props.onVnodeUpdated)&&Re(()=>Ye(ee,K,A,G),_)}else{let A;const{el:$,props:L}=p,{bm:K,m:G,parent:F,root:ee,type:ae}=a,Ee=ls(p);kt(a,!1),K&&Is(K),!Ee&&(A=L&&L.onVnodeBeforeMount)&&Ye(A,F,p),kt(a,!0);{ee.ce&&ee.ce._hasShadowRoot()&&ee.ce._injectChildStyle(ae,a.parent?a.parent.type:void 0);const ue=a.subTree=fo(a);U(null,ue,v,w,a,_,x),p.el=ue.el}if(G&&Re(G,_),!Ee&&(A=L&&L.onVnodeMounted)){const ue=p;Re(()=>Ye(A,F,ue),_)}(p.shapeFlag&256||F&&ls(F.vnode)&&F.vnode.shapeFlag&256)&&a.a&&Re(a.a,_),a.isMounted=!0,p=v=w=null}};a.scope.on();const S=a.effect=new Ko(k);a.scope.off();const b=a.update=S.run.bind(S),I=a.job=S.runIfDirty.bind(S);I.i=a,I.id=a.uid,S.scheduler=()=>Hn(I),kt(a,!0),b()},oe=(a,p,v)=>{p.component=a;const w=a.vnode.props;a.vnode=p,a.next=null,wr(a,p.props,w,v),Er(a,p.children,v),nt(),oo(a),ot()},J=(a,p,v,w,_,x,P,k,S=!1)=>{const b=a&&a.children,I=a?a.shapeFlag:0,A=p.children,{patchFlag:$,shapeFlag:L}=p;if($>0){if($&128){At(b,A,v,w,_,x,P,k,S);return}else if($&256){Je(b,A,v,w,_,x,P,k,S);return}}L&8?(I&16&&wt(b,_,x),A!==b&&h(v,A)):I&16?L&16?At(b,A,v,w,_,x,P,k,S):wt(b,_,x,!0):(I&8&&h(v,""),L&16&&Ge(A,v,w,_,x,P,k,S))},Je=(a,p,v,w,_,x,P,k,S)=>{a=a||Nt,p=p||Nt;const b=a.length,I=p.length,A=Math.min(b,I);let $;for($=0;$I?wt(a,_,x,!0,!1,A):Ge(p,v,w,_,x,P,k,S,A)},At=(a,p,v,w,_,x,P,k,S)=>{let b=0;const I=p.length;let A=a.length-1,$=I-1;for(;b<=A&&b<=$;){const L=a[b],K=p[b]=S?ct(p[b]):Qe(p[b]);if(Yt(L,K))U(L,K,v,null,_,x,P,k,S);else break;b++}for(;b<=A&&b<=$;){const L=a[A],K=p[$]=S?ct(p[$]):Qe(p[$]);if(Yt(L,K))U(L,K,v,null,_,x,P,k,S);else break;A--,$--}if(b>A){if(b<=$){const L=$+1,K=L$)for(;b<=A;)ge(a[b],_,x,!0),b++;else{const L=b,K=b,G=new Map;for(b=K;b<=$;b++){const ie=p[b]=S?ct(p[b]):Qe(p[b]);ie.key!=null&&G.set(ie.key,b)}let F,ee=0;const ae=$-K+1;let Ee=!1,ue=0;const pe=new Array(ae);for(b=0;b=ae){ge(ie,_,x,!0);continue}let he;if(ie.key!=null)he=G.get(ie.key);else for(F=K;F<=$;F++)if(pe[F-K]===0&&Yt(ie,p[F])){he=F;break}he===void 0?ge(ie,_,x,!0):(pe[he-K]=b+1,he>=ue?ue=he:Ee=!0,U(ie,p[he],v,null,_,x,P,k,S),ee++)}const it=Ee?Or(pe):Nt;for(F=it.length-1,b=ae-1;b>=0;b--){const ie=K+b,he=p[ie],ys=p[ie+1],xs=ie+1{const{el:x,type:P,transition:k,children:S,shapeFlag:b}=a;if(b&6){ye(a.component.subTree,p,v,w);return}if(b&128){a.suspense.move(p,v,w);return}if(b&64){P.move(a,p,v,Ct);return}if(P===se){n(x,p,v);for(let A=0;Ak.enter(x),_));else{const{leave:A,delayLeave:$,afterLeave:L}=k,K=()=>{a.ctx.isUnmounted?o(x):n(x,p,v)},G=()=>{const F=x._isLeaving||!!x[fn];x._isLeaving&&x[fn](!0),k.persisted&&!F?K():A(x,()=>{K(),L&&L()})};$?$(x,K,G):G()}else n(x,p,v)},ge=(a,p,v,w=!1,_=!1)=>{const{type:x,props:P,ref:k,children:S,dynamicChildren:b,shapeFlag:I,patchFlag:A,dirs:$,cacheIndex:L,memo:K}=a;if(A===-2&&(_=!1),k!=null&&(nt(),is(k,null,v,a,!0),ot()),L!=null&&(p.renderCache[L]=void 0),I&256){p.ctx.deactivate(a);return}const G=I&1&&$,F=!ls(a);let ee;if(F&&(ee=P&&P.onVnodeBeforeUnmount)&&Ye(ee,p,a),I&6)qt(a.component,v,w);else{if(I&128){a.suspense.unmount(v,w);return}G&&St(a,null,p,"beforeUnmount"),I&64?a.type.remove(a,p,v,Ct,w):b&&!b.hasOnce&&(x!==se||A>0&&A&64)?wt(b,p,v,!1,!0):(x===se&&A&384||!_&&I&16)&&wt(S,p,v),w&&_t(a)}const ae=K!=null&&L==null;(F&&(ee=P&&P.onVnodeUnmounted)||G||ae)&&Re(()=>{ee&&Ye(ee,p,a),G&&St(a,null,p,"unmounted"),ae&&(a.el=null)},v)},_t=a=>{const{type:p,el:v,anchor:w,transition:_}=a;if(p===se){tn(v,w);return}if(p===Us){j(a);return}const x=()=>{o(v),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(a.shapeFlag&1&&_&&!_.persisted){const{leave:P,delayLeave:k}=_,S=()=>P(v,x);k?k(a.el,x,S):S()}else x()},tn=(a,p)=>{let v;for(;a!==p;)v=R(a),o(a),a=v;o(p)},qt=(a,p,v)=>{const{bum:w,scope:_,job:x,subTree:P,um:k,m:S,a:b}=a;mo(S),mo(b),w&&Is(w),_.stop(),x&&(x.flags|=8,ge(P,a,p,v)),k&&Re(k,p),Re(()=>{a.isUnmounted=!0},p)},wt=(a,p,v,w=!1,_=!1,x=0)=>{for(let P=x;P{if(a.shapeFlag&6)return Ot(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const p=R(a.anchor||a.el),v=p&&p[Wl];return v?R(v):p};let Rt=!1;const bs=(a,p,v)=>{let w;a==null?p._vnode&&(ge(p._vnode,null,null,!0),w=p._vnode.component):U(p._vnode||null,a,p,null,null,null,v),p._vnode=a,Rt||(Rt=!0,oo(w),ai(),Rt=!1)},Ct={p:U,um:ge,m:ye,r:_t,mt:be,mc:Ge,pc:J,pbc:Oe,n:Ot,o:e};return{render:bs,hydrate:void 0,createApp:pr(bs)}}function pn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function kt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ar(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Oi(e,t,s=!1){const n=e.children,o=t.children;if(N(n)&&N(o))for(let i=0;i>1,e[s[r]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function Ri(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ri(t)}function mo(e){if(e)for(let t=0;te.__isSuspense;function Rr(e,t){t&&t.pendingBranch?N(e)?t.effects.push(...e):t.effects.push(e):Fl(e)}const se=Symbol.for("v-fgt"),Qs=Symbol.for("v-txt"),bt=Symbol.for("v-cmt"),Us=Symbol.for("v-stc"),as=[];let $e=null;function E(e=!1){as.push($e=e?null:[])}function Ir(){as.pop(),$e=as[as.length-1]||null}let ds=1;function go(e,t=!1){ds+=e,e<0&&$e&&t&&($e.hasOnce=!0)}function Ui(e){return e.dynamicChildren=ds>0?$e||Nt:null,Ir(),ds>0&&$e&&$e.push(e),e}function T(e,t,s,n,o,i){return Ui(d(e,t,s,n,o,i,!0))}function Mr(e,t,s,n,o){return Ui(je(e,t,s,n,o,!0))}function $i(e){return e?e.__v_isVNode===!0:!1}function Yt(e,t){return e.type===t.type&&e.key===t.key}const ji=({key:e})=>e??null,$s=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ce(e)||Ce(e)||B(e)?{i:Fe,r:e,k:t,f:!!s}:e:null);function d(e,t=null,s=null,n=0,o=null,i=e===se?0:1,l=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ji(t),ref:t&&$s(t),scopeId:ui,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Fe};return r?(Vs(c,s),i&128&&e.normalize(c)):s&&(c.shapeFlag|=ce(s)?8:16),ds>0&&!l&&$e&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&$e.push(c),c}const je=Ur;function Ur(e,t=null,s=null,n=0,o=null,i=!1){if((!e||e===ir)&&(e=bt),$i(e)){const r=Kt(e,t,!0);return s&&Vs(r,s),ds>0&&!i&&$e&&(r.shapeFlag&6?$e[$e.indexOf(e)]=r:$e.push(r)),r.patchFlag=-2,r}if(Wr(e)&&(e=e.__vccOpts),t){t=$r(t);let{class:r,style:c}=t;r&&!ce(r)&&(t.class=Ue(r)),te(c)&&(Vn(c)&&!N(c)&&(c=Se({},c)),t.style=In(c))}const l=ce(e)?1:Mi(e)?128:Gl(e)?64:te(e)?4:B(e)?2:0;return d(e,t,s,n,o,l,i,!0)}function $r(e){return e?Vn(e)||Si(e)?Se({},e):e:null}function Kt(e,t,s=!1,n=!1){const{props:o,ref:i,patchFlag:l,children:r,transition:c}=e,g=t?Dr(o||{},t):o,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&ji(g),ref:t&&t.ref?s&&i?N(i)?i.concat($s(t)):[i,$s(t)]:$s(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==se?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kt(e.ssContent),ssFallback:e.ssFallback&&Kt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&Bn(h,c.clone(h)),h}function Ne(e=" ",t=0){return je(Qs,null,e,t)}function jr(e,t){const s=je(Us,null,e);return s.staticCount=t,s}function H(e="",t=!1){return t?(E(),Mr(bt,null,e)):je(bt,null,e)}function Qe(e){return e==null||typeof e=="boolean"?je(bt):N(e)?je(se,null,e.slice()):$i(e)?ct(e):je(Qs,null,String(e))}function ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Kt(e)}function Vs(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(N(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),Vs(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!Si(t)?t._ctx=Fe:o===3&&Fe&&(Fe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(B(t)){if(n&65){Vs(e,{default:t});return}t={default:t,_ctx:Fe},s=32}else t=String(t),n&64?(s=16,t=[Ne(t)]):s=8;e.children=t,e.shapeFlag|=s}function Dr(...e){const t={};for(let s=0;sAe||Fe;let Hs,En;{const e=qs(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),i=>{o.length>1?o.forEach(l=>l(i)):o[0](i)}};Hs=t("__VUE_INSTANCE_SETTERS__",s=>Ae=s),En=t("__VUE_SSR_SETTERS__",s=>ps=s)}const vs=e=>{const t=Ae;return Hs(e),e.scope.on(),()=>{e.scope.off(),Hs(t)}},vo=()=>{Ae&&Ae.scope.off(),Hs(null)};function Di(e){return e.vnode.shapeFlag&4}let ps=!1;function Hr(e,t=!1,s=!1){t&&En(t);const{props:n,children:o}=e.vnode,i=Di(e);_r(e,n,i,t),kr(e,o,s||t);const l=i?Br(e,t):void 0;return t&&En(!1),l}function Br(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lr);const{setup:n}=s;if(n){nt();const o=e.setupContext=n.length>1?zr(e):null,i=vs(e),l=gs(n,e,0,[e.props,o]),r=jo(l);if(ot(),i(),(r||e.sp)&&!ls(e)&&pi(e),r){if(l.then(vo,vo),t)return l.then(c=>{bo(e,c)}).catch(c=>{Ys(c,e,0)});e.asyncDep=l}else bo(e,l)}else Li(e)}function bo(e,t,s){B(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:te(t)&&(e.setupState=oi(t)),Li(e)}function Li(e,t,s){const n=e.type;e.render||(e.render=n.render||tt);{const o=vs(e);nt();try{rr(e)}finally{ot(),o()}}}const Kr={get(e,t){return we(e,"get",""),e[t]}};function zr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Kr),slots:e.slots,emit:e.emit,expose:t}}function en(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(oi(Ol(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in rs)return rs[s](e)},has(t,s){return s in t||s in rs}})):e.proxy}function Wr(e){return B(e)&&"__vccOpts"in e}const Tn=(e,t)=>$l(e,t,ps),Gr="3.5.39";/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Pn;const yo=typeof window<"u"&&window.trustedTypes;if(yo)try{Pn=yo.createPolicy("vue",{createHTML:e=>e})}catch{}const Ni=Pn?e=>Pn.createHTML(e):e=>e,qr="http://www.w3.org/2000/svg",Jr="http://www.w3.org/1998/Math/MathML",at=typeof document<"u"?document:null,xo=at&&at.createElement("template"),Yr={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?at.createElementNS(qr,e):t==="mathml"?at.createElementNS(Jr,e):s?at.createElement(e,{is:s}):at.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>at.createTextNode(e),createComment:e=>at.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>at.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,i){const l=s?s.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===i||!(o=o.nextSibling)););else{xo.innerHTML=Ni(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const r=xo.content;if(n==="svg"||n==="mathml"){const c=r.firstChild;for(;c.firstChild;)r.appendChild(c.firstChild);r.removeChild(c)}t.insertBefore(r,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Xr=Symbol("_vtc");function Zr(e,t,s){const n=e[Xr];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Bs=Symbol("_vod"),Fi=Symbol("_vsh"),Xt={name:"show",beforeMount(e,{value:t},{transition:s}){e[Bs]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Zt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Zt(e,!0),n.enter(e)):n.leave(e,()=>{Zt(e,!1)}):Zt(e,t))},beforeUnmount(e,{value:t}){Zt(e,t)}};function Zt(e,t){e.style.display=t?e[Bs]:"none",e[Fi]=!t}const Qr=Symbol(""),ea=/(?:^|;)\s*display\s*:/;function ta(e,t,s){const n=e.style,o=ce(s);let i=!1;if(s&&!o){if(t)if(ce(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();s[r]==null&&ts(n,r,"")}else for(const l in t)s[l]==null&&ts(n,l,"");for(const l in s){l==="display"&&(i=!0);const r=s[l];r!=null?na(e,l,!ce(t)&&t?t[l]:void 0,r)||ts(n,l,r):ts(n,l,"")}}else if(o){if(t!==s){const l=n[Qr];l&&(s+=";"+l),n.cssText=s,i=ea.test(s)}}else t&&e.removeAttribute("style");Bs in e&&(e[Bs]=i?n.display:"",e[Fi]&&(n.display="none"))}const _o=/\s*!important$/;function ts(e,t,s){if(N(s))s.forEach(n=>ts(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=sa(e,t);_o.test(s)?e.setProperty(xt(n),s.replace(_o,""),"important"):e[n]=s}}const wo=["Webkit","Moz","ms"],hn={};function sa(e,t){const s=hn[t];if(s)return s;let n=Be(t);if(n!=="filter"&&n in e)return hn[t]=n;n=No(n);for(let o=0;omn||(ca.then(()=>mn=0),mn=Date.now());function fa(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const o=s.value;if(N(o)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const l=o.slice(),r=[n];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,da=(e,t,s,n,o,i)=>{const l=o==="svg";t==="class"?Zr(e,n,l):t==="style"?ta(e,s,n):Ks(t)?zs(t)||ia(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):pa(e,t,n,l))?(ko(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&So(e,t,n,l,i,t!=="value")):e._isVueCE&&(ha(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ce(n)))?ko(e,Be(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),So(e,t,n,l))};function pa(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&To(t)&&B(s));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 To(t)&&ce(s)?!1:t in e}function ha(e,t){const s=e._def.props;if(!s)return!1;const n=Be(t);return Array.isArray(s)?s.some(o=>Be(o)===n):Object.keys(s).some(o=>Be(o)===n)}const yt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return N(t)?s=>Is(t,s):t};function ma(e){e.target.composing=!0}function Po(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const He=Symbol("_assign");function Ao(e,t,s){return t&&(e=e.trim()),s&&(e=Gs(e)),e}const _e={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[He]=yt(o);const i=n||o.props&&o.props.type==="number";dt(e,t?"change":"input",l=>{l.target.composing||e[He](Ao(e.value,s,i))}),(s||i)&&dt(e,"change",()=>{e.value=Ao(e.value,s,i)}),t||(dt(e,"compositionstart",ma),dt(e,"compositionend",Po),dt(e,"change",Po))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:i}},l){if(e[He]=yt(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?Gs(e.value):e.value,c=t??"";if(r===c)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},Vi={deep:!0,created(e,t,s){e[He]=yt(s),dt(e,"change",()=>{const n=e._modelValue,o=zt(e),i=e.checked,l=e[He];if(N(n)){const r=Mn(n,o),c=r!==-1;if(i&&!c)l(n.concat(o));else if(!i&&c){const g=[...n];g.splice(r,1),l(g)}}else if(Wt(n)){const r=new Set(n);i?r.add(o):r.delete(o),l(r)}else l(Hi(e,i))})},mounted:Oo,beforeUpdate(e,t,s){e[He]=yt(s),Oo(e,t,s)}};function Oo(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(N(t))o=Mn(t,n.props.value)>-1;else if(Wt(t))o=t.has(n.props.value);else{if(t===s)return;o=vt(t,Hi(e,!0))}e.checked!==o&&(e.checked=o)}const ga={created(e,{value:t},s){e.checked=vt(t,s.props.value),e[He]=yt(s),dt(e,"change",()=>{e[He](zt(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[He]=yt(n),t!==s&&(e.checked=vt(t,n.props.value))}},Lt={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=Wt(t);dt(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?Gs(zt(l)):zt(l));e[He](e.multiple?o?new Set(i):i:i[0]),e._assigning=!0,li(()=>{e._assigning=!1})}),e[He]=yt(n)},mounted(e,{value:t}){Ro(e,t)},beforeUpdate(e,t,s){e[He]=yt(s)},updated(e,{value:t}){e._assigning||Ro(e,t)}};function Ro(e,t){const s=e.multiple,n=N(t);if(!(s&&!n&&!Wt(t))){for(let o=0,i=e.options.length;oString(g)===String(r)):l.selected=Mn(t,r)>-1}else l.selected=t.has(r);else if(vt(zt(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function zt(e){return"_value"in e?e._value:e.value}function Hi(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const va={created(e,t,s){Os(e,t,s,null,"created")},mounted(e,t,s){Os(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){Os(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){Os(e,t,s,n,"updated")}};function ba(e,t){switch(e){case"SELECT":return Lt;case"TEXTAREA":return _e;default:switch(t){case"checkbox":return Vi;case"radio":return ga;default:return _e}}}function Os(e,t,s,n,o){const l=ba(e.tagName,s.props&&s.props.type)[o];l&&l(e,t,s,n)}const ya=["ctrl","shift","alt","meta"],xa={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(s=>e[`${s}Key`]&&!t.includes(s))},_a=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...i)=>{for(let l=0;l{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const i=xt(o.key);if(t.some(l=>l===i||wa[l]===i))return e(o)}))},Ca=Se({patchProp:da},Yr);let Mo;function Sa(){return Mo||(Mo=Tr(Ca))}const ka=((...e)=>{const t=Sa().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Ta(n);if(!o)return;const i=t._component;!B(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,Ea(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function Ea(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ta(e){return ce(e)?document.querySelector(e):e}const Bi="pilotvault-theme";function Pa(){try{return localStorage.getItem(Bi)==="dark"?"dark":"light"}catch{return"light"}}const hs=D(Pa());function Ki(e){hs.value=e,document.documentElement.setAttribute("data-theme",e);try{localStorage.setItem(Bi,e)}catch{}}function Uo(){Ki(hs.value==="dark"?"light":"dark")}Ki(hs.value);const Aa={class:"overflow-hidden rounded-lg border border-subtle bg-card shadow-xs"},Oa={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Ra={class:"text-base font-semibold text-primary"},Ia={class:"pv-eyebrow"},Ma={class:"w-full text-left text-sm"},Ua={class:"border-t border-subtle px-5 py-2.5 font-mono text-xs whitespace-nowrap"},$a={class:"text-primary"},ja={class:"border-t border-subtle px-5 py-2.5 text-secondary"},gn={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brand-text",PATCH:"text-warning",DELETE:"text-danger"};return(s,n)=>(E(),T("div",Aa,[d("div",Oa,[d("div",Ra,O(e.title),1),d("span",Ia,O(e.auth),1)]),d("table",Ma,[n[0]||(n[0]=d("thead",null,[d("tr",{class:"pv-eyebrow"},[d("th",{class:"px-5 py-2.5 font-medium"},"Endpoint"),d("th",{class:"px-5 py-2.5 font-medium"},"Description")])],-1)),d("tbody",null,[(E(!0),T(se,null,xe(e.endpoints,o=>(E(),T("tr",{key:o.method+o.path,class:"transition-colors hover:bg-sunken"},[d("td",Ua,[d("span",{class:Ue(["font-semibold",t[o.method]])},O(o.method),3),d("span",$a,O(o.path),1)]),d("td",ja,O(o.desc),1)]))),128))])])]))}},Da={class:"mx-auto flex max-w-5xl flex-col gap-6 px-6 pt-12 pb-16"},La={class:"flex items-center gap-3"},Na={key:0,class:"pv-eyebrow hidden truncate sm:inline"},Fa=["title"],Va={key:0,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Ha={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Ba={key:0,class:"rounded-lg border border-subtle bg-card px-5 py-10 text-center shadow-sm"},Ka={key:1,class:"mx-auto w-full max-w-sm rounded-lg border border-subtle bg-card shadow-sm"},za={class:"flex flex-col gap-1"},Wa={class:"flex flex-col gap-1"},Ga={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},qa=["disabled"],Ja={class:"flex gap-1 self-start rounded-lg border border-subtle bg-card p-1 shadow-sm"},Ya=["onClick"],Xa={class:"flex flex-col gap-6"},Za={class:"rounded-lg border border-subtle bg-card shadow-sm"},Qa={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},ec={class:"pv-eyebrow"},tc={class:"min-w-0"},sc={class:"text-sm font-semibold text-primary"},nc={key:0,class:"truncate font-mono text-xs text-secondary"},oc={class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5"},ic={class:"font-mono text-xs text-secondary"},lc={class:"flex flex-col gap-6"},rc={class:"rounded-lg border border-subtle bg-card shadow-sm"},ac={class:"flex flex-col gap-3 px-5 py-5"},cc={class:"flex flex-col gap-3 sm:flex-row"},uc={class:"flex flex-1 flex-col gap-1"},fc={class:"flex flex-1 flex-col gap-1"},dc={class:"flex flex-col gap-3 sm:flex-row"},pc={class:"flex flex-1 flex-col gap-1"},hc=["value"],mc={class:"flex flex-1 flex-col gap-1"},gc=["value"],vc={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},bc={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},yc=["disabled"],xc={class:"rounded-lg border border-subtle bg-card shadow-sm"},_c={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},wc={class:"pv-eyebrow"},Cc={class:"flex flex-col"},Sc={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},kc={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},Ec={key:2,class:"px-5 py-6 text-sm text-secondary"},Tc={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},Pc={class:"min-w-0 flex-1"},Ac={class:"flex flex-wrap items-center gap-2"},Oc={class:"truncate text-sm font-semibold text-primary"},Rc={key:0,class:"rounded-sm bg-brand/10 px-1.5 py-0.5 font-mono text-[10px] font-medium text-brand-text"},Ic={key:1,class:"rounded-sm bg-warning-tint px-1.5 py-0.5 font-mono text-[10px] font-medium text-warning"},Mc={class:"mt-0.5 font-mono text-xs text-secondary"},Uc={class:"flex shrink-0 items-center gap-2"},$c=["onClick"],jc=["disabled","onClick"],Dc={key:0,class:"mt-3 flex flex-col gap-3 rounded-md border border-subtle bg-sunken px-4 py-4"},Lc={class:"flex flex-col gap-3 sm:flex-row"},Nc={class:"flex flex-1 flex-col gap-1"},Fc={class:"flex flex-1 flex-col gap-1"},Vc={class:"flex flex-col gap-3 sm:flex-row"},Hc={class:"flex flex-1 flex-col gap-1"},Bc=["disabled"],Kc=["value"],zc={key:0,class:"text-[11px] text-muted"},Wc={class:"flex flex-1 flex-col gap-1"},Gc=["value"],qc={class:"flex items-center gap-2"},Jc={class:"flex items-center gap-2"},Yc=["disabled","onClick"],Xc={class:"flex flex-col gap-6"},Zc={class:"rounded-lg border border-subtle bg-card shadow-sm"},Qc={class:"flex flex-col gap-3 px-5 py-5"},eu={class:"flex flex-col gap-2 sm:flex-row"},tu=["disabled"],su={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},nu={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},ou={class:"rounded-lg border border-subtle bg-card shadow-sm"},iu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},lu={class:"pv-eyebrow"},ru={class:"flex flex-col"},au={key:0,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},cu={key:1,class:"px-5 py-6 text-sm text-secondary"},uu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},fu={class:"min-w-0 flex-1"},du={class:"truncate text-sm font-semibold text-primary"},pu={class:"mt-0.5 font-mono text-xs text-secondary"},hu={class:"flex shrink-0 items-center gap-2"},mu=["onClick"],gu=["disabled","title","onClick"],vu={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4 sm:flex-row sm:items-end"},bu={class:"flex flex-1 flex-col gap-1"},yu=["onKeyup"],xu={class:"flex items-center gap-2"},_u=["disabled","onClick"],wu={class:"flex flex-col gap-6"},Cu={class:"rounded-lg border border-subtle bg-card shadow-sm"},Su={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},ku={class:"flex flex-col gap-3 px-5 py-5"},Eu={class:"flex flex-col gap-1"},Tu={class:"flex flex-col gap-1"},Pu={class:"flex flex-col gap-1"},Au=["placeholder"],Ou={key:0,class:"font-mono text-[11px] text-muted"},Ru={key:0},Iu={key:1},Mu={key:1,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Uu={key:2,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},$u={class:"flex flex-wrap items-center gap-2"},ju=["disabled"],Du=["disabled"],Lu={class:"flex flex-col gap-6"},Nu={class:"rounded-lg border border-subtle bg-card shadow-sm"},Fu={class:"flex flex-col"},Vu={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},Hu={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},Bu={key:2,class:"px-5 py-6 text-sm text-secondary"},Ku={key:3,class:"flex gap-1 overflow-x-auto overflow-y-hidden border-b border-subtle px-3 pt-1"},zu=["onClick"],Wu={key:4,class:"px-5 py-6 text-sm text-secondary"},Gu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},qu={class:"min-w-0 flex-1"},Ju={class:"flex flex-wrap items-center gap-2"},Yu={class:"text-sm font-semibold text-primary"},Xu=["title"],Zu={key:0},Qu={class:"mt-0.5 font-mono text-xs text-secondary"},ef={key:0,class:"mt-0.5 text-[11px] text-secondary"},tf={key:1,class:"mt-2 flex flex-col gap-1.5"},sf={class:"rounded-sm bg-sunken px-1.5 py-0.5 font-mono text-[10px] text-secondary"},nf={key:0,class:"font-mono text-[10px] text-muted"},of={key:1,class:"w-full text-[11px] text-secondary sm:w-auto"},lf={key:2,class:"mt-1 truncate font-mono text-[11px] text-muted"},rf={class:"flex shrink-0 items-center gap-2"},af=["disabled","onClick"],cf=["onClick"],uf=["disabled","onClick"],ff=["disabled","onClick"],df={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4"},pf={class:"pv-eyebrow"},hf={key:0,class:"text-danger"},mf=["onUpdate:modelValue"],gf=["value"],vf=["value","onChange"],bf=["label"],yf=["value"],xf=["onUpdate:modelValue"],_f=["onUpdate:modelValue","type","placeholder"],wf={key:3,class:"text-[11px] text-muted"},Cf={class:"flex items-center gap-2"},Sf=["disabled","onClick"],kf={class:"border-t border-subtle px-5 py-4"},Ef={class:"flex flex-col gap-2 sm:flex-row"},Tf=["disabled"],Pf={key:0,class:"mt-2 text-xs font-medium text-danger"},Rs="pv_panel_token",Af={__name:"App",setup(e){const t=D(localStorage.getItem(Rs)||""),s=D(null),n=D(!1),o=D(!0),i=D({email:"",password:""}),l=D(""),r=D(!1),c=D("overview"),g=[{id:"overview",label:"Overview"},{id:"users",label:"Users"},{id:"organizations",label:"Organizations"},{id:"pocketbase",label:"PocketBase"},{id:"plugins",label:"Plugins"}];async function h(m){try{const u=await fetch("/api/me",{headers:{Authorization:m}});if(!u.ok)return!1;const f=await u.json();return f.role!=="superadmin"?!1:(s.value={id:f.id,email:f.email,role:f.role},!0)}catch{return!1}}async function y(m){t.value=m,localStorage.setItem(Rs,m),n.value=!0,Zn(),Ie(),mt(),Ut(),he()}async function R(){l.value="";const m=i.value.email.trim().toLowerCase();if(!m||!i.value.password){l.value="Enter your email and password.";return}r.value=!0;try{const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:m,password:i.value.password})}),f=await u.json().catch(()=>({}));if(!u.ok||!f.token){l.value="Invalid email or password.";return}if(!await h(f.token)){l.value="Access to this panel is restricted to superadmins.";return}i.value.password="",await y(f.token)}catch{l.value="Cannot reach the API server."}finally{r.value=!1}}function M(){Qn(),localStorage.removeItem(Rs),t.value="",s.value=null,n.value=!1}const q=D(null),U=D({url:"",adminEmail:"",adminPassword:""}),W=D(null),Y=D(""),V=D(""),X=D(!1),j=D(!1);function z(m){const u={Authorization:t.value};return m&&(u["Content-Type"]="application/json"),u}async function Ie(){try{const m=await fetch("/api/admin/pb-config",{headers:z()});if(!m.ok)return;const u=await m.json();q.value=u,U.value={url:u.url||"",adminEmail:u.adminEmail||"",adminPassword:""},W.value=u.probe||null}catch{}}async function De(){Y.value="",V.value="",j.value=!0;try{const m=await fetch("/api/admin/pb-config/test",{method:"POST",headers:z(!0),body:JSON.stringify(U.value)});W.value=await m.json()}catch{V.value="Could not run the test."}finally{j.value=!1}}async function Ge(){var m;if(Y.value="",V.value="",!U.value.url.trim()){V.value="A PocketBase URL is required.";return}X.value=!0;try{const u=await fetch("/api/admin/pb-config",{method:"PUT",headers:z(!0),body:JSON.stringify(U.value)}),f=await u.json().catch(()=>({}));if(!u.ok){V.value=f.error||"Could not save the connection.";return}q.value=f.config,W.value=((m=f.config)==null?void 0:m.probe)||null,U.value={url:f.config.url,adminEmail:f.config.adminEmail,adminPassword:""},Y.value=f.warning||"Connection saved."}catch{V.value="Could not reach the API server."}finally{X.value=!1}}const Le=D([]),Oe=D(""),de=D(""),qe=D(""),ke=D({}),be=D(""),Gt=[{label:"World",options:[{value:"-90,-180,90,180",label:"World"}]},{label:"Continents",options:[{value:"34,-25,72,45",label:"Europe"},{value:"-35,-18,38,52",label:"Africa"},{value:"5,25,82,180",label:"Asia"},{value:"7,-168,72,-52",label:"North America"},{value:"-56,-82,13,-34",label:"South America"},{value:"-48,110,-10,180",label:"Oceania"}]},{label:"Countries",options:[{value:"49,14.1,54.9,24.2",label:"Poland"},{value:"50.5,3.2,53.7,7.3",label:"Netherlands"},{value:"47.2,5.8,55.1,15.1",label:"Germany"},{value:"41.3,-5.2,51.1,9.6",label:"France"},{value:"49.9,-8.7,59,1.8",label:"United Kingdom"},{value:"35.9,-9.6,43.8,3.4",label:"Spain"},{value:"36.6,6.6,47.1,18.6",label:"Italy"},{value:"24,-125,49.5,-66.5",label:"United States"}]}],me=Gt.flatMap(m=>m.options);function oe(m){const u=String(m||"").split(",").map(C=>C.trim());if(u.length!==4)return"";const f=u.map(Number);return f.some(C=>Number.isNaN(C))?"":f.join(",")}const J=D({});function Je(m){if(J.value[m])return"__custom__";const u=oe(ke.value[m]),f=u&&me.find(C=>oe(C.value)===u);return f?f.value:"__custom__"}function At(m,u){if(u==="__custom__"){J.value={...J.value,[m]:!0};return}J.value={...J.value,[m]:!1},ke.value[m]=u}const ye=D({name:"",baseURL:"",provider:""}),ge=D(""),_t=D(!1),tn=[{id:"apis-external",label:"APIs — External"},{id:"drives-external",label:"Drives — External"},{id:"drives-local",label:"Drives — Local"}],qt=D("apis-external");function wt(m){return m.category||"apis-external"}function Ot(m){return Le.value.filter(u=>wt(u)===m)}const Rt=Tn(()=>Ot(qt.value)),bs={builtin:"bg-success-tint text-success",external:"bg-warning-tint text-warning"},Ct={ok:"bg-success-tint text-success",degraded:"bg-warning-tint text-warning",down:"bg-danger-tint text-danger"};async function mt(){Oe.value="";try{const m=await fetch("/api/admin/plugins",{headers:z()});if(!m.ok){Oe.value="Could not load plugins.";return}const u=await m.json();Le.value=u.plugins||[];for(const f of Le.value)f.enabled&&!f.health&&a(f.name)}catch{Oe.value="Could not reach the API server."}}async function a(m){try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(m)}/health`,{method:"POST",headers:z()}),f=await u.json().catch(()=>({}));if(u.ok&&f.health){const C=p(m);C&&(C.health=f.health)}}catch{}}function p(m){return Le.value.find(u=>u.name===m)}async function v(m){be.value=m.name,de.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(m.name)}`,{method:"PUT",headers:z(!0),body:JSON.stringify({enabled:!m.enabled})}),f=await u.json().catch(()=>({}));u.ok?f.warning&&(de.value=`${m.name}: ${f.warning}`):de.value=f.error||"Could not update the plugin.",await mt()}finally{be.value=""}}function w(m){qe.value=qe.value===m.name?"":m.name;const u={...m.config||{}};for(const f of m.configFields||[])u[f.key]===void 0&&f.default&&(u[f.key]=f.default);ke.value=u,J.value={}}async function _(m){be.value=m.name,de.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(m.name)}`,{method:"PUT",headers:z(!0),body:JSON.stringify({config:ke.value})}),f=await u.json().catch(()=>({}));u.ok?(de.value=f.warning?`${m.name}: ${f.warning}`:"Configuration saved.",qe.value=""):de.value=f.error||"Could not save the configuration.",await mt()}finally{be.value=""}}async function x(m){be.value=m.name,de.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(m.name)}/health`,{method:"POST",headers:z()}),f=await u.json().catch(()=>({}));if(u.ok&&f.health){const C=p(m.name);C&&(C.health=f.health)}else de.value=f.error||"Health check failed."}finally{be.value=""}}async function P(m){if(m.kind==="external"){be.value=m.name;try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(m.name)}`,{method:"DELETE",headers:z()});if(!u.ok){const f=await u.json().catch(()=>({}));de.value=f.error||"Could not remove the plugin."}await mt()}finally{be.value=""}}}async function k(){if(ge.value="",!ye.value.name.trim()||!ye.value.baseURL.trim()){ge.value="Name and base URL are required.";return}_t.value=!0;try{const m=await fetch("/api/admin/plugins",{method:"POST",headers:z(!0),body:JSON.stringify(ye.value)}),u=await m.json().catch(()=>({}));if(!m.ok){ge.value=u.error||"Could not register the plugin.";return}ye.value={name:"",baseURL:"",provider:""},de.value="External plugin registered.",await mt()}catch{ge.value="Could not reach the API server."}finally{_t.value=!1}}const S=D([]),b=D([]),I=D(""),A=[{value:"user",label:"User"},{value:"admin",label:"Admin"},{value:"superadmin",label:"Superadmin"}],$={user:"User",admin:"Admin",superadmin:"Superadmin"},L={user:"bg-sunken text-secondary",admin:"bg-warning-tint text-warning",superadmin:"bg-success-tint text-success"},K=Tn(()=>{const m={};for(const u of S.value)u.organization&&(m[u.organization]=(m[u.organization]||0)+1);return m});function G(m,u){if(!m)return u;if(m.error)return m.error;if(m.data&&typeof m.data=="object"){const f=[];for(const C in m.data)m.data[C]&&m.data[C].message&&f.push(`${C}: ${m.data[C].message}`);if(f.length)return f.join("; ")}return m.message||u}const F=D({email:"",password:"",role:"user",organization:""}),ee=D(""),ae=D(""),Ee=D(!1),ue=D(""),pe=D({}),it=D(""),ie=D("");async function he(){I.value="";try{const m=await fetch("/api/users",{headers:z()}),u=await m.json().catch(()=>({}));if(!m.ok){I.value=G(u,"Could not load users.");return}S.value=u.users||[]}catch{I.value="Could not reach the API server."}}async function ys(){ee.value="",ae.value="";const m=F.value.email.trim().toLowerCase();if(!m||!m.includes("@")){ee.value="A valid email is required.";return}if(F.value.password.length<8){ee.value="Password must be at least 8 characters.";return}Ee.value=!0;try{const u=await fetch("/api/users",{method:"POST",headers:z(!0),body:JSON.stringify({email:m,password:F.value.password,role:F.value.role,organization:F.value.organization})}),f=await u.json().catch(()=>({}));if(!u.ok){ee.value=G(f,"Could not create the user.");return}F.value={email:"",password:"",role:"user",organization:""},ae.value=`Created ${f.user?f.user.email:"user"}.`,await he()}catch{ee.value="Could not reach the API server."}finally{Ee.value=!1}}function xs(m){ie.value="",ue.value=ue.value===m.id?"":m.id,pe.value={email:m.email,role:m.role,organization:m.organization||"",verified:!!m.verified,password:""}}async function zi(m){ie.value="",it.value=m.id;try{const u={},f=pe.value;if(f.email.trim().toLowerCase()!==m.email&&(u.email=f.email.trim().toLowerCase()),f.role!==m.role&&(u.role=f.role),(f.organization||"")!==(m.organization||"")&&(u.organization=f.organization||""),f.verified!==!!m.verified&&(u.verified=f.verified),f.password&&(u.password=f.password),Object.keys(u).length===0){ie.value="No changes to save.";return}const C=await fetch(`/api/users/${encodeURIComponent(m.id)}`,{method:"PATCH",headers:z(!0),body:JSON.stringify(u)}),fe=await C.json().catch(()=>({}));if(!C.ok){ie.value=G(fe,"Could not update the user.");return}ie.value=`Updated ${m.email}.`,ue.value="",await he()}catch{ie.value="Could not reach the API server."}finally{it.value=""}}async function Wi(m){if(m.id!==(s.value&&s.value.id)&&confirm(`Delete user ${m.email}? This cannot be undone.`)){ie.value="",it.value=m.id;try{const u=await fetch(`/api/users/${encodeURIComponent(m.id)}`,{method:"DELETE",headers:z()}),f=await u.json().catch(()=>({}));if(!u.ok){ie.value=G(f,"Could not delete the user.");return}ie.value=`Deleted ${m.email}.`,ue.value===m.id&&(ue.value=""),await he()}catch{ie.value="Could not reach the API server."}finally{it.value=""}}}const _s=D(""),It=D(""),ws=D(""),Cs=D(!1),lt=D(""),Ss=D(""),Mt=D(""),Me=D("");async function Ut(){try{const m=await fetch("/api/orgs",{headers:z()});if(!m.ok)return;const u=await m.json().catch(()=>({}));b.value=u.organizations||[]}catch{}}async function Gn(){It.value="",ws.value="";const m=_s.value.trim();if(!m){It.value="An organization name is required.";return}Cs.value=!0;try{const u=await fetch("/api/orgs",{method:"POST",headers:z(!0),body:JSON.stringify({name:m})}),f=await u.json().catch(()=>({}));if(!u.ok){It.value=G(f,"Could not create the organization.");return}_s.value="",ws.value=`Created ${f.organization?f.organization.name:"organization"}.`,await Ut()}catch{It.value="Could not reach the API server."}finally{Cs.value=!1}}function Gi(m){Me.value="",lt.value=lt.value===m.id?"":m.id,Ss.value=m.name}async function qn(m){Me.value="";const u=Ss.value.trim();if(!u){Me.value="An organization name is required.";return}if(u===m.name){lt.value="";return}Mt.value=m.id;try{const f=await fetch(`/api/orgs/${encodeURIComponent(m.id)}`,{method:"PATCH",headers:z(!0),body:JSON.stringify({name:u})}),C=await f.json().catch(()=>({}));if(!f.ok){Me.value=G(C,"Could not rename the organization.");return}Me.value=`Renamed to ${u}.`,lt.value="",await Ut(),await he()}catch{Me.value="Could not reach the API server."}finally{Mt.value=""}}async function qi(m){const u=K.value[m.id]||0;if(u>0){Me.value=`${m.name} still has ${u} member${u===1?"":"s"}; reassign or remove them first.`;return}if(confirm(`Delete organization ${m.name}?`)){Me.value="",Mt.value=m.id;try{const f=await fetch(`/api/orgs/${encodeURIComponent(m.id)}`,{method:"DELETE",headers:z()}),C=await f.json().catch(()=>({}));if(!f.ok){Me.value=G(C,"Could not delete the organization.");return}Me.value=`Deleted ${m.name}.`,lt.value===m.id&&(lt.value=""),await Ut()}catch{Me.value="Could not reach the API server."}finally{Mt.value=""}}}const sn=D(null),ks=D(null),$t=D({apiServer:{status:"checking",detail:""},pocketBase:{status:"checking",detail:""},webApp:{status:"checking",detail:""}});let Es=null;const Ji=[{key:"apiServer",label:"API server"},{key:"pocketBase",label:"PocketBase"},{key:"webApp",label:"Web App"}],Jn={checking:{label:"checking",cls:"bg-sunken text-secondary"},ok:{label:"operational",cls:"bg-success-tint text-success"},down:{label:"unreachable",cls:"bg-danger-tint text-danger"},unreachable:{label:"unreachable",cls:"bg-danger-tint text-danger"}};function Yn(m){const u=[];return m.httpStatus&&u.push("HTTP "+m.httpStatus),m.url&&u.push(m.url),typeof m.latencyMs=="number"&&u.push(m.latencyMs+"ms"),u.join(" · ")}async function Xn(){var m,u;try{const f=await fetch("/api/status");if(!f.ok)throw new Error("status "+f.status);const C=await f.json(),fe=C.apiServer||{};ks.value=fe.devices??0,$t.value={apiServer:{status:"ok",detail:""},pocketBase:{status:((m=C.pocketBase)==null?void 0:m.status)==="ok"?"ok":"down",detail:Yn(C.pocketBase||{})},webApp:{status:((u=C.webApp)==null?void 0:u.status)==="ok"?"ok":"down",detail:Yn(C.webApp||{})}}}catch{ks.value=null,$t.value={apiServer:{status:"unreachable",detail:""},pocketBase:{status:"unreachable",detail:""},webApp:{status:"unreachable",detail:""}}}sn.value=new Date}function Zn(){Xn(),clearInterval(Es),Es=setInterval(Xn,1e4)}function Qn(){clearInterval(Es),Es=null}gi(async()=>{t.value&&await h(t.value)?(n.value=!0,Zn(),Ie(),mt(),Ut(),he()):t.value&&(localStorage.removeItem(Rs),t.value=""),o.value=!1}),Kn(()=>Qn());const Yi=[{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a session (via PocketBase)"},{method:"GET",path:"/api/auth/validate",desc:"Validate the current session token"},{method:"GET",path:"/api/me",desc:"Caller's id, email, role, and organization from their token"},{method:"GET",path:"/api/preferences",desc:"Read the caller's saved settings blob"},{method:"PUT",path:"/api/preferences",desc:"Persist the caller's settings onto their user record"},{method:"GET",path:"/api/devices",desc:"List connected devices and last-known state"},{method:"GET",path:"/api/devices/{id}/track",desc:"GPS track history for a device"},{method:"POST",path:"/api/devices/{id}/command",desc:"Send a command down to a device"},{method:"DELETE",path:"/api/devices/{id}",desc:"Forget a device's stored state"},{method:"GET",path:"/ws/ui",desc:"Live telemetry stream (WebSocket)"}],Xi=[{method:"GET",path:"/api/users",desc:"List users (admin: own org · superadmin: all)"},{method:"POST",path:"/api/users",desc:"Create a user {email, password, role, organization?}"},{method:"PATCH",path:"/api/users/{id}",desc:"Edit a user (role/org changes are scope-checked)"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user (not self; admins in-org only)"},{method:"GET",path:"/api/orgs",desc:"List organizations (admin: own · superadmin: all)"},{method:"POST",path:"/api/orgs",desc:"Create an organization {name} (superadmin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an empty organization (superadmin)"},{method:"GET",path:"/api/admin/pb-config",desc:"Read the PocketBase connection + live probe (superadmin)"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Test a candidate connection without applying (superadmin)"},{method:"PUT",path:"/api/admin/pb-config",desc:"Update + persist the PocketBase connection (superadmin)"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins + state + last health (superadmin)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin {name, baseURL} (superadmin)"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure a plugin (superadmin)"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin (superadmin)"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a plugin health check (superadmin)"}],Zi=[{method:"GET",path:"/ws/device?id={id}",desc:"Device telemetry uplink (WebSocket)"},{method:"POST",path:"/api/telemetry?id={id}",desc:"Push a single telemetry event over HTTP"},{method:"GET",path:"/healthz",desc:"Readiness probe"}];return(m,u)=>(E(),T("div",Da,[d("div",La,[u[25]||(u[25]=jr('
PilotVault
API server
',3)),n.value&&s.value?(E(),T("span",Na,O(s.value.email),1)):H("",!0),n.value?(E(),T("button",{key:1,class:"pv-btn-sec pv-btn-sm",onClick:M},"Sign out")):H("",!0),d("button",{class:"pv-btn-sec pv-btn-sm",title:Qt(hs)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:u[0]||(u[0]=(...f)=>Qt(Uo)&&Qt(Uo)(...f))},[Qt(hs)==="dark"?(E(),T("svg",Va,[...u[22]||(u[22]=[d("circle",{cx:"12",cy:"12",r:"4"},null,-1),d("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(E(),T("svg",Ha,[...u[23]||(u[23]=[d("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])),u[24]||(u[24]=Ne(" Theme ",-1))],8,Fa)]),o.value?(E(),T("div",Ba,[...u[26]||(u[26]=[d("span",{class:"pv-eyebrow"},"Checking session…",-1)])])):n.value?(E(),T(se,{key:2},[d("div",Ja,[(E(),T(se,null,xe(g,f=>d("button",{key:f.id,class:Ue(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",c.value===f.id?"bg-brand text-on-brand":"text-secondary hover:text-primary"]),onClick:C=>c.value=f.id},O(f.label),11,Ya)),64))]),le(d("div",Xa,[d("div",Za,[d("div",Qa,[u[30]||(u[30]=d("div",{class:"text-base font-semibold text-primary"},"Status",-1)),d("span",ec,O(sn.value?"checked "+sn.value.toLocaleTimeString():"—"),1)]),d("div",null,[(E(),T(se,null,xe(Ji,f=>d("div",{key:f.key,class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5 first:border-t-0"},[d("div",tc,[d("div",sc,O(f.label),1),$t.value[f.key].detail?(E(),T("div",nc,O($t.value[f.key].detail),1)):H("",!0)]),d("span",{class:Ue(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",Jn[$t.value[f.key].status].cls])},[u[31]||(u[31]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ne(" "+O(Jn[$t.value[f.key].status].label),1)],2)])),64)),d("div",oc,[u[32]||(u[32]=d("div",{class:"text-sm font-semibold text-primary"},"Devices",-1)),d("span",ic,O(ks.value===null?"—":ks.value+" online"),1)])])]),je(gn,{title:"Client API",auth:"PocketBase session",endpoints:Yi}),je(gn,{title:"Management API",auth:"Admin · superadmin",endpoints:Xi}),je(gn,{title:"Device API",auth:"Device uplink",endpoints:Zi})],512),[[Xt,c.value==="overview"]]),le(d("div",lc,[d("div",rc,[u[38]||(u[38]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Add user"),d("span",{class:"pv-eyebrow"},"Create an account")],-1)),d("div",ac,[d("div",cc,[d("label",uc,[u[33]||(u[33]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[3]||(u[3]=f=>F.value.email=f),type:"email",class:"pv-input",placeholder:"pilot@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[_e,F.value.email]])]),d("label",fc,[u[34]||(u[34]=d("span",{class:"pv-eyebrow"},"Password",-1)),le(d("input",{"onUpdate:modelValue":u[4]||(u[4]=f=>F.value.password=f),type:"password",class:"pv-input",placeholder:"min. 8 characters",autocomplete:"new-password"},null,512),[[_e,F.value.password]])])]),d("div",dc,[d("label",pc,[u[35]||(u[35]=d("span",{class:"pv-eyebrow"},"Role",-1)),le(d("select",{"onUpdate:modelValue":u[5]||(u[5]=f=>F.value.role=f),class:"pv-input"},[(E(),T(se,null,xe(A,f=>d("option",{key:f.value,value:f.value},O(f.label),9,hc)),64))],512),[[Lt,F.value.role]])]),d("label",mc,[u[37]||(u[37]=d("span",{class:"pv-eyebrow"},"Organization",-1)),le(d("select",{"onUpdate:modelValue":u[6]||(u[6]=f=>F.value.organization=f),class:"pv-input"},[u[36]||(u[36]=d("option",{value:""},"— none —",-1)),(E(!0),T(se,null,xe(b.value,f=>(E(),T("option",{key:f.id,value:f.id},O(f.name),9,gc))),128))],512),[[Lt,F.value.organization]])])]),ee.value?(E(),T("p",vc,O(ee.value),1)):ae.value?(E(),T("p",bc,O(ae.value),1)):H("",!0),d("div",null,[d("button",{class:"pv-btn",disabled:Ee.value,onClick:ys},O(Ee.value?"Creating…":"Create user"),9,yc)])])]),d("div",xc,[d("div",_c,[d("div",null,[u[39]||(u[39]=d("div",{class:"text-base font-semibold text-primary"},"Users",-1)),d("span",wc,O(S.value.length)+" total",1)]),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:he},"Refresh")]),d("div",Cc,[I.value?(E(),T("p",Sc,O(I.value),1)):H("",!0),ie.value?(E(),T("p",kc,O(ie.value),1)):H("",!0),!S.value.length&&!I.value?(E(),T("p",Ec,"No users yet.")):H("",!0),(E(!0),T(se,null,xe(S.value,f=>(E(),T("div",{key:f.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",Tc,[d("div",Pc,[d("div",Ac,[d("span",Oc,O(f.email),1),d("span",{class:Ue(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",L[f.role]])},O($[f.role]||f.role),3),f.id===(s.value&&s.value.id)?(E(),T("span",Rc,"you")):H("",!0),f.verified?H("",!0):(E(),T("span",Ic,"unverified"))]),d("div",Mc,O(f.organizationName||(f.organization?f.organization:"no organization")),1)]),d("div",Uc,[d("button",{class:"pv-btn-sec pv-btn-sm",onClick:C=>xs(f)},O(ue.value===f.id?"Close":"Edit"),9,$c),f.id!==(s.value&&s.value.id)?(E(),T("button",{key:0,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:it.value===f.id,onClick:C=>Wi(f)}," Delete ",8,jc)):H("",!0)])]),ue.value===f.id?(E(),T("div",Dc,[d("div",Lc,[d("label",Nc,[u[40]||(u[40]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[7]||(u[7]=C=>pe.value.email=C),type:"email",class:"pv-input",autocomplete:"off",spellcheck:"false"},null,512),[[_e,pe.value.email]])]),d("label",Fc,[u[41]||(u[41]=d("span",{class:"pv-eyebrow"},"New password",-1)),le(d("input",{"onUpdate:modelValue":u[8]||(u[8]=C=>pe.value.password=C),type:"password",class:"pv-input",placeholder:"leave blank to keep current",autocomplete:"new-password"},null,512),[[_e,pe.value.password]])])]),d("div",Vc,[d("label",Hc,[u[42]||(u[42]=d("span",{class:"pv-eyebrow"},"Role",-1)),le(d("select",{"onUpdate:modelValue":u[9]||(u[9]=C=>pe.value.role=C),class:"pv-input",disabled:f.id===(s.value&&s.value.id)},[(E(),T(se,null,xe(A,C=>d("option",{key:C.value,value:C.value},O(C.label),9,Kc)),64))],8,Bc),[[Lt,pe.value.role]]),f.id===(s.value&&s.value.id)?(E(),T("span",zc,"You cannot change your own role.")):H("",!0)]),d("label",Wc,[u[44]||(u[44]=d("span",{class:"pv-eyebrow"},"Organization",-1)),le(d("select",{"onUpdate:modelValue":u[10]||(u[10]=C=>pe.value.organization=C),class:"pv-input"},[u[43]||(u[43]=d("option",{value:""},"— none —",-1)),(E(!0),T(se,null,xe(b.value,C=>(E(),T("option",{key:C.id,value:C.id},O(C.name),9,Gc))),128))],512),[[Lt,pe.value.organization]])])]),d("label",qc,[le(d("input",{"onUpdate:modelValue":u[11]||(u[11]=C=>pe.value.verified=C),type:"checkbox",class:"h-4 w-4"},null,512),[[Vi,pe.value.verified]]),u[45]||(u[45]=d("span",{class:"text-sm text-primary"},"Verified",-1))]),d("div",Jc,[d("button",{class:"pv-btn pv-btn-sm",disabled:it.value===f.id,onClick:C=>zi(f)},"Save changes",8,Yc),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[12]||(u[12]=C=>ue.value="")},"Cancel")])])):H("",!0)]))),128))])])],512),[[Xt,c.value==="users"]]),le(d("div",Xc,[d("div",Zc,[u[46]||(u[46]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Add organization"),d("span",{class:"pv-eyebrow"},"Create a tenant")],-1)),d("div",Qc,[d("div",eu,[le(d("input",{"onUpdate:modelValue":u[13]||(u[13]=f=>_s.value=f),class:"pv-input flex-1",placeholder:"Acme Aerial Ltd.",autocomplete:"off",spellcheck:"false",onKeyup:Io(Gn,["enter"])},null,544),[[_e,_s.value]]),d("button",{class:"pv-btn",disabled:Cs.value,onClick:Gn},O(Cs.value?"Creating…":"Create"),9,tu)]),It.value?(E(),T("p",su,O(It.value),1)):ws.value?(E(),T("p",nu,O(ws.value),1)):H("",!0)])]),d("div",ou,[d("div",iu,[d("div",null,[u[47]||(u[47]=d("div",{class:"text-base font-semibold text-primary"},"Organizations",-1)),d("span",lu,O(b.value.length)+" total",1)]),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:Ut},"Refresh")]),d("div",ru,[Me.value?(E(),T("p",au,O(Me.value),1)):H("",!0),b.value.length?H("",!0):(E(),T("p",cu,"No organizations yet.")),(E(!0),T(se,null,xe(b.value,f=>(E(),T("div",{key:f.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",uu,[d("div",fu,[d("div",du,O(f.name),1),d("div",pu,O(K.value[f.id]||0)+" member"+O((K.value[f.id]||0)===1?"":"s"),1)]),d("div",hu,[d("button",{class:"pv-btn-sec pv-btn-sm",onClick:C=>Gi(f)},O(lt.value===f.id?"Close":"Rename"),9,mu),d("button",{class:"pv-btn-sec pv-btn-sm !text-danger",disabled:Mt.value===f.id||(K.value[f.id]||0)>0,title:(K.value[f.id]||0)>0?"Reassign or remove members first":"Delete organization",onClick:C=>qi(f)}," Delete ",8,gu)])]),lt.value===f.id?(E(),T("div",vu,[d("label",bu,[u[48]||(u[48]=d("span",{class:"pv-eyebrow"},"Name",-1)),le(d("input",{"onUpdate:modelValue":u[14]||(u[14]=C=>Ss.value=C),class:"pv-input",autocomplete:"off",spellcheck:"false",onKeyup:Io(C=>qn(f),["enter"])},null,40,yu),[[_e,Ss.value]])]),d("div",xu,[d("button",{class:"pv-btn pv-btn-sm",disabled:Mt.value===f.id,onClick:C=>qn(f)},"Save",8,_u),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[15]||(u[15]=C=>lt.value="")},"Cancel")])])):H("",!0)]))),128))])])],512),[[Xt,c.value==="organizations"]]),le(d("div",wu,[d("div",Cu,[d("div",Su,[u[50]||(u[50]=d("div",null,[d("div",{class:"text-base font-semibold text-primary"},"PocketBase connection"),d("span",{class:"pv-eyebrow"},"Settings")],-1)),W.value?(E(),T("span",{key:0,class:Ue(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",W.value.reachable?W.value.superuser?"bg-success-tint text-success":"bg-warning-tint text-warning":"bg-danger-tint text-danger"])},[u[49]||(u[49]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ne(" "+O(W.value.reachable?W.value.superuser?"connected":"reachable":"unreachable"),1)],2)):H("",!0)]),d("div",ku,[d("label",Eu,[u[51]||(u[51]=d("span",{class:"pv-eyebrow"},"PocketBase URL",-1)),le(d("input",{"onUpdate:modelValue":u[16]||(u[16]=f=>U.value.url=f),class:"pv-input",placeholder:"http://10.2.1.10:8026",spellcheck:"false"},null,512),[[_e,U.value.url]])]),d("label",Tu,[u[52]||(u[52]=d("span",{class:"pv-eyebrow"},"Service account email",-1)),le(d("input",{"onUpdate:modelValue":u[17]||(u[17]=f=>U.value.adminEmail=f),class:"pv-input",placeholder:"admin@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[_e,U.value.adminEmail]])]),d("label",Pu,[u[53]||(u[53]=d("span",{class:"pv-eyebrow"},"Service account password",-1)),le(d("input",{"onUpdate:modelValue":u[18]||(u[18]=f=>U.value.adminPassword=f),type:"password",class:"pv-input",autocomplete:"new-password",placeholder:q.value&&q.value.adminConfigured?"leave blank to keep current":"set a password"},null,8,Au),[[_e,U.value.adminPassword]])]),W.value?(E(),T("div",Ou,[Ne(" health: "+O(W.value.reachable?"ok":"down"),1),W.value.latencyMs?(E(),T("span",Ru," · "+O(W.value.latencyMs)+"ms",1)):H("",!0),Ne(" · superuser auth: "+O(W.value.superuser?"ok":"—"),1),W.value.detail?(E(),T("span",Iu," · "+O(W.value.detail),1)):H("",!0)])):H("",!0),V.value?(E(),T("p",Mu,O(V.value),1)):Y.value?(E(),T("p",Uu,O(Y.value),1)):H("",!0),d("div",$u,[d("button",{class:"pv-btn",disabled:X.value,onClick:Ge},O(X.value?"Saving…":"Save connection"),9,ju),d("button",{class:"pv-btn-sec",disabled:j.value,onClick:De},O(j.value?"Testing…":"Test connection"),9,Du)]),u[54]||(u[54]=d("p",{class:"text-[11px] text-muted"}," The service account is used only for user & organization management. Changing the URL repoints the whole API Server at a new PocketBase and may sign you out. ",-1))])])],512),[[Xt,c.value==="pocketbase"]]),le(d("div",Lu,[d("div",Nu,[d("div",{class:"flex items-center justify-between border-b border-subtle px-5 py-4"},[u[55]||(u[55]=d("div",null,[d("div",{class:"text-base font-semibold text-primary"},"Plugins"),d("span",{class:"pv-eyebrow"},"External integrations")],-1)),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:mt},"Refresh")]),d("div",Fu,[Oe.value?(E(),T("p",Vu,O(Oe.value),1)):H("",!0),de.value?(E(),T("p",Hu,O(de.value),1)):H("",!0),!Le.value.length&&!Oe.value?(E(),T("p",Bu,"No plugins registered yet.")):H("",!0),Le.value.length?(E(),T("div",Ku,[(E(),T(se,null,xe(tn,f=>d("button",{key:f.id,class:Ue(["-mb-px whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",qt.value===f.id?"border-brand text-primary":"border-transparent text-secondary hover:text-primary"]),onClick:C=>qt.value=f.id},O(f.label),11,zu)),64))])):H("",!0),Le.value.length&&!Rt.value.length?(E(),T("p",Wu,"No plugins in this category.")):H("",!0),(E(!0),T(se,null,xe(Rt.value,f=>(E(),T("div",{key:f.name,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",Gu,[d("div",qu,[d("div",Ju,[d("span",Yu,O(f.name),1),d("span",{class:Ue(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",bs[f.kind]])},O(f.kind),3),f.health?(E(),T("span",{key:0,class:Ue(["inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium",Ct[f.health.status]]),title:f.health.detail||""},[u[56]||(u[56]=d("span",{class:"h-1 w-1 rounded-full bg-current"},null,-1)),Ne(O(f.health.status),1),f.health.latencyMs?(E(),T("span",Zu," · "+O(f.health.latencyMs)+"ms",1)):H("",!0)],10,Xu)):H("",!0)]),d("div",Qu,O(f.provider)+" · v"+O(f.version)+" · "+O(f.authType),1),f.health&&f.health.detail?(E(),T("div",ef,O(f.health.detail),1)):H("",!0),f.capabilities&&f.capabilities.length?(E(),T("div",tf,[u[57]||(u[57]=d("div",{class:"pv-eyebrow"},"Capabilities",-1)),(E(!0),T(se,null,xe(f.capabilities,C=>(E(),T("div",{key:C.id,class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},[d("span",sf,O(C.id),1),C.method||C.endpoint?(E(),T("span",nf,O(C.method)+" "+O(C.endpoint),1)):H("",!0),C.description?(E(),T("span",of,O(C.description),1)):H("",!0)]))),128))])):H("",!0),f.baseURL?(E(),T("div",lf,O(f.baseURL),1)):H("",!0)]),d("div",rf,[d("button",{class:Ue(["pv-btn-sec pv-btn-sm",f.enabled?"!border-transparent !bg-success-tint !text-success":""]),disabled:be.value===f.name,onClick:C=>v(f)},[d("span",{class:Ue(["h-1.5 w-1.5 rounded-full",f.enabled?"bg-success":"bg-muted"])},null,2),Ne(" "+O(f.enabled?"Enabled":"Disabled"),1)],10,af),f.configFields&&f.configFields.length?(E(),T("button",{key:0,class:"pv-btn-sec pv-btn-sm",onClick:C=>w(f)},"Configure",8,cf)):H("",!0),d("button",{class:"pv-btn-sec pv-btn-sm",disabled:be.value===f.name,onClick:C=>x(f)},"Check",8,uf),f.kind==="external"?(E(),T("button",{key:1,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:be.value===f.name,onClick:C=>P(f)},"Remove",8,ff)):H("",!0)])]),qe.value===f.name?(E(),T("div",df,[(E(!0),T(se,null,xe(f.configFields,C=>(E(),T("label",{key:C.key,class:"flex flex-col gap-1"},[d("span",pf,[Ne(O(C.label),1),C.required?(E(),T("span",hf," *")):H("",!0)]),C.type==="select"?le((E(),T("select",{key:0,"onUpdate:modelValue":fe=>ke.value[C.key]=fe,class:"pv-input"},[(E(!0),T(se,null,xe(C.options,fe=>(E(),T("option",{key:fe.value,value:fe.value},O(fe.label),9,gf))),128))],8,mf)),[[Lt,ke.value[C.key]]]):C.type==="bbox"?(E(),T(se,{key:1},[d("select",{value:Je(C.key),class:"pv-input",onChange:fe=>At(C.key,fe.target.value)},[(E(),T(se,null,xe(Gt,fe=>d("optgroup",{key:fe.label,label:fe.label},[(E(!0),T(se,null,xe(fe.options,nn=>(E(),T("option",{key:nn.value,value:nn.value},O(nn.label),9,yf))),128))],8,bf)),64)),u[58]||(u[58]=d("option",{value:"__custom__"},"Custom…",-1))],40,vf),Je(C.key)==="__custom__"?le((E(),T("input",{key:0,"onUpdate:modelValue":fe=>ke.value[C.key]=fe,type:"text",class:"pv-input font-mono",autocomplete:"off",placeholder:"50.5,3.2,53.7,7.3"},null,8,xf)),[[_e,ke.value[C.key]]]):H("",!0)],64)):le((E(),T("input",{key:2,"onUpdate:modelValue":fe=>ke.value[C.key]=fe,type:C.secret||C.type==="password"?"password":C.type==="number"?"number":"text",class:"pv-input",autocomplete:"off",placeholder:C.help||""},null,8,_f)),[[va,ke.value[C.key]]]),C.help?(E(),T("span",wf,O(C.help),1)):H("",!0)]))),128)),d("div",Cf,[d("button",{class:"pv-btn pv-btn-sm",disabled:be.value===f.name,onClick:C=>_(f)},"Save configuration",8,Sf),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[19]||(u[19]=C=>qe.value="")},"Cancel")])])):H("",!0)]))),128)),d("div",kf,[u[59]||(u[59]=d("div",{class:"pv-eyebrow mb-2"},"Register external plugin",-1)),d("div",Ef,[le(d("input",{"onUpdate:modelValue":u[20]||(u[20]=f=>ye.value.name=f),class:"pv-input sm:w-40",placeholder:"name",autocomplete:"off",spellcheck:"false"},null,512),[[_e,ye.value.name]]),le(d("input",{"onUpdate:modelValue":u[21]||(u[21]=f=>ye.value.baseURL=f),class:"pv-input flex-1",placeholder:"https://plugin.example.com",autocomplete:"off",spellcheck:"false"},null,512),[[_e,ye.value.baseURL]]),d("button",{class:"pv-btn",disabled:_t.value,onClick:k},O(_t.value?"Adding…":"Add"),9,Tf)]),ge.value?(E(),T("p",Pf,O(ge.value),1)):H("",!0),u[60]||(u[60]=d("p",{class:"mt-2 text-[11px] text-muted"},[Ne(" A remote service that answers "),d("span",{class:"font-mono"},"GET /health"),Ne(" and "),d("span",{class:"font-mono"},"GET /manifest"),Ne(" — added at runtime, no rebuild. ")],-1))])])])],512),[[Xt,c.value==="plugins"]])],64)):(E(),T("div",Ka,[u[29]||(u[29]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Sign in"),d("span",{class:"pv-eyebrow"},"Superadmin access only")],-1)),d("form",{class:"flex flex-col gap-3 px-5 py-5",onSubmit:_a(R,["prevent"])},[d("label",za,[u[27]||(u[27]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[1]||(u[1]=f=>i.value.email=f),type:"email",autocomplete:"username",class:"pv-input",placeholder:"superadmin@pilotvault.local"},null,512),[[_e,i.value.email]])]),d("label",Wa,[u[28]||(u[28]=d("span",{class:"pv-eyebrow"},"Password",-1)),le(d("input",{"onUpdate:modelValue":u[2]||(u[2]=f=>i.value.password=f),type:"password",autocomplete:"current-password",class:"pv-input",placeholder:"••••••••"},null,512),[[_e,i.value.password]])]),l.value?(E(),T("p",Ga,O(l.value),1)):H("",!0),d("button",{type:"submit",class:"pv-btn mt-1",disabled:r.value},O(r.value?"Signing in…":"Sign in"),9,qa)],32)])),u[61]||(u[61]=d("p",{class:"text-center font-mono text-[11px] text-muted"}," PilotVault — live drone telemetry, command & control. ",-1))]))}};ka(Af).mount("#app"); diff --git a/API Server/internal/api/dist/assets/index-BPK80y5V.js b/API Server/internal/api/dist/assets/index-BPK80y5V.js deleted file mode 100644 index cf828d9..0000000 --- a/API Server/internal/api/dist/assets/index-BPK80y5V.js +++ /dev/null @@ -1,17 +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"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}})();/** -* @vue/shared v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Cn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ne={},Lt=[],et=()=>{},Oo=()=>!1,Fs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ns=e=>e.startsWith("onUpdate:"),ve=Object.assign,Sn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Wi=Object.prototype.hasOwnProperty,Q=(e,t)=>Wi.call(e,t),F=Array.isArray,Ft=e=>ps(e)==="[object Map]",zt=e=>ps(e)==="[object Set]",Jn=e=>ps(e)==="[object Date]",H=e=>typeof e=="function",ce=e=>typeof e=="string",tt=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",Ro=e=>(se(e)||H(e))&&H(e.then)&&H(e.catch),Io=Object.prototype.toString,ps=e=>Io.call(e),Gi=e=>ps(e).slice(8,-1),Mo=e=>ps(e)==="[object Object]",kn=e=>ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,es=Cn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Vs=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},qi=/-\w/g,Be=Vs(e=>e.replace(qi,t=>t.slice(1).toUpperCase())),Ji=/\B([A-Z])/g,yt=Vs(e=>e.replace(Ji,"-$1").toLowerCase()),Uo=Vs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zs=Vs(e=>e?`on${Uo(e)}`:""),Qe=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Hs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Yn;const Bs=()=>Yn||(Yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function En(e){if(F(e)){const t={};for(let s=0;s{if(s){const n=s.split(Xi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Pe(e){let t="";if(ce(e))t=e;else if(F(e))for(let s=0;smt(s,t))}const Do=e=>!!(e&&e.__v_isRef===!0),O=e=>ce(e)?e:e==null?"":F(e)||se(e)&&(e.toString===Io||!H(e.toString))?Do(e)?O(e.value):JSON.stringify(e,Lo,2):String(e),Lo=(e,t)=>Do(t)?Lo(e,t.value):Ft(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],i)=>(s[Qs(n,i)+" =>"]=o,s),{})}:zt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Qs(s))}:tt(t)?Qs(t):se(t)&&!F(t)&&!Mo(t)?String(t):t,Qs=(e,t="")=>{var s;return tt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/** -* @vue/reactivity v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let pe;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&&pe&&(pe.active?(this.parent=pe,this.index=(pe.scopes||(pe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t0&&--this._on===0){if(pe===this)pe=this.prevScope;else{let t=pe;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 s,n;for(s=0,n=this.effects.length;s0)return;if(ss){let t=ss;for(ss=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ts;){let t=ts;for(ts=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Ho(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Bo(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),On(n),il(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function fn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ko(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ko(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===rs)||(e.globalVersion=rs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!fn(e))))return;e.flags|=2;const t=e.dep,s=oe,n=Ke;oe=e,Ke=!0;try{Ho(e);const o=e.fn(e._value);(t.version===0||Qe(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{oe=s,Ke=n,Bo(e),e.flags&=-3}}function On(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)On(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function il(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ke=!0;const zo=[];function st(){zo.push(Ke),Ke=!1}function nt(){const e=zo.pop();Ke=e===void 0?!0:e}function Xn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=oe;oe=void 0;try{t()}finally{oe=s}}}let rs=0;class ll{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rn{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(!oe||!Ke||oe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==oe)s=this.activeLink=new ll(oe,this),oe.deps?(s.prevDep=oe.depsTail,oe.depsTail.nextDep=s,oe.depsTail=s):oe.deps=oe.depsTail=s,Wo(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=oe.depsTail,s.nextDep=void 0,oe.depsTail.nextDep=s,oe.depsTail=s,oe.deps===s&&(oe.deps=n)}return s}trigger(t){this.version++,rs++,this.notify(t)}notify(t){Pn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{An()}}}function Wo(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Wo(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const dn=new WeakMap,At=Symbol(""),pn=Symbol(""),as=Symbol("");function ge(e,t,s){if(Ke&&oe){let n=dn.get(e);n||dn.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Rn),o.map=n,o.key=s),o.track()}}function ut(e,t,s,n,o,i){const l=dn.get(e);if(!l){rs++;return}const r=c=>{c&&c.trigger()};if(Pn(),t==="clear")l.forEach(r);else{const c=F(e),g=c&&kn(s);if(c&&s==="length"){const h=Number(n);l.forEach((y,I)=>{(I==="length"||I===as||!tt(I)&&I>=h)&&r(y)})}else switch((s!==void 0||l.has(void 0))&&r(l.get(s)),g&&r(l.get(as)),t){case"add":c?g&&r(l.get("length")):(r(l.get(At)),Ft(e)&&r(l.get(pn)));break;case"delete":c||(r(l.get(At)),Ft(e)&&r(l.get(pn)));break;case"set":Ft(e)&&r(l.get(At));break}}An()}function $t(e){const t=Z(e);return t===e?t:(ge(t,"iterate",as),De(e)?t:t.map(ze))}function Ks(e){return ge(e=Z(e),"iterate",as),e}function Xe(e,t){return pt(e)?Ht(Ot(e)?ze(t):t):ze(t)}const rl={__proto__:null,[Symbol.iterator](){return tn(this,Symbol.iterator,e=>Xe(this,e))},concat(...e){return $t(this).concat(...e.map(t=>F(t)?$t(t):t))},entries(){return tn(this,"entries",e=>(e[1]=Xe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Xe(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Xe(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Xe(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return sn(this,"includes",e)},indexOf(...e){return sn(this,"indexOf",e)},join(e){return $t(this).join(e)},lastIndexOf(...e){return sn(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Gt(this,"pop")},push(...e){return Gt(this,"push",e)},reduce(e,...t){return Zn(this,"reduce",e,t)},reduceRight(e,...t){return Zn(this,"reduceRight",e,t)},shift(){return Gt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Gt(this,"splice",e)},toReversed(){return $t(this).toReversed()},toSorted(e){return $t(this).toSorted(e)},toSpliced(...e){return $t(this).toSpliced(...e)},unshift(...e){return Gt(this,"unshift",e)},values(){return tn(this,"values",e=>Xe(this,e))}};function tn(e,t,s){const n=Ks(e),o=n[t]();return n!==e&&!De(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=s(i.value)),i}),o}const al=Array.prototype;function rt(e,t,s,n,o,i){const l=Ks(e),r=l!==e&&!De(e),c=l[t];if(c!==al[t]){const y=c.apply(e,i);return r?ze(y):y}let g=s;l!==e&&(r?g=function(y,I){return s.call(this,Xe(e,y),I,e)}:s.length>2&&(g=function(y,I){return s.call(this,y,I,e)}));const h=c.call(l,g,n);return r&&o?o(h):h}function Zn(e,t,s,n){const o=Ks(e),i=o!==e&&!De(e);let l=s,r=!1;o!==e&&(i?(r=n.length===0,l=function(g,h,y){return r&&(r=!1,g=Xe(e,g)),s.call(this,g,Xe(e,h),y,e)}):s.length>3&&(l=function(g,h,y){return s.call(this,g,h,y,e)}));const c=o[t](l,...n);return r?Xe(e,c):c}function sn(e,t,s){const n=Z(e);ge(n,"iterate",as);const o=n[t](...s);return(o===-1||o===!1)&&$n(s[0])?(s[0]=Z(s[0]),n[t](...s)):o}function Gt(e,t,s=[]){st(),Pn();const n=Z(e)[t].apply(e,s);return An(),nt(),n}const cl=Cn("__proto__,__v_isRef,__isVue"),Go=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tt));function ul(e){tt(e)||(e=String(e));const t=Z(this);return ge(t,"has",e),t.hasOwnProperty(e)}class qo{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(o?i?xl:Zo:i?Xo:Yo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=F(t);if(!o){let c;if(l&&(c=rl[s]))return c;if(s==="hasOwnProperty")return ul}const r=Reflect.get(t,s,me(t)?t:n);if((tt(s)?Go.has(s):cl(s))||(o||ge(t,"get",s),i))return r;if(me(r)){const c=l&&kn(s)?r:r.value;return o&&se(c)?gn(c):c}return se(r)?o?gn(r):Mn(r):r}}class Jo extends qo{constructor(t=!1){super(!1,t)}set(t,s,n,o){let i=t[s];const l=F(t)&&kn(s);if(!this._isShallow){const g=pt(i);if(!De(n)&&!pt(n)&&(i=Z(i),n=Z(n)),!l&&me(i)&&!me(n))return g||(i.value=n),!0}const r=l?Number(s)e,ws=e=>Reflect.getPrototypeOf(e);function gl(e,t,s){return function(...n){const o=this.__v_raw,i=Z(o),l=Ft(i),r=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,g=o[e](...n),h=s?hn:t?Ht:ze;return!t&&ge(i,"iterate",c?pn:At),ve(Object.create(g),{next(){const{value:y,done:I}=g.next();return I?{value:y,done:I}:{value:r?[h(y[0]),h(y[1])]:h(y),done:I}}})}}function Cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ml(e,t){const s={get(o){const i=this.__v_raw,l=Z(i),r=Z(o);e||(Qe(o,r)&&ge(l,"get",o),ge(l,"get",r));const{has:c}=ws(l),g=t?hn:e?Ht:ze;if(c.call(l,o))return g(i.get(o));if(c.call(l,r))return g(i.get(r));i!==l&&i.get(o)},get size(){const o=this.__v_raw;return!e&&ge(Z(o),"iterate",At),o.size},has(o){const i=this.__v_raw,l=Z(i),r=Z(o);return e||(Qe(o,r)&&ge(l,"has",o),ge(l,"has",r)),o===r?i.has(o):i.has(o)||i.has(r)},forEach(o,i){const l=this,r=l.__v_raw,c=Z(r),g=t?hn:e?Ht:ze;return!e&&ge(c,"iterate",At),r.forEach((h,y)=>o.call(i,g(h),g(y),l))}};return ve(s,e?{add:Cs("add"),set:Cs("set"),delete:Cs("delete"),clear:Cs("clear")}:{add(o){const i=Z(this),l=ws(i),r=Z(o),c=!t&&!De(o)&&!pt(o)?r:o;return l.has.call(i,c)||Qe(o,c)&&l.has.call(i,o)||Qe(r,c)&&l.has.call(i,r)||(i.add(c),ut(i,"add",c,c)),this},set(o,i){!t&&!De(i)&&!pt(i)&&(i=Z(i));const l=Z(this),{has:r,get:c}=ws(l);let g=r.call(l,o);g||(o=Z(o),g=r.call(l,o));const h=c.call(l,o);return l.set(o,i),g?Qe(i,h)&&ut(l,"set",o,i):ut(l,"add",o,i),this},delete(o){const i=Z(this),{has:l,get:r}=ws(i);let c=l.call(i,o);c||(o=Z(o),c=l.call(i,o)),r&&r.call(i,o);const g=i.delete(o);return c&&ut(i,"delete",o,void 0),g},clear(){const o=Z(this),i=o.size!==0,l=o.clear();return i&&ut(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=gl(o,e,t)}),s}function In(e,t){const s=ml(e,t);return(n,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(Q(s,o)&&o in n?s:n,o,i)}const vl={get:In(!1,!1)},bl={get:In(!1,!0)},yl={get:In(!0,!1)};const Yo=new WeakMap,Xo=new WeakMap,Zo=new WeakMap,xl=new WeakMap;function _l(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mn(e){return pt(e)?e:Un(e,!1,dl,vl,Yo)}function wl(e){return Un(e,!1,hl,bl,Xo)}function gn(e){return Un(e,!0,pl,yl,Zo)}function Un(e,t,s,n,o){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const l=_l(Gi(e));if(l===0)return e;const r=new Proxy(e,l===2?n:s);return o.set(e,r),r}function Ot(e){return pt(e)?Ot(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function De(e){return!!(e&&e.__v_isShallow)}function $n(e){return e?!!e.__v_raw:!1}function Z(e){const t=e&&e.__v_raw;return t?Z(t):e}function Cl(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&$o(e,"__v_skip",!0),e}const ze=e=>se(e)?Mn(e):e,Ht=e=>se(e)?gn(e):e;function me(e){return e?e.__v_isRef===!0:!1}function L(e){return Sl(e,!1)}function Sl(e,t){return me(e)?e:new kl(e,t)}class kl{constructor(t,s){this.dep=new Rn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Z(t),this._value=s?t:ze(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||De(t)||pt(t);t=n?t:Z(t),Qe(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function Xt(e){return me(e)?e.value:e}const El={get:(e,t,s)=>t==="__v_raw"?e:Xt(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return me(o)&&!me(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Qo(e){return Ot(e)?e:new Proxy(e,El)}class Tl{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Rn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=rs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&oe!==this)return Vo(this,!0),!0}get value(){const t=this.dep.track();return Ko(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Pl(e,t,s=!1){let n,o;return H(e)?n=e:(n=e.get,o=e.set),new Tl(n,o,s)}const Ss={},Rs=new WeakMap;let Pt;function Al(e,t=!1,s=Pt){if(s){let n=Rs.get(s);n||Rs.set(s,n=[]),n.push(e)}}function Ol(e,t,s=ne){const{immediate:n,deep:o,once:i,scheduler:l,augmentJob:r,call:c}=s,g=j=>o?j:De(j)||o===!1||o===0?ft(j,1):ft(j);let h,y,I,U,q=!1,$=!1;if(me(e)?(y=()=>e.value,q=De(e)):Ot(e)?(y=()=>g(e),q=!0):F(e)?($=!0,q=e.some(j=>Ot(j)||De(j)),y=()=>e.map(j=>{if(me(j))return j.value;if(Ot(j))return g(j);if(H(j))return c?c(j,2):j()})):H(e)?t?y=c?()=>c(e,2):e:y=()=>{if(I){st();try{I()}finally{nt()}}const j=Pt;Pt=h;try{return c?c(e,3,[U]):e(U)}finally{Pt=j}}:y=et,t&&o){const j=y,z=o===!0?1/0:o;y=()=>ft(j(),z)}const W=ol(),Y=()=>{h.stop(),W&&W.active&&Sn(W.effects,h)};if(i&&t){const j=t;t=(...z)=>{const ke=j(...z);return Y(),ke}}let V=$?new Array(e.length).fill(Ss):Ss;const X=j=>{if(!(!(h.flags&1)||!h.dirty&&!j))if(t){const z=h.run();if(j||o||q||($?z.some((ke,Re)=>Qe(ke,V[Re])):Qe(z,V))){I&&I();const ke=Pt;Pt=h;try{const Re=[z,V===Ss?void 0:$&&V[0]===Ss?[]:V,U];V=z,c?c(t,3,Re):t(...Re)}finally{Pt=ke}}}else h.run()};return r&&r(X),h=new Fo(y),h.scheduler=l?()=>l(X,!1):X,U=j=>Al(j,!1,h),I=h.onStop=()=>{const j=Rs.get(h);if(j){if(c)c(j,4);else for(const z of j)z();Rs.delete(h)}},t?n?X(!0):V=h.run():l?l(X.bind(null,!0),!0):h.run(),Y.pause=h.pause.bind(h),Y.resume=h.resume.bind(h),Y.stop=Y,Y}function ft(e,t=1/0,s){if(t<=0||!se(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,me(e))ft(e.value,t,s);else if(F(e))for(let n=0;n{ft(n,t,s)});else if(Mo(e)){for(const n in e)ft(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ft(e[n],t,s)}return e}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function hs(e,t,s,n){try{return n?e(...n):e()}catch(o){zs(o,t,s)}}function We(e,t,s,n){if(H(e)){const o=hs(e,t,s,n);return o&&Ro(o)&&o.catch(i=>{zs(i,t,s)}),o}if(F(e)){const o=[];for(let i=0;i>>1,o=xe[n],i=cs(o);i=cs(s)?xe.push(e):xe.splice(Il(t),0,e),e.flags|=1,si()}}function si(){Is||(Is=ei.then(oi))}function Ml(e){F(e)?Nt.push(...e):gt&&e.id===-1?gt.splice(jt+1,0,e):e.flags&1||(Nt.push(e),e.flags|=1),si()}function Qn(e,t,s=Ye+1){for(;scs(s)-cs(n));if(Nt.length=0,gt){gt.push(...t);return}for(gt=t,jt=0;jte.id==null?e.flags&2?-1:1/0:e.id;function oi(e){try{for(Ye=0;Ye{n._d&&uo(-1);const i=Ms(t);let l;try{l=e(...o)}finally{Ms(i),n._d&&uo(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(je===null)return e;const s=Js(je),n=e.dirs||(e.dirs=[]);for(let o=0;o1)return s&&H(t)?t.call(n&&n.proxy):t}}const jl=Symbol.for("v-scx"),Dl=()=>Ps(jl);function nn(e,t,s){return li(e,t,s)}function li(e,t,s=ne){const{immediate:n,deep:o,flush:i,once:l}=s,r=ve({},s),c=t&&n||!t&&i!=="post";let g;if(fs){if(i==="sync"){const U=Dl();g=U.__watcherHandles||(U.__watcherHandles=[])}else if(!c){const U=()=>{};return U.stop=et,U.resume=et,U.pause=et,U}}const h=_e;r.call=(U,q,$)=>We(U,h,q,$);let y=!1;i==="post"?r.scheduler=U=>{Se(U,h&&h.suspense)}:i!=="sync"&&(y=!0,r.scheduler=(U,q)=>{q?U():jn(U)}),r.augmentJob=U=>{t&&(U.flags|=4),y&&(U.flags|=2,h&&(U.id=h.uid,U.i=h))};const I=Ol(e,t,r);return fs&&(g?g.push(I):c&&I()),I}function Ll(e,t,s){const n=this.proxy,o=ce(e)?e.includes(".")?ri(n,e):()=>n[e]:e.bind(n,n);let i;H(t)?i=t:(i=t.handler,s=t);const l=gs(this),r=li(o,i.bind(n),s);return l(),r}function ri(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;oe.__isTeleport,on=Symbol("_leaveCb");function Dn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dn(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 ai(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function eo(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Us=new WeakMap;function ns(e,t,s,n,o=!1){if(F(e)){e.forEach(($,W)=>ns($,t&&(F(t)?t[W]:t),s,n,o));return}if(os(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&ns(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?Js(n.component):n.el,l=o?null:i,{i:r,r:c}=e,g=t&&t.r,h=r.refs===ne?r.refs={}:r.refs,y=r.setupState,I=Z(y),U=y===ne?Oo:$=>eo(h,$)?!1:Q(I,$),q=($,W)=>!(W&&eo(h,W));if(g!=null&&g!==c){if(to(t),ce(g))h[g]=null,U(g)&&(y[g]=null);else if(me(g)){const $=t;q(g,$.k)&&(g.value=null),$.k&&(h[$.k]=null)}}if(H(c)){st();try{hs(c,r,12,[l,h])}finally{nt()}}else{const $=ce(c),W=me(c);if($||W){const Y=()=>{if(e.f){const V=$?U(c)?y[c]:h[c]:q()||!e.k?c.value:h[e.k];if(o)F(V)&&Sn(V,i);else if(F(V))V.includes(i)||V.push(i);else if($)h[c]=[i],U(c)&&(y[c]=h[c]);else{const X=[i];q(c,e.k)&&(c.value=X),e.k&&(h[e.k]=X)}}else $?(h[c]=l,U(c)&&(y[c]=l)):W&&(q(c,e.k)&&(c.value=l),e.k&&(h[e.k]=l))};if(l){const V=()=>{Y(),Us.delete(e)};V.id=-1,Us.set(e,V),Se(V,s)}else to(e),Y()}}}function to(e){const t=Us.get(e);t&&(t.flags|=8,Us.delete(e))}Bs().requestIdleCallback;Bs().cancelIdleCallback;const os=e=>!!e.type.__asyncLoader,ci=e=>e.type.__isKeepAlive;function Vl(e,t){ui(e,"a",t)}function Hl(e,t){ui(e,"da",t)}function ui(e,t,s=_e){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ws(t,n,s),s){let o=s.parent;for(;o&&o.parent;)ci(o.parent.vnode)&&Bl(n,t,s,o),o=o.parent}}function Bl(e,t,s,n){const o=Ws(t,e,n,!0);Ln(()=>{Sn(n[t],o)},s)}function Ws(e,t,s=_e,n=!1){if(s){const o=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...l)=>{st();const r=gs(s),c=We(t,s,e,l);return r(),nt(),c});return n?o.unshift(i):o.push(i),i}}const ht=e=>(t,s=_e)=>{(!fs||e==="sp")&&Ws(e,(...n)=>t(...n),s)},Kl=ht("bm"),fi=ht("m"),zl=ht("bu"),Wl=ht("u"),Gl=ht("bum"),Ln=ht("um"),ql=ht("sp"),Jl=ht("rtg"),Yl=ht("rtc");function Xl(e,t=_e){Ws("ec",e,t)}const Zl=Symbol.for("v-ndc");function Ce(e,t,s,n){let o;const i=s,l=F(e);if(l||ce(e)){const r=l&&Ot(e);let c=!1,g=!1;r&&(c=!De(e),g=pt(e),e=Ks(e)),o=new Array(e.length);for(let h=0,y=e.length;ht(r,c,void 0,i));else{const r=Object.keys(e);o=new Array(r.length);for(let c=0,g=r.length;ce?Ii(e)?Js(e):mn(e.parent):null,is=ve(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=>mn(e.parent),$root:e=>mn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pi(e),$forceUpdate:e=>e.f||(e.f=()=>{jn(e.update)}),$nextTick:e=>e.n||(e.n=ti.bind(e.proxy)),$watch:e=>Ll.bind(e)}),ln=(e,t)=>e!==ne&&!e.__isScriptSetup&&Q(e,t),Ql={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:i,accessCache:l,type:r,appContext:c}=e;if(t[0]!=="$"){const I=l[t];if(I!==void 0)switch(I){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return i[t]}else{if(ln(n,t))return l[t]=1,n[t];if(o!==ne&&Q(o,t))return l[t]=2,o[t];if(Q(i,t))return l[t]=3,i[t];if(s!==ne&&Q(s,t))return l[t]=4,s[t];vn&&(l[t]=0)}}const g=is[t];let h,y;if(g)return t==="$attrs"&&ge(e.attrs,"get",""),g(e);if((h=r.__cssModules)&&(h=h[t]))return h;if(s!==ne&&Q(s,t))return l[t]=4,s[t];if(y=c.config.globalProperties,Q(y,t))return y[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:i}=e;return ln(o,t)?(o[t]=s,!0):n!==ne&&Q(n,t)?(n[t]=s,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:i,type:l}},r){let c;return!!(s[r]||e!==ne&&r[0]!=="$"&&Q(e,r)||ln(t,r)||Q(i,r)||Q(n,r)||Q(is,r)||Q(o.config.globalProperties,r)||(c=l.__cssModules)&&c[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Q(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function so(e){return F(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let vn=!0;function er(e){const t=pi(e),s=e.proxy,n=e.ctx;vn=!1,t.beforeCreate&&no(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:l,watch:r,provide:c,inject:g,created:h,beforeMount:y,mounted:I,beforeUpdate:U,updated:q,activated:$,deactivated:W,beforeDestroy:Y,beforeUnmount:V,destroyed:X,unmounted:j,render:z,renderTracked:ke,renderTriggered:Re,errorCaptured:Ge,serverPrefetch:Ie,expose:we,inheritAttrs:ue,components:qe,directives:Fe,filters:he}=t;if(g&&tr(g,n,null),l)for(const ee in l){const te=l[ee];H(te)&&(n[ee]=te.bind(s))}if(o){const ee=o.call(s,s);se(ee)&&(e.data=Mn(ee))}if(vn=!0,i)for(const ee in i){const te=i[ee],Ve=H(te)?te.bind(s,s):H(te.get)?te.get.bind(s,s):et,Rt=!H(te)&&H(te.set)?te.set.bind(s):et,ot=_n({get:Ve,set:Rt});Object.defineProperty(n,ee,{enumerable:!0,configurable:!0,get:()=>ot.value,set:Ee=>ot.value=Ee})}if(r)for(const ee in r)di(r[ee],n,s,ee);if(c){const ee=H(c)?c.call(s):c;Reflect.ownKeys(ee).forEach(te=>{$l(te,ee[te])})}h&&no(h,e,"c");function ae(ee,te){F(te)?te.forEach(Ve=>ee(Ve.bind(s))):te&&ee(te.bind(s))}if(ae(Kl,y),ae(fi,I),ae(zl,U),ae(Wl,q),ae(Vl,$),ae(Hl,W),ae(Xl,Ge),ae(Yl,ke),ae(Jl,Re),ae(Gl,V),ae(Ln,j),ae(ql,Ie),F(we))if(we.length){const ee=e.exposed||(e.exposed={});we.forEach(te=>{Object.defineProperty(ee,te,{get:()=>s[te],set:Ve=>s[te]=Ve,enumerable:!0})})}else e.exposed||(e.exposed={});z&&e.render===et&&(e.render=z),ue!=null&&(e.inheritAttrs=ue),qe&&(e.components=qe),Fe&&(e.directives=Fe),Ie&&ai(e)}function tr(e,t,s=et){F(e)&&(e=bn(e));for(const n in e){const o=e[n];let i;se(o)?"default"in o?i=Ps(o.from||n,o.default,!0):i=Ps(o.from||n):i=Ps(o),me(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function no(e,t,s){We(F(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function di(e,t,s,n){let o=n.includes(".")?ri(s,n):()=>s[n];if(ce(e)){const i=t[e];H(i)&&nn(o,i)}else if(H(e))nn(o,e.bind(s));else if(se(e))if(F(e))e.forEach(i=>di(i,t,s,n));else{const i=H(e.handler)?e.handler.bind(s):t[e.handler];H(i)&&nn(o,i,e)}}function pi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let c;return r?c=r:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(g=>$s(c,g,l,!0)),$s(c,t,l)),se(t)&&i.set(t,c),c}function $s(e,t,s,n=!1){const{mixins:o,extends:i}=t;i&&$s(e,i,s,!0),o&&o.forEach(l=>$s(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const r=sr[l]||s&&s[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const sr={data:oo,props:io,emits:io,methods:Zt,computed:Zt,beforeCreate:be,created:be,beforeMount:be,mounted:be,beforeUpdate:be,updated:be,beforeDestroy:be,beforeUnmount:be,destroyed:be,unmounted:be,activated:be,deactivated:be,errorCaptured:be,serverPrefetch:be,components:Zt,directives:Zt,watch:or,provide:oo,inject:nr};function oo(e,t){return t?e?function(){return ve(H(e)?e.call(this,this):e,H(t)?t.call(this,this):t)}:t:e}function nr(e,t){return Zt(bn(e),bn(t))}function bn(e){if(F(e)){const t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Be(t)}Modifiers`]||e[`${yt(t)}Modifiers`];function ar(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ne;let o=s;const i=t.startsWith("update:"),l=i&&rr(n,t.slice(7));l&&(l.trim&&(o=s.map(h=>ce(h)?h.trim():h)),l.number&&(o=s.map(Hs)));let r,c=n[r=Zs(t)]||n[r=Zs(Be(t))];!c&&i&&(c=n[r=Zs(yt(t))]),c&&We(c,e,6,o);const g=n[r+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,We(g,e,6,o)}}const cr=new WeakMap;function gi(e,t,s=!1){const n=s?cr:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const i=e.emits;let l={},r=!1;if(!H(e)){const c=g=>{const h=gi(g,t,!0);h&&(r=!0,ve(l,h))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!r?(se(e)&&n.set(e,null),null):(F(i)?i.forEach(c=>l[c]=null):ve(l,i),se(e)&&n.set(e,l),l)}function Gs(e,t){return!e||!Fs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,yt(t))||Q(e,t))}function lo(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[i],slots:l,attrs:r,emit:c,render:g,renderCache:h,props:y,data:I,setupState:U,ctx:q,inheritAttrs:$}=e,W=Ms(e);let Y,V;try{if(s.shapeFlag&4){const j=o||n,z=j;Y=Ze(g.call(z,j,h,y,U,I,q)),V=r}else{const j=t;Y=Ze(j.length>1?j(y,{attrs:r,slots:l,emit:c}):j(y,null)),V=t.props?r:ur(r)}}catch(j){ls.length=0,zs(j,e,1),Y=Oe(vt)}let X=Y;if(V&&$!==!1){const j=Object.keys(V),{shapeFlag:z}=X;j.length&&z&7&&(i&&j.some(Ns)&&(V=fr(V,i)),X=Bt(X,V,!1,!0))}return s.dirs&&(X=Bt(X,null,!1,!0),X.dirs=X.dirs?X.dirs.concat(s.dirs):s.dirs),s.transition&&Dn(X,s.transition),Y=X,Ms(W),Y}const ur=e=>{let t;for(const s in e)(s==="class"||s==="style"||Fs(s))&&((t||(t={}))[s]=e[s]);return t},fr=(e,t)=>{const s={};for(const n in e)(!Ns(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function dr(e,t,s){const{props:n,children:o,component:i}=e,{props:l,children:r,patchFlag:c}=t,g=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?ro(n,l,g):!!l;if(c&8){const h=t.dynamicProps;for(let y=0;yObject.create(vi),yi=e=>Object.getPrototypeOf(e)===vi;function hr(e,t,s,n=!1){const o={},i=bi();e.propsDefaults=Object.create(null),xi(e,t,o,i);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:wl(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function gr(e,t,s,n){const{props:o,attrs:i,vnode:{patchFlag:l}}=e,r=Z(o),[c]=e.propsOptions;let g=!1;if((n||l>0)&&!(l&16)){if(l&8){const h=e.vnode.dynamicProps;for(let y=0;y{c=!0;const[I,U]=_i(y,t,!0);ve(l,I),U&&r.push(...U)};!s&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!c)return se(e)&&n.set(e,Lt),Lt;if(F(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",Nn=e=>F(e)?e.map(Ze):[Ze(e)],vr=(e,t,s)=>{if(t._n)return t;const n=Ul((...o)=>Nn(t(...o)),s);return n._c=!1,n},wi=(e,t,s)=>{const n=e._ctx;for(const o in e){if(Fn(o))continue;const i=e[o];if(H(i))t[o]=vr(o,i,n);else if(i!=null){const l=Nn(i);t[o]=()=>l}}},Ci=(e,t)=>{const s=Nn(t);e.slots.default=()=>s},Si=(e,t,s)=>{for(const n in t)(s||!Fn(n))&&(e[n]=t[n])},br=(e,t,s)=>{const n=e.slots=bi();if(e.vnode.shapeFlag&32){const o=t._;o?(Si(n,t,s),s&&$o(n,"_",o,!0)):wi(t,n)}else t&&Ci(e,t)},yr=(e,t,s)=>{const{vnode:n,slots:o}=e;let i=!0,l=ne;if(n.shapeFlag&32){const r=t._;r?s&&r===1?i=!1:Si(o,t,s):(i=!t.$stable,wi(t,o)),l=t}else t&&(Ci(e,t),l={default:1});if(i)for(const r in o)!Fn(r)&&l[r]==null&&delete o[r]},Se=Sr;function xr(e){return _r(e)}function _r(e,t){const s=Bs();s.__VUE__=!0;const{insert:n,remove:o,patchProp:i,createElement:l,createText:r,createComment:c,setText:g,setElementText:h,parentNode:y,nextSibling:I,setScopeId:U=et,insertStaticContent:q}=e,$=(a,p,m,w=null,x=null,_=null,T=void 0,k=null,C=!!p.dynamicChildren)=>{if(a===p)return;a&&!qt(a,p)&&(w=_t(a),Ee(a,x,_,!0),a=null),p.patchFlag===-2&&(C=!1,p.dynamicChildren=null);const{type:b,ref:R,shapeFlag:E}=p;switch(b){case qs:W(a,p,m,w);break;case vt:Y(a,p,m,w);break;case As:a==null&&V(p,m,w,T);break;case re:qe(a,p,m,w,x,_,T,k,C);break;default:E&1?z(a,p,m,w,x,_,T,k,C):E&6?Fe(a,p,m,w,x,_,T,k,C):(E&64||E&128)&&b.process(a,p,m,w,x,_,T,k,C,wt)}R!=null&&x?ns(R,a&&a.ref,_,p||a,!p):R==null&&a&&a.ref!=null&&ns(a.ref,null,_,a,!0)},W=(a,p,m,w)=>{if(a==null)n(p.el=r(p.children),m,w);else{const x=p.el=a.el;p.children!==a.children&&g(x,p.children)}},Y=(a,p,m,w)=>{a==null?n(p.el=c(p.children||""),m,w):p.el=a.el},V=(a,p,m,w)=>{[a.el,a.anchor]=q(a.children,p,m,w,a.el,a.anchor)},X=({el:a,anchor:p},m,w)=>{let x;for(;a&&a!==p;)x=I(a),n(a,m,w),a=x;n(p,m,w)},j=({el:a,anchor:p})=>{let m;for(;a&&a!==p;)m=I(a),o(a),a=m;o(p)},z=(a,p,m,w,x,_,T,k,C)=>{if(p.type==="svg"?T="svg":p.type==="math"&&(T="mathml"),a==null)ke(p,m,w,x,_,T,k,C);else{const b=a.el&&a.el._isVueCE?a.el:null;try{b&&b._beginPatch(),Ie(a,p,x,_,T,k,C)}finally{b&&b._endPatch()}}},ke=(a,p,m,w,x,_,T,k)=>{let C,b;const{props:R,shapeFlag:E,transition:M,dirs:D}=a;if(C=a.el=l(a.type,_,R&&R.is,R),E&8?h(C,a.children):E&16&&Ge(a.children,C,null,w,x,rn(a,_),T,k),D&&Et(a,null,w,"created"),Re(C,a,a.scopeId,T,w),R){for(const B in R)B!=="value"&&!es(B)&&i(C,B,null,R[B],_,w);"value"in R&&i(C,"value",null,R.value,_),(b=R.onVnodeBeforeMount)&&Je(b,w,a)}D&&Et(a,null,w,"beforeMount");const N=wr(x,M);N&&M.beforeEnter(C),n(C,p,m),((b=R&&R.onVnodeMounted)||N||D)&&Se(()=>{try{b&&Je(b,w,a),N&&M.enter(C),D&&Et(a,null,w,"mounted")}finally{}},x)},Re=(a,p,m,w,x)=>{if(m&&U(a,m),w)for(let _=0;_{for(let b=C;b{const k=p.el=a.el;let{patchFlag:C,dynamicChildren:b,dirs:R}=p;C|=a.patchFlag&16;const E=a.props||ne,M=p.props||ne;let D;if(m&&Tt(m,!1),(D=M.onVnodeBeforeUpdate)&&Je(D,m,p,a),R&&Et(p,a,m,"beforeUpdate"),m&&Tt(m,!0),b&&(!a.dynamicChildren||a.dynamicChildren.length!==b.length)&&(C=0,T=!1,b=null),(E.innerHTML&&M.innerHTML==null||E.textContent&&M.textContent==null)&&h(k,""),b?we(a.dynamicChildren,b,k,m,w,rn(p,x),_):T||te(a,p,k,null,m,w,rn(p,x),_,!1),C>0){if(C&16)ue(k,E,M,m,x);else if(C&2&&E.class!==M.class&&i(k,"class",null,M.class,x),C&4&&i(k,"style",E.style,M.style,x),C&8){const N=p.dynamicProps;for(let B=0;B{D&&Je(D,m,p,a),R&&Et(p,a,m,"updated")},w)},we=(a,p,m,w,x,_,T)=>{for(let k=0;k{if(p!==m){if(p!==ne)for(const _ in p)!es(_)&&!(_ in m)&&i(a,_,p[_],null,x,w);for(const _ in m){if(es(_))continue;const T=m[_],k=p[_];T!==k&&_!=="value"&&i(a,_,k,T,x,w)}"value"in m&&i(a,"value",p.value,m.value,x)}},qe=(a,p,m,w,x,_,T,k,C)=>{const b=p.el=a?a.el:r(""),R=p.anchor=a?a.anchor:r("");let{patchFlag:E,dynamicChildren:M,slotScopeIds:D}=p;D&&(k=k?k.concat(D):D),a==null?(n(b,m,w),n(R,m,w),Ge(p.children||[],m,R,x,_,T,k,C)):E>0&&E&64&&M&&a.dynamicChildren&&a.dynamicChildren.length===M.length?(we(a.dynamicChildren,M,m,x,_,T,k),(p.key!=null||x&&p===x.subTree)&&ki(a,p,!0)):te(a,p,m,R,x,_,T,k,C)},Fe=(a,p,m,w,x,_,T,k,C)=>{p.slotScopeIds=k,a==null?p.shapeFlag&512?x.ctx.activate(p,m,w,T,C):he(p,m,w,x,_,T,C):Ne(a,p,C)},he=(a,p,m,w,x,_,T)=>{const k=a.component=Mr(a,w,x);if(ci(a)&&(k.ctx.renderer=wt),$r(k,!1,T),k.asyncDep){if(x&&x.registerDep(k,ae,T),!a.el){const C=k.subTree=Oe(vt);Y(null,C,p,m),a.placeholder=C.el}}else ae(k,a,p,m,x,_,T)},Ne=(a,p,m)=>{const w=p.component=a.component;if(dr(a,p,m))if(w.asyncDep&&!w.asyncResolved){ee(w,p,m);return}else w.next=p,w.update();else p.el=a.el,w.vnode=p},ae=(a,p,m,w,x,_,T)=>{const k=()=>{if(a.isMounted){let{next:E,bu:M,u:D,parent:N,vnode:B}=a;{const Ue=Ei(a);if(Ue){E&&(E.el=B.el,ee(a,E,T)),Ue.asyncDep.then(()=>{Se(()=>{a.isUnmounted||b()},x)});return}}let G=E,J;Tt(a,!1),E?(E.el=B.el,ee(a,E,T)):E=B,M&&Ts(M),(J=E.props&&E.props.onVnodeBeforeUpdate)&&Je(J,N,E,B),Tt(a,!0);const ie=lo(a),Me=a.subTree;a.subTree=ie,$(Me,ie,y(Me.el),_t(Me),a,x,_),E.el=ie.el,G===null&&pr(a,ie.el),D&&Se(D,x),(J=E.props&&E.props.onVnodeUpdated)&&Se(()=>Je(J,N,E,B),x)}else{let E;const{el:M,props:D}=p,{bm:N,m:B,parent:G,root:J,type:ie}=a,Me=os(p);Tt(a,!1),N&&Ts(N),!Me&&(E=D&&D.onVnodeBeforeMount)&&Je(E,G,p),Tt(a,!0);{J.ce&&J.ce._hasShadowRoot()&&J.ce._injectChildStyle(ie,a.parent?a.parent.type:void 0);const Ue=a.subTree=lo(a);$(null,Ue,m,w,a,x,_),p.el=Ue.el}if(B&&Se(B,x),!Me&&(E=D&&D.onVnodeMounted)){const Ue=p;Se(()=>Je(E,G,Ue),x)}(p.shapeFlag&256||G&&os(G.vnode)&&G.vnode.shapeFlag&256)&&a.a&&Se(a.a,x),a.isMounted=!0,p=m=w=null}};a.scope.on();const C=a.effect=new Fo(k);a.scope.off();const b=a.update=C.run.bind(C),R=a.job=C.runIfDirty.bind(C);R.i=a,R.id=a.uid,C.scheduler=()=>jn(R),Tt(a,!0),b()},ee=(a,p,m)=>{p.component=a;const w=a.vnode.props;a.vnode=p,a.next=null,gr(a,p.props,w,m),yr(a,p.children,m),st(),Qn(a),nt()},te=(a,p,m,w,x,_,T,k,C=!1)=>{const b=a&&a.children,R=a?a.shapeFlag:0,E=p.children,{patchFlag:M,shapeFlag:D}=p;if(M>0){if(M&128){Rt(b,E,m,w,x,_,T,k,C);return}else if(M&256){Ve(b,E,m,w,x,_,T,k,C);return}}D&8?(R&16&&xt(b,x,_),E!==b&&h(m,E)):R&16?D&16?Rt(b,E,m,w,x,_,T,k,C):xt(b,x,_,!0):(R&8&&h(m,""),D&16&&Ge(E,m,w,x,_,T,k,C))},Ve=(a,p,m,w,x,_,T,k,C)=>{a=a||Lt,p=p||Lt;const b=a.length,R=p.length,E=Math.min(b,R);let M;for(M=0;MR?xt(a,x,_,!0,!1,E):Ge(p,m,w,x,_,T,k,C,E)},Rt=(a,p,m,w,x,_,T,k,C)=>{let b=0;const R=p.length;let E=a.length-1,M=R-1;for(;b<=E&&b<=M;){const D=a[b],N=p[b]=C?ct(p[b]):Ze(p[b]);if(qt(D,N))$(D,N,m,null,x,_,T,k,C);else break;b++}for(;b<=E&&b<=M;){const D=a[E],N=p[M]=C?ct(p[M]):Ze(p[M]);if(qt(D,N))$(D,N,m,null,x,_,T,k,C);else break;E--,M--}if(b>E){if(b<=M){const D=M+1,N=DM)for(;b<=E;)Ee(a[b],x,_,!0),b++;else{const D=b,N=b,B=new Map;for(b=N;b<=M;b++){const fe=p[b]=C?ct(p[b]):Ze(p[b]);fe.key!=null&&B.set(fe.key,b)}let G,J=0;const ie=M-N+1;let Me=!1,Ue=0;const Ct=new Array(ie);for(b=0;b=ie){Ee(fe,x,_,!0);continue}let de;if(fe.key!=null)de=B.get(fe.key);else for(G=N;G<=M;G++)if(Ct[G-N]===0&&qt(fe,p[G])){de=G;break}de===void 0?Ee(fe,x,_,!0):(Ct[de-N]=b+1,de>=Ue?Ue=de:Me=!0,$(fe,p[de],m,null,x,_,T,k,C),J++)}const bs=Me?Cr(Ct):Lt;for(G=bs.length-1,b=ie-1;b>=0;b--){const fe=N+b,de=p[fe],St=p[fe+1],kt=fe+1{const{el:_,type:T,transition:k,children:C,shapeFlag:b}=a;if(b&6){ot(a.component.subTree,p,m,w);return}if(b&128){a.suspense.move(p,m,w);return}if(b&64){T.move(a,p,m,wt);return}if(T===re){n(_,p,m);for(let E=0;Ek.enter(_),x));else{const{leave:E,delayLeave:M,afterLeave:D}=k,N=()=>{a.ctx.isUnmounted?o(_):n(_,p,m)},B=()=>{const G=_._isLeaving||!!_[on];_._isLeaving&&_[on](!0),k.persisted&&!G?N():E(_,()=>{N(),D&&D()})};M?M(_,N,B):B()}else n(_,p,m)},Ee=(a,p,m,w=!1,x=!1)=>{const{type:_,props:T,ref:k,children:C,dynamicChildren:b,shapeFlag:R,patchFlag:E,dirs:M,cacheIndex:D,memo:N}=a;if(E===-2&&(x=!1),k!=null&&(st(),ns(k,null,m,a,!0),nt()),D!=null&&(p.renderCache[D]=void 0),R&256){p.ctx.deactivate(a);return}const B=R&1&&M,G=!os(a);let J;if(G&&(J=T&&T.onVnodeBeforeUnmount)&&Je(J,p,a),R&6)it(a.component,m,w);else{if(R&128){a.suspense.unmount(m,w);return}B&&Et(a,null,p,"beforeUnmount"),R&64?a.type.remove(a,p,m,wt,w):b&&!b.hasOnce&&(_!==re||E>0&&E&64)?xt(b,p,m,!1,!0):(_===re&&E&384||!x&&R&16)&&xt(C,p,m),w&&ms(a)}const ie=N!=null&&D==null;(G&&(J=T&&T.onVnodeUnmounted)||B||ie)&&Se(()=>{J&&Je(J,p,a),B&&Et(a,null,p,"unmounted"),ie&&(a.el=null)},m)},ms=a=>{const{type:p,el:m,anchor:w,transition:x}=a;if(p===re){Ys(m,w);return}if(p===As){j(a);return}const _=()=>{o(m),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(a.shapeFlag&1&&x&&!x.persisted){const{leave:T,delayLeave:k}=x,C=()=>T(m,_);k?k(a.el,_,C):C()}else _()},Ys=(a,p)=>{let m;for(;a!==p;)m=I(a),o(a),a=m;o(p)},it=(a,p,m)=>{const{bum:w,scope:x,job:_,subTree:T,um:k,m:C,a:b}=a;co(C),co(b),w&&Ts(w),x.stop(),_&&(_.flags|=8,Ee(T,a,p,m)),k&&Se(k,p),Se(()=>{a.isUnmounted=!0},p)},xt=(a,p,m,w=!1,x=!1,_=0)=>{for(let T=_;T{if(a.shapeFlag&6)return _t(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const p=I(a.anchor||a.el),m=p&&p[Fl];return m?I(m):p};let Wt=!1;const vs=(a,p,m)=>{let w;a==null?p._vnode&&(Ee(p._vnode,null,null,!0),w=p._vnode.component):$(p._vnode||null,a,p,null,null,null,m),p._vnode=a,Wt||(Wt=!0,Qn(w),ni(),Wt=!1)},wt={p:$,um:Ee,m:ot,r:ms,mt:he,mc:Ge,pc:te,pbc:we,n:_t,o:e};return{render:vs,hydrate:void 0,createApp:lr(vs)}}function rn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Tt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ki(e,t,s=!1){const n=e.children,o=t.children;if(F(n)&&F(o))for(let i=0;i>1,e[s[r]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function Ei(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ei(t)}function co(e){if(e)for(let t=0;te.__isSuspense;function Sr(e,t){t&&t.pendingBranch?F(e)?t.effects.push(...e):t.effects.push(e):Ml(e)}const re=Symbol.for("v-fgt"),qs=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),As=Symbol.for("v-stc"),ls=[];let Ae=null;function P(e=!1){ls.push(Ae=e?null:[])}function kr(){ls.pop(),Ae=ls[ls.length-1]||null}let us=1;function uo(e,t=!1){us+=e,e<0&&Ae&&t&&(Ae.hasOnce=!0)}function Ai(e){return e.dynamicChildren=us>0?Ae||Lt:null,kr(),us>0&&Ae&&Ae.push(e),e}function A(e,t,s,n,o,i){return Ai(d(e,t,s,n,o,i,!0))}function Er(e,t,s,n,o){return Ai(Oe(e,t,s,n,o,!0))}function Oi(e){return e?e.__v_isVNode===!0:!1}function qt(e,t){return e.type===t.type&&e.key===t.key}const Ri=({key:e})=>e??null,Os=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ce(e)||me(e)||H(e)?{i:je,r:e,k:t,f:!!s}:e:null);function d(e,t=null,s=null,n=0,o=null,i=e===re?0:1,l=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ri(t),ref:t&&Os(t),scopeId:ii,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:je};return r?(js(c,s),i&128&&e.normalize(c)):s&&(c.shapeFlag|=ce(s)?8:16),us>0&&!l&&Ae&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ae.push(c),c}const Oe=Tr;function Tr(e,t=null,s=null,n=0,o=null,i=!1){if((!e||e===Zl)&&(e=vt),Oi(e)){const r=Bt(e,t,!0);return s&&js(r,s),us>0&&!i&&Ae&&(r.shapeFlag&6?Ae[Ae.indexOf(e)]=r:Ae.push(r)),r.patchFlag=-2,r}if(Fr(e)&&(e=e.__vccOpts),t){t=Pr(t);let{class:r,style:c}=t;r&&!ce(r)&&(t.class=Pe(r)),se(c)&&($n(c)&&!F(c)&&(c=ve({},c)),t.style=En(c))}const l=ce(e)?1:Pi(e)?128:Nl(e)?64:se(e)?4:H(e)?2:0;return d(e,t,s,n,o,l,i,!0)}function Pr(e){return e?$n(e)||yi(e)?ve({},e):e:null}function Bt(e,t,s=!1,n=!1){const{props:o,ref:i,patchFlag:l,children:r,transition:c}=e,g=t?Or(o||{},t):o,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Ri(g),ref:t&&t.ref?s&&i?F(i)?i.concat(Os(t)):[i,Os(t)]:Os(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==re?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bt(e.ssContent),ssFallback:e.ssFallback&&Bt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&Dn(h,c.clone(h)),h}function $e(e=" ",t=0){return Oe(qs,null,e,t)}function Ar(e,t){const s=Oe(As,null,e);return s.staticCount=t,s}function K(e="",t=!1){return t?(P(),Er(vt,null,e)):Oe(vt,null,e)}function Ze(e){return e==null||typeof e=="boolean"?Oe(vt):F(e)?Oe(re,null,e.slice()):Oi(e)?ct(e):Oe(qs,null,String(e))}function ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bt(e)}function js(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(F(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),js(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!yi(t)?t._ctx=je:o===3&&je&&(je.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(H(t)){if(n&65){js(e,{default:t});return}t={default:t,_ctx:je},s=32}else t=String(t),n&64?(s=16,t=[$e(t)]):s=8;e.children=t,e.shapeFlag|=s}function Or(...e){const t={};for(let s=0;s_e||je;let Ds,xn;{const e=Bs(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),i=>{o.length>1?o.forEach(l=>l(i)):o[0](i)}};Ds=t("__VUE_INSTANCE_SETTERS__",s=>_e=s),xn=t("__VUE_SSR_SETTERS__",s=>fs=s)}const gs=e=>{const t=_e;return Ds(e),e.scope.on(),()=>{e.scope.off(),Ds(t)}},fo=()=>{_e&&_e.scope.off(),Ds(null)};function Ii(e){return e.vnode.shapeFlag&4}let fs=!1;function $r(e,t=!1,s=!1){t&&xn(t);const{props:n,children:o}=e.vnode,i=Ii(e);hr(e,n,i,t),br(e,o,s||t);const l=i?jr(e,t):void 0;return t&&xn(!1),l}function jr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ql);const{setup:n}=s;if(n){st();const o=e.setupContext=n.length>1?Lr(e):null,i=gs(e),l=hs(n,e,0,[e.props,o]),r=Ro(l);if(nt(),i(),(r||e.sp)&&!os(e)&&ai(e),r){if(l.then(fo,fo),t)return l.then(c=>{po(e,c)}).catch(c=>{zs(c,e,0)});e.asyncDep=l}else po(e,l)}else Mi(e)}function po(e,t,s){H(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=Qo(t)),Mi(e)}function Mi(e,t,s){const n=e.type;e.render||(e.render=n.render||et);{const o=gs(e);st();try{er(e)}finally{nt(),o()}}}const Dr={get(e,t){return ge(e,"get",""),e[t]}};function Lr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Dr),slots:e.slots,emit:e.emit,expose:t}}function Js(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Qo(Cl(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in is)return is[s](e)},has(t,s){return s in t||s in is}})):e.proxy}function Fr(e){return H(e)&&"__vccOpts"in e}const _n=(e,t)=>Pl(e,t,fs),Nr="3.5.39";/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let wn;const ho=typeof window<"u"&&window.trustedTypes;if(ho)try{wn=ho.createPolicy("vue",{createHTML:e=>e})}catch{}const Ui=wn?e=>wn.createHTML(e):e=>e,Vr="http://www.w3.org/2000/svg",Hr="http://www.w3.org/1998/Math/MathML",at=typeof document<"u"?document:null,go=at&&at.createElement("template"),Br={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?at.createElementNS(Vr,e):t==="mathml"?at.createElementNS(Hr,e):s?at.createElement(e,{is:s}):at.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>at.createTextNode(e),createComment:e=>at.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>at.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,i){const l=s?s.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===i||!(o=o.nextSibling)););else{go.innerHTML=Ui(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const r=go.content;if(n==="svg"||n==="mathml"){const c=r.firstChild;for(;c.firstChild;)r.appendChild(c.firstChild);r.removeChild(c)}t.insertBefore(r,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Kr=Symbol("_vtc");function zr(e,t,s){const n=e[Kr];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ls=Symbol("_vod"),$i=Symbol("_vsh"),Jt={name:"show",beforeMount(e,{value:t},{transition:s}){e[Ls]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Yt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Yt(e,!0),n.enter(e)):n.leave(e,()=>{Yt(e,!1)}):Yt(e,t))},beforeUnmount(e,{value:t}){Yt(e,t)}};function Yt(e,t){e.style.display=t?e[Ls]:"none",e[$i]=!t}const Wr=Symbol(""),Gr=/(?:^|;)\s*display\s*:/;function qr(e,t,s){const n=e.style,o=ce(s);let i=!1;if(s&&!o){if(t)if(ce(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();s[r]==null&&Qt(n,r,"")}else for(const l in t)s[l]==null&&Qt(n,l,"");for(const l in s){l==="display"&&(i=!0);const r=s[l];r!=null?Yr(e,l,!ce(t)&&t?t[l]:void 0,r)||Qt(n,l,r):Qt(n,l,"")}}else if(o){if(t!==s){const l=n[Wr];l&&(s+=";"+l),n.cssText=s,i=Gr.test(s)}}else t&&e.removeAttribute("style");Ls in e&&(e[Ls]=i?n.display:"",e[$i]&&(n.display="none"))}const mo=/\s*!important$/;function Qt(e,t,s){if(F(s))s.forEach(n=>Qt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Jr(e,t);mo.test(s)?e.setProperty(yt(n),s.replace(mo,""),"important"):e[n]=s}}const vo=["Webkit","Moz","ms"],an={};function Jr(e,t){const s=an[t];if(s)return s;let n=Be(t);if(n!=="filter"&&n in e)return an[t]=n;n=Uo(n);for(let o=0;ocn||(sa.then(()=>cn=0),cn=Date.now());function oa(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const o=s.value;if(F(o)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const l=o.slice(),r=[n];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ia=(e,t,s,n,o,i)=>{const l=o==="svg";t==="class"?zr(e,n,l):t==="style"?qr(e,s,n):Fs(t)?Ns(t)||Zr(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):la(e,t,n,l))?(xo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yo(e,t,n,l,i,t!=="value")):e._isVueCE&&(ra(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ce(n)))?xo(e,Be(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),yo(e,t,n,l))};function la(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&wo(t)&&H(s));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 wo(t)&&ce(s)?!1:t in e}function ra(e,t){const s=e._def.props;if(!s)return!1;const n=Be(t);return Array.isArray(s)?s.some(o=>Be(o)===n):Object.keys(s).some(o=>Be(o)===n)}const bt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return F(t)?s=>Ts(t,s):t};function aa(e){e.target.composing=!0}function Co(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Le=Symbol("_assign");function So(e,t,s){return t&&(e=e.trim()),s&&(e=Hs(e)),e}const ye={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[Le]=bt(o);const i=n||o.props&&o.props.type==="number";dt(e,t?"change":"input",l=>{l.target.composing||e[Le](So(e.value,s,i))}),(s||i)&&dt(e,"change",()=>{e.value=So(e.value,s,i)}),t||(dt(e,"compositionstart",aa),dt(e,"compositionend",Co),dt(e,"change",Co))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:i}},l){if(e[Le]=bt(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?Hs(e.value):e.value,c=t??"";if(r===c)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},ji={deep:!0,created(e,t,s){e[Le]=bt(s),dt(e,"change",()=>{const n=e._modelValue,o=Kt(e),i=e.checked,l=e[Le];if(F(n)){const r=Tn(n,o),c=r!==-1;if(i&&!c)l(n.concat(o));else if(!i&&c){const g=[...n];g.splice(r,1),l(g)}}else if(zt(n)){const r=new Set(n);i?r.add(o):r.delete(o),l(r)}else l(Di(e,i))})},mounted:ko,beforeUpdate(e,t,s){e[Le]=bt(s),ko(e,t,s)}};function ko(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(F(t))o=Tn(t,n.props.value)>-1;else if(zt(t))o=t.has(n.props.value);else{if(t===s)return;o=mt(t,Di(e,!0))}e.checked!==o&&(e.checked=o)}const ca={created(e,{value:t},s){e.checked=mt(t,s.props.value),e[Le]=bt(s),dt(e,"change",()=>{e[Le](Kt(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[Le]=bt(n),t!==s&&(e.checked=mt(t,n.props.value))}},Dt={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=zt(t);dt(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?Hs(Kt(l)):Kt(l));e[Le](e.multiple?o?new Set(i):i:i[0]),e._assigning=!0,ti(()=>{e._assigning=!1})}),e[Le]=bt(n)},mounted(e,{value:t}){Eo(e,t)},beforeUpdate(e,t,s){e[Le]=bt(s)},updated(e,{value:t}){e._assigning||Eo(e,t)}};function Eo(e,t){const s=e.multiple,n=F(t);if(!(s&&!n&&!zt(t))){for(let o=0,i=e.options.length;oString(g)===String(r)):l.selected=Tn(t,r)>-1}else l.selected=t.has(r);else if(mt(Kt(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Kt(e){return"_value"in e?e._value:e.value}function Di(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const ua={created(e,t,s){ks(e,t,s,null,"created")},mounted(e,t,s){ks(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){ks(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){ks(e,t,s,n,"updated")}};function fa(e,t){switch(e){case"SELECT":return Dt;case"TEXTAREA":return ye;default:switch(t){case"checkbox":return ji;case"radio":return ca;default:return ye}}}function ks(e,t,s,n,o){const l=fa(e.tagName,s.props&&s.props.type)[o];l&&l(e,t,s,n)}const da=["ctrl","shift","alt","meta"],pa={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)=>da.some(s=>e[`${s}Key`]&&!t.includes(s))},ha=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...i)=>{for(let l=0;l{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const i=yt(o.key);if(t.some(l=>l===i||ga[l]===i))return e(o)}))},ma=ve({patchProp:ia},Br);let Po;function va(){return Po||(Po=xr(ma))}const ba=((...e)=>{const t=va().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=xa(n);if(!o)return;const i=t._component;!H(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,ya(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function ya(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xa(e){return ce(e)?document.querySelector(e):e}const Li="pilotvault-theme";function _a(){try{return localStorage.getItem(Li)==="dark"?"dark":"light"}catch{return"light"}}const ds=L(_a());function Fi(e){ds.value=e,document.documentElement.setAttribute("data-theme",e);try{localStorage.setItem(Li,e)}catch{}}function Ao(){Fi(ds.value==="dark"?"light":"dark")}Fi(ds.value);const wa={class:"overflow-hidden rounded-lg border border-subtle bg-card shadow-xs"},Ca={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Sa={class:"text-base font-semibold text-primary"},ka={class:"pv-eyebrow"},Ea={class:"w-full text-left text-sm"},Ta={class:"border-t border-subtle px-5 py-2.5 font-mono text-xs whitespace-nowrap"},Pa={class:"text-primary"},Aa={class:"border-t border-subtle px-5 py-2.5 text-secondary"},un={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brand-text",PATCH:"text-warning",DELETE:"text-danger"};return(s,n)=>(P(),A("div",wa,[d("div",Ca,[d("div",Sa,O(e.title),1),d("span",ka,O(e.auth),1)]),d("table",Ea,[n[0]||(n[0]=d("thead",null,[d("tr",{class:"pv-eyebrow"},[d("th",{class:"px-5 py-2.5 font-medium"},"Endpoint"),d("th",{class:"px-5 py-2.5 font-medium"},"Description")])],-1)),d("tbody",null,[(P(!0),A(re,null,Ce(e.endpoints,o=>(P(),A("tr",{key:o.method+o.path,class:"transition-colors hover:bg-sunken"},[d("td",Ta,[d("span",{class:Pe(["font-semibold",t[o.method]])},O(o.method),3),d("span",Pa,O(o.path),1)]),d("td",Aa,O(o.desc),1)]))),128))])])]))}},Oa={class:"mx-auto flex max-w-5xl flex-col gap-6 px-6 pt-12 pb-16"},Ra={class:"flex items-center gap-3"},Ia={key:0,class:"pv-eyebrow hidden truncate sm:inline"},Ma=["title"],Ua={key:0,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},$a={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},ja={key:0,class:"rounded-lg border border-subtle bg-card px-5 py-10 text-center shadow-sm"},Da={key:1,class:"mx-auto w-full max-w-sm rounded-lg border border-subtle bg-card shadow-sm"},La={class:"flex flex-col gap-1"},Fa={class:"flex flex-col gap-1"},Na={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Va=["disabled"],Ha={class:"flex gap-1 self-start rounded-lg border border-subtle bg-card p-1 shadow-sm"},Ba=["onClick"],Ka={class:"flex flex-col gap-6"},za={class:"rounded-lg border border-subtle bg-card shadow-sm"},Wa={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Ga={class:"pv-eyebrow"},qa={class:"min-w-0"},Ja={class:"text-sm font-semibold text-primary"},Ya={key:0,class:"truncate font-mono text-xs text-secondary"},Xa={class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5"},Za={class:"font-mono text-xs text-secondary"},Qa={class:"flex flex-col gap-6"},ec={class:"rounded-lg border border-subtle bg-card shadow-sm"},tc={class:"flex flex-col gap-3 px-5 py-5"},sc={class:"flex flex-col gap-3 sm:flex-row"},nc={class:"flex flex-1 flex-col gap-1"},oc={class:"flex flex-1 flex-col gap-1"},ic={class:"flex flex-col gap-3 sm:flex-row"},lc={class:"flex flex-1 flex-col gap-1"},rc=["value"],ac={class:"flex flex-1 flex-col gap-1"},cc=["value"],uc={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},fc={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},dc=["disabled"],pc={class:"rounded-lg border border-subtle bg-card shadow-sm"},hc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},gc={class:"pv-eyebrow"},mc={class:"flex flex-col"},vc={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},bc={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},yc={key:2,class:"px-5 py-6 text-sm text-secondary"},xc={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},_c={class:"min-w-0 flex-1"},wc={class:"flex flex-wrap items-center gap-2"},Cc={class:"truncate text-sm font-semibold text-primary"},Sc={key:0,class:"rounded-sm bg-brand/10 px-1.5 py-0.5 font-mono text-[10px] font-medium text-brand-text"},kc={key:1,class:"rounded-sm bg-warning-tint px-1.5 py-0.5 font-mono text-[10px] font-medium text-warning"},Ec={class:"mt-0.5 font-mono text-xs text-secondary"},Tc={class:"flex shrink-0 items-center gap-2"},Pc=["onClick"],Ac=["disabled","onClick"],Oc={key:0,class:"mt-3 flex flex-col gap-3 rounded-md border border-subtle bg-sunken px-4 py-4"},Rc={class:"flex flex-col gap-3 sm:flex-row"},Ic={class:"flex flex-1 flex-col gap-1"},Mc={class:"flex flex-1 flex-col gap-1"},Uc={class:"flex flex-col gap-3 sm:flex-row"},$c={class:"flex flex-1 flex-col gap-1"},jc=["disabled"],Dc=["value"],Lc={key:0,class:"text-[11px] text-muted"},Fc={class:"flex flex-1 flex-col gap-1"},Nc=["value"],Vc={class:"flex items-center gap-2"},Hc={class:"flex items-center gap-2"},Bc=["disabled","onClick"],Kc={class:"flex flex-col gap-6"},zc={class:"rounded-lg border border-subtle bg-card shadow-sm"},Wc={class:"flex flex-col gap-3 px-5 py-5"},Gc={class:"flex flex-col gap-2 sm:flex-row"},qc=["disabled"],Jc={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Yc={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},Xc={class:"rounded-lg border border-subtle bg-card shadow-sm"},Zc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Qc={class:"pv-eyebrow"},eu={class:"flex flex-col"},tu={key:0,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},su={key:1,class:"px-5 py-6 text-sm text-secondary"},nu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},ou={class:"min-w-0 flex-1"},iu={class:"truncate text-sm font-semibold text-primary"},lu={class:"mt-0.5 font-mono text-xs text-secondary"},ru={class:"flex shrink-0 items-center gap-2"},au=["onClick"],cu=["disabled","title","onClick"],uu={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4 sm:flex-row sm:items-end"},fu={class:"flex flex-1 flex-col gap-1"},du=["onKeyup"],pu={class:"flex items-center gap-2"},hu=["disabled","onClick"],gu={class:"flex flex-col gap-6"},mu={class:"rounded-lg border border-subtle bg-card shadow-sm"},vu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},bu={class:"flex flex-col gap-3 px-5 py-5"},yu={class:"flex flex-col gap-1"},xu={class:"flex flex-col gap-1"},_u={class:"flex flex-col gap-1"},wu=["placeholder"],Cu={key:0,class:"font-mono text-[11px] text-muted"},Su={key:0},ku={key:1},Eu={key:1,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Tu={key:2,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},Pu={class:"flex flex-wrap items-center gap-2"},Au=["disabled"],Ou=["disabled"],Ru={class:"flex flex-col gap-6"},Iu={class:"rounded-lg border border-subtle bg-card shadow-sm"},Mu={class:"flex flex-col"},Uu={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},$u={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},ju={key:2,class:"px-5 py-6 text-sm text-secondary"},Du={key:3,class:"flex gap-1 overflow-x-auto overflow-y-hidden border-b border-subtle px-3 pt-1"},Lu=["onClick"],Fu={key:4,class:"px-5 py-6 text-sm text-secondary"},Nu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},Vu={class:"min-w-0 flex-1"},Hu={class:"flex flex-wrap items-center gap-2"},Bu={class:"text-sm font-semibold text-primary"},Ku=["title"],zu={key:0},Wu={class:"mt-0.5 font-mono text-xs text-secondary"},Gu={key:0,class:"mt-0.5 text-[11px] text-secondary"},qu={key:1,class:"mt-2 flex flex-col gap-1.5"},Ju={class:"rounded-sm bg-sunken px-1.5 py-0.5 font-mono text-[10px] text-secondary"},Yu={key:0,class:"font-mono text-[10px] text-muted"},Xu={key:1,class:"w-full text-[11px] text-secondary sm:w-auto"},Zu={key:2,class:"mt-1 truncate font-mono text-[11px] text-muted"},Qu={class:"flex shrink-0 items-center gap-2"},ef=["disabled","onClick"],tf=["onClick"],sf=["disabled","onClick"],nf=["disabled","onClick"],of={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4"},lf={class:"pv-eyebrow"},rf={key:0,class:"text-danger"},af=["onUpdate:modelValue"],cf=["value"],uf=["onUpdate:modelValue","type","placeholder"],ff={key:2,class:"text-[11px] text-muted"},df={class:"flex items-center gap-2"},pf=["disabled","onClick"],hf={class:"border-t border-subtle px-5 py-4"},gf={class:"flex flex-col gap-2 sm:flex-row"},mf=["disabled"],vf={key:0,class:"mt-2 text-xs font-medium text-danger"},Es="pv_panel_token",bf={__name:"App",setup(e){const t=L(localStorage.getItem(Es)||""),s=L(null),n=L(!1),o=L(!0),i=L({email:"",password:""}),l=L(""),r=L(!1),c=L("overview"),g=[{id:"overview",label:"Overview"},{id:"users",label:"Users"},{id:"organizations",label:"Organizations"},{id:"pocketbase",label:"PocketBase"},{id:"plugins",label:"Plugins"}];async function h(v){try{const u=await fetch("/api/me",{headers:{Authorization:v}});if(!u.ok)return!1;const f=await u.json();return f.role!=="superadmin"?!1:(s.value={id:f.id,email:f.email,role:f.role},!0)}catch{return!1}}async function y(v){t.value=v,localStorage.setItem(Es,v),n.value=!0,Gn(),ke(),it(),Mt(),ie()}async function I(){l.value="";const v=i.value.email.trim().toLowerCase();if(!v||!i.value.password){l.value="Enter your email and password.";return}r.value=!0;try{const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:v,password:i.value.password})}),f=await u.json().catch(()=>({}));if(!u.ok||!f.token){l.value="Invalid email or password.";return}if(!await h(f.token)){l.value="Access to this panel is restricted to superadmins.";return}i.value.password="",await y(f.token)}catch{l.value="Cannot reach the API server."}finally{r.value=!1}}function U(){qn(),localStorage.removeItem(Es),t.value="",s.value=null,n.value=!1}const q=L(null),$=L({url:"",adminEmail:"",adminPassword:""}),W=L(null),Y=L(""),V=L(""),X=L(!1),j=L(!1);function z(v){const u={Authorization:t.value};return v&&(u["Content-Type"]="application/json"),u}async function ke(){try{const v=await fetch("/api/admin/pb-config",{headers:z()});if(!v.ok)return;const u=await v.json();q.value=u,$.value={url:u.url||"",adminEmail:u.adminEmail||"",adminPassword:""},W.value=u.probe||null}catch{}}async function Re(){Y.value="",V.value="",j.value=!0;try{const v=await fetch("/api/admin/pb-config/test",{method:"POST",headers:z(!0),body:JSON.stringify($.value)});W.value=await v.json()}catch{V.value="Could not run the test."}finally{j.value=!1}}async function Ge(){var v;if(Y.value="",V.value="",!$.value.url.trim()){V.value="A PocketBase URL is required.";return}X.value=!0;try{const u=await fetch("/api/admin/pb-config",{method:"PUT",headers:z(!0),body:JSON.stringify($.value)}),f=await u.json().catch(()=>({}));if(!u.ok){V.value=f.error||"Could not save the connection.";return}q.value=f.config,W.value=((v=f.config)==null?void 0:v.probe)||null,$.value={url:f.config.url,adminEmail:f.config.adminEmail,adminPassword:""},Y.value=f.warning||"Connection saved."}catch{V.value="Could not reach the API server."}finally{X.value=!1}}const Ie=L([]),we=L(""),ue=L(""),qe=L(""),Fe=L({}),he=L(""),Ne=L({name:"",baseURL:"",provider:""}),ae=L(""),ee=L(!1),te=[{id:"apis-external",label:"APIs — External"},{id:"drives-external",label:"Drives — External"},{id:"drives-local",label:"Drives — Local"}],Ve=L("apis-external");function Rt(v){return v.category||"apis-external"}function ot(v){return Ie.value.filter(u=>Rt(u)===v)}const Ee=_n(()=>ot(Ve.value)),ms={builtin:"bg-success-tint text-success",external:"bg-warning-tint text-warning"},Ys={ok:"bg-success-tint text-success",degraded:"bg-warning-tint text-warning",down:"bg-danger-tint text-danger"};async function it(){we.value="";try{const v=await fetch("/api/admin/plugins",{headers:z()});if(!v.ok){we.value="Could not load plugins.";return}const u=await v.json();Ie.value=u.plugins||[];for(const f of Ie.value)f.enabled&&!f.health&&xt(f.name)}catch{we.value="Could not reach the API server."}}async function xt(v){try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v)}/health`,{method:"POST",headers:z()}),f=await u.json().catch(()=>({}));if(u.ok&&f.health){const S=_t(v);S&&(S.health=f.health)}}catch{}}function _t(v){return Ie.value.find(u=>u.name===v)}async function Wt(v){he.value=v.name,ue.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v.name)}`,{method:"PUT",headers:z(!0),body:JSON.stringify({enabled:!v.enabled})}),f=await u.json().catch(()=>({}));u.ok?f.warning&&(ue.value=`${v.name}: ${f.warning}`):ue.value=f.error||"Could not update the plugin.",await it()}finally{he.value=""}}function vs(v){qe.value=qe.value===v.name?"":v.name;const u={...v.config||{}};for(const f of v.configFields||[])u[f.key]===void 0&&f.default&&(u[f.key]=f.default);Fe.value=u}async function wt(v){he.value=v.name,ue.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v.name)}`,{method:"PUT",headers:z(!0),body:JSON.stringify({config:Fe.value})}),f=await u.json().catch(()=>({}));u.ok?(ue.value=f.warning?`${v.name}: ${f.warning}`:"Configuration saved.",qe.value=""):ue.value=f.error||"Could not save the configuration.",await it()}finally{he.value=""}}async function Vn(v){he.value=v.name,ue.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v.name)}/health`,{method:"POST",headers:z()}),f=await u.json().catch(()=>({}));if(u.ok&&f.health){const S=_t(v.name);S&&(S.health=f.health)}else ue.value=f.error||"Health check failed."}finally{he.value=""}}async function a(v){if(v.kind==="external"){he.value=v.name;try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v.name)}`,{method:"DELETE",headers:z()});if(!u.ok){const f=await u.json().catch(()=>({}));ue.value=f.error||"Could not remove the plugin."}await it()}finally{he.value=""}}}async function p(){if(ae.value="",!Ne.value.name.trim()||!Ne.value.baseURL.trim()){ae.value="Name and base URL are required.";return}ee.value=!0;try{const v=await fetch("/api/admin/plugins",{method:"POST",headers:z(!0),body:JSON.stringify(Ne.value)}),u=await v.json().catch(()=>({}));if(!v.ok){ae.value=u.error||"Could not register the plugin.";return}Ne.value={name:"",baseURL:"",provider:""},ue.value="External plugin registered.",await it()}catch{ae.value="Could not reach the API server."}finally{ee.value=!1}}const m=L([]),w=L([]),x=L(""),_=[{value:"user",label:"User"},{value:"admin",label:"Admin"},{value:"superadmin",label:"Superadmin"}],T={user:"User",admin:"Admin",superadmin:"Superadmin"},k={user:"bg-sunken text-secondary",admin:"bg-warning-tint text-warning",superadmin:"bg-success-tint text-success"},C=_n(()=>{const v={};for(const u of m.value)u.organization&&(v[u.organization]=(v[u.organization]||0)+1);return v});function b(v,u){if(!v)return u;if(v.error)return v.error;if(v.data&&typeof v.data=="object"){const f=[];for(const S in v.data)v.data[S]&&v.data[S].message&&f.push(`${S}: ${v.data[S].message}`);if(f.length)return f.join("; ")}return v.message||u}const R=L({email:"",password:"",role:"user",organization:""}),E=L(""),M=L(""),D=L(!1),N=L(""),B=L({}),G=L(""),J=L("");async function ie(){x.value="";try{const v=await fetch("/api/users",{headers:z()}),u=await v.json().catch(()=>({}));if(!v.ok){x.value=b(u,"Could not load users.");return}m.value=u.users||[]}catch{x.value="Could not reach the API server."}}async function Me(){E.value="",M.value="";const v=R.value.email.trim().toLowerCase();if(!v||!v.includes("@")){E.value="A valid email is required.";return}if(R.value.password.length<8){E.value="Password must be at least 8 characters.";return}D.value=!0;try{const u=await fetch("/api/users",{method:"POST",headers:z(!0),body:JSON.stringify({email:v,password:R.value.password,role:R.value.role,organization:R.value.organization})}),f=await u.json().catch(()=>({}));if(!u.ok){E.value=b(f,"Could not create the user.");return}R.value={email:"",password:"",role:"user",organization:""},M.value=`Created ${f.user?f.user.email:"user"}.`,await ie()}catch{E.value="Could not reach the API server."}finally{D.value=!1}}function Ue(v){J.value="",N.value=N.value===v.id?"":v.id,B.value={email:v.email,role:v.role,organization:v.organization||"",verified:!!v.verified,password:""}}async function Ct(v){J.value="",G.value=v.id;try{const u={},f=B.value;if(f.email.trim().toLowerCase()!==v.email&&(u.email=f.email.trim().toLowerCase()),f.role!==v.role&&(u.role=f.role),(f.organization||"")!==(v.organization||"")&&(u.organization=f.organization||""),f.verified!==!!v.verified&&(u.verified=f.verified),f.password&&(u.password=f.password),Object.keys(u).length===0){J.value="No changes to save.";return}const S=await fetch(`/api/users/${encodeURIComponent(v.id)}`,{method:"PATCH",headers:z(!0),body:JSON.stringify(u)}),He=await S.json().catch(()=>({}));if(!S.ok){J.value=b(He,"Could not update the user.");return}J.value=`Updated ${v.email}.`,N.value="",await ie()}catch{J.value="Could not reach the API server."}finally{G.value=""}}async function bs(v){if(v.id!==(s.value&&s.value.id)&&confirm(`Delete user ${v.email}? This cannot be undone.`)){J.value="",G.value=v.id;try{const u=await fetch(`/api/users/${encodeURIComponent(v.id)}`,{method:"DELETE",headers:z()}),f=await u.json().catch(()=>({}));if(!u.ok){J.value=b(f,"Could not delete the user.");return}J.value=`Deleted ${v.email}.`,N.value===v.id&&(N.value=""),await ie()}catch{J.value="Could not reach the API server."}finally{G.value=""}}}const fe=L(""),de=L(""),St=L(""),kt=L(!1),lt=L(""),ys=L(""),It=L(""),Te=L("");async function Mt(){try{const v=await fetch("/api/orgs",{headers:z()});if(!v.ok)return;const u=await v.json().catch(()=>({}));w.value=u.organizations||[]}catch{}}async function Hn(){de.value="",St.value="";const v=fe.value.trim();if(!v){de.value="An organization name is required.";return}kt.value=!0;try{const u=await fetch("/api/orgs",{method:"POST",headers:z(!0),body:JSON.stringify({name:v})}),f=await u.json().catch(()=>({}));if(!u.ok){de.value=b(f,"Could not create the organization.");return}fe.value="",St.value=`Created ${f.organization?f.organization.name:"organization"}.`,await Mt()}catch{de.value="Could not reach the API server."}finally{kt.value=!1}}function Ni(v){Te.value="",lt.value=lt.value===v.id?"":v.id,ys.value=v.name}async function Bn(v){Te.value="";const u=ys.value.trim();if(!u){Te.value="An organization name is required.";return}if(u===v.name){lt.value="";return}It.value=v.id;try{const f=await fetch(`/api/orgs/${encodeURIComponent(v.id)}`,{method:"PATCH",headers:z(!0),body:JSON.stringify({name:u})}),S=await f.json().catch(()=>({}));if(!f.ok){Te.value=b(S,"Could not rename the organization.");return}Te.value=`Renamed to ${u}.`,lt.value="",await Mt(),await ie()}catch{Te.value="Could not reach the API server."}finally{It.value=""}}async function Vi(v){const u=C.value[v.id]||0;if(u>0){Te.value=`${v.name} still has ${u} member${u===1?"":"s"}; reassign or remove them first.`;return}if(confirm(`Delete organization ${v.name}?`)){Te.value="",It.value=v.id;try{const f=await fetch(`/api/orgs/${encodeURIComponent(v.id)}`,{method:"DELETE",headers:z()}),S=await f.json().catch(()=>({}));if(!f.ok){Te.value=b(S,"Could not delete the organization.");return}Te.value=`Deleted ${v.name}.`,lt.value===v.id&&(lt.value=""),await Mt()}catch{Te.value="Could not reach the API server."}finally{It.value=""}}}const Xs=L(null),xs=L(null),Ut=L({apiServer:{status:"checking",detail:""},pocketBase:{status:"checking",detail:""},webApp:{status:"checking",detail:""}});let _s=null;const Hi=[{key:"apiServer",label:"API server"},{key:"pocketBase",label:"PocketBase"},{key:"webApp",label:"Web App"}],Kn={checking:{label:"checking",cls:"bg-sunken text-secondary"},ok:{label:"operational",cls:"bg-success-tint text-success"},down:{label:"unreachable",cls:"bg-danger-tint text-danger"},unreachable:{label:"unreachable",cls:"bg-danger-tint text-danger"}};function zn(v){const u=[];return v.httpStatus&&u.push("HTTP "+v.httpStatus),v.url&&u.push(v.url),typeof v.latencyMs=="number"&&u.push(v.latencyMs+"ms"),u.join(" · ")}async function Wn(){var v,u;try{const f=await fetch("/api/status");if(!f.ok)throw new Error("status "+f.status);const S=await f.json(),He=S.apiServer||{};xs.value=He.devices??0,Ut.value={apiServer:{status:"ok",detail:""},pocketBase:{status:((v=S.pocketBase)==null?void 0:v.status)==="ok"?"ok":"down",detail:zn(S.pocketBase||{})},webApp:{status:((u=S.webApp)==null?void 0:u.status)==="ok"?"ok":"down",detail:zn(S.webApp||{})}}}catch{xs.value=null,Ut.value={apiServer:{status:"unreachable",detail:""},pocketBase:{status:"unreachable",detail:""},webApp:{status:"unreachable",detail:""}}}Xs.value=new Date}function Gn(){Wn(),clearInterval(_s),_s=setInterval(Wn,1e4)}function qn(){clearInterval(_s),_s=null}fi(async()=>{t.value&&await h(t.value)?(n.value=!0,Gn(),ke(),it(),Mt(),ie()):t.value&&(localStorage.removeItem(Es),t.value=""),o.value=!1}),Ln(()=>qn());const Bi=[{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a session (via PocketBase)"},{method:"GET",path:"/api/auth/validate",desc:"Validate the current session token"},{method:"GET",path:"/api/me",desc:"Caller's id, email, role, and organization from their token"},{method:"GET",path:"/api/preferences",desc:"Read the caller's saved settings blob"},{method:"PUT",path:"/api/preferences",desc:"Persist the caller's settings onto their user record"},{method:"GET",path:"/api/devices",desc:"List connected devices and last-known state"},{method:"GET",path:"/api/devices/{id}/track",desc:"GPS track history for a device"},{method:"POST",path:"/api/devices/{id}/command",desc:"Send a command down to a device"},{method:"DELETE",path:"/api/devices/{id}",desc:"Forget a device's stored state"},{method:"GET",path:"/ws/ui",desc:"Live telemetry stream (WebSocket)"}],Ki=[{method:"GET",path:"/api/users",desc:"List users (admin: own org · superadmin: all)"},{method:"POST",path:"/api/users",desc:"Create a user {email, password, role, organization?}"},{method:"PATCH",path:"/api/users/{id}",desc:"Edit a user (role/org changes are scope-checked)"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user (not self; admins in-org only)"},{method:"GET",path:"/api/orgs",desc:"List organizations (admin: own · superadmin: all)"},{method:"POST",path:"/api/orgs",desc:"Create an organization {name} (superadmin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an empty organization (superadmin)"},{method:"GET",path:"/api/admin/pb-config",desc:"Read the PocketBase connection + live probe (superadmin)"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Test a candidate connection without applying (superadmin)"},{method:"PUT",path:"/api/admin/pb-config",desc:"Update + persist the PocketBase connection (superadmin)"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins + state + last health (superadmin)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin {name, baseURL} (superadmin)"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure a plugin (superadmin)"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin (superadmin)"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a plugin health check (superadmin)"}],zi=[{method:"GET",path:"/ws/device?id={id}",desc:"Device telemetry uplink (WebSocket)"},{method:"POST",path:"/api/telemetry?id={id}",desc:"Push a single telemetry event over HTTP"},{method:"GET",path:"/healthz",desc:"Readiness probe"}];return(v,u)=>(P(),A("div",Oa,[d("div",Ra,[u[25]||(u[25]=Ar('
PilotVault
API server
',3)),n.value&&s.value?(P(),A("span",Ia,O(s.value.email),1)):K("",!0),n.value?(P(),A("button",{key:1,class:"pv-btn-sec pv-btn-sm",onClick:U},"Sign out")):K("",!0),d("button",{class:"pv-btn-sec pv-btn-sm",title:Xt(ds)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:u[0]||(u[0]=(...f)=>Xt(Ao)&&Xt(Ao)(...f))},[Xt(ds)==="dark"?(P(),A("svg",Ua,[...u[22]||(u[22]=[d("circle",{cx:"12",cy:"12",r:"4"},null,-1),d("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(P(),A("svg",$a,[...u[23]||(u[23]=[d("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])),u[24]||(u[24]=$e(" Theme ",-1))],8,Ma)]),o.value?(P(),A("div",ja,[...u[26]||(u[26]=[d("span",{class:"pv-eyebrow"},"Checking session…",-1)])])):n.value?(P(),A(re,{key:2},[d("div",Ha,[(P(),A(re,null,Ce(g,f=>d("button",{key:f.id,class:Pe(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",c.value===f.id?"bg-brand text-on-brand":"text-secondary hover:text-primary"]),onClick:S=>c.value=f.id},O(f.label),11,Ba)),64))]),le(d("div",Ka,[d("div",za,[d("div",Wa,[u[30]||(u[30]=d("div",{class:"text-base font-semibold text-primary"},"Status",-1)),d("span",Ga,O(Xs.value?"checked "+Xs.value.toLocaleTimeString():"—"),1)]),d("div",null,[(P(),A(re,null,Ce(Hi,f=>d("div",{key:f.key,class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5 first:border-t-0"},[d("div",qa,[d("div",Ja,O(f.label),1),Ut.value[f.key].detail?(P(),A("div",Ya,O(Ut.value[f.key].detail),1)):K("",!0)]),d("span",{class:Pe(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",Kn[Ut.value[f.key].status].cls])},[u[31]||(u[31]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$e(" "+O(Kn[Ut.value[f.key].status].label),1)],2)])),64)),d("div",Xa,[u[32]||(u[32]=d("div",{class:"text-sm font-semibold text-primary"},"Devices",-1)),d("span",Za,O(xs.value===null?"—":xs.value+" online"),1)])])]),Oe(un,{title:"Client API",auth:"PocketBase session",endpoints:Bi}),Oe(un,{title:"Management API",auth:"Admin · superadmin",endpoints:Ki}),Oe(un,{title:"Device API",auth:"Device uplink",endpoints:zi})],512),[[Jt,c.value==="overview"]]),le(d("div",Qa,[d("div",ec,[u[38]||(u[38]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Add user"),d("span",{class:"pv-eyebrow"},"Create an account")],-1)),d("div",tc,[d("div",sc,[d("label",nc,[u[33]||(u[33]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[3]||(u[3]=f=>R.value.email=f),type:"email",class:"pv-input",placeholder:"pilot@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[ye,R.value.email]])]),d("label",oc,[u[34]||(u[34]=d("span",{class:"pv-eyebrow"},"Password",-1)),le(d("input",{"onUpdate:modelValue":u[4]||(u[4]=f=>R.value.password=f),type:"password",class:"pv-input",placeholder:"min. 8 characters",autocomplete:"new-password"},null,512),[[ye,R.value.password]])])]),d("div",ic,[d("label",lc,[u[35]||(u[35]=d("span",{class:"pv-eyebrow"},"Role",-1)),le(d("select",{"onUpdate:modelValue":u[5]||(u[5]=f=>R.value.role=f),class:"pv-input"},[(P(),A(re,null,Ce(_,f=>d("option",{key:f.value,value:f.value},O(f.label),9,rc)),64))],512),[[Dt,R.value.role]])]),d("label",ac,[u[37]||(u[37]=d("span",{class:"pv-eyebrow"},"Organization",-1)),le(d("select",{"onUpdate:modelValue":u[6]||(u[6]=f=>R.value.organization=f),class:"pv-input"},[u[36]||(u[36]=d("option",{value:""},"— none —",-1)),(P(!0),A(re,null,Ce(w.value,f=>(P(),A("option",{key:f.id,value:f.id},O(f.name),9,cc))),128))],512),[[Dt,R.value.organization]])])]),E.value?(P(),A("p",uc,O(E.value),1)):M.value?(P(),A("p",fc,O(M.value),1)):K("",!0),d("div",null,[d("button",{class:"pv-btn",disabled:D.value,onClick:Me},O(D.value?"Creating…":"Create user"),9,dc)])])]),d("div",pc,[d("div",hc,[d("div",null,[u[39]||(u[39]=d("div",{class:"text-base font-semibold text-primary"},"Users",-1)),d("span",gc,O(m.value.length)+" total",1)]),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:ie},"Refresh")]),d("div",mc,[x.value?(P(),A("p",vc,O(x.value),1)):K("",!0),J.value?(P(),A("p",bc,O(J.value),1)):K("",!0),!m.value.length&&!x.value?(P(),A("p",yc,"No users yet.")):K("",!0),(P(!0),A(re,null,Ce(m.value,f=>(P(),A("div",{key:f.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",xc,[d("div",_c,[d("div",wc,[d("span",Cc,O(f.email),1),d("span",{class:Pe(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",k[f.role]])},O(T[f.role]||f.role),3),f.id===(s.value&&s.value.id)?(P(),A("span",Sc,"you")):K("",!0),f.verified?K("",!0):(P(),A("span",kc,"unverified"))]),d("div",Ec,O(f.organizationName||(f.organization?f.organization:"no organization")),1)]),d("div",Tc,[d("button",{class:"pv-btn-sec pv-btn-sm",onClick:S=>Ue(f)},O(N.value===f.id?"Close":"Edit"),9,Pc),f.id!==(s.value&&s.value.id)?(P(),A("button",{key:0,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:G.value===f.id,onClick:S=>bs(f)}," Delete ",8,Ac)):K("",!0)])]),N.value===f.id?(P(),A("div",Oc,[d("div",Rc,[d("label",Ic,[u[40]||(u[40]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[7]||(u[7]=S=>B.value.email=S),type:"email",class:"pv-input",autocomplete:"off",spellcheck:"false"},null,512),[[ye,B.value.email]])]),d("label",Mc,[u[41]||(u[41]=d("span",{class:"pv-eyebrow"},"New password",-1)),le(d("input",{"onUpdate:modelValue":u[8]||(u[8]=S=>B.value.password=S),type:"password",class:"pv-input",placeholder:"leave blank to keep current",autocomplete:"new-password"},null,512),[[ye,B.value.password]])])]),d("div",Uc,[d("label",$c,[u[42]||(u[42]=d("span",{class:"pv-eyebrow"},"Role",-1)),le(d("select",{"onUpdate:modelValue":u[9]||(u[9]=S=>B.value.role=S),class:"pv-input",disabled:f.id===(s.value&&s.value.id)},[(P(),A(re,null,Ce(_,S=>d("option",{key:S.value,value:S.value},O(S.label),9,Dc)),64))],8,jc),[[Dt,B.value.role]]),f.id===(s.value&&s.value.id)?(P(),A("span",Lc,"You cannot change your own role.")):K("",!0)]),d("label",Fc,[u[44]||(u[44]=d("span",{class:"pv-eyebrow"},"Organization",-1)),le(d("select",{"onUpdate:modelValue":u[10]||(u[10]=S=>B.value.organization=S),class:"pv-input"},[u[43]||(u[43]=d("option",{value:""},"— none —",-1)),(P(!0),A(re,null,Ce(w.value,S=>(P(),A("option",{key:S.id,value:S.id},O(S.name),9,Nc))),128))],512),[[Dt,B.value.organization]])])]),d("label",Vc,[le(d("input",{"onUpdate:modelValue":u[11]||(u[11]=S=>B.value.verified=S),type:"checkbox",class:"h-4 w-4"},null,512),[[ji,B.value.verified]]),u[45]||(u[45]=d("span",{class:"text-sm text-primary"},"Verified",-1))]),d("div",Hc,[d("button",{class:"pv-btn pv-btn-sm",disabled:G.value===f.id,onClick:S=>Ct(f)},"Save changes",8,Bc),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[12]||(u[12]=S=>N.value="")},"Cancel")])])):K("",!0)]))),128))])])],512),[[Jt,c.value==="users"]]),le(d("div",Kc,[d("div",zc,[u[46]||(u[46]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Add organization"),d("span",{class:"pv-eyebrow"},"Create a tenant")],-1)),d("div",Wc,[d("div",Gc,[le(d("input",{"onUpdate:modelValue":u[13]||(u[13]=f=>fe.value=f),class:"pv-input flex-1",placeholder:"Acme Aerial Ltd.",autocomplete:"off",spellcheck:"false",onKeyup:To(Hn,["enter"])},null,544),[[ye,fe.value]]),d("button",{class:"pv-btn",disabled:kt.value,onClick:Hn},O(kt.value?"Creating…":"Create"),9,qc)]),de.value?(P(),A("p",Jc,O(de.value),1)):St.value?(P(),A("p",Yc,O(St.value),1)):K("",!0)])]),d("div",Xc,[d("div",Zc,[d("div",null,[u[47]||(u[47]=d("div",{class:"text-base font-semibold text-primary"},"Organizations",-1)),d("span",Qc,O(w.value.length)+" total",1)]),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:Mt},"Refresh")]),d("div",eu,[Te.value?(P(),A("p",tu,O(Te.value),1)):K("",!0),w.value.length?K("",!0):(P(),A("p",su,"No organizations yet.")),(P(!0),A(re,null,Ce(w.value,f=>(P(),A("div",{key:f.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",nu,[d("div",ou,[d("div",iu,O(f.name),1),d("div",lu,O(C.value[f.id]||0)+" member"+O((C.value[f.id]||0)===1?"":"s"),1)]),d("div",ru,[d("button",{class:"pv-btn-sec pv-btn-sm",onClick:S=>Ni(f)},O(lt.value===f.id?"Close":"Rename"),9,au),d("button",{class:"pv-btn-sec pv-btn-sm !text-danger",disabled:It.value===f.id||(C.value[f.id]||0)>0,title:(C.value[f.id]||0)>0?"Reassign or remove members first":"Delete organization",onClick:S=>Vi(f)}," Delete ",8,cu)])]),lt.value===f.id?(P(),A("div",uu,[d("label",fu,[u[48]||(u[48]=d("span",{class:"pv-eyebrow"},"Name",-1)),le(d("input",{"onUpdate:modelValue":u[14]||(u[14]=S=>ys.value=S),class:"pv-input",autocomplete:"off",spellcheck:"false",onKeyup:To(S=>Bn(f),["enter"])},null,40,du),[[ye,ys.value]])]),d("div",pu,[d("button",{class:"pv-btn pv-btn-sm",disabled:It.value===f.id,onClick:S=>Bn(f)},"Save",8,hu),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[15]||(u[15]=S=>lt.value="")},"Cancel")])])):K("",!0)]))),128))])])],512),[[Jt,c.value==="organizations"]]),le(d("div",gu,[d("div",mu,[d("div",vu,[u[50]||(u[50]=d("div",null,[d("div",{class:"text-base font-semibold text-primary"},"PocketBase connection"),d("span",{class:"pv-eyebrow"},"Settings")],-1)),W.value?(P(),A("span",{key:0,class:Pe(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",W.value.reachable?W.value.superuser?"bg-success-tint text-success":"bg-warning-tint text-warning":"bg-danger-tint text-danger"])},[u[49]||(u[49]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$e(" "+O(W.value.reachable?W.value.superuser?"connected":"reachable":"unreachable"),1)],2)):K("",!0)]),d("div",bu,[d("label",yu,[u[51]||(u[51]=d("span",{class:"pv-eyebrow"},"PocketBase URL",-1)),le(d("input",{"onUpdate:modelValue":u[16]||(u[16]=f=>$.value.url=f),class:"pv-input",placeholder:"http://10.2.1.10:8026",spellcheck:"false"},null,512),[[ye,$.value.url]])]),d("label",xu,[u[52]||(u[52]=d("span",{class:"pv-eyebrow"},"Service account email",-1)),le(d("input",{"onUpdate:modelValue":u[17]||(u[17]=f=>$.value.adminEmail=f),class:"pv-input",placeholder:"admin@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[ye,$.value.adminEmail]])]),d("label",_u,[u[53]||(u[53]=d("span",{class:"pv-eyebrow"},"Service account password",-1)),le(d("input",{"onUpdate:modelValue":u[18]||(u[18]=f=>$.value.adminPassword=f),type:"password",class:"pv-input",autocomplete:"new-password",placeholder:q.value&&q.value.adminConfigured?"leave blank to keep current":"set a password"},null,8,wu),[[ye,$.value.adminPassword]])]),W.value?(P(),A("div",Cu,[$e(" health: "+O(W.value.reachable?"ok":"down"),1),W.value.latencyMs?(P(),A("span",Su," · "+O(W.value.latencyMs)+"ms",1)):K("",!0),$e(" · superuser auth: "+O(W.value.superuser?"ok":"—"),1),W.value.detail?(P(),A("span",ku," · "+O(W.value.detail),1)):K("",!0)])):K("",!0),V.value?(P(),A("p",Eu,O(V.value),1)):Y.value?(P(),A("p",Tu,O(Y.value),1)):K("",!0),d("div",Pu,[d("button",{class:"pv-btn",disabled:X.value,onClick:Ge},O(X.value?"Saving…":"Save connection"),9,Au),d("button",{class:"pv-btn-sec",disabled:j.value,onClick:Re},O(j.value?"Testing…":"Test connection"),9,Ou)]),u[54]||(u[54]=d("p",{class:"text-[11px] text-muted"}," The service account is used only for user & organization management. Changing the URL repoints the whole API Server at a new PocketBase and may sign you out. ",-1))])])],512),[[Jt,c.value==="pocketbase"]]),le(d("div",Ru,[d("div",Iu,[d("div",{class:"flex items-center justify-between border-b border-subtle px-5 py-4"},[u[55]||(u[55]=d("div",null,[d("div",{class:"text-base font-semibold text-primary"},"Plugins"),d("span",{class:"pv-eyebrow"},"External integrations")],-1)),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:it},"Refresh")]),d("div",Mu,[we.value?(P(),A("p",Uu,O(we.value),1)):K("",!0),ue.value?(P(),A("p",$u,O(ue.value),1)):K("",!0),!Ie.value.length&&!we.value?(P(),A("p",ju,"No plugins registered yet.")):K("",!0),Ie.value.length?(P(),A("div",Du,[(P(),A(re,null,Ce(te,f=>d("button",{key:f.id,class:Pe(["-mb-px whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",Ve.value===f.id?"border-brand text-primary":"border-transparent text-secondary hover:text-primary"]),onClick:S=>Ve.value=f.id},O(f.label),11,Lu)),64))])):K("",!0),Ie.value.length&&!Ee.value.length?(P(),A("p",Fu,"No plugins in this category.")):K("",!0),(P(!0),A(re,null,Ce(Ee.value,f=>(P(),A("div",{key:f.name,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",Nu,[d("div",Vu,[d("div",Hu,[d("span",Bu,O(f.name),1),d("span",{class:Pe(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",ms[f.kind]])},O(f.kind),3),f.health?(P(),A("span",{key:0,class:Pe(["inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium",Ys[f.health.status]]),title:f.health.detail||""},[u[56]||(u[56]=d("span",{class:"h-1 w-1 rounded-full bg-current"},null,-1)),$e(O(f.health.status),1),f.health.latencyMs?(P(),A("span",zu," · "+O(f.health.latencyMs)+"ms",1)):K("",!0)],10,Ku)):K("",!0)]),d("div",Wu,O(f.provider)+" · v"+O(f.version)+" · "+O(f.authType),1),f.health&&f.health.detail?(P(),A("div",Gu,O(f.health.detail),1)):K("",!0),f.capabilities&&f.capabilities.length?(P(),A("div",qu,[u[57]||(u[57]=d("div",{class:"pv-eyebrow"},"Capabilities",-1)),(P(!0),A(re,null,Ce(f.capabilities,S=>(P(),A("div",{key:S.id,class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},[d("span",Ju,O(S.id),1),S.method||S.endpoint?(P(),A("span",Yu,O(S.method)+" "+O(S.endpoint),1)):K("",!0),S.description?(P(),A("span",Xu,O(S.description),1)):K("",!0)]))),128))])):K("",!0),f.baseURL?(P(),A("div",Zu,O(f.baseURL),1)):K("",!0)]),d("div",Qu,[d("button",{class:Pe(["pv-btn-sec pv-btn-sm",f.enabled?"!border-transparent !bg-success-tint !text-success":""]),disabled:he.value===f.name,onClick:S=>Wt(f)},[d("span",{class:Pe(["h-1.5 w-1.5 rounded-full",f.enabled?"bg-success":"bg-muted"])},null,2),$e(" "+O(f.enabled?"Enabled":"Disabled"),1)],10,ef),f.configFields&&f.configFields.length?(P(),A("button",{key:0,class:"pv-btn-sec pv-btn-sm",onClick:S=>vs(f)},"Configure",8,tf)):K("",!0),d("button",{class:"pv-btn-sec pv-btn-sm",disabled:he.value===f.name,onClick:S=>Vn(f)},"Check",8,sf),f.kind==="external"?(P(),A("button",{key:1,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:he.value===f.name,onClick:S=>a(f)},"Remove",8,nf)):K("",!0)])]),qe.value===f.name?(P(),A("div",of,[(P(!0),A(re,null,Ce(f.configFields,S=>(P(),A("label",{key:S.key,class:"flex flex-col gap-1"},[d("span",lf,[$e(O(S.label),1),S.required?(P(),A("span",rf," *")):K("",!0)]),S.type==="select"?le((P(),A("select",{key:0,"onUpdate:modelValue":He=>Fe.value[S.key]=He,class:"pv-input"},[(P(!0),A(re,null,Ce(S.options,He=>(P(),A("option",{key:He.value,value:He.value},O(He.label),9,cf))),128))],8,af)),[[Dt,Fe.value[S.key]]]):le((P(),A("input",{key:1,"onUpdate:modelValue":He=>Fe.value[S.key]=He,type:S.secret||S.type==="password"?"password":S.type==="number"?"number":"text",class:"pv-input",autocomplete:"off",placeholder:S.help||""},null,8,uf)),[[ua,Fe.value[S.key]]]),S.help?(P(),A("span",ff,O(S.help),1)):K("",!0)]))),128)),d("div",df,[d("button",{class:"pv-btn pv-btn-sm",disabled:he.value===f.name,onClick:S=>wt(f)},"Save configuration",8,pf),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[19]||(u[19]=S=>qe.value="")},"Cancel")])])):K("",!0)]))),128)),d("div",hf,[u[58]||(u[58]=d("div",{class:"pv-eyebrow mb-2"},"Register external plugin",-1)),d("div",gf,[le(d("input",{"onUpdate:modelValue":u[20]||(u[20]=f=>Ne.value.name=f),class:"pv-input sm:w-40",placeholder:"name",autocomplete:"off",spellcheck:"false"},null,512),[[ye,Ne.value.name]]),le(d("input",{"onUpdate:modelValue":u[21]||(u[21]=f=>Ne.value.baseURL=f),class:"pv-input flex-1",placeholder:"https://plugin.example.com",autocomplete:"off",spellcheck:"false"},null,512),[[ye,Ne.value.baseURL]]),d("button",{class:"pv-btn",disabled:ee.value,onClick:p},O(ee.value?"Adding…":"Add"),9,mf)]),ae.value?(P(),A("p",vf,O(ae.value),1)):K("",!0),u[59]||(u[59]=d("p",{class:"mt-2 text-[11px] text-muted"},[$e(" A remote service that answers "),d("span",{class:"font-mono"},"GET /health"),$e(" and "),d("span",{class:"font-mono"},"GET /manifest"),$e(" — added at runtime, no rebuild. ")],-1))])])])],512),[[Jt,c.value==="plugins"]])],64)):(P(),A("div",Da,[u[29]||(u[29]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Sign in"),d("span",{class:"pv-eyebrow"},"Superadmin access only")],-1)),d("form",{class:"flex flex-col gap-3 px-5 py-5",onSubmit:ha(I,["prevent"])},[d("label",La,[u[27]||(u[27]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[1]||(u[1]=f=>i.value.email=f),type:"email",autocomplete:"username",class:"pv-input",placeholder:"superadmin@pilotvault.local"},null,512),[[ye,i.value.email]])]),d("label",Fa,[u[28]||(u[28]=d("span",{class:"pv-eyebrow"},"Password",-1)),le(d("input",{"onUpdate:modelValue":u[2]||(u[2]=f=>i.value.password=f),type:"password",autocomplete:"current-password",class:"pv-input",placeholder:"••••••••"},null,512),[[ye,i.value.password]])]),l.value?(P(),A("p",Na,O(l.value),1)):K("",!0),d("button",{type:"submit",class:"pv-btn mt-1",disabled:r.value},O(r.value?"Signing in…":"Sign in"),9,Va)],32)])),u[60]||(u[60]=d("p",{class:"text-center font-mono text-[11px] text-muted"}," PilotVault — live drone telemetry, command & control. ",-1))]))}};ba(bf).mount("#app"); diff --git a/API Server/internal/api/dist/index.html b/API Server/internal/api/dist/index.html index a47a073..8d58ac4 100644 --- a/API Server/internal/api/dist/index.html +++ b/API Server/internal/api/dist/index.html @@ -6,7 +6,7 @@ PilotVault · API Server - + diff --git a/API Server/internal/plugins/builtin/opensky/opensky.go b/API Server/internal/plugins/builtin/opensky/opensky.go index e54bfd6..7871a93 100644 --- a/API Server/internal/plugins/builtin/opensky/opensky.go +++ b/API Server/internal/plugins/builtin/opensky/opensky.go @@ -78,7 +78,7 @@ func (p *Plugin) Descriptor() plugins.Descriptor { Help: "Global account tier. Leave it unset to let each organization or user pick their own plan; set a value only to force one plan for everyone. Determines the daily credit allowance shown next to remaining credits."}, {Key: "clientId", Label: "OAuth2 client ID", Type: "text", Help: "Optional — leave blank for anonymous access (lower rate limits)."}, {Key: "clientSecret", Label: "OAuth2 client secret", Type: "password", Secret: true, Help: "Paired with the client ID for authenticated access."}, - {Key: "bbox", Label: "Default bounding box", Type: "text", Default: defaultBBox, Help: "lamin,lomin,lamax,lomax — used by the health probe and states.bbox."}, + {Key: "bbox", Label: "Default bounding box", Type: "bbox", Default: defaultBBox, Help: "Pick a region or choose Custom to enter lamin,lomin,lamax,lomax — used by the health probe and states.bbox."}, {Key: "allowAnonymous", Label: "Anonymous access", Type: "select", Default: "true", Options: []plugins.SelectOption{ {Value: "true", Label: "Enabled — allow use without credentials"}, diff --git a/API Server/panel/src/App.vue b/API Server/panel/src/App.vue index 2bd8a0d..0b74fb4 100644 --- a/API Server/panel/src/App.vue +++ b/API Server/panel/src/App.vue @@ -176,6 +176,54 @@ const pluginsMsg = ref(""); const editingPlugin = ref(""); // name whose config form is expanded const editConfig = ref({}); // working copy of the expanded plugin's config const busyPlugin = ref(""); // name of a plugin with an in-flight action + +// Predefined bounding boxes for the "bbox" config field (lamin,lomin,lamax,lomax). +// Mirrors the Web App picker; a "Custom…" entry falls back to manual coordinates. +// Europe is the default (kept in sync with the OpenSky plugin's defaultBBox). +const BBOX_GROUPS = [ + { label: "World", options: [{ value: "-90,-180,90,180", label: "World" }] }, + { label: "Continents", options: [ + { value: "34,-25,72,45", label: "Europe" }, + { value: "-35,-18,38,52", label: "Africa" }, + { value: "5,25,82,180", label: "Asia" }, + { value: "7,-168,72,-52", label: "North America" }, + { value: "-56,-82,13,-34", label: "South America" }, + { value: "-48,110,-10,180", label: "Oceania" }, + ] }, + { label: "Countries", options: [ + { value: "49,14.1,54.9,24.2", label: "Poland" }, + { value: "50.5,3.2,53.7,7.3", label: "Netherlands" }, + { value: "47.2,5.8,55.1,15.1", label: "Germany" }, + { value: "41.3,-5.2,51.1,9.6", label: "France" }, + { value: "49.9,-8.7,59,1.8", label: "United Kingdom" }, + { value: "35.9,-9.6,43.8,3.4", label: "Spain" }, + { value: "36.6,6.6,47.1,18.6", label: "Italy" }, + { value: "24,-125,49.5,-66.5", label: "United States" }, + ] }, +]; +const BBOX_FLAT = BBOX_GROUPS.flatMap((g) => g.options); +// Normalise to "n1,n2,n3,n4" so matching ignores spacing / trailing zeros. +function normBbox(s) { + const parts = String(s || "").split(",").map((x) => x.trim()); + if (parts.length !== 4) return ""; + const nums = parts.map(Number); + if (nums.some((n) => Number.isNaN(n))) return ""; + return nums.join(","); +} +// Field keys currently in manual ("Custom…") mode, so the text input is shown. +const bboxCustom = ref({}); +// The +