openclaw-agent-dashboard 1.0.45 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();/**
2
+ * @vue/shared v3.5.29
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/function yn(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return s=>s in e}const $t={},Ne=[],ie=()=>{},xl=()=>!1,Ds=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),bn=t=>t.startsWith("onUpdate:"),Et=Object.assign,$n=(t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)},Oi=Object.prototype.hasOwnProperty,_t=(t,e)=>Oi.call(t,e),ct=Array.isArray,je=t=>hs(t)==="[object Map]",Be=t=>hs(t)==="[object Set]",Hn=t=>hs(t)==="[object Date]",ht=t=>typeof t=="function",Ct=t=>typeof t=="string",ae=t=>typeof t=="symbol",yt=t=>t!==null&&typeof t=="object",Al=t=>(yt(t)||ht(t))&&ht(t.then)&&ht(t.catch),Il=Object.prototype.toString,hs=t=>Il.call(t),Ni=t=>hs(t).slice(8,-1),Ml=t=>hs(t)==="[object Object]",kn=t=>Ct(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Xe=yn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Fs=t=>{const e=Object.create(null);return s=>e[s]||(e[s]=t(s))},ji=/-\w/g,Se=Fs(t=>t.replace(ji,e=>e.slice(1).toUpperCase())),Ui=/\B([A-Z])/g,De=Fs(t=>t.replace(Ui,"-$1").toLowerCase()),Rl=Fs(t=>t.charAt(0).toUpperCase()+t.slice(1)),Ks=Fs(t=>t?`on${Rl(t)}`:""),Ce=(t,e)=>!Object.is(t,e),bs=(t,...e)=>{for(let s=0;s<t.length;s++)t[s](...e)},El=(t,e,s,n=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})},Ls=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Kn;const Os=()=>Kn||(Kn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function xt(t){if(ct(t)){const e={};for(let s=0;s<t.length;s++){const n=t[s],i=Ct(n)?Ki(n):xt(n);if(i)for(const o in i)e[o]=i[o]}return e}else if(Ct(t)||yt(t))return t}const Vi=/;(?![^(]*\))/g,Wi=/:([^]+)/,Hi=/\/\*[^]*?\*\//g;function Ki(t){const e={};return t.replace(Hi,"").split(Vi).forEach(s=>{if(s){const n=s.split(Wi);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function ut(t){let e="";if(Ct(t))e=t;else if(ct(t))for(let s=0;s<t.length;s++){const n=ut(t[s]);n&&(e+=n+" ")}else if(yt(t))for(const s in t)t[s]&&(e+=s+" ");return e.trim()}const Bi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",qi=yn(Bi);function Pl(t){return!!t||t===""}function zi(t,e){if(t.length!==e.length)return!1;let s=!0;for(let n=0;s&&n<t.length;n++)s=qe(t[n],e[n]);return s}function qe(t,e){if(t===e)return!0;let s=Hn(t),n=Hn(e);if(s||n)return s&&n?t.getTime()===e.getTime():!1;if(s=ae(t),n=ae(e),s||n)return t===e;if(s=ct(t),n=ct(e),s||n)return s&&n?zi(t,e):!1;if(s=yt(t),n=yt(e),s||n){if(!s||!n)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const a in t){const r=t.hasOwnProperty(a),u=e.hasOwnProperty(a);if(r&&!u||!r&&u||!qe(t[a],e[a]))return!1}}return String(t)===String(e)}function wn(t,e){return t.findIndex(s=>qe(s,e))}const Dl=t=>!!(t&&t.__v_isRef===!0),f=t=>Ct(t)?t:t==null?"":ct(t)||yt(t)&&(t.toString===Il||!ht(t.toString))?Dl(t)?f(t.value):JSON.stringify(t,Fl,2):String(t),Fl=(t,e)=>Dl(e)?Fl(t,e.value):je(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((s,[n,i],o)=>(s[Bs(n,o)+" =>"]=i,s),{})}:Be(e)?{[`Set(${e.size})`]:[...e.values()].map(s=>Bs(s))}:ae(e)?Bs(e):yt(e)&&!ct(e)&&!Ml(e)?String(e):e,Bs=(t,e="")=>{var s;return ae(t)?`Symbol(${(s=t.description)!=null?s:e})`:t};/**
6
+ * @vue/reactivity v3.5.29
7
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
+ * @license MIT
9
+ **/let Vt;class Gi{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Vt,!e&&Vt&&(this.index=(Vt.scopes||(Vt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,s;if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].pause();for(e=0,s=this.effects.length;e<s;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,s;if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].resume();for(e=0,s=this.effects.length;e<s;e++)this.effects[e].resume()}}run(e){if(this._active){const s=Vt;try{return Vt=this,e()}finally{Vt=s}}}on(){++this._on===1&&(this.prevScope=Vt,Vt=this)}off(){this._on>0&&--this._on===0&&(Vt=this.prevScope,this.prevScope=void 0)}stop(e){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){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Ji(){return Vt}let kt;const qs=new WeakSet;class Ll{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Vt&&Vt.active&&Vt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,qs.has(this)&&(qs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Nl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Bn(this),jl(this);const e=kt,s=Yt;kt=this,Yt=!0;try{return this.fn()}finally{Ul(this),kt=e,Yt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Sn(e);this.deps=this.depsTail=void 0,Bn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?qs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){sn(this)&&this.run()}get dirty(){return sn(this)}}let Ol=0,Ze,ts;function Nl(t,e=!1){if(t.flags|=8,e){t.next=ts,ts=t;return}t.next=Ze,Ze=t}function Tn(){Ol++}function Cn(){if(--Ol>0)return;if(ts){let e=ts;for(ts=void 0;e;){const s=e.next;e.next=void 0,e.flags&=-9,e=s}}let t;for(;Ze;){let e=Ze;for(Ze=void 0;e;){const s=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=s}}if(t)throw t}function jl(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ul(t){let e,s=t.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),Sn(n),Qi(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}t.deps=e,t.depsTail=s}function sn(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Vl(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function Vl(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===as)||(t.globalVersion=as,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!sn(t))))return;t.flags|=2;const e=t.dep,s=kt,n=Yt;kt=t,Yt=!0;try{jl(t);const i=t.fn(t._value);(e.version===0||Ce(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{kt=s,Yt=n,Ul(t),t.flags&=-3}}function Sn(t,e=!1){const{dep:s,prevSub:n,nextSub:i}=t;if(n&&(n.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=n,t.nextSub=void 0),s.subs===t&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)Sn(o,!0)}!e&&!--s.sc&&s.map&&s.map.delete(s.key)}function Qi(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let Yt=!0;const Wl=[];function ge(){Wl.push(Yt),Yt=!1}function me(){const t=Wl.pop();Yt=t===void 0?!0:t}function Bn(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const s=kt;kt=void 0;try{e()}finally{kt=s}}}let as=0;class Yi{constructor(e,s){this.sub=e,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class xn{constructor(e){this.computed=e,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(e){if(!kt||!Yt||kt===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==kt)s=this.activeLink=new Yi(kt,this),kt.deps?(s.prevDep=kt.depsTail,kt.depsTail.nextDep=s,kt.depsTail=s):kt.deps=kt.depsTail=s,Hl(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=kt.depsTail,s.nextDep=void 0,kt.depsTail.nextDep=s,kt.depsTail=s,kt.deps===s&&(kt.deps=n)}return s}trigger(e){this.version++,as++,this.notify(e)}notify(e){Tn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Cn()}}}function Hl(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)Hl(n)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const nn=new WeakMap,Re=Symbol(""),ln=Symbol(""),rs=Symbol("");function Ft(t,e,s){if(Yt&&kt){let n=nn.get(t);n||nn.set(t,n=new Map);let i=n.get(s);i||(n.set(s,i=new xn),i.map=n,i.key=s),i.track()}}function he(t,e,s,n,i,o){const a=nn.get(t);if(!a){as++;return}const r=u=>{u&&u.trigger()};if(Tn(),e==="clear")a.forEach(r);else{const u=ct(t),v=u&&kn(s);if(u&&s==="length"){const p=Number(n);a.forEach(($,I)=>{(I==="length"||I===rs||!ae(I)&&I>=p)&&r($)})}else switch((s!==void 0||a.has(void 0))&&r(a.get(s)),v&&r(a.get(rs)),e){case"add":u?v&&r(a.get("length")):(r(a.get(Re)),je(t)&&r(a.get(ln)));break;case"delete":u||(r(a.get(Re)),je(t)&&r(a.get(ln)));break;case"set":je(t)&&r(a.get(Re));break}}Cn()}function Fe(t){const e=mt(t);return e===t?e:(Ft(e,"iterate",rs),Gt(t)?e:e.map(Xt))}function Ns(t){return Ft(t=mt(t),"iterate",rs),t}function ke(t,e){return _e(t)?We(Ee(t)?Xt(e):e):Xt(e)}const Xi={__proto__:null,[Symbol.iterator](){return zs(this,Symbol.iterator,t=>ke(this,t))},concat(...t){return Fe(this).concat(...t.map(e=>ct(e)?Fe(e):e))},entries(){return zs(this,"entries",t=>(t[1]=ke(this,t[1]),t))},every(t,e){return ce(this,"every",t,e,void 0,arguments)},filter(t,e){return ce(this,"filter",t,e,s=>s.map(n=>ke(this,n)),arguments)},find(t,e){return ce(this,"find",t,e,s=>ke(this,s),arguments)},findIndex(t,e){return ce(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ce(this,"findLast",t,e,s=>ke(this,s),arguments)},findLastIndex(t,e){return ce(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ce(this,"forEach",t,e,void 0,arguments)},includes(...t){return Gs(this,"includes",t)},indexOf(...t){return Gs(this,"indexOf",t)},join(t){return Fe(this).join(t)},lastIndexOf(...t){return Gs(this,"lastIndexOf",t)},map(t,e){return ce(this,"map",t,e,void 0,arguments)},pop(){return Ge(this,"pop")},push(...t){return Ge(this,"push",t)},reduce(t,...e){return qn(this,"reduce",t,e)},reduceRight(t,...e){return qn(this,"reduceRight",t,e)},shift(){return Ge(this,"shift")},some(t,e){return ce(this,"some",t,e,void 0,arguments)},splice(...t){return Ge(this,"splice",t)},toReversed(){return Fe(this).toReversed()},toSorted(t){return Fe(this).toSorted(t)},toSpliced(...t){return Fe(this).toSpliced(...t)},unshift(...t){return Ge(this,"unshift",t)},values(){return zs(this,"values",t=>ke(this,t))}};function zs(t,e,s){const n=Ns(t),i=n[e]();return n!==t&&!Gt(t)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=s(o.value)),o}),i}const Zi=Array.prototype;function ce(t,e,s,n,i,o){const a=Ns(t),r=a!==t&&!Gt(t),u=a[e];if(u!==Zi[e]){const $=u.apply(t,o);return r?Xt($):$}let v=s;a!==t&&(r?v=function($,I){return s.call(this,ke(t,$),I,t)}:s.length>2&&(v=function($,I){return s.call(this,$,I,t)}));const p=u.call(a,v,n);return r&&i?i(p):p}function qn(t,e,s,n){const i=Ns(t);let o=s;return i!==t&&(Gt(t)?s.length>3&&(o=function(a,r,u){return s.call(this,a,r,u,t)}):o=function(a,r,u){return s.call(this,a,ke(t,r),u,t)}),i[e](o,...n)}function Gs(t,e,s){const n=mt(t);Ft(n,"iterate",rs);const i=n[e](...s);return(i===-1||i===!1)&&Rn(s[0])?(s[0]=mt(s[0]),n[e](...s)):i}function Ge(t,e,s=[]){ge(),Tn();const n=mt(t)[e].apply(t,s);return Cn(),me(),n}const to=yn("__proto__,__v_isRef,__isVue"),Kl=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(ae));function eo(t){ae(t)||(t=String(t));const e=mt(this);return Ft(e,"has",t),e.hasOwnProperty(t)}class Bl{constructor(e=!1,s=!1){this._isReadonly=e,this._isShallow=s}get(e,s,n){if(s==="__v_skip")return e.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(i?o?fo:Jl:o?Gl:zl).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const a=ct(e);if(!i){let u;if(a&&(u=Xi[s]))return u;if(s==="hasOwnProperty")return eo}const r=Reflect.get(e,s,Lt(e)?e:n);if((ae(s)?Kl.has(s):to(s))||(i||Ft(e,"get",s),o))return r;if(Lt(r)){const u=a&&kn(s)?r:r.value;return i&&yt(u)?an(u):u}return yt(r)?i?an(r):In(r):r}}class ql extends Bl{constructor(e=!1){super(!1,e)}set(e,s,n,i){let o=e[s];const a=ct(e)&&kn(s);if(!this._isShallow){const v=_e(o);if(!Gt(n)&&!_e(n)&&(o=mt(o),n=mt(n)),!a&&Lt(o)&&!Lt(n))return v||(o.value=n),!0}const r=a?Number(s)<e.length:_t(e,s),u=Reflect.set(e,s,n,Lt(e)?e:i);return e===mt(i)&&(r?Ce(n,o)&&he(e,"set",s,n):he(e,"add",s,n)),u}deleteProperty(e,s){const n=_t(e,s);e[s];const i=Reflect.deleteProperty(e,s);return i&&n&&he(e,"delete",s,void 0),i}has(e,s){const n=Reflect.has(e,s);return(!ae(s)||!Kl.has(s))&&Ft(e,"has",s),n}ownKeys(e){return Ft(e,"iterate",ct(e)?"length":Re),Reflect.ownKeys(e)}}class so extends Bl{constructor(e=!1){super(!0,e)}set(e,s){return!0}deleteProperty(e,s){return!0}}const no=new ql,lo=new so,io=new ql(!0);const on=t=>t,gs=t=>Reflect.getPrototypeOf(t);function oo(t,e,s){return function(...n){const i=this.__v_raw,o=mt(i),a=je(o),r=t==="entries"||t===Symbol.iterator&&a,u=t==="keys"&&a,v=i[t](...n),p=s?on:e?We:Xt;return!e&&Ft(o,"iterate",u?ln:Re),Et(Object.create(v),{next(){const{value:$,done:I}=v.next();return I?{value:$,done:I}:{value:r?[p($[0]),p($[1])]:p($),done:I}}})}}function ms(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function ao(t,e){const s={get(i){const o=this.__v_raw,a=mt(o),r=mt(i);t||(Ce(i,r)&&Ft(a,"get",i),Ft(a,"get",r));const{has:u}=gs(a),v=e?on:t?We:Xt;if(u.call(a,i))return v(o.get(i));if(u.call(a,r))return v(o.get(r));o!==a&&o.get(i)},get size(){const i=this.__v_raw;return!t&&Ft(mt(i),"iterate",Re),i.size},has(i){const o=this.__v_raw,a=mt(o),r=mt(i);return t||(Ce(i,r)&&Ft(a,"has",i),Ft(a,"has",r)),i===r?o.has(i):o.has(i)||o.has(r)},forEach(i,o){const a=this,r=a.__v_raw,u=mt(r),v=e?on:t?We:Xt;return!t&&Ft(u,"iterate",Re),r.forEach((p,$)=>i.call(o,v(p),v($),a))}};return Et(s,t?{add:ms("add"),set:ms("set"),delete:ms("delete"),clear:ms("clear")}:{add(i){!e&&!Gt(i)&&!_e(i)&&(i=mt(i));const o=mt(this);return gs(o).has.call(o,i)||(o.add(i),he(o,"add",i,i)),this},set(i,o){!e&&!Gt(o)&&!_e(o)&&(o=mt(o));const a=mt(this),{has:r,get:u}=gs(a);let v=r.call(a,i);v||(i=mt(i),v=r.call(a,i));const p=u.call(a,i);return a.set(i,o),v?Ce(o,p)&&he(a,"set",i,o):he(a,"add",i,o),this},delete(i){const o=mt(this),{has:a,get:r}=gs(o);let u=a.call(o,i);u||(i=mt(i),u=a.call(o,i)),r&&r.call(o,i);const v=o.delete(i);return u&&he(o,"delete",i,void 0),v},clear(){const i=mt(this),o=i.size!==0,a=i.clear();return o&&he(i,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=oo(i,t,e)}),s}function An(t,e){const s=ao(t,e);return(n,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(_t(s,i)&&i in n?s:n,i,o)}const ro={get:An(!1,!1)},uo={get:An(!1,!0)},co={get:An(!0,!1)};const zl=new WeakMap,Gl=new WeakMap,Jl=new WeakMap,fo=new WeakMap;function ho(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function po(t){return t.__v_skip||!Object.isExtensible(t)?0:ho(Ni(t))}function In(t){return _e(t)?t:Mn(t,!1,no,ro,zl)}function vo(t){return Mn(t,!1,io,uo,Gl)}function an(t){return Mn(t,!0,lo,co,Jl)}function Mn(t,e,s,n,i){if(!yt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=po(t);if(o===0)return t;const a=i.get(t);if(a)return a;const r=new Proxy(t,o===2?n:s);return i.set(t,r),r}function Ee(t){return _e(t)?Ee(t.__v_raw):!!(t&&t.__v_isReactive)}function _e(t){return!!(t&&t.__v_isReadonly)}function Gt(t){return!!(t&&t.__v_isShallow)}function Rn(t){return t?!!t.__v_raw:!1}function mt(t){const e=t&&t.__v_raw;return e?mt(e):t}function go(t){return!_t(t,"__v_skip")&&Object.isExtensible(t)&&El(t,"__v_skip",!0),t}const Xt=t=>yt(t)?In(t):t,We=t=>yt(t)?an(t):t;function Lt(t){return t?t.__v_isRef===!0:!1}function N(t){return mo(t,!1)}function mo(t,e){return Lt(t)?t:new _o(t,e)}class _o{constructor(e,s){this.dep=new xn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?e:mt(e),this._value=s?e:Xt(e),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(e){const s=this._rawValue,n=this.__v_isShallow||Gt(e)||_e(e);e=n?e:mt(e),Ce(e,s)&&(this._rawValue=e,this._value=n?e:Xt(e),this.dep.trigger())}}function En(t){return Lt(t)?t.value:t}const yo={get:(t,e,s)=>e==="__v_raw"?t:En(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Lt(i)&&!Lt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function Ql(t){return Ee(t)?t:new Proxy(t,yo)}class bo{constructor(e,s,n){this.fn=e,this.setter=s,this._value=void 0,this.dep=new xn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=as-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&kt!==this)return Nl(this,!0),!0}get value(){const e=this.dep.track();return Vl(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function $o(t,e,s=!1){let n,i;return ht(t)?n=t:(n=t.get,i=t.set),new bo(n,i,s)}const _s={},xs=new WeakMap;let Me;function ko(t,e=!1,s=Me){if(s){let n=xs.get(s);n||xs.set(s,n=[]),n.push(t)}}function wo(t,e,s=$t){const{immediate:n,deep:i,once:o,scheduler:a,augmentJob:r,call:u}=s,v=R=>i?R:Gt(R)||i===!1||i===0?pe(R,1):pe(R);let p,$,I,A,y=!1,P=!1;if(Lt(t)?($=()=>t.value,y=Gt(t)):Ee(t)?($=()=>v(t),y=!0):ct(t)?(P=!0,y=t.some(R=>Ee(R)||Gt(R)),$=()=>t.map(R=>{if(Lt(R))return R.value;if(Ee(R))return v(R);if(ht(R))return u?u(R,2):R()})):ht(t)?e?$=u?()=>u(t,2):t:$=()=>{if(I){ge();try{I()}finally{me()}}const R=Me;Me=p;try{return u?u(t,3,[A]):t(A)}finally{Me=R}}:$=ie,e&&i){const R=$,Q=i===!0?1/0:i;$=()=>pe(R(),Q)}const L=Ji(),_=()=>{p.stop(),L&&L.active&&$n(L.effects,p)};if(o&&e){const R=e;e=(...Q)=>{R(...Q),_()}}let E=P?new Array(t.length).fill(_s):_s;const T=R=>{if(!(!(p.flags&1)||!p.dirty&&!R))if(e){const Q=p.run();if(i||y||(P?Q.some((F,O)=>Ce(F,E[O])):Ce(Q,E))){I&&I();const F=Me;Me=p;try{const O=[Q,E===_s?void 0:P&&E[0]===_s?[]:E,A];E=Q,u?u(e,3,O):e(...O)}finally{Me=F}}}else p.run()};return r&&r(T),p=new Ll($),p.scheduler=a?()=>a(T,!1):T,A=R=>ko(R,!1,p),I=p.onStop=()=>{const R=xs.get(p);if(R){if(u)u(R,4);else for(const Q of R)Q();xs.delete(p)}},e?n?T(!0):E=p.run():a?a(T.bind(null,!0),!0):p.run(),_.pause=p.pause.bind(p),_.resume=p.resume.bind(p),_.stop=_,_}function pe(t,e=1/0,s){if(e<=0||!yt(t)||t.__v_skip||(s=s||new Map,(s.get(t)||0)>=e))return t;if(s.set(t,e),e--,Lt(t))pe(t.value,e,s);else if(ct(t))for(let n=0;n<t.length;n++)pe(t[n],e,s);else if(Be(t)||je(t))t.forEach(n=>{pe(n,e,s)});else if(Ml(t)){for(const n in t)pe(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&pe(t[n],e,s)}return t}/**
10
+ * @vue/runtime-core v3.5.29
11
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
+ * @license MIT
13
+ **/function ps(t,e,s,n){try{return n?t(...n):t()}catch(i){js(i,e,s)}}function re(t,e,s,n){if(ht(t)){const i=ps(t,e,s,n);return i&&Al(i)&&i.catch(o=>{js(o,e,s)}),i}if(ct(t)){const i=[];for(let o=0;o<t.length;o++)i.push(re(t[o],e,s,n));return i}}function js(t,e,s,n=!0){const i=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:a}=e&&e.appContext.config||$t;if(e){let r=e.parent;const u=e.proxy,v=`https://vuejs.org/error-reference/#runtime-${s}`;for(;r;){const p=r.ec;if(p){for(let $=0;$<p.length;$++)if(p[$](t,u,v)===!1)return}r=r.parent}if(o){ge(),ps(o,null,10,[t,u,v]),me();return}}To(t,s,i,n,a)}function To(t,e,s,n=!0,i=!1){if(i)throw t;console.error(t)}const Nt=[];let ne=-1;const Ue=[];let we=null,Oe=0;const Yl=Promise.resolve();let As=null;function es(t){const e=As||Yl;return t?e.then(this?t.bind(this):t):e}function Co(t){let e=ne+1,s=Nt.length;for(;e<s;){const n=e+s>>>1,i=Nt[n],o=us(i);o<t||o===t&&i.flags&2?e=n+1:s=n}return e}function Pn(t){if(!(t.flags&1)){const e=us(t),s=Nt[Nt.length-1];!s||!(t.flags&2)&&e>=us(s)?Nt.push(t):Nt.splice(Co(e),0,t),t.flags|=1,Xl()}}function Xl(){As||(As=Yl.then(ti))}function So(t){ct(t)?Ue.push(...t):we&&t.id===-1?we.splice(Oe+1,0,t):t.flags&1||(Ue.push(t),t.flags|=1),Xl()}function zn(t,e,s=ne+1){for(;s<Nt.length;s++){const n=Nt[s];if(n&&n.flags&2){if(t&&n.id!==t.uid)continue;Nt.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Zl(t){if(Ue.length){const e=[...new Set(Ue)].sort((s,n)=>us(s)-us(n));if(Ue.length=0,we){we.push(...e);return}for(we=e,Oe=0;Oe<we.length;Oe++){const s=we[Oe];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}we=null,Oe=0}}const us=t=>t.id==null?t.flags&2?-1:1/0:t.id;function ti(t){try{for(ne=0;ne<Nt.length;ne++){const e=Nt[ne];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),ps(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;ne<Nt.length;ne++){const e=Nt[ne];e&&(e.flags&=-2)}ne=-1,Nt.length=0,Zl(),As=null,(Nt.length||Ue.length)&&ti()}}let zt=null,ei=null;function Is(t){const e=zt;return zt=t,ei=t&&t.type.__scopeId||null,e}function xo(t,e=zt,s){if(!e||t._n)return t;const n=(...i)=>{n._d&&al(-1);const o=Is(e);let a;try{a=t(...i)}finally{Is(o),n._d&&al(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function At(t,e){if(zt===null)return t;const s=Hs(zt),n=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[o,a,r,u=$t]=e[i];o&&(ht(o)&&(o={mounted:o,updated:o}),o.deep&&pe(a),n.push({dir:o,instance:s,value:a,oldValue:void 0,arg:r,modifiers:u}))}return t}function Ae(t,e,s,n){const i=t.dirs,o=e&&e.dirs;for(let a=0;a<i.length;a++){const r=i[a];o&&(r.oldValue=o[a].value);let u=r.dir[n];u&&(ge(),re(u,s,8,[t.el,r,t,e]),me())}}function $s(t,e){if(jt){let s=jt.provides;const n=jt.parent&&jt.parent.provides;n===s&&(s=jt.provides=Object.create(n)),s[t]=e}}function ks(t,e,s=!1){const n=Ca();if(n||Ve){let i=Ve?Ve._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&t in i)return i[t];if(arguments.length>1)return s&&ht(e)?e.call(n&&n.proxy):e}}const Ao=Symbol.for("v-scx"),Io=()=>ks(Ao);function Ut(t,e,s){return si(t,e,s)}function si(t,e,s=$t){const{immediate:n,deep:i,flush:o,once:a}=s,r=Et({},s),u=e&&n||!e&&o!=="post";let v;if(ds){if(o==="sync"){const A=Io();v=A.__watcherHandles||(A.__watcherHandles=[])}else if(!u){const A=()=>{};return A.stop=ie,A.resume=ie,A.pause=ie,A}}const p=jt;r.call=(A,y,P)=>re(A,p,y,P);let $=!1;o==="post"?r.scheduler=A=>{Dt(A,p&&p.suspense)}:o!=="sync"&&($=!0,r.scheduler=(A,y)=>{y?A():Pn(A)}),r.augmentJob=A=>{e&&(A.flags|=4),$&&(A.flags|=2,p&&(A.id=p.uid,A.i=p))};const I=wo(t,e,r);return ds&&(v?v.push(I):u&&I()),I}function Mo(t,e,s){const n=this.proxy,i=Ct(t)?t.includes(".")?ni(n,t):()=>n[t]:t.bind(n,n);let o;ht(e)?o=e:(o=e.handler,s=e);const a=vs(this),r=si(i,o.bind(n),s);return a(),r}function ni(t,e){const s=e.split(".");return()=>{let n=t;for(let i=0;i<s.length&&n;i++)n=n[s[i]];return n}}const li=Symbol("_vte"),Ro=t=>t.__isTeleport,ss=t=>t&&(t.disabled||t.disabled===""),Gn=t=>t&&(t.defer||t.defer===""),Jn=t=>typeof SVGElement<"u"&&t instanceof SVGElement,Qn=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,rn=(t,e)=>{const s=t&&t.to;return Ct(s)?e?e(s):null:s},ii={name:"Teleport",__isTeleport:!0,process(t,e,s,n,i,o,a,r,u,v){const{mc:p,pc:$,pbc:I,o:{insert:A,querySelector:y,createText:P,createComment:L}}=v,_=ss(e.props);let{shapeFlag:E,children:T,dynamicChildren:R}=e;if(t==null){const Q=e.el=P(""),F=e.anchor=P("");A(Q,s,n),A(F,s,n);const O=(b,x)=>{E&16&&p(T,b,x,i,o,a,r,u)},it=()=>{const b=e.target=rn(e.props,y),x=un(b,e,P,A);b&&(a!=="svg"&&Jn(b)?a="svg":a!=="mathml"&&Qn(b)&&(a="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(b),_||(O(b,x),ws(e,!1)))};_&&(O(s,F),ws(e,!0)),Gn(e.props)?(e.el.__isMounted=!1,Dt(()=>{it(),delete e.el.__isMounted},o)):it()}else{if(Gn(e.props)&&t.el.__isMounted===!1){Dt(()=>{ii.process(t,e,s,n,i,o,a,r,u,v)},o);return}e.el=t.el,e.targetStart=t.targetStart;const Q=e.anchor=t.anchor,F=e.target=t.target,O=e.targetAnchor=t.targetAnchor,it=ss(t.props),b=it?s:F,x=it?Q:O;if(a==="svg"||Jn(F)?a="svg":(a==="mathml"||Qn(F))&&(a="mathml"),R?(I(t.dynamicChildren,R,b,i,o,a,r),On(t,e,!0)):u||$(t,e,b,x,i,o,a,r,!1),_)it?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):ys(e,s,Q,v,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const W=e.target=rn(e.props,y);W&&ys(e,W,null,v,0)}else it&&ys(e,F,O,v,1);ws(e,_)}},remove(t,e,s,{um:n,o:{remove:i}},o){const{shapeFlag:a,children:r,anchor:u,targetStart:v,targetAnchor:p,target:$,props:I}=t;if($&&(i(v),i(p)),o&&i(u),a&16){const A=o||!ss(I);for(let y=0;y<r.length;y++){const P=r[y];n(P,e,s,A,!!P.dynamicChildren)}}},move:ys,hydrate:Eo};function ys(t,e,s,{o:{insert:n},m:i},o=2){o===0&&n(t.targetAnchor,e,s);const{el:a,anchor:r,shapeFlag:u,children:v,props:p}=t,$=o===2;if($&&n(a,e,s),(!$||ss(p))&&u&16)for(let I=0;I<v.length;I++)i(v[I],e,s,2);$&&n(r,e,s)}function Eo(t,e,s,n,i,o,{o:{nextSibling:a,parentNode:r,querySelector:u,insert:v,createText:p}},$){function I(L,_){let E=_;for(;E;){if(E&&E.nodeType===8){if(E.data==="teleport start anchor")e.targetStart=E;else if(E.data==="teleport anchor"){e.targetAnchor=E,L._lpa=e.targetAnchor&&a(e.targetAnchor);break}}E=a(E)}}function A(L,_){_.anchor=$(a(L),_,r(L),s,n,i,o)}const y=e.target=rn(e.props,u),P=ss(e.props);if(y){const L=y._lpa||y.firstChild;e.shapeFlag&16&&(P?(A(t,e),I(y,L),e.targetAnchor||un(y,e,p,v,r(t)===y?t:null)):(e.anchor=a(t),I(y,L),e.targetAnchor||un(y,e,p,v),$(L&&a(L),e,y,s,n,i,o))),ws(e,P)}else P&&e.shapeFlag&16&&(A(t,e),e.targetStart=t,e.targetAnchor=a(t));return e.anchor&&a(e.anchor)}const Po=ii;function ws(t,e){const s=t.ctx;if(s&&s.ut){let n,i;for(e?(n=t.el,i=t.anchor):(n=t.targetStart,i=t.targetAnchor);n&&n!==i;)n.nodeType===1&&n.setAttribute("data-v-owner",s.uid),n=n.nextSibling;s.ut()}}function un(t,e,s,n,i=null){const o=e.targetStart=s(""),a=e.targetAnchor=s("");return o[li]=a,t&&(n(o,t,i),n(a,t,i)),a}const Do=Symbol("_leaveCb");function Dn(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Dn(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function It(t,e){return ht(t)?Et({name:t.name},e,{setup:t}):t}function oi(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function Yn(t,e){let s;return!!((s=Object.getOwnPropertyDescriptor(t,e))&&!s.configurable)}const Ms=new WeakMap;function ns(t,e,s,n,i=!1){if(ct(t)){t.forEach((P,L)=>ns(P,e&&(ct(e)?e[L]:e),s,n,i));return}if(ls(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&ns(t,e,s,n.component.subTree);return}const o=n.shapeFlag&4?Hs(n.component):n.el,a=i?null:o,{i:r,r:u}=t,v=e&&e.r,p=r.refs===$t?r.refs={}:r.refs,$=r.setupState,I=mt($),A=$===$t?xl:P=>Yn(p,P)?!1:_t(I,P),y=(P,L)=>!(L&&Yn(p,L));if(v!=null&&v!==u){if(Xn(e),Ct(v))p[v]=null,A(v)&&($[v]=null);else if(Lt(v)){const P=e;y(v,P.k)&&(v.value=null),P.k&&(p[P.k]=null)}}if(ht(u))ps(u,r,12,[a,p]);else{const P=Ct(u),L=Lt(u);if(P||L){const _=()=>{if(t.f){const E=P?A(u)?$[u]:p[u]:y()||!t.k?u.value:p[t.k];if(i)ct(E)&&$n(E,o);else if(ct(E))E.includes(o)||E.push(o);else if(P)p[u]=[o],A(u)&&($[u]=p[u]);else{const T=[o];y(u,t.k)&&(u.value=T),t.k&&(p[t.k]=T)}}else P?(p[u]=a,A(u)&&($[u]=a)):L&&(y(u,t.k)&&(u.value=a),t.k&&(p[t.k]=a))};if(a){const E=()=>{_(),Ms.delete(t)};E.id=-1,Ms.set(t,E),Dt(E,s)}else Xn(t),_()}}}function Xn(t){const e=Ms.get(t);e&&(e.flags|=8,Ms.delete(t))}Os().requestIdleCallback;Os().cancelIdleCallback;const ls=t=>!!t.type.__asyncLoader,ai=t=>t.type.__isKeepAlive;function Fo(t,e){ri(t,"a",e)}function Lo(t,e){ri(t,"da",e)}function ri(t,e,s=jt){const n=t.__wdc||(t.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(Us(e,n,s),s){let i=s.parent;for(;i&&i.parent;)ai(i.parent.vnode)&&Oo(n,e,s,i),i=i.parent}}function Oo(t,e,s,n){const i=Us(e,t,n,!0);Zt(()=>{$n(n[e],i)},s)}function Us(t,e,s=jt,n=!1){if(s){const i=s[t]||(s[t]=[]),o=e.__weh||(e.__weh=(...a)=>{ge();const r=vs(s),u=re(e,s,t,a);return r(),me(),u});return n?i.unshift(o):i.push(o),o}}const ye=t=>(e,s=jt)=>{(!ds||t==="sp")&&Us(t,(...n)=>e(...n),s)},No=ye("bm"),Wt=ye("m"),jo=ye("bu"),Uo=ye("u"),Vo=ye("bum"),Zt=ye("um"),Wo=ye("sp"),Ho=ye("rtg"),Ko=ye("rtc");function ui(t,e=jt){Us("ec",t,e)}const Bo=Symbol.for("v-ndc");function ft(t,e,s,n){let i;const o=s,a=ct(t);if(a||Ct(t)){const r=a&&Ee(t);let u=!1,v=!1;r&&(u=!Gt(t),v=_e(t),t=Ns(t)),i=new Array(t.length);for(let p=0,$=t.length;p<$;p++)i[p]=e(u?v?We(Xt(t[p])):Xt(t[p]):t[p],p,void 0,o)}else if(typeof t=="number"){i=new Array(t);for(let r=0;r<t;r++)i[r]=e(r+1,r,void 0,o)}else if(yt(t))if(t[Symbol.iterator])i=Array.from(t,(r,u)=>e(r,u,void 0,o));else{const r=Object.keys(t);i=new Array(r.length);for(let u=0,v=r.length;u<v;u++){const p=r[u];i[u]=e(t[p],p,u,o)}}else i=[];return i}const cn=t=>t?Mi(t)?Hs(t):cn(t.parent):null,is=Et(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>cn(t.parent),$root:t=>cn(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>di(t),$forceUpdate:t=>t.f||(t.f=()=>{Pn(t.update)}),$nextTick:t=>t.n||(t.n=es.bind(t.proxy)),$watch:t=>Mo.bind(t)}),Js=(t,e)=>t!==$t&&!t.__isScriptSetup&&_t(t,e),qo={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:o,accessCache:a,type:r,appContext:u}=t;if(e[0]!=="$"){const I=a[e];if(I!==void 0)switch(I){case 1:return n[e];case 2:return i[e];case 4:return s[e];case 3:return o[e]}else{if(Js(n,e))return a[e]=1,n[e];if(i!==$t&&_t(i,e))return a[e]=2,i[e];if(_t(o,e))return a[e]=3,o[e];if(s!==$t&&_t(s,e))return a[e]=4,s[e];dn&&(a[e]=0)}}const v=is[e];let p,$;if(v)return e==="$attrs"&&Ft(t.attrs,"get",""),v(t);if((p=r.__cssModules)&&(p=p[e]))return p;if(s!==$t&&_t(s,e))return a[e]=4,s[e];if($=u.config.globalProperties,_t($,e))return $[e]},set({_:t},e,s){const{data:n,setupState:i,ctx:o}=t;return Js(i,e)?(i[e]=s,!0):n!==$t&&_t(n,e)?(n[e]=s,!0):_t(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=s,!0)},has({_:{data:t,setupState:e,accessCache:s,ctx:n,appContext:i,props:o,type:a}},r){let u;return!!(s[r]||t!==$t&&r[0]!=="$"&&_t(t,r)||Js(e,r)||_t(o,r)||_t(n,r)||_t(is,r)||_t(i.config.globalProperties,r)||(u=a.__cssModules)&&u[r])},defineProperty(t,e,s){return s.get!=null?t._.accessCache[e]=0:_t(s,"value")&&this.set(t,e,s.value,null),Reflect.defineProperty(t,e,s)}};function Zn(t){return ct(t)?t.reduce((e,s)=>(e[s]=null,e),{}):t}let dn=!0;function zo(t){const e=di(t),s=t.proxy,n=t.ctx;dn=!1,e.beforeCreate&&tl(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:a,watch:r,provide:u,inject:v,created:p,beforeMount:$,mounted:I,beforeUpdate:A,updated:y,activated:P,deactivated:L,beforeDestroy:_,beforeUnmount:E,destroyed:T,unmounted:R,render:Q,renderTracked:F,renderTriggered:O,errorCaptured:it,serverPrefetch:b,expose:x,inheritAttrs:W,components:C,directives:at,filters:bt}=e;if(v&&Go(v,n,null),a)for(const pt in a){const vt=a[pt];ht(vt)&&(n[pt]=vt.bind(s))}if(i){const pt=i.call(s,s);yt(pt)&&(t.data=In(pt))}if(dn=!0,o)for(const pt in o){const vt=o[pt],Y=ht(vt)?vt.bind(s,s):ht(vt.get)?vt.get.bind(s,s):ie,j=!ht(vt)&&ht(vt.set)?vt.set.bind(s):ie,S=lt({get:Y,set:j});Object.defineProperty(n,pt,{enumerable:!0,configurable:!0,get:()=>S.value,set:k=>S.value=k})}if(r)for(const pt in r)ci(r[pt],n,s,pt);if(u){const pt=ht(u)?u.call(s):u;Reflect.ownKeys(pt).forEach(vt=>{$s(vt,pt[vt])})}p&&tl(p,t,"c");function dt(pt,vt){ct(vt)?vt.forEach(Y=>pt(Y.bind(s))):vt&&pt(vt.bind(s))}if(dt(No,$),dt(Wt,I),dt(jo,A),dt(Uo,y),dt(Fo,P),dt(Lo,L),dt(ui,it),dt(Ko,F),dt(Ho,O),dt(Vo,E),dt(Zt,R),dt(Wo,b),ct(x))if(x.length){const pt=t.exposed||(t.exposed={});x.forEach(vt=>{Object.defineProperty(pt,vt,{get:()=>s[vt],set:Y=>s[vt]=Y,enumerable:!0})})}else t.exposed||(t.exposed={});Q&&t.render===ie&&(t.render=Q),W!=null&&(t.inheritAttrs=W),C&&(t.components=C),at&&(t.directives=at),b&&oi(t)}function Go(t,e,s=ie){ct(t)&&(t=fn(t));for(const n in t){const i=t[n];let o;yt(i)?"default"in i?o=ks(i.from||n,i.default,!0):o=ks(i.from||n):o=ks(i),Lt(o)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):e[n]=o}}function tl(t,e,s){re(ct(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,s)}function ci(t,e,s,n){let i=n.includes(".")?ni(s,n):()=>s[n];if(Ct(t)){const o=e[t];ht(o)&&Ut(i,o)}else if(ht(t))Ut(i,t.bind(s));else if(yt(t))if(ct(t))t.forEach(o=>ci(o,e,s,n));else{const o=ht(t.handler)?t.handler.bind(s):e[t.handler];ht(o)&&Ut(i,o,t)}}function di(t){const e=t.type,{mixins:s,extends:n}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=t.appContext,r=o.get(e);let u;return r?u=r:!i.length&&!s&&!n?u=e:(u={},i.length&&i.forEach(v=>Rs(u,v,a,!0)),Rs(u,e,a)),yt(e)&&o.set(e,u),u}function Rs(t,e,s,n=!1){const{mixins:i,extends:o}=e;o&&Rs(t,o,s,!0),i&&i.forEach(a=>Rs(t,a,s,!0));for(const a in e)if(!(n&&a==="expose")){const r=Jo[a]||s&&s[a];t[a]=r?r(t[a],e[a]):e[a]}return t}const Jo={data:el,props:sl,emits:sl,methods:Ye,computed:Ye,beforeCreate:Ot,created:Ot,beforeMount:Ot,mounted:Ot,beforeUpdate:Ot,updated:Ot,beforeDestroy:Ot,beforeUnmount:Ot,destroyed:Ot,unmounted:Ot,activated:Ot,deactivated:Ot,errorCaptured:Ot,serverPrefetch:Ot,components:Ye,directives:Ye,watch:Yo,provide:el,inject:Qo};function el(t,e){return e?t?function(){return Et(ht(t)?t.call(this,this):t,ht(e)?e.call(this,this):e)}:e:t}function Qo(t,e){return Ye(fn(t),fn(e))}function fn(t){if(ct(t)){const e={};for(let s=0;s<t.length;s++)e[t[s]]=t[s];return e}return t}function Ot(t,e){return t?[...new Set([].concat(t,e))]:e}function Ye(t,e){return t?Et(Object.create(null),t,e):e}function sl(t,e){return t?ct(t)&&ct(e)?[...new Set([...t,...e])]:Et(Object.create(null),Zn(t),Zn(e??{})):e}function Yo(t,e){if(!t)return e;if(!e)return t;const s=Et(Object.create(null),t);for(const n in e)s[n]=Ot(t[n],e[n]);return s}function fi(){return{app:null,config:{isNativeTag:xl,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 Xo=0;function Zo(t,e){return function(n,i=null){ht(n)||(n=Et({},n)),i!=null&&!yt(i)&&(i=null);const o=fi(),a=new WeakSet,r=[];let u=!1;const v=o.app={_uid:Xo++,_component:n,_props:i,_container:null,_context:o,_instance:null,version:Ra,get config(){return o.config},set config(p){},use(p,...$){return a.has(p)||(p&&ht(p.install)?(a.add(p),p.install(v,...$)):ht(p)&&(a.add(p),p(v,...$))),v},mixin(p){return o.mixins.includes(p)||o.mixins.push(p),v},component(p,$){return $?(o.components[p]=$,v):o.components[p]},directive(p,$){return $?(o.directives[p]=$,v):o.directives[p]},mount(p,$,I){if(!u){const A=v._ceVNode||wt(n,i);return A.appContext=o,I===!0?I="svg":I===!1&&(I=void 0),t(A,p,I),u=!0,v._container=p,p.__vue_app__=v,Hs(A.component)}},onUnmount(p){r.push(p)},unmount(){u&&(re(r,v._instance,16),t(null,v._container),delete v._container.__vue_app__)},provide(p,$){return o.provides[p]=$,v},runWithContext(p){const $=Ve;Ve=v;try{return p()}finally{Ve=$}}};return v}}let Ve=null;const ta=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Se(e)}Modifiers`]||t[`${De(e)}Modifiers`];function ea(t,e,...s){if(t.isUnmounted)return;const n=t.vnode.props||$t;let i=s;const o=e.startsWith("update:"),a=o&&ta(n,e.slice(7));a&&(a.trim&&(i=s.map(p=>Ct(p)?p.trim():p)),a.number&&(i=s.map(Ls)));let r,u=n[r=Ks(e)]||n[r=Ks(Se(e))];!u&&o&&(u=n[r=Ks(De(e))]),u&&re(u,t,6,i);const v=n[r+"Once"];if(v){if(!t.emitted)t.emitted={};else if(t.emitted[r])return;t.emitted[r]=!0,re(v,t,6,i)}}const sa=new WeakMap;function hi(t,e,s=!1){const n=s?sa:e.emitsCache,i=n.get(t);if(i!==void 0)return i;const o=t.emits;let a={},r=!1;if(!ht(t)){const u=v=>{const p=hi(v,e,!0);p&&(r=!0,Et(a,p))};!s&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}return!o&&!r?(yt(t)&&n.set(t,null),null):(ct(o)?o.forEach(u=>a[u]=null):Et(a,o),yt(t)&&n.set(t,a),a)}function Vs(t,e){return!t||!Ds(e)?!1:(e=e.slice(2).replace(/Once$/,""),_t(t,e[0].toLowerCase()+e.slice(1))||_t(t,De(e))||_t(t,e))}function nl(t){const{type:e,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:a,attrs:r,emit:u,render:v,renderCache:p,props:$,data:I,setupState:A,ctx:y,inheritAttrs:P}=t,L=Is(t);let _,E;try{if(s.shapeFlag&4){const R=i||n,Q=R;_=le(v.call(Q,R,p,$,A,I,y)),E=r}else{const R=e;_=le(R.length>1?R($,{attrs:r,slots:a,emit:u}):R($,null)),E=e.props?r:na(r)}}catch(R){os.length=0,js(R,t,1),_=wt(xe)}let T=_;if(E&&P!==!1){const R=Object.keys(E),{shapeFlag:Q}=T;R.length&&Q&7&&(o&&R.some(bn)&&(E=la(E,o)),T=He(T,E,!1,!0))}return s.dirs&&(T=He(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(s.dirs):s.dirs),s.transition&&Dn(T,s.transition),_=T,Is(L),_}const na=t=>{let e;for(const s in t)(s==="class"||s==="style"||Ds(s))&&((e||(e={}))[s]=t[s]);return e},la=(t,e)=>{const s={};for(const n in t)(!bn(n)||!(n.slice(9)in e))&&(s[n]=t[n]);return s};function ia(t,e,s){const{props:n,children:i,component:o}=t,{props:a,children:r,patchFlag:u}=e,v=o.emitsOptions;if(e.dirs||e.transition)return!0;if(s&&u>=0){if(u&1024)return!0;if(u&16)return n?ll(n,a,v):!!a;if(u&8){const p=e.dynamicProps;for(let $=0;$<p.length;$++){const I=p[$];if(pi(a,n,I)&&!Vs(v,I))return!0}}}else return(i||r)&&(!r||!r.$stable)?!0:n===a?!1:n?a?ll(n,a,v):!0:!!a;return!1}function ll(t,e,s){const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(let i=0;i<n.length;i++){const o=n[i];if(pi(e,t,o)&&!Vs(s,o))return!0}return!1}function pi(t,e,s){const n=t[s],i=e[s];return s==="style"&&yt(n)&&yt(i)?!qe(n,i):n!==i}function oa({vnode:t,parent:e},s){for(;e;){const n=e.subTree;if(n.suspense&&n.suspense.activeBranch===t&&(n.el=t.el),n===t)(t=e.vnode).el=s,e=e.parent;else break}}const vi={},gi=()=>Object.create(vi),mi=t=>Object.getPrototypeOf(t)===vi;function aa(t,e,s,n=!1){const i={},o=gi();t.propsDefaults=Object.create(null),_i(t,e,i,o);for(const a in t.propsOptions[0])a in i||(i[a]=void 0);s?t.props=n?i:vo(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function ra(t,e,s,n){const{props:i,attrs:o,vnode:{patchFlag:a}}=t,r=mt(i),[u]=t.propsOptions;let v=!1;if((n||a>0)&&!(a&16)){if(a&8){const p=t.vnode.dynamicProps;for(let $=0;$<p.length;$++){let I=p[$];if(Vs(t.emitsOptions,I))continue;const A=e[I];if(u)if(_t(o,I))A!==o[I]&&(o[I]=A,v=!0);else{const y=Se(I);i[y]=hn(u,r,y,A,t,!1)}else A!==o[I]&&(o[I]=A,v=!0)}}}else{_i(t,e,i,o)&&(v=!0);let p;for(const $ in r)(!e||!_t(e,$)&&((p=De($))===$||!_t(e,p)))&&(u?s&&(s[$]!==void 0||s[p]!==void 0)&&(i[$]=hn(u,r,$,void 0,t,!0)):delete i[$]);if(o!==r)for(const $ in o)(!e||!_t(e,$))&&(delete o[$],v=!0)}v&&he(t.attrs,"set","")}function _i(t,e,s,n){const[i,o]=t.propsOptions;let a=!1,r;if(e)for(let u in e){if(Xe(u))continue;const v=e[u];let p;i&&_t(i,p=Se(u))?!o||!o.includes(p)?s[p]=v:(r||(r={}))[p]=v:Vs(t.emitsOptions,u)||(!(u in n)||v!==n[u])&&(n[u]=v,a=!0)}if(o){const u=mt(s),v=r||$t;for(let p=0;p<o.length;p++){const $=o[p];s[$]=hn(i,u,$,v[$],t,!_t(v,$))}}return a}function hn(t,e,s,n,i,o){const a=t[s];if(a!=null){const r=_t(a,"default");if(r&&n===void 0){const u=a.default;if(a.type!==Function&&!a.skipFactory&&ht(u)){const{propsDefaults:v}=i;if(s in v)n=v[s];else{const p=vs(i);n=v[s]=u.call(null,e),p()}}else n=u;i.ce&&i.ce._setProp(s,n)}a[0]&&(o&&!r?n=!1:a[1]&&(n===""||n===De(s))&&(n=!0))}return n}const ua=new WeakMap;function yi(t,e,s=!1){const n=s?ua:e.propsCache,i=n.get(t);if(i)return i;const o=t.props,a={},r=[];let u=!1;if(!ht(t)){const p=$=>{u=!0;const[I,A]=yi($,e,!0);Et(a,I),A&&r.push(...A)};!s&&e.mixins.length&&e.mixins.forEach(p),t.extends&&p(t.extends),t.mixins&&t.mixins.forEach(p)}if(!o&&!u)return yt(t)&&n.set(t,Ne),Ne;if(ct(o))for(let p=0;p<o.length;p++){const $=Se(o[p]);il($)&&(a[$]=$t)}else if(o)for(const p in o){const $=Se(p);if(il($)){const I=o[p],A=a[$]=ct(I)||ht(I)?{type:I}:Et({},I),y=A.type;let P=!1,L=!0;if(ct(y))for(let _=0;_<y.length;++_){const E=y[_],T=ht(E)&&E.name;if(T==="Boolean"){P=!0;break}else T==="String"&&(L=!1)}else P=ht(y)&&y.name==="Boolean";A[0]=P,A[1]=L,(P||_t(A,"default"))&&r.push($)}}const v=[a,r];return yt(t)&&n.set(t,v),v}function il(t){return t[0]!=="$"&&!Xe(t)}const Fn=t=>t==="_"||t==="_ctx"||t==="$stable",Ln=t=>ct(t)?t.map(le):[le(t)],ca=(t,e,s)=>{if(e._n)return e;const n=xo((...i)=>Ln(e(...i)),s);return n._c=!1,n},bi=(t,e,s)=>{const n=t._ctx;for(const i in t){if(Fn(i))continue;const o=t[i];if(ht(o))e[i]=ca(i,o,n);else if(o!=null){const a=Ln(o);e[i]=()=>a}}},$i=(t,e)=>{const s=Ln(e);t.slots.default=()=>s},ki=(t,e,s)=>{for(const n in e)(s||!Fn(n))&&(t[n]=e[n])},da=(t,e,s)=>{const n=t.slots=gi();if(t.vnode.shapeFlag&32){const i=e._;i?(ki(n,e,s),s&&El(n,"_",i,!0)):bi(e,n)}else e&&$i(t,e)},fa=(t,e,s)=>{const{vnode:n,slots:i}=t;let o=!0,a=$t;if(n.shapeFlag&32){const r=e._;r?s&&r===1?o=!1:ki(i,e,s):(o=!e.$stable,bi(e,i)),a=e}else e&&($i(t,e),a={default:1});if(o)for(const r in i)!Fn(r)&&a[r]==null&&delete i[r]},Dt=ma;function ha(t){return pa(t)}function pa(t,e){const s=Os();s.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:a,createText:r,createComment:u,setText:v,setElementText:p,parentNode:$,nextSibling:I,setScopeId:A=ie,insertStaticContent:y}=t,P=(h,g,M,q=null,V=null,K=null,X=void 0,J=null,G=!!g.dynamicChildren)=>{if(h===g)return;h&&!Je(h,g)&&(q=Ht(h),k(h,V,K,!0),h=null),g.patchFlag===-2&&(G=!1,g.dynamicChildren=null);const{type:H,ref:w,shapeFlag:m}=g;switch(H){case Ws:L(h,g,M,q);break;case xe:_(h,g,M,q);break;case Ts:h==null&&E(g,M,q,X);break;case nt:C(h,g,M,q,V,K,X,J,G);break;default:m&1?Q(h,g,M,q,V,K,X,J,G):m&6?at(h,g,M,q,V,K,X,J,G):(m&64||m&128)&&H.process(h,g,M,q,V,K,X,J,G,Jt)}w!=null&&V?ns(w,h&&h.ref,K,g||h,!g):w==null&&h&&h.ref!=null&&ns(h.ref,null,K,h,!0)},L=(h,g,M,q)=>{if(h==null)n(g.el=r(g.children),M,q);else{const V=g.el=h.el;g.children!==h.children&&v(V,g.children)}},_=(h,g,M,q)=>{h==null?n(g.el=u(g.children||""),M,q):g.el=h.el},E=(h,g,M,q)=>{[h.el,h.anchor]=y(h.children,g,M,q,h.el,h.anchor)},T=({el:h,anchor:g},M,q)=>{let V;for(;h&&h!==g;)V=I(h),n(h,M,q),h=V;n(g,M,q)},R=({el:h,anchor:g})=>{let M;for(;h&&h!==g;)M=I(h),i(h),h=M;i(g)},Q=(h,g,M,q,V,K,X,J,G)=>{if(g.type==="svg"?X="svg":g.type==="math"&&(X="mathml"),h==null)F(g,M,q,V,K,X,J,G);else{const H=h.el&&h.el._isVueCE?h.el:null;try{H&&H._beginPatch(),b(h,g,V,K,X,J,G)}finally{H&&H._endPatch()}}},F=(h,g,M,q,V,K,X,J)=>{let G,H;const{props:w,shapeFlag:m,transition:U,dirs:z}=h;if(G=h.el=a(h.type,K,w&&w.is,w),m&8?p(G,h.children):m&16&&it(h.children,G,null,q,V,Qs(h,K),X,J),z&&Ae(h,null,q,"created"),O(G,h,h.scopeId,X,q),w){for(const B in w)B!=="value"&&!Xe(B)&&o(G,B,null,w[B],K,q);"value"in w&&o(G,"value",null,w.value,K),(H=w.onVnodeBeforeMount)&&se(H,q,h)}z&&Ae(h,null,q,"beforeMount");const st=va(V,U);st&&U.beforeEnter(G),n(G,g,M),((H=w&&w.onVnodeMounted)||st||z)&&Dt(()=>{H&&se(H,q,h),st&&U.enter(G),z&&Ae(h,null,q,"mounted")},V)},O=(h,g,M,q,V)=>{if(M&&A(h,M),q)for(let K=0;K<q.length;K++)A(h,q[K]);if(V){let K=V.subTree;if(g===K||Ci(K.type)&&(K.ssContent===g||K.ssFallback===g)){const X=V.vnode;O(h,X,X.scopeId,X.slotScopeIds,V.parent)}}},it=(h,g,M,q,V,K,X,J,G=0)=>{for(let H=G;H<h.length;H++){const w=h[H]=J?fe(h[H]):le(h[H]);P(null,w,g,M,q,V,K,X,J)}},b=(h,g,M,q,V,K,X)=>{const J=g.el=h.el;let{patchFlag:G,dynamicChildren:H,dirs:w}=g;G|=h.patchFlag&16;const m=h.props||$t,U=g.props||$t;let z;if(M&&Ie(M,!1),(z=U.onVnodeBeforeUpdate)&&se(z,M,g,h),w&&Ae(g,h,M,"beforeUpdate"),M&&Ie(M,!0),(m.innerHTML&&U.innerHTML==null||m.textContent&&U.textContent==null)&&p(J,""),H?x(h.dynamicChildren,H,J,M,q,Qs(g,V),K):X||vt(h,g,J,null,M,q,Qs(g,V),K,!1),G>0){if(G&16)W(J,m,U,M,V);else if(G&2&&m.class!==U.class&&o(J,"class",null,U.class,V),G&4&&o(J,"style",m.style,U.style,V),G&8){const st=g.dynamicProps;for(let B=0;B<st.length;B++){const ot=st[B],gt=m[ot],Rt=U[ot];(Rt!==gt||ot==="value")&&o(J,ot,gt,Rt,V,M)}}G&1&&h.children!==g.children&&p(J,g.children)}else!X&&H==null&&W(J,m,U,M,V);((z=U.onVnodeUpdated)||w)&&Dt(()=>{z&&se(z,M,g,h),w&&Ae(g,h,M,"updated")},q)},x=(h,g,M,q,V,K,X)=>{for(let J=0;J<g.length;J++){const G=h[J],H=g[J],w=G.el&&(G.type===nt||!Je(G,H)||G.shapeFlag&198)?$(G.el):M;P(G,H,w,null,q,V,K,X,!0)}},W=(h,g,M,q,V)=>{if(g!==M){if(g!==$t)for(const K in g)!Xe(K)&&!(K in M)&&o(h,K,g[K],null,V,q);for(const K in M){if(Xe(K))continue;const X=M[K],J=g[K];X!==J&&K!=="value"&&o(h,K,J,X,V,q)}"value"in M&&o(h,"value",g.value,M.value,V)}},C=(h,g,M,q,V,K,X,J,G)=>{const H=g.el=h?h.el:r(""),w=g.anchor=h?h.anchor:r("");let{patchFlag:m,dynamicChildren:U,slotScopeIds:z}=g;z&&(J=J?J.concat(z):z),h==null?(n(H,M,q),n(w,M,q),it(g.children||[],M,w,V,K,X,J,G)):m>0&&m&64&&U&&h.dynamicChildren&&h.dynamicChildren.length===U.length?(x(h.dynamicChildren,U,M,V,K,X,J),(g.key!=null||V&&g===V.subTree)&&On(h,g,!0)):vt(h,g,M,w,V,K,X,J,G)},at=(h,g,M,q,V,K,X,J,G)=>{g.slotScopeIds=J,h==null?g.shapeFlag&512?V.ctx.activate(g,M,q,X,G):bt(g,M,q,V,K,X,G):rt(h,g,G)},bt=(h,g,M,q,V,K,X)=>{const J=h.component=Ta(h,q,V);if(ai(h)&&(J.ctx.renderer=Jt),Sa(J,!1,X),J.asyncDep){if(V&&V.registerDep(J,dt,X),!h.el){const G=J.subTree=wt(xe);_(null,G,g,M),h.placeholder=G.el}}else dt(J,h,g,M,V,K,X)},rt=(h,g,M)=>{const q=g.component=h.component;if(ia(h,g,M))if(q.asyncDep&&!q.asyncResolved){pt(q,g,M);return}else q.next=g,q.update();else g.el=h.el,q.vnode=g},dt=(h,g,M,q,V,K,X)=>{const J=()=>{if(h.isMounted){let{next:m,bu:U,u:z,parent:st,vnode:B}=h;{const Bt=wi(h);if(Bt){m&&(m.el=B.el,pt(h,m,X)),Bt.asyncDep.then(()=>{Dt(()=>{h.isUnmounted||H()},V)});return}}let ot=m,gt;Ie(h,!1),m?(m.el=B.el,pt(h,m,X)):m=B,U&&bs(U),(gt=m.props&&m.props.onVnodeBeforeUpdate)&&se(gt,st,m,B),Ie(h,!0);const Rt=nl(h),Kt=h.subTree;h.subTree=Rt,P(Kt,Rt,$(Kt.el),Ht(Kt),h,V,K),m.el=Rt.el,ot===null&&oa(h,Rt.el),z&&Dt(z,V),(gt=m.props&&m.props.onVnodeUpdated)&&Dt(()=>se(gt,st,m,B),V)}else{let m;const{el:U,props:z}=g,{bm:st,m:B,parent:ot,root:gt,type:Rt}=h,Kt=ls(g);Ie(h,!1),st&&bs(st),!Kt&&(m=z&&z.onVnodeBeforeMount)&&se(m,ot,g),Ie(h,!0);{gt.ce&&gt.ce._hasShadowRoot()&&gt.ce._injectChildStyle(Rt);const Bt=h.subTree=nl(h);P(null,Bt,M,q,h,V,K),g.el=Bt.el}if(B&&Dt(B,V),!Kt&&(m=z&&z.onVnodeMounted)){const Bt=g;Dt(()=>se(m,ot,Bt),V)}(g.shapeFlag&256||ot&&ls(ot.vnode)&&ot.vnode.shapeFlag&256)&&h.a&&Dt(h.a,V),h.isMounted=!0,g=M=q=null}};h.scope.on();const G=h.effect=new Ll(J);h.scope.off();const H=h.update=G.run.bind(G),w=h.job=G.runIfDirty.bind(G);w.i=h,w.id=h.uid,G.scheduler=()=>Pn(w),Ie(h,!0),H()},pt=(h,g,M)=>{g.component=h;const q=h.vnode.props;h.vnode=g,h.next=null,ra(h,g.props,q,M),fa(h,g.children,M),ge(),zn(h),me()},vt=(h,g,M,q,V,K,X,J,G=!1)=>{const H=h&&h.children,w=h?h.shapeFlag:0,m=g.children,{patchFlag:U,shapeFlag:z}=g;if(U>0){if(U&128){j(H,m,M,q,V,K,X,J,G);return}else if(U&256){Y(H,m,M,q,V,K,X,J,G);return}}z&8?(w&16&&Tt(H,V,K),m!==H&&p(M,m)):w&16?z&16?j(H,m,M,q,V,K,X,J,G):Tt(H,V,K,!0):(w&8&&p(M,""),z&16&&it(m,M,q,V,K,X,J,G))},Y=(h,g,M,q,V,K,X,J,G)=>{h=h||Ne,g=g||Ne;const H=h.length,w=g.length,m=Math.min(H,w);let U;for(U=0;U<m;U++){const z=g[U]=G?fe(g[U]):le(g[U]);P(h[U],z,M,null,V,K,X,J,G)}H>w?Tt(h,V,K,!0,!1,m):it(g,M,q,V,K,X,J,G,m)},j=(h,g,M,q,V,K,X,J,G)=>{let H=0;const w=g.length;let m=h.length-1,U=w-1;for(;H<=m&&H<=U;){const z=h[H],st=g[H]=G?fe(g[H]):le(g[H]);if(Je(z,st))P(z,st,M,null,V,K,X,J,G);else break;H++}for(;H<=m&&H<=U;){const z=h[m],st=g[U]=G?fe(g[U]):le(g[U]);if(Je(z,st))P(z,st,M,null,V,K,X,J,G);else break;m--,U--}if(H>m){if(H<=U){const z=U+1,st=z<w?g[z].el:q;for(;H<=U;)P(null,g[H]=G?fe(g[H]):le(g[H]),M,st,V,K,X,J,G),H++}}else if(H>U)for(;H<=m;)k(h[H],V,K,!0),H++;else{const z=H,st=H,B=new Map;for(H=st;H<=U;H++){const Pt=g[H]=G?fe(g[H]):le(g[H]);Pt.key!=null&&B.set(Pt.key,H)}let ot,gt=0;const Rt=U-st+1;let Kt=!1,Bt=0;const $e=new Array(Rt);for(H=0;H<Rt;H++)$e[H]=0;for(H=z;H<=m;H++){const Pt=h[H];if(gt>=Rt){k(Pt,V,K,!0);continue}let ee;if(Pt.key!=null)ee=B.get(Pt.key);else for(ot=st;ot<=U;ot++)if($e[ot-st]===0&&Je(Pt,g[ot])){ee=ot;break}ee===void 0?k(Pt,V,K,!0):($e[ee-st]=H+1,ee>=Bt?Bt=ee:Kt=!0,P(Pt,g[ee],M,null,V,K,X,J,G),gt++)}const ze=Kt?ga($e):Ne;for(ot=ze.length-1,H=Rt-1;H>=0;H--){const Pt=st+H,ee=g[Pt],Vn=g[Pt+1],Wn=Pt+1<w?Vn.el||Ti(Vn):q;$e[H]===0?P(null,ee,M,Wn,V,K,X,J,G):Kt&&(ot<0||H!==ze[ot]?S(ee,M,Wn,2):ot--)}}},S=(h,g,M,q,V=null)=>{const{el:K,type:X,transition:J,children:G,shapeFlag:H}=h;if(H&6){S(h.component.subTree,g,M,q);return}if(H&128){h.suspense.move(g,M,q);return}if(H&64){X.move(h,g,M,Jt);return}if(X===nt){n(K,g,M);for(let m=0;m<G.length;m++)S(G[m],g,M,q);n(h.anchor,g,M);return}if(X===Ts){T(h,g,M);return}if(q!==2&&H&1&&J)if(q===0)J.beforeEnter(K),n(K,g,M),Dt(()=>J.enter(K),V);else{const{leave:m,delayLeave:U,afterLeave:z}=J,st=()=>{h.ctx.isUnmounted?i(K):n(K,g,M)},B=()=>{K._isLeaving&&K[Do](!0),m(K,()=>{st(),z&&z()})};U?U(K,st,B):B()}else n(K,g,M)},k=(h,g,M,q=!1,V=!1)=>{const{type:K,props:X,ref:J,children:G,dynamicChildren:H,shapeFlag:w,patchFlag:m,dirs:U,cacheIndex:z}=h;if(m===-2&&(V=!1),J!=null&&(ge(),ns(J,null,M,h,!0),me()),z!=null&&(g.renderCache[z]=void 0),w&256){g.ctx.deactivate(h);return}const st=w&1&&U,B=!ls(h);let ot;if(B&&(ot=X&&X.onVnodeBeforeUnmount)&&se(ot,g,h),w&6)tt(h.component,M,q);else{if(w&128){h.suspense.unmount(M,q);return}st&&Ae(h,null,g,"beforeUnmount"),w&64?h.type.remove(h,g,M,Jt,q):H&&!H.hasOnce&&(K!==nt||m>0&&m&64)?Tt(H,g,M,!1,!0):(K===nt&&m&384||!V&&w&16)&&Tt(G,g,M),q&&Z(h)}(B&&(ot=X&&X.onVnodeUnmounted)||st)&&Dt(()=>{ot&&se(ot,g,h),st&&Ae(h,null,g,"unmounted")},M)},Z=h=>{const{type:g,el:M,anchor:q,transition:V}=h;if(g===nt){et(M,q);return}if(g===Ts){R(h);return}const K=()=>{i(M),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(h.shapeFlag&1&&V&&!V.persisted){const{leave:X,delayLeave:J}=V,G=()=>X(M,K);J?J(h.el,K,G):G()}else K()},et=(h,g)=>{let M;for(;h!==g;)M=I(h),i(h),h=M;i(g)},tt=(h,g,M)=>{const{bum:q,scope:V,job:K,subTree:X,um:J,m:G,a:H}=h;ol(G),ol(H),q&&bs(q),V.stop(),K&&(K.flags|=8,k(X,h,g,M)),J&&Dt(J,g),Dt(()=>{h.isUnmounted=!0},g)},Tt=(h,g,M,q=!1,V=!1,K=0)=>{for(let X=K;X<h.length;X++)k(h[X],g,M,q,V)},Ht=h=>{if(h.shapeFlag&6)return Ht(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const g=I(h.anchor||h.el),M=g&&g[li];return M?I(M):g};let be=!1;const te=(h,g,M)=>{let q;h==null?g._vnode&&(k(g._vnode,null,null,!0),q=g._vnode.component):P(g._vnode||null,h,g,null,null,null,M),g._vnode=h,be||(be=!0,zn(q),Zl(),be=!1)},Jt={p:P,um:k,m:S,r:Z,mt:bt,mc:it,pc:vt,pbc:x,n:Ht,o:t};return{render:te,hydrate:void 0,createApp:Zo(te)}}function Qs({type:t,props:e},s){return s==="svg"&&t==="foreignObject"||s==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:s}function Ie({effect:t,job:e},s){s?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function va(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function On(t,e,s=!1){const n=t.children,i=e.children;if(ct(n)&&ct(i))for(let o=0;o<n.length;o++){const a=n[o];let r=i[o];r.shapeFlag&1&&!r.dynamicChildren&&((r.patchFlag<=0||r.patchFlag===32)&&(r=i[o]=fe(i[o]),r.el=a.el),!s&&r.patchFlag!==-2&&On(a,r)),r.type===Ws&&(r.patchFlag===-1&&(r=i[o]=fe(r)),r.el=a.el),r.type===xe&&!r.el&&(r.el=a.el)}}function ga(t){const e=t.slice(),s=[0];let n,i,o,a,r;const u=t.length;for(n=0;n<u;n++){const v=t[n];if(v!==0){if(i=s[s.length-1],t[i]<v){e[n]=i,s.push(n);continue}for(o=0,a=s.length-1;o<a;)r=o+a>>1,t[s[r]]<v?o=r+1:a=r;v<t[s[o]]&&(o>0&&(e[n]=s[o-1]),s[o]=n)}}for(o=s.length,a=s[o-1];o-- >0;)s[o]=a,a=e[a];return s}function wi(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:wi(e)}function ol(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function Ti(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?Ti(e.subTree):null}const Ci=t=>t.__isSuspense;function ma(t,e){e&&e.pendingBranch?ct(t)?e.effects.push(...t):e.effects.push(t):So(t)}const nt=Symbol.for("v-fgt"),Ws=Symbol.for("v-txt"),xe=Symbol.for("v-cmt"),Ts=Symbol.for("v-stc"),os=[];let qt=null;function c(t=!1){os.push(qt=t?null:[])}function _a(){os.pop(),qt=os[os.length-1]||null}let cs=1;function al(t,e=!1){cs+=t,t<0&&qt&&e&&(qt.hasOnce=!0)}function Si(t){return t.dynamicChildren=cs>0?qt||Ne:null,_a(),cs>0&&qt&&qt.push(t),t}function d(t,e,s,n,i,o){return Si(l(t,e,s,n,i,o,!0))}function Qt(t,e,s,n,i){return Si(wt(t,e,s,n,i,!0))}function xi(t){return t?t.__v_isVNode===!0:!1}function Je(t,e){return t.type===e.type&&t.key===e.key}const Ai=({key:t})=>t??null,Cs=({ref:t,ref_key:e,ref_for:s})=>(typeof t=="number"&&(t=""+t),t!=null?Ct(t)||Lt(t)||ht(t)?{i:zt,r:t,k:e,f:!!s}:t:null);function l(t,e=null,s=null,n=0,i=null,o=t===nt?0:1,a=!1,r=!1){const u={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Ai(e),ref:e&&Cs(e),scopeId:ei,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:zt};return r?(Nn(u,s),o&128&&t.normalize(u)):s&&(u.shapeFlag|=Ct(s)?8:16),cs>0&&!a&&qt&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&qt.push(u),u}const wt=ya;function ya(t,e=null,s=null,n=0,i=null,o=!1){if((!t||t===Bo)&&(t=xe),xi(t)){const r=He(t,e,!0);return s&&Nn(r,s),cs>0&&!o&&qt&&(r.shapeFlag&6?qt[qt.indexOf(t)]=r:qt.push(r)),r.patchFlag=-2,r}if(Ma(t)&&(t=t.__vccOpts),e){e=ba(e);let{class:r,style:u}=e;r&&!Ct(r)&&(e.class=ut(r)),yt(u)&&(Rn(u)&&!ct(u)&&(u=Et({},u)),e.style=xt(u))}const a=Ct(t)?1:Ci(t)?128:Ro(t)?64:yt(t)?4:ht(t)?2:0;return l(t,e,s,n,i,a,o,!0)}function ba(t){return t?Rn(t)||mi(t)?Et({},t):t:null}function He(t,e,s=!1,n=!1){const{props:i,ref:o,patchFlag:a,children:r,transition:u}=t,v=e?$a(i||{},e):i,p={__v_isVNode:!0,__v_skip:!0,type:t.type,props:v,key:v&&Ai(v),ref:e&&e.ref?s&&o?ct(o)?o.concat(Cs(e)):[o,Cs(e)]:Cs(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:r,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==nt?a===-1?16:a|16:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:u,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&He(t.ssContent),ssFallback:t.ssFallback&&He(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return u&&n&&Dn(p,u.clone(p)),p}function St(t=" ",e=0){return wt(Ws,null,t,e)}function Ii(t,e){const s=wt(Ts,null,t);return s.staticCount=e,s}function D(t="",e=!1){return e?(c(),Qt(xe,null,t)):wt(xe,null,t)}function le(t){return t==null||typeof t=="boolean"?wt(xe):ct(t)?wt(nt,null,t.slice()):xi(t)?fe(t):wt(Ws,null,String(t))}function fe(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:He(t)}function Nn(t,e){let s=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(ct(e))s=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),Nn(t,i()),i._c&&(i._d=!0));return}else{s=32;const i=e._;!i&&!mi(e)?e._ctx=zt:i===3&&zt&&(zt.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else ht(e)?(e={default:e,_ctx:zt},s=32):(e=String(e),n&64?(s=16,e=[St(e)]):s=8);t.children=e,t.shapeFlag|=s}function $a(...t){const e={};for(let s=0;s<t.length;s++){const n=t[s];for(const i in n)if(i==="class")e.class!==n.class&&(e.class=ut([e.class,n.class]));else if(i==="style")e.style=xt([e.style,n.style]);else if(Ds(i)){const o=e[i],a=n[i];a&&o!==a&&!(ct(o)&&o.includes(a))&&(e[i]=o?[].concat(o,a):a)}else i!==""&&(e[i]=n[i])}return e}function se(t,e,s,n=null){re(t,e,7,[s,n])}const ka=fi();let wa=0;function Ta(t,e,s){const n=t.type,i=(e?e.appContext:t.appContext)||ka,o={uid:wa++,vnode:t,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Gi(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:yi(n,i),emitsOptions:hi(n,i),emit:null,emitted:null,propsDefaults:$t,inheritAttrs:n.inheritAttrs,ctx:$t,data:$t,props:$t,attrs:$t,slots:$t,refs:$t,setupState:$t,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 o.ctx={_:o},o.root=e?e.root:o,o.emit=ea.bind(null,o),t.ce&&t.ce(o),o}let jt=null;const Ca=()=>jt||zt;let Es,pn;{const t=Os(),e=(s,n)=>{let i;return(i=t[s])||(i=t[s]=[]),i.push(n),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};Es=e("__VUE_INSTANCE_SETTERS__",s=>jt=s),pn=e("__VUE_SSR_SETTERS__",s=>ds=s)}const vs=t=>{const e=jt;return Es(t),t.scope.on(),()=>{t.scope.off(),Es(e)}},rl=()=>{jt&&jt.scope.off(),Es(null)};function Mi(t){return t.vnode.shapeFlag&4}let ds=!1;function Sa(t,e=!1,s=!1){e&&pn(e);const{props:n,children:i}=t.vnode,o=Mi(t);aa(t,n,o,e),da(t,i,s||e);const a=o?xa(t,e):void 0;return e&&pn(!1),a}function xa(t,e){const s=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,qo);const{setup:n}=s;if(n){ge();const i=t.setupContext=n.length>1?Ia(t):null,o=vs(t),a=ps(n,t,0,[t.props,i]),r=Al(a);if(me(),o(),(r||t.sp)&&!ls(t)&&oi(t),r){if(a.then(rl,rl),e)return a.then(u=>{ul(t,u)}).catch(u=>{js(u,t,0)});t.asyncDep=a}else ul(t,a)}else Ri(t)}function ul(t,e,s){ht(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:yt(e)&&(t.setupState=Ql(e)),Ri(t)}function Ri(t,e,s){const n=t.type;t.render||(t.render=n.render||ie);{const i=vs(t);ge();try{zo(t)}finally{me(),i()}}}const Aa={get(t,e){return Ft(t,"get",""),t[e]}};function Ia(t){const e=s=>{t.exposed=s||{}};return{attrs:new Proxy(t.attrs,Aa),slots:t.slots,emit:t.emit,expose:e}}function Hs(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Ql(go(t.exposed)),{get(e,s){if(s in e)return e[s];if(s in is)return is[s](t)},has(e,s){return s in e||s in is}})):t.proxy}function Ma(t){return ht(t)&&"__vccOpts"in t}const lt=(t,e)=>$o(t,e,ds),Ra="3.5.29";/**
14
+ * @vue/runtime-dom v3.5.29
15
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
+ * @license MIT
17
+ **/let vn;const cl=typeof window<"u"&&window.trustedTypes;if(cl)try{vn=cl.createPolicy("vue",{createHTML:t=>t})}catch{}const Ei=vn?t=>vn.createHTML(t):t=>t,Ea="http://www.w3.org/2000/svg",Pa="http://www.w3.org/1998/Math/MathML",de=typeof document<"u"?document:null,dl=de&&de.createElement("template"),Da={insert:(t,e,s)=>{e.insertBefore(t,s||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,s,n)=>{const i=e==="svg"?de.createElementNS(Ea,t):e==="mathml"?de.createElementNS(Pa,t):s?de.createElement(t,{is:s}):de.createElement(t);return t==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:t=>de.createTextNode(t),createComment:t=>de.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>de.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,s,n,i,o){const a=s?s.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{dl.innerHTML=Ei(n==="svg"?`<svg>${t}</svg>`:n==="mathml"?`<math>${t}</math>`:t);const r=dl.content;if(n==="svg"||n==="mathml"){const u=r.firstChild;for(;u.firstChild;)r.appendChild(u.firstChild);r.removeChild(u)}e.insertBefore(r,s)}return[a?a.nextSibling:e.firstChild,s?s.previousSibling:e.lastChild]}},Fa=Symbol("_vtc");function La(t,e,s){const n=t[Fa];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):s?t.setAttribute("class",e):t.className=e}const Ps=Symbol("_vod"),Pi=Symbol("_vsh"),gn={name:"show",beforeMount(t,{value:e},{transition:s}){t[Ps]=t.style.display==="none"?"":t.style.display,s&&e?s.beforeEnter(t):Qe(t,e)},mounted(t,{value:e},{transition:s}){s&&e&&s.enter(t)},updated(t,{value:e,oldValue:s},{transition:n}){!e!=!s&&(n?e?(n.beforeEnter(t),Qe(t,!0),n.enter(t)):n.leave(t,()=>{Qe(t,!1)}):Qe(t,e))},beforeUnmount(t,{value:e}){Qe(t,e)}};function Qe(t,e){t.style.display=e?t[Ps]:"none",t[Pi]=!e}const Oa=Symbol(""),Na=/(?:^|;)\s*display\s*:/;function ja(t,e,s){const n=t.style,i=Ct(s);let o=!1;if(s&&!i){if(e)if(Ct(e))for(const a of e.split(";")){const r=a.slice(0,a.indexOf(":")).trim();s[r]==null&&Ss(n,r,"")}else for(const a in e)s[a]==null&&Ss(n,a,"");for(const a in s)a==="display"&&(o=!0),Ss(n,a,s[a])}else if(i){if(e!==s){const a=n[Oa];a&&(s+=";"+a),n.cssText=s,o=Na.test(s)}}else e&&t.removeAttribute("style");Ps in t&&(t[Ps]=o?n.display:"",t[Pi]&&(n.display="none"))}const fl=/\s*!important$/;function Ss(t,e,s){if(ct(s))s.forEach(n=>Ss(t,e,n));else if(s==null&&(s=""),e.startsWith("--"))t.setProperty(e,s);else{const n=Ua(t,e);fl.test(s)?t.setProperty(De(n),s.replace(fl,""),"important"):t[n]=s}}const hl=["Webkit","Moz","ms"],Ys={};function Ua(t,e){const s=Ys[e];if(s)return s;let n=Se(e);if(n!=="filter"&&n in t)return Ys[e]=n;n=Rl(n);for(let i=0;i<hl.length;i++){const o=hl[i]+n;if(o in t)return Ys[e]=o}return e}const pl="http://www.w3.org/1999/xlink";function vl(t,e,s,n,i,o=qi(e)){n&&e.startsWith("xlink:")?s==null?t.removeAttributeNS(pl,e.slice(6,e.length)):t.setAttributeNS(pl,e,s):s==null||o&&!Pl(s)?t.removeAttribute(e):t.setAttribute(e,o?"":ae(s)?String(s):s)}function gl(t,e,s,n,i){if(e==="innerHTML"||e==="textContent"){s!=null&&(t[e]=e==="innerHTML"?Ei(s):s);return}const o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){const r=o==="OPTION"?t.getAttribute("value")||"":t.value,u=s==null?t.type==="checkbox"?"on":"":String(s);(r!==u||!("_value"in t))&&(t.value=u),s==null&&t.removeAttribute(e),t._value=s;return}let a=!1;if(s===""||s==null){const r=typeof t[e];r==="boolean"?s=Pl(s):s==null&&r==="string"?(s="",a=!0):r==="number"&&(s=0,a=!0)}try{t[e]=s}catch{}a&&t.removeAttribute(i||e)}function Te(t,e,s,n){t.addEventListener(e,s,n)}function Va(t,e,s,n){t.removeEventListener(e,s,n)}const ml=Symbol("_vei");function Wa(t,e,s,n,i=null){const o=t[ml]||(t[ml]={}),a=o[e];if(n&&a)a.value=n;else{const[r,u]=Ha(e);if(n){const v=o[e]=qa(n,i);Te(t,r,v,u)}else a&&(Va(t,r,a,u),o[e]=void 0)}}const _l=/(?:Once|Passive|Capture)$/;function Ha(t){let e;if(_l.test(t)){e={};let n;for(;n=t.match(_l);)t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):De(t.slice(2)),e]}let Xs=0;const Ka=Promise.resolve(),Ba=()=>Xs||(Ka.then(()=>Xs=0),Xs=Date.now());function qa(t,e){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;re(za(n,s.value),e,5,[n])};return s.value=t,s.attached=Ba(),s}function za(t,e){if(ct(e)){const s=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{s.call(t),t._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const yl=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,Ga=(t,e,s,n,i,o)=>{const a=i==="svg";e==="class"?La(t,n,a):e==="style"?ja(t,s,n):Ds(e)?bn(e)||Wa(t,e,s,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Ja(t,e,n,a))?(gl(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&vl(t,e,n,a,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Ct(n))?gl(t,Se(e),n,o,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),vl(t,e,n,a))};function Ja(t,e,s,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&yl(e)&&ht(s));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return yl(e)&&Ct(s)?!1:e in t}const Ke=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ct(e)?s=>bs(e,s):e};function Qa(t){t.target.composing=!0}function bl(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ve=Symbol("_assign");function $l(t,e,s){return e&&(t=t.trim()),s&&(t=Ls(t)),t}const jn={created(t,{modifiers:{lazy:e,trim:s,number:n}},i){t[ve]=Ke(i);const o=n||i.props&&i.props.type==="number";Te(t,e?"change":"input",a=>{a.target.composing||t[ve]($l(t.value,s,o))}),(s||o)&&Te(t,"change",()=>{t.value=$l(t.value,s,o)}),e||(Te(t,"compositionstart",Qa),Te(t,"compositionend",bl),Te(t,"change",bl))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:s,modifiers:{lazy:n,trim:i,number:o}},a){if(t[ve]=Ke(a),t.composing)return;const r=(o||t.type==="number")&&!/^0\d/.test(t.value)?Ls(t.value):t.value,u=e??"";r!==u&&(document.activeElement===t&&t.type!=="range"&&(n&&e===s||i&&t.value.trim()===u)||(t.value=u))}},Le={deep:!0,created(t,e,s){t[ve]=Ke(s),Te(t,"change",()=>{const n=t._modelValue,i=fs(t),o=t.checked,a=t[ve];if(ct(n)){const r=wn(n,i),u=r!==-1;if(o&&!u)a(n.concat(i));else if(!o&&u){const v=[...n];v.splice(r,1),a(v)}}else if(Be(n)){const r=new Set(n);o?r.add(i):r.delete(i),a(r)}else a(Di(t,o))})},mounted:kl,beforeUpdate(t,e,s){t[ve]=Ke(s),kl(t,e,s)}};function kl(t,{value:e,oldValue:s},n){t._modelValue=e;let i;if(ct(e))i=wn(e,n.props.value)>-1;else if(Be(e))i=e.has(n.props.value);else{if(e===s)return;i=qe(e,Di(t,!0))}t.checked!==i&&(t.checked=i)}const Pe={deep:!0,created(t,{value:e,modifiers:{number:s}},n){const i=Be(e);Te(t,"change",()=>{const o=Array.prototype.filter.call(t.options,a=>a.selected).map(a=>s?Ls(fs(a)):fs(a));t[ve](t.multiple?i?new Set(o):o:o[0]),t._assigning=!0,es(()=>{t._assigning=!1})}),t[ve]=Ke(n)},mounted(t,{value:e}){wl(t,e)},beforeUpdate(t,e,s){t[ve]=Ke(s)},updated(t,{value:e}){t._assigning||wl(t,e)}};function wl(t,e){const s=t.multiple,n=ct(e);if(!(s&&!n&&!Be(e))){for(let i=0,o=t.options.length;i<o;i++){const a=t.options[i],r=fs(a);if(s)if(n){const u=typeof r;u==="string"||u==="number"?a.selected=e.some(v=>String(v)===String(r)):a.selected=wn(e,r)>-1}else a.selected=e.has(r);else if(qe(fs(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function fs(t){return"_value"in t?t._value:t.value}function Di(t,e){const s=e?"_trueValue":"_falseValue";return s in t?t[s]:e}const Ya=["ctrl","shift","alt","meta"],Xa={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Ya.some(s=>t[`${s}Key`]&&!e.includes(s))},oe=(t,e)=>{if(!t)return t;const s=t._withMods||(t._withMods={}),n=e.join(".");return s[n]||(s[n]=(i,...o)=>{for(let a=0;a<e.length;a++){const r=Xa[e[a]];if(r&&r(i,e))return}return t(i,...o)})},Za=Et({patchProp:Ga},Da);let Tl;function tr(){return Tl||(Tl=ha(Za))}const er=(...t)=>{const e=tr().createApp(...t),{mount:s}=e;return e.mount=n=>{const i=nr(n);if(!i)return;const o=e._component;!ht(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const a=s(i,!1,sr(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e};function sr(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function nr(t){return Ct(t)?document.querySelector(t):t}function lr(t,e=300){const s=N(null);let n=null;const i=(...r)=>{n=r,s.value&&clearTimeout(s.value),s.value=setTimeout(()=>{t(...r),s.value=null,n=null},e)},o=()=>{s.value&&(clearTimeout(s.value),s.value=null,n=null)},a=()=>{s.value&&n&&(clearTimeout(s.value),t(...n),s.value=null,n=null)};return Zt(()=>{o()}),{debouncedFn:i,cancel:o,flush:a}}function Fi(t,e=100){const s=N(0),n=N(null),i=(...a)=>{const r=Date.now(),u=r-s.value;u>=e?(s.value=r,t(...a)):(n.value&&clearTimeout(n.value),n.value=setTimeout(()=>{s.value=Date.now(),t(...a),n.value=null},e-u))},o=()=>{n.value&&(clearTimeout(n.value),n.value=null)};return Zt(()=>{o()}),{throttledFn:i,cancel:o}}class ir{constructor(e={}){this.ws=null,this.connectionState={status:"disconnected",reconnectAttempts:0},this.subscribers=new Map,this.reconnectTimer=null,this.pollingTimer=null,this.heartbeatTimer=null,this.stateListeners=new Set,this.options={wsUrl:e.wsUrl||`ws://${window.location.host}/ws`,httpFallback:e.httpFallback??!0,reconnectMaxAttempts:e.reconnectMaxAttempts??5,reconnectDelay:e.reconnectDelay??3e3,pollingInterval:e.pollingInterval??1e4}}connect(){var e;if(((e=this.ws)==null?void 0:e.readyState)!==WebSocket.OPEN){this.updateConnectionState({status:"connecting",reconnectAttempts:this.connectionState.reconnectAttempts});try{this.ws=new WebSocket(this.options.wsUrl),this.ws.onopen=()=>{this.updateConnectionState({status:"connected",lastConnected:Date.now(),reconnectAttempts:0}),this.startHeartbeat(),this.stopPolling()},this.ws.onclose=()=>{this.stopHeartbeat(),this.handleDisconnect()},this.ws.onerror=s=>{console.error("WebSocket error:",s),this.updateConnectionState({status:"error",errorMessage:"WebSocket connection failed"}),this.handleDisconnect()},this.ws.onmessage=s=>{try{const n=JSON.parse(s.data);this.handleMessage(n)}catch(n){console.error("Failed to parse WebSocket message:",n)}}}catch(s){console.error("Failed to create WebSocket:",s),this.handleDisconnect()}}}disconnect(){this.stopHeartbeat(),this.stopReconnect(),this.stopPolling(),this.ws&&(this.ws.close(),this.ws=null),this.updateConnectionState({status:"disconnected",reconnectAttempts:0})}getConnectionState(){return{...this.connectionState}}subscribe(e,s){return this.subscribers.has(e)||this.subscribers.set(e,new Set),this.subscribers.get(e).add(s),()=>{var n;(n=this.subscribers.get(e))==null||n.delete(s)}}onStateChange(e){return this.stateListeners.add(e),()=>{this.stateListeners.delete(e)}}isConnected(){return this.connectionState.status==="connected"}async fetchInitialData(){try{const[e,s,n,i]=await Promise.all([fetch("/api/collaboration").then(o=>o.json()).catch(()=>null),fetch("/api/tasks").then(o=>o.json()).catch(()=>null),fetch("/api/performance?range=20m").then(o=>o.json()).catch(()=>null),fetch("/api/agents").then(o=>o.json()).catch(()=>null)]);e&&this.emit("collaboration",e),s&&this.emit("tasks",s),n&&this.emit("performance",n),i&&this.emit("agents",i)}catch(e){console.error("Failed to fetch initial data:",e)}}handleMessage(e){if(e.type==="ping"){this.send({type:"pong",timestamp:Date.now()});return}if(e.type==="full_state"&&e.data){const s=e.data;s.agents&&this.emit("agents",s.agents),s.subagents&&this.emit("subagents",s.subagents),s.collaboration&&this.emit("collaboration",s.collaboration);const n=Array.isArray(s.tasks)?s.tasks:[];this.emit("tasks",{tasks:n}),s.performance&&this.emit("performance",s.performance);return}if(e.type==="state_update"&&e.data){const s=e.data;s.agents&&this.emit("agents_update",s.agents);return}e.channel&&e.data&&this.emit(e.channel,e.data)}emit(e,s){const n=this.subscribers.get(e);n&&n.forEach(i=>{try{i(s)}catch(o){console.error(`Error in subscriber callback for ${e}:`,o)}})}send(e){var s;((s=this.ws)==null?void 0:s.readyState)===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}handleDisconnect(){this.connectionState.reconnectAttempts<this.options.reconnectMaxAttempts?this.scheduleReconnect():this.options.httpFallback&&this.startPolling()}scheduleReconnect(){this.stopReconnect();const e=this.options.reconnectDelay*Math.pow(1.5,this.connectionState.reconnectAttempts);this.reconnectTimer=setTimeout(()=>{this.updateConnectionState({status:"connecting",reconnectAttempts:this.connectionState.reconnectAttempts+1}),this.connect()},e)}stopReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.send({type:"ping",timestamp:Date.now()})},3e4)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}startPolling(){this.stopPolling(),this.updateConnectionState({status:"connected",errorMessage:"Using HTTP polling fallback"}),this.fetchInitialData(),this.pollingTimer=setInterval(()=>{this.fetchInitialData()},this.options.pollingInterval)}stopPolling(){this.pollingTimer&&(clearInterval(this.pollingTimer),this.pollingTimer=null)}updateConnectionState(e){this.connectionState={...this.connectionState,...e},this.stateListeners.forEach(s=>{try{s(this.connectionState)}catch(n){console.error("Error in state listener:",n)}})}}let Zs=null;function Li(t){return Zs||(Zs=new ir(t)),Zs}class or{constructor(){this.state=new Map,this.cache=new Map,this.defaultTTL=5e3}getState(e){const s=this.state.get(e);return s==null?void 0:s.value}setState(e,s){const n=this.state.get(e);n?n.value=s:this.state.set(e,N(s))}useStore(e,s){const n=this.state.get(e);if(n)return n;const i=N(s);return this.state.set(e,i),i}getCache(e){const s=this.cache.get(e);if(s){if(Date.now()>s.expiresAt){this.cache.delete(e);return}return s.value}}setCache(e,s,n){this.cache.set(e,{value:s,expiresAt:Date.now()+(n??this.defaultTTL)})}hasValidCache(e){const s=this.cache.get(e);return s?Date.now()<=s.expiresAt:!1}invalidateCache(e){this.cache.delete(e)}batchUpdate(e){Object.entries(e).forEach(([s,n])=>{this.setState(s,n)})}clearAll(){this.state.clear(),this.cache.clear()}clearCache(){this.cache.clear()}}let tn=null;function ar(){return tn||(tn=new or),tn}class rr{constructor(){this.listeners=new Map,this.eventQueue=[],this.isFlushing=!1,this.maxQueueSize=100}emit(e,s){const n=this.listeners.get(e);n&&n.forEach(i=>{try{i(s)}catch(o){console.error(`Error in event handler for ${e}:`,o)}})}on(e,s){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(s),()=>{var n;(n=this.listeners.get(e))==null||n.delete(s)}}once(e,s){const n=i=>{this.off(e,n),s(i)};this.on(e,n)}off(e,s){var n;(n=this.listeners.get(e))==null||n.delete(s)}enqueue(e,s){this.eventQueue.length>=this.maxQueueSize&&(console.warn("Event queue is full, dropping oldest event"),this.eventQueue.shift()),this.eventQueue.push({event:e,payload:s})}flush(){if(!this.isFlushing){this.isFlushing=!0;try{for(;this.eventQueue.length>0;){const{event:e,payload:s}=this.eventQueue.shift();this.emit(e,s)}}finally{this.isFlushing=!1}}}getQueueLength(){return this.eventQueue.length}clearQueue(){this.eventQueue=[]}clearAll(){this.listeners.clear(),this.eventQueue=[]}}let en=null;function ur(){return en||(en=new rr),en}function Un(){const t=Li(),e=N(t.getConnectionState()),s=N(!1);let n=null;const i=(r,u)=>t.subscribe(r,u),o=()=>{t.connect()},a=()=>{t.disconnect()};return Wt(()=>{n=t.onStateChange(r=>{e.value=r,s.value=r.status==="connected"}),t.isConnected()||t.connect()}),Zt(()=>{n&&n()}),{connectionState:e,isConnected:s,subscribe:i,connect:o,disconnect:a}}const Cl={user:{icon:"👤",bgColor:"#f0f9ff",borderColor:"#3b82f6",label:"用户"},thinking:{icon:"🧠",bgColor:"#fef3c7",borderColor:"#f59e0b",label:"思考"},text:{icon:"🤖",bgColor:"#f0fdf4",borderColor:"#22c55e",label:"回复"},toolCall:{icon:"🔧",bgColor:"#f5f3ff",borderColor:"#8b5cf6",label:"调用"},toolResult:{icon:"✅",bgColor:"#ecfdf5",borderColor:"#10b981",label:"结果"},error:{icon:"⚠️",bgColor:"#fef2f2",borderColor:"#dc2626",label:"错误"}};function cr(t){return t.senderName?t.senderName:t.senderId?t.senderId:"用户"}const dr={class:"header-left"},fr={class:"step-icon"},hr={class:"step-type"},pr={key:0,class:"step-subtitle"},vr={key:1,class:"collapse-summary"},gr={class:"step-time"},mr={key:2,class:"step-duration"},_r={key:3,class:"execution-time"},yr={class:"header-right"},br={key:0,class:"step-tokens"},$r=["title"],kr={key:2,class:"expand-icon"},wr={key:0,class:"step-content"},Tr={key:0,class:"content-block user-content"},Cr={key:1,class:"content-block thinking-content"},Sr={key:2,class:"content-block text-content"},xr={key:3,class:"content-block tool-call-content"},Ar={key:0,class:"args-section"},Ir={class:"code-block"},Mr={key:4,class:"content-block tool-result-content"},Rr={class:"result-header"},Er={key:0,class:"tool-error-section"},Pr={class:"tool-error-message"},Dr={key:0,class:"tool-error-suggestion"},Fr={key:1,class:"result-body"},Lr={key:0,class:"result-body"},Or={key:5,class:"content-block error-content"},Nr={class:"error-type"},jr={class:"error-message"},Ur={key:0,class:"error-suggestion"},Vr=It({__name:"TimelineStep",props:{step:{},prevStep:{},highlightedPair:{}},emits:["toggle-collapse","highlight-pair"],setup(t,{emit:e}){const s=t,n=e,i=N(!s.step.collapsed),o=N(!1),a=lt(()=>{var W;return((W=Cl[s.step.type])==null?void 0:W.icon)||"📄"}),r=lt(()=>{var W;if(s.step.type==="user")return cr(s.step);if(s.step.type==="toolCall")return`${s.step.toolName||"工具"} 调用`;if(s.step.type==="toolResult"){const C=s.step.toolName||"工具",at=s.step.toolResultStatus==="ok"?"结果":"失败";return`${C} ${at}`}return((W=Cl[s.step.type])==null?void 0:W.label)||s.step.type}),u=lt(()=>s.step.type==="thinking"?"LLM 推理":s.step.type==="text"?"LLM 输出":""),v=lt(()=>!!(s.step.pairedToolCallId||s.step.pairedToolResultId)),p=lt(()=>s.step.type==="toolResult"&&s.step.pairedToolCallId),$=lt(()=>{if(!s.highlightedPair||!v.value)return!1;const{callId:W,resultId:C}=s.highlightedPair;return s.step.id===W||s.step.id===C}),I=lt(()=>s.step.type==="toolCall"&&s.step.pairedToolResultId?"点击高亮对应结果":s.step.type==="toolResult"&&s.step.pairedToolCallId?"点击高亮对应调用":""),A=lt(()=>{const{type:W,content:C,thinking:at,toolArguments:bt,toolResult:rt,errorMessage:dt}=s.step;return C||at||bt||rt||dt}),y=lt(()=>{const W=s.step;if(W.type==="toolCall"&&W.toolArguments){const C=W.toolArguments.path??W.toolArguments.file_path??W.toolArguments.filePath;if(typeof C=="string")return C;const at=W.toolArguments.pattern;if(typeof at=="string")return at;const bt=W.toolArguments.command;if(typeof bt=="string")return bt.length>40?bt.slice(0,40)+"…":bt}if(W.type==="toolResult"){if(W.toolResultStatus==="error"){const C=(W.toolResultError||W.toolResult||"").slice(0,30);return C?`${C}${C.length>=30?"…":""}`:"失败"}if(W.toolResult){const C=W.toolResult.split(`
18
+ `).length;return C>1?`${C} 行`:""}}if(W.type==="thinking"&&W.thinking){const C=W.thinking.length;return C>0?`约 ${C} 字`:""}if(W.type==="text"&&W.content){const C=W.content.length;return C>0?`约 ${C} 字`:""}return""}),P=lt(()=>s.step.toolResult?s.step.toolResult.length>500||s.step.toolResult.split(`
19
+ `).length>10:!1),L=lt(()=>s.step.toolResult?s.step.toolResult.split(`
20
+ `).length:0),_=lt(()=>s.step.toolResult?o.value||!P.value?s.step.toolResult:s.step.toolResult.split(`
21
+ `).slice(0,10).join(`
22
+ `)+`
23
+ ...`:""),E=lt(()=>s.step.type!=="toolResult"||s.step.toolResultStatus!=="error"?"":s.step.toolResultError?s.step.toolResultError:s.step.toolResult||"工具执行失败"),T=lt(()=>{if(s.step.type!=="toolResult"||s.step.toolResultStatus!=="error")return null;const W=(s.step.toolResultError||s.step.toolResult||"").toLowerCase(),C=(s.step.toolName||"").toLowerCase(),at=[];return(W.includes("enoent")||W.includes("no such file")||W.includes("文件不存在"))&&at.push("检查文件路径是否正确","确认文件是否存在"),(W.includes("eacces")||W.includes("permission")||W.includes("权限"))&&at.push("检查文件/目录权限","确认当前用户有访问权限"),(W.includes("timeout")||W.includes("超时"))&&at.push("增加超时时间","简化任务或检查网络"),C==="read"&&at.length===0&&at.push("检查路径是否在 workspace 内","确认文件编码正确"),C.includes("bash")&&at.length===0&&at.push("检查命令语法","确认依赖已安装","查看退出码"),at.length===0&&at.push("查看原始返回详情","尝试调整参数后重试"),at}),R=lt(()=>s.step.type!=="error"||!s.step.errorType?null:{"rate-limit":["降低调用频率","切换到 fallback model","等待配额恢复"],"token-limit":["减少上下文长度","分段处理任务","使用更大 context 的模型"],timeout:["检查网络连接","简化任务复杂度","增加超时时间"],quota:["充值账户","切换到其他 provider","等待配额重置"]}[s.step.errorType]||null);function Q(){if(v.value){const W=s.step.pairedToolCallId||s.step.id,C=s.step.pairedToolResultId||s.step.id;n("highlight-pair",{callId:W,resultId:C})}F()}function F(){A.value&&(i.value=!i.value)}function O(W){return W?new Date(W).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}function it(W){return W?W<1e3?`${W}ms`:W<6e4?`${(W/1e3).toFixed(1)}s`:`${(W/6e4).toFixed(1)}min`:"0ms"}function b(W){try{return JSON.stringify(W,null,2)}catch{return String(W)}}async function x(){if(s.step.toolResult)try{await navigator.clipboard.writeText(s.step.toolResult),alert("已复制到剪贴板")}catch{}}return(W,C)=>(c(),d("div",{class:ut(["timeline-step",[`step-${t.step.type}`,`status-${t.step.status}`,{"is-paired-result":p.value,highlighted:$.value}]])},[l("div",{class:"step-header",onClick:Q},[l("div",dr,[l("span",fr,f(a.value),1),l("span",hr,f(r.value),1),u.value?(c(),d("span",pr,f(u.value),1)):D("",!0),!i.value&&y.value?(c(),d("span",vr,f(y.value),1)):D("",!0),l("span",gr,f(O(t.step.timestamp)),1),t.step.duration&&t.step.duration>0?(c(),d("span",mr," +"+f(it(t.step.duration)),1)):D("",!0),t.step.executionTime?(c(),d("span",_r," ⏱ "+f(it(t.step.executionTime)),1)):D("",!0)]),l("div",yr,[t.step.tokens?(c(),d("span",br,[C[2]||(C[2]=l("span",{class:"token-label"},"tokens:",-1)),St(" "+f(t.step.tokens.input+t.step.tokens.output),1)])):D("",!0),v.value?(c(),d("span",{key:1,class:"pair-indicator",title:I.value}," 🔗 ",8,$r)):D("",!0),A.value?(c(),d("span",kr,f(i.value?"▼":"▶"),1)):D("",!0)])]),A.value&&i.value?(c(),d("div",wr,[t.step.type==="user"&&t.step.content?(c(),d("div",Tr,[l("pre",null,f(t.step.content),1)])):D("",!0),t.step.type==="thinking"&&t.step.thinking?(c(),d("div",Cr,[C[3]||(C[3]=l("div",{class:"thinking-label"},"💭 思考过程",-1)),l("pre",null,f(t.step.thinking),1)])):D("",!0),t.step.type==="text"&&t.step.content?(c(),d("div",Sr,[l("pre",null,f(t.step.content),1)])):D("",!0),t.step.type==="toolCall"?(c(),d("div",xr,[t.step.toolArguments?(c(),d("div",Ar,[C[4]||(C[4]=l("div",{class:"section-label"},"参数:",-1)),l("pre",Ir,f(b(t.step.toolArguments)),1)])):D("",!0)])):D("",!0),t.step.type==="toolResult"?(c(),d("div",Mr,[l("div",Rr,[l("span",{class:ut(["result-status",t.step.toolResultStatus])},f(t.step.toolResultStatus==="ok"?"✅ 成功":"❌ 工具执行失败"),3),t.step.toolResult?(c(),d("button",{key:0,class:"copy-btn",onClick:x}," 复制 ")):D("",!0)]),t.step.toolResultStatus==="error"?(c(),d(nt,{key:0},[E.value?(c(),d("div",Er,[l("div",Pr,f(E.value),1),T.value?(c(),d("div",Dr,[C[5]||(C[5]=l("span",{class:"suggestion-label"},"💡 建议:",-1)),l("ul",null,[(c(!0),d(nt,null,ft(T.value,(at,bt)=>(c(),d("li",{key:bt},f(at),1))),128))])])):D("",!0)])):D("",!0),t.step.toolResult?(c(),d("div",Fr,[C[6]||(C[6]=l("div",{class:"section-label"},"原始返回:",-1)),l("pre",{class:ut({truncated:!o.value})},f(_.value),3),P.value?(c(),d("button",{key:0,class:"show-more-btn",onClick:C[0]||(C[0]=oe(at=>o.value=!o.value,["stop"]))},f(o.value?"收起":`展开全部 (${L.value} 行)`),1)):D("",!0)])):D("",!0)],64)):(c(),d(nt,{key:1},[t.step.toolResult?(c(),d("div",Lr,[l("pre",{class:ut({truncated:!o.value})},f(_.value),3),P.value?(c(),d("button",{key:0,class:"show-more-btn",onClick:C[1]||(C[1]=oe(at=>o.value=!o.value,["stop"]))},f(o.value?"收起":`展开全部 (${L.value} 行)`),1)):D("",!0)])):D("",!0)],64))])):D("",!0),t.step.type==="error"?(c(),d("div",Or,[l("div",Nr,f(t.step.errorType||"unknown"),1),l("div",jr,f(t.step.errorMessage),1),R.value?(c(),d("div",Ur,[C[7]||(C[7]=l("div",{class:"suggestion-label"},"💡 建议:",-1)),l("ul",null,[(c(!0),d(nt,null,ft(R.value,(at,bt)=>(c(),d("li",{key:bt},f(at),1))),128))])])):D("",!0)])):D("",!0)])):D("",!0)],2))}}),Mt=(t,e)=>{const s=t.__vccOpts||t;for(const[n,i]of e)s[n]=i;return s},mn=Mt(Vr,[["__scopeId","data-v-b8bd62e0"]]),Wr={class:"timeline-connector"},Hr=It({__name:"TimelineConnector",setup(t){return(e,s)=>(c(),d("div",Wr,[...s[0]||(s[0]=[l("div",{class:"connector-line"},null,-1),l("div",{class:"connector-arrow"},"▼",-1)])]))}}),_n=Mt(Hr,[["__scopeId","data-v-01a6bfe6"]]),Kr={class:"round-header"},Br={class:"round-badge"},qr={class:"round-trigger"},zr={key:0,class:"round-stats"},Gr={class:"round-content"},Jr=It({__name:"TimelineRound",props:{round:{},steps:{},highlightedPair:{}},emits:["highlight-pair"],setup(t){const e=t,s={user_input:"👤 用户输入触发",subagent_result:"↩️ 子代理回传",tool_result:"🔧 工具结果触发",start:"🚀 会话开始"},n=lt(()=>{const o=s[e.round.trigger]||e.round.trigger;return e.round.triggerBy&&e.round.triggerBy!=="用户"?`${o} · ${e.round.triggerBy}`:o});function i(o){const a=e.steps.find(r=>r.id===o);return a||(console.warn(`Step not found: ${o}`),{id:o,type:"text",status:"success",timestamp:0})}return(o,a)=>(c(),d("div",{class:ut(["timeline-round",`trigger-${t.round.trigger}`])},[l("div",Kr,[l("span",Br,"LLM #"+f(t.round.index),1),l("span",qr,f(n.value),1),t.round.tokens?(c(),d("span",zr,f(t.round.tokens.input+t.round.tokens.output)+" tokens ",1)):D("",!0)]),l("div",Gr,[(c(!0),d(nt,null,ft(t.round.stepIds,(r,u)=>(c(),d(nt,{key:r},[u>0?(c(),Qt(_n,{key:0})):D("",!0),wt(mn,{step:i(r),prevStep:u>0?i(t.round.stepIds[u-1]):void 0,highlightedPair:t.highlightedPair,onHighlightPair:a[0]||(a[0]=v=>o.$emit("highlight-pair",v))},null,8,["step","prevStep","highlightedPair"])],64))),128))])],2))}}),Qr=Mt(Jr,[["__scopeId","data-v-2aa49052"]]),Yr={key:0,class:"link-time"},Xr=It({__name:"TimelineToolLink",props:{isError:{type:Boolean},isActive:{type:Boolean},executionTime:{}},setup(t){function e(s){return s?s<1e3?`${s}ms`:s<6e4?`${(s/1e3).toFixed(1)}s`:`${(s/6e4).toFixed(1)}min`:""}return(s,n)=>(c(),d("div",{class:ut(["tool-link",{"link-error":t.isError,"link-active":t.isActive}])},[n[0]||(n[0]=l("div",{class:"link-line"},[l("span",{class:"link-dot top"}),l("span",{class:"link-connector"}),l("span",{class:"link-dot bottom"})],-1)),t.executionTime?(c(),d("span",Yr,f(e(t.executionTime)),1)):D("",!0)],2))}}),Sl=Mt(Xr,[["__scopeId","data-v-d1e21896"]]),Zr={class:"timeline-view"},tu={class:"timeline-header"},eu={class:"header-left"},su={key:0,class:"agent-info"},nu={key:0,class:"model"},lu={class:"header-right"},iu=["disabled"],ou={key:0,class:"loading-state"},au={key:1,class:"empty-state"},ru={key:0,class:"empty-message"},uu={key:1,class:"empty-message"},cu={key:2},du={key:3,class:"empty-hint"},fu={key:2,class:"timeline-content"},hu={key:0,class:"session-info"},pu={class:"session-id"},vu={key:0,class:"started-at"},gu={class:"steps-list"},mu={key:0,class:"tool-execution-label"},_u={class:"timeline-footer"},yu={class:"stats-grid"},bu={class:"stat-item"},$u={class:"stat-value"},ku={class:"stat-item"},wu={class:"stat-value"},Tu={class:"stat-item"},Cu={class:"stat-value"},Su={class:"stat-item"},xu={class:"stat-value"},Au=It({__name:"TimelineView",props:{agentId:{},sessionKey:{},autoRefresh:{type:Boolean},refreshInterval:{}},setup(t){const{subscribe:e}=Un(),{throttledFn:s}=Fi(()=>{_()},750),n=t,i=N(null),o=N(!1),a=N(null),r=N(null);let u=null,v=null;function p(b){n.agentId&&b.some(x=>x.id===n.agentId)&&s()}function $(b){b!=null&&b.agents&&n.agentId&&b.agents.some(x=>x.id===n.agentId)&&s()}const I=lt(()=>i.value?i.value.status:"empty"),A=lt(()=>({running:"🔄 进行中",completed:"✅ 已完成",error:"❌ 出错",empty:"空",no_sessions:"无会话"})[I.value]||"未知"),y=lt(()=>{var b;return((b=i.value)==null?void 0:b.roundMode)&&i.value.rounds&&i.value.rounds.length>0}),P=lt(()=>{var x;const b=new Map;if(!((x=i.value)!=null&&x.rounds))return b;for(const W of i.value.rounds)for(const C of W.stepIds)b.set(C,W);return b}),L=lt(()=>{if(!i.value||!y.value)return[];const b=[],x=new Set;for(const W of i.value.steps){if(x.has(W.id))continue;const C=P.value.get(W.id);C?(b.push({type:"round",data:C}),C.stepIds.forEach(at=>x.add(at))):(b.push({type:"step",data:W}),x.add(W.id))}return b});async function _(){if(n.agentId){o.value=!0,a.value=null;try{let b=`/api/timeline/${n.agentId}?limit=100`;n.sessionKey&&(b+=`&session_key=${encodeURIComponent(n.sessionKey)}`);const x=await fetch(b);if(!x.ok)throw new Error(`HTTP ${x.status}`);i.value=await x.json()}catch(b){a.value=b instanceof Error?b.message:"加载失败",console.error("Timeline load error:",b)}finally{o.value=!1}}}function E(b){i.value&&i.value.steps[b]&&(i.value.steps[b].collapsed=!i.value.steps[b].collapsed)}function T(b){if(i.value){const x=i.value.steps.find(W=>W.id===b);x&&(x.collapsed=!x.collapsed)}}function R(b){r.value=b,setTimeout(()=>{r.value=null},3e3)}function Q(b){return b?new Date(b).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}function F(b){return b?b<1e3?`${b}ms`:b<6e4?`${(b/1e3).toFixed(1)}s`:`${(b/6e4).toFixed(1)}min`:"0ms"}function O(b){return b>=1e3?`${(b/1e3).toFixed(1)}k`:String(b)}Wt(()=>{_(),u=e("agents_update",p),v=e("full_state",$)}),Zt(()=>{u&&(u(),u=null),v&&(v(),v=null)}),Ut(()=>n.agentId,_);let it=null;return Ut([()=>n.autoRefresh,()=>n.refreshInterval],([b,x])=>{it&&(clearInterval(it),it=null),b&&x&&x>0&&(it=setInterval(_,x*1e3))},{immediate:!0}),(b,x)=>{var W,C,at,bt;return c(),d("div",Zr,[l("div",tu,[l("div",eu,[x[0]||(x[0]=l("span",{class:"title"},"📊 实时执行时序",-1)),i.value?(c(),d("span",su,[St(f(i.value.agentName||i.value.agentId)+" ",1),i.value.model?(c(),d("span",nu,"("+f(i.value.model)+")",1)):D("",!0)])):D("",!0)]),l("div",lu,[l("span",{class:ut(["status-badge",`status-${I.value}`])},f(A.value),3),l("button",{class:"refresh-btn",onClick:_,disabled:o.value},f(o.value?"加载中...":"🔄 刷新"),9,iu)])]),o.value&&!i.value?(c(),d("div",ou,[...x[1]||(x[1]=[l("div",{class:"spinner"},null,-1),l("span",null,"加载时序数据...",-1)])])):!i.value||i.value.steps.length===0?(c(),d("div",au,[x[2]||(x[2]=l("span",{class:"empty-icon"},"📭",-1)),((W=i.value)==null?void 0:W.status)==="no_sessions"&&((C=i.value)!=null&&C.isMainAgent)?(c(),d("span",ru," 主 Agent 暂无会话记录 ")):((at=i.value)==null?void 0:at.status)==="no_sessions"?(c(),d("span",uu," 该 Agent 是子代理,暂无独立会话记录 ")):(c(),d("span",cu,"暂无会话记录")),(bt=i.value)!=null&&bt.message?(c(),d("div",du,f(i.value.message),1)):D("",!0)])):(c(),d("div",fu,[x[8]||(x[8]=Ii('<div class="timeline-legend" data-v-389864e4><span class="legend-item" data-v-389864e4><span class="legend-icon" data-v-389864e4>👤</span> 用户/回传</span><span class="legend-item" data-v-389864e4><span class="legend-icon" data-v-389864e4>🧠</span> LLM 思考</span><span class="legend-item" data-v-389864e4><span class="legend-icon" data-v-389864e4>🤖</span> LLM 回复</span><span class="legend-item" data-v-389864e4><span class="legend-icon" data-v-389864e4>🔧</span> 工具调用</span><span class="legend-item" data-v-389864e4><span class="legend-icon" data-v-389864e4>✅</span> 工具成功</span><span class="legend-item" data-v-389864e4><span class="legend-icon" data-v-389864e4>❌</span> 工具失败</span><span class="legend-item" data-v-389864e4><span class="legend-icon" data-v-389864e4>⚠️</span> 错误</span></div>',1)),i.value.sessionId?(c(),d("div",hu,[l("span",pu,"Session: "+f(i.value.sessionId.slice(0,8))+"...",1),i.value.startedAt?(c(),d("span",vu," 开始: "+f(Q(i.value.startedAt)),1)):D("",!0)])):D("",!0),l("div",gu,[y.value?(c(!0),d(nt,{key:0},ft(L.value,(rt,dt)=>{var pt;return c(),d(nt,{key:(rt.type==="round",rt.data.id)},[dt>0?(c(),Qt(_n,{key:0})):D("",!0),rt.type==="round"?(c(),Qt(Qr,{key:1,round:rt.data,steps:i.value.steps,highlightedPair:r.value,onHighlightPair:R},null,8,["round","steps","highlightedPair"])):(c(),d(nt,{key:2},[rt.data.type==="toolResult"?(c(),d("div",mu,[...x[3]||(x[3]=[l("span",{class:"label-line"},null,-1),l("span",{class:"label-text"},"⚡ 工具执行",-1),l("span",{class:"label-line"},null,-1)])])):D("",!0),rt.data.type==="toolResult"&&rt.data.pairedToolCallId?(c(),Qt(Sl,{key:1,isError:rt.data.toolResultStatus==="error",isActive:((pt=r.value)==null?void 0:pt.resultId)===rt.data.id,executionTime:rt.data.executionTime},null,8,["isError","isActive","executionTime"])):D("",!0),wt(mn,{step:rt.data,highlightedPair:r.value,onToggleCollapse:vt=>T(rt.data.id),onHighlightPair:R},null,8,["step","highlightedPair","onToggleCollapse"])],64))],64)}),128)):(c(!0),d(nt,{key:1},ft(i.value.steps,(rt,dt)=>{var pt;return c(),d(nt,{key:rt.id},[dt>0?(c(),Qt(_n,{key:0})):D("",!0),rt.type==="toolResult"&&rt.pairedToolCallId?(c(),Qt(Sl,{key:1,isError:rt.toolResultStatus==="error",isActive:((pt=r.value)==null?void 0:pt.resultId)===rt.id,executionTime:rt.executionTime},null,8,["isError","isActive","executionTime"])):D("",!0),wt(mn,{step:rt,prevStep:i.value.steps[dt-1],highlightedPair:r.value,onToggleCollapse:vt=>E(dt),onHighlightPair:R},null,8,["step","prevStep","highlightedPair","onToggleCollapse"])],64)}),128))]),l("div",_u,[l("div",yu,[l("div",bu,[x[4]||(x[4]=l("span",{class:"stat-label"},"总耗时",-1)),l("span",$u,f(F(i.value.stats.totalDuration)),1)]),l("div",ku,[x[5]||(x[5]=l("span",{class:"stat-label"},"Token",-1)),l("span",wu,f(O(i.value.stats.totalInputTokens))+" / "+f(O(i.value.stats.totalOutputTokens)),1)]),l("div",Tu,[x[6]||(x[6]=l("span",{class:"stat-label"},"工具调用",-1)),l("span",Cu,f(i.value.stats.toolCallCount)+" 次",1)]),l("div",Su,[x[7]||(x[7]=l("span",{class:"stat-label"},"步骤数",-1)),l("span",xu,f(i.value.stats.stepCount),1)])])])]))])}}}),Iu=Mt(Au,[["__scopeId","data-v-389864e4"]]),Mu={class:"agent-config-panel"},Ru={class:"header"},Eu=["disabled"],Pu={key:0,class:"loading-state"},Du={key:1,class:"error-state"},Fu={key:2,class:"config-content"},Lu={class:"config-section"},Ou={class:"info-grid"},Nu={class:"info-item"},ju={class:"value monospace"},Uu={class:"info-item"},Vu={class:"value"},Wu={class:"info-item full-width"},Hu={class:"value monospace"},Ku={class:"info-item"},Bu={class:"config-section"},qu={class:"model-config"},zu={class:"model-field"},Gu={class:"model-select-wrapper"},Ju=["disabled"],Qu=["label"],Yu=["value"],Xu={key:0,class:"current-model"},Zu={class:"model-field"},tc={class:"fallbacks-list"},ec=["onUpdate:modelValue","disabled"],sc=["label"],nc=["value"],lc=["onClick","disabled"],ic=["disabled"],oc={class:"model-actions"},ac=["disabled"],rc=["disabled"],uc={key:0,class:"config-section"},cc={class:"description-text"},dc=It({__name:"AgentConfigPanel",props:{agentId:{}},setup(t){const e=t,s=N(null),n=N([]),i=N(!1),o=N(!1),a=N(""),r=N(""),u=N([]),v=lt(()=>{const E={};for(const T of n.value)E[T.provider]||(E[T.provider]=[]),E[T.provider].push(T);return Object.entries(E).map(([T,R])=>({provider:T,models:R}))}),p=lt(()=>{var T;if(!((T=s.value)!=null&&T.model))return!1;const E=s.value.model;return r.value!==E.primary||JSON.stringify(u.value.filter(R=>R))!==JSON.stringify(E.fallbacks||[])});function $(E){return{idle:"空闲",working:"工作中",down:"异常"}[E]||E}function I(E){if(!E)return"";const T=E.split("/");return T.length>1?T[T.length-1]:E}async function A(){var E;i.value=!0,a.value="";try{const[T,R]=await Promise.all([fetch(`/api/agent-config/${e.agentId}`),fetch("/api/available-models")]);if(T.ok?(s.value=await T.json(),(E=s.value)!=null&&E.model&&(r.value=s.value.model.primary||"",u.value=[...s.value.model.fallbacks||[]])):a.value="加载配置失败",R.ok){const Q=await R.json();n.value=Q.models||[]}}catch(T){a.value="加载失败: "+T.message}finally{i.value=!1}}function y(){u.value.length<3&&u.value.push("")}function P(E){u.value.splice(E,1)}function L(){var E;(E=s.value)!=null&&E.model&&(r.value=s.value.model.primary||"",u.value=[...s.value.model.fallbacks||[]])}async function _(){if(p.value){o.value=!0;try{const E=await fetch(`/api/agent-config/${e.agentId}/model`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({primary:r.value||null,fallbacks:u.value.filter(T=>T)||null})});if(E.ok){const T=await E.json();s.value&&T.model&&(s.value.model=T.model),alert("模型配置已保存!重启 Agent 后生效。")}else{const T=await E.json();alert("保存失败: "+(T.detail||"未知错误"))}}catch(E){alert("保存失败: "+E.message)}finally{o.value=!1}}}return Ut(()=>e.agentId,()=>{A()},{immediate:!0}),Wt(()=>{A()}),(E,T)=>{var R;return c(),d("div",Mu,[l("div",Ru,[T[1]||(T[1]=l("h3",null,"⚙️ Agent 配置",-1)),l("button",{class:"refresh-btn",onClick:A,disabled:i.value},f(i.value?"加载中...":"刷新"),9,Eu)]),i.value&&!s.value?(c(),d("div",Pu," 加载配置... ")):a.value?(c(),d("div",Du,f(a.value),1)):s.value?(c(),d("div",Fu,[l("div",Lu,[T[6]||(T[6]=l("h4",null,"基本信息",-1)),l("div",Ou,[l("div",Nu,[T[2]||(T[2]=l("span",{class:"label"},"ID",-1)),l("span",ju,f(s.value.id),1)]),l("div",Uu,[T[3]||(T[3]=l("span",{class:"label"},"名称",-1)),l("span",Vu,f(s.value.name),1)]),l("div",Wu,[T[4]||(T[4]=l("span",{class:"label"},"工作区",-1)),l("span",Hu,f(s.value.workspace||"未设置"),1)]),l("div",Ku,[T[5]||(T[5]=l("span",{class:"label"},"状态",-1)),l("span",{class:ut(["value",`status-${s.value.status}`])},f($(s.value.status)),3)])])]),l("div",Bu,[T[11]||(T[11]=l("h4",null,"模型配置",-1)),l("div",qu,[l("div",zu,[T[8]||(T[8]=l("label",null,"主模型 (Primary)",-1)),l("div",Gu,[At(l("select",{"onUpdate:modelValue":T[0]||(T[0]=Q=>r.value=Q),disabled:o.value,class:"model-select"},[T[7]||(T[7]=l("option",{value:""},"-- 选择模型 --",-1)),(c(!0),d(nt,null,ft(v.value,Q=>(c(),d("optgroup",{key:Q.provider,label:Q.provider},[(c(!0),d(nt,null,ft(Q.models,F=>(c(),d("option",{key:F.id,value:F.id},f(F.name),9,Yu))),128))],8,Qu))),128))],8,Ju),[[Pe,r.value]]),(R=s.value.model)!=null&&R.primary?(c(),d("span",Xu," 当前: "+f(I(s.value.model.primary)),1)):D("",!0)])]),l("div",Zu,[T[10]||(T[10]=l("label",null,"备选模型 (Fallbacks)",-1)),l("div",tc,[(c(!0),d(nt,null,ft(u.value,(Q,F)=>(c(),d("div",{key:F,class:"fallback-item"},[At(l("select",{"onUpdate:modelValue":O=>u.value[F]=O,disabled:o.value,class:"model-select small"},[T[9]||(T[9]=l("option",{value:""},"-- 选择 --",-1)),(c(!0),d(nt,null,ft(v.value,O=>(c(),d("optgroup",{key:O.provider,label:O.provider},[(c(!0),d(nt,null,ft(O.models,it=>(c(),d("option",{key:it.id,value:it.id},f(it.name),9,nc))),128))],8,sc))),128))],8,ec),[[Pe,u.value[F]]]),l("button",{class:"remove-btn",onClick:O=>P(F),disabled:o.value},"×",8,lc)]))),128)),l("button",{class:"add-fallback-btn",onClick:y,disabled:o.value||u.value.length>=3}," + 添加备选模型 ",8,ic)])]),l("div",oc,[l("button",{class:"save-btn",onClick:_,disabled:o.value||!p.value},f(o.value?"保存中...":"保存修改"),9,ac),l("button",{class:"reset-btn",onClick:L,disabled:o.value}," 重置 ",8,rc)])])]),s.value.description?(c(),d("div",uc,[T[12]||(T[12]=l("h4",null,"描述",-1)),l("p",cc,f(s.value.description),1)])):D("",!0)])):D("",!0)])}}}),fc=Mt(dc,[["__scopeId","data-v-c0a2c245"]]),hc={class:"error-analysis-view"},pc={class:"header"},vc=["disabled"],gc={key:0,class:"agent-summary"},mc={class:"summary-card total"},_c={class:"count"},yc={key:0,class:"summary-card critical"},bc={class:"count"},$c={key:1,class:"summary-card high"},kc={class:"count"},wc={key:2,class:"summary-card medium"},Tc={class:"count"},Cc={key:1,class:"loading-state"},Sc={key:2,class:"empty-state"},xc={key:3,class:"errors-list"},Ac=["onClick"],Ic={class:"error-header"},Mc={class:"error-badges"},Rc={key:0,class:"badge archived",title:"已归档的子任务"},Ec={key:1,class:"badge provider"},Pc={key:2,class:"badge model"},Dc={class:"error-time"},Fc={class:"error-message"},Lc={key:0,class:"error-detail"},Oc={class:"detail-section"},Nc={class:"error-full"},jc={key:0,class:"detail-section"},Uc={class:"tool-chain"},Vc={class:"tool-index"},Wc={class:"tool-name"},Hc={class:"tool-time"},Kc={key:1,class:"detail-section"},Bc={class:"suggestions"},qc={class:"detail-section meta"},zc={key:4,class:"type-summary"},Gc={class:"type-bars"},Jc={class:"type-label"},Qc={class:"bar-container"},Yc={class:"type-count"},Xc=It({__name:"ErrorAnalysisView",props:{agentId:{}},setup(t){const e=t,s=N([]),n=N(null),i=N(!1),o=N(new Set),a={api_auth:"API 认证",api_rate_limit:"API 限流",api_model:"模型错误",timeout:"超时",permission:"权限错误",tool_error:"工具错误",subagent:"子任务错误",network:"网络错误",unknown:"未知"};function r(A){return a[A]||A}function u(A){return A?new Date(A).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):""}function v(A,y){return!A||A.length<=y?A||"":A.slice(0,y)+"..."}function p(A,y){return y?Math.round(A/y*100)+"%":"0%"}function $(A){o.value.has(A)?o.value.delete(A):o.value.add(A),o.value=new Set(o.value)}async function I(){if(e.agentId){i.value=!0;try{const A=await fetch(`/api/error-analysis/${e.agentId}?session_limit=5`);if(A.ok){const y=await A.json();s.value=y.errors||[],n.value=y.summary||null}}catch(A){console.error("Failed to load error analysis:",A)}finally{i.value=!1}}}return Ut(()=>e.agentId,()=>{I()},{immediate:!0}),Wt(()=>{I()}),(A,y)=>{var P,L,_,E;return c(),d("div",hc,[l("div",pc,[y[0]||(y[0]=l("h3",null,"🔍 错误分析",-1)),l("button",{class:"refresh-btn",onClick:I,disabled:i.value},f(i.value?"分析中...":"刷新"),9,vc)]),n.value?(c(),d("div",gc,[l("div",mc,[l("span",_c,f(n.value.total||0),1),y[1]||(y[1]=l("span",{class:"label"},"错误数",-1))]),(P=n.value.bySeverity)!=null&&P.critical?(c(),d("div",yc,[l("span",bc,f(n.value.bySeverity.critical),1),y[2]||(y[2]=l("span",{class:"label"},"严重",-1))])):D("",!0),(L=n.value.bySeverity)!=null&&L.high?(c(),d("div",$c,[l("span",kc,f(n.value.bySeverity.high),1),y[3]||(y[3]=l("span",{class:"label"},"高",-1))])):D("",!0),(_=n.value.bySeverity)!=null&&_.medium?(c(),d("div",wc,[l("span",Tc,f(n.value.bySeverity.medium),1),y[4]||(y[4]=l("span",{class:"label"},"中",-1))])):D("",!0)])):D("",!0),i.value&&!s.value.length?(c(),d("div",Cc," 正在分析错误... ")):s.value.length?(c(),d("div",xc,[(c(!0),d(nt,null,ft(s.value,(T,R)=>{var Q,F;return c(),d("div",{key:R,class:ut(["error-item",`severity-${T.severity}`]),onClick:O=>$(R)},[l("div",Ic,[l("span",{class:"error-type",style:xt({color:T.severityColor})},f(T.severityLabel)+" - "+f(T.errorTypeLabel),5),l("div",Mc,[T.isArchived?(c(),d("span",Rc,"📦 归档")):D("",!0),T.provider?(c(),d("span",Ec,f(T.provider),1)):D("",!0),T.model?(c(),d("span",Pc,f(T.model),1)):D("",!0)]),l("span",Dc,f(u(T.timestamp)),1)]),l("div",Fc,f(v(T.rawMessage,150)),1),o.value.has(R)?(c(),d("div",Lc,[l("div",Oc,[y[5]||(y[5]=l("h4",null,"错误信息",-1)),l("pre",Nc,f(T.rawMessage||"无详细信息"),1)]),(Q=T.toolChain)!=null&&Q.length?(c(),d("div",jc,[y[6]||(y[6]=l("h4",null,"工具调用链(错误前)",-1)),l("div",Uc,[(c(!0),d(nt,null,ft(T.toolChain,(O,it)=>(c(),d("div",{key:it,class:"tool-item"},[l("span",Vc,f(it+1),1),l("span",Wc,f(O.toolName),1),l("span",Hc,f(u(O.timestamp)),1)]))),128))])])):D("",!0),(F=T.suggestions)!=null&&F.length?(c(),d("div",Kc,[y[7]||(y[7]=l("h4",null,"修复建议",-1)),l("ul",Bc,[(c(!0),d(nt,null,ft(T.suggestions,(O,it)=>(c(),d("li",{key:it},f(O),1))),128))])])):D("",!0),l("div",qc,[l("span",null,"Session: "+f(T.sessionFile),1),l("span",null,"Turn: "+f(T.turnIndex),1)])])):D("",!0)],10,Ac)}),128))])):(c(),d("div",Sc," ✅ 暂无错误记录 ")),(E=n.value)!=null&&E.byType&&Object.keys(n.value.byType).length>0?(c(),d("div",zc,[y[8]||(y[8]=l("h4",null,"错误类型分布",-1)),l("div",Gc,[(c(!0),d(nt,null,ft(n.value.byType,(T,R)=>(c(),d("div",{key:R,class:"type-bar"},[l("span",Jc,f(r(R)),1),l("div",Qc,[l("div",{class:"bar-fill",style:xt({width:p(T,n.value.total)})},null,4)]),l("span",Yc,f(T),1)]))),128))])])):D("",!0)])}}}),Zc=Mt(Xc,[["__scopeId","data-v-bc05715d"]]),td={class:"header"},ed={class:"content"},sd={class:"section"},nd={class:"status-info"},ld={class:"status-text"},id={key:0,class:"section"},od={key:1,class:"section"},ad={key:2,class:"section"},rd={class:"error-info"},ud={class:"error-type"},cd={class:"error-message"},dd={key:3,class:"section"},fd={class:"diagnostic-header"},hd={class:"diagnostic-icon"},pd={class:"diagnostic-title"},vd={class:"diagnostic-content"},gd={class:"diagnostic-item"},md={class:"item-value highlight"},_d={key:0,class:"diagnostic-item"},yd={class:"item-value"},bd={key:1,class:"diagnostic-item"},$d={class:"item-value"},kd={class:"diagnostic-actions"},wd={class:"section"},Td={class:"activity-list"},Cd={key:0,class:"activity-item working"},Sd={key:1,class:"activity-item idle"},xd={key:2,class:"activity-item down"},Ad={class:"section"},Id={class:"view-tabs"},Md={key:0,class:"timeline-container"},Rd={key:1,class:"advanced-container"},Ed={class:"advanced-section"},Pd={class:"advanced-section"},Dd=5*60*1e3,Fd=15*60*1e3,Ld=It({__name:"AgentDetailPanel",props:{agent:{}},emits:["close"],setup(t){const e=t,s=N("timeline"),n=N(null),i=N(Date.now());let o=null;const a=lt(()=>({idle:"空闲",working:"工作中",down:"异常"})[e.agent.status]||"未知"),r=lt(()=>{if(e.agent.status!=="working")return null;const L=e.agent.lastActiveAt||0,_=i.value-L;return _>Fd?{isStuck:!0,idleMinutes:Math.floor(_/6e4),severity:"critical",label:"严重卡顿"}:_>Dd?{isStuck:!0,idleMinutes:Math.floor(_/6e4),severity:"warning",label:"可能卡顿"}:null}),u=lt(()=>{var T;if(!((T=n.value)!=null&&T.archiveAtMs))return null;const L=n.value.archiveAtMs-i.value;if(L<=0)return"即将超时";const _=Math.floor(L/6e4),E=Math.floor(L%6e4/1e3);return`${_}分${E}秒`}),v=lt(()=>{if(!p.value.length)return null;const L=p.value[p.value.length-1];if(L.role==="toolResult"){const _=L.content[0];if(_){const E=_.text||_.content||"";return{tool:L.toolName||"未知工具",status:_.status||"completed",result:E.slice(0,100)||"(无输出)"}}}return null}),p=N([]),$=N(!1);async function I(){var L;if((L=e.agent)!=null&&L.id){$.value=!0;try{const _=await fetch(`/api/agents/${e.agent.id}/output?limit=30`);if(_.ok){const E=await _.json();p.value=E.turns||[]}else p.value=[]}catch{p.value=[]}finally{$.value=!1}}}async function A(){if(e.agent.status!=="working"){n.value=null;return}try{const L=await fetch("/api/chains?limit=10");if(L.ok){const E=(await L.json()).activeChain;if(E!=null&&E.nodes){const T=E.nodes.find(R=>R.agentId===e.agent.id);T&&T.status==="running"&&(n.value={runId:E.chainId,status:"running",startedAt:T.startedAt,archiveAtMs:E.archiveAtMs})}}}catch{}}async function y(){var L;if((L=n.value)!=null&&L.runId&&confirm("确定要取消这个任务吗?"))try{alert("取消功能需要 OpenClaw 支持,请使用命令行: openclaw subagents cancel "+n.value.runId)}catch(_){console.error("Cancel failed:",_)}}function P(){I(),A()}return Ut(()=>{var L;return(L=e.agent)==null?void 0:L.id},()=>{I(),A()},{immediate:!0}),Ut(()=>e.agent.status,A),Wt(()=>{o=setInterval(()=>{i.value=Date.now()},1e3)}),Zt(()=>{o&&(clearInterval(o),o=null)}),(L,_)=>(c(),d("div",{class:"panel-overlay",onClick:_[4]||(_[4]=E=>L.$emit("close"))},[l("div",{class:"panel",onClick:_[3]||(_[3]=oe(()=>{},["stop"]))},[l("div",td,[l("h2",null,f(t.agent.name),1),l("button",{class:"close-btn",onClick:_[0]||(_[0]=E=>L.$emit("close"))},"×")]),l("div",ed,[l("div",sd,[_[5]||(_[5]=l("h3",null,"状态",-1)),l("div",nd,[l("span",{class:ut(["status-dot",`status-${t.agent.status}`])},null,2),l("span",ld,f(a.value),1)])]),t.agent.currentTask?(c(),d("div",id,[_[6]||(_[6]=l("h3",null,"当前任务",-1)),l("p",null,f(t.agent.currentTask),1)])):D("",!0),t.agent.lastActiveFormatted?(c(),d("div",od,[_[7]||(_[7]=l("h3",null,"最后活跃",-1)),l("p",null,f(t.agent.lastActiveFormatted),1)])):D("",!0),t.agent.error?(c(),d("div",ad,[_[8]||(_[8]=l("h3",{class:"error-title"},"错误信息",-1)),l("div",rd,[l("div",ud,f(t.agent.error.type),1),l("div",cd,f(t.agent.error.message),1)])])):D("",!0),r.value?(c(),d("div",dd,[l("div",{class:ut(["diagnostic-panel",`severity-${r.value.severity}`])},[l("div",fd,[l("span",hd,f(r.value.severity==="critical"?"🚨":"⚠️"),1),l("span",pd,f(r.value.label)+"检测",1)]),l("div",vd,[l("div",gd,[_[9]||(_[9]=l("span",{class:"item-label"},"无响应时间:",-1)),l("span",md,f(r.value.idleMinutes)+" 分钟",1)]),v.value?(c(),d("div",_d,[_[10]||(_[10]=l("span",{class:"item-label"},"最后操作:",-1)),l("span",yd,f(v.value.tool)+" → "+f(v.value.result),1)])):D("",!0),u.value?(c(),d("div",bd,[_[11]||(_[11]=l("span",{class:"item-label"},"自动超时:",-1)),l("span",$d,f(u.value),1)])):D("",!0),_[12]||(_[12]=l("div",{class:"diagnostic-hint"},[l("div",{class:"hint-title"},"可能原因:"),l("ul",null,[l("li",null,"LLM API 响应超时"),l("li",null,"网络连接问题"),l("li",null,"API 配额限制")])],-1)),l("div",kd,[n.value?(c(),d("button",{key:0,class:"action-btn primary",onClick:y}," 取消任务 ")):D("",!0),l("button",{class:"action-btn",onClick:P}," 刷新状态 ")])])],2)])):D("",!0),l("div",wd,[_[13]||(_[13]=l("h3",null,"最近活动",-1)),l("div",Td,[t.agent.status==="working"?(c(),d("div",Cd," 💼 正在执行任务... ")):t.agent.status==="idle"?(c(),d("div",Sd," 😴 空闲中 ")):t.agent.status==="down"?(c(),d("div",xd," ⚠️ 检测到错误 ")):D("",!0)])]),l("div",Ad,[l("div",Id,[l("button",{class:ut(["tab-btn",{active:s.value==="timeline"}]),onClick:_[1]||(_[1]=E=>s.value="timeline")}," 📊 时序视图 ",2),l("button",{class:ut(["tab-btn",{active:s.value==="advanced"}]),onClick:_[2]||(_[2]=E=>s.value="advanced")}," ⚙️ 高级 ",2)]),s.value==="timeline"?(c(),d("div",Md,[wt(En(Iu),{agentId:t.agent.id,autoRefresh:!0,refreshInterval:10},null,8,["agentId"])])):(c(),d("div",Rd,[l("div",Ed,[_[14]||(_[14]=l("h4",null,"⚙️ 配置",-1)),wt(fc,{agentId:t.agent.id},null,8,["agentId"])]),l("div",Pd,[_[15]||(_[15]=l("h4",null,"🔍 错误分析",-1)),wt(Zc,{agentId:t.agent.id},null,8,["agentId"])])]))])])])]))}}),Od=Mt(Ld,[["__scopeId","data-v-5efee689"]]),Nd={class:"settings-panel"},jd={class:"header"},Ud={class:"content"},Vd={class:"setting-item"},Wd={class:"setting-item"},Hd={class:"setting-item"},Kd={class:"setting-item"},Bd={class:"setting-item"},qd={class:"setting-item"},zd={class:"setting-item"},Gd={class:"setting-item"},Jd=It({__name:"SettingsPanel",emits:["close"],setup(t,{emit:e}){const s=e,n=N(10),i=N(!0),o=N(!0),a=N(!0),r=N(!0),u=N(!1),v=N(100),p=N(!0);function $(){const A=localStorage.getItem("dashboard-settings");if(A)try{const y=JSON.parse(A);n.value=y.refreshInterval||10,i.value=y.autoRefreshEnabled!==!1,o.value=y.showTimestamps!==!1,a.value=y.showTokens!==!1,r.value=y.notifyOnError!==!1,u.value=y.notifyOnComplete||!1,v.value=y.logLines||100,p.value=y.autoScrollLog!==!1}catch(y){console.error("加载设置失败:",y)}}function I(){const A={refreshInterval:n.value,autoRefreshEnabled:i.value,showTimestamps:o.value,showTokens:a.value,notifyOnError:r.value,notifyOnComplete:u.value,logLines:v.value,autoScrollLog:p.value};localStorage.setItem("dashboard-settings",JSON.stringify(A)),s("settings-changed",A)}return Wt(()=>{$()}),(A,y)=>(c(),d("div",Nd,[l("div",jd,[y[9]||(y[9]=l("h2",null,"设置",-1)),l("button",{class:"close-btn",onClick:y[0]||(y[0]=P=>A.$emit("close"))},"×")]),l("div",Ud,[l("section",null,[y[12]||(y[12]=l("h3",null,"自动刷新",-1)),l("div",Vd,[y[10]||(y[10]=l("label",null,"刷新间隔(秒)",-1)),At(l("input",{type:"number","onUpdate:modelValue":y[1]||(y[1]=P=>n.value=P),min:"1",max:"300",onChange:I},null,544),[[jn,n.value,void 0,{number:!0}]])]),l("div",Wd,[l("label",null,[At(l("input",{type:"checkbox","onUpdate:modelValue":y[2]||(y[2]=P=>i.value=P),onChange:I},null,544),[[Le,i.value]]),y[11]||(y[11]=St(" 启用自动刷新 ",-1))])])]),l("section",null,[y[15]||(y[15]=l("h3",null,"显示选项",-1)),l("div",Hd,[l("label",null,[At(l("input",{type:"checkbox","onUpdate:modelValue":y[3]||(y[3]=P=>o.value=P),onChange:I},null,544),[[Le,o.value]]),y[13]||(y[13]=St(" 显示时间戳 ",-1))])]),l("div",Kd,[l("label",null,[At(l("input",{type:"checkbox","onUpdate:modelValue":y[4]||(y[4]=P=>a.value=P),onChange:I},null,544),[[Le,a.value]]),y[14]||(y[14]=St(" 显示 Token 消耗 ",-1))])])]),l("section",null,[y[18]||(y[18]=l("h3",null,"通知",-1)),l("div",Bd,[l("label",null,[At(l("input",{type:"checkbox","onUpdate:modelValue":y[5]||(y[5]=P=>r.value=P),onChange:I},null,544),[[Le,r.value]]),y[16]||(y[16]=St(" Agent 异常时通知 ",-1))])]),l("div",qd,[l("label",null,[At(l("input",{type:"checkbox","onUpdate:modelValue":y[6]||(y[6]=P=>u.value=P),onChange:I},null,544),[[Le,u.value]]),y[17]||(y[17]=St(" 任务完成时通知 ",-1))])])]),l("section",null,[y[22]||(y[22]=l("h3",null,"日志查看",-1)),l("div",zd,[y[20]||(y[20]=l("label",null,"日志行数",-1)),At(l("select",{"onUpdate:modelValue":y[7]||(y[7]=P=>v.value=P),onChange:I},[...y[19]||(y[19]=[l("option",{value:50},"50 行",-1),l("option",{value:100},"100 行",-1),l("option",{value:200},"200 行",-1),l("option",{value:500},"500 行",-1)])],544),[[Pe,v.value]])]),l("div",Gd,[l("label",null,[At(l("input",{type:"checkbox","onUpdate:modelValue":y[8]||(y[8]=P=>p.value=P),onChange:I},null,544),[[Le,p.value]]),y[21]||(y[21]=St(" 自动滚动日志 ",-1))])])])])]))}}),Qd=Mt(Jd,[["__scopeId","data-v-e5b26232"]]),Yd={class:"indicator-icon"},Xd={key:0,class:"indicator-count"},Zd={class:"card-header"},tf={class:"avatar"},ef={class:"header-info"},sf={class:"name"},nf={class:"status-text"},lf={key:0,class:"main-badge"},of={class:"card-body"},af={key:0,class:"model-row"},rf={class:"model-value"},uf=["title"],cf={key:0,class:"fallback-more"},df={key:1,class:"current-task"},ff=["title"],hf={key:0,class:"task-child-info"},pf={class:"child-name"},vf={key:2,class:"multi-tasks"},gf={class:"tasks-count"},mf={class:"tasks-toggle"},_f=["title"],yf={key:0,class:"task-child-agent"},bf={key:0,class:"tasks-more"},$f={class:"action-icon"},kf={class:"action-text"},wf={key:4,class:"idle-hint"},Tf={class:"warning-modal"},Cf={class:"modal-header"},Sf={class:"modal-icon"},xf={class:"modal-title"},Af={class:"modal-body"},If={class:"detail-row"},Mf={class:"detail-value error-type-tag"},Rf={class:"detail-row"},Ef={class:"detail-value"},Pf={class:"detail-row"},Df={class:"detail-value highlight"},Ff={key:0,class:"detail-row"},Lf={class:"detail-value"},Of={key:1,class:"detail-row"},Nf={class:"detail-value"},jf={key:2,class:"detail-row"},Uf={key:0,class:"waiting-task"},Vf={key:3,class:"stuck-suggestion"},Wf=It({__name:"AgentCard",props:{agent:{},modelInfo:{},isMain:{type:Boolean},currentTask:{},error:{},stuckWarning:{},hierarchyDepth:{},agentColor:{},subStatus:{},currentAction:{},toolName:{},waitingFor:{},agentTasks:{}},emits:["click","navigate-agent"],setup(t,{emit:e}){const s=t,n=e,i=N(!1),o=N(!1),a=["🤖","👤","📊","🏗️","💻","🧪","🔧","📋","🎯","⚙️"],r=lt(()=>{const F=(s.agent.name||"").toLowerCase();if(F.includes("pm")||F.includes("project")||F.includes("主"))return"👨‍💼";if(F.includes("analyst")||F.includes("分析"))return"📊";if(F.includes("architect")||F.includes("架构"))return"🏗️";if(F.includes("dev")||F.includes("开发"))return"💻";if(F.includes("qa")||F.includes("test")||F.includes("测试"))return"🧪";if(F.includes("ops")||F.includes("运维"))return"🔧";if(F.includes("frontend")||F.includes("前端"))return"🎨";if(F.includes("backend")||F.includes("后端"))return"⚙️";let O=0;for(let it=0;it<F.length;it++)O=(O<<5)-O+F.charCodeAt(it);return a[Math.abs(O)%a.length]}),u=lt(()=>({idle:"空闲",working:"工作中",down:"异常"})[s.agent.status]||"未知"),v=lt(()=>{var F;return((F=s.agentTasks)==null?void 0:F.length)||0}),p=lt(()=>s.isMain&&v.value>=2),$=lt(()=>s.agentTasks?s.agentTasks.slice(0,3):[]),I=lt(()=>s.agentTasks?Math.max(0,s.agentTasks.length-3):0),A=lt(()=>s.agentTasks&&s.agentTasks.length===1?s.agentTasks[0].name:s.currentTask),y=lt(()=>{if(s.agentTasks&&s.agentTasks.length===1)return s.agentTasks[0].childAgentId}),P=lt(()=>({thinking:"🧠",tool_executing:"⚙️",waiting_llm:"📡",waiting_child:"⏳"})[s.subStatus||""]||"🔄"),L=lt(()=>{var O;return{"rate-limit":"请求过快","token-limit":"Token 超限",timeout:"请求超时",quota:"余额不足",unknown:"发生错误"}[((O=s.error)==null?void 0:O.type)||"unknown"]||"发生错误"}),_=lt(()=>{var O;return{waiting_for_child:"等待子代理响应",self_busy:"自身处理中",unknown:"原因未明"}[((O=s.stuckWarning)==null?void 0:O.reason)||"unknown"]||"原因未明"}),E=lt(()=>{if(!s.stuckWarning)return null;const F=s.stuckWarning.reason,O=s.stuckWarning.idleSeconds;return F==="waiting_for_child"?O>180?"子代理响应时间过长,建议检查子代理状态或考虑终止任务":"子代理正在执行任务,请耐心等待":F==="self_busy"?O>120?"任务处理时间过长,可能遇到复杂问题或外部资源阻塞":"正在处理复杂任务,请稍候":null});function T(F){const O=F.split("/");return O[O.length-1]||F}function R(){i.value=!0}function Q(F){n("navigate-agent",F),i.value=!1}return(F,O)=>{var it;return c(),d("div",{class:ut(["agent-card",[`status-${t.agent.status}`,{"is-main":t.isMain}]]),onClick:O[4]||(O[4]=b=>F.$emit("click"))},[t.error||t.stuckWarning?(c(),d("div",{key:0,class:ut(["warning-indicator",{"has-error":t.error}]),onClick:oe(R,["stop"])},[l("span",Yd,f(t.error?"⚠️":"⏳"),1),t.stuckWarning?(c(),d("span",Xd,f(t.stuckWarning.idleSeconds)+"s",1)):D("",!0)],2)):D("",!0),l("div",Zd,[l("div",tf,f(r.value),1),l("div",ef,[l("div",sf,f(t.agent.name),1),l("div",{class:ut(["status-pill",`status-${t.agent.status}`])},[l("span",{class:ut(["status-dot",`status-${t.agent.status}`])},null,2),l("span",nf,f(u.value),1)],2)]),t.isMain?(c(),d("div",lf,"PM")):D("",!0)]),l("div",of,[t.modelInfo&&t.modelInfo.primary?(c(),d("div",af,[O[5]||(O[5]=l("span",{class:"model-label"},"模型",-1)),l("span",rf,f(T(t.modelInfo.primary)),1),(it=t.modelInfo.fallbacks)!=null&&it.length?(c(),d("span",{key:0,class:"model-fallbacks",title:"备用: "+t.modelInfo.fallbacks.map(T).join(", ")},[(c(!0),d(nt,null,ft(t.modelInfo.fallbacks.slice(0,2),(b,x)=>(c(),d("span",{key:b,class:"fallback-tag"},f(T(b)),1))),128)),t.modelInfo.fallbacks.length>2?(c(),d("span",cf,"+"+f(t.modelInfo.fallbacks.length-2),1)):D("",!0)],8,uf)):D("",!0)])):D("",!0),A.value&&!p.value?(c(),d("div",df,[O[7]||(O[7]=l("div",{class:"task-header"},[l("span",{class:"task-icon"},"▶"),l("span",{class:"task-label"},"当前任务")],-1)),l("div",{class:"task-name",title:A.value},f(A.value),9,ff),y.value?(c(),d("div",hf,[O[6]||(O[6]=l("span",{class:"child-arrow"},"→",-1)),l("span",pf,f(y.value),1)])):D("",!0)])):D("",!0),p.value?(c(),d("div",vf,[l("div",{class:"tasks-header",onClick:O[0]||(O[0]=oe(b=>o.value=!o.value,["stop"]))},[O[8]||(O[8]=l("span",{class:"tasks-icon"},"📋",-1)),O[9]||(O[9]=l("span",{class:"tasks-label"},"并行任务",-1)),l("span",gf,f(v.value),1),l("span",mf,f(o.value?"▲":"▼"),1)]),l("div",{class:ut(["tasks-list",{expanded:o.value}])},[(c(!0),d(nt,null,ft($.value,b=>(c(),d("div",{key:b.id,class:ut(["task-item",`task-status-${b.status}`])},[O[10]||(O[10]=l("span",{class:"task-status-dot"},null,-1)),l("span",{class:"task-name",title:b.name},f(b.name),9,_f),b.childAgentId?(c(),d("span",yf,"→ "+f(b.childAgentId),1)):D("",!0)],2))),128)),I.value>0?(c(),d("div",bf," +"+f(I.value)+" 更多任务 ",1)):D("",!0)],2)])):D("",!0),t.agent.status==="working"&&t.currentAction?(c(),d("div",{key:3,class:ut(["status-detail",`sub-status-${t.subStatus}`])},[l("span",$f,f(P.value),1),l("span",kf,f(t.currentAction),1)],2)):t.agent.status==="idle"?(c(),d("div",wf," 空闲中,等待任务... ")):D("",!0)]),(c(),Qt(Po,{to:"body"},[i.value?(c(),d("div",{key:0,class:"warning-modal-overlay",onClick:O[3]||(O[3]=oe(b=>i.value=!1,["self"]))},[l("div",Tf,[l("div",Cf,[l("span",Sf,f(t.error?"⚠️":"⏳"),1),l("span",xf,f(t.error?"异常详情":"卡顿分析"),1),l("button",{class:"modal-close",onClick:O[1]||(O[1]=b=>i.value=!1)},"×")]),l("div",Af,[t.error?(c(),d(nt,{key:0},[l("div",If,[O[11]||(O[11]=l("span",{class:"detail-label"},"类型",-1)),l("span",Mf,f(L.value),1)]),l("div",Rf,[O[12]||(O[12]=l("span",{class:"detail-label"},"信息",-1)),l("span",Ef,f(t.error.message),1)])],64)):t.stuckWarning?(c(),d(nt,{key:1},[l("div",Pf,[O[13]||(O[13]=l("span",{class:"detail-label"},"等待时间",-1)),l("span",Df,f(t.stuckWarning.idleSeconds)+" 秒",1)]),t.stuckWarning.reason?(c(),d("div",Ff,[O[14]||(O[14]=l("span",{class:"detail-label"},"原因",-1)),l("span",Lf,f(_.value),1)])):D("",!0),t.stuckWarning.reasonDetail?(c(),d("div",Of,[O[15]||(O[15]=l("span",{class:"detail-label"},"详情",-1)),l("span",Nf,f(t.stuckWarning.reasonDetail),1)])):D("",!0),t.stuckWarning.waitingFor?(c(),d("div",jf,[O[16]||(O[16]=l("span",{class:"detail-label"},"等待对象",-1)),l("span",{class:"detail-value agent-link",onClick:O[2]||(O[2]=b=>Q(t.stuckWarning.waitingFor.agentId))},[St(f(t.stuckWarning.waitingFor.agentId)+" ",1),t.stuckWarning.waitingFor.task?(c(),d("span",Uf,"("+f(t.stuckWarning.waitingFor.task)+")",1)):D("",!0)])])):D("",!0),E.value?(c(),d("div",Vf,[O[17]||(O[17]=l("span",{class:"suggestion-icon"},"💡",-1)),l("span",null,f(E.value),1)])):D("",!0)],64)):D("",!0)])])])):D("",!0)]))],2)}}}),Hf=Mt(Wf,[["__scopeId","data-v-04c4a970"]]),Kf={class:"collaboration-flow-section"},Bf={class:"section-header"},qf={class:"header-right"},zf={key:0,class:"flow-legend flow-legend-inline"},Gf={class:"legend-name"},Jf={class:"indicator-text"},Qf={class:"flow-container",ref:"flowContainerRef"},Yf={key:0,class:"loading-state"},Xf={key:1,class:"error-state"},Zf={key:2,class:"empty-state"},th={key:3,class:"flow-layout"},eh={class:"level-header"},sh={class:"level-badge"},nh={class:"level-title"},lh={class:"level-cards"},ih=["onClick"],oh=["id","d"],ah={key:0,r:"5",fill:"url(#lightGradient)"},rh={dur:"2s",repeatCount:"1",rotate:"0"},uh=["href"],ch={key:0,class:"model-panel"},dh={class:"model-toggle-icon"},fh={class:"model-panel-body"},hh={class:"model-name"},ph={class:"model-dots"},vh=["title","onClick"],gh={class:"model-count"},mh={class:"call-detail-modal"},_h={class:"call-detail-header"},yh={class:"call-detail-body"},bh={class:"call-detail-row"},$h={class:"value"},kh={class:"call-detail-row"},wh={class:"value"},Th={class:"call-detail-row"},Ch={class:"value"},Sh={class:"call-detail-row"},xh={class:"value"},Ah={class:"call-detail-row trigger"},Ih={class:"value"},Mh=3e3,Rh=8e3,Eh=It({__name:"CollaborationFlowSection",props:{mainAgent:{},subAgents:{},mainAgentId:{}},emits:["agent-click"],setup(t,{emit:e}){const s=t,n=e,{connectionState:i,subscribe:o}=Un(),a=N({});let r=0;const u=N([]),v=N([]),p=N([]),$=N({}),I=N([]),A=N(!0),y=N(null),P=N(null),L=N({}),_=N({}),E=N(""),T=N(!0),R=N({}),Q=N(null),F=N(null),O=N({});function it(w,m){m&&(O.value[w]=m)}const b=lt(()=>s.mainAgentId?s.mainAgentId:E.value?E.value:"main"),x=lt(()=>u.value.filter(w=>w.type==="agent")),W=lt(()=>u.value.filter(w=>w.type==="model")),C=lt(()=>v.value.filter(w=>w.type==="delegates")),at=lt(()=>{const w={};for(const U of x.value){const z=Y(U.id);w[z]||(w[z]=[]),w[z].push(U)}const m={};return Object.keys(w).map(Number).sort((U,z)=>U-z).forEach(U=>{m[U]=w[U]}),m});function bt(w){return w===0?"主控":w===1?"一级子代理":`${w}级子代理`}const rt={"analyst-agent":"#10b981","architect-agent":"#f59e0b","devops-agent":"#8b5cf6","test-agent":"#ec4899","frontend-agent":"#06b6d4","backend-agent":"#f43f5e"};function dt(w){return w===b.value?"#4a9eff":rt[w]||"#64748b"}const pt=lt(()=>x.value.map(w=>w.id).filter(Boolean)),vt=lt(()=>({connected:"已连接",connecting:"连接中...",disconnected:"未连接",error:"连接错误"})[i.value.status]||"未知");function Y(w){return w===b.value?_.value[w]??0:_.value[w]??1}function j(w){const m=x.value.find(U=>U.id===w);return(m==null?void 0:m.name)||w}function S(w){var z;const m=st=>st==="error"?"down":st,U=w.id===b.value?s.mainAgent:(z=s.subAgents)==null?void 0:z.find(st=>st.id===w.id);if(U&&w.type==="agent"){const st=Z(w.id);let B;const ot=w.status==="idle"||w.status==="error";ot||((st==null?void 0:st.length)===1?B=st[0].name:st&&st.length>1&&(B=`${st.length} 个任务进行中`));const gt=ot?void 0:U.currentTask;return{name:U.name,status:m(w.status),currentTask:B??gt,lastActiveFormatted:U.lastActiveFormatted}}return U?{name:U.name,status:U.status,currentTask:U.currentTask,lastActiveFormatted:U.lastActiveFormatted}:{name:w.name,status:m(w.status)}}function k(w){if(w.type!=="agent")return;const m=$.value[w.id];if(m)return m;const U=w.id.toLowerCase();for(const[z,st]of Object.entries($.value))if(z.toLowerCase()===U)return st}function Z(w){const m=R.value,U=m[w];if(U!=null&&U.length)return U;const z=w.toLowerCase();for(const[st,B]of Object.entries(m))if(st.toLowerCase()===z&&(B!=null&&B.length))return B}function et(w){if(p.value.includes(w.id))return!0;const m=w.id.toLowerCase();return p.value.some(U=>U.toLowerCase()===m)}function tt(w){const m=p.value,U=z=>m.includes(z)||m.some(st=>st.toLowerCase()===z.toLowerCase());return U(w.source)&&U(w.target)}function Tt(){const w=Q.value,m=F.value;if(!w||!m)return;const U=w.getBoundingClientRect();m.setAttribute("width",String(U.width)),m.setAttribute("height",String(U.height));const z={};for(const st of C.value){const B=O.value[st.source],ot=O.value[st.target];if(!B||!ot)continue;const gt=B.getBoundingClientRect(),Rt=ot.getBoundingClientRect(),Kt=gt.left-U.left+gt.width/2,Bt=gt.top-U.top+gt.height,$e=Rt.left-U.left+Rt.width/2,ze=Rt.top-U.top,Pt=(Bt+ze)/2;z[st.id]=`M ${Kt} ${Bt} C ${Kt} ${Pt}, ${$e} ${Pt}, ${$e} ${ze}`}a.value=z}function Ht(){r&&cancelAnimationFrame(r),r=requestAnimationFrame(()=>{r=0,Tt()})}const{throttledFn:be}=Fi(Ht,450);function te(){be()}const Jt=lt(()=>{const w={};for(const m of I.value){const U=m.model||"(unknown)";w[U]||(w[U]=[]),w[U].push(m)}return w});function ue(w){var z;const m=((z=w.metadata)==null?void 0:z.modelId)||"",U=m.split("/").pop()||m;return Jt.value[m]||Jt.value[U]||[]}function h(w){return ue(w).length>0}async function g(){A.value=!0,y.value=null;try{const w=await fetch("/api/collaboration");if(!w.ok)throw new Error("Failed to fetch collaboration data");const m=await w.json();u.value=m.nodes||[],v.value=m.edges||[],p.value=m.activePath||[],$.value=m.agentModels||{},I.value=m.recentCalls||[],m.hierarchy&&(L.value=m.hierarchy),m.depths&&(_.value=m.depths),m.mainAgentId&&(E.value=m.mainAgentId),m.agentActiveTasks&&(R.value=m.agentActiveTasks),es(()=>te())}catch(w){y.value=w.message}finally{A.value=!1}}function M(){g()}function q(w){const m=w;u.value=m.nodes||[],v.value=m.edges||[],p.value=m.activePath||[],$.value=m.agentModels||{},I.value=m.recentCalls||[],m.hierarchy&&(L.value=m.hierarchy),m.depths&&(_.value=m.depths),m.mainAgentId&&(E.value=m.mainAgentId),m.agentActiveTasks&&(R.value=m.agentActiveTasks),es(()=>te())}function V(w){p.value=w.activePath||[],I.value=w.recentCalls||[],w.agentActiveTasks&&(R.value=w.agentActiveTasks);const m=u.value.filter(B=>B.type==="agent");for(const B of m){if(B.id&&w.agentStatuses&&w.agentStatuses[B.id]!==void 0&&(B.status=w.agentStatuses[B.id]),B.id&&w.agentDynamicStatuses&&w.agentDynamicStatuses[B.id]){const ot=w.agentDynamicStatuses[B.id];B.subStatus=ot.subStatus,B.currentAction=ot.currentAction,B.toolName=ot.toolName,B.waitingFor=ot.waitingFor}if(B.id&&w.agentDisplayStatuses&&w.agentDisplayStatuses[B.id]){const ot=w.agentDisplayStatuses[B.id];B.currentAction=ot.display,B.metadata||(B.metadata={}),B.metadata={...B.metadata,duration:ot.duration,alert:ot.alert},ot.alert?B.stuckWarning={isStuck:!0,idleSeconds:ot.duration,lastUpdate:Date.now(),reason:"self_busy",reasonDetail:ot.display}:B.stuckWarning&&!B.stuckWaitingForChildAgent&&(B.stuckWarning=void 0)}}const U=new Set(u.value.filter(B=>B.type==="task").map(B=>B.id)),z=new Set((w.taskNodes||[]).map(B=>B.id));if(U.size!==z.size||[...z].some(B=>!U.has(B))){const B=u.value.filter(gt=>gt.type==="model"),ot=v.value.filter(gt=>gt.type==="delegates");u.value=[...m,...w.taskNodes||[],...B],v.value=[...ot,...w.taskEdges||[]],es(()=>te())}else{const B=new Map((w.taskNodes||[]).map(ot=>[ot.id,ot]));for(const ot of u.value.filter(gt=>gt.type==="task")){const gt=B.get(ot.id);gt&&(ot.status=gt.status,ot.name=gt.name,gt.timestamp&&(ot.timestamp=gt.timestamp))}}}async function K(){if(!(A.value||u.value.length===0))try{const w=await fetch("/api/collaboration/dynamic");if(!w.ok)return;const m=await w.json();V(m)}catch{}}let X=null,J=null,G=null;Ut(Q,w=>{G&&(G.disconnect(),G=null),w&&(G=new ResizeObserver(()=>te()),G.observe(w))});function H(){J&&clearInterval(J);const w=i.value.status==="connected"?Rh:Mh;J=setInterval(K,w)}return Ut(i,()=>{H()}),Wt(()=>{g(),X=o("collaboration",q),H()}),Zt(()=>{X&&X(),J&&clearInterval(J),r&&cancelAnimationFrame(r),G&&(G.disconnect(),G=null)}),(w,m)=>{var U;return c(),d("div",Kf,[l("div",Bf,[m[4]||(m[4]=l("h2",null,"协作流程",-1)),l("div",qf,[x.value.length>0?(c(),d("div",zf,[(c(!0),d(nt,null,ft(pt.value,z=>(c(),d("div",{key:z,class:"legend-item"},[l("span",{class:"legend-dot",style:xt({background:dt(z)})},null,4),l("span",Gf,f(j(z)),1)]))),128))])):D("",!0),l("div",{class:ut(["connection-indicator",En(i).status])},[m[3]||(m[3]=l("span",{class:"indicator-dot"},null,-1)),l("span",Jf,f(vt.value),1)],2)])]),l("div",Qf,[A.value?(c(),d("div",Yf,[...m[5]||(m[5]=[l("div",{class:"spinner"},null,-1),l("span",null,"加载中...",-1)])])):y.value?(c(),d("div",Xf,[m[6]||(m[6]=l("span",{class:"error-icon"},"⚠️",-1)),l("span",null,f(y.value),1),l("button",{onClick:M,class:"retry-btn"},"重试")])):u.value.length===0?(c(),d("div",Zf,[...m[7]||(m[7]=[l("span",{class:"empty-icon"},"📭",-1),l("span",null,"暂无协作数据",-1)])])):(c(),d("div",th,[l("div",{class:"agent-area",ref_key:"agentAreaRef",ref:Q},[(c(!0),d(nt,null,ft(at.value,(z,st)=>(c(),d("div",{key:st,class:"level-section"},[l("div",eh,[l("span",sh,"L"+f(st),1),l("span",nh,f(bt(Number(st))),1)]),l("div",lh,[(c(!0),d(nt,null,ft(z,B=>(c(),d("div",{key:B.id,class:ut(["agent-card-wrapper",{"main-agent":B.id===b.value,active:et(B),[`status-${B.status}`]:!0}]),style:xt({"--agent-color":dt(B.id)}),ref_for:!0,ref:ot=>it(B.id,ot),onClick:ot=>n("agent-click",B)},[wt(Hf,{agent:S(B),"model-info":k(B),"is-main":B.id===b.value,"current-task":B.currentTask,error:B.error,"stuck-warning":B.stuckWarning,"hierarchy-depth":Y(B.id),"agent-color":dt(B.id),"sub-status":B.subStatus,"current-action":B.currentAction,"tool-name":B.toolName,"waiting-for":B.waitingFor,"agent-tasks":Z(B.id)},null,8,["agent","model-info","is-main","current-task","error","stuck-warning","hierarchy-depth","agent-color","sub-status","current-action","tool-name","waiting-for","agent-tasks"])],14,ih))),128))])]))),128)),(c(),d("svg",{class:"edges-svg",ref_key:"edgesSvgRef",ref:F},[m[8]||(m[8]=l("defs",null,[l("linearGradient",{id:"lightGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[l("stop",{offset:"0%",style:{"stop-color":"#4a9eff","stop-opacity":"0.2"}}),l("stop",{offset:"50%",style:{"stop-color":"#4a9eff","stop-opacity":"1"}}),l("stop",{offset:"100%",style:{"stop-color":"#4a9eff","stop-opacity":"0.2"}})])],-1)),(c(!0),d(nt,null,ft(C.value,z=>(c(),d("g",{key:z.id},[l("path",{id:`edge-${z.id}`,d:a.value[z.id]||"",class:ut(["edge-path",{active:tt(z)}]),stroke:"#4a9eff","stroke-width":"2",fill:"none"},null,10,oh),tt(z)?(c(),d("circle",ah,[l("animateMotion",rh,[l("mpath",{href:`#edge-${z.id}`},null,8,uh)])])):D("",!0)]))),128))],512))],512),W.value.length>0?(c(),d("div",ch,[l("div",{class:"model-panel-header",onClick:m[0]||(m[0]=z=>T.value=!T.value)},[m[9]||(m[9]=l("span",{class:"model-panel-title"},"🧠 模型",-1)),l("span",dh,f(T.value?"▼":"▶"),1)]),At(l("div",fh,[(c(!0),d(nt,null,ft(W.value,z=>(c(),d("div",{key:z.id,class:ut(["model-card",{active:h(z)}])},[l("div",hh,f(z.name),1),l("div",ph,[(c(!0),d(nt,null,ft(ue(z).slice(0,8),st=>(c(),d("span",{key:st.id,class:"model-dot",style:xt({background:dt(st.agentId)}),title:`${j(st.agentId)} @ ${st.model||"unknown"}`,onClick:oe(B=>P.value=st,["stop"])},null,12,vh))),128))]),l("div",gh,f(ue(z).length),1)],2))),128))],512),[[gn,T.value]])])):D("",!0)]))],512),P.value?(c(),d("div",{key:0,class:"call-detail-overlay",onClick:m[2]||(m[2]=oe(z=>P.value=null,["self"]))},[l("div",mh,[l("div",_h,[m[10]||(m[10]=l("h3",null,"调用详情",-1)),l("button",{class:"close-btn",onClick:m[1]||(m[1]=z=>P.value=null)},"×")]),l("div",yh,[l("div",bh,[m[11]||(m[11]=l("span",{class:"label"},"Agent",-1)),l("span",$h,f(P.value.agentId),1)]),l("div",kh,[m[12]||(m[12]=l("span",{class:"label"},"模型",-1)),l("span",wh,f(P.value.model),1)]),l("div",Th,[m[13]||(m[13]=l("span",{class:"label"},"时间",-1)),l("span",Ch,f(P.value.time),1)]),l("div",Sh,[m[14]||(m[14]=l("span",{class:"label"},"Tokens",-1)),l("span",xh,f(P.value.tokens),1)]),l("div",Ah,[m[15]||(m[15]=l("span",{class:"label"},"触发",-1)),l("div",Ih,f((U=P.value.trigger)==null?void 0:U.replace(/^【完成回传】/,"")),1)])])])])):D("",!0)])}}}),Ph=Mt(Eh,[["__scopeId","data-v-f4b5ce91"]]),Dh={class:"collaboration-box"},Fh={class:"collaboration-box-body"},Lh={key:0,class:"collaboration-error-fallback"},Oh={class:"fallback-reason"},Nh=It({__name:"CollaborationFlowWrapper",props:{mainAgent:{},subAgents:{},mainAgentId:{}},emits:["agent-click"],setup(t){const e=N(null);return ui(s=>(e.value=s instanceof Error?s.message:String(s),!1)),(s,n)=>(c(),d("div",Dh,[n[3]||(n[3]=l("div",{class:"collaboration-box-header"},[l("h2",null,"协作流程"),l("span",{class:"collaboration-hint"},"展示主 Agent 与子 Agents 的协作关系")],-1)),l("div",Fh,[e.value?(c(),d("div",Lh,[n[2]||(n[2]=l("p",{class:"fallback-title"},"协作流程加载失败",-1)),l("p",Oh,f(e.value),1),l("button",{onClick:n[0]||(n[0]=i=>e.value=null)},"重试")])):(c(),Qt(Ph,{key:1,"main-agent":t.mainAgent,"sub-agents":t.subAgents,"main-agent-id":t.mainAgentId,onAgentClick:n[1]||(n[1]=i=>s.$emit("agent-click",i))},null,8,["main-agent","sub-agents","main-agent-id"]))])]))}}),jh=Mt(Nh,[["__scopeId","data-v-4ff2479f"]]),Uh={class:"task-status-section"},Vh={class:"section-header"},Wh={class:"summary-stats"},Hh={class:"stat total"},Kh={class:"filters-row"},Bh={class:"search-box"},qh={class:"filter-buttons"},zh=["onClick"],Gh={key:0,class:"loading-state"},Jh={key:1,class:"error-state"},Qh={key:2,class:"empty-state"},Yh={class:"task-list"},Xh=["onClick"],Zh=["title"],tp={class:"task-times-outer"},ep={class:"task-datetime-line"},sp={key:0,class:"task-elapsed-line"},np={class:"task-main"},lp={class:"task-name-short"},ip={class:"task-detail-modal"},op={class:"task-detail-header"},ap={class:"task-detail-body"},rp={class:"detail-row"},up={class:"detail-value task-content"},cp={key:0,class:"detail-row"},dp={class:"detail-value"},fp={class:"detail-row"},hp={class:"detail-value"},pp={key:1,class:"detail-row"},vp={class:"detail-value"},gp={key:2,class:"detail-row"},mp={class:"detail-value path-value"},_p={key:3,class:"detail-row"},yp={class:"detail-value"},bp={key:4,class:"detail-row"},$p={class:"detail-value"},kp={key:5,class:"detail-row"},wp={class:"detail-value"},Tp={key:6,class:"detail-row"},Cp={class:"detail-progress"},Sp={class:"progress-bar"},xp={class:"progress-text"},Ap={key:7,class:"detail-row"},Ip={class:"detail-value error"},Mp={key:8,class:"detail-row"},Rp={class:"generated-files-list"},Ep={key:9,class:"detail-row"},Pp={class:"detail-value output-content"},Dp={key:10,class:"detail-row"},Fp={class:"detail-subtasks"},Lp={key:0,class:"subtask-error-inline"},Op={key:11,class:"detail-row"},Np={class:"timeline-container"},jp={class:"timeline"},Up={class:"timeline-time"},Vp={class:"timeline-desc"},Wp=It({__name:"TaskStatusSection",setup(t){const{subscribe:e}=Un(),s=N([]),n=N(!0),i=N(null),o=N(""),a=N(""),r=N([]),u=N(null),v=N(null),p=N([]),$=N(!1),I=[{value:"running",label:"执行中"},{value:"completed",label:"已完成"},{value:"failed",label:"失败"},{value:"pending",label:"待分配"}],{debouncedFn:A}=lr(()=>{a.value=o.value},300);Ut(o,()=>A());const y=lt(()=>{let S=s.value;if(r.value.length>0&&(S=S.filter(k=>r.value.includes(k.status))),a.value){const k=a.value.toLowerCase();S=S.filter(Z=>{var et;return Z.name.toLowerCase().includes(k)||((et=Z.agentName)==null?void 0:et.toLowerCase().includes(k))})}return S}),P=lt(()=>({total:s.value.length,running:s.value.filter(S=>S.status==="running").length,completed:s.value.filter(S=>S.status==="completed").length,failed:s.value.filter(S=>S.status==="failed").length,pending:s.value.filter(S=>S.status==="pending").length,cancelled:s.value.filter(S=>S.status==="cancelled").length}));function L(S){return{pending:"⏳",running:"🔄",completed:"✅",failed:"❌",cancelled:"🚫"}[S]||"📋"}function _(S){return s.value.filter(k=>k.status===S).length}function E(S){if(!S||!S.trim())return"未知";const k=S.trim().toLowerCase(),Z={terminated:"任务被终止(可能是超时或被用户取消)",timeout:"任务执行超时",cancelled:"任务已取消",canceled:"任务已取消",killed:"任务被终止","subagent-error":"子任务执行异常"};for(const[et,tt]of Object.entries(Z))if(k.includes(et))return tt;return S.trim()}function T(S){return!S||typeof S!="string"?"":S.replace(/\*\*/g,"").replace(/`([^`]+)`/g,"$1")}function R(S){if(S==null||S==="")return null;if(typeof S=="string"){const Z=Date.parse(S);return Number.isNaN(Z)?null:Z}const k=Number(S);return Number.isFinite(k)?k<1e12?Math.round(k*1e3):Math.round(k):null}function Q(S){const k=R(S.startTime);return k===null?"—":new Date(k).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}function F(S){const k=R(S.startTime);return k===null?"":new Date(k).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function O(S){const k=R(S.endTime);return k===null?"":new Date(k).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function it(S){const k=R(S.startTime);if(k===null)return"";const et=R(S.endTime)??Date.now(),tt=Math.floor((et-k)/1e3);return tt<0?"0s":tt<60?`${tt}s`:tt<3600?`${Math.floor(tt/60)}m ${tt%60}s`:`${Math.floor(tt/3600)}h ${Math.floor(tt%3600/60)}m`}function b(S){const k=r.value.indexOf(S);k===-1?r.value.push(S):r.value.splice(k,1)}function x(S){r.value.length===1&&r.value[0]===S?r.value=[]:r.value=[S]}function W(S){const Z=T(S.task??S.name).split(`
24
+ `)[0].trim();return Z.length<=60?Z:Z.slice(0,60)+"…"}function C(S){return{pending:"待分配",running:"执行中",completed:"已完成",failed:"失败",cancelled:"已取消"}[S]||S}async function at(){n.value=!0,i.value=null;try{const S=await fetch("/api/tasks");if(!S.ok)throw new Error("Failed to fetch tasks");const k=await S.json();s.value=(k.tasks||[]).map(Z=>dt(Z))}catch(S){i.value=S.message}finally{n.value=!1}}function bt(S){return{pending:"pending",assigning:"pending",running:"running",in_progress:"running",active:"running",completed:"completed",success:"completed",failed:"failed",error:"failed",cancelled:"cancelled"}[S]||"pending"}function rt(){at()}function dt(S){const k=(S.subtasks||[]).map(Z=>({id:Z.id||Z.name,name:Z.name||"Unknown",task:Z.task,status:bt(Z.status),progress:Z.progress??0,startTime:Z.startTime,endTime:Z.endTime,agentId:Z.agentId,agentName:Z.agentName,agentWorkspace:Z.agentWorkspace,taskPath:Z.taskPath,error:Z.error,output:Z.output,generatedFiles:Z.generatedFiles}));return{id:S.id,name:S.name||"Unknown Task",task:S.task,status:bt(S.status),progress:S.progress??0,startTime:S.startTime,endTime:S.endTime,agentId:S.agentId,agentName:S.agentName,agentWorkspace:S.agentWorkspace,taskPath:S.taskPath,error:S.error,output:S.output,generatedFiles:S.generatedFiles,subtasks:k.length?k:void 0}}function pt(S){const Z=(Array.isArray(S)?S:S&&typeof S=="object"&&"tasks"in S?S.tasks??[]:[]).map(et=>dt(et));Z.length===0&&s.value.length>0||(s.value=Z)}function vt(S){return S?new Date(S).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}async function Y(S){if(!S){p.value=[];return}$.value=!0;try{const k=await fetch(`/api/tasks/${S}/timeline`);if(k.ok){const Z=await k.json();p.value=Z.timeline||[]}}catch(k){console.error("Failed to fetch timeline:",k),p.value=[]}finally{$.value=!1}}Ut(u,S=>{S?Y(S.id):p.value=[]});let j=null;return Wt(()=>{at(),j=e("tasks",pt)}),Zt(()=>{j&&j()}),(S,k)=>{var Z,et;return c(),d("div",Uh,[l("div",Vh,[k[6]||(k[6]=l("h2",null,"任务状态",-1)),l("div",Wh,[l("span",{class:ut(["stat running clickable",{active:r.value.includes("running")}]),onClick:k[0]||(k[0]=tt=>x("running"))},"执行中: "+f(P.value.running),3),l("span",{class:ut(["stat completed clickable",{active:r.value.includes("completed")}]),onClick:k[1]||(k[1]=tt=>x("completed"))},"已完成: "+f(P.value.completed),3),l("span",{class:ut(["stat failed clickable",{active:r.value.includes("failed")}]),onClick:k[2]||(k[2]=tt=>x("failed"))},"失败: "+f(P.value.failed),3),l("span",Hh,"总计: "+f(P.value.total),1)])]),l("div",Kh,[l("div",Bh,[At(l("input",{"onUpdate:modelValue":k[3]||(k[3]=tt=>o.value=tt),type:"text",placeholder:"搜索任务...",class:"search-input"},null,512),[[jn,o.value]])]),l("div",qh,[(c(),d(nt,null,ft(I,tt=>l("button",{key:tt.value,class:ut(["filter-btn",{active:r.value.includes(tt.value)}]),onClick:Tt=>b(tt.value)},f(tt.label)+" ("+f(_(tt.value))+") ",11,zh)),64))])]),n.value?(c(),d("div",Gh,[...k[7]||(k[7]=[l("div",{class:"spinner"},null,-1),l("span",null,"加载任务数据...",-1)])])):i.value?(c(),d("div",Jh,[k[8]||(k[8]=l("span",{class:"error-icon"},"⚠️",-1)),l("span",null,f(i.value),1),l("button",{onClick:rt,class:"retry-btn"},"重试")])):y.value.length===0?(c(),d("div",Qh,[k[9]||(k[9]=l("span",{class:"empty-icon"},"📭",-1)),l("span",null,f(a.value?"无匹配任务":"暂无任务数据"),1)])):(c(),d("div",{key:3,class:"task-list-container",ref_key:"containerRef",ref:v},[l("div",Yh,[(c(!0),d(nt,null,ft(y.value,tt=>(c(),d("div",{key:tt.id,class:"task-item",onClick:Tt=>u.value=tt},[l("span",{class:ut(["task-status-icon",tt.status])},f(L(tt.status)),3),tt.agentName||tt.agentId?(c(),d("span",{key:0,class:"task-agent",title:tt.agentName||tt.agentId},f(tt.agentName||tt.agentId),9,Zh)):D("",!0),l("div",tp,[l("span",ep,f(Q(tt)),1),R(tt.startTime)!=null?(c(),d("span",sp,f(it(tt)),1)):D("",!0)]),l("div",np,[l("div",lp,f(W(tt)),1)]),k[10]||(k[10]=l("span",{class:"task-detail-hint"},"详情 ›",-1))],8,Xh))),128))])],512)),u.value?(c(),d("div",{key:4,class:"task-detail-overlay",onClick:k[5]||(k[5]=oe(tt=>u.value=null,["self"]))},[l("div",ip,[l("div",op,[k[11]||(k[11]=l("h3",null,"任务详情",-1)),l("button",{class:"close-btn",onClick:k[4]||(k[4]=tt=>u.value=null)},"×")]),l("div",ap,[l("div",rp,[k[12]||(k[12]=l("span",{class:"detail-label"},"任务",-1)),l("span",up,f(T(u.value.task??u.value.name)),1)]),u.value.taskPath?(c(),d("div",cp,[k[13]||(k[13]=l("span",{class:"detail-label"},"项目路径",-1)),l("span",dp,f(T(u.value.taskPath)),1)])):D("",!0),l("div",fp,[k[14]||(k[14]=l("span",{class:"detail-label"},"状态",-1)),l("span",hp,[l("span",{class:ut(["task-status-icon",u.value.status])},f(L(u.value.status)),3),St(" "+f(C(u.value.status)),1)])]),u.value.agentName?(c(),d("div",pp,[k[15]||(k[15]=l("span",{class:"detail-label"},"执行者",-1)),l("span",vp,f(u.value.agentName),1)])):D("",!0),u.value.agentWorkspace?(c(),d("div",gp,[k[16]||(k[16]=l("span",{class:"detail-label"},"Agent 工作区路径",-1)),l("span",mp,f(u.value.agentWorkspace),1)])):D("",!0),R(u.value.startTime)!=null?(c(),d("div",_p,[k[17]||(k[17]=l("span",{class:"detail-label"},"开始时间",-1)),l("span",yp,f(F(u.value)),1)])):D("",!0),R(u.value.endTime)!=null?(c(),d("div",bp,[k[18]||(k[18]=l("span",{class:"detail-label"},"结束时间",-1)),l("span",$p,f(O(u.value)),1)])):D("",!0),R(u.value.startTime)!=null?(c(),d("div",kp,[k[19]||(k[19]=l("span",{class:"detail-label"},"耗时",-1)),l("span",wp,f(it(u.value)),1)])):D("",!0),u.value.status==="running"?(c(),d("div",Tp,[k[20]||(k[20]=l("span",{class:"detail-label"},"进度",-1)),l("div",Cp,[l("div",Sp,[l("div",{class:"progress-fill",style:xt({width:`${u.value.progress}%`})},null,4)]),l("span",xp,f(u.value.progress)+"%",1)])])):D("",!0),u.value.status==="failed"?(c(),d("div",Ap,[k[21]||(k[21]=l("span",{class:"detail-label"},"失败原因",-1)),l("span",Ip,f(E(u.value.error)),1)])):D("",!0),u.value.status==="completed"&&((Z=u.value.generatedFiles)!=null&&Z.length)?(c(),d("div",Mp,[k[22]||(k[22]=l("span",{class:"detail-label"},"生成的文件",-1)),l("ul",Rp,[(c(!0),d(nt,null,ft(u.value.generatedFiles,tt=>(c(),d("li",{key:tt,class:"file-path-item"},f(tt),1))),128))])])):D("",!0),u.value.status==="completed"&&u.value.output?(c(),d("div",Ep,[k[23]||(k[23]=l("span",{class:"detail-label"},"Agent 输出",-1)),l("div",Pp,f(T(u.value.output)),1)])):D("",!0),(et=u.value.subtasks)!=null&&et.length?(c(),d("div",Dp,[k[24]||(k[24]=l("span",{class:"detail-label"},"子任务",-1)),l("div",Fp,[(c(!0),d(nt,null,ft(u.value.subtasks,tt=>(c(),d("div",{key:tt.id,class:"subtask-row"},[l("span",{class:ut(["task-status-icon",tt.status])},f(L(tt.status)),3),l("span",null,f(tt.name),1),tt.status==="failed"?(c(),d("span",Lp,f(E(tt.error)),1)):D("",!0)]))),128))])])):D("",!0),p.value.length>0?(c(),d("div",Op,[k[26]||(k[26]=l("span",{class:"detail-label"},"执行时间线",-1)),l("div",Np,[l("div",jp,[(c(!0),d(nt,null,ft(p.value,(tt,Tt)=>(c(),d("div",{key:Tt,class:ut(["timeline-item",tt.type])},[l("span",Up,f(vt(tt.time)),1),k[25]||(k[25]=l("span",{class:"timeline-dot"},null,-1)),l("span",Vp,f(tt.description),1)],2))),128))])])])):D("",!0)])])])):D("",!0)])}}}),Hp=Mt(Wp,[["__scopeId","data-v-85121e3f"]]),Kp={class:"performance-section"},Bp={class:"section-header"},qp={class:"time-range-selector"},zp=["onClick"],Gp={key:0,class:"loading-state"},Jp={key:1,class:"error-state"},Qp={class:"metrics-grid"},Yp={class:"metric-card primary"},Xp={class:"metric-content"},Zp={class:"metric-value"},tv={key:0,class:"metric-alert"},ev={class:"metric-card"},sv={class:"metric-content"},nv={class:"metric-value"},lv={class:"metric-card highlight"},iv={class:"metric-content"},ov={class:"metric-value"},av={class:"metric-unit"},rv={class:"metric-card highlight"},uv={class:"metric-content"},cv={class:"metric-value"},dv={class:"metric-unit"},fv={class:"charts-stack"},hv={class:"chart-card"},pv={class:"chart-header"},vv={class:"chart-datetime"},gv={class:"chart-container"},mv={class:"chart-bars"},_v=["title","onClick"],yv={class:"bar-value"},bv={class:"bar-time-label"},$v={class:"chart-card"},kv={class:"chart-header"},wv={class:"chart-datetime"},Tv={class:"chart-container"},Cv={class:"chart-bars rpm"},Sv=["title","onClick"],xv={class:"bar-value"},Av={class:"bar-time-label"},Iv={class:"summary-section"},Mv={class:"summary-grid"},Rv={class:"summary-item"},Ev={class:"summary-value"},Pv={class:"summary-item"},Dv={class:"summary-value"},Fv={key:0,class:"summary-sub"},Lv={class:"summary-item highlight"},Ov={class:"summary-value"},Nv={class:"detail-modal"},jv={class:"detail-modal-header"},Uv={class:"detail-modal-body"},Vv={key:0,class:"detail-loading"},Wv={key:1,class:"detail-calls"},Hv={class:"detail-summary"},Kv={class:"detail-filters"},Bv=["value"],qv={key:0,class:"detail-call-hint"},zv={class:"call-header"},Gv={class:"call-agent"},Jv={class:"call-time"},Qv={class:"call-tokens"},Yv=["title"],Xv={key:0,class:"call-trigger-badge"},Zv={key:0,class:"call-meta"},tg={key:2,class:"detail-empty"},eg={key:1,class:"alerts-panel"},sg={class:"alerts-list"},ng={class:"alert-message"},lg={class:"alert-value"},ig={class:"alert-time"},og=["onClick"],ag=It({__name:"PerformanceSection",setup(t){const e=N(!0),s=N(null),n=N("20m"),i=N([]),o=N(!1),a=N(!1),r=N(null),u=N(""),v=N(""),p=N(""),$=N("tokens_desc"),I=lt(()=>{var j;if(!((j=r.value)!=null&&j.calls))return[];const Y=new Set(r.value.calls.map(S=>S.agentId));return Array.from(Y).sort()}),A=lt(()=>{var j;if(!((j=r.value)!=null&&j.calls))return[];let Y=[...r.value.calls];if(v.value){const S=v.value.toLowerCase();Y=Y.filter(k=>{var Z;return(Z=k.trigger)==null?void 0:Z.toLowerCase().includes(S)})}switch(p.value&&(Y=Y.filter(S=>S.agentId===p.value)),$.value){case"tokens_desc":Y.sort((S,k)=>k.tokens-S.tokens);break;case"tokens_asc":Y.sort((S,k)=>S.tokens-k.tokens);break;case"time_asc":Y.sort((S,k)=>S.time.localeCompare(k.time));break;case"time_desc":Y.sort((S,k)=>k.time.localeCompare(S.time));break}return Y}),y=lt(()=>A.value.reduce((Y,j)=>Y+j.tokens,0)),P=N({current:{tpm:0,rpm:0,windowTotal:{tokens:0,requests:0}},history:{tpm:[],rpm:[],timestamps:[]},statistics:{avgTpm:0,peakTpm:0,peakTime:""}}),L=[{value:"20m",label:"20分钟"},{value:"1h",label:"1小时"},{value:"24h",label:"24小时"}],_=lt(()=>{const Y=L.find(j=>j.value===n.value);return Y?`最近 ${Y.label}`:""}),E=lt(()=>{switch(n.value){case"20m":return 20;case"1h":return 60;case"24h":return 24;default:return 20}}),T=lt(()=>{const Y=P.value.history,j=E.value;if(Y.tpm.length===0){const S=n.value==="24h"?36e5:6e4;return Array.from({length:j},(k,Z)=>({timestamp:Date.now()-(j-Z-1)*S,tpm:0,rpm:0}))}return Y.tpm.map((S,k)=>({timestamp:Y.timestamps[k]||Date.now()-k*6e4,tpm:S,rpm:Y.rpm[k]||0}))});function R(Y){const j=T.value.map(k=>k[Y]);return Math.max(...j,1)*1.2}function Q(Y,j){return Math.max(Y/j*100,5)}function F(Y){return Y>=1e6?(Y/1e6).toFixed(1)+"M":Y>=1e3?(Y/1e3).toFixed(1)+"K":Y.toString()}const O=N(Date.now());function it(Y){const j=Y??Date.now(),S=typeof j=="number"?j:Number(j);if(isNaN(S))return new Date().toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});const k=S<1e12?S*1e3:S,Z=new Date(k);return isNaN(Z.getTime())?new Date().toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}):Z.toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function b(Y){if(Y==null)return"--:--";if(typeof Y=="string"){const k=Y.split(":").map(Number);if(k.length>=2){const Z=new Date;return new Date(Date.UTC(Z.getUTCFullYear(),Z.getUTCMonth(),Z.getUTCDate(),k[0],k[1],0,0)).toLocaleString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1})}return Y}const j=Number(Y);if(isNaN(j))return"--:--";const S=new Date(j);return isNaN(S.getTime())?"--:--":n.value==="24h"?S.toLocaleString("zh-CN",{hour:"2-digit",hour12:!1})+":00":S.toLocaleString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1})}function x(Y){return i.value.some(j=>j.type===Y&&!j.acknowledged)}function W(Y){const j=i.value.find(S=>S.id===Y);j&&(j.acknowledged=!0)}async function C(){var Y,j,S,k,Z,et,tt,Tt,Ht,be,te,Jt;e.value=!0,s.value=null;try{const ue=await fetch(`/api/performance?range=${n.value}`);if(!ue.ok)throw new Error("Failed to fetch performance data");const h=await ue.json();P.value={current:{tpm:((Y=h.current)==null?void 0:Y.tpm)??0,rpm:((j=h.current)==null?void 0:j.rpm)??0,windowTotal:{tokens:((k=(S=h.current)==null?void 0:S.windowTotal)==null?void 0:k.tokens)??0,requests:((et=(Z=h.current)==null?void 0:Z.windowTotal)==null?void 0:et.requests)??0}},history:{tpm:((tt=h.history)==null?void 0:tt.tpm)??[],rpm:((Tt=h.history)==null?void 0:Tt.rpm)??[],timestamps:((Ht=h.history)==null?void 0:Ht.timestamps)??[]},statistics:{avgTpm:((be=h.statistics)==null?void 0:be.avgTpm)??0,peakTpm:((te=h.statistics)==null?void 0:te.peakTpm)??0,peakTime:((Jt=h.statistics)==null?void 0:Jt.peakTime)??""}},O.value=Date.now(),at()}catch(ue){s.value=ue.message}finally{e.value=!1}}function at(){const{current:Y}=P.value;Y.tpm>1e5&&i.value.push({id:`high_tpm_${Date.now()}`,type:"high_tpm",message:"TPM 过高",value:Y.tpm,threshold:1e5,timestamp:Date.now(),acknowledged:!1}),i.value=i.value.slice(-10)}function bt(){C()}async function rt(Y){let j;if(typeof Y.timestamp=="number")j=Y.timestamp<1e12?Y.timestamp*1e3:Y.timestamp;else if(typeof Y.timestamp=="string"){const k=Y.timestamp.split(":").map(Number);if(k.length>=2){const Z=new Date;let et=Z.getUTCDate();const tt=k[0]*60+k[1],Tt=Z.getUTCHours()*60+Z.getUTCMinutes();tt>Tt+10&&(et-=1),j=new Date(Date.UTC(Z.getUTCFullYear(),Z.getUTCMonth(),et,k[0],k[1],0,0)).getTime()}else return}else return;const S=n.value==="24h"?"hour":"minute";o.value=!0,u.value=`${b(Y.timestamp)} 调用详情`,r.value=null,a.value=!0,v.value="",p.value="",$.value="tokens_desc";try{const k=await fetch(`/api/performance/details?timestamp=${j}&granularity=${S}`),Z=await k.json();k.ok?(r.value=Z,u.value=`${Z.timeWindow||b(Y.timestamp)} 调用详情`):r.value={timeWindow:b(Y.timestamp),calls:[],totalCalls:0,totalTokens:0,summary:{avgTokens:0}}}catch{r.value={timeWindow:b(Y.timestamp),calls:[],totalCalls:0,totalTokens:0,summary:{avgTokens:0}}}finally{a.value=!1}}let dt=null;function pt(){vt();const Y=n.value==="24h"?3e5:3e4;dt=setInterval(C,Y)}function vt(){dt&&(clearInterval(dt),dt=null)}return Wt(()=>{C(),pt()}),Zt(()=>{vt()}),Ut(n,()=>{C(),pt()}),(Y,j)=>{var S,k,Z;return c(),d("div",Kp,[l("div",Bp,[j[5]||(j[5]=l("h2",null,"性能数据",-1)),l("div",qp,[(c(),d(nt,null,ft(L,et=>l("button",{key:et.value,class:ut(["range-btn",{active:n.value===et.value}]),onClick:tt=>n.value=et.value},f(et.label),11,zp)),64))])]),e.value?(c(),d("div",Gp,[...j[6]||(j[6]=[l("div",{class:"spinner"},null,-1),l("span",null,"加载性能数据...",-1)])])):s.value?(c(),d("div",Jp,[j[7]||(j[7]=l("span",{class:"error-icon"},"⚠️",-1)),l("span",null,f(s.value),1),l("button",{onClick:bt,class:"retry-btn"},"重试")])):(c(),d(nt,{key:2},[l("div",Qp,[l("div",Yp,[j[10]||(j[10]=l("div",{class:"metric-icon"},"⚡",-1)),l("div",Xp,[j[8]||(j[8]=l("div",{class:"metric-label"},"TPM",-1)),l("div",Zp,f(F(P.value.current.tpm)),1),j[9]||(j[9]=l("div",{class:"metric-unit"},"Tokens/分钟",-1))]),x("high_tpm")?(c(),d("div",tv,"⚠️")):D("",!0)]),l("div",ev,[j[13]||(j[13]=l("div",{class:"metric-icon"},"🔄",-1)),l("div",sv,[j[11]||(j[11]=l("div",{class:"metric-label"},"RPM",-1)),l("div",nv,f(F(P.value.current.rpm)),1),j[12]||(j[12]=l("div",{class:"metric-unit"},"Requests/分钟",-1))])]),l("div",lv,[j[15]||(j[15]=l("div",{class:"metric-icon"},"📊",-1)),l("div",iv,[j[14]||(j[14]=l("div",{class:"metric-label"},"总 Token",-1)),l("div",ov,f(F(P.value.current.windowTotal.tokens)),1),l("div",av,f(_.value),1)])]),l("div",rv,[j[17]||(j[17]=l("div",{class:"metric-icon"},"🔢",-1)),l("div",uv,[j[16]||(j[16]=l("div",{class:"metric-label"},"总请求",-1)),l("div",cv,f(F(P.value.current.windowTotal.requests)),1),l("div",dv,f(_.value),1)])])]),l("div",fv,[l("div",hv,[l("div",pv,[j[18]||(j[18]=l("h3",null,"TPM 趋势",-1)),l("span",vv,f(it(O.value)),1)]),l("div",gv,[l("div",mv,[(c(!0),d(nt,null,ft(T.value,(et,tt)=>(c(),d("div",{key:tt,class:"chart-bar clickable",style:xt({height:`${Q(et.tpm,R("tpm"))}%`}),title:`${b(et.timestamp)}: ${F(et.tpm)} TPM - 点击查看详情`,onClick:Tt=>rt(et)},[l("span",yv,f(F(et.tpm)),1),l("span",bv,f(b(et.timestamp)),1)],12,_v))),128))])])]),l("div",$v,[l("div",kv,[j[19]||(j[19]=l("h3",null,"RPM 趋势",-1)),l("span",wv,f(it(O.value)),1)]),l("div",Tv,[l("div",Cv,[(c(!0),d(nt,null,ft(T.value,(et,tt)=>(c(),d("div",{key:tt,class:"chart-bar clickable",style:xt({height:`${Q(et.rpm,R("rpm"))}%`}),title:`${b(et.timestamp)}: ${et.rpm} RPM - 点击查看调用详情`,onClick:Tt=>rt(et)},[l("span",xv,f(et.rpm),1),l("span",Av,f(b(et.timestamp)),1)],12,Sv))),128))])])])]),l("div",Iv,[j[23]||(j[23]=l("h3",null,"统计摘要",-1)),l("div",Mv,[l("div",Rv,[j[20]||(j[20]=l("span",{class:"summary-label"},"平均 TPM",-1)),l("span",Ev,f(F(P.value.statistics.avgTpm)),1)]),l("div",Pv,[j[21]||(j[21]=l("span",{class:"summary-label"},"峰值 TPM",-1)),l("span",Dv,f(F(P.value.statistics.peakTpm)),1),P.value.statistics.peakTime?(c(),d("span",Fv,"峰值时间: "+f(P.value.statistics.peakTime),1)):D("",!0)]),l("div",Lv,[j[22]||(j[22]=l("span",{class:"summary-label"},"时间窗口",-1)),l("span",Ov,f(_.value),1)])])]),o.value?(c(),d("div",{key:0,class:"detail-modal-overlay",onClick:j[4]||(j[4]=oe(et=>o.value=!1,["self"]))},[l("div",Nv,[l("div",jv,[l("h3",null,f(u.value),1),l("button",{class:"close-btn",onClick:j[0]||(j[0]=et=>o.value=!1)},"×")]),l("div",Uv,[a.value?(c(),d("div",Vv,"加载详情...")):(k=(S=r.value)==null?void 0:S.calls)!=null&&k.length?(c(),d("div",Wv,[l("div",Hv,f(A.value.length)+" / "+f(r.value.totalCalls)+" 次调用 · "+f(F(y.value))+" Tokens · 平均 "+f(F(((Z=r.value.summary)==null?void 0:Z.avgTokens)||0))+" Tokens/调用 ",1),l("div",Kv,[At(l("input",{"onUpdate:modelValue":j[1]||(j[1]=et=>v.value=et),type:"text",class:"search-input",placeholder:"搜索触发内容..."},null,512),[[jn,v.value]]),At(l("select",{"onUpdate:modelValue":j[2]||(j[2]=et=>p.value=et),class:"agent-filter"},[j[24]||(j[24]=l("option",{value:""},"全部 Agent",-1)),(c(!0),d(nt,null,ft(I.value,et=>(c(),d("option",{key:et,value:et},f(et),9,Bv))),128))],512),[[Pe,p.value]]),At(l("select",{"onUpdate:modelValue":j[3]||(j[3]=et=>$.value=et),class:"sort-select"},[...j[25]||(j[25]=[l("option",{value:"tokens_desc"},"Token 降序",-1),l("option",{value:"tokens_asc"},"Token 升序",-1),l("option",{value:"time_asc"},"时间 升序",-1),l("option",{value:"time_desc"},"时间 降序",-1)])],512),[[Pe,$.value]])]),r.value.calls.some(et=>{var tt;return(tt=et.trigger)==null?void 0:tt.startsWith("【完成回传】")})?(c(),d("div",qv,[...j[26]||(j[26]=[l("span",{class:"hint-badge"},"完成回传",-1),l("span",{class:"hint-text"},"此时间戳为子任务完成后的回传时间,不是派发时间",-1)])])):D("",!0),(c(!0),d(nt,null,ft(A.value,(et,tt)=>{var Tt,Ht;return c(),d("div",{key:tt,class:"detail-call-item"},[l("div",zv,[l("span",Gv,f(et.agentId),1),l("span",Jv,f(et.time),1),l("span",Qv,f(F(et.tokens))+" tokens",1)]),l("div",{class:"call-trigger",title:et.trigger},[(Tt=et.trigger)!=null&&Tt.startsWith("【完成回传】")?(c(),d("span",Xv,"完成回传")):D("",!0),St(" "+f((Ht=et.trigger)==null?void 0:Ht.replace(/^【完成回传】/,"")),1)],8,Yv),et.model?(c(),d("div",Zv,"模型: "+f(et.model),1)):D("",!0)])}),128))])):(c(),d("div",tg,"该时段无调用记录"))])])])):D("",!0),i.value.length>0?(c(),d("div",eg,[j[27]||(j[27]=l("h3",null,"⚠️ 性能告警",-1)),l("div",sg,[(c(!0),d(nt,null,ft(i.value,et=>(c(),d("div",{key:et.id,class:ut(["alert-item",et.type])},[l("span",ng,f(et.message),1),l("span",lg,f(F(et.value))+" (阈值: "+f(F(et.threshold))+")",1),l("span",ig,f(b(et.timestamp)),1),l("button",{class:"ack-btn",onClick:tt=>W(et.id)},"确认",8,og)],2))),128))])])):D("",!0)],64))])}}}),rg=Mt(ag,[["__scopeId","data-v-6508c9b4"]]),ug={class:"token-analysis"},cg={class:"section-header"},dg={class:"time-range-selector"},fg=["onClick"],hg={key:0,class:"loading-state"},pg={key:1,class:"error-state"},vg={class:"summary-cards"},gg={class:"summary-card"},mg={class:"card-content"},_g={class:"card-value"},yg={class:"summary-card"},bg={class:"card-content"},$g={class:"card-value"},kg={class:"summary-card highlight"},wg={class:"card-content"},Tg={class:"card-value"},Cg={class:"card-sub"},Sg={class:"summary-card"},xg={class:"card-content"},Ag={class:"card-value"},Ig={class:"summary-card cost"},Mg={class:"card-content"},Rg={class:"card-value"},Eg={key:0,class:"card-sub saved"},Pg={key:0,class:"trend-section"},Dg={class:"trend-chart"},Fg={class:"trend-bars"},Lg={key:0,class:"bar-tooltip"},Og={key:0,class:"bar-tooltip"},Ng={class:"trend-time"},jg={class:"view-toggle"},Ug={key:1,class:"by-agent-table"},Vg={class:"agent-name"},Wg={class:"total-col"},Hg={class:"percent-bar"},Kg={class:"percent-text"},Bg={class:"total-col"},qg={key:2,class:"by-agent-chart"},zg={class:"bar-chart"},Gg={class:"bar-label"},Jg={class:"bar-container"},Qg={class:"bar-value"},Yg={class:"bar-percent"},Xg=It({__name:"TokenAnalysisPanel",setup(t){const e=N({summary:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0,cacheHitRate:0},cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0,saved:0,savedPercent:0},byAgent:[],trend:null}),s=N(!1),n=N(""),i=N("table"),o=N("all"),a=[{value:"all",label:"全部"},{value:"24h",label:"24小时"},{value:"1h",label:"1小时"},{value:"20m",label:"20分钟"}],r=lt(()=>o.value!=="all"&&e.value.trend),u=lt(()=>{if(!e.value.trend)return 1;const L=[...e.value.trend.input,...e.value.trend.output];return Math.max(...L,1)}),v=lt(()=>[...e.value.byAgent||[]].sort((L,_)=>_.total-L.total));function p(L,_){return Math.max(L/_*100,2)}function $(L){const _=new Date(L);return o.value==="24h"?_.toLocaleString("zh-CN",{hour:"2-digit",hour12:!1})+":00":_.toLocaleString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1})}function I(L){return L==null?"0":L>=1e6?(L/1e6).toFixed(2)+"M":L>=1e3?(L/1e3).toFixed(1)+"K":L.toLocaleString()}function A(L){return L==null?"0%":(L*100).toFixed(1)+"%"}function y(L){return L==null?"0.00":L>=1?L.toFixed(2):L.toFixed(4)}async function P(){s.value=!0,n.value="";try{const L=await fetch(`/api/tokens/analysis?range=${o.value}`);L.ok?e.value=await L.json():n.value="加载失败"}catch(L){n.value=String(L)}finally{s.value=!1}}return Wt(P),Ut(o,P),(L,_)=>{var E,T,R,Q,F,O,it,b,x,W,C,at,bt;return c(),d("section",ug,[l("div",cg,[_[2]||(_[2]=l("h2",null,"Token 分析",-1)),l("div",dg,[(c(),d(nt,null,ft(a,rt=>l("button",{key:rt.value,class:ut(["range-btn",{active:o.value===rt.value}]),onClick:dt=>o.value=rt.value},f(rt.label),11,fg)),64))])]),s.value?(c(),d("div",hg,[..._[3]||(_[3]=[l("div",{class:"spinner"},null,-1),l("span",null,"加载 Token 数据...",-1)])])):n.value?(c(),d("div",pg,[_[4]||(_[4]=l("span",{class:"error-icon"},"⚠️",-1)),l("span",null,f(n.value),1),l("button",{onClick:P,class:"retry-btn"},"重试")])):(c(),d(nt,{key:2},[l("div",vg,[l("div",gg,[_[6]||(_[6]=l("div",{class:"card-icon"},"📥",-1)),l("div",mg,[_[5]||(_[5]=l("div",{class:"card-label"},"Input",-1)),l("div",_g,f(I((E=e.value.summary)==null?void 0:E.input)),1)])]),l("div",yg,[_[8]||(_[8]=l("div",{class:"card-icon"},"📤",-1)),l("div",bg,[_[7]||(_[7]=l("div",{class:"card-label"},"Output",-1)),l("div",$g,f(I((T=e.value.summary)==null?void 0:T.output)),1)])]),l("div",kg,[_[10]||(_[10]=l("div",{class:"card-icon"},"💾",-1)),l("div",wg,[_[9]||(_[9]=l("div",{class:"card-label"},"Cache Read",-1)),l("div",Tg,f(I((R=e.value.summary)==null?void 0:R.cacheRead)),1),l("div",Cg,"命中率 "+f(A((Q=e.value.summary)==null?void 0:Q.cacheHitRate)),1)])]),l("div",Sg,[_[12]||(_[12]=l("div",{class:"card-icon"},"📝",-1)),l("div",xg,[_[11]||(_[11]=l("div",{class:"card-label"},"Cache Write",-1)),l("div",Ag,f(I((F=e.value.summary)==null?void 0:F.cacheWrite)),1)])]),l("div",Ig,[_[14]||(_[14]=l("div",{class:"card-icon"},"💰",-1)),l("div",Mg,[_[13]||(_[13]=l("div",{class:"card-label"},"估算成本",-1)),l("div",Rg,"$"+f(y((O=e.value.cost)==null?void 0:O.total)),1),((it=e.value.cost)==null?void 0:it.saved)>0?(c(),d("div",Eg,"节省 $"+f(y((b=e.value.cost)==null?void 0:b.saved)),1)):D("",!0)])])]),e.value.trend&&r.value?(c(),d("div",Pg,[_[16]||(_[16]=l("h3",null,"Token 消耗趋势",-1)),l("div",Dg,[l("div",Fg,[(c(!0),d(nt,null,ft(e.value.trend.timestamps,(rt,dt)=>(c(),d("div",{key:dt,class:"trend-bar-group"},[l("div",{class:"trend-bar input",style:xt({height:p(e.value.trend.input[dt],u.value)+"%"})},[e.value.trend.input[dt]>0?(c(),d("span",Lg,"In: "+f(I(e.value.trend.input[dt])),1)):D("",!0)],4),l("div",{class:"trend-bar output",style:xt({height:p(e.value.trend.output[dt],u.value)+"%"})},[e.value.trend.output[dt]>0?(c(),d("span",Og,"Out: "+f(I(e.value.trend.output[dt])),1)):D("",!0)],4),l("span",Ng,f($(rt)),1)]))),128))]),_[15]||(_[15]=Ii('<div class="trend-legend" data-v-b98a8391><span class="legend-item" data-v-b98a8391><span class="legend-color input" data-v-b98a8391></span> Input</span><span class="legend-item" data-v-b98a8391><span class="legend-color output" data-v-b98a8391></span> Output</span></div>',1))])])):D("",!0),l("div",jg,[l("button",{class:ut({active:i.value==="table"}),onClick:_[0]||(_[0]=rt=>i.value="table")},"📊 表格",2),l("button",{class:ut({active:i.value==="chart"}),onClick:_[1]||(_[1]=rt=>i.value="chart")},"📈 图表",2)]),i.value==="table"?(c(),d("div",Ug,[l("table",null,[_[19]||(_[19]=l("thead",null,[l("tr",null,[l("th",null,"Agent"),l("th",null,"Input"),l("th",null,"Output"),l("th",null,"Cache"),l("th",null,"总计"),l("th",null,"占比")])],-1)),l("tbody",null,[(c(!0),d(nt,null,ft(v.value,rt=>(c(),d("tr",{key:rt.agent},[l("td",Vg,f(rt.agent),1),l("td",null,f(I(rt.input)),1),l("td",null,f(I(rt.output)),1),l("td",null,f(I(rt.cacheRead+rt.cacheWrite)),1),l("td",Wg,f(I(rt.total)),1),l("td",null,[l("div",Hg,[l("div",{class:"percent-fill",style:xt({width:rt.percent*100+"%"})},null,4),l("span",Kg,f(A(rt.percent)),1)])])]))),128))]),l("tfoot",null,[l("tr",null,[_[17]||(_[17]=l("td",null,[l("strong",null,"合计")],-1)),l("td",null,f(I((x=e.value.summary)==null?void 0:x.input)),1),l("td",null,f(I((W=e.value.summary)==null?void 0:W.output)),1),l("td",null,f(I((((C=e.value.summary)==null?void 0:C.cacheRead)||0)+(((at=e.value.summary)==null?void 0:at.cacheWrite)||0))),1),l("td",Bg,[l("strong",null,f(I((bt=e.value.summary)==null?void 0:bt.total)),1)]),_[18]||(_[18]=l("td",null,"100%",-1))])])])])):(c(),d("div",qg,[_[20]||(_[20]=l("h3",null,"Token 消耗分布",-1)),l("div",zg,[(c(!0),d(nt,null,ft(v.value,rt=>(c(),d("div",{key:rt.agent,class:"bar-row"},[l("div",Gg,f(rt.agent),1),l("div",Jg,[l("div",{class:"bar",style:xt({width:rt.percent*100+"%"})},[l("span",Qg,f(I(rt.total)),1)],4)]),l("div",Yg,f(A(rt.percent)),1)]))),128))])]))],64))])}}}),Zg=Mt(Xg,[["__scopeId","data-v-b98a8391"]]),tm={class:"performance-panel"},em={class:"panel-header"},sm={class:"tab-switcher"},nm={class:"panel-content"},lm=It({__name:"PerformancePanel",setup(t){const e=N("tpm");return(s,n)=>(c(),d("div",tm,[l("div",em,[n[2]||(n[2]=l("h2",null,"性能监控",-1)),l("div",sm,[l("button",{class:ut(["tab-btn",{active:e.value==="tpm"}]),onClick:n[0]||(n[0]=i=>e.value="tpm")}," 📊 TPM/RPM ",2),l("button",{class:ut(["tab-btn",{active:e.value==="token"}]),onClick:n[1]||(n[1]=i=>e.value="token")}," 💰 Token 分析 ",2)])]),l("div",nm,[At(wt(rg,null,null,512),[[gn,e.value==="tpm"]]),At(wt(Zg,null,null,512),[[gn,e.value==="token"]])])]))}}),im=Mt(lm,[["__scopeId","data-v-7962ace4"]]),om={class:"error-center"},am={class:"header"},rm={class:"header-actions"},um=["value"],cm=["value"],dm={class:"stats-row"},fm={class:"stat-card total"},hm={class:"stat-value"},pm={class:"stat-card session"},vm={class:"stat-value"},gm={class:"stat-card model"},mm={class:"stat-value"},_m={class:"stat-value"},ym={key:0,class:"trend-section"},bm={class:"trend-chart"},$m=["title"],km={key:0,class:"bar-label"},wm={class:"trend-labels"},Tm={key:1,class:"type-distribution"},Cm={class:"type-bars"},Sm={class:"type-bar-label"},xm={class:"type-bar-track"},Am={class:"type-count"},Im={key:2,class:"api-status-section"},Mm={class:"api-status-grid"},Rm={class:"api-header"},Em={class:"api-model"},Pm={class:"api-provider"},Dm={class:"api-status"},Fm={class:"status-text"},Lm={key:0,class:"api-last-error"},Om={class:"error-type"},Nm={class:"error-time"},jm={key:1,class:"api-error-count"},Um={class:"error-lists"},Vm={class:"error-group"},Wm={class:"count-badge"},Hm={key:0,class:"empty"},Km={key:1,class:"error-list"},Bm=["onClick"],qm={class:"error-main"},zm={class:"error-agent"},Gm={class:"error-msg"},Jm={class:"error-time"},Qm={class:"expand-icon"},Ym={key:0,class:"error-detail"},Xm={class:"detail-row"},Zm={class:"detail-row"},t1={class:"detail-message"},e1={class:"error-group"},s1={class:"count-badge"},n1={key:0,class:"empty"},l1={key:1,class:"error-list"},i1=["onClick"],o1={class:"error-main"},a1={class:"error-agent"},r1={class:"error-msg"},u1={class:"error-time"},c1={class:"expand-icon"},d1={key:0,class:"error-detail"},f1={class:"detail-row"},h1={class:"detail-row"},p1={class:"detail-message"},v1=It({__name:"ErrorCenterPanel",setup(t){const e=N([]),s=N([]),n=N([]),i=N({totalCount:0,sessionErrorCount:0,modelFailureCount:0,byType:{},byAgent:{},hourlyTrend:[]}),o=N(!1),a=N(""),r=N(null),u=N(""),v=N(""),p=N([]),$={"rate-limit":{label:"Rate Limit",color:"#f59e0b"},"token-limit":{label:"Token 超限",color:"#8b5cf6"},timeout:{label:"超时",color:"#ef4444"},auth:{label:"认证失败",color:"#dc2626"},unknown:{label:"未知错误",color:"#6b7280"}},I=lt(()=>n.value.filter(b=>b.status==="healthy").length),A=lt(()=>{var b;return Math.max(...((b=i.value.hourlyTrend)==null?void 0:b.map(x=>x.count))||[1],1)});function y(b){return b/A.value*100}function P(b){const x=i.value.totalCount||1;return b/x*100}function L(b){var x;return((x=$[b])==null?void 0:x.color)||"#6b7280"}function _(b){const x=b.match(/(\d{2}):00/);return x?x[1]+"h":""}function E(b){if(!b)return"-";const W=Date.now()-b,C=Math.floor(W/6e4);if(C<1)return"刚刚";if(C<60)return`${C}分钟前`;const at=Math.floor(C/60);return at<24?`${at}小时前`:`${Math.floor(at/24)}天前`}function T(b,x){return b?b.length>x?b.slice(0,x)+"...":b:"-"}function R(b){return{healthy:"正常",degraded:"降级",down:"异常"}[b]||"未知"}function Q(b){const x=p.value.find(W=>W.id===b);return x?x.name:b}function F(b){r.value=r.value===b?null:b}async function O(){try{const b=await fetch("/api/agents");if(b.ok){const x=await b.json();p.value=(Array.isArray(x)?x:[]).map(W=>({id:W.id,name:W.name||W.id}))}}catch(b){console.error("Failed to load agents:",b)}}async function it(){o.value=!0,a.value="";try{const b=new URLSearchParams;u.value&&b.set("agent",u.value),v.value&&b.set("type",v.value);const[x,W]=await Promise.all([fetch(`/api/errors/summary?${b.toString()}`),fetch("/api/errors/stats")]);if(x.ok){const C=await x.json();e.value=C.sessionErrors||[],s.value=C.modelFailures||[],n.value=C.apiStatus||[]}W.ok&&(i.value=await W.json())}catch(b){a.value=String(b)}finally{o.value=!1}}return Wt(()=>{O(),it()}),(b,x)=>{var W;return c(),d("section",om,[l("div",am,[x[4]||(x[4]=l("h2",null,"错误中心",-1)),l("div",rm,[At(l("select",{"onUpdate:modelValue":x[0]||(x[0]=C=>u.value=C),onChange:it,class:"filter-select"},[x[2]||(x[2]=l("option",{value:""},"全部 Agent",-1)),(c(!0),d(nt,null,ft(p.value,C=>(c(),d("option",{key:C.id,value:C.id},f(C.name),9,um))),128))],544),[[Pe,u.value]]),At(l("select",{"onUpdate:modelValue":x[1]||(x[1]=C=>v.value=C),onChange:it,class:"filter-select"},[x[3]||(x[3]=l("option",{value:""},"全部类型",-1)),(c(),d(nt,null,ft($,(C,at)=>l("option",{key:at,value:at},f(C.label),9,cm)),64))],544),[[Pe,v.value]]),l("button",{onClick:it,class:"refresh-btn"},"刷新")])]),l("div",dm,[l("div",fm,[l("div",hm,f(i.value.totalCount),1),x[5]||(x[5]=l("div",{class:"stat-label"},"总错误数",-1))]),l("div",pm,[l("div",vm,f(i.value.sessionErrorCount),1),x[6]||(x[6]=l("div",{class:"stat-label"},"Session 错误",-1))]),l("div",gm,[l("div",mm,f(i.value.modelFailureCount),1),x[7]||(x[7]=l("div",{class:"stat-label"},"Model 错误",-1))]),l("div",{class:ut(["stat-card",I.value===n.value.length?"healthy":"warning"])},[l("div",_m,f(I.value)+"/"+f(n.value.length),1),x[8]||(x[8]=l("div",{class:"stat-label"},"API 健康",-1))],2)]),(W=i.value.hourlyTrend)!=null&&W.length?(c(),d("div",ym,[x[9]||(x[9]=l("h3",null,"24 小时错误趋势",-1)),l("div",bm,[(c(!0),d(nt,null,ft(i.value.hourlyTrend,(C,at)=>(c(),d("div",{key:at,class:"trend-bar",style:xt({height:y(C.count)+"%"}),title:`${C.hour}: ${C.count} 个错误`},[C.count>0?(c(),d("span",km,f(C.count),1)):D("",!0)],12,$m))),128))]),l("div",wm,[(c(!0),d(nt,null,ft(i.value.hourlyTrend,(C,at)=>(c(),d("span",{key:at,class:"trend-time"},f(at%4===0?_(C.hour):""),1))),128))])])):D("",!0),Object.keys(i.value.byType||{}).length?(c(),d("div",Tm,[x[10]||(x[10]=l("h3",null,"错误类型分布",-1)),l("div",Cm,[(c(!0),d(nt,null,ft(i.value.byType,(C,at)=>(c(),d("div",{key:at,class:"type-bar-item"},[l("div",Sm,[l("span",{class:"type-dot",style:xt({background:C.color})},null,4),St(" "+f(C.label),1)]),l("div",xm,[l("div",{class:"type-bar-fill",style:xt({width:P(C.count)+"%",background:C.color})},null,4)]),l("span",Am,f(C.count),1)]))),128))])])):D("",!0),n.value.length?(c(),d("div",Im,[x[11]||(x[11]=l("h3",null,"API 状态",-1)),l("div",Mm,[(c(!0),d(nt,null,ft(n.value,C=>(c(),d("div",{key:C.model,class:ut(["api-status-card",`status-${C.status}`])},[l("div",Rm,[l("span",Em,f(C.model),1),l("span",Pm,f(C.provider),1)]),l("div",Dm,[l("span",{class:ut(["status-dot",`status-${C.status}`])},null,2),l("span",Fm,f(R(C.status)),1)]),C.lastError?(c(),d("div",Lm,[l("span",Om,f(C.lastError.type),1),l("span",Nm,f(E(C.lastError.timestamp)),1)])):D("",!0),C.errorCount>0?(c(),d("div",jm," 错误: "+f(C.errorCount)+" 次 ",1)):D("",!0)],2))),128))])])):D("",!0),l("div",Um,[l("div",Vm,[l("h3",null,[x[12]||(x[12]=St("Session 错误 ",-1)),l("span",Wm,f(e.value.length),1)]),e.value.length?(c(),d("div",Km,[(c(!0),d(nt,null,ft(e.value,C=>(c(),d("div",{key:C.id,class:ut(["error-item",`severity-${C.severity}`]),onClick:at=>F(C.id)},[l("div",qm,[l("span",zm,f(Q(C.agentId)),1),l("span",{class:"error-type",style:xt({color:L(C.type)})},f(C.typeLabel),5),l("span",Gm,f(T(C.message,80)),1),l("span",Jm,f(E(C.timestamp)),1),l("span",Qm,f(r.value===C.id?"▼":"▶"),1)]),r.value===C.id?(c(),d("div",Ym,[l("div",Xm,[x[13]||(x[13]=l("span",{class:"detail-label"},"时间:",-1)),l("span",null,f(C.datetime),1)]),l("div",Zm,[x[14]||(x[14]=l("span",{class:"detail-label"},"完整信息:",-1)),l("span",t1,f(C.fullMessage||C.message),1)])])):D("",!0)],10,Bm))),128))])):(c(),d("div",Hm,"暂无错误"))]),l("div",e1,[l("h3",null,[x[15]||(x[15]=St("Model Failures ",-1)),l("span",s1,f(s.value.length),1)]),s.value.length?(c(),d("div",l1,[(c(!0),d(nt,null,ft(s.value,C=>(c(),d("div",{key:C.id,class:ut(["error-item",`severity-${C.severity}`]),onClick:at=>F(C.id)},[l("div",o1,[l("span",a1,f(C.model),1),l("span",{class:"error-type",style:xt({color:L(C.type)})},f(C.typeLabel),5),l("span",r1,f(T(C.message,80)),1),l("span",u1,f(E(C.timestamp)),1),l("span",c1,f(r.value===C.id?"▼":"▶"),1)]),r.value===C.id?(c(),d("div",d1,[l("div",f1,[x[16]||(x[16]=l("span",{class:"detail-label"},"时间:",-1)),l("span",null,f(C.datetime),1)]),l("div",h1,[x[17]||(x[17]=l("span",{class:"detail-label"},"完整信息:",-1)),l("span",p1,f(C.fullMessage||C.message),1)])])):D("",!0)],10,i1))),128))])):(c(),d("div",n1,"暂无错误"))])])])}}}),g1=Mt(v1,[["__scopeId","data-v-ca874c41"]]),m1={class:"version-display"},_1={key:0,class:"loading-text"},y1={key:1,class:"error-text"},b1={key:0,class:"tooltip"},$1={class:"tooltip-item"},k1={class:"tooltip-item"},w1={class:"tooltip-item"},T1={key:0,class:"tooltip-item"},C1={key:1,class:"tooltip-item"},S1=It({__name:"VersionDisplay",setup(t){const e=N(!0),s=N(!1),n=N({version:"",name:"",description:""}),i=N(!1),o=lt(()=>n.value.name&&n.value.version?`${n.value.name} v${n.value.version}`:n.value.version||"v?"),a=u=>{try{return new Date(u).toLocaleString("zh-CN")}catch{return u}},r=async()=>{try{e.value=!0,s.value=!1;const u=`${window.location.origin}/api/version`,v=await fetch(u,{headers:{Accept:"application/json"},cache:"no-store"});if(!v.ok){const p=await v.text().catch(()=>"");throw new Error(`HTTP ${v.status}${p?`: ${p.slice(0,120)}`:""}`)}n.value=await v.json()}catch(u){console.error("获取版本信息失败:",u),s.value=!0}finally{e.value=!1}};return Wt(()=>{r()}),(u,v)=>(c(),d("div",m1,[e.value?(c(),d("span",_1,"加载中...")):s.value?(c(),d("span",y1,"版本信息获取失败")):(c(),d(nt,{key:2},[l("span",{class:"version-text",onMouseenter:v[0]||(v[0]=p=>i.value=!0),onMouseleave:v[1]||(v[1]=p=>i.value=!1)},f(o.value),33),i.value?(c(),d("div",b1,[l("div",$1,[v[2]||(v[2]=l("strong",null,"名称:",-1)),St(" "+f(n.value.name),1)]),l("div",k1,[v[3]||(v[3]=l("strong",null,"版本:",-1)),St(" "+f(n.value.version),1)]),l("div",w1,[v[4]||(v[4]=l("strong",null,"描述:",-1)),St(" "+f(n.value.description),1)]),n.value.build_date?(c(),d("div",T1,[v[5]||(v[5]=l("strong",null,"构建时间:",-1)),St(" "+f(a(n.value.build_date)),1)])):D("",!0),n.value.git_commit?(c(),d("div",C1,[v[6]||(v[6]=l("strong",null,"Git 提交:",-1)),St(" "+f(n.value.git_commit),1)])):D("",!0)])):D("",!0)],64))]))}}),x1=Mt(S1,[["__scopeId","data-v-87a575a1"]]),A1={id:"app"},I1={class:"controls"},M1={class:"collaboration-section"},R1={class:"task-status-section"},E1={class:"performance-section"},P1={class:"error-center-section"},D1=It({__name:"App",setup(t){const e=Li(),s=ar(),n=ur();$s("realtimeManager",e),$s("stateManager",s),$s("eventDispatcher",n);const i=N([]),o=N(null),a=N(!1),r=N({status:"disconnected",reconnectAttempts:0}),u=lt(()=>{switch(r.value.status){case"connected":return"已连接";case"connecting":return"连接中...";case"disconnected":return"未连接";case"error":return"连接错误";default:return"未知"}}),v=N(null),p=N("main"),$=N([]);async function I(){try{const[R,Q]=await Promise.all([fetch("/api/agents"),fetch("/api/config").catch(()=>null)]),F=await R.json();if(i.value=Array.isArray(F)?F:[],Q!=null&&Q.ok){const b=await Q.json();p.value=b&&b.mainAgentId||"main"}const O=Array.isArray(i.value)?i.value:[],it=O.find(b=>b.id===p.value);it&&(v.value=it),$.value=O.filter(b=>b.id!==p.value)}catch(R){console.error("刷新数据失败:",R)}}function A(R){o.value=R}function y(R){const Q=R.id===p.value?v.value:$.value.find(F=>F.id===R.id);A(Q||{id:R.id,name:R.name,role:R.id===p.value?"主 Agent":"子 Agent",status:R.status==="error"?"down":R.status})}function P(R){I()}function L(R){r.value=R}let _=null,E=null,T=null;return Wt(()=>{I(),e.connect(),_=e.onStateChange(L),E=e.subscribe("agents",R=>{if(Array.isArray(R)){i.value=R;const Q=R.find(F=>F.id===p.value);v.value=Q||null,$.value=R.filter(F=>F.id!==p.value)}}),T=e.subscribe("agents_update",R=>{if(Array.isArray(R)){R.forEach(F=>{const O=i.value.findIndex(it=>it.id===F.id);O>=0&&(i.value[O]={...i.value[O],...F})});const Q=i.value.find(F=>F.id===p.value);Q&&(v.value=Q),$.value=i.value.filter(F=>F.id!==p.value)}})}),Zt(()=>{_==null||_(),E==null||E(),T==null||T(),e.disconnect()}),(R,Q)=>(c(),d("div",A1,[l("header",null,[Q[3]||(Q[3]=l("h1",null,"OpenClaw Agent Dashboard",-1)),l("div",I1,[wt(x1),l("button",{onClick:I},"刷新"),l("button",{onClick:Q[0]||(Q[0]=F=>a.value=!0)},"⚙️ 设置"),l("span",{class:ut(["connection-status",r.value.status])},f(u.value),3)])]),l("main",null,[l("section",M1,[wt(jh,{"main-agent":v.value,"sub-agents":$.value,"main-agent-id":p.value,onAgentClick:y},null,8,["main-agent","sub-agents","main-agent-id"])]),l("section",R1,[wt(Hp)]),l("section",E1,[wt(im)]),l("section",P1,[wt(g1)])]),a.value?(c(),Qt(Qd,{key:0,onClose:Q[1]||(Q[1]=F=>a.value=!1),onSettingsChanged:P})):D("",!0),o.value?(c(),Qt(Od,{key:1,agent:o.value,onClose:Q[2]||(Q[2]=F=>o.value=null)},null,8,["agent"])):D("",!0)]))}}),F1=Mt(D1,[["__scopeId","data-v-543ef282"]]);er(F1).mount("#app");