Files
vnt/vnt-web/static/assets/index-DIvs683K.js
T

169 lines
202 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();function Fo(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ke={},vs=[],bt=()=>{},Sr=()=>!1,Tn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),$n=e=>e.startsWith("onUpdate:"),Re=Object.assign,Uo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},ka=Object.prototype.hasOwnProperty,ve=(e,t)=>ka.call(e,t),Q=Array.isArray,bs=e=>en(e)==="[object Map]",An=e=>en(e)==="[object Set]",xl=e=>en(e)==="[object Date]",le=e=>typeof e=="function",Ce=e=>typeof e=="string",Xe=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Er=e=>(be(e)||le(e))&&le(e.then)&&le(e.catch),Tr=Object.prototype.toString,en=e=>Tr.call(e),wa=e=>en(e).slice(8,-1),$r=e=>en(e)==="[object Object]",In=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Vs=Fo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rn=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Ca=/-\w/g,Ge=Rn(e=>e.replace(Ca,t=>t.slice(1).toUpperCase())),Sa=/\B([A-Z])/g,is=Rn(e=>e.replace(Sa,"-$1").toLowerCase()),Pn=Rn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Xn=Rn(e=>e?`on${Pn(e)}`:""),vt=(e,t)=>!Object.is(e,t),fn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Ar=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ho=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ea=e=>{const t=Ce(e)?Number(e):NaN;return isNaN(t)?e:t};let _l;const On=()=>_l||(_l=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mn(e){if(Q(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=Ce(n)?Ia(n):Mn(n);if(o)for(const l in o)t[l]=o[l]}return t}else if(Ce(e)||be(e))return e}const Ta=/;(?![^(]*\))/g,$a=/:([^]+)/,Aa=/\/\*[^]*?\*\//g;function Ia(e){const t={};return e.replace(Aa,"").split(Ta).forEach(s=>{if(s){const n=s.split($a);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function G(e){let t="";if(Ce(e))t=e;else if(Q(e))for(let s=0;s<e.length;s++){const n=G(e[s]);n&&(t+=n+" ")}else if(be(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Ra="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pa=Fo(Ra);function Ir(e){return!!e||e===""}function Oa(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=tn(e[n],t[n]);return s}function tn(e,t){if(e===t)return!0;let s=xl(e),n=xl(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Xe(e),n=Xe(t),s||n)return e===t;if(s=Q(e),n=Q(t),s||n)return s&&n?Oa(e,t):!1;if(s=be(e),n=be(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,l=Object.keys(t).length;if(o!==l)return!1;for(const r in e){const i=e.hasOwnProperty(r),c=t.hasOwnProperty(r);if(i&&!c||!i&&c||!tn(e[r],t[r]))return!1}}return String(e)===String(t)}function Rr(e,t){return e.findIndex(s=>tn(s,t))}const Pr=e=>!!(e&&e.__v_isRef===!0),N=e=>Ce(e)?e:e==null?"":Q(e)||be(e)&&(e.toString===Tr||!le(e.toString))?Pr(e)?N(e.value):JSON.stringify(e,Or,2):String(e),Or=(e,t)=>Pr(t)?Or(e,t.value):bs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],l)=>(s[eo(n,l)+" =>"]=o,s),{})}:An(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>eo(s))}:Xe(t)?eo(t):be(t)&&!Q(t)&&!$r(t)?String(t):t,eo=(e,t="")=>{var s;return Xe(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Me;class Mr{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&&Me&&(Me.active?(this.parent=Me,this.index=(Me.scopes||(Me.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){const n=this.scopes.slice();for(t=0,s=n.length;t<s;t++)n[t].pause()}for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes){const o=this.scopes.slice();for(t=0,s=o.length;t<s;t++)o[t].resume()}const n=this.effects.slice();for(t=0,s=n.length;t<s;t++)n[t].resume()}}run(t){if(this._active){const s=Me;try{return Me=this,t()}finally{Me=s}}}on(){++this._on===1&&(this.prevScope=Me,Me=this)}off(){if(this._on>0&&--this._on===0){if(Me===this)Me=this.prevScope;else{let t=Me;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;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(s=0,n=o.length;s<n;s++)o[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Lr(e){return new Mr(e)}function Nr(){return Me}function Ma(e,t=!1){Me&&Me.cleanups.push(e)}let we;const to=new WeakSet;class Vr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Me&&(Me.active?Me.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,to.has(this)&&(to.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Dr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,yl(this),Br(this);const t=we,s=lt;we=this,lt=!0;try{return this.fn()}finally{Fr(this),we=t,lt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Go(t);this.deps=this.depsTail=void 0,yl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?to.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){_o(this)&&this.run()}get dirty(){return _o(this)}}let jr=0,js,Ds;function Dr(e,t=!1){if(e.flags|=8,t){e.next=Ds,Ds=e;return}e.next=js,js=e}function Wo(){jr++}function Ko(){if(--jr>0)return;if(Ds){let t=Ds;for(Ds=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;js;){let t=js;for(js=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 Br(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fr(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),Go(n),La(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function _o(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ur(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ur(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ks)||(e.globalVersion=Ks,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_o(e))))return;e.flags|=2;const t=e.dep,s=we,n=lt;we=e,lt=!0;try{Br(e);const o=e.fn(e._value);(t.version===0||vt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{we=s,lt=n,Fr(e),e.flags&=-3}}function Go(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let l=s.computed.deps;l;l=l.nextDep)Go(l,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function La(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let lt=!0;const Hr=[];function At(){Hr.push(lt),lt=!1}function It(){const e=Hr.pop();lt=e===void 0?!0:e}function yl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=we;we=void 0;try{t()}finally{we=s}}}let Ks=0;class Na{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 qo{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(!we||!lt||we===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==we)s=this.activeLink=new Na(we,this),we.deps?(s.prevDep=we.depsTail,we.depsTail.nextDep=s,we.depsTail=s):we.deps=we.depsTail=s,Wr(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=we.depsTail,s.nextDep=void 0,we.depsTail.nextDep=s,we.depsTail=s,we.deps===s&&(we.deps=n)}return s}trigger(t){this.version++,Ks++,this.notify(t)}notify(t){Wo();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Ko()}}}function Wr(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)Wr(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const pn=new WeakMap,ns=Symbol(""),yo=Symbol(""),Gs=Symbol("");function je(e,t,s){if(lt&&we){let n=pn.get(e);n||pn.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new qo),o.map=n,o.key=s),o.track()}}function St(e,t,s,n,o,l){const r=pn.get(e);if(!r){Ks++;return}const i=c=>{c&&c.trigger()};if(Wo(),t==="clear")r.forEach(i);else{const c=Q(e),f=c&&In(s);if(c&&s==="length"){const u=Number(n);r.forEach((d,g)=>{(g==="length"||g===Gs||!Xe(g)&&g>=u)&&i(d)})}else switch((s!==void 0||r.has(void 0))&&i(r.get(s)),f&&i(r.get(Gs)),t){case"add":c?f&&i(r.get("length")):(i(r.get(ns)),bs(e)&&i(r.get(yo)));break;case"delete":c||(i(r.get(ns)),bs(e)&&i(r.get(yo)));break;case"set":bs(e)&&i(r.get(ns));break}}Ko()}function Va(e,t){const s=pn.get(e);return s&&s.get(t)}function fs(e){const t=pe(e);return t===e?t:(je(t,"iterate",Gs),Ye(e)?t:t.map(rt))}function Ln(e){return je(e=pe(e),"iterate",Gs),e}function mt(e,t){return Rt(e)?ys(Tt(e)?rt(t):t):rt(t)}const ja={__proto__:null,[Symbol.iterator](){return so(this,Symbol.iterator,e=>mt(this,e))},concat(...e){return fs(this).concat(...e.map(t=>Q(t)?fs(t):t))},entries(){return so(this,"entries",e=>(e[1]=mt(this,e[1]),e))},every(e,t){return yt(this,"every",e,t,void 0,arguments)},filter(e,t){return yt(this,"filter",e,t,s=>s.map(n=>mt(this,n)),arguments)},find(e,t){return yt(this,"find",e,t,s=>mt(this,s),arguments)},findIndex(e,t){return yt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return yt(this,"findLast",e,t,s=>mt(this,s),arguments)},findLastIndex(e,t){return yt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return yt(this,"forEach",e,t,void 0,arguments)},includes(...e){return no(this,"includes",e)},indexOf(...e){return no(this,"indexOf",e)},join(e){return fs(this).join(e)},lastIndexOf(...e){return no(this,"lastIndexOf",e)},map(e,t){return yt(this,"map",e,t,void 0,arguments)},pop(){return $s(this,"pop")},push(...e){return $s(this,"push",e)},reduce(e,...t){return kl(this,"reduce",e,t)},reduceRight(e,...t){return kl(this,"reduceRight",e,t)},shift(){return $s(this,"shift")},some(e,t){return yt(this,"some",e,t,void 0,arguments)},splice(...e){return $s(this,"splice",e)},toReversed(){return fs(this).toReversed()},toSorted(e){return fs(this).toSorted(e)},toSpliced(...e){return fs(this).toSpliced(...e)},unshift(...e){return $s(this,"unshift",e)},values(){return so(this,"values",e=>mt(this,e))}};function so(e,t,s){const n=Ln(e),o=n[t]();return n!==e&&!Ye(e)&&(o._next=o.next,o.next=()=>{const l=o._next();return l.done||(l.value=s(l.value)),l}),o}const Da=Array.prototype;function yt(e,t,s,n,o,l){const r=Ln(e),i=r!==e&&!Ye(e),c=r[t];if(c!==Da[t]){const d=c.apply(e,l);return i?rt(d):d}let f=s;r!==e&&(i?f=function(d,g){return s.call(this,mt(e,d),g,e)}:s.length>2&&(f=function(d,g){return s.call(this,d,g,e)}));const u=c.call(r,f,n);return i&&o?o(u):u}function kl(e,t,s,n){const o=Ln(e),l=o!==e&&!Ye(e);let r=s,i=!1;o!==e&&(l?(i=n.length===0,r=function(f,u,d){return i&&(i=!1,f=mt(e,f)),s.call(this,f,mt(e,u),d,e)}):s.length>3&&(r=function(f,u,d){return s.call(this,f,u,d,e)}));const c=o[t](r,...n);return i?mt(e,c):c}function no(e,t,s){const n=pe(e);je(n,"iterate",Gs);const o=n[t](...s);return(o===-1||o===!1)&&Nn(s[0])?(s[0]=pe(s[0]),n[t](...s)):o}function $s(e,t,s=[]){At(),Wo();const n=pe(e)[t].apply(e,s);return Ko(),It(),n}const Ba=Fo("__proto__,__v_isRef,__isVue"),Kr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xe));function Fa(e){Xe(e)||(e=String(e));const t=pe(this);return je(t,"has",e),t.hasOwnProperty(e)}class Gr{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,l=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return l;if(s==="__v_raw")return n===(o?l?Ya:Jr:l?Zr:zr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=Q(t);if(!o){let c;if(r&&(c=ja[s]))return c;if(s==="hasOwnProperty")return Fa}const i=Reflect.get(t,s,$e(t)?t:n);if((Xe(s)?Kr.has(s):Ba(s))||(o||je(t,"get",s),l))return i;if($e(i)){const c=r&&In(s)?i:i.value;return o&&be(c)?wo(c):c}return be(i)?o?wo(i):Ht(i):i}}class qr extends Gr{constructor(t=!1){super(!1,t)}set(t,s,n,o){let l=t[s];const r=Q(t)&&In(s);if(!this._isShallow){const f=Rt(l);if(!Ye(n)&&!Rt(n)&&(l=pe(l),n=pe(n)),!r&&$e(l)&&!$e(n))return f||(l.value=n),!0}const i=r?Number(s)<t.length:ve(t,s),c=Reflect.set(t,s,n,$e(t)?t:o);return t===pe(o)&&c&&(i?vt(n,l)&&St(t,"set",s,n):St(t,"add",s,n)),c}deleteProperty(t,s){const n=ve(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&St(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!Xe(s)||!Kr.has(s))&&je(t,"has",s),n}ownKeys(t){return je(t,"iterate",Q(t)?"length":ns),Reflect.ownKeys(t)}}class Ua extends Gr{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Ha=new qr,Wa=new Ua,Ka=new qr(!0);const ko=e=>e,ln=e=>Reflect.getPrototypeOf(e);function Ga(e,t,s){return function(...n){const o=this.__v_raw,l=pe(o),r=bs(l),i=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,f=o[e](...n),u=s?ko:t?ys:rt;return!t&&je(l,"iterate",c?yo:ns),Re(Object.create(f),{next(){const{value:d,done:g}=f.next();return g?{value:d,done:g}:{value:i?[u(d[0]),u(d[1])]:u(d),done:g}}})}}function rn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function qa(e,t){const s={get(o){const l=this.__v_raw,r=pe(l),i=pe(o);e||(vt(o,i)&&je(r,"get",o),je(r,"get",i));const{has:c}=ln(r),f=t?ko:e?ys:rt;if(c.call(r,o))return f(l.get(o));if(c.call(r,i))return f(l.get(i));l!==r&&l.get(o)},get size(){const o=this.__v_raw;return!e&&je(pe(o),"iterate",ns),o.size},has(o){const l=this.__v_raw,r=pe(l),i=pe(o);return e||(vt(o,i)&&je(r,"has",o),je(r,"has",i)),o===i?l.has(o):l.has(o)||l.has(i)},forEach(o,l){const r=this,i=r.__v_raw,c=pe(i),f=t?ko:e?ys:rt;return!e&&je(c,"iterate",ns),i.forEach((u,d)=>o.call(l,f(u),f(d),r))}};return Re(s,e?{add:rn("add"),set:rn("set"),delete:rn("delete"),clear:rn("clear")}:{add(o){const l=pe(this),r=ln(l),i=pe(o),c=!t&&!Ye(o)&&!Rt(o)?i:o;return r.has.call(l,c)||vt(o,c)&&r.has.call(l,o)||vt(i,c)&&r.has.call(l,i)||(l.add(c),St(l,"add",c,c)),this},set(o,l){!t&&!Ye(l)&&!Rt(l)&&(l=pe(l));const r=pe(this),{has:i,get:c}=ln(r);let f=i.call(r,o);f||(o=pe(o),f=i.call(r,o));const u=c.call(r,o);return r.set(o,l),f?vt(l,u)&&St(r,"set",o,l):St(r,"add",o,l),this},delete(o){const l=pe(this),{has:r,get:i}=ln(l);let c=r.call(l,o);c||(o=pe(o),c=r.call(l,o)),i&&i.call(l,o);const f=l.delete(o);return c&&St(l,"delete",o,void 0),f},clear(){const o=pe(this),l=o.size!==0,r=o.clear();return l&&St(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Ga(o,e,t)}),s}function zo(e,t){const s=qa(e,t);return(n,o,l)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(ve(s,o)&&o in n?s:n,o,l)}const za={get:zo(!1,!1)},Za={get:zo(!1,!0)},Ja={get:zo(!0,!1)};const zr=new WeakMap,Zr=new WeakMap,Jr=new WeakMap,Ya=new WeakMap;function Qa(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ht(e){return Rt(e)?e:Zo(e,!1,Ha,za,zr)}function Yr(e){return Zo(e,!1,Ka,Za,Zr)}function wo(e){return Zo(e,!0,Wa,Ja,Jr)}function Zo(e,t,s,n,o){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=o.get(e);if(l)return l;const r=Qa(wa(e));if(r===0)return e;const i=new Proxy(e,r===2?n:s);return o.set(e,i),i}function Tt(e){return Rt(e)?Tt(e.__v_raw):!!(e&&e.__v_isReactive)}function Rt(e){return!!(e&&e.__v_isReadonly)}function Ye(e){return!!(e&&e.__v_isShallow)}function Nn(e){return e?!!e.__v_raw:!1}function pe(e){const t=e&&e.__v_raw;return t?pe(t):e}function Jo(e){return!ve(e,"__v_skip")&&Object.isExtensible(e)&&Ar(e,"__v_skip",!0),e}const rt=e=>be(e)?Ht(e):e,ys=e=>be(e)?wo(e):e;function $e(e){return e?e.__v_isRef===!0:!1}function se(e){return Qr(e,!1)}function Xa(e){return Qr(e,!0)}function Qr(e,t){return $e(e)?e:new ec(e,t)}class ec{constructor(t,s){this.dep=new qo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:pe(t),this._value=s?t:rt(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||Ye(t)||Rt(t);t=n?t:pe(t),vt(t,s)&&(this._rawValue=t,this._value=n?t:rt(t),this.dep.trigger())}}function O(e){return $e(e)?e.value:e}const tc={get:(e,t,s)=>t==="__v_raw"?e:O(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return $e(o)&&!$e(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Xr(e){return Tt(e)?e:new Proxy(e,tc)}function sc(e){const t=Q(e)?new Array(e.length):{};for(const s in e)t[s]=oc(e,s);return t}class nc{constructor(t,s,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=Xe(s)?s:String(s),this._raw=pe(t);let o=!0,l=t;if(!Q(t)||Xe(this._key)||!In(this._key))do o=!Nn(l)||Ye(l);while(o&&(l=l.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=O(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&$e(this._raw[this._key])){const s=this._object[this._key];if($e(s)){s.value=t;return}}this._object[this._key]=t}get dep(){return Va(this._raw,this._key)}}function oc(e,t,s){return new nc(e,t,s)}class lc{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new qo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ks-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&we!==this)return Dr(this,!0),!0}get value(){const t=this.dep.track();return Ur(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function rc(e,t,s=!1){let n,o;return le(e)?n=e:(n=e.get,o=e.set),new lc(n,o,s)}const an={},hn=new WeakMap;let Yt;function ic(e,t=!1,s=Yt){if(s){let n=hn.get(s);n||hn.set(s,n=[]),n.push(e)}}function ac(e,t,s=ke){const{immediate:n,deep:o,once:l,scheduler:r,augmentJob:i,call:c}=s,f=b=>o?b:Ye(b)||o===!1||o===0?Et(b,1):Et(b);let u,d,g,h,C=!1,y=!1;if($e(e)?(d=()=>e.value,C=Ye(e)):Tt(e)?(d=()=>f(e),C=!0):Q(e)?(y=!0,C=e.some(b=>Tt(b)||Ye(b)),d=()=>e.map(b=>{if($e(b))return b.value;if(Tt(b))return f(b);if(le(b))return c?c(b,2):b()})):le(e)?t?d=c?()=>c(e,2):e:d=()=>{if(g){At();try{g()}finally{It()}}const b=Yt;Yt=u;try{return c?c(e,3,[h]):e(h)}finally{Yt=b}}:d=bt,t&&o){const b=d,_=o===!0?1/0:o;d=()=>Et(b(),_)}const L=Nr(),$=()=>{u.stop(),L&&L.active&&Uo(L.effects,u)};if(l&&t){const b=t;t=(..._)=>{const j=b(..._);return $(),j}}let w=y?new Array(e.length).fill(an):an;const p=b=>{if(!(!(u.flags&1)||!u.dirty&&!b))if(t){const _=u.run();if(b||o||C||(y?_.some((j,B)=>vt(j,w[B])):vt(_,w))){g&&g();const j=Yt;Yt=u;try{const B=[_,w===an?void 0:y&&w[0]===an?[]:w,h];w=_,c?c(t,3,B):t(...B)}finally{Yt=j}}}else u.run()};return i&&i(p),u=new Vr(d),u.scheduler=r?()=>r(p,!1):p,h=b=>ic(b,!1,u),g=u.onStop=()=>{const b=hn.get(u);if(b){if(c)c(b,4);else for(const _ of b)_();hn.delete(u)}},t?n?p(!0):w=u.run():r?r(p.bind(null,!0),!0):u.run(),$.pause=u.pause.bind(u),$.resume=u.resume.bind(u),$.stop=$,$}function Et(e,t=1/0,s){if(t<=0||!be(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,$e(e))Et(e.value,t,s);else if(Q(e))for(let n=0;n<e.length;n++)Et(e[n],t,s);else if(An(e)||bs(e))e.forEach(n=>{Et(n,t,s)});else if($r(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}function sn(e,t,s,n){try{return n?e(...n):e()}catch(o){Vn(o,t,s)}}function nt(e,t,s,n){if(le(e)){const o=sn(e,t,s,n);return o&&Er(o)&&o.catch(l=>{Vn(l,t,s)}),o}if(Q(e)){const o=[];for(let l=0;l<e.length;l++)o.push(nt(e[l],t,s,n));return o}}function Vn(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||ke;if(t){let i=t.parent;const c=t.proxy,f=`https://vuejs.org/error-reference/#runtime-${s}`;for(;i;){const u=i.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,c,f)===!1)return}i=i.parent}if(l){At(),sn(l,null,10,[e,c,f]),It();return}}cc(e,s,o,n,r)}function cc(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Ke=[];let ht=-1;const xs=[];let Bt=null,ms=0;const ei=Promise.resolve();let mn=null;function xt(e){const t=mn||ei;return e?t.then(this?e.bind(this):e):t}function uc(e){let t=ht+1,s=Ke.length;for(;t<s;){const n=t+s>>>1,o=Ke[n],l=qs(o);l<e||l===e&&o.flags&2?t=n+1:s=n}return t}function Yo(e){if(!(e.flags&1)){const t=qs(e),s=Ke[Ke.length-1];!s||!(e.flags&2)&&t>=qs(s)?Ke.push(e):Ke.splice(uc(t),0,e),e.flags|=1,ti()}}function ti(){mn||(mn=ei.then(ni))}function fc(e){if(!Q(e))Bt&&e.id===-1?Bt.splice(ms+1,0,e):e.flags&1||(xs.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)xs.push(e[t]);ti()}function wl(e,t,s=ht+1){for(;s<Ke.length;s++){const n=Ke[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ke.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function si(e){if(xs.length){const t=[...new Set(xs)].sort((s,n)=>qs(s)-qs(n));if(xs.length=0,Bt){for(let s=0;s<t.length;s++)Bt.push(t[s]);return}for(Bt=t,ms=0;ms<Bt.length;ms++){const s=Bt[ms];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Bt=null,ms=0}}const qs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ni(e){try{for(ht=0;ht<Ke.length;ht++){const t=Ke[ht];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),sn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ht<Ke.length;ht++){const t=Ke[ht];t&&(t.flags&=-2)}ht=-1,Ke.length=0,si(),mn=null,(Ke.length||xs.length)&&ni()}}let Ne=null,oi=null;function gn(e){const t=Ne;return Ne=e,oi=e&&e.type.__scopeId||null,t}function Ee(e,t=Ne,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&_n(-1);const l=gn(t),r=$t.length;let i;try{i=e(...o)}finally{for(let c=$t.length;c>r;c--)nl();gn(l),n._d&&_n(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function _e(e,t){if(Ne===null)return e;const s=Kn(Ne),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[l,r,i,c=ke]=t[o];l&&(le(l)&&(l={mounted:l,updated:l}),l.deep&&Et(r),n.push({dir:l,instance:s,value:r,oldValue:void 0,arg:i,modifiers:c}))}return e}function Kt(e,t,s,n){const o=e.dirs,l=t&&t.dirs;for(let r=0;r<o.length;r++){const i=o[r];l&&(i.oldValue=l[r].value);let c=i.dir[n];c&&(At(),nt(c,s,8,[e.el,i,e,t]),It())}}function Bs(e,t){if(Be){let s=Be.provides;const n=Be.parent&&Be.parent.provides;n===s&&(s=Be.provides=Object.create(n)),s[e]=t}}function Qe(e,t,s=!1){const n=Es();if(n||os){let o=os?os._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&le(t)?t.call(n&&n.proxy):t}}function dc(){return!!(Es()||os)}const pc=Symbol.for("v-scx"),hc=()=>Qe(pc);function Ve(e,t,s){return li(e,t,s)}function li(e,t,s=ke){const{immediate:n,deep:o,flush:l,once:r}=s,i=Re({},s),c=t&&n||!t&&l!=="post";let f;if(Qs){if(l==="sync"){const h=hc();f=h.__watcherHandles||(h.__watcherHandles=[])}else if(!c){const h=()=>{};return h.stop=bt,h.resume=bt,h.pause=bt,h}}const u=Be;i.call=(h,C,y)=>nt(h,u,C,y);let d=!1;l==="post"?i.scheduler=h=>{He(h,u&&u.suspense)}:l!=="sync"&&(d=!0,i.scheduler=(h,C)=>{C?h():Yo(h)}),i.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const g=ac(e,t,i);return Qs&&(f?f.push(g):c&&g()),g}function mc(e,t,s){const n=this.proxy,o=Ce(e)?e.includes(".")?ri(n,e):()=>n[e]:e.bind(n,n);let l;le(t)?l=t:(l=t.handler,s=t);const r=nn(this),i=li(o,l.bind(n),s);return r(),i}function ri(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const Vt=new WeakMap,ii=Symbol("_vte"),jn=e=>e.__isTeleport,Qt=e=>e&&(e.disabled||e.disabled===""),gc=e=>e&&(e.defer||e.defer===""),Cl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Sl=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Co=(e,t)=>{const s=e&&e.to;return Ce(s)?t?t(s):null:s},vc={name:"Teleport",__isTeleport:!0,process(e,t,s,n,o,l,r,i,c,f){const{mc:u,pc:d,pbc:g,o:{insert:h,querySelector:C,createText:y,createComment:L,parentNode:$}}=f,w=Qt(t.props);let{dynamicChildren:p}=t;const b=(B,H,M)=>{B.shapeFlag&16&&u(B.children,H,M,o,l,r,i,c)},_=(B=t)=>{const H=Qt(B.props),M=B.target=Co(B.props,C),z=So(M,B,y,h);M&&(r!=="svg"&&Cl(M)?r="svg":r!=="mathml"&&Sl(M)&&(r="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(M),H||(b(B,M,z),Os(B,!1)))},j=B=>{const H=()=>{if(Vt.get(B)===H){if(Vt.delete(B),Qt(B.props)){const M=$(B.el)||s;b(B,M,B.anchor),Os(B,!0)}_(B)}};Vt.set(B,H),He(H,l)};if(e==null){const B=t.el=y(""),H=t.anchor=y("");if(h(B,s,n),h(H,s,n),gc(t.props)||l&&l.pendingBranch){j(t);return}w&&(b(t,s,H),Os(t,!0)),_()}else{t.el=e.el;const B=t.anchor=e.anchor,H=Vt.get(e);if(H){H.flags|=8,Vt.delete(e),j(t);return}t.targetStart=e.targetStart;const M=t.target=e.target,z=t.targetAnchor=e.targetAnchor,oe=Qt(e.props),F=oe?s:M,Z=oe?B:z;if(r==="svg"||Cl(M)?r="svg":(r==="mathml"||Sl(M))&&(r="mathml"),p?(g(e.dynamicChildren,p,F,o,l,r,i),sl(e,t,!0)):c||d(e,t,F,Z,o,l,r,i,!1),w)oe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):cn(t,s,B,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const R=Co(t.props,C);R&&(t.target=R,cn(t,R,null,f,0))}else oe&&cn(t,M,z,f,1);Os(t,w)}},remove(e,t,s,{um:n,o:{remove:o}},l){const{shapeFlag:r,children:i,anchor:c,targetStart:f,targetAnchor:u,target:d,props:g}=e,h=Qt(g),C=l||!h,y=Vt.get(e);if(y&&(y.flags|=8,Vt.delete(e)),d&&(o(f),o(u)),l&&o(c),!y&&(h||d)&&r&16)for(let L=0;L<i.length;L++){const $=i[L];n($,t,s,C,!!$.dynamicChildren)}},move:cn,hydrate:bc};function cn(e,t,s,{o:{insert:n},m:o},l=2){l===0&&n(e.targetAnchor,t,s);const{el:r,anchor:i,shapeFlag:c,children:f,props:u}=e,d=l===2;if(d&&n(r,t,s),!Vt.has(e)&&(!d||Qt(u))&&c&16)for(let g=0;g<f.length;g++)o(f[g],t,s,2);d&&n(i,t,s)}function bc(e,t,s,n,o,l,{o:{nextSibling:r,parentNode:i,querySelector:c,insert:f,createText:u}},d){function g(L,$){let w=$;for(;w;){if(w&&w.nodeType===8){if(w.data==="teleport start anchor")t.targetStart=w;else if(w.data==="teleport anchor"){t.targetAnchor=w,L._lpa=t.targetAnchor&&r(t.targetAnchor);break}}w=r(w)}}function h(L,$){$.anchor=d(r(L),$,i(L),s,n,o,l)}const C=t.target=Co(t.props,c),y=Qt(t.props);if(C){const L=C._lpa||C.firstChild;t.shapeFlag&16&&(y?(h(e,t),g(C,L),t.targetAnchor||So(C,t,u,f,i(e)===C?e:null)):(t.anchor=r(e),g(C,L),t.targetAnchor||So(C,t,u,f),d(L&&r(L),t,C,s,n,o,l))),Os(t,y)}else y&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=r(e));return t.anchor&&r(t.anchor)}const Qo=vc;function Os(e,t){const s=e.ctx;if(s&&s.ut){let n,o;for(t?(n=e.el,o=e.anchor):(n=e.targetStart,o=e.targetAnchor);n&&n!==o;)n.nodeType===1&&n.setAttribute("data-v-owner",s.uid),n=n.nextSibling;s.ut()}}function So(e,t,s,n,o=null){const l=t.targetStart=s(""),r=t.targetAnchor=s("");return l[ii]=r,e&&(n(l,e,o),n(r,e,o)),r}const st=Symbol("_leaveCb"),As=Symbol("_enterCb");function ai(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return _t(()=>{e.isMounted=!0}),Fn(()=>{e.isUnmounting=!0}),e}const tt=[Function,Array],ci={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:tt,onEnter:tt,onAfterEnter:tt,onEnterCancelled:tt,onBeforeLeave:tt,onLeave:tt,onAfterLeave:tt,onLeaveCancelled:tt,onBeforeAppear:tt,onAppear:tt,onAfterAppear:tt,onAppearCancelled:tt},ui=e=>{const t=e.subTree;return t.component?ui(t.component):t},xc={name:"BaseTransition",props:ci,setup(e,{slots:t}){const s=Es(),n=ai();return()=>{const o=t.default&&Xo(t.default(),!0),l=o&&o.length?fi(o):s.subTree?fe():void 0;if(!l)return;const r=pe(e),{mode:i}=r;if(n.isLeaving)return oo(l);const c=vn(l);if(!c)return oo(l);let f=zs(c,r,n,s,d=>f=d);c.type!==De&&rs(c,f);let u=s.subTree&&vn(s.subTree);if(u&&u.type!==De&&!Xt(u,c)&&ui(s).type!==De){let d=zs(u,r,n,s);if(rs(u,d),i==="out-in"&&c.type!==De)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,s.job.flags&8||s.update(),delete d.afterLeave,u=void 0},oo(l);i==="in-out"&&c.type!==De?d.delayLeave=(g,h,C)=>{const y=di(n,u);y[String(u.key)]=u,g[st]=()=>{h(),g[st]=void 0,delete f.delayedLeave,u=void 0},f.delayedLeave=()=>{C(),delete f.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return l}}};function fi(e){let t=e[0];if(e.length>1){for(const s of e)if(s.type!==De){t=s;break}}return t}const _c=xc;function di(e,t){const{leavingVNodes:s}=e;let n=s.get(t.type);return n||(n=Object.create(null),s.set(t.type,n)),n}function zs(e,t,s,n,o){const{appear:l,mode:r,persisted:i=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:g,onLeave:h,onAfterLeave:C,onLeaveCancelled:y,onBeforeAppear:L,onAppear:$,onAfterAppear:w,onAppearCancelled:p}=t,b=String(e.key),_=di(s,e),j=(M,z)=>{M&&nt(M,n,9,z)},B=(M,z)=>{const oe=z[1];j(M,z),Q(M)?M.every(F=>F.length<=1)&&oe():M.length<=1&&oe()},H={mode:r,persisted:i,beforeEnter(M){let z=c;if(!s.isMounted)if(l)z=L||c;else return;M[st]&&M[st](!0);const oe=_[b];oe&&Xt(e,oe)&&oe.el[st]&&oe.el[st](),j(z,[M])},enter(M){if(_[b]===e)return;let z=f,oe=u,F=d;if(!s.isMounted)if(l)z=$||f,oe=w||u,F=p||d;else return;let Z=!1;M[As]=ee=>{Z||(Z=!0,ee?j(F,[M]):j(oe,[M]),H.delayedLeave&&H.delayedLeave(),M[As]=void 0)};const R=M[As].bind(null,!1);z?B(z,[M,R]):R()},leave(M,z){const oe=String(e.key);if(M[As]&&M[As](!0),s.isUnmounting)return z();j(g,[M]);let F=!1;M[st]=R=>{F||(F=!0,z(),R?j(y,[M]):j(C,[M]),M[st]=void 0,_[oe]===e&&delete _[oe])};const Z=M[st].bind(null,!1);_[oe]=e,h?B(h,[M,Z]):Z()},clone(M){const z=zs(M,t,s,n,o);return o&&o(z),z}};return H}function oo(e){if(Dn(e))return e=Ut(e),e.children=null,e}function vn(e){if(!Dn(e))return jn(e.type)&&e.children?fi(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:s}=e;if(s){if(t&16)return s[0];if(t&32&&le(s.default))return s.default()}}function rs(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const s=e.component.subTree;rs(jn(s.type)&&vn(s)||s,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Xo(e,t=!1,s){let n=[],o=0;for(let l=0;l<e.length;l++){let r=e[l];const i=s==null?r.key:String(s)+String(r.key!=null?r.key:l);r.type===ie?(r.patchFlag&128&&o++,n=n.concat(Xo(r.children,t,i))):(t||r.type!==De)&&n.push(i!=null?Ut(r,{key:i}):r)}if(o>1)for(let l=0;l<n.length;l++)n[l].patchFlag=-2;return n}function pi(e,t){return le(e)?Re({name:e.name},t,{setup:e}):e}function yc(){const e=Es();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function hi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function El(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const bn=new WeakMap;function Fs(e,t,s,n,o=!1){if(Q(e)){e.forEach((y,L)=>Fs(y,t&&(Q(t)?t[L]:t),s,n,o));return}if(_s(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Fs(e,t,s,n.component.subTree);return}const l=n.shapeFlag&4?Kn(n.component):n.el,r=o?null:l,{i,r:c}=e,f=t&&t.r,u=i.refs===ke?i.refs={}:i.refs,d=i.setupState,g=pe(d),h=d===ke?Sr:y=>El(u,y)?!1:ve(g,y),C=(y,L)=>!(L&&El(u,L));if(f!=null&&f!==c){if(Tl(t),Ce(f))u[f]=null,h(f)&&(d[f]=null);else if($e(f)){const y=t;C(f,y.k)&&(f.value=null),y.k&&(u[y.k]=null)}}if(le(c))sn(c,i,12,[r,u]);else{const y=Ce(c),L=$e(c);if(y||L){const $=()=>{if(e.f){const w=y?h(c)?d[c]:u[c]:C()||!e.k?c.value:u[e.k];if(o)Q(w)&&Uo(w,l);else if(Q(w))w.includes(l)||w.push(l);else if(y)u[c]=[l],h(c)&&(d[c]=u[c]);else{const p=[l];C(c,e.k)&&(c.value=p),e.k&&(u[e.k]=p)}}else y?(u[c]=r,h(c)&&(d[c]=r)):L&&(C(c,e.k)&&(c.value=r),e.k&&(u[e.k]=r))};if(r){const w=()=>{$(),bn.delete(e)};w.id=-1,bn.set(e,w),He(w,s)}else Tl(e),$()}}}function Tl(e){const t=bn.get(e);t&&(t.flags|=8,bn.delete(e))}On().requestIdleCallback;On().cancelIdleCallback;const _s=e=>!!e.type.__asyncLoader,Dn=e=>e.type.__isKeepAlive;function kc(e,t){mi(e,"a",t)}function wc(e,t){mi(e,"da",t)}function mi(e,t,s=Be){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Bn(t,n,s),s){let o=s.parent;for(;o&&o.parent;)Dn(o.parent.vnode)&&Cc(n,t,s,o),o=o.parent}}function Cc(e,t,s,n){const o=Bn(t,e,n,!0);Ss(()=>{Uo(n[t],o)},s)}function Bn(e,t,s=Be,n=!1){if(s){const o=s[e]||(s[e]=[]),l=t.__weh||(t.__weh=(...r)=>{At();const i=nn(s),c=nt(t,s,e,r);return i(),It(),c});return n?o.unshift(l):o.push(l),l}}const Pt=e=>(t,s=Be)=>{(!Qs||e==="sp")&&Bn(e,(...n)=>t(...n),s)},Sc=Pt("bm"),_t=Pt("m"),Ec=Pt("bu"),gi=Pt("u"),Fn=Pt("bum"),Ss=Pt("um"),Tc=Pt("sp"),$c=Pt("rtg"),Ac=Pt("rtc");function Ic(e,t=Be){Bn("ec",e,t)}const vi="components";function Un(e,t){return xi(vi,e,!0,t)||e}const bi=Symbol.for("v-ndc");function Rc(e){return Ce(e)?xi(vi,e,!1)||e:e||bi}function xi(e,t,s=!0,n=!1){const o=Ne||Be;if(o){const l=o.type;{const i=pu(l,!1);if(i&&(i===t||i===Ge(t)||i===Pn(Ge(t))))return l}const r=$l(o[e]||l[e],t)||$l(o.appContext[e],t);return!r&&n?l:r}}function $l(e,t){return e&&(e[t]||e[Ge(t)]||e[Pn(Ge(t))])}function Te(e,t,s,n){let o;const l=s,r=Q(e);if(r||Ce(e)){const i=r&&Tt(e);let c=!1,f=!1;i&&(c=!Ye(e),f=Rt(e),e=Ln(e)),o=new Array(e.length);for(let u=0,d=e.length;u<d;u++)o[u]=t(c?f?ys(rt(e[u])):rt(e[u]):e[u],u,void 0,l)}else if(typeof e=="number"){o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,l)}else if(be(e))if(e[Symbol.iterator])o=Array.from(e,(i,c)=>t(i,c,void 0,l));else{const i=Object.keys(e);o=new Array(i.length);for(let c=0,f=i.length;c<f;c++){const u=i[c];o[c]=t(e[u],u,c,l)}}else o=[];return o}function lo(e,t,s,n,o,l){if(s==null&&(s={}),Ne.ce||Ne.parent&&_s(Ne.parent)&&Ne.parent.ce){const f=s,u=Object.keys(f).length>0;return t!=="default"&&(f.name=t),k(),Ie(ie,null,[ue("slot",f,n)],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1);const i=$t.length;k();let c;try{const f=r&&_i(r(s)),u=s.key||l||f&&f.key;c=Ie(ie,{key:(u&&!Xe(u)?u:`_${t}`)+(!f&&n?"_fb":"")},f||(n?n():[]),f&&e._===1?64:-2)}catch(f){for(let u=$t.length;u>i;u--)nl();throw f}finally{r&&r._c&&(r._d=!0)}return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),c}function _i(e){return e.some(t=>Js(t)?!(t.type===De||t.type===ie&&!_i(t.children)):!0)?e:null}const Eo=e=>e?Bi(e)?Kn(e):Eo(e.parent):null,Us=Re(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=>Eo(e.parent),$root:e=>Eo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ki(e),$forceUpdate:e=>e.f||(e.f=()=>{Yo(e.update)}),$nextTick:e=>e.n||(e.n=xt.bind(e.proxy)),$watch:e=>mc.bind(e)}),ro=(e,t)=>e!==ke&&!e.__isScriptSetup&&ve(e,t),Pc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:l,accessCache:r,type:i,appContext:c}=e;if(t[0]!=="$"){const g=r[t];if(g!==void 0)switch(g){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return l[t]}else{if(ro(n,t))return r[t]=1,n[t];if(o!==ke&&ve(o,t))return r[t]=2,o[t];if(ve(l,t))return r[t]=3,l[t];if(s!==ke&&ve(s,t))return r[t]=4,s[t];To&&(r[t]=0)}}const f=Us[t];let u,d;if(f)return t==="$attrs"&&je(e.attrs,"get",""),f(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(s!==ke&&ve(s,t))return r[t]=4,s[t];if(d=c.config.globalProperties,ve(d,t))return d[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:l}=e;return ro(o,t)?(o[t]=s,!0):n!==ke&&ve(n,t)?(n[t]=s,!0):ve(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:l,type:r}},i){let c;return!!(s[i]||e!==ke&&i[0]!=="$"&&ve(e,i)||ro(t,i)||ve(l,i)||ve(n,i)||ve(Us,i)||ve(o.config.globalProperties,i)||(c=r.__cssModules)&&c[i])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ve(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Al(e){return Q(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let To=!0;function Oc(e){const t=ki(e),s=e.proxy,n=e.ctx;To=!1,t.beforeCreate&&Il(t.beforeCreate,e,"bc");const{data:o,computed:l,methods:r,watch:i,provide:c,inject:f,created:u,beforeMount:d,mounted:g,beforeUpdate:h,updated:C,activated:y,deactivated:L,beforeDestroy:$,beforeUnmount:w,destroyed:p,unmounted:b,render:_,renderTracked:j,renderTriggered:B,errorCaptured:H,serverPrefetch:M,expose:z,inheritAttrs:oe,components:F,directives:Z,filters:R}=t;if(f&&Mc(f,n,null),r)for(const te in r){const re=r[te];le(re)&&(n[te]=re.bind(s))}if(o){const te=o.call(s,s);be(te)&&(e.data=Ht(te))}if(To=!0,l)for(const te in l){const re=l[te],Fe=le(re)?re.bind(s,s):le(re.get)?re.get.bind(s,s):bt,qe=!le(re)&&le(re.set)?re.set.bind(s):bt,at=me({get:Fe,set:qe});Object.defineProperty(n,te,{enumerable:!0,configurable:!0,get:()=>at.value,set:ze=>at.value=ze})}if(i)for(const te in i)yi(i[te],n,s,te);if(c){const te=le(c)?c.call(s):c;Reflect.ownKeys(te).forEach(re=>{Bs(re,te[re])})}u&&Il(u,e,"c");function ce(te,re){Q(re)?re.forEach(Fe=>te(Fe.bind(s))):re&&te(re.bind(s))}if(ce(Sc,d),ce(_t,g),ce(Ec,h),ce(gi,C),ce(kc,y),ce(wc,L),ce(Ic,H),ce(Ac,j),ce($c,B),ce(Fn,w),ce(Ss,b),ce(Tc,M),Q(z))if(z.length){const te=e.exposed||(e.exposed={});z.forEach(re=>{Object.defineProperty(te,re,{get:()=>s[re],set:Fe=>s[re]=Fe,enumerable:!0})})}else e.exposed||(e.exposed={});_&&e.render===bt&&(e.render=_),oe!=null&&(e.inheritAttrs=oe),F&&(e.components=F),Z&&(e.directives=Z),M&&hi(e)}function Mc(e,t,s=bt){Q(e)&&(e=$o(e));for(const n in e){const o=e[n];let l;be(o)?"default"in o?l=Qe(o.from||n,o.default,!0):l=Qe(o.from||n):l=Qe(o),$e(l)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[n]=l}}function Il(e,t,s){nt(Q(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function yi(e,t,s,n){let o=n.includes(".")?ri(s,n):()=>s[n];if(Ce(e)){const l=t[e];le(l)&&Ve(o,l)}else if(le(e))Ve(o,e.bind(s));else if(be(e))if(Q(e))e.forEach(l=>yi(l,t,s,n));else{const l=le(e.handler)?e.handler.bind(s):t[e.handler];le(l)&&Ve(o,l,e)}}function ki(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:l,config:{optionMergeStrategies:r}}=e.appContext,i=l.get(t);let c;return i?c=i:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(f=>xn(c,f,r,!0)),xn(c,t,r)),be(t)&&l.set(t,c),c}function xn(e,t,s,n=!1){const{mixins:o,extends:l}=t;l&&xn(e,l,s,!0),o&&o.forEach(r=>xn(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const i=Lc[r]||s&&s[r];e[r]=i?i(e[r],t[r]):t[r]}return e}const Lc={data:Rl,props:Pl,emits:Pl,methods:Ms,computed:Ms,beforeCreate:Ue,created:Ue,beforeMount:Ue,mounted:Ue,beforeUpdate:Ue,updated:Ue,beforeDestroy:Ue,beforeUnmount:Ue,destroyed:Ue,unmounted:Ue,activated:Ue,deactivated:Ue,errorCaptured:Ue,serverPrefetch:Ue,components:Ms,directives:Ms,watch:Vc,provide:Rl,inject:Nc};function Rl(e,t){return t?e?function(){return Re(le(e)?e.call(this,this):e,le(t)?t.call(this,this):t)}:t:e}function Nc(e,t){return Ms($o(e),$o(t))}function $o(e){if(Q(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ue(e,t){return e?[...new Set([].concat(e,t))]:t}function Ms(e,t){return e?Re(Object.create(null),e,t):t}function Pl(e,t){return e?Q(e)&&Q(t)?[...new Set([...e,...t])]:Re(Object.create(null),Al(e),Al(t??{})):t}function Vc(e,t){if(!e)return t;if(!t)return e;const s=Re(Object.create(null),e);for(const n in t)s[n]=Ue(e[n],t[n]);return s}function wi(){return{app:null,config:{isNativeTag:Sr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let jc=0;function Dc(e,t){return function(n,o=null){le(n)||(n=Re({},n)),o!=null&&!be(o)&&(o=null);const l=wi(),r=new WeakSet,i=[];let c=!1;const f=l.app={_uid:jc++,_component:n,_props:o,_container:null,_context:l,_instance:null,version:mu,get config(){return l.config},set config(u){},use(u,...d){return r.has(u)||(u&&le(u.install)?(r.add(u),u.install(f,...d)):le(u)&&(r.add(u),u(f,...d))),f},mixin(u){return l.mixins.includes(u)||l.mixins.push(u),f},component(u,d){return d?(l.components[u]=d,f):l.components[u]},directive(u,d){return d?(l.directives[u]=d,f):l.directives[u]},mount(u,d,g){if(!c){const h=f._ceVNode||ue(n,o);return h.appContext=l,g===!0?g="svg":g===!1&&(g=void 0),e(h,u,g),c=!0,f._container=u,u.__vue_app__=f,Kn(h.component)}},onUnmount(u){i.push(u)},unmount(){c&&(nt(i,f._instance,16),e(null,f._container),delete f._container.__vue_app__)},provide(u,d){return l.provides[u]=d,f},runWithContext(u){const d=os;os=f;try{return u()}finally{os=d}}};return f}}let os=null;const Bc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ge(t)}Modifiers`]||e[`${is(t)}Modifiers`];function Fc(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ke;let o=s;const l=t.startsWith("update:"),r=l&&Bc(n,t.slice(7));r&&(r.trim&&(o=s.map(u=>Ce(u)?u.trim():u)),r.number&&(o=s.map(Ho)));let i,c=n[i=Xn(t)]||n[i=Xn(Ge(t))];!c&&l&&(c=n[i=Xn(is(t))]),c&&nt(c,e,6,o);const f=n[i+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,nt(f,e,6,o)}}const Uc=new WeakMap;function Ci(e,t,s=!1){const n=s?Uc:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const l=e.emits;let r={},i=!1;if(!le(e)){const c=f=>{const u=Ci(f,t,!0);u&&(i=!0,Re(r,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!l&&!i?(be(e)&&n.set(e,null),null):(Q(l)?l.forEach(c=>r[c]=null):Re(r,l),be(e)&&n.set(e,r),r)}function Hn(e,t){return!e||!Tn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ve(e,t[0].toLowerCase()+t.slice(1))||ve(e,is(t))||ve(e,t))}function Ol(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[l],slots:r,attrs:i,emit:c,render:f,renderCache:u,props:d,data:g,setupState:h,ctx:C,inheritAttrs:y}=e,L=gn(e);let $,w;try{if(s.shapeFlag&4){const b=o||n,_=b;$=gt(f.call(_,b,u,d,h,g,C)),w=i}else{const b=t;$=gt(b.length>1?b(d,{attrs:i,slots:r,emit:c}):b(d,null)),w=t.props?i:Hc(i)}}catch(b){$t.length=0,Vn(b,e,1),$=ue(De)}let p=$;if(w&&y!==!1){const b=Object.keys(w),{shapeFlag:_}=p;b.length&&_&7&&(l&&b.some($n)&&(w=Wc(w,l)),p=Ut(p,w,!1,!0))}if(s.dirs&&(p=Ut(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(s.dirs):s.dirs),s.transition){const b=jn(p.type)&&vn(p)||p;rs(b,s.transition)}return $=p,gn(L),$}const Hc=e=>{let t;for(const s in e)(s==="class"||s==="style"||Tn(s))&&((t||(t={}))[s]=e[s]);return t},Wc=(e,t)=>{const s={};for(const n in e)(!$n(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Kc(e,t,s){const{props:n,children:o,component:l}=e,{props:r,children:i,patchFlag:c}=t,f=l.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Ml(n,r,f):!!r;if(c&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const g=u[d];if(Si(r,n,g)&&!Hn(f,g))return!0}}}else return(o||i)&&(!i||!i.$stable)?!0:n===r?!1:n?r?Ml(n,r,f):!0:!!r;return!1}function Ml(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const l=n[o];if(Si(t,e,l)&&!Hn(s,l))return!0}return!1}function Si(e,t,s){const n=e[s],o=t[s];return s==="style"&&be(n)&&be(o)?!tn(n,o):n!==o}function Gc({vnode:e,parent:t,suspense:s},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=n,e=o),o===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Ei={},Ti=()=>Object.create(Ei),$i=e=>Object.getPrototypeOf(e)===Ei;function qc(e,t,s,n=!1){const o={},l=Ti();e.propsDefaults=Object.create(null),Ai(e,t,o,l);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);s?e.props=n?o:Yr(o):e.type.props?e.props=o:e.props=l,e.attrs=l}function zc(e,t,s,n){const{props:o,attrs:l,vnode:{patchFlag:r}}=e,i=pe(o),[c]=e.propsOptions;let f=!1;if((n||r>0)&&!(r&16)){if(r&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let g=u[d];if(Hn(e.emitsOptions,g))continue;const h=t[g];if(c)if(ve(l,g))h!==l[g]&&(l[g]=h,f=!0);else{const C=Ge(g);o[C]=Ao(c,i,C,h,e,!1)}else h!==l[g]&&(l[g]=h,f=!0)}}}else{Ai(e,t,o,l)&&(f=!0);let u;for(const d in i)(!t||!ve(t,d)&&((u=is(d))===d||!ve(t,u)))&&(c?s&&(s[d]!==void 0||s[u]!==void 0)&&(o[d]=Ao(c,i,d,void 0,e,!0)):delete o[d]);if(l!==i)for(const d in l)(!t||!ve(t,d))&&(delete l[d],f=!0)}f&&St(e.attrs,"set","")}function Ai(e,t,s,n){const[o,l]=e.propsOptions;let r=!1,i;if(t)for(let c in t){if(Vs(c))continue;const f=t[c];let u;o&&ve(o,u=Ge(c))?!l||!l.includes(u)?s[u]=f:(i||(i={}))[u]=f:Hn(e.emitsOptions,c)||(!(c in n)||f!==n[c])&&(n[c]=f,r=!0)}if(l){const c=pe(s),f=i||ke;for(let u=0;u<l.length;u++){const d=l[u];s[d]=Ao(o,c,d,f[d],e,!ve(f,d))}}return r}function Ao(e,t,s,n,o,l){const r=e[s];if(r!=null){const i=ve(r,"default");if(i&&n===void 0){const c=r.default;if(r.type!==Function&&!r.skipFactory&&le(c)){const{propsDefaults:f}=o;if(s in f)n=f[s];else{const u=nn(o);n=f[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}r[0]&&(l&&!i?n=!1:r[1]&&(n===""||n===is(s))&&(n=!0))}return n}const Zc=new WeakMap;function Ii(e,t,s=!1){const n=s?Zc:t.propsCache,o=n.get(e);if(o)return o;const l=e.props,r={},i=[];let c=!1;if(!le(e)){const u=d=>{c=!0;const[g,h]=Ii(d,t,!0);Re(r,g),h&&i.push(...h)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!l&&!c)return be(e)&&n.set(e,vs),vs;if(Q(l))for(let u=0;u<l.length;u++){const d=Ge(l[u]);Ll(d)&&(r[d]=ke)}else if(l)for(const u in l){const d=Ge(u);if(Ll(d)){const g=l[u],h=r[d]=Q(g)||le(g)?{type:g}:Re({},g),C=h.type;let y=!1,L=!0;if(Q(C))for(let $=0;$<C.length;++$){const w=C[$],p=le(w)&&w.name;if(p==="Boolean"){y=!0;break}else p==="String"&&(L=!1)}else y=le(C)&&C.name==="Boolean";h[0]=y,h[1]=L,(y||ve(h,"default"))&&i.push(d)}}const f=[r,i];return be(e)&&n.set(e,f),f}function Ll(e){return e[0]!=="$"&&!Vs(e)}const el=e=>e==="_"||e==="_ctx"||e==="$stable",tl=e=>Q(e)?e.map(gt):[gt(e)],Jc=(e,t,s)=>{if(t._n)return t;const n=Ee((...o)=>tl(t(...o)),s);return n._c=!1,n},Ri=(e,t,s)=>{const n=e._ctx;for(const o in e){if(el(o))continue;const l=e[o];if(le(l))t[o]=Jc(o,l,n);else if(l!=null){const r=tl(l);t[o]=()=>r}}},Pi=(e,t)=>{const s=tl(t);e.slots.default=()=>s},Oi=(e,t,s)=>{for(const n in t)(s||!el(n))&&(e[n]=t[n])},Yc=(e,t,s)=>{const n=e.slots=Ti();if(e.vnode.shapeFlag&32){const o=t._;o?(Oi(n,t,s),s&&Ar(n,"_",o,!0)):Ri(t,n)}else t&&Pi(e,t)},Qc=(e,t,s)=>{const{vnode:n,slots:o}=e;let l=!0,r=ke;if(n.shapeFlag&32){const i=t._;i?s&&i===1?l=!1:Oi(o,t,s):(l=!t.$stable,Ri(t,o)),r=t}else t&&(Pi(e,t),r={default:1});if(l)for(const i in o)!el(i)&&r[i]==null&&delete o[i]},He=nu;function Xc(e){return eu(e)}function eu(e,t){const s=On();s.__VUE__=!0;const{insert:n,remove:o,patchProp:l,createElement:r,createText:i,createComment:c,setText:f,setElementText:u,parentNode:d,nextSibling:g,setScopeId:h=bt,insertStaticContent:C}=e,y=(m,v,x,T=null,I=null,E=null,U=void 0,D=null,V=!!v.dynamicChildren)=>{if(m===v)return;m&&!Xt(m,v)&&(T=A(m),ze(m,I,E,!0),m=null),v.patchFlag===-2&&(V=!1,v.dynamicChildren=null);const{type:P,ref:X,shapeFlag:K}=v;switch(P){case Wn:L(m,v,x,T);break;case De:$(m,v,x,T);break;case ao:m==null&&w(v,x,T,U);break;case ie:F(m,v,x,T,I,E,U,D,V);break;default:K&1?_(m,v,x,T,I,E,U,D,V):K&6?Z(m,v,x,T,I,E,U,D,V):(K&64||K&128)&&P.process(m,v,x,T,I,E,U,D,V,J)}X!=null&&I?Fs(X,m&&m.ref,E,v||m,!v):X==null&&m&&m.ref!=null&&Fs(m.ref,null,E,m,!0)},L=(m,v,x,T)=>{if(m==null)n(v.el=i(v.children),x,T);else{const I=v.el=m.el;v.children!==m.children&&f(I,v.children)}},$=(m,v,x,T)=>{m==null?n(v.el=c(v.children||""),x,T):v.el=m.el},w=(m,v,x,T)=>{[m.el,m.anchor]=C(m.children,v,x,T,m.el,m.anchor)},p=({el:m,anchor:v},x,T)=>{let I;for(;m&&m!==v;)I=g(m),n(m,x,T),m=I;n(v,x,T)},b=({el:m,anchor:v})=>{let x;for(;m&&m!==v;)x=g(m),o(m),m=x;o(v)},_=(m,v,x,T,I,E,U,D,V)=>{if(v.type==="svg"?U="svg":v.type==="math"&&(U="mathml"),m==null)j(v,x,T,I,E,U,D,V);else{const P=m.el&&m.el._isVueCE?m.el:null;try{P&&P._beginPatch(),M(m,v,I,E,U,D,V)}finally{P&&P._endPatch()}}},j=(m,v,x,T,I,E,U,D)=>{let V,P;const{props:X,shapeFlag:K,transition:Y,dirs:ne}=m;if(V=m.el=r(m.type,E,X&&X.is,X),K&8?u(V,m.children):K&16&&H(m.children,V,null,T,I,io(m,E),U,D),ne&&Kt(m,null,T,"created"),B(V,m,m.scopeId,U,T),X){for(const ye in X)ye!=="value"&&!Vs(ye)&&l(V,ye,null,X[ye],E,T);"value"in X&&l(V,"value",null,X.value,E),(P=X.onVnodeBeforeMount)&&dt(P,T,m)}ne&&Kt(m,null,T,"beforeMount");const he=tu(I,Y);he&&Y.beforeEnter(V),n(V,v,x),((P=X&&X.onVnodeMounted)||he||ne)&&He(()=>{P&&dt(P,T,m),he&&Y.enter(V),ne&&Kt(m,null,T,"mounted")},I)},B=(m,v,x,T,I)=>{if(x&&h(m,x),T)for(let E=0;E<T.length;E++)h(m,T[E]);if(I){let E=I.subTree;if(v===E||Ni(E.type)&&(E.ssContent===v||E.ssFallback===v)){const U=I.vnode;B(m,U,U.scopeId,U.slotScopeIds,I.parent)}}},H=(m,v,x,T,I,E,U,D,V=0)=>{for(let P=V;P<m.length;P++){const X=m[P]=D?Ct(m[P]):gt(m[P]);y(null,X,v,x,T,I,E,U,D)}},M=(m,v,x,T,I,E,U)=>{const D=v.el=m.el;let{patchFlag:V,dynamicChildren:P,dirs:X}=v;V|=m.patchFlag&16;const K=m.props||ke,Y=v.props||ke;let ne;if(x&&Gt(x,!1),(ne=Y.onVnodeBeforeUpdate)&&dt(ne,x,v,m),X&&Kt(v,m,x,"beforeUpdate"),x&&Gt(x,!0),P&&(!m.dynamicChildren||m.dynamicChildren.length!==P.length)&&(V=0,U=!1,P=null),(K.innerHTML&&Y.innerHTML==null||K.textContent&&Y.textContent==null)&&u(D,""),P?z(m.dynamicChildren,P,D,x,T,io(v,I),E):U||re(m,v,D,null,x,T,io(v,I),E,!1),V>0){if(V&16)oe(D,K,Y,x,I);else if(V&2&&K.class!==Y.class&&l(D,"class",null,Y.class,I),V&4&&l(D,"style",K.style,Y.style,I),V&8){const he=v.dynamicProps;for(let ye=0;ye<he.length;ye++){const xe=he[ye],Ae=K[xe],Le=Y[xe];(Le!==Ae||xe==="value")&&l(D,xe,Ae,Le,I,x)}}V&1&&m.children!==v.children&&u(D,v.children)}else!U&&P==null&&oe(D,K,Y,x,I);((ne=Y.onVnodeUpdated)||X)&&He(()=>{ne&&dt(ne,x,v,m),X&&Kt(v,m,x,"updated")},T)},z=(m,v,x,T,I,E,U)=>{for(let D=0;D<v.length;D++){const V=m[D],P=v[D],X=V.el&&(V.type===ie||!Xt(V,P)||V.shapeFlag&198)?d(V.el):x;y(V,P,X,null,T,I,E,U,!0)}},oe=(m,v,x,T,I)=>{if(v!==x){if(v!==ke)for(const E in v)!Vs(E)&&!(E in x)&&l(m,E,v[E],null,I,T);for(const E in x){if(Vs(E))continue;const U=x[E],D=v[E];U!==D&&E!=="value"&&l(m,E,D,U,I,T)}"value"in x&&l(m,"value",v.value,x.value,I)}},F=(m,v,x,T,I,E,U,D,V)=>{const P=v.el=m?m.el:i(""),X=v.anchor=m?m.anchor:i("");let{patchFlag:K,dynamicChildren:Y,slotScopeIds:ne}=v;ne&&(D=D?D.concat(ne):ne),m==null?(n(P,x,T),n(X,x,T),H(v.children||[],x,X,I,E,U,D,V)):K>0&&K&64&&Y&&m.dynamicChildren&&m.dynamicChildren.length===Y.length?(z(m.dynamicChildren,Y,x,I,E,U,D),(v.key!=null||I&&v===I.subTree)&&sl(m,v,!0)):re(m,v,x,X,I,E,U,D,V)},Z=(m,v,x,T,I,E,U,D,V)=>{v.slotScopeIds=D,m==null?v.shapeFlag&512?I.ctx.activate(v,x,T,U,V):R(v,x,T,I,E,U,V):ee(m,v,V)},R=(m,v,x,T,I,E,U)=>{const D=m.component=au(m,T,I);if(Dn(m)&&(D.ctx.renderer=J),cu(D,!1,U),D.asyncDep){if(I&&I.registerDep(D,ce,U),!m.el){const V=D.subTree=ue(De);$(null,V,v,x),m.placeholder=V.el}}else ce(D,m,v,x,I,E,U)},ee=(m,v,x)=>{const T=v.component=m.component;if(Kc(m,v,x))if(T.asyncDep&&!T.asyncResolved){te(T,v,x);return}else T.next=v,T.update();else v.el=m.el,T.vnode=v},ce=(m,v,x,T,I,E,U)=>{const D=()=>{if(m.isMounted){let{next:K,bu:Y,u:ne,parent:he,vnode:ye}=m;{const ut=Mi(m);if(ut){K&&(K.el=ye.el,te(m,K,U)),ut.asyncDep.then(()=>{He(()=>{m.isUnmounted||P()},I)});return}}let xe=K,Ae;Gt(m,!1),K?(K.el=ye.el,te(m,K,U)):K=ye,Y&&fn(Y),(Ae=K.props&&K.props.onVnodeBeforeUpdate)&&dt(Ae,he,K,ye),Gt(m,!0);const Le=Ol(m),ct=m.subTree;m.subTree=Le,y(ct,Le,d(ct.el),A(ct),m,I,E),K.el=Le.el,xe===null&&Gc(m,Le.el),ne&&He(ne,I),(Ae=K.props&&K.props.onVnodeUpdated)&&He(()=>dt(Ae,he,K,ye),I)}else{let K;const{el:Y,props:ne}=v,{bm:he,m:ye,parent:xe,root:Ae,type:Le}=m,ct=_s(v);Gt(m,!1),he&&fn(he),!ct&&(K=ne&&ne.onVnodeBeforeMount)&&dt(K,xe,v),Gt(m,!0);{Ae.ce&&Ae.ce._hasShadowRoot()&&Ae.ce._injectChildStyle(Le,m.parent?m.parent.type:void 0);const ut=m.subTree=Ol(m);y(null,ut,x,T,m,I,E),v.el=ut.el}if(ye&&He(ye,I),!ct&&(K=ne&&ne.onVnodeMounted)){const ut=v;He(()=>dt(K,xe,ut),I)}(v.shapeFlag&256||xe&&_s(xe.vnode)&&xe.vnode.shapeFlag&256)&&m.a&&He(m.a,I),m.isMounted=!0,v=x=T=null}};m.scope.on();const V=m.effect=new Vr(D);m.scope.off();const P=m.update=V.run.bind(V),X=m.job=V.runIfDirty.bind(V);X.i=m,X.id=m.uid,V.scheduler=()=>Yo(X),Gt(m,!0),P()},te=(m,v,x)=>{v.component=m;const T=m.vnode.props;m.vnode=v,m.next=null,zc(m,v.props,T,x),Qc(m,v.children,x),At(),wl(m),It()},re=(m,v,x,T,I,E,U,D,V=!1)=>{const P=m&&m.children,X=m?m.shapeFlag:0,K=v.children,{patchFlag:Y,shapeFlag:ne}=v;if(Y>0){if(Y&128){qe(P,K,x,T,I,E,U,D,V);return}else if(Y&256){Fe(P,K,x,T,I,E,U,D,V);return}}ne&8?(X&16&&et(P,I,E),K!==P&&u(x,K)):X&16?ne&16?qe(P,K,x,T,I,E,U,D,V):et(P,I,E,!0):(X&8&&u(x,""),ne&16&&H(K,x,T,I,E,U,D,V))},Fe=(m,v,x,T,I,E,U,D,V)=>{m=m||vs,v=v||vs;const P=m.length,X=v.length,K=Math.min(P,X);let Y;for(Y=0;Y<K;Y++){const ne=v[Y]=V?Ct(v[Y]):gt(v[Y]);y(m[Y],ne,x,null,I,E,U,D,V)}P>X?et(m,I,E,!0,!1,K):H(v,x,T,I,E,U,D,V,K)},qe=(m,v,x,T,I,E,U,D,V)=>{let P=0;const X=v.length;let K=m.length-1,Y=X-1;for(;P<=K&&P<=Y;){const ne=m[P],he=v[P]=V?Ct(v[P]):gt(v[P]);if(Xt(ne,he))y(ne,he,x,null,I,E,U,D,V);else break;P++}for(;P<=K&&P<=Y;){const ne=m[K],he=v[Y]=V?Ct(v[Y]):gt(v[Y]);if(Xt(ne,he))y(ne,he,x,null,I,E,U,D,V);else break;K--,Y--}if(P>K){if(P<=Y){const ne=Y+1,he=ne<X?v[ne].el:T;for(;P<=Y;)y(null,v[P]=V?Ct(v[P]):gt(v[P]),x,he,I,E,U,D,V),P++}}else if(P>Y)for(;P<=K;)ze(m[P],I,E,!0),P++;else{const ne=P,he=P,ye=new Map;for(P=he;P<=Y;P++){const Ze=v[P]=V?Ct(v[P]):gt(v[P]);Ze.key!=null&&ye.set(Ze.key,P)}let xe,Ae=0;const Le=Y-he+1;let ct=!1,ut=0;const Ts=new Array(Le);for(P=0;P<Le;P++)Ts[P]=0;for(P=ne;P<=K;P++){const Ze=m[P];if(Ae>=Le){ze(Ze,I,E,!0);continue}let ft;if(Ze.key!=null)ft=ye.get(Ze.key);else for(xe=he;xe<=Y;xe++)if(Ts[xe-he]===0&&Xt(Ze,v[xe])){ft=xe;break}ft===void 0?ze(Ze,I,E,!0):(Ts[ft-he]=P+1,ft>=ut?ut=ft:ct=!0,y(Ze,v[ft],x,null,I,E,U,D,V),Ae++)}const gl=ct?su(Ts):vs;for(xe=gl.length-1,P=Le-1;P>=0;P--){const Ze=he+P,ft=v[Ze],vl=v[Ze+1],bl=Ze+1<X?vl.el||Li(vl):T;Ts[P]===0?y(null,ft,x,bl,I,E,U,D,V):ct&&(xe<0||P!==gl[xe]?at(ft,x,bl,2):xe--)}}},at=(m,v,x,T,I=null)=>{const{el:E,type:U,transition:D,children:V,shapeFlag:P}=m;if(P&6){at(m.component.subTree,v,x,T);return}if(P&128){m.suspense.move(v,x,T);return}if(P&64){U.move(m,v,x,J);return}if(U===ie){n(E,v,x);for(let K=0;K<V.length;K++)at(V[K],v,x,T);n(m.anchor,v,x);return}if(U===ao){p(m,v,x);return}if(T!==2&&P&1&&D)if(T===0)D.persisted&&!E[st]?n(E,v,x):(D.beforeEnter(E),n(E,v,x),He(()=>D.enter(E),I));else{const{leave:K,delayLeave:Y,afterLeave:ne}=D,he=()=>{m.ctx.isUnmounted?o(E):n(E,v,x)},ye=()=>{const xe=E._isLeaving||!!E[st];E._isLeaving&&E[st](!0),D.persisted&&!xe?he():K(E,()=>{he(),ne&&ne()})};Y?Y(E,he,ye):ye()}else n(E,v,x)},ze=(m,v,x,T=!1,I=!1)=>{const{type:E,props:U,ref:D,children:V,dynamicChildren:P,shapeFlag:X,patchFlag:K,dirs:Y,cacheIndex:ne,memo:he}=m;if(K===-2&&(I=!1),D!=null&&(At(),Fs(D,null,x,m,!0),It()),ne!=null&&(v.renderCache[ne]=void 0),X&256){v.ctx.deactivate(m);return}const ye=X&1&&Y,xe=!_s(m);let Ae;if(xe&&(Ae=U&&U.onVnodeBeforeUnmount)&&dt(Ae,v,m),X&6)Wt(m.component,x,T);else{if(X&128){m.suspense.unmount(x,T);return}ye&&Kt(m,null,v,"beforeUnmount"),X&64?m.type.remove(m,v,x,J,T):P&&!P.hasOnce&&(E!==ie||K>0&&K&64)?et(P,v,x,!1,!0):(E===ie&&K&384||!I&&X&16)&&et(V,v,x),T&&cs(m)}const Le=he!=null&&ne==null;(xe&&(Ae=U&&U.onVnodeUnmounted)||ye||Le)&&He(()=>{Ae&&dt(Ae,v,m),ye&&Kt(m,null,v,"unmounted"),Le&&(m.el=null)},x)},cs=m=>{const{type:v,el:x,anchor:T,transition:I}=m;if(v===ie){us(x,T);return}if(v===ao){b(m);return}const E=()=>{o(x),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(m.shapeFlag&1&&I&&!I.persisted){const{leave:U,delayLeave:D}=I,V=()=>U(x,E);D?D(m.el,E,V):V()}else E()},us=(m,v)=>{let x;for(;m!==v;)x=g(m),o(m),m=x;o(v)},Wt=(m,v,x)=>{const{bum:T,scope:I,job:E,subTree:U,um:D,m:V,a:P}=m;Nl(V),Nl(P),T&&fn(T),I.stop(),E&&(E.flags|=8,ze(U,m,v,x)),D&&He(D,v),He(()=>{m.isUnmounted=!0},v)},et=(m,v,x,T=!1,I=!1,E=0)=>{for(let U=E;U<m.length;U++)ze(m[U],v,x,T,I)},A=m=>{if(m.shapeFlag&6)return A(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const v=g(m.anchor||m.el),x=v&&v[ii];return x?g(x):v};let q=!1;const W=(m,v,x)=>{let T;m==null?v._vnode&&(ze(v._vnode,null,null,!0),T=v._vnode.component):y(v._vnode||null,m,v,null,null,null,x),v._vnode=m,q||(q=!0,wl(T),si(),q=!1)},J={p:y,um:ze,m:at,r:cs,mt:R,mc:H,pc:re,pbc:z,n:A,o:e};return{render:W,hydrate:void 0,createApp:Dc(W)}}function io({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 Gt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function tu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function sl(e,t,s=!1){const n=e.children,o=t.children;if(Q(n)&&Q(o))for(let l=0;l<n.length;l++){const r=n[l];let i=o[l];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=o[l]=Ct(o[l]),i.el=r.el),!s&&i.patchFlag!==-2&&sl(r,i)),i.type===Wn&&(i.patchFlag===-1&&(i=o[l]=Ct(i)),i.el=r.el),i.type===De&&!i.el&&(i.el=r.el)}}function su(e){const t=e.slice(),s=[0];let n,o,l,r,i;const c=e.length;for(n=0;n<c;n++){const f=e[n];if(f!==0){if(o=s[s.length-1],e[o]<f){t[n]=o,s.push(n);continue}for(l=0,r=s.length-1;l<r;)i=l+r>>1,e[s[i]]<f?l=i+1:r=i;f<e[s[l]]&&(l>0&&(t[n]=s[l-1]),s[l]=n)}}for(l=s.length,r=s[l-1];l-- >0;)s[l]=r,r=t[r];return s}function Mi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Mi(t)}function Nl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Li(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Li(t.subTree):null}const Ni=e=>e.__isSuspense;function nu(e,t){t&&t.pendingBranch?Q(e)?t.effects.push(...e):t.effects.push(e):fc(e)}const ie=Symbol.for("v-fgt"),Wn=Symbol.for("v-txt"),De=Symbol.for("v-cmt"),ao=Symbol.for("v-stc"),$t=[];let Je=null;function k(e=!1){$t.push(Je=e?null:[])}function nl(){$t.pop(),Je=$t[$t.length-1]||null}let Zs=1;function _n(e,t=!1){Zs+=e,e<0&&Je&&t&&(Je.hasOnce=!0)}function Vi(e){return e.dynamicChildren=Zs>0?Je||vs:null,nl(),Zs>0&&Je&&Je.push(e),e}function S(e,t,s,n,o,l){return Vi(a(e,t,s,n,o,l,!0))}function Ie(e,t,s,n,o){return Vi(ue(e,t,s,n,o,!0))}function Js(e){return e?e.__v_isVNode===!0:!1}function Xt(e,t){return e.type===t.type&&e.key===t.key}const ji=({key:e})=>e??null,dn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||$e(e)||le(e)?{i:Ne,r:e,k:t,f:!!s}:e:null);function a(e,t=null,s=null,n=0,o=null,l=e===ie?0:1,r=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ji(t),ref:t&&dn(t),scopeId:oi,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:l,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ne};return i?(yn(c,s),l&128&&e.normalize(c)):s&&(c.shapeFlag|=Ce(s)?8:16),Zs>0&&!r&&Je&&(c.patchFlag>0||l&6)&&c.patchFlag!==32&&Je.push(c),c}const ue=ou;function ou(e,t=null,s=null,n=0,o=null,l=!1){if((!e||e===bi)&&(e=De),Js(e)){const i=Ut(e,t,!0);return s&&yn(i,s),Zs>0&&!l&&Je&&(i.shapeFlag&6?Je[Je.indexOf(e)]=i:Je.push(i)),i.patchFlag=-2,i}if(hu(e)&&(e=e.__vccOpts),t){t=lu(t);let{class:i,style:c}=t;i&&!Ce(i)&&(t.class=G(i)),be(c)&&(Nn(c)&&!Q(c)&&(c=Re({},c)),t.style=Mn(c))}const r=Ce(e)?1:Ni(e)?128:jn(e)?64:be(e)?4:le(e)?2:0;return a(e,t,s,n,o,r,l,!0)}function lu(e){return e?Nn(e)||$i(e)?Re({},e):e:null}function Ut(e,t,s=!1,n=!1){const{props:o,ref:l,patchFlag:r,children:i,transition:c}=e,f=t?Di(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&ji(f),ref:t&&t.ref?s&&l?Q(l)?l.concat(dn(t)):[l,dn(t)]:dn(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ie?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ut(e.ssContent),ssFallback:e.ssFallback&&Ut(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&rs(u,c.clone(u)),u}function ae(e=" ",t=0){return ue(Wn,null,e,t)}function fe(e="",t=!1){return t?(k(),Ie(De,null,e)):ue(De,null,e)}function gt(e){return e==null||typeof e=="boolean"?ue(De):Q(e)?ue(ie,null,e.slice()):Js(e)?Ct(e):ue(Wn,null,String(e))}function Ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ut(e)}function yn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(Q(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),yn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!$i(t)?t._ctx=Ne:o===3&&Ne&&(Ne.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(le(t)){if(n&65){yn(e,{default:t});return}t={default:t,_ctx:Ne},s=32}else t=String(t),n&64?(s=16,t=[ae(t)]):s=8;e.children=t,e.shapeFlag|=s}function Di(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=G([t.class,n.class]));else if(o==="style")t.style=Mn([t.style,n.style]);else if(Tn(o)){const l=t[o],r=n[o];r&&l!==r&&!(Q(l)&&l.includes(r))?t[o]=l?[].concat(l,r):r:r==null&&l==null&&!$n(o)&&(t[o]=r)}else o!==""&&(t[o]=n[o])}return t}function dt(e,t,s,n=null){nt(e,t,7,[s,n])}const ru=wi();let iu=0;function au(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||ru,l={uid:iu++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Mr(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ii(n,o),emitsOptions:Ci(n,o),emit:null,emitted:null,propsDefaults:ke,inheritAttrs:n.inheritAttrs,ctx:ke,data:ke,props:ke,attrs:ke,slots:ke,refs:ke,setupState:ke,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=Fc.bind(null,l),e.ce&&e.ce(l),l}let Be=null;const Es=()=>Be||Ne;let kn,Ys;{const e=On(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),l=>{o.length>1?o.forEach(r=>r(l)):o[0](l)}};kn=t("__VUE_INSTANCE_SETTERS__",s=>Be=s),Ys=t("__VUE_SSR_SETTERS__",s=>Qs=s)}const nn=e=>{const t=Be;return kn(e),e.scope.on(),()=>{e.scope.off(),kn(t)}},Vl=()=>{Be&&Be.scope.off(),kn(null)};function Bi(e){return e.vnode.shapeFlag&4}let Qs=!1;function cu(e,t=!1,s=!1){t&&Ys(t);const{props:n,children:o}=e.vnode,l=Bi(e);qc(e,n,l,t),Yc(e,o,s||t);const r=l?uu(e,t):void 0;return t&&Ys(!1),r}function uu(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Pc);const{setup:n}=s;if(n){At();const o=e.setupContext=n.length>1?du(e):null,l=nn(e),r=sn(n,e,0,[e.props,o]),i=Er(r);if(It(),l(),(i||e.sp)&&!_s(e)&&hi(e),i){if(r.then(Vl,Vl),t)return r.then(c=>{Ys(!0);try{jl(e,c,t)}finally{Ys(!1)}}).catch(c=>{Vn(c,e,0)});e.asyncDep=r}else jl(e,r)}else Fi(e)}function jl(e,t,s){le(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=Xr(t)),Fi(e)}function Fi(e,t,s){const n=e.type;e.render||(e.render=n.render||bt);{const o=nn(e);At();try{Oc(e)}finally{It(),o()}}}const fu={get(e,t){return je(e,"get",""),e[t]}};function du(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,fu),slots:e.slots,emit:e.emit,expose:t}}function Kn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Xr(Jo(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Us)return Us[s](e)},has(t,s){return s in t||s in Us}})):e.proxy}function pu(e,t=!0){return le(e)?e.displayName||e.name:e.name||t&&e.__name}function hu(e){return le(e)&&"__vccOpts"in e}const me=(e,t)=>rc(e,t,Qs);function ol(e,t,s){try{_n(-1);const n=arguments.length;return n===2?be(t)&&!Q(t)?Js(t)?ue(e,null,[t]):ue(e,t):ue(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&Js(s)&&(s=[s]),ue(e,t,s))}finally{_n(1)}}const mu="3.5.41";let Io;const Dl=typeof window<"u"&&window.trustedTypes;if(Dl)try{Io=Dl.createPolicy("vue",{createHTML:e=>e})}catch{}const Ui=Io?e=>Io.createHTML(e):e=>e,gu="http://www.w3.org/2000/svg",vu="http://www.w3.org/1998/Math/MathML",wt=typeof document<"u"?document:null,Bl=wt&&wt.createElement("template"),bu={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?wt.createElementNS(gu,e):t==="mathml"?wt.createElementNS(vu,e):s?wt.createElement(e,{is:s}):wt.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>wt.createTextNode(e),createComment:e=>wt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,l){const r=s?s.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===l||!(o=o.nextSibling)););else{Bl.innerHTML=Ui(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const i=Bl.content;if(n==="svg"||n==="mathml"){const c=i.firstChild;for(;c.firstChild;)i.appendChild(c.firstChild);i.removeChild(c)}t.insertBefore(i,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Mt="transition",Is="animation",ks=Symbol("_vtc"),Hi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Wi=Re({},ci,Hi),xu=e=>(e.displayName="Transition",e.props=Wi,e),wn=xu((e,{slots:t})=>ol(_c,Ki(e),t)),qt=(e,t=[])=>{Q(e)?e.forEach(s=>s(...t)):e&&e(...t)},Fl=e=>e?Q(e)?e.some(t=>t.length>1):e.length>1:!1;function Ki(e){const t={};for(const F in e)F in Hi||(t[F]=e[F]);if(e.css===!1)return t;const{name:s="v",type:n,duration:o,enterFromClass:l=`${s}-enter-from`,enterActiveClass:r=`${s}-enter-active`,enterToClass:i=`${s}-enter-to`,appearFromClass:c=l,appearActiveClass:f=r,appearToClass:u=i,leaveFromClass:d=`${s}-leave-from`,leaveActiveClass:g=`${s}-leave-active`,leaveToClass:h=`${s}-leave-to`}=e,C=_u(o),y=C&&C[0],L=C&&C[1],{onBeforeEnter:$,onEnter:w,onEnterCancelled:p,onLeave:b,onLeaveCancelled:_,onBeforeAppear:j=$,onAppear:B=w,onAppearCancelled:H=p}=t,M=(F,Z,R,ee)=>{F._enterCancelled=ee,jt(F,Z?u:i),jt(F,Z?f:r),R&&R()},z=(F,Z)=>{F._isLeaving=!1,jt(F,d),jt(F,h),jt(F,g),Z&&Z()},oe=F=>(Z,R)=>{const ee=F?B:w,ce=()=>M(Z,F,R);qt(ee,[Z,ce]),Ul(()=>{jt(Z,F?c:l),pt(Z,F?u:i),Fl(ee)||Hl(Z,n,y,ce)})};return Re(t,{onBeforeEnter(F){qt($,[F]),pt(F,l),pt(F,r)},onBeforeAppear(F){qt(j,[F]),pt(F,c),pt(F,f)},onEnter:oe(!1),onAppear:oe(!0),onLeave(F,Z){F._isLeaving=!0;const R=()=>z(F,Z);pt(F,d),F._enterCancelled?(pt(F,g),Ro(F)):(Ro(F),pt(F,g)),Ul(()=>{F._isLeaving&&(jt(F,d),pt(F,h),Fl(b)||Hl(F,n,L,R))}),qt(b,[F,R])},onEnterCancelled(F){M(F,!1,void 0,!0),qt(p,[F])},onAppearCancelled(F){M(F,!0,void 0,!0),qt(H,[F])},onLeaveCancelled(F){z(F),qt(_,[F])}})}function _u(e){if(e==null)return null;if(be(e))return[co(e.enter),co(e.leave)];{const t=co(e);return[t,t]}}function co(e){return Ea(e)}function pt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.add(s)),(e[ks]||(e[ks]=new Set)).add(t)}function jt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const s=e[ks];s&&(s.delete(t),s.size||(e[ks]=void 0))}function Ul(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let yu=0;function Hl(e,t,s,n){const o=e._endId=++yu,l=()=>{o===e._endId&&n()};if(s!=null)return setTimeout(l,s);const{type:r,timeout:i,propCount:c}=Gi(e,t);if(!r)return n();const f=r+"end";let u=0;const d=()=>{e.removeEventListener(f,g),l()},g=h=>{h.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},i+1),e.addEventListener(f,g)}function Gi(e,t){const s=window.getComputedStyle(e),n=C=>(s[C]||"").split(", "),o=n(`${Mt}Delay`),l=n(`${Mt}Duration`),r=Wl(o,l),i=n(`${Is}Delay`),c=n(`${Is}Duration`),f=Wl(i,c);let u=null,d=0,g=0;t===Mt?r>0&&(u=Mt,d=r,g=l.length):t===Is?f>0&&(u=Is,d=f,g=c.length):(d=Math.max(r,f),u=d>0?r>f?Mt:Is:null,g=u?u===Mt?l.length:c.length:0);const h=u===Mt&&/\b(?:transform|all)(?:,|$)/.test(n(`${Mt}Property`).toString());return{type:u,timeout:d,propCount:g,hasTransform:h}}function Wl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((s,n)=>Kl(s)+Kl(e[n])))}function Kl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ro(e){return(e?e.ownerDocument:document).body.offsetHeight}function ku(e,t,s){const n=e[ks];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Cn=Symbol("_vod"),ll=Symbol("_vsh"),Gl={name:"show",beforeMount(e,{value:t},{transition:s}){e[Cn]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Rs(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Rs(e,!0),n.enter(e)):n.leave(e,()=>{Rs(e,!1)}):Rs(e,t))},beforeUnmount(e,{value:t}){Rs(e,t)}};function Rs(e,t){e.style.display=t?e[Cn]:"none",e[ll]=!t}const wu=Symbol(""),Cu=/(?:^|;)\s*display\s*:/;function Su(e,t,s){const n=e.style,o=Ce(s);let l=!1;if(s&&!o){if(t)if(Ce(t))for(const r of t.split(";")){const i=r.slice(0,r.indexOf(":")).trim();s[i]==null&&Ls(n,i,"")}else for(const r in t)s[r]==null&&Ls(n,r,"");for(const r in s){r==="display"&&(l=!0);const i=s[r];i!=null?Tu(e,r,!Ce(t)&&t?t[r]:void 0,i)||Ls(n,r,i):Ls(n,r,"")}}else if(o){if(t!==s){const r=n[wu];r&&(s+=";"+r),n.cssText=s,l=Cu.test(s)}}else t&&e.removeAttribute("style");Cn in e&&(e[Cn]=l?n.display:"",e[ll]&&(n.display="none"))}const ql=/\s*!important$/;function Ls(e,t,s){if(Q(s))s.forEach(n=>Ls(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Eu(e,t);ql.test(s)?e.setProperty(is(n),s.replace(ql,""),"important"):e[n]=s}}const zl=["Webkit","Moz","ms"],uo={};function Eu(e,t){const s=uo[t];if(s)return s;let n=Ge(t);if(n!=="filter"&&n in e)return uo[t]=n;n=Pn(n);for(let o=0;o<zl.length;o++){const l=zl[o]+n;if(l in e)return uo[t]=l}return t}function Tu(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ce(n)&&s===n}const Zl="http://www.w3.org/1999/xlink";function Jl(e,t,s,n,o,l=Pa(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Zl,t.slice(6,t.length)):e.setAttributeNS(Zl,t,s):s==null||l&&!Ir(s)?e.removeAttribute(t):e.setAttribute(t,l?"":Xe(s)?String(s):s)}function Yl(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Ui(s):s);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const i=l==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(i!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let r=!1;if(s===""||s==null){const i=typeof e[t];i==="boolean"?s=Ir(s):s==null&&i==="string"?(s="",r=!0):i==="number"&&(s=0,r=!0)}try{e[t]=s}catch{}r&&e.removeAttribute(o||t)}function es(e,t,s,n){e.addEventListener(t,s,n)}function $u(e,t,s,n){e.removeEventListener(t,s,n)}const Ql=Symbol("_vei");function Au(e,t,s,n,o=null){const l=e[Ql]||(e[Ql]={}),r=l[t];if(n&&r)r.value=n;else{const[i,c]=Pu(t);if(n){const f=l[t]=Lu(n,o);es(e,i,f,c)}else r&&($u(e,i,r,c),l[t]=void 0)}}const Iu=/(Once|Passive|Capture)$/,Ru=/^on:?(?:Once|Passive|Capture)$/;function Pu(e){let t,s;for(;(s=e.match(Iu))&&!Ru.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):is(e.slice(2)),t]}let fo=0;const Ou=Promise.resolve(),Mu=()=>fo||(Ou.then(()=>fo=0),fo=Date.now());function Lu(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const o=s.value;if(Q(o)){const l=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{l.call(n),n._stopped=!0};const r=o.slice(),i=[n];for(let c=0;c<r.length&&!n._stopped;c++){const f=r[c];f&&nt(f,t,5,i)}}else nt(o,t,5,[n])};return s.value=e,s.attached=Mu(),s}const Xl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Nu=(e,t,s,n,o,l)=>{const r=o==="svg";t==="class"?ku(e,n,r):t==="style"?Su(e,s,n):Tn(t)?$n(t)||Au(e,t,s,n,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Vu(e,t,n,r))?(Yl(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Jl(e,t,n,r,l,t!=="value")):e._isVueCE&&(ju(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ce(n)))?Yl(e,Ge(t),n,l,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Jl(e,t,n,r))};function Vu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Xl(t)&&le(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Xl(t)&&Ce(s)?!1:t in e}function ju(e,t){const s=e._def.props;if(!s)return!1;const n=Ge(t);return Array.isArray(s)?s.some(o=>Ge(o)===n):Object.keys(s).some(o=>Ge(o)===n)}const qi=new WeakMap,zi=new WeakMap,Sn=Symbol("_moveCb"),er=Symbol("_enterCb"),Du=e=>(delete e.props.mode,e),Bu=Du({name:"TransitionGroup",props:Re({},Wi,{tag:String,moveClass:String}),setup(e,{slots:t}){const s=Es(),n=ai();let o,l;return gi(()=>{if(!o.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!Wu(o[0].el,s.vnode.el,r)){o=[];return}o.forEach(Fu),o.forEach(Uu);const i=o.filter(Hu);Ro(s.vnode.el),i.forEach(c=>{const f=c.el,u=f.style;pt(f,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=f[Sn]=g=>{g&&g.target!==f||(!g||g.propertyName.endsWith("transform"))&&(f.removeEventListener("transitionend",d),f[Sn]=null,jt(f,r))};f.addEventListener("transitionend",d)}),o=[]}),()=>{const r=pe(e),i=Ki(r);let c=r.tag||ie;if(o=[],l)for(let f=0;f<l.length;f++){const u=l[f];u.el&&u.el instanceof Element&&!u.el[ll]&&(o.push(u),rs(u,zs(u,i,n,s)),qi.set(u,Zi(u.el)))}l=t.default?Xo(t.default()):[];for(let f=0;f<l.length;f++){const u=l[f];u.key!=null&&rs(u,zs(u,i,n,s))}return ue(c,null,l)}}}),rl=Bu;function Fu(e){const t=e.el;t[Sn]&&t[Sn](),t[er]&&t[er]()}function Uu(e){zi.set(e,Zi(e.el))}function Hu(e){const t=qi.get(e),s=zi.get(e),n=t.left-s.left,o=t.top-s.top;if(n||o){const l=e.el,r=l.style,i=l.getBoundingClientRect();let c=1,f=1;return l.offsetWidth&&(c=i.width/l.offsetWidth),l.offsetHeight&&(f=i.height/l.offsetHeight),(!Number.isFinite(c)||c===0)&&(c=1),(!Number.isFinite(f)||f===0)&&(f=1),Math.abs(c-1)<.01&&(c=1),Math.abs(f-1)<.01&&(f=1),r.transform=r.webkitTransform=`translate(${n/c}px,${o/f}px)`,r.transitionDuration="0s",e}}function Zi(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Wu(e,t,s){const n=e.cloneNode(),o=e[ks];o&&o.forEach(i=>{i.split(/\s+/).forEach(c=>c&&n.classList.remove(c))}),s.split(/\s+/).forEach(i=>i&&n.classList.add(i)),n.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(n);const{hasTransform:r}=Gi(n);return l.removeChild(n),r}const En=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Q(t)?s=>fn(t,s):t};function Ku(e){e.target.composing=!0}function tr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ts=Symbol("_assign"),un=Symbol("_initialValue");function po(e,t,s){return t&&(e=e.trim()),s&&(e=Ho(e)),e}const Oe={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e.parentNode&&(e.type==="text"?e[un]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[un]=e.defaultValue.replace(/\r\n?/g,`
`))),e[ts]=En(o);const l=n||o.props&&o.props.type==="number";es(e,t?"change":"input",r=>{r.target.composing||e[ts](po(e.value,s,l))}),(s||l)&&es(e,"change",()=>{e.value=po(e.value,s,l)}),t||(es(e,"compositionstart",Ku),es(e,"compositionend",tr),es(e,"change",tr))},mounted(e,{value:t,modifiers:{trim:s,number:n}}){const o=t??"",l=e[un];delete e[un],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[ts](po(e.value,s,n)):e.value=o},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:l}},r){if(e[ts]=En(r),e.composing)return;const i=(l||e.type==="number")&&!/^0\d/.test(e.value)?Ho(e.value):e.value,c=t??"";if(i===c)return;const f=e.getRootNode();(f instanceof Document||f instanceof ShadowRoot)&&f.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},zt={deep:!0,created(e,t,s){e[ts]=En(s),es(e,"change",()=>{const n=e._modelValue,o=Gu(e),l=e.checked,r=e[ts];if(Q(n)){const i=Rr(n,o),c=i!==-1;if(l&&!c)r(n.concat(o));else if(!l&&c){const f=[...n];f.splice(i,1),r(f)}}else if(An(n)){const i=new Set(n);l?i.add(o):i.delete(o),r(i)}else r(Ji(e,l))})},mounted:sr,beforeUpdate(e,t,s){e[ts]=En(s),sr(e,t,s)}};function sr(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(Q(t))o=Rr(t,n.props.value)>-1;else if(An(t))o=t.has(n.props.value);else{if(t===s)return;o=tn(t,Ji(e,!0))}e.checked!==o&&(e.checked=o)}function Gu(e){return"_value"in e?e._value:e.value}function Ji(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const qu=["ctrl","shift","alt","meta"],zu={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)=>qu.some(s=>e[`${s}Key`]&&!t.includes(s))},ls=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...l)=>{for(let r=0;r<t.length;r++){const i=zu[t[r]];if(i&&i(o,t))return}return e(o,...l)}))},Zu=Re({patchProp:Nu},bu);let nr;function Ju(){return nr||(nr=Xc(Zu))}const Yu=((...e)=>{const t=Ju().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Xu(n);if(!o)return;const l=t._component;!le(l)&&!l.render&&!l.template&&(l.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=s(o,!1,Qu(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t});function Qu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Xu(e){return Ce(e)?document.querySelector(e):e}let Yi;const Gn=e=>Yi=e,Qi=Symbol();function Po(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Hs;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Hs||(Hs={}));function ef(){const e=Lr(!0),t=e.run(()=>se({}));let s=[],n=[];const o=Jo({install(l){Gn(o),o._a=l,l.provide(Qi,o),l.config.globalProperties.$pinia=o,n.forEach(r=>s.push(r)),n=[]},use(l){return this._a?s.push(l):n.push(l),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return o}const Xi=()=>{};function or(e,t,s,n=Xi){e.add(t);const o=()=>{e.delete(t)&&n()};return!s&&Nr()&&Ma(o),o}function ds(e,...t){e.forEach(s=>{s(...t)})}const tf=e=>e(),lr=Symbol(),ho=Symbol();function Oo(e,t){e instanceof Map&&t instanceof Map?t.forEach((s,n)=>e.set(n,s)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const s in t){if(!t.hasOwnProperty(s))continue;const n=t[s],o=e[s];Po(o)&&Po(n)&&e.hasOwnProperty(s)&&!$e(n)&&!Tt(n)?e[s]=Oo(o,n):e[s]=n}return e}const sf=Symbol();function nf(e){return!Po(e)||!Object.prototype.hasOwnProperty.call(e,sf)}const{assign:Dt}=Object;function of(e){return!!($e(e)&&e.effect)}function lf(e,t,s,n){const{state:o,actions:l,getters:r}=t,i=s.state.value[e];let c;function f(){i||(s.state.value[e]=o?o():{});const u=sc(s.state.value[e]);return Dt(u,l,Object.keys(r||{}).reduce((d,g)=>(d[g]=Jo(me(()=>{Gn(s);const h=s._s.get(e);return r[g].call(h,h)})),d),{}))}return c=ea(e,f,t,s,n,!0),c}function ea(e,t,s={},n,o,l){let r;const i=Dt({actions:{}},s),c={deep:!0};let f,u,d=new Set,g=new Set,h;const C=n.state.value[e];!l&&!C&&(n.state.value[e]={});let y;function L(H){let M;f=u=!1,typeof H=="function"?(H(n.state.value[e]),M={type:Hs.patchFunction,storeId:e,events:h}):(Oo(n.state.value[e],H),M={type:Hs.patchObject,payload:H,storeId:e,events:h});const z=y=Symbol();xt().then(()=>{y===z&&(f=!0)}),u=!0,ds(d,M,n.state.value[e])}const $=l?function(){const{state:M}=s,z=M?M():{};this.$patch(oe=>{Dt(oe,z)})}:Xi;function w(){r.stop(),d.clear(),g.clear(),n._s.delete(e)}const p=(H,M="")=>{if(lr in H)return H[ho]=M,H;const z=function(){Gn(n);const oe=Array.from(arguments),F=new Set,Z=new Set;function R(te){F.add(te)}function ee(te){Z.add(te)}ds(g,{args:oe,name:z[ho],store:_,after:R,onError:ee});let ce;try{ce=H.apply(this&&this.$id===e?this:_,oe)}catch(te){throw ds(Z,te),te}return ce instanceof Promise?ce.then(te=>(ds(F,te),te)).catch(te=>(ds(Z,te),Promise.reject(te))):(ds(F,ce),ce)};return z[lr]=!0,z[ho]=M,z},b={_p:n,$id:e,$onAction:or.bind(null,g),$patch:L,$reset:$,$subscribe(H,M={}){const z=or(d,H,M.detached,()=>oe()),oe=r.run(()=>Ve(()=>n.state.value[e],F=>{(M.flush==="sync"?u:f)&&H({storeId:e,type:Hs.direct,events:h},F)},Dt({},c,M)));return z},$dispose:w},_=Ht(b);n._s.set(e,_);const B=(n._a&&n._a.runWithContext||tf)(()=>n._e.run(()=>(r=Lr()).run(()=>t({action:p}))));for(const H in B){const M=B[H];if($e(M)&&!of(M)||Tt(M))l||(C&&nf(M)&&($e(M)?M.value=C[H]:Oo(M,C[H])),n.state.value[e][H]=M);else if(typeof M=="function"){const z=p(M,H);B[H]=z,i.actions[H]=M}}return Dt(_,B),Dt(pe(_),B),Object.defineProperty(_,"$state",{get:()=>n.state.value[e],set:H=>{L(M=>{Dt(M,H)})}}),n._p.forEach(H=>{Dt(_,r.run(()=>H({store:_,app:n._a,pinia:n,options:i})))}),C&&l&&s.hydrate&&s.hydrate(_.$state,C),f=!0,u=!0,_}function il(e,t,s){let n;const o=typeof t=="function";n=o?s:t;function l(r,i){const c=dc();return r=r||(c?Qe(Qi,null):null),r&&Gn(r),r=Yi,r._s.has(e)||(o?ea(e,t,n,r):lf(e,n,r)),r._s.get(e)}return l.$id=e,l}const gs=typeof document<"u";function ta(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function rf(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&ta(e.default)}const ge=Object.assign;function mo(e,t){const s={};for(const n in t){const o=t[n];s[n]=it(o)?o.map(e):e(o)}return s}const Ws=()=>{},it=Array.isArray;function rr(e,t){const s={};for(const n in e)s[n]=n in t?t[n]:e[n];return s}const sa=/#/g,af=/&/g,cf=/\//g,uf=/=/g,ff=/\?/g,na=/\+/g,df=/%5B/g,pf=/%5D/g,oa=/%5E/g,hf=/%60/g,la=/%7B/g,mf=/%7C/g,ra=/%7D/g,gf=/%20/g;function al(e){return e==null?"":encodeURI(""+e).replace(mf,"|").replace(df,"[").replace(pf,"]")}function vf(e){return al(e).replace(la,"{").replace(ra,"}").replace(oa,"^")}function Mo(e){return al(e).replace(na,"%2B").replace(gf,"+").replace(sa,"%23").replace(af,"%26").replace(hf,"`").replace(la,"{").replace(ra,"}").replace(oa,"^")}function bf(e){return Mo(e).replace(uf,"%3D")}function xf(e){return al(e).replace(sa,"%23").replace(ff,"%3F")}function _f(e){return xf(e).replace(cf,"%2F")}function Xs(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const yf=/\/$/,kf=e=>e.replace(yf,"");function go(e,t,s="/"){let n,o={},l="",r="";const i=t.indexOf("#");let c=t.indexOf("?");return c=i>=0&&c>i?-1:c,c>=0&&(n=t.slice(0,c),l=t.slice(c,i>0?i:t.length),o=e(l.slice(1))),i>=0&&(n=n||t.slice(0,i),r=t.slice(i,t.length)),n=Ef(n??t,s),{fullPath:n+l+r,path:n,query:o,hash:Xs(r)}}function wf(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function ir(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Cf(e,t,s){const n=t.matched.length-1,o=s.matched.length-1;return n>-1&&n===o&&ws(t.matched[n],s.matched[o])&&ia(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function ws(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ia(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var s in e)if(!Sf(e[s],t[s]))return!1;return!0}function Sf(e,t){return it(e)?ar(e,t):it(t)?ar(t,e):e?.valueOf()===t?.valueOf()}function ar(e,t){return it(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function Ef(e,t){if(e.startsWith("/"))return e;if(!e)return t;const s=t.split("/"),n=e.split("/"),o=n[n.length-1];(o===".."||o===".")&&n.push("");let l=s.length-1,r,i;for(r=0;r<n.length;r++)if(i=n[r],i!==".")if(i==="..")l>1&&l--;else break;return s.slice(0,l).join("/")+"/"+n.slice(r).join("/")}const Lt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Lo=(function(e){return e.pop="pop",e.push="push",e})({}),vo=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Tf(e){if(!e)if(gs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),kf(e)}const $f=/^[^#]+#/;function Af(e,t){return e.replace($f,"#")+t}function If(e,t){const s=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-s.left-(t.left||0),top:n.top-s.top-(t.top||0)}}const qn=()=>({left:window.scrollX,top:window.scrollY});function Rf(e){let t;if("el"in e){const s=e.el,n=typeof s=="string"&&s.startsWith("#"),o=typeof s=="string"?n?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!o)return;t=If(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function cr(e,t){return(history.state?history.state.position-t:-1)+e}const No=new Map;function Pf(e,t){No.set(e,t)}function Of(e){const t=No.get(e);return No.delete(e),t}function Mf(e){return typeof e=="string"||e&&typeof e=="object"}function aa(e){return typeof e=="string"||typeof e=="symbol"}let Se=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const ca=Symbol("");Se.MATCHER_NOT_FOUND+"",Se.NAVIGATION_GUARD_REDIRECT+"",Se.NAVIGATION_ABORTED+"",Se.NAVIGATION_CANCELLED+"",Se.NAVIGATION_DUPLICATED+"";function Cs(e,t){return ge(new Error,{type:e,[ca]:!0},t)}function kt(e,t){return e instanceof Error&&ca in e&&(t==null||!!(e.type&t))}const Lf=["params","query","hash"];function Nf(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const s of Lf)s in e&&(t[s]=e[s]);return JSON.stringify(t,null,2)}function Vf(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;n<s.length;++n){const o=s[n].replace(na," "),l=o.indexOf("="),r=Xs(l<0?o:o.slice(0,l)),i=l<0?null:Xs(o.slice(l+1));if(r in t){let c=t[r];it(c)||(c=t[r]=[c]),c.push(i)}else t[r]=i}return t}function ur(e){let t="";for(let s in e){const n=e[s];if(s=bf(s),n==null){n!==void 0&&(t+=(t.length?"&":"")+s);continue}(it(n)?n.map(o=>o&&Mo(o)):[n&&Mo(n)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+s,o!=null&&(t+="="+o))})}return t}function jf(e){const t={};for(const s in e){const n=e[s];n!==void 0&&(t[s]=it(n)?n.map(o=>o==null?null:""+o):n==null?n:""+n)}return t}const Df=Symbol(""),fr=Symbol(""),zn=Symbol(""),cl=Symbol(""),Vo=Symbol("");function Ps(){let e=[];function t(n){return e.push(n),()=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Ft(e,t,s,n,o,l=r=>r()){const r=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise((i,c)=>{const f=g=>{g===!1?c(Cs(Se.NAVIGATION_ABORTED,{from:s,to:t})):g instanceof Error?c(g):Mf(g)?c(Cs(Se.NAVIGATION_GUARD_REDIRECT,{from:t,to:g})):(r&&n.enterCallbacks[o]===r&&typeof g=="function"&&r.push(g),i())},u=l(()=>e.call(n&&n.instances[o],t,s,f));let d=Promise.resolve(u);e.length<3&&(d=d.then(f)),d.catch(g=>c(g))})}function bo(e,t,s,n,o=l=>l()){const l=[];for(const r of e)for(const i in r.components){let c=r.components[i];if(!(t!=="beforeRouteEnter"&&!r.instances[i]))if(ta(c)){const f=(c.__vccOpts||c)[t];f&&l.push(Ft(f,s,n,r,i,o))}else{let f=c();l.push(()=>f.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${i}" at "${r.path}"`);const d=rf(u)?u.default:u;r.mods[i]=u,r.components[i]=d;const g=(d.__vccOpts||d)[t];return g&&Ft(g,s,n,r,i,o)()}))}}return l}function Bf(e,t){const s=[],n=[],o=[],l=Math.max(t.matched.length,e.matched.length);for(let r=0;r<l;r++){const i=t.matched[r];i&&(e.matched.find(f=>ws(f,i))?n.push(i):s.push(i));const c=e.matched[r];c&&(t.matched.find(f=>ws(f,c))||o.push(c))}return[s,n,o]}let Ff=()=>location.protocol+"//"+location.host;function ua(e,t){const{pathname:s,search:n,hash:o}=t,l=e.indexOf("#");if(l>-1){let r=o.includes(e.slice(l))?e.slice(l).length:1,i=o.slice(r);return i[0]!=="/"&&(i="/"+i),ir(i,"")}return ir(s,e)+n+o}function Uf(e,t,s,n){let o=[],l=[],r=null;const i=({state:g})=>{const h=ua(e,location),C=s.value,y=t.value;let L=0;if(g){if(s.value=h,t.value=g,r&&r===C){r=null;return}L=y?g.position-y.position:0}else n(h);o.forEach($=>{$(s.value,C,{delta:L,type:Lo.pop,direction:L?L>0?vo.forward:vo.back:vo.unknown})})};function c(){r=s.value}function f(g){o.push(g);const h=()=>{const C=o.indexOf(g);C>-1&&o.splice(C,1)};return l.push(h),h}function u(){if(document.visibilityState==="hidden"){const{history:g}=window;if(!g.state)return;g.replaceState(ge({},g.state,{scroll:qn()}),"")}}function d(){for(const g of l)g();l=[],window.removeEventListener("popstate",i),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",i),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:c,listen:f,destroy:d}}function dr(e,t,s,n=!1,o=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:o?qn():null}}function Hf(e){const{history:t,location:s}=window,n={value:ua(e,s)},o={value:t.state};o.value||l(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(c,f,u){const d=e.indexOf("#"),g=d>-1?(s.host&&document.querySelector("base")?e:e.slice(d))+c:Ff()+e+c;try{t[u?"replaceState":"pushState"](f,"",g),o.value=f}catch(h){console.error(h),s[u?"replace":"assign"](g)}}function r(c,f){l(c,ge({},t.state,dr(o.value.back,c,o.value.forward,!0),f,{position:o.value.position}),!0),n.value=c}function i(c,f){const u=ge({},o.value,t.state,{forward:c,scroll:qn()});l(u.current,u,!0),l(c,ge({},dr(n.value,c,null),{position:u.position+1},f),!1),n.value=c}return{location:n,state:o,push:i,replace:r}}function Wf(e){e=Tf(e);const t=Hf(e),s=Uf(e,t.state,t.location,t.replace);function n(l,r=!0){r||s.pauseListeners(),history.go(l)}const o=ge({location:"",base:e,go:n,createHref:Af.bind(null,e)},t,s);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Kf(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Wf(e)}let ss=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var Pe=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Pe||{});const Gf={type:ss.Static,value:""},qf=/[a-zA-Z0-9_]/;function zf(e){if(!e)return[[]];if(e==="/")return[[Gf]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${s})/"${f}": ${h}`)}let s=Pe.Static,n=s;const o=[];let l;function r(){l&&o.push(l),l=[]}let i=0,c,f="",u="";function d(){f&&(s===Pe.Static?l.push({type:ss.Static,value:f}):s===Pe.Param||s===Pe.ParamRegExp||s===Pe.ParamRegExpEnd?(l.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${f}) must be alone in its segment. eg: '/:ids+.`),l.push({type:ss.Param,value:f,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),f="")}function g(){f+=c}for(;i<e.length;){if(c=e[i++],c==="\\"&&s!==Pe.ParamRegExp){n=s,s=Pe.EscapeNext;continue}switch(s){case Pe.Static:c==="/"?(f&&d(),r()):c===":"?(d(),s=Pe.Param):g();break;case Pe.EscapeNext:g(),s=n;break;case Pe.Param:c==="("?s=Pe.ParamRegExp:qf.test(c)?g():(d(),s=Pe.Static,c!=="*"&&c!=="?"&&c!=="+"&&i--);break;case Pe.ParamRegExp:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:s=Pe.ParamRegExpEnd:u+=c;break;case Pe.ParamRegExpEnd:d(),s=Pe.Static,c!=="*"&&c!=="?"&&c!=="+"&&i--,u="";break;default:t("Unknown state");break}}return s===Pe.ParamRegExp&&t(`Unfinished custom RegExp for param "${f}"`),d(),r(),o}const pr="[^/]+?",Zf={sensitive:!1,strict:!1,start:!0,end:!0};var We=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(We||{});const Jf=/[.+*?^${}()[\]/\\]/g;function Yf(e,t){const s=ge({},Zf,t),n=[];let o=s.start?"^":"";const l=[];for(const f of e){const u=f.length?[]:[We.Root];s.strict&&!f.length&&(o+="/");for(let d=0;d<f.length;d++){const g=f[d];let h=We.Segment+(s.sensitive?We.BonusCaseSensitive:0);if(g.type===ss.Static)d||(o+="/"),o+=g.value.replace(Jf,"\\$&"),h+=We.Static;else if(g.type===ss.Param){const{value:C,repeatable:y,optional:L,regexp:$}=g;l.push({name:C,repeatable:y,optional:L});const w=$||pr;if(w!==pr){h+=We.BonusCustomRegExp;try{`${w}`}catch(b){throw new Error(`Invalid custom RegExp for param "${C}" (${w}): `+b.message)}}let p=y?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;d||(p=L&&f.length<2?`(?:/${p})`:"/"+p),L&&(p+="?"),o+=p,h+=We.Dynamic,L&&(h+=We.BonusOptional),y&&(h+=We.BonusRepeatable),w===".*"&&(h+=We.BonusWildcard)}u.push(h)}n.push(u)}if(s.strict&&s.end){const f=n.length-1;n[f][n[f].length-1]+=We.BonusStrict}s.strict||(o+="/?"),s.end?o+="$":s.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const r=new RegExp(o,s.sensitive?"":"i");function i(f){const u=f.match(r),d={};if(!u)return null;for(let g=1;g<u.length;g++){const h=u[g]||"",C=l[g-1];d[C.name]=h&&C.repeatable?h.split("/"):h}return d}function c(f){let u="",d=!1;for(const g of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const h of g)if(h.type===ss.Static)u+=h.value;else if(h.type===ss.Param){const{value:C,repeatable:y,optional:L}=h,$=C in f?f[C]:"";if(it($)&&!y)throw new Error(`Provided param "${C}" is an array but it is not repeatable (* or + modifiers)`);const w=it($)?$.join("/"):$;if(!w)if(L)g.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${C}"`);u+=w}}return u||"/"}return{re:r,score:n,keys:l,parse:i,stringify:c}}function Qf(e,t){let s=0;for(;s<e.length&&s<t.length;){const n=t[s]-e[s];if(n)return n;s++}return e.length<t.length?e.length===1&&e[0]===We.Static+We.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===We.Static+We.Segment?1:-1:0}function fa(e,t){let s=0;const n=e.score,o=t.score;for(;s<n.length&&s<o.length;){const l=Qf(n[s],o[s]);if(l)return l;s++}if(Math.abs(o.length-n.length)===1){if(hr(n))return 1;if(hr(o))return-1}return o.length-n.length}function hr(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Xf={strict:!1,end:!0,sensitive:!1};function ed(e,t,s){const n=Yf(zf(e.path),s),o=ge(n,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function td(e,t){const s=[],n=new Map;t=rr(Xf,t);function o(d){return n.get(d)}function l(d,g,h){const C=!h,y=gr(d);y.aliasOf=h&&h.record;const L=rr(t,d),$=[y];if("alias"in d){const b=typeof d.alias=="string"?[d.alias]:d.alias;for(const _ of b)$.push(gr(ge({},y,{components:h?h.record.components:y.components,path:_,aliasOf:h?h.record:y})))}let w,p;for(const b of $){const{path:_}=b;if(g&&_[0]!=="/"){const j=g.record.path,B=j[j.length-1]==="/"?"":"/";b.path=g.record.path+(_&&B+_)}if(w=ed(b,g,L),h?h.alias.push(w):(p=p||w,p!==w&&p.alias.push(w),C&&d.name&&!vr(w)&&r(d.name)),da(w)&&c(w),y.children){const j=y.children;for(let B=0;B<j.length;B++)l(j[B],w,h&&h.children[B])}h=h||w}return p?()=>{r(p)}:Ws}function r(d){if(aa(d)){const g=n.get(d);g&&(n.delete(d),s.splice(s.indexOf(g),1),g.children.forEach(r),g.alias.forEach(r))}else{const g=s.indexOf(d);g>-1&&(s.splice(g,1),d.record.name&&n.delete(d.record.name),d.children.forEach(r),d.alias.forEach(r))}}function i(){return s}function c(d){const g=od(d,s);s.splice(g,0,d),d.record.name&&!vr(d)&&n.set(d.record.name,d)}function f(d,g){let h,C={},y,L;if("name"in d&&d.name){if(h=n.get(d.name),!h)throw Cs(Se.MATCHER_NOT_FOUND,{location:d});L=h.record.name,C=ge(mr(g.params,h.keys.filter(p=>!p.optional).concat(h.parent?h.parent.keys.filter(p=>p.optional):[]).map(p=>p.name)),d.params&&mr(d.params,h.keys.map(p=>p.name))),y=h.stringify(C)}else if(d.path!=null)y=d.path,h=s.find(p=>p.re.test(y)),h&&(C=h.parse(y),L=h.record.name);else{if(h=g.name?n.get(g.name):s.find(p=>p.re.test(g.path)),!h)throw Cs(Se.MATCHER_NOT_FOUND,{location:d,currentLocation:g});L=h.record.name,C=ge({},g.params,d.params),y=h.stringify(C)}const $=[];let w=h;for(;w;)$.unshift(w.record),w=w.parent;return{name:L,path:y,params:C,matched:$,meta:nd($)}}e.forEach(d=>l(d));function u(){s.length=0,n.clear()}return{addRoute:l,resolve:f,removeRoute:r,clearRoutes:u,getRoutes:i,getRecordMatcher:o}}function mr(e,t){const s={};for(const n of t)n in e&&(s[n]=e[n]);return s}function gr(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:sd(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function sd(e){const t={},s=e.props||!1;if("component"in e)t.default=s;else for(const n in e.components)t[n]=typeof s=="object"?s[n]:s;return t}function vr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function nd(e){return e.reduce((t,s)=>ge(t,s.meta),{})}function od(e,t){let s=0,n=t.length;for(;s!==n;){const l=s+n>>1;fa(e,t[l])<0?n=l:s=l+1}const o=ld(e);return o&&(n=t.lastIndexOf(o,n-1)),n}function ld(e){let t=e;for(;t=t.parent;)if(da(t)&&fa(e,t)===0)return t}function da({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function br(e){const t=Qe(zn),s=Qe(cl),n=me(()=>{const c=O(e.to);return t.resolve(c)}),o=me(()=>{const{matched:c}=n.value,{length:f}=c,u=c[f-1],d=s.matched;if(!u||!d.length)return-1;const g=d.findIndex(ws.bind(null,u));if(g>-1)return g;const h=xr(c[f-2]);return f>1&&xr(u)===h&&d[d.length-1].path!==h?d.findIndex(ws.bind(null,c[f-2])):g}),l=me(()=>o.value>-1&&ud(s.params,n.value.params)),r=me(()=>o.value>-1&&o.value===s.matched.length-1&&ia(s.params,n.value.params));function i(c={}){if(cd(c)){const f=t[O(e.replace)?"replace":"push"](O(e.to)).catch(Ws);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>f),f}return Promise.resolve()}return{route:n,href:me(()=>n.value.href),isActive:l,isExactActive:r,navigate:i}}function rd(e){return e.length===1?e[0]:e}const id=pi({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:br,setup(e,{slots:t}){const s=Ht(br(e)),{options:n}=Qe(zn),o=me(()=>({[_r(e.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[_r(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const l=t.default&&rd(t.default(s));return e.custom?l:ol("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},l)}}}),ad=id;function cd(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function ud(e,t){for(const s in t){const n=t[s],o=e[s];if(typeof n=="string"){if(n!==o)return!1}else if(!it(o)||o.length!==n.length||n.some((l,r)=>l.valueOf()!==o[r].valueOf()))return!1}return!0}function xr(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const _r=(e,t,s)=>e??t??s,fd=pi({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){const n=Qe(Vo),o=me(()=>e.route||n.value),l=Qe(fr,0),r=me(()=>{let f=O(l);const{matched:u}=o.value;let d;for(;(d=u[f])&&!d.components;)f++;return f}),i=me(()=>o.value.matched[r.value]);Bs(fr,me(()=>r.value+1)),Bs(Df,i),Bs(Vo,o);const c=se();return Ve(()=>[c.value,i.value,e.name],([f,u,d],[g,h,C])=>{u&&(u.instances[d]=f,h&&h!==u&&f&&f===g&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),f&&u&&(!h||!ws(u,h)||!g)&&(u.enterCallbacks[d]||[]).forEach(y=>y(f))},{flush:"post"}),()=>{const f=o.value,u=e.name,d=i.value,g=d&&d.components[u];if(!g)return yr(s.default,{Component:g,route:f});const h=d.props[u],C=h?h===!0?f.params:typeof h=="function"?h(f):h:null,L=ol(g,ge({},C,t,{onVnodeUnmounted:$=>{$.component.isUnmounted&&(d.instances[u]=null)},ref:c}));return yr(s.default,{Component:L,route:f})||L}}});function yr(e,t){if(!e)return null;const s=e(t);return s.length===1?s[0]:s}const dd=fd;function pd(e){const t=td(e.routes,e),s=e.parseQuery||Vf,n=e.stringifyQuery||ur,o=e.history,l=Ps(),r=Ps(),i=Ps(),c=Xa(Lt);let f=Lt;gs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=mo.bind(null,A=>""+A),d=mo.bind(null,_f),g=mo.bind(null,Xs);function h(A,q){let W,J;return aa(A)?(W=t.getRecordMatcher(A),J=q):J=A,t.addRoute(J,W)}function C(A){const q=t.getRecordMatcher(A);q&&t.removeRoute(q)}function y(){return t.getRoutes().map(A=>A.record)}function L(A){return!!t.getRecordMatcher(A)}function $(A,q){if(q=ge({},q||c.value),typeof A=="string"){const x=go(s,A,q.path),T=t.resolve({path:x.path},q),I=o.createHref(x.fullPath);return ge(x,T,{params:g(T.params),hash:Xs(x.hash),redirectedFrom:void 0,href:I})}let W;if(A.path!=null)W=ge({},A,{path:go(s,A.path,q.path).path});else{const x=ge({},A.params);for(const T in x)x[T]==null&&delete x[T];W=ge({},A,{params:d(x)}),q.params=d(q.params)}const J=t.resolve(W,q),de=A.hash||"";J.params=u(g(J.params));const m=wf(n,ge({},A,{hash:vf(de),path:J.path})),v=o.createHref(m);return ge({fullPath:m,hash:de,query:n===ur?jf(A.query):A.query||{}},J,{redirectedFrom:void 0,href:v})}function w(A){return typeof A=="string"?go(s,A,c.value.path):ge({},A)}function p(A,q){if(f!==A)return Cs(Se.NAVIGATION_CANCELLED,{from:q,to:A})}function b(A){return B(A)}function _(A){return b(ge(w(A),{replace:!0}))}function j(A,q){const W=A.matched[A.matched.length-1];if(W&&W.redirect){const{redirect:J}=W;let de=typeof J=="function"?J(A,q):J;return typeof de=="string"&&(de=de.includes("?")||de.includes("#")?de=w(de):{path:de},de.params={}),ge({query:A.query,hash:A.hash,params:de.path!=null?{}:A.params},de)}}function B(A,q){const W=f=$(A),J=c.value,de=A.state,m=A.force,v=A.replace===!0,x=j(W,J);if(x)return B(ge(w(x),{state:typeof x=="object"?ge({},de,x.state):de,force:m,replace:v}),q||W);const T=W;T.redirectedFrom=q;let I;return!m&&Cf(n,J,W)&&(I=Cs(Se.NAVIGATION_DUPLICATED,{to:T,from:J}),at(J,J,!0,!1)),(I?Promise.resolve(I):z(T,J)).catch(E=>kt(E)?kt(E,Se.NAVIGATION_GUARD_REDIRECT)?E:qe(E):re(E,T,J)).then(E=>{if(E){if(kt(E,Se.NAVIGATION_GUARD_REDIRECT))return B(ge({replace:v},w(E.to),{state:typeof E.to=="object"?ge({},de,E.to.state):de,force:m}),q||T)}else E=F(T,J,!0,v,de);return oe(T,J,E),E})}function H(A,q){const W=p(A,q);return W?Promise.reject(W):Promise.resolve()}function M(A){const q=us.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(A):A()}function z(A,q){let W;const[J,de,m]=Bf(A,q);W=bo(J.reverse(),"beforeRouteLeave",A,q);for(const x of J)x.leaveGuards.forEach(T=>{W.push(Ft(T,A,q))});const v=H.bind(null,A,q);return W.push(v),et(W).then(()=>{W=[];for(const x of l.list())W.push(Ft(x,A,q));return W.push(v),et(W)}).then(()=>{W=bo(de,"beforeRouteUpdate",A,q);for(const x of de)x.updateGuards.forEach(T=>{W.push(Ft(T,A,q))});return W.push(v),et(W)}).then(()=>{W=[];for(const x of m)if(x.beforeEnter)if(it(x.beforeEnter))for(const T of x.beforeEnter)W.push(Ft(T,A,q));else W.push(Ft(x.beforeEnter,A,q));return W.push(v),et(W)}).then(()=>(A.matched.forEach(x=>x.enterCallbacks={}),W=bo(m,"beforeRouteEnter",A,q,M),W.push(v),et(W))).then(()=>{W=[];for(const x of r.list())W.push(Ft(x,A,q));return W.push(v),et(W)}).catch(x=>kt(x,Se.NAVIGATION_CANCELLED)?x:Promise.reject(x))}function oe(A,q,W){i.list().forEach(J=>M(()=>J(A,q,W)))}function F(A,q,W,J,de){const m=p(A,q);if(m)return m;const v=q===Lt,x=gs?history.state:{};W&&(J||v?o.replace(A.fullPath,ge({scroll:v&&x&&x.scroll},de)):o.push(A.fullPath,de)),c.value=A,at(A,q,W,v),qe()}let Z;function R(){Z||(Z=o.listen((A,q,W)=>{if(!Wt.listening)return;const J=$(A),de=j(J,Wt.currentRoute.value);if(de){B(ge(de,{replace:!0,force:!0}),J).catch(Ws);return}f=J;const m=c.value;gs&&Pf(cr(m.fullPath,W.delta),qn()),z(J,m).catch(v=>kt(v,Se.NAVIGATION_ABORTED|Se.NAVIGATION_CANCELLED)?v:kt(v,Se.NAVIGATION_GUARD_REDIRECT)?(B(ge(w(v.to),{force:!0}),J).then(x=>{kt(x,Se.NAVIGATION_ABORTED|Se.NAVIGATION_DUPLICATED)&&!W.delta&&W.type===Lo.pop&&o.go(-1,!1)}).catch(Ws),Promise.reject()):(W.delta&&o.go(-W.delta,!1),re(v,J,m))).then(v=>{v=v||F(J,m,!1),v&&(W.delta&&!kt(v,Se.NAVIGATION_CANCELLED)?o.go(-W.delta,!1):W.type===Lo.pop&&kt(v,Se.NAVIGATION_ABORTED|Se.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),oe(J,m,v)}).catch(Ws)}))}let ee=Ps(),ce=Ps(),te;function re(A,q,W){qe(A);const J=ce.list();return J.length?J.forEach(de=>de(A,q,W)):console.error(A),Promise.reject(A)}function Fe(){return te&&c.value!==Lt?Promise.resolve():new Promise((A,q)=>{ee.add([A,q])})}function qe(A){return te||(te=!A,R(),ee.list().forEach(([q,W])=>A?W(A):q()),ee.reset()),A}function at(A,q,W,J){const{scrollBehavior:de}=e;if(!gs||!de)return Promise.resolve();const m=!W&&Of(cr(A.fullPath,0))||(J||!W)&&history.state&&history.state.scroll||null;return xt().then(()=>de(A,q,m)).then(v=>v&&Rf(v)).catch(v=>re(v,A,q))}const ze=A=>o.go(A);let cs;const us=new Set,Wt={currentRoute:c,listening:!0,addRoute:h,removeRoute:C,clearRoutes:t.clearRoutes,hasRoute:L,getRoutes:y,resolve:$,options:e,push:b,replace:_,go:ze,back:()=>ze(-1),forward:()=>ze(1),beforeEach:l.add,beforeResolve:r.add,afterEach:i.add,onError:ce.add,isReady:Fe,install(A){A.component("RouterLink",ad),A.component("RouterView",dd),A.config.globalProperties.$router=Wt,Object.defineProperty(A.config.globalProperties,"$route",{enumerable:!0,get:()=>O(c)}),gs&&!cs&&c.value===Lt&&(cs=!0,b(o.location).catch(J=>{}));const q={};for(const J in Lt)Object.defineProperty(q,J,{get:()=>c.value[J],enumerable:!0});A.provide(zn,Wt),A.provide(cl,Yr(q)),A.provide(Vo,c);const W=A.unmount;us.add(A),A.unmount=function(){us.delete(A),us.size<1&&(f=Lt,Z&&Z(),Z=null,c.value=Lt,cs=!1,te=!1),W()}}};function et(A){return A.reduce((q,W)=>q.then(()=>M(W)),Promise.resolve())}return Wt}function hd(){return Qe(zn)}function pa(e){return Qe(cl)}const Zn="vnt-web-access-token",Jn=!!globalThis.__VNT_DESKTOP__,Ns=new URL(window.location.href),jo=Ns.searchParams.get("token")||"";jo&&(localStorage.setItem(Zn,jo),Ns.searchParams.delete("token"),window.history.replaceState({},"",`${Ns.pathname}${Ns.search}${Ns.hash}`));const Yn=se(Jn?"":jo||localStorage.getItem(Zn)||""),ul=se(Jn||!!Yn.value),ha=()=>Yn.value,md=e=>{const t=e.trim();localStorage.setItem(Zn,t),Yn.value=t,ul.value=!!t},gd=()=>{localStorage.removeItem(Zn),Yn.value="",ul.value=!1},ot=async(e,t={})=>{if(globalThis.__VNT_IPC_REQUEST__){const r=await globalThis.__VNT_IPC_REQUEST__({method:t.method||"GET",path:e,body:t.body||null});if(r.code!==0)throw new Error(r.msg||"请求失败");return r.data}const s=new Headers(t.headers||{}),n=ha();n&&s.set("Authorization",`Bearer ${n}`);const o=await fetch(e,{...t,headers:s}),l=await o.json();if(o.status===401&&gd(),l.code!==0)throw new Error(l.msg||"请求失败");return l.data},ma={"Content-Type":"application/json"},vd=e=>ot(`/api/info?file_name=${encodeURIComponent(e)}`),bd=e=>ot(`/api/peers?file_name=${encodeURIComponent(e)}`),xd=e=>ot(`/api/routes?file_name=${encodeURIComponent(e)}`),_d=e=>ot(`/api/start/status?file_name=${encodeURIComponent(e)}`),yd=()=>ot("/api/version"),kd=()=>ot("/api/instances"),wd=e=>ot(`/api/instance?file_name=${encodeURIComponent(e)}`,{method:"DELETE"}),fl=(e,t)=>ot(e,{method:"POST",headers:ma,body:JSON.stringify({file_name:t})}),Cd=e=>fl("/api/start",e),ga=e=>fl("/api/stop",e),Sd=e=>fl("/api/restart",e),Ed=()=>ot("/api/config/list"),Td=e=>ot(`/api/config?file_name=${encodeURIComponent(e)}`),$d=(e,t)=>ot("/api/config",{method:"POST",headers:ma,body:JSON.stringify({file_name:e||null,config:t})}),Ad=e=>ot(`/api/config?file_name=${encodeURIComponent(e)}`,{method:"DELETE"});let Id=0;const as=il("ui",()=>{const e=se([]),t=(i,c,f=3e3)=>{const u=++Id;e.value.push({id:u,type:i,message:c}),setTimeout(()=>{e.value=e.value.filter(d=>d.id!==u)},f)},s={success:i=>t("success",i),error:i=>t("error",i,4500),info:i=>t("info",i)},n=Ht({show:!1,title:"",message:"",danger:!1,confirmText:"确定",resolve:null});return{toasts:e,toast:s,confirmState:n,confirm:({title:i="确认操作",message:c="",danger:f=!1,confirmText:u="确定"}={})=>new Promise(d=>{n.show=!0,n.title=i,n.message=c,n.danger=f,n.confirmText=u,n.resolve=d}),confirmOk:()=>{n.show=!1,n.resolve&&n.resolve(!0),n.resolve=null},confirmCancel:()=>{n.show=!1,n.resolve&&n.resolve(!1),n.resolve=null}}}),va=il("startLog",()=>{const e=se(!1),t=se([]),s=se("stopped"),n=se(null),o=se(null);let l=null,r=null,i=null,c=null;const f=({fetchInstances:$,instanceList:w,configList:p})=>{r=$,i=w,c=p},u=me(()=>{if(!n.value)return"";const $=(i?.value||[]).find(p=>p.file_name===n.value);if($)return $.config_name||$.file_name;const w=(c?.value||[]).find(p=>p.file_name===n.value);return w?w.config_name||w.file_name:n.value}),d=async()=>{if(n.value)try{const $=await _d(n.value);t.value=$.logs||[],s.value=$.status,xt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)}),s.value==="running"?(g(),r&&r(),e.value=!1):s.value==="stopped"&&t.value.length>0&&(g(),r&&r())}catch($){console.error($)}},g=()=>{l&&(clearInterval(l),l=null)},h=()=>{g(),l=setInterval(d,1e3),d()};return{showStartLog:e,startLogs:t,startStatus:s,logFileName:n,logContainer:o,logConfigName:u,bindApp:f,openStartLog:$=>{n.value=$,t.value=[],s.value="starting",e.value=!0,h()},pollStartStatus:d,startPolling:h,stopPolling:g,cancelStart:async()=>{g();const $=n.value;if($)try{await ga($),t.value.push("启动已手动取消")}catch{}s.value="stopped",r&&r()},close:()=>{e.value=!1}}}),Ot=il("app",()=>{const e=as(),t=va(),s=se({}),n=se([]),o=se(null),l=se([]),r=se({}),i=se({}),c=se(!document.hidden),f=()=>{c.value=!document.hidden};let u=null;const d=me(()=>n.value.filter(R=>R.status==="running").length),g=me(()=>n.value.filter(R=>R.status==="starting").length),h=me(()=>d.value>0?`运行中 x${d.value}`:g.value>0?"启动中...":"未启动"),C=me(()=>o.value&&s.value[o.value]||null),y=me(()=>{if(!o.value)return"";const R=n.value.find(ee=>ee.file_name===o.value);return R?R.config_name||R.file_name:o.value}),L=se(""),$=async()=>{try{L.value=await yd()||""}catch(R){console.error("Fetch version error",R)}},w=me(()=>!!(C.value&&C.value.server_info&&C.value.server_info.some(R=>R.connected))),p=me(()=>{const R=C.value;return!R||!R.server_info||!R.server_info.length?"未配置服务器":`${R.server_info.filter(ee=>ee.connected).length} / ${R.server_info.length} 已连接`}),b=R=>s.value[R]||{},_=async R=>{try{s.value[R]=await vd(R)}catch(ee){console.error("Fetch info error",ee)}},j=async()=>{try{const R=await kd()||[];n.value=R;for(const ee of Object.keys(s.value))R.some(ce=>ce.file_name===ee)||delete s.value[ee];for(const ee of Object.keys(i.value)){const ce=R.find(te=>te.file_name===ee);(!ce||ce.status==="stopped")&&delete i.value[ee]}if(!o.value||!R.some(ee=>ee.file_name===o.value)){const ee=R.find(ce=>ce.status==="running");o.value=ee?ee.file_name:R.length>0?R[0].file_name:null}for(const ee of R)ee.status==="running"&&_(ee.file_name)}catch(R){console.error("Fetch instances error",R)}},B=async()=>{try{l.value=await Ed()||[]}catch(R){console.error("Fetch list error",R)}},H=async R=>{if(!R){e.toast.error("请先选择一个配置");return}if(!r.value[R]){r.value[R]=!0;try{await Cd(R),t.openStartLog(R),j()}catch(ee){e.toast.error("启动失败: "+ee.message)}finally{r.value[R]=!1}}},M=async R=>{if(!(!R||r.value[R])){r.value[R]=!0,i.value[R]=!0;try{await ga(R),e.toast.success("已停止"),t.logFileName===R&&(t.stopPolling(),t.showStartLog=!1),j()}catch(ee){e.toast.error("停止失败: "+ee.message),console.error(ee),delete i.value[R]}finally{r.value[R]=!1}}},z=async R=>{if(!(!R||r.value[R])){r.value[R]=!0;try{await Sd(R),t.openStartLog(R),j()}catch(ee){e.toast.error("重启失败: "+ee.message)}finally{r.value[R]=!1}}},oe=async R=>{if(!(!R||r.value[R])){r.value[R]=!0;try{await wd(R),e.toast.success("已移除"),t.logFileName===R&&(t.stopPolling(),t.showStartLog=!1),o.value===R&&(o.value=null),j()}catch(ee){e.toast.error("移除失败: "+ee.message)}finally{r.value[R]=!1}}};t.bindApp({fetchInstances:j,instanceList:n,configList:l});const F=async()=>{if(!Jn&&!ha())return;document.addEventListener("visibilitychange",f),$(),await j(),B();const R=n.value.find(ee=>ee.status==="starting");R&&t.openStartLog(R.file_name),u=setInterval(()=>{c.value&&j()},3e3)},Z=()=>{document.removeEventListener("visibilitychange",f),t.stopPolling(),u&&clearInterval(u)};return Es()&&(_t(F),Ss(Z)),{instances:s,instanceList:n,selectedInstance:o,configList:l,loadingMap:r,stoppingMap:i,isPageVisible:c,runningCount:d,startingCount:g,headerStatusText:h,selectedInfo:C,selectedConfigName:y,version:L,isServerConnected:w,serverStatusText:p,infoOf:b,fetchInstances:j,fetchInstanceInfo:_,fetchConfigList:B,startVnt:H,stopVnt:M,restartVnt:z,dismissInstance:oe}}),Rd=[{to:"/",label:"网络总览",shortLabel:"总览",icon:"M4 4h6v6H4V4Zm10 0h6v6h-6V4ZM4 14h6v6H4v-6Zm10 0h6v6h-6v-6Z"},{to:"/instances",label:"运行实例",shortLabel:"实例",icon:"M4 18V8m5 10V4m6 14v-7m5 7V6"},{to:"/peers",label:"在线设备",shortLabel:"设备",icon:"M15 19a6 6 0 0 0-12 0m18 0a5 5 0 0 0-5-5m-7-3a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm8 0a3 3 0 1 0 0-6"},{to:"/routes",label:"路由表",shortLabel:"路由",icon:"M6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm12 12a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM8 6h6a4 4 0 0 1 4 4v2m-3-3 3 3 3-3M16 18h-6a4 4 0 0 1-4-4v-2"},{to:"/config",label:"组网配置",shortLabel:"配置",icon:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm7.4-.5a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3A1.7 1.7 0 0 0 14 21v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14h-.2v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1A1.7 1.7 0 0 0 9 4.6 1.7 1.7 0 0 0 10 3v-.2h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1Z"},{to:"/web-access",label:"Web 访问",shortLabel:"Web",desktopOnly:!0,icon:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0 0c2.2-2.5 3.3-5.5 3.3-9S14.2 5.5 12 3m0 18c-2.2-2.5-3.3-5.5-3.3-9S9.8 5.5 12 3M3.5 9h17m-17 6h17"}],ba=()=>Rd.filter(e=>!e.desktopOnly||globalThis.__VNT_DESKTOP__),dl="/assets/vnt-icon-CtSHy0mt.png",Pd={class:"flex h-full min-h-0 flex-col bg-white dark:bg-slate-900"},Od={class:"flex h-16 shrink-0 items-center gap-3 border-b border-slate-200 px-5 dark:border-slate-800"},Md=["src"],Ld={class:"mx-3 mt-4 flex items-center gap-3 rounded-xl border border-slate-200 bg-slate-50 px-3 py-3 dark:border-slate-700 dark:bg-slate-800/60"},Nd={class:"min-w-0"},Vd={class:"mt-0.5 truncate text-xs font-medium text-slate-700 dark:text-slate-200"},jd={class:"mt-4 flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto px-3","aria-label":"主导航"},Dd={class:"h-[18px] w-[18px] shrink-0 fill-none stroke-current",viewBox:"0 0 24 24"},Bd=["d"],Fd={class:"mx-3 mt-3 shrink-0 border-t border-slate-200 px-1 py-4 dark:border-slate-800"},Ud={class:"flex items-center gap-2 text-xs text-slate-400"},Hd={class:"ml-auto font-mono text-[10px]"},kr={__name:"AppSidebar",emits:["navigate"],setup(e){const t=pa(),s=Ot(),n=ba();return(o,l)=>{const r=Un("router-link");return k(),S("div",Pd,[a("div",Od,[a("img",{src:O(dl),alt:"",class:"h-8 w-8 shrink-0"},null,8,Md),l[1]||(l[1]=a("div",null,[a("div",{class:"text-sm font-bold tracking-wide text-slate-900 dark:text-white"},"VNT"),a("div",{class:"text-[9px] font-semibold tracking-[0.18em] text-slate-400"},"CONTROL CENTER")],-1))]),a("div",Ld,[a("span",{class:G(["h-2.5 w-2.5 shrink-0 rounded-full",O(s).runningCount>0?"bg-green-500":O(s).startingCount>0?"animate-pulse bg-amber-400":"bg-slate-300 dark:bg-slate-600"])},null,2),a("div",Nd,[l[2]||(l[2]=a("div",{class:"text-[9px] font-semibold tracking-wider text-slate-400"},"虚拟网络",-1)),a("div",Vd,N(O(s).headerStatusText),1)])]),a("nav",jd,[(k(!0),S(ie,null,Te(O(n),i=>(k(),Ie(r,{key:i.to,to:i.to,class:G(["flex min-h-10 items-center gap-3 rounded-lg px-3 text-sm font-medium transition-colors",O(t).path===i.to?"bg-indigo-50 text-indigo-700 dark:bg-indigo-500/10 dark:text-indigo-300":"text-slate-500 hover:bg-slate-100 hover:text-slate-900 dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-white"]),onClick:l[0]||(l[0]=c=>o.$emit("navigate"))},{default:Ee(()=>[(k(),S("svg",Dd,[a("path",{d:i.icon,"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.7"},null,8,Bd)])),a("span",null,N(i.label),1)]),_:2},1032,["to","class"]))),128))]),a("div",Fd,[a("div",Ud,[a("span",{class:G(["h-1.5 w-1.5 rounded-full",O(s).version?"bg-green-500":"bg-amber-400"])},null,2),a("span",null,N(O(s).version?"本地服务正常":"正在连接服务…"),1),a("span",Hd,"v"+N(O(s).version||"2.0"),1)])])])}}},Wd={key:0,class:"flex shrink-0 items-center justify-between gap-3 border-b border-slate-200 bg-slate-50/60 px-6 py-4 dark:border-slate-700 dark:bg-slate-800/50"},Kd={class:"custom-scrollbar min-h-0 flex-1 overflow-y-auto"},Gd={key:1,class:"flex shrink-0 items-center justify-end gap-3 border-t border-slate-200 bg-slate-50/60 px-6 py-4 dark:border-slate-700 dark:bg-slate-800/50"},pl={__name:"AppModal",props:{show:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},escClosable:{type:Boolean,default:!0},panelClass:{type:String,default:"w-full max-w-2xl"}},emits:["close"],setup(e,{emit:t}){const s=e,n=t,o=r=>{s.escClosable&&r.key==="Escape"&&n("close")};Ve(()=>s.show,r=>{r?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),Ss(()=>window.removeEventListener("keydown",o));const l=()=>{s.maskClosable&&n("close")};return(r,i)=>(k(),Ie(Qo,{to:"body"},[ue(wn,{name:"modal"},{default:Ee(()=>[e.show?(k(),S("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-slate-900/40 p-4 backdrop-blur-sm",onClick:ls(l,["self"])},[a("div",{class:G(["modal-panel flex max-h-[90vh] flex-col overflow-hidden rounded-xl border border-slate-200 bg-white shadow-2xl dark:border-slate-700 dark:bg-slate-900",e.panelClass])},[r.$slots.header?(k(),S("div",Wd,[lo(r.$slots,"header")])):fe("",!0),a("div",Kd,[lo(r.$slots,"body")]),r.$slots.footer?(k(),S("div",Gd,[lo(r.$slots,"footer")])):fe("",!0)],2)])):fe("",!0)]),_:3})]))}},qd={class:"w-auto min-w-[260px] max-w-[320px] rounded-lg border border-slate-200 bg-white p-4 text-left text-sm text-slate-600 shadow-2xl dark:border-slate-600 dark:bg-slate-800 dark:text-slate-200"},zd={class:"relative z-10 mb-2 flex items-center justify-between border-b border-slate-200 pb-2 dark:border-slate-600"},Zd={class:"badge-green border border-green-200 dark:border-green-800"},Jd={key:0,class:"relative z-10 mb-3"},Yd={class:"flex flex-wrap gap-1"},Qd={key:1,class:"relative z-10"},Xd={class:"whitespace-normal break-all rounded border border-slate-200 bg-slate-50 p-1.5 font-mono text-xs leading-relaxed text-slate-600 dark:border-slate-700/50 dark:bg-slate-900/50 dark:text-slate-200"},ep={__name:"AppTooltip",setup(e,{expose:t}){const s=se({show:!1,x:0,y:0,info:null});let n=null;const o=(c,f)=>{if(!f.nat_info)return;n&&(clearTimeout(n),n=null);const u=c.currentTarget.getBoundingClientRect();s.value={show:!0,x:u.left+u.width/2,y:u.bottom+10,info:f.nat_info}},l=()=>{n=setTimeout(()=>{s.value.show=!1},100)},r=()=>{n&&(clearTimeout(n),n=null)},i=()=>{s.value.show=!1};return t({showPeerTooltip:o,hidePeerTooltip:l}),(c,f)=>(k(),Ie(Qo,{to:"body"},[s.value.show?(k(),S("div",{key:0,style:Mn({top:s.value.y+"px",left:s.value.x+"px"}),class:"fixed z-[9999] mt-1 -translate-x-1/2 transform",onMouseenter:r,onMouseleave:i},[a("div",qd,[f[3]||(f[3]=a("div",{class:"absolute -top-2 left-1/2 h-4 w-4 -translate-x-1/2 rotate-45 transform border-l border-t border-slate-200 bg-white dark:border-slate-600 dark:bg-slate-800"},null,-1)),a("div",zd,[f[0]||(f[0]=a("span",{class:"text-xs font-bold uppercase text-slate-400"},"NAT Type",-1)),a("span",Zd,N(s.value.info.nat_type),1)]),s.value.info.public_ips&&s.value.info.public_ips.length>0?(k(),S("div",Jd,[f[1]||(f[1]=a("span",{class:"mb-1 block text-xs text-slate-400"},"Public IPv4:",-1)),a("div",Yd,[(k(!0),S(ie,null,Te(s.value.info.public_ips,u=>(k(),S("span",{key:u,class:"rounded border border-slate-200 bg-slate-100 px-1.5 py-0.5 font-mono text-xs tabular-nums text-slate-600 dark:border-slate-600 dark:bg-slate-700 dark:text-slate-200"},N(u),1))),128))])])):fe("",!0),s.value.info.ipv6?(k(),S("div",Qd,[f[2]||(f[2]=a("span",{class:"mb-1 block text-xs text-slate-400"},"IPv6:",-1)),a("div",Xd,N(s.value.info.ipv6),1)])):fe("",!0)])],36)):fe("",!0)]))}},tp={class:"text-lg font-bold text-slate-900 flex items-center gap-2 dark:text-white"},sp={key:0,class:"w-5 h-5 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},np={class:"px-6 py-5 text-sm text-slate-600 break-all dark:text-slate-300"},op={__name:"ConfirmHost",setup(e){const t=as();return(s,n)=>(k(),Ie(pl,{show:O(t).confirmState.show,"panel-class":"w-full max-w-sm",onClose:O(t).confirmCancel},{header:Ee(()=>[a("h3",tp,[O(t).confirmState.danger?(k(),S("svg",sp,[...n[2]||(n[2]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"},null,-1)])])):fe("",!0),ae(" "+N(O(t).confirmState.title),1)])]),body:Ee(()=>[a("p",np,N(O(t).confirmState.message),1)]),footer:Ee(()=>[a("button",{class:"btn-ghost",onClick:n[0]||(n[0]=(...o)=>O(t).confirmCancel&&O(t).confirmCancel(...o))},"取消"),a("button",{class:G(O(t).confirmState.danger?"btn-danger":"btn-primary"),onClick:n[1]||(n[1]=(...o)=>O(t).confirmOk&&O(t).confirmOk(...o))},N(O(t).confirmState.confirmText),3)]),_:1},8,["show","onClose"]))}},lp={class:"pointer-events-none fixed right-4 top-4 z-[100] flex flex-col items-end gap-2"},rp={class:"flex items-center gap-2 px-4 py-2.5"},ip=["d"],ap={class:"break-all text-sm text-slate-700 dark:text-slate-200"},cp={__name:"ToastHost",setup(e){const t=as(),s=l=>l==="success"?"bg-green-500":l==="error"?"bg-red-500":"bg-indigo-500",n=l=>l==="success"?"text-green-500":l==="error"?"text-red-500":"text-indigo-500",o=l=>l==="success"?"M5 13l4 4L19 7":l==="error"?"M6 18L18 6M6 6l12 12":"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z";return(l,r)=>(k(),Ie(Qo,{to:"body"},[a("div",lp,[ue(rl,{name:"toast"},{default:Ee(()=>[(k(!0),S(ie,null,Te(O(t).toasts,i=>(k(),S("div",{key:i.id,class:"pointer-events-auto flex max-w-sm items-stretch overflow-hidden rounded-lg border border-slate-200 bg-white shadow-lg dark:border-slate-700 dark:bg-slate-800"},[a("span",{class:G(["w-1 shrink-0",s(i.type)])},null,2),a("div",rp,[(k(),S("svg",{class:G(["h-4 w-4 shrink-0",n(i.type)]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:o(i.type)},null,8,ip)],2)),a("span",ap,N(i.message),1)])]))),128))]),_:1})])]))}},up={class:"grid h-[100dvh] place-items-center overflow-y-auto bg-slate-50 p-4 text-slate-700 dark:bg-slate-950 dark:text-slate-200"},fp={class:"mb-7 flex items-center gap-3"},dp=["src"],pp=["disabled"],hp={__name:"AccessGate",setup(e){const t=se(""),s=()=>{t.value.trim()&&(md(t.value),window.location.reload())};return(n,o)=>(k(),S("main",up,[a("form",{class:"w-full max-w-md rounded-2xl border border-slate-200 bg-white p-6 shadow-sm sm:p-8 dark:border-slate-800 dark:bg-slate-900",onSubmit:ls(s,["prevent"])},[a("div",fp,[a("img",{src:O(dl),alt:"",class:"h-10 w-10 shrink-0"},null,8,dp),o[1]||(o[1]=a("div",null,[a("h1",{class:"text-lg font-bold text-slate-900 dark:text-white"},"访问 VNT 控制台"),a("p",{class:"mt-0.5 text-xs text-slate-400"},"请输入桌面端 Web 访问设置中的令牌")],-1))]),o[2]||(o[2]=a("label",{class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-200",for:"access-token"},"访问令牌",-1)),_e(a("input",{id:"access-token","onUpdate:modelValue":o[0]||(o[0]=l=>t.value=l),class:"input font-mono",type:"password",autocomplete:"current-password",autofocus:"",placeholder:"粘贴访问令牌"},null,512),[[Oe,t.value]]),a("button",{class:"btn-primary mt-5 w-full",type:"submit",disabled:!t.value.trim()},"进入控制台",8,pp),o[3]||(o[3]=a("p",{class:"mt-5 text-center text-xs leading-5 text-slate-400"},"令牌只保存在当前浏览器中,可随时在桌面端重新生成。",-1))],32)]))}},mp={key:1,class:"flex h-[100dvh] min-h-0 overflow-hidden bg-slate-50 text-slate-700 dark:bg-slate-950 dark:text-slate-200"},gp={class:"hidden w-60 shrink-0 border-r border-slate-200 dark:border-slate-800 lg:block"},vp={key:0,class:"fixed inset-0 z-40 lg:hidden"},bp={class:"drawer-panel relative h-full w-[min(82vw,288px)] border-r border-slate-200 shadow-2xl dark:border-slate-700"},xp={class:"flex min-w-0 flex-1 flex-col"},_p={class:"flex h-16 shrink-0 items-center gap-3 border-b border-slate-200 bg-white/90 px-4 backdrop-blur lg:px-6 dark:border-slate-800 dark:bg-slate-900/90"},yp={class:"min-w-0"},kp={class:"truncate text-lg font-bold text-slate-900 dark:text-white"},wp={class:"ml-auto flex items-center gap-2"},Cp={class:"flex h-8 items-center gap-2 rounded-lg border border-slate-200 bg-white px-2.5 text-xs font-medium text-slate-500 sm:px-3 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300"},Sp={class:"hidden sm:inline"},Ep=["title","aria-label"],Tp={key:0,class:"h-4 w-4 fill-none stroke-current",viewBox:"0 0 24 24"},$p={key:1,class:"h-4 w-4 fill-none stroke-current",viewBox:"0 0 24 24"},Ap={class:"custom-scrollbar min-h-0 flex-1 overflow-x-hidden overflow-y-auto"},Ip={class:"mx-auto w-full max-w-7xl px-4 py-5 sm:px-5 lg:px-7 lg:py-6"},Rp={class:"flex min-w-0 items-center gap-3"},Pp={class:"truncate text-base font-bold text-slate-900 sm:text-lg dark:text-white"},Op={class:"max-w-[40%] truncate font-mono text-xs text-indigo-600 dark:text-indigo-400"},Mp={class:"break-all"},Lp={key:0,class:"animate-pulse text-indigo-600 dark:text-indigo-400"},Np={__name:"App",setup(e){const t=Ot(),s=va(),n=pa(),o=hd(),l=se(null);Bs("peerTooltip",l);const r=se(!1),i=ba(),c=me(()=>i.find(C=>C.to===n.path)||i[0]),f=localStorage.getItem("vnt-theme"),u=se(f?f==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches),d=()=>document.documentElement.classList.toggle("dark",u.value),g=()=>{u.value=!u.value,localStorage.setItem("vnt-theme",u.value?"dark":"light"),d()};d(),Ve(()=>n.path,()=>{r.value=!1});const h=C=>{if(!(C.ctrlKey||C.metaKey)||C.altKey)return;const y=Number(C.key)-1;y>=0&&y<i.length&&(C.preventDefault(),o.push(i[y].to))};return _t(()=>window.addEventListener("keydown",h)),Fn(()=>window.removeEventListener("keydown",h)),(C,y)=>{const L=Un("router-view");return!O(Jn)&&!O(ul)?(k(),Ie(hp,{key:0})):(k(),S("div",mp,[a("aside",gp,[ue(kr)]),ue(wn,{name:"drawer"},{default:Ee(()=>[r.value?(k(),S("div",vp,[a("button",{class:"absolute inset-0 bg-slate-950/45 backdrop-blur-[2px]","aria-label":"关闭导航",onClick:y[0]||(y[0]=$=>r.value=!1)}),a("aside",bp,[ue(kr,{onNavigate:y[1]||(y[1]=$=>r.value=!1)})])])):fe("",!0)]),_:1}),a("div",xp,[a("header",_p,[a("button",{class:"grid h-9 w-9 shrink-0 place-items-center rounded-lg text-slate-500 hover:bg-slate-100 hover:text-slate-900 lg:hidden dark:text-slate-400 dark:hover:bg-slate-800 dark:hover:text-white","aria-label":"打开导航",onClick:y[2]||(y[2]=$=>r.value=!0)},[...y[5]||(y[5]=[a("svg",{class:"h-5 w-5 fill-none stroke-current",viewBox:"0 0 24 24"},[a("path",{d:"M4 7h16M4 12h16M4 17h16","stroke-linecap":"round","stroke-width":"2"})],-1)])]),a("div",yp,[a("h1",kp,N(c.value.label),1),y[6]||(y[6]=a("p",{class:"hidden text-xs text-slate-400 sm:block"},"VNT 虚拟局域网管理",-1))]),a("div",wp,[a("div",Cp,[a("span",{class:G(["h-1.5 w-1.5 rounded-full",O(t).runningCount>0?"bg-green-500":O(t).startingCount>0?"animate-pulse bg-amber-400":"bg-slate-300 dark:bg-slate-600"])},null,2),a("span",Sp,N(O(t).headerStatusText),1)]),a("button",{class:"grid h-8 w-8 place-items-center rounded-lg border border-slate-200 bg-white text-slate-500 hover:border-indigo-300 hover:text-indigo-600 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-400 dark:hover:border-indigo-500 dark:hover:text-indigo-400",title:u.value?"切换浅色模式":"切换深色模式","aria-label":u.value?"切换浅色模式":"切换深色模式",onClick:g},[u.value?(k(),S("svg",Tp,[...y[7]||(y[7]=[a("circle",{cx:"12",cy:"12",r:"4"},null,-1),a("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4","stroke-linecap":"round","stroke-width":"1.7"},null,-1)])])):(k(),S("svg",$p,[...y[8]||(y[8]=[a("path",{d:"M20.5 15.2A8.5 8.5 0 0 1 8.8 3.5 8.5 8.5 0 1 0 20.5 15.2Z","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.7"},null,-1)])]))],8,Ep)])]),a("main",Ap,[a("div",Ip,[ue(L,null,{default:Ee(({Component:$})=>[ue(wn,{name:"fade",mode:"out-in"},{default:Ee(()=>[(k(),Ie(Rc($)))]),_:2},1024)]),_:1})])])]),ue(pl,{show:O(s).showStartLog,"mask-closable":O(s).startStatus!=="starting","esc-closable":O(s).startStatus!=="starting","panel-class":"w-full max-w-2xl",onClose:O(s).close},{header:Ee(()=>[a("div",Rp,[a("span",{class:G(["h-2 w-2 shrink-0 rounded-full",O(s).startStatus==="starting"?"animate-pulse bg-amber-400":O(s).startStatus==="running"?"bg-green-500":"bg-red-500"])},null,2),a("h3",Pp,N(O(s).startStatus==="starting"?"正在建立虚拟网络":O(s).startStatus==="running"?"网络已连接":"连接未完成"),1)]),a("span",Op,N(O(s).logConfigName),1)]),body:Ee(()=>[a("div",{ref:$=>O(s).logContainer=$,class:"custom-scrollbar h-64 space-y-2 overflow-y-auto border-y border-slate-200 bg-slate-50 p-4 font-mono text-xs text-slate-600 sm:h-80 sm:p-6 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-300"},[(k(!0),S(ie,null,Te(O(s).startLogs,($,w)=>(k(),S("div",{key:w,class:"flex gap-3"},[y[9]||(y[9]=a("span",{class:"text-indigo-600 dark:text-indigo-400"},"",-1)),a("span",Mp,N($),1)]))),128)),O(s).startStatus==="starting"?(k(),S("div",Lp,"等待下一阶段…")):fe("",!0)],512)]),footer:Ee(()=>[O(s).startStatus==="starting"?(k(),S("button",{key:0,class:"btn-ghost",onClick:y[3]||(y[3]=(...$)=>O(s).cancelStart&&O(s).cancelStart(...$))},"取消连接")):(k(),S("button",{key:1,class:"btn-primary",onClick:y[4]||(y[4]=(...$)=>O(s).close&&O(s).close(...$))},"完成"))]),_:1},8,["show","mask-closable","esc-closable","onClose"]),ue(cp),ue(op),ue(ep,{ref_key:"tooltipRef",ref:l},null,512)]))}}},hl=(e,t)=>{const s=e.__vccOpts||e;for(const[n,o]of t)s[n]=o;return s},Vp=["aria-expanded","disabled"],jp=["aria-selected","disabled","data-option-index","onMouseenter","onClick"],Dp={class:"min-w-0 flex-1 truncate"},Bp={key:0,class:"h-4 w-4 shrink-0 fill-none stroke-current",viewBox:"0 0 24 24","aria-hidden":"true"},Fp={key:0,class:"px-3 py-4 text-center text-xs text-slate-400"},Up=Object.assign({inheritAttrs:!1},{__name:"AppSelect",props:{modelValue:{default:null},options:{type:Array,default:()=>[]},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,n=t,o=se(null),l=se(null),r=se(!1),i=se(-1),c=`app-select-${yc().replaceAll(":","")}`,f=me(()=>s.options.findIndex(w=>Object.is(w.value,s.modelValue))),u=me(()=>s.options[f.value]||null),d=(w,p)=>{if(!s.options.length)return-1;let b=w;for(let _=0;_<s.options.length;_+=1)if(b=(b+p+s.options.length)%s.options.length,!s.options[b]?.disabled)return b;return-1},g=async()=>{s.disabled||(r.value=!0,i.value=f.value>=0?f.value:d(-1,1),await xt(),o.value?.querySelector(`[data-option-index="${i.value}"]`)?.scrollIntoView({block:"nearest"}))},h=(w=!1)=>{r.value=!1,w&&l.value?.focus()},C=w=>{w.disabled||(n("update:modelValue",w.value),h(!0))},y=w=>{i.value=d(i.value,w),xt(()=>{o.value?.querySelector(`[data-option-index="${i.value}"]`)?.scrollIntoView({block:"nearest"})})},L=w=>{if(!s.disabled){if(w.key==="ArrowDown"||w.key==="ArrowUp"){w.preventDefault(),r.value?y(w.key==="ArrowDown"?1:-1):g();return}if(w.key==="Enter"||w.key===" "){w.preventDefault(),r.value?i.value>=0&&C(s.options[i.value]):g();return}if(w.key==="Escape"&&r.value){w.preventDefault(),h(!0);return}w.key==="Home"&&r.value?(w.preventDefault(),i.value=d(-1,1)):w.key==="End"&&r.value?(w.preventDefault(),i.value=d(0,-1)):w.key==="Tab"&&h()}},$=w=>{r.value&&!o.value?.contains(w.target)&&h()};return Ve(()=>s.disabled,w=>{w&&h()}),_t(()=>document.addEventListener("pointerdown",$)),Fn(()=>document.removeEventListener("pointerdown",$)),(w,p)=>(k(),S("div",{ref_key:"root",ref:o,class:"relative w-full"},[a("button",Di({ref_key:"trigger",ref:l},w.$attrs,{type:"button",role:"combobox","aria-expanded":r.value,"aria-controls":c,"aria-haspopup":"listbox",disabled:e.disabled,class:["input flex min-h-10 items-center justify-between gap-3 text-left",r.value?"border-indigo-500 ring-2 ring-indigo-500/25":""],onClick:p[0]||(p[0]=b=>r.value?h():g()),onKeydown:L}),[a("span",{class:G(["min-w-0 flex-1 truncate",u.value?"":"text-slate-400 dark:text-slate-500"])},N(u.value?.label||e.placeholder),3),(k(),S("svg",{class:G(["h-4 w-4 shrink-0 fill-none stroke-current text-slate-400 transition-transform duration-150",r.value?"rotate-180 text-indigo-500":""]),viewBox:"0 0 24 24","aria-hidden":"true"},[...p[1]||(p[1]=[a("path",{d:"m7 10 5 5 5-5","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.8"},null,-1)])],2))],16,Vp),ue(wn,{name:"select-menu"},{default:Ee(()=>[r.value?(k(),S("div",{key:0,id:c,role:"listbox",class:"custom-scrollbar absolute z-40 mt-1.5 max-h-60 w-full overflow-y-auto rounded-xl border border-slate-200 bg-white p-1.5 shadow-xl shadow-slate-900/10 dark:border-slate-700 dark:bg-slate-800 dark:shadow-black/30"},[(k(!0),S(ie,null,Te(e.options,(b,_)=>(k(),S("button",{key:`${String(b.value)}-${_}`,type:"button",role:"option","aria-selected":Object.is(b.value,e.modelValue),disabled:b.disabled,"data-option-index":_,class:G(["flex w-full items-center gap-2 rounded-lg px-3 py-2.5 text-left text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40",[Object.is(b.value,e.modelValue)?"bg-indigo-50 font-medium text-indigo-700 dark:bg-indigo-500/15 dark:text-indigo-300":"text-slate-600 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-slate-700/70",i.value===_&&!Object.is(b.value,e.modelValue)?"bg-slate-100 dark:bg-slate-700/70":""]]),onMouseenter:j=>i.value=_,onClick:j=>C(b)},[a("span",Dp,N(b.label),1),Object.is(b.value,e.modelValue)?(k(),S("svg",Bp,[...p[2]||(p[2]=[a("path",{d:"m5 12 4 4L19 6","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1)])])):fe("",!0)],42,jp))),128)),e.options.length===0?(k(),S("div",Fp,"暂无可选项")):fe("",!0)])):fe("",!0)]),_:1})],512))}}),ml=hl(Up,[["__scopeId","data-v-2fb2198c"]]),Hp={class:"card"},Wp={key:0,class:"flex flex-wrap items-center justify-between gap-3"},Kp={key:1,class:"text-sm muted"},Gp={key:2,class:"flex flex-col gap-3 sm:flex-row sm:items-end"},qp={class:"flex-1"},zp=["disabled"],Zp={key:0,class:"animate-spin"},xa={__name:"StartPanel",setup(e){const t=Ot(),s=as(),n=se(""),o=me(()=>t.configList.filter(i=>!t.instanceList.some(c=>c.file_name===i.file_name))),l=me(()=>o.value.map(i=>({value:i.file_name,label:i.config_name||i.file_name})));Ve(o,i=>{i.some(c=>c.file_name===n.value)||(n.value=i.length?i[0].file_name:"")},{immediate:!0});const r=()=>{if(!n.value){s.toast.error("请先选择一个配置");return}t.startVnt(n.value)};return(i,c)=>{const f=Un("router-link");return k(),S("div",Hp,[c[5]||(c[5]=a("h2",{class:"mb-4 text-base font-bold text-slate-900 dark:text-white"},"启动组网",-1)),O(t).configList.length===0?(k(),S("div",Wp,[c[2]||(c[2]=a("p",{class:"text-sm muted"},"还没有任何配置,先创建一个组网配置吧。",-1)),ue(f,{to:"/config",class:"btn-primary btn-sm"},{default:Ee(()=>[...c[1]||(c[1]=[ae("去新建配置",-1)])]),_:1})])):o.value.length===0?(k(),S("div",Kp," 所有配置均已启动。 ")):(k(),S("div",Gp,[a("div",qp,[c[3]||(c[3]=a("label",{class:"mb-1.5 block text-xs font-medium muted"},"选择配置",-1)),ue(ml,{modelValue:n.value,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),options:l.value,placeholder:"请选择配置…","aria-label":"选择配置"},null,8,["modelValue","options"])]),a("button",{class:"btn-primary px-8",disabled:!n.value||!!O(t).loadingMap[n.value],onClick:r},[O(t).loadingMap[n.value]?(k(),S("span",Zp,"⟳")):fe("",!0),c[4]||(c[4]=ae(" 启动 ",-1))],8,zp)]))])}}},Jp={class:"flex items-center justify-between gap-2"},Yp=["title"],Qp={class:"flex shrink-0 items-center gap-1.5"},Xp={key:0,class:"badge-yellow",title:"配置文件在启动后被修改,重启实例后生效"},e0={class:"mt-2 text-sm"},t0={class:"ml-1 font-mono tabular-nums text-indigo-600 dark:text-indigo-400"},s0={class:"mt-3 flex gap-4 text-xs muted"},n0={class:"font-bold tabular-nums text-blue-600 dark:text-blue-400"},o0={class:"font-bold tabular-nums text-green-600 dark:text-green-400"},l0={class:"font-bold tabular-nums text-slate-400"},r0={class:"mt-4 flex flex-wrap justify-end gap-2"},i0={key:0,class:"flex items-center gap-1.5 text-xs muted"},a0=["disabled"],c0={key:0,class:"animate-spin"},u0=["disabled"],f0={key:0,class:"animate-spin"},d0=["disabled"],p0={key:0,class:"animate-spin"},_a={__name:"InstanceCard",props:{inst:{type:Object,required:!0},selectable:{type:Boolean,default:!1}},setup(e){const t=e,s=Ot(),n=as(),o=me(()=>s.infoOf(t.inst.file_name)),l=me(()=>!!s.loadingMap[t.inst.file_name]),r=me(()=>!!s.stoppingMap[t.inst.file_name]),i=me(()=>t.inst.config_name||t.inst.file_name),c=C=>r.value?"badge-yellow":C==="running"?"badge-green":C==="starting"?"badge-blue":"badge-gray",f=C=>r.value?"停止中":C==="running"?"运行中":C==="starting"?"启动中":"已停止",u=()=>{t.selectable&&(s.selectedInstance=t.inst.file_name)},d=async()=>{await n.confirm({title:"停止组网",message:`确定要停止 ${i.value} 吗?`,danger:!0,confirmText:"停止"})&&s.stopVnt(t.inst.file_name)},g=async()=>{await n.confirm({title:"重启组网",message:`确定要重启 ${i.value} 吗?`})&&s.restartVnt(t.inst.file_name)},h=async()=>{await n.confirm({title:"移除实例",message:`确定要移除已停止的实例 ${i.value} 吗?`,danger:!0,confirmText:"移除"})&&s.dismissInstance(t.inst.file_name)};return(C,y)=>(k(),S("div",{class:G(["card",[e.selectable?"cursor-pointer":"",e.selectable&&O(s).selectedInstance===e.inst.file_name?"ring-2 ring-indigo-500 dark:ring-indigo-400":""]]),onClick:u},[a("div",Jp,[a("h3",{class:"truncate text-base font-bold text-slate-900 dark:text-white",title:e.inst.file_name},N(i.value),9,Yp),a("div",Qp,[o.value.config_changed?(k(),S("span",Xp," 配置发生变化 ")):fe("",!0),a("span",{class:G([c(e.inst.status),r.value?"animate-pulse":""])},N(f(e.inst.status)),3)])]),a("div",e0,[y[0]||(y[0]=a("span",{class:"muted"},"虚拟 IP:",-1)),a("span",t0,N(o.value.ip||"-"),1)]),a("div",s0,[a("span",null,[y[1]||(y[1]=ae(" 在线 ",-1)),a("span",n0,N(o.value.online_client_num||0),1)]),a("span",null,[y[2]||(y[2]=ae(" 直连 ",-1)),a("span",o0,N(o.value.direct_client_num||0),1)]),a("span",null,[y[3]||(y[3]=ae(" 离线 ",-1)),a("span",l0,N(o.value.offline_client_num||0),1)])]),a("div",r0,[r.value?(k(),S("span",i0,[...y[4]||(y[4]=[a("span",{class:"inline-block animate-spin"},"⟳",-1),ae(" 正在停止,请稍候... ",-1)])])):(k(),S(ie,{key:1},[e.inst.status==="running"||e.inst.status==="stopped"?(k(),S("button",{key:0,class:"btn-primary btn-sm",disabled:l.value,onClick:ls(g,["stop"])},[l.value?(k(),S("span",c0,"⟳")):fe("",!0),ae(" "+N(e.inst.status==="stopped"?"重新启动":"重启"),1)],8,a0)):fe("",!0),e.inst.status!=="stopped"?(k(),S("button",{key:1,class:"btn-danger btn-sm",disabled:l.value,onClick:ls(d,["stop"])},[l.value?(k(),S("span",f0,"⟳")):fe("",!0),y[5]||(y[5]=ae(" 停止 ",-1))],8,u0)):fe("",!0),e.inst.status==="stopped"?(k(),S("button",{key:2,class:"btn-ghost btn-sm",disabled:l.value,onClick:ls(h,["stop"])},[l.value?(k(),S("span",p0,"⟳")):fe("",!0),y[6]||(y[6]=ae(" 移除 ",-1))],8,d0)):fe("",!0)],64))])],2))}},h0={class:"card p-12 text-center text-slate-500 dark:text-slate-400"},on={__name:"EmptyState",props:{text:{type:String,default:"暂无数据"}},setup(e){return(t,s)=>(k(),S("div",h0,[s[0]||(s[0]=a("svg",{class:"w-12 h-12 mx-auto mb-3 text-slate-300 dark:text-slate-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})],-1)),a("p",null,N(e.text),1)]))}},m0={class:"space-y-6"},g0={class:"flex flex-wrap items-end justify-between gap-4"},v0={class:"page-subtitle"},b0={class:"grid grid-cols-2 gap-4 lg:grid-cols-4"},x0={class:"card"},_0={class:"mt-2 text-2xl font-bold tabular-nums text-slate-900 dark:text-white"},y0={class:"ml-1 text-sm font-normal muted"},k0={class:"card"},w0={class:"mt-2 text-2xl font-bold tabular-nums text-slate-900 dark:text-white"},C0={class:"card"},S0={class:"mt-2 text-2xl font-bold tabular-nums text-slate-900 dark:text-white"},E0={class:"card"},T0={class:"mt-2 text-2xl font-bold tabular-nums text-slate-900 dark:text-white"},$0={class:"text-sm font-normal muted"},A0={key:1,class:"muted"},I0={class:"mb-3 flex items-center justify-between"},R0={__name:"DashboardView",setup(e){const t=Ot(),s=me(()=>Object.values(t.instances).reduce((l,r)=>l+(r?.online_client_num||0),0)),n=me(()=>{const l=t.instanceList.filter(i=>i.status==="running");return{connected:l.filter(i=>t.instances[i.file_name]?.server_info?.some(f=>f.connected)).length,total:l.length}}),o=me(()=>t.runningCount>0?`运行中 ${t.runningCount} 个实例`:t.startingCount>0?"有实例正在启动...":"全部实例已停止");return(l,r)=>{const i=Un("router-link");return k(),S("div",m0,[a("div",g0,[a("div",null,[r[0]||(r[0]=a("h1",{class:"page-title"},"总览",-1)),a("p",v0,N(o.value),1)]),ue(i,{to:"/config",class:"btn-ghost btn-sm"},{default:Ee(()=>[...r[1]||(r[1]=[ae("管理配置",-1)])]),_:1})]),a("div",b0,[a("div",x0,[r[2]||(r[2]=a("div",{class:"text-xs font-medium muted"},"运行实例",-1)),a("div",_0,[ae(N(O(t).runningCount),1),a("span",y0,"/ "+N(O(t).instanceList.length),1)])]),a("div",k0,[r[3]||(r[3]=a("div",{class:"text-xs font-medium muted"},"配置总数",-1)),a("div",w0,N(O(t).configList.length),1)]),a("div",C0,[r[4]||(r[4]=a("div",{class:"text-xs font-medium muted"},"在线设备",-1)),a("div",S0,N(s.value),1)]),a("div",E0,[r[5]||(r[5]=a("div",{class:"text-xs font-medium muted"},"服务器连接",-1)),a("div",T0,[n.value.total>0?(k(),S(ie,{key:0},[a("span",{class:G(n.value.connected>0?"text-green-600 dark:text-green-400":"text-red-500")},N(n.value.connected),3),a("span",$0,"/ "+N(n.value.total)+" 已连接",1)],64)):(k(),S("span",A0,"-"))])])]),ue(xa),a("div",null,[a("div",I0,[r[7]||(r[7]=a("h2",{class:"text-base font-bold text-slate-900 dark:text-white"},"实例概览",-1)),ue(i,{to:"/instances",class:"text-sm font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400"},{default:Ee(()=>[...r[6]||(r[6]=[ae("查看详情 →",-1)])]),_:1})]),O(t).instanceList.length===0?(k(),Ie(on,{key:0,text:O(t).configList.length===0?"暂无配置,请先新建配置":"暂无运行中的组网,请在上方选择配置启动"},null,8,["text"])):(k(),Ie(rl,{key:1,name:"card-list",tag:"div",class:"grid grid-cols-1 gap-4 md:grid-cols-2"},{default:Ee(()=>[(k(!0),S(ie,null,Te(O(t).instanceList,c=>(k(),Ie(_a,{key:c.file_name,inst:c},null,8,["inst"]))),128))]),_:1}))])])}}},P0={class:"space-y-6"},O0={class:"card"},M0={class:"mb-4 text-lg font-bold text-slate-900 dark:text-white"},L0={class:"ml-2 text-sm font-medium text-indigo-600 dark:text-indigo-400"},N0={class:"grid grid-cols-1 gap-4 text-sm md:grid-cols-2"},V0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},j0={class:"font-mono tabular-nums text-slate-900 dark:text-white"},D0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},B0={class:"font-mono text-slate-900 dark:text-white"},F0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},U0={class:"font-mono text-slate-900 dark:text-white"},H0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},W0={class:"font-mono tabular-nums text-slate-900 dark:text-white"},K0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},G0={class:"font-mono text-indigo-600 dark:text-indigo-400"},q0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},z0=["title"],Z0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},J0={class:"text-slate-900 dark:text-white"},Y0={class:"flex justify-between border-b border-slate-100 pb-2 dark:border-slate-700"},Q0=["title"],X0={class:"mt-4 grid grid-cols-2 gap-3 md:grid-cols-4"},eh={class:"text-sm text-slate-600 dark:text-slate-300"},th={class:"mt-4"},sh={class:"flex flex-wrap gap-2"},nh={key:0,class:"text-xs text-slate-400"},oh={class:"card p-0 overflow-hidden"},lh={class:"custom-scrollbar max-h-[400px] overflow-x-auto"},rh={class:"table"},ih={class:"font-mono"},ah={class:"tabular-nums"},ch={key:0},uh={__name:"InstancesView",setup(e){const t=Ot();return(s,n)=>(k(),S("div",P0,[n[13]||(n[13]=a("div",null,[a("h1",{class:"page-title"},"实例"),a("p",{class:"page-subtitle"},"管理组网实例,点击卡片查看详情")],-1)),ue(xa),O(t).instanceList.length===0?(k(),Ie(on,{key:0,text:"暂无运行中的组网,请在上方选择配置启动"})):(k(),Ie(rl,{key:1,name:"card-list",tag:"div",class:"grid grid-cols-1 gap-4 md:grid-cols-2"},{default:Ee(()=>[(k(!0),S(ie,null,Te(O(t).instanceList,o=>(k(),Ie(_a,{key:o.file_name,inst:o,selectable:""},null,8,["inst"]))),128))]),_:1})),O(t).selectedInstance&&O(t).selectedInfo?(k(),S(ie,{key:2},[a("div",O0,[a("h2",M0,[n[0]||(n[0]=ae(" 网络详情 ",-1)),a("span",L0,N(O(t).selectedConfigName),1)]),a("div",N0,[a("div",V0,[n[1]||(n[1]=a("span",{class:"muted"},"虚拟 IP / 掩码",-1)),a("span",j0,N(O(t).selectedInfo.ip||"-")+" / "+N(O(t).selectedInfo.prefix_len||"-"),1)]),a("div",D0,[n[2]||(n[2]=a("span",{class:"muted"},"网关",-1)),a("span",B0,N(O(t).selectedInfo.gateway||"-"),1)]),a("div",F0,[n[3]||(n[3]=a("span",{class:"muted"},"网络编号",-1)),a("span",U0,N(O(t).selectedInfo.network_code||"-"),1)]),a("div",H0,[n[4]||(n[4]=a("span",{class:"muted"},"MTU",-1)),a("span",W0,N(O(t).selectedInfo.mtu||""),1)]),a("div",K0,[n[5]||(n[5]=a("span",{class:"muted"},"NAT 类型",-1)),a("span",G0,N(O(t).selectedInfo.nat_type||"Unknown"),1)]),a("div",q0,[n[6]||(n[6]=a("span",{class:"muted"},"Public IPv6",-1)),a("span",{class:"max-w-[200px] truncate font-mono text-slate-900 dark:text-white",title:O(t).selectedInfo.public_ipv6},N(O(t).selectedInfo.public_ipv6||"-"),9,z0)]),a("div",Z0,[n[7]||(n[7]=a("span",{class:"muted"},"设备名称",-1)),a("span",J0,N(O(t).selectedInfo.name||"-"),1)]),a("div",Y0,[n[8]||(n[8]=a("span",{class:"muted"},"设备 ID",-1)),a("span",{class:"max-w-[200px] truncate font-mono text-xs text-slate-500 dark:text-slate-400",title:O(t).selectedInfo.device_id},N(O(t).selectedInfo.device_id||"-"),9,Q0)])]),a("div",X0,[(k(),S(ie,null,Te([{key:"encrypt",label:"加密"},{key:"compress",label:"压缩"},{key:"fec",label:"FEC纠错"},{key:"rtx",label:"QUIC传输"}],o=>a("div",{key:o.key,class:"flex items-center gap-2 rounded-lg bg-slate-50 px-3 py-2 dark:bg-slate-800/50"},[a("span",{class:G(["h-2 w-2 rounded-full",O(t).selectedInfo[o.key]?"bg-green-500":"bg-slate-300 dark:bg-slate-600"])},null,2),a("span",eh,N(o.label),1)])),64))]),a("div",th,[n[9]||(n[9]=a("span",{class:"mb-2 block text-sm muted"},"Public IPv4s",-1)),a("div",sh,[(k(!0),S(ie,null,Te(O(t).selectedInfo.public_ipv4s,o=>(k(),S("span",{key:o,class:"rounded border border-slate-200 bg-slate-50 px-2 py-1 font-mono text-xs tabular-nums text-green-700 dark:border-slate-600 dark:bg-slate-800 dark:text-green-300"},N(o),1))),128)),!O(t).selectedInfo.public_ipv4s||O(t).selectedInfo.public_ipv4s.length===0?(k(),S("span",nh,"无")):fe("",!0)])])]),a("div",oh,[n[12]||(n[12]=a("div",{class:"border-b border-slate-200 px-6 py-4 dark:border-slate-700"},[a("h2",{class:"text-lg font-bold text-slate-900 dark:text-white"},"服务器连接列表")],-1)),a("div",lh,[a("table",rh,[n[11]||(n[11]=a("thead",null,[a("tr",null,[a("th",null,"地址"),a("th",null,"状态"),a("th",null,"延迟"),a("th",null,"版本")])],-1)),a("tbody",null,[(k(!0),S(ie,null,Te(O(t).selectedInfo.server_info,(o,l)=>(k(),S("tr",{key:l},[a("td",ih,N(o.server),1),a("td",null,[a("span",{class:G(o.connected?"badge-green":"badge-red")},N(o.connected?"已连接":"未连接"),3)]),a("td",ah,N(o.server_rtt?o.server_rtt+" ms":"-"),1),a("td",null,N(o.server_version||"-"),1)]))),128)),!O(t).selectedInfo.server_info||O(t).selectedInfo.server_info.length===0?(k(),S("tr",ch,[...n[10]||(n[10]=[a("td",{colspan:"4",class:"text-center text-slate-400"},"暂无数据",-1)])])):fe("",!0)])])])])],64)):fe("",!0)]))}},Do=()=>({config_name:"",network_code:"",server:[""],ip:"",mtu:null,rtx:!1,fec:!1,compress:!1,no_punch:!1,input:[],output:[],no_nat:!1,no_tun:!1,port_mapping:[],allow_mapping:!1,device_name:"",device_id:"",tun_name:"",password:"",cert_mode:"skip",fingerprint:"",udp_stun:[],tcp_stun:[],tunnel_port:null}),wr=e=>{const t=Do(),s=e.split(`
`);for(const n of s){const o=n.trim();if(!(!o||o.startsWith("#"))){if(o.includes("config_name")){const l=o.match(/config_name\s*=\s*"([^"]*)"/);l&&(t.config_name=l[1])}else if(o.includes("network_code")){const l=o.match(/network_code\s*=\s*"([^"]*)"/);l&&(t.network_code=l[1])}else if(o.startsWith("server")){const l=o.match(/server\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.server=r.map(i=>i.replace(/"/g,"")))}}else if(o.includes("ip =")){const l=o.match(/ip\s*=\s*"([^"]*)"/);l&&(t.ip=l[1])}else if(o.includes("mtu =")){const l=o.match(/mtu\s*=\s*(\d+)/);l&&(t.mtu=parseInt(l[1]))}else if(o.match(/^rtx\s*=/))t.rtx=o.includes("true");else if(o.match(/^fec\s*=/))t.fec=o.includes("true");else if(o.match(/^compress\s*=/))t.compress=o.includes("true");else if(o.match(/^no_punch\s*=/))t.no_punch=o.includes("true");else if(o.startsWith("input")){const l=o.match(/input\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.input=r.map(i=>i.replace(/"/g,"")))}}else if(o.startsWith("output")){const l=o.match(/output\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.output=r.map(i=>i.replace(/"/g,"")))}}else if(o.match(/^no_nat\s*=/))t.no_nat=o.includes("true");else if(o.match(/^no_tun\s*=/))t.no_tun=o.includes("true");else if(o.startsWith("port_mapping")){const l=o.match(/port_mapping\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.port_mapping=r.map(i=>i.replace(/"/g,"")))}}else if(o.match(/^allow_mapping\s*=/))t.allow_mapping=o.includes("true");else if(o.includes("device_name")){const l=o.match(/device_name\s*=\s*"([^"]*)"/);l&&(t.device_name=l[1])}else if(o.includes("device_id")){const l=o.match(/device_id\s*=\s*"([^"]*)"/);l&&(t.device_id=l[1])}else if(o.includes("tun_name")){const l=o.match(/tun_name\s*=\s*"([^"]*)"/);l&&(t.tun_name=l[1])}else if(o.includes("password =")){const l=o.match(/password\s*=\s*"([^"]*)"/);l&&(t.password=l[1])}else if(o.includes("cert_mode")){const l=o.match(/cert_mode\s*=\s*"([^"]*)"/);if(l){const r=l[1];r.startsWith("finger:")?(t.cert_mode="finger",t.fingerprint=r.substring(7)):t.cert_mode=r}}else if(o.startsWith("udp_stun")){const l=o.match(/udp_stun\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.udp_stun=r.map(i=>i.replace(/"/g,"")))}}else if(o.startsWith("tcp_stun")){const l=o.match(/tcp_stun\s*=\s*\[(.*)\]/);if(l){const r=l[1].match(/"([^"]*)"/g);r&&(t.tcp_stun=r.map(i=>i.replace(/"/g,"")))}}}}return t},xo=e=>{let t="";e.config_name&&(t+=`# 配置名称
config_name = "${e.config_name}"
`),t+=`
# --- 网络配置 ---
`,t+=`# 网络编号,相同网络编号的会组在同一个虚拟网 (必填)
`,t+=`network_code = "${e.network_code}"
`;const s=e.server.filter(c=>c.trim());s.length>0&&(t+=`# 服务器地址列表(支持 quic / tcp / wss / dynamic) (必填)
`,t+=`# dynamic 协议使用dns txt解析记录值
`,t+=`server = [${s.map(c=>`"${c}"`).join(", ")}]
`),e.ip&&(t+=`
# 自定义虚拟 IP (可选)
`,t+=`ip = "${e.ip}"
`),e.rtx&&(t+=`
# 是否启用quic优化传输 (默认 false)
`,t+=`# 开启后传输过程几乎不会丢包,但是延迟可能会有波动
`,t+=`rtx = true
`),e.fec&&(t+=`
# 是否启用 FEC 前向纠错 (默认 false)
`,t+=`# 开启后可以减少丢包率,损失带宽但是延迟比较稳定,带宽充足时可以使用此功能
`,t+=`fec = true
`),e.no_punch&&(t+=`
# 是否关闭 P2P 打洞 (默认 false)
`,t+=`no_punch = true
`),e.compress&&(t+=`
# 是否启用 LZ4 压缩 (默认 false)
`,t+=`compress = true
`);const n=e.input.filter(c=>c.trim());n.length>0&&(t+=`
# 入栈监听网段 (逗号分隔的 CIDR 和目标 IP),用于点对网,将指定网段的流量发送到目标节点
`,t+=`# 例如192.168.0.0/24,10.26.0.2 表示将192.168.0.0/24网段的数据转发到10.26.0.2
`,t+=`input = [${n.map(c=>`"${c}"`).join(", ")}]
`);const o=e.output.filter(c=>c.trim());o.length>0&&(t+=`
# 出栈允许网段,用于点对网,允许指定网段的转发
`,t+=`output = [${o.map(c=>`"${c}"`).join(", ")}]
`),e.no_nat&&(t+=`
# 是否关闭内置子网NAT,关闭后需要配置网卡转发,否则无法使用点对网
`,t+=`# 通常关闭内置子网NAT,使用系统的网卡转发,点对网性能会更好
`,t+=`no_nat = true
`),e.no_tun&&(t+=`
# 是否关闭TUN虚拟网卡,关闭后只能充当流量出口或者进行端口映射,关闭后无需管理员权限
`,t+=`no_tun = true
`);const l=e.port_mapping.filter(c=>c.trim());l.length>0&&(t+=`
# 端口映射,格式为:协议://本地监听地址-目标虚拟IP-目标映射地址
`,t+=`# 端口映射用于在本地监听指定端口,并将收到的网络流量经由指定虚拟节点转发到目标地址
`,t+=`# 例如: tcp://0.0.0.0:81-10.0.0.2-10.0.0.2:80 表示将本地tcp的81端口的数据转发到10.0.0.2:80
`,t+=`# 例如: tcp://0.0.0.0:81-10.0.0.2-192.168.1.10:80 则表示将本地tcp的81端口的数据经过10.0.0.2转到192.168.1.10:80
`,t+=`# 例如: tcp://0.0.0.0:81-10.0.0.2-anyonehost:80 则表示将本地tcp的81端口的数据经过10.0.0.2转到anyonehost:80
`,t+=`port_mapping = [${l.map(c=>`"${c}"`).join(", ")}]
`),e.allow_mapping&&(t+=`
# 是否允许作为端口映射出口,开启后其他设备才可使用本设备的ip为"目标虚拟IP"
`,t+=`# 开启后虚拟网络其他设备可以使用此设备当跳板访问其他网络
`,t+=`allow_mapping = true
`),e.mtu&&(t+=`
# MTU 设置
`,t+=`mtu = ${e.mtu}
`),t+=`
# --- 设备配置 ---
`,e.device_name&&(t+=`
# 设备名称 (可选,默认读取本机 hostname)
`,t+=`device_name = "${e.device_name}"
`),e.device_id&&(t+=`
# 设备 ID (可选,不填自动生成,不同设备ID不能相同)
`,t+=`device_id = "${e.device_id}"
`),e.tun_name&&(t+=`
# 虚拟网卡名称
`,t+=`tun_name = "${e.tun_name}"
`),t+=`
# --- 安全配置 ---
`,e.password&&(t+=`
# 组网加密密码 (可选)
`,t+=`password = "${e.password}"
`),e.cert_mode&&e.cert_mode!=="skip"&&(t+=`
# 证书校验方式:
`,t+=`# skip 跳过验证(默认)
`,t+=`# standard 使用系统证书验证
`,t+=`# finger 使用证书指纹验证,服务端启动时日志会输出指纹
`,e.cert_mode==="finger"&&e.fingerprint?t+=`cert_mode = "finger:${e.fingerprint}"
`:t+=`cert_mode = "${e.cert_mode}"
`);const r=e.udp_stun.filter(c=>c.trim());r.length>0&&(t+=`
# 自定义UDP STUN地址,不设置则用默认stun
`,t+=`udp_stun = [${r.map(c=>`"${c}"`).join(", ")}]
`);const i=e.tcp_stun.filter(c=>c.trim());return i.length>0&&(t+=`
# 自定义TCP STUN地址,不设置则用默认stun
`,t+=`tcp_stun = [${i.map(c=>`"${c}"`).join(", ")}]
`),t},fh=`# config_name = "配置名称"
# --- 网络配置 ---
# 网络编号,相同网络编号的会组在同一个虚拟网 (必填)
network_code = "your_network_code"
# 服务器地址列表(支持 quic / tcp / wss / dynamic) (必填)
# dynamic 协议使用dns txt解析记录值
server = ["quic://1.2.3.4:29872"]
# ===简单使用以下参数可以不动===
# 自定义虚拟 IP (可选)
# ip = "10.10.0.2"
# 是否启用quic优化传输 (默认 false,设置为true时开启)
# 开启后传输过程几乎不会丢包,但是延迟会有波动
# rtx = false
# 是否启用 FEC 前向纠错,损失一定带宽来提升网络稳定性(默认 false,设置为true时开启)
# 开启后可以减少丢包率,损失带宽但是延迟比较稳定,带宽充足时可以使用此功能
# fec = false
# 是否关闭 P2P 打洞 (默认 false,设置为true时关闭)
# no_punch = false
# 是否启用 LZ4 压缩 (默认 false,设置为true时开启)
# compress = false
# 入栈监听网段 (逗号分隔的 CIDR 和目标 IP),用于点对网,将指定网段的流量发送到目标节点
# input = ["192.168.0.0/24,10.26.0.2", "192.168.1.0/24,10.26.0.3"]
# 出栈允许网段,用于点对网,允许指定网段的转发
# output = ["0.0.0.0/0"]
# 是否关闭内置子网NAT,关闭(设为true)后需要配置网卡转发,否则无法使用点对网。通常关闭内置子网NAT,使用系统的网卡转发,点对网性能会更好
# no_nat = false
# 是否关闭TUN虚拟网卡,关闭(设为true)后只能充当流量出口或者进行端口映射,关闭后无需管理员权限
# no_tun = false
# 端口映射,格式为:协议://本地监听地址-目标虚拟IP-目标映射地址
# 端口映射用于在本地监听指定端口,并将收到的网络流量经由指定虚拟节点转发到目标地址,从而实现跨网络或内网服务访问
# 例如 port_mapping = ["tcp://0.0.0.0:81-10.0.0.2-10.0.0.2:80"]
# tcp://0.0.0.0:81-10.0.0.2-10.0.0.2:80 则表示将本地tcp的81端口的数据转发到10.0.0.2:80
# tcp://0.0.0.0:81-10.0.0.2-192.168.1.10:80 则表示将本地tcp的81端口的数据经过10.0.0.2转到192.168.1.10:80
# tcp://0.0.0.0:81-10.0.0.2-anyonehost:80 则表示将本地tcp的81端口的数据经过10.0.0.2转到anyonehost:80
# port_mapping = []
# 是否允许作为端口映射出口,开启(设置为true)后其他设备才可使用本设备的ip为"目标虚拟IP"
# 开启后虚拟网络其他设备可以使用此设备当跳板访问其他网络
# allow_mapping = false
# MTU 设置
# mtu = 1400
# --- 设备配置 ---
# 设备名称 (可选,默认读取本机 hostname)
# device_name = "my-device"
# 设备 ID (可选,不填自动生成,不同设备ID不能相同)
# device_id = "device-id-xxxx"
# 虚拟网卡名称
# tun_name = "vnt-tun"
# --- 安全配置 ---
# 加密密码 (可选)
# password = "123456"
# 证书校验方式:
# skip 跳过验证(默认)
# standard 使用系统证书验证
# finger 使用证书指纹验证,服务端启动时日志会输出指纹,
# 例如 finger:3bdd8675606837cdf95d5e13445606315762315a78555f9da652940a25feaec1
# cert_mode = "skip"
# --- 其他配置 ---
# 自定义stun地址,分别用于udp打洞和tcp打洞,需要单独配置,不设置则用默认stun
# udp_stun = ["stun.chat.bilibili.com"]
# tcp_stun = ["stun.nextcloud.com:443"]`,dh={class:"text-lg font-bold text-slate-900 dark:text-white"},ph={class:"flex items-center gap-4"},hh={class:"flex rounded-lg border border-slate-300 bg-slate-100 p-1 dark:border-slate-600 dark:bg-slate-800"},mh={key:0,class:"text-sm text-slate-500 font-mono hidden md:block"},gh={class:"h-full overflow-y-auto scrollbar-hide p-6"},vh={class:"max-w-4xl mx-auto space-y-6"},bh={class:"card"},xh={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},_h={class:"mt-4"},yh={class:"space-y-2"},kh=["onUpdate:modelValue"],wh=["onClick"],Ch={class:"card"},Sh={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Eh={class:"card"},Th={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},$h={class:"card"},Ah={class:"space-y-4"},Ih={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Rh={key:0},Ph={class:"card"},Oh={class:"space-y-4"},Mh={class:"space-y-2"},Lh=["onUpdate:modelValue"],Nh=["onClick"],Vh={class:"space-y-2"},jh=["onUpdate:modelValue"],Dh=["onClick"],Bh={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Fh={class:"card"},Uh={class:"space-y-4"},Hh={class:"space-y-2"},Wh=["onUpdate:modelValue"],Kh=["onClick"],Gh={class:"card"},qh={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},zh={class:"card"},Zh={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Jh={class:"space-y-2"},Yh=["onUpdate:modelValue"],Qh=["onClick"],Xh={class:"space-y-2"},em=["onUpdate:modelValue"],tm=["onClick"],sm={class:"h-full"},nm={class:"flex-1 text-left text-xs text-slate-500"},om={key:0},lm={key:1},Zt="h-5 w-5 rounded border-slate-300 bg-white text-indigo-600 focus:ring-indigo-500 dark:border-slate-600 dark:bg-slate-700",Jt="flex cursor-pointer items-center justify-between gap-2 rounded-lg border border-slate-200 bg-slate-50 p-3 transition-colors hover:bg-slate-100 dark:border-slate-700 dark:bg-slate-800/50 dark:hover:bg-slate-800",ps="shrink-0 rounded-lg bg-red-50 px-3 py-2 text-red-500 transition-colors hover:bg-red-100 dark:bg-red-900/20 dark:text-red-500 dark:hover:bg-red-900/40",hs="flex w-full items-center justify-center gap-1 rounded-lg bg-slate-100 px-3 py-2 text-sm text-slate-600 transition-colors hover:bg-slate-200 dark:bg-slate-700/50 dark:text-slate-300 dark:hover:bg-slate-700",Nt="text-md mb-4 flex items-center font-bold text-slate-900 dark:text-white",rm={__name:"ConfigEditor",props:{show:{type:Boolean,default:!1},fileName:{type:String,default:null}},emits:["close","saved"],setup(e,{emit:t}){const s=e,n=t,o=as(),l=se(""),r=se(""),i=se("new"),c=se("form"),f=se(""),u=se(!1),d=se(!1),g=se(!1),h=se(Do()),C=[{value:"skip",label:"跳过验证(默认)"},{value:"standard",label:"系统证书验证"},{value:"finger",label:"证书指纹验证"}];Ve(()=>s.show,async w=>{if(w)if(r.value=s.fileName||"",i.value=s.fileName?"edit":"new",c.value="form",u.value=!1,d.value=!1,s.fileName)try{const p=await Td(s.fileName);l.value=p,f.value=p,g.value=!0,h.value=wr(p),xt(()=>{g.value=!1})}catch(p){o.toast.error("获取配置失败: "+p.message),n("close")}else f.value="",h.value=Do(),l.value=fh});const y=()=>{c.value==="toml"?(c.value="form",g.value=!0,h.value=wr(l.value),xt(()=>{g.value=!1})):c.value="form"},L=()=>{c.value==="form"&&(d.value?(l.value=xo(h.value),d.value=!1):f.value&&!u.value?l.value=f.value:l.value=xo(h.value)),c.value="toml"};Ve(l,(w,p)=>{c.value==="toml"&&p!==void 0&&(u.value=!0)}),Ve(h,()=>{c.value==="form"&&s.show&&!g.value&&(d.value=!0)},{deep:!0});const $=async()=>{try{let w=l.value;if(c.value==="form"){if(!h.value.network_code.trim()){o.toast.error("请填写网络编号");return}if(h.value.server.filter(b=>b.trim()).length===0){o.toast.error("请至少填写一个服务器地址");return}w=xo(h.value)}await $d(r.value||null,w),o.toast.success("配置已保存"),n("close"),n("saved")}catch(w){o.toast.error("保存失败: "+w.message)}};return(w,p)=>(k(),Ie(pl,{show:e.show,"mask-closable":!1,"panel-class":"w-full max-w-6xl h-[85vh]",onClose:p[26]||(p[26]=b=>n("close"))},{header:Ee(()=>[a("h3",dh,N(i.value==="new"?"新建配置":"编辑配置"),1),a("div",ph,[a("div",hh,[a("button",{onClick:y,class:G([c.value==="form"?"bg-white text-slate-900 shadow-sm dark:bg-indigo-600 dark:text-white":"text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white","px-4 py-1.5 rounded text-sm font-medium transition-colors flex items-center"])},[...p[27]||(p[27]=[a("svg",{class:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1),ae(" 表单模式 ",-1)])],2),a("button",{onClick:L,class:G([c.value==="toml"?"bg-white text-slate-900 shadow-sm dark:bg-indigo-600 dark:text-white":"text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white","px-4 py-1.5 rounded text-sm font-medium transition-colors flex items-center"])},[...p[28]||(p[28]=[a("svg",{class:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})],-1),ae(" TOML模式 ",-1)])],2)]),r.value?(k(),S("div",mh,N(r.value),1)):fe("",!0)])]),body:Ee(()=>[_e(a("div",gh,[a("div",vh,[a("div",bh,[a("h4",{class:G(Nt)},[...p[29]||(p[29]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1),ae(" 基础配置 ",-1)])]),a("div",xh,[a("div",null,[p[30]||(p[30]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"配置名称",-1)),_e(a("input",{"onUpdate:modelValue":p[0]||(p[0]=b=>h.value.config_name=b),type:"text",placeholder:"例如: 我的VPN配置",class:"input"},null,512),[[Oe,h.value.config_name]])]),a("div",null,[p[31]||(p[31]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ae(" 网络编号 "),a("span",{class:"text-red-500"},"*")],-1)),_e(a("input",{"onUpdate:modelValue":p[1]||(p[1]=b=>h.value.network_code=b),type:"text",placeholder:"例如: my_network",required:"",class:"input"},null,512),[[Oe,h.value.network_code]])])]),a("div",_h,[p[34]||(p[34]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ae(" 服务器地址 "),a("span",{class:"text-red-500"},"*"),a("span",{class:"text-xs text-slate-500 ml-2"},"支持 quic:// tcp:// wss:// dynamic://")],-1)),a("div",yh,[(k(!0),S(ie,null,Te(h.value.server,(b,_)=>(k(),S("div",{key:_,class:"flex gap-2"},[_e(a("input",{"onUpdate:modelValue":j=>h.value.server[_]=j,type:"text",placeholder:"例如: quic://1.2.3.4:29872",class:"input flex-1"},null,8,kh),[[Oe,h.value.server[_]]]),h.value.server.length>1?(k(),S("button",{key:0,onClick:j=>h.value.server.splice(_,1),class:G(ps)},[...p[32]||(p[32]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)])],8,wh)):fe("",!0)]))),128)),a("button",{onClick:p[2]||(p[2]=b=>h.value.server.push("")),class:G(hs)},[...p[33]||(p[33]=[a("svg",{class:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),ae(" 添加服务器 ",-1)])])])])]),a("div",Ch,[a("h4",{class:G(Nt)},[...p[35]||(p[35]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})],-1),ae(" 网络设置 ",-1)])]),a("div",Sh,[a("div",null,[p[36]||(p[36]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ae(" 自定义虚拟IP "),a("span",{class:"text-xs text-slate-500 ml-1"},"(可选)")],-1)),_e(a("input",{"onUpdate:modelValue":p[3]||(p[3]=b=>h.value.ip=b),type:"text",placeholder:"例如: 10.26.0.2",class:"input"},null,512),[[Oe,h.value.ip]])]),a("div",null,[p[37]||(p[37]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"MTU",-1)),_e(a("input",{"onUpdate:modelValue":p[4]||(p[4]=b=>h.value.mtu=b),type:"number",placeholder:"1380",class:"input"},null,512),[[Oe,h.value.mtu,void 0,{number:!0}]])]),a("div",null,[p[38]||(p[38]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"隧道端口",-1)),_e(a("input",{"onUpdate:modelValue":p[5]||(p[5]=b=>h.value.tunnel_port=b),type:"number",placeholder:"0 (自动分配)",class:"input"},null,512),[[Oe,h.value.tunnel_port,void 0,{number:!0}]])])])]),a("div",Eh,[a("h4",{class:G(Nt)},[...p[39]||(p[39]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})],-1),ae(" 传输优化 ",-1)])]),a("div",Th,[a("label",{class:G(Jt)},[p[40]||(p[40]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"QUIC传输优化"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"重传丢包")],-1)),_e(a("input",{"onUpdate:modelValue":p[6]||(p[6]=b=>h.value.rtx=b),type:"checkbox",class:G(Zt)},null,512),[[zt,h.value.rtx]])]),a("label",{class:G(Jt)},[p[41]||(p[41]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"FEC前向纠错"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"损失部分带宽提升稳定性")],-1)),_e(a("input",{"onUpdate:modelValue":p[7]||(p[7]=b=>h.value.fec=b),type:"checkbox",class:G(Zt)},null,512),[[zt,h.value.fec]])]),a("label",{class:G(Jt)},[p[42]||(p[42]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"LZ4压缩"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"减少传输数据量")],-1)),_e(a("input",{"onUpdate:modelValue":p[8]||(p[8]=b=>h.value.compress=b),type:"checkbox",class:G(Zt)},null,512),[[zt,h.value.compress]])]),a("label",{class:G(Jt)},[p[43]||(p[43]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"关闭P2P打洞"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"仅通过服务器中转")],-1)),_e(a("input",{"onUpdate:modelValue":p[9]||(p[9]=b=>h.value.no_punch=b),type:"checkbox",class:G(Zt)},null,512),[[zt,h.value.no_punch]])])])]),a("div",$h,[a("h4",{class:G(Nt)},[...p[44]||(p[44]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})],-1),ae(" 安全配置 ",-1)])]),a("div",Ah,[a("div",Ih,[a("div",null,[p[45]||(p[45]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"组网加密密码(连接公共服务器时建议填写,同一组网密码需要相同)",-1)),_e(a("input",{"onUpdate:modelValue":p[10]||(p[10]=b=>h.value.password=b),type:"password",placeholder:"留空则不加密",class:"input"},null,512),[[Oe,h.value.password]])]),a("div",null,[p[46]||(p[46]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"服务端证书校验模式",-1)),ue(ml,{modelValue:h.value.cert_mode,"onUpdate:modelValue":p[11]||(p[11]=b=>h.value.cert_mode=b),options:C,"aria-label":"服务端证书校验模式"},null,8,["modelValue"])])]),h.value.cert_mode==="finger"?(k(),S("div",Rh,[p[47]||(p[47]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ae(" 证书指纹 "),a("span",{class:"text-xs text-slate-500 ml-1"},"(服务端启动时日志会输出指纹)")],-1)),_e(a("input",{"onUpdate:modelValue":p[12]||(p[12]=b=>h.value.fingerprint=b),type:"text",placeholder:"例如: 3bdd8675606837cdf95d5e13445606315762315a78555f9da652940a25feaec1",class:"input font-mono text-sm"},null,512),[[Oe,h.value.fingerprint]])])):fe("",!0)])]),a("div",Ph,[a("h4",{class:G(Nt)},[...p[48]||(p[48]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 01-.806-.98L15 9m0 0V7m0 2v6"})],-1),ae(" NAT与路由 (点对网) ",-1)])]),a("div",Oh,[a("div",null,[p[50]||(p[50]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ae(" 入栈网段 "),a("span",{class:"text-xs text-slate-500 ml-1"},"格式: CIDR,目标IP")],-1)),a("div",Mh,[(k(!0),S(ie,null,Te(h.value.input,(b,_)=>(k(),S("div",{key:_,class:"flex gap-2"},[_e(a("input",{"onUpdate:modelValue":j=>h.value.input[_]=j,type:"text",placeholder:"例如: 192.168.0.0/24,10.26.0.2",class:"input flex-1"},null,8,Lh),[[Oe,h.value.input[_]]]),a("button",{onClick:j=>h.value.input.splice(_,1),class:G(ps)},[...p[49]||(p[49]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Nh)]))),128)),a("button",{onClick:p[13]||(p[13]=b=>h.value.input.push("")),class:G(hs)}," + 添加入栈网段 ")])]),a("div",null,[p[52]||(p[52]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ae(" 出栈网段 "),a("span",{class:"text-xs text-slate-500 ml-1"},"格式: CIDR (允许转发的网段)")],-1)),a("div",Vh,[(k(!0),S(ie,null,Te(h.value.output,(b,_)=>(k(),S("div",{key:_,class:"flex gap-2"},[_e(a("input",{"onUpdate:modelValue":j=>h.value.output[_]=j,type:"text",placeholder:"例如: 0.0.0.0/0",class:"input flex-1"},null,8,jh),[[Oe,h.value.output[_]]]),a("button",{onClick:j=>h.value.output.splice(_,1),class:G(ps)},[...p[51]||(p[51]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Dh)]))),128)),a("button",{onClick:p[14]||(p[14]=b=>h.value.output.push("")),class:G(hs)}," + 添加出栈网段 ")])]),a("div",Bh,[a("label",{class:G(Jt)},[p[53]||(p[53]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"关闭内置NAT"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"使用系统网卡转发")],-1)),_e(a("input",{"onUpdate:modelValue":p[15]||(p[15]=b=>h.value.no_nat=b),type:"checkbox",class:G(Zt)},null,512),[[zt,h.value.no_nat]])]),a("label",{class:G(Jt)},[p[54]||(p[54]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"关闭TUN网卡"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"仅作流量出口或端口映射")],-1)),_e(a("input",{"onUpdate:modelValue":p[16]||(p[16]=b=>h.value.no_tun=b),type:"checkbox",class:G(Zt)},null,512),[[zt,h.value.no_tun]])])])])]),a("div",Fh,[a("h4",{class:G(Nt)},[...p[55]||(p[55]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1),ae(" 端口映射 ",-1)])]),a("div",Uh,[a("div",null,[p[57]||(p[57]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},[ae(" 映射规则 "),a("span",{class:"text-xs text-slate-500 ml-1"},"格式: 协议://监听地址-虚拟IP-目标地址")],-1)),a("div",Hh,[(k(!0),S(ie,null,Te(h.value.port_mapping,(b,_)=>(k(),S("div",{key:_,class:"flex gap-2"},[_e(a("input",{"onUpdate:modelValue":j=>h.value.port_mapping[_]=j,type:"text",placeholder:"例如: tcp://0.0.0.0:81-10.0.0.2-10.0.0.2:80",class:"input flex-1 font-mono"},null,8,Wh),[[Oe,h.value.port_mapping[_]]]),a("button",{onClick:j=>h.value.port_mapping.splice(_,1),class:G(ps)},[...p[56]||(p[56]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Kh)]))),128)),a("button",{onClick:p[17]||(p[17]=b=>h.value.port_mapping.push("")),class:G(hs)}," + 添加映射规则 ")])]),a("label",{class:G(Jt)},[p[58]||(p[58]=a("div",{class:"flex-1"},[a("div",{class:"text-sm font-medium text-slate-800 dark:text-white"},"允许作为映射出口"),a("div",{class:"text-xs text-slate-400 mt-0.5"},"允许其他设备使用本机作跳板")],-1)),_e(a("input",{"onUpdate:modelValue":p[18]||(p[18]=b=>h.value.allow_mapping=b),type:"checkbox",class:G(Zt)},null,512),[[zt,h.value.allow_mapping]])])])]),a("div",Gh,[a("h4",{class:G(Nt)},[...p[59]||(p[59]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})],-1),ae(" 设备配置 ",-1)])]),a("div",qh,[a("div",null,[p[60]||(p[60]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"设备名称",-1)),_e(a("input",{"onUpdate:modelValue":p[19]||(p[19]=b=>h.value.device_name=b),type:"text",placeholder:"默认为主机名",class:"input"},null,512),[[Oe,h.value.device_name]])]),a("div",null,[p[61]||(p[61]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"设备ID",-1)),_e(a("input",{"onUpdate:modelValue":p[20]||(p[20]=b=>h.value.device_id=b),type:"text",placeholder:"自动生成",class:"input"},null,512),[[Oe,h.value.device_id]])]),a("div",null,[p[62]||(p[62]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"虚拟网卡名",-1)),_e(a("input",{"onUpdate:modelValue":p[21]||(p[21]=b=>h.value.tun_name=b),type:"text",placeholder:"默认为vnt-tun",class:"input"},null,512),[[Oe,h.value.tun_name]])])])]),a("div",zh,[a("h4",{class:G(Nt)},[...p[63]||(p[63]=[a("svg",{class:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),ae(" STUN配置 (高级) ",-1)])]),a("div",Zh,[a("div",null,[p[65]||(p[65]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"UDP STUN服务器",-1)),a("div",Jh,[(k(!0),S(ie,null,Te(h.value.udp_stun,(b,_)=>(k(),S("div",{key:_,class:"flex gap-2"},[_e(a("input",{"onUpdate:modelValue":j=>h.value.udp_stun[_]=j,type:"text",placeholder:"例如: stun.l.google.com:19302",class:"input flex-1"},null,8,Yh),[[Oe,h.value.udp_stun[_]]]),a("button",{onClick:j=>h.value.udp_stun.splice(_,1),class:G(ps)},[...p[64]||(p[64]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Qh)]))),128)),a("button",{onClick:p[22]||(p[22]=b=>h.value.udp_stun.push("")),class:G(hs)}," + 添加UDP STUN ")])]),a("div",null,[p[67]||(p[67]=a("label",{class:"mb-2 block text-sm font-medium text-slate-600 dark:text-slate-300"},"TCP STUN服务器",-1)),a("div",Xh,[(k(!0),S(ie,null,Te(h.value.tcp_stun,(b,_)=>(k(),S("div",{key:_,class:"flex gap-2"},[_e(a("input",{"onUpdate:modelValue":j=>h.value.tcp_stun[_]=j,type:"text",placeholder:"例如: stun.nextcloud.com:443",class:"input flex-1"},null,8,em),[[Oe,h.value.tcp_stun[_]]]),a("button",{onClick:j=>h.value.tcp_stun.splice(_,1),class:G(ps)},[...p[66]||(p[66]=[a("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,tm)]))),128)),a("button",{onClick:p[23]||(p[23]=b=>h.value.tcp_stun.push("")),class:G(hs)}," + 添加TCP STUN ")])])])])])],512),[[Gl,c.value==="form"]]),_e(a("div",sm,[_e(a("textarea",{"onUpdate:modelValue":p[24]||(p[24]=b=>l.value=b),class:"h-full w-full resize-none bg-slate-50 p-4 font-mono text-sm text-slate-800 focus:outline-none dark:bg-slate-950 dark:text-slate-200",spellcheck:"false",placeholder:"# 在此处输入 TOML 配置..."},null,512),[[Oe,l.value]])],512),[[Gl,c.value==="toml"]])]),footer:Ee(()=>[a("div",nm,[c.value==="form"?(k(),S("span",om,"填写完成后保存即可生成配置文件")):(k(),S("span",lm,"* 请使用标准 TOML 格式"))]),a("button",{class:"btn-ghost",onClick:p[25]||(p[25]=b=>n("close"))},"取消"),a("button",{class:"btn-primary",onClick:$},"保存配置")]),_:1},8,["show"]))}},im={class:"space-y-6"},am={class:"flex items-end justify-between gap-4"},cm={key:1,class:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"},um=["onClick"],fm={key:0,class:"absolute right-0 top-0 rounded-bl bg-green-500 px-2 py-1 text-xs text-white"},dm={key:1,class:"absolute right-0 top-0 rounded-bl bg-indigo-500 px-2 py-1 text-xs text-white"},pm={class:"flex items-start"},hm={class:"overflow-hidden"},mm=["title"],gm=["title"],vm={class:"config-card-actions mt-4 flex justify-end transition-opacity"},bm=["onClick"],xm=["onClick"],_m={__name:"ConfigView",setup(e){const t=Ot(),s=as(),n=se(!1),o=se(null),l=u=>{const d=t.instanceList.find(g=>g.file_name===u);return d?d.status:null},r=u=>{const d=l(u);return d==="running"?"ring-2 ring-green-500/60":d==="starting"?"ring-2 ring-indigo-500/60":""},i=u=>{o.value=u,n.value=!0},c=()=>{t.fetchConfigList()},f=async u=>{if(await s.confirm({title:"删除配置",message:`确定要删除配置 ${u} 吗?`,danger:!0,confirmText:"删除"}))try{await Ad(u),s.toast.success("配置已删除"),t.fetchConfigList()}catch(g){s.toast.error(g.message)}};return _t(()=>t.fetchConfigList()),(u,d)=>(k(),S("div",im,[a("div",am,[d[3]||(d[3]=a("div",null,[a("h1",{class:"page-title"},"配置"),a("p",{class:"page-subtitle"},"管理组网配置文件")],-1)),a("button",{class:"btn-primary",onClick:d[0]||(d[0]=g=>i(null))},[...d[2]||(d[2]=[a("svg",{class:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 4v16m8-8H4"})],-1),ae(" 新建配置 ",-1)])])]),O(t).configList.length===0?(k(),Ie(on,{key:0,text:"暂无配置,点击右上角新建"})):(k(),S("div",cm,[(k(!0),S(ie,null,Te(O(t).configList,g=>(k(),S("div",{key:g.file_name,class:G([r(g.file_name),"card group relative flex min-h-[140px] cursor-pointer flex-col justify-between overflow-hidden"]),onClick:h=>i(g.file_name)},[l(g.file_name)==="running"?(k(),S("div",fm," 运行中 ")):l(g.file_name)==="starting"?(k(),S("div",dm," 启动中 ")):fe("",!0),a("div",pm,[d[4]||(d[4]=a("div",{class:"mr-3 mt-1 rounded-lg bg-indigo-50 p-2 text-indigo-600 dark:bg-indigo-500/10 dark:text-indigo-400"},[a("svg",{class:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})])],-1)),a("div",hm,[a("h3",{class:"truncate text-lg font-bold text-slate-900 dark:text-white",title:g.config_name},N(g.config_name||"Unnamed"),9,mm),a("p",{class:"truncate font-mono text-xs text-slate-400",title:g.file_name},N(g.file_name),9,gm)])]),a("div",vm,[a("button",{class:"mr-4 text-sm text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",onClick:ls(h=>i(g.file_name),["stop"])}," 编辑 ",8,bm),a("button",{class:"text-sm text-red-500 hover:text-red-400",onClick:ls(h=>f(g.file_name),["stop"])}," 删除 ",8,xm)])],10,um))),128))])),ue(rm,{show:n.value,"file-name":o.value,onClose:d[1]||(d[1]=g=>n.value=!1),onSaved:c},null,8,["show","file-name"])]))}},ym=hl(_m,[["__scopeId","data-v-b7dce6ea"]]),km=e=>{if(!e)return"-";const t=new Date(e*1e3),s=n=>n<10?"0"+n:n;return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}:${s(t.getSeconds())}`},Cr=e=>{if(e===0||e===void 0||e===null)return"0B";const t=["B","KB","MB","GB","TB"];let s=0,n=e;for(;n>=1024&&s<t.length-1;)n/=1024,s++;return s===0?n+t[s]:n.toFixed(2)+t[s]},Bo=e=>{if(e===0||e===void 0||e===null)return"0B/s";const t=["B/s","KB/s","MB/s","GB/s"];let s=0,n=e;for(;n>=1024&&s<t.length-1;)n/=1024,s++;return s===0?n+t[s]:n.toFixed(2)+t[s]},wm=e=>{const t=[1024,10240,102400,1048576,10485760,104857600,1073741824];for(const s of t)if(e<=s)return s;return Math.ceil(e/(1024*1024*1024))*1024*1024*1024},ya={__name:"StatusDot",props:{status:{type:String,default:"stopped"},size:{type:String,default:"w-2.5 h-2.5"}},setup(e){const t=s=>s==="running"?"bg-green-500":s==="starting"?"bg-blue-500 animate-pulse":"bg-slate-400 dark:bg-slate-500";return(s,n)=>(k(),S("span",{class:G(["rounded-full inline-block shrink-0",[e.size,t(e.status)]])},null,2))}},Cm={class:"flex items-center gap-4 mb-2 text-xs text-slate-400"},Sm={class:"ml-auto"},Em={__name:"SpeedChart",props:{history:{type:Object,required:!0},size:{type:Number,default:60}},setup(e,{expose:t}){const s=e,n=se(null),o=se(""),l=()=>{const r=n.value;if(!r)return;const i=r.getContext("2d"),c=s.history?s.history.tx:[],f=s.history?s.history.rx:[],u=s.size,d=window.devicePixelRatio||1,g=r.getBoundingClientRect();if(g.width===0)return;r.width=g.width*d,r.height=g.height*d,i.setTransform(d,0,0,d,0,0);const h=g.width,C=g.height,L=document.documentElement.classList.contains("dark")?{bg:"#0c1222",grid:"rgba(71, 85, 105, 0.3)",rx:"#60a5fa",rxFill:"rgba(96, 165, 250, 0.15)",tx:"#4ade80",txFill:"rgba(74, 222, 128, 0.15)"}:{bg:"#f8fafc",grid:"rgba(148, 163, 184, 0.35)",rx:"#3b82f6",rxFill:"rgba(59, 130, 246, 0.12)",tx:"#22c55e",txFill:"rgba(34, 197, 94, 0.12)"},$=8,w=4,p=0,_=h-p-0,j=C-$-w;i.fillStyle=L.bg,i.fillRect(0,0,h,C);const B=[...c,...f];let H=B.length>0?Math.max(...B):0;H<1024&&(H=1024);const M=wm(H);o.value="峰值: "+Bo(M);const z=4;i.strokeStyle=L.grid,i.lineWidth=1;for(let Z=0;Z<=z;Z++){const R=$+j/z*Z;i.beginPath(),i.moveTo(p,R),i.lineTo(p+_,R),i.stroke()}const oe=6;for(let Z=0;Z<=oe;Z++){const R=p+_/oe*Z;i.beginPath(),i.moveTo(R,$),i.lineTo(R,$+j),i.stroke()}const F=(Z,R,ee)=>{if(Z.length<2)return;const ce=_/(u-1),te=u-Z.length;i.beginPath(),i.moveTo(p+te*ce,$+j);for(let re=0;re<Z.length;re++){const Fe=p+(te+re)*ce,qe=$+j-Z[re]/M*j;i.lineTo(Fe,qe)}i.lineTo(p+(te+Z.length-1)*ce,$+j),i.closePath(),i.fillStyle=ee,i.fill(),i.beginPath();for(let re=0;re<Z.length;re++){const Fe=p+(te+re)*ce,qe=$+j-Z[re]/M*j;re===0?i.moveTo(Fe,qe):i.lineTo(Fe,qe)}i.strokeStyle=R,i.lineWidth=1.5,i.stroke()};F(f,L.rx,L.rxFill),F(c,L.tx,L.txFill)};return _t(()=>xt(l)),Ve(()=>[s.history?.tx?.length,s.history?.rx?.length,s.history?.tx?.at(-1),s.history?.rx?.at(-1)],()=>xt(l)),t({draw:l}),(r,i)=>(k(),S("div",null,[a("div",Cm,[i[0]||(i[0]=a("span",{class:"flex items-center"},[a("span",{class:"inline-block w-3 h-0.5 bg-green-400 mr-1"}),ae("上传速度")],-1)),i[1]||(i[1]=a("span",{class:"flex items-center"},[a("span",{class:"inline-block w-3 h-0.5 bg-blue-400 mr-1"}),ae("下载速度")],-1)),a("span",Sm,N(o.value),1)]),a("canvas",{ref_key:"canvasRef",ref:n,class:"rounded w-full block h-[150px]"},null,512)]))}},Tm={class:"space-y-4"},$m={key:0,class:"scrollbar-hide flex items-center gap-2 overflow-x-auto"},Am=["onClick"],Im={key:2,class:"card overflow-hidden p-0"},Rm={class:"flex items-center justify-between border-b border-slate-200 px-6 py-4 dark:border-slate-700"},Pm={class:"flex gap-4 text-sm muted"},Om={class:"font-medium tabular-nums text-slate-900 dark:text-white"},Mm={class:"font-medium tabular-nums text-slate-900 dark:text-white"},Lm={class:"custom-scrollbar max-h-[600px] overflow-x-auto"},Nm={class:"table"},Vm={class:"transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/50"},jm=["onClick"],Dm={class:"font-mono tabular-nums text-indigo-600 dark:text-indigo-400"},Bm=["onMouseenter"],Fm={class:"hidden text-xs text-slate-400 md:table-cell"},Um={class:"flex items-center gap-2"},Hm={key:0,class:"tooltip"},Wm={key:1,class:"tooltip"},Km={key:2,class:"tooltip cursor-help"},Gm={class:"tooltip-text"},qm={key:1,class:"text-yellow-600 dark:text-yellow-400"},zm={key:2,class:"text-slate-400"},Zm={class:"tabular-nums"},Jm=["title"],Ym={key:1,class:"text-slate-400"},Qm={class:"text-xs"},Xm={key:0,class:"leading-relaxed"},eg={class:"text-green-600 tabular-nums dark:text-green-400"},tg={class:"text-blue-600 tabular-nums dark:text-blue-400"},sg={key:1,class:"text-slate-400"},ng={class:"hidden font-mono text-xs text-slate-400 md:table-cell"},og={key:0},lg={colspan:"10",class:"p-0"},rg={class:"border-t border-slate-200 bg-slate-50 px-4 py-3 dark:border-slate-700/50 dark:bg-slate-950/60"},ig=60,ag={__name:"PeersView",setup(e){const t=Ot(),s=Qe("peerTooltip"),n=(p,b)=>s.value?.showPeerTooltip(p,b),o=()=>s.value?.hidePeerTooltip(),l=se([]);let r=null,i={},c=0;const f=Ht({}),u={},d=p=>{f[p]=!f[p]},g=()=>{const p=t.instanceList.find(b=>b.file_name===t.selectedInstance);return p?p.status:null},h=()=>{l.value=[],i={},c=0;for(const p in u)delete u[p];for(const p in f)delete f[p]},C=async()=>{if(!t.selectedInstance||g()!=="running"){h();return}try{const p=await bd(t.selectedInstance)||[],b=Date.now(),_=c>0?(b-c)/1e3:0,j={};for(const B of p)if(B.traffic){const H=B.ip,M=i[H];if(M&&_>0){const z=Math.max(0,B.traffic.tx_bytes-M.tx_bytes),oe=Math.max(0,B.traffic.rx_bytes-M.rx_bytes);B.traffic.tx_speed=Math.round(z/_),B.traffic.rx_speed=Math.round(oe/_)}else B.traffic.tx_speed=0,B.traffic.rx_speed=0;j[H]={tx_bytes:B.traffic.tx_bytes,rx_bytes:B.traffic.rx_bytes},u[H]||(u[H]={tx:[],rx:[]}),u[H].tx.push(B.traffic.tx_speed),u[H].rx.push(B.traffic.rx_speed),u[H].tx.length>ig&&(u[H].tx.shift(),u[H].rx.shift())}i=j,c=b,l.value=p}catch(p){console.error(p)}};_t(()=>{C(),r=setInterval(()=>{t.isPageVisible&&C()},3e3)}),Ss(()=>{r&&clearInterval(r)}),Ve(()=>t.selectedInstance,()=>{h(),C()}),Ve(g,p=>{p==="running"&&C()});const y=p=>p.metric===1?"text-purple-600 font-medium dark:text-purple-400":"text-blue-600 dark:text-blue-400",L=p=>{const b=p.metric===1,_=p.protocol.includes("Tcp");return b?_?"打洞TCP直连":"打洞UDP直连":_?"客户端TCP中继":"客户端UDP中继"},$=p=>p===3?"己方加密对方未加密":p===4?"己方未加密对方加密":p===5?"密钥不一致":"未知错误",w=p=>t.selectedInstance===p?"border-indigo-600 bg-indigo-600 text-white dark:border-indigo-500 dark:bg-indigo-500":"border-slate-300 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700";return(p,b)=>(k(),S("div",Tm,[b[8]||(b[8]=a("div",null,[a("h1",{class:"page-title"},"设备列表"),a("p",{class:"page-subtitle"},"查看各实例的设备连接与流量状况")],-1)),O(t).instanceList.length>0?(k(),S("div",$m,[(k(!0),S(ie,null,Te(O(t).instanceList,_=>(k(),S("button",{key:_.file_name,onClick:j=>O(t).selectedInstance=_.file_name,class:G([w(_.file_name),"flex shrink-0 items-center rounded-lg border px-4 py-2 text-sm font-medium transition-colors"])},[ue(ya,{status:_.status,size:"w-2 h-2",class:"mr-2"},null,8,["status"]),ae(" "+N(_.config_name||_.file_name),1)],10,Am))),128))])):fe("",!0),O(t).selectedInstance?(k(),S("div",Im,[a("div",Rm,[b[2]||(b[2]=a("h2",{class:"text-base font-bold text-slate-900 dark:text-white"},"设备列表",-1)),a("div",Pm,[a("span",null,[b[0]||(b[0]=ae(" Online: ",-1)),a("span",Om,N(l.value.filter(_=>_.online).length),1)]),a("span",null,[b[1]||(b[1]=ae(" Total: ",-1)),a("span",Mm,N(l.value.length),1)])])]),a("div",Lm,[a("table",Nm,[b[7]||(b[7]=a("thead",null,[a("tr",null,[a("th",{class:"w-8 px-2"}),a("th",null,"IP地址"),a("th",null,"名称"),a("th",{class:"hidden md:table-cell"},"版本"),a("th",null,"状态"),a("th",null,"模式"),a("th",null,"延迟"),a("th",null,"丢包率"),a("th",null,"流量"),a("th",{class:"hidden md:table-cell"},"最后在线")])],-1)),a("tbody",null,[(k(!0),S(ie,null,Te(l.value,_=>(k(),S(ie,{key:_.ip},[a("tr",Vm,[a("td",{class:"cursor-pointer select-none px-2 text-center",onClick:j=>d(_.ip)},[(k(),S("svg",{class:G(["inline-block h-4 w-4 text-slate-400 transition-transform duration-200",{"rotate-90":f[_.ip]}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...b[3]||(b[3]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"},null,-1)])],2))],8,jm),a("td",Dm,[a("span",{class:"cursor-help border-b border-dotted border-indigo-400/50 pb-0.5",onMouseenter:j=>n(j,_),onMouseleave:o},N(_.ip),41,Bm)]),a("td",null,N(_.name||"-"),1),a("td",Fm,N(_.version||"-"),1),a("td",null,[a("div",Um,[a("span",{class:G(_.online?"badge-green":"badge-gray")},N(_.online?"Online":"Offline"),3),_.online&&_.key_equal===1?(k(),S("div",Hm,[...b[4]||(b[4]=[a("svg",{class:"h-4 w-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})],-1),a("span",{class:"tooltip-text"},"双方加密传输",-1)])])):_.online&&_.key_equal===2?(k(),S("div",Wm,[...b[5]||(b[5]=[a("svg",{class:"h-4 w-4 text-yellow-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"})],-1),a("span",{class:"tooltip-text"},"双方未加密",-1)])])):_.online&&[3,4,5].includes(_.key_equal)?(k(),S("div",Km,[b[6]||(b[6]=a("svg",{class:"h-4 w-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),a("span",Gm,N($(_.key_equal)),1)])):fe("",!0)])]),a("td",null,[_.online&&_.route?(k(),S("span",{key:0,class:G(y(_.route))},N(L(_.route)),3)):_.online?(k(),S("span",qm,"服务器中继")):(k(),S("span",zm,"-"))]),a("td",Zm,N(_.route?_.route.rtt+" ms":"-"),1),a("td",null,[_.packet_loss?(k(),S("span",{key:0,class:G(_.packet_loss.loss_rate>10?"text-red-600 dark:text-red-400":_.packet_loss.loss_rate>5?"text-yellow-600 dark:text-yellow-400":"text-green-600 dark:text-green-400"),title:"Sent: "+_.packet_loss.sent+", Received: "+_.packet_loss.received},N(_.packet_loss.loss_rate.toFixed(1))+"%",11,Jm)):(k(),S("span",Ym,"-"))]),a("td",Qm,[_.traffic?(k(),S("div",Xm,[a("div",eg," ↑ "+N(O(Cr)(_.traffic.tx_bytes))+" ("+N(O(Bo)(_.traffic.tx_speed))+") ",1),a("div",tg," ↓ "+N(O(Cr)(_.traffic.rx_bytes))+" ("+N(O(Bo)(_.traffic.rx_speed))+") ",1)])):(k(),S("span",sg,"-"))]),a("td",ng,N(O(km)(_.last_connected_time)),1)]),f[_.ip]?(k(),S("tr",og,[a("td",lg,[a("div",rg,[ue(Em,{history:u[_.ip]||{tx:[],rx:[]},size:60},null,8,["history"])])])])):fe("",!0)],64))),128))])])])])):(k(),Ie(on,{key:1,text:"暂无运行中的组网实例"}))]))}},cg={class:"space-y-4"},ug={key:0,class:"scrollbar-hide flex items-center gap-2 overflow-x-auto"},fg=["onClick"],dg={key:2,class:"card overflow-hidden p-0"},pg={class:"custom-scrollbar max-h-[600px] overflow-x-auto"},hg={class:"table"},mg=["rowspan"],gg={class:"font-mono tabular-nums text-yellow-700 dark:text-yellow-300"},vg={class:"tabular-nums"},bg={class:"tabular-nums"},xg={__name:"RoutesView",setup(e){const t=Ot(),s=se([]);let n=null;const o=()=>{const i=t.instanceList.find(c=>c.file_name===t.selectedInstance);return i?i.status:null},l=async()=>{if(!t.selectedInstance||o()!=="running"){s.value=[];return}try{s.value=await xd(t.selectedInstance)||[]}catch(i){console.error(i)}};_t(()=>{l(),n=setInterval(()=>{t.isPageVisible&&l()},3e3)}),Ss(()=>{n&&clearInterval(n)}),Ve(()=>t.selectedInstance,()=>{l()}),Ve(o,i=>{i==="running"&&l()});const r=i=>t.selectedInstance===i?"border-indigo-600 bg-indigo-600 text-white dark:border-indigo-500 dark:bg-indigo-500":"border-slate-300 bg-white text-slate-600 hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 dark:hover:bg-slate-700";return(i,c)=>(k(),S("div",cg,[c[2]||(c[2]=a("div",null,[a("h1",{class:"page-title"},"路由"),a("p",{class:"page-subtitle"},"查看各实例的路由表")],-1)),O(t).instanceList.length>0?(k(),S("div",ug,[(k(!0),S(ie,null,Te(O(t).instanceList,f=>(k(),S("button",{key:f.file_name,onClick:u=>O(t).selectedInstance=f.file_name,class:G([r(f.file_name),"flex shrink-0 items-center rounded-lg border px-4 py-2 text-sm font-medium transition-colors"])},[ue(ya,{status:f.status,size:"w-2 h-2",class:"mr-2"},null,8,["status"]),ae(" "+N(f.config_name||f.file_name),1)],10,fg))),128))])):fe("",!0),O(t).selectedInstance?(k(),S("div",dg,[c[1]||(c[1]=a("div",{class:"border-b border-slate-200 px-6 py-4 dark:border-slate-700"},[a("h2",{class:"text-base font-bold text-slate-900 dark:text-white"},"路由表")],-1)),a("div",pg,[a("table",hg,[c[0]||(c[0]=a("thead",null,[a("tr",null,[a("th",null,"目标节点IP"),a("th",null,"目标网络"),a("th",null,"跳数"),a("th",null,"延迟")])],-1)),a("tbody",null,[(k(!0),S(ie,null,Te(s.value,f=>(k(),S(ie,{key:f.ip},[(k(!0),S(ie,null,Te(f.routes,(u,d)=>(k(),S("tr",{key:d,class:"hover:bg-slate-50 dark:hover:bg-slate-800/50"},[d===0?(k(),S("td",{key:0,rowspan:f.routes.length,class:"font-mono tabular-nums text-indigo-600 dark:text-indigo-400"},N(f.ip),9,mg)):fe("",!0),a("td",gg,N(u.addr),1),a("td",vg,N(u.metric),1),a("td",bg,N(u.rtt)+" ms",1)]))),128))],64))),128))])])])])):(k(),Ie(on,{key:1,text:"暂无运行中的组网实例"}))]))}},_g={class:"mx-auto max-w-4xl space-y-5"},yg={key:0,class:"card text-sm text-slate-400"},kg={key:1,class:"card border-red-200 text-sm text-red-600 dark:border-red-900 dark:text-red-300"},wg={class:"card space-y-6"},Cg={class:"flex items-start justify-between gap-5"},Sg=["aria-checked","disabled"],Eg={class:"grid gap-5 sm:grid-cols-2"},Tg={class:"block"},$g=["disabled"],Ag={class:"block"},Ig={class:"mb-2 flex items-center justify-between gap-3"},Rg=["disabled"],Pg={class:"flex items-center gap-2"},Og={class:"min-w-0 flex-1 truncate rounded-lg border border-slate-200 bg-slate-50 px-3 py-2.5 text-xs text-slate-600 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-300"},Mg=["disabled"],Lg={key:0,class:"border-t border-slate-200 pt-5 dark:border-slate-800"},Ng={key:0,class:"text-xs text-green-600 dark:text-green-400"},Vg={key:1,class:"text-xs text-red-600 dark:text-red-400"},jg={class:"card"},Dg={class:"flex items-start gap-3"},Bg={class:"min-w-0 flex-1"},Fg={class:"text-sm font-semibold text-slate-900 dark:text-white"},Ug={class:"mt-1 text-xs text-slate-400"},Hg={key:0,class:"mt-4 rounded-lg border border-slate-200 bg-slate-50 px-3 py-2.5 font-mono text-xs text-slate-600 dark:border-slate-700 dark:bg-slate-950 dark:text-slate-300"},Wg={class:"block truncate"},Kg={key:1,class:"mt-3 flex flex-wrap gap-2"},Gg={__name:"WebAccessView",setup(e){const t=globalThis.__VNT_WEB_ACCESS__,s=Ht({enabled:!1,port:19099,global:!1,token:""}),n=se(null),o=se(!0),l=se(!1),r=se(""),i=se(""),c=[{value:!1,label:"仅本机(推荐)"},{value:!0,label:"局域网内所有设备"}],f=p=>{n.value=p,Object.assign(s,{enabled:p.enabled,port:p.port,global:p.global,token:p.token})},u=async()=>{o.value=!0,i.value="";try{if(!t)throw new Error("Web 访问设置仅在桌面客户端中提供");f(await t.status())}catch(p){i.value=p.message||String(p)}finally{o.value=!1}},d=async(p,b)=>{l.value=!0,i.value="",r.value="";try{f(await t.update({...s,...p,port:Number(p.port??s.port)})),r.value=b}catch(_){const j=_.message||String(_);try{f(await t.status())}catch{}i.value=j}finally{l.value=!1}},g=async()=>{const p=!s.enabled;await d({enabled:p},p?"Web 服务已启动":"Web 服务已关闭")},h=async()=>{const p=await t.generateToken();await d({token:p},s.enabled?"新令牌已生效,Web 服务已重新加载":"新令牌已生成")},C=async()=>{s.enabled||await d({},"监听设置已自动保存")},y=async p=>{s.global=p,await C()},L=async()=>{await navigator.clipboard.writeText(s.token),r.value="访问令牌已复制"},$=async()=>{await navigator.clipboard.writeText(n.value.url),r.value="访问地址已复制"},w=async()=>{await t.openUrl(n.value.url)};return _t(u),(p,b)=>(k(),S("div",_g,[b[7]||(b[7]=a("div",{class:"page-title"},[a("div",null,[a("h2",null,"Web 访问"),a("p",null,"从浏览器访问当前 VNT 进程,API 请求由持久访问令牌保护。")])],-1)),o.value?(k(),S("div",yg,"正在读取 Web 服务状态…")):O(t)?(k(),S(ie,{key:2},[a("section",wg,[a("div",Cg,[b[1]||(b[1]=a("div",null,[a("h3",{class:"text-sm font-semibold text-slate-900 dark:text-white"},"启用 Web 服务"),a("p",{class:"mt-1 text-xs leading-5 text-slate-400"},"服务内置于桌面客户端,不会启动单独的 vnt2_web 进程。")],-1)),a("button",{type:"button",role:"switch","aria-label":"启用 Web 服务","aria-checked":s.enabled,disabled:l.value,class:G(["web-switch transition-colors disabled:opacity-50",s.enabled?"bg-indigo-600 dark:bg-indigo-500":"bg-slate-300 dark:bg-slate-600"]),onClick:g},[a("span",{class:G(["web-switch-knob bg-white shadow-sm",{"web-switch-knob-on":s.enabled}])},null,2)],10,Sg)]),a("div",Eg,[a("label",Tg,[b[2]||(b[2]=a("span",{class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-200"},"监听端口",-1)),_e(a("input",{"onUpdate:modelValue":b[0]||(b[0]=_=>s.port=_),class:"input font-mono",type:"number",min:"1",max:"65535",disabled:l.value||s.enabled,onChange:C},null,40,$g),[[Oe,s.port,void 0,{number:!0}]])]),a("label",Ag,[b[3]||(b[3]=a("span",{class:"mb-2 block text-sm font-medium text-slate-700 dark:text-slate-200"},"监听范围",-1)),ue(ml,{"model-value":s.global,options:c,disabled:l.value||s.enabled,"aria-label":"监听范围","onUpdate:modelValue":y},null,8,["model-value","disabled"])])]),b[6]||(b[6]=a("p",{class:"-mt-3 text-xs text-slate-400"},"端口和监听范围会自动保存;需要修改时请先关闭 Web 服务。",-1)),a("div",null,[a("div",Ig,[b[4]||(b[4]=a("span",{class:"text-sm font-medium text-slate-700 dark:text-slate-200"},"访问令牌",-1)),a("button",{class:"text-xs font-medium text-indigo-600 hover:text-indigo-500 disabled:opacity-50 dark:text-indigo-400",type:"button",disabled:l.value,onClick:h},"更换令牌",8,Rg)]),a("div",Pg,[a("code",Og,N(s.token),1),a("button",{class:"btn-ghost shrink-0",type:"button",disabled:l.value,onClick:L},"复制令牌",8,Mg)]),b[5]||(b[5]=a("p",{class:"mt-2 text-xs text-slate-400"},"更换令牌后,已登录的浏览器需要使用新令牌重新鉴权。",-1))]),r.value||i.value?(k(),S("div",Lg,[r.value?(k(),S("span",Ng,N(r.value),1)):fe("",!0),i.value?(k(),S("span",Vg,N(i.value),1)):fe("",!0)])):fe("",!0)]),a("section",jg,[a("div",Dg,[a("span",{class:G(["mt-1 h-2.5 w-2.5 shrink-0 rounded-full",n.value?.running?"bg-green-500":"bg-slate-300 dark:bg-slate-600"])},null,2),a("div",Bg,[a("div",Fg,N(n.value?.running?"运行中":"未运行"),1),a("div",Ug,"监听地址:"+N(n.value?.listenAddress),1),n.value?.running?(k(),S("div",Hg,[a("span",Wg,N(n.value.url),1)])):fe("",!0),n.value?.running?(k(),S("div",Kg,[a("button",{class:"btn-primary btn-sm",type:"button",onClick:w},"打开浏览器"),a("button",{class:"btn-ghost btn-sm",type:"button",onClick:$},"复制访问地址")])):fe("",!0)])])])],64)):(k(),S("div",kg,N(i.value),1))]))}},qg=hl(Gg,[["__scopeId","data-v-5cd7f746"]]),zg=[{path:"/",component:R0},{path:"/instances",component:uh},{path:"/general",redirect:"/instances"},{path:"/config",component:ym},{path:"/peers",component:ag},{path:"/routes",component:xg},{path:"/web-access",component:qg}],Zg=pd({history:Kf(),routes:zg}),Qn=document.querySelector('link[rel~="icon"]')||document.createElement("link");Qn.rel="icon";Qn.type="image/png";Qn.href=dl;document.head.appendChild(Qn);Yu(Np).use(ef()).use(Zg).mount("#app");