From 215c027adad5750a05bab9a2d69a60e45554b951 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Fri, 21 Aug 2026 19:59:00 +0200 Subject: [PATCH] Panel: give the API Server a name, and a tab to set it in The Web App can be pointed at more than one DriverVault, but a server it adds is only ever identified by the URL that was typed into the connect dialog. Nothing on the other end says what it is called, so the switcher has no name to show that the operator did not invent locally. So the server now carries one. SERVER_NAME joins the config, defaulting to "DriverVault API Server" so /api/health always has something a client can display rather than an empty string every caller has to special-case. GET/PUT /api/admin/server-config follow the pb-config and webapp-config shape exactly: superadmin only, applied at runtime and then persisted to .env, with the same "applied but could not be saved" warning when the write fails. There is no /test sibling, because a name is a label and not an address - there is nothing to probe. The length cap counts runes rather than bytes, so a 64-character Polish or Danish name is not cut off at the halfway mark. /api/health reports it, unauthenticated, which is the point of the whole change: a client adding this server by URL can label it from the probe it already makes, instead of needing a second and authenticated call before it can draw the entry. In the panel it is a new API Server tab, first in the superadmin group since it is this server itself, ahead of the PocketBase and Web App tabs that describe what it talks to. Strings in all three languages, and the route table in the README and the API reference tab both grow the two new endpoints. Known gap, deliberately not closed here: the compose files do not pass SERVER_NAME, so under Docker a rename from the panel writes the container's .env and no volume keeps it - it reverts to the default the next time the container is recreated. Wiring it as ${SERVER_NAME:-} would make the host .env authoritative, at the cost of the other trap the previous commit documented, where the environment silently overrides the panel on every restart. That is a call about the deployment, not about this endpoint. Verified by new tests over the handler: the rename applies at runtime, lands in .env, reaches /api/health, is rejected without touching .env when blank or over-long, and accepts a name of exactly the limit in multi-byte runes. go build, go vet and go test ./... pass. Drove the built panel in a browser against a stub backend - the tab renders, loads the current name, saves, and reads correctly in Polish - and ran the rebuilt api-server.exe and webapp.exe end to end, confirming the embedded bundle really contains the new tab and that SERVER_NAME reaches /api/health through both the server itself and the Web App's proxy. Not verified: no Docker build, so the images still serve the old panel until they are rebuilt and pushed. Co-Authored-By: Claude Opus 5 --- API Server/.env.example | 7 ++ API Server/README.md | 1 + .../api/dist/assets/index-B4_v9nDZ.js | 17 +++ .../api/dist/assets/index-OHZkxAdj.js | 17 --- API Server/internal/api/dist/index.html | 2 +- API Server/internal/api/health.go | 5 +- API Server/internal/api/server.go | 21 ++++ API Server/internal/api/settings.go | 56 +++++++++ API Server/internal/api/settings_test.go | 114 ++++++++++++++++++ API Server/internal/config/config.go | 11 ++ API Server/panel/src/App.vue | 5 + .../panel/src/components/ServerCard.vue | 75 ++++++++++++ API Server/panel/src/i18n/da.json | 11 ++ API Server/panel/src/i18n/en.json | 11 ++ API Server/panel/src/i18n/pl.json | 11 ++ 15 files changed, 345 insertions(+), 19 deletions(-) create mode 100644 API Server/internal/api/dist/assets/index-B4_v9nDZ.js delete mode 100644 API Server/internal/api/dist/assets/index-OHZkxAdj.js create mode 100644 API Server/internal/api/settings_test.go create mode 100644 API Server/panel/src/components/ServerCard.vue diff --git a/API Server/.env.example b/API Server/.env.example index 41d7927..87f968e 100644 --- a/API Server/.env.example +++ b/API Server/.env.example @@ -18,6 +18,13 @@ POCKETBASE_URL=http://10.2.1.10:8027 POCKETBASE_ADMIN_EMAIL= POCKETBASE_ADMIN_PASSWORD= +# This server's display name, reported by GET /api/health so a client pointed at +# several DriverVaults can tell them apart (the Web App's server switcher labels +# an added server with it). Editable at runtime from the panel (API Server +# section), which writes the change back into this file. Max 64 characters; +# unset falls back to "DriverVault API Server". +SERVER_NAME= + # CORS allowed origins for browser clients (comma separated, or * for any). # Native mobile apps are not subject to CORS. Editable at runtime from the panel # (Web App section), which writes the change back into this file. diff --git a/API Server/README.md b/API Server/README.md index 592c7bb..6a6aa7f 100644 --- a/API Server/README.md +++ b/API Server/README.md @@ -167,6 +167,7 @@ PATCH /api/orgs/{id} DELETE /api/orgs/{id} # superadmin — connection + plugin management GET /api/admin/pb-config PUT /api/admin/pb-config POST /api/admin/pb-config/test GET /api/admin/webapp-config PUT /api/admin/webapp-config POST /api/admin/webapp-config/test +GET /api/admin/server-config PUT /api/admin/server-config GET /api/admin/plugins POST /api/admin/plugins GET /api/admin/plugins/{name} PUT /api/admin/plugins/{name} DELETE /api/admin/plugins/{name} POST /api/admin/plugins/{name}/health diff --git a/API Server/internal/api/dist/assets/index-B4_v9nDZ.js b/API Server/internal/api/dist/assets/index-B4_v9nDZ.js new file mode 100644 index 0000000..6556b9b --- /dev/null +++ b/API Server/internal/api/dist/assets/index-B4_v9nDZ.js @@ -0,0 +1,17 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();/** +* @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 Y={},xt=[],Ke=()=>{},mi=()=>!1,Ts=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Es=e=>e.startsWith("onUpdate:"),he=Object.assign,un=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Ao=Object.prototype.hasOwnProperty,G=(e,t)=>Ao.call(e,t),M=Array.isArray,kt=e=>es(e)==="[object Map]",zt=e=>es(e)==="[object Set]",Rn=e=>es(e)==="[object Date]",V=e=>typeof e=="function",ne=e=>typeof e=="string",We=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",bi=e=>(Z(e)||V(e))&&V(e.then)&&V(e.catch),vi=Object.prototype.toString,es=e=>vi.call(e),Oo=e=>es(e).slice(8,-1),_i=e=>es(e)==="[object Object]",dn=e=>ne(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ft=cn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$s=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},zo=/-\w/g,Ce=$s(e=>e.replace(zo,t=>t.slice(1).toUpperCase())),Io=/\B([A-Z])/g,dt=$s(e=>e.replace(Io,"-$1").toLowerCase()),yi=$s(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ds=$s(e=>e?`on${yi(e)}`:""),Ve=(e,t)=>!Object.is(e,t),fs=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Cs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let jn;const Ps=()=>jn||(jn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function fn(e){if(M(e)){const t={};for(let s=0;s{if(s){const n=s.split(jo);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Oe(e){let t="";if(ne(e))t=e;else if(M(e))for(let s=0;sat(s,t))}const ki=e=>!!(e&&e.__v_isRef===!0),m=e=>ne(e)?e:e==null?"":M(e)||Z(e)&&(e.toString===vi||!V(e.toString))?ki(e)?m(e.value):JSON.stringify(e,Si,2):String(e),Si=(e,t)=>ki(t)?Si(e,t.value):kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Ms(n,o)+" =>"]=i,s),{})}:zt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ms(s))}:We(t)?Ms(t):Z(t)&&!M(t)&&!_i(t)?String(t):t,Ms=(e,t="")=>{var s;return We(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 ce;class Fo{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&&ce&&(ce.active?(this.parent=ce,this.index=(ce.scopes||(ce.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(ce===this)ce=this.prevScope;else{let t=ce;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(Ht){let t=Ht;for(Ht=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Bt;){let t=Bt;for(Bt=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 Ci(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Pi(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),mn(n),Ho(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Js(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ai(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ai(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qt)||(e.globalVersion=qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Js(e))))return;e.flags|=2;const t=e.dep,s=Q,n=Pe;Q=e,Pe=!0;try{Ci(e);const i=e.fn(e._value);(t.version===0||Ve(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Q=s,Pe=n,Pi(e),e.flags&=-3}}function mn(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)mn(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Ho(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Pe=!0;const Oi=[];function Ge(){Oi.push(Pe),Pe=!1}function qe(){const e=Oi.pop();Pe=e===void 0?!0:e}function Nn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Q;Q=void 0;try{t()}finally{Q=s}}}let qt=0;class Vo{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 bn{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(!Q||!Pe||Q===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Q)s=this.activeLink=new Vo(Q,this),Q.deps?(s.prevDep=Q.depsTail,Q.depsTail.nextDep=s,Q.depsTail=s):Q.deps=Q.depsTail=s,zi(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=Q.depsTail,s.nextDep=void 0,Q.depsTail.nextDep=s,Q.depsTail=s,Q.deps===s&&(Q.deps=n)}return s}trigger(t){this.version++,qt++,this.notify(t)}notify(t){hn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{gn()}}}function zi(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)zi(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Ys=new WeakMap,vt=Symbol(""),Xs=Symbol(""),Zt=Symbol("");function fe(e,t,s){if(Pe&&Q){let n=Ys.get(e);n||Ys.set(e,n=new Map);let i=n.get(s);i||(n.set(s,i=new bn),i.map=n,i.key=s),i.track()}}function Qe(e,t,s,n,i,o){const r=Ys.get(e);if(!r){qt++;return}const l=a=>{a&&a.trigger()};if(hn(),t==="clear")r.forEach(l);else{const a=M(e),p=a&&dn(s);if(a&&s==="length"){const d=Number(n);r.forEach((b,C)=>{(C==="length"||C===Zt||!We(C)&&C>=d)&&l(b)})}else switch((s!==void 0||r.has(void 0))&&l(r.get(s)),p&&l(r.get(Zt)),t){case"add":a?p&&l(r.get("length")):(l(r.get(vt)),kt(e)&&l(r.get(Xs)));break;case"delete":a||(l(r.get(vt)),kt(e)&&l(r.get(Xs)));break;case"set":kt(e)&&l(r.get(vt));break}}gn()}function yt(e){const t=W(e);return t===e?t:(fe(t,"iterate",Zt),Te(e)?t:t.map(ze))}function As(e){return fe(e=W(e),"iterate",Zt),e}function Be(e,t){return st(e)?$t(_t(e)?ze(t):t):ze(t)}const Ko={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>Be(this,e))},concat(...e){return yt(this).concat(...e.map(t=>M(t)?yt(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=Be(this,e[1]),e))},every(e,t){return Ze(this,"every",e,t,void 0,arguments)},filter(e,t){return Ze(this,"filter",e,t,s=>s.map(n=>Be(this,n)),arguments)},find(e,t){return Ze(this,"find",e,t,s=>Be(this,s),arguments)},findIndex(e,t){return Ze(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ze(this,"findLast",e,t,s=>Be(this,s),arguments)},findLastIndex(e,t){return Ze(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ze(this,"forEach",e,t,void 0,arguments)},includes(...e){return Bs(this,"includes",e)},indexOf(...e){return Bs(this,"indexOf",e)},join(e){return yt(this).join(e)},lastIndexOf(...e){return Bs(this,"lastIndexOf",e)},map(e,t){return Ze(this,"map",e,t,void 0,arguments)},pop(){return Ut(this,"pop")},push(...e){return Ut(this,"push",e)},reduce(e,...t){return Un(this,"reduce",e,t)},reduceRight(e,...t){return Un(this,"reduceRight",e,t)},shift(){return Ut(this,"shift")},some(e,t){return Ze(this,"some",e,t,void 0,arguments)},splice(...e){return Ut(this,"splice",e)},toReversed(){return yt(this).toReversed()},toSorted(e){return yt(this).toSorted(e)},toSpliced(...e){return yt(this).toSpliced(...e)},unshift(...e){return Ut(this,"unshift",e)},values(){return Fs(this,"values",e=>Be(this,e))}};function Fs(e,t,s){const n=As(e),i=n[t]();return n!==e&&!Te(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=s(o.value)),o}),i}const Wo=Array.prototype;function Ze(e,t,s,n,i,o){const r=As(e),l=r!==e&&!Te(e),a=r[t];if(a!==Wo[t]){const b=a.apply(e,o);return l?ze(b):b}let p=s;r!==e&&(l?p=function(b,C){return s.call(this,Be(e,b),C,e)}:s.length>2&&(p=function(b,C){return s.call(this,b,C,e)}));const d=a.call(r,p,n);return l&&i?i(d):d}function Un(e,t,s,n){const i=As(e),o=i!==e&&!Te(e);let r=s,l=!1;i!==e&&(o?(l=n.length===0,r=function(p,d,b){return l&&(l=!1,p=Be(e,p)),s.call(this,p,Be(e,d),b,e)}):s.length>3&&(r=function(p,d,b){return s.call(this,p,d,b,e)}));const a=i[t](r,...n);return l?Be(e,a):a}function Bs(e,t,s){const n=W(e);fe(n,"iterate",Zt);const i=n[t](...s);return(i===-1||i===!1)&&yn(s[0])?(s[0]=W(s[0]),n[t](...s)):i}function Ut(e,t,s=[]){Ge(),hn();const n=W(e)[t].apply(e,s);return gn(),qe(),n}const Go=cn("__proto__,__v_isRef,__isVue"),Ii=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(We));function qo(e){We(e)||(e=String(e));const t=W(this);return fe(t,"has",e),t.hasOwnProperty(e)}class Ri{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(i?o?ir:Di:o?Ui:Ni).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=M(t);if(!i){let a;if(r&&(a=Ko[s]))return a;if(s==="hasOwnProperty")return qo}const l=Reflect.get(t,s,pe(t)?t:n);if((We(s)?Ii.has(s):Go(s))||(i||fe(t,"get",s),o))return l;if(pe(l)){const a=r&&dn(s)?l:l.value;return i&&Z(a)?en(a):a}return Z(l)?i?en(l):Jt(l):l}}class ji extends Ri{constructor(t=!1){super(!1,t)}set(t,s,n,i){let o=t[s];const r=M(t)&&dn(s);if(!this._isShallow){const p=st(o);if(!Te(n)&&!st(n)&&(o=W(o),n=W(n)),!r&&pe(o)&&!pe(n))return p||(o.value=n),!0}const l=r?Number(s)e,as=e=>Reflect.getPrototypeOf(e);function Qo(e,t,s){return function(...n){const i=this.__v_raw,o=W(i),r=kt(o),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,p=i[e](...n),d=s?Qs:t?$t:ze;return!t&&fe(o,"iterate",a?Xs:vt),he(Object.create(p),{next(){const{value:b,done:C}=p.next();return C?{value:b,done:C}:{value:l?[d(b[0]),d(b[1])]:d(b),done:C}}})}}function cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function er(e,t){const s={get(i){const o=this.__v_raw,r=W(o),l=W(i);e||(Ve(i,l)&&fe(r,"get",i),fe(r,"get",l));const{has:a}=as(r),p=t?Qs:e?$t:ze;if(a.call(r,i))return p(o.get(i));if(a.call(r,l))return p(o.get(l));o!==r&&o.get(i)},get size(){const i=this.__v_raw;return!e&&fe(W(i),"iterate",vt),i.size},has(i){const o=this.__v_raw,r=W(o),l=W(i);return e||(Ve(i,l)&&fe(r,"has",i),fe(r,"has",l)),i===l?o.has(i):o.has(i)||o.has(l)},forEach(i,o){const r=this,l=r.__v_raw,a=W(l),p=t?Qs:e?$t:ze;return!e&&fe(a,"iterate",vt),l.forEach((d,b)=>i.call(o,p(d),p(b),r))}};return he(s,e?{add:cs("add"),set:cs("set"),delete:cs("delete"),clear:cs("clear")}:{add(i){const o=W(this),r=as(o),l=W(i),a=!t&&!Te(i)&&!st(i)?l:i;return r.has.call(o,a)||Ve(i,a)&&r.has.call(o,i)||Ve(l,a)&&r.has.call(o,l)||(o.add(a),Qe(o,"add",a,a)),this},set(i,o){!t&&!Te(o)&&!st(o)&&(o=W(o));const r=W(this),{has:l,get:a}=as(r);let p=l.call(r,i);p||(i=W(i),p=l.call(r,i));const d=a.call(r,i);return r.set(i,o),p?Ve(o,d)&&Qe(r,"set",i,o):Qe(r,"add",i,o),this},delete(i){const o=W(this),{has:r,get:l}=as(o);let a=r.call(o,i);a||(i=W(i),a=r.call(o,i)),l&&l.call(o,i);const p=o.delete(i);return a&&Qe(o,"delete",i,void 0),p},clear(){const i=W(this),o=i.size!==0,r=i.clear();return o&&Qe(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=Qo(i,e,t)}),s}function vn(e,t){const s=er(e,t);return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(G(s,i)&&i in n?s:n,i,o)}const tr={get:vn(!1,!1)},sr={get:vn(!1,!0)},nr={get:vn(!0,!1)};const Ni=new WeakMap,Ui=new WeakMap,Di=new WeakMap,ir=new WeakMap;function or(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Jt(e){return st(e)?e:_n(e,!1,Jo,tr,Ni)}function rr(e){return _n(e,!1,Xo,sr,Ui)}function en(e){return _n(e,!0,Yo,nr,Di)}function _n(e,t,s,n,i){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=i.get(e);if(o)return o;const r=or(Oo(e));if(r===0)return e;const l=new Proxy(e,r===2?n:s);return i.set(e,l),l}function _t(e){return st(e)?_t(e.__v_raw):!!(e&&e.__v_isReactive)}function st(e){return!!(e&&e.__v_isReadonly)}function Te(e){return!!(e&&e.__v_isShallow)}function yn(e){return e?!!e.__v_raw:!1}function W(e){const t=e&&e.__v_raw;return t?W(t):e}function lr(e){return!G(e,"__v_skip")&&Object.isExtensible(e)&&wi(e,"__v_skip",!0),e}const ze=e=>Z(e)?Jt(e):e,$t=e=>Z(e)?en(e):e;function pe(e){return e?e.__v_isRef===!0:!1}function B(e){return ar(e,!1)}function ar(e,t){return pe(e)?e:new cr(e,t)}class cr{constructor(t,s){this.dep=new bn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:W(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||Te(t)||st(t);t=n?t:W(t),Ve(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function g(e){return pe(e)?e.value:e}const ur={get:(e,t,s)=>t==="__v_raw"?e:g(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const i=e[t];return pe(i)&&!pe(s)?(i.value=s,!0):Reflect.set(e,t,s,n)}};function Mi(e){return _t(e)?e:new Proxy(e,ur)}class dr{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new bn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Q!==this)return $i(this,!0),!0}get value(){const t=this.dep.track();return Ai(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function fr(e,t,s=!1){let n,i;return V(e)?n=e:(n=e.get,i=e.set),new dr(n,i,s)}const us={},ms=new WeakMap;let bt;function pr(e,t=!1,s=bt){if(s){let n=ms.get(s);n||ms.set(s,n=[]),n.push(e)}}function hr(e,t,s=Y){const{immediate:n,deep:i,once:o,scheduler:r,augmentJob:l,call:a}=s,p=N=>i?N:Te(N)||i===!1||i===0?et(N,1):et(N);let d,b,C,O,F=!1,_=!1;if(pe(e)?(b=()=>e.value,F=Te(e)):_t(e)?(b=()=>p(e),F=!0):M(e)?(_=!0,F=e.some(N=>_t(N)||Te(N)),b=()=>e.map(N=>{if(pe(N))return N.value;if(_t(N))return p(N);if(V(N))return a?a(N,2):N()})):V(e)?t?b=a?()=>a(e,2):e:b=()=>{if(C){Ge();try{C()}finally{qe()}}const N=bt;bt=d;try{return a?a(e,3,[O]):e(O)}finally{bt=N}}:b=Ke,t&&i){const N=b,oe=i===!0?1/0:i;b=()=>et(N(),oe)}const E=Bo(),w=()=>{d.stop(),E&&E.active&&un(E.effects,d)};if(o&&t){const N=t;t=(...oe)=>{const Re=N(...oe);return w(),Re}}let P=_?new Array(e.length).fill(us):us;const j=N=>{if(!(!(d.flags&1)||!d.dirty&&!N))if(t){const oe=d.run();if(N||i||F||(_?oe.some((Re,je)=>Ve(Re,P[je])):Ve(oe,P))){C&&C();const Re=bt;bt=d;try{const je=[oe,P===us?void 0:_&&P[0]===us?[]:P,O];P=oe,a?a(t,3,je):t(...je)}finally{bt=Re}}}else d.run()};return l&&l(j),d=new Ti(b),d.scheduler=r?()=>r(j,!1):j,O=N=>pr(N,!1,d),C=d.onStop=()=>{const N=ms.get(d);if(N){if(a)a(N,4);else for(const oe of N)oe();ms.delete(d)}},t?n?j(!0):P=d.run():r?r(j.bind(null,!0),!0):d.run(),w.pause=d.pause.bind(d),w.resume=d.resume.bind(d),w.stop=w,w}function et(e,t=1/0,s){if(t<=0||!Z(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,pe(e))et(e.value,t,s);else if(M(e))for(let n=0;n{et(n,t,s)});else if(_i(e)){for(const n in e)et(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&et(e[n],t,s)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function ts(e,t,s,n){try{return n?e(...n):e()}catch(i){Os(i,t,s)}}function Ie(e,t,s,n){if(V(e)){const i=ts(e,t,s,n);return i&&bi(i)&&i.catch(o=>{Os(o,t,s)}),i}if(M(e)){const i=[];for(let o=0;o>>1,i=be[n],o=Yt(i);o=Yt(s)?be.push(e):be.splice(mr(t),0,e),e.flags|=1,Bi()}}function Bi(){bs||(bs=Li.then(Vi))}function br(e){M(e)?St.push(...e):lt&&e.id===-1?lt.splice(wt+1,0,e):e.flags&1||(St.push(e),e.flags|=1),Bi()}function Dn(e,t,s=Fe+1){for(;sYt(s)-Yt(n));if(St.length=0,lt){lt.push(...t);return}for(lt=t,wt=0;wte.id==null?e.flags&2?-1:1/0:e.id;function Vi(e){try{for(Fe=0;Fe{n._d&&Zn(-1);const o=vs(t);let r;try{r=e(...i)}finally{vs(o),n._d&&Zn(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function re(e,t){if(ke===null)return e;const s=js(ke),n=e.dirs||(e.dirs=[]);for(let i=0;i1)return s&&V(t)?t.call(n&&n.proxy):t}}const yr=Symbol.for("v-scx"),wr=()=>ps(yr);function Hs(e,t,s){return Wi(e,t,s)}function Wi(e,t,s=Y){const{immediate:n,deep:i,flush:o,once:r}=s,l=he({},s),a=t&&n||!t&&o!=="post";let p;if(Qt){if(o==="sync"){const O=wr();p=O.__watcherHandles||(O.__watcherHandles=[])}else if(!a){const O=()=>{};return O.stop=Ke,O.resume=Ke,O.pause=Ke,O}}const d=ve;l.call=(O,F,_)=>Ie(O,d,F,_);let b=!1;o==="post"?l.scheduler=O=>{_e(O,d&&d.suspense)}:o!=="sync"&&(b=!0,l.scheduler=(O,F)=>{F?O():wn(O)}),l.augmentJob=O=>{t&&(O.flags|=4),b&&(O.flags|=2,d&&(O.id=d.uid,O.i=d))};const C=hr(e,t,l);return Qt&&(p?p.push(C):a&&C()),C}function xr(e,t,s){const n=this.proxy,i=ne(e)?e.includes(".")?Gi(n,e):()=>n[e]:e.bind(n,n);let o;V(t)?o=t:(o=t.handler,s=t);const r=ss(this),l=Wi(i,o.bind(n),s);return r(),l}function Gi(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;ie.__isTeleport,Vs=Symbol("_leaveCb");function xn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,xn(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 qi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Mn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const _s=new WeakMap;function Vt(e,t,s,n,i=!1){if(M(e)){e.forEach((_,E)=>Vt(_,t&&(M(t)?t[E]:t),s,n,i));return}if(Kt(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Vt(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?js(n.component):n.el,r=i?null:o,{i:l,r:a}=e,p=t&&t.r,d=l.refs===Y?l.refs={}:l.refs,b=l.setupState,C=W(b),O=b===Y?mi:_=>Mn(d,_)?!1:G(C,_),F=(_,E)=>!(E&&Mn(d,E));if(p!=null&&p!==a){if(Ln(t),ne(p))d[p]=null,O(p)&&(b[p]=null);else if(pe(p)){const _=t;F(p,_.k)&&(p.value=null),_.k&&(d[_.k]=null)}}if(V(a)){Ge();try{ts(a,l,12,[r,d])}finally{qe()}}else{const _=ne(a),E=pe(a);if(_||E){const w=()=>{if(e.f){const P=_?O(a)?b[a]:d[a]:F()||!e.k?a.value:d[e.k];if(i)M(P)&&un(P,o);else if(M(P))P.includes(o)||P.push(o);else if(_)d[a]=[o],O(a)&&(b[a]=d[a]);else{const j=[o];F(a,e.k)&&(a.value=j),e.k&&(d[e.k]=j)}}else _?(d[a]=r,O(a)&&(b[a]=r)):E&&(F(a,e.k)&&(a.value=r),e.k&&(d[e.k]=r))};if(r){const P=()=>{w(),_s.delete(e)};P.id=-1,_s.set(e,P),_e(P,s)}else Ln(e),w()}}}function Ln(e){const t=_s.get(e);t&&(t.flags|=8,_s.delete(e))}Ps().requestIdleCallback;Ps().cancelIdleCallback;const Kt=e=>!!e.type.__asyncLoader,Zi=e=>e.type.__isKeepAlive;function Tr(e,t){Ji(e,"a",t)}function Er(e,t){Ji(e,"da",t)}function Ji(e,t,s=ve){const n=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(zs(t,n,s),s){let i=s.parent;for(;i&&i.parent;)Zi(i.parent.vnode)&&$r(n,t,s,i),i=i.parent}}function $r(e,t,s,n){const i=zs(t,e,n,!0);kn(()=>{un(n[t],i)},s)}function zs(e,t,s=ve,n=!1){if(s){const i=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Ge();const l=ss(s),a=Ie(t,s,e,r);return l(),qe(),a});return n?i.unshift(o):i.push(o),o}}const nt=e=>(t,s=ve)=>{(!Qt||e==="sp")&&zs(e,(...n)=>t(...n),s)},Cr=nt("bm"),it=nt("m"),Pr=nt("bu"),Ar=nt("u"),Or=nt("bum"),kn=nt("um"),zr=nt("sp"),Ir=nt("rtg"),Rr=nt("rtc");function jr(e,t=ve){zs("ec",e,t)}const Nr=Symbol.for("v-ndc");function Se(e,t,s,n){let i;const o=s,r=M(e);if(r||ne(e)){const l=r&&_t(e);let a=!1,p=!1;l&&(a=!Te(e),p=st(e),e=As(e)),i=new Array(e.length);for(let d=0,b=e.length;dt(l,a,void 0,o));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,p=l.length;ae?vo(e)?js(e):tn(e.parent):null,Wt=he(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=>tn(e.parent),$root:e=>tn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xi(e),$forceUpdate:e=>e.f||(e.f=()=>{wn(e.update)}),$nextTick:e=>e.n||(e.n=Fi.bind(e.proxy)),$watch:e=>xr.bind(e)}),Ks=(e,t)=>e!==Y&&!e.__isScriptSetup&&G(e,t),Ur={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:o,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const C=r[t];if(C!==void 0)switch(C){case 1:return n[t];case 2:return i[t];case 4:return s[t];case 3:return o[t]}else{if(Ks(n,t))return r[t]=1,n[t];if(i!==Y&&G(i,t))return r[t]=2,i[t];if(G(o,t))return r[t]=3,o[t];if(s!==Y&&G(s,t))return r[t]=4,s[t];sn&&(r[t]=0)}}const p=Wt[t];let d,b;if(p)return t==="$attrs"&&fe(e.attrs,"get",""),p(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(s!==Y&&G(s,t))return r[t]=4,s[t];if(b=a.config.globalProperties,G(b,t))return b[t]},set({_:e},t,s){const{data:n,setupState:i,ctx:o}=e;return Ks(i,t)?(i[t]=s,!0):n!==Y&&G(n,t)?(n[t]=s,!0):G(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:i,props:o,type:r}},l){let a;return!!(s[l]||e!==Y&&l[0]!=="$"&&G(e,l)||Ks(t,l)||G(o,l)||G(n,l)||G(Wt,l)||G(i.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:G(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Fn(e){return M(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let sn=!0;function Dr(e){const t=Xi(e),s=e.proxy,n=e.ctx;sn=!1,t.beforeCreate&&Bn(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:l,provide:a,inject:p,created:d,beforeMount:b,mounted:C,beforeUpdate:O,updated:F,activated:_,deactivated:E,beforeDestroy:w,beforeUnmount:P,destroyed:j,unmounted:N,render:oe,renderTracked:Re,renderTriggered:je,errorCaptured:ot,serverPrefetch:ns,expose:ft,inheritAttrs:It,components:is,directives:os,filters:Ns}=t;if(p&&Mr(p,n,null),r)for(const se in r){const X=r[se];V(X)&&(n[se]=X.bind(s))}if(i){const se=i.call(s,s);Z(se)&&(e.data=Jt(se))}if(sn=!0,o)for(const se in o){const X=o[se],pt=V(X)?X.bind(s,s):V(X.get)?X.get.bind(s,s):Ke,rs=!V(X)&&V(X.set)?X.set.bind(s):Ke,ht=Ae({get:pt,set:rs});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>ht.value,set:Ne=>ht.value=Ne})}if(l)for(const se in l)Yi(l[se],n,s,se);if(a){const se=V(a)?a.call(s):a;Reflect.ownKeys(se).forEach(X=>{_r(X,se[X])})}d&&Bn(d,e,"c");function ge(se,X){M(X)?X.forEach(pt=>se(pt.bind(s))):X&&se(X.bind(s))}if(ge(Cr,b),ge(it,C),ge(Pr,O),ge(Ar,F),ge(Tr,_),ge(Er,E),ge(jr,ot),ge(Rr,Re),ge(Ir,je),ge(Or,P),ge(kn,N),ge(zr,ns),M(ft))if(ft.length){const se=e.exposed||(e.exposed={});ft.forEach(X=>{Object.defineProperty(se,X,{get:()=>s[X],set:pt=>s[X]=pt,enumerable:!0})})}else e.exposed||(e.exposed={});oe&&e.render===Ke&&(e.render=oe),It!=null&&(e.inheritAttrs=It),is&&(e.components=is),os&&(e.directives=os),ns&&qi(e)}function Mr(e,t,s=Ke){M(e)&&(e=nn(e));for(const n in e){const i=e[n];let o;Z(i)?"default"in i?o=ps(i.from||n,i.default,!0):o=ps(i.from||n):o=ps(i),pe(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[n]=o}}function Bn(e,t,s){Ie(M(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Yi(e,t,s,n){let i=n.includes(".")?Gi(s,n):()=>s[n];if(ne(e)){const o=t[e];V(o)&&Hs(i,o)}else if(V(e))Hs(i,e.bind(s));else if(Z(e))if(M(e))e.forEach(o=>Yi(o,t,s,n));else{const o=V(e.handler)?e.handler.bind(s):t[e.handler];V(o)&&Hs(i,o,e)}}function Xi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let a;return l?a=l:!i.length&&!s&&!n?a=t:(a={},i.length&&i.forEach(p=>ys(a,p,r,!0)),ys(a,t,r)),Z(t)&&o.set(t,a),a}function ys(e,t,s,n=!1){const{mixins:i,extends:o}=t;o&&ys(e,o,s,!0),i&&i.forEach(r=>ys(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const l=Lr[r]||s&&s[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Lr={data:Hn,props:Vn,emits:Vn,methods:Mt,computed:Mt,beforeCreate:me,created:me,beforeMount:me,mounted:me,beforeUpdate:me,updated:me,beforeDestroy:me,beforeUnmount:me,destroyed:me,unmounted:me,activated:me,deactivated:me,errorCaptured:me,serverPrefetch:me,components:Mt,directives:Mt,watch:Br,provide:Hn,inject:Fr};function Hn(e,t){return t?e?function(){return he(V(e)?e.call(this,this):e,V(t)?t.call(this,this):t)}:t:e}function Fr(e,t){return Mt(nn(e),nn(t))}function nn(e){if(M(e)){const t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ce(t)}Modifiers`]||e[`${dt(t)}Modifiers`];function Wr(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||Y;let i=s;const o=t.startsWith("update:"),r=o&&Kr(n,t.slice(7));r&&(r.trim&&(i=s.map(d=>ne(d)?d.trim():d)),r.number&&(i=s.map(Cs)));let l,a=n[l=Ds(t)]||n[l=Ds(Ce(t))];!a&&o&&(a=n[l=Ds(dt(t))]),a&&Ie(a,e,6,i);const p=n[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ie(p,e,6,i)}}const Gr=new WeakMap;function eo(e,t,s=!1){const n=s?Gr:t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let r={},l=!1;if(!V(e)){const a=p=>{const d=eo(p,t,!0);d&&(l=!0,he(r,d))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(Z(e)&&n.set(e,null),null):(M(o)?o.forEach(a=>r[a]=null):he(r,o),Z(e)&&n.set(e,r),r)}function Is(e,t){return!e||!Ts(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),G(e,t[0].toLowerCase()+t.slice(1))||G(e,dt(t))||G(e,t))}function Kn(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:r,attrs:l,emit:a,render:p,renderCache:d,props:b,data:C,setupState:O,ctx:F,inheritAttrs:_}=e,E=vs(e);let w,P;try{if(s.shapeFlag&4){const N=i||n,oe=N;w=He(p.call(oe,N,d,b,O,C,F)),P=l}else{const N=t;w=He(N.length>1?N(b,{attrs:l,slots:r,emit:a}):N(b,null)),P=t.props?l:qr(l)}}catch(N){Gt.length=0,Os(N,e,1),w=ue(ct)}let j=w;if(P&&_!==!1){const N=Object.keys(P),{shapeFlag:oe}=j;N.length&&oe&7&&(o&&N.some(Es)&&(P=Zr(P,o)),j=Ct(j,P,!1,!0))}return s.dirs&&(j=Ct(j,null,!1,!0),j.dirs=j.dirs?j.dirs.concat(s.dirs):s.dirs),s.transition&&xn(j,s.transition),w=j,vs(E),w}const qr=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ts(s))&&((t||(t={}))[s]=e[s]);return t},Zr=(e,t)=>{const s={};for(const n in e)(!Es(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Jr(e,t,s){const{props:n,children:i,component:o}=e,{props:r,children:l,patchFlag:a}=t,p=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?Wn(n,r,p):!!r;if(a&8){const d=t.dynamicProps;for(let b=0;bObject.create(so),io=e=>Object.getPrototypeOf(e)===so;function Xr(e,t,s,n=!1){const i={},o=no();e.propsDefaults=Object.create(null),oo(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);s?e.props=n?i:rr(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Qr(e,t,s,n){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,l=W(i),[a]=e.propsOptions;let p=!1;if((n||r>0)&&!(r&16)){if(r&8){const d=e.vnode.dynamicProps;for(let b=0;b{a=!0;const[C,O]=ro(b,t,!0);he(r,C),O&&l.push(...O)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!o&&!a)return Z(e)&&n.set(e,xt),xt;if(M(o))for(let d=0;de==="_"||e==="_ctx"||e==="$stable",Tn=e=>M(e)?e.map(He):[He(e)],tl=(e,t,s)=>{if(t._n)return t;const n=vr((...i)=>Tn(t(...i)),s);return n._c=!1,n},lo=(e,t,s)=>{const n=e._ctx;for(const i in e){if(Sn(i))continue;const o=e[i];if(V(o))t[i]=tl(i,o,n);else if(o!=null){const r=Tn(o);t[i]=()=>r}}},ao=(e,t)=>{const s=Tn(t);e.slots.default=()=>s},co=(e,t,s)=>{for(const n in t)(s||!Sn(n))&&(e[n]=t[n])},sl=(e,t,s)=>{const n=e.slots=no();if(e.vnode.shapeFlag&32){const i=t._;i?(co(n,t,s),s&&wi(n,"_",i,!0)):lo(t,n)}else t&&ao(e,t)},nl=(e,t,s)=>{const{vnode:n,slots:i}=e;let o=!0,r=Y;if(n.shapeFlag&32){const l=t._;l?s&&l===1?o=!1:co(i,t,s):(o=!t.$stable,lo(t,i)),r=t}else t&&(ao(e,t),r={default:1});if(o)for(const l in i)!Sn(l)&&r[l]==null&&delete i[l]},_e=al;function il(e){return ol(e)}function ol(e,t){const s=Ps();s.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:r,createText:l,createComment:a,setText:p,setElementText:d,parentNode:b,nextSibling:C,setScopeId:O=Ke,insertStaticContent:F}=e,_=(c,f,v,T=null,S=null,x=null,I=void 0,z=null,A=!!f.dynamicChildren)=>{if(c===f)return;c&&!Dt(c,f)&&(T=ls(c),Ne(c,S,x,!0),c=null),f.patchFlag===-2&&(A=!1,f.dynamicChildren=null);const{type:k,ref:D,shapeFlag:R}=f;switch(k){case Rs:E(c,f,v,T);break;case ct:w(c,f,v,T);break;case Gs:c==null&&P(f,v,T,I);break;case te:is(c,f,v,T,S,x,I,z,A);break;default:R&1?oe(c,f,v,T,S,x,I,z,A):R&6?os(c,f,v,T,S,x,I,z,A):(R&64||R&128)&&k.process(c,f,v,T,S,x,I,z,A,jt)}D!=null&&S?Vt(D,c&&c.ref,x,f||c,!f):D==null&&c&&c.ref!=null&&Vt(c.ref,null,x,c,!0)},E=(c,f,v,T)=>{if(c==null)n(f.el=l(f.children),v,T);else{const S=f.el=c.el;f.children!==c.children&&p(S,f.children)}},w=(c,f,v,T)=>{c==null?n(f.el=a(f.children||""),v,T):f.el=c.el},P=(c,f,v,T)=>{[c.el,c.anchor]=F(c.children,f,v,T,c.el,c.anchor)},j=({el:c,anchor:f},v,T)=>{let S;for(;c&&c!==f;)S=C(c),n(c,v,T),c=S;n(f,v,T)},N=({el:c,anchor:f})=>{let v;for(;c&&c!==f;)v=C(c),i(c),c=v;i(f)},oe=(c,f,v,T,S,x,I,z,A)=>{if(f.type==="svg"?I="svg":f.type==="math"&&(I="mathml"),c==null)Re(f,v,T,S,x,I,z,A);else{const k=c.el&&c.el._isVueCE?c.el:null;try{k&&k._beginPatch(),ns(c,f,S,x,I,z,A)}finally{k&&k._endPatch()}}},Re=(c,f,v,T,S,x,I,z)=>{let A,k;const{props:D,shapeFlag:R,transition:U,dirs:L}=c;if(A=c.el=r(c.type,x,D&&D.is,D),R&8?d(A,c.children):R&16&&ot(c.children,A,null,T,S,Ws(c,x),I,z),L&>(c,null,T,"created"),je(A,c,c.scopeId,I,T),D){for(const J in D)J!=="value"&&!Ft(J)&&o(A,J,null,D[J],x,T);"value"in D&&o(A,"value",null,D.value,x),(k=D.onVnodeBeforeMount)&&Le(k,T,c)}L&>(c,null,T,"beforeMount");const K=rl(S,U);K&&U.beforeEnter(A),n(A,f,v),((k=D&&D.onVnodeMounted)||K||L)&&_e(()=>{try{k&&Le(k,T,c),K&&U.enter(A),L&>(c,null,T,"mounted")}finally{}},S)},je=(c,f,v,T,S)=>{if(v&&O(c,v),T)for(let x=0;x{for(let k=A;k{const z=f.el=c.el;let{patchFlag:A,dynamicChildren:k,dirs:D}=f;A|=c.patchFlag&16;const R=c.props||Y,U=f.props||Y;let L;if(v&&mt(v,!1),(L=U.onVnodeBeforeUpdate)&&Le(L,v,f,c),D&>(f,c,v,"beforeUpdate"),v&&mt(v,!0),k&&(!c.dynamicChildren||c.dynamicChildren.length!==k.length)&&(A=0,I=!1,k=null),(R.innerHTML&&U.innerHTML==null||R.textContent&&U.textContent==null)&&d(z,""),k?ft(c.dynamicChildren,k,z,v,T,Ws(f,S),x):I||X(c,f,z,null,v,T,Ws(f,S),x,!1),A>0){if(A&16)It(z,R,U,v,S);else if(A&2&&R.class!==U.class&&o(z,"class",null,U.class,S),A&4&&o(z,"style",R.style,U.style,S),A&8){const K=f.dynamicProps;for(let J=0;J{L&&Le(L,v,f,c),D&>(f,c,v,"updated")},T)},ft=(c,f,v,T,S,x,I)=>{for(let z=0;z{if(f!==v){if(f!==Y)for(const x in f)!Ft(x)&&!(x in v)&&o(c,x,f[x],null,S,T);for(const x in v){if(Ft(x))continue;const I=v[x],z=f[x];I!==z&&x!=="value"&&o(c,x,z,I,S,T)}"value"in v&&o(c,"value",f.value,v.value,S)}},is=(c,f,v,T,S,x,I,z,A)=>{const k=f.el=c?c.el:l(""),D=f.anchor=c?c.anchor:l("");let{patchFlag:R,dynamicChildren:U,slotScopeIds:L}=f;L&&(z=z?z.concat(L):L),c==null?(n(k,v,T),n(D,v,T),ot(f.children||[],v,D,S,x,I,z,A)):R>0&&R&64&&U&&c.dynamicChildren&&c.dynamicChildren.length===U.length?(ft(c.dynamicChildren,U,v,S,x,I,z),(f.key!=null||S&&f===S.subTree)&&uo(c,f,!0)):X(c,f,v,D,S,x,I,z,A)},os=(c,f,v,T,S,x,I,z,A)=>{f.slotScopeIds=z,c==null?f.shapeFlag&512?S.ctx.activate(f,v,T,I,A):Ns(f,v,T,S,x,I,A):Cn(c,f,A)},Ns=(c,f,v,T,S,x,I)=>{const z=c.component=gl(c,T,S);if(Zi(c)&&(z.ctx.renderer=jt),bl(z,!1,I),z.asyncDep){if(S&&S.registerDep(z,ge,I),!c.el){const A=z.subTree=ue(ct);w(null,A,f,v),c.placeholder=A.el}}else ge(z,c,f,v,S,x,I)},Cn=(c,f,v)=>{const T=f.component=c.component;if(Jr(c,f,v))if(T.asyncDep&&!T.asyncResolved){se(T,f,v);return}else T.next=f,T.update();else f.el=c.el,T.vnode=f},ge=(c,f,v,T,S,x,I)=>{const z=()=>{if(c.isMounted){let{next:R,bu:U,u:L,parent:K,vnode:J}=c;{const De=fo(c);if(De){R&&(R.el=J.el,se(c,R,I)),De.asyncDep.then(()=>{_e(()=>{c.isUnmounted||k()},S)});return}}let q=R,ie;mt(c,!1),R?(R.el=J.el,se(c,R,I)):R=J,U&&fs(U),(ie=R.props&&R.props.onVnodeBeforeUpdate)&&Le(ie,K,R,J),mt(c,!0);const ae=Kn(c),Ue=c.subTree;c.subTree=ae,_(Ue,ae,b(Ue.el),ls(Ue),c,S,x),R.el=ae.el,q===null&&Yr(c,ae.el),L&&_e(L,S),(ie=R.props&&R.props.onVnodeUpdated)&&_e(()=>Le(ie,K,R,J),S)}else{let R;const{el:U,props:L}=f,{bm:K,m:J,parent:q,root:ie,type:ae}=c,Ue=Kt(f);mt(c,!1),K&&fs(K),!Ue&&(R=L&&L.onVnodeBeforeMount)&&Le(R,q,f),mt(c,!0);{ie.ce&&ie.ce._hasShadowRoot()&&ie.ce._injectChildStyle(ae,c.parent?c.parent.type:void 0);const De=c.subTree=Kn(c);_(null,De,v,T,c,S,x),f.el=De.el}if(J&&_e(J,S),!Ue&&(R=L&&L.onVnodeMounted)){const De=f;_e(()=>Le(R,q,De),S)}(f.shapeFlag&256||q&&Kt(q.vnode)&&q.vnode.shapeFlag&256)&&c.a&&_e(c.a,S),c.isMounted=!0,f=v=T=null}};c.scope.on();const A=c.effect=new Ti(z);c.scope.off();const k=c.update=A.run.bind(A),D=c.job=A.runIfDirty.bind(A);D.i=c,D.id=c.uid,A.scheduler=()=>wn(D),mt(c,!0),k()},se=(c,f,v)=>{f.component=c;const T=c.vnode.props;c.vnode=f,c.next=null,Qr(c,f.props,T,v),nl(c,f.children,v),Ge(),Dn(c),qe()},X=(c,f,v,T,S,x,I,z,A=!1)=>{const k=c&&c.children,D=c?c.shapeFlag:0,R=f.children,{patchFlag:U,shapeFlag:L}=f;if(U>0){if(U&128){rs(k,R,v,T,S,x,I,z,A);return}else if(U&256){pt(k,R,v,T,S,x,I,z,A);return}}L&8?(D&16&&Rt(k,S,x),R!==k&&d(v,R)):D&16?L&16?rs(k,R,v,T,S,x,I,z,A):Rt(k,S,x,!0):(D&8&&d(v,""),L&16&&ot(R,v,T,S,x,I,z,A))},pt=(c,f,v,T,S,x,I,z,A)=>{c=c||xt,f=f||xt;const k=c.length,D=f.length,R=Math.min(k,D);let U;for(U=0;UD?Rt(c,S,x,!0,!1,R):ot(f,v,T,S,x,I,z,A,R)},rs=(c,f,v,T,S,x,I,z,A)=>{let k=0;const D=f.length;let R=c.length-1,U=D-1;for(;k<=R&&k<=U;){const L=c[k],K=f[k]=A?Xe(f[k]):He(f[k]);if(Dt(L,K))_(L,K,v,null,S,x,I,z,A);else break;k++}for(;k<=R&&k<=U;){const L=c[R],K=f[U]=A?Xe(f[U]):He(f[U]);if(Dt(L,K))_(L,K,v,null,S,x,I,z,A);else break;R--,U--}if(k>R){if(k<=U){const L=U+1,K=LU)for(;k<=R;)Ne(c[k],S,x,!0),k++;else{const L=k,K=k,J=new Map;for(k=K;k<=U;k++){const ye=f[k]=A?Xe(f[k]):He(f[k]);ye.key!=null&&J.set(ye.key,k)}let q,ie=0;const ae=U-K+1;let Ue=!1,De=0;const Nt=new Array(ae);for(k=0;k=ae){Ne(ye,S,x,!0);continue}let Me;if(ye.key!=null)Me=J.get(ye.key);else for(q=K;q<=U;q++)if(Nt[q-K]===0&&Dt(ye,f[q])){Me=q;break}Me===void 0?Ne(ye,S,x,!0):(Nt[Me-K]=k+1,Me>=De?De=Me:Ue=!0,_(ye,f[Me],v,null,S,x,I,z,A),ie++)}const On=Ue?ll(Nt):xt;for(q=On.length-1,k=ae-1;k>=0;k--){const ye=K+k,Me=f[ye],zn=f[ye+1],In=ye+1{const{el:x,type:I,transition:z,children:A,shapeFlag:k}=c;if(k&6){ht(c.component.subTree,f,v,T);return}if(k&128){c.suspense.move(f,v,T);return}if(k&64){I.move(c,f,v,jt);return}if(I===te){n(x,f,v);for(let R=0;Rz.enter(x),S));else{const{leave:R,delayLeave:U,afterLeave:L}=z,K=()=>{c.ctx.isUnmounted?i(x):n(x,f,v)},J=()=>{const q=x._isLeaving||!!x[Vs];x._isLeaving&&x[Vs](!0),z.persisted&&!q?K():R(x,()=>{K(),L&&L()})};U?U(x,K,J):J()}else n(x,f,v)},Ne=(c,f,v,T=!1,S=!1)=>{const{type:x,props:I,ref:z,children:A,dynamicChildren:k,shapeFlag:D,patchFlag:R,dirs:U,cacheIndex:L,memo:K}=c;if(R===-2&&(S=!1),z!=null&&(Ge(),Vt(z,null,v,c,!0),qe()),L!=null&&(f.renderCache[L]=void 0),D&256){f.ctx.deactivate(c);return}const J=D&1&&U,q=!Kt(c);let ie;if(q&&(ie=I&&I.onVnodeBeforeUnmount)&&Le(ie,f,c),D&6)Po(c.component,v,T);else{if(D&128){c.suspense.unmount(v,T);return}J&>(c,null,f,"beforeUnmount"),D&64?c.type.remove(c,f,v,jt,T):k&&!k.hasOnce&&(x!==te||R>0&&R&64)?Rt(k,f,v,!1,!0):(x===te&&R&384||!S&&D&16)&&Rt(A,f,v),T&&Pn(c)}const ae=K!=null&&L==null;(q&&(ie=I&&I.onVnodeUnmounted)||J||ae)&&_e(()=>{ie&&Le(ie,f,c),J&>(c,null,f,"unmounted"),ae&&(c.el=null)},v)},Pn=c=>{const{type:f,el:v,anchor:T,transition:S}=c;if(f===te){Co(v,T);return}if(f===Gs){N(c);return}const x=()=>{i(v),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(c.shapeFlag&1&&S&&!S.persisted){const{leave:I,delayLeave:z}=S,A=()=>I(v,x);z?z(c.el,x,A):A()}else x()},Co=(c,f)=>{let v;for(;c!==f;)v=C(c),i(c),c=v;i(f)},Po=(c,f,v)=>{const{bum:T,scope:S,job:x,subTree:I,um:z,m:A,a:k}=c;qn(A),qn(k),T&&fs(T),S.stop(),x&&(x.flags|=8,Ne(I,c,f,v)),z&&_e(z,f),_e(()=>{c.isUnmounted=!0},f)},Rt=(c,f,v,T=!1,S=!1,x=0)=>{for(let I=x;I{if(c.shapeFlag&6)return ls(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const f=C(c.anchor||c.el),v=f&&f[kr];return v?C(v):f};let Us=!1;const An=(c,f,v)=>{let T;c==null?f._vnode&&(Ne(f._vnode,null,null,!0),T=f._vnode.component):_(f._vnode||null,c,f,null,null,null,v),f._vnode=c,Us||(Us=!0,Dn(T),Hi(),Us=!1)},jt={p:_,um:Ne,m:ht,r:Pn,mt:Ns,mc:ot,pc:X,pbc:ft,n:ls,o:e};return{render:An,hydrate:void 0,createApp:Vr(An)}}function Ws({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 mt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function rl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function uo(e,t,s=!1){const n=e.children,i=t.children;if(M(n)&&M(i))for(let o=0;o>1,e[s[l]]0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,r=s[o-1];o-- >0;)s[o]=r,r=t[r];return s}function fo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fo(t)}function qn(e){if(e)for(let t=0;te.__isSuspense;function al(e,t){t&&t.pendingBranch?M(e)?t.effects.push(...e):t.effects.push(e):br(e)}const te=Symbol.for("v-fgt"),Rs=Symbol.for("v-txt"),ct=Symbol.for("v-cmt"),Gs=Symbol.for("v-stc"),Gt=[];let we=null;function y(e=!1){Gt.push(we=e?null:[])}function cl(){Gt.pop(),we=Gt[Gt.length-1]||null}let Xt=1;function Zn(e,t=!1){Xt+=e,e<0&&we&&t&&(we.hasOnce=!0)}function go(e){return e.dynamicChildren=Xt>0?we||xt:null,cl(),Xt>0&&we&&we.push(e),e}function $(e,t,s,n,i,o){return go(u(e,t,s,n,i,o,!0))}function Je(e,t,s,n,i){return go(ue(e,t,s,n,i,!0))}function mo(e){return e?e.__v_isVNode===!0:!1}function Dt(e,t){return e.type===t.type&&e.key===t.key}const bo=({key:e})=>e??null,hs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ne(e)||pe(e)||V(e)?{i:ke,r:e,k:t,f:!!s}:e:null);function u(e,t=null,s=null,n=0,i=null,o=e===te?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&bo(t),ref:t&&hs(t),scopeId:Ki,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:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ke};return l?(ws(a,s),o&128&&e.normalize(a)):s&&(a.shapeFlag|=ne(s)?8:16),Xt>0&&!r&&we&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&we.push(a),a}const ue=ul;function ul(e,t=null,s=null,n=0,i=null,o=!1){if((!e||e===Nr)&&(e=ct),mo(e)){const l=Ct(e,t,!0);return s&&ws(l,s),Xt>0&&!o&&we&&(l.shapeFlag&6?we[we.indexOf(e)]=l:we.push(l)),l.patchFlag=-2,l}if(wl(e)&&(e=e.__vccOpts),t){t=dl(t);let{class:l,style:a}=t;l&&!ne(l)&&(t.class=Oe(l)),Z(a)&&(yn(a)&&!M(a)&&(a=he({},a)),t.style=fn(a))}const r=ne(e)?1:ho(e)?128:Sr(e)?64:Z(e)?4:V(e)?2:0;return u(e,t,s,n,i,r,o,!0)}function dl(e){return e?yn(e)||io(e)?he({},e):e:null}function Ct(e,t,s=!1,n=!1){const{props:i,ref:o,patchFlag:r,children:l,transition:a}=e,p=t?fl(i||{},t):i,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&bo(p),ref:t&&t.ref?s&&o?M(o)?o.concat(hs(t)):[o,hs(t)]:hs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==te?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ct(e.ssContent),ssFallback:e.ssFallback&&Ct(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&n&&xn(d,a.clone(d)),d}function Ee(e=" ",t=0){return ue(Rs,null,e,t)}function H(e="",t=!1){return t?(y(),Je(ct,null,e)):ue(ct,null,e)}function He(e){return e==null||typeof e=="boolean"?ue(ct):M(e)?ue(te,null,e.slice()):mo(e)?Xe(e):ue(Rs,null,String(e))}function Xe(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ct(e)}function ws(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(M(t))s=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),ws(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!io(t)?t._ctx=ke:i===3&&ke&&(ke.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(V(t)){if(n&65){ws(e,{default:t});return}t={default:t,_ctx:ke},s=32}else t=String(t),n&64?(s=16,t=[Ee(t)]):s=8;e.children=t,e.shapeFlag|=s}function fl(...e){const t={};for(let s=0;sve||ke;let xs,rn;{const e=Ps(),t=(s,n)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(n),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};xs=t("__VUE_INSTANCE_SETTERS__",s=>ve=s),rn=t("__VUE_SSR_SETTERS__",s=>Qt=s)}const ss=e=>{const t=ve;return xs(e),e.scope.on(),()=>{e.scope.off(),xs(t)}},Jn=()=>{ve&&ve.scope.off(),xs(null)};function vo(e){return e.vnode.shapeFlag&4}let Qt=!1;function bl(e,t=!1,s=!1){t&&rn(t);const{props:n,children:i}=e.vnode,o=vo(e);Xr(e,n,o,t),sl(e,i,s||t);const r=o?vl(e,t):void 0;return t&&rn(!1),r}function vl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ur);const{setup:n}=s;if(n){Ge();const i=e.setupContext=n.length>1?yl(e):null,o=ss(e),r=ts(n,e,0,[e.props,i]),l=bi(r);if(qe(),o(),(l||e.sp)&&!Kt(e)&&qi(e),l){if(r.then(Jn,Jn),t)return r.then(a=>{Yn(e,a)}).catch(a=>{Os(a,e,0)});e.asyncDep=r}else Yn(e,r)}else _o(e)}function Yn(e,t,s){V(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=Mi(t)),_o(e)}function _o(e,t,s){const n=e.type;e.render||(e.render=n.render||Ke);{const i=ss(e);Ge();try{Dr(e)}finally{qe(),i()}}}const _l={get(e,t){return fe(e,"get",""),e[t]}};function yl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,_l),slots:e.slots,emit:e.emit,expose:t}}function js(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Mi(lr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Wt)return Wt[s](e)},has(t,s){return s in t||s in Wt}})):e.proxy}function wl(e){return V(e)&&"__vccOpts"in e}const Ae=(e,t)=>fr(e,t,Qt),xl="3.5.39";/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ln;const Xn=typeof window<"u"&&window.trustedTypes;if(Xn)try{ln=Xn.createPolicy("vue",{createHTML:e=>e})}catch{}const yo=ln?e=>ln.createHTML(e):e=>e,kl="http://www.w3.org/2000/svg",Sl="http://www.w3.org/1998/Math/MathML",Ye=typeof document<"u"?document:null,Qn=Ye&&Ye.createElement("template"),Tl={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 i=t==="svg"?Ye.createElementNS(kl,e):t==="mathml"?Ye.createElementNS(Sl,e):s?Ye.createElement(e,{is:s}):Ye.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Ye.createTextNode(e),createComment:e=>Ye.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ye.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const r=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Qn.innerHTML=yo(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const l=Qn.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},El=Symbol("_vtc");function $l(e,t,s){const n=e[El];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const ei=Symbol("_vod"),Cl=Symbol("_vsh"),Pl=Symbol(""),Al=/(?:^|;)\s*display\s*:/;function Ol(e,t,s){const n=e.style,i=ne(s);let o=!1;if(s&&!i){if(t)if(ne(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();s[l]==null&&Lt(n,l,"")}else for(const r in t)s[r]==null&&Lt(n,r,"");for(const r in s){r==="display"&&(o=!0);const l=s[r];l!=null?Il(e,r,!ne(t)&&t?t[r]:void 0,l)||Lt(n,r,l):Lt(n,r,"")}}else if(i){if(t!==s){const r=n[Pl];r&&(s+=";"+r),n.cssText=s,o=Al.test(s)}}else t&&e.removeAttribute("style");ei in e&&(e[ei]=o?n.display:"",e[Cl]&&(n.display="none"))}const ti=/\s*!important$/;function Lt(e,t,s){if(M(s))s.forEach(n=>Lt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=zl(e,t);ti.test(s)?e.setProperty(dt(n),s.replace(ti,""),"important"):e[n]=s}}const si=["Webkit","Moz","ms"],qs={};function zl(e,t){const s=qs[t];if(s)return s;let n=Ce(t);if(n!=="filter"&&n in e)return qs[t]=n;n=yi(n);for(let i=0;iZs||(Ml.then(()=>Zs=0),Zs=Date.now());function Fl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const i=s.value;if(M(i)){const o=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{o.call(n),n._stopped=!0};const r=i.slice(),l=[n];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Bl=(e,t,s,n,i,o)=>{const r=i==="svg";t==="class"?$l(e,n,r):t==="style"?Ol(e,s,n):Ts(t)?Es(t)||jl(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Hl(e,t,n,r))?(oi(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ii(e,t,n,r,o,t!=="value")):e._isVueCE&&(Vl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ne(n)))?oi(e,Ce(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),ii(e,t,n,r))};function Hl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&li(t)&&V(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 i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return li(t)&&ne(s)?!1:t in e}function Vl(e,t){const s=e._def.props;if(!s)return!1;const n=Ce(t);return Array.isArray(s)?s.some(i=>Ce(i)===n):Object.keys(s).some(i=>Ce(i)===n)}const ut=e=>{const t=e.props["onUpdate:modelValue"]||!1;return M(t)?s=>fs(t,s):t};function Kl(e){e.target.composing=!0}function ai(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $e=Symbol("_assign");function ci(e,t,s){return t&&(e=e.trim()),s&&(e=Cs(e)),e}const de={created(e,{modifiers:{lazy:t,trim:s,number:n}},i){e[$e]=ut(i);const o=n||i.props&&i.props.type==="number";tt(e,t?"change":"input",r=>{r.target.composing||e[$e](ci(e.value,s,o))}),(s||o)&&tt(e,"change",()=>{e.value=ci(e.value,s,o)}),t||(tt(e,"compositionstart",Kl),tt(e,"compositionend",ai),tt(e,"change",ai))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:i,number:o}},r){if(e[$e]=ut(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Cs(e.value):e.value,a=t??"";if(l===a)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(n&&t===s||i&&e.value.trim()===a)||(e.value=a)}},Wl={deep:!0,created(e,t,s){e[$e]=ut(s),tt(e,"change",()=>{const n=e._modelValue,i=Pt(e),o=e.checked,r=e[$e];if(M(n)){const l=pn(n,i),a=l!==-1;if(o&&!a)r(n.concat(i));else if(!o&&a){const p=[...n];p.splice(l,1),r(p)}}else if(zt(n)){const l=new Set(n);o?l.add(i):l.delete(i),r(l)}else r(wo(e,o))})},mounted:ui,beforeUpdate(e,t,s){e[$e]=ut(s),ui(e,t,s)}};function ui(e,{value:t,oldValue:s},n){e._modelValue=t;let i;if(M(t))i=pn(t,n.props.value)>-1;else if(zt(t))i=t.has(n.props.value);else{if(t===s)return;i=at(t,wo(e,!0))}e.checked!==i&&(e.checked=i)}const Gl={created(e,{value:t},s){e.checked=at(t,s.props.value),e[$e]=ut(s),tt(e,"change",()=>{e[$e](Pt(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[$e]=ut(n),t!==s&&(e.checked=at(t,n.props.value))}},ks={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const i=zt(t);tt(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>s?Cs(Pt(r)):Pt(r));e[$e](e.multiple?i?new Set(o):o:o[0]),e._assigning=!0,Fi(()=>{e._assigning=!1})}),e[$e]=ut(n)},mounted(e,{value:t}){di(e,t)},beforeUpdate(e,t,s){e[$e]=ut(s)},updated(e,{value:t}){e._assigning||di(e,t)}};function di(e,t){const s=e.multiple,n=M(t);if(!(s&&!n&&!zt(t))){for(let i=0,o=e.options.length;iString(p)===String(l)):r.selected=pn(t,l)>-1}else r.selected=t.has(l);else if(at(Pt(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Pt(e){return"_value"in e?e._value:e.value}function wo(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const ql={created(e,t,s){ds(e,t,s,null,"created")},mounted(e,t,s){ds(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){ds(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){ds(e,t,s,n,"updated")}};function Zl(e,t){switch(e){case"SELECT":return ks;case"TEXTAREA":return de;default:switch(t){case"checkbox":return Wl;case"radio":return Gl;default:return de}}}function ds(e,t,s,n,i){const r=Zl(e.tagName,s.props&&s.props.type)[i];r&&r(e,t,s,n)}const Jl=["ctrl","shift","alt","meta"],Yl={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)=>Jl.some(s=>e[`${s}Key`]&&!t.includes(s))},Xl=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((i,...o)=>{for(let r=0;r{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(i=>{if(!("key"in i))return;const o=dt(i.key);if(t.some(r=>r===o||Ql[r]===o))return e(i)}))},ea=he({patchProp:Bl},Tl);let fi;function ta(){return fi||(fi=il(ea))}const sa=((...e)=>{const t=ta().createApp(...e),{mount:s}=t;return t.mount=n=>{const i=ia(n);if(!i)return;const o=t._component;!V(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=s(i,!1,na(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t});function na(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ia(e){return ne(e)?document.querySelector(e):e}const ko="dh-panel-theme";function oa(){var e;try{const t=localStorage.getItem(ko);if(t==="dark"||t==="light")return t}catch{}return(e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}const Et=B(oa());function So(e){Et.value=e,document.documentElement.classList.toggle("dark",e==="dark");try{localStorage.setItem(ko,e)}catch{}}function pi(){So(Et.value==="dark"?"light":"dark")}So(Et.value);const ra={apiServer:"API server",switchToLight:"Switch to light theme",switchToDark:"Switch to dark theme",theme:"Theme",signOut:"Sign out",loading:"Loading…",standardUserNote:"Signed in as a standard user — management sections need an admin role",footer:"DriverVault — car maintenance & service tracker."},la={overview:"Overview",users:"Users",orgs:"Organizations",server:"API Server",pocketbase:"PocketBase",webapp:"Web App",plugins:"Plugins",api:"API"},aa={title:"Sign in",subtitle:"Superadmin console for the DriverVault API Server.",email:"Email",password:"Password",submit:"Sign in",submitting:"Signing in…",invalid:"Invalid email or password.",failed:"Could not sign in.",authNote:"Authenticates against PocketBase through this server"},ca={title:"Status",unreachable:"unreachable",checking:"Checking…",apiServer:"API Server",pocketBase:"PocketBase",webApp:"Web App",thisProcess:"this process"},ua={create:"Create",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",rename:"Rename",empty:"—",name:"Name",email:"Email",role:"Role",organization:"Organization"},da={title:"Users",allOrgs:"All organizations",yourOrg:"Your organization",newUser:"New user",password:"Password",passwordUnchanged:"Password (blank = unchanged)",passwordPlaceholder:"min 8 characters",orgNone:"— none —",you:"you",empty:"No users.",confirmDelete:"Delete {email}? This cannot be undone."},fa={title:"Organizations",subtitle:"Tenants users belong to",subtitleOwn:"Your organization",subtitleNone:"Create one to manage your own team",newOrg:"New organization",namePlaceholder:"Acme Fleet",empty:"No organizations yet.",createHint:"You have no organization yet. Create one to become its admin.",colId:"ID",confirmDelete:'Delete the organization "{name}"?',confirmDeleteOwn:'Delete your organization "{name}"? You will be removed from it and become a regular user.'},pa={title:"API Server",subtitle:"How this server identifies itself to the clients that connect to it",name:"Server name",nameHint:"Shown by clients that can be pointed at more than one DriverVault, such as the Web App's server switcher. Reported by /api/health.",saveApply:"Save & apply",persistedEnv:"persisted to .env",savedNotice:"Saved. The new name applies to the next request."},ha={title:"PocketBase",subtitle:"Database connection used by every endpoint",connected:"connected",noSuperuser:"no superuser",unreachable:"unreachable",baseUrl:"Base URL",superuserEmail:"Superuser email",superuserPassword:"Superuser password",passwordUnchanged:"unchanged",passwordNotSet:"not set",saveApply:"Save & apply",testConnection:"Test connection",persistedEnv:"persisted to .env",testOk:"Connection OK — superuser authenticated.",testReachableNoAuth:"PocketBase is reachable, but the service account did not authenticate.",testUnreachable:"PocketBase is not reachable at that address.",savedNotice:"Saved. The server is now using this PocketBase."},ga={title:"Web App",subtitle:"Address probed by the status check, and who may call this API from a browser",reachable:"reachable",unreachable:"unreachable",baseUrl:"Base URL",allowedOrigins:"Allowed origins",originsHint:"Comma separated, or {star} for any. Native mobile apps are not subject to CORS.",saveApply:"Save & apply",testConnection:"Test connection",persistedEnv:"persisted to .env",testOk:"Web App is reachable.",testFailed:"Web App did not answer its health check at that address.",savedNotice:"Saved. New origins apply to the next request."},ma={title:"Plugins",subtitle:"Third-party service integrations",registerExternal:"Register external",cancelRegister:"Cancel",name:"Name",baseUrl:"Base URL",provider:"Provider",register:"Register",empty:"No plugins yet. Register an external one above, or compile a built-in connector.",builtin:"builtin",enabled:"enabled",disabled:"disabled",health:"Health",configure:"Configure",close:"Close",noConfig:"This plugin takes no configuration.",notSet:"Not set — let organizations and users choose",capabilities:"Capabilities",saved:"Saved.",checking:"Checking…",save:"Save",saveEnable:"Save & enable",disable:"Disable",remove:"Remove",builtinNote:"Built-in plugins can be disabled but not removed",confirmRemove:'Remove the external plugin "{name}"? Its saved config is deleted.'},ba={colEndpoint:"Endpoint",colDescription:"Description",authNone:"No auth",authBearer:"Bearer token",authManager:"Admin / superadmin",authSuperadmin:"Superadmin",groupPublic:"Public",groupIdentity:"Identity",groupCars:"Cars",groupService:"Service records",groupParts:"Parts",groupAccount:"Account",groupManagement:"Management",groupSuperadmin:"Superadmin"},va={app:ra,sections:la,login:aa,status:ca,common:ua,users:da,orgs:fa,server:pa,pocketbase:ha,webapp:ga,plugins:ma,api:ba},_a={apiServer:"Serwer API",switchToLight:"Przełącz na motyw jasny",switchToDark:"Przełącz na motyw ciemny",theme:"Motyw",signOut:"Wyloguj się",loading:"Ładowanie…",standardUserNote:"Zalogowano jako zwykły użytkownik — sekcje zarządzania wymagają roli administratora",footer:"DriverVault — rejestr serwisu i konserwacji samochodu."},ya={overview:"Przegląd",users:"Użytkownicy",orgs:"Organizacje",server:"Serwer API",pocketbase:"PocketBase",webapp:"Aplikacja webowa",plugins:"Wtyczki",api:"API"},wa={title:"Zaloguj się",subtitle:"Konsola superadministratora serwera API DriverVault.",email:"E-mail",password:"Hasło",submit:"Zaloguj się",submitting:"Logowanie…",invalid:"Nieprawidłowy e-mail lub hasło.",failed:"Nie udało się zalogować.",authNote:"Uwierzytelnia w PocketBase za pośrednictwem tego serwera"},xa={title:"Status",unreachable:"niedostępny",checking:"Sprawdzanie…",apiServer:"Serwer API",pocketBase:"PocketBase",webApp:"Aplikacja webowa",thisProcess:"ten proces"},ka={create:"Utwórz",save:"Zapisz",cancel:"Anuluj",edit:"Edytuj",delete:"Usuń",rename:"Zmień nazwę",empty:"—",name:"Nazwa",email:"E-mail",role:"Rola",organization:"Organizacja"},Sa={title:"Użytkownicy",allOrgs:"Wszystkie organizacje",yourOrg:"Twoja organizacja",newUser:"Nowy użytkownik",password:"Hasło",passwordUnchanged:"Hasło (puste = bez zmian)",passwordPlaceholder:"min. 8 znaków",orgNone:"— brak —",you:"Ty",empty:"Brak użytkowników.",confirmDelete:"Usunąć {email}? Tej operacji nie można cofnąć."},Ta={title:"Organizacje",subtitle:"Podmioty, do których należą użytkownicy",subtitleOwn:"Twoja organizacja",subtitleNone:"Utwórz ją, aby zarządzać własnym zespołem",newOrg:"Nowa organizacja",namePlaceholder:"Acme Fleet",empty:"Brak organizacji.",createHint:"Nie masz jeszcze organizacji. Utwórz ją, aby zostać jej administratorem.",colId:"ID",confirmDelete:"Usunąć organizację „{name}”?",confirmDeleteOwn:"Usunąć Twoją organizację „{name}”? Zostaniesz z niej usunięty i staniesz się zwykłym użytkownikiem."},Ea={title:"Serwer API",subtitle:"Jak ten serwer przedstawia się klientom, które się z nim łączą",name:"Nazwa serwera",nameHint:"Widoczna w klientach, które można skierować na więcej niż jeden DriverVault, na przykład w przełączniku serwerów aplikacji webowej. Zwracana przez /api/health.",saveApply:"Zapisz i zastosuj",persistedEnv:"zapisano w .env",savedNotice:"Zapisano. Nowa nazwa obowiązuje od następnego żądania."},$a={title:"PocketBase",subtitle:"Połączenie z bazą danych używane przez każdy punkt końcowy",connected:"połączono",noSuperuser:"brak superużytkownika",unreachable:"niedostępny",baseUrl:"Adres bazowy",superuserEmail:"E-mail superużytkownika",superuserPassword:"Hasło superużytkownika",passwordUnchanged:"bez zmian",passwordNotSet:"nie ustawiono",saveApply:"Zapisz i zastosuj",testConnection:"Testuj połączenie",persistedEnv:"zapisano w .env",testOk:"Połączenie OK — superużytkownik uwierzytelniony.",testReachableNoAuth:"PocketBase jest dostępny, ale konto usługowe nie zostało uwierzytelnione.",testUnreachable:"PocketBase jest niedostępny pod tym adresem.",savedNotice:"Zapisano. Serwer korzysta teraz z tego PocketBase."},Ca={title:"Aplikacja webowa",subtitle:"Adres sprawdzany podczas kontroli statusu oraz kto może wywoływać to API z przeglądarki",reachable:"dostępna",unreachable:"niedostępna",baseUrl:"Adres bazowy",allowedOrigins:"Dozwolone źródła",originsHint:"Oddzielone przecinkami lub {star} dla dowolnego. Natywne aplikacje mobilne nie podlegają CORS.",saveApply:"Zapisz i zastosuj",testConnection:"Testuj połączenie",persistedEnv:"zapisano w .env",testOk:"Aplikacja webowa jest dostępna.",testFailed:"Aplikacja webowa nie odpowiedziała na kontrolę stanu pod tym adresem.",savedNotice:"Zapisano. Nowe źródła obowiązują od następnego żądania."},Pa={title:"Wtyczki",subtitle:"Integracje z usługami zewnętrznymi",registerExternal:"Zarejestruj zewnętrzną",cancelRegister:"Anuluj",name:"Nazwa",baseUrl:"Adres bazowy",provider:"Dostawca",register:"Zarejestruj",empty:"Brak wtyczek. Zarejestruj zewnętrzną powyżej lub skompiluj wbudowany łącznik.",builtin:"wbudowana",enabled:"włączona",disabled:"wyłączona",health:"Stan",configure:"Konfiguruj",close:"Zamknij",noConfig:"Ta wtyczka nie wymaga konfiguracji.",notSet:"Nie ustawiono — pozwól organizacjom i użytkownikom wybrać",capabilities:"Możliwości",saved:"Zapisano.",checking:"Sprawdzanie…",save:"Zapisz",saveEnable:"Zapisz i włącz",disable:"Wyłącz",remove:"Usuń",builtinNote:"Wtyczki wbudowane można wyłączyć, ale nie usunąć",confirmRemove:"Usunąć zewnętrzną wtyczkę „{name}”? Jej zapisana konfiguracja zostanie usunięta."},Aa={colEndpoint:"Punkt końcowy",colDescription:"Opis",authNone:"Bez uwierzytelniania",authBearer:"Token Bearer",authManager:"Administrator / superadministrator",authSuperadmin:"Superadministrator",groupPublic:"Publiczne",groupIdentity:"Tożsamość",groupCars:"Samochody",groupService:"Wpisy serwisowe",groupParts:"Części",groupAccount:"Konto",groupManagement:"Zarządzanie",groupSuperadmin:"Superadministrator"},Oa={app:_a,sections:ya,login:wa,status:xa,common:ka,users:Sa,orgs:Ta,server:Ea,pocketbase:$a,webapp:Ca,plugins:Pa,api:Aa},za={apiServer:"API-server",switchToLight:"Skift til lyst tema",switchToDark:"Skift til mørkt tema",theme:"Tema",signOut:"Log ud",loading:"Indlæser…",standardUserNote:"Logget ind som almindelig bruger — administrationssektioner kræver en administratorrolle",footer:"DriverVault — bilservice- og vedligeholdelsesregister."},Ia={overview:"Oversigt",users:"Brugere",orgs:"Organisationer",server:"API-server",pocketbase:"PocketBase",webapp:"Webapp",plugins:"Plugins",api:"API"},Ra={title:"Log ind",subtitle:"Superadmin-konsol til DriverVault API-serveren.",email:"E-mail",password:"Adgangskode",submit:"Log ind",submitting:"Logger ind…",invalid:"Ugyldig e-mail eller adgangskode.",failed:"Kunne ikke logge ind.",authNote:"Godkender mod PocketBase gennem denne server"},ja={title:"Status",unreachable:"utilgængelig",checking:"Tjekker…",apiServer:"API-server",pocketBase:"PocketBase",webApp:"Webapp",thisProcess:"denne proces"},Na={create:"Opret",save:"Gem",cancel:"Annuller",edit:"Rediger",delete:"Slet",rename:"Omdøb",empty:"—",name:"Navn",email:"E-mail",role:"Rolle",organization:"Organisation"},Ua={title:"Brugere",allOrgs:"Alle organisationer",yourOrg:"Din organisation",newUser:"Ny bruger",password:"Adgangskode",passwordUnchanged:"Adgangskode (tom = uændret)",passwordPlaceholder:"mindst 8 tegn",orgNone:"— ingen —",you:"dig",empty:"Ingen brugere.",confirmDelete:"Slet {email}? Dette kan ikke fortrydes."},Da={title:"Organisationer",subtitle:"Enheder, som brugere tilhører",subtitleOwn:"Din organisation",subtitleNone:"Opret en for at administrere dit eget team",newOrg:"Ny organisation",namePlaceholder:"Acme Fleet",empty:"Ingen organisationer endnu.",createHint:"Du har endnu ingen organisation. Opret en for at blive dens administrator.",colId:"ID",confirmDelete:'Slet organisationen "{name}"?',confirmDeleteOwn:"Slet din organisation „{name}“? Du fjernes fra den og bliver en almindelig bruger."},Ma={title:"API-server",subtitle:"Hvordan denne server identificerer sig over for de klienter, der forbinder til den",name:"Servernavn",nameHint:"Vises af klienter, der kan pege på mere end én DriverVault, for eksempel webappens serverskifter. Returneres af /api/health.",saveApply:"Gem og anvend",persistedEnv:"gemt i .env",savedNotice:"Gemt. Det nye navn gælder fra næste anmodning."},La={title:"PocketBase",subtitle:"Databaseforbindelse brugt af hvert endpoint",connected:"forbundet",noSuperuser:"ingen superbruger",unreachable:"utilgængelig",baseUrl:"Basis-URL",superuserEmail:"Superbrugerens e-mail",superuserPassword:"Superbrugerens adgangskode",passwordUnchanged:"uændret",passwordNotSet:"ikke angivet",saveApply:"Gem og anvend",testConnection:"Test forbindelse",persistedEnv:"gemt i .env",testOk:"Forbindelse OK — superbruger godkendt.",testReachableNoAuth:"PocketBase er tilgængelig, men servicekontoen blev ikke godkendt.",testUnreachable:"PocketBase er ikke tilgængelig på den adresse.",savedNotice:"Gemt. Serveren bruger nu denne PocketBase."},Fa={title:"Webapp",subtitle:"Adressen, der tjekkes ved statuskontrol, og hvem der må kalde dette API fra en browser",reachable:"tilgængelig",unreachable:"utilgængelig",baseUrl:"Basis-URL",allowedOrigins:"Tilladte oprindelser",originsHint:"Kommasepareret, eller {star} for enhver. Native mobilapps er ikke underlagt CORS.",saveApply:"Gem og anvend",testConnection:"Test forbindelse",persistedEnv:"gemt i .env",testOk:"Webappen er tilgængelig.",testFailed:"Webappen svarede ikke på sit helbredstjek på den adresse.",savedNotice:"Gemt. Nye oprindelser gælder fra næste anmodning."},Ba={title:"Plugins",subtitle:"Integrationer med tredjepartstjenester",registerExternal:"Registrér ekstern",cancelRegister:"Annuller",name:"Navn",baseUrl:"Basis-URL",provider:"Udbyder",register:"Registrér",empty:"Ingen plugins endnu. Registrér et eksternt ovenfor, eller kompilér et indbygget stik.",builtin:"indbygget",enabled:"aktiveret",disabled:"deaktiveret",health:"Helbred",configure:"Konfigurer",close:"Luk",noConfig:"Dette plugin kræver ingen konfiguration.",notSet:"Ikke angivet — lad organisationer og brugere vælge",capabilities:"Funktioner",saved:"Gemt.",checking:"Tjekker…",save:"Gem",saveEnable:"Gem og aktivér",disable:"Deaktiver",remove:"Fjern",builtinNote:"Indbyggede plugins kan deaktiveres, men ikke fjernes",confirmRemove:'Fjern det eksterne plugin "{name}"? Dets gemte konfiguration slettes.'},Ha={colEndpoint:"Endpoint",colDescription:"Beskrivelse",authNone:"Ingen godkendelse",authBearer:"Bearer-token",authManager:"Admin / superadmin",authSuperadmin:"Superadmin",groupPublic:"Offentlig",groupIdentity:"Identitet",groupCars:"Biler",groupService:"Serviceposter",groupParts:"Reservedele",groupAccount:"Konto",groupManagement:"Administration",groupSuperadmin:"Superadmin"},Va={app:za,sections:Ia,login:Ra,status:ja,common:Na,users:Ua,orgs:Da,server:Ma,pocketbase:La,webapp:Fa,plugins:Ba,api:Ha},To="dh-panel-lang",Eo="en",At={en:va,pl:Oa,da:Va},Ka=Object.keys(At);function Wa(){try{const t=localStorage.getItem(To);if(t&&At[t])return t}catch{}const e=(navigator.language||"en").split("-")[0];return At[e]?e:Eo}const En=B(Wa());function Ga(e){if(At[e]){En.value=e;try{localStorage.setItem(To,e)}catch{}}}function hi(e,t){return t.split(".").reduce((s,n)=>s==null?void 0:s[n],e)}function qa(e,t){return t?e.replace(/\{(\w+)\}/g,(s,n)=>t[n]==null?s:String(t[n])):e}function Za(e,t,s){let n="other";try{n=new Intl.PluralRules(s).select(t)}catch{n=t===1?"one":"other"}return e[n]??e.other??e.one}function h(e,t){const s=En.value;let n=hi(At[s],e);if(n==null&&(n=hi(At[Eo],e)),n==null)return e;if(typeof n=="object"){if((t==null?void 0:t.n)==null)return e;n=Za(n,t.n,s)}return typeof n!="string"?e:qa(n,t)}function gi(e,t,s){const i=h(e,{...s,[t]:"\0"}),o=i.indexOf("\0");return o===-1?{before:i,after:""}:{before:i.slice(0,o),after:i.slice(o+1)}}const an="dh-panel-token";function Ja(){try{return localStorage.getItem(an)||""}catch{return""}}const Ot=B(Ja()),le=B(null),xe=Ae(()=>{var e;return((e=le.value)==null?void 0:e.role)==="superadmin"}),gs=Ae(()=>{var e,t;return((e=le.value)==null?void 0:e.role)==="admin"||((t=le.value)==null?void 0:t.role)==="superadmin"});function $o(e){Ot.value=e;try{e?localStorage.setItem(an,e):localStorage.removeItem(an)}catch{}}class Ya extends Error{constructor(t,s,n){super(t),this.status=s,this.body=n}}function Xa(e,t){if(!e||typeof e!="object")return`HTTP ${t}`;if(e.error)return e.error;const s=Object.entries(e.data||{}).map(([n,i])=>`${n}: ${(i==null?void 0:i.message)||i}`).filter(Boolean);return s.length?s.join("; "):e.message||`HTTP ${t}`}async function ee(e,{method:t="GET",body:s,auth:n=!0}={}){const i={};s!==void 0&&(i["Content-Type"]="application/json"),n&&Ot.value&&(i.Authorization=Ot.value);const o=await fetch(e,{method:t,headers:i,body:s===void 0?void 0:JSON.stringify(s)}),r=await o.text();let l=null;try{l=r?JSON.parse(r):null}catch{l=null}if(!o.ok)throw o.status===401&&n&&$n(),new Ya(Xa(l,o.status),o.status,l);return l}async function Qa(e,t){const s=await ee("/api/auth/login",{method:"POST",body:{email:e,password:t},auth:!1});return $o(s.token),await Ss(),le.value}async function Ss(){return le.value=await ee("/api/identity"),le.value}function $n(){$o(""),le.value=null}async function ec(){if(!Ot.value)return null;try{return await Ss()}catch{return $n(),null}}const tc={class:"mx-auto flex w-full max-w-sm flex-col gap-5 pt-24"},sc={class:"dh-card p-6"},nc={class:"text-lg font-bold tracking-[-0.02em] text-strong"},ic={class:"mt-1 mb-5 text-sm text-body"},oc={class:"dh-label",for:"login-email"},rc={class:"dh-label",for:"login-password"},lc={key:0,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},ac=["disabled"],cc={class:"eyebrow text-center"},uc={__name:"LoginView",emits:["authenticated"],setup(e,{emit:t}){const s=t,n=B(""),i=B(""),o=B(""),r=B(!1),l=Ae(()=>n.value.trim()!==""&&i.value!==""&&!r.value);async function a(){if(l.value){o.value="",r.value=!0;try{const p=await Qa(n.value.trim(),i.value);s("authenticated",p)}catch(p){o.value=p.status===400||p.status===404?h("login.invalid"):p.message||h("login.failed"),i.value=""}finally{r.value=!1}}}return(p,d)=>(y(),$("div",tc,[u("div",sc,[u("h1",nc,m(g(h)("login.title")),1),u("p",ic,m(g(h)("login.subtitle")),1),u("form",{class:"flex flex-col gap-4",onSubmit:Xl(a,["prevent"])},[u("div",null,[u("label",oc,m(g(h)("login.email")),1),re(u("input",{id:"login-email","onUpdate:modelValue":d[0]||(d[0]=b=>n.value=b),class:"dh-input",type:"email",autocomplete:"username",autofocus:"",placeholder:"you@example.com"},null,512),[[de,n.value]])]),u("div",null,[u("label",rc,m(g(h)("login.password")),1),re(u("input",{id:"login-password","onUpdate:modelValue":d[1]||(d[1]=b=>i.value=b),class:"dh-input",type:"password",autocomplete:"current-password",placeholder:"••••••••"},null,512),[[de,i.value]])]),o.value?(y(),$("p",lc,m(o.value),1)):H("",!0),u("button",{class:"dh-btn w-full",type:"submit",disabled:!l.value},m(r.value?g(h)("login.submitting"):g(h)("login.submit")),9,ac)],32)]),u("p",cc,m(g(h)("login.authNote")),1)]))}},dc={class:"dh-card overflow-hidden"},fc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},pc={class:"text-base font-bold tracking-[-0.02em] text-strong"},hc={key:0,class:"dh-pill bg-danger-soft text-danger"},gc={key:0,class:"px-5 py-4 text-sm text-danger"},mc={key:1,class:"w-full text-left text-sm"},bc={class:"px-5 py-3 font-medium text-strong"},vc={class:"data px-5 py-3 text-xs text-muted"},_c={class:"data px-5 py-3 text-right text-xs text-muted"},yc={class:"px-5 py-3 text-right"},wc={key:2,class:"px-5 py-4 text-sm text-muted"},xc={__name:"StatusCard",setup(e){const t=B(null),s=B("");let n=null;async function i(){try{t.value=await ee("/api/status",{auth:!1}),s.value=""}catch(l){t.value=null,s.value=l.message||h("status.unreachable")}}const o=Ae(()=>{var l,a,p;return[{key:"apiServer",label:h("status.apiServer"),h:(l=t.value)==null?void 0:l.apiServer},{key:"pocketBase",label:h("status.pocketBase"),h:(a=t.value)==null?void 0:a.pocketBase},{key:"webApp",label:h("status.webApp"),h:(p=t.value)==null?void 0:p.webApp}]});it(()=>{i(),n=setInterval(i,1e4)}),kn(()=>clearInterval(n));const r=l=>l==="ok"?"bg-success-soft text-success":"bg-danger-soft text-danger";return(l,a)=>(y(),$("div",dc,[u("div",fc,[u("div",pc,m(g(h)("status.title")),1),s.value?(y(),$("span",hc,[a[0]||(a[0]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(m(g(h)("status.unreachable")),1)])):H("",!0)]),s.value?(y(),$("div",gc,m(s.value),1)):t.value?(y(),$("table",mc,[u("tbody",null,[(y(!0),$(te,null,Se(o.value,p=>(y(),$("tr",{key:p.key,class:"border-t border-subtle first:border-t-0"},[u("td",bc,m(p.label),1),u("td",vc,m(p.h.url||g(h)("status.thisProcess")),1),u("td",_c,m(p.h.latencyMs!=null?p.h.latencyMs+"ms":g(h)("common.empty")),1),u("td",yc,[u("span",{class:Oe(["dh-pill",r(p.h.status)])},[a[1]||(a[1]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(m(p.h.status),1)],2)])]))),128))])])):(y(),$("div",wc,m(g(h)("status.checking")),1))]))}},kc={class:"dh-card overflow-hidden"},Sc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Tc={class:"text-base font-bold tracking-[-0.02em] text-strong"},Ec={class:"mt-0.5 text-xs text-muted"},$c={class:"flex flex-col gap-4 px-5 py-4"},Cc={class:"dh-label",for:"pb-url"},Pc={class:"grid gap-4 sm:grid-cols-2"},Ac={class:"dh-label",for:"pb-email"},Oc={class:"dh-label",for:"pb-password"},zc=["placeholder"],Ic={key:0,class:"data text-xs text-muted"},Rc={key:1,class:"rounded-control bg-info-soft px-3 py-2 text-xs text-info"},jc={key:2,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},Nc={class:"flex items-center gap-2"},Uc=["disabled"],Dc=["disabled"],Mc={class:"eyebrow"},Lc={__name:"PocketBaseCard",setup(e){const t=B(null),s=B({url:"",adminEmail:"",adminPassword:""}),n=B(null),i=B(""),o=B(""),r=B(!1);async function l(){try{t.value=await ee("/api/admin/pb-config"),s.value={url:t.value.url,adminEmail:t.value.adminEmail,adminPassword:""},n.value=t.value.probe}catch(d){i.value=d.message}}it(l);async function a(){i.value="",o.value="",r.value=!0;try{n.value=await ee("/api/admin/pb-config/test",{method:"POST",body:s.value}),o.value=n.value.superuser?h("pocketbase.testOk"):n.value.reachable?h("pocketbase.testReachableNoAuth"):h("pocketbase.testUnreachable")}catch(d){i.value=d.message}finally{r.value=!1}}async function p(){i.value="",o.value="",r.value=!0;try{const d=await ee("/api/admin/pb-config",{method:"PUT",body:s.value});t.value=d.config,n.value=d.config.probe,s.value.adminPassword="",o.value=d.warning||h("pocketbase.savedNotice")}catch(d){i.value=d.message}finally{r.value=!1}}return(d,b)=>{var C,O;return y(),$("div",kc,[u("div",Sc,[u("div",null,[u("div",Tc,m(g(h)("pocketbase.title")),1),u("p",Ec,m(g(h)("pocketbase.subtitle")),1)]),n.value?(y(),$("span",{key:0,class:Oe(["dh-pill",n.value.superuser?"bg-success-soft text-success":n.value.reachable?"bg-warning-soft text-warning":"bg-danger-soft text-danger"])},[b[3]||(b[3]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(" "+m(n.value.superuser?g(h)("pocketbase.connected"):n.value.reachable?g(h)("pocketbase.noSuperuser"):g(h)("pocketbase.unreachable")),1)],2)):H("",!0)]),u("div",$c,[u("div",null,[u("label",Cc,m(g(h)("pocketbase.baseUrl")),1),re(u("input",{id:"pb-url","onUpdate:modelValue":b[0]||(b[0]=F=>s.value.url=F),class:"dh-input",placeholder:"http://10.2.1.10:8027"},null,512),[[de,s.value.url]])]),u("div",Pc,[u("div",null,[u("label",Ac,m(g(h)("pocketbase.superuserEmail")),1),re(u("input",{id:"pb-email","onUpdate:modelValue":b[1]||(b[1]=F=>s.value.adminEmail=F),class:"dh-input",autocomplete:"off"},null,512),[[de,s.value.adminEmail]])]),u("div",null,[u("label",Oc,m(g(h)("pocketbase.superuserPassword")),1),re(u("input",{id:"pb-password","onUpdate:modelValue":b[2]||(b[2]=F=>s.value.adminPassword=F),class:"dh-input",type:"password",autocomplete:"new-password",placeholder:(C=t.value)!=null&&C.adminConfigured?g(h)("pocketbase.passwordUnchanged"):g(h)("pocketbase.passwordNotSet")},null,8,zc),[[de,s.value.adminPassword]])])]),(O=n.value)!=null&&O.detail?(y(),$("p",Ic,m(n.value.detail),1)):H("",!0),o.value?(y(),$("p",Rc,m(o.value),1)):H("",!0),i.value?(y(),$("p",jc,m(i.value),1)):H("",!0),u("div",Nc,[u("button",{class:"dh-btn",disabled:r.value,onClick:p},m(g(h)("pocketbase.saveApply")),9,Uc),u("button",{class:"dh-btn-ghost",disabled:r.value,onClick:a},m(g(h)("pocketbase.testConnection")),9,Dc),b[4]||(b[4]=u("span",{class:"flex-1"},null,-1)),u("span",Mc,m(g(h)("pocketbase.persistedEnv")),1)])])])}}},Fc={class:"dh-card overflow-hidden"},Bc={class:"border-b border-subtle px-5 py-4"},Hc={class:"text-base font-bold tracking-[-0.02em] text-strong"},Vc={class:"mt-0.5 text-xs text-muted"},Kc={class:"flex flex-col gap-4 px-5 py-4"},Wc={class:"dh-label",for:"server-name"},Gc={class:"mt-1 text-xs text-muted"},qc={key:0,class:"rounded-control bg-info-soft px-3 py-2 text-xs text-info"},Zc={key:1,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},Jc={class:"flex items-center gap-2"},Yc=["disabled"],Xc={class:"eyebrow"},Qc={__name:"ServerCard",setup(e){const t=B({name:""}),s=B(""),n=B(""),i=B(!1);async function o(){try{const l=await ee("/api/admin/server-config");t.value={name:l.name}}catch(l){s.value=l.message}}it(o);async function r(){s.value="",n.value="",i.value=!0;try{const l=await ee("/api/admin/server-config",{method:"PUT",body:{name:t.value.name}});t.value={name:l.config.name},n.value=l.warning||h("server.savedNotice")}catch(l){s.value=l.message}finally{i.value=!1}}return(l,a)=>(y(),$("div",Fc,[u("div",Bc,[u("div",Hc,m(g(h)("server.title")),1),u("p",Vc,m(g(h)("server.subtitle")),1)]),u("div",Kc,[u("div",null,[u("label",Wc,m(g(h)("server.name")),1),re(u("input",{id:"server-name","onUpdate:modelValue":a[0]||(a[0]=p=>t.value.name=p),class:"dh-input",maxlength:"64",placeholder:"DriverVault API Server",onKeyup:xo(r,["enter"])},null,544),[[de,t.value.name]]),u("p",Gc,m(g(h)("server.nameHint")),1)]),n.value?(y(),$("p",qc,m(n.value),1)):H("",!0),s.value?(y(),$("p",Zc,m(s.value),1)):H("",!0),u("div",Jc,[u("button",{class:"dh-btn",disabled:i.value,onClick:r},m(g(h)("server.saveApply")),9,Yc),a[1]||(a[1]=u("span",{class:"flex-1"},null,-1)),u("span",Xc,m(g(h)("server.persistedEnv")),1)])])]))}},eu={class:"dh-card overflow-hidden"},tu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},su={class:"text-base font-bold tracking-[-0.02em] text-strong"},nu={class:"mt-0.5 text-xs text-muted"},iu={class:"flex flex-col gap-4 px-5 py-4"},ou={class:"dh-label",for:"web-url"},ru={class:"dh-label",for:"web-origins"},lu={class:"mt-1 text-xs text-muted"},au={key:0,class:"data text-xs text-muted"},cu={key:1,class:"rounded-control bg-info-soft px-3 py-2 text-xs text-info"},uu={key:2,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},du={class:"flex items-center gap-2"},fu=["disabled"],pu=["disabled"],hu={class:"eyebrow"},gu={__name:"WebAppCard",setup(e){const t=B(null),s=B({url:"",origins:""}),n=B(null),i=B(""),o=B(""),r=B(!1),l=C=>C.split(",").map(O=>O.trim()).filter(Boolean);function a(C){t.value=C,s.value={url:C.url,origins:(C.allowOrigins||[]).join(", ")},n.value=C.probe}async function p(){try{a(await ee("/api/admin/webapp-config"))}catch(C){i.value=C.message}}it(p);async function d(){i.value="",o.value="",r.value=!0;try{n.value=await ee("/api/admin/webapp-config/test",{method:"POST",body:{url:s.value.url}}),o.value=n.value.status==="ok"?h("webapp.testOk"):h("webapp.testFailed")}catch(C){i.value=C.message}finally{r.value=!1}}async function b(){i.value="",o.value="",r.value=!0;try{const C=await ee("/api/admin/webapp-config",{method:"PUT",body:{url:s.value.url,allowOrigins:l(s.value.origins)}});a(C.config),o.value=C.warning||h("webapp.savedNotice")}catch(C){i.value=C.message}finally{r.value=!1}}return(C,O)=>{var F;return y(),$("div",eu,[u("div",tu,[u("div",null,[u("div",su,m(g(h)("webapp.title")),1),u("p",nu,m(g(h)("webapp.subtitle")),1)]),n.value?(y(),$("span",{key:0,class:Oe(["dh-pill",n.value.status==="ok"?"bg-success-soft text-success":"bg-danger-soft text-danger"])},[O[2]||(O[2]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(" "+m(n.value.status==="ok"?g(h)("webapp.reachable"):g(h)("webapp.unreachable")),1)],2)):H("",!0)]),u("div",iu,[u("div",null,[u("label",ou,m(g(h)("webapp.baseUrl")),1),re(u("input",{id:"web-url","onUpdate:modelValue":O[0]||(O[0]=_=>s.value.url=_),class:"dh-input",placeholder:"http://localhost:8090"},null,512),[[de,s.value.url]])]),u("div",null,[u("label",ru,m(g(h)("webapp.allowedOrigins")),1),re(u("input",{id:"web-origins","onUpdate:modelValue":O[1]||(O[1]=_=>s.value.origins=_),class:"dh-input",placeholder:"http://localhost:8090, https://app.example.com"},null,512),[[de,s.value.origins]]),u("p",lu,[Ee(m(g(gi)("webapp.originsHint","star").before),1),O[3]||(O[3]=u("span",{class:"data"},"*",-1)),Ee(m(g(gi)("webapp.originsHint","star").after),1)])]),(F=n.value)!=null&&F.error?(y(),$("p",au,m(n.value.error),1)):H("",!0),o.value?(y(),$("p",cu,m(o.value),1)):H("",!0),i.value?(y(),$("p",uu,m(i.value),1)):H("",!0),u("div",du,[u("button",{class:"dh-btn",disabled:r.value,onClick:b},m(g(h)("webapp.saveApply")),9,fu),u("button",{class:"dh-btn-ghost",disabled:r.value,onClick:d},m(g(h)("webapp.testConnection")),9,pu),O[4]||(O[4]=u("span",{class:"flex-1"},null,-1)),u("span",hu,m(g(h)("webapp.persistedEnv")),1)])])])}}},mu={class:"dh-card overflow-hidden"},bu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},vu={class:"text-base font-bold tracking-[-0.02em] text-strong"},_u={class:"mt-0.5 text-xs text-muted"},yu={key:0,class:"border-b border-subtle bg-sunken px-5 py-4"},wu={class:"grid gap-3 sm:grid-cols-3"},xu={class:"dh-label"},ku={class:"dh-label"},Su={class:"dh-label"},Tu=["disabled"],Eu={key:1,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},$u={key:2,class:"px-5 py-6 text-center text-sm text-muted"},Cu={class:"flex items-center gap-3 px-5 py-3"},Pu=["onClick"],Au={class:"font-semibold text-strong"},Ou={class:"dh-pill bg-sunken text-muted"},zu={key:0,class:"text-xs text-muted"},Iu=["disabled","onClick"],Ru=["disabled","onClick"],ju={key:0,class:"bg-sunken px-5 py-4"},Nu={key:0,class:"data mb-3 text-xs text-muted"},Uu={key:1,class:"grid gap-3 sm:grid-cols-2"},Du={class:"dh-label"},Mu={key:0,class:"text-danger"},Lu=["onUpdate:modelValue"],Fu={key:0,value:""},Bu=["value"],Hu=["onUpdate:modelValue","type","placeholder"],Vu={key:2,class:"mt-1 text-xs text-muted"},Ku={key:2,class:"text-xs text-muted"},Wu={key:3,class:"mt-4"},Gu={class:"eyebrow mb-1.5"},qu={class:"data flex flex-col gap-1 text-xs text-muted"},Zu={class:"text-strong"},Ju={key:0},Yu={key:1},Xu={key:4,class:"data mt-3 text-xs text-body"},Qu={class:"mt-4 flex items-center gap-2"},ed=["disabled","onClick"],td=["disabled","onClick"],sd=["disabled","onClick"],nd={key:5,class:"eyebrow mt-2"},id={__name:"PluginsCard",setup(e){const t=B([]),s=B(""),n=B(!1),i=B(null),o=Jt({}),r=Jt({}),l=B(!1),a=B({name:"",baseURL:"",provider:""});async function p(){try{const E=await ee("/api/admin/plugins");t.value=E.plugins||[],s.value=""}catch(E){s.value=E.message}}it(p);function d(E){var P;if(i.value===E.name){i.value=null;return}const w={};for(const j of E.configFields||[])w[j.key]=((P=E.config)==null?void 0:P[j.key])??"";o[E.name]=w,i.value=E.name}async function b(E,w){n.value=!0,r[E.name]="";try{const P=await ee(`/api/admin/plugins/${encodeURIComponent(E.name)}`,{method:"PUT",body:{enabled:w,config:o[E.name]??{}}});r[E.name]=P.warning||h("plugins.saved"),await p()}catch(P){r[E.name]=P.message}finally{n.value=!1}}async function C(E){n.value=!0,r[E.name]=h("plugins.checking");try{const w=await ee(`/api/admin/plugins/${encodeURIComponent(E.name)}/health`,{method:"POST"});r[E.name]=`${w.health.status}${w.health.detail?" — "+w.health.detail:""}`,await p()}catch(w){r[E.name]=w.message}finally{n.value=!1}}async function O(E){if(confirm(h("plugins.confirmRemove",{name:E.name}))){n.value=!0;try{await ee(`/api/admin/plugins/${encodeURIComponent(E.name)}`,{method:"DELETE"}),i.value===E.name&&(i.value=null),await p()}catch(w){r[E.name]=w.message}finally{n.value=!1}}}async function F(){n.value=!0,s.value="";try{await ee("/api/admin/plugins",{method:"POST",body:a.value}),a.value={name:"",baseURL:"",provider:""},l.value=!1,await p()}catch(E){s.value=E.message}finally{n.value=!1}}const _=E=>E==="ok"?"bg-success-soft text-success":E==="degraded"?"bg-warning-soft text-warning":"bg-danger-soft text-danger";return(E,w)=>(y(),$("div",mu,[u("div",bu,[u("div",null,[u("div",vu,m(g(h)("plugins.title")),1),u("p",_u,m(g(h)("plugins.subtitle")),1)]),u("button",{class:"dh-btn-ghost",onClick:w[0]||(w[0]=P=>l.value=!l.value)},m(l.value?g(h)("plugins.cancelRegister"):g(h)("plugins.registerExternal")),1)]),l.value?(y(),$("div",yu,[u("div",wu,[u("div",null,[u("label",xu,m(g(h)("plugins.name")),1),re(u("input",{"onUpdate:modelValue":w[1]||(w[1]=P=>a.value.name=P),class:"dh-input",placeholder:"acme-parts"},null,512),[[de,a.value.name]])]),u("div",null,[u("label",ku,m(g(h)("plugins.baseUrl")),1),re(u("input",{"onUpdate:modelValue":w[2]||(w[2]=P=>a.value.baseURL=P),class:"dh-input",placeholder:"http://127.0.0.1:9100"},null,512),[[de,a.value.baseURL]])]),u("div",null,[u("label",Su,m(g(h)("plugins.provider")),1),re(u("input",{"onUpdate:modelValue":w[3]||(w[3]=P=>a.value.provider=P),class:"dh-input",placeholder:"ACME Corp"},null,512),[[de,a.value.provider]])])]),u("button",{class:"dh-btn mt-3",disabled:n.value||!a.value.name||!a.value.baseURL,onClick:F},m(g(h)("plugins.register")),9,Tu)])):H("",!0),s.value?(y(),$("p",Eu,m(s.value),1)):H("",!0),t.value.length?H("",!0):(y(),$("p",$u,m(g(h)("plugins.empty")),1)),(y(!0),$(te,null,Se(t.value,P=>(y(),$("div",{key:P.name,class:"border-t border-subtle first:border-t-0"},[u("div",Cu,[u("button",{class:"flex flex-1 items-center gap-3 text-left",onClick:j=>d(P)},[u("span",Au,m(P.name),1),u("span",Ou,m(P.kind||g(h)("plugins.builtin")),1),P.provider?(y(),$("span",zu,m(P.provider),1)):H("",!0),P.health?(y(),$("span",{key:1,class:Oe(["dh-pill",_(P.health.status)])},[w[4]||(w[4]=u("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(m(P.health.status),1)],2)):H("",!0)],8,Pu),u("span",{class:Oe(["dh-pill",P.enabled?"bg-success-soft text-success":"bg-sunken text-muted"])},m(P.enabled?g(h)("plugins.enabled"):g(h)("plugins.disabled")),3),u("button",{class:"dh-btn-ghost",disabled:n.value,onClick:j=>C(P)},m(g(h)("plugins.health")),9,Iu),u("button",{class:"dh-btn-ghost",disabled:n.value,onClick:j=>d(P)},m(i.value===P.name?g(h)("plugins.close"):g(h)("plugins.configure")),9,Ru)]),i.value===P.name?(y(),$("div",ju,[P.baseURL?(y(),$("div",Nu,m(P.baseURL),1)):H("",!0),(P.configFields||[]).length?(y(),$("div",Uu,[(y(!0),$(te,null,Se(P.configFields,j=>(y(),$("div",{key:j.key},[u("label",Du,[Ee(m(j.label||j.key),1),j.required?(y(),$("span",Mu," *")):H("",!0)]),j.type==="select"?re((y(),$("select",{key:0,"onUpdate:modelValue":N=>o[P.name][j.key]=N,class:"dh-select"},[j.required?H("",!0):(y(),$("option",Fu,m(g(h)("plugins.notSet")),1)),(y(!0),$(te,null,Se(j.options||[],N=>(y(),$("option",{key:N.value,value:N.value},m(N.label||N.value),9,Bu))),128))],8,Lu)),[[ks,o[P.name][j.key]]]):re((y(),$("input",{key:1,"onUpdate:modelValue":N=>o[P.name][j.key]=N,class:"dh-input",type:j.type==="password"?"password":j.type==="number"?"number":"text",placeholder:j.default||"",autocomplete:"off"},null,8,Hu)),[[ql,o[P.name][j.key]]]),j.help?(y(),$("p",Vu,m(j.help),1)):H("",!0)]))),128))])):(y(),$("p",Ku,m(g(h)("plugins.noConfig")),1)),(P.capabilities||[]).length?(y(),$("div",Wu,[u("div",Gu,m(g(h)("plugins.capabilities")),1),u("ul",qu,[(y(!0),$(te,null,Se(P.capabilities,j=>(y(),$("li",{key:j.id},[u("span",Zu,m(j.id),1),j.method||j.endpoint?(y(),$("span",Ju," — "+m(j.method)+" "+m(j.endpoint),1)):H("",!0),j.description?(y(),$("span",Yu," · "+m(j.description),1)):H("",!0)]))),128))])])):H("",!0),r[P.name]?(y(),$("p",Xu,m(r[P.name]),1)):H("",!0),u("div",Qu,[u("button",{class:"dh-btn",disabled:n.value,onClick:j=>b(P,!0)},m(P.enabled?g(h)("plugins.save"):g(h)("plugins.saveEnable")),9,ed),P.enabled?(y(),$("button",{key:0,class:"dh-btn-ghost",disabled:n.value,onClick:j=>b(P,!1)},m(g(h)("plugins.disable")),9,td)):H("",!0),w[5]||(w[5]=u("span",{class:"flex-1"},null,-1)),P.kind==="external"?(y(),$("button",{key:1,class:"dh-btn-danger",disabled:n.value,onClick:j=>O(P)},m(g(h)("plugins.remove")),9,sd)):H("",!0)]),P.kind!=="external"?(y(),$("p",nd,m(g(h)("plugins.builtinNote")),1)):H("",!0)])):H("",!0)]))),128))]))}},od={class:"dh-card overflow-hidden"},rd={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},ld={class:"text-base font-bold tracking-[-0.02em] text-strong"},ad={class:"mt-0.5 text-xs text-muted"},cd={key:0,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},ud={key:1,class:"border-b border-subtle bg-sunken px-5 py-4"},dd={class:"grid gap-3 sm:grid-cols-2"},fd={class:"dh-label"},pd={class:"dh-label"},hd={class:"dh-label"},gd=["placeholder"],md={class:"dh-label"},bd=["value"],vd={key:0},_d={class:"dh-label"},yd={value:""},wd=["value"],xd={class:"mt-3 flex items-center gap-2"},kd=["disabled"],Sd=["disabled"],Td={key:2,class:"px-5 py-6 text-center text-sm text-muted"},Ed={key:3,class:"w-full text-left text-sm"},$d={class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},Cd={class:"data px-5 py-2.5 text-xs text-strong"},Pd={key:0,class:"eyebrow ml-1"},Ad={class:"px-5 py-2.5 text-body"},Od={class:"px-5 py-2.5 text-body"},zd={class:"px-5 py-2.5"},Id={class:"px-5 py-2.5 text-right whitespace-nowrap"},Rd=["onClick"],jd=["disabled","onClick"],Nd={__name:"UsersCard",setup(e){const t=B([]),s=B([]),n=B(""),i=B(!1),o=B(null),r=B({}),l=Ae(()=>xe.value?["user","admin","superadmin"]:["user","admin"]);async function a(){try{const[_,E]=await Promise.all([ee("/api/users"),ee("/api/orgs")]);t.value=_.users||[],s.value=E.organizations||[],n.value=""}catch(_){n.value=_.message}}it(a);function p(){var _;o.value="new",r.value={email:"",name:"",password:"",role:"user",organization:xe.value?"":((_=le.value)==null?void 0:_.organization)||""}}function d(_){o.value=_.id,r.value={email:_.email,name:_.name||"",password:"",role:_.role,organization:_.organization||""}}function b(){o.value=null,n.value=""}async function C(){i.value=!0,n.value="";try{if(o.value==="new")await ee("/api/users",{method:"POST",body:r.value});else{const _={...r.value};_.password||delete _.password,await ee(`/api/users/${o.value}`,{method:"PATCH",body:_})}o.value=null,await a()}catch(_){n.value=_.message}finally{i.value=!1}}async function O(_){if(confirm(h("users.confirmDelete",{email:_.email}))){i.value=!0,n.value="";try{await ee(`/api/users/${_.id}`,{method:"DELETE"}),await a()}catch(E){n.value=E.message}finally{i.value=!1}}}const F=_=>_==="superadmin"?"bg-info-soft text-info":_==="admin"?"bg-warning-soft text-warning":"bg-sunken text-muted";return(_,E)=>(y(),$("div",od,[u("div",rd,[u("div",null,[u("div",ld,m(g(h)("users.title")),1),u("p",ad,m(g(xe)?g(h)("users.allOrgs"):g(h)("users.yourOrg")),1)]),u("button",{class:"dh-btn",onClick:p},m(g(h)("users.newUser")),1)]),n.value?(y(),$("p",cd,m(n.value),1)):H("",!0),o.value?(y(),$("div",ud,[u("div",dd,[u("div",null,[u("label",fd,m(g(h)("common.email")),1),re(u("input",{"onUpdate:modelValue":E[0]||(E[0]=w=>r.value.email=w),class:"dh-input",type:"email",autocomplete:"off"},null,512),[[de,r.value.email]])]),u("div",null,[u("label",pd,m(g(h)("common.name")),1),re(u("input",{"onUpdate:modelValue":E[1]||(E[1]=w=>r.value.name=w),class:"dh-input",autocomplete:"off"},null,512),[[de,r.value.name]])]),u("div",null,[u("label",hd,m(o.value==="new"?g(h)("users.password"):g(h)("users.passwordUnchanged")),1),re(u("input",{"onUpdate:modelValue":E[2]||(E[2]=w=>r.value.password=w),class:"dh-input",type:"password",autocomplete:"new-password",placeholder:g(h)("users.passwordPlaceholder")},null,8,gd),[[de,r.value.password]])]),u("div",null,[u("label",md,m(g(h)("common.role")),1),re(u("select",{"onUpdate:modelValue":E[3]||(E[3]=w=>r.value.role=w),class:"dh-select"},[(y(!0),$(te,null,Se(l.value,w=>(y(),$("option",{key:w,value:w},m(w),9,bd))),128))],512),[[ks,r.value.role]])]),g(xe)?(y(),$("div",vd,[u("label",_d,m(g(h)("common.organization")),1),re(u("select",{"onUpdate:modelValue":E[4]||(E[4]=w=>r.value.organization=w),class:"dh-select"},[u("option",yd,m(g(h)("users.orgNone")),1),(y(!0),$(te,null,Se(s.value,w=>(y(),$("option",{key:w.id,value:w.id},m(w.name),9,wd))),128))],512),[[ks,r.value.organization]])])):H("",!0)]),u("div",xd,[u("button",{class:"dh-btn",disabled:i.value,onClick:C},m(o.value==="new"?g(h)("common.create"):g(h)("common.save")),9,kd),u("button",{class:"dh-btn-ghost",disabled:i.value,onClick:b},m(g(h)("common.cancel")),9,Sd)])])):H("",!0),t.value.length?(y(),$("table",Ed,[u("thead",null,[u("tr",$d,[u("th",null,m(g(h)("common.email")),1),u("th",null,m(g(h)("common.name")),1),u("th",null,m(g(h)("common.organization")),1),u("th",null,m(g(h)("common.role")),1),E[5]||(E[5]=u("th",null,null,-1))])]),u("tbody",null,[(y(!0),$(te,null,Se(t.value,w=>{var P,j;return y(),$("tr",{key:w.id,class:"border-t border-subtle transition-colors hover:bg-sunken"},[u("td",Cd,[Ee(m(w.email)+" ",1),w.id===((P=g(le))==null?void 0:P.id)?(y(),$("span",Pd,m(g(h)("users.you")),1)):H("",!0)]),u("td",Ad,m(w.name||g(h)("common.empty")),1),u("td",Od,m(w.organizationName||g(h)("common.empty")),1),u("td",zd,[u("span",{class:Oe(["dh-pill",F(w.role)])},m(w.role),3)]),u("td",Id,[u("button",{class:"dh-btn-ghost",onClick:N=>d(w)},m(g(h)("common.edit")),9,Rd),w.id!==((j=g(le))==null?void 0:j.id)?(y(),$("button",{key:0,class:"dh-btn-danger ml-1.5",disabled:i.value,onClick:N=>O(w)},m(g(h)("common.delete")),9,jd)):H("",!0)])])}),128))])])):(y(),$("p",Td,m(g(h)("users.empty")),1))]))}},Ud={class:"dh-card overflow-hidden"},Dd={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Md={class:"text-base font-bold tracking-[-0.02em] text-strong"},Ld={class:"mt-0.5 text-xs text-muted"},Fd={key:0,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},Bd={key:1,class:"border-b border-subtle bg-sunken px-5 py-4"},Hd={class:"dh-label"},Vd=["placeholder"],Kd={class:"mt-3 flex items-center gap-2"},Wd=["disabled"],Gd=["disabled"],qd={key:2,class:"px-5 py-6 text-center text-sm text-muted"},Zd={key:3,class:"w-full text-left text-sm"},Jd={class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},Yd={class:"px-5 py-2.5 font-medium text-strong"},Xd={class:"data px-5 py-2.5 text-xs text-muted"},Qd={class:"px-5 py-2.5 text-right whitespace-nowrap"},ef=["onClick"],tf=["disabled","onClick"],sf={__name:"OrgsCard",setup(e){const t=B([]),s=B(""),n=B(!1),i=B(null),o=B(""),r=Ae(()=>{var _;return((_=le.value)==null?void 0:_.organization)||""}),l=Ae(()=>xe.value||!r.value);function a(_){return xe.value||_.id===r.value}async function p(){if(!gs.value){t.value=[];return}try{const _=await ee("/api/orgs");t.value=_.organizations||[],s.value=""}catch(_){s.value=_.message}}it(p);function d(){i.value="new",o.value=""}function b(_){i.value=_.id,o.value=_.name}function C(){i.value=null,s.value=""}async function O(){n.value=!0,s.value="";try{i.value==="new"?(await ee("/api/orgs",{method:"POST",body:{name:o.value}}),xe.value||await Ss()):await ee(`/api/orgs/${i.value}`,{method:"PATCH",body:{name:o.value}}),i.value=null,await p()}catch(_){s.value=_.message}finally{n.value=!1}}async function F(_){const E=!xe.value&&_.id===r.value;if(confirm(h(E?"orgs.confirmDeleteOwn":"orgs.confirmDelete",{name:_.name}))){n.value=!0,s.value="";try{await ee(`/api/orgs/${_.id}`,{method:"DELETE"}),E&&await Ss(),await p()}catch(P){s.value=P.message}finally{n.value=!1}}}return(_,E)=>(y(),$("div",Ud,[u("div",Dd,[u("div",null,[u("div",Md,m(g(xe)?g(h)("orgs.title"):g(h)("common.organization")),1),u("p",Ld,m(g(xe)?g(h)("orgs.subtitle"):r.value?g(h)("orgs.subtitleOwn"):g(h)("orgs.subtitleNone")),1)]),l.value?(y(),$("button",{key:0,class:"dh-btn",onClick:d},m(g(h)("orgs.newOrg")),1)):H("",!0)]),s.value?(y(),$("p",Fd,m(s.value),1)):H("",!0),i.value?(y(),$("div",Bd,[u("label",Hd,m(g(h)("common.name")),1),re(u("input",{"onUpdate:modelValue":E[0]||(E[0]=w=>o.value=w),class:"dh-input",placeholder:g(h)("orgs.namePlaceholder"),onKeyup:xo(O,["enter"])},null,40,Vd),[[de,o.value]]),u("div",Kd,[u("button",{class:"dh-btn",disabled:n.value||!o.value.trim(),onClick:O},m(i.value==="new"?g(h)("common.create"):g(h)("common.save")),9,Wd),u("button",{class:"dh-btn-ghost",disabled:n.value,onClick:C},m(g(h)("common.cancel")),9,Gd)])])):H("",!0),t.value.length?(y(),$("table",Zd,[u("thead",null,[u("tr",Jd,[u("th",null,m(g(h)("common.name")),1),u("th",null,m(g(h)("orgs.colId")),1),E[1]||(E[1]=u("th",null,null,-1))])]),u("tbody",null,[(y(!0),$(te,null,Se(t.value,w=>(y(),$("tr",{key:w.id,class:"border-t border-subtle transition-colors hover:bg-sunken"},[u("td",Yd,m(w.name),1),u("td",Xd,m(w.id),1),u("td",Qd,[a(w)?(y(),$(te,{key:0},[u("button",{class:"dh-btn-ghost",onClick:P=>b(w)},m(g(h)("common.rename")),9,ef),u("button",{class:"dh-btn-danger ml-1.5",disabled:n.value,onClick:P=>F(w)},m(g(h)("common.delete")),9,tf)],64)):H("",!0)])]))),128))])])):(y(),$("p",qd,m(l.value&&!g(xe)?g(h)("orgs.createHint"):g(h)("orgs.empty")),1))]))}},nf={class:"dh-card overflow-hidden"},of={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},rf={class:"text-base font-bold tracking-[-0.02em] text-strong"},lf={class:"eyebrow"},af={class:"w-full text-left text-sm"},cf={class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},uf={class:"data border-t border-subtle px-5 py-2.5 text-xs whitespace-nowrap"},df={class:"text-strong"},ff={class:"border-t border-subtle px-5 py-2.5 text-body"},rt={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brandtext",PATCH:"text-warning",DELETE:"text-danger"};return(s,n)=>(y(),$("div",nf,[u("div",of,[u("div",rf,m(e.title),1),u("span",lf,m(e.auth),1)]),u("table",af,[u("thead",null,[u("tr",cf,[u("th",null,m(g(h)("api.colEndpoint")),1),u("th",null,m(g(h)("api.colDescription")),1)])]),u("tbody",null,[(y(!0),$(te,null,Se(e.endpoints,i=>(y(),$("tr",{key:i.method+i.path,class:"transition-colors hover:bg-sunken"},[u("td",uf,[u("span",{class:Oe(["font-semibold",t[i.method]])},m(i.method),3),u("span",df,m(i.path),1)]),u("td",ff,m(i.desc),1)]))),128))])])]))}},pf={class:"mx-auto flex max-w-4xl flex-col gap-6 px-6 pt-12 pb-16"},hf={class:"flex items-center gap-3"},gf={class:"inline-flex items-center gap-2.5 select-none"},mf={class:"h-8 w-8 shrink-0",viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},bf={transform:"translate(7 0) skewX(-13)"},vf=["fill"],_f=["fill"],yf=["fill"],wf={class:"eyebrow mt-1.5"},xf={key:0,class:"data hidden text-xs text-muted sm:inline"},kf={key:0},Sf={key:1,class:"dh-pill bg-info-soft text-info"},Tf=["value","aria-label"],Ef=["value"],$f=["title"],Cf={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75",class:"h-4 w-4"},Pf={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75",class:"h-4 w-4"},Af={key:0,class:"eyebrow py-16 text-center"},Of={class:"flex flex-wrap gap-1.5"},zf=["onClick"],If={key:8,class:"eyebrow text-center"},Rf={class:"eyebrow text-center"},jf={__name:"App",setup(e){const t=B(!0),s=B("overview");it(async()=>{await ec(),t.value=!1});const n=Ae(()=>{const _=[{id:"overview",label:h("sections.overview")}];return gs.value&&_.push({id:"users",label:h("sections.users")}),(gs.value||le.value)&&_.push({id:"orgs",label:h("sections.orgs")}),xe.value&&_.push({id:"server",label:h("sections.server")},{id:"pocketbase",label:h("sections.pocketbase")},{id:"webapp",label:h("sections.webapp")},{id:"plugins",label:h("sections.plugins")}),_.push({id:"api",label:h("sections.api")}),_}),i=Ae(()=>Ka.map(_=>{let E=_;try{E=new Intl.DisplayNames([_],{type:"language"}).of(_)||_}catch{}return{code:_,label:E.charAt(0).toUpperCase()+E.slice(1)}}));function o(){$n(),s.value="overview"}const r=Ae(()=>Et.value==="dark"?["#60a5fa","#93c5fd","#ffffff"]:["var(--brand-700)","var(--brand-500)","var(--brand-400)"]),l=[{method:"GET",path:"/api/health",desc:"Liveness probe (no auth)"},{method:"GET",path:"/api/status",desc:"Health of PocketBase + Web App"},{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a PocketBase token"},{method:"GET",path:"/api/auth/validate",desc:"Check whether a token is still valid"}],a=[{method:"GET",path:"/api/auth/me",desc:"Identity of the bearer token"},{method:"GET",path:"/api/identity",desc:"Identity incl. role + organization"}],p=[{method:"GET",path:"/api/cars",desc:"List owned + shared cars"},{method:"POST",path:"/api/cars",desc:"Create a car"},{method:"GET",path:"/api/cars/{id}",desc:"Fetch one car"},{method:"PATCH",path:"/api/cars/{id}",desc:"Update a car"},{method:"DELETE",path:"/api/cars/{id}",desc:"Delete a car (owner only)"},{method:"GET",path:"/api/cars/{id}/service-records",desc:"A car's service history"},{method:"GET",path:"/api/cars/{id}/parts",desc:"A car's parts catalog"},{method:"GET",path:"/api/cars/{id}/shares",desc:"Who a car is shared with (owner)"},{method:"POST",path:"/api/cars/{id}/shares",desc:"Share a car by email (owner)"},{method:"DELETE",path:"/api/cars/{id}/shares/{userId}",desc:"Revoke a share (owner)"}],d=[{method:"GET",path:"/api/service-records",desc:"List service records"},{method:"POST",path:"/api/service-records",desc:"Log a service record"},{method:"GET",path:"/api/service-records/{id}",desc:"Fetch one record"},{method:"PATCH",path:"/api/service-records/{id}",desc:"Update a record"},{method:"DELETE",path:"/api/service-records/{id}",desc:"Delete a record"}],b=[{method:"GET",path:"/api/parts",desc:"List parts"},{method:"POST",path:"/api/parts",desc:"Add a part"},{method:"GET",path:"/api/parts/{id}",desc:"Fetch one part"},{method:"PATCH",path:"/api/parts/{id}",desc:"Update a part"},{method:"DELETE",path:"/api/parts/{id}",desc:"Delete a part"}],C=[{method:"GET",path:"/api/me",desc:"Current user profile"},{method:"PATCH",path:"/api/me",desc:"Update profile"},{method:"POST",path:"/api/me/password",desc:"Change password"},{method:"POST",path:"/api/me/avatar",desc:"Upload avatar"},{method:"GET",path:"/api/me/avatar",desc:"Fetch avatar"},{method:"DELETE",path:"/api/me/avatar",desc:"Remove avatar"},{method:"POST",path:"/api/me/verify/request",desc:"Request email verification"},{method:"GET",path:"/api/me/export",desc:"Export your data"},{method:"POST",path:"/api/me/import",desc:"Import data"},{method:"POST",path:"/api/me/delete",desc:"Request account deletion"},{method:"POST",path:"/api/me/delete/cancel",desc:"Cancel deletion request"},{method:"DELETE",path:"/api/me",desc:"Finalize account deletion"}],O=[{method:"GET",path:"/api/users",desc:"List users (scoped by role)"},{method:"POST",path:"/api/users",desc:"Create a user"},{method:"PATCH",path:"/api/users/{id}",desc:"Update email / name / role / org / password"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user"},{method:"GET",path:"/api/orgs",desc:"List organizations"},{method:"POST",path:"/api/orgs",desc:"Create an organization (any user without one; creator becomes admin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (own org; any as superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an organization (own org; any as superadmin)"}],F=[{method:"GET",path:"/api/admin/pb-config",desc:"PocketBase connection + live probe"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Probe a candidate connection"},{method:"PUT",path:"/api/admin/pb-config",desc:"Apply + persist a connection"},{method:"GET",path:"/api/admin/server-config",desc:"This server's display name"},{method:"PUT",path:"/api/admin/server-config",desc:"Rename this server (applied + persisted)"},{method:"GET",path:"/api/admin/webapp-config",desc:"Web App URL + CORS origins, with a live probe"},{method:"POST",path:"/api/admin/webapp-config/test",desc:"Probe a candidate Web App address"},{method:"PUT",path:"/api/admin/webapp-config",desc:"Apply + persist Web App settings"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins (secrets masked)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin"},{method:"GET",path:"/api/admin/plugins/{name}",desc:"Fetch one plugin"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a health check now"}];return(_,E)=>(y(),$("div",pf,[u("div",hf,[u("span",gf,[(y(),$("svg",mf,[u("g",bf,[u("rect",{x:"9",y:"16",width:"6",height:"16",rx:"3",fill:r.value[0]},null,8,vf),u("rect",{x:"19",y:"12",width:"6",height:"24",rx:"3",fill:r.value[1]},null,8,_f),u("rect",{x:"29",y:"8",width:"6",height:"32",rx:"3",fill:r.value[2]},null,8,yf)])])),E[2]||(E[2]=u("span",{class:"text-2xl leading-none font-extrabold tracking-[-0.03em] italic"},[u("span",{class:"text-strong"},"Driver"),u("span",{class:"text-brandtext"},"Vault")],-1))]),u("span",wf,m(g(h)("app.apiServer")),1),E[5]||(E[5]=u("div",{class:"flex-1"},null,-1)),g(le)?(y(),$("span",xf,[Ee(m(g(le).email),1),g(le).organizationName?(y(),$("span",kf," · "+m(g(le).organizationName),1)):H("",!0)])):H("",!0),g(le)?(y(),$("span",Sf,m(g(le).role),1)):H("",!0),u("select",{class:"dh-select !w-auto !py-1 !text-xs",value:g(En),"aria-label":g(h)("sections.overview"),onChange:E[0]||(E[0]=w=>g(Ga)(w.target.value))},[(y(!0),$(te,null,Se(i.value,w=>(y(),$("option",{key:w.code,value:w.code},m(w.label),9,Ef))),128))],40,Tf),u("button",{class:"dh-btn-ghost",title:g(Et)==="dark"?g(h)("app.switchToLight"):g(h)("app.switchToDark"),onClick:E[1]||(E[1]=(...w)=>g(pi)&&g(pi)(...w))},[g(Et)==="dark"?(y(),$("svg",Cf,[...E[3]||(E[3]=[u("circle",{cx:"12",cy:"12",r:"4"},null,-1),u("path",{"stroke-linecap":"round",d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"},null,-1)])])):(y(),$("svg",Pf,[...E[4]||(E[4]=[u("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"},null,-1)])])),Ee(" "+m(g(h)("app.theme")),1)],8,$f),g(Ot)?(y(),$("button",{key:2,class:"dh-btn-ghost",onClick:o},m(g(h)("app.signOut")),1)):H("",!0)]),t.value?(y(),$("p",Af,m(g(h)("app.loading")),1)):g(Ot)?(y(),$(te,{key:2},[u("nav",Of,[(y(!0),$(te,null,Se(n.value,w=>(y(),$("button",{key:w.id,class:Oe(["dh-btn-ghost",s.value===w.id?"border-accent text-brandtext":""]),onClick:P=>s.value=w.id},m(w.label),11,zf))),128))]),s.value==="overview"?(y(),Je(xc,{key:0})):s.value==="users"?(y(),Je(Nd,{key:1})):s.value==="orgs"?(y(),Je(sf,{key:2})):s.value==="server"?(y(),Je(Qc,{key:3})):s.value==="pocketbase"?(y(),Je(Lc,{key:4})):s.value==="webapp"?(y(),Je(gu,{key:5})):s.value==="plugins"?(y(),Je(id,{key:6})):s.value==="api"?(y(),$(te,{key:7},[ue(rt,{title:g(h)("api.groupPublic"),auth:g(h)("api.authNone"),endpoints:l},null,8,["title","auth"]),ue(rt,{title:g(h)("api.groupIdentity"),auth:g(h)("api.authBearer"),endpoints:a},null,8,["title","auth"]),ue(rt,{title:g(h)("api.groupCars"),auth:g(h)("api.authBearer"),endpoints:p},null,8,["title","auth"]),ue(rt,{title:g(h)("api.groupService"),auth:g(h)("api.authBearer"),endpoints:d},null,8,["title","auth"]),ue(rt,{title:g(h)("api.groupParts"),auth:g(h)("api.authBearer"),endpoints:b},null,8,["title","auth"]),ue(rt,{title:g(h)("api.groupAccount"),auth:g(h)("api.authBearer"),endpoints:C},null,8,["title","auth"]),ue(rt,{title:g(h)("api.groupManagement"),auth:g(h)("api.authManager"),endpoints:O},null,8,["title","auth"]),ue(rt,{title:g(h)("api.groupSuperadmin"),auth:g(h)("api.authSuperadmin"),endpoints:F},null,8,["title","auth"])],64)):H("",!0),!g(gs)&&s.value==="overview"?(y(),$("p",If,m(g(h)("app.standardUserNote")),1)):H("",!0)],64)):(y(),Je(uc,{key:1})),u("p",Rf,m(g(h)("app.footer")),1)]))}};sa(jf).mount("#app"); diff --git a/API Server/internal/api/dist/assets/index-OHZkxAdj.js b/API Server/internal/api/dist/assets/index-OHZkxAdj.js deleted file mode 100644 index fee5676..0000000 --- a/API Server/internal/api/dist/assets/index-OHZkxAdj.js +++ /dev/null @@ -1,17 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();/** -* @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 J={},xt=[],Ke=()=>{},mi=()=>!1,Ts=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Es=e=>e.startsWith("onUpdate:"),he=Object.assign,un=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},$o=Object.prototype.hasOwnProperty,G=(e,t)=>$o.call(e,t),M=Array.isArray,kt=e=>es(e)==="[object Map]",Rt=e=>es(e)==="[object Set]",jn=e=>es(e)==="[object Date]",H=e=>typeof e=="function",ne=e=>typeof e=="string",We=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",bi=e=>(Z(e)||H(e))&&H(e.then)&&H(e.catch),vi=Object.prototype.toString,es=e=>vi.call(e),Ao=e=>es(e).slice(8,-1),_i=e=>es(e)==="[object Object]",dn=e=>ne(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ft=cn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Cs=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Oo=/-\w/g,Pe=Cs(e=>e.replace(Oo,t=>t.slice(1).toUpperCase())),Ro=/\B([A-Z])/g,ut=Cs(e=>e.replace(Ro,"-$1").toLowerCase()),yi=Cs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ds=Cs(e=>e?`on${yi(e)}`:""),Ve=(e,t)=>!Object.is(e,t),fs=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ps=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let zn;const $s=()=>zn||(zn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function fn(e){if(M(e)){const t={};for(let s=0;s{if(s){const n=s.split(jo);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Oe(e){let t="";if(ne(e))t=e;else if(M(e))for(let s=0;slt(s,t))}const ki=e=>!!(e&&e.__v_isRef===!0),b=e=>ne(e)?e:e==null?"":M(e)||Z(e)&&(e.toString===vi||!H(e.toString))?ki(e)?b(e.value):JSON.stringify(e,Si,2):String(e),Si=(e,t)=>ki(t)?Si(e,t.value):kt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Ms(n,o)+" =>"]=i,s),{})}:Rt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ms(s))}:We(t)?Ms(t):Z(t)&&!M(t)&&!_i(t)?String(t):t,Ms=(e,t="")=>{var s;return We(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 ce;class Lo{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&&ce&&(ce.active?(this.parent=ce,this.index=(ce.scopes||(ce.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(ce===this)ce=this.prevScope;else{let t=ce;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(Ht){let t=Ht;for(Ht=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Bt;){let t=Bt;for(Bt=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 Pi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function $i(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),mn(n),Bo(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Ys(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ai(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ai(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qt)||(e.globalVersion=qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ys(e))))return;e.flags|=2;const t=e.dep,s=Q,n=$e;Q=e,$e=!0;try{Pi(e);const i=e.fn(e._value);(t.version===0||Ve(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Q=s,$e=n,$i(e),e.flags&=-3}}function mn(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)mn(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Bo(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let $e=!0;const Oi=[];function Ge(){Oi.push($e),$e=!1}function qe(){const e=Oi.pop();$e=e===void 0?!0:e}function Un(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Q;Q=void 0;try{t()}finally{Q=s}}}let qt=0;class Ho{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 bn{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(!Q||!$e||Q===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Q)s=this.activeLink=new Ho(Q,this),Q.deps?(s.prevDep=Q.depsTail,Q.depsTail.nextDep=s,Q.depsTail=s):Q.deps=Q.depsTail=s,Ri(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=Q.depsTail,s.nextDep=void 0,Q.depsTail.nextDep=s,Q.depsTail=s,Q.deps===s&&(Q.deps=n)}return s}trigger(t){this.version++,qt++,this.notify(t)}notify(t){hn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{gn()}}}function Ri(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)Ri(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Js=new WeakMap,vt=Symbol(""),Xs=Symbol(""),Zt=Symbol("");function de(e,t,s){if($e&&Q){let n=Js.get(e);n||Js.set(e,n=new Map);let i=n.get(s);i||(n.set(s,i=new bn),i.map=n,i.key=s),i.track()}}function Xe(e,t,s,n,i,o){const r=Js.get(e);if(!r){qt++;return}const l=a=>{a&&a.trigger()};if(hn(),t==="clear")r.forEach(l);else{const a=M(e),p=a&&dn(s);if(a&&s==="length"){const u=Number(n);r.forEach((m,P)=>{(P==="length"||P===Zt||!We(P)&&P>=u)&&l(m)})}else switch((s!==void 0||r.has(void 0))&&l(r.get(s)),p&&l(r.get(Zt)),t){case"add":a?p&&l(r.get("length")):(l(r.get(vt)),kt(e)&&l(r.get(Xs)));break;case"delete":a||(l(r.get(vt)),kt(e)&&l(r.get(Xs)));break;case"set":kt(e)&&l(r.get(vt));break}}gn()}function yt(e){const t=W(e);return t===e?t:(de(t,"iterate",Zt),Te(e)?t:t.map(Re))}function As(e){return de(e=W(e),"iterate",Zt),e}function Be(e,t){return tt(e)?Ct(_t(e)?Re(t):t):Re(t)}const Vo={__proto__:null,[Symbol.iterator](){return Fs(this,Symbol.iterator,e=>Be(this,e))},concat(...e){return yt(this).concat(...e.map(t=>M(t)?yt(t):t))},entries(){return Fs(this,"entries",e=>(e[1]=Be(this,e[1]),e))},every(e,t){return Ze(this,"every",e,t,void 0,arguments)},filter(e,t){return Ze(this,"filter",e,t,s=>s.map(n=>Be(this,n)),arguments)},find(e,t){return Ze(this,"find",e,t,s=>Be(this,s),arguments)},findIndex(e,t){return Ze(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ze(this,"findLast",e,t,s=>Be(this,s),arguments)},findLastIndex(e,t){return Ze(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ze(this,"forEach",e,t,void 0,arguments)},includes(...e){return Bs(this,"includes",e)},indexOf(...e){return Bs(this,"indexOf",e)},join(e){return yt(this).join(e)},lastIndexOf(...e){return Bs(this,"lastIndexOf",e)},map(e,t){return Ze(this,"map",e,t,void 0,arguments)},pop(){return Nt(this,"pop")},push(...e){return Nt(this,"push",e)},reduce(e,...t){return Nn(this,"reduce",e,t)},reduceRight(e,...t){return Nn(this,"reduceRight",e,t)},shift(){return Nt(this,"shift")},some(e,t){return Ze(this,"some",e,t,void 0,arguments)},splice(...e){return Nt(this,"splice",e)},toReversed(){return yt(this).toReversed()},toSorted(e){return yt(this).toSorted(e)},toSpliced(...e){return yt(this).toSpliced(...e)},unshift(...e){return Nt(this,"unshift",e)},values(){return Fs(this,"values",e=>Be(this,e))}};function Fs(e,t,s){const n=As(e),i=n[t]();return n!==e&&!Te(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=s(o.value)),o}),i}const Ko=Array.prototype;function Ze(e,t,s,n,i,o){const r=As(e),l=r!==e&&!Te(e),a=r[t];if(a!==Ko[t]){const m=a.apply(e,o);return l?Re(m):m}let p=s;r!==e&&(l?p=function(m,P){return s.call(this,Be(e,m),P,e)}:s.length>2&&(p=function(m,P){return s.call(this,m,P,e)}));const u=a.call(r,p,n);return l&&i?i(u):u}function Nn(e,t,s,n){const i=As(e),o=i!==e&&!Te(e);let r=s,l=!1;i!==e&&(o?(l=n.length===0,r=function(p,u,m){return l&&(l=!1,p=Be(e,p)),s.call(this,p,Be(e,u),m,e)}):s.length>3&&(r=function(p,u,m){return s.call(this,p,u,m,e)}));const a=i[t](r,...n);return l?Be(e,a):a}function Bs(e,t,s){const n=W(e);de(n,"iterate",Zt);const i=n[t](...s);return(i===-1||i===!1)&&yn(s[0])?(s[0]=W(s[0]),n[t](...s)):i}function Nt(e,t,s=[]){Ge(),hn();const n=W(e)[t].apply(e,s);return gn(),qe(),n}const Wo=cn("__proto__,__v_isRef,__isVue"),Ii=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(We));function Go(e){We(e)||(e=String(e));const t=W(this);return de(t,"has",e),t.hasOwnProperty(e)}class ji{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(i?o?nr:Di:o?Ni:Ui).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=M(t);if(!i){let a;if(r&&(a=Vo[s]))return a;if(s==="hasOwnProperty")return Go}const l=Reflect.get(t,s,fe(t)?t:n);if((We(s)?Ii.has(s):Wo(s))||(i||de(t,"get",s),o))return l;if(fe(l)){const a=r&&dn(s)?l:l.value;return i&&Z(a)?en(a):a}return Z(l)?i?en(l):Yt(l):l}}class zi extends ji{constructor(t=!1){super(!1,t)}set(t,s,n,i){let o=t[s];const r=M(t)&&dn(s);if(!this._isShallow){const p=tt(o);if(!Te(n)&&!tt(n)&&(o=W(o),n=W(n)),!r&&fe(o)&&!fe(n))return p||(o.value=n),!0}const l=r?Number(s)e,as=e=>Reflect.getPrototypeOf(e);function Xo(e,t,s){return function(...n){const i=this.__v_raw,o=W(i),r=kt(o),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,p=i[e](...n),u=s?Qs:t?Ct:Re;return!t&&de(o,"iterate",a?Xs:vt),he(Object.create(p),{next(){const{value:m,done:P}=p.next();return P?{value:m,done:P}:{value:l?[u(m[0]),u(m[1])]:u(m),done:P}}})}}function cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Qo(e,t){const s={get(i){const o=this.__v_raw,r=W(o),l=W(i);e||(Ve(i,l)&&de(r,"get",i),de(r,"get",l));const{has:a}=as(r),p=t?Qs:e?Ct:Re;if(a.call(r,i))return p(o.get(i));if(a.call(r,l))return p(o.get(l));o!==r&&o.get(i)},get size(){const i=this.__v_raw;return!e&&de(W(i),"iterate",vt),i.size},has(i){const o=this.__v_raw,r=W(o),l=W(i);return e||(Ve(i,l)&&de(r,"has",i),de(r,"has",l)),i===l?o.has(i):o.has(i)||o.has(l)},forEach(i,o){const r=this,l=r.__v_raw,a=W(l),p=t?Qs:e?Ct:Re;return!e&&de(a,"iterate",vt),l.forEach((u,m)=>i.call(o,p(u),p(m),r))}};return he(s,e?{add:cs("add"),set:cs("set"),delete:cs("delete"),clear:cs("clear")}:{add(i){const o=W(this),r=as(o),l=W(i),a=!t&&!Te(i)&&!tt(i)?l:i;return r.has.call(o,a)||Ve(i,a)&&r.has.call(o,i)||Ve(l,a)&&r.has.call(o,l)||(o.add(a),Xe(o,"add",a,a)),this},set(i,o){!t&&!Te(o)&&!tt(o)&&(o=W(o));const r=W(this),{has:l,get:a}=as(r);let p=l.call(r,i);p||(i=W(i),p=l.call(r,i));const u=a.call(r,i);return r.set(i,o),p?Ve(o,u)&&Xe(r,"set",i,o):Xe(r,"add",i,o),this},delete(i){const o=W(this),{has:r,get:l}=as(o);let a=r.call(o,i);a||(i=W(i),a=r.call(o,i)),l&&l.call(o,i);const p=o.delete(i);return a&&Xe(o,"delete",i,void 0),p},clear(){const i=W(this),o=i.size!==0,r=i.clear();return o&&Xe(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=Xo(i,e,t)}),s}function vn(e,t){const s=Qo(e,t);return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(G(s,i)&&i in n?s:n,i,o)}const er={get:vn(!1,!1)},tr={get:vn(!1,!0)},sr={get:vn(!0,!1)};const Ui=new WeakMap,Ni=new WeakMap,Di=new WeakMap,nr=new WeakMap;function ir(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yt(e){return tt(e)?e:_n(e,!1,Zo,er,Ui)}function or(e){return _n(e,!1,Jo,tr,Ni)}function en(e){return _n(e,!0,Yo,sr,Di)}function _n(e,t,s,n,i){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=i.get(e);if(o)return o;const r=ir(Ao(e));if(r===0)return e;const l=new Proxy(e,r===2?n:s);return i.set(e,l),l}function _t(e){return tt(e)?_t(e.__v_raw):!!(e&&e.__v_isReactive)}function tt(e){return!!(e&&e.__v_isReadonly)}function Te(e){return!!(e&&e.__v_isShallow)}function yn(e){return e?!!e.__v_raw:!1}function W(e){const t=e&&e.__v_raw;return t?W(t):e}function rr(e){return!G(e,"__v_skip")&&Object.isExtensible(e)&&wi(e,"__v_skip",!0),e}const Re=e=>Z(e)?Yt(e):e,Ct=e=>Z(e)?en(e):e;function fe(e){return e?e.__v_isRef===!0:!1}function V(e){return lr(e,!1)}function lr(e,t){return fe(e)?e:new ar(e,t)}class ar{constructor(t,s){this.dep=new bn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:W(t),this._value=s?t:Re(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Te(t)||tt(t);t=n?t:W(t),Ve(t,s)&&(this._rawValue=t,this._value=n?t:Re(t),this.dep.trigger())}}function g(e){return fe(e)?e.value:e}const cr={get:(e,t,s)=>t==="__v_raw"?e:g(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const i=e[t];return fe(i)&&!fe(s)?(i.value=s,!0):Reflect.set(e,t,s,n)}};function Mi(e){return _t(e)?e:new Proxy(e,cr)}class ur{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new bn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Q!==this)return Ci(this,!0),!0}get value(){const t=this.dep.track();return Ai(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function dr(e,t,s=!1){let n,i;return H(e)?n=e:(n=e.get,i=e.set),new ur(n,i,s)}const us={},ms=new WeakMap;let bt;function fr(e,t=!1,s=bt){if(s){let n=ms.get(s);n||ms.set(s,n=[]),n.push(e)}}function pr(e,t,s=J){const{immediate:n,deep:i,once:o,scheduler:r,augmentJob:l,call:a}=s,p=U=>i?U:Te(U)||i===!1||i===0?Qe(U,1):Qe(U);let u,m,P,O,F=!1,_=!1;if(fe(e)?(m=()=>e.value,F=Te(e)):_t(e)?(m=()=>p(e),F=!0):M(e)?(_=!0,F=e.some(U=>_t(U)||Te(U)),m=()=>e.map(U=>{if(fe(U))return U.value;if(_t(U))return p(U);if(H(U))return a?a(U,2):U()})):H(e)?t?m=a?()=>a(e,2):e:m=()=>{if(P){Ge();try{P()}finally{qe()}}const U=bt;bt=u;try{return a?a(e,3,[O]):e(O)}finally{bt=U}}:m=Ke,t&&i){const U=m,oe=i===!0?1/0:i;m=()=>Qe(U(),oe)}const E=Fo(),y=()=>{u.stop(),E&&E.active&&un(E.effects,u)};if(o&&t){const U=t;t=(...oe)=>{const je=U(...oe);return y(),je}}let $=_?new Array(e.length).fill(us):us;const z=U=>{if(!(!(u.flags&1)||!u.dirty&&!U))if(t){const oe=u.run();if(U||i||F||(_?oe.some((je,ze)=>Ve(je,$[ze])):Ve(oe,$))){P&&P();const je=bt;bt=u;try{const ze=[oe,$===us?void 0:_&&$[0]===us?[]:$,O];$=oe,a?a(t,3,ze):t(...ze)}finally{bt=je}}}else u.run()};return l&&l(z),u=new Ti(m),u.scheduler=r?()=>r(z,!1):z,O=U=>fr(U,!1,u),P=u.onStop=()=>{const U=ms.get(u);if(U){if(a)a(U,4);else for(const oe of U)oe();ms.delete(u)}},t?n?z(!0):$=u.run():r?r(z.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function Qe(e,t=1/0,s){if(t<=0||!Z(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,fe(e))Qe(e.value,t,s);else if(M(e))for(let n=0;n{Qe(n,t,s)});else if(_i(e)){for(const n in e)Qe(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Qe(e[n],t,s)}return e}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function ts(e,t,s,n){try{return n?e(...n):e()}catch(i){Os(i,t,s)}}function Ie(e,t,s,n){if(H(e)){const i=ts(e,t,s,n);return i&&bi(i)&&i.catch(o=>{Os(o,t,s)}),i}if(M(e)){const i=[];for(let o=0;o>>1,i=be[n],o=Jt(i);o=Jt(s)?be.push(e):be.splice(gr(t),0,e),e.flags|=1,Bi()}}function Bi(){bs||(bs=Li.then(Vi))}function mr(e){M(e)?St.push(...e):rt&&e.id===-1?rt.splice(wt+1,0,e):e.flags&1||(St.push(e),e.flags|=1),Bi()}function Dn(e,t,s=Fe+1){for(;sJt(s)-Jt(n));if(St.length=0,rt){rt.push(...t);return}for(rt=t,wt=0;wte.id==null?e.flags&2?-1:1/0:e.id;function Vi(e){try{for(Fe=0;Fe{n._d&&Zn(-1);const o=vs(t);let r;try{r=e(...i)}finally{vs(o),n._d&&Zn(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(ke===null)return e;const s=zs(ke),n=e.dirs||(e.dirs=[]);for(let i=0;i1)return s&&H(t)?t.call(n&&n.proxy):t}}const _r=Symbol.for("v-scx"),yr=()=>ps(_r);function Hs(e,t,s){return Wi(e,t,s)}function Wi(e,t,s=J){const{immediate:n,deep:i,flush:o,once:r}=s,l=he({},s),a=t&&n||!t&&o!=="post";let p;if(Qt){if(o==="sync"){const O=yr();p=O.__watcherHandles||(O.__watcherHandles=[])}else if(!a){const O=()=>{};return O.stop=Ke,O.resume=Ke,O.pause=Ke,O}}const u=ve;l.call=(O,F,_)=>Ie(O,u,F,_);let m=!1;o==="post"?l.scheduler=O=>{_e(O,u&&u.suspense)}:o!=="sync"&&(m=!0,l.scheduler=(O,F)=>{F?O():wn(O)}),l.augmentJob=O=>{t&&(O.flags|=4),m&&(O.flags|=2,u&&(O.id=u.uid,O.i=u))};const P=pr(e,t,l);return Qt&&(p?p.push(P):a&&P()),P}function wr(e,t,s){const n=this.proxy,i=ne(e)?e.includes(".")?Gi(n,e):()=>n[e]:e.bind(n,n);let o;H(t)?o=t:(o=t.handler,s=t);const r=ss(this),l=Wi(i,o.bind(n),s);return r(),l}function Gi(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;ie.__isTeleport,Vs=Symbol("_leaveCb");function xn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,xn(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 qi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Mn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const _s=new WeakMap;function Vt(e,t,s,n,i=!1){if(M(e)){e.forEach((_,E)=>Vt(_,t&&(M(t)?t[E]:t),s,n,i));return}if(Kt(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Vt(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?zs(n.component):n.el,r=i?null:o,{i:l,r:a}=e,p=t&&t.r,u=l.refs===J?l.refs={}:l.refs,m=l.setupState,P=W(m),O=m===J?mi:_=>Mn(u,_)?!1:G(P,_),F=(_,E)=>!(E&&Mn(u,E));if(p!=null&&p!==a){if(Ln(t),ne(p))u[p]=null,O(p)&&(m[p]=null);else if(fe(p)){const _=t;F(p,_.k)&&(p.value=null),_.k&&(u[_.k]=null)}}if(H(a)){Ge();try{ts(a,l,12,[r,u])}finally{qe()}}else{const _=ne(a),E=fe(a);if(_||E){const y=()=>{if(e.f){const $=_?O(a)?m[a]:u[a]:F()||!e.k?a.value:u[e.k];if(i)M($)&&un($,o);else if(M($))$.includes(o)||$.push(o);else if(_)u[a]=[o],O(a)&&(m[a]=u[a]);else{const z=[o];F(a,e.k)&&(a.value=z),e.k&&(u[e.k]=z)}}else _?(u[a]=r,O(a)&&(m[a]=r)):E&&(F(a,e.k)&&(a.value=r),e.k&&(u[e.k]=r))};if(r){const $=()=>{y(),_s.delete(e)};$.id=-1,_s.set(e,$),_e($,s)}else Ln(e),y()}}}function Ln(e){const t=_s.get(e);t&&(t.flags|=8,_s.delete(e))}$s().requestIdleCallback;$s().cancelIdleCallback;const Kt=e=>!!e.type.__asyncLoader,Zi=e=>e.type.__isKeepAlive;function Sr(e,t){Yi(e,"a",t)}function Tr(e,t){Yi(e,"da",t)}function Yi(e,t,s=ve){const n=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Rs(t,n,s),s){let i=s.parent;for(;i&&i.parent;)Zi(i.parent.vnode)&&Er(n,t,s,i),i=i.parent}}function Er(e,t,s,n){const i=Rs(t,e,n,!0);kn(()=>{un(n[t],i)},s)}function Rs(e,t,s=ve,n=!1){if(s){const i=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Ge();const l=ss(s),a=Ie(t,s,e,r);return l(),qe(),a});return n?i.unshift(o):i.push(o),o}}const st=e=>(t,s=ve)=>{(!Qt||e==="sp")&&Rs(e,(...n)=>t(...n),s)},Cr=st("bm"),dt=st("m"),Pr=st("bu"),$r=st("u"),Ar=st("bum"),kn=st("um"),Or=st("sp"),Rr=st("rtg"),Ir=st("rtc");function jr(e,t=ve){Rs("ec",e,t)}const zr=Symbol.for("v-ndc");function Se(e,t,s,n){let i;const o=s,r=M(e);if(r||ne(e)){const l=r&&_t(e);let a=!1,p=!1;l&&(a=!Te(e),p=tt(e),e=As(e)),i=new Array(e.length);for(let u=0,m=e.length;ut(l,a,void 0,o));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,p=l.length;ae?vo(e)?zs(e):tn(e.parent):null,Wt=he(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=>tn(e.parent),$root:e=>tn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Xi(e),$forceUpdate:e=>e.f||(e.f=()=>{wn(e.update)}),$nextTick:e=>e.n||(e.n=Fi.bind(e.proxy)),$watch:e=>wr.bind(e)}),Ks=(e,t)=>e!==J&&!e.__isScriptSetup&&G(e,t),Ur={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:o,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const P=r[t];if(P!==void 0)switch(P){case 1:return n[t];case 2:return i[t];case 4:return s[t];case 3:return o[t]}else{if(Ks(n,t))return r[t]=1,n[t];if(i!==J&&G(i,t))return r[t]=2,i[t];if(G(o,t))return r[t]=3,o[t];if(s!==J&&G(s,t))return r[t]=4,s[t];sn&&(r[t]=0)}}const p=Wt[t];let u,m;if(p)return t==="$attrs"&&de(e.attrs,"get",""),p(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(s!==J&&G(s,t))return r[t]=4,s[t];if(m=a.config.globalProperties,G(m,t))return m[t]},set({_:e},t,s){const{data:n,setupState:i,ctx:o}=e;return Ks(i,t)?(i[t]=s,!0):n!==J&&G(n,t)?(n[t]=s,!0):G(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:i,props:o,type:r}},l){let a;return!!(s[l]||e!==J&&l[0]!=="$"&&G(e,l)||Ks(t,l)||G(o,l)||G(n,l)||G(Wt,l)||G(i.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:G(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Fn(e){return M(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let sn=!0;function Nr(e){const t=Xi(e),s=e.proxy,n=e.ctx;sn=!1,t.beforeCreate&&Bn(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:l,provide:a,inject:p,created:u,beforeMount:m,mounted:P,beforeUpdate:O,updated:F,activated:_,deactivated:E,beforeDestroy:y,beforeUnmount:$,destroyed:z,unmounted:U,render:oe,renderTracked:je,renderTriggered:ze,errorCaptured:nt,serverPrefetch:ns,expose:ft,inheritAttrs:It,components:is,directives:os,filters:Us}=t;if(p&&Dr(p,n,null),r)for(const te in r){const X=r[te];H(X)&&(n[te]=X.bind(s))}if(i){const te=i.call(s,s);Z(te)&&(e.data=Yt(te))}if(sn=!0,o)for(const te in o){const X=o[te],pt=H(X)?X.bind(s,s):H(X.get)?X.get.bind(s,s):Ke,rs=!H(X)&&H(X.set)?X.set.bind(s):Ke,ht=Ae({get:pt,set:rs});Object.defineProperty(n,te,{enumerable:!0,configurable:!0,get:()=>ht.value,set:Ue=>ht.value=Ue})}if(l)for(const te in l)Ji(l[te],n,s,te);if(a){const te=H(a)?a.call(s):a;Reflect.ownKeys(te).forEach(X=>{vr(X,te[X])})}u&&Bn(u,e,"c");function ge(te,X){M(X)?X.forEach(pt=>te(pt.bind(s))):X&&te(X.bind(s))}if(ge(Cr,m),ge(dt,P),ge(Pr,O),ge($r,F),ge(Sr,_),ge(Tr,E),ge(jr,nt),ge(Ir,je),ge(Rr,ze),ge(Ar,$),ge(kn,U),ge(Or,ns),M(ft))if(ft.length){const te=e.exposed||(e.exposed={});ft.forEach(X=>{Object.defineProperty(te,X,{get:()=>s[X],set:pt=>s[X]=pt,enumerable:!0})})}else e.exposed||(e.exposed={});oe&&e.render===Ke&&(e.render=oe),It!=null&&(e.inheritAttrs=It),is&&(e.components=is),os&&(e.directives=os),ns&&qi(e)}function Dr(e,t,s=Ke){M(e)&&(e=nn(e));for(const n in e){const i=e[n];let o;Z(i)?"default"in i?o=ps(i.from||n,i.default,!0):o=ps(i.from||n):o=ps(i),fe(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[n]=o}}function Bn(e,t,s){Ie(M(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Ji(e,t,s,n){let i=n.includes(".")?Gi(s,n):()=>s[n];if(ne(e)){const o=t[e];H(o)&&Hs(i,o)}else if(H(e))Hs(i,e.bind(s));else if(Z(e))if(M(e))e.forEach(o=>Ji(o,t,s,n));else{const o=H(e.handler)?e.handler.bind(s):t[e.handler];H(o)&&Hs(i,o,e)}}function Xi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let a;return l?a=l:!i.length&&!s&&!n?a=t:(a={},i.length&&i.forEach(p=>ys(a,p,r,!0)),ys(a,t,r)),Z(t)&&o.set(t,a),a}function ys(e,t,s,n=!1){const{mixins:i,extends:o}=t;o&&ys(e,o,s,!0),i&&i.forEach(r=>ys(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const l=Mr[r]||s&&s[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Mr={data:Hn,props:Vn,emits:Vn,methods:Mt,computed:Mt,beforeCreate:me,created:me,beforeMount:me,mounted:me,beforeUpdate:me,updated:me,beforeDestroy:me,beforeUnmount:me,destroyed:me,unmounted:me,activated:me,deactivated:me,errorCaptured:me,serverPrefetch:me,components:Mt,directives:Mt,watch:Fr,provide:Hn,inject:Lr};function Hn(e,t){return t?e?function(){return he(H(e)?e.call(this,this):e,H(t)?t.call(this,this):t)}:t:e}function Lr(e,t){return Mt(nn(e),nn(t))}function nn(e){if(M(e)){const t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Pe(t)}Modifiers`]||e[`${ut(t)}Modifiers`];function Kr(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||J;let i=s;const o=t.startsWith("update:"),r=o&&Vr(n,t.slice(7));r&&(r.trim&&(i=s.map(u=>ne(u)?u.trim():u)),r.number&&(i=s.map(Ps)));let l,a=n[l=Ds(t)]||n[l=Ds(Pe(t))];!a&&o&&(a=n[l=Ds(ut(t))]),a&&Ie(a,e,6,i);const p=n[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ie(p,e,6,i)}}const Wr=new WeakMap;function eo(e,t,s=!1){const n=s?Wr:t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let r={},l=!1;if(!H(e)){const a=p=>{const u=eo(p,t,!0);u&&(l=!0,he(r,u))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(Z(e)&&n.set(e,null),null):(M(o)?o.forEach(a=>r[a]=null):he(r,o),Z(e)&&n.set(e,r),r)}function Is(e,t){return!e||!Ts(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),G(e,t[0].toLowerCase()+t.slice(1))||G(e,ut(t))||G(e,t))}function Kn(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:r,attrs:l,emit:a,render:p,renderCache:u,props:m,data:P,setupState:O,ctx:F,inheritAttrs:_}=e,E=vs(e);let y,$;try{if(s.shapeFlag&4){const U=i||n,oe=U;y=He(p.call(oe,U,u,m,O,P,F)),$=l}else{const U=t;y=He(U.length>1?U(m,{attrs:l,slots:r,emit:a}):U(m,null)),$=t.props?l:Gr(l)}}catch(U){Gt.length=0,Os(U,e,1),y=ue(at)}let z=y;if($&&_!==!1){const U=Object.keys($),{shapeFlag:oe}=z;U.length&&oe&7&&(o&&U.some(Es)&&($=qr($,o)),z=Pt(z,$,!1,!0))}return s.dirs&&(z=Pt(z,null,!1,!0),z.dirs=z.dirs?z.dirs.concat(s.dirs):s.dirs),s.transition&&xn(z,s.transition),y=z,vs(E),y}const Gr=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ts(s))&&((t||(t={}))[s]=e[s]);return t},qr=(e,t)=>{const s={};for(const n in e)(!Es(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Zr(e,t,s){const{props:n,children:i,component:o}=e,{props:r,children:l,patchFlag:a}=t,p=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?Wn(n,r,p):!!r;if(a&8){const u=t.dynamicProps;for(let m=0;mObject.create(so),io=e=>Object.getPrototypeOf(e)===so;function Jr(e,t,s,n=!1){const i={},o=no();e.propsDefaults=Object.create(null),oo(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);s?e.props=n?i:or(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Xr(e,t,s,n){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,l=W(i),[a]=e.propsOptions;let p=!1;if((n||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let m=0;m{a=!0;const[P,O]=ro(m,t,!0);he(r,P),O&&l.push(...O)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return Z(e)&&n.set(e,xt),xt;if(M(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",Tn=e=>M(e)?e.map(He):[He(e)],el=(e,t,s)=>{if(t._n)return t;const n=br((...i)=>Tn(t(...i)),s);return n._c=!1,n},lo=(e,t,s)=>{const n=e._ctx;for(const i in e){if(Sn(i))continue;const o=e[i];if(H(o))t[i]=el(i,o,n);else if(o!=null){const r=Tn(o);t[i]=()=>r}}},ao=(e,t)=>{const s=Tn(t);e.slots.default=()=>s},co=(e,t,s)=>{for(const n in t)(s||!Sn(n))&&(e[n]=t[n])},tl=(e,t,s)=>{const n=e.slots=no();if(e.vnode.shapeFlag&32){const i=t._;i?(co(n,t,s),s&&wi(n,"_",i,!0)):lo(t,n)}else t&&ao(e,t)},sl=(e,t,s)=>{const{vnode:n,slots:i}=e;let o=!0,r=J;if(n.shapeFlag&32){const l=t._;l?s&&l===1?o=!1:co(i,t,s):(o=!t.$stable,lo(t,i)),r=t}else t&&(ao(e,t),r={default:1});if(o)for(const l in i)!Sn(l)&&r[l]==null&&delete i[l]},_e=ll;function nl(e){return il(e)}function il(e,t){const s=$s();s.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:r,createText:l,createComment:a,setText:p,setElementText:u,parentNode:m,nextSibling:P,setScopeId:O=Ke,insertStaticContent:F}=e,_=(c,f,v,T=null,k=null,w=null,I=void 0,R=null,A=!!f.dynamicChildren)=>{if(c===f)return;c&&!Dt(c,f)&&(T=ls(c),Ue(c,k,w,!0),c=null),f.patchFlag===-2&&(A=!1,f.dynamicChildren=null);const{type:x,ref:D,shapeFlag:j}=f;switch(x){case js:E(c,f,v,T);break;case at:y(c,f,v,T);break;case Gs:c==null&&$(f,v,T,I);break;case ee:is(c,f,v,T,k,w,I,R,A);break;default:j&1?oe(c,f,v,T,k,w,I,R,A):j&6?os(c,f,v,T,k,w,I,R,A):(j&64||j&128)&&x.process(c,f,v,T,k,w,I,R,A,zt)}D!=null&&k?Vt(D,c&&c.ref,w,f||c,!f):D==null&&c&&c.ref!=null&&Vt(c.ref,null,w,c,!0)},E=(c,f,v,T)=>{if(c==null)n(f.el=l(f.children),v,T);else{const k=f.el=c.el;f.children!==c.children&&p(k,f.children)}},y=(c,f,v,T)=>{c==null?n(f.el=a(f.children||""),v,T):f.el=c.el},$=(c,f,v,T)=>{[c.el,c.anchor]=F(c.children,f,v,T,c.el,c.anchor)},z=({el:c,anchor:f},v,T)=>{let k;for(;c&&c!==f;)k=P(c),n(c,v,T),c=k;n(f,v,T)},U=({el:c,anchor:f})=>{let v;for(;c&&c!==f;)v=P(c),i(c),c=v;i(f)},oe=(c,f,v,T,k,w,I,R,A)=>{if(f.type==="svg"?I="svg":f.type==="math"&&(I="mathml"),c==null)je(f,v,T,k,w,I,R,A);else{const x=c.el&&c.el._isVueCE?c.el:null;try{x&&x._beginPatch(),ns(c,f,k,w,I,R,A)}finally{x&&x._endPatch()}}},je=(c,f,v,T,k,w,I,R)=>{let A,x;const{props:D,shapeFlag:j,transition:N,dirs:L}=c;if(A=c.el=r(c.type,w,D&&D.is,D),j&8?u(A,c.children):j&16&&nt(c.children,A,null,T,k,Ws(c,w),I,R),L&>(c,null,T,"created"),ze(A,c,c.scopeId,I,T),D){for(const Y in D)Y!=="value"&&!Ft(Y)&&o(A,Y,null,D[Y],w,T);"value"in D&&o(A,"value",null,D.value,w),(x=D.onVnodeBeforeMount)&&Le(x,T,c)}L&>(c,null,T,"beforeMount");const K=ol(k,N);K&&N.beforeEnter(A),n(A,f,v),((x=D&&D.onVnodeMounted)||K||L)&&_e(()=>{try{x&&Le(x,T,c),K&&N.enter(A),L&>(c,null,T,"mounted")}finally{}},k)},ze=(c,f,v,T,k)=>{if(v&&O(c,v),T)for(let w=0;w{for(let x=A;x{const R=f.el=c.el;let{patchFlag:A,dynamicChildren:x,dirs:D}=f;A|=c.patchFlag&16;const j=c.props||J,N=f.props||J;let L;if(v&&mt(v,!1),(L=N.onVnodeBeforeUpdate)&&Le(L,v,f,c),D&>(f,c,v,"beforeUpdate"),v&&mt(v,!0),x&&(!c.dynamicChildren||c.dynamicChildren.length!==x.length)&&(A=0,I=!1,x=null),(j.innerHTML&&N.innerHTML==null||j.textContent&&N.textContent==null)&&u(R,""),x?ft(c.dynamicChildren,x,R,v,T,Ws(f,k),w):I||X(c,f,R,null,v,T,Ws(f,k),w,!1),A>0){if(A&16)It(R,j,N,v,k);else if(A&2&&j.class!==N.class&&o(R,"class",null,N.class,k),A&4&&o(R,"style",j.style,N.style,k),A&8){const K=f.dynamicProps;for(let Y=0;Y{L&&Le(L,v,f,c),D&>(f,c,v,"updated")},T)},ft=(c,f,v,T,k,w,I)=>{for(let R=0;R{if(f!==v){if(f!==J)for(const w in f)!Ft(w)&&!(w in v)&&o(c,w,f[w],null,k,T);for(const w in v){if(Ft(w))continue;const I=v[w],R=f[w];I!==R&&w!=="value"&&o(c,w,R,I,k,T)}"value"in v&&o(c,"value",f.value,v.value,k)}},is=(c,f,v,T,k,w,I,R,A)=>{const x=f.el=c?c.el:l(""),D=f.anchor=c?c.anchor:l("");let{patchFlag:j,dynamicChildren:N,slotScopeIds:L}=f;L&&(R=R?R.concat(L):L),c==null?(n(x,v,T),n(D,v,T),nt(f.children||[],v,D,k,w,I,R,A)):j>0&&j&64&&N&&c.dynamicChildren&&c.dynamicChildren.length===N.length?(ft(c.dynamicChildren,N,v,k,w,I,R),(f.key!=null||k&&f===k.subTree)&&uo(c,f,!0)):X(c,f,v,D,k,w,I,R,A)},os=(c,f,v,T,k,w,I,R,A)=>{f.slotScopeIds=R,c==null?f.shapeFlag&512?k.ctx.activate(f,v,T,I,A):Us(f,v,T,k,w,I,A):Pn(c,f,A)},Us=(c,f,v,T,k,w,I)=>{const R=c.component=hl(c,T,k);if(Zi(c)&&(R.ctx.renderer=zt),ml(R,!1,I),R.asyncDep){if(k&&k.registerDep(R,ge,I),!c.el){const A=R.subTree=ue(at);y(null,A,f,v),c.placeholder=A.el}}else ge(R,c,f,v,k,w,I)},Pn=(c,f,v)=>{const T=f.component=c.component;if(Zr(c,f,v))if(T.asyncDep&&!T.asyncResolved){te(T,f,v);return}else T.next=f,T.update();else f.el=c.el,T.vnode=f},ge=(c,f,v,T,k,w,I)=>{const R=()=>{if(c.isMounted){let{next:j,bu:N,u:L,parent:K,vnode:Y}=c;{const De=fo(c);if(De){j&&(j.el=Y.el,te(c,j,I)),De.asyncDep.then(()=>{_e(()=>{c.isUnmounted||x()},k)});return}}let q=j,ie;mt(c,!1),j?(j.el=Y.el,te(c,j,I)):j=Y,N&&fs(N),(ie=j.props&&j.props.onVnodeBeforeUpdate)&&Le(ie,K,j,Y),mt(c,!0);const ae=Kn(c),Ne=c.subTree;c.subTree=ae,_(Ne,ae,m(Ne.el),ls(Ne),c,k,w),j.el=ae.el,q===null&&Yr(c,ae.el),L&&_e(L,k),(ie=j.props&&j.props.onVnodeUpdated)&&_e(()=>Le(ie,K,j,Y),k)}else{let j;const{el:N,props:L}=f,{bm:K,m:Y,parent:q,root:ie,type:ae}=c,Ne=Kt(f);mt(c,!1),K&&fs(K),!Ne&&(j=L&&L.onVnodeBeforeMount)&&Le(j,q,f),mt(c,!0);{ie.ce&&ie.ce._hasShadowRoot()&&ie.ce._injectChildStyle(ae,c.parent?c.parent.type:void 0);const De=c.subTree=Kn(c);_(null,De,v,T,c,k,w),f.el=De.el}if(Y&&_e(Y,k),!Ne&&(j=L&&L.onVnodeMounted)){const De=f;_e(()=>Le(j,q,De),k)}(f.shapeFlag&256||q&&Kt(q.vnode)&&q.vnode.shapeFlag&256)&&c.a&&_e(c.a,k),c.isMounted=!0,f=v=T=null}};c.scope.on();const A=c.effect=new Ti(R);c.scope.off();const x=c.update=A.run.bind(A),D=c.job=A.runIfDirty.bind(A);D.i=c,D.id=c.uid,A.scheduler=()=>wn(D),mt(c,!0),x()},te=(c,f,v)=>{f.component=c;const T=c.vnode.props;c.vnode=f,c.next=null,Xr(c,f.props,T,v),sl(c,f.children,v),Ge(),Dn(c),qe()},X=(c,f,v,T,k,w,I,R,A=!1)=>{const x=c&&c.children,D=c?c.shapeFlag:0,j=f.children,{patchFlag:N,shapeFlag:L}=f;if(N>0){if(N&128){rs(x,j,v,T,k,w,I,R,A);return}else if(N&256){pt(x,j,v,T,k,w,I,R,A);return}}L&8?(D&16&&jt(x,k,w),j!==x&&u(v,j)):D&16?L&16?rs(x,j,v,T,k,w,I,R,A):jt(x,k,w,!0):(D&8&&u(v,""),L&16&&nt(j,v,T,k,w,I,R,A))},pt=(c,f,v,T,k,w,I,R,A)=>{c=c||xt,f=f||xt;const x=c.length,D=f.length,j=Math.min(x,D);let N;for(N=0;ND?jt(c,k,w,!0,!1,j):nt(f,v,T,k,w,I,R,A,j)},rs=(c,f,v,T,k,w,I,R,A)=>{let x=0;const D=f.length;let j=c.length-1,N=D-1;for(;x<=j&&x<=N;){const L=c[x],K=f[x]=A?Je(f[x]):He(f[x]);if(Dt(L,K))_(L,K,v,null,k,w,I,R,A);else break;x++}for(;x<=j&&x<=N;){const L=c[j],K=f[N]=A?Je(f[N]):He(f[N]);if(Dt(L,K))_(L,K,v,null,k,w,I,R,A);else break;j--,N--}if(x>j){if(x<=N){const L=N+1,K=LN)for(;x<=j;)Ue(c[x],k,w,!0),x++;else{const L=x,K=x,Y=new Map;for(x=K;x<=N;x++){const ye=f[x]=A?Je(f[x]):He(f[x]);ye.key!=null&&Y.set(ye.key,x)}let q,ie=0;const ae=N-K+1;let Ne=!1,De=0;const Ut=new Array(ae);for(x=0;x=ae){Ue(ye,k,w,!0);continue}let Me;if(ye.key!=null)Me=Y.get(ye.key);else for(q=K;q<=N;q++)if(Ut[q-K]===0&&Dt(ye,f[q])){Me=q;break}Me===void 0?Ue(ye,k,w,!0):(Ut[Me-K]=x+1,Me>=De?De=Me:Ne=!0,_(ye,f[Me],v,null,k,w,I,R,A),ie++)}const On=Ne?rl(Ut):xt;for(q=On.length-1,x=ae-1;x>=0;x--){const ye=K+x,Me=f[ye],Rn=f[ye+1],In=ye+1{const{el:w,type:I,transition:R,children:A,shapeFlag:x}=c;if(x&6){ht(c.component.subTree,f,v,T);return}if(x&128){c.suspense.move(f,v,T);return}if(x&64){I.move(c,f,v,zt);return}if(I===ee){n(w,f,v);for(let j=0;jR.enter(w),k));else{const{leave:j,delayLeave:N,afterLeave:L}=R,K=()=>{c.ctx.isUnmounted?i(w):n(w,f,v)},Y=()=>{const q=w._isLeaving||!!w[Vs];w._isLeaving&&w[Vs](!0),R.persisted&&!q?K():j(w,()=>{K(),L&&L()})};N?N(w,K,Y):Y()}else n(w,f,v)},Ue=(c,f,v,T=!1,k=!1)=>{const{type:w,props:I,ref:R,children:A,dynamicChildren:x,shapeFlag:D,patchFlag:j,dirs:N,cacheIndex:L,memo:K}=c;if(j===-2&&(k=!1),R!=null&&(Ge(),Vt(R,null,v,c,!0),qe()),L!=null&&(f.renderCache[L]=void 0),D&256){f.ctx.deactivate(c);return}const Y=D&1&&N,q=!Kt(c);let ie;if(q&&(ie=I&&I.onVnodeBeforeUnmount)&&Le(ie,f,c),D&6)Po(c.component,v,T);else{if(D&128){c.suspense.unmount(v,T);return}Y&>(c,null,f,"beforeUnmount"),D&64?c.type.remove(c,f,v,zt,T):x&&!x.hasOnce&&(w!==ee||j>0&&j&64)?jt(x,f,v,!1,!0):(w===ee&&j&384||!k&&D&16)&&jt(A,f,v),T&&$n(c)}const ae=K!=null&&L==null;(q&&(ie=I&&I.onVnodeUnmounted)||Y||ae)&&_e(()=>{ie&&Le(ie,f,c),Y&>(c,null,f,"unmounted"),ae&&(c.el=null)},v)},$n=c=>{const{type:f,el:v,anchor:T,transition:k}=c;if(f===ee){Co(v,T);return}if(f===Gs){U(c);return}const w=()=>{i(v),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if(c.shapeFlag&1&&k&&!k.persisted){const{leave:I,delayLeave:R}=k,A=()=>I(v,w);R?R(c.el,w,A):A()}else w()},Co=(c,f)=>{let v;for(;c!==f;)v=P(c),i(c),c=v;i(f)},Po=(c,f,v)=>{const{bum:T,scope:k,job:w,subTree:I,um:R,m:A,a:x}=c;qn(A),qn(x),T&&fs(T),k.stop(),w&&(w.flags|=8,Ue(I,c,f,v)),R&&_e(R,f),_e(()=>{c.isUnmounted=!0},f)},jt=(c,f,v,T=!1,k=!1,w=0)=>{for(let I=w;I{if(c.shapeFlag&6)return ls(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const f=P(c.anchor||c.el),v=f&&f[xr];return v?P(v):f};let Ns=!1;const An=(c,f,v)=>{let T;c==null?f._vnode&&(Ue(f._vnode,null,null,!0),T=f._vnode.component):_(f._vnode||null,c,f,null,null,null,v),f._vnode=c,Ns||(Ns=!0,Dn(T),Hi(),Ns=!1)},zt={p:_,um:Ue,m:ht,r:$n,mt:Us,mc:nt,pc:X,pbc:ft,n:ls,o:e};return{render:An,hydrate:void 0,createApp:Hr(An)}}function Ws({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 mt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ol(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function uo(e,t,s=!1){const n=e.children,i=t.children;if(M(n)&&M(i))for(let o=0;o>1,e[s[l]]0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,r=s[o-1];o-- >0;)s[o]=r,r=t[r];return s}function fo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fo(t)}function qn(e){if(e)for(let t=0;te.__isSuspense;function ll(e,t){t&&t.pendingBranch?M(e)?t.effects.push(...e):t.effects.push(e):mr(e)}const ee=Symbol.for("v-fgt"),js=Symbol.for("v-txt"),at=Symbol.for("v-cmt"),Gs=Symbol.for("v-stc"),Gt=[];let we=null;function S(e=!1){Gt.push(we=e?null:[])}function al(){Gt.pop(),we=Gt[Gt.length-1]||null}let Xt=1;function Zn(e,t=!1){Xt+=e,e<0&&we&&t&&(we.hasOnce=!0)}function go(e){return e.dynamicChildren=Xt>0?we||xt:null,al(),Xt>0&&we&&we.push(e),e}function C(e,t,s,n,i,o){return go(d(e,t,s,n,i,o,!0))}function ot(e,t,s,n,i){return go(ue(e,t,s,n,i,!0))}function mo(e){return e?e.__v_isVNode===!0:!1}function Dt(e,t){return e.type===t.type&&e.key===t.key}const bo=({key:e})=>e??null,hs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ne(e)||fe(e)||H(e)?{i:ke,r:e,k:t,f:!!s}:e:null);function d(e,t=null,s=null,n=0,i=null,o=e===ee?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&bo(t),ref:t&&hs(t),scopeId:Ki,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:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ke};return l?(ws(a,s),o&128&&e.normalize(a)):s&&(a.shapeFlag|=ne(s)?8:16),Xt>0&&!r&&we&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&we.push(a),a}const ue=cl;function cl(e,t=null,s=null,n=0,i=null,o=!1){if((!e||e===zr)&&(e=at),mo(e)){const l=Pt(e,t,!0);return s&&ws(l,s),Xt>0&&!o&&we&&(l.shapeFlag&6?we[we.indexOf(e)]=l:we.push(l)),l.patchFlag=-2,l}if(yl(e)&&(e=e.__vccOpts),t){t=ul(t);let{class:l,style:a}=t;l&&!ne(l)&&(t.class=Oe(l)),Z(a)&&(yn(a)&&!M(a)&&(a=he({},a)),t.style=fn(a))}const r=ne(e)?1:ho(e)?128:kr(e)?64:Z(e)?4:H(e)?2:0;return d(e,t,s,n,i,r,o,!0)}function ul(e){return e?yn(e)||io(e)?he({},e):e:null}function Pt(e,t,s=!1,n=!1){const{props:i,ref:o,patchFlag:r,children:l,transition:a}=e,p=t?dl(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&bo(p),ref:t&&t.ref?s&&o?M(o)?o.concat(hs(t)):[o,hs(t)]:hs(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ee?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Pt(e.ssContent),ssFallback:e.ssFallback&&Pt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&n&&xn(u,a.clone(u)),u}function Ee(e=" ",t=0){return ue(js,null,e,t)}function B(e="",t=!1){return t?(S(),ot(at,null,e)):ue(at,null,e)}function He(e){return e==null||typeof e=="boolean"?ue(at):M(e)?ue(ee,null,e.slice()):mo(e)?Je(e):ue(js,null,String(e))}function Je(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Pt(e)}function ws(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(M(t))s=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),ws(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!io(t)?t._ctx=ke:i===3&&ke&&(ke.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(H(t)){if(n&65){ws(e,{default:t});return}t={default:t,_ctx:ke},s=32}else t=String(t),n&64?(s=16,t=[Ee(t)]):s=8;e.children=t,e.shapeFlag|=s}function dl(...e){const t={};for(let s=0;sve||ke;let xs,rn;{const e=$s(),t=(s,n)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(n),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};xs=t("__VUE_INSTANCE_SETTERS__",s=>ve=s),rn=t("__VUE_SSR_SETTERS__",s=>Qt=s)}const ss=e=>{const t=ve;return xs(e),e.scope.on(),()=>{e.scope.off(),xs(t)}},Yn=()=>{ve&&ve.scope.off(),xs(null)};function vo(e){return e.vnode.shapeFlag&4}let Qt=!1;function ml(e,t=!1,s=!1){t&&rn(t);const{props:n,children:i}=e.vnode,o=vo(e);Jr(e,n,o,t),tl(e,i,s||t);const r=o?bl(e,t):void 0;return t&&rn(!1),r}function bl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ur);const{setup:n}=s;if(n){Ge();const i=e.setupContext=n.length>1?_l(e):null,o=ss(e),r=ts(n,e,0,[e.props,i]),l=bi(r);if(qe(),o(),(l||e.sp)&&!Kt(e)&&qi(e),l){if(r.then(Yn,Yn),t)return r.then(a=>{Jn(e,a)}).catch(a=>{Os(a,e,0)});e.asyncDep=r}else Jn(e,r)}else _o(e)}function Jn(e,t,s){H(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=Mi(t)),_o(e)}function _o(e,t,s){const n=e.type;e.render||(e.render=n.render||Ke);{const i=ss(e);Ge();try{Nr(e)}finally{qe(),i()}}}const vl={get(e,t){return de(e,"get",""),e[t]}};function _l(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,vl),slots:e.slots,emit:e.emit,expose:t}}function zs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Mi(rr(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Wt)return Wt[s](e)},has(t,s){return s in t||s in Wt}})):e.proxy}function yl(e){return H(e)&&"__vccOpts"in e}const Ae=(e,t)=>dr(e,t,Qt),wl="3.5.39";/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let ln;const Xn=typeof window<"u"&&window.trustedTypes;if(Xn)try{ln=Xn.createPolicy("vue",{createHTML:e=>e})}catch{}const yo=ln?e=>ln.createHTML(e):e=>e,xl="http://www.w3.org/2000/svg",kl="http://www.w3.org/1998/Math/MathML",Ye=typeof document<"u"?document:null,Qn=Ye&&Ye.createElement("template"),Sl={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 i=t==="svg"?Ye.createElementNS(xl,e):t==="mathml"?Ye.createElementNS(kl,e):s?Ye.createElement(e,{is:s}):Ye.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Ye.createTextNode(e),createComment:e=>Ye.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ye.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const r=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Qn.innerHTML=yo(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const l=Qn.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Tl=Symbol("_vtc");function El(e,t,s){const n=e[Tl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const ei=Symbol("_vod"),Cl=Symbol("_vsh"),Pl=Symbol(""),$l=/(?:^|;)\s*display\s*:/;function Al(e,t,s){const n=e.style,i=ne(s);let o=!1;if(s&&!i){if(t)if(ne(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();s[l]==null&&Lt(n,l,"")}else for(const r in t)s[r]==null&&Lt(n,r,"");for(const r in s){r==="display"&&(o=!0);const l=s[r];l!=null?Rl(e,r,!ne(t)&&t?t[r]:void 0,l)||Lt(n,r,l):Lt(n,r,"")}}else if(i){if(t!==s){const r=n[Pl];r&&(s+=";"+r),n.cssText=s,o=$l.test(s)}}else t&&e.removeAttribute("style");ei in e&&(e[ei]=o?n.display:"",e[Cl]&&(n.display="none"))}const ti=/\s*!important$/;function Lt(e,t,s){if(M(s))s.forEach(n=>Lt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Ol(e,t);ti.test(s)?e.setProperty(ut(n),s.replace(ti,""),"important"):e[n]=s}}const si=["Webkit","Moz","ms"],qs={};function Ol(e,t){const s=qs[t];if(s)return s;let n=Pe(t);if(n!=="filter"&&n in e)return qs[t]=n;n=yi(n);for(let i=0;iZs||(Dl.then(()=>Zs=0),Zs=Date.now());function Ll(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const i=s.value;if(M(i)){const o=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{o.call(n),n._stopped=!0};const r=i.slice(),l=[n];for(let a=0;ae.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fl=(e,t,s,n,i,o)=>{const r=i==="svg";t==="class"?El(e,n,r):t==="style"?Al(e,s,n):Ts(t)?Es(t)||jl(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Bl(e,t,n,r))?(oi(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ii(e,t,n,r,o,t!=="value")):e._isVueCE&&(Hl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ne(n)))?oi(e,Pe(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),ii(e,t,n,r))};function Bl(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&li(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 i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return li(t)&&ne(s)?!1:t in e}function Hl(e,t){const s=e._def.props;if(!s)return!1;const n=Pe(t);return Array.isArray(s)?s.some(i=>Pe(i)===n):Object.keys(s).some(i=>Pe(i)===n)}const ct=e=>{const t=e.props["onUpdate:modelValue"]||!1;return M(t)?s=>fs(t,s):t};function Vl(e){e.target.composing=!0}function ai(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ce=Symbol("_assign");function ci(e,t,s){return t&&(e=e.trim()),s&&(e=Ps(e)),e}const pe={created(e,{modifiers:{lazy:t,trim:s,number:n}},i){e[Ce]=ct(i);const o=n||i.props&&i.props.type==="number";et(e,t?"change":"input",r=>{r.target.composing||e[Ce](ci(e.value,s,o))}),(s||o)&&et(e,"change",()=>{e.value=ci(e.value,s,o)}),t||(et(e,"compositionstart",Vl),et(e,"compositionend",ai),et(e,"change",ai))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:i,number:o}},r){if(e[Ce]=ct(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Ps(e.value):e.value,a=t??"";if(l===a)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(n&&t===s||i&&e.value.trim()===a)||(e.value=a)}},Kl={deep:!0,created(e,t,s){e[Ce]=ct(s),et(e,"change",()=>{const n=e._modelValue,i=$t(e),o=e.checked,r=e[Ce];if(M(n)){const l=pn(n,i),a=l!==-1;if(o&&!a)r(n.concat(i));else if(!o&&a){const p=[...n];p.splice(l,1),r(p)}}else if(Rt(n)){const l=new Set(n);o?l.add(i):l.delete(i),r(l)}else r(wo(e,o))})},mounted:ui,beforeUpdate(e,t,s){e[Ce]=ct(s),ui(e,t,s)}};function ui(e,{value:t,oldValue:s},n){e._modelValue=t;let i;if(M(t))i=pn(t,n.props.value)>-1;else if(Rt(t))i=t.has(n.props.value);else{if(t===s)return;i=lt(t,wo(e,!0))}e.checked!==i&&(e.checked=i)}const Wl={created(e,{value:t},s){e.checked=lt(t,s.props.value),e[Ce]=ct(s),et(e,"change",()=>{e[Ce]($t(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[Ce]=ct(n),t!==s&&(e.checked=lt(t,n.props.value))}},ks={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const i=Rt(t);et(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>s?Ps($t(r)):$t(r));e[Ce](e.multiple?i?new Set(o):o:o[0]),e._assigning=!0,Fi(()=>{e._assigning=!1})}),e[Ce]=ct(n)},mounted(e,{value:t}){di(e,t)},beforeUpdate(e,t,s){e[Ce]=ct(s)},updated(e,{value:t}){e._assigning||di(e,t)}};function di(e,t){const s=e.multiple,n=M(t);if(!(s&&!n&&!Rt(t))){for(let i=0,o=e.options.length;iString(p)===String(l)):r.selected=pn(t,l)>-1}else r.selected=t.has(l);else if(lt($t(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function $t(e){return"_value"in e?e._value:e.value}function wo(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Gl={created(e,t,s){ds(e,t,s,null,"created")},mounted(e,t,s){ds(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){ds(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){ds(e,t,s,n,"updated")}};function ql(e,t){switch(e){case"SELECT":return ks;case"TEXTAREA":return pe;default:switch(t){case"checkbox":return Kl;case"radio":return Wl;default:return pe}}}function ds(e,t,s,n,i){const r=ql(e.tagName,s.props&&s.props.type)[i];r&&r(e,t,s,n)}const Zl=["ctrl","shift","alt","meta"],Yl={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)=>Zl.some(s=>e[`${s}Key`]&&!t.includes(s))},Jl=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((i,...o)=>{for(let r=0;r{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(i=>{if(!("key"in i))return;const o=ut(i.key);if(t.some(r=>r===o||Xl[r]===o))return e(i)}))},ea=he({patchProp:Fl},Sl);let fi;function ta(){return fi||(fi=nl(ea))}const sa=((...e)=>{const t=ta().createApp(...e),{mount:s}=t;return t.mount=n=>{const i=ia(n);if(!i)return;const o=t._component;!H(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=s(i,!1,na(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t});function na(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ia(e){return ne(e)?document.querySelector(e):e}const xo="dh-panel-theme";function oa(){var e;try{const t=localStorage.getItem(xo);if(t==="dark"||t==="light")return t}catch{}return(e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}const Et=V(oa());function ko(e){Et.value=e,document.documentElement.classList.toggle("dark",e==="dark");try{localStorage.setItem(xo,e)}catch{}}function pi(){ko(Et.value==="dark"?"light":"dark")}ko(Et.value);const ra={apiServer:"API server",switchToLight:"Switch to light theme",switchToDark:"Switch to dark theme",theme:"Theme",signOut:"Sign out",loading:"Loading…",standardUserNote:"Signed in as a standard user — management sections need an admin role",footer:"DriverVault — car maintenance & service tracker."},la={overview:"Overview",users:"Users",orgs:"Organizations",pocketbase:"PocketBase",webapp:"Web App",plugins:"Plugins",api:"API"},aa={title:"Sign in",subtitle:"Superadmin console for the DriverVault API Server.",email:"Email",password:"Password",submit:"Sign in",submitting:"Signing in…",invalid:"Invalid email or password.",failed:"Could not sign in.",authNote:"Authenticates against PocketBase through this server"},ca={title:"Status",unreachable:"unreachable",checking:"Checking…",apiServer:"API Server",pocketBase:"PocketBase",webApp:"Web App",thisProcess:"this process"},ua={create:"Create",save:"Save",cancel:"Cancel",edit:"Edit",delete:"Delete",rename:"Rename",empty:"—",name:"Name",email:"Email",role:"Role",organization:"Organization"},da={title:"Users",allOrgs:"All organizations",yourOrg:"Your organization",newUser:"New user",password:"Password",passwordUnchanged:"Password (blank = unchanged)",passwordPlaceholder:"min 8 characters",orgNone:"— none —",you:"you",empty:"No users.",confirmDelete:"Delete {email}? This cannot be undone."},fa={title:"Organizations",subtitle:"Tenants users belong to",subtitleOwn:"Your organization",subtitleNone:"Create one to manage your own team",newOrg:"New organization",namePlaceholder:"Acme Fleet",empty:"No organizations yet.",createHint:"You have no organization yet. Create one to become its admin.",colId:"ID",confirmDelete:'Delete the organization "{name}"?',confirmDeleteOwn:'Delete your organization "{name}"? You will be removed from it and become a regular user.'},pa={title:"PocketBase",subtitle:"Database connection used by every endpoint",connected:"connected",noSuperuser:"no superuser",unreachable:"unreachable",baseUrl:"Base URL",superuserEmail:"Superuser email",superuserPassword:"Superuser password",passwordUnchanged:"unchanged",passwordNotSet:"not set",saveApply:"Save & apply",testConnection:"Test connection",persistedEnv:"persisted to .env",testOk:"Connection OK — superuser authenticated.",testReachableNoAuth:"PocketBase is reachable, but the service account did not authenticate.",testUnreachable:"PocketBase is not reachable at that address.",savedNotice:"Saved. The server is now using this PocketBase."},ha={title:"Web App",subtitle:"Address probed by the status check, and who may call this API from a browser",reachable:"reachable",unreachable:"unreachable",baseUrl:"Base URL",allowedOrigins:"Allowed origins",originsHint:"Comma separated, or {star} for any. Native mobile apps are not subject to CORS.",saveApply:"Save & apply",testConnection:"Test connection",persistedEnv:"persisted to .env",testOk:"Web App is reachable.",testFailed:"Web App did not answer its health check at that address.",savedNotice:"Saved. New origins apply to the next request."},ga={title:"Plugins",subtitle:"Third-party service integrations",registerExternal:"Register external",cancelRegister:"Cancel",name:"Name",baseUrl:"Base URL",provider:"Provider",register:"Register",empty:"No plugins yet. Register an external one above, or compile a built-in connector.",builtin:"builtin",enabled:"enabled",disabled:"disabled",health:"Health",configure:"Configure",close:"Close",noConfig:"This plugin takes no configuration.",notSet:"Not set — let organizations and users choose",capabilities:"Capabilities",saved:"Saved.",checking:"Checking…",save:"Save",saveEnable:"Save & enable",disable:"Disable",remove:"Remove",builtinNote:"Built-in plugins can be disabled but not removed",confirmRemove:'Remove the external plugin "{name}"? Its saved config is deleted.'},ma={colEndpoint:"Endpoint",colDescription:"Description",authNone:"No auth",authBearer:"Bearer token",authManager:"Admin / superadmin",authSuperadmin:"Superadmin",groupPublic:"Public",groupIdentity:"Identity",groupCars:"Cars",groupService:"Service records",groupParts:"Parts",groupAccount:"Account",groupManagement:"Management",groupSuperadmin:"Superadmin"},ba={app:ra,sections:la,login:aa,status:ca,common:ua,users:da,orgs:fa,pocketbase:pa,webapp:ha,plugins:ga,api:ma},va={apiServer:"Serwer API",switchToLight:"Przełącz na motyw jasny",switchToDark:"Przełącz na motyw ciemny",theme:"Motyw",signOut:"Wyloguj się",loading:"Ładowanie…",standardUserNote:"Zalogowano jako zwykły użytkownik — sekcje zarządzania wymagają roli administratora",footer:"DriverVault — rejestr serwisu i konserwacji samochodu."},_a={overview:"Przegląd",users:"Użytkownicy",orgs:"Organizacje",pocketbase:"PocketBase",webapp:"Aplikacja webowa",plugins:"Wtyczki",api:"API"},ya={title:"Zaloguj się",subtitle:"Konsola superadministratora serwera API DriverVault.",email:"E-mail",password:"Hasło",submit:"Zaloguj się",submitting:"Logowanie…",invalid:"Nieprawidłowy e-mail lub hasło.",failed:"Nie udało się zalogować.",authNote:"Uwierzytelnia w PocketBase za pośrednictwem tego serwera"},wa={title:"Status",unreachable:"niedostępny",checking:"Sprawdzanie…",apiServer:"Serwer API",pocketBase:"PocketBase",webApp:"Aplikacja webowa",thisProcess:"ten proces"},xa={create:"Utwórz",save:"Zapisz",cancel:"Anuluj",edit:"Edytuj",delete:"Usuń",rename:"Zmień nazwę",empty:"—",name:"Nazwa",email:"E-mail",role:"Rola",organization:"Organizacja"},ka={title:"Użytkownicy",allOrgs:"Wszystkie organizacje",yourOrg:"Twoja organizacja",newUser:"Nowy użytkownik",password:"Hasło",passwordUnchanged:"Hasło (puste = bez zmian)",passwordPlaceholder:"min. 8 znaków",orgNone:"— brak —",you:"Ty",empty:"Brak użytkowników.",confirmDelete:"Usunąć {email}? Tej operacji nie można cofnąć."},Sa={title:"Organizacje",subtitle:"Podmioty, do których należą użytkownicy",subtitleOwn:"Twoja organizacja",subtitleNone:"Utwórz ją, aby zarządzać własnym zespołem",newOrg:"Nowa organizacja",namePlaceholder:"Acme Fleet",empty:"Brak organizacji.",createHint:"Nie masz jeszcze organizacji. Utwórz ją, aby zostać jej administratorem.",colId:"ID",confirmDelete:"Usunąć organizację „{name}”?",confirmDeleteOwn:"Usunąć Twoją organizację „{name}”? Zostaniesz z niej usunięty i staniesz się zwykłym użytkownikiem."},Ta={title:"PocketBase",subtitle:"Połączenie z bazą danych używane przez każdy punkt końcowy",connected:"połączono",noSuperuser:"brak superużytkownika",unreachable:"niedostępny",baseUrl:"Adres bazowy",superuserEmail:"E-mail superużytkownika",superuserPassword:"Hasło superużytkownika",passwordUnchanged:"bez zmian",passwordNotSet:"nie ustawiono",saveApply:"Zapisz i zastosuj",testConnection:"Testuj połączenie",persistedEnv:"zapisano w .env",testOk:"Połączenie OK — superużytkownik uwierzytelniony.",testReachableNoAuth:"PocketBase jest dostępny, ale konto usługowe nie zostało uwierzytelnione.",testUnreachable:"PocketBase jest niedostępny pod tym adresem.",savedNotice:"Zapisano. Serwer korzysta teraz z tego PocketBase."},Ea={title:"Aplikacja webowa",subtitle:"Adres sprawdzany podczas kontroli statusu oraz kto może wywoływać to API z przeglądarki",reachable:"dostępna",unreachable:"niedostępna",baseUrl:"Adres bazowy",allowedOrigins:"Dozwolone źródła",originsHint:"Oddzielone przecinkami lub {star} dla dowolnego. Natywne aplikacje mobilne nie podlegają CORS.",saveApply:"Zapisz i zastosuj",testConnection:"Testuj połączenie",persistedEnv:"zapisano w .env",testOk:"Aplikacja webowa jest dostępna.",testFailed:"Aplikacja webowa nie odpowiedziała na kontrolę stanu pod tym adresem.",savedNotice:"Zapisano. Nowe źródła obowiązują od następnego żądania."},Ca={title:"Wtyczki",subtitle:"Integracje z usługami zewnętrznymi",registerExternal:"Zarejestruj zewnętrzną",cancelRegister:"Anuluj",name:"Nazwa",baseUrl:"Adres bazowy",provider:"Dostawca",register:"Zarejestruj",empty:"Brak wtyczek. Zarejestruj zewnętrzną powyżej lub skompiluj wbudowany łącznik.",builtin:"wbudowana",enabled:"włączona",disabled:"wyłączona",health:"Stan",configure:"Konfiguruj",close:"Zamknij",noConfig:"Ta wtyczka nie wymaga konfiguracji.",notSet:"Nie ustawiono — pozwól organizacjom i użytkownikom wybrać",capabilities:"Możliwości",saved:"Zapisano.",checking:"Sprawdzanie…",save:"Zapisz",saveEnable:"Zapisz i włącz",disable:"Wyłącz",remove:"Usuń",builtinNote:"Wtyczki wbudowane można wyłączyć, ale nie usunąć",confirmRemove:"Usunąć zewnętrzną wtyczkę „{name}”? Jej zapisana konfiguracja zostanie usunięta."},Pa={colEndpoint:"Punkt końcowy",colDescription:"Opis",authNone:"Bez uwierzytelniania",authBearer:"Token Bearer",authManager:"Administrator / superadministrator",authSuperadmin:"Superadministrator",groupPublic:"Publiczne",groupIdentity:"Tożsamość",groupCars:"Samochody",groupService:"Wpisy serwisowe",groupParts:"Części",groupAccount:"Konto",groupManagement:"Zarządzanie",groupSuperadmin:"Superadministrator"},$a={app:va,sections:_a,login:ya,status:wa,common:xa,users:ka,orgs:Sa,pocketbase:Ta,webapp:Ea,plugins:Ca,api:Pa},Aa={apiServer:"API-server",switchToLight:"Skift til lyst tema",switchToDark:"Skift til mørkt tema",theme:"Tema",signOut:"Log ud",loading:"Indlæser…",standardUserNote:"Logget ind som almindelig bruger — administrationssektioner kræver en administratorrolle",footer:"DriverVault — bilservice- og vedligeholdelsesregister."},Oa={overview:"Oversigt",users:"Brugere",orgs:"Organisationer",pocketbase:"PocketBase",webapp:"Webapp",plugins:"Plugins",api:"API"},Ra={title:"Log ind",subtitle:"Superadmin-konsol til DriverVault API-serveren.",email:"E-mail",password:"Adgangskode",submit:"Log ind",submitting:"Logger ind…",invalid:"Ugyldig e-mail eller adgangskode.",failed:"Kunne ikke logge ind.",authNote:"Godkender mod PocketBase gennem denne server"},Ia={title:"Status",unreachable:"utilgængelig",checking:"Tjekker…",apiServer:"API-server",pocketBase:"PocketBase",webApp:"Webapp",thisProcess:"denne proces"},ja={create:"Opret",save:"Gem",cancel:"Annuller",edit:"Rediger",delete:"Slet",rename:"Omdøb",empty:"—",name:"Navn",email:"E-mail",role:"Rolle",organization:"Organisation"},za={title:"Brugere",allOrgs:"Alle organisationer",yourOrg:"Din organisation",newUser:"Ny bruger",password:"Adgangskode",passwordUnchanged:"Adgangskode (tom = uændret)",passwordPlaceholder:"mindst 8 tegn",orgNone:"— ingen —",you:"dig",empty:"Ingen brugere.",confirmDelete:"Slet {email}? Dette kan ikke fortrydes."},Ua={title:"Organisationer",subtitle:"Enheder, som brugere tilhører",subtitleOwn:"Din organisation",subtitleNone:"Opret en for at administrere dit eget team",newOrg:"Ny organisation",namePlaceholder:"Acme Fleet",empty:"Ingen organisationer endnu.",createHint:"Du har endnu ingen organisation. Opret en for at blive dens administrator.",colId:"ID",confirmDelete:'Slet organisationen "{name}"?',confirmDeleteOwn:"Slet din organisation „{name}“? Du fjernes fra den og bliver en almindelig bruger."},Na={title:"PocketBase",subtitle:"Databaseforbindelse brugt af hvert endpoint",connected:"forbundet",noSuperuser:"ingen superbruger",unreachable:"utilgængelig",baseUrl:"Basis-URL",superuserEmail:"Superbrugerens e-mail",superuserPassword:"Superbrugerens adgangskode",passwordUnchanged:"uændret",passwordNotSet:"ikke angivet",saveApply:"Gem og anvend",testConnection:"Test forbindelse",persistedEnv:"gemt i .env",testOk:"Forbindelse OK — superbruger godkendt.",testReachableNoAuth:"PocketBase er tilgængelig, men servicekontoen blev ikke godkendt.",testUnreachable:"PocketBase er ikke tilgængelig på den adresse.",savedNotice:"Gemt. Serveren bruger nu denne PocketBase."},Da={title:"Webapp",subtitle:"Adressen, der tjekkes ved statuskontrol, og hvem der må kalde dette API fra en browser",reachable:"tilgængelig",unreachable:"utilgængelig",baseUrl:"Basis-URL",allowedOrigins:"Tilladte oprindelser",originsHint:"Kommasepareret, eller {star} for enhver. Native mobilapps er ikke underlagt CORS.",saveApply:"Gem og anvend",testConnection:"Test forbindelse",persistedEnv:"gemt i .env",testOk:"Webappen er tilgængelig.",testFailed:"Webappen svarede ikke på sit helbredstjek på den adresse.",savedNotice:"Gemt. Nye oprindelser gælder fra næste anmodning."},Ma={title:"Plugins",subtitle:"Integrationer med tredjepartstjenester",registerExternal:"Registrér ekstern",cancelRegister:"Annuller",name:"Navn",baseUrl:"Basis-URL",provider:"Udbyder",register:"Registrér",empty:"Ingen plugins endnu. Registrér et eksternt ovenfor, eller kompilér et indbygget stik.",builtin:"indbygget",enabled:"aktiveret",disabled:"deaktiveret",health:"Helbred",configure:"Konfigurer",close:"Luk",noConfig:"Dette plugin kræver ingen konfiguration.",notSet:"Ikke angivet — lad organisationer og brugere vælge",capabilities:"Funktioner",saved:"Gemt.",checking:"Tjekker…",save:"Gem",saveEnable:"Gem og aktivér",disable:"Deaktiver",remove:"Fjern",builtinNote:"Indbyggede plugins kan deaktiveres, men ikke fjernes",confirmRemove:'Fjern det eksterne plugin "{name}"? Dets gemte konfiguration slettes.'},La={colEndpoint:"Endpoint",colDescription:"Beskrivelse",authNone:"Ingen godkendelse",authBearer:"Bearer-token",authManager:"Admin / superadmin",authSuperadmin:"Superadmin",groupPublic:"Offentlig",groupIdentity:"Identitet",groupCars:"Biler",groupService:"Serviceposter",groupParts:"Reservedele",groupAccount:"Konto",groupManagement:"Administration",groupSuperadmin:"Superadmin"},Fa={app:Aa,sections:Oa,login:Ra,status:Ia,common:ja,users:za,orgs:Ua,pocketbase:Na,webapp:Da,plugins:Ma,api:La},So="dh-panel-lang",To="en",At={en:ba,pl:$a,da:Fa},Ba=Object.keys(At);function Ha(){try{const t=localStorage.getItem(So);if(t&&At[t])return t}catch{}const e=(navigator.language||"en").split("-")[0];return At[e]?e:To}const En=V(Ha());function Va(e){if(At[e]){En.value=e;try{localStorage.setItem(So,e)}catch{}}}function hi(e,t){return t.split(".").reduce((s,n)=>s==null?void 0:s[n],e)}function Ka(e,t){return t?e.replace(/\{(\w+)\}/g,(s,n)=>t[n]==null?s:String(t[n])):e}function Wa(e,t,s){let n="other";try{n=new Intl.PluralRules(s).select(t)}catch{n=t===1?"one":"other"}return e[n]??e.other??e.one}function h(e,t){const s=En.value;let n=hi(At[s],e);if(n==null&&(n=hi(At[To],e)),n==null)return e;if(typeof n=="object"){if((t==null?void 0:t.n)==null)return e;n=Wa(n,t.n,s)}return typeof n!="string"?e:Ka(n,t)}function gi(e,t,s){const i=h(e,{...s,[t]:"\0"}),o=i.indexOf("\0");return o===-1?{before:i,after:""}:{before:i.slice(0,o),after:i.slice(o+1)}}const an="dh-panel-token";function Ga(){try{return localStorage.getItem(an)||""}catch{return""}}const Ot=V(Ga()),re=V(null),xe=Ae(()=>{var e;return((e=re.value)==null?void 0:e.role)==="superadmin"}),gs=Ae(()=>{var e,t;return((e=re.value)==null?void 0:e.role)==="admin"||((t=re.value)==null?void 0:t.role)==="superadmin"});function Eo(e){Ot.value=e;try{e?localStorage.setItem(an,e):localStorage.removeItem(an)}catch{}}class qa extends Error{constructor(t,s,n){super(t),this.status=s,this.body=n}}function Za(e,t){if(!e||typeof e!="object")return`HTTP ${t}`;if(e.error)return e.error;const s=Object.entries(e.data||{}).map(([n,i])=>`${n}: ${(i==null?void 0:i.message)||i}`).filter(Boolean);return s.length?s.join("; "):e.message||`HTTP ${t}`}async function se(e,{method:t="GET",body:s,auth:n=!0}={}){const i={};s!==void 0&&(i["Content-Type"]="application/json"),n&&Ot.value&&(i.Authorization=Ot.value);const o=await fetch(e,{method:t,headers:i,body:s===void 0?void 0:JSON.stringify(s)}),r=await o.text();let l=null;try{l=r?JSON.parse(r):null}catch{l=null}if(!o.ok)throw o.status===401&&n&&Cn(),new qa(Za(l,o.status),o.status,l);return l}async function Ya(e,t){const s=await se("/api/auth/login",{method:"POST",body:{email:e,password:t},auth:!1});return Eo(s.token),await Ss(),re.value}async function Ss(){return re.value=await se("/api/identity"),re.value}function Cn(){Eo(""),re.value=null}async function Ja(){if(!Ot.value)return null;try{return await Ss()}catch{return Cn(),null}}const Xa={class:"mx-auto flex w-full max-w-sm flex-col gap-5 pt-24"},Qa={class:"dh-card p-6"},ec={class:"text-lg font-bold tracking-[-0.02em] text-strong"},tc={class:"mt-1 mb-5 text-sm text-body"},sc={class:"dh-label",for:"login-email"},nc={class:"dh-label",for:"login-password"},ic={key:0,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},oc=["disabled"],rc={class:"eyebrow text-center"},lc={__name:"LoginView",emits:["authenticated"],setup(e,{emit:t}){const s=t,n=V(""),i=V(""),o=V(""),r=V(!1),l=Ae(()=>n.value.trim()!==""&&i.value!==""&&!r.value);async function a(){if(l.value){o.value="",r.value=!0;try{const p=await Ya(n.value.trim(),i.value);s("authenticated",p)}catch(p){o.value=p.status===400||p.status===404?h("login.invalid"):p.message||h("login.failed"),i.value=""}finally{r.value=!1}}}return(p,u)=>(S(),C("div",Xa,[d("div",Qa,[d("h1",ec,b(g(h)("login.title")),1),d("p",tc,b(g(h)("login.subtitle")),1),d("form",{class:"flex flex-col gap-4",onSubmit:Jl(a,["prevent"])},[d("div",null,[d("label",sc,b(g(h)("login.email")),1),le(d("input",{id:"login-email","onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m),class:"dh-input",type:"email",autocomplete:"username",autofocus:"",placeholder:"you@example.com"},null,512),[[pe,n.value]])]),d("div",null,[d("label",nc,b(g(h)("login.password")),1),le(d("input",{id:"login-password","onUpdate:modelValue":u[1]||(u[1]=m=>i.value=m),class:"dh-input",type:"password",autocomplete:"current-password",placeholder:"••••••••"},null,512),[[pe,i.value]])]),o.value?(S(),C("p",ic,b(o.value),1)):B("",!0),d("button",{class:"dh-btn w-full",type:"submit",disabled:!l.value},b(r.value?g(h)("login.submitting"):g(h)("login.submit")),9,oc)],32)]),d("p",rc,b(g(h)("login.authNote")),1)]))}},ac={class:"dh-card overflow-hidden"},cc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},uc={class:"text-base font-bold tracking-[-0.02em] text-strong"},dc={key:0,class:"dh-pill bg-danger-soft text-danger"},fc={key:0,class:"px-5 py-4 text-sm text-danger"},pc={key:1,class:"w-full text-left text-sm"},hc={class:"px-5 py-3 font-medium text-strong"},gc={class:"data px-5 py-3 text-xs text-muted"},mc={class:"data px-5 py-3 text-right text-xs text-muted"},bc={class:"px-5 py-3 text-right"},vc={key:2,class:"px-5 py-4 text-sm text-muted"},_c={__name:"StatusCard",setup(e){const t=V(null),s=V("");let n=null;async function i(){try{t.value=await se("/api/status",{auth:!1}),s.value=""}catch(l){t.value=null,s.value=l.message||h("status.unreachable")}}const o=Ae(()=>{var l,a,p;return[{key:"apiServer",label:h("status.apiServer"),h:(l=t.value)==null?void 0:l.apiServer},{key:"pocketBase",label:h("status.pocketBase"),h:(a=t.value)==null?void 0:a.pocketBase},{key:"webApp",label:h("status.webApp"),h:(p=t.value)==null?void 0:p.webApp}]});dt(()=>{i(),n=setInterval(i,1e4)}),kn(()=>clearInterval(n));const r=l=>l==="ok"?"bg-success-soft text-success":"bg-danger-soft text-danger";return(l,a)=>(S(),C("div",ac,[d("div",cc,[d("div",uc,b(g(h)("status.title")),1),s.value?(S(),C("span",dc,[a[0]||(a[0]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(b(g(h)("status.unreachable")),1)])):B("",!0)]),s.value?(S(),C("div",fc,b(s.value),1)):t.value?(S(),C("table",pc,[d("tbody",null,[(S(!0),C(ee,null,Se(o.value,p=>(S(),C("tr",{key:p.key,class:"border-t border-subtle first:border-t-0"},[d("td",hc,b(p.label),1),d("td",gc,b(p.h.url||g(h)("status.thisProcess")),1),d("td",mc,b(p.h.latencyMs!=null?p.h.latencyMs+"ms":g(h)("common.empty")),1),d("td",bc,[d("span",{class:Oe(["dh-pill",r(p.h.status)])},[a[1]||(a[1]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(b(p.h.status),1)],2)])]))),128))])])):(S(),C("div",vc,b(g(h)("status.checking")),1))]))}},yc={class:"dh-card overflow-hidden"},wc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},xc={class:"text-base font-bold tracking-[-0.02em] text-strong"},kc={class:"mt-0.5 text-xs text-muted"},Sc={class:"flex flex-col gap-4 px-5 py-4"},Tc={class:"dh-label",for:"pb-url"},Ec={class:"grid gap-4 sm:grid-cols-2"},Cc={class:"dh-label",for:"pb-email"},Pc={class:"dh-label",for:"pb-password"},$c=["placeholder"],Ac={key:0,class:"data text-xs text-muted"},Oc={key:1,class:"rounded-control bg-info-soft px-3 py-2 text-xs text-info"},Rc={key:2,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},Ic={class:"flex items-center gap-2"},jc=["disabled"],zc=["disabled"],Uc={class:"eyebrow"},Nc={__name:"PocketBaseCard",setup(e){const t=V(null),s=V({url:"",adminEmail:"",adminPassword:""}),n=V(null),i=V(""),o=V(""),r=V(!1);async function l(){try{t.value=await se("/api/admin/pb-config"),s.value={url:t.value.url,adminEmail:t.value.adminEmail,adminPassword:""},n.value=t.value.probe}catch(u){i.value=u.message}}dt(l);async function a(){i.value="",o.value="",r.value=!0;try{n.value=await se("/api/admin/pb-config/test",{method:"POST",body:s.value}),o.value=n.value.superuser?h("pocketbase.testOk"):n.value.reachable?h("pocketbase.testReachableNoAuth"):h("pocketbase.testUnreachable")}catch(u){i.value=u.message}finally{r.value=!1}}async function p(){i.value="",o.value="",r.value=!0;try{const u=await se("/api/admin/pb-config",{method:"PUT",body:s.value});t.value=u.config,n.value=u.config.probe,s.value.adminPassword="",o.value=u.warning||h("pocketbase.savedNotice")}catch(u){i.value=u.message}finally{r.value=!1}}return(u,m)=>{var P,O;return S(),C("div",yc,[d("div",wc,[d("div",null,[d("div",xc,b(g(h)("pocketbase.title")),1),d("p",kc,b(g(h)("pocketbase.subtitle")),1)]),n.value?(S(),C("span",{key:0,class:Oe(["dh-pill",n.value.superuser?"bg-success-soft text-success":n.value.reachable?"bg-warning-soft text-warning":"bg-danger-soft text-danger"])},[m[3]||(m[3]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(" "+b(n.value.superuser?g(h)("pocketbase.connected"):n.value.reachable?g(h)("pocketbase.noSuperuser"):g(h)("pocketbase.unreachable")),1)],2)):B("",!0)]),d("div",Sc,[d("div",null,[d("label",Tc,b(g(h)("pocketbase.baseUrl")),1),le(d("input",{id:"pb-url","onUpdate:modelValue":m[0]||(m[0]=F=>s.value.url=F),class:"dh-input",placeholder:"http://10.2.1.10:8027"},null,512),[[pe,s.value.url]])]),d("div",Ec,[d("div",null,[d("label",Cc,b(g(h)("pocketbase.superuserEmail")),1),le(d("input",{id:"pb-email","onUpdate:modelValue":m[1]||(m[1]=F=>s.value.adminEmail=F),class:"dh-input",autocomplete:"off"},null,512),[[pe,s.value.adminEmail]])]),d("div",null,[d("label",Pc,b(g(h)("pocketbase.superuserPassword")),1),le(d("input",{id:"pb-password","onUpdate:modelValue":m[2]||(m[2]=F=>s.value.adminPassword=F),class:"dh-input",type:"password",autocomplete:"new-password",placeholder:(P=t.value)!=null&&P.adminConfigured?g(h)("pocketbase.passwordUnchanged"):g(h)("pocketbase.passwordNotSet")},null,8,$c),[[pe,s.value.adminPassword]])])]),(O=n.value)!=null&&O.detail?(S(),C("p",Ac,b(n.value.detail),1)):B("",!0),o.value?(S(),C("p",Oc,b(o.value),1)):B("",!0),i.value?(S(),C("p",Rc,b(i.value),1)):B("",!0),d("div",Ic,[d("button",{class:"dh-btn",disabled:r.value,onClick:p},b(g(h)("pocketbase.saveApply")),9,jc),d("button",{class:"dh-btn-ghost",disabled:r.value,onClick:a},b(g(h)("pocketbase.testConnection")),9,zc),m[4]||(m[4]=d("span",{class:"flex-1"},null,-1)),d("span",Uc,b(g(h)("pocketbase.persistedEnv")),1)])])])}}},Dc={class:"dh-card overflow-hidden"},Mc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Lc={class:"text-base font-bold tracking-[-0.02em] text-strong"},Fc={class:"mt-0.5 text-xs text-muted"},Bc={class:"flex flex-col gap-4 px-5 py-4"},Hc={class:"dh-label",for:"web-url"},Vc={class:"dh-label",for:"web-origins"},Kc={class:"mt-1 text-xs text-muted"},Wc={key:0,class:"data text-xs text-muted"},Gc={key:1,class:"rounded-control bg-info-soft px-3 py-2 text-xs text-info"},qc={key:2,class:"rounded-control bg-danger-soft px-3 py-2 text-xs text-danger"},Zc={class:"flex items-center gap-2"},Yc=["disabled"],Jc=["disabled"],Xc={class:"eyebrow"},Qc={__name:"WebAppCard",setup(e){const t=V(null),s=V({url:"",origins:""}),n=V(null),i=V(""),o=V(""),r=V(!1),l=P=>P.split(",").map(O=>O.trim()).filter(Boolean);function a(P){t.value=P,s.value={url:P.url,origins:(P.allowOrigins||[]).join(", ")},n.value=P.probe}async function p(){try{a(await se("/api/admin/webapp-config"))}catch(P){i.value=P.message}}dt(p);async function u(){i.value="",o.value="",r.value=!0;try{n.value=await se("/api/admin/webapp-config/test",{method:"POST",body:{url:s.value.url}}),o.value=n.value.status==="ok"?h("webapp.testOk"):h("webapp.testFailed")}catch(P){i.value=P.message}finally{r.value=!1}}async function m(){i.value="",o.value="",r.value=!0;try{const P=await se("/api/admin/webapp-config",{method:"PUT",body:{url:s.value.url,allowOrigins:l(s.value.origins)}});a(P.config),o.value=P.warning||h("webapp.savedNotice")}catch(P){i.value=P.message}finally{r.value=!1}}return(P,O)=>{var F;return S(),C("div",Dc,[d("div",Mc,[d("div",null,[d("div",Lc,b(g(h)("webapp.title")),1),d("p",Fc,b(g(h)("webapp.subtitle")),1)]),n.value?(S(),C("span",{key:0,class:Oe(["dh-pill",n.value.status==="ok"?"bg-success-soft text-success":"bg-danger-soft text-danger"])},[O[2]||(O[2]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(" "+b(n.value.status==="ok"?g(h)("webapp.reachable"):g(h)("webapp.unreachable")),1)],2)):B("",!0)]),d("div",Bc,[d("div",null,[d("label",Hc,b(g(h)("webapp.baseUrl")),1),le(d("input",{id:"web-url","onUpdate:modelValue":O[0]||(O[0]=_=>s.value.url=_),class:"dh-input",placeholder:"http://localhost:8090"},null,512),[[pe,s.value.url]])]),d("div",null,[d("label",Vc,b(g(h)("webapp.allowedOrigins")),1),le(d("input",{id:"web-origins","onUpdate:modelValue":O[1]||(O[1]=_=>s.value.origins=_),class:"dh-input",placeholder:"http://localhost:8090, https://app.example.com"},null,512),[[pe,s.value.origins]]),d("p",Kc,[Ee(b(g(gi)("webapp.originsHint","star").before),1),O[3]||(O[3]=d("span",{class:"data"},"*",-1)),Ee(b(g(gi)("webapp.originsHint","star").after),1)])]),(F=n.value)!=null&&F.error?(S(),C("p",Wc,b(n.value.error),1)):B("",!0),o.value?(S(),C("p",Gc,b(o.value),1)):B("",!0),i.value?(S(),C("p",qc,b(i.value),1)):B("",!0),d("div",Zc,[d("button",{class:"dh-btn",disabled:r.value,onClick:m},b(g(h)("webapp.saveApply")),9,Yc),d("button",{class:"dh-btn-ghost",disabled:r.value,onClick:u},b(g(h)("webapp.testConnection")),9,Jc),O[4]||(O[4]=d("span",{class:"flex-1"},null,-1)),d("span",Xc,b(g(h)("webapp.persistedEnv")),1)])])])}}},eu={class:"dh-card overflow-hidden"},tu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},su={class:"text-base font-bold tracking-[-0.02em] text-strong"},nu={class:"mt-0.5 text-xs text-muted"},iu={key:0,class:"border-b border-subtle bg-sunken px-5 py-4"},ou={class:"grid gap-3 sm:grid-cols-3"},ru={class:"dh-label"},lu={class:"dh-label"},au={class:"dh-label"},cu=["disabled"],uu={key:1,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},du={key:2,class:"px-5 py-6 text-center text-sm text-muted"},fu={class:"flex items-center gap-3 px-5 py-3"},pu=["onClick"],hu={class:"font-semibold text-strong"},gu={class:"dh-pill bg-sunken text-muted"},mu={key:0,class:"text-xs text-muted"},bu=["disabled","onClick"],vu=["disabled","onClick"],_u={key:0,class:"bg-sunken px-5 py-4"},yu={key:0,class:"data mb-3 text-xs text-muted"},wu={key:1,class:"grid gap-3 sm:grid-cols-2"},xu={class:"dh-label"},ku={key:0,class:"text-danger"},Su=["onUpdate:modelValue"],Tu={key:0,value:""},Eu=["value"],Cu=["onUpdate:modelValue","type","placeholder"],Pu={key:2,class:"mt-1 text-xs text-muted"},$u={key:2,class:"text-xs text-muted"},Au={key:3,class:"mt-4"},Ou={class:"eyebrow mb-1.5"},Ru={class:"data flex flex-col gap-1 text-xs text-muted"},Iu={class:"text-strong"},ju={key:0},zu={key:1},Uu={key:4,class:"data mt-3 text-xs text-body"},Nu={class:"mt-4 flex items-center gap-2"},Du=["disabled","onClick"],Mu=["disabled","onClick"],Lu=["disabled","onClick"],Fu={key:5,class:"eyebrow mt-2"},Bu={__name:"PluginsCard",setup(e){const t=V([]),s=V(""),n=V(!1),i=V(null),o=Yt({}),r=Yt({}),l=V(!1),a=V({name:"",baseURL:"",provider:""});async function p(){try{const E=await se("/api/admin/plugins");t.value=E.plugins||[],s.value=""}catch(E){s.value=E.message}}dt(p);function u(E){var $;if(i.value===E.name){i.value=null;return}const y={};for(const z of E.configFields||[])y[z.key]=(($=E.config)==null?void 0:$[z.key])??"";o[E.name]=y,i.value=E.name}async function m(E,y){n.value=!0,r[E.name]="";try{const $=await se(`/api/admin/plugins/${encodeURIComponent(E.name)}`,{method:"PUT",body:{enabled:y,config:o[E.name]??{}}});r[E.name]=$.warning||h("plugins.saved"),await p()}catch($){r[E.name]=$.message}finally{n.value=!1}}async function P(E){n.value=!0,r[E.name]=h("plugins.checking");try{const y=await se(`/api/admin/plugins/${encodeURIComponent(E.name)}/health`,{method:"POST"});r[E.name]=`${y.health.status}${y.health.detail?" — "+y.health.detail:""}`,await p()}catch(y){r[E.name]=y.message}finally{n.value=!1}}async function O(E){if(confirm(h("plugins.confirmRemove",{name:E.name}))){n.value=!0;try{await se(`/api/admin/plugins/${encodeURIComponent(E.name)}`,{method:"DELETE"}),i.value===E.name&&(i.value=null),await p()}catch(y){r[E.name]=y.message}finally{n.value=!1}}}async function F(){n.value=!0,s.value="";try{await se("/api/admin/plugins",{method:"POST",body:a.value}),a.value={name:"",baseURL:"",provider:""},l.value=!1,await p()}catch(E){s.value=E.message}finally{n.value=!1}}const _=E=>E==="ok"?"bg-success-soft text-success":E==="degraded"?"bg-warning-soft text-warning":"bg-danger-soft text-danger";return(E,y)=>(S(),C("div",eu,[d("div",tu,[d("div",null,[d("div",su,b(g(h)("plugins.title")),1),d("p",nu,b(g(h)("plugins.subtitle")),1)]),d("button",{class:"dh-btn-ghost",onClick:y[0]||(y[0]=$=>l.value=!l.value)},b(l.value?g(h)("plugins.cancelRegister"):g(h)("plugins.registerExternal")),1)]),l.value?(S(),C("div",iu,[d("div",ou,[d("div",null,[d("label",ru,b(g(h)("plugins.name")),1),le(d("input",{"onUpdate:modelValue":y[1]||(y[1]=$=>a.value.name=$),class:"dh-input",placeholder:"acme-parts"},null,512),[[pe,a.value.name]])]),d("div",null,[d("label",lu,b(g(h)("plugins.baseUrl")),1),le(d("input",{"onUpdate:modelValue":y[2]||(y[2]=$=>a.value.baseURL=$),class:"dh-input",placeholder:"http://127.0.0.1:9100"},null,512),[[pe,a.value.baseURL]])]),d("div",null,[d("label",au,b(g(h)("plugins.provider")),1),le(d("input",{"onUpdate:modelValue":y[3]||(y[3]=$=>a.value.provider=$),class:"dh-input",placeholder:"ACME Corp"},null,512),[[pe,a.value.provider]])])]),d("button",{class:"dh-btn mt-3",disabled:n.value||!a.value.name||!a.value.baseURL,onClick:F},b(g(h)("plugins.register")),9,cu)])):B("",!0),s.value?(S(),C("p",uu,b(s.value),1)):B("",!0),t.value.length?B("",!0):(S(),C("p",du,b(g(h)("plugins.empty")),1)),(S(!0),C(ee,null,Se(t.value,$=>(S(),C("div",{key:$.name,class:"border-t border-subtle first:border-t-0"},[d("div",fu,[d("button",{class:"flex flex-1 items-center gap-3 text-left",onClick:z=>u($)},[d("span",hu,b($.name),1),d("span",gu,b($.kind||g(h)("plugins.builtin")),1),$.provider?(S(),C("span",mu,b($.provider),1)):B("",!0),$.health?(S(),C("span",{key:1,class:Oe(["dh-pill",_($.health.status)])},[y[4]||(y[4]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Ee(b($.health.status),1)],2)):B("",!0)],8,pu),d("span",{class:Oe(["dh-pill",$.enabled?"bg-success-soft text-success":"bg-sunken text-muted"])},b($.enabled?g(h)("plugins.enabled"):g(h)("plugins.disabled")),3),d("button",{class:"dh-btn-ghost",disabled:n.value,onClick:z=>P($)},b(g(h)("plugins.health")),9,bu),d("button",{class:"dh-btn-ghost",disabled:n.value,onClick:z=>u($)},b(i.value===$.name?g(h)("plugins.close"):g(h)("plugins.configure")),9,vu)]),i.value===$.name?(S(),C("div",_u,[$.baseURL?(S(),C("div",yu,b($.baseURL),1)):B("",!0),($.configFields||[]).length?(S(),C("div",wu,[(S(!0),C(ee,null,Se($.configFields,z=>(S(),C("div",{key:z.key},[d("label",xu,[Ee(b(z.label||z.key),1),z.required?(S(),C("span",ku," *")):B("",!0)]),z.type==="select"?le((S(),C("select",{key:0,"onUpdate:modelValue":U=>o[$.name][z.key]=U,class:"dh-select"},[z.required?B("",!0):(S(),C("option",Tu,b(g(h)("plugins.notSet")),1)),(S(!0),C(ee,null,Se(z.options||[],U=>(S(),C("option",{key:U.value,value:U.value},b(U.label||U.value),9,Eu))),128))],8,Su)),[[ks,o[$.name][z.key]]]):le((S(),C("input",{key:1,"onUpdate:modelValue":U=>o[$.name][z.key]=U,class:"dh-input",type:z.type==="password"?"password":z.type==="number"?"number":"text",placeholder:z.default||"",autocomplete:"off"},null,8,Cu)),[[Gl,o[$.name][z.key]]]),z.help?(S(),C("p",Pu,b(z.help),1)):B("",!0)]))),128))])):(S(),C("p",$u,b(g(h)("plugins.noConfig")),1)),($.capabilities||[]).length?(S(),C("div",Au,[d("div",Ou,b(g(h)("plugins.capabilities")),1),d("ul",Ru,[(S(!0),C(ee,null,Se($.capabilities,z=>(S(),C("li",{key:z.id},[d("span",Iu,b(z.id),1),z.method||z.endpoint?(S(),C("span",ju," — "+b(z.method)+" "+b(z.endpoint),1)):B("",!0),z.description?(S(),C("span",zu," · "+b(z.description),1)):B("",!0)]))),128))])])):B("",!0),r[$.name]?(S(),C("p",Uu,b(r[$.name]),1)):B("",!0),d("div",Nu,[d("button",{class:"dh-btn",disabled:n.value,onClick:z=>m($,!0)},b($.enabled?g(h)("plugins.save"):g(h)("plugins.saveEnable")),9,Du),$.enabled?(S(),C("button",{key:0,class:"dh-btn-ghost",disabled:n.value,onClick:z=>m($,!1)},b(g(h)("plugins.disable")),9,Mu)):B("",!0),y[5]||(y[5]=d("span",{class:"flex-1"},null,-1)),$.kind==="external"?(S(),C("button",{key:1,class:"dh-btn-danger",disabled:n.value,onClick:z=>O($)},b(g(h)("plugins.remove")),9,Lu)):B("",!0)]),$.kind!=="external"?(S(),C("p",Fu,b(g(h)("plugins.builtinNote")),1)):B("",!0)])):B("",!0)]))),128))]))}},Hu={class:"dh-card overflow-hidden"},Vu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Ku={class:"text-base font-bold tracking-[-0.02em] text-strong"},Wu={class:"mt-0.5 text-xs text-muted"},Gu={key:0,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},qu={key:1,class:"border-b border-subtle bg-sunken px-5 py-4"},Zu={class:"grid gap-3 sm:grid-cols-2"},Yu={class:"dh-label"},Ju={class:"dh-label"},Xu={class:"dh-label"},Qu=["placeholder"],ed={class:"dh-label"},td=["value"],sd={key:0},nd={class:"dh-label"},id={value:""},od=["value"],rd={class:"mt-3 flex items-center gap-2"},ld=["disabled"],ad=["disabled"],cd={key:2,class:"px-5 py-6 text-center text-sm text-muted"},ud={key:3,class:"w-full text-left text-sm"},dd={class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},fd={class:"data px-5 py-2.5 text-xs text-strong"},pd={key:0,class:"eyebrow ml-1"},hd={class:"px-5 py-2.5 text-body"},gd={class:"px-5 py-2.5 text-body"},md={class:"px-5 py-2.5"},bd={class:"px-5 py-2.5 text-right whitespace-nowrap"},vd=["onClick"],_d=["disabled","onClick"],yd={__name:"UsersCard",setup(e){const t=V([]),s=V([]),n=V(""),i=V(!1),o=V(null),r=V({}),l=Ae(()=>xe.value?["user","admin","superadmin"]:["user","admin"]);async function a(){try{const[_,E]=await Promise.all([se("/api/users"),se("/api/orgs")]);t.value=_.users||[],s.value=E.organizations||[],n.value=""}catch(_){n.value=_.message}}dt(a);function p(){var _;o.value="new",r.value={email:"",name:"",password:"",role:"user",organization:xe.value?"":((_=re.value)==null?void 0:_.organization)||""}}function u(_){o.value=_.id,r.value={email:_.email,name:_.name||"",password:"",role:_.role,organization:_.organization||""}}function m(){o.value=null,n.value=""}async function P(){i.value=!0,n.value="";try{if(o.value==="new")await se("/api/users",{method:"POST",body:r.value});else{const _={...r.value};_.password||delete _.password,await se(`/api/users/${o.value}`,{method:"PATCH",body:_})}o.value=null,await a()}catch(_){n.value=_.message}finally{i.value=!1}}async function O(_){if(confirm(h("users.confirmDelete",{email:_.email}))){i.value=!0,n.value="";try{await se(`/api/users/${_.id}`,{method:"DELETE"}),await a()}catch(E){n.value=E.message}finally{i.value=!1}}}const F=_=>_==="superadmin"?"bg-info-soft text-info":_==="admin"?"bg-warning-soft text-warning":"bg-sunken text-muted";return(_,E)=>(S(),C("div",Hu,[d("div",Vu,[d("div",null,[d("div",Ku,b(g(h)("users.title")),1),d("p",Wu,b(g(xe)?g(h)("users.allOrgs"):g(h)("users.yourOrg")),1)]),d("button",{class:"dh-btn",onClick:p},b(g(h)("users.newUser")),1)]),n.value?(S(),C("p",Gu,b(n.value),1)):B("",!0),o.value?(S(),C("div",qu,[d("div",Zu,[d("div",null,[d("label",Yu,b(g(h)("common.email")),1),le(d("input",{"onUpdate:modelValue":E[0]||(E[0]=y=>r.value.email=y),class:"dh-input",type:"email",autocomplete:"off"},null,512),[[pe,r.value.email]])]),d("div",null,[d("label",Ju,b(g(h)("common.name")),1),le(d("input",{"onUpdate:modelValue":E[1]||(E[1]=y=>r.value.name=y),class:"dh-input",autocomplete:"off"},null,512),[[pe,r.value.name]])]),d("div",null,[d("label",Xu,b(o.value==="new"?g(h)("users.password"):g(h)("users.passwordUnchanged")),1),le(d("input",{"onUpdate:modelValue":E[2]||(E[2]=y=>r.value.password=y),class:"dh-input",type:"password",autocomplete:"new-password",placeholder:g(h)("users.passwordPlaceholder")},null,8,Qu),[[pe,r.value.password]])]),d("div",null,[d("label",ed,b(g(h)("common.role")),1),le(d("select",{"onUpdate:modelValue":E[3]||(E[3]=y=>r.value.role=y),class:"dh-select"},[(S(!0),C(ee,null,Se(l.value,y=>(S(),C("option",{key:y,value:y},b(y),9,td))),128))],512),[[ks,r.value.role]])]),g(xe)?(S(),C("div",sd,[d("label",nd,b(g(h)("common.organization")),1),le(d("select",{"onUpdate:modelValue":E[4]||(E[4]=y=>r.value.organization=y),class:"dh-select"},[d("option",id,b(g(h)("users.orgNone")),1),(S(!0),C(ee,null,Se(s.value,y=>(S(),C("option",{key:y.id,value:y.id},b(y.name),9,od))),128))],512),[[ks,r.value.organization]])])):B("",!0)]),d("div",rd,[d("button",{class:"dh-btn",disabled:i.value,onClick:P},b(o.value==="new"?g(h)("common.create"):g(h)("common.save")),9,ld),d("button",{class:"dh-btn-ghost",disabled:i.value,onClick:m},b(g(h)("common.cancel")),9,ad)])])):B("",!0),t.value.length?(S(),C("table",ud,[d("thead",null,[d("tr",dd,[d("th",null,b(g(h)("common.email")),1),d("th",null,b(g(h)("common.name")),1),d("th",null,b(g(h)("common.organization")),1),d("th",null,b(g(h)("common.role")),1),E[5]||(E[5]=d("th",null,null,-1))])]),d("tbody",null,[(S(!0),C(ee,null,Se(t.value,y=>{var $,z;return S(),C("tr",{key:y.id,class:"border-t border-subtle transition-colors hover:bg-sunken"},[d("td",fd,[Ee(b(y.email)+" ",1),y.id===(($=g(re))==null?void 0:$.id)?(S(),C("span",pd,b(g(h)("users.you")),1)):B("",!0)]),d("td",hd,b(y.name||g(h)("common.empty")),1),d("td",gd,b(y.organizationName||g(h)("common.empty")),1),d("td",md,[d("span",{class:Oe(["dh-pill",F(y.role)])},b(y.role),3)]),d("td",bd,[d("button",{class:"dh-btn-ghost",onClick:U=>u(y)},b(g(h)("common.edit")),9,vd),y.id!==((z=g(re))==null?void 0:z.id)?(S(),C("button",{key:0,class:"dh-btn-danger ml-1.5",disabled:i.value,onClick:U=>O(y)},b(g(h)("common.delete")),9,_d)):B("",!0)])])}),128))])])):(S(),C("p",cd,b(g(h)("users.empty")),1))]))}},wd={class:"dh-card overflow-hidden"},xd={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},kd={class:"text-base font-bold tracking-[-0.02em] text-strong"},Sd={class:"mt-0.5 text-xs text-muted"},Td={key:0,class:"border-b border-subtle px-5 py-3 text-xs text-danger"},Ed={key:1,class:"border-b border-subtle bg-sunken px-5 py-4"},Cd={class:"dh-label"},Pd=["placeholder"],$d={class:"mt-3 flex items-center gap-2"},Ad=["disabled"],Od=["disabled"],Rd={key:2,class:"px-5 py-6 text-center text-sm text-muted"},Id={key:3,class:"w-full text-left text-sm"},jd={class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},zd={class:"px-5 py-2.5 font-medium text-strong"},Ud={class:"data px-5 py-2.5 text-xs text-muted"},Nd={class:"px-5 py-2.5 text-right whitespace-nowrap"},Dd=["onClick"],Md=["disabled","onClick"],Ld={__name:"OrgsCard",setup(e){const t=V([]),s=V(""),n=V(!1),i=V(null),o=V(""),r=Ae(()=>{var _;return((_=re.value)==null?void 0:_.organization)||""}),l=Ae(()=>xe.value||!r.value);function a(_){return xe.value||_.id===r.value}async function p(){if(!gs.value){t.value=[];return}try{const _=await se("/api/orgs");t.value=_.organizations||[],s.value=""}catch(_){s.value=_.message}}dt(p);function u(){i.value="new",o.value=""}function m(_){i.value=_.id,o.value=_.name}function P(){i.value=null,s.value=""}async function O(){n.value=!0,s.value="";try{i.value==="new"?(await se("/api/orgs",{method:"POST",body:{name:o.value}}),xe.value||await Ss()):await se(`/api/orgs/${i.value}`,{method:"PATCH",body:{name:o.value}}),i.value=null,await p()}catch(_){s.value=_.message}finally{n.value=!1}}async function F(_){const E=!xe.value&&_.id===r.value;if(confirm(h(E?"orgs.confirmDeleteOwn":"orgs.confirmDelete",{name:_.name}))){n.value=!0,s.value="";try{await se(`/api/orgs/${_.id}`,{method:"DELETE"}),E&&await Ss(),await p()}catch($){s.value=$.message}finally{n.value=!1}}}return(_,E)=>(S(),C("div",wd,[d("div",xd,[d("div",null,[d("div",kd,b(g(xe)?g(h)("orgs.title"):g(h)("common.organization")),1),d("p",Sd,b(g(xe)?g(h)("orgs.subtitle"):r.value?g(h)("orgs.subtitleOwn"):g(h)("orgs.subtitleNone")),1)]),l.value?(S(),C("button",{key:0,class:"dh-btn",onClick:u},b(g(h)("orgs.newOrg")),1)):B("",!0)]),s.value?(S(),C("p",Td,b(s.value),1)):B("",!0),i.value?(S(),C("div",Ed,[d("label",Cd,b(g(h)("common.name")),1),le(d("input",{"onUpdate:modelValue":E[0]||(E[0]=y=>o.value=y),class:"dh-input",placeholder:g(h)("orgs.namePlaceholder"),onKeyup:Ql(O,["enter"])},null,40,Pd),[[pe,o.value]]),d("div",$d,[d("button",{class:"dh-btn",disabled:n.value||!o.value.trim(),onClick:O},b(i.value==="new"?g(h)("common.create"):g(h)("common.save")),9,Ad),d("button",{class:"dh-btn-ghost",disabled:n.value,onClick:P},b(g(h)("common.cancel")),9,Od)])])):B("",!0),t.value.length?(S(),C("table",Id,[d("thead",null,[d("tr",jd,[d("th",null,b(g(h)("common.name")),1),d("th",null,b(g(h)("orgs.colId")),1),E[1]||(E[1]=d("th",null,null,-1))])]),d("tbody",null,[(S(!0),C(ee,null,Se(t.value,y=>(S(),C("tr",{key:y.id,class:"border-t border-subtle transition-colors hover:bg-sunken"},[d("td",zd,b(y.name),1),d("td",Ud,b(y.id),1),d("td",Nd,[a(y)?(S(),C(ee,{key:0},[d("button",{class:"dh-btn-ghost",onClick:$=>m(y)},b(g(h)("common.rename")),9,Dd),d("button",{class:"dh-btn-danger ml-1.5",disabled:n.value,onClick:$=>F(y)},b(g(h)("common.delete")),9,Md)],64)):B("",!0)])]))),128))])])):(S(),C("p",Rd,b(l.value&&!g(xe)?g(h)("orgs.createHint"):g(h)("orgs.empty")),1))]))}},Fd={class:"dh-card overflow-hidden"},Bd={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Hd={class:"text-base font-bold tracking-[-0.02em] text-strong"},Vd={class:"eyebrow"},Kd={class:"w-full text-left text-sm"},Wd={class:"[&>th]:eyebrow [&>th]:px-5 [&>th]:py-2.5 [&>th]:font-medium"},Gd={class:"data border-t border-subtle px-5 py-2.5 text-xs whitespace-nowrap"},qd={class:"text-strong"},Zd={class:"border-t border-subtle px-5 py-2.5 text-body"},it={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brandtext",PATCH:"text-warning",DELETE:"text-danger"};return(s,n)=>(S(),C("div",Fd,[d("div",Bd,[d("div",Hd,b(e.title),1),d("span",Vd,b(e.auth),1)]),d("table",Kd,[d("thead",null,[d("tr",Wd,[d("th",null,b(g(h)("api.colEndpoint")),1),d("th",null,b(g(h)("api.colDescription")),1)])]),d("tbody",null,[(S(!0),C(ee,null,Se(e.endpoints,i=>(S(),C("tr",{key:i.method+i.path,class:"transition-colors hover:bg-sunken"},[d("td",Gd,[d("span",{class:Oe(["font-semibold",t[i.method]])},b(i.method),3),d("span",qd,b(i.path),1)]),d("td",Zd,b(i.desc),1)]))),128))])])]))}},Yd={class:"mx-auto flex max-w-4xl flex-col gap-6 px-6 pt-12 pb-16"},Jd={class:"flex items-center gap-3"},Xd={class:"inline-flex items-center gap-2.5 select-none"},Qd={class:"h-8 w-8 shrink-0",viewBox:"0 0 48 48",fill:"none","aria-hidden":"true"},ef={transform:"translate(7 0) skewX(-13)"},tf=["fill"],sf=["fill"],nf=["fill"],of={class:"eyebrow mt-1.5"},rf={key:0,class:"data hidden text-xs text-muted sm:inline"},lf={key:0},af={key:1,class:"dh-pill bg-info-soft text-info"},cf=["value","aria-label"],uf=["value"],df=["title"],ff={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75",class:"h-4 w-4"},pf={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.75",class:"h-4 w-4"},hf={key:0,class:"eyebrow py-16 text-center"},gf={class:"flex flex-wrap gap-1.5"},mf=["onClick"],bf={key:7,class:"eyebrow text-center"},vf={class:"eyebrow text-center"},_f={__name:"App",setup(e){const t=V(!0),s=V("overview");dt(async()=>{await Ja(),t.value=!1});const n=Ae(()=>{const _=[{id:"overview",label:h("sections.overview")}];return gs.value&&_.push({id:"users",label:h("sections.users")}),(gs.value||re.value)&&_.push({id:"orgs",label:h("sections.orgs")}),xe.value&&_.push({id:"pocketbase",label:h("sections.pocketbase")},{id:"webapp",label:h("sections.webapp")},{id:"plugins",label:h("sections.plugins")}),_.push({id:"api",label:h("sections.api")}),_}),i=Ae(()=>Ba.map(_=>{let E=_;try{E=new Intl.DisplayNames([_],{type:"language"}).of(_)||_}catch{}return{code:_,label:E.charAt(0).toUpperCase()+E.slice(1)}}));function o(){Cn(),s.value="overview"}const r=Ae(()=>Et.value==="dark"?["#60a5fa","#93c5fd","#ffffff"]:["var(--brand-700)","var(--brand-500)","var(--brand-400)"]),l=[{method:"GET",path:"/api/health",desc:"Liveness probe (no auth)"},{method:"GET",path:"/api/status",desc:"Health of PocketBase + Web App"},{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a PocketBase token"},{method:"GET",path:"/api/auth/validate",desc:"Check whether a token is still valid"}],a=[{method:"GET",path:"/api/auth/me",desc:"Identity of the bearer token"},{method:"GET",path:"/api/identity",desc:"Identity incl. role + organization"}],p=[{method:"GET",path:"/api/cars",desc:"List owned + shared cars"},{method:"POST",path:"/api/cars",desc:"Create a car"},{method:"GET",path:"/api/cars/{id}",desc:"Fetch one car"},{method:"PATCH",path:"/api/cars/{id}",desc:"Update a car"},{method:"DELETE",path:"/api/cars/{id}",desc:"Delete a car (owner only)"},{method:"GET",path:"/api/cars/{id}/service-records",desc:"A car's service history"},{method:"GET",path:"/api/cars/{id}/parts",desc:"A car's parts catalog"},{method:"GET",path:"/api/cars/{id}/shares",desc:"Who a car is shared with (owner)"},{method:"POST",path:"/api/cars/{id}/shares",desc:"Share a car by email (owner)"},{method:"DELETE",path:"/api/cars/{id}/shares/{userId}",desc:"Revoke a share (owner)"}],u=[{method:"GET",path:"/api/service-records",desc:"List service records"},{method:"POST",path:"/api/service-records",desc:"Log a service record"},{method:"GET",path:"/api/service-records/{id}",desc:"Fetch one record"},{method:"PATCH",path:"/api/service-records/{id}",desc:"Update a record"},{method:"DELETE",path:"/api/service-records/{id}",desc:"Delete a record"}],m=[{method:"GET",path:"/api/parts",desc:"List parts"},{method:"POST",path:"/api/parts",desc:"Add a part"},{method:"GET",path:"/api/parts/{id}",desc:"Fetch one part"},{method:"PATCH",path:"/api/parts/{id}",desc:"Update a part"},{method:"DELETE",path:"/api/parts/{id}",desc:"Delete a part"}],P=[{method:"GET",path:"/api/me",desc:"Current user profile"},{method:"PATCH",path:"/api/me",desc:"Update profile"},{method:"POST",path:"/api/me/password",desc:"Change password"},{method:"POST",path:"/api/me/avatar",desc:"Upload avatar"},{method:"GET",path:"/api/me/avatar",desc:"Fetch avatar"},{method:"DELETE",path:"/api/me/avatar",desc:"Remove avatar"},{method:"POST",path:"/api/me/verify/request",desc:"Request email verification"},{method:"GET",path:"/api/me/export",desc:"Export your data"},{method:"POST",path:"/api/me/import",desc:"Import data"},{method:"POST",path:"/api/me/delete",desc:"Request account deletion"},{method:"POST",path:"/api/me/delete/cancel",desc:"Cancel deletion request"},{method:"DELETE",path:"/api/me",desc:"Finalize account deletion"}],O=[{method:"GET",path:"/api/users",desc:"List users (scoped by role)"},{method:"POST",path:"/api/users",desc:"Create a user"},{method:"PATCH",path:"/api/users/{id}",desc:"Update email / name / role / org / password"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user"},{method:"GET",path:"/api/orgs",desc:"List organizations"},{method:"POST",path:"/api/orgs",desc:"Create an organization (any user without one; creator becomes admin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (own org; any as superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an organization (own org; any as superadmin)"}],F=[{method:"GET",path:"/api/admin/pb-config",desc:"PocketBase connection + live probe"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Probe a candidate connection"},{method:"PUT",path:"/api/admin/pb-config",desc:"Apply + persist a connection"},{method:"GET",path:"/api/admin/webapp-config",desc:"Web App URL + CORS origins, with a live probe"},{method:"POST",path:"/api/admin/webapp-config/test",desc:"Probe a candidate Web App address"},{method:"PUT",path:"/api/admin/webapp-config",desc:"Apply + persist Web App settings"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins (secrets masked)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin"},{method:"GET",path:"/api/admin/plugins/{name}",desc:"Fetch one plugin"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a health check now"}];return(_,E)=>(S(),C("div",Yd,[d("div",Jd,[d("span",Xd,[(S(),C("svg",Qd,[d("g",ef,[d("rect",{x:"9",y:"16",width:"6",height:"16",rx:"3",fill:r.value[0]},null,8,tf),d("rect",{x:"19",y:"12",width:"6",height:"24",rx:"3",fill:r.value[1]},null,8,sf),d("rect",{x:"29",y:"8",width:"6",height:"32",rx:"3",fill:r.value[2]},null,8,nf)])])),E[2]||(E[2]=d("span",{class:"text-2xl leading-none font-extrabold tracking-[-0.03em] italic"},[d("span",{class:"text-strong"},"Driver"),d("span",{class:"text-brandtext"},"Vault")],-1))]),d("span",of,b(g(h)("app.apiServer")),1),E[5]||(E[5]=d("div",{class:"flex-1"},null,-1)),g(re)?(S(),C("span",rf,[Ee(b(g(re).email),1),g(re).organizationName?(S(),C("span",lf," · "+b(g(re).organizationName),1)):B("",!0)])):B("",!0),g(re)?(S(),C("span",af,b(g(re).role),1)):B("",!0),d("select",{class:"dh-select !w-auto !py-1 !text-xs",value:g(En),"aria-label":g(h)("sections.overview"),onChange:E[0]||(E[0]=y=>g(Va)(y.target.value))},[(S(!0),C(ee,null,Se(i.value,y=>(S(),C("option",{key:y.code,value:y.code},b(y.label),9,uf))),128))],40,cf),d("button",{class:"dh-btn-ghost",title:g(Et)==="dark"?g(h)("app.switchToLight"):g(h)("app.switchToDark"),onClick:E[1]||(E[1]=(...y)=>g(pi)&&g(pi)(...y))},[g(Et)==="dark"?(S(),C("svg",ff,[...E[3]||(E[3]=[d("circle",{cx:"12",cy:"12",r:"4"},null,-1),d("path",{"stroke-linecap":"round",d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"},null,-1)])])):(S(),C("svg",pf,[...E[4]||(E[4]=[d("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"},null,-1)])])),Ee(" "+b(g(h)("app.theme")),1)],8,df),g(Ot)?(S(),C("button",{key:2,class:"dh-btn-ghost",onClick:o},b(g(h)("app.signOut")),1)):B("",!0)]),t.value?(S(),C("p",hf,b(g(h)("app.loading")),1)):g(Ot)?(S(),C(ee,{key:2},[d("nav",gf,[(S(!0),C(ee,null,Se(n.value,y=>(S(),C("button",{key:y.id,class:Oe(["dh-btn-ghost",s.value===y.id?"border-accent text-brandtext":""]),onClick:$=>s.value=y.id},b(y.label),11,mf))),128))]),s.value==="overview"?(S(),ot(_c,{key:0})):s.value==="users"?(S(),ot(yd,{key:1})):s.value==="orgs"?(S(),ot(Ld,{key:2})):s.value==="pocketbase"?(S(),ot(Nc,{key:3})):s.value==="webapp"?(S(),ot(Qc,{key:4})):s.value==="plugins"?(S(),ot(Bu,{key:5})):s.value==="api"?(S(),C(ee,{key:6},[ue(it,{title:g(h)("api.groupPublic"),auth:g(h)("api.authNone"),endpoints:l},null,8,["title","auth"]),ue(it,{title:g(h)("api.groupIdentity"),auth:g(h)("api.authBearer"),endpoints:a},null,8,["title","auth"]),ue(it,{title:g(h)("api.groupCars"),auth:g(h)("api.authBearer"),endpoints:p},null,8,["title","auth"]),ue(it,{title:g(h)("api.groupService"),auth:g(h)("api.authBearer"),endpoints:u},null,8,["title","auth"]),ue(it,{title:g(h)("api.groupParts"),auth:g(h)("api.authBearer"),endpoints:m},null,8,["title","auth"]),ue(it,{title:g(h)("api.groupAccount"),auth:g(h)("api.authBearer"),endpoints:P},null,8,["title","auth"]),ue(it,{title:g(h)("api.groupManagement"),auth:g(h)("api.authManager"),endpoints:O},null,8,["title","auth"]),ue(it,{title:g(h)("api.groupSuperadmin"),auth:g(h)("api.authSuperadmin"),endpoints:F},null,8,["title","auth"])],64)):B("",!0),!g(gs)&&s.value==="overview"?(S(),C("p",bf,b(g(h)("app.standardUserNote")),1)):B("",!0)],64)):(S(),ot(lc,{key:1})),d("p",vf,b(g(h)("app.footer")),1)]))}};sa(_f).mount("#app"); diff --git a/API Server/internal/api/dist/index.html b/API Server/internal/api/dist/index.html index 3e43359..bf49adb 100644 --- a/API Server/internal/api/dist/index.html +++ b/API Server/internal/api/dist/index.html @@ -6,7 +6,7 @@ DriverVault · API Server - + diff --git a/API Server/internal/api/health.go b/API Server/internal/api/health.go index f6db46f..418b510 100644 --- a/API Server/internal/api/health.go +++ b/API Server/internal/api/health.go @@ -12,6 +12,9 @@ func (s *Server) handleHealth(w http.ResponseWriter, r *http.Request) { writeJSON(w, http.StatusOK, map[string]any{ "status": "ok", "service": "drivervault-api", - "time": time.Now().UTC().Format(time.RFC3339), + // The operator-chosen display name, so a client adding this server by URL + // can label it without a second (authenticated) call. + "name": s.serverName(), + "time": time.Now().UTC().Format(time.RFC3339), }) } diff --git a/API Server/internal/api/server.go b/API Server/internal/api/server.go index 2543909..63c6946 100644 --- a/API Server/internal/api/server.go +++ b/API Server/internal/api/server.go @@ -39,6 +39,7 @@ // POST /api/admin/pb-config/test // GET /api/admin/webapp-config PUT /api/admin/webapp-config // POST /api/admin/webapp-config/test +// GET /api/admin/server-config PUT /api/admin/server-config // GET /api/admin/plugins POST /api/admin/plugins // GET /api/admin/plugins/{name} PUT /api/admin/plugins/{name} // DELETE /api/admin/plugins/{name} POST /api/admin/plugins/{name}/health @@ -308,6 +309,21 @@ func (s *Server) setWebAppConfig(url string, allowOrigins []string) { s.cfg.AllowOrigins = append([]string(nil), allowOrigins...) } +// serverName snapshots this server's display name. /api/health reads it per +// request so a rename from the panel needs no restart. +func (s *Server) serverName() string { + s.mu.RLock() + defer s.mu.RUnlock() + return s.cfg.ServerName +} + +// setServerName renames this server at runtime. +func (s *Server) setServerName(name string) { + s.mu.Lock() + defer s.mu.Unlock() + s.cfg.ServerName = name +} + // pbSettings snapshots the PocketBase connection for the settings endpoints. func (s *Server) pbSettings() (url, adminEmail, adminPassword string) { s.mu.RLock() @@ -394,6 +410,11 @@ func (s *Server) Handler() http.Handler { mux.HandleFunc("POST /api/admin/webapp-config/test", s.requireSuperadminAuth(s.handleTestWebAppConfig)) mux.HandleFunc("PUT /api/admin/webapp-config", s.requireSuperadminAuth(s.handleUpdateWebAppConfig)) + // API Server settings — superadmin only. This server's own display name, + // which clients pointed at several DriverVaults use to tell them apart. + mux.HandleFunc("GET /api/admin/server-config", s.requireSuperadminAuth(s.handleGetServerConfig)) + mux.HandleFunc("PUT /api/admin/server-config", s.requireSuperadminAuth(s.handleUpdateServerConfig)) + // Plugins — external-service integrations, managed by a superadmin. mux.HandleFunc("GET /api/admin/plugins", s.requireSuperadminAuth(s.handleListPlugins)) mux.HandleFunc("POST /api/admin/plugins", s.requireSuperadminAuth(s.handleRegisterPlugin)) diff --git a/API Server/internal/api/settings.go b/API Server/internal/api/settings.go index fa2e8b1..9cc0831 100644 --- a/API Server/internal/api/settings.go +++ b/API Server/internal/api/settings.go @@ -246,6 +246,62 @@ func (s *Server) handleUpdateWebAppConfig(w http.ResponseWriter, r *http.Request }) } +// maxServerNameLen bounds the display name. It is shown in client server +// pickers, so it has to stay short enough to render in one; the limit is on +// runes rather than bytes so a non-Latin name is not cut off early. +const maxServerNameLen = 64 + +// serverConfigView is this API Server's own identity as returned to the panel. +type serverConfigView struct { + Name string `json:"name"` +} + +// GET /api/admin/server-config — this server's display name. +func (s *Server) handleGetServerConfig(w http.ResponseWriter, r *http.Request) { + writeJSON(w, http.StatusOK, serverConfigView{Name: s.serverName()}) +} + +// serverConfigBody is the editable API Server payload. +type serverConfigBody struct { + Name string `json:"name"` +} + +// PUT /api/admin/server-config — rename this server at runtime and persist it to +// .env. /api/health reads the name per request, so the new one is live at once. +func (s *Server) handleUpdateServerConfig(w http.ResponseWriter, r *http.Request) { + var b serverConfigBody + if err := json.NewDecoder(r.Body).Decode(&b); err != nil { + writeError(w, http.StatusBadRequest, "invalid json") + return + } + name := strings.TrimSpace(b.Name) + if name == "" { + writeError(w, http.StatusBadRequest, "a server name is required") + return + } + if len([]rune(name)) > maxServerNameLen { + writeError(w, http.StatusBadRequest, "server name is too long (max "+strconv.Itoa(maxServerNameLen)+" characters)") + return + } + + // Apply at runtime, then persist so the change survives a restart. + s.setServerName(name) + if err := config.UpdateEnvFile(config.EnvFile, map[string]string{"SERVER_NAME": name}); err != nil { + // The runtime change already took effect; report that persistence failed. + log.Printf("server-config: persist to %s failed: %v", config.EnvFile, err) + writeJSON(w, http.StatusOK, map[string]any{ + "config": serverConfigView{Name: name}, + "warning": "applied for this session, but could not be saved to .env: " + err.Error(), + }) + return + } + + log.Printf("server-config: server renamed to %s (by superadmin)", name) + writeJSON(w, http.StatusOK, map[string]any{ + "config": serverConfigView{Name: name}, + }) +} + // cleanOrigins trims each origin and drops the blanks, so a trailing comma or a // stray space in the panel's text field can't register an unmatchable origin. func cleanOrigins(in []string) []string { diff --git a/API Server/internal/api/settings_test.go b/API Server/internal/api/settings_test.go new file mode 100644 index 0000000..b93b042 --- /dev/null +++ b/API Server/internal/api/settings_test.go @@ -0,0 +1,114 @@ +package api + +import ( + "encoding/json" + "net/http" + "net/http/httptest" + "os" + "strings" + "testing" + + "drivervault/apiserver/internal/config" + "drivervault/apiserver/internal/pb" +) + +// The server name is applied at runtime and persisted to .env, and /api/health +// reports it without a restart — the three things the panel's API Server tab +// relies on. +func TestServerConfigRenameAppliesAndPersists(t *testing.T) { + t.Chdir(t.TempDir()) // UpdateEnvFile writes ./.env + + s := New(config.Config{ServerName: config.DefaultServerName}, pb.New("", "", "")) + + rec := httptest.NewRecorder() + s.handleUpdateServerConfig(rec, httptest.NewRequest(http.MethodPut, "/api/admin/server-config", + strings.NewReader(`{"name":" Home Garage "}`))) + if rec.Code != http.StatusOK { + t.Fatalf("rename: got %d, want 200: %s", rec.Code, rec.Body) + } + var out struct { + Config serverConfigView `json:"config"` + Warning string `json:"warning"` + } + if err := json.Unmarshal(rec.Body.Bytes(), &out); err != nil { + t.Fatalf("decode: %v", err) + } + if out.Warning != "" { + t.Fatalf("unexpected warning: %s", out.Warning) + } + if out.Config.Name != "Home Garage" { + t.Errorf("name = %q, want %q (surrounding space trimmed)", out.Config.Name, "Home Garage") + } + + if got := s.serverName(); got != "Home Garage" { + t.Errorf("runtime name = %q, want %q", got, "Home Garage") + } + + env, err := os.ReadFile(config.EnvFile) + if err != nil { + t.Fatalf("read .env: %v", err) + } + if !strings.Contains(string(env), "SERVER_NAME=Home Garage") { + t.Errorf(".env missing the rename, got:\n%s", env) + } + + // The name reaches clients through the public liveness probe. + rec = httptest.NewRecorder() + s.handleHealth(rec, httptest.NewRequest(http.MethodGet, "/api/health", nil)) + var health struct { + Name string `json:"name"` + } + if err := json.Unmarshal(rec.Body.Bytes(), &health); err != nil { + t.Fatalf("decode health: %v", err) + } + if health.Name != "Home Garage" { + t.Errorf("health name = %q, want %q", health.Name, "Home Garage") + } +} + +func TestServerConfigRejectsUnusableNames(t *testing.T) { + t.Chdir(t.TempDir()) + + cases := map[string]string{ + "empty": `{"name":""}`, + "blank": `{"name":" "}`, + "too long": `{"name":"` + strings.Repeat("x", maxServerNameLen+1) + `"}`, + "bad json": `{`, + "no name": `{}`, + } + for name, body := range cases { + t.Run(name, func(t *testing.T) { + s := New(config.Config{ServerName: config.DefaultServerName}, pb.New("", "", "")) + rec := httptest.NewRecorder() + s.handleUpdateServerConfig(rec, httptest.NewRequest(http.MethodPut, "/api/admin/server-config", + strings.NewReader(body))) + if rec.Code != http.StatusBadRequest { + t.Fatalf("got %d, want 400: %s", rec.Code, rec.Body) + } + if got := s.serverName(); got != config.DefaultServerName { + t.Errorf("name changed to %q on a rejected request", got) + } + if _, err := os.Stat(config.EnvFile); err == nil { + t.Error(".env written for a rejected request") + } + }) + } +} + +// A name of exactly the limit is accepted — the bound is inclusive, and it is +// counted in runes, so a 64-character non-Latin name fits. +func TestServerConfigCountsRunesNotBytes(t *testing.T) { + t.Chdir(t.TempDir()) + + s := New(config.Config{ServerName: config.DefaultServerName}, pb.New("", "", "")) + name := strings.Repeat("ł", maxServerNameLen) + rec := httptest.NewRecorder() + s.handleUpdateServerConfig(rec, httptest.NewRequest(http.MethodPut, "/api/admin/server-config", + strings.NewReader(`{"name":"`+name+`"}`))) + if rec.Code != http.StatusOK { + t.Fatalf("got %d, want 200: %s", rec.Code, rec.Body) + } + if got := s.serverName(); got != name { + t.Errorf("name = %q, want the %d-rune name", got, maxServerNameLen) + } +} diff --git a/API Server/internal/config/config.go b/API Server/internal/config/config.go index 38a8119..03ef1a7 100644 --- a/API Server/internal/config/config.go +++ b/API Server/internal/config/config.go @@ -16,6 +16,12 @@ type Config struct { WebAppURL string AllowOrigins []string + // ServerName is this server's display name. It is what clients that can be + // pointed at more than one DriverVault call this one — the Web App's server + // switcher labels an added server with it — so it is reported by /api/health + // rather than kept for the panel alone. + ServerName string + // UsersCollection is the PocketBase auth collection holding app users. UsersCollection string @@ -51,6 +57,10 @@ type Config struct { // and that runtime settings changes persist back into. const EnvFile = ".env" +// DefaultServerName labels a server whose operator has not named one, so +// /api/health always carries something a client can display. +const DefaultServerName = "DriverVault API Server" + // AdminConfigured reports whether a service account has been supplied. func (c Config) AdminConfigured() bool { return c.PocketBaseAdminEmail != "" && c.PocketBaseAdminPassword != "" @@ -66,6 +76,7 @@ func Load() Config { PocketBaseURL: strings.TrimRight(firstEnvOr("http://10.2.1.10:8027", "POCKETBASE_URL", "PB_URL"), "/"), WebAppURL: strings.TrimRight(getenv("WEBAPP_URL", "http://localhost:8090"), "/"), AllowOrigins: splitCSV(firstEnvOr("*", "CORS_ALLOW_ORIGINS", "CORS_ORIGINS")), + ServerName: strings.TrimSpace(getenv("SERVER_NAME", DefaultServerName)), UsersCollection: getenv("AUTH_USERS_COLLECTION", "users"), PocketBaseAdminEmail: firstEnv("POCKETBASE_ADMIN_EMAIL", "PB_ADMIN_EMAIL"), PocketBaseAdminPassword: firstEnv("POCKETBASE_ADMIN_PASSWORD", "PB_ADMIN_PASSWORD"), diff --git a/API Server/panel/src/App.vue b/API Server/panel/src/App.vue index 9b17f0a..b5638f9 100644 --- a/API Server/panel/src/App.vue +++ b/API Server/panel/src/App.vue @@ -6,6 +6,7 @@ import { me, token, restore, logout, isManager, isSuperadmin } from "./api"; import LoginView from "./components/LoginView.vue"; import StatusCard from "./components/StatusCard.vue"; import PocketBaseCard from "./components/PocketBaseCard.vue"; +import ServerCard from "./components/ServerCard.vue"; import WebAppCard from "./components/WebAppCard.vue"; import PluginsCard from "./components/PluginsCard.vue"; import UsersCard from "./components/UsersCard.vue"; @@ -37,6 +38,7 @@ const sections = computed(() => { } if (isSuperadmin.value) { out.push( + { id: "server", label: t("sections.server") }, { id: "pocketbase", label: t("sections.pocketbase") }, { id: "webapp", label: t("sections.webapp") }, { id: "plugins", label: t("sections.plugins") }, @@ -145,6 +147,8 @@ const superadminApi = [ { method: "GET", path: "/api/admin/pb-config", desc: "PocketBase connection + live probe" }, { method: "POST", path: "/api/admin/pb-config/test", desc: "Probe a candidate connection" }, { method: "PUT", path: "/api/admin/pb-config", desc: "Apply + persist a connection" }, + { method: "GET", path: "/api/admin/server-config", desc: "This server's display name" }, + { method: "PUT", path: "/api/admin/server-config", desc: "Rename this server (applied + persisted)" }, { method: "GET", path: "/api/admin/webapp-config", desc: "Web App URL + CORS origins, with a live probe" }, { method: "POST", path: "/api/admin/webapp-config/test", desc: "Probe a candidate Web App address" }, { method: "PUT", path: "/api/admin/webapp-config", desc: "Apply + persist Web App settings" }, @@ -245,6 +249,7 @@ const superadminApi = [ + diff --git a/API Server/panel/src/components/ServerCard.vue b/API Server/panel/src/components/ServerCard.vue new file mode 100644 index 0000000..7d23a32 --- /dev/null +++ b/API Server/panel/src/components/ServerCard.vue @@ -0,0 +1,75 @@ + + + diff --git a/API Server/panel/src/i18n/da.json b/API Server/panel/src/i18n/da.json index 6aa8640..69d2595 100644 --- a/API Server/panel/src/i18n/da.json +++ b/API Server/panel/src/i18n/da.json @@ -14,6 +14,7 @@ "overview": "Oversigt", "users": "Brugere", "orgs": "Organisationer", + "server": "API-server", "pocketbase": "PocketBase", "webapp": "Webapp", "plugins": "Plugins", @@ -84,6 +85,16 @@ "confirmDeleteOwn": "Slet din organisation „{name}“? Du fjernes fra den og bliver en almindelig bruger." }, + "server": { + "title": "API-server", + "subtitle": "Hvordan denne server identificerer sig over for de klienter, der forbinder til den", + "name": "Servernavn", + "nameHint": "Vises af klienter, der kan pege på mere end én DriverVault, for eksempel webappens serverskifter. Returneres af /api/health.", + "saveApply": "Gem og anvend", + "persistedEnv": "gemt i .env", + "savedNotice": "Gemt. Det nye navn gælder fra næste anmodning." + }, + "pocketbase": { "title": "PocketBase", "subtitle": "Databaseforbindelse brugt af hvert endpoint", diff --git a/API Server/panel/src/i18n/en.json b/API Server/panel/src/i18n/en.json index 050c2d0..97a8ee6 100644 --- a/API Server/panel/src/i18n/en.json +++ b/API Server/panel/src/i18n/en.json @@ -14,6 +14,7 @@ "overview": "Overview", "users": "Users", "orgs": "Organizations", + "server": "API Server", "pocketbase": "PocketBase", "webapp": "Web App", "plugins": "Plugins", @@ -84,6 +85,16 @@ "confirmDeleteOwn": "Delete your organization \"{name}\"? You will be removed from it and become a regular user." }, + "server": { + "title": "API Server", + "subtitle": "How this server identifies itself to the clients that connect to it", + "name": "Server name", + "nameHint": "Shown by clients that can be pointed at more than one DriverVault, such as the Web App's server switcher. Reported by /api/health.", + "saveApply": "Save & apply", + "persistedEnv": "persisted to .env", + "savedNotice": "Saved. The new name applies to the next request." + }, + "pocketbase": { "title": "PocketBase", "subtitle": "Database connection used by every endpoint", diff --git a/API Server/panel/src/i18n/pl.json b/API Server/panel/src/i18n/pl.json index 5b391f0..b0bc9d3 100644 --- a/API Server/panel/src/i18n/pl.json +++ b/API Server/panel/src/i18n/pl.json @@ -14,6 +14,7 @@ "overview": "Przegląd", "users": "Użytkownicy", "orgs": "Organizacje", + "server": "Serwer API", "pocketbase": "PocketBase", "webapp": "Aplikacja webowa", "plugins": "Wtyczki", @@ -84,6 +85,16 @@ "confirmDeleteOwn": "Usunąć Twoją organizację „{name}”? Zostaniesz z niej usunięty i staniesz się zwykłym użytkownikiem." }, + "server": { + "title": "Serwer API", + "subtitle": "Jak ten serwer przedstawia się klientom, które się z nim łączą", + "name": "Nazwa serwera", + "nameHint": "Widoczna w klientach, które można skierować na więcej niż jeden DriverVault, na przykład w przełączniku serwerów aplikacji webowej. Zwracana przez /api/health.", + "saveApply": "Zapisz i zastosuj", + "persistedEnv": "zapisano w .env", + "savedNotice": "Zapisano. Nowa nazwa obowiązuje od następnego żądania." + }, + "pocketbase": { "title": "PocketBase", "subtitle": "Połączenie z bazą danych używane przez każdy punkt końcowy",